import{a as pe,b as $e,c as MG,d as O_,e as Wu,f as G0,g as mp,h as xfe,i as _t}from"./chunk-J4ERDEQQ.js";var s1e=Wu((C5,U$)=>{"use strict";(function(){var t,i="4.17.21",e=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",o="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",c=500,m="__lodash_placeholder__",g=1,C=2,w=4,P=1,R=2,z=1,H=2,j=4,K=8,ne=16,me=32,Te=64,Ie=128,ye=256,fe=512,Re=30,Ae="...",ke=800,Qe=16,we=1,Rt=2,rt=3,Ze=1/0,Et=9007199254740991,We=17976931348623157e292,bt=NaN,st=4294967295,kt=st-1,pi=st>>>1,Kt=[["ary",Ie],["bind",z],["bindKey",H],["curry",K],["curryRight",ne],["flip",fe],["partial",me],["partialRight",Te],["rearg",ye]],gt="[object Arguments]",ht="[object Array]",li="[object AsyncFunction]",ui="[object Boolean]",Bi="[object Date]",wn="[object DOMException]",yn="[object Error]",Xn="[object Function]",Rr="[object GeneratorFunction]",De="[object Map]",bi="[object Number]",Ci="[object Null]",Mt="[object Object]",wt="[object Promise]",ti="[object Proxy]",Ut="[object RegExp]",vi="[object Set]",Xt="[object String]",$i="[object Symbol]",Bt="[object Undefined]",Qt="[object WeakMap]",Ti="[object WeakSet]",Ki="[object ArrayBuffer]",un="[object DataView]",Sr="[object Float32Array]",lo="[object Float64Array]",Wr="[object Int8Array]",qr="[object Int16Array]",Eo="[object Int32Array]",os="[object Uint8Array]",vl="[object Uint8ClampedArray]",jl="[object Uint16Array]",Dd="[object Uint32Array]",Na=/\b__p \+= '';/g,xc=/\b(__p \+=) '' \+/g,gg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hi=/&(?:amp|lt|gt|quot|#39);/g,Cn=/[&<>"']/g,wr=RegExp(Hi.source),Ao=RegExp(Cn.source),ga=/<%-([\s\S]+?)%>/g,yi=/<%([\s\S]+?)%>/g,as=/<%=([\s\S]+?)%>/g,Nc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xu=/^\w*$/,At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ce=/[\\^$.*+?()[\]{}|]/g,Me=RegExp(Ce.source),Ke=/^\s+/,xt=/\s/,mt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,ii=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oi=/[()=,{}\[\]\/\s]/,ln=/\\(\\)?/g,zi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/\w*$/,Pr=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,jo=/^\[object .+?Constructor\]$/,Yr=/^0o[0-7]+$/i,Fo=/^(?:0|[1-9]\d*)$/,js=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ko=/($^)/,Sc=/['\n\r\u2028\u2029\\]/g,Gc="\\ud800-\\udfff",md="\\u0300-\\u036f",Ns="\\ufe20-\\ufe2f",Za="\\u20d0-\\u20ff",Kl=md+Ns+Za,Wl="\\u2700-\\u27bf",sl="a-z\\xdf-\\xf6\\xf8-\\xff",Uu="\\xac\\xb1\\xd7\\xf7",sm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yf="\\u2000-\\u206f",Ny=" \\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",lp="A-Z\\xc0-\\xd6\\xd8-\\xde",UC="\\ufe0e\\ufe0f",zO=Uu+sm+yf+Ny,S0="['\u2019]",V1="["+Gc+"]",z1="["+zO+"]",ob="["+Kl+"]",Fy="\\d+",RI="["+Wl+"]",KA="["+sl+"]",l_="[^"+Gc+zO+Fy+Wl+sl+lp+"]",PI="\\ud83c[\\udffb-\\udfff]",WA="(?:"+ob+"|"+PI+")",Mh="[^"+Gc+"]",vf="(?:\\ud83c[\\udde6-\\uddff]){2}",c_="[\\ud800-\\udbff][\\udc00-\\udfff]",lm="["+lp+"]",Dp="\\u200d",ab="(?:"+KA+"|"+l_+")",UO="(?:"+lm+"|"+l_+")",U1="(?:"+S0+"(?:d|ll|m|re|s|t|ve))?",Ly="(?:"+S0+"(?:D|LL|M|RE|S|T|VE))?",H1=WA+"?",G1="["+UC+"]?",j1="(?:"+Dp+"(?:"+[Mh,vf,c_].join("|")+")"+G1+H1+")*",bf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HO="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",NI=G1+H1+j1,$1="(?:"+[RI,vf,c_].join("|")+")"+NI,QA="(?:"+[Mh+ob+"?",ob,vf,c_,V1].join("|")+")",GO=RegExp(S0,"g"),ZA=RegExp(ob,"g"),pa=RegExp(PI+"(?="+PI+")|"+QA+NI,"g"),q1=RegExp([lm+"?"+KA+"+"+U1+"(?="+[z1,lm,"$"].join("|")+")",UO+"+"+Ly+"(?="+[z1,lm+ab,"$"].join("|")+")",lm+"?"+ab+"+"+U1,lm+"+"+Ly,HO,bf,Fy,$1].join("|"),"g"),ZB=RegExp("["+Dp+Gc+Kl+UC+"]"),XB=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,XA=["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"],sb=-1,ac={};ac[Sr]=ac[lo]=ac[Wr]=ac[qr]=ac[Eo]=ac[os]=ac[vl]=ac[jl]=ac[Dd]=!0,ac[gt]=ac[ht]=ac[Ki]=ac[ui]=ac[un]=ac[Bi]=ac[yn]=ac[Xn]=ac[De]=ac[bi]=ac[Mt]=ac[Ut]=ac[vi]=ac[Xt]=ac[Qt]=!1;var sc={};sc[gt]=sc[ht]=sc[Ki]=sc[un]=sc[ui]=sc[Bi]=sc[Sr]=sc[lo]=sc[Wr]=sc[qr]=sc[Eo]=sc[De]=sc[bi]=sc[Mt]=sc[Ut]=sc[vi]=sc[Xt]=sc[$i]=sc[os]=sc[vl]=sc[jl]=sc[Dd]=!0,sc[yn]=sc[Xn]=sc[Qt]=!1;var JA={\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"},JB={"&":"&","<":"<",">":">",'"':""","'":"'"},HC={"&":"&","<":"<",">":">",""":'"',"'":"'"},e3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jO=parseFloat,Y1=parseInt,FI=typeof global=="object"&&global&&global.Object===Object&&global,d_=typeof self=="object"&&self&&self.Object===Object&&self,qd=FI||d_||Function("return this")(),K1=typeof C5=="object"&&C5&&!C5.nodeType&&C5,Hu=K1&&typeof U$=="object"&&U$&&!U$.nodeType&&U$,lb=Hu&&Hu.exports===K1,Qm=lb&&FI.process,Oh=(function(){try{var Ri=Hu&&Hu.require&&Hu.require("util").types;return Ri||Qm&&Qm.binding&&Qm.binding("util")}catch{}})(),LI=Oh&&Oh.isArrayBuffer,eD=Oh&&Oh.isDate,Xa=Oh&&Oh.isMap,tD=Oh&&Oh.isRegExp,$O=Oh&&Oh.isSet,BI=Oh&&Oh.isTypedArray;function mr(Ri,kn,fn){switch(fn.length){case 0:return Ri.call(kn);case 1:return Ri.call(kn,fn[0]);case 2:return Ri.call(kn,fn[0],fn[1]);case 3:return Ri.call(kn,fn[0],fn[1],fn[2])}return Ri.apply(kn,fn)}function qO(Ri,kn,fn,ko){for(var us=-1,Dl=Ri==null?0:Ri.length;++us-1}function Ha(Ri,kn,fn){for(var ko=-1,us=Ri==null?0:Ri.length;++ko-1;);return fn}function Nr(Ri,kn){for(var fn=Ri.length;fn--&&w0(kn,Ri[fn],0)>-1;);return fn}function GC(Ri,kn){for(var fn=Ri.length,ko=0;fn--;)Ri[fn]===kn&&++ko;return ko}var tS=X1(JA),jr=X1(JB);function KO(Ri){return"\\"+e3[Ri]}function UI(Ri,kn){return Ri==null?t:Ri[kn]}function T0(Ri){return ZB.test(Ri)}function WO(Ri){return XB.test(Ri)}function rD(Ri){for(var kn,fn=[];!(kn=Ri.next()).done;)fn.push(kn.value);return fn}function Fc(Ri){var kn=-1,fn=Array(Ri.size);return Ri.forEach(function(ko,us){fn[++kn]=[us,ko]}),fn}function oD(Ri,kn){return function(fn){return Ri(kn(fn))}}function cm(Ri,kn){for(var fn=-1,ko=Ri.length,us=0,Dl=[];++fn-1}function KI(T,B){var Q=this.__data__,Se=Gy(Q,T);return Se<0?(++this.size,Q.push([T,B])):Q[Se][1]=B,this}Xm.prototype.clear=WC,Xm.prototype.delete=l3,Xm.prototype.get=If,Xm.prototype.has=fD,Xm.prototype.set=KI;function _g(T){var B=-1,Q=T==null?0:T.length;for(this.clear();++B=B?T:B)),T}function Yu(T,B,Q,Se,Ge,St){var Zt,wi=B&g,Ui=B&C,Vn=B&w;if(Q&&(Zt=Ge?Q(T,Se,Ge,St):Q(T)),Zt!==t)return Zt;if(!hu(T))return T;var Yn=Cs(T);if(Yn){if(Zt=DH(T),!wi)return pu(T,Zt)}else{var lr=Lp(T),co=lr==Xn||lr==Rr;if(cd(T))return fR(T,wi);if(lr==Mt||lr==gt||co&&!Ge){if(Zt=Ui||co?{}:Ml(T),!wi)return Ui?bb(T,sR(Zt,T)):ox(T,_D(Zt,T))}else{if(!sc[lr])return Ge?T:{};Zt=pT(T,lr,wi)}}St||(St=new yg);var $o=St.get(T);if($o)return $o;St.set(T,Zt),yT(T)?T.forEach(function(ma){Zt.add(Yu(ma,B,Q,ma,T,St))}):fZ(T)&&T.forEach(function(ma,Bs){Zt.set(Bs,Yu(ma,B,Q,Bs,T,St))});var Aa=Vn?Ui?UD:xS:Ui?Ag:mm,$s=Yn?t:Aa(T);return hd($s||T,function(ma,Bs){$s&&(Bs=ma,ma=T[Bs]),ZC(Zt,Bs,Yu(ma,B,Q,Bs,T,St))}),Zt}function lR(T){var B=mm(T);return function(Q){return JI(Q,T,B)}}function JI(T,B,Q){var Se=Q.length;if(T==null)return!Se;for(T=lc(T);Se--;){var Ge=Q[Se],St=B[Ge],Zt=T[Ge];if(Zt===t&&!(Ge in T)||!St(Zt))return!1}return!0}function yD(T,B,Q){if(typeof T!="function")throw new Cf(r);return E_(function(){T.apply(t,Q)},B)}function XC(T,B,Q,Se){var Ge=-1,St=ir,Zt=!0,wi=T.length,Ui=[],Vn=B.length;if(!wi)return Ui;Q&&(B=Do(B,jc(Q))),Se?(St=Ha,Zt=!1):B.length>=e&&(St=Rn,Zt=!1,B=new Hy(B));e:for(;++GeGe?0:Ge+Q),Se=Se===t||Se>Ge?Ge:Ls(Se),Se<0&&(Se+=Ge),Se=Q>Se?0:D3(Se);Q0&&Q(wi)?B>1?cp(wi,B-1,Q,Se,Ge):uu(Ge,wi):Se||(Ge[Ge.length]=wi)}return Ge}var vD=sT(),p3=sT(!0);function Ef(T,B){return T&&vD(T,B,mm)}function tT(T,B){return T&&p3(T,B,mm)}function Af(T,B){return kp(B,function(Q){return Ib(T[Q])})}function b_(T,B){B=w_(B,T);for(var Q=0,Se=B.length;T!=null&&QB}function bD(T,B){return T!=null&&kl.call(T,B)}function iT(T,B){return T!=null&&B in lc(T)}function CD(T,B,Q){return T>=qu(B,Q)&&T<$u(B,Q)}function xD(T,B,Q){for(var Se=Q?Ha:ir,Ge=T[0].length,St=T.length,Zt=St,wi=fn(St),Ui=1/0,Vn=[];Zt--;){var Yn=T[Zt];Zt&&B&&(Yn=Do(Yn,jc(B))),Ui=qu(Yn.length,Ui),wi[Zt]=!Q&&(B||Ge>=120&&Yn.length>=120)?new Hy(Zt&&Yn):t}Yn=T[0];var lr=-1,co=wi[0];e:for(;++lr-1;)wi!==T&&Zm.call(wi,Ui,1),Zm.call(T,Ui,1);return T}function yb(T,B){for(var Q=T?B.length:0,Se=Q-1;Q--;){var Ge=B[Q];if(Q==Se||Ge!==St){var St=Ge;Sg(Ge)?Zm.call(T,Ge,1):vb(T,Ge)}}return T}function rT(T,B){return T+cS(dD()*(B-T+1))}function f3(T,B,Q,Se){for(var Ge=-1,St=$u($I((B-T)/(Q||1)),0),Zt=fn(St);St--;)Zt[Se?St:++Ge]=T,T+=Q;return Zt}function x_(T,B){var Q="";if(!T||B<1||B>Et)return Q;do B%2&&(Q+=T),B=cS(B/2),B&&(T+=T);while(B);return Q}function Es(T,B){return N0(C3(T,B,hm),T+"")}function tx(T){return c3(QD(T))}function ix(T,B){var Q=QD(T);return B0(Q,Tf(B,0,Q.length))}function S_(T,B,Q,Se){if(!hu(T))return T;B=w_(B,T);for(var Ge=-1,St=B.length,Zt=St-1,wi=T;wi!=null&&++GeGe?0:Ge+B),Q=Q>Ge?Ge:Q,Q<0&&(Q+=Ge),Ge=B>Q?0:Q-B>>>0,B>>>=0;for(var St=fn(Ge);++Se>>1,Zt=T[St];Zt!==null&&!Vh(Zt)&&(Q?Zt<=B:Zt=e){var Vn=B?null:sx(T);if(Vn)return Gu(Vn);Zt=!1,Ge=Rn,Ui=new Hy}else Ui=B?[]:wi;e:for(;++Se=Se?T:bs(T,B,Q)}var ND=cD||function(T){return qd.clearTimeout(T)};function fR(T,B){if(B)return T.slice();var Q=T.length,Se=lS?lS(Q):new T.constructor(Q);return T.copy(Se),Se}function gR(T){var B=new T.constructor(T.byteLength);return new Vy(B).set(new Vy(T)),B}function g3(T,B){var Q=B?gR(T.buffer):T.buffer;return new T.constructor(Q,T.byteOffset,T.byteLength)}function _3(T){var B=new T.constructor(T.source,Jn.exec(T));return B.lastIndex=T.lastIndex,B}function Fp(T){return Uy?lc(Uy.call(T)):{}}function Ky(T,B){var Q=B?gR(T.buffer):T.buffer;return new T.constructor(Q,T.byteOffset,T.length)}function rx(T,B){if(T!==B){var Q=T!==t,Se=T===null,Ge=T===T,St=Vh(T),Zt=B!==t,wi=B===null,Ui=B===B,Vn=Vh(B);if(!wi&&!Vn&&!St&&T>B||St&&Zt&&Ui&&!wi&&!Vn||Se&&Zt&&Ui||!Q&&Ui||!Ge)return 1;if(!Se&&!St&&!Vn&&T=wi)return Ui;var Vn=Q[Se];return Ui*(Vn=="desc"?-1:1)}}return T.index-B.index}function ia(T,B,Q,Se){for(var Ge=-1,St=T.length,Zt=Q.length,wi=-1,Ui=B.length,Vn=$u(St-Zt,0),Yn=fn(Ui+Vn),lr=!Se;++wi1?Q[Ge-1]:t,Zt=Ge>2?Q[2]:t;for(St=T.length>3&&typeof St=="function"?(Ge--,St):t,Zt&&Ku(Q[0],Q[1],Zt)&&(St=Ge<3?t:St,Ge=1),B=lc(B);++Se-1?Ge[St?B[Zt]:Zt]:t}}function Cg(T){return Nh(function(B){var Q=B.length,Se=Q,Ge=wf.prototype.thru;for(T&&B.reverse();Se--;){var St=B[Se];if(typeof St!="function")throw new Cf(r);if(Ge&&!Zt&&dT(St)=="wrapper")var Zt=new wf([],!0)}for(Se=Zt?Se:Q;++Se1&&Rl.reverse(),Yn&&Uiwi))return!1;var Vn=St.get(T),Yn=St.get(B);if(Vn&&Yn)return Vn==B&&Yn==T;var lr=-1,co=!0,$o=Q&R?new Hy:t;for(St.set(T,B),St.set(B,T);++lr1?"& ":"")+B[Se],B=B.join(Q>2?", ":" "),T.replace(mt,`{ /* [wrapped with `+B+`] */ `)}function MH(T){return Cs(T)||TS(T)||!!(ta&&T&&T[ta])}function Sg(T,B){var Q=typeof T;return B=B??Et,!!B&&(Q=="number"||Q!="symbol"&&Fo.test(T))&&T>-1&&T%1==0&&T0){if(++B>=ke)return arguments[0]}else B=0;return T.apply(t,arguments)}}function B0(T,B){var Q=-1,Se=T.length,Ge=Se-1;for(B=B===t?Se:B;++Q1?T[B-1]:t;return Q=typeof Q=="function"?(T.pop(),Q):t,Ua(T,Q)});function xl(T){var B=ft(T);return B.__chain__=!0,B}function Jc(T,B){return B(T),T}function Md(T,B){return B(T)}var kf=Nh(function(T){var B=T.length,Q=B?T[0]:0,Se=this.__wrapped__,Ge=function(St){return jy(St,T)};return B>1||this.__actions__.length||!(Se instanceof ll)||!Sg(Q)?this.thru(Ge):(Se=Se.slice(Q,+Q+(B?1:0)),Se.__actions__.push({func:Md,args:[Ge],thisArg:t}),new wf(Se,this.__chain__).thru(function(St){return B&&!St.length&&St.push(t),St}))});function Mf(){return xl(this)}function Lh(){return new wf(this.value(),this.__chain__)}function Bh(){this.__values__===t&&(this.__values__=WD(this.value()));var T=this.__index__>=this.__values__.length,B=T?t:this.__values__[this.__index__++];return{done:T,value:B}}function um(){return this}function Ig(T){for(var B,Q=this;Q instanceof y_;){var Se=l(Q);Se.__index__=0,Se.__values__=t,B?Ge.__wrapped__=Se:B=Se;var Ge=Se;Q=Q.__wrapped__}return Ge.__wrapped__=T,B}function D_(){var T=this.__wrapped__;if(T instanceof ll){var B=T;return this.__actions__.length&&(B=new ll(this)),B=B.reverse(),B.__actions__.push({func:Md,args:[Si],thisArg:t}),new wf(B,this.__chain__)}return this.thru(Si)}function cc(){return hR(this.__wrapped__,this.__actions__)}var Ic=_S(function(T,B,Q){kl.call(T,Q)?++T[Q]:vg(T,Q,1)});function Ol(T,B,Q){var Se=Cs(T)?VI:cR;return Q&&Ku(T,B,Q)&&(B=t),Se(T,Ca(B,3))}function gd(T,B){var Q=Cs(T)?kp:u3;return Q(T,Ca(B,3))}var Kd=LD(oe),$c=LD(ce);function up(T,B){return cp(Of(T,B),1)}function V0(T,B){return cp(Of(T,B),Ze)}function ev(T,B,Q){return Q=Q===t?1:Ls(Q),cp(Of(T,B),Q)}function Tg(T,B){var Q=Cs(T)?hd:v_;return Q(T,Ca(B,3))}function tv(T,B){var Q=Cs(T)?u_:eT;return Q(T,Ca(B,3))}var wb=_S(function(T,B,Q){kl.call(T,Q)?T[Q].push(B):vg(T,Q,[B])});function z0(T,B,Q,Se){T=Rf(T)?T:QD(T),Q=Q&&!Se?Ls(Q):0;var Ge=T.length;return Q<0&&(Q=$u(Ge+Q,0)),AR(T)?Q<=Ge&&T.indexOf(B,Q)>-1:!!Ge&&w0(T,B,Q)>-1}var IS=Es(function(T,B,Q){var Se=-1,Ge=typeof B=="function",St=Rf(T)?fn(T.length):[];return v_(T,function(Zt){St[++Se]=Ge?mr(B,Zt,Q):O0(Zt,B,Q)}),St}),iv=_S(function(T,B,Q){vg(T,Q,B)});function Of(T,B){var Q=Cs(T)?Do:Jm;return Q(T,Ca(B,3))}function nv(T,B,Q,Se){return T==null?[]:(Cs(B)||(B=B==null?[]:[B]),Q=Se?t:Q,Cs(Q)||(Q=Q==null?[]:[Q]),DD(T,B,Q))}var $D=_S(function(T,B,Q){T[Q?0:1].push(B)},function(){return[[],[]]});function pm(T,B,Q){var Se=Cs(T)?By:Op,Ge=arguments.length<3;return Se(T,Ca(B,4),Q,Ge,v_)}function qD(T,B,Q){var Se=Cs(T)?Ga:Op,Ge=arguments.length<3;return Se(T,Ca(B,4),Q,Ge,eT)}function Qme(T,B){var Q=Cs(T)?kp:u3;return Q(T,YD(Ca(B,3)))}function Zme(T){var B=Cs(T)?c3:tx;return B(T)}function S3(T,B,Q){(Q?Ku(T,B,Q):B===t)?B=1:B=Ls(B);var Se=Cs(T)?TH:ix;return Se(T,B)}function Xme(T){var B=Cs(T)?aR:hS;return B(T)}function nZ(T){if(T==null)return 0;if(Rf(T))return AR(T)?E0(T):T.length;var B=Lp(T);return B==De||B==vi?T.size:TD(T).length}function w3(T,B,Q){var Se=Cs(T)?W1:zt;return Q&&Ku(T,B,Q)&&(B=t),Se(T,Ca(B,3))}var Jme=Es(function(T,B){if(T==null)return[];var Q=B.length;return Q>1&&Ku(T,B[0],B[1])?B=[]:Q>2&&Ku(B[0],B[1],B[2])&&(B=[B[0]]),DD(T,cp(B,1),[])}),wR=gH||function(){return qd.Date.now()};function ehe(T,B){if(typeof B!="function")throw new Cf(r);return T=Ls(T),function(){if(--T<1)return B.apply(this,arguments)}}function I3(T,B,Q){return B=Q?t:B,B=T&&B==null?T.length:B,xg(T,Ie,t,t,t,t,B)}function rv(T,B){var Q;if(typeof B!="function")throw new Cf(r);return T=Ls(T),function(){return--T>0&&(Q=B.apply(this,arguments)),T<=1&&(B=t),Q}}var ov=Es(function(T,B,Q){var Se=z;if(Q.length){var Ge=cm(Q,Jy(ov));Se|=me}return xg(T,Se,B,Q,Ge)}),RH=Es(function(T,B,Q){var Se=z|H;if(Q.length){var Ge=cm(Q,Jy(RH));Se|=me}return xg(B,Se,T,Q,Ge)});function PH(T,B,Q){B=Q?t:B;var Se=xg(T,K,t,t,t,t,t,B);return Se.placeholder=PH.placeholder,Se}function IR(T,B,Q){B=Q?t:B;var Se=xg(T,ne,t,t,t,t,t,B);return Se.placeholder=IR.placeholder,Se}function T3(T,B,Q){var Se,Ge,St,Zt,wi,Ui,Vn=0,Yn=!1,lr=!1,co=!0;if(typeof T!="function")throw new Cf(r);B=Eg(B)||0,hu(Q)&&(Yn=!!Q.leading,lr="maxWait"in Q,St=lr?$u(Eg(Q.maxWait)||0,B):St,co="trailing"in Q?!!Q.trailing:co);function $o(Wd){var k_=Se,Lf=Ge;return Se=Ge=t,Vn=Wd,Zt=T.apply(Lf,k_),Zt}function Aa(Wd){return Vn=Wd,wi=E_(Bs,B),Yn?$o(Wd):Zt}function $s(Wd){var k_=Wd-Ui,Lf=Wd-Vn,G3=B-k_;return lr?qu(G3,St-Lf):G3}function ma(Wd){var k_=Wd-Ui,Lf=Wd-Vn;return Ui===t||k_>=B||k_<0||lr&&Lf>=St}function Bs(){var Wd=wR();if(ma(Wd))return Rl(Wd);wi=E_(Bs,$s(Wd))}function Rl(Wd){return wi=t,co&&Se?$o(Wd):(Se=Ge=t,Zt)}function th(){wi!==t&&ND(wi),Vn=0,Se=Ui=Ge=wi=t}function Nf(){return wi===t?Zt:Rl(wR())}function Ff(){var Wd=wR(),k_=ma(Wd);if(Se=arguments,Ge=this,Ui=Wd,k_){if(wi===t)return Aa(Ui);if(lr)return ND(wi),wi=E_(Bs,B),$o(Ui)}return wi===t&&(wi=E_(Bs,B)),Zt}return Ff.cancel=th,Ff.flush=Nf,Ff}var TR=Es(function(T,B){return yD(T,1,B)}),E3=Es(function(T,B,Q){return yD(T,Eg(B)||0,Q)});function rZ(T){return xg(T,fe)}function _T(T,B){if(typeof T!="function"||B!=null&&typeof B!="function")throw new Cf(r);var Q=function(){var Se=arguments,Ge=B?B.apply(this,Se):Se[0],St=Q.cache;if(St.has(Ge))return St.get(Ge);var Zt=T.apply(this,Se);return Q.cache=St.set(Ge,Zt)||St,Zt};return Q.cache=new(_T.Cache||_g),Q}_T.Cache=_g;function YD(T){if(typeof T!="function")throw new Cf(r);return function(){var B=arguments;switch(B.length){case 0:return!T.call(this);case 1:return!T.call(this,B[0]);case 2:return!T.call(this,B[0],B[1]);case 3:return!T.call(this,B[0],B[1],B[2])}return!T.apply(this,B)}}function NH(T){return rv(2,T)}var oZ=aT(function(T,B){B=B.length==1&&Cs(B[0])?Do(B[0],jc(Ca())):Do(cp(B,1),jc(Ca()));var Q=B.length;return Es(function(Se){for(var Ge=-1,St=qu(Se.length,Q);++Ge=B}),TS=Ln((function(){return arguments})())?Ln:function(T){return wu(T)&&kl.call(T,"callee")&&!jI.call(T,"callee")},Cs=fn.isArray,mZ=LI?jc(LI):dR;function Rf(T){return T!=null&&DS(T.length)&&!Ib(T)}function mu(T){return wu(T)&&Rf(T)}function ES(T){return T===!0||T===!1||wu(T)&&Pp(T)==ui}var cd=_H||z3,hZ=eD?jc(eD):qy;function ER(T){return wu(T)&&T.nodeType===1&&!px(T)}function she(T){if(T==null)return!0;if(Rf(T)&&(Cs(T)||typeof T=="string"||typeof T.splice=="function"||cd(T)||mx(T)||TS(T)))return!T.length;var B=Lp(T);if(B==De||B==vi)return!T.size;if(Ql(T))return!TD(T).length;for(var Q in T)if(kl.call(T,Q))return!1;return!0}function lhe(T,B){return bg(T,B)}function che(T,B,Q){Q=typeof Q=="function"?Q:t;var Se=Q?Q(T,B):t;return Se===t?bg(T,B,t,Q):!!Se}function LH(T){if(!wu(T))return!1;var B=Pp(T);return B==yn||B==wn||typeof T.message=="string"&&typeof T.name=="string"&&!px(T)}function KD(T){return typeof T=="number"&&r3(T)}function Ib(T){if(!hu(T))return!1;var B=Pp(T);return B==Xn||B==Rr||B==li||B==ti}function AS(T){return typeof T=="number"&&T==Ls(T)}function DS(T){return typeof T=="number"&&T>-1&&T%1==0&&T<=Et}function hu(T){var B=typeof T;return T!=null&&(B=="object"||B=="function")}function wu(T){return T!=null&&typeof T=="object"}var fZ=Xa?jc(Xa):Mr;function dhe(T,B){return T===B||nT(T,B,HD(B))}function uhe(T,B,Q){return Q=typeof Q=="function"?Q:t,nT(T,B,HD(B),Q)}function phe(T){return VH(T)&&T!=+T}function mhe(T){if(hT(T))throw new us(n);return uR(T)}function BH(T){return T===null}function hhe(T){return T==null}function VH(T){return typeof T=="number"||wu(T)&&Pp(T)==bi}function px(T){if(!wu(T)||Pp(T)!=Mt)return!1;var B=ub(T);if(B===null)return!0;var Q=kl.call(B,"constructor")&&B.constructor;return typeof Q=="function"&&Q instanceof Q&&oS.call(Q)==xf}var zH=tD?jc(tD):SD;function fu(T){return AS(T)&&T>=-Et&&T<=Et}var yT=$O?jc($O):wD;function AR(T){return typeof T=="string"||!Cs(T)&&wu(T)&&Pp(T)==Xt}function Vh(T){return typeof T=="symbol"||wu(T)&&Pp(T)==$i}var mx=BI?jc(BI):ID;function DR(T){return T===t}function gZ(T){return wu(T)&&Lp(T)==Qt}function _Z(T){return wu(T)&&Pp(T)==Ti}var kR=xb(pR),UH=xb(function(T,B){return T<=B});function WD(T){if(!T)return[];if(Rf(T))return AR(T)?m_(T):pu(T);if(D0&&T[D0])return rD(T[D0]());var B=Lp(T),Q=B==De?Fc:B==vi?Gu:QD;return Q(T)}function hx(T){if(!T)return T===0?T:0;if(T=Eg(T),T===Ze||T===-Ze){var B=T<0?-1:1;return B*We}return T===T?T:0}function Ls(T){var B=hx(T),Q=B%1;return B===B?Q?B-Q:B:0}function D3(T){return T?Tf(Ls(T),0,st):0}function Eg(T){if(typeof T=="number")return T;if(Vh(T))return bt;if(hu(T)){var B=typeof T.valueOf=="function"?T.valueOf():T;T=hu(B)?B+"":B}if(typeof T!="string")return T===0?T:+T;T=kd(T);var Q=Qr.test(T);return Q||Yr.test(T)?Y1(T.slice(2),Q?2:8):Pr.test(T)?bt:+T}function HH(T){return dm(T,Ag(T))}function fx(T){return T?Tf(Ls(T),-Et,Et):T===0?T:0}function Lc(T){return T==null?"":Ph(T)}var Pf=Wy(function(T,B){if(Ql(B)||Rf(B)){dm(B,mm(B),T);return}for(var Q in B)kl.call(B,Q)&&ZC(T,Q,B[Q])}),GH=Wy(function(T,B){dm(B,Ag(B),T)}),MR=Wy(function(T,B,Q,Se){dm(B,Ag(B),T,Se)}),yZ=Wy(function(T,B,Q,Se){dm(B,mm(B),T,Se)}),k3=Nh(jy);function fhe(T,B){var Q=KC(T);return B==null?Q:_D(Q,B)}var ghe=Es(function(T,B){T=lc(T);var Q=-1,Se=B.length,Ge=Se>2?B[2]:t;for(Ge&&Ku(B[0],B[1],Ge)&&(Se=1);++Q1),St}),dm(T,UD(T),Q),Se&&(Q=Yu(Q,g|C|w,zD));for(var Ge=B.length;Ge--;)vb(Q,B[Ge]);return Q});function TZ(T,B){return RR(T,YD(Ca(B)))}var WH=Nh(function(T,B){return T==null?{}:kD(T,B)});function RR(T,B){if(T==null)return{};var Q=Do(UD(T),function(Se){return[Se]});return B=Ca(B),_b(T,Q,function(Se,Ge){return B(Se,Ge[0])})}function EZ(T,B,Q){B=w_(B,T);var Se=-1,Ge=B.length;for(Ge||(Ge=1,T=t);++SeB){var Se=T;T=B,B=Se}if(Q||T%1||B%1){var Ge=dD();return qu(T+Ge*(B-T+jO("1e-"+((Ge+"").length-1))),B)}return rT(T,B)}var kS=I_(function(T,B,Q){return B=B.toLowerCase(),T+(Q?ZD(B):B)});function ZD(T){return N3(Lc(T).toLowerCase())}function XD(T){return T=Lc(T),T&&T.replace(js,tS).replace(ZA,"")}function R3(T,B,Q){T=Lc(T),B=Ph(B);var Se=T.length;Q=Q===t?Se:Tf(Ls(Q),0,Se);var Ge=Q;return Q-=B.length,Q>=0&&T.slice(Q,Ge)==B}function PR(T){return T=Lc(T),T&&Ao.test(T)?T.replace(Cn,jr):T}function kZ(T){return T=Lc(T),T&&Me.test(T)?T.replace(Ce,"\\$&"):T}var MZ=I_(function(T,B,Q){return T+(Q?"-":"")+B.toLowerCase()}),OZ=I_(function(T,B,Q){return T+(Q?" ":"")+B.toLowerCase()}),RZ=Qy("toLowerCase");function Ihe(T,B,Q){T=Lc(T),B=Ls(B);var Se=B?E0(T):0;if(!B||Se>=B)return T;var Ge=(B-Se)/2;return vS(cS(Ge),Q)+T+vS($I(Ge),Q)}function The(T,B,Q){T=Lc(T),B=Ls(B);var Se=B?E0(T):0;return B&&Se>>0,Q?(T=Lc(T),T&&(typeof B=="string"||B!=null&&!zH(B))&&(B=Ph(B),!B&&T0(T))?Df(m_(T),0,Q):T.split(B,Q)):[]}var FZ=I_(function(T,B,Q){return T+(Q?" ":"")+N3(B)});function LZ(T,B,Q){return T=Lc(T),Q=Q==null?0:Tf(Ls(Q),0,T.length),B=Ph(B),T.slice(Q,Q+B.length)==B}function BZ(T,B,Q){var Se=ft.templateSettings;Q&&Ku(T,B,Q)&&(B=t),T=Lc(T),B=MR({},B,Se,bS);var Ge=MR({},B.imports,Se.imports,bS),St=mm(Ge),Zt=po(Ge,St),wi,Ui,Vn=0,Yn=B.interpolate||Ko,lr="__p += '",co=Rh((B.escape||Ko).source+"|"+Yn.source+"|"+(Yn===as?zi:Ko).source+"|"+(B.evaluate||Ko).source+"|$","g"),$o="//# sourceURL="+(kl.call(B,"sourceURL")?(B.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sb+"]")+` `;T.replace(co,function(ma,Bs,Rl,th,Nf,Ff){return Rl||(Rl=th),lr+=T.slice(Vn,Ff).replace(Sc,KO),Bs&&(wi=!0,lr+=`' + __e(`+Bs+`) + '`),Nf&&(Ui=!0,lr+=`'; `+Nf+`; __p += '`),Rl&&(lr+=`' + ((__t = (`+Rl+`)) == null ? '' : __t) + '`),Vn=Ff+ma.length,ma}),lr+=`'; `;var Aa=kl.call(B,"variable")&&B.variable;if(!Aa)lr=`with (obj) { `+lr+` } `;else if(oi.test(Aa))throw new us(o);lr=(Ui?lr.replace(Na,""):lr).replace(xc,"$1").replace(gg,"$1;"),lr="function("+(Aa||"obj")+`) { `+(Aa?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(wi?", __e = _.escape":"")+(Ui?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+lr+`return __p }`;var $s=$Z(function(){return Dl(St,$o+"return "+lr).apply(t,Zt)});if($s.source=lr,LH($s))throw $s;return $s}function VZ(T){return Lc(T).toLowerCase()}function zZ(T){return Lc(T).toUpperCase()}function Ahe(T,B,Q){if(T=Lc(T),T&&(Q||B===t))return kd(T);if(!T||!(B=Ph(B)))return T;var Se=m_(T),Ge=m_(B),St=eS(Se,Ge),Zt=Nr(Se,Ge)+1;return Df(Se,St,Zt).join("")}function UZ(T,B,Q){if(T=Lc(T),T&&(Q||B===t))return T.slice(0,HI(T)+1);if(!T||!(B=Ph(B)))return T;var Se=m_(T),Ge=Nr(Se,m_(B))+1;return Df(Se,0,Ge).join("")}function HZ(T,B,Q){if(T=Lc(T),T&&(Q||B===t))return T.replace(Ke,"");if(!T||!(B=Ph(B)))return T;var Se=m_(T),Ge=eS(Se,m_(B));return Df(Se,Ge).join("")}function vT(T,B){var Q=Re,Se=Ae;if(hu(B)){var Ge="separator"in B?B.separator:Ge;Q="length"in B?Ls(B.length):Q,Se="omission"in B?Ph(B.omission):Se}T=Lc(T);var St=T.length;if(T0(T)){var Zt=m_(T);St=Zt.length}if(Q>=St)return T;var wi=Q-E0(Se);if(wi<1)return Se;var Ui=Zt?Df(Zt,0,wi).join(""):T.slice(0,wi);if(Ge===t)return Ui+Se;if(Zt&&(wi+=Ui.length-wi),zH(Ge)){if(T.slice(wi).search(Ge)){var Vn,Yn=Ui;for(Ge.global||(Ge=Rh(Ge.source,Lc(Jn.exec(Ge))+"g")),Ge.lastIndex=0;Vn=Ge.exec(Yn);)var lr=Vn.index;Ui=Ui.slice(0,lr===t?wi:lr)}}else if(T.indexOf(Ph(Ge),wi)!=wi){var co=Ui.lastIndexOf(Ge);co>-1&&(Ui=Ui.slice(0,co))}return Ui+Se}function GZ(T){return T=Lc(T),T&&wr.test(T)?T.replace(Hi,iS):T}var jZ=I_(function(T,B,Q){return T+(Q?" ":"")+B.toUpperCase()}),N3=Qy("toUpperCase");function NR(T,B,Q){return T=Lc(T),B=Q?t:B,B===t?WO(T)?nS(T):Mp(T):T.match(B)||[]}var $Z=Es(function(T,B){try{return mr(T,t,B)}catch(Q){return LH(Q)?Q:new us(Q)}}),qZ=Nh(function(T,B){return hd(B,function(Q){Q=A_(Q),vg(T,Q,ov(T[Q],T))}),T});function FR(T){var B=T==null?0:T.length,Q=Ca();return T=B?Do(T,function(Se){if(typeof Se[1]!="function")throw new Cf(r);return[Q(Se[0]),Se[1]]}):[],Es(function(Se){for(var Ge=-1;++GeEt)return[];var Q=st,Se=qu(T,st);B=Ca(B),T-=st;for(var Ge=nD(Se,B);++Q0||B<0)?new ll(Q):(T<0?Q=Q.takeRight(-T):T&&(Q=Q.drop(T)),B!==t&&(B=Ls(B),Q=B<0?Q.dropRight(-B):Q.take(B-T)),Q)},ll.prototype.takeRightWhile=function(T){return this.reverse().takeWhile(T).reverse()},ll.prototype.toArray=function(){return this.take(st)},Ef(ll.prototype,function(T,B){var Q=/^(?:filter|find|map|reject)|While$/.test(B),Se=/^(?:head|last)$/.test(B),Ge=ft[Se?"take"+(B=="last"?"Right":""):B],St=Se||/^find/.test(B);Ge&&(ft.prototype[B]=function(){var Zt=this.__wrapped__,wi=Se?[1]:arguments,Ui=Zt instanceof ll,Vn=wi[0],Yn=Ui||Cs(Zt),lr=function(Bs){var Rl=Ge.apply(ft,uu([Bs],wi));return Se&&co?Rl[0]:Rl};Yn&&Q&&typeof Vn=="function"&&Vn.length!=1&&(Ui=Yn=!1);var co=this.__chain__,$o=!!this.__actions__.length,Aa=St&&!co,$s=Ui&&!$o;if(!St&&Yn){Zt=$s?Zt:new ll(this);var ma=T.apply(Zt,wi);return ma.__actions__.push({func:Md,args:[lr],thisArg:t}),new wf(ma,co)}return Aa&&$s?T.apply(this,wi):(ma=this.thru(lr),Aa?Se?ma.value()[0]:ma.value():ma)})}),hd(["pop","push","shift","sort","splice","unshift"],function(T){var B=GI[T],Q=/^(?:push|sort|unshift)$/.test(T)?"tap":"thru",Se=/^(?:pop|shift)$/.test(T);ft.prototype[T]=function(){var Ge=arguments;if(Se&&!this.__chain__){var St=this.value();return B.apply(Cs(St)?St:[],Ge)}return this[Q](function(Zt){return B.apply(Cs(Zt)?Zt:[],Ge)})}}),Ef(ll.prototype,function(T,B){var Q=ft[B];if(Q){var Se=Q.name+"";kl.call(hb,Se)||(hb[Se]=[]),hb[Se].push({name:B,func:Q})}}),hb[Zy(t,H).name]=[{name:"wrapper",func:t}],ll.prototype.clone=bH,ll.prototype.reverse=CH,ll.prototype.value=JO,ft.prototype.at=kf,ft.prototype.chain=Mf,ft.prototype.commit=Lh,ft.prototype.next=Bh,ft.prototype.plant=Ig,ft.prototype.reverse=D_,ft.prototype.toJSON=ft.prototype.valueOf=ft.prototype.value=cc,ft.prototype.first=ft.prototype.head,D0&&(ft.prototype[D0]=um),ft},f_=i3();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(qd._=f_,define(function(){return f_})):Hu?((Hu.exports=f_)._=f_,K1._=f_):qd._=f_}).call(C5)});var P7e=Wu(qoe=>{"use strict";qoe.byteLength=LRt;qoe.toByteArray=VRt;qoe.fromByteArray=HRt;var Aw=[],oC=[],FRt=typeof Uint8Array<"u"?Uint8Array:Array,c1e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ZN=0,O7e=c1e.length;ZN0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");e===-1&&(e=i);var n=e===i?0:4-e%4;return[e,n]}function LRt(t){var i=R7e(t),e=i[0],n=i[1];return(e+n)*3/4-n}function BRt(t,i,e){return(i+e)*3/4-e}function VRt(t){var i,e=R7e(t),n=e[0],r=e[1],o=new FRt(BRt(t,n,r)),a=0,c=r>0?n-4:n,m;for(m=0;m>16&255,o[a++]=i>>8&255,o[a++]=i&255;return r===2&&(i=oC[t.charCodeAt(m)]<<2|oC[t.charCodeAt(m+1)]>>4,o[a++]=i&255),r===1&&(i=oC[t.charCodeAt(m)]<<10|oC[t.charCodeAt(m+1)]<<4|oC[t.charCodeAt(m+2)]>>2,o[a++]=i>>8&255,o[a++]=i&255),o}function zRt(t){return Aw[t>>18&63]+Aw[t>>12&63]+Aw[t>>6&63]+Aw[t&63]}function URt(t,i,e){for(var n,r=[],o=i;oc?c:a+o));return n===1?(i=t[e-1],r.push(Aw[i>>2]+Aw[i<<4&63]+"==")):n===2&&(i=(t[e-2]<<8)+t[e-1],r.push(Aw[i>>10]+Aw[i>>4&63]+Aw[i<<2&63]+"=")),r.join("")}});var N7e=Wu(d1e=>{"use strict";d1e.read=function(t,i,e,n,r){var o,a,c=r*8-n-1,m=(1<>1,C=-7,w=e?r-1:0,P=e?-1:1,R=t[i+w];for(w+=P,o=R&(1<<-C)-1,R>>=-C,C+=c;C>0;o=o*256+t[i+w],w+=P,C-=8);for(a=o&(1<<-C)-1,o>>=-C,C+=n;C>0;a=a*256+t[i+w],w+=P,C-=8);if(o===0)o=1-g;else{if(o===m)return a?NaN:(R?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-g}return(R?-1:1)*a*Math.pow(2,o-n)};d1e.write=function(t,i,e,n,r,o){var a,c,m,g=o*8-r-1,C=(1<>1,P=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=n?0:o-1,z=n?1:-1,H=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(c=isNaN(i)?1:0,a=C):(a=Math.floor(Math.log(i)/Math.LN2),i*(m=Math.pow(2,-a))<1&&(a--,m*=2),a+w>=1?i+=P/m:i+=P*Math.pow(2,1-w),i*m>=2&&(a++,m/=2),a+w>=C?(c=0,a=C):a+w>=1?(c=(i*m-1)*Math.pow(2,r),a=a+w):(c=i*Math.pow(2,w-1)*Math.pow(2,r),a=0));r>=8;t[e+R]=c&255,R+=z,c/=256,r-=8);for(a=a<0;t[e+R]=a&255,R+=z,a/=256,g-=8);t[e+R-z]|=H*128}});var X7e=Wu(I5=>{"use strict";var u1e=P7e(),S5=N7e(),F7e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;I5.Buffer=Fn;I5.SlowBuffer=KRt;I5.INSPECT_MAX_BYTES=50;var Yoe=2147483647;I5.kMaxLength=Yoe;Fn.TYPED_ARRAY_SUPPORT=GRt();!Fn.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function GRt(){try{let t=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(t,i),t.foo()===42}catch{return!1}}Object.defineProperty(Fn.prototype,"parent",{enumerable:!0,get:function(){if(Fn.isBuffer(this))return this.buffer}});Object.defineProperty(Fn.prototype,"offset",{enumerable:!0,get:function(){if(Fn.isBuffer(this))return this.byteOffset}});function DE(t){if(t>Yoe)throw new RangeError('The value "'+t+'" is invalid for option "size"');let i=new Uint8Array(t);return Object.setPrototypeOf(i,Fn.prototype),i}function Fn(t,i,e){if(typeof t=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f1e(t)}return z7e(t,i,e)}Fn.poolSize=8192;function z7e(t,i,e){if(typeof t=="string")return $Rt(t,i);if(ArrayBuffer.isView(t))return qRt(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Dw(t,ArrayBuffer)||t&&Dw(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Dw(t,SharedArrayBuffer)||t&&Dw(t.buffer,SharedArrayBuffer)))return m1e(t,i,e);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return Fn.from(n,i,e);let r=YRt(t);if(r)return r;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Fn.from(t[Symbol.toPrimitive]("string"),i,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}Fn.from=function(t,i,e){return z7e(t,i,e)};Object.setPrototypeOf(Fn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Fn,Uint8Array);function U7e(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function jRt(t,i,e){return U7e(t),t<=0?DE(t):i!==void 0?typeof e=="string"?DE(t).fill(i,e):DE(t).fill(i):DE(t)}Fn.alloc=function(t,i,e){return jRt(t,i,e)};function f1e(t){return U7e(t),DE(t<0?0:g1e(t)|0)}Fn.allocUnsafe=function(t){return f1e(t)};Fn.allocUnsafeSlow=function(t){return f1e(t)};function $Rt(t,i){if((typeof i!="string"||i==="")&&(i="utf8"),!Fn.isEncoding(i))throw new TypeError("Unknown encoding: "+i);let e=H7e(t,i)|0,n=DE(e),r=n.write(t,i);return r!==e&&(n=n.slice(0,r)),n}function p1e(t){let i=t.length<0?0:g1e(t.length)|0,e=DE(i);for(let n=0;n=Yoe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Yoe.toString(16)+" bytes");return t|0}function KRt(t){return+t!=t&&(t=0),Fn.alloc(+t)}Fn.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==Fn.prototype};Fn.compare=function(i,e){if(Dw(i,Uint8Array)&&(i=Fn.from(i,i.offset,i.byteLength)),Dw(e,Uint8Array)&&(e=Fn.from(e,e.offset,e.byteLength)),!Fn.isBuffer(i)||!Fn.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===e)return 0;let n=i.length,r=e.length;for(let o=0,a=Math.min(n,r);or.length?(Fn.isBuffer(a)||(a=Fn.from(a)),a.copy(r,o)):Uint8Array.prototype.set.call(r,a,o);else if(Fn.isBuffer(a))a.copy(r,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=a.length}return r};function H7e(t,i){if(Fn.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Dw(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let e=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let r=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return h1e(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Z7e(t).length;default:if(r)return n?-1:h1e(t).length;i=(""+i).toLowerCase(),r=!0}}Fn.byteLength=H7e;function WRt(t,i,e){let n=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,i>>>=0,e<=i))return"";for(t||(t="utf8");;)switch(t){case"hex":return oPt(this,i,e);case"utf8":case"utf-8":return j7e(this,i,e);case"ascii":return nPt(this,i,e);case"latin1":case"binary":return rPt(this,i,e);case"base64":return tPt(this,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return aPt(this,i,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}Fn.prototype._isBuffer=!0;function XN(t,i,e){let n=t[i];t[i]=t[e],t[e]=n}Fn.prototype.swap16=function(){let i=this.length;if(i%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(i+=" ... "),""};F7e&&(Fn.prototype[F7e]=Fn.prototype.inspect);Fn.prototype.compare=function(i,e,n,r,o){if(Dw(i,Uint8Array)&&(i=Fn.from(i,i.offset,i.byteLength)),!Fn.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(e===void 0&&(e=0),n===void 0&&(n=i?i.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),e<0||n>i.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,o>>>=0,this===i)return 0;let a=o-r,c=n-e,m=Math.min(a,c),g=this.slice(r,o),C=i.slice(e,n);for(let w=0;w2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,y1e(e)&&(e=r?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(r)return-1;e=t.length-1}else if(e<0)if(r)e=0;else return-1;if(typeof i=="string"&&(i=Fn.from(i,n)),Fn.isBuffer(i))return i.length===0?-1:L7e(t,i,e,n,r);if(typeof i=="number")return i=i&255,typeof Uint8Array.prototype.indexOf=="function"?r?Uint8Array.prototype.indexOf.call(t,i,e):Uint8Array.prototype.lastIndexOf.call(t,i,e):L7e(t,[i],e,n,r);throw new TypeError("val must be string, number or Buffer")}function L7e(t,i,e,n,r){let o=1,a=t.length,c=i.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||i.length<2)return-1;o=2,a/=2,c/=2,e/=2}function m(C,w){return o===1?C[w]:C.readUInt16BE(w*o)}let g;if(r){let C=-1;for(g=e;ga&&(e=a-c),g=e;g>=0;g--){let C=!0;for(let w=0;wr&&(n=r)):n=r;let o=i.length;n>o/2&&(n=o/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,r===void 0&&(r="utf8")):(r=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-e;if((n===void 0||n>o)&&(n=o),i.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return QRt(this,i,e,n);case"utf8":case"utf-8":return ZRt(this,i,e,n);case"ascii":case"latin1":case"binary":return XRt(this,i,e,n);case"base64":return JRt(this,i,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ePt(this,i,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}};Fn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function tPt(t,i,e){return i===0&&e===t.length?u1e.fromByteArray(t):u1e.fromByteArray(t.slice(i,e))}function j7e(t,i,e){e=Math.min(t.length,e);let n=[],r=i;for(;r239?4:o>223?3:o>191?2:1;if(r+c<=e){let m,g,C,w;switch(c){case 1:o<128&&(a=o);break;case 2:m=t[r+1],(m&192)===128&&(w=(o&31)<<6|m&63,w>127&&(a=w));break;case 3:m=t[r+1],g=t[r+2],(m&192)===128&&(g&192)===128&&(w=(o&15)<<12|(m&63)<<6|g&63,w>2047&&(w<55296||w>57343)&&(a=w));break;case 4:m=t[r+1],g=t[r+2],C=t[r+3],(m&192)===128&&(g&192)===128&&(C&192)===128&&(w=(o&15)<<18|(m&63)<<12|(g&63)<<6|C&63,w>65535&&w<1114112&&(a=w))}}a===null?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),r+=c}return iPt(n)}var B7e=4096;function iPt(t){let i=t.length;if(i<=B7e)return String.fromCharCode.apply(String,t);let e="",n=0;for(;nn)&&(e=n);let r="";for(let o=i;on&&(i=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),ee)throw new RangeError("Trying to access beyond buffer length")}Fn.prototype.readUintLE=Fn.prototype.readUIntLE=function(i,e,n){i=i>>>0,e=e>>>0,n||of(i,e,this.length);let r=this[i],o=1,a=0;for(;++a>>0,e=e>>>0,n||of(i,e,this.length);let r=this[i+--e],o=1;for(;e>0&&(o*=256);)r+=this[i+--e]*o;return r};Fn.prototype.readUint8=Fn.prototype.readUInt8=function(i,e){return i=i>>>0,e||of(i,1,this.length),this[i]};Fn.prototype.readUint16LE=Fn.prototype.readUInt16LE=function(i,e){return i=i>>>0,e||of(i,2,this.length),this[i]|this[i+1]<<8};Fn.prototype.readUint16BE=Fn.prototype.readUInt16BE=function(i,e){return i=i>>>0,e||of(i,2,this.length),this[i]<<8|this[i+1]};Fn.prototype.readUint32LE=Fn.prototype.readUInt32LE=function(i,e){return i=i>>>0,e||of(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216};Fn.prototype.readUint32BE=Fn.prototype.readUInt32BE=function(i,e){return i=i>>>0,e||of(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])};Fn.prototype.readBigUInt64LE=NM(function(i){i=i>>>0,w5(i,"offset");let e=this[i],n=this[i+7];(e===void 0||n===void 0)&&H$(i,this.length-8);let r=e+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24,o=this[++i]+this[++i]*2**8+this[++i]*2**16+n*2**24;return BigInt(r)+(BigInt(o)<>>0,w5(i,"offset");let e=this[i],n=this[i+7];(e===void 0||n===void 0)&&H$(i,this.length-8);let r=e*2**24+this[++i]*2**16+this[++i]*2**8+this[++i],o=this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+n;return(BigInt(r)<>>0,e=e>>>0,n||of(i,e,this.length);let r=this[i],o=1,a=0;for(;++a=o&&(r-=Math.pow(2,8*e)),r};Fn.prototype.readIntBE=function(i,e,n){i=i>>>0,e=e>>>0,n||of(i,e,this.length);let r=e,o=1,a=this[i+--r];for(;r>0&&(o*=256);)a+=this[i+--r]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*e)),a};Fn.prototype.readInt8=function(i,e){return i=i>>>0,e||of(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]};Fn.prototype.readInt16LE=function(i,e){i=i>>>0,e||of(i,2,this.length);let n=this[i]|this[i+1]<<8;return n&32768?n|4294901760:n};Fn.prototype.readInt16BE=function(i,e){i=i>>>0,e||of(i,2,this.length);let n=this[i+1]|this[i]<<8;return n&32768?n|4294901760:n};Fn.prototype.readInt32LE=function(i,e){return i=i>>>0,e||of(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24};Fn.prototype.readInt32BE=function(i,e){return i=i>>>0,e||of(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]};Fn.prototype.readBigInt64LE=NM(function(i){i=i>>>0,w5(i,"offset");let e=this[i],n=this[i+7];(e===void 0||n===void 0)&&H$(i,this.length-8);let r=this[i+4]+this[i+5]*2**8+this[i+6]*2**16+(n<<24);return(BigInt(r)<>>0,w5(i,"offset");let e=this[i],n=this[i+7];(e===void 0||n===void 0)&&H$(i,this.length-8);let r=(e<<24)+this[++i]*2**16+this[++i]*2**8+this[++i];return(BigInt(r)<>>0,e||of(i,4,this.length),S5.read(this,i,!0,23,4)};Fn.prototype.readFloatBE=function(i,e){return i=i>>>0,e||of(i,4,this.length),S5.read(this,i,!1,23,4)};Fn.prototype.readDoubleLE=function(i,e){return i=i>>>0,e||of(i,8,this.length),S5.read(this,i,!0,52,8)};Fn.prototype.readDoubleBE=function(i,e){return i=i>>>0,e||of(i,8,this.length),S5.read(this,i,!1,52,8)};function ay(t,i,e,n,r,o){if(!Fn.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>r||it.length)throw new RangeError("Index out of range")}Fn.prototype.writeUintLE=Fn.prototype.writeUIntLE=function(i,e,n,r){if(i=+i,e=e>>>0,n=n>>>0,!r){let c=Math.pow(2,8*n)-1;ay(this,i,e,n,c,0)}let o=1,a=0;for(this[e]=i&255;++a>>0,n=n>>>0,!r){let c=Math.pow(2,8*n)-1;ay(this,i,e,n,c,0)}let o=n-1,a=1;for(this[e+o]=i&255;--o>=0&&(a*=256);)this[e+o]=i/a&255;return e+n};Fn.prototype.writeUint8=Fn.prototype.writeUInt8=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,1,255,0),this[e]=i&255,e+1};Fn.prototype.writeUint16LE=Fn.prototype.writeUInt16LE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,2,65535,0),this[e]=i&255,this[e+1]=i>>>8,e+2};Fn.prototype.writeUint16BE=Fn.prototype.writeUInt16BE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,2,65535,0),this[e]=i>>>8,this[e+1]=i&255,e+2};Fn.prototype.writeUint32LE=Fn.prototype.writeUInt32LE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,4,4294967295,0),this[e+3]=i>>>24,this[e+2]=i>>>16,this[e+1]=i>>>8,this[e]=i&255,e+4};Fn.prototype.writeUint32BE=Fn.prototype.writeUInt32BE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,4,4294967295,0),this[e]=i>>>24,this[e+1]=i>>>16,this[e+2]=i>>>8,this[e+3]=i&255,e+4};function $7e(t,i,e,n,r){Q7e(i,n,r,t,e,7);let o=Number(i&BigInt(4294967295));t[e++]=o,o=o>>8,t[e++]=o,o=o>>8,t[e++]=o,o=o>>8,t[e++]=o;let a=Number(i>>BigInt(32)&BigInt(4294967295));return t[e++]=a,a=a>>8,t[e++]=a,a=a>>8,t[e++]=a,a=a>>8,t[e++]=a,e}function q7e(t,i,e,n,r){Q7e(i,n,r,t,e,7);let o=Number(i&BigInt(4294967295));t[e+7]=o,o=o>>8,t[e+6]=o,o=o>>8,t[e+5]=o,o=o>>8,t[e+4]=o;let a=Number(i>>BigInt(32)&BigInt(4294967295));return t[e+3]=a,a=a>>8,t[e+2]=a,a=a>>8,t[e+1]=a,a=a>>8,t[e]=a,e+8}Fn.prototype.writeBigUInt64LE=NM(function(i,e=0){return $7e(this,i,e,BigInt(0),BigInt("0xffffffffffffffff"))});Fn.prototype.writeBigUInt64BE=NM(function(i,e=0){return q7e(this,i,e,BigInt(0),BigInt("0xffffffffffffffff"))});Fn.prototype.writeIntLE=function(i,e,n,r){if(i=+i,e=e>>>0,!r){let m=Math.pow(2,8*n-1);ay(this,i,e,n,m-1,-m)}let o=0,a=1,c=0;for(this[e]=i&255;++o>0)-c&255;return e+n};Fn.prototype.writeIntBE=function(i,e,n,r){if(i=+i,e=e>>>0,!r){let m=Math.pow(2,8*n-1);ay(this,i,e,n,m-1,-m)}let o=n-1,a=1,c=0;for(this[e+o]=i&255;--o>=0&&(a*=256);)i<0&&c===0&&this[e+o+1]!==0&&(c=1),this[e+o]=(i/a>>0)-c&255;return e+n};Fn.prototype.writeInt8=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,1,127,-128),i<0&&(i=255+i+1),this[e]=i&255,e+1};Fn.prototype.writeInt16LE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,2,32767,-32768),this[e]=i&255,this[e+1]=i>>>8,e+2};Fn.prototype.writeInt16BE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,2,32767,-32768),this[e]=i>>>8,this[e+1]=i&255,e+2};Fn.prototype.writeInt32LE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,4,2147483647,-2147483648),this[e]=i&255,this[e+1]=i>>>8,this[e+2]=i>>>16,this[e+3]=i>>>24,e+4};Fn.prototype.writeInt32BE=function(i,e,n){return i=+i,e=e>>>0,n||ay(this,i,e,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[e]=i>>>24,this[e+1]=i>>>16,this[e+2]=i>>>8,this[e+3]=i&255,e+4};Fn.prototype.writeBigInt64LE=NM(function(i,e=0){return $7e(this,i,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Fn.prototype.writeBigInt64BE=NM(function(i,e=0){return q7e(this,i,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y7e(t,i,e,n,r,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function K7e(t,i,e,n,r){return i=+i,e=e>>>0,r||Y7e(t,i,e,4,34028234663852886e22,-34028234663852886e22),S5.write(t,i,e,n,23,4),e+4}Fn.prototype.writeFloatLE=function(i,e,n){return K7e(this,i,e,!0,n)};Fn.prototype.writeFloatBE=function(i,e,n){return K7e(this,i,e,!1,n)};function W7e(t,i,e,n,r){return i=+i,e=e>>>0,r||Y7e(t,i,e,8,17976931348623157e292,-17976931348623157e292),S5.write(t,i,e,n,52,8),e+8}Fn.prototype.writeDoubleLE=function(i,e,n){return W7e(this,i,e,!0,n)};Fn.prototype.writeDoubleBE=function(i,e,n){return W7e(this,i,e,!1,n)};Fn.prototype.copy=function(i,e,n,r){if(!Fn.isBuffer(i))throw new TypeError("argument should be a Buffer");if(n||(n=0),!r&&r!==0&&(r=this.length),e>=i.length&&(e=i.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),i.length-e>>0,n=n===void 0?this.length:n>>>0,i||(i=0);let o;if(typeof i=="number")for(o=e;o2**32?r=V7e(String(e)):typeof e=="bigint"&&(r=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(r=V7e(r)),r+="n"),n+=` It must be ${i}. Received ${r}`,n},RangeError);function V7e(t){let i="",e=t.length,n=t[0]==="-"?1:0;for(;e>=n+4;e-=3)i=`_${t.slice(e-3,e)}${i}`;return`${t.slice(0,e)}${i}`}function sPt(t,i,e){w5(i,"offset"),(t[i]===void 0||t[i+e]===void 0)&&H$(i,t.length-(e+1))}function Q7e(t,i,e,n,r,o){if(t>e||t3?i===0||i===BigInt(0)?c=`>= 0${a} and < 2${a} ** ${(o+1)*8}${a}`:c=`>= -(2${a} ** ${(o+1)*8-1}${a}) and < 2 ** ${(o+1)*8-1}${a}`:c=`>= ${i}${a} and <= ${e}${a}`,new x5.ERR_OUT_OF_RANGE("value",c,t)}sPt(n,r,o)}function w5(t,i){if(typeof t!="number")throw new x5.ERR_INVALID_ARG_TYPE(i,"number",t)}function H$(t,i,e){throw Math.floor(t)!==t?(w5(t,e),new x5.ERR_OUT_OF_RANGE(e||"offset","an integer",t)):i<0?new x5.ERR_BUFFER_OUT_OF_BOUNDS:new x5.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${i}`,t)}var lPt=/[^+/0-9A-Za-z-_]/g;function cPt(t){if(t=t.split("=")[0],t=t.trim().replace(lPt,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function h1e(t,i){i=i||1/0;let e,n=t.length,r=null,o=[];for(let a=0;a55295&&e<57344){if(!r){if(e>56319){(i-=3)>-1&&o.push(239,191,189);continue}else if(a+1===n){(i-=3)>-1&&o.push(239,191,189);continue}r=e;continue}if(e<56320){(i-=3)>-1&&o.push(239,191,189),r=e;continue}e=(r-55296<<10|e-56320)+65536}else r&&(i-=3)>-1&&o.push(239,191,189);if(r=null,e<128){if((i-=1)<0)break;o.push(e)}else if(e<2048){if((i-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((i-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((i-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function dPt(t){let i=[];for(let e=0;e>8,r=e%256,o.push(r),o.push(n);return o}function Z7e(t){return u1e.toByteArray(cPt(t))}function Koe(t,i,e,n){let r;for(r=0;r=i.length||r>=t.length);++r)i[r+e]=t[r];return r}function Dw(t,i){return t instanceof i||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===i.name}function y1e(t){return t!==t}var pPt=(function(){let t="0123456789abcdef",i=new Array(256);for(let e=0;e<16;++e){let n=e*16;for(let r=0;r<16;++r)i[n+r]=t[e]+t[r]}return i})();function NM(t){return typeof BigInt>"u"?mPt:t}function mPt(){throw new Error("BigInt not supported")}});var t9e=Wu((v1e,e9e)=>{"use strict";var Woe=X7e(),kw=Woe.Buffer;function J7e(t,i){for(var e in t)i[e]=t[e]}kw.from&&kw.alloc&&kw.allocUnsafe&&kw.allocUnsafeSlow?e9e.exports=Woe:(J7e(Woe,v1e),v1e.Buffer=JN);function JN(t,i,e){return kw(t,i,e)}JN.prototype=Object.create(kw.prototype);J7e(kw,JN);JN.from=function(t,i,e){if(typeof t=="number")throw new TypeError("Argument must not be a number");return kw(t,i,e)};JN.alloc=function(t,i,e){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=kw(t);return i!==void 0?typeof e=="string"?n.fill(i,e):n.fill(i):n.fill(0),n};JN.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return kw(t)};JN.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Woe.SlowBuffer(t)}});var i9e=Wu((S2n,C1e)=>{"use strict";var b1e=65536,hPt=4294967295;function fPt(){throw new Error(`Secure random number generation is not supported by this browser. Use Chrome, Firefox or Internet Explorer 11`)}var gPt=t9e().Buffer,Qoe=global.crypto||global.msCrypto;Qoe&&Qoe.getRandomValues?C1e.exports=_Pt:C1e.exports=fPt;function _Pt(t,i){if(t>hPt)throw new RangeError("requested too many random bytes");var e=gPt.allocUnsafe(t);if(t>0)if(t>b1e)for(var n=0;n{"use strict";typeof window<"u"&&(window.global=window.global||window);var yPt={randomBytes:i9e()},S1e=o9e.exports,vPt=256,G$,x1e,n9e=function(){(G$===void 0||G$>=x1e.length)&&(G$=0,x1e=yPt.randomBytes(vPt));var t=x1e[G$];return G$+=1,t},bPt=function(t){for(var i=n9e();i>=256-256%t;)i=n9e();return i%t},CPt="abcdefghijklmnopqrstuvwxyz",xPt="ABCDEFGHIJKLMNOPQRSTUVWXYZ",SPt="0123456789",wPt='!@#$%^&*()+_-=}{[]|:;"/?.><,`~',IPt=/[ilLI|`oO0]/g,TPt=[{name:"lowercase",rule:/[a-z]/},{name:"uppercase",rule:/[A-Z]/},{name:"numbers",rule:/[0-9]/},{name:"symbols",rule:/[!@#$%^&*()+_\-=}{[\]|:;"/?.><,`~]/}],r9e=function(t,i){for(var e="",n=t.length,r=i.length,o=0;ot.length)throw new TypeError("Length must correlate with strict guidelines")}var e="";if(t.lowercase&&(e+=CPt),t.uppercase&&(e+=xPt),t.numbers&&(e+=SPt),t.symbols&&(typeof t.symbols=="string"?e+=t.symbols:e+=wPt),!e)throw new TypeError("At least one rule for pools must be true");t.excludeSimilarCharacters&&(e=e.replace(IPt,""));for(var n=t.exclude.length;n--;)e=e.replace(t.exclude[n],"");var r=r9e(t,e);return r};S1e.generateMultiple=function(t,i){for(var e=[],n=0;n{"use strict";s9e.exports=a9e()});var Lw=Wu((V1e,z1e)=>{"use strict";(function(t,i){typeof V1e=="object"&&typeof z1e<"u"?z1e.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.mapboxgl=i())})(V1e,function(){"use strict";var t,i,e;function n(o,a){if(!t)t=a;else if(!i)i=a;else{var c="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); ("+i+")(sharedChunk); self.onerror = null;",m={};t(m),e=a(m),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(e.workerUrl=window.URL.createObjectURL(new Blob([c],{type:"text/javascript"})))}}n(["exports"],function(o){var a=1e-6,c=typeof Float32Array<"u"?Float32Array:Array;function m(u,s){var d=s[0],h=s[1],f=s[2],v=s[3],b=d*v-f*h;return b?(u[0]=v*(b=1/b),u[1]=-h*b,u[2]=-f*b,u[3]=d*b,u):null}function g(){var u=new c(9);return c!=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 C(u,s){var d=s[0],h=s[1],f=s[2],v=s[3],b=s[4],I=s[5],k=s[6],F=s[7],U=s[8];return u[0]=b*U-I*F,u[1]=f*F-h*U,u[2]=h*I-f*b,u[3]=I*k-v*U,u[4]=d*U-f*k,u[5]=f*v-d*I,u[6]=v*F-b*k,u[7]=h*k-d*F,u[8]=d*b-h*v,u}function w(u,s,d){var h=s[0],f=s[1],v=s[2],b=s[3],I=s[4],k=s[5],F=s[6],U=s[7],G=s[8],q=d[0],Z=d[1],X=d[2],ue=d[3],he=d[4],_e=d[5],Fe=d[6],Le=d[7],Ve=d[8];return u[0]=q*h+Z*b+X*F,u[1]=q*f+Z*I+X*U,u[2]=q*v+Z*k+X*G,u[3]=ue*h+he*b+_e*F,u[4]=ue*f+he*I+_e*U,u[5]=ue*v+he*k+_e*G,u[6]=Fe*h+Le*b+Ve*F,u[7]=Fe*f+Le*I+Ve*U,u[8]=Fe*v+Le*k+Ve*G,u}function P(){var u=new c(16);return c!=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 R(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 z(u,s){var d=s[0],h=s[1],f=s[2],v=s[3],b=s[4],I=s[5],k=s[6],F=s[7],U=s[8],G=s[9],q=s[10],Z=s[11],X=s[12],ue=s[13],he=s[14],_e=s[15],Fe=d*I-h*b,Le=d*k-f*b,Ve=d*F-v*b,dt=h*k-f*I,ut=h*F-v*I,It=f*F-v*k,Ot=U*ue-G*X,Lt=U*he-q*X,ki=U*_e-Z*X,Ht=G*he-q*ue,Fi=G*_e-Z*ue,Ji=q*_e-Z*he,Vi=Fe*Ji-Le*Fi+Ve*Ht+dt*ki-ut*Lt+It*Ot;return Vi?(u[0]=(I*Ji-k*Fi+F*Ht)*(Vi=1/Vi),u[1]=(f*Fi-h*Ji-v*Ht)*Vi,u[2]=(ue*It-he*ut+_e*dt)*Vi,u[3]=(q*ut-G*It-Z*dt)*Vi,u[4]=(k*ki-b*Ji-F*Lt)*Vi,u[5]=(d*Ji-f*ki+v*Lt)*Vi,u[6]=(he*Ve-X*It-_e*Le)*Vi,u[7]=(U*It-q*Ve+Z*Le)*Vi,u[8]=(b*Fi-I*ki+F*Ot)*Vi,u[9]=(h*ki-d*Fi-v*Ot)*Vi,u[10]=(X*ut-ue*Ve+_e*Fe)*Vi,u[11]=(G*Ve-U*ut-Z*Fe)*Vi,u[12]=(I*Lt-b*Ht-k*Ot)*Vi,u[13]=(d*Ht-h*Lt+f*Ot)*Vi,u[14]=(ue*Le-X*dt-he*Fe)*Vi,u[15]=(U*dt-G*Le+q*Fe)*Vi,u):null}function H(u,s,d){var h=s[0],f=s[1],v=s[2],b=s[3],I=s[4],k=s[5],F=s[6],U=s[7],G=s[8],q=s[9],Z=s[10],X=s[11],ue=s[12],he=s[13],_e=s[14],Fe=s[15],Le=d[0],Ve=d[1],dt=d[2],ut=d[3];return u[0]=Le*h+Ve*I+dt*G+ut*ue,u[1]=Le*f+Ve*k+dt*q+ut*he,u[2]=Le*v+Ve*F+dt*Z+ut*_e,u[3]=Le*b+Ve*U+dt*X+ut*Fe,u[4]=(Le=d[4])*h+(Ve=d[5])*I+(dt=d[6])*G+(ut=d[7])*ue,u[5]=Le*f+Ve*k+dt*q+ut*he,u[6]=Le*v+Ve*F+dt*Z+ut*_e,u[7]=Le*b+Ve*U+dt*X+ut*Fe,u[8]=(Le=d[8])*h+(Ve=d[9])*I+(dt=d[10])*G+(ut=d[11])*ue,u[9]=Le*f+Ve*k+dt*q+ut*he,u[10]=Le*v+Ve*F+dt*Z+ut*_e,u[11]=Le*b+Ve*U+dt*X+ut*Fe,u[12]=(Le=d[12])*h+(Ve=d[13])*I+(dt=d[14])*G+(ut=d[15])*ue,u[13]=Le*f+Ve*k+dt*q+ut*he,u[14]=Le*v+Ve*F+dt*Z+ut*_e,u[15]=Le*b+Ve*U+dt*X+ut*Fe,u}function j(u,s,d){var h,f,v,b,I,k,F,U,G,q,Z,X,ue=d[0],he=d[1],_e=d[2];return s===u?(u[12]=s[0]*ue+s[4]*he+s[8]*_e+s[12],u[13]=s[1]*ue+s[5]*he+s[9]*_e+s[13],u[14]=s[2]*ue+s[6]*he+s[10]*_e+s[14],u[15]=s[3]*ue+s[7]*he+s[11]*_e+s[15]):(f=s[1],v=s[2],b=s[3],I=s[4],k=s[5],F=s[6],U=s[7],G=s[8],q=s[9],Z=s[10],X=s[11],u[0]=h=s[0],u[1]=f,u[2]=v,u[3]=b,u[4]=I,u[5]=k,u[6]=F,u[7]=U,u[8]=G,u[9]=q,u[10]=Z,u[11]=X,u[12]=h*ue+I*he+G*_e+s[12],u[13]=f*ue+k*he+q*_e+s[13],u[14]=v*ue+F*he+Z*_e+s[14],u[15]=b*ue+U*he+X*_e+s[15]),u}function K(u,s,d){var h=d[0],f=d[1],v=d[2];return u[0]=s[0]*h,u[1]=s[1]*h,u[2]=s[2]*h,u[3]=s[3]*h,u[4]=s[4]*f,u[5]=s[5]*f,u[6]=s[6]*f,u[7]=s[7]*f,u[8]=s[8]*v,u[9]=s[9]*v,u[10]=s[10]*v,u[11]=s[11]*v,u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15],u}function ne(u,s,d){var h=Math.sin(d),f=Math.cos(d),v=s[4],b=s[5],I=s[6],k=s[7],F=s[8],U=s[9],G=s[10],q=s[11];return s!==u&&(u[0]=s[0],u[1]=s[1],u[2]=s[2],u[3]=s[3],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[4]=v*f+F*h,u[5]=b*f+U*h,u[6]=I*f+G*h,u[7]=k*f+q*h,u[8]=F*f-v*h,u[9]=U*f-b*h,u[10]=G*f-I*h,u[11]=q*f-k*h,u}function me(u,s,d){var h=Math.sin(d),f=Math.cos(d),v=s[0],b=s[1],I=s[2],k=s[3],F=s[8],U=s[9],G=s[10],q=s[11];return s!==u&&(u[4]=s[4],u[5]=s[5],u[6]=s[6],u[7]=s[7],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[0]=v*f-F*h,u[1]=b*f-U*h,u[2]=I*f-G*h,u[3]=k*f-q*h,u[8]=v*h+F*f,u[9]=b*h+U*f,u[10]=I*h+G*f,u[11]=k*h+q*f,u}function Te(u,s,d){var h=Math.sin(d),f=Math.cos(d),v=s[0],b=s[1],I=s[2],k=s[3],F=s[4],U=s[5],G=s[6],q=s[7];return s!==u&&(u[8]=s[8],u[9]=s[9],u[10]=s[10],u[11]=s[11],u[12]=s[12],u[13]=s[13],u[14]=s[14],u[15]=s[15]),u[0]=v*f+F*h,u[1]=b*f+U*h,u[2]=I*f+G*h,u[3]=k*f+q*h,u[4]=F*f-v*h,u[5]=U*f-b*h,u[6]=G*f-I*h,u[7]=q*f-k*h,u}function Ie(u,s){return u[0]=s[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=s[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function ye(u,s,d){var h,f,v,b=d[0],I=d[1],k=d[2],F=Math.sqrt(b*b+I*I+k*k);return F0&&(v=1/Math.sqrt(v)),u[0]=s[0]*v,u[1]=s[1]*v,u[2]=s[2]*v,u}function li(u,s){return u[0]*s[0]+u[1]*s[1]+u[2]*s[2]}function ui(u,s,d){var h=s[0],f=s[1],v=s[2],b=d[0],I=d[1],k=d[2];return u[0]=f*k-v*I,u[1]=v*b-h*k,u[2]=h*I-f*b,u}function Bi(u,s,d,h){var f=s[0],v=s[1],b=s[2];return u[0]=f+h*(d[0]-f),u[1]=v+h*(d[1]-v),u[2]=b+h*(d[2]-b),u}function wn(u,s,d){var h=s[0],f=s[1],v=s[2],b=d[3]*h+d[7]*f+d[11]*v+d[15];return u[0]=(d[0]*h+d[4]*f+d[8]*v+d[12])/(b=b||1),u[1]=(d[1]*h+d[5]*f+d[9]*v+d[13])/b,u[2]=(d[2]*h+d[6]*f+d[10]*v+d[14])/b,u}function yn(u,s,d){var h=s[0],f=s[1],v=s[2];return u[0]=h*d[0]+f*d[3]+v*d[6],u[1]=h*d[1]+f*d[4]+v*d[7],u[2]=h*d[2]+f*d[5]+v*d[8],u}function Xn(u,s,d){var h=d[0],f=d[1],v=d[2],b=d[3],I=s[0],k=s[1],F=s[2],U=f*F-v*k,G=v*I-h*F,q=h*k-f*I;return u[0]=I+b*(U+=U)+f*(q+=q)-v*(G+=G),u[1]=k+b*G+v*U-h*q,u[2]=F+b*q+h*G-f*U,u}function Rr(u){return u[0]=0,u[1]=0,u[2]=0,u}function De(u,s){return u[0]===s[0]&&u[1]===s[1]&&u[2]===s[2]}var bi=Ze,Ci=Et,Mt=Qe;function wt(){var u=new c(4);return c!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0,u[3]=0),u}function ti(u,s,d){return u[0]=s[0]*d,u[1]=s[1]*d,u[2]=s[2]*d,u[3]=s[3]*d,u}function Ut(u,s){var d=s[0],h=s[1],f=s[2],v=s[3],b=d*d+h*h+f*f+v*v;return b>0&&(b=1/Math.sqrt(b)),u[0]=d*b,u[1]=h*b,u[2]=f*b,u[3]=v*b,u}function vi(u,s,d){var h=s[0],f=s[1],v=s[2],b=s[3];return u[0]=d[0]*h+d[4]*f+d[8]*v+d[12]*b,u[1]=d[1]*h+d[5]*f+d[9]*v+d[13]*b,u[2]=d[2]*h+d[6]*f+d[10]*v+d[14]*b,u[3]=d[3]*h+d[7]*f+d[11]*v+d[15]*b,u}function Xt(){var u=new c(4);return c!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u[3]=1,u}function $i(u){return u[0]=0,u[1]=0,u[2]=0,u[3]=1,u}function Bt(u,s,d){d*=.5;var h=s[0],f=s[1],v=s[2],b=s[3],I=Math.sin(d),k=Math.cos(d);return u[0]=h*k+b*I,u[1]=f*k+v*I,u[2]=v*k-f*I,u[3]=b*k-h*I,u}function Qt(u,s,d){d*=.5;var h=s[0],f=s[1],v=s[2],b=s[3],I=Math.sin(d),k=Math.cos(d);return u[0]=h*k-v*I,u[1]=f*k+b*I,u[2]=v*k+h*I,u[3]=b*k-f*I,u}Ae(),wt();var Ti,Ki,un,Sr=Ut,lo=(Ti=Ae(),Ki=we(1,0,0),un=we(0,1,0),function(u,s,d){var h=li(s,d);return h<-.999999?(ui(Ti,Ki,s),Mt(Ti)<1e-6&&ui(Ti,un,s),ht(Ti,Ti),(function(f,v,b){b*=.5;var I=Math.sin(b);f[0]=I*v[0],f[1]=I*v[1],f[2]=I*v[2],f[3]=Math.cos(b)})(u,Ti,Math.PI),u):h>.999999?(u[0]=0,u[1]=0,u[2]=0,u[3]=1,u):(ui(Ti,s,d),u[0]=Ti[0],u[1]=Ti[1],u[2]=Ti[2],u[3]=1+h,Sr(u,u))});function Wr(){var u=new c(2);return c!=Float32Array&&(u[0]=0,u[1]=0),u}function qr(u,s){var d=new c(2);return d[0]=u,d[1]=s,d}function Eo(u,s,d){return u[0]=s,u[1]=d,u}function os(u,s,d){return u[0]=s[0]+d[0],u[1]=s[1]+d[1],u}function vl(u,s,d){return u[0]=s[0]-d[0],u[1]=s[1]-d[1],u}function jl(u,s,d){return u[0]=s[0]*d,u[1]=s[1]*d,u}function Dd(u){var s=u[0],d=u[1];return Math.sqrt(s*s+d*d)}function Na(u,s){var d=s[0],h=s[1],f=d*d+h*h;return f>0&&(f=1/Math.sqrt(f)),u[0]=s[0]*f,u[1]=s[1]*f,u}function xc(u,s){return u[0]*s[0]+u[1]*s[1]}Xt(),Xt(),g();var gg,Hi,Cn=vl;function wr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}Wr();var Ao=(function(){if(Hi)return gg;function u(s,d,h,f){this.cx=3*s,this.bx=3*(h-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*d,this.by=3*(f-d)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=d,this.p2x=h,this.p2y=f}return Hi=1,gg=u,u.prototype={sampleCurveX:function(s){return((this.ax*s+this.bx)*s+this.cx)*s},sampleCurveY:function(s){return((this.ay*s+this.by)*s+this.cy)*s},sampleCurveDerivativeX:function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},solveCurveX:function(s,d){if(d===void 0&&(d=1e-6),s<0)return 0;if(s>1)return 1;for(var h=s,f=0;f<8;f++){var v=this.sampleCurveX(h)-s;if(Math.abs(v)v?I=h:k=h,h=.5*(k-I)+I;return h},solve:function(s,d){return this.sampleCurveY(this.solveCurveX(s,d))}},gg})(),ga=wr(Ao);function yi(u,s){this.x=u,this.y=s}function as(u,s){if(Array.isArray(u)){if(!Array.isArray(s)||u.length!==s.length)return!1;for(let d=0;d=1)return 1;let s=u*u,d=s*u;return 4*(u<.5?d:3*(u-s)+d-.75)}function xt(u,s,d,h){let f=new ga(u,s,d,h);return function(v){return f.solve(v)}}let mt=xt(.25,.1,.25,1);function pt(u,s,d){return Math.min(d,Math.max(s,u))}function ii(u,s,d){return(d=pt((d-u)/(s-u),0,1))*d*(3-2*d)}function Ft(u,s,d){let h=d-s,f=((u-s)%h+h)%h+s;return f===s?d:f}function oi(u,s,d){if(!u.length)return d(null,[]);let h=u.length,f=new Array(u.length),v=null;u.forEach((b,I)=>{s(b,(k,F)=>{k&&(v=k),f[I]=F,--h==0&&d(v,f)})})}let ln=1;function zi(){return ln++}function Jn(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log2(u)))}function Pr(u,s){u.forEach(d=>{s[d]&&(s[d]=s[d].bind(s))})}function Qr(u,s,d){let h={};for(let f in u)h[f]=s.call(this,u[f],f,u);return h}function jo(u,s,d){let h={};for(let f in u)s.call(this,u[f],f,u)&&(h[f]=u[f]);return h}function Yr(u){return Array.isArray(u)?u.map(Yr):typeof u=="object"&&u?Qr(u,Yr):u}function Fo(u,s){for(let d=0;d=0)return!0;return!1}let js={};function Ko(u){js[u]||(typeof console<"u"&&console.warn(u),js[u]=!0)}function Sc(u,s,d){return(d.y-u.y)*(s.x-u.x)>(s.y-u.y)*(d.x-u.x)}function Gc(u){let s=0;for(let d,h,f=0,v=u.length,b=v-1;f@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(d,h,f,v)=>{let b=f||v;return s[h]=!b||b.toLowerCase(),""}),s["max-age"]){let d=parseInt(s["max-age"],10);isNaN(d)?delete s["max-age"]:s["max-age"]=d}return s}let Kl=null;function Wl(u,s){return[u[4*s],u[4*s+1],u[4*s+2],u[4*s+3]]}function sl(u,s,d,h){for(;s>1;u[f]>1;u[f]<=h?s=f+1:d=f}return s}function sm(u){return u>0?1/(1.001-u):1+u}function yf(u){return u>0?1-1/(1.001-u):-u}function Ny(u,s,d){return(u-s.min)*(d.max-d.min)/(s.max-s.min)+d.min}let lp={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(!lp.API_URL)return null;try{let u=new URL(lp.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 UC(u){return lp.API_URL_REGEX.test(u)}function zO(u){return lp.API_SPRITE_REGEX.test(u)}let S0,V1,z1,ob,Fy,RI;function KA(){return S0==null&&(S0=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),S0}let l_={now:()=>ob!==void 0?ob:performance.now(),setNow(u){ob=u},restoreNow(){ob=void 0},frame(u){let s=requestAnimationFrame(u);return{cancel:()=>cancelAnimationFrame(s)}},getImageData(u,s=0){let{width:d,height:h}=u;Fy||(Fy=document.createElement("canvas"));let f=Fy.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return(d>Fy.width||h>Fy.height)&&(Fy.width=d,Fy.height=h),f.clearRect(-s,-s,d+2*s,h+2*s),f.drawImage(u,0,0,d,h),f.getImageData(-s,-s,d+2*s,h+2*s)},resolveURL:u=>(V1||(V1=document.createElement("a")),V1.href=u,V1.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(z1==null&&(z1=window.matchMedia("(prefers-reduced-motion: reduce)")),z1.matches)},hasCanvasFingerprintNoise(){if(RI!==void 0)return RI;if(!KA())return RI=!1,!1;let u=new OffscreenCanvas(85,1),s=u.getContext("2d",{willReadFrequently:!0}),d=0;for(let f=0;f0?`?${v}`:""}`}let Mh="mapbox-tiles",vf=500,c_=50,lm=["language","worldview","jobid"],Dp,ab;function UO(){try{return caches}catch{}}function U1(){let u=UO();u&&Dp==null&&(Dp=u.open(Mh))}let Ly=1/0,H1={supported:!1,testSupport:function(u){!bf&&j1&&(HO?$1(u):G1=u)}},G1,j1,bf=!1,HO=!1,NI=typeof self<"u"?self:{};function $1(u){let s=u.createTexture();u.bindTexture(u.TEXTURE_2D,s);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,j1),u.isContextLost())return;H1.supported=!0}catch{}u.deleteTexture(s),bf=!0}NI.document&&(j1=NI.document.createElement("img"),j1.onload=function(){G1&&$1(G1),G1=null,HO=!0},j1.onerror=function(){bf=!0,G1=null},j1.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");let QA={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(QA);class GO extends Error{constructor(s,d,h){d===401&&UC(h)&&(s+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(s),this.status=d,this.url=h}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}let ZA=Ns()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,pa=function(u,s){if(!(/^file:/.test(d=u.url)||/^file:/.test(ZA())&&!/^\w+:/.test(d))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return(function(h,f){let v=new AbortController,b=new Request(h.url,{method:h.method||"GET",body:h.body,credentials:h.credentials,headers:h.headers,referrer:ZA(),referrerPolicy:h.referrerPolicy,signal:v.signal}),I=!1,k=!1,F=(U=b.url).indexOf("sku=")>0&&UC(U);var U;h.type==="json"&&b.headers.set("Accept","application/json");let G=(Z,X,ue)=>{if(k)return;if(Z&&Z.message!=="SecurityError"&&Ko(Z.toString()),X&&ue)return q(X);let he=Date.now();fetch(b).then(_e=>{if(_e.ok){let Fe=F?_e.clone():null;return q(_e,Fe,he)}return f(new GO(_e.statusText,_e.status,h.url))}).catch(_e=>{_e.name!=="AbortError"&&f(new Error(`${_e.message} ${h.url}`))})},q=(Z,X,ue)=>{(h.type==="arrayBuffer"?Z.arrayBuffer():h.type==="json"?Z.json():Z.text()).then(he=>{k||(X&&ue&&(function(_e,Fe,Le){if(U1(),Dp==null)return;let Ve=Za(Fe.headers.get("Cache-Control")||"");if(Ve["no-store"])return;let dt={status:Fe.status,statusText:Fe.statusText,headers:new Headers};Fe.headers.forEach((Ot,Lt)=>dt.headers.set(Lt,Ot)),Ve["max-age"]&&dt.headers.set("Expires",new Date(Le+1e3*Ve["max-age"]).toUTCString());let ut=dt.headers.get("Expires");if(!ut||new Date(ut).getTime()-Le<42e4)return;let It=WA(_e.url,{persistentParams:lm});if(Fe.status===206){let Ot=_e.headers.get("Range");if(!Ot)return;dt.status=200,It=PI(It,{range:Ot})}(function(Ot,Lt){if(ab===void 0)try{new Response(new ReadableStream),ab=!0}catch{ab=!1}ab?Lt(Ot.body):Ot.blob().then(Lt).catch(ki=>Ko(ki.message))})(Fe,Ot=>{let Lt=new Response((ki=Fe.status)!==200&&ki!==404&&[101,103,204,205,304].includes(ki)?null:Ot,dt);var ki;U1(),Dp?.then(Ht=>Ht.put(It,Lt)).catch(Ht=>Ko(Ht.message))})})(b,X,ue),I=!0,f(null,he,Z.headers.get("Cache-Control"),Z.headers.get("Expires")))}).catch(he=>{k||f(new Error(he.message))})};return F?(function(Z,X){if(U1(),Dp==null)return X(null);Dp.then(ue=>{let he=WA(Z.url,{persistentParams:lm}),_e=Z.headers.get("Range");_e&&(he=PI(he,{range:_e})),ue.match(he).then(Fe=>{let Le=(function(Ve){if(!Ve)return!1;let dt=new Date(Ve.headers.get("Expires")||0),ut=Za(Ve.headers.get("Cache-Control")||"");return Number(dt)>Date.now()&&!ut["no-cache"]})(Fe);ue.delete(he).catch(X),Le&&ue.put(he,Fe.clone()).catch(X),X(null,Fe,Le)}).catch(X)}).catch(X)})(b,G):G(null,null),{cancel:()=>{k=!0,I||v.abort()}}})(u,s);if(Ns(self)&&self.worker.actor)return self.worker.actor.send("getResource",u,s,void 0,!0)}var d;return(function(h,f){let v=new XMLHttpRequest;v.open(h.method||"GET",h.url,!0),h.type==="arrayBuffer"&&(v.responseType="arraybuffer");for(let b in h.headers)v.setRequestHeader(b,h.headers[b]);return h.type==="json"&&(v.responseType="text",v.setRequestHeader("Accept","application/json")),v.withCredentials=h.credentials==="include",v.onerror=()=>{f(new Error(v.statusText))},v.onload=()=>{if((v.status>=200&&v.status<300||v.status===0)&&v.response!==null){let b=v.response;if(h.type==="json")try{b=JSON.parse(v.response)}catch(I){return f(I)}f(null,b,v.getResponseHeader("Cache-Control"),v.getResponseHeader("Expires"))}else f(new GO(v.statusText,v.status,h.url))},v.send(h.body),{cancel:()=>v.abort()}})(u,s)},q1=function(u,s){return pa(Object.assign(u,{type:"arrayBuffer"}),s)};function ZB(u){let s=document.createElement("a");return s.href=u,s.protocol===location.protocol&&s.host===location.host}let XB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",XA,sb;XA=[],sb=0;let ac=function(u,s){if(H1.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),sb>=lp.MAX_PARALLEL_IMAGE_REQUESTS){let v={requestParameters:u,callback:s,cancelled:!1,cancel(){this.cancelled=!0}};return XA.push(v),v}sb++;let d=!1,h=()=>{if(!d)for(d=!0,sb--;XA.length&&sb{h(),v?s(v):b&&(self.createImageBitmap?(function(F,U){let G=new Blob([new Uint8Array(F)],{type:"image/png"});createImageBitmap(G).then(q=>{U(null,q)}).catch(q=>{U(new Error(`Could not load image because of ${q.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})})(b,(F,U)=>s(F,U,I,k)):(function(F,U){let G=new Image;G.onload=()=>{U(null,G),URL.revokeObjectURL(G.src),G.onload=null,requestAnimationFrame(()=>{G.src=XB})},G.onerror=()=>U(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 q=new Blob([new Uint8Array(F)],{type:"image/png"});G.src=F.byteLength?URL.createObjectURL(q):XB})(b,(F,U)=>s(F,U,I,k)))});return{cancel:()=>{f.cancel(),h()}}};var sc,JA,JB,HC={exports:{}},e3={exports:{}},jO={exports:{}},Y1=(function(){if(JB)return HC.exports;JB=1;var u=(sc||(sc=1,e3.exports=function(d,h){var f,v,b,I,k,F,U,G;for(v=d.length-(f=3&d.length),b=h,k=3432918353,F=461845907,G=0;G>>16)*k&65535)<<16)&4294967295)<<15|U>>>17))*F+(((U>>>16)*F&65535)<<16)&4294967295)<<13|b>>>19))+((5*(b>>>16)&65535)<<16)&4294967295))+((58964+(I>>>16)&65535)<<16);switch(U=0,f){case 3:U^=(255&d.charCodeAt(G+2))<<16;case 2:U^=(255&d.charCodeAt(G+1))<<8;case 1:b^=U=(65535&(U=(U=(65535&(U^=255&d.charCodeAt(G)))*k+(((U>>>16)*k&65535)<<16)&4294967295)<<15|U>>>17))*F+(((U>>>16)*F&65535)<<16)&4294967295}return b^=d.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}),e3.exports),s=(JA||(JA=1,jO.exports=function(d,h){for(var f,v=d.length,b=h^v,I=0;v>=4;)f=1540483477*(65535&(f=255&d.charCodeAt(I)|(255&d.charCodeAt(++I))<<8|(255&d.charCodeAt(++I))<<16|(255&d.charCodeAt(++I))<<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)),v-=4,++I;switch(v){case 3:b^=(255&d.charCodeAt(I+2))<<16;case 2:b^=(255&d.charCodeAt(I+1))<<8;case 1:b=1540483477*(65535&(b^=255&d.charCodeAt(I)))+((1540483477*(b>>>16)&65535)<<16)}return b=1540483477*(65535&(b^=b>>>13))+((1540483477*(b>>>16)&65535)<<16),(b^=b>>>15)>>>0}),jO.exports);return HC.exports=u,HC.exports.murmur3=u,HC.exports.murmur2=s,HC.exports})(),FI=wr(Y1);class d_{constructor(s,...d){Object.assign(this,d[0]||{}),this.type=s}}class qd extends d_{constructor(s,d={}){super("error",Object.assign({error:s},d))}}function K1(u,s,d){d[u]&&d[u].indexOf(s)!==-1||(d[u]=d[u]||[],d[u].push(s))}function Hu(u,s,d){if(d&&d[u]){let h=d[u].indexOf(s);h!==-1&&d[u].splice(h,1)}}class lb{on(s,d){return this._listeners=this._listeners||{},K1(s,d,this._listeners),this}off(s,d){return Hu(s,d,this._listeners),Hu(s,d,this._oneTimeListeners),this}once(s,d){return d?(this._oneTimeListeners=this._oneTimeListeners||{},K1(s,d,this._oneTimeListeners),this):new Promise(h=>{this.once(s,h)})}fire(s,d){let h=typeof s=="string"?new d_(s,d):s,f=h.type;if(this.listens(f)){h.target=this;let v=this._listeners&&this._listeners[f]?this._listeners[f].slice():[];for(let k of v)k.call(this,h);let b=this._oneTimeListeners&&this._oneTimeListeners[f]?this._oneTimeListeners[f].slice():[];for(let k of b)Hu(f,k,this._oneTimeListeners),k.call(this,h);let I=this._eventedParent;if(I){let k=typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData;Object.assign(h,k),I.fire(h)}}else h instanceof qd&&console.error(h.error);return this}listens(s){return!!(this._listeners&&this._listeners[s]&&this._listeners[s].length>0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s))}setEventedParent(s,d){return this._eventedParent=s,this._eventedParentData=d,this}}class Qm{constructor(s){typeof s=="string"?this.name=s:(this.name=s.name,this.iconsetId=s.iconsetId)}static from(s){return new Qm(s)}static toString(s){return s.iconsetId?`${s.name}${s.iconsetId}`:s.name}static parse(s){let[d,h]=s.split("");return new Qm({name:d,iconsetId:h})}static isEqual(s,d){return s.name===d.name&&s.iconsetId===d.iconsetId}toString(){return Qm.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var Oh,LI={},eD=(function(){if(Oh)return LI;Oh=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 s(v){return(v=Math.round(v))<0?0:v>255?255:v}function d(v){return s(v[v.length-1]==="%"?parseFloat(v)/100*255:parseInt(v))}function h(v){return(b=v[v.length-1]==="%"?parseFloat(v)/100:parseFloat(v))<0?0:b>1?1:b;var b}function f(v,b,I){return I<0?I+=1:I>1&&(I-=1),6*I<1?v+(b-v)*I*6:2*I<1?b:3*I<2?v+(b-v)*(2/3-I)*6:v}try{LI.parseCSSColor=function(v){var b,I=v.replace(/ /g,"").toLowerCase();if(I in u)return u[I].slice();if(I[0]==="#")return I.length===4?(b=parseInt(I.substr(1),16))>=0&&b<=4095?[(3840&b)>>4|(3840&b)>>8,240&b|(240&b)>>4,15&b|(15&b)<<4,1]:null:I.length===7&&(b=parseInt(I.substr(1),16))>=0&&b<=16777215?[(16711680&b)>>16,(65280&b)>>8,255&b,1]:null;var k=I.indexOf("("),F=I.indexOf(")");if(k!==-1&&F+1===I.length){var U=I.substr(0,k),G=I.substr(k+1,F-(k+1)).split(","),q=1;switch(U){case"rgba":if(G.length!==4)return null;q=h(G.pop());case"rgb":return G.length!==3?null:[d(G[0]),d(G[1]),d(G[2]),q];case"hsla":if(G.length!==4)return null;q=h(G.pop());case"hsl":if(G.length!==3)return null;var Z=(parseFloat(G[0])%360+360)%360/360,X=h(G[1]),ue=h(G[2]),he=ue<=.5?ue*(X+1):ue+X-ue*X,_e=2*ue-he;return[s(255*f(_e,he,Z+1/3)),s(255*f(_e,he,Z)),s(255*f(_e,he,Z-1/3)),q];default:return null}}return null}}catch{}return LI})();class Xa{constructor(s,d,h,f=1){this.r=s,this.g=d,this.b=h,this.a=f}static parse(s){if(!s)return;if(s instanceof Xa)return s;if(typeof s!="string")return;let d=eD.parseCSSColor(s);return d?new Xa(d[0]/255,d[1]/255,d[2]/255,d[3]):void 0}toString(){let[s,d,h,f]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*s)},${Math.round(255*d)},${Math.round(255*h)},${f})`}toNonPremultipliedRenderColor(s){let{r:d,g:h,b:f,a:v}=this;return new $O(s,d,h,f,v)}toPremultipliedRenderColor(s){let{r:d,g:h,b:f,a:v}=this;return new BI(s,d*v,h*v,f*v,v)}clone(){return new Xa(this.r,this.g,this.b,this.a)}}class tD{constructor(s,d,h,f,v,b=!1){if(this.premultiplied=!1,this.premultiplied=b,s){let I=s.image.height,k=I*I;this.premultiplied?(d=v===0?0:d/v*(I-1),h=v===0?0:h/v*(I-1),f=v===0?0:f/v*(I-1)):(d*=I-1,h*=I-1,f*=I-1);let F=Math.floor(d),U=Math.floor(h),G=Math.floor(f),q=Math.ceil(d),Z=Math.ceil(h),X=Math.ceil(f),ue=d-F,he=h-U,_e=f-G,Fe=s.image.data,Le=4*(F+U*k+G*I),Ve=4*(F+U*k+X*I),dt=4*(F+Z*k+G*I),ut=4*(F+Z*k+X*I),It=4*(q+U*k+G*I),Ot=4*(q+U*k+X*I),Lt=4*(q+Z*k+G*I),ki=4*(q+Z*k+X*I);if(Le<0||ki>=Fe.length)throw new Error("out of range");this.r=mr(mr(mr(Fe[Le],Fe[Ve],_e),mr(Fe[dt],Fe[ut],_e),he),mr(mr(Fe[It],Fe[Ot],_e),mr(Fe[Lt],Fe[ki],_e),he),ue)/255*(this.premultiplied?v:1),this.g=mr(mr(mr(Fe[Le+1],Fe[Ve+1],_e),mr(Fe[dt+1],Fe[ut+1],_e),he),mr(mr(Fe[It+1],Fe[Ot+1],_e),mr(Fe[Lt+1],Fe[ki+1],_e),he),ue)/255*(this.premultiplied?v:1),this.b=mr(mr(mr(Fe[Le+2],Fe[Ve+2],_e),mr(Fe[dt+2],Fe[ut+2],_e),he),mr(mr(Fe[It+2],Fe[Ot+2],_e),mr(Fe[Lt+2],Fe[ki+2],_e),he),ue)/255*(this.premultiplied?v:1),this.a=v}else this.r=d,this.g=h,this.b=f,this.a=v}toArray(){let{r:s,g:d,b:h,a:f}=this;return[255*s,255*d,255*h,f]}toHslaArray(){let{r:s,g:d,b:h,a:f}=this;if(this.premultiplied){if(f===0)return[0,0,0,0];let X=1/f;s*=X,d*=X,h*=X}let v=Math.min(Math.max(s,0),1),b=Math.min(Math.max(d,0),1),I=Math.min(Math.max(h,0),1),k=Math.min(v,b,I),F=Math.max(v,b,I),U=F-k,G=.5*(k+F);if(U===0)return[0,0,100*G,f];let q=G>.5?U/(2-F-k):U/(F+k),Z;switch(F){case v:Z=60*((b-I)/U+(bmr(h,s[f],d))}Xa.black=new Xa(0,0,0,1),Xa.white=new Xa(1,1,1,1),Xa.transparent=new Xa(0,0,0,0),Xa.red=new Xa(1,0,0,1),Xa.blue=new Xa(0,0,1,1);var hd=Object.freeze({__proto__:null,array:qO,color:function(u,s,d){return new Xa(mr(u.r,s.r,d),mr(u.g,s.g,d),mr(u.b,s.b,d),mr(u.a,s.a,d))},number:mr});class u_ extends Error{constructor(s,d){super(d),this.message=d,this.key=s}}class VI{constructor(s,d=[]){this.parent=s,this.bindings={};for(let[h,f]of d)this.bindings[h]=f}concat(s){return new VI(this,s)}get(s){if(this.bindings[s])return this.bindings[s];if(this.parent)return this.parent.get(s);throw new Error(`${s} not found in scope.`)}has(s){return!!this.bindings[s]||!!this.parent&&this.parent.has(s)}}let kp={kind:"null"},ir={kind:"number"},Ha={kind:"string"},Do={kind:"boolean"},uu={kind:"color"},By={kind:"object"},Ga={kind:"value"},W1={kind:"collator"},cb={kind:"formatted"},zI={kind:"resolvedImage"};function Mp(u,s){return{kind:"array",itemType:u,N:s}}function sd(u){if(u.kind==="array"){let s=sd(u.itemType);return typeof u.N=="number"?`array<${s}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${s}>`}return u.kind}let iD=[kp,ir,Ha,Do,uu,cb,By,Mp(Ga),zI];function w0(u,s){if(s.kind==="error")return null;if(u.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!w0(u.itemType,s.itemType))&&(typeof u.N!="number"||u.N===s.N))return null}else{if(u.kind===s.kind)return null;if(u.kind==="value"){for(let d of iD)if(!w0(d,s))return null}}return`Expected ${sd(u)} but found ${sd(s)} instead.`}function YO(u,s){return s.some(d=>d.kind===u.kind)}function Q1(u,s){return s.some(d=>d==="null"?u===null:d==="array"?Array.isArray(u):d==="object"?u&&!Array.isArray(u)&&typeof u=="object":d===typeof u)}function Z1(u,s){return u.kind==="array"&&s.kind==="array"?u.N===s.N&&Z1(u.itemType,s.itemType):u.kind===s.kind}class I0{constructor(s,d,h){this.sensitivity=s?d?"variant":"case":d?"accent":"base",this.locale=h,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(s,d){return this.collator.compare(s,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class X1{constructor(s,d,h,f,v){this.text=s.normalize?s.normalize():s,this.image=d,this.scale=h,this.fontStack=f,this.textColor=v}}class Op{constructor(s){this.sections=s}static fromString(s){return new Op([new X1(s,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(s=>s.text.length!==0||!!s.image&&s.image.hasPrimary())}static factory(s){return s instanceof Op?s:Op.fromString(s)}toString(){return this.sections.length===0?"":this.sections.map(s=>s.text).join("")}serialize(){let s=["format"];for(let d of this.sections){if(d.image){let f=d.image.getPrimary().id.toString();s.push(["image",f]);continue}s.push(d.text);let h={};d.fontStack&&(h["text-font"]=["literal",d.fontStack.split(",")]),d.scale&&(h["font-scale"]=d.scale),d.textColor&&(h["text-color"]=["rgba"].concat(d.textColor.toNonPremultipliedRenderColor(null).toArray())),s.push(h)}return s}}class p_{constructor(s,d={}){if(this.id=Qm.from(s),this.options=Object.assign({},d),d.transform){let{a:h,b:f,c:v,d:b,e:I,f:k}=d.transform;this.options.transform=new DOMMatrix([h,f,v,b,I,k])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){let{a:s,b:d,c:h,d:f,e:v,f:b}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a:s,b:d,c:h,d:f,e:v,f:b}})}static parse(s){let d,h,f,v;try{({name:d,iconsetId:h,params:f,transform:v}=JSON.parse(s)||{})}catch{return null}if(!d)return null;let{a:b,b:I,c:k,d:F,e:U,f:G}=v||{};return new p_({name:d,iconsetId:h},{params:f,transform:new DOMMatrix([b,I,k,F,U,G])})}scaleSelf(s,d){return this.options.transform.scaleSelf(s,d),this}}class Rp{constructor(s,d,h,f,v=!1){this.primaryId=Qm.from(s),this.primaryOptions=d,h&&(this.secondaryId=Qm.from(h)),this.secondaryOptions=f,this.available=v}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new p_(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new p_(this.secondaryId,this.secondaryOptions):null}static from(s){return typeof s=="string"?Rp.build({name:s}):s}static build(s,d,h,f){return!s||typeof s=="object"&&!("name"in s)?null:new Rp(s,h,d,f)}}function nD(u,s,d,h){return typeof u=="number"&&u>=0&&u<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof d=="number"&&d>=0&&d<=255?h===void 0||typeof h=="number"&&h>=0&&h<=1?null:`Invalid rgba value [${[u,s,d,h].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof h=="number"?[u,s,d,h]:[u,s,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function J1(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Xa||u instanceof I0||u instanceof Op||u instanceof Rp)return!0;if(Array.isArray(u)){for(let s of u)if(!J1(s))return!1;return!0}if(typeof u=="object"){for(let s in u)if(!J1(u[s]))return!1;return!0}return!1}function kd(u){if(u===null)return kp;if(typeof u=="string")return Ha;if(typeof u=="boolean")return Do;if(typeof u=="number")return ir;if(u instanceof Xa)return uu;if(u instanceof I0)return W1;if(u instanceof Op)return cb;if(u instanceof Rp)return zI;if(Array.isArray(u)){let s=u.length,d;for(let h of u){let f=kd(h);if(d){if(d===f)continue;d=Ga;break}d=f}return Mp(d||Ga,s)}return By}function jc(u){let s=typeof u;return u===null?"":s==="string"||s==="number"||s==="boolean"?String(u):u instanceof Op||u instanceof Rp||u instanceof Xa?u.toString():JSON.stringify(u)}class po{constructor(s,d){this.type=s,this.value=d}static parse(s,d){if(s.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${s.length-1} instead.`);if(!J1(s[1]))return d.error("invalid value");let h=s[1],f=kd(h),v=d.expectedType;return f.kind!=="array"||f.N!==0||!v||v.kind!=="array"||typeof v.N=="number"&&v.N!==0||(f=v),new po(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 Xa?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof Op?this.value.serialize():this.value}}class Rn{constructor(s){this.name="ExpressionEvaluationError",this.message=s}toJSON(){return this.message}}let eS={string:Ha,number:ir,boolean:Do,object:By};class Nr{constructor(s,d){this.type=s,this.args=d}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");let h,f=1,v=s[0];if(v==="array"){let I,k;if(s.length>2){let F=s[1];if(typeof F!="string"||!(F in eS)||F==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);I=eS[F],f++}else I=Ga;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return d.error('The length argument to "array" must be a positive integer literal',2);k=s[2],f++}h=Mp(I,k)}else h=eS[v];let b=[];for(;fs.outputDefined())}serialize(){let s=this.type,d=[s.kind];if(s.kind==="array"){let h=s.itemType;if(h.kind==="string"||h.kind==="number"||h.kind==="boolean"){d.push(h.kind);let f=s.N;(typeof f=="number"||this.args.length>1)&&d.push(f)}}return d.concat(this.args.map(h=>h.serialize()))}}class GC{constructor(s){this.type=cb,this.sections=s}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");let h=s[1];if(!Array.isArray(h)&&typeof h=="object")return d.error("First argument must be an image or text section.");let f=[],v=!1;for(let b=1;b<=s.length-1;++b){let I=s[b];if(v&&typeof I=="object"&&!Array.isArray(I)){v=!1;let k=null;if(I["font-scale"]&&(k=d.parseObjectValue(I["font-scale"],b,"font-scale",ir),!k))return null;let F=null;if(I["text-font"]&&(F=d.parseObjectValue(I["text-font"],b,"text-font",Mp(Ha)),!F))return null;let U=null;if(I["text-color"]&&(U=d.parseObjectValue(I["text-color"],b,"text-color",uu),!U))return null;let G=f[f.length-1];G.scale=k,G.font=F,G.textColor=U}else{let k=d.parse(s[b],b,Ga);if(!k)return null;let F=k.type.kind;if(F!=="string"&&F!=="value"&&F!=="null"&&F!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");v=!0,f.push({content:k,scale:null,font:null,textColor:null})}}return new GC(f)}evaluate(s){return new Op(this.sections.map(d=>{let h=d.content.evaluate(s);return Z1(kd(h),zI)?new X1("",h,null,null,null):new X1(jc(h),null,d.scale?d.scale.evaluate(s):null,d.font?d.font.evaluate(s).join(","):null,d.textColor?d.textColor.evaluate(s):null)}))}eachChild(s){for(let d of this.sections)s(d.content),d.scale&&s(d.scale),d.font&&s(d.font),d.textColor&&s(d.textColor)}outputDefined(){return!1}serialize(){let s=["format"];for(let d of this.sections){s.push(d.content.serialize());let h={};d.scale&&(h["font-scale"]=d.scale.serialize()),d.font&&(h["text-font"]=d.font.serialize()),d.textColor&&(h["text-color"]=d.textColor.serialize()),s.push(h)}return s}}class tS{constructor(s,d,h,f){this._imageWarnHistory={},this.type=zI,this.namePrimary=s,this.nameSecondary=d,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(s,d){if(s.length<2)return d.error("Expected two or more arguments.");let h=1,f=[];function v(){if(hQm.isEqual(b,v)),f.available){let b=f.getSecondary()?f.getSecondary().id:null;b&&(f.available=s.availableImages.some(I=>Qm.isEqual(I,b)))}}return f}eachChild(s){if(s(this.namePrimary),this.paramsPrimary)for(let d in this.paramsPrimary)this.paramsPrimary[d]&&s(this.paramsPrimary[d]);if(this.nameSecondary&&(s(this.nameSecondary),this.paramsSecondary))for(let d in this.paramsSecondary)this.paramsSecondary[d]&&s(this.paramsSecondary[d])}outputDefined(){return!1}serializeOptions(s,d){let h={};if(d&&(h.iconset={id:d}),s){h.params={};for(let f in s)s[f]&&(h.params[f]=s[f].serialize())}return Object.keys(h).length>0?h:void 0}serialize(){let s=["image",this.namePrimary.serialize()];if(this.paramsPrimary||this.iconsetIdPrimary){let d=this.serializeOptions(this.paramsPrimary,this.iconsetIdPrimary);d&&s.push(d)}if(this.nameSecondary&&(s.push(this.nameSecondary.serialize()),this.paramsSecondary||this.iconsetIdSecondary)){let d=this.serializeOptions(this.paramsSecondary,this.iconsetIdSecondary);d&&s.push(d)}return s}}function jr(u){return UI(u)?"string":T0(u)?"number":WO(u)?"boolean":Array.isArray(u)?"array":u===null?"null":KO(u)?"object":typeof u}function KO(u){return u!=null&&!Array.isArray(u)&&typeof u!="function"&&!(u instanceof String||u instanceof Number||u instanceof Boolean)&&typeof u=="object"}function UI(u){return typeof u=="string"||u instanceof String}function T0(u){return typeof u=="number"||u instanceof Number}function WO(u){return typeof u=="boolean"||u instanceof Boolean}let rD={"to-boolean":Do,"to-color":uu,"to-number":ir,"to-string":Ha};class Fc{constructor(s,d){this.type=s,this.args=d}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");let h=s[0],f=[],v=kp;if(h==="to-array"){if(!Array.isArray(s[1]))return null;let b=s[1].length;if(d.expectedType){if(d.expectedType.kind!=="array")return d.error(`Expected ${d.expectedType.kind} but found array.`);v=Mp(d.expectedType.itemType,b)}else{if(!(b>0&&J1(s[1][0])))return null;v=Mp(kd(s[1][0]),b)}for(let I=0;I4?`Invalid rbga value ${JSON.stringify(d)}: expected an array containing either three or four numeric values.`:nD(d[0],d[1],d[2],d[3]),!h))return new Xa(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new Rn(h||`Could not parse color from value '${typeof d=="string"?d:String(JSON.stringify(d))}'`)}if(this.type.kind==="number"){let d=null;for(let h of this.args){if(d=h.evaluate(s),d===null)return 0;let f=Number(d);if(!isNaN(f))return f}throw new Rn(`Could not convert ${JSON.stringify(d)} to number.`)}return this.type.kind==="formatted"?Op.fromString(jc(this.args[0].evaluate(s))):this.type.kind==="resolvedImage"?Rp.build(jc(this.args[0].evaluate(s))):this.type.kind==="array"?this.args.map(d=>d.evaluate(s)):jc(this.args[0].evaluate(s))}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}serialize(){if(this.type.kind==="formatted")return new GC([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new tS(this.args[0]).serialize();let s=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(d=>{s.push(d.serialize())}),s}}let oD=["Unknown","Point","LineString","Polygon"];class cm{constructor(s,d,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=s,this.options=d,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"?oD[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(s){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){let s=this.featureDistanceData.center,d=this.featureDistanceData.scale,{x:h,y:f}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(h*d-s[0])+this.featureDistanceData.bearing[1]*(f*d-s[1])}return 0}parseColor(s){let d=this._parseColorCache[s];return d||(d=this._parseColorCache[s]=Xa.parse(s)),d}getConfig(s){return this.options?this.options.get(s):null}}class Gu{constructor(s,d,h,f,v){this.name=s,this.type=d,this._evaluate=h,this.args=f,this._overloadIndex=v}evaluate(s){if(!this._evaluate){let d=Gu.definitions[this.name];this._evaluate=Array.isArray(d)?d[2]:d.overloads[this._overloadIndex][1]}return this._evaluate(s,this.args)}eachChild(s){this.args.forEach(s)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(s=>s.serialize()))}static parse(s,d){let h=s[0],f=Gu.definitions[h];if(!f)return d.error(`Unknown expression "${h}". If you wanted a literal array, use ["literal", [...]].`,0);let v=Array.isArray(f)?f[0]:f.type,b=Array.isArray(f)?[[f[1],f[2]]]:f.overloads,I=[],k=null,F=-1;for(let[U,G]of b){if(Array.isArray(U)&&U.length!==s.length-1)continue;I.push(U),F++,k=new mD(d.registry,d.path,null,d.scope,void 0,d._scope,d.options,d.iconImageUseTheme);let q=[],Z=!1;for(let X=1;Xq)).map(db).join(" | "),G=[];for(let q=1;qd;){if(h-d>600){let k=h-d+1,F=s-d+1,U=Math.log(k),G=.5*Math.exp(2*U/3),q=.5*Math.sqrt(U*G*(k-G)/k)*(F-k/2<0?-1:1);t3(u,s,Math.max(d,Math.floor(s-F*G/k+q)),Math.min(h,Math.floor(s+(k-F)*G/k+q)),f)}let v=u[s],b=d,I=h;for(E0(u,d,s),f(u[h],v)>0&&E0(u,d,h);b0;)I--}f(u[d],v)===0?E0(u,d,I):(I++,E0(u,I,h)),I<=s&&(d=I+1),s<=I&&(h=I-1)}}function E0(u,s,d){let h=u[s];u[s]=u[d],u[d]=h}function m_(u,s){return us?1:0}function HI(u){let s=0;for(let d,h,f=0,v=u.length,b=v-1;f=s[2]||u[1]<=s[1]||u[3]>=s[3])}function fH(u,s,d){let h=u[0]-s[0],f=u[1]-s[1],v=u[0]-d[0],b=u[1]-d[1];return h*b-v*f==0&&h*v<=0&&f*b<=0}function nS(u,s,d=!1){let h=!1;for(let I=0,k=s.length;I(f=u)[1]!=(b=X)[1]>f[1]&&f[0]<(b[0]-v[0])*(f[1]-v[1])/(b[1]-v[1])+v[0]&&(h=!h)}}var f,v,b;return h}function i3(u,s,d,h){let f=h[0]-d[0],v=h[1]-d[1],b=(u[0]-d[0])*v-f*(u[1]-d[1]),I=(s[0]-d[0])*v-f*(s[1]-d[1]);return b>0&&I<0||b<0&&I>0}function f_(u,s,d,h){return(f=[h[0]-d[0],h[1]-d[1]])[0]*(v=[s[0]-u[0],s[1]-u[1]])[1]-f[1]*v[0]!=0&&!(!i3(u,s,d,h)||!i3(d,h,u,s));var f,v}function Ri(u){let s=new yi(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),d=new yi(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(let h of u[0])s.x>h.x&&(s.x=h.x),s.y>h.y&&(s.y=h.y),d.xd[2]){let f=.5*h,v=u[0]-d[0]>f?-h:d[0]-u[0]>f?h:0;v===0&&(v=u[0]-d[2]>f?-h:d[2]-u[0]>f?h:0),u[0]+=v}iS(s,u)}function Cf(u,s,d,h){let f=Math.pow(2,h.z)*kn,v=[h.x*kn,h.y*kn],b=[];if(!u)return b;for(let I of u)for(let k of I){let F=[k.x+v[0],k.y+v[1]];n3(F,s,d,f),b.push(F)}return b}function GI(u,s,d,h){let f=Math.pow(2,h.z)*kn,v=[h.x*kn,h.y*kn],b=[];if(!u)return b;for(let k of u){let F=[];for(let U of k){let G=[U.x+v[0],U.y+v[1]];iS(s,G),F.push(G)}b.push(F)}if(s[2]-s[0]<=f/2){(I=s)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(let k of b)for(let F of k)n3(F,s,d,f)}var I;return b}class jC{constructor(s,d){this.type=Do,this.geojson=s,this.geometries=d}static parse(s,d){if(s.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${s.length-1} instead.`);if(J1(s[1])){let h=s[1];if(h.type==="FeatureCollection")for(let f=0;fd)return $C(v,b,(d-(h-I))/I)}return s[s.length-1]}pointToSegmentDistance(s,d,h){let[f,v]=d,b=xf(h[0]-f)*this.kx,I=(h[1]-v)*this.ky;if(b!==0||I!==0){let k=(xf(s[0]-f)*this.kx*b+(s[1]-v)*this.ky*I)/(b*b+I*I);k>1?(f=h[0],v=h[1]):k>0&&(f+=b/this.kx*k,v+=I/this.ky*k)}return b=xf(s[0]-f)*this.kx,I=(s[1]-v)*this.ky,Math.sqrt(b*b+I*I)}pointOnLine(s,d){let h=1/0,f=s[0][0],v=s[0][1],b=0,I=0;for(let k=0;k1?(F=s[k+1][0],U=s[k+1][1]):Z>0&&(F+=G/this.kx*Z,U+=q/this.ky*Z)),G=xf(d[0]-F)*this.kx,q=(d[1]-U)*this.ky;let X=G*G+q*q;Xv.index||f.index===v.index&&f.t>v.t){let F=f;f=v,v=F}let b=[f.point],I=f.index+1,k=v.index;!aD(h[I],b[0])&&I<=k&&b.push(h[I]);for(let F=I+1;F<=k;F++)b.push(h[F]);return aD(h[k],v.point)||b.push(v.point),b}lineSliceAlong(s,d,h){let f=0,v=[];for(let b=0;bs&&v.length===0&&v.push($C(I,k,(s-(f-F))/F)),f>=d)return v.push($C(I,k,(d-(f-F))/F)),v;f>s&&v.push(k)}return v}bufferPoint(s,d){let h=d/this.ky,f=d/this.kx;return[s[0]-f,s[1]-h,s[0]+f,s[1]+h]}bufferBBox(s,d){let h=d/this.ky,f=d/this.kx;return[s[0]-f,s[1]-h,s[2]+f,s[3]+h]}insideBBox(s,d){return xf(s[0]-d[0])>=0&&xf(s[0]-d[2])<=0&&s[1]>=d[1]&&s[1]<=d[3]}}function aD(u,s){return u[0]===s[0]&&u[1]===s[1]}function $C(u,s,d){let h=xf(s[0]-u[0]);return[u[0]+h*d,u[1]+(s[1]-u[1])*d]}function xf(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}class sD{constructor(s=[],d=(h,f)=>hf?1:0){if(this.data=s,this.length=this.data.length,this.compare=d,this.length>0)for(let h=(this.length>>1)-1;h>=0;h--)this._down(h)}push(s){this.data.push(s),this._up(this.length++)}pop(){if(this.length===0)return;let s=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),s}peek(){return this.data[0]}_up(s){let{data:d,compare:h}=this,f=d[s];for(;s>0;){let v=s-1>>1,b=d[v];if(h(f,b)>=0)break;d[s]=b,s=v}d[s]=f}_down(s){let{data:d,compare:h}=this,f=this.length>>1,v=d[s];for(;s=0)break;d[s]=d[b],s=b}d[s]=v}}var pn=8192;function sS(u,s){return s.dist-u.dist}let Sf=100,Vy=50;function lS(u){let s=[1/0,1/0,-1/0,-1/0];if(s.length!==u.length)return!1;for(let d=0;d=u[0]&&u[1]u[1])return[null,null];let d=ub(u);if(s){if(d===2)return[u,null];let h=Math.floor(d/2);return[[u[0],u[0]+h],[u[0]+h,u[1]]]}{if(d===1)return[u,null];let h=Math.floor(d/2)-1;return[[u[0],u[0]+h],[u[0]+h+1,u[1]]]}}function Zm(u,s){let d=[1/0,1/0,-1/0,-1/0];if(!g_(s,u.length))return d;for(let h=s[0];h<=s[1];++h)iS(d,u[h]);return d}function ta(u){let s=[1/0,1/0,-1/0,-1/0];for(let d=0;ds[2]&&(h=u[0]-s[2]),u[1]>s[3]&&(f=u[1]-s[3]),u[3]=h)return h;if(h_(f,v)){if(o3(u,s))return 0}else if(o3(s,u))return 0;let b=h;for(let I of u)for(let k=0,F=I.length,U=F-1;k=v)continue;let U=F.range1;if(ub(U)<=I){if(!g_(U,u.length))return NaN;if(s){let G=yH(u,U,d,h);if((v=Math.min(v,G))===0)return v}else for(let G=U[0];G<=U[1];++G){let q=r3(u[G],d,h);if((v=Math.min(v,q))===0)return v}}else{let G=jI(U,s);if(G[0]!==null){let q=D0(Zm(u,G[0]),k,h);q=b)continue;let G=U.range1,q=U.range2;if(ub(G)<=k&&ub(q)<=F){if(!g_(G,u.length)||!g_(q,d.length))return NaN;if(s&&h?b=Math.min(b,QO(u,G,d,q,f)):s||h?s&&!h?b=Math.min(b,$I(d,q,u,G,f)):!s&&h&&(b=Math.min(b,$I(u,G,d,q,f))):b=Math.min(b,_H(u,G,d,q,f)),b===0)return b}else{let Z=jI(G,s),X=jI(q,h);qu(I,b,f,u,d,Z[0],X[0]),qu(I,b,f,u,d,Z[0],X[1]),qu(I,b,f,u,d,Z[1],X[0]),qu(I,b,f,u,d,Z[1],X[1])}}return b}function dD(u,s,d,h,f=1/0){let v=f,b=Zm(u,[0,u.length-1]);for(let I of d)if(!(v!==1/0&&D0(b,Zm(I,[0,I.length-1]),h)>=v)&&(v=Math.min(v,a3(u,s,I,!0,h,v)),v===0))return v;return v}function uD(u,s,d,h,f=1/0){let v=f,b=Zm(u,[0,u.length-1]);for(let I of d){if(v!==1/0&&D0(b,ta(I),h)>=v)continue;let k=vH(u,s,I,h,v);if(isNaN(k))return k;if((v=Math.min(v,k))===0)return v}return v}function qI(u){return u==="Point"||u==="MultiPoint"||u==="LineString"||u==="MultiLineString"||u==="Polygon"||u==="MultiPolygon"}class __{constructor(s,d){this.type=ir,this.geojson=s,this.geometries=d}static parse(s,d){if(s.length!==2)return d.error(`'distance' expression requires either one argument, but found ' ${s.length-1} instead.`);if(J1(s[1])){let h=s[1];if(h.type==="FeatureCollection"){for(let f=0;f{s&&!pb(d)&&(s=!1)}),s}function zy(u){if(u instanceof Gu&&u.name==="feature-state")return!1;let s=!0;return u.eachChild(d=>{s&&!zy(d)&&(s=!1)}),s}function mb(u){if(u instanceof dS)return new Set([u.key]);let s=new Set;return u.eachChild(d=>{s=new Set([...s,...mb(d)])}),s}function k0(u,s){if(u instanceof Gu&&s.indexOf(u.name)>=0)return!1;let d=!0;return u.eachChild(h=>{d&&!k0(h,s)&&(d=!1)}),d}function YI(u,s,d){return[u,s,d].filter(Boolean).join("")}function hb(u,s){switch(u){case"string":return jc(s);case"number":return+s;case"boolean":return!!s;case"color":return Xa.parse(s);case"formatted":return Op.fromString(jc(s));case"resolvedImage":return Rp.build(jc(s))}return s}function s3(u,s,d,h){return h!==void 0&&(u=h*Math.round(u/h)),s!==void 0&&ud&&(u=d),u}class dS{constructor(s,d,h,f=!1){this.type=s,this.key=d,this.scope=h,this.featureConstant=f}static parse(s,d){let h=d.expectedType;if(h==null&&(h=Ga),s.length<2||s.length>3)return d.error("Invalid number of arguments for 'config' expression.");let f=d.parse(s[1],1);if(!(f instanceof po))return d.error("Key name of 'config' expression must be a string literal.");let v,b=!0,I=jc(f.value);if(s.length>=3){let k=d.parse(s[2],2);if(!(k instanceof po))return d.error("Scope of 'config' expression must be a string literal.");v=jc(k.value)}if(d.options){let k=YI(I,v,d._scope),F=d.options.get(k);F&&(b=pb(F.value||F.default))}return new dS(h,I,v,b)}evaluate(s){let d=YI(this.key,this.scope,s.scope),h=s.getConfig(d);if(!h)return null;let{type:f,value:v,values:b,minValue:I,maxValue:k,stepValue:F}=h,U=h.default.evaluate(s),G=U;if(v){let q=s.scope;s.scope=(q||"").split("").slice(1).join(""),G=v.evaluate(s),s.scope=q}return f&&(G=hb(f,G)),G===void 0||I===void 0&&k===void 0&&F===void 0||(typeof G=="number"?G=s3(G,I,k,F):Array.isArray(G)&&(G=G.map(q=>typeof q=="number"?s3(q,I,k,F):q))),v!==void 0&&G!==void 0&&b&&!b.includes(G)&&(G=U,f&&(G=hb(f,G))),(f&&f!==this.type||G!==void 0&&!Z1(kd(G),this.type))&&(G=hb(this.type.kind,G)),G}eachChild(){}outputDefined(){return!1}serialize(){let s=["config",this.key];return this.scope&&s.concat(this.scope),s}}class pD{constructor(s,d){this.type=d.type,this.name=s,this.boundExpression=d}static parse(s,d){if(s.length!==2||typeof s[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");let h=s[1];return d.scope.has(h)?new pD(h,d.scope.get(h)):d.error(`Unknown variable "${h}". Make sure "${h}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(s){return this.boundExpression.evaluate(s)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class mD{constructor(s,d=[],h,f=new VI,v=[],b,I,k){this.registry=s,this.path=d,this.key=d.map(F=>typeof F=="string"?`['${F}']`:`[${F}]`).join(""),this.scope=f,this.errors=v,this.expectedType=h,this._scope=b,this.options=I,this.iconImageUseTheme=k}parse(s,d,h,f,v={}){return d||h?this.concat(d,null,h,f)._parse(s,v):this._parse(s,v)}parseObjectValue(s,d,h,f,v,b={}){return this.concat(d,h,f,v)._parse(s,b)}_parse(s,d){function h(f,v,b){return b==="assert"?new Nr(v,[f]):b==="coerce"?new Fc(v,[f]):f}if(s!==null&&typeof s!="string"&&typeof s!="boolean"&&typeof s!="number"||(s=["literal",s]),Array.isArray(s)){if(s.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let f=typeof s[0]=="string"?this.registry[s[0]]:void 0;if(f){let v=f.parse(s,this);if(!v)return null;if(this.expectedType){let b=this.expectedType,I=v.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||I.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||I.kind!=="value"&&I.kind!=="string"){if(this.checkSubtype(b,I))return null}else v=h(v,b,d.typeAnnotation||"coerce");else v=h(v,b,d.typeAnnotation||"assert")}if(!(v instanceof po)&&v.type.kind!=="resolvedImage"&&ZO(v)){let b=new cm(this._scope,this.options,this.iconImageUseTheme);try{v=new po(v.type,v.evaluate(b))}catch(I){return this.error(I.message),null}}return v}return Fc.parse(["to-array",s],this)}return this.error(s===void 0?"'undefined' value invalid. Use null instead.":typeof s=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof s} instead.`)}concat(s,d,h,f){let v=typeof s=="number"?this.path.concat(s):this.path;v=typeof d=="string"?v.concat(d):v;let b=f?this.scope.concat(f):this.scope;return new mD(this.registry,v,h||null,b,this.errors,this._scope,this.options,this.iconImageUseTheme)}error(s,...d){let h=`${this.key}${d.map(f=>`[${f}]`).join("")}`;this.errors.push(new u_(h,s))}checkSubtype(s,d){let h=w0(s,d);return h&&this.error(h),h}}function ZO(u){if(u instanceof pD)return ZO(u.boundExpression);if(u instanceof Gu&&u.name==="error"||u instanceof ju||u instanceof jC||u instanceof __||u instanceof dS)return!1;let s=u instanceof Fc||u instanceof Nr,d=!0;return u.eachChild(h=>{d=s?d&&ZO(h):d&&h instanceof po}),!!d&&pb(u)&&k0(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 YC(u,s){let d=u.length-1,h,f,v=0,b=d,I=0;for(;v<=b;)if(I=Math.floor((v+b)/2),h=u[I],f=u[I+1],h<=s){if(I===d||ss))throw new Rn("Input is not a number.");b=I-1}return 0}class Uy{constructor(s,d,h){this.type=s,this.input=d,this.labels=[],this.outputs=[];for(let[f,v]of h)this.labels.push(f),this.outputs.push(v)}static parse(s,d){if(s.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return d.error("Expected an even number of arguments.");let h=d.parse(s[1],1,ir);if(!h)return null;let f=[],v=null;d.expectedType&&d.expectedType.kind!=="value"&&(v=d.expectedType);for(let b=1;b=I)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',F);let G=d.parse(k,U,v);if(!G)return null;v=v||G.type,f.push([I,G])}return new Uy(v,h,f)}evaluate(s){let d=this.labels,h=this.outputs;if(d.length===1)return h[0].evaluate(s);let f=this.input.evaluate(s);if(f<=d[0])return h[0].evaluate(s);let v=d.length;return f>=d[v-1]?h[v-1].evaluate(s):h[YC(d,f)].evaluate(s)}eachChild(s){s(this.input);for(let d of this.outputs)s(d)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}serialize(){let s=["step",this.input.serialize()];for(let d=0;d0&&s.push(this.labels[d]),s.push(this.outputs[d].serialize());return s}}let XO=.95047,ft=1.08883,KC=4/29,y_=6/29,wf=3*y_*y_,ll=y_*y_*y_,bH=Math.PI/180,CH=180/Math.PI;function JO(u){return u>ll?Math.pow(u,1/3):u/wf+KC}function M0(u){return u>y_?u*u*u:wf*(u-KC)}function hD(u){return 255*(u<=.0031308?12.92*u:1.055*Math.pow(u,1/2.4)-.055)}function fb(u){return(u/=255)<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function eR(u){let s=fb(u.r),d=fb(u.g),h=fb(u.b),f=JO((.4124564*s+.3575761*d+.1804375*h)/XO),v=JO((.2126729*s+.7151522*d+.072175*h)/1);return{l:116*v-16,a:500*(f-v),b:200*(v-JO((.0193339*s+.119192*d+.9503041*h)/ft)),alpha:u.a}}function tR(u){let s=(u.l+16)/116,d=isNaN(u.a)?s:s+u.a/500,h=isNaN(u.b)?s:s-u.b/200;return s=1*M0(s),d=XO*M0(d),h=ft*M0(h),new Xa(hD(3.2404542*d-1.5371385*s-.4985314*h),hD(-.969266*d+1.8760108*s+.041556*h),hD(.0556434*d-.2040259*s+1.0572252*h),u.alpha)}function xH(u,s,d){let h=s-u;return u+d*(h>180||h<-180?h-360*Math.round(h/360):h)}let Xm={forward:eR,reverse:tR,interpolate:function(u,s,d){return{l:mr(u.l,s.l,d),a:mr(u.a,s.a,d),b:mr(u.b,s.b,d),alpha:mr(u.alpha,s.alpha,d)}}},WC={forward:function(u){let{l:s,a:d,b:h}=eR(u),f=Math.atan2(h,d)*CH;return{h:f<0?f+360:f,c:Math.sqrt(d*d+h*h),l:s,alpha:u.a}},reverse:function(u){let s=u.h*bH,d=u.c;return tR({l:u.l,a:Math.cos(s)*d,b:Math.sin(s)*d,alpha:u.alpha})},interpolate:function(u,s,d){return{h:xH(u.h,s.h,d),c:mr(u.c,s.c,d),l:mr(u.l,s.l,d),alpha:mr(u.alpha,s.alpha,d)}}};var l3=Object.freeze({__proto__:null,hcl:WC,lab:Xm});class If{constructor(s,d,h,f,v){this.type=s,this.operator=d,this.interpolation=h,this.input=f,this.labels=[],this.outputs=[];for(let[b,I]of v)this.labels.push(b),this.outputs.push(I)}static interpolationFactor(s,d,h,f){let v=0;if(s.name==="exponential")v=fD(d,s.base,h,f);else if(s.name==="linear")v=fD(d,1,h,f);else if(s.name==="cubic-bezier"){let b=s.controlPoints;v=new ga(b[0],b[1],b[2],b[3]).solve(fD(d,1,h,f))}return v}static parse(s,d){let[h,f,v,...b]=s;if(!Array.isArray(f)||f.length===0)return d.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 d.error("Exponential interpolation requires a numeric base.",1,1);f={name:"exponential",base:F}}else{if(f[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(f[0])}`,1,0);{let F=f.slice(1);if(F.length!==4||F.some(U=>typeof U!="number"||U<0||U>1))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);f={name:"cubic-bezier",controlPoints:F}}}if(s.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length-1>3&&(s.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(v=d.parse(v,2,ir),!v)return null;let I=[],k=null;h==="interpolate-hcl"||h==="interpolate-lab"?k=uu:d.expectedType&&d.expectedType.kind!=="value"&&(k=d.expectedType);for(let F=0;F=U)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',q);let X=d.parse(G,Z,k);if(!X)return null;k=k||X.type,I.push([U,X])}return k.kind==="number"||k.kind==="color"||k.kind==="array"&&k.itemType.kind==="number"&&typeof k.N=="number"?new If(k,h,f,v,I):d.error(`Type ${sd(k)} is not interpolatable.`)}evaluate(s){let d=this.labels,h=this.outputs;if(d.length===1)return h[0].evaluate(s);let f=this.input.evaluate(s);if(f<=d[0])return h[0].evaluate(s);let v=d.length;if(f>=d[v-1])return h[v-1].evaluate(s);let b=YC(d,f),I=If.interpolationFactor(this.interpolation,f,d[b],d[b+1]),k=h[b].evaluate(s),F=h[b+1].evaluate(s);return this.operator==="interpolate"?hd[this.type.kind.toLowerCase()](k,F,I):this.operator==="interpolate-hcl"?WC.reverse(WC.interpolate(WC.forward(k),WC.forward(F),I)):Xm.reverse(Xm.interpolate(Xm.forward(k),Xm.forward(F),I))}eachChild(s){s(this.input);for(let d of this.outputs)s(d)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}serialize(){let s;s=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier",...this.interpolation.controlPoints];let d=[this.operator,s,this.input.serialize()];for(let h=0;hw0(f,I.type));return new KI(b?Ga:h,v)}evaluate(s){let d,h=null,f=0;for(let v of this.args){if(f++,h=v.evaluate(s),h&&h instanceof Rp&&!h.available&&(d||(d=h),h=null,f===this.args.length))return d;if(h!==null)break}return h}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}serialize(){let s=["coalesce"];return this.eachChild(d=>{s.push(d.serialize())}),s}}class _g{constructor(s,d){this.type=d.type,this.bindings=[].concat(s),this.result=d}evaluate(s){return this.result.evaluate(s)}eachChild(s){for(let d of this.bindings)s(d[1]);s(this.result)}static parse(s,d){if(s.length<4)return d.error(`Expected at least 3 arguments, but found ${s.length-1} instead.`);let h=[];for(let v=1;v=h.length)throw new Rn("Array index out of bounds: index exceeds array size");if(d!==Math.floor(d))throw new Rn("Array index must be an integer. Use at-interpolated for fractional indices");return h[d]}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class nR{constructor(s,d,h){this.type=s,this.index=d,this.input=h}static parse(s,d){if(s.length!==3)return d.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=d.parse(s[1],1,ir),f=d.parse(s[2],2,Mp(d.expectedType||Ga));return h&&f?new nR(f.type.itemType,h,f):null}evaluate(s){let d=this.index.evaluate(s),h=this.input.evaluate(s);if(d<0)throw new Rn(`Array index out of bounds: ${d} < 0.`);if(d>h.length-1)throw new Rn(`Array index out of bounds: ${d} > ${h.length-1}.`);if(d===Math.floor(d))return h[d];let f=Math.floor(d),v=Math.ceil(d),b=h[f],I=h[v];if(typeof b!="number"||typeof I!="number")throw new Rn(`Cannot interpolate between non-number values at index ${d}.`);let k=d-f;return b*(1-k)+I*k}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class gD{constructor(s,d){this.type=Do,this.needle=s,this.haystack=d}static parse(s,d){if(s.length!==3)return d.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=d.parse(s[1],1,Ga),f=d.parse(s[2],2,Ga);return h&&f?YO(h.type,[Do,Ha,ir,kp,Ga])?new gD(h,f):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${sd(h.type)} instead`):null}evaluate(s){let d=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(h==null)return!1;if(!Q1(d,["boolean","string","number","null"]))throw new Rn(`Expected first argument to be of type boolean, string, number or null, but found ${sd(kd(d))} instead.`);if(!Q1(h,["string","array"]))throw new Rn(`Expected second argument to be of type array or string, but found ${sd(kd(h))} instead.`);return h.indexOf(d)>=0}eachChild(s){s(this.needle),s(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class WI{constructor(s,d,h){this.type=ir,this.needle=s,this.haystack=d,this.fromIndex=h}static parse(s,d){if(s.length<=2||s.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);let h=d.parse(s[1],1,Ga),f=d.parse(s[2],2,Ga);if(!h||!f)return null;if(!YO(h.type,[Do,Ha,ir,kp,Ga]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${sd(h.type)} instead`);if(s.length===4){let v=d.parse(s[3],3,ir);return v?new WI(h,f,v):null}return new WI(h,f)}evaluate(s){let d=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(!Q1(d,["boolean","string","number","null"]))throw new Rn(`Expected first argument to be of type boolean, string, number or null, but found ${sd(kd(d))} instead.`);if(!Q1(h,["string","array"]))throw new Rn(`Expected second argument to be of type array or string, but found ${sd(kd(h))} instead.`);if(this.fromIndex){let f=this.fromIndex.evaluate(s);return h.indexOf(d,f)}return h.indexOf(d)}eachChild(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){let s=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),s]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class uS{constructor(s,d,h,f,v,b){this.inputType=s,this.type=d,this.input=h,this.cases=f,this.outputs=v,this.otherwise=b}static parse(s,d){if(s.length<5)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length%2!=1)return d.error("Expected an even number of arguments.");let h,f;d.expectedType&&d.expectedType.kind!=="value"&&(f=d.expectedType);let v={},b=[];for(let F=2;FNumber.MAX_SAFE_INTEGER)return q.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof X=="number"&&Math.floor(X)!==X)return q.error("Numeric branch labels must be integer values.");if(h){if(q.checkSubtype(h,kd(X)))return null}else h=kd(X);if(v[String(X)]!==void 0)return q.error("Branch labels must be unique.");v[String(X)]=b.length}let Z=d.parse(G,F,f);if(!Z)return null;f=f||Z.type,b.push(Z)}let I=d.parse(s[1],1,Ga);if(!I)return null;let k=d.parse(s[s.length-1],s.length-1,f);return k?I.type.kind!=="value"&&d.concat(1).checkSubtype(h,I.type)?null:new uS(h,f,I,v,b,k):null}evaluate(s){let d=this.input.evaluate(s);return(Z1(kd(d),this.inputType)&&this.outputs[this.cases[d]]||this.otherwise).evaluate(s)}eachChild(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)}outputDefined(){return this.outputs.every(s=>s.outputDefined())&&this.otherwise.outputDefined()}serialize(){let s=["match",this.input.serialize()],d=Object.keys(this.cases).sort(),h=[],f={};for(let b of d){let I=f[this.cases[b]];I===void 0?(f[this.cases[b]]=h.length,h.push([this.cases[b],[b]])):h[I][1].push(b)}let v=b=>this.inputType.kind==="number"?Number(b):b;for(let[b,I]of h)s.push(I.length===1?v(I[0]):I.map(v)),s.push(this.outputs[b].serialize());return s.push(this.otherwise.serialize()),s}}class Hy{constructor(s,d,h){this.type=s,this.branches=d,this.otherwise=h}static parse(s,d){if(s.length<4)return d.error(`Expected at least 3 arguments, but found only ${s.length-1}.`);if(s.length%2!=0)return d.error("Expected an odd number of arguments.");let h;d.expectedType&&d.expectedType.kind!=="value"&&(h=d.expectedType);let f=[];for(let b=1;bd.outputDefined())&&this.otherwise.outputDefined()}serialize(){let s=["case"];return this.eachChild(d=>{s.push(d.serialize())}),s}}class QI{constructor(s,d,h,f){this.type=s,this.input=d,this.beginIndex=h,this.endIndex=f}static parse(s,d){if(s.length<=2||s.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);let h=d.parse(s[1],1,Ga),f=d.parse(s[2],2,ir);if(!h||!f)return null;if(!YO(h.type,[Mp(Ga),Ha,Ga]))return d.error(`Expected first argument to be of type array or string, but found ${sd(h.type)} instead`);if(s.length===4){let v=d.parse(s[3],3,ir);return v?new QI(h.type,h,f,v):null}return new QI(h.type,h,f)}evaluate(s){let d=this.input.evaluate(s),h=this.beginIndex.evaluate(s);if(!Q1(d,["string","array"]))throw new Rn(`Expected first argument to be of type array or string, but found ${sd(kd(d))} instead.`);if(this.endIndex){let f=this.endIndex.evaluate(s);return d.slice(h,f)}return d.slice(h)}eachChild(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){let s=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),s]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}class rR{constructor(s,d){this.type=Mp(Ha),this.str=s,this.delimiter=d}static parse(s,d){if(s.length!==3)return d.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=d.parse(s[1],1,Ha),f=d.parse(s[2],2,Ha);return h&&f?new rR(h,f):void 0}evaluate(s){let d=this.str.evaluate(s),h=this.delimiter.evaluate(s);return d.split(h)}eachChild(s){s(this.str),s(this.delimiter)}outputDefined(){return!1}serialize(){return["split",this.str.serialize(),this.delimiter.serialize()]}}function yg(u,s){return u==="=="||u==="!="?s.kind==="boolean"||s.kind==="string"||s.kind==="number"||s.kind==="null"||s.kind==="value":s.kind==="string"||s.kind==="number"||s.kind==="value"}function oR(u,s,d,h){return h.compare(s,d)===0}function QC(u,s,d){let h=u!=="=="&&u!=="!=";return class P$e{constructor(v,b,I){this.type=Do,this.lhs=v,this.rhs=b,this.collator=I,this.hasUntypedArgument=v.type.kind==="value"||b.type.kind==="value"}static parse(v,b){if(v.length!==3&&v.length!==4)return b.error("Expected two or three arguments.");let I=v[0],k=b.parse(v[1],1,Ga);if(!k)return null;if(!yg(I,k.type))return b.concat(1).error(`"${I}" comparisons are not supported for type '${sd(k.type)}'.`);let F=b.parse(v[2],2,Ga);if(!F)return null;if(!yg(I,F.type))return b.concat(2).error(`"${I}" comparisons are not supported for type '${sd(F.type)}'.`);if(k.type.kind!==F.type.kind&&k.type.kind!=="value"&&F.type.kind!=="value")return b.error(`Cannot compare types '${sd(k.type)}' and '${sd(F.type)}'.`);h&&(k.type.kind==="value"&&F.type.kind!=="value"?k=new Nr(F.type,[k]):k.type.kind!=="value"&&F.type.kind==="value"&&(F=new Nr(k.type,[F])));let U=null;if(v.length===4){if(k.type.kind!=="string"&&F.type.kind!=="string"&&k.type.kind!=="value"&&F.type.kind!=="value")return b.error("Cannot use collator to compare non-string types.");if(U=b.parse(v[3],3,W1),!U)return null}return new P$e(k,F,U)}evaluate(v){let b=this.lhs.evaluate(v),I=this.rhs.evaluate(v);if(h&&this.hasUntypedArgument){let k=kd(b),F=kd(I);if(k.kind!==F.kind||k.kind!=="string"&&k.kind!=="number")throw new Rn(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${k.kind}, ${F.kind}) instead.`)}if(this.collator&&!h&&this.hasUntypedArgument){let k=kd(b),F=kd(I);if(k.kind!=="string"||F.kind!=="string")return s(v,b,I)}return this.collator?d(v,b,I,this.collator.evaluate(v)):s(v,b,I)}eachChild(v){v(this.lhs),v(this.rhs),this.collator&&v(this.collator)}outputDefined(){return!0}serialize(){let v=[u];return this.eachChild(b=>{v.push(b.serialize())}),v}}}let SH=QC("==",function(u,s,d){return s===d},oR),wH=QC("!=",function(u,s,d){return s!==d},function(u,s,d,h){return!oR(0,s,d,h)}),IH=QC("<",function(u,s,d){return s",function(u,s,d){return s>d},function(u,s,d,h){return h.compare(s,d)>0}),c3=QC("<=",function(u,s,d){return s<=d},function(u,s,d,h){return h.compare(s,d)<=0}),TH=QC(">=",function(u,s,d){return s>=d},function(u,s,d,h){return h.compare(s,d)>=0});class aR{constructor(s,d,h,f,v,b){this.type=Ha,this.number=s,this.locale=d,this.currency=h,this.unit=f,this.minFractionDigits=v,this.maxFractionDigits=b}static parse(s,d){if(s.length!==3)return d.error("Expected two arguments.");let h=d.parse(s[1],1,ir);if(!h)return null;let f=s[2];if(typeof f!="object"||Array.isArray(f))return d.error("NumberFormat options argument must be an object.");let v=null;if(f.locale&&(v=d.parseObjectValue(f.locale,2,"locale",Ha),!v))return null;let b=null;if(f.currency&&(b=d.parseObjectValue(f.currency,2,"currency",Ha),!b))return null;let I=null;if(f.unit&&(I=d.parseObjectValue(f.unit,2,"unit",Ha),!I))return null;let k=null;if(f["min-fraction-digits"]&&(k=d.parseObjectValue(f["min-fraction-digits"],2,"min-fraction-digits",ir),!k))return null;let F=null;return f["max-fraction-digits"]&&(F=d.parseObjectValue(f["max-fraction-digits"],2,"max-fraction-digits",ir),!F)?null:new aR(h,v,b,I,k,F)}evaluate(s){return new Intl.NumberFormat(this.locale?this.locale.evaluate(s):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(s):void 0,unit:this.unit?this.unit.evaluate(s):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(s):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(s):void 0}).format(this.number.evaluate(s))}eachChild(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.unit&&s(this.unit),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)}outputDefined(){return!1}serialize(){let s={};return this.locale&&(s.locale=this.locale.serialize()),this.currency&&(s.currency=this.currency.serialize()),this.unit&&(s.unit=this.unit.serialize()),this.minFractionDigits&&(s["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(s["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),s]}}class XI{constructor(s){this.type=ir,this.input=s}static parse(s,d){if(s.length!==2)return d.error(`Expected 1 argument, but found ${s.length-1} instead.`);let h=d.parse(s[1],1);return h?h.type.kind!=="array"&&h.type.kind!=="string"&&h.type.kind!=="value"?d.error(`Expected argument of type string or array, but found ${sd(h.type)} instead.`):new XI(h):null}evaluate(s){let d=this.input.evaluate(s);if(typeof d=="string"||Array.isArray(d))return d.length;throw new Rn(`Expected value to be of type string or array, but found ${sd(kd(d))} instead.`)}eachChild(s){s(this.input)}outputDefined(){return!1}serialize(){let s=["length"];return this.eachChild(d=>{s.push(d.serialize())}),s}}function ZC(u){return function(){u=1831565813+(u|=0)|0;let s=Math.imul(u^u>>>15,1|u);return s=s+Math.imul(s^s>>>7,61|s)^s,((s^s>>>14)>>>0)/4294967296}}let Gy={"==":SH,"!=":wH,">":ZI,"<":IH,">=":TH,"<=":c3,array:Nr,at:iR,"at-interpolated":nR,boolean:Nr,case:Hy,coalesce:KI,collator:ju,format:GC,image:tS,in:gD,"index-of":WI,interpolate:If,"interpolate-hcl":If,"interpolate-lab":If,length:XI,let:_g,literal:po,match:uS,number:Nr,"number-format":aR,object:Nr,slice:QI,step:Uy,string:Nr,"to-boolean":Fc,"to-color":Fc,"to-number":Fc,"to-string":Fc,var:pD,within:jC,distance:__,config:dS,split:rR};function d3(u,[s,d,h,f]){s=s.evaluate(u),d=d.evaluate(u),h=h.evaluate(u);let v=f?f.evaluate(u):1,b=nD(s,d,h,v);if(b)throw new Rn(b);return new Xa(s/255,d/255,h/255,v)}function _D(u,[s,d,h,f]){s=s.evaluate(u),d=d.evaluate(u),h=h.evaluate(u);let v=f?f.evaluate(u):1,b=(function(F,U,G,q){return typeof F=="number"&&F>=0&&F<=360?typeof U=="number"&&U>=0&&U<=100&&typeof G=="number"&&G>=0&&G<=100?q===void 0||typeof q=="number"&&q>=0&&q<=1?null:`Invalid hsla value [${[F,U,G,q].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof q=="number"?[F,U,G,q]:[F,U,G]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof q=="number"?[F,U,G,q]:[F,U,G]).join(", ")}]: 'h' must be between 0 and 360.`})(s,d,h,v);if(b)throw new Rn(b);let I=`hsla(${s}, ${d}%, ${h}%, ${v})`,k=Xa.parse(I);if(!k)throw new Rn(`Failed to parse HSLA color: ${I}`);return k}function sR(u,s){return u in s}function vg(u,s){let d=s[u];return d===void 0?null:d}function jy(u){return{type:u}}function Tf(u){return{result:"success",value:u}}function Yu(u){return{result:"error",value:u}}function lR(u,s){return!!u&&!!u.parameters&&u.parameters.indexOf(s)>-1}function JI(u){return u["property-type"]==="data-driven"}function yD(u){return lR(u.expression,"measure-light")}function XC(u){return lR(u.expression,"zoom")}function v_(u){return!!u.expression&&u.expression.interpolated}function eT(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function cR(u){return u}function JC(u,s){let d=s.type==="color",h=u.stops&&typeof u.stops[0][0]=="object",f=h||!(h||u.property!==void 0),v=u.type||(v_(s)?"exponential":"interval");if(d&&((u=Object.assign({},u)).stops&&(u.stops=u.stops.map(F=>[F[0],Xa.parse(F[1])])),u.default=Xa.parse(u.default?u.default:s.default)),u.colorSpace&&u.colorSpace!=="rgb"&&!l3[u.colorSpace])throw new Error(`Unknown color space: ${u.colorSpace}`);let b,I,k;if(v==="exponential")b=vD;else if(v==="interval")b=cp;else if(v==="categorical"){b=u3,I=Object.create(null);for(let F of u.stops)I[F[0]]=F[1];k=typeof u.stops[0][0]}else{if(v!=="identity")throw new Error(`Unknown function type "${v}"`);b=p3}if(h){let F={},U=[];for(let Z=0;ZZ[0]),evaluate:({zoom:Z},X)=>vD({stops:G,base:u.base},s,Z).evaluate(Z,X)}}if(f){let F=v==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:F,interpolationFactor:If.interpolationFactor.bind(void 0,F),zoomStops:u.stops.map(U=>U[0]),evaluate:({zoom:U})=>b(u,s,U,I,k)}}return{kind:"source",evaluate(F,U){let G=U&&U.properties?U.properties[u.property]:void 0;return G===void 0?pS(u.default,s.default):b(u,s,G,I,k)}}}function pS(u,s,d){return u!==void 0?u:s!==void 0?s:d!==void 0?d:void 0}function u3(u,s,d,h,f){return pS(typeof d===f?h[d]:void 0,u.default,s.default)}function cp(u,s,d){if(!T0(d))return pS(u.default,s.default);let h=u.stops.length;if(h===1||d<=u.stops[0][0])return u.stops[0][1];if(d>=u.stops[h-1][0])return u.stops[h-1][1];let f=YC(u.stops.map(v=>v[0]),d);return u.stops[f][1]}function vD(u,s,d){let h=u.base!==void 0?u.base:1;if(!T0(d))return pS(u.default,s.default);let f=u.stops.length;if(f===1||d<=u.stops[0][0])return u.stops[0][1];if(d>=u.stops[f-1][0])return u.stops[f-1][1];let v=YC(u.stops.map(U=>U[0]),d),b=(function(U,G,q,Z){let X=Z-q,ue=U-q;return X===0?0:G===1?ue/X:(Math.pow(G,ue)-1)/(Math.pow(G,X)-1)})(d,h,u.stops[v][0],u.stops[v+1][0]),I=u.stops[v][1],k=u.stops[v+1][1],F=hd[s.type]||cR;if(u.colorSpace&&u.colorSpace!=="rgb"){let U=l3[u.colorSpace];F=(G,q)=>U.reverse(U.interpolate(U.forward(G),U.forward(q),b))}return typeof I.evaluate=="function"?{evaluate(...U){let G=I.evaluate.apply(void 0,U),q=k.evaluate.apply(void 0,U);if(G!==void 0&&q!==void 0)return F(G,q,b)}}:F(I,k,b)}function p3(u,s,d){return s.type==="color"?d=Xa.parse(d):s.type==="formatted"?d=Op.fromString(d.toString()):s.type==="resolvedImage"?d=Rp.build(d.toString()):jr(d)===s.type||s.type==="enum"&&s.values[d]||(d=void 0),pS(d,u.default,s.default)}Gu.register(Gy,{error:[{kind:"error"},[Ha],(u,[s])=>{throw new Rn(s.evaluate(u))}],typeof:[Ha,[Ga],(u,[s])=>sd(kd(s.evaluate(u)))],"to-rgba":[Mp(ir,4),[uu],(u,[s])=>s.evaluate(u).toNonPremultipliedRenderColor(null).toArray()],"to-hsla":[Mp(ir,4),[uu],(u,[s])=>s.evaluate(u).toNonPremultipliedRenderColor(null).toHslaArray()],rgb:[uu,[ir,ir,ir],d3],rgba:[uu,[ir,ir,ir,ir],d3],hsl:[uu,[ir,ir,ir],_D],hsla:[uu,[ir,ir,ir,ir],_D],has:{type:Do,overloads:[[[Ha],(u,[s])=>sR(s.evaluate(u),u.properties())],[[Ha,By],(u,[s,d])=>sR(s.evaluate(u),d.evaluate(u))]]},get:{type:Ga,overloads:[[[Ha],(u,[s])=>vg(s.evaluate(u),u.properties())],[[Ha,By],(u,[s,d])=>vg(s.evaluate(u),d.evaluate(u))]]},"feature-state":[Ga,[Ha],(u,[s])=>vg(s.evaluate(u),u.featureState||{})],properties:[By,[],u=>u.properties()],"geometry-type":[Ha,[],u=>u.geometryType()],worldview:[Ha,[],u=>u.globals.worldview||""],id:[Ga,[],u=>u.id()],zoom:[ir,[],u=>u.globals.zoom],pitch:[ir,[],u=>u.globals.pitch||0],"distance-from-center":[ir,[],u=>u.distanceFromCenter()],"measure-light":[ir,[Ha],(u,[s])=>u.measureLight(s.evaluate(u))],"heatmap-density":[ir,[],u=>u.globals.heatmapDensity||0],"line-progress":[ir,[],u=>u.globals.lineProgress||0],"raster-value":[ir,[],u=>u.globals.rasterValue||0],"raster-particle-speed":[ir,[],u=>u.globals.rasterParticleSpeed||0],"sky-radial-progress":[ir,[],u=>u.globals.skyRadialProgress||0],accumulated:[Ga,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ir,jy(ir),(u,s)=>{let d=0;for(let h of s)d+=h.evaluate(u);return d}],"*":[ir,jy(ir),(u,s)=>{let d=1;for(let h of s)d*=h.evaluate(u);return d}],"-":{type:ir,overloads:[[[ir,ir],(u,[s,d])=>s.evaluate(u)-d.evaluate(u)],[[ir],(u,[s])=>-s.evaluate(u)]]},"/":[ir,[ir,ir],(u,[s,d])=>s.evaluate(u)/d.evaluate(u)],"%":[ir,[ir,ir],(u,[s,d])=>s.evaluate(u)%d.evaluate(u)],ln2:[ir,[],()=>Math.LN2],pi:[ir,[],()=>Math.PI],e:[ir,[],()=>Math.E],"^":[ir,[ir,ir],(u,[s,d])=>Math.pow(s.evaluate(u),d.evaluate(u))],sqrt:[ir,[ir],(u,[s])=>Math.sqrt(s.evaluate(u))],log10:[ir,[ir],(u,[s])=>Math.log(s.evaluate(u))/Math.LN10],ln:[ir,[ir],(u,[s])=>Math.log(s.evaluate(u))],log2:[ir,[ir],(u,[s])=>Math.log2(s.evaluate(u))],sin:[ir,[ir],(u,[s])=>Math.sin(s.evaluate(u))],cos:[ir,[ir],(u,[s])=>Math.cos(s.evaluate(u))],tan:[ir,[ir],(u,[s])=>Math.tan(s.evaluate(u))],asin:[ir,[ir],(u,[s])=>Math.asin(s.evaluate(u))],acos:[ir,[ir],(u,[s])=>Math.acos(s.evaluate(u))],atan:[ir,[ir],(u,[s])=>Math.atan(s.evaluate(u))],min:[ir,jy(ir),(u,s)=>Math.min(...s.map(d=>d.evaluate(u)))],max:[ir,jy(ir),(u,s)=>Math.max(...s.map(d=>d.evaluate(u)))],abs:[ir,[ir],(u,[s])=>Math.abs(s.evaluate(u))],round:[ir,[ir],(u,[s])=>{let d=s.evaluate(u);return d<0?-Math.round(-d):Math.round(d)}],floor:[ir,[ir],(u,[s])=>Math.floor(s.evaluate(u))],ceil:[ir,[ir],(u,[s])=>Math.ceil(s.evaluate(u))],"filter-==":[Do,[Ha,Ga],(u,[s,d])=>u.properties()[s.value]===d.value],"filter-id-==":[Do,[Ga],(u,[s])=>u.id()===s.value],"filter-type-==":[Do,[Ha],(u,[s])=>u.geometryType()===s.value],"filter-<":[Do,[Ha,Ga],(u,[s,d])=>{let h=u.properties()[s.value],f=d.value;return typeof h==typeof f&&h{let d=u.id(),h=s.value;return typeof d==typeof h&&d":[Do,[Ha,Ga],(u,[s,d])=>{let h=u.properties()[s.value],f=d.value;return typeof h==typeof f&&h>f}],"filter-id->":[Do,[Ga],(u,[s])=>{let d=u.id(),h=s.value;return typeof d==typeof h&&d>h}],"filter-<=":[Do,[Ha,Ga],(u,[s,d])=>{let h=u.properties()[s.value],f=d.value;return typeof h==typeof f&&h<=f}],"filter-id-<=":[Do,[Ga],(u,[s])=>{let d=u.id(),h=s.value;return typeof d==typeof h&&d<=h}],"filter->=":[Do,[Ha,Ga],(u,[s,d])=>{let h=u.properties()[s.value],f=d.value;return typeof h==typeof f&&h>=f}],"filter-id->=":[Do,[Ga],(u,[s])=>{let d=u.id(),h=s.value;return typeof d==typeof h&&d>=h}],"filter-has":[Do,[Ga],(u,[s])=>s.value in u.properties()],"filter-has-id":[Do,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[Do,[Mp(Ha)],(u,[s])=>s.value.indexOf(u.geometryType())>=0],"filter-id-in":[Do,[Mp(Ga)],(u,[s])=>s.value.indexOf(u.id())>=0],"filter-in-small":[Do,[Ha,Mp(Ga)],(u,[s,d])=>d.value.indexOf(u.properties()[s.value])>=0],"filter-in-large":[Do,[Ha,Mp(Ga)],(u,[s,d])=>(function(h,f,v,b){for(;v<=b;){let I=v+b>>1;if(f[I]===h)return!0;f[I]>h?b=I-1:v=I+1}return!1})(u.properties()[s.value],d.value,0,d.value.length-1)],all:{type:Do,overloads:[[[Do,Do],(u,[s,d])=>s.evaluate(u)&&d.evaluate(u)],[jy(Do),(u,s)=>{for(let d of s)if(!d.evaluate(u))return!1;return!0}]]},any:{type:Do,overloads:[[[Do,Do],(u,[s,d])=>s.evaluate(u)||d.evaluate(u)],[jy(Do),(u,s)=>{for(let d of s)if(d.evaluate(u))return!0;return!1}]]},"!":[Do,[Do],(u,[s])=>!s.evaluate(u)],"is-supported-script":[Do,[Ha],(u,[s])=>{let d=u.globals&&u.globals.isSupportedScript;return!d||d(s.evaluate(u))}],upcase:[Ha,[Ha],(u,[s])=>s.evaluate(u).toUpperCase()],downcase:[Ha,[Ha],(u,[s])=>s.evaluate(u).toLowerCase()],concat:[Ha,jy(Ga),(u,s)=>s.map(d=>jc(d.evaluate(u))).join("")],"resolved-locale":[Ha,[W1],(u,[s])=>s.evaluate(u).resolvedLocale()],random:[ir,[ir,ir,Ga],(u,s)=>{let[d,h,f]=s.map(b=>b.evaluate(u));if(d>h||d===h)return d;let v;if(typeof f=="string")v=(function(b){let I=0;if(b.length===0)return I;for(let k=0;kJSON.stringify(G)).join(", ")}, but found ${JSON.stringify(U)} instead.`);return U}catch(U){return this._warningHistory[U.message]||(this._warningHistory[U.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${U.message}`)),this._defaultValue}}}function tT(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Gy}function Af(u,s,d,h,f){let v=new mD(Gy,[],s?(function(I){let k={color:uu,string:Ha,number:ir,enum:Ha,boolean:Do,formatted:cb,resolvedImage:zI};return I.type==="array"?Mp(k[I.value]||Ga,I.length):k[I.type]})(s):void 0,void 0,void 0,d,h,f),b=v.parse(u,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return b?Tf(new Ef(b,s,d,h,f)):Yu(v.errors)}class b_{constructor(s,d,h,f){this.kind=s,this._styleExpression=d,this.isLightConstant=h,this.isLineProgressConstant=f,this.isStateDependent=s!=="constant"&&!zy(d.expression),this.configDependencies=mb(d.expression)}evaluateWithoutErrorHandling(s,d,h,f,v,b){return this._styleExpression.evaluateWithoutErrorHandling(s,d,h,f,v,b)}evaluate(s,d,h,f,v,b,I){return this._styleExpression.evaluate(s,d,h,f,v,b,void 0,void 0,I)}}class $y{constructor(s,d,h,f,v,b){this.kind=s,this.zoomStops=h,this._styleExpression=d,this.isStateDependent=s!=="camera"&&!zy(d.expression),this.isLightConstant=v,this.isLineProgressConstant=b,this.configDependencies=mb(d.expression),this.interpolationType=f}evaluateWithoutErrorHandling(s,d,h,f,v,b){return this._styleExpression.evaluateWithoutErrorHandling(s,d,h,f,v,b)}evaluate(s,d,h,f,v,b){return this._styleExpression.evaluate(s,d,h,f,v,b)}interpolationFactor(s,d,h){return this.interpolationType?If.interpolationFactor(this.interpolationType,s,d,h):0}}function Pp(u,s,d,h,f){if((u=Af(u,s,d,h,f)).result==="error")return u;let v=u.value.expression,b=pb(v);if(!b&&!JI(s))return Yu([new u_("","data expressions not supported")]);let I=k0(v,["zoom","pitch","distance-from-center"]);if(!I&&!XC(s))return Yu([new u_("","zoom expressions not supported")]);let k=k0(v,["measure-light"]);if(!k&&!yD(s))return Yu([new u_("","measure-light expression not supported")]);let F=k0(v,["line-progress"]);if(!F&&!(function(q){return lR(q.expression,"line-progress")})(s))return Yu([new u_("","line-progress expression not supported")]);let U=s.expression&&s.expression.relaxZoomRestriction,G=bD(v);return G||I||U?G instanceof u_?Yu([G]):G instanceof If&&!v_(s)?Yu([new u_("",'"interpolate" expressions cannot be used with this property')]):Tf(G?new $y(b&&F?"camera":"composite",u.value,G.labels,G instanceof If?G.interpolation:void 0,k,F):new b_(b&&F?"constant":"source",u.value,k,F)):Yu([new u_("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class mS{constructor(s,d){this._parameters=s,this._specification=d,Object.assign(this,JC(this._parameters,this._specification))}static deserialize(s){return new mS(s._parameters,s._specification)}static serialize(s){return{_parameters:s._parameters,_specification:s._specification}}}function bD(u){let s=null;if(u instanceof _g)s=bD(u.result);else if(u instanceof KI){for(let d of u.args)if(s=bD(d),s)break}else(u instanceof Uy||u instanceof If)&&u.input instanceof Gu&&u.input.name==="zoom"&&(s=u);return s instanceof u_||u.eachChild(d=>{let h=bD(d);h instanceof u_?s=h:s&&h&&s!==h&&(s=new u_("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),s}var iT,CD,xD=(function(){if(CD)return iT;CD=1,iT=s;var u=3;function s(d,h,f){var v=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;var b=new Int32Array(this.arrayBuffer);d=b[0],this.d=(h=b[1])+2*(f=b[2]);for(var I=0;I=q[ue+0]&&v>=q[ue+1])?(k[X]=!0,I.push(G[X])):k[X]=!1}}},s.prototype._forEachCell=function(d,h,f,v,b,I,k,F){for(var U=this._convertToCellCoord(d),G=this._convertToCellCoord(h),q=this._convertToCellCoord(f),Z=this._convertToCellCoord(v),X=U;X<=q;X++)for(var ue=G;ue<=Z;ue++){var he=this.d*ue+X;if((!F||F(this._convertFromCellCoord(X),this._convertFromCellCoord(ue),this._convertFromCellCoord(X+1),this._convertFromCellCoord(ue+1)))&&b.call(this,d,h,f,v,he,I,k,F))return}},s.prototype._convertFromCellCoord=function(d){return(d-this.padding)/this.scale},s.prototype._convertToCellCoord=function(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))},s.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var d=this.cells,h=u+this.cells.length+1+1,f=0,v=0;v=0||(f[v]=bg(u[v],s)));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 gb(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||dR(u)||qy(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(gb);if(typeof u=="object"){let s=u.$name||"Object";if(s==="Map"){let f=u.entries||[],v=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 nT(u){for(let s of u)if(wD(s.charCodeAt(0)))return!0;return!1}function uR(u){for(let s of u)if(!SD(s.charCodeAt(0)))return!1;return!0}function SD(u){return!(Mr.Arabic(u)||Mr["Arabic Supplement"](u)||Mr["Arabic Extended-A"](u)||Mr["Arabic Presentation Forms-A"](u)||Mr["Arabic Presentation Forms-B"](u))}function wD(u){return!(u!==746&&u!==747&&(u<4352||!(Mr["Bopomofo Extended"](u)||Mr.Bopomofo(u)||Mr["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||Mr["CJK Compatibility Ideographs"](u)||Mr["CJK Compatibility"](u)||Mr["CJK Radicals Supplement"](u)||Mr["CJK Strokes"](u)||!(!Mr["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||Mr["CJK Unified Ideographs Extension A"](u)||Mr["CJK Unified Ideographs"](u)||Mr["Enclosed CJK Letters and Months"](u)||Mr["Hangul Compatibility Jamo"](u)||Mr["Hangul Jamo Extended-A"](u)||Mr["Hangul Jamo Extended-B"](u)||Mr["Hangul Jamo"](u)||Mr["Hangul Syllables"](u)||Mr.Hiragana(u)||Mr["Ideographic Description Characters"](u)||Mr.Kanbun(u)||Mr["Kangxi Radicals"](u)||Mr["Katakana Phonetic Extensions"](u)||Mr.Katakana(u)&&u!==12540||!(!Mr["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)||!(!Mr["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||Mr["Unified Canadian Aboriginal Syllabics"](u)||Mr["Unified Canadian Aboriginal Syllabics Extended"](u)||Mr["Vertical Forms"](u)||Mr["Yijing Hexagram Symbols"](u)||Mr["Yi Syllables"](u)||Mr["Yi Radicals"](u))))}function ID(u){return!(wD(u)||(function(s){return!!(Mr["Latin-1 Supplement"](s)&&(s===167||s===169||s===174||s===177||s===188||s===189||s===190||s===215||s===247)||Mr["General Punctuation"](s)&&(s===8214||s===8224||s===8225||s===8240||s===8241||s===8251||s===8252||s===8258||s===8263||s===8264||s===8265||s===8273)||Mr["Letterlike Symbols"](s)||Mr["Number Forms"](s)||Mr["Miscellaneous Technical"](s)&&(s>=8960&&s<=8967||s>=8972&&s<=8991||s>=8996&&s<=9e3||s===9003||s>=9085&&s<=9114||s>=9150&&s<=9165||s===9167||s>=9169&&s<=9179||s>=9186&&s<=9215)||Mr["Control Pictures"](s)&&s!==9251||Mr["Optical Character Recognition"](s)||Mr["Enclosed Alphanumerics"](s)||Mr["Geometric Shapes"](s)||Mr["Miscellaneous Symbols"](s)&&!(s>=9754&&s<=9759)||Mr["Miscellaneous Symbols and Arrows"](s)&&(s>=11026&&s<=11055||s>=11088&&s<=11097||s>=11192&&s<=11243)||Mr["CJK Symbols and Punctuation"](s)||Mr.Katakana(s)||Mr["Private Use Area"](s)||Mr["CJK Compatibility Forms"](s)||Mr["Small Form Variants"](s)||Mr["Halfwidth and Fullwidth Forms"](s)||s===8734||s===8756||s===8757||s>=9984&&s<=10087||s>=10102&&s<=10131||s===65532||s===65533)})(u))}function m3(u){return Mr.Arabic(u)||Mr["Arabic Supplement"](u)||Mr["Arabic Extended-A"](u)||Mr["Arabic Presentation Forms-A"](u)||Mr["Arabic Presentation Forms-B"](u)}function TD(u){return u>=1424&&u<=2303||Mr["Arabic Presentation Forms-A"](u)||Mr["Arabic Presentation Forms-B"](u)}function EH(u,s){return!(!s&&TD(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||Mr.Khmer(u))}function pR(u){for(let s of u)if(TD(s.charCodeAt(0)))return!0;return!1}let Jm={unavailable:"unavailable",deferred:"deferred",loading:"loading",parsing:"parsing",parsed:"parsed",loaded:"loaded",error:"error"},ED=null,Np=Jm.unavailable,C_=null,h3=function(u){u&&typeof u=="string"&&u.indexOf("NetworkError")>-1&&(Np=Jm.error),ED&&ED(u)};function AD(){DD.fire(new d_("pluginStateChange",{pluginStatus:Np,pluginURL:C_}))}let DD=new lb,kD=function(){return Np},_b=function(){if(Np!==Jm.deferred||!C_)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Np=Jm.loading,AD(),C_&&q1({url:C_},u=>{u?h3(u):(Np=Jm.loaded,AD())})},R0={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Np===Jm.loaded||R0.applyArabicShaping!=null,isLoading:()=>Np===Jm.loading,setState(u){Np=u.pluginStatus,C_=u.pluginURL},isParsing:()=>Np===Jm.parsing,isParsed:()=>Np===Jm.parsed,getPluginURL:()=>C_};class Fs{constructor(s,d){this.zoom=s,d?(this.now=d.now,this.fadeDuration=d.fadeDuration,this.transition=d.transition,this.pitch=d.pitch,this.brightness=d.brightness,this.worldview=d.worldview):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(s){return(function(d,h){for(let f of d)if(!EH(f.charCodeAt(0),h))return!1;return!0})(s,R0.isLoaded())}}class yb{constructor(s,d,h,f,v){this.property=s,this.value=d,this.expression=(function(b,I,k,F,U){if(eT(b))return new mS(b,I);if(tT(b)||Array.isArray(b)&&b.length>0){let G=Pp(b,I,k,F,U);if(G.result==="error")throw new Error(G.value.map(q=>`${q.key}: ${q.message}`).join(", "));return G.value}{let G=b;return typeof b=="string"&&I.type==="color"&&(G=Xa.parse(b)),{kind:"constant",configDependencies:new Set,evaluate:()=>G}}})(d===void 0?s.specification.default:d,s.specification,h,f,v)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(s,d,h,f){return this.property.possiblyEvaluate(this,s,d,h,f)}}class rT{constructor(s,d,h,f){this.property=s,this.value=new yb(s,void 0,d,h,f)}transitioned(s,d){return new x_(this.property,this.value,d,Object.assign({},s.transition,this.transition),s.now)}untransitioned(){return new x_(this.property,this.value,null,{},0)}}class f3{constructor(s,d,h,f){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues),this._scope=d,this._options=h,this._iconImageUseTheme=f,this.configDependencies=new Set}getValue(s){return Yr(this._values[s].value.value)}setValue(s,d){this._values.hasOwnProperty(s)||(this._values[s]=new rT(this._values[s].property,this._scope,this._options,this._iconImageUseTheme)),this._values[s].value=new yb(this._values[s].property,d===null?void 0:Yr(d),this._scope,this._options,this._iconImageUseTheme),this._values[s].value.expression.configDependencies&&(this.configDependencies=new Set([...this.configDependencies,...this._values[s].value.expression.configDependencies]))}setTransitionOrValue(s,d){d&&(this._options=d);let h=this._properties.properties;if(s)for(let f in s){let v=s[f];if(f.endsWith("-transition")){let b=f.slice(0,-11);h[b]&&this.setTransition(b,v)}else h.hasOwnProperty(f)&&this.setValue(f,v)}}getTransition(s){return Yr(this._values[s].transition)}setTransition(s,d){this._values.hasOwnProperty(s)||(this._values[s]=new rT(this._values[s].property)),this._values[s].transition=Yr(d)||void 0}serialize(){let s={};for(let d of Object.keys(this._values)){let h=this.getValue(d);h!==void 0&&(s[d]=h);let f=this.getTransition(d);f!==void 0&&(s[`${d}-transition`]=f)}return s}transitioned(s,d){let h=new Es(this._properties);for(let f of Object.keys(this._values))h._values[f]=this._values[f].transitioned(s,d._values[f]);return h}untransitioned(){let s=new Es(this._properties);for(let d of Object.keys(this._values))s._values[d]=this._values[d].untransitioned();return s}}class x_{constructor(s,d,h,f,v){let b=f.delay||0,I=f.duration||0;v=v||0,this.property=s,this.value=d,this.begin=v+b,this.end=this.begin+I,s.specification.transition&&(f.delay||f.duration)&&(this.prior=h)}possiblyEvaluate(s,d,h){let f=s.now||0,v=this.value.possiblyEvaluate(s,d,h),b=this.prior;if(b){if(f>this.end)return this.prior=null,v;if(this.value.isDataDriven())return this.prior=null,v;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 nx(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function Yy(u){if(Array.isArray(u))return u.map(Yy);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){let s={};for(let d in u)s[d]=Yy(u[d]);return s}return nx(u)}function oT(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 s of u.slice(1))if(!oT(s)&&typeof s!="boolean")return!1;return!0;default:return!0}}function fS(u,s="",d=null,h="fill"){if(u==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};oT(u)||(u=gS(u));let f=u,v=!0;try{v=(function(U){if(!vb(U))return U;let G=Yy(U);return dp(G),G=Ph(G),G})(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,I=null;if(h!=="background"&&h!=="sky"&&h!=="slot"){I=zt[`filter_${h}`];let U=Af(v,I,s,d);if(U.result==="error")throw new Error(U.value.map(G=>`${G.key}: ${G.message}`).join(", "));b=(G,q,Z)=>U.value.evaluate(G,q,{},Z)}let k=null,F=null;if(v!==f){let U=Af(f,I,s,d);if(U.result==="error")throw new Error(U.value.map(G=>`${G.key}: ${G.message}`).join(", "));k=(G,q,Z,X,ue)=>U.value.evaluate(G,q,{},Z,void 0,void 0,X,ue),F=!pb(U.value.expression)}return{filter:b,dynamicFilter:k||void 0,needGeometry:hR(v),needFeature:!!F}}function Ph(u){if(!Array.isArray(u))return u;let s=(function(d){if(mR.has(d[0])){for(let h=1;hPh(d))}function dp(u){let s=!1,d=[];if(u[0]==="case"){for(let h=1;h",">=","<","<=","to-boolean"]);function MD(u,s){return us?1:0}function hR(u){if(!Array.isArray(u))return!1;if(u[0]==="within"||u[0]==="distance")return!0;for(let s=1;s"||s==="<="||s===">="?OD(u[1],u[2],s):s==="any"?(d=u.slice(1),["any"].concat(d.map(gS))):s==="all"?["all"].concat(u.slice(1).map(gS)):s==="none"?["all"].concat(u.slice(1).map(gS).map(w_)):s==="in"?RD(u[1],u.slice(2)):s==="!in"?w_(RD(u[1],u.slice(2))):s==="has"?PD(u[1]):s!=="!has"||w_(PD(u[1]));var d}function OD(u,s,d){switch(u){case"$type":return[`filter-type-${d}`,s];case"$id":return[`filter-id-${d}`,s];default:return[`filter-${d}`,u,s]}}function RD(u,s){if(s.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(d=>typeof d!=typeof s[0])?["filter-in-large",u,["literal",s.sort(MD)]]:["filter-in-small",u,["literal",s]]}}function PD(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function w_(u){return["!",u]}let aT="";function Df(u,s){return s?`${u}${aT}${s}`:u}let ND,fR=()=>ND||(ND=new bs({"icon-size":new An(zt.layout_symbol["icon-size"]),"icon-image":new An(zt.layout_symbol["icon-image"]),"icon-rotate":new An(zt.layout_symbol["icon-rotate"]),"icon-offset":new An(zt.layout_symbol["icon-offset"])}));class gR{constructor(s,d,h,f,v,b){let I=Af(s,zt.appearance.condition);if(I.result==="success"&&(this.condition=I.value),this.name=d,h){this.properties=new S_(fR()),this.unevaluatedLayout=new tx(fR(),f,v,b);for(let k in h)this.unevaluatedLayout.setValue(k,h[k])}}isActive(s){return!(this.condition||!s.isHidden||this.name!=="hidden")||this.condition.evaluate(s.globals,s.feature,s.featureState,s.canonical)}getCondition(){return this.condition}getName(){return this.name}getProperty(s){return this.properties.get(s)}getUnevaluatedProperties(){return this.unevaluatedLayout}serialize(){let s={};return s.condition=this.condition.expression.serialize(),this.name&&(s.name=this.name),this.properties&&(s.properties=this.properties),s}}let g3="-transition",_3=new Set(["fill","line","background","hillshade","raster"]);class Fp extends lb{constructor(s,d,h,f,v,b){if(super(),this.id=s.id,this.fqid=Df(this.id,h),this.type=s.type,this.scope=h,this.lut=f,this.options=v,this.iconImageUseTheme=b,this.appearances=new Array,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,this.configDependencies=new Set,s.type!=="custom"){if(this.metadata=s.metadata,this.minzoom=s.minzoom,this.maxzoom=s.maxzoom,s.type&&s.type!=="background"&&s.type!=="sky"&&s.type!=="slot"){this.source=s.source,this.sourceLayer=s["source-layer"],this.filter=s.filter;let I=Af(this.filter,zt[`filter_${s.type}`]);I.result!=="error"&&(this.configDependencies=new Set([...this.configDependencies,...I.value.configDependencies]))}if(s.slot&&(this.slot=s.slot),s.appearances&&s.appearances.forEach(I=>{this.appearances.push(new gR(I.condition,I.name,I.properties,this.scope,v,this.iconImageUseTheme))}),d.layout&&(this._unevaluatedLayout=new tx(d.layout,this.scope,v,this.iconImageUseTheme),this.configDependencies=new Set([...this.configDependencies,...this._unevaluatedLayout.configDependencies])),d.paint){this._transitionablePaint=new f3(d.paint,this.scope,v);for(let I in s.paint)this.setPaintProperty(I,s.paint[I]);for(let I in s.layout)this.setLayoutProperty(I,s.layout[I]);this.configDependencies=new Set([...this.configDependencies,...this._transitionablePaint.configDependencies]),this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new S_(d.paint)}}}onAdd(s){}onRemove(s){}isDraped(s){return!this.is3D(!0)&&_3.has(this.type)}getLayoutProperty(s){return s==="visibility"?this.visibility:this._unevaluatedLayout.getValue(s)}setLayoutProperty(s,d){if(this.type==="custom"&&s==="visibility")return void(this.visibility=d);let h=this._unevaluatedLayout;h._properties.properties[s]&&(h.setValue(s,d),this.configDependencies=new Set([...this.configDependencies,...h.configDependencies]),s==="visibility"&&this.possiblyEvaluateVisibility())}possiblyEvaluateVisibility(){this._unevaluatedLayout._values.visibility&&(this.visibility=this._unevaluatedLayout._values.visibility.possiblyEvaluate({zoom:0}))}getPaintProperty(s){return s.endsWith(g3)?this._transitionablePaint.getTransition(s.slice(0,-11)):this._transitionablePaint.getValue(s)}setPaintProperty(s,d){let h=this._transitionablePaint,f=h._properties.properties;if(s.endsWith(g3)){let G=s.slice(0,-11);return f[G]&&h.setTransition(G,d||void 0),!1}if(!f[s])return!1;let v=h._values[s],b=v.value.isDataDriven(),I=v.value;h.setValue(s,d),this.configDependencies=new Set([...this.configDependencies,...h.configDependencies]),this._handleSpecialPaintPropertyUpdate(s);let k=h._values[s].value,F=k.isDataDriven(),U=s.endsWith("pattern")||s==="line-dasharray";return F||b||U||this._handleOverridablePaintPropertyUpdate(s,I,k)}_handleSpecialPaintPropertyUpdate(s){}getProgramIds(){return null}getDefaultProgramParams(s,d,h){return null}_handleOverridablePaintPropertyUpdate(s,d,h){return!1}isHidden(s){return!!(this.minzoom&&s=this.maxzoom)||this.visibility==="none"}updateTransitions(s){this._transitioningPaint=this._transitionablePaint.transitioned(s,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(s,d){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(s,void 0,d,this.iconImageUseTheme)),this.paint=this._transitioningPaint.possiblyEvaluate(s,void 0,d)}serialize(){let s={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&&(s.appearances=this.appearances.map(d=>d.serialize())),jo(s,(d,h)=>!(d===void 0||h==="layout"&&!Object.keys(d).length||h==="paint"&&!Object.keys(d).length))}is3D(s){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 s in this.paint._values){let d=this.paint.get(s);if(d instanceof ix&&JI(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}compileFilter(s){this._filterCompiled||(this._featureFilter=fS(this.filter,this.scope,s),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}getLayerRenderingStats(){return this._stats}resetLayerRenderingStats(s){this._stats&&(s.renderPass==="shadow"?this._stats.numRenderedVerticesInShadowPass=0:this._stats.numRenderedVerticesInTransparentPass=0)}getAppearances(){return this.appearances}queryRadius(s){}queryIntersectsFeature(s,d,h,f,v,b,I,k,F){}}let Ky={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class rx{constructor(s,d){this._structArray=s,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class pl{constructor(){this.capacity=-1,this.resize(0)}static serialize(s,d){return s._trim(),d&&d.add(s.arrayBuffer),{length:s.length,arrayBuffer:s.arrayBuffer}}static deserialize(s){let d=Object.create(this.prototype);return d.arrayBuffer=s.arrayBuffer,d.length=s.length,d.capacity=s.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d}_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(s){this.reserve(s),this.length=s}reserve(s){if(s>this.capacity){this.capacity=Math.max(s,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}}_refreshViews(){throw new Error("StructArray#_refreshViews() must be implemented by each concrete StructArray layout")}emplace(...s){throw new Error("StructArray#emplace() must be implemented by each concrete StructArray layout")}emplaceBack(...s){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 ia(u,s=1){let d=0,h=0;return{members:u.map(f=>{let v=Ky[f.type].BYTES_PER_ELEMENT,b=d=_R(d,Math.max(s,v)),I=f.components||1;return h=Math.max(h,v),d+=v*I,{name:f.name,type:f.type,components:I,offset:b}}),size:_R(d,Math.max(h,s)),alignment:s}}function _R(u,s){return Math.ceil(u/s)*s}class pu extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d){let h=this.length;return this.resize(h+1),this.emplace(h,s,d)}emplace(s,d,h){let f=2*s;return this.int16[f+0]=d,this.int16[f+1]=h,s}}pu.prototype.bytesPerElement=4,Ln(pu,"StructArrayLayout2i4");class dm extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h){let f=this.length;return this.resize(f+1),this.emplace(f,s,d,h)}emplace(s,d,h,f){let v=3*s;return this.int16[v+0]=d,this.int16[v+1]=h,this.int16[v+2]=f,s}}dm.prototype.bytesPerElement=6,Ln(dm,"StructArrayLayout3i6");class ox extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h,f){let v=this.length;return this.resize(v+1),this.emplace(v,s,d,h,f)}emplace(s,d,h,f,v){let b=4*s;return this.int16[b+0]=d,this.int16[b+1]=h,this.int16[b+2]=f,this.int16[b+3]=v,s}}ox.prototype.bytesPerElement=8,Ln(ox,"StructArrayLayout4i8");class bb extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s){let d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.float32[1*s+0]=d,s}}bb.prototype.bytesPerElement=4,Ln(bb,"StructArrayLayout1f4");class _S extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h){let f=this.length;return this.resize(f+1),this.emplace(f,s,d,h)}emplace(s,d,h,f){let v=4*s,b=2*s;return this.int16[v+0]=d,this.int16[v+1]=h,this.float32[b+1]=f,s}}_S.prototype.bytesPerElement=8,Ln(_S,"StructArrayLayout2i1f8");class Wy extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h){let f=this.length;return this.resize(f+1),this.emplace(f,s,d,h)}emplace(s,d,h,f){let v=4*s;return this.int16[v+0]=d,this.int16[v+1]=h,this.int16[v+2]=f,s}}Wy.prototype.bytesPerElement=8,Ln(Wy,"StructArrayLayout3i8");class FD extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v){let b=this.length;return this.resize(b+1),this.emplace(b,s,d,h,f,v)}emplace(s,d,h,f,v,b){let I=5*s;return this.int16[I+0]=d,this.int16[I+1]=h,this.int16[I+2]=f,this.int16[I+3]=v,this.int16[I+4]=b,s}}FD.prototype.bytesPerElement=10,Ln(FD,"StructArrayLayout5i10");class sT extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I){let k=this.length;return this.resize(k+1),this.emplace(k,s,d,h,f,v,b,I)}emplace(s,d,h,f,v,b,I,k){let F=6*s,U=12*s,G=3*s;return this.int16[F+0]=d,this.int16[F+1]=h,this.uint8[U+4]=f,this.uint8[U+5]=v,this.uint8[U+6]=b,this.uint8[U+7]=I,this.float32[G+2]=k,s}}sT.prototype.bytesPerElement=12,Ln(sT,"StructArrayLayout2i4ub1f12");class eh extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h){let f=this.length;return this.resize(f+1),this.emplace(f,s,d,h)}emplace(s,d,h,f){let v=3*s;return this.float32[v+0]=d,this.float32[v+1]=h,this.float32[v+2]=f,s}}eh.prototype.bytesPerElement=12,Ln(eh,"StructArrayLayout3f12");class Qy extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v){let b=this.length;return this.resize(b+1),this.emplace(b,s,d,h,f,v)}emplace(s,d,h,f,v,b){let I=6*s,k=3*s;return this.uint16[I+0]=d,this.uint16[I+1]=h,this.uint16[I+2]=f,this.uint16[I+3]=v,this.float32[k+2]=b,s}}Qy.prototype.bytesPerElement=12,Ln(Qy,"StructArrayLayout4ui1f12");class I_ extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,h,f){let v=this.length;return this.resize(v+1),this.emplace(v,s,d,h,f)}emplace(s,d,h,f,v){let b=4*s;return this.uint16[b+0]=d,this.uint16[b+1]=h,this.uint16[b+2]=f,this.uint16[b+3]=v,s}}I_.prototype.bytesPerElement=8,Ln(I_,"StructArrayLayout4ui8");class Cb extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b){let I=this.length;return this.resize(I+1),this.emplace(I,s,d,h,f,v,b)}emplace(s,d,h,f,v,b,I){let k=6*s;return this.int16[k+0]=d,this.int16[k+1]=h,this.int16[k+2]=f,this.int16[k+3]=v,this.int16[k+4]=b,this.int16[k+5]=I,s}}Cb.prototype.bytesPerElement=12,Ln(Cb,"StructArrayLayout6i12");class yR extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I,k,F,U,G,q){let Z=this.length;return this.resize(Z+1),this.emplace(Z,s,d,h,f,v,b,I,k,F,U,G,q)}emplace(s,d,h,f,v,b,I,k,F,U,G,q,Z){let X=12*s;return this.int16[X+0]=d,this.int16[X+1]=h,this.int16[X+2]=f,this.int16[X+3]=v,this.uint16[X+4]=b,this.uint16[X+5]=I,this.uint16[X+6]=k,this.uint16[X+7]=F,this.int16[X+8]=U,this.int16[X+9]=G,this.int16[X+10]=q,this.int16[X+11]=Z,s}}yR.prototype.bytesPerElement=24,Ln(yR,"StructArrayLayout4i4ui4i24");class LD extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b){let I=this.length;return this.resize(I+1),this.emplace(I,s,d,h,f,v,b)}emplace(s,d,h,f,v,b,I){let k=10*s,F=5*s;return this.int16[k+0]=d,this.int16[k+1]=h,this.int16[k+2]=f,this.float32[F+2]=v,this.float32[F+3]=b,this.float32[F+4]=I,s}}LD.prototype.bytesPerElement=20,Ln(LD,"StructArrayLayout3i3f20");class Cg extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f){let v=this.length;return this.resize(v+1),this.emplace(v,s,d,h,f)}emplace(s,d,h,f,v){let b=4*s;return this.float32[b+0]=d,this.float32[b+1]=h,this.float32[b+2]=f,this.float32[b+3]=v,s}}Cg.prototype.bytesPerElement=16,Ln(Cg,"StructArrayLayout4f16");class Zy extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(s){let d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.uint32[1*s+0]=d,s}}Zy.prototype.bytesPerElement=4,Ln(Zy,"StructArrayLayout1ul4");class ld extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d){let h=this.length;return this.resize(h+1),this.emplace(h,s,d)}emplace(s,d,h){let f=2*s;return this.uint16[f+0]=d,this.uint16[f+1]=h,s}}ld.prototype.bytesPerElement=4,Ln(ld,"StructArrayLayout2ui4");class Xy extends pl{_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(s,d,h,f,v,b,I,k,F,U,G,q,Z){let X=this.length;return this.resize(X+1),this.emplace(X,s,d,h,f,v,b,I,k,F,U,G,q,Z)}emplace(s,d,h,f,v,b,I,k,F,U,G,q,Z,X){let ue=20*s,he=10*s;return this.int16[ue+0]=d,this.int16[ue+1]=h,this.int16[ue+2]=f,this.int16[ue+3]=v,this.int16[ue+4]=b,this.float32[he+3]=I,this.float32[he+4]=k,this.float32[he+5]=F,this.float32[he+6]=U,this.int16[ue+14]=G,this.uint32[he+8]=q,this.uint16[ue+18]=Z,this.uint16[ue+19]=X,s}}Xy.prototype.bytesPerElement=40,Ln(Xy,"StructArrayLayout5i4f1i1ul2ui40");class yS extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I){let k=this.length;return this.resize(k+1),this.emplace(k,s,d,h,f,v,b,I)}emplace(s,d,h,f,v,b,I,k){let F=8*s;return this.int16[F+0]=d,this.int16[F+1]=h,this.int16[F+2]=f,this.int16[F+4]=v,this.int16[F+5]=b,this.int16[F+6]=I,this.int16[F+7]=k,s}}yS.prototype.bytesPerElement=16,Ln(yS,"StructArrayLayout3i2i2i16");class vS extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v){let b=this.length;return this.resize(b+1),this.emplace(b,s,d,h,f,v)}emplace(s,d,h,f,v,b){let I=4*s,k=8*s;return this.float32[I+0]=d,this.float32[I+1]=h,this.float32[I+2]=f,this.int16[k+6]=v,this.int16[k+7]=b,s}}vS.prototype.bytesPerElement=16,Ln(vS,"StructArrayLayout2f1f2i16");class vR extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b){let I=this.length;return this.resize(I+1),this.emplace(I,s,d,h,f,v,b)}emplace(s,d,h,f,v,b,I){let k=20*s,F=5*s;return this.uint8[k+0]=d,this.uint8[k+1]=h,this.float32[F+1]=f,this.float32[F+2]=v,this.float32[F+3]=b,this.float32[F+4]=I,s}}vR.prototype.bytesPerElement=20,Ln(vR,"StructArrayLayout2ub4f20");class fd extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,h){let f=this.length;return this.resize(f+1),this.emplace(f,s,d,h)}emplace(s,d,h,f){let v=3*s;return this.uint16[v+0]=d,this.uint16[v+1]=h,this.uint16[v+2]=f,s}}fd.prototype.bytesPerElement=6,Ln(fd,"StructArrayLayout3ui6");class xb extends pl{_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(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt){let ut=this.length;return this.resize(ut+1),this.emplace(ut,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt)}emplace(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt,ut){let It=30*s,Ot=15*s,Lt=60*s;return this.int16[It+0]=d,this.int16[It+1]=h,this.int16[It+2]=f,this.float32[Ot+2]=v,this.float32[Ot+3]=b,this.uint16[It+8]=I,this.uint16[It+9]=k,this.uint32[Ot+5]=F,this.uint32[Ot+6]=U,this.uint32[Ot+7]=G,this.uint16[It+16]=q,this.uint16[It+17]=Z,this.uint16[It+18]=X,this.float32[Ot+10]=ue,this.float32[Ot+11]=he,this.uint8[Lt+48]=_e,this.uint8[Lt+49]=Fe,this.uint8[Lt+50]=Le,this.uint32[Ot+13]=Ve,this.int16[It+28]=dt,this.uint8[Lt+58]=ut,s}}xb.prototype.bytesPerElement=60,Ln(xb,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class BD extends pl{_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(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji,Vi,Wi,rn,Ei){let Qi=this.length;return this.resize(Qi+1),this.emplace(Qi,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji,Vi,Wi,rn,Ei)}emplace(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le,Ve,dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji,Vi,Wi,rn,Ei,Qi){let si=20*s,ei=40*s,an=80*s;return this.float32[si+0]=d,this.float32[si+1]=h,this.int16[ei+4]=f,this.int16[ei+5]=v,this.int16[ei+6]=b,this.int16[ei+7]=I,this.int16[ei+8]=k,this.int16[ei+9]=F,this.int16[ei+10]=U,this.int16[ei+11]=G,this.int16[ei+12]=q,this.uint16[ei+13]=Z,this.uint16[ei+14]=X,this.uint16[ei+15]=ue,this.uint16[ei+16]=he,this.uint16[ei+17]=_e,this.uint16[ei+18]=Fe,this.uint16[ei+19]=Le,this.uint16[ei+20]=Ve,this.uint16[ei+21]=dt,this.uint16[ei+22]=ut,this.uint16[ei+23]=It,this.uint16[ei+24]=Ot,this.uint16[ei+25]=Lt,this.uint16[ei+26]=ki,this.uint16[ei+27]=Ht,this.uint32[si+14]=Fi,this.float32[si+15]=Ji,this.float32[si+16]=Vi,this.float32[si+17]=Wi,this.float32[si+18]=rn,this.uint8[an+76]=Ei,this.uint16[ei+39]=Qi,s}}BD.prototype.bytesPerElement=80,Ln(BD,"StructArrayLayout2f9i15ui1ul4f1ub1ui80");class ax extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b){let I=this.length;return this.resize(I+1),this.emplace(I,s,d,h,f,v,b)}emplace(s,d,h,f,v,b,I){let k=6*s;return this.float32[k+0]=d,this.float32[k+1]=h,this.float32[k+2]=f,this.float32[k+3]=v,this.float32[k+4]=b,this.float32[k+5]=I,s}}ax.prototype.bytesPerElement=24,Ln(ax,"StructArrayLayout6f24");class sx extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v){let b=this.length;return this.resize(b+1),this.emplace(b,s,d,h,f,v)}emplace(s,d,h,f,v,b){let I=5*s;return this.float32[I+0]=d,this.float32[I+1]=h,this.float32[I+2]=f,this.float32[I+3]=v,this.float32[I+4]=b,s}}sx.prototype.bytesPerElement=20,Ln(sx,"StructArrayLayout5f20");class VD extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I){let k=this.length;return this.resize(k+1),this.emplace(k,s,d,h,f,v,b,I)}emplace(s,d,h,f,v,b,I,k){let F=7*s;return this.float32[F+0]=d,this.float32[F+1]=h,this.float32[F+2]=f,this.float32[F+3]=v,this.float32[F+4]=b,this.float32[F+5]=I,this.float32[F+6]=k,s}}VD.prototype.bytesPerElement=28,Ln(VD,"StructArrayLayout7f28");class xg extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I,k,F,U,G){let q=this.length;return this.resize(q+1),this.emplace(q,s,d,h,f,v,b,I,k,F,U,G)}emplace(s,d,h,f,v,b,I,k,F,U,G,q){let Z=11*s;return this.float32[Z+0]=d,this.float32[Z+1]=h,this.float32[Z+2]=f,this.float32[Z+3]=v,this.float32[Z+4]=b,this.float32[Z+5]=I,this.float32[Z+6]=k,this.float32[Z+7]=F,this.float32[Z+8]=U,this.float32[Z+9]=G,this.float32[Z+10]=q,s}}xg.prototype.bytesPerElement=44,Ln(xg,"StructArrayLayout11f44");class bS extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I,k,F){let U=this.length;return this.resize(U+1),this.emplace(U,s,d,h,f,v,b,I,k,F)}emplace(s,d,h,f,v,b,I,k,F,U){let G=9*s;return this.float32[G+0]=d,this.float32[G+1]=h,this.float32[G+2]=f,this.float32[G+3]=v,this.float32[G+4]=b,this.float32[G+5]=I,this.float32[G+6]=k,this.float32[G+7]=F,this.float32[G+8]=U,s}}bS.prototype.bytesPerElement=36,Ln(bS,"StructArrayLayout9f36");class lx extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d){let h=this.length;return this.resize(h+1),this.emplace(h,s,d)}emplace(s,d,h){let f=2*s;return this.float32[f+0]=d,this.float32[f+1]=h,s}}lx.prototype.bytesPerElement=8,Ln(lx,"StructArrayLayout2f8");class zD extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,h,f){let v=this.length;return this.resize(v+1),this.emplace(v,s,d,h,f)}emplace(s,d,h,f,v){let b=6*s;return this.uint32[3*s+0]=d,this.uint16[b+2]=h,this.uint16[b+3]=f,this.uint16[b+4]=v,s}}zD.prototype.bytesPerElement=12,Ln(zD,"StructArrayLayout1ul3ui12");class lT extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s){let d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.uint16[1*s+0]=d,s}}lT.prototype.bytesPerElement=2,Ln(lT,"StructArrayLayout1ui2");class bR extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he){let _e=this.length;return this.resize(_e+1),this.emplace(_e,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he)}emplace(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e){let Fe=16*s;return this.float32[Fe+0]=d,this.float32[Fe+1]=h,this.float32[Fe+2]=f,this.float32[Fe+3]=v,this.float32[Fe+4]=b,this.float32[Fe+5]=I,this.float32[Fe+6]=k,this.float32[Fe+7]=F,this.float32[Fe+8]=U,this.float32[Fe+9]=G,this.float32[Fe+10]=q,this.float32[Fe+11]=Z,this.float32[Fe+12]=X,this.float32[Fe+13]=ue,this.float32[Fe+14]=he,this.float32[Fe+15]=_e,s}}bR.prototype.bytesPerElement=64,Ln(bR,"StructArrayLayout16f64");class CS extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,h,f,v,b,I){let k=this.length;return this.resize(k+1),this.emplace(k,s,d,h,f,v,b,I)}emplace(s,d,h,f,v,b,I,k){let F=10*s,U=5*s;return this.uint16[F+0]=d,this.uint16[F+1]=h,this.uint16[F+2]=f,this.uint16[F+3]=v,this.float32[U+2]=b,this.float32[U+3]=I,this.float32[U+4]=k,s}}CS.prototype.bytesPerElement=20,Ln(CS,"StructArrayLayout4ui3f20");class Nh extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s){let d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.int16[1*s+0]=d,s}}Nh.prototype.bytesPerElement=2,Ln(Nh,"StructArrayLayout1i2");class xS extends pl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer)}emplaceBack(s){let d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.uint8[1*s+0]=d,s}}xS.prototype.bytesPerElement=1,Ln(xS,"StructArrayLayout1ub1");class UD extends rx{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]}}UD.prototype.size=40;class cT extends Xy{get(s){return new UD(this,s)}}Ln(cT,"CollisionBoxArray");class dT extends rx{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(s){this._structArray.uint8[this._pos1+49]=s}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(s){this._structArray.uint8[this._pos1+50]=s}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(s){this._structArray.uint32[this._pos4+13]=s}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(s){this._structArray.uint8[this._pos1+58]=s}}dT.prototype.size=60;class Jy extends xb{get(s){return new dT(this,s)}}Ln(Jy,"PlacedSymbolArray");class Ca extends rx{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(s){this._structArray.uint32[this._pos4+14]=s}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(s){this._structArray.float32[this._pos4+18]=s}get hasIconTextFit(){return this._structArray.uint8[this._pos1+76]}get elevationFeatureIndex(){return this._structArray.uint16[this._pos2+39]}}Ca.prototype.size=80;class uT extends BD{get(s){return new Ca(this,s)}}Ln(uT,"SymbolInstanceArray");class HD extends bb{getoffsetX(s){return this.float32[1*s+0]}}Ln(HD,"GlyphOffsetArray");class Sb extends pu{getx(s){return this.int16[2*s+0]}gety(s){return this.int16[2*s+1]}}Ln(Sb,"SymbolLineVertexArray");class CR extends rx{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]}}CR.prototype.size=12;class GD extends zD{get(s){return new CR(this,s)}}Ln(GD,"FeatureIndexArray");class xR extends ld{geta_centroid_pos0(s){return this.uint16[2*s+0]}geta_centroid_pos1(s){return this.uint16[2*s+1]}}Ln(xR,"FillExtrusionCentroidArray");class Lp extends rx{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]}}Lp.prototype.size=6;class y3 extends dm{get(s){return new Lp(this,s)}}Ln(y3,"FillExtrusionWallArray");let AH=ia([{name:"a_pos",components:2,type:"Int16"}],4),v3=ia([{name:"a_circle_z_offset",components:1,type:"Float32"}],4),DH=ia([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Ml{constructor(s=[]){this.segments=s}_prepareSegment(s,d,h,f){let v=this.segments[this.segments.length-1];return s>Ml.MAX_VERTEX_ARRAY_LENGTH&&Ko(`Max vertices per segment is ${Ml.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${s}`),(!v||v.vertexLength+s>Ml.MAX_VERTEX_ARRAY_LENGTH||v.sortKey!==f)&&(v={vertexOffset:d,primitiveOffset:h,vertexLength:0,primitiveLength:0},f!==void 0&&(v.sortKey=f),this.segments.push(v)),v}prepareSegment(s,d,h,f){return this._prepareSegment(s,d.length,h.length,f)}get(){return this.segments}destroy(){for(let s of this.segments)for(let d in s.vaos)s.vaos[d].destroy()}static simpleSegment(s,d,h,f){return new Ml([{vertexOffset:s,primitiveOffset:d,vertexLength:h,primitiveLength:f,vaos:{},sortKey:0}])}}function pT(u,s){return 256*(u=pt(Math.floor(u),0,255))+pt(Math.floor(s),0,255)}Ml.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ln(Ml,"SegmentVector");let kH=ia([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),MH=ia([{name:"a_pattern_b",components:4,type:"Uint16"}]),Sg=ia([{name:"a_dash",components:4,type:"Uint16"}]);class Ku{constructor(){this.ids=[],this.uniqueIds=[],this.positions=[],this.indexed=!1}add(s,d,h,f){this.ids.push(mT(s)),this.positions.push(d,h,f)}eachPosition(s,d){let h=mT(s),f=0,v=this.ids.length-1;for(;f>1;this.ids[b]>=h?v=b:f=b+1}for(;this.ids[f]===h;)d(this.positions[3*f],this.positions[3*f+1],this.positions[3*f+2]),f++}static serialize(s,d){let h=new Float64Array(s.ids),f=new Uint32Array(s.positions);return SR(h,f,0,h.length-1),d&&(d.add(h.buffer),d.add(f.buffer)),{ids:h,positions:f}}static deserialize(s){let d=new Ku,h;d.ids=s.ids,d.positions=s.positions;for(let f of d.ids)f!==h&&d.uniqueIds.push(f),h=f;return d.indexed=!0,d}}function mT(u){let s=+u;return Number.isSafeInteger(s)?s:FI(String(u))}function SR(u,s,d,h){for(;d>1],v=d-1,b=h+1;for(;;){do v++;while(u[v]f);if(v>=b)break;cx(u,v,b),cx(s,3*v,3*b),cx(s,3*v+1,3*b+1),cx(s,3*v+2,3*b+2)}b-d`u_${v}`),this.type=h,this.context=f}setUniform(s,d,h,f,v){let b=f.constantOr(this.value);d.set(s,v,b instanceof Xa?b.toPremultipliedRenderColor(this.lutExpression&&this.lutExpression.kind==="constant"&&this.lutExpression.value==="none"?null:this.context.lut):b)}getBinding(s,d){return this.type==="color"?new b3(s):new Ql(s)}}class E_{constructor(s,d){this.uniformNames=d.map(h=>`u_${h}`),this.pattern=null,this.patternTransition=null,this.pixelRatio=1}setConstantPatternPositions(s,d){this.pixelRatio=s.pixelRatio||1,this.pattern=s.tl.concat(s.br),this.patternTransition=d?d.tl.concat(d.br):this.pattern}setUniform(s,d,h,f,v){let b=null;v!=="u_pattern"&&v!=="u_dash"||(b=this.pattern),v==="u_pattern_b"&&(b=this.patternTransition),v==="u_pixel_ratio"&&(b=this.pixelRatio),b&&d.set(s,v,b)}getBinding(s,d){return d==="u_pattern"||d==="u_pattern_b"||d==="u_dash"?new fT(s):new Ql(s)}}class N0{constructor(s,d,h,f){this.expression=s,this.type=h,this.maxValue=0,this.paintVertexAttributes=d.map(v=>({name:`a_${v}`,type:"Float32",components:h==="color"?2:1,offset:0})),this.paintVertexArray=new f}populatePaintArray(s,d,h,f,v,b,I,k){let F=this.paintVertexArray.length,U=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate(new Fs(0,{brightness:b,worldview:k}),d,{},v,f,I):this.expression.kind==="constant"&&this.expression.value,G=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new Fs(0,{brightness:b,worldview:k}),d,{},v,f,I):this.lutExpression.value)==="none";this.paintVertexArray.resize(s),this._setPaintValue(F,s,U,G?null:this.context.lut)}updatePaintArray(s,d,h,f,v,b,I,k){let F=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate({zoom:0,brightness:I,worldview:k},h,f,void 0,v):this.expression.kind==="constant"&&this.expression.value,U=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new Fs(0,{brightness:I,worldview:k}),h,f,void 0,v):this.lutExpression.value)==="none";this._setPaintValue(s,d,F,U?null:this.context.lut)}_setPaintValue(s,d,h,f){if(this.type==="color"){let v=dx(h.toPremultipliedRenderColor(f));for(let b=s;b`u_${I}_t`),this.type=h,this.useIntegerZoom=f,this.context=v,this.maxValue=0,this.paintVertexAttributes=d.map(I=>({name:`a_${I}`,type:"Float32",components:h==="color"?4:2,offset:0})),this.paintVertexArray=new b}populatePaintArray(s,d,h,f,v,b,I,k){let F=this.expression.evaluate(new Fs(this.context.zoom,{brightness:b,worldview:k}),d,{},v,f,I),U=this.expression.evaluate(new Fs(this.context.zoom+1,{brightness:b,worldview:k}),d,{},v,f,I),G=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new Fs(0,{brightness:b,worldview:k}),d,{},v,f,I):this.lutExpression.value)==="none",q=this.paintVertexArray.length;this.paintVertexArray.resize(s),this._setPaintValue(q,s,F,U,G?null:this.context.lut)}updatePaintArray(s,d,h,f,v,b,I,k){let F=this.expression.evaluate({zoom:this.context.zoom,brightness:I,worldview:k},h,f,void 0,v),U=this.expression.evaluate({zoom:this.context.zoom+1,brightness:I,worldview:k},h,f,void 0,v),G=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new Fs(0,{brightness:I,worldview:k}),h,f,void 0,v):this.lutExpression.value)==="none";this._setPaintValue(s,d,F,U,G?null:this.context.lut)}_setPaintValue(s,d,h,f,v){if(this.type==="color"){let b=dx(h.toPremultipliedRenderColor(v)),I=dx(h.toPremultipliedRenderColor(v));for(let k=s;k!0){this.binders={},this._buffers=[],this.context=d;let f=[];for(let v in s.paint._values){let b=s.paint.get(v);if(v.endsWith("-use-theme")||!h(v)||!(b instanceof ix&&JI(b.property.specification)))continue;let I=wS(v,s.type),k=b.value,F=b.property.specification.type,U=!!b.property.useIntegerZoom,G=v==="line-dasharray"||v.endsWith("pattern"),q=s.paint.get(`${v}-use-theme`),Z=v==="line-dasharray"&&s.layout.get("line-cap").value.kind!=="constant"||q&&q.value.kind!=="constant";if(k.kind!=="constant"||Z)if(k.kind==="source"||Z||G){let X=p(v,F,"source");this.binders[v]=G?new L0(k,I,F,X,s.id):new N0(k,I,F,X),f.push(`/a_${v}`)}else{let X=p(v,F,"composite");this.binders[v]=new F0(k,I,F,U,d,X),f.push(`/z_${v}`)}else this.binders[v]=G?new E_(k.value,I):new Fh(k.value,I,F,d),f.push(`/u_${v}`);q&&(this.binders[v].lutExpression=q.value)}this.cacheKey=f.sort().join("")}getMaxValue(s){let d=this.binders[s];return d instanceof N0||d instanceof F0?d.maxValue:0}populatePaintArrays(s,d,h,f,v,b,I,k){for(let F in this.binders){let U=this.binders[F];U.context=this.context,(U instanceof N0||U instanceof F0||U instanceof L0)&&U.populatePaintArray(s,d,h,f,v,b,I,k)}}setConstantPatternPositions(s,d){for(let h in this.binders){let f=this.binders[h];f instanceof E_&&f.setConstantPatternPositions(s,d)}}getPatternTransitionVertexBuffer(s){let d=this.binders[s];return d instanceof L0?d.paintTransitionVertexBuffer:null}updatePaintArrays(s,d,h,f,v,b,I,k,F,U){let G=!1,q=Object.keys(s),Z=q.length!==0&&!k,X=Z?q:d.uniqueIds;this.context.lut=v.lut;for(let ue in this.binders){let he=this.binders[ue];if(he.context=this.context,(he instanceof N0||he instanceof F0||he instanceof L0)&&he.expression&&he.expression.kind&&he.expression.kind!=="constant"&&(he.expression.isStateDependent===!0||he.expression.isLightConstant===!1)){let _e=v.paint.get(ue);he.expression=_e.value;for(let Fe of X){let Le=s[Fe.toString()];d.eachPosition(Fe,(Ve,dt,ut)=>{let It=f.feature(Ve);he.updatePaintArray(dt,ut,It,Le,b,I,F,U)})}if(!Z)for(let Fe of h.uniqueIds){let Le=s[Fe.toString()];h.eachPosition(Fe,(Ve,dt,ut)=>{let It=f.feature(Ve);he.updatePaintArray(dt,ut,It,Le,b,I,F,U)})}G=!0}}return G}defines(){let s=[];for(let d in this.binders){let h=this.binders[d];(h instanceof Fh||h instanceof E_)&&s.push(...h.uniformNames.map(f=>`#define HAS_UNIFORM_${f}`))}return s}getPaintVertexBuffers(){return this._buffers}getUniforms(s){let d=[];for(let h in this.binders){let f=this.binders[h];if(f instanceof Fh||f instanceof E_||f instanceof F0)for(let v of f.uniformNames)d.push({name:v,property:h,binding:f.getBinding(s,v)})}return d}setUniforms(s,d,h,f,v){for(let{name:b,property:I,binding:k}of h)this.binders[I].setUniform(s,k,v,f.get(I),b)}updatePaintBuffers(){this._buffers=[];for(let s in this.binders){let d=this.binders[s];(d instanceof N0||d instanceof F0||d instanceof L0)&&d.paintVertexBuffer&&this._buffers.push(d.paintVertexBuffer),d instanceof L0&&d.paintTransitionVertexBuffer&&this._buffers.push(d.paintTransitionVertexBuffer)}}upload(s){for(let d in this.binders){let h=this.binders[d];(h instanceof N0||h instanceof F0||h instanceof L0)&&h.upload(s)}this.updatePaintBuffers()}destroy(){for(let s in this.binders){let d=this.binders[s];(d instanceof N0||d instanceof F0||d instanceof L0)&&d.destroy()}}}class wg{constructor(s,d,h=()=>!0){this.programConfigurations={};for(let f of s)this.programConfigurations[f.id]=new B0(f,d,h);this.needsUpload=!1,this._featureMap=new Ku,this._featureMapWithoutIds=new Ku,this._bufferOffset=0,this._idlessCounter=0}populatePaintArrays(s,d,h,f,v,b,I,k,F){for(let U in this.programConfigurations)this.programConfigurations[U].populatePaintArrays(s,d,f,v,b,I,k,F);d.id!==void 0?this._featureMap.add(d.id,h,this._bufferOffset,s):(this._featureMapWithoutIds.add(this._idlessCounter,h,this._bufferOffset,s),this._idlessCounter+=1),this._bufferOffset=s,this.needsUpload=!0}updatePaintArrays(s,d,h,f,v,b,I,k){for(let F of h)this.needsUpload=this.programConfigurations[F.id].updatePaintArrays(s,this._featureMap,this._featureMapWithoutIds,d,F,f,v,b,I||0,k)||this.needsUpload}get(s){return this.programConfigurations[s]}upload(s){if(this.needsUpload){for(let d in this.programConfigurations)this.programConfigurations[d].upload(s);this.needsUpload=!1}}destroy(){for(let s in this.programConfigurations)this.programConfigurations[s].destroy()}}let A_={"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 wS(u,s){return A_[u]||[u.replace(`${s}-`,"").replace(/-/g,"_")]}let y={"line-pattern":{source:Qy,composite:Qy},"fill-pattern":{source:Qy,composite:Qy},"fill-extrusion-pattern":{source:Qy,composite:Qy},"line-dasharray":{source:I_,composite:I_}},l={color:{source:lx,composite:Cg},number:{source:bb,composite:lx}};function p(u,s,d){let h=y[u];return h&&h[d]||l[s][d]}Ln(Fh,"ConstantBinder"),Ln(E_,"PatternConstantBinder"),Ln(N0,"SourceExpressionBinder"),Ln(L0,"PatternCompositeBinder"),Ln(F0,"CompositeExpressionBinder"),Ln(B0,"ProgramConfiguration",{omit:["_buffers"]}),Ln(wg,"ProgramConfigurationSet");let _=pn/Math.PI/2,x=5,S=6,A=16383,N=64,V=[N,32,16],$=-_,Y=_;function J(u,s,d,h=_){return d=At(d),[u*Math.sin(d)*h,-s*h,u*Math.cos(d)*h]}function W(u,s,d){return J(Math.cos(At(u)),Math.sin(At(u)),s,d)}let oe=63710088e-1,ce=2*Math.PI*oe;class de{constructor(s,d){if(isNaN(s)||isNaN(d))throw new Error(`Invalid LngLat object: (${s}, ${d})`);if(this.lng=+s,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new de(Ft(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(s){let d=Math.PI/180,h=this.lat*d,f=s.lat*d,v=Math.sin(h)*Math.sin(f)+Math.cos(h)*Math.cos(f)*Math.cos((s.lng-this.lng)*d);return oe*Math.acos(Math.min(v,1))}toBounds(s=0){let d=360*s/40075017,h=d/Math.cos(Math.PI/180*this.lat);return new Ee({lng:this.lng-h,lat:this.lat-d},{lng:this.lng+h,lat:this.lat+d})}toEcef(s){return W(this.lat,this.lng,_+s*_/oe)}static convert(s){if(s instanceof de)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new de(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new de(Number("lng"in s?s.lng:s.lon),Number(s.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 Ee{constructor(s,d){s&&(d?this.setSouthWest(s).setNorthEast(d):Array.isArray(s)&&s.length===4?this.setSouthWest([s[0],s[1]]).setNorthEast([s[2],s[3]]):this.setSouthWest(s[0]).setNorthEast(s[1]))}setNorthEast(s){return this._ne=s instanceof de?new de(s.lng,s.lat):de.convert(s),this}setSouthWest(s){return this._sw=s instanceof de?new de(s.lng,s.lat):de.convert(s),this}extend(s){let d=this._sw,h=this._ne,f,v;if(s instanceof de)f=s,v=s;else{if(!(s instanceof Ee))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(Ee.convert(s)):this.extend(de.convert(s)):typeof s=="object"&&s!==null&&s.hasOwnProperty("lat")&&(s.hasOwnProperty("lon")||s.hasOwnProperty("lng"))?this.extend(de.convert(s)):this;if(f=s._sw,v=s._ne,!f||!v)return this}return d||h?(d.lng=Math.min(f.lng,d.lng),d.lat=Math.min(f.lat,d.lat),h.lng=Math.max(v.lng,h.lng),h.lat=Math.max(v.lat,h.lat)):(this._sw=new de(f.lng,f.lat),this._ne=new de(v.lng,v.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(s){let{lng:d,lat:h}=de.convert(s),f=this._sw.lng<=d&&d<=this._ne.lng;return this._sw.lng>this._ne.lng&&(f=this._sw.lng>=d&&d>=this._ne.lng),this._sw.lat<=h&&h<=this._ne.lat&&f}static convert(s){if(s)return s instanceof Ee?s:new Ee(s)}}let ge=0,Oe=25.5;function Be(u){return ce*Math.cos(u*Math.PI/180)}function He(u){return(180+u)/360}function nt(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function et(u,s){return u/Be(s)}function at(u){return 360*u-180}function tt(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}function Xe(u,s){return u*Be(tt(s))}let it=85.051129;function Wt(u){return Math.cos(At(pt(u,-it,it)))}function Nt(u,s){let d=pt(s,ge,Oe),h=Math.pow(2,d);return Wt(u)*ce/(512*h)}function mi(u){return 1/Math.cos(u*Math.PI/180)}function jt(u,s=0){let d=Math.exp(Math.PI*(1-(u.y+s/pn)/(1<=k?(cn(u,s,d,F,U,v,G,I,k),cn(u,F,U,h,f,G,b,I,k)):u.push(b)}function qt(u,s,d){let h=u[0],f=h.x,v=h.y;s(h);let b=[h];for(let I=1;Iu.x+1||hu.y+1)&&Ko("Geometry exceeds allowed extent, reduce your vector tile buffer size"),u}function Mn(u,s,d){let h=u.loadGeometry(),f=u.extent,v=pn/f;if(s&&d&&d.projection.isReprojectedInTileSpace){let b=1<{let Z=at((s.x+q.x/f)/b),X=tt((s.y+q.y/f)/b),ue=U.project(Z,X);q.x=(ue.x*I-k)*f,q.y=(ue.y*I-F)*f};for(let q=0;q=f||X.y<0||X.y>=f||(G(X),Z.push(X));h[q]=Z}}for(let b of h)for(let I of b)sn(I,v);return h}function en(u,s){return{type:u.type,id:u.id,properties:u.properties,geometry:s?Mn(u):[]}}class Zi{constructor(s,d,h,f,v){this.properties={},this.extent=h,this.type=0,this.id=void 0,this._pbf=s,this._geometry=-1,this._keys=f,this._values=v,s.readFields(or,this,d)}loadGeometry(){let s=this._pbf;s.pos=this._geometry;let d=s.readVarint()+s.pos,h=[],f,v=1,b=0,I=0,k=0;for(;s.pos>3}if(b--,v===1||v===2)I+=s.readSVarint(),k+=s.readSVarint(),v===1&&(f&&h.push(f),f=[]),f&&f.push(new yi(I,k));else{if(v!==7)throw new Error(`unknown command ${v}`);f&&f.push(f[0].clone())}}return f&&h.push(f),h}bbox(){let s=this._pbf;s.pos=this._geometry;let d=s.readVarint()+s.pos,h=1,f=0,v=0,b=0,I=1/0,k=-1/0,F=1/0,U=-1/0;for(;s.pos>3}if(f--,h===1||h===2)v+=s.readSVarint(),b+=s.readSVarint(),vk&&(k=v),bU&&(U=b);else if(h!==7)throw new Error(`unknown command ${h}`)}return[I,F,k,U]}toGeoJSON(s,d,h){let f=this.extent*Math.pow(2,h),v=this.extent*s,b=this.extent*d,I=this.loadGeometry();function k(q){return[360*(q.x+v)/f-180,360/Math.PI*Math.atan(Math.exp((1-2*(q.y+b)/f)*Math.PI))-90]}function F(q){return q.map(k)}let U;if(this.type===1){let q=[];for(let X of I)q.push(X[0]);let Z=F(q);U=q.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z}}else if(this.type===2){let q=I.map(F);U=q.length===1?{type:"LineString",coordinates:q[0]}:{type:"MultiLineString",coordinates:q}}else{if(this.type!==3)throw new Error("unknown feature type");{let q=(function(X){let ue=X.length;if(ue<=1)return[X];let he=[],_e,Fe;for(let Le=0;Le=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];let d=this._pbf.readVarint()+this._pbf.pos;return new Zi(this._pbf,d,this.extent,this._keys,this._values)}}function Wn(u,s,d){u===15?s.version=d.readVarint():u===1?s.name=d.readString():u===5?s.extent=d.readVarint():u===2?s._features.push(d.pos):u===3?s._keys.push(d.readString()):u===4&&s._values.push((function(h){let f=null,v=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})(d))}class Zr{constructor(s,d){this.layers=s.readFields(go,{},d)}}function go(u,s,d){if(u===3){let h=new nr(d,d.readVarint()+d.pos);h.length&&(s[h.name]=h)}}let Co="3d_elevation_id",ss="level";class ao{constructor(){this._valid=!1}reset(s){return this.feature=s,this._valid=!0,this._geometry=s.loadGeometry(),this._geometry.length!==0&&this._geometry[0].length!==0||(this._valid=!1),this}geometry(s,d){return this._valid&&s(d(this._geometry)),this}require(s,d,h){return this.get(s,!0,d,h)}optional(s,d,h){return this.get(s,!1,d,h)}success(){return this._valid}get(s,d,h,f){let v=this.feature.properties.hasOwnProperty(s)?+this.feature.properties[s]:void 0;return this._valid&&v!==void 0&&!Number.isNaN(v)?h(f?f(v):v):d&&(this._valid=!1),this}}class Ea{constructor(s,d){this.featureFunc=s,this.vertexFunc=d}parseFeature(s,d,h){return this.featureFunc(s,d,h)}parseVertex(s,d,h){return this.vertexFunc(s,d,h)}}let Ja=new Ea((u,s,d)=>u.reset(s).require(Co,h=>{d.id=h}).optional("fixed_height_relative",h=>{d.constantHeight=h},_o.decodeRelativeHeight).geometry(h=>{d.bounds=h},Ri).success(),(u,s,d)=>u.reset(s).require(Co,h=>{d.id=h}).require("elevation_idx",h=>{d.idx=h}).require("extent",h=>{d.extent=h}).require("height_relative",h=>{d.height=h},_o.decodeRelativeHeight).geometry(h=>{d.position=h},_o.getPoint).success()),ml=new Ea((u,s,d)=>u.reset(s).require(Co,h=>{d.id=h}).optional("fixed_height",h=>{d.constantHeight=h},_o.decodeMetricHeight).geometry(h=>{d.bounds=h},Ri).success(),(u,s,d)=>u.reset(s).require(Co,h=>{d.id=h}).require("elevation_idx",h=>{d.idx=h}).require("extent",h=>{d.extent=h}).require("height",h=>{d.height=h},_o.decodeMetricHeight).geometry(h=>{d.position=h},_o.getPoint).success());class _o{static getPoint(s){return qr(s[0][0].x,s[0][0].y)}static decodeRelativeHeight(s){return 1e-4*s*5}static decodeMetricHeight(s){return 1e-4*s}static getVersionSchema(s){return s?s==="1.0.1"?ml:void 0:Ja}static parse(s){let d=[],h=[],f=s.length,v=new ao;for(let b=0;b=0);if(v===0)return 0;v!==s.length&&(d=!1)}return d?2:1}function Yd(u,s){for(let d of u.projections){let h=bl(s,u.points[0],d.axis);if(d.projection[1]h[1])return 0}return 1}function Cl(u,s){let d=0,h=[0,0,0,0];for(let b=0;b=0&&d++;var f,v;return d}class xo{constructor(s,d){this.points=s||new Array(8).fill([0,0,0]),this.planes=d||new Array(6).fill([0,0,0,0]),this.bounds=Lr.fromPoints(this.points),this.projections=[],this.frustumEdges=[bi([],this.points[2],this.points[3]),bi([],this.points[0],this.points[3]),bi([],this.points[4],this.points[0]),bi([],this.points[5],this.points[1]),bi([],this.points[6],this.points[2]),bi([],this.points[7],this.points[3])];for(let h of this.frustumEdges){let f=[0,-h[2],h[1]],v=[h[2],0,-h[0]];this.projections.push({axis:f,projection:bl(this.points,this.points[0],f)}),this.projections.push({axis:v,projection:bl(this.points,this.points[0],v)})}}static fromInvProjectionMatrix(s,d,h,f){let v=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 U=vi([],F,s),G=1/U[3]/d*v;return(q=U)[0]=(Z=U)[0]*(X=[G,G,f?1/U[3]:G,G])[0],q[1]=Z[1]*X[1],q[2]=Z[2]*X[2],q[3]=Z[3]*X[3],q;var q,Z,X}),I=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(F=>{let U=ht([],ui([],bi([],b[F[0]],b[F[1]]),bi([],b[F[2]],b[F[1]]))),G=-li(U,b[F[1]]);return U.concat(G)}),k=[];for(let F=0;FF[1]||F[0]>k[1])return 0}return 1}containsPoint(s){for(let d of this.planes){let h=d[3];if(li([d[0],d[1],d[2]],s)+h<0)return!1}return!0}}class Lr{static fromPoints(s){let d=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let f of s)We(d,d,f),bt(h,h,f);return new Lr(d,h)}static fromTileIdAndHeight(s,d,h){let f=1<s.max[d]||s.min[d]>this.max[d])return!1;return!0}intersectsAabbXY(s){return!(this.min[0]>s.max[0]||s.min[0]>this.max[0]||this.min[1]>s.max[1]||s.min[1]>this.max[1])}encapsulate(s){for(let d=0;d<3;d++)this.min[d]=Math.min(this.min[d],s.min[d]),this.max[d]=Math.max(this.max[d],s.max[d])}encapsulatePoint(s){for(let d=0;d<3;d++)this.min[d]=Math.min(this.min[d],s[d]),this.max[d]=Math.max(this.max[d],s[d])}closestPoint(s){return[Math.max(Math.min(this.max[0],s[0]),this.min[0]),Math.max(Math.min(this.max[1],s[1]),this.min[1]),Math.max(Math.min(this.max[2],s[2]),this.min[2])]}}Ln(Lr,"Aabb");class ls{constructor(s,d){this.feature=s,this.metersToTile=d,this.index=0}get(){let s=this.feature.vertices[this.index],d=this.feature.vertexProps[this.index].dir,h=d[1],f=-d[0],v=(s.extent+1)*this.metersToTile;return[new yi(Math.trunc(s.position[0]+h*v),Math.trunc(s.position[1]+f*v)),new yi(Math.trunc(s.position[0]-h*v),Math.trunc(s.position[1]-f*v))]}next(){this.index++}valid(){return this.index{return I.a0?st(k,k,1/F):Rt(k,0,0,1)}getSafeArea(){return this.safeArea}isTunnel(){return this.heightRange.max<=-5}getClosestEdge(s){if(this.edges.length===0)return;let d=0,h=Number.POSITIVE_INFINITY,f=0,[v,b,I,k,F,U,G]=this._tmpVec2;Eo(G,s.x,s.y);let q=new za(G,null);for(let Z=0;Z0?xc(k,I)/Ve:0,ut=pt(dt,0,1),It=Math.abs((dt-ut)*this.edgeProps[Z].len);vl(F,G,he),Eo(U,ue[1],-ue[0]);let Ot=It+Math.abs(xc(F,U));Ot=0;--b){let I=this.edges[b].a,k=this.edges[b].b,{position:F,height:U,extent:G}=this.vertices[I],{position:q,height:Z,extent:X}=this.vertices[k],ue=this.vertexProps[I].dir,he=this.vertexProps[k].dir;if(Rt(d,F[0]/s,F[1]/s,U),Rt(h,q[0]/s,q[1]/s,Z),Rt(f,ue[1],-ue[0],0),st(f,f,G),Rt(v,he[1],-he[0],0),st(v,v,X),this.distSqLines(we(d[0]+.5*f[0],d[1]+.5*f[1],d[2]+.5*f[2]),we(h[0]-.5*v[0],h[1]-.5*v[1],h[2]-.5*v[2]),we(d[0]-.5*f[0],d[1]-.5*f[1],d[2]-.5*f[2]),we(h[0]+.5*v[0],h[1]+.5*v[1],h[2]+.5*v[2]))<=.0025000000000000005)continue;let _e=this.vertices.length,Fe=os(Wr(),F,q);this.vertices.push({position:jl(Fe,Fe,.5),height:.5*(U+Z),extent:.5*(G+X)});let Le=os(Wr(),ue,he);this.vertexProps.push({dir:Na(Le,Le)}),this.edges.splice(b,1),this.edgeProps.splice(b,1),this.edges.push({a:I,b:_e}),this.edges.push({a:_e,b:k});let Ve=vl(Wr(),this.vertices[_e].position,F),dt=Dd(Ve),ut={vec:Ve,dir:jl(Wr(),Ve,1/dt),len:dt};this.edgeProps.push(ut),this.edgeProps.push(ut)}}distSqLines(s,d,h,f){let v=Ze(Ae(),d,s),b=Ze(Ae(),f,h),I=Ze(Ae(),s,h),k=li(v,v),F=li(v,b),U=li(v,I),G=li(b,b),q=li(b,I),Z=k*G-F*F;if(Z===0)return pi(Bi(v,h,f,li(I,b)/li(b,b)),s);let X=(k*q-F*U)/Z;return pi(Bi(v,s,d,(F*q-U*G)/Z),Bi(b,h,f,X))}}class xl{static parseFrom(s,d){let h=_o.parse(s);if(!h)return[];let{vertices:f,features:v}=h,b=1/jt(d);v.sort((U,G)=>U.id-G.id),f.sort((U,G)=>U.id-G.id||U.idx-G.idx),f=f.filter((U,G,q)=>G===q.findIndex(Z=>Z.id===U.id&&Z.idx===U.idx));let I=new Array,k=0,F=f.length;for(let U of v){if(U.constantHeight){I.push(new Zl(U.id,U.bounds,U.constantHeight));continue}for(;k!==F&&f[k].idf.id===h)}}class Jc{constructor(s,d){this.zScale=1,this.xOffset=0,this.yOffset=0,s.equals(d)||(this.zScale=Math.pow(2,d.z-s.z),this.xOffset=(s.x*this.zScale-d.x)*pn,this.yOffset=(s.y*this.zScale-d.y)*pn)}constantElevation(s,d){if(s.constantHeight!=null)return this.computeBiasedHeight(s.constantHeight,d)}pointElevation(s,d,h){let f=this.constantElevation(d,h);return f??(s.x=s.x*this.zScale+this.xOffset,s.y=s.y*this.zScale+this.yOffset,this.computeBiasedHeight(d.pointElevation(s),h))}computeBiasedHeight(s,d){return d<=0?s:s+d*ii(0,d,s>=0?s:Math.abs(.5*s))}}Ln(Zl,"ElevationFeature");class Md{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.fqid),this.index=s.index,this.hasPattern=!1,this.projection=s.projection,this.layoutVertexArray=new pu,this.indexArray=new fd,this.segments=new Ml,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut}),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.elevationMode=this.layers[0].layout.get("circle-elevation-reference"),this.hasElevation=!1,this.elevationMode!=="none"&&(this.elevatedLayoutVertexArray=new bb),this.worldview=s.worldview}updateFootprints(s,d){}populate(s,d,h,f){let v=this.layers[0],b=[],I=null;v.type==="circle"&&(I=v.layout.get("circle-sort-key"));for(let{feature:F,id:U,index:G,sourceLayerIndex:q}of s){let Z=this.layers[0]._featureFilter.needGeometry,X=en(F,Z);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),X,h))continue;let ue=I?I.evaluate(X,{},h):void 0,he={id:U,properties:F.properties,type:F.type,sourceLayerIndex:q,index:G,geometry:Z?X.geometry:Mn(F,h,f),patterns:{},sortKey:ue};b.push(he)}I&&b.sort((F,U)=>F.sortKey-U.sortKey);let k=null;f.projection.name==="globe"&&(this.globeExtVertexArray=new Cb,k=f.projection);for(let F of b){let{geometry:U,index:G,sourceLayerIndex:q}=F,Z=s[G].feature;this.addFeature(F,U,G,d.availableImages,h,k,d.brightness,d.elevationFeatures),d.featureIndex.insert(Z,U,G,q,this.index)}this.hasElevation||(this.elevatedLayoutVertexArray=void 0)}update(s,d,h,f,v,b,I){this.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,this.worldview)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,AH.members),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=s.createVertexBuffer(this.globeExtVertexArray,DH.members)),this.elevatedLayoutVertexArray&&(this.elevatedLayoutVertexBuffer=s.createVertexBuffer(this.elevatedLayoutVertexArray,v3.members))),this.programConfigurations.upload(s),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(s,d,h,f,v,b,I,k){let F;this.elevationMode!=="none"&&(F=xl.getElevationFeature(s,k));for(let U of d)for(let G of U){let q=G.x,Z=G.y;if(q<0||q>=pn||Z<0||Z>=pn)continue;if(b){let he=b.projectTilePoint(q,Z,v),_e=b.upVector(v,q,Z);this.addGlobeExtVertex(he,_e),this.addGlobeExtVertex(he,_e),this.addGlobeExtVertex(he,_e),this.addGlobeExtVertex(he,_e)}let X=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,s.sortKey),ue=X.vertexLength;if(this.addCircleVertex(q,Z,-1,-1),this.addCircleVertex(q,Z,1,-1),this.addCircleVertex(q,Z,1,1),this.addCircleVertex(q,Z,-1,1),this.elevationMode!=="none"){let he=F?F.pointElevation(new yi(q,Z)):0;this.hasElevation=this.hasElevation||he!==0;for(let _e=0;_e<4;_e++)this.elevatedLayoutVertexArray.emplaceBack(he)}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,s,h,{},f,v,I,void 0,this.worldview)}addCircleVertex(s,d,h,f){this.layoutVertexArray.emplaceBack(2*s+(h+1)/2,2*d+(f+1)/2)}addGlobeExtVertex(s,d){this.globeExtVertexArray.emplaceBack(s.x,s.y,s.z,d[0]*16384,d[1]*16384,d[2]*16384)}}function kf(u,s){for(let d=0;d1){if(um(u,s))return!0;for(let h=0;h1?d:d.sub(s)._mult(f)._add(s))}function gd(u,s){let d,h,f,v=!1;for(let b=0;bs.y!=f.y>s.y&&s.x<(f.x-h.x)*(s.y-h.y)/(f.y-h.y)+h.x&&(v=!v)}return v}function Kd(u,s){let d=!1;for(let h=0,f=u.length-1;hs.y!=b.y>s.y&&s.x<(b.x-v.x)*(s.y-v.y)/(b.y-v.y)+v.x&&(d=!d)}return d}function $c(u,s,d,h,f){for(let b of u)if(s<=b.x&&d<=b.y&&h>=b.x&&f>=b.y)return!0;let v=[new yi(s,d),new yi(s,f),new yi(h,f),new yi(h,d)];if(u.length>2){for(let b of v)if(Kd(u,b))return!0}for(let b=0;bf.x&&s.x>f.x||u.yf.y&&s.y>f.y)return!1;let v=Sc(u,s,d[0]);return v!==Sc(u,s,d[1])||v!==Sc(u,s,d[2])||v!==Sc(u,s,d[3])}function V0(u,s,d,h,f,v){let b=s.y-u.y,I=u.x-s.x;if(v=v||0){let k=b*b+I*I;if(k===0)return!0;let F=Math.sqrt(k);b/=F,I/=F}return!((d.x-u.x)*b+(d.y-u.y)*I-v<0||(h.x-u.x)*b+(h.y-u.y)*I-v<0||(f.x-u.x)*b+(f.y-u.y)*I-v<0)}function ev(u,s,d,h,f,v,b){return!(V0(u,s,h,f,v,b)||V0(s,d,h,f,v,b)||V0(d,u,h,f,v,b)||V0(h,f,u,s,d,b)||V0(f,v,u,s,d,b)||V0(v,h,u,s,d,b))}function Tg(u,s,d){let h=s.paint.get(u).value;return h.kind==="constant"?h.value:d.programConfigurations.get(s.id).getMaxValue(u)}function tv(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function wb(u,s,d,h,f){if(!s[0]&&!s[1])return u;let v=yi.convert(s)._mult(f);d==="viewport"&&v._rotate(-h);let b=[];for(let I=0;I>d&&s.y===this.y>>d}url(s,d){let h=(function(v,b,I){var k=Of(256*v,256*(b=Math.pow(2,I)-b-1),I),F=Of(256*(v+1),256*(b+1),I);return k[0]+","+k[1]+","+F[0]+","+F[1]})(this.x,this.y,this.z),f=(function(v,b,I){let k,F="";for(let U=v;U>0;U--)k=1<this.canonical.z?new pm(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new pm(s,this.wrap,s,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(s,d=!0){if(this.overscaledZ===s&&d)return this.key;if(s>this.canonical.z)return qD(this.wrap*+d,s,this.canonical.z,this.canonical.x,this.canonical.y);{let h=this.canonical.z-s;return qD(this.wrap*+d,s,s,this.canonical.x>>h,this.canonical.y>>h)}}isChildOf(s){if(s.wrap!==this.wrap)return!1;let d=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ>d&&s.canonical.y===this.canonical.y>>d}children(s){if(this.overscaledZ>=s)return[new pm(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let d=this.canonical.z+1,h=2*this.canonical.x,f=2*this.canonical.y;return[new pm(d,this.wrap,d,h,f),new pm(d,this.wrap,d,h+1,f),new pm(d,this.wrap,d,h,f+1),new pm(d,this.wrap,d,h+1,f+1)]}isLessThan(s){return this.wraps.wrap)&&(this.overscaledZs.overscaledZ)&&(this.canonical.xs.canonical.x)&&this.canonical.y{let s=u.canonical.x-1,d=u.wrap;return s<0&&(s=(1<{let s=u.canonical.x+1,d=u.wrap;return s===1<new pm(u.overscaledZ,u.wrap,u.canonical.z,u.canonical.x,(u.canonical.y===0?1<new pm(u.overscaledZ,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y===(1<1?null:(function(h,f,v,b){let I=Math.sin(v);return h*(Math.sin((1-b)*v)/I)+f*(Math.sin(b*v)/I)})(u.a[s],u.b[s],u.angle,pt(d,0,1))+u.center[s]}function rv(u){if(u.z<=1)return Jme[u.z+2*u.y+u.x];let s=T3(IR(u));return Lr.fromPoints(s)}function ov(u,s,d){return st(u,u,1-d),kt(u,u,s,d)}function RH(u,s,d){for(let h of u)wn(h,h,s),st(h,h,d)}function PH(u,s,d,h){let f=s/u.worldSize,v=u.globeMatrix;if(d.z<=1){let Lt=rv(d).getCorners();return RH(Lt,v,f),Lr.fromPoints(Lt)}let b=IR(d,h),I=T3(b,_+w3(u._tileCoverLift));RH(I,v,f);let k=Number.MAX_VALUE,F=[-k,-k,-k],U=[k,k,k];if(b.contains(u.center)){for(let Ht of I)We(U,U,Ht),bt(F,F,Ht);F[2]=0;let Lt=u.point,ki=[Lt.x*f,Lt.y*f,0];return We(U,U,ki),bt(F,F,ki),new Lr(U,F)}if(u._tileCoverLift>0){for(let Lt of I)We(U,U,Lt),bt(F,F,Lt);return new Lr(U,F)}let G=[v[12]*f,v[13]*f,v[14]*f],q=b.getCenter(),Z=pt(u.center.lat,-it,it),X=pt(q.lat,-it,it),ue=He(u.center.lng),he=nt(Z),_e=ue-He(q.lng),Fe=he-nt(X);_e>.5?_e-=1:_e<-.5&&(_e+=1);let Le=0;Math.abs(_e)>Math.abs(Fe)?Le=_e>=0?1:3:(Le=Fe>=0?0:2,kt(G,G,[v[4]*f,v[5]*f,v[6]*f],-Math.sin(At(Fe>=0?b.getSouth():b.getNorth()))*_));let Ve=I[Le],dt=I[(Le+1)%4],ut=new ehe(Ve,dt,G),It=[I3(ut,0)||Ve[0],I3(ut,1)||Ve[1],I3(ut,2)||Ve[2]],Ot=ux(u.zoom);if(Ot>0){let Lt=(function({x:Ht,y:Fi,z:Ji},Vi,Wi,rn,Ei){let Qi=1/(1<.5?dr=-1:Bn<-.5&&(dr=1),si=((si+dr)*Vi-(rn*=Vi))*Wi+rn,ei=((ei+dr)*Vi-rn)*Wi+rn,an=(an*Vi-(Ei*=Vi))*Wi+Ei,nn=(nn*Vi-Ei)*Wi+Ei,[[si,nn,0],[ei,nn,0],[ei,an,0],[si,an,0]]})(d,s,u._pixelsPerMercatorPixel,ue,he);for(let Ht=0;HtMath.PI/2*1.01}let sZ=At(85),the=Math.cos(sZ),ihe=Math.sin(sZ),nhe=P(),lZ=u=>{let s=[];return u.paint.get("circle-pitch-alignment")==="map"&&s.push("PITCH_WITH_MAP"),u.paint.get("circle-pitch-scale")==="map"&&s.push("SCALE_WITH_MAP"),s};function cZ(u,s,d,h,f,v,b,I,k){if(v&&u.queryGeometry.isAboveHorizon)return!1;v&&(k*=u.pixelToTileUnitsFactor);let F=u.tileID.canonical,U=d.projection.upVectorScale(F,d.center.lat,d.worldSize).metersToTile;for(let G of s)for(let q of G){let Z=q.add(I),X=f&&d.elevation?d.elevation.exaggeration()*f.getElevationAt(Z.x,Z.y,!0):0,ue=d.projection.projectTilePoint(Z.x,Z.y,F);if(X>0){let Le=d.projection.upVector(F,Z.x,Z.y);ue.x+=Le[0]*U*X,ue.y+=Le[1]*U*X,ue.z+=Le[2]*U*X}let he=v?Z:rhe(ue.x,ue.y,ue.z,h),_e=v?u.tilespaceRays.map(Le=>ahe(Le,X)):u.queryGeometry.screenGeometry,Fe=vi([],[ue.x,ue.y,ue.z,1],h);if(!b&&v?k*=Fe[3]/d.cameraToCenterDistance:b&&!v&&(k*=d.cameraToCenterDistance/Fe[3]),v){let Le=tt((q.y/pn+F.y)/(1<u.width||f.height>u.height||d.x>u.width-f.width||d.y>u.height-f.height)throw new RangeError("out of range source coordinates for image copy");if(f.width>s.width||f.height>s.height||h.x>s.width-f.width||h.y>s.height-f.height)throw new RangeError("out of range destination coordinates for image copy");let k=u.data,F=s.data,U=v===4&&I;for(let G=0;G{s[u.evaluationKey]=k;let F=u.expression.evaluate(s),U=F?F.toNonPremultipliedRenderColor(null):null;U&&(f.data[b+I+0]=Math.floor(255*U.r),f.data[b+I+1]=Math.floor(255*U.g),f.data[b+I+2]=Math.floor(255*U.b),f.data[b+I+3]=Math.floor(255*U.a))};if(u.clips)for(let b=0,I=0;b80*d){I=u[0],k=u[1];let U=I,G=k;for(let q=d;qU&&(U=Z),X>G&&(G=X)}F=Math.max(U-I,G-k),F=F!==0?32767/F:0}return DS(v,b,d,I,k,F,0),b}function Ib(u,s,d,h,f){let v;if(f===(function(b,I,k,F){let U=0;for(let G=I,q=k-F;G0)for(let b=s;b=s;b-=h)v=_Z(b/h|0,u[b],u[b+1],v);return v&&yT(v,v.next)&&(kR(v),v=v.next),v}function AS(u,s){if(!u)return u;s||(s=u);let d,h=u;do if(d=!1,h.steiner||!yT(h,h.next)&&fu(h.prev,h,h.next)!==0)h=h.next;else{if(kR(h),h=s=h.prev,h===h.next)break;d=!0}while(d||h!==s);return s}function DS(u,s,d,h,f,v,b){if(!u)return;!b&&v&&(function(k,F,U,G){let q=k;do q.z===0&&(q.z=BH(q.x,q.y,F,U,G)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==k);q.prevZ.nextZ=null,q.prevZ=null,(function(Z){let X,ue=1;do{let he,_e=Z;Z=null;let Fe=null;for(X=0;_e;){X++;let Le=_e,Ve=0;for(let ut=0;ut0||dt>0&&Le;)Ve!==0&&(dt===0||!Le||_e.z<=Le.z)?(he=_e,_e=_e.nextZ,Ve--):(he=Le,Le=Le.nextZ,dt--),Fe?Fe.nextZ=he:Z=he,he.prevZ=Fe,Fe=he;_e=Le}Fe.nextZ=null,ue*=2}while(X>1)})(q)})(u,h,f,v);let I=u;for(;u.prev!==u.next;){let k=u.prev,F=u.next;if(v?wu(u,h,f,v):hu(u))s.push(k.i,u.i,F.i),kR(u),u=F.next,I=F.next;else if((u=F)===I){b?b===1?DS(u=fZ(AS(u),s),s,d,h,f,v,2):b===2&&dhe(u,s,d,h,f,v):DS(AS(u),s,d,h,f,v,1);break}}}function hu(u){let s=u.prev,d=u,h=u.next;if(fu(s,d,h)>=0)return!1;let f=s.x,v=d.x,b=h.x,I=s.y,k=d.y,F=h.y,U=Math.min(f,v,b),G=Math.min(I,k,F),q=Math.max(f,v,b),Z=Math.max(I,k,F),X=h.next;for(;X!==s;){if(X.x>=U&&X.x<=q&&X.y>=G&&X.y<=Z&&px(f,I,v,k,b,F,X.x,X.y)&&fu(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function wu(u,s,d,h){let f=u.prev,v=u,b=u.next;if(fu(f,v,b)>=0)return!1;let I=f.x,k=v.x,F=b.x,U=f.y,G=v.y,q=b.y,Z=Math.min(I,k,F),X=Math.min(U,G,q),ue=Math.max(I,k,F),he=Math.max(U,G,q),_e=BH(Z,X,s,d,h),Fe=BH(ue,he,s,d,h),Le=u.prevZ,Ve=u.nextZ;for(;Le&&Le.z>=_e&&Ve&&Ve.z<=Fe;){if(Le.x>=Z&&Le.x<=ue&&Le.y>=X&&Le.y<=he&&Le!==f&&Le!==b&&px(I,U,k,G,F,q,Le.x,Le.y)&&fu(Le.prev,Le,Le.next)>=0||(Le=Le.prevZ,Ve.x>=Z&&Ve.x<=ue&&Ve.y>=X&&Ve.y<=he&&Ve!==f&&Ve!==b&&px(I,U,k,G,F,q,Ve.x,Ve.y)&&fu(Ve.prev,Ve,Ve.next)>=0))return!1;Ve=Ve.nextZ}for(;Le&&Le.z>=_e;){if(Le.x>=Z&&Le.x<=ue&&Le.y>=X&&Le.y<=he&&Le!==f&&Le!==b&&px(I,U,k,G,F,q,Le.x,Le.y)&&fu(Le.prev,Le,Le.next)>=0)return!1;Le=Le.prevZ}for(;Ve&&Ve.z<=Fe;){if(Ve.x>=Z&&Ve.x<=ue&&Ve.y>=X&&Ve.y<=he&&Ve!==f&&Ve!==b&&px(I,U,k,G,F,q,Ve.x,Ve.y)&&fu(Ve.prev,Ve,Ve.next)>=0)return!1;Ve=Ve.nextZ}return!0}function fZ(u,s){let d=u;do{let h=d.prev,f=d.next.next;!yT(h,f)&&AR(h,d,d.next,f)&&DR(h,f)&&DR(f,h)&&(s.push(h.i,d.i,f.i),kR(d),kR(d.next),d=u=f),d=d.next}while(d!==u);return AS(d)}function dhe(u,s,d,h,f,v){let b=u;do{let I=b.next.next;for(;I!==b.prev;){if(b.i!==I.i&&zH(b,I)){let k=gZ(b,I);return b=AS(b,b.next),k=AS(k,k.next),DS(b,s,d,h,f,v,0),void DS(k,s,d,h,f,v,0)}I=I.next}b=b.next}while(b!==u)}function uhe(u,s){let d=u.x-s.x;return d===0&&(d=u.y-s.y,d===0)&&(d=(u.next.y-u.y)/(u.next.x-u.x)-(s.next.y-s.y)/(s.next.x-s.x)),d}function phe(u,s){let d=(function(f,v){let b=v,I=f.x,k=f.y,F,U=-1/0;if(yT(f,b))return b;do{if(yT(f,b.next))return b.next;if(k<=b.y&&k>=b.next.y&&b.next.y!==b.y){let ue=b.x+(k-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(ue<=I&&ue>U&&(U=ue,F=b.x=b.x&&b.x>=q&&I!==b.x&&VH(kF.x||b.x===F.x&&mhe(F,b)))&&(F=b,X=ue)}b=b.next}while(b!==G);return F})(u,s);if(!d)return s;let h=gZ(d,u);return AS(h,h.next),AS(d,d.next)}function mhe(u,s){return fu(u.prev,u,s.prev)<0&&fu(s.next,u,u.next)<0}function BH(u,s,d,h,f){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-d)*f|0)|u<<8))|u<<4))|u<<2))|u<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=(s-h)*f|0)|s<<8))|s<<4))|s<<2))|s<<1))<<1}function hhe(u){let s=u,d=u;do(s.x=(u-b)*(v-I)&&(u-b)*(h-I)>=(d-b)*(s-I)&&(d-b)*(v-I)>=(f-b)*(h-I)}function px(u,s,d,h,f,v,b,I){return!(u===b&&s===I)&&VH(u,s,d,h,f,v,b,I)}function zH(u,s){return u.next.i!==s.i&&u.prev.i!==s.i&&!(function(d,h){let f=d;do{if(f.i!==d.i&&f.next.i!==d.i&&f.i!==h.i&&f.next.i!==h.i&&AR(f,f.next,d,h))return!0;f=f.next}while(f!==d);return!1})(u,s)&&(DR(u,s)&&DR(s,u)&&(function(d,h){let f=d,v=!1,b=(d.x+h.x)/2,I=(d.y+h.y)/2;do f.y>I!=f.next.y>I&&f.next.y!==f.y&&b<(f.next.x-f.x)*(I-f.y)/(f.next.y-f.y)+f.x&&(v=!v),f=f.next;while(f!==d);return v})(u,s)&&(fu(u.prev,u,s.prev)||fu(u,s.prev,s))||yT(u,s)&&fu(u.prev,u,u.next)>0&&fu(s.prev,s,s.next)>0)}function fu(u,s,d){return(s.y-u.y)*(d.x-s.x)-(s.x-u.x)*(d.y-s.y)}function yT(u,s){return u.x===s.x&&u.y===s.y}function AR(u,s,d,h){let f=mx(fu(u,s,d)),v=mx(fu(u,s,h)),b=mx(fu(d,h,u)),I=mx(fu(d,h,s));return f!==v&&b!==I||!(f!==0||!Vh(u,d,s))||!(v!==0||!Vh(u,h,s))||!(b!==0||!Vh(d,u,h))||!(I!==0||!Vh(d,s,h))}function Vh(u,s,d){return s.x<=Math.max(u.x,d.x)&&s.x>=Math.min(u.x,d.x)&&s.y<=Math.max(u.y,d.y)&&s.y>=Math.min(u.y,d.y)}function mx(u){return u>0?1:u<0?-1:0}function DR(u,s){return fu(u.prev,u,u.next)<0?fu(u,s,u.next)>=0&&fu(u,u.prev,s)>=0:fu(u,s,u.prev)<0||fu(u,u.next,s)<0}function gZ(u,s){let d=UH(u.i,u.x,u.y),h=UH(s.i,s.x,s.y),f=u.next,v=s.prev;return u.next=s,s.prev=u,d.next=f,f.prev=d,h.next=d,d.prev=h,v.next=h,h.prev=v,h}function _Z(u,s,d,h){let f=UH(u,s,d);return h?(f.next=h.next,f.prev=h,h.next.prev=f,h.next=f):(f.prev=f,f.next=f),f}function kR(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 UH(u,s,d){return{i:u,x:s,y:d,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function WD(u,s){let d=u.length;if(d<=1)return[u];let h=[],f,v;for(let b=0;b1)for(let b=0;b=pn&&d>=pn}static evaluate(s){if(s.length===0)return new fx;let d=[];for(let k of s)d.push(...k.portals);if(d.length===0)return new fx;for(let k of d){let F=k.va,U=k.vb;(fx.isOnBorder(F.x,U.x)||fx.isOnBorder(F.y,U.y))&&(k.type="border")}let h=d.filter(k=>k.type!=="unevaluated"),f=d.filter(k=>k.type==="unevaluated");if(f.length===0)return new fx;f.sort((k,F)=>k.hash===F.hash?k.isTunnel===F.isTunnel?0:k.isTunnel?-1:1:k.hashk.hashv!=="fill-tunnel-structure-color"),this.tunnelProgramConfigurations=new wg(d,{zoom:h,lut:f},v=>v!=="fill-bridge-guard-rail-color")}addVertices(s,d){let h=this.unevalVertices.length;for(let f=0;f=v.min.x&&G.x<=v.max.x&&G.y>=v.min.y&&G.y<=v.max.y||q.x>=v.min.x&&q.x<=v.max.x&&q.y>=v.min.y&&q.y<=v.max.y||up(G,q,I))||this.isOnBorder(G.x,q.x)||this.isOnBorder(G.y,q.y))continue;let Z=Pf.computeEdgeHash(this.unevalVertices[F],this.unevalVertices[U]),X,ue=this.vertexHashLookup.get(Pf.computePosHash(G));ue!=null?X=ue.next:(ue=this.vertexHashLookup.get(Pf.computePosHash(q)),X=ue!=null?ue.prev:Z),this.unevalEdges.push({polygonIdx:s,a:F,b:U,hash:Z,portalHash:X,isTunnel:f,type:"unevaluated",featureInfo:b})}}addPortalCandidates(s,d,h,f,v){if(d.length===0)return;this.portalPolygons.add(s,{geometry:d,zLevel:v});let b=d[0];this.vertexHashLookup.clear();let I=Pf.computeEdgeHash(b[b.length-2],b[b.length-1]);for(let k=0;k({vertexOffset:0,primitiveOffset:this.indexArray.length}),h=q=>{q.primitiveLength=this.indexArray.length-q.primitiveOffset},f=new Lc(this.vertexPositions,this.vertexNormals,this.indexArray);this.prepareEdges(s.portals,this.unevalEdges);let v=d(),b=d(),I=d(),k=(q,Z)=>{q.sort((ue,he)=>ue.type===Z&&he.type!==Z?-1:ue.type!==Z&&he.type===Z?1:0);let X=q.findIndex(ue=>ue.type!==Z);return X>=0?X:q.length},F=0;this.unevalEdges.length>0&&(F=k(this.unevalEdges,"none"),this.constructBridgeStructures(f,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:F},this.tileToMeters)),h(I);let U=d(),G=d();if(this.unevalEdges.length>0){let q=this.unevalEdges.splice(F),Z=k(q,"tunnel")+F;this.unevalEdges.push(...q),this.constructTunnelStructures(f,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:F},{min:F,max:Z})}h(U),f.addTriangles(this.unevalTriangles,this.unevalVertices,this.unevalHeights),h(G),f.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,this.unevalHeights),h(b),f.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,[-.1]),h(v),this.maskSegments=Ml.simpleSegment(0,G.primitiveOffset,0,G.primitiveLength),this.depthSegments=Ml.simpleSegment(0,b.primitiveOffset,0,b.primitiveLength),this.renderableBridgeSegments=Ml.simpleSegment(0,I.primitiveOffset,0,I.primitiveLength),this.renderableTunnelSegments=Ml.simpleSegment(0,U.primitiveOffset,0,U.primitiveLength),this.shadowCasterSegments=Ml.simpleSegment(0,v.primitiveOffset,0,v.primitiveLength)}update(s,d,h,f,v,b,I,k){this.bridgeProgramConfigurations.updatePaintArrays(s,d,v,h,f,b,I,k),this.tunnelProgramConfigurations.updatePaintArrays(s,d,v,h,f,b,I,k)}upload(s){this.vertexBuffer||this.vertexPositions.length===0||this.vertexNormals.length===0||this.indexArray.length===0||(this.vertexBuffer=s.createVertexBuffer(this.vertexPositions,che.members),this.vertexBufferNormal=s.createVertexBuffer(this.vertexNormals,LH.members),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.bridgeProgramConfigurations.upload(s),this.tunnelProgramConfigurations.upload(s))}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(s,d,h,f,v){let b=(I,k)=>{for(let F=0;FRt(Wi,d[rn].x,d[rn].y,h[rn]*k),G=Ae(),q=Ae(),Z=Ae(),X=Ae(),ue=Ae(),he=(Wi,rn)=>{let Ei=I.get(Pf.computePosHash(d[rn])),Qi=Ei.from,si=Ei.to;if(!Qi||!si)return;U(G,Qi),U(q,rn),U(Z,si),Rr(X),De(G,q)||(bi(ue,q,G),ht(X,ue)),De(Z,q)||(bi(ue,Z,q),rt(X,X,ht(ue,ue)));let ei=Mt(X);return ei>0?st(Wi,X,1/ei):void 0},_e=Number.POSITIVE_INFINITY;this.sortSubarray(f,v.min,v.max,(Wi,rn)=>Wi.featureInfo.featureIndex-rn.featureInfo.featureIndex);let Fe=Ae(),Le=Ae(),Ve=Ae(),dt=Ae(),ut=Ae(),It=Ae(),Ot=Ae(),Lt=Ae(),ki=Ae(),Ht=[Ae(),Ae(),Ae(),Ae()],Fi=[Ae(),Ae(),Ae(),Ae()],Ji=[{coord:new yi(0,0),height:0},{coord:new yi(0,0),height:0}],Vi=(Wi,rn)=>Wi>rn;for(let Wi=v.min;Wi_e.featureInfo.featureIndex-Fe.featureInfo.featureIndex;this.sortSubarray(f,v.min,v.max,k),this.sortSubarray(f,b.min,b.max,k);let F=_e=>ht(_e,_e),U=[{coord:new yi(0,0),height:0},{coord:new yi(0,0),height:0}],G=(_e,Fe)=>_eI.hash===k.hash?k.polygonIdx-I.polygonIdx:k.hash>I.hash?1:-1);let h=0,f=0,v=0,b=d[h].polygonIdx;do f++,(f===d.length||d[h].hash!==d[f].hash)&&((f-h==1||d[f-1].polygonIdx!==b)&&(vF.portalHashU.hash?I++:U.hash>F.portalHash?k++:(F.type=U.type,I++)}}}isOnBorder(s,d){return s<=0&&d<=0||s>=pn&&d>=pn}addFeatureSection(s,d,h,f){return s!==d&&(d=s,h.push({featureIndex:s,vertexStart:f.getVertexCount()}),f.clearVertexLookup()),d}sortSubarray(s,d,h,f){let v=s.slice(d,h);v.sort(f),s.splice(d,v.length,...v)}static computeEdgeHash(s,d){return(s.y===d.y&&s.x>d.x||s.y>d.y)&&([s,d]=[d,s]),BigInt(Pf.computePosHash(s))<<32n|BigInt(Pf.computePosHash(d))}static computePosHash(s){return((65535&s.x)<<16|65535&s.y)>>>0}}var GH,MR={exports:{}},yZ=(GH||(GH=1,(function(u,s){(function(d){function h(je,Ye){return je>Ye?1:je0){var Hn=Di+Math.floor(xn/2),vr={key:Ye[Hn],data:ri[Hn],parent:je};return vr.left=b(vr,Ye,ri,Di,Hn),vr.right=b(vr,Ye,ri,Hn+1,In),vr}return null}function I(je,Ye,ri,Di,In){if(!(ri>=Di)){for(var xn=je[ri+Di>>1],Hn=ri-1,vr=Di+1;;){do Hn++;while(In(je[Hn],xn)<0);do vr--;while(In(je[vr],xn)>0);if(Hn>=vr)break;var Bo=je[Hn];je[Hn]=je[vr],je[vr]=Bo,Bo=Ye[Hn],Ye[Hn]=Ye[vr],Ye[vr]=Bo}I(je,Ye,ri,vr,In),I(je,Ye,vr+1,Di,In)}}f.prototype.rotateLeft=function(je){var Ye=je.right;Ye&&(je.right=Ye.left,Ye.left&&(Ye.left.parent=je),Ye.parent=je.parent),je.parent?je===je.parent.left?je.parent.left=Ye:je.parent.right=Ye:this._root=Ye,Ye&&(Ye.left=je),je.parent=Ye},f.prototype.rotateRight=function(je){var Ye=je.left;Ye&&(je.left=Ye.right,Ye.right&&(Ye.right.parent=je),Ye.parent=je.parent),je.parent?je===je.parent.left?je.parent.left=Ye:je.parent.right=Ye:this._root=Ye,Ye&&(Ye.right=je),je.parent=Ye},f.prototype._splay=function(je){for(;je.parent;){var Ye=je.parent;Ye.parent?Ye.left===je&&Ye.parent.left===Ye?(this.rotateRight(Ye.parent),this.rotateRight(Ye)):Ye.right===je&&Ye.parent.right===Ye?(this.rotateLeft(Ye.parent),this.rotateLeft(Ye)):Ye.left===je&&Ye.parent.right===Ye?(this.rotateRight(Ye),this.rotateLeft(Ye)):(this.rotateLeft(Ye),this.rotateRight(Ye)):Ye.left===je?this.rotateRight(Ye):this.rotateLeft(Ye)}},f.prototype.splay=function(je){for(var Ye,ri,Di,In,xn;je.parent;)(ri=(Ye=je.parent).parent)&&ri.parent?((Di=ri.parent).left===ri?Di.left=je:Di.right=je,je.parent=Di):(je.parent=null,this._root=je),In=je.left,xn=je.right,je===Ye.left?(ri&&(ri.left===Ye?(Ye.right?(ri.left=Ye.right,ri.left.parent=ri):ri.left=null,Ye.right=ri,ri.parent=Ye):(In?(ri.right=In,In.parent=ri):ri.right=null,je.left=ri,ri.parent=je)),xn?(Ye.left=xn,xn.parent=Ye):Ye.left=null,je.right=Ye,Ye.parent=je):(ri&&(ri.right===Ye?(Ye.left?(ri.right=Ye.left,ri.right.parent=ri):ri.right=null,Ye.left=ri,ri.parent=Ye):(xn?(ri.left=xn,xn.parent=ri):ri.left=null,je.right=ri,ri.parent=je)),In?(Ye.right=In,In.parent=Ye):Ye.right=null,je.left=Ye,Ye.parent=je)},f.prototype.replace=function(je,Ye){je.parent?je===je.parent.left?je.parent.left=Ye:je.parent.right=Ye:this._root=Ye,Ye&&(Ye.parent=je.parent)},f.prototype.minNode=function(je){if(je===void 0&&(je=this._root),je)for(;je.left;)je=je.left;return je},f.prototype.maxNode=function(je){if(je===void 0&&(je=this._root),je)for(;je.right;)je=je.right;return je},f.prototype.insert=function(je,Ye){var ri=this._root,Di=null,In=this._compare;if(this._noDuplicates)for(;ri;){if(Di=ri,In(ri.key,je)===0)return;ri=In(ri.key,je)<0?ri.right:ri.left}else for(;ri;)Di=ri,ri=In(ri.key,je)<0?ri.right:ri.left;return ri={key:je,data:Ye,left:null,right:null,parent:Di},Di?In(Di.key,ri.key)<0?Di.right=ri:Di.left=ri:this._root=ri,this.splay(ri),this._size++,ri},f.prototype.find=function(je){for(var Ye=this._root,ri=this._compare;Ye;){var Di=ri(Ye.key,je);if(Di<0)Ye=Ye.right;else{if(!(Di>0))return Ye;Ye=Ye.left}}return null},f.prototype.contains=function(je){for(var Ye=this._root,ri=this._compare;Ye;){var Di=ri(je,Ye.key);if(Di===0)return!0;Ye=Di<0?Ye.left:Ye.right}return!1},f.prototype.remove=function(je){var Ye=this.find(je);if(!Ye)return!1;if(this.splay(Ye),Ye.left)if(Ye.right){var ri=this.minNode(Ye.right);ri.parent!==Ye&&(this.replace(ri,ri.right),ri.right=Ye.right,ri.right.parent=ri),this.replace(Ye,ri),ri.left=Ye.left,ri.left.parent=ri}else this.replace(Ye,Ye.left);else this.replace(Ye,Ye.right);return this._size--,!0},f.prototype.removeNode=function(je){if(!je)return!1;if(this.splay(je),je.left)if(je.right){var Ye=this.minNode(je.right);Ye.parent!==je&&(this.replace(Ye,Ye.right),Ye.right=je.right,Ye.right.parent=Ye),this.replace(je,Ye),Ye.left=je.left,Ye.left.parent=Ye}else this.replace(je,je.left);else this.replace(je,je.right);return this._size--,!0},f.prototype.erase=function(je){var Ye=this.find(je);if(Ye){this.splay(Ye);var ri=Ye.left,Di=Ye.right,In=null;ri&&(ri.parent=null,In=this.maxNode(ri),this.splay(In),this._root=In),Di&&(ri?In.right=Di:this._root=Di,Di.parent=In),this._size--}},f.prototype.pop=function(){var je=this._root,Ye=null;if(je){for(;je.left;)je=je.left;Ye={key:je.key,data:je.data},this.remove(je.key)}return Ye},f.prototype.next=function(je){var Ye=je;if(Ye)if(Ye.right)for(Ye=Ye.right;Ye&&Ye.left;)Ye=Ye.left;else for(Ye=je.parent;Ye&&Ye.right===je;)je=Ye,Ye=Ye.parent;return Ye},f.prototype.prev=function(je){var Ye=je;if(Ye)if(Ye.left)for(Ye=Ye.left;Ye&&Ye.right;)Ye=Ye.right;else for(Ye=je.parent;Ye&&Ye.left===je;)je=Ye,Ye=Ye.parent;return Ye},f.prototype.forEach=function(je){for(var Ye=this._root,ri=[],Di=!1,In=0;!Di;)Ye?(ri.push(Ye),Ye=Ye.left):ri.length>0?(je(Ye=ri.pop(),In++),Ye=Ye.right):Di=!0;return this},f.prototype.range=function(je,Ye,ri,Di){for(var In=[],xn=this._compare,Hn=this._root;In.length!==0||Hn;)if(Hn)In.push(Hn),Hn=Hn.left;else{if(xn((Hn=In.pop()).key,Ye)>0)break;if(xn(Hn.key,je)>=0&&ri.call(Di,Hn))return this;Hn=Hn.right}return this},f.prototype.keys=function(){for(var je=this._root,Ye=[],ri=[],Di=!1;!Di;)je?(Ye.push(je),je=je.left):Ye.length>0?(je=Ye.pop(),ri.push(je.key),je=je.right):Di=!0;return ri},f.prototype.values=function(){for(var je=this._root,Ye=[],ri=[],Di=!1;!Di;)je?(Ye.push(je),je=je.left):Ye.length>0?(je=Ye.pop(),ri.push(je.data),je=je.right):Di=!0;return ri},f.prototype.at=function(je){for(var Ye=this._root,ri=[],Di=!1,In=0;!Di;)if(Ye)ri.push(Ye),Ye=Ye.left;else if(ri.length>0){if(Ye=ri.pop(),In===je)return Ye;In++,Ye=Ye.right}else Di=!0;return null},f.prototype.load=function(je,Ye,ri){if(je===void 0&&(je=[]),Ye===void 0&&(Ye=[]),ri===void 0&&(ri=!1),this._size!==0)throw new Error("bulk-load: tree is not empty");var Di=je.length;return ri&&I(je,Ye,0,Di-1,this._compare),this._root=b(null,je,Ye,0,Di),this._size=Di,this},f.prototype.min=function(){var je=this.minNode(this._root);return je?je.key:null},f.prototype.max=function(){var je=this.maxNode(this._root);return je?je.key:null},f.prototype.isEmpty=function(){return this._root===null},v.size.get=function(){return this._size},f.createTree=function(je,Ye,ri,Di,In){return new f(ri,In).load(je,Ye,Di)},Object.defineProperties(f.prototype,v);var k=0,F=1,U=2,G=3,q=0,Z=1,X=2,ue=3;function he(je,Ye,ri){Ye===null?(je.inOut=!1,je.otherInOut=!0):(je.isSubject===Ye.isSubject?(je.inOut=!Ye.inOut,je.otherInOut=Ye.otherInOut):(je.inOut=!Ye.otherInOut,je.otherInOut=Ye.isVertical()?!Ye.inOut:Ye.inOut),Ye&&(je.prevInResult=!_e(Ye,ri)||Ye.isVertical()?Ye.prevInResult:Ye));var Di=_e(je,ri);je.resultTransition=Di?(function(In,xn){var Hn,vr=!In.inOut,Bo=!In.otherInOut;switch(xn){case q:Hn=vr&&Bo;break;case Z:Hn=vr||Bo;break;case ue:Hn=vr^Bo;break;case X:Hn=In.isSubject?vr&&!Bo:Bo&&!vr}return Hn?1:-1})(je,ri):0}function _e(je,Ye){switch(je.type){case k:switch(Ye){case q:return!je.otherInOut;case Z:return je.otherInOut;case X:return je.isSubject&&je.otherInOut||!je.isSubject&&!je.otherInOut;case ue:return!0}break;case U:return Ye===q||Ye===Z;case G:return Ye===X;case F:return!1}return!1}var Fe=function(je,Ye,ri,Di,In){this.left=Ye,this.point=je,this.otherEvent=ri,this.isSubject=Di,this.type=In||k,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.resultTransition=0,this.otherPos=-1,this.outputContourId=-1,this.isExteriorRing=!0},Le={inResult:{configurable:!0}};function Ve(je,Ye){return je[0]===Ye[0]&&je[1]===Ye[1]}Fe.prototype.isBelow=function(je){var Ye=this.point,ri=this.otherEvent.point;return this.left?(Ye[0]-je[0])*(ri[1]-je[1])-(ri[0]-je[0])*(Ye[1]-je[1])>0:(ri[0]-je[0])*(Ye[1]-je[1])-(Ye[0]-je[0])*(ri[1]-je[1])>0},Fe.prototype.isAbove=function(je){return!this.isBelow(je)},Fe.prototype.isVertical=function(){return this.point[0]===this.otherEvent.point[0]},Le.inResult.get=function(){return this.resultTransition!==0},Fe.prototype.clone=function(){var je=new Fe(this.point,this.left,this.otherEvent,this.isSubject,this.type);return je.contourId=this.contourId,je.resultTransition=this.resultTransition,je.prevInResult=this.prevInResult,je.isExteriorRing=this.isExteriorRing,je.inOut=this.inOut,je.otherInOut=this.otherInOut,je},Object.defineProperties(Fe.prototype,Le);var dt=11102230246251565e-32,ut=134217729,It=(3+8*dt)*dt;function Ot(je,Ye,ri,Di,In){var xn,Hn,vr,Bo,zo=Ye[0],Po=Di[0],gs=0,Ll=0;Po>zo==Po>-zo?(xn=zo,zo=Ye[++gs]):(xn=Po,Po=Di[++Ll]);var Oo=0;if(gszo==Po>-zo?(vr=xn-((Hn=zo+xn)-zo),zo=Ye[++gs]):(vr=xn-((Hn=Po+xn)-Po),Po=Di[++Ll]),xn=Hn,vr!==0&&(In[Oo++]=vr);gszo==Po>-zo?(vr=xn-((Hn=xn+zo)-(Bo=Hn-xn))+(zo-Bo),zo=Ye[++gs]):(vr=xn-((Hn=xn+Po)-(Bo=Hn-xn))+(Po-Bo),Po=Di[++Ll]),xn=Hn,vr!==0&&(In[Oo++]=vr);for(;gs0!=gs>0)return Ll;var Oo=Math.abs(Po+gs);return Math.abs(Ll)>=ki*Oo?Ll:-(function(hl,As,ja,Sl,wl,cl,fl){var Ds,Uo,Vs,Xl,Ur,Da,Il,Tc,Pl,Qd,qs,Od,Dg,fm,Bp,kg,OS,Zd,Iu=hl-wl,gm=ja-wl,zh=As-cl,ih=Sl-cl;Ji[0]=(Bp=(Tc=Iu-(Il=(Da=ut*Iu)-(Da-Iu)))*(Qd=ih-(Pl=(Da=ut*ih)-(Da-ih)))-((fm=Iu*ih)-Il*Pl-Tc*Pl-Il*Qd))-((qs=Bp-(OS=(Tc=zh-(Il=(Da=ut*zh)-(Da-zh)))*(Qd=gm-(Pl=(Da=ut*gm)-(Da-gm)))-((kg=zh*gm)-Il*Pl-Tc*Pl-Il*Qd)))+(Ur=Bp-qs))+(Ur-OS),Ji[1]=(Dg=fm-((Od=fm+qs)-(Ur=Od-fm))+(qs-Ur))-((qs=Dg-kg)+(Ur=Dg-qs))+(Ur-kg),Ji[2]=Od-((Zd=Od+qs)-(Ur=Zd-Od))+(qs-Ur),Ji[3]=Zd;var sk=(function(O1i,RNe){for(var PNe=RNe[0],Cfe=1;Cfe<4;Cfe++)PNe+=RNe[Cfe];return PNe})(0,Ji),kG=Ht*fl;if(sk>=kG||-sk>=kG||(Ds=hl-(Iu+(Ur=hl-Iu))+(Ur-wl),Vs=ja-(gm+(Ur=ja-gm))+(Ur-wl),Uo=As-(zh+(Ur=As-zh))+(Ur-cl),Xl=Sl-(ih+(Ur=Sl-ih))+(Ur-cl),Ds===0&&Uo===0&&Vs===0&&Xl===0)||(kG=Fi*fl+It*Math.abs(sk),(sk+=Iu*Xl+ih*Ds-(zh*Vs+gm*Uo))>=kG||-sk>=kG))return sk;Ei[0]=(Bp=(Tc=Ds-(Il=(Da=ut*Ds)-(Da-Ds)))*(Qd=ih-(Pl=(Da=ut*ih)-(Da-ih)))-((fm=Ds*ih)-Il*Pl-Tc*Pl-Il*Qd))-((qs=Bp-(OS=(Tc=Uo-(Il=(Da=ut*Uo)-(Da-Uo)))*(Qd=gm-(Pl=(Da=ut*gm)-(Da-gm)))-((kg=Uo*gm)-Il*Pl-Tc*Pl-Il*Qd)))+(Ur=Bp-qs))+(Ur-OS),Ei[1]=(Dg=fm-((Od=fm+qs)-(Ur=Od-fm))+(qs-Ur))-((qs=Dg-kg)+(Ur=Dg-qs))+(Ur-kg),Ei[2]=Od-((Zd=Od+qs)-(Ur=Zd-Od))+(qs-Ur),Ei[3]=Zd;var Wct=Ot(4,Ji,4,Ei,Vi);Ei[0]=(Bp=(Tc=Iu-(Il=(Da=ut*Iu)-(Da-Iu)))*(Qd=Xl-(Pl=(Da=ut*Xl)-(Da-Xl)))-((fm=Iu*Xl)-Il*Pl-Tc*Pl-Il*Qd))-((qs=Bp-(OS=(Tc=zh-(Il=(Da=ut*zh)-(Da-zh)))*(Qd=Vs-(Pl=(Da=ut*Vs)-(Da-Vs)))-((kg=zh*Vs)-Il*Pl-Tc*Pl-Il*Qd)))+(Ur=Bp-qs))+(Ur-OS),Ei[1]=(Dg=fm-((Od=fm+qs)-(Ur=Od-fm))+(qs-Ur))-((qs=Dg-kg)+(Ur=Dg-qs))+(Ur-kg),Ei[2]=Od-((Zd=Od+qs)-(Ur=Zd-Od))+(qs-Ur),Ei[3]=Zd;var Qct=Ot(Wct,Vi,4,Ei,Wi);Ei[0]=(Bp=(Tc=Ds-(Il=(Da=ut*Ds)-(Da-Ds)))*(Qd=Xl-(Pl=(Da=ut*Xl)-(Da-Xl)))-((fm=Ds*Xl)-Il*Pl-Tc*Pl-Il*Qd))-((qs=Bp-(OS=(Tc=Uo-(Il=(Da=ut*Uo)-(Da-Uo)))*(Qd=Vs-(Pl=(Da=ut*Vs)-(Da-Vs)))-((kg=Uo*Vs)-Il*Pl-Tc*Pl-Il*Qd)))+(Ur=Bp-qs))+(Ur-OS),Ei[1]=(Dg=fm-((Od=fm+qs)-(Ur=Od-fm))+(qs-Ur))-((qs=Dg-kg)+(Ur=Dg-qs))+(Ur-kg),Ei[2]=Od-((Zd=Od+qs)-(Ur=Zd-Od))+(qs-Ur),Ei[3]=Zd;var Zct=Ot(Qct,Wi,4,Ei,rn);return rn[Zct-1]})(In,xn,Hn,vr,Bo,zo,Oo)})(je[0],je[1],Ye[0],Ye[1],ri[0],ri[1]);return Di>0?-1:Di<0?1:0}function si(je,Ye){var ri=je.point,Di=Ye.point;return ri[0]>Di[0]?1:ri[0]Di[1]?1:-1:(function(In,xn,Hn,vr){return In.left!==xn.left?In.left?1:-1:Qi(Hn,In.otherEvent.point,xn.otherEvent.point)!==0?In.isBelow(xn.otherEvent.point)?-1:1:!In.isSubject&&xn.isSubject?1:-1})(je,Ye,ri)}function ei(je,Ye,ri){var Di=new Fe(Ye,!1,je,je.isSubject),In=new Fe(Ye,!0,je.otherEvent,je.isSubject);return Ve(je.point,je.otherEvent.point)&&console.warn("what is that, a collapsed segment?",je),Di.contourId=In.contourId=je.contourId,si(In,je.otherEvent)>0&&(je.otherEvent.left=!0,In.left=!1),je.otherEvent.otherEvent=In,je.otherEvent=Di,ri.push(In),ri.push(Di),ri}function an(je,Ye){return je[0]*Ye[1]-je[1]*Ye[0]}function nn(je,Ye){return je[0]*Ye[0]+je[1]*Ye[1]}function dr(je,Ye,ri){var Di=(function(Bo,zo,Po,gs,Ll){var Oo=[zo[0]-Bo[0],zo[1]-Bo[1]],hl=[gs[0]-Po[0],gs[1]-Po[1]];function As(Da,Il,Tc){return[Da[0]+Il*Tc[0],Da[1]+Il*Tc[1]]}var ja=[Po[0]-Bo[0],Po[1]-Bo[1]],Sl=an(Oo,hl),wl=Sl*Sl,cl=nn(Oo,Oo);if(wl>0){var fl=an(ja,hl)/Sl;if(fl<0||fl>1)return null;var Ds=an(ja,Oo)/Sl;return Ds<0||Ds>1?null:fl===0||fl===1?[As(Bo,fl,Oo)]:Ds===0||Ds===1?[As(Po,Ds,hl)]:[As(Bo,fl,Oo)]}if((wl=(Sl=an(ja,Oo))*Sl)>0)return null;var Uo=nn(Oo,ja)/cl,Vs=Uo+nn(Oo,hl)/cl,Xl=Math.min(Uo,Vs),Ur=Math.max(Uo,Vs);return Xl<=1&&Ur>=0?Xl===1?[As(Bo,Xl>0?Xl:0,Oo)]:Ur===0?[As(Bo,Ur<1?Ur:1,Oo)]:[As(Bo,Xl>0?Xl:0,Oo),As(Bo,Ur<1?Ur:1,Oo)]:null})(je.point,je.otherEvent.point,Ye.point,Ye.otherEvent.point),In=Di?Di.length:0;if(In===0||In===1&&(Ve(je.point,Ye.point)||Ve(je.otherEvent.point,Ye.otherEvent.point))||In===2&&je.isSubject===Ye.isSubject)return 0;if(In===1)return Ve(je.point,Di[0])||Ve(je.otherEvent.point,Di[0])||ei(je,Di[0],ri),Ve(Ye.point,Di[0])||Ve(Ye.otherEvent.point,Di[0])||ei(Ye,Di[0],ri),1;var xn=[],Hn=!1,vr=!1;return Ve(je.point,Ye.point)?Hn=!0:si(je,Ye)===1?xn.push(Ye,je):xn.push(je,Ye),Ve(je.otherEvent.point,Ye.otherEvent.point)?vr=!0:si(je.otherEvent,Ye.otherEvent)===1?xn.push(Ye.otherEvent,je.otherEvent):xn.push(je.otherEvent,Ye.otherEvent),Hn&&vr||Hn?(Ye.type=F,je.type=Ye.inOut===je.inOut?U:G,Hn&&!vr&&ei(xn[1].otherEvent,xn[0].point,ri),2):vr?(ei(xn[0],xn[1].point,ri),3):xn[0]!==xn[3].otherEvent?(ei(xn[0],xn[1].point,ri),ei(xn[1],xn[2].point,ri),3):(ei(xn[0],xn[1].point,ri),ei(xn[3].otherEvent,xn[2].point,ri),3)}function Bn(je,Ye){if(je===Ye)return 0;if(Qi(je.point,je.otherEvent.point,Ye.point)!==0||Qi(je.point,je.otherEvent.point,Ye.otherEvent.point)!==0)return Ve(je.point,Ye.point)?je.isBelow(Ye.otherEvent.point)?-1:1:je.point[0]===Ye.point[0]?je.point[1]Ye.contourId?1:-1:si(je,Ye)===1?1:-1}var Qn=function(){this.points=[],this.holeIds=[],this.holeOf=null,this.depth=null};function mn(je,Ye,ri,Di){var In,xn=je+1,Hn=Ye[je].point,vr=Ye.length;for(xnDi;)xn--;return xn}Qn.prototype.isExterior=function(){return this.holeOf==null};var cr=Tn,to=Tn;function Tn(je,Ye){if(!(this instanceof Tn))return new Tn(je,Ye);if(this.data=je||[],this.length=this.data.length,this.compare=Ye||tr,this.length>0)for(var ri=(this.length>>1)-1;ri>=0;ri--)this._down(ri)}function tr(je,Ye){return jeYe?1:0}Tn.prototype={push:function(je){this.data.push(je),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var je=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),je}},peek:function(){return this.data[0]},_up:function(je){for(var Ye=this.data,ri=this.compare,Di=Ye[je];je>0;){var In=je-1>>1,xn=Ye[In];if(ri(Di,xn)>=0)break;Ye[je]=xn,je=In}Ye[je]=Di},_down:function(je){for(var Ye=this.data,ri=this.compare,Di=this.length>>1,In=Ye[je];je=0)break;Ye[je]=vr,je=xn}Ye[je]=In}},cr.default=to;var Br=Math.max,uo=Math.min,Lo=0;function bo(je,Ye,ri,Di,In,xn){var Hn,vr,Bo,zo,Po,gs;for(Hn=0,vr=je.length-1;Hn0?gs.left=!0:Po.left=!0;var Ll=Bo[0],Oo=Bo[1];In[0]=uo(In[0],Ll),In[1]=uo(In[1],Oo),In[2]=Br(In[2],Ll),In[3]=Br(In[3],Oo),Di.push(Po),Di.push(gs)}}var $n=[];function mo(je,Ye,ri){typeof je[0][0][0]=="number"&&(je=[je]),typeof Ye[0][0][0]=="number"&&(Ye=[Ye]);var Di=(function(Oo,hl,As){var ja=null;return Oo.length*hl.length==0&&(As===q?ja=$n:As===X?ja=Oo:As!==Z&&As!==ue||(ja=Oo.length===0?hl:Oo)),ja})(je,Ye,ri);if(Di)return Di===$n?null:Di;var In=[1/0,1/0,-1/0,-1/0],xn=[1/0,1/0,-1/0,-1/0],Hn=(function(Oo,hl,As,ja,Sl){var wl,cl,fl,Ds,Uo,Vs,Xl=new cr(null,si);for(fl=0,Ds=Oo.length;flja[2]||ja[0]>As[2]||As[1]>ja[3]||ja[1]>As[3])&&(Sl===q?wl=$n:Sl===X?wl=Oo:Sl!==Z&&Sl!==ue||(wl=Oo.concat(hl))),wl})(je,Ye,In,xn,ri))return Di===$n?null:Di;for(var vr=(function(Oo){var hl,As,ja=(function(fl){var Ds,Uo,Vs,Xl,Ur=[];for(Uo=0,Vs=fl.length;Uo0){var qs=Da[Qd];if(qs.holeOf!=null){var Od=qs.holeOf;Da[Od].holeIds.push(Il),Tc.holeOf=Od,Tc.depth=Da[Qd].depth}else Da[Qd].holeIds.push(Il),Tc.holeOf=Qd,Tc.depth=Da[Qd].depth+1}else Tc.holeOf=null,Tc.depth=Da[Qd].depth}else Tc.holeOf=null,Tc.depth=0;return Tc})(ja[hl],wl,fl),Uo=function(Ur){Sl[Ur]=!0,Ur=ja.length)&&ja[Vs];);wl.push(Ds)}};for(hl=0,As=ja.length;hlXl||wl===X&&Ur.point[0]>ja[2])break;if(Ur.left){fl=cl=Uo.insert(Ur),cl=cl!==(Ds=Uo.minNode())?Uo.prev(cl):null,fl=Uo.next(fl);var Da=cl?cl.key:null;if(he(Ur,Da,wl),fl&&dr(Ur,fl.key,Oo)===2&&(he(Ur,Da,wl),he(fl.key,Ur,wl)),cl&&dr(cl.key,Ur,Oo)===2){var Il=cl;he(Da,(Il=Il!==Ds?Uo.prev(Il):null)?Il.key:null,wl),he(Ur,Da,wl)}}else fl=cl=Uo.find(Ur=Ur.otherEvent),cl&&fl&&(cl=cl!==Ds?Uo.prev(cl):null,fl=Uo.next(fl),Uo.remove(Ur),fl&&cl&&dr(cl.key,fl.key,Oo))}return Vs})(Hn,0,0,In,xn,ri)),Bo=[],zo=0;zo{b.push(new yi(G,k+(G-I)/(F-I)*(U-k)))}:(b,I,k,F,U,G)=>{b.push(new yi(I+(G-k)/(U-k)*(F-I),G))};for(let b of u){let I=[];for(let k of b){if(k.length<=2)continue;let F=[];for(let q=0;qs&&v(F,Z,X,ue,he,s):_e>d?Fe=s&&v(F,Z,X,ue,he,s),Fe>d&&_e<=d&&v(F,Z,X,ue,he,d)}let U=k[k.length-1],G=h===0?U.x:U.y;G>=s&&G<=d&&F.push(U),F.length&&(U=F[F.length-1],F[0].x===U.x&&F[0].y===U.y||F.push(F[0]),I.push(F))}I.length&&f.push(I)}return f}function fhe(u,s){let d=jH(u),h=jH([s]),f=yZ.intersection(d,h);return f==null?[]:vZ(f)}function ghe(u,s){let h=jH(u,65536),f=[];for(;s.valid();s.next()){let[v,b]=s.get(),I=v.x*65536,k=v.y*65536,F=b.x*65536,U=b.y*65536,G=F-I,q=U-k,Z=Math.hypot(G,q);if(Z===0)continue;let X=Math.trunc(q/Z*3),ue=-Math.trunc(G/Z*3);f.push([[[I,k],[F,U],[F+X,U+ue],[I+X,k+ue],[I,k]]])}return f.length>0&&(h=yZ.diff(h,f)),vZ(h,1/65536)}function jH(u,s=1){return[u.map(d=>d.map(h=>[h.x*s,h.y*s]))]}function vZ(u,s=1){return u.map(d=>d.map((h,f)=>{let v=h.map(b=>new yi(b[0]*s,b[1]*s).round());return f>0&&v.reverse(),v}))}class $H{constructor(s,d){this.layoutVertexArray=new pu,this.indexArray=new fd,this.lineIndexArray=new ld,this.triangleSegments=new Ml,this.lineSegments=new Ml,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut}),this.uploaded=!1,d&&(this.elevatedLayoutVertexArray=new bb)}update(s,d,h,f,v,b,I,k){this.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,k)}isEmpty(){return this.layoutVertexArray.length===0}needsUpload(){return this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,she.members),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.lineIndexBuffer=s.createIndexBuffer(this.lineIndexArray),this.elevatedLayoutVertexArray&&this.elevatedLayoutVertexArray.length>0&&(this.elevatedLayoutVertexBuffer=s.createVertexBuffer(this.elevatedLayoutVertexArray,lhe.members))),this.programConfigurations.upload(s),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(s,d,h,f,v,b,I){this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,d,h,f,v,b,void 0,I)}}class qH{constructor(s){this.zoom=s.zoom,this.pixelRatio=s.pixelRatio,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.fqid),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.lut=s.lut,this.bufferData=new $H(s,!1),this.elevationBufferData=new $H(s,!0),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.projection=s.projection,this.elevationMode=this.layers[0].layout.get("fill-elevation-reference"),this.sourceLayerIndex=s.sourceLayerIndex,this.worldview=s.worldview}updateFootprints(s,d){}populate(s,d,h,f){this.hasPattern=D3("fill",this.layers,this.pixelRatio,d);let v=this.layers[0].layout.get("fill-sort-key"),b=[];for(let{feature:I,id:k,index:F,sourceLayerIndex:U}of s){let G=this.layers[0]._featureFilter.needGeometry,q=en(I,G);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),q,h))continue;let Z=v?v.evaluate(q,{},h,d.availableImages):void 0,X={id:k,properties:I.properties,type:I.type,sourceLayerIndex:U,index:F,geometry:G?q.geometry:Mn(I,h,f),patterns:{},sortKey:Z};b.push(X)}v&&b.sort((I,k)=>I.sortKey-k.sortKey);for(let I of b){let{geometry:k,index:F,sourceLayerIndex:U}=I;if(this.hasPattern){let G=Eg("fill",this.layers,I,this.zoom,this.pixelRatio,d);this.patternFeatures.push(G)}else this.addFeature(I,k,F,h,{},d.availableImages,d.brightness,d.elevationFeatures);d.featureIndex.insert(s[F].feature,k,F,U,this.index)}}update(s,d,h,f,v,b,I){this.bufferData.update(s,d,h,f,v,b,I,this.worldview),this.elevationBufferData.update(s,d,h,f,v,b,I,this.worldview),this.elevatedStructures&&this.elevatedStructures.update(s,d,h,f,v,b,I,this.worldview)}addFeatures(s,d,h,f,v,b){for(let I of this.patternFeatures)this.addFeature(I,I.geometry,I.index,d,h,f,b,s.elevationFeatures)}isEmpty(){return this.bufferData.isEmpty()&&this.elevationBufferData.isEmpty()}uploadPending(){return!this.uploaded||this.bufferData.needsUpload()||this.elevationBufferData.needsUpload()}upload(s){this.bufferData.upload(s),this.elevationBufferData.upload(s),this.elevatedStructures&&this.elevatedStructures.upload(s)}destroy(){this.bufferData.destroy(),this.elevationBufferData.destroy(),this.elevatedStructures&&this.elevatedStructures.destroy()}addFeature(s,d,h,f,v,b=[],I,k){let F=WD(d,500);this.elevationMode!=="none"?this.addElevatedRoadFeature(s,F,f,h,k):this.addGeometry(F,this.bufferData),this.bufferData.populatePaintArrays(s,h,v,b,f,I,this.worldview),this.elevationBufferData.populatePaintArrays(s,h,v,b,f,I,this.worldview)}getUnevaluatedPortalGraph(){return this.elevatedStructures?this.elevatedStructures.unevaluatedPortals:void 0}getElevationPolygons(){return this.elevatedStructures?this.elevatedStructures.portalPolygons:void 0}setEvaluatedPortalGraph(s,d,h,f,v){this.elevatedStructures&&(this.elevatedStructures.construct(s),this.elevatedStructures.populatePaintArrays(d,h,f,v,this.worldview))}addElevatedRoadFeature(s,d,h,f,v){let b=new Array,I=xl.getElevationFeature(s,v);if(!I)return void this.addGeometry(d,this.bufferData);{let F=this.clipPolygonsToTile(d,1);F.length>0&&b.push({polygons:F,elevationFeature:I,elevationTileID:h})}let k={guardRailEnabled:this.layers[0].layout.get("fill-construct-bridge-guard-rail").evaluate(s,{},h),featureIndex:f};for(let F of b)if(F.elevationFeature){if(this.elevationMode==="hd-road-base"){this.elevatedStructures||(this.elevatedStructures=new Pf(F.elevationTileID,this.layers,this.zoom,this.lut));let G=F.elevationFeature.isTunnel(),q=0;s.properties.hasOwnProperty(ss)&&(q=+s.properties[ss]);for(let Z of F.polygons)this.elevatedStructures.addPortalCandidates(F.elevationFeature.id,Z,G,F.elevationFeature,q)}F.elevationFeature.constantHeight==null&&(F.polygons=this.prepareElevatedPolygons(F.polygons,F.elevationFeature,F.elevationTileID));let U=new Jc(h,F.elevationTileID);this.addElevatedGeometry(F.polygons,U,F.elevationFeature,this.elevationMode==="hd-road-base"?0:.05,f,k)}}addElevatedGeometry(s,d,h,f,v,b){let I={elevation:h,elevationSampler:d,bias:f,index:v,featureInfo:b},[k,F]=this.addGeometry(s,this.elevationBufferData,I);this.elevationBufferData.heightRange==null?this.elevationBufferData.heightRange={min:k,max:F}:(this.elevationBufferData.heightRange.min=Math.min(this.elevationBufferData.heightRange.min,k),this.elevationBufferData.heightRange.max=Math.max(this.elevationBufferData.heightRange.max,F))}addGeometry(s,d,h){let f=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,b=null;h&&(b=h.elevationSampler.constantElevation(h.elevation,h.bias),b!=null&&(f=b,v=b));let I=(k,F,U)=>{if(h!=null)if(F.push(k),b!=null)d.elevatedLayoutVertexArray.emplaceBack(b),U.push(b);else{let G=h.elevationSampler.pointElevation(k,h.elevation,h.bias);d.elevatedLayoutVertexArray.emplaceBack(G),U.push(G),f=Math.min(f,G),v=Math.max(v,G)}};for(let k of s){let F=0;for(let Le of k)F+=Le.length;let U=d.triangleSegments.prepareSegment(F,d.layoutVertexArray,d.indexArray),G=U.vertexLength,q=[],Z=[],X=[],ue=[],he=[],_e=d.layoutVertexArray.length;for(let Le of k){if(Le.length===0)continue;Le!==k[0]&&Z.push(q.length/2);let Ve=d.lineSegments.prepareSegment(Le.length,d.layoutVertexArray,d.lineIndexArray),dt=Ve.vertexLength;h&&he.push(d.layoutVertexArray.length-_e),I(Le[0],X,ue),d.layoutVertexArray.emplaceBack(Le[0].x,Le[0].y),d.lineIndexArray.emplaceBack(dt+Le.length-1,dt),q.push(Le[0].x),q.push(Le[0].y);for(let ut=1;ut0&&h&&this.elevationMode==="hd-road-base"){let Le=h.elevation.isTunnel(),Ve=h.elevation.safeArea,dt=this.elevatedStructures.addVertices(X,ue);this.elevatedStructures.addTriangles(Fe,dt,Le);let ut=he.length;if(ut>0){for(let It=0;It=h&&Z.max.x<=v&&Z.min.y>=f&&Z.max.y<=b?k:F).push(q)}if(k.length===s.length)return s;let U=[new yi(h,f),new yi(v,f),new yi(v,b),new yi(h,b),new yi(h,f)],G=k;for(let q of F)G.push(...fhe(q,U));return G}}let bZ,CZ,xZ,SZ;Ln(qH,"FillBucket",{omit:["layers","patternFeatures"]}),Ln($H,"FillBufferData"),Ln(Pf,"ElevatedStructures");class M3{constructor(s,d,h,f){if(this.triangleCount=d.length/3,this.min=new yi(0,0),this.max=new yi(0,0),this.xScale=0,this.yScale=0,this.cellsX=0,this.cellsY=0,this.cells=[],this.payload=[],this.triangleCount===0||s.length===0)return;let[v,b]=[s[0].clone(),s[0].clone()];for(let G=1;GG.cellIdx-q.cellIdx||G.triIdx-q.triIdx);let U=0;for(;Uthis.max.x||this.min.x>s.x||s.y>this.max.y||this.min.y>s.y)return;let h=H0(s.x-this.min.x,this.xScale,this.cellsX),f=H0(s.y-this.min.y,this.yScale,this.cellsY),v=this.cells[f*this.cellsX+h];if(v){this._lazyInitLookup();for(let b=0;bthis.max.x||this.min.x>d.x||s.y>this.max.y||this.min.y>d.y)return;this._lazyInitLookup();let f=H0(s.x-this.min.x,this.xScale,this.cellsX),v=H0(d.x-this.min.x,this.xScale,this.cellsX),b=H0(s.y-this.min.y,this.yScale,this.cellsY),I=H0(d.y-this.min.y,this.yScale,this.cellsY);for(let k=b;k<=I;k++)for(let F=f;F<=v;F++){let U=this.cells[k*this.cellsX+F];if(U)for(let G=0;Gd.fqid),this.index=s.index,this.hasPattern=!1,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.footprints=[],this.worldview=s.worldview}updateFootprints(s,d){for(let h of this.footprints)d.push({footprint:h,id:s})}populate(s,d,h,f){let v=[];for(let{feature:b,id:I,index:k,sourceLayerIndex:F}of s){let U=this.layers[0]._featureFilter.needGeometry,G=en(b,U);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),G,h))continue;let q={id:I,properties:b.properties,type:b.type,sourceLayerIndex:F,index:k,geometry:U?G.geometry:Mn(b,h,f),patterns:{}};v.push(q)}for(let b of v){let{geometry:I,index:k,sourceLayerIndex:F}=b;this.addFeature(b,I,k,h,{},d.availableImages,d.brightness),d.featureIndex.insert(s[k].feature,I,k,F,this.index)}}isEmpty(){return this.footprints.length===0}uploadPending(){return!1}upload(s){}update(s,d,h,f,v,b,I){}destroy(){}addFeature(s,d,h,f,v,b=[],I){for(let k of WD(d,2)){let F=[],U=[],G=[],q=new yi(1/0,1/0),Z=new yi(-1/0,-1/0);for(let he of k)if(he.length!==0){he!==k[0]&&G.push(U.length/2);for(let _e=0;_eb===f)===void 0})(h,u.clipScope)}function O3(u,s){return u.x-s.x||u.y-s.y}function TZ(u,s){return O3(u.min,s.min)===0&&O3(u.max,s.max)===0}function WH(u,s){return!(u.min.x>s.max.x||u.max.xs.max.y||u.max.ynew yi((k.x+v.x*pn)*I-b.x*pn,(k.y+v.y*pn)*I-b.y*pn))}return QH(d,f,u.indices,0,u.indices.length,0,0)}function XH(u,s,d,h){let f=Math.pow(2,h.z-d.z);return new yi((u+d.x*pn)*f-h.x*pn,(s+d.y*pn)*f-h.y*pn)}function JH(u,s){let d=[];s.grid.queryPoint(u,d);let h=s.indices,f=s.vertices;for(let v=0;v0&&(h.length>1&&d.push(h),h=[])}return h.length>1&&d.push(h),d}let tG=Zi.types,QD=["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"],xhe=["fill-extrusion-flood-light-ground-radius"],She=Math.pow(2,13),whe=Math.pow(2,15)-1,DZ=new yi(0,1),kS=2147483648;function ZD(u,s,d,h,f,v,b,I){u.emplaceBack((s<<1)+b,(d<<1)+v,(Math.floor(h*She)<<1)+f,Math.round(I))}function XD(u,s,d){u.emplaceBack(s.x*pn,s.y*pn,d?1:0)}function R3(u,s,d,h,f,v){u.emplaceBack(s.x,s.y,(d.x<<1)+h,(d.y<<1)+f,v)}function PR(u,s,d){u.emplaceBack(s.x,s.y,s.z,d[0]*16384,d[1]*16384,d[2]*16384)}class kZ{constructor(){this.vertexOffset=0,this.vertexCount=0,this.indexOffset=0,this.indexCount=0}}class MZ{constructor(){this.centroidXY=new yi(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 yi(Number.MAX_VALUE,Number.MAX_VALUE),this.max=new yi(-Number.MAX_VALUE,-Number.MAX_VALUE),this.height=0,this.buildingId=0}span(){return new yi(this.max.x-this.min.x,this.max.y-this.min.y)}}class OZ{constructor(){this.acc=new yi(0,0),this.accCount=0,this.centroidDataIndex=0}startRing(s,d){s.min.x===Number.MAX_VALUE&&(s.min.x=s.max.x=d.x,s.min.y=s.max.y=d.y)}appendEdge(s,d,h){this.accCount++,this.acc._add(d);let f=!!this.borders;d.xs.max.x&&(s.max.x=d.x,f=!0),d.ys.max.y&&(s.max.y=d.y,f=!0),((d.x===0||d.x===pn)&&d.x===h.x)!=((d.y===0||d.y===pn)&&d.y===h.y)&&this.processBorderOverlap(d,h),f&&this.checkBorderIntersection(d,h)}checkBorderIntersection(s,d){d.x<0!=s.x<0&&this.addBorderIntersection(0,mr(d.y,s.y,(0-d.x)/(s.x-d.x))),d.x>pn!=s.x>pn&&this.addBorderIntersection(1,mr(d.y,s.y,(pn-d.x)/(s.x-d.x))),d.y<0!=s.y<0&&this.addBorderIntersection(2,mr(d.x,s.x,(0-d.y)/(s.y-d.y))),d.y>pn!=s.y>pn&&this.addBorderIntersection(3,mr(d.x,s.x,(pn-d.y)/(s.y-d.y)))}addBorderIntersection(s,d){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[s];dh[1]&&(h[1]=d)}processBorderOverlap(s,d){if(s.x===d.x){if(s.y===d.y)return;let h=s.x===0?0:1;this.addBorderIntersection(h,d.y),this.addBorderIntersection(h,s.y)}else{let h=s.y===0?2:3;this.addBorderIntersection(h,d.x),this.addBorderIntersection(h,s.x)}}centroid(){return this.accCount===0?new yi(0,0):new yi(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((s,d)=>s+ +(d[0]!==Number.MAX_VALUE),0):0}}function RZ(u,s){let d=u.add(s)._unit(),h=pt(u.x*d.x+u.y*d.y,-1,1);var f,v,b;return f=Math.acos(h),Math.min(4,Math.max(-4,Math.tan(f)))/4*whe*((v=u).x*(b=s).y-v.y*b.x<0?-1:1)}let Ihe=[u=>u.x<0,u=>u.x>pn,u=>u.y<0,u=>u.y>pn];function The(u,s,d,h){let f=[4];if(h===0)return f;d._mult(h);let v=u.sub(d),b=s.sub(d),I=[u,s,v,b];for(let k=0;k<4;k++)for(let F of I)if(Ihe[k](F)){f.push(k);break}return f}class iG{constructor(s){this.vertexArray=new FD,this.indexArray=new fd,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut},d=>xhe.includes(d)),this._segments=new Ml,this.hiddenByLandmarkVertexArray=new xS,this._segmentToGroundQuads={},this._segmentToGroundQuads[0]=[],this._segmentToRegionTriCounts={},this._segmentToRegionTriCounts[0]=[0,0,0,0,0],this.regionSegments={},this.regionSegments[4]=new Ml}getDefaultSegment(){return this.regionSegments[4]}hasData(){return this.vertexArray.length!==0}addData(s,d,h,f=!1){let v=s.length;if(v>2){let b=Math.max(0,this._segments.get().length-1),I=this._segments._prepareSegment(4*v,this.vertexArray.length,2*this._segmentToGroundQuads[b].length),k;b!==this._segments.get().length-1&&(b++,this._segmentToGroundQuads[b]=[],this._segmentToRegionTriCounts[b]=[0,0,0,0,0]);{let F=s[0],U=s[1];k=RZ(F.sub(s[v-1])._perp()._unit(),U.sub(F)._perp()._unit())}for(let F=0;Ff.region-v.region);for(let h=0;hk+F,0);let I=0;for(let k=0;k<=4;k++){let F=b[k];if(F!==0){let U=this.regionSegments[k];U||(U=this.regionSegments[k]=new Ml);let G={vertexOffset:v.vertexOffset,primitiveOffset:v.primitiveOffset+I,vertexLength:v.vertexLength,primitiveLength:F};U.get().push(G)}I+=F}for(let k=0;k0?this.hiddenByLandmarkVertexBuffer=s.createVertexBuffer(this.hiddenByLandmarkVertexArray,mm.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 s=0;s<=4;s++){let d=this.regionSegments[s];d&&d.destroy()}}}}class P3{constructor(s){this.zoom=s.zoom,this.canonical=s.canonical,this.overscaling=s.overscaling,this.layers=s.layers,this.pixelRatio=s.pixelRatio,this.layerIds=this.layers.map(d=>d.fqid),this.index=s.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=s.projection,this.activeReplacements=[],this.replacementUpdateTime=0,this.centroidData=[],this.footprintIndices=new fd,this.footprintVertices=new pu,this.footprintSegments=[],this.layoutVertexArray=new ox,this.centroidVertexArray=new xR,this.wallVertexArray=new y3,this.indexArray=new fd,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut},d=>QD.includes(d)),this.segments=new Ml,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.groundEffect=new iG(s),this.maxHeight=0,this.partLookup={},this.triangleSubSegments=[],this.polygonSegments=[],this.worldview=s.worldview}updateFootprints(s,d){}populate(s,d,h,f){this.features=[],this.hasPattern=D3("fill-extrusion",this.layers,this.pixelRatio,d),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=jt(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:v,id:b,index:I,sourceLayerIndex:k}of s){let F=this.layers[0]._featureFilter.needGeometry,U=en(v,F);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),U,h))continue;let G={id:b,sourceLayerIndex:k,index:I,geometry:F?U.geometry:Mn(v,h,f),properties:v.properties,type:v.type,patterns:{}},q=this.layoutVertexArray.length,Z=tG[G.type]==="Polygon";if(this.hasPattern)this.features.push({featureId:v.id,feature:Eg("fill-extrusion",this.layers,G,this.zoom,this.pixelRatio,d)});else if(this.wallMode)for(let X of G.geometry)for(let ue of AZ(X,Z))this.addFeature(v.id,G,[ue],I,h,{},d.availableImages,f,d.brightness);else this.addFeature(v.id,G,G.geometry,I,h,{},d.availableImages,f,d.brightness);d.featureIndex.insert(v,G.geometry,I,k,this.index,q)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles(),this.groundEffect.prepareBorderSegments(),this.polygonSegments.length=0}addFeatures(s,d,h,f,v,b){for(let{featureId:I,feature:k}of this.features){let F=tG[k.type]==="Polygon",{geometry:U}=k;if(this.wallMode)for(let G of U)for(let q of AZ(G,F))this.addFeature(I,k,[q],k.index,d,h,f,v,b);else this.addFeature(I,k,U,k.index,d,h,f,v,b)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles()}update(s,d,h,f,v,b,I){this.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,this.worldview),this.groundEffect.update(s,d,v,h,f,b,I,this.worldview)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload||this.groundEffect.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,bhe),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.wallVertexBuffer=s.createVertexBuffer(this.wallVertexArray,vhe.members),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=s.createVertexBuffer(this.layoutVertexExtArray,Ag.members,!0)),this.groundEffect.upload(s)),this.groundEffect.uploadPaintProperties(s),this.programConfigurations.upload(s),this.uploaded=!0}uploadCentroid(s){this.groundEffect.uploadHiddenByLandmark(s),this.needsCentroidUpdate&&(!this.centroidVertexBuffer&&this.centroidVertexArray.length>0?this.centroidVertexBuffer=s.createVertexBuffer(this.centroidVertexArray,yhe.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(s,d,h,f,v,b,I,k,F){let U=this.layers[0].paint.get("fill-extrusion-flood-light-ground-radius").evaluate(d,{})/this.tileToMeter,G=[new yi(0,0),new yi(pn,pn)],q=k.projection,Z=q.name==="globe",X=this.wallMode||tG[d.type]==="Polygon",ue=new OZ;ue.centroidDataIndex=this.centroidData.length;let he=new MZ;he.buildingId=s,d.properties&&d.properties.hasOwnProperty("building_id")&&(he.buildingId=d.properties.building_id);let _e=this.layers[0].paint.get("fill-extrusion-base").evaluate(d,{},v)<=0,Fe=this.layers[0].paint.get("fill-extrusion-height").evaluate(d,{},v),Le;if(he.height=Fe,he.vertexArrayOffset=this.layoutVertexArray.length,he.groundVertexArrayOffset=this.groundEffect.vertexArray.length,Z&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new Cb),this.wallMode){if(Z)return void Ko("Non zero fill-extrusion-line-width is not yet supported on globe.");if(h.length!==1)return;Le=(function(Ht){let Fi=Ht[0].x===Ht[Ht.length-1].x&&Ht[0].y===Ht[Ht.length-1].y;(function(mn){let cr=0,to=mn.length;for(let Tn=0;Tn=0})(Ht)||(Ht=Ht.reverse());let Vi={geometry:[],joinNormals:[],indices:[]},Wi=[],rn=[],Ei=[],Qi=Ht.length;for(;Qi>=2&&Ht[Qi-1].equals(Ht[Qi-2]);)Qi--;if(Qi<(Fi?3:2))return Vi;let si,ei,an,nn,dr,Bn=0;for(;Bn0,Br="miter",uo=2;Br==="miter"&&Tn>uo&&(Br="bevel"),Br==="bevel"&&(Tn>100&&(Br="flipbevel"),Tn{let je=new yi(bo.x,bo.y),Ye=new yi(bo.x,bo.y);je.x+=$n.x*xa,je.y+=$n.y*xa,Ye.x-=$n.x*Math.max(mo,1),Ye.y-=$n.y*Math.max(mo,1),Ei.push($n),Wi.push(je),rn.push(Ye)};if(Br==="miter")cr._mult(Tn),Lo(si,cr,0,0);else if(Br==="flipbevel")cr=dr.mult(-1),Lo(si,cr,0,0),Lo(si,cr.mult(-1),0,0);else{let bo=-Math.sqrt(Tn*Tn-1),$n=tr?bo:0,mo=tr?0:bo;ei&&Lo(si,nn,$n,mo),an&&Lo(si,dr,$n,mo)}}Vi.geometry=[...Wi,...rn.reverse(),Wi[0]],Vi.joinNormals=[...Ei,...Ei.reverse(),Ei[Ei.length-1]];let Qn=Vi.geometry.length-1;for(let mn=0;mnHt<(Fi.length-1)/2||Ht===Fi.length-1,dt=this.wallMode?[h]:WD(h,500);for(let Ht=dt.length-1;Ht>=0;Ht--){let Fi=dt[Ht];(Fi.length===0||(ut=Fi[0]).every(Ji=>Ji.x<=0)||ut.every(Ji=>Ji.x>=pn)||ut.every(Ji=>Ji.y<=0)||ut.every(Ji=>Ji.y>=pn))&&dt.splice(Ht,1)}var ut;let It;if(Z)It=zZ(dt,G,v);else{It=[];for(let Ht of dt)It.push({polygon:Ht,bounds:G})}let Ot=X?this.edgeRadius:0,Lt=Ot>0&&this.zoom<17,ki=(Ht,Fi)=>{if(Ht.length===0)return!1;let Ji=Ht[Ht.length-1];return Fi.x===Ji.x&&Fi.y===Ji.y};for(let{polygon:Ht,bounds:Fi}of It){let Ji=0,Vi=0;for(let Qi of Ht)X&&!Qi[0].equals(Qi[Qi.length-1])&&Qi.push(Qi[0]),Vi+=X?Qi.length-1:Qi.length;let Wi=this.segments.prepareSegment((X?5:4)*Vi,this.layoutVertexArray,this.indexArray);he.footprintSegIdx<0&&(he.footprintSegIdx=this.footprintSegments.length),he.polygonSegIdx<0&&(he.polygonSegIdx=this.polygonSegments.length);let rn={triangleArrayOffset:this.indexArray.length,triangleCount:0,triangleSegIdx:this.segments.segments.length-1},Ei=new kZ;if(Ei.vertexOffset=this.footprintVertices.length,Ei.indexOffset=3*this.footprintIndices.length,Ei.ringIndices=[],X){let Qi=[],si=[];Ji=Wi.vertexLength;for(let an=0;an4&&LZ(si[si.length-2],si[0],si[1]),an=Ot?Ehe(si[si.length-2],si[0],si[1],Ot):0,nn=[],dr,Bn,Qn;Bn=si[1].sub(si[0])._perp()._unit();let mn=!0;for(let cr=1,to=0;cr0?1:0,$n=Tn.dist(tr);if(to+$n>32768&&(to=0),Ot){Qn=Br.sub(tr)._perp()._unit();let Ye=NZ(Tn,tr,Br,PZ(Bn,Qn),Ot);isNaN(Ye)&&(Ye=0);let ri=tr.sub(Tn)._unit();Tn=Tn.add(ri.mult(an))._round(),tr=tr.add(ri.mult(-Ye))._round(),an=Ye,Bn=Qn,_e&&this.zoom>=17&&(ki(nn,Tn)||nn.push(Tn),ki(nn,tr)||nn.push(tr))}let mo=Wi.vertexLength,xa=si.length>4&&LZ(Tn,tr,Br),je=BZ(to,ei,mn);if(ZD(this.layoutVertexArray,Tn.x,Tn.y,Lo,bo,0,0,je),ZD(this.layoutVertexArray,Tn.x,Tn.y,Lo,bo,0,1,je),this.wallMode){let Ye=Ve(cr-1,si),ri=Le.joinNormals[cr-1];XD(this.wallVertexArray,ri,Ye),XD(this.wallVertexArray,ri,Ye)}if(to+=$n,je=BZ(to,xa,!mn),ei=xa,ZD(this.layoutVertexArray,tr.x,tr.y,Lo,bo,0,0,je),ZD(this.layoutVertexArray,tr.x,tr.y,Lo,bo,0,1,je),this.wallMode){let Ye=Ve(cr,si),ri=Le.joinNormals[cr];XD(this.wallVertexArray,ri,Ye),XD(this.wallVertexArray,ri,Ye)}if(Wi.vertexLength+=4,this.indexArray.emplaceBack(mo+0,mo+1,mo+2),this.indexArray.emplaceBack(mo+1,mo+3,mo+2),Wi.primitiveLength+=2,Ot){let Ye=Ji+(cr===1?si.length-2:cr-2),ri=cr===1?Ji:Ye+1;if(this.indexArray.emplaceBack(mo+1,Ye,mo+3),this.indexArray.emplaceBack(Ye,ri,mo+3),Wi.primitiveLength+=2,dr===void 0&&(dr=mo),!nG(Br,si[cr],Fi)){let Di=cr===si.length-1?dr:Wi.vertexLength;this.indexArray.emplaceBack(mo+2,mo+3,Di),this.indexArray.emplaceBack(mo+3,Di+1,Di),this.indexArray.emplaceBack(mo+3,ri,Di+1),Wi.primitiveLength+=3}mn=!mn}if(Z){let Ye=this.layoutVertexExtArray,ri=q.projectTilePoint(Tn.x,Tn.y,v),Di=q.projectTilePoint(tr.x,tr.y,v),In=q.upVector(v,Tn.x,Tn.y),xn=q.upVector(v,tr.x,tr.y);PR(Ye,ri,In),PR(Ye,ri,In),PR(Ye,Di,xn),PR(Ye,Di,xn)}}X&&(Ji+=si.length-1),_e&&Ot&&this.zoom>=17&&(nn.length!==0&&ki(nn,nn[0])&&nn.pop(),this.groundEffect.addData(nn,Fi,U,Ot>0))}this.footprintSegments.push(Ei),rn.triangleCount=this.indexArray.length-rn.triangleArrayOffset,this.polygonSegments.push(rn),++he.footprintSegLen,++he.polygonSegLen}if(he.vertexCount=this.layoutVertexArray.length-he.vertexArrayOffset,he.groundVertexCount=this.groundEffect.vertexArray.length-he.groundVertexArrayOffset,he.vertexCount!==0){if(he.centroidXY=ue.borders?DZ:this.encodeCentroid(ue,he),this.centroidData.push(he),ue.borders){this.featuresOnBorder.push(ue);let Ht=this.featuresOnBorder.length-1;for(let Fi=0;Fithis.featuresOnBorder[d].borders[s][0]-this.featuresOnBorder[h].borders[s][0])}splitToSubtiles(){let s=[];for(let I=0;Ipn),U=2*F+(+(k.min.x+k.max.x>pn)^F);for(let G=0;GI.triangleSegmentIdx===k.triangleSegmentIdx?I.subtile-k.subtile:I.triangleSegmentIdx-k.triangleSegmentIdx);let h=0,f=0,v=0;for(let I of s){if(I.triangleSegmentIdx!==h)break;v++}let b=s.length;for(;f!==s.length;){h=s[f].triangleSegmentIdx;let I=0,k=f,F=f;for(let U=k;U0&&this.triangleSubSegments.push({segment:Z,min:G,max:q}),k=F;for(let X=k;X[ue[0]*(1-_e[0])+he[0]*_e[0],ue[1]*(1-_e[1])+he[1]*_e[1]],Z=[],X=[];for(let ue of this.triangleSubSegments){Z[0]=ue.min.x/pn,Z[1]=ue.min.y/pn,X[0]=ue.max.x/pn,X[1]=ue.max.y/pn;let he=q(U,G,Z),_e=q(U,G,X);if(new Lr([he[0],he[1],v],[_e[0],_e[1],b]).intersectsPrecise(h)===0){F&&(f.segments.push(F),F=void 0);continue}let Fe=ue.segment;F&&F.vertexOffset!==Fe.vertexOffset&&(f.segments.push(F),F=void 0),F?(F.vertexLength+=Fe.vertexLength,F.primitiveLength+=Fe.primitiveLength):F={vertexOffset:Fe.vertexOffset,primitiveLength:Fe.primitiveLength,vertexLength:Fe.vertexLength,primitiveOffset:Fe.primitiveOffset,sortKey:void 0,vaos:{}}}return F&&f.segments.push(F),f}encodeCentroid(s,d){let h=s.centroid(),f=d.span(),v=Math.min(7,Math.round(f.x*this.tileToMeter/10)),b=Math.min(7,Math.round(f.y*this.tileToMeter/10));return new yi(pt(h.x,1,pn-1)<<3|v,pt(h.y,1,pn-1)<<3|b)}encodeBorderCentroid(s){if(!s.borders)return new yi(0,0);let d=s.borders,h=Number.MAX_VALUE;if(d[0][0]!==h||d[1][0]!==h){let f=d[0][0]!==h?0:1;return new yi(6|(d[0][0]!==h?0:65528),(d[f][0]+d[f][1])/2<<3|6)}{let f=d[2][0]!==h?2:3;return new yi((d[f][0]+d[f][1])/2<<3|6,6|(d[2][0]!==h?0:65528))}}showCentroid(s){let d=this.centroidData[s.centroidDataIndex];d.flags&=2147483647,d.centroidXY.x=0,d.centroidXY.y=0,this.writeCentroidToBuffer(d)}writeCentroidToBuffer(s){this.groundEffect.updateHiddenByLandmark(s);let d=s.vertexArrayOffset,h=s.vertexCount+s.vertexArrayOffset,f=s.flags&kS?DZ:s.centroidXY,v=this.centroidVertexArray.geta_centroid_pos0(d);if(this.centroidVertexArray.geta_centroid_pos1(d)!==f.y||v!==f.x){for(let b=d;bk.max.x||k.min.x>b.max.x||b.min.y>k.max.y||k.min.y>b.max.y))for(let F=0;Fd!=Z>d&&s<(this.footprintVertices.int16[2*(U+b.vertexOffset)+0]-G)*(d-q)/(Z-q)+G&&(f=!f)}I=k}}return f}getHeightAtTileCoord(s,d){let h=Number.NEGATIVE_INFINITY,f=!0,v=4*(s+pn)*pn+(d+pn);if(this.partLookup.hasOwnProperty(v)){let b=this.partLookup[v];return b?{height:b.height,hidden:!!(b.flags&kS)}:void 0}for(let b of this.centroidData)s>b.max.x||b.min.x>s||d>b.max.y||b.min.y>d||b.height<=h||this.footprintContainsPoint(s,d,b)&&(h=b.height,this.partLookup[v]=b,f=!!(b.flags&kS));if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:f};this.partLookup[v]=void 0}}function PZ(u,s){let d=u.add(s)._unit();return u.x*d.x+u.y*d.y}function Ehe(u,s,d,h){let f=s.sub(u)._perp()._unit(),v=d.sub(s)._perp()._unit();return NZ(u,s,d,PZ(f,v),h)}function NZ(u,s,d,h,f){let v=Math.sqrt(1-h*h);return Math.min(u.dist(s)/3,s.dist(d)/3,f*v/h)}function nG(u,s,d){return u.xd[1].x&&s.x>d[1].x||u.yd[1].y&&s.y>d[1].y}function FZ(u,s){return u.xs[1].x||u.ys[1].y}function LZ(u,s,d){if(u.x<0||u.x>=pn||s.x<0||s.x>=pn||d.x<0||d.x>=pn)return!1;let h=d.sub(s),f=h.perp(),v=u.sub(s);return(h.x*v.x+h.y*v.y)/Math.sqrt((h.x*h.x+h.y*h.y)*(v.x*v.x+v.y*v.y))>-.866&&f.x*v.x+f.y*v.y<0}function BZ(u,s,d){let h=s?2|u:-3&u;return d?1|h:-2&h}function VZ(){let u=Math.PI/32,s=Math.tan(u),d=oe;return d*Math.sqrt(1+2*s*s)-d}function zZ(u,s,d){let h=1<{for(let Ot of ut)X.push({polygon:Ot,bounds:It})},he=Math.ceil(Math.log2(U)),_e=Math.ceil(Math.log2(G)),Fe=he-_e,Le=[];for(let ut=0;ut0?0:1);for(let ut=0;utIt+1?dt.push({polygons:Vi,bounds:rn,depth:It+1}):ue(Vi,rn)}if(Wi.length){let rn=[new yi(Ot===0?Ji:Lt.x,Ot===1?Ji:Lt.y),ki];Le.length>It+1?dt.push({polygons:Wi,bounds:rn,depth:It+1}):ue(Wi,rn)}}return X})(u,s,Math.ceil((v-f)/11.25),Math.ceil((b-I)/11.25),1,(k,F,U)=>{if(k===0)return .5*(F+U);{let G=tt((d.y+F/pn)/h);return(nt(.5*(tt((d.y+U/pn)/h)+G))*h-d.y)*pn}})}function Ahe(u,s,d,h,f,v){let b=Math.pow(2,h.z-f.z);for(let I=0;I=k[b]&&(I=s,k=u),I[b]f&&jZ(I,k,b,f),I[b]v&&jZ(k,I,b,v)}}function NR(u,s,d,h,f,v){let b=[];for(let I=0;I=h&&X.x>=h||(Z.x>=h?Z=new yi(h,Z.y+(h-Z.x)/(X.x-Z.x)*(X.y-Z.y))._round():X.x>=h&&(X=new yi(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 yi(Z.x+(f-Z.y)/(X.y-Z.y)*(X.x-Z.x),f)._round():X.y>=f&&(X=new yi(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),v&&v.push({progress:{min:he+qZ(_e,Fe,Z)*ue,max:1},parentIndex:I,prevPoint:_e,nextPoint:Fe})),F.push(X),v&&(v[v.length-1].progress.max=he+qZ(_e,Fe,X)*ue,v[v.length-1].nextPoint=Fe)))))}if(v&&G>0)for(let q=U;qF.t-U.t);let b=0,I=0,k=[];for(h.push(k);b!==u.length;){if(I===v.length){for(;b!==u.length;)k.length!==0&&k[k.length-1].equals(u[b])||k.push(u[b]),b++;break}v[I].t<=b?(k.length!==0&&k[k.length-1].equals(v[I].point)||k.push(v[I].point),Math.trunc(v[I].t),I++):(k.length!==0&&k[k.length-1].equals(u[b])||k.push(u[b]),b++)}}function qZ(u,s,d){return u.x!==s.x?(d.x-u.x)/(s.x-u.x):u.y!==s.y?(d.y-u.y)/(s.y-u.y):0}function FR(u,s){return u.x*s.x+u.y*s.y}function YZ(u,s){if(u.length===1){let d=0,h=s[d++],f;for(;!f||h.equals(f);)if(f=s[d++],!f)return 1/0;for(;d{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 khe{constructor(){this.tasks={},this.taskQueue=[],Pr(["process"],this),this.invoker=new Dhe(this.process),this.nextId=0}add(s,d){let h=this.nextId++,f=(function({type:v,isSymbolTile:b,zoom:I}){return I=I||0,v==="message"?0:v!=="maybePrepare"||b?v!=="parseTile"||b?v==="parseTile"&&b?300-I:v==="maybePrepare"&&b?400-I:500:200-I:100-I})(d);if(f===0){try{s()}finally{}return null}return this.tasks[h]={fn:s,metadata:d,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 s=this.pick();if(s===null)return;let d=this.tasks[s];if(delete this.tasks[s],this.taskQueue.length&&this.invoker.trigger(),!d)return;d.fn()}finally{}}pick(){let s=null,d=1/0;for(let f=0;f{h&&delete this.callbacks[I],this.target.postMessage({id:I,type:"",targetMapId:f,sourceMapId:this.mapId})}}}receive(s){let d=s.data;if(!d)return;let h=d.id;if(h&&(!d.targetMapId||this.mapId===d.targetMapId))if(d.type===""){let f=this.cancelCallbacks[h];delete this.cancelCallbacks[h],f&&f.cancel()}else if(d.mustQueue||Ns(self)){let f=this.callbacks[h],v=this.scheduler.add(()=>this.processTask(h,d),f&&f.metadata||{type:"message"});v&&(this.cancelCallbacks[h]=v)}else this.processTask(h,d)}processTask(s,d){if(delete this.cancelCallbacks[s],d.type===""){let h=this.callbacks[s];delete this.callbacks[s],h&&(d.error?h(gb(d.error)):h(null,gb(d.data)))}else{let h=new Set,f=d.hasCallback?(b,I)=>{this.target.postMessage({id:s,type:"",sourceMapId:this.mapId,error:b?bg(b):null,data:bg(I,h)},h)}:()=>{},v=gb(d.data);if(this.parent[d.type])this.parent[d.type](d.sourceMapId,v,f);else if(this.parent.getWorkerSource){let b=d.type.split("."),{source:I,scope:k}=v;this.parent.getWorkerSource(d.sourceMapId,b[0],I,k)[b[1]](v,f)}else f(new Error(`Could not find function ${d.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}}var hm={workerUrl:"",workerClass:null,workerParams:void 0};let LR="mapboxgl_preloaded_worker_pool",L3=(()=>{class u{constructor(){this.active={}}acquire(d,h=u.workerCount){if(!this.workers)for(this.workers=[];this.workers.length{h.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[LR]}numActive(){return Object.keys(this.active).length}}return u.workerCount=2,u})();class JD{constructor(s,d,h="Worker",f=L3.workerCount){this.workerPool=s,this.actors=[],this.currentActor=0,this.id=zi();let v=this.workerPool.acquire(this.id,f);for(let b=0;b{this.ready=!0})}broadcast(s,d,h){oi(this.actors,(f,v)=>{f.send(s,d,v)},h=h||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(s=>{s.remove()}),this.actors=[],this.workerPool.release(this.id)}}let BR,rG;function ek(){return BR||(BR=new L3),BR}JD.Actor=KZ;class Mhe{constructor(s){this.module=s}createIntArray(s){let d=new Int32Array(s),h=this.module.malloc(d.length*d.BYTES_PER_ELEMENT);return this.module.heap32.set(d,h/d.BYTES_PER_ELEMENT),h}createFloatArray(s){let d=new Float32Array(s),h=this.module.malloc(d.length*d.BYTES_PER_ELEMENT);return this.module.heapF32.set(d,h/d.BYTES_PER_ELEMENT),h}createStringBuffer(s){let d=this.module.malloc(s.length+1);for(let h=0;hf.arrayBuffer()).then(f=>{s.buffers[d]=f})}function eX(u,s){let d=u.json.bufferViews[s];return new Uint8Array(u.buffers[d.buffer],d.byteOffset||0,d.byteLength)}function Lhe(u,s,d,h){if(u.uri){let f=JZ(u.uri,h);return fetch(f).then(v=>v.blob()).then(v=>createImageBitmap(v)).then(v=>{s.images[d]=v})}if(u.bufferView!==void 0){let f=eX(s,u.bufferView),v=new Blob([f],{type:u.mimeType});return createImageBitmap(v).then(b=>{s.images[d]=b})}}function tX(u,s=0,d){let h={json:null,images:[],buffers:[]};if(new Uint32Array(u,s,1)[0]===ZZ){let U=new Uint32Array(u,s),G=2,q=(U[G++]>>2)-3,Z=U[G++]>>2;if(G++,h.json=JSON.parse(XZ.decode(U.subarray(G,G+Z))),G+=Z,G{let U=[],G=I&&I.includes(sG),q=I&&I.includes(H3);if(G&&U.push((function(){if(!av)return bT??(bT=(function(Z){let X,ue=null;function he(){X=new Uint8Array(ue.buffer)}function _e(){throw new Error("Unexpected Draco error.")}let Fe={a:{a:_e,d:function(Le,Ve,dt){return X.copyWithin(Le,Ve,Ve+dt)},c:function(Le){let Ve=X.length,dt=Math.max(Le>>>0,Math.ceil(1.2*Ve)),ut=Math.ceil((dt-Ve)/65536);try{return ue.grow(ut),he(),!0}catch{return!1}},b:_e}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(Z,Fe):Z.then(Le=>Le.arrayBuffer()).then(Le=>WebAssembly.instantiate(Le,Fe))).then(Le=>{let{Rb:Ve,Qb:dt,P:ut,T:It,X:Ot,Ja:Lt,La:ki,Qa:Ht,Va:Fi,Wa:Ji,eb:Vi,jb:Wi,f:rn,e:Ei,yb:Qi,zb:si,Ab:ei,Bb:an,Db:nn,Gb:dr}=Le.instance.exports;ue=Ei;let Bn=(()=>{let Qn=0,mn=0,cr=0,to=0;return Tn=>{cr&&(Ve(to),Ve(Qn),mn+=cr,cr=Qn=0),Qn||(mn+=128,Qn=dt(mn));let tr=Tn.length+7&-8,Br=Qn;tr>=mn&&(cr=tr,Br=to=dt(tr));for(let uo=0;uo{av=Z,bT=void 0}))})()),q&&U.push((function(){if(aG)return;let Z=(function(X){let ue,he=WebAssembly.instantiateStreaming(X,{}).then(Le=>{ue=Le.instance,ue.exports.__wasm_call_ctors()}),_e={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Fe={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:he,supported:!0,decodeGltfBuffer(Le,Ve,dt,ut,It,Ot){(function(Lt,ki,Ht,Fi,Ji,Vi,Wi){let rn=Lt.exports.sbrk,Ei=Fi+3&-4,Qi=rn(Ei*Ji),si=rn(Vi.length),ei=new Uint8Array(Lt.exports.memory.buffer);ei.set(Vi,si);let an=ki(Qi,Fi,Ji,si,Vi.length);if(an===0&&Wi&&Wi(Qi,Ei,Ji),Ht.set(ei.subarray(Qi,Qi+Fi*Ji)),rn(Qi-rn(0)),an!==0)throw new Error(`Malformed buffer data: ${an}`)})(ue,ue.exports[Fe[It]],Le,Ve,dt,ut,ue.exports[_e[Ot]])}}})(fetch(z3()));return Z.ready.then(()=>{aG=Z})})()),v)for(let Z=0;Z{if(G&&b)for(let{primitives:Z}of b)for(let X of Z)Phe(X,h);if(q&&b&&k)for(let Z of k)Nhe(Z,h);return h})})}function lG(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 cG(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 dG{constructor(s,d,h,f){this.context=s,this.format=h,this.useMipmap=f&&f.useMipmap,this.texture=s.gl.createTexture(),this.update(d,{premultiply:f&&f.premultiply})}update(s,d){let h=s&&s instanceof HTMLVideoElement&&s.width===0?s.videoWidth:s.width,f=s&&s instanceof HTMLVideoElement&&s.height===0?s.videoHeight:s.height,{context:v}=this,{gl:b}=v,{x:I,y:k}=d&&d.position?d.position:{x:0,y:0},F=I+h,U=k+f;!this.size||this.size[0]===F&&this.size[1]===U||(b.bindTexture(b.TEXTURE_2D,null),b.deleteTexture(this.texture),this.texture=b.createTexture(),this.size=null),b.bindTexture(b.TEXTURE_2D,this.texture),v.pixelStoreUnpackFlipY.set(!1),v.pixelStoreUnpack.set(1),v.pixelStoreUnpackPremultiplyAlpha.set(this.format===b.RGBA8&&(!d||d.premultiply!==!1));let G=s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||ImageBitmap&&s instanceof ImageBitmap;if(!this.size&&F>0&&U>0){let q=this.useMipmap?Math.floor(Math.log2(Math.max(F,U)))+1:1;b.texStorage2D(b.TEXTURE_2D,q,this.format,F,U),this.size=[F,U]}this.size&&(G?b.texSubImage2D(b.TEXTURE_2D,0,I,k,lG(this.format),cG(this.format),s):"data"in s&&s.data&&b.texSubImage2D(b.TEXTURE_2D,0,I,k,h,f,lG(this.format),cG(this.format),s.data)),this.useMipmap&&b.generateMipmap(b.TEXTURE_2D)}bind(s,d,h=!1){let{context:f}=this,{gl:v}=f;v.bindTexture(v.TEXTURE_2D,this.texture),s!==this.minFilter&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,s),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,this.useMipmap&&!h?s===v.NEAREST?v.NEAREST_MIPMAP_NEAREST:v.LINEAR_MIPMAP_LINEAR:s),this.minFilter=s),d!==this.wrapS&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,d),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,d),this.wrapS=d)}bindExtraParam(s,d,h,f,v){let{context:b}=this,{gl:I}=b;I.bindTexture(I.TEXTURE_2D,this.texture),d!==this.magFilter&&(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MAG_FILTER,d),this.magFilter=d),s!==this.minFilter&&(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MIN_FILTER,this.useMipmap?s===I.NEAREST?I.NEAREST_MIPMAP_NEAREST:I.LINEAR_MIPMAP_LINEAR:s),this.minFilter=s),h!==this.wrapS&&(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,h),this.wrapS=h),f!==this.wrapT&&(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,f),this.wrapT=f),v!==this.compareMode&&(v?(I.texParameteri(I.TEXTURE_2D,I.TEXTURE_COMPARE_MODE,I.COMPARE_REF_TO_TEXTURE),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_COMPARE_FUNC,v)):I.texParameteri(I.TEXTURE_2D,I.TEXTURE_COMPARE_MODE,I.NONE),this.compareMode=v)}destroy(){let{gl:s}=this.context;s.deleteTexture(this.texture),this.texture=null}}class zR{constructor(s,d){this.context=s,this.texture=d}bind(s,d){let{context:h}=this,{gl:f}=h;f.bindTexture(f.TEXTURE_2D,this.texture),s!==this.minFilter&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,s),this.minFilter=s),d!==this.wrapS&&(f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,d),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,d),this.wrapS=d)}}let Bhe=ia([{name:"a_pos_3f",components:3,type:"Float32"}]),T=ia([{name:"a_color_3f",components:3,type:"Float32"}]),B=ia([{name:"a_color_4f",components:4,type:"Float32"}]),Q=ia([{name:"a_uv_2f",components:2,type:"Float32"}]),Se=ia([{name:"a_normal_3f",components:3,type:"Float32"}]),Ge=ia([{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"}]),St=ia([{name:"a_pbr",components:4,type:"Uint16"},{name:"a_heightBasedEmissiveStrength",components:3,type:"Float32"}]);function Zt(u,s){let d=Ui(u.projection,u.zoom,u.width,u.height),h=(function(v,b,I,k,F){let U=new de(I.lng-180*Vn,I.lat),G=new de(I.lng+180*Vn,I.lat),q=v.project(U.lng,U.lat),Z=v.project(G.lng,G.lat),X=-Math.atan2(Z.y-q.y,Z.x-q.x),ue=ci.fromLngLat(I);ue.y=pt(ue.y,-1+Vn,1-Vn);let he=ue.toLngLat(),_e=v.project(he.lng,he.lat),Fe=ci.fromLngLat(he);Fe.x+=Vn;let Le=Fe.toLngLat(),Ve=v.project(Le.lng,Le.lat),dt=lr(Ve.x-_e.x,Ve.y-_e.y,X),ut=ci.fromLngLat(he);ut.y+=Vn;let It=ut.toLngLat(),Ot=v.project(It.lng,It.lat),Lt=lr(Ot.x-_e.x,Ot.y-_e.y,X),ki=Math.abs(dt.x)/Math.abs(Lt.y),Ht=R([]);Te(Ht,Ht,-X*(1-(F?0:k)));let Fi=R([]);return K(Fi,Fi,[1,1-(1-ki)*k,1]),Fi[4]=-Lt.x/Lt.y*k,Te(Fi,Fi,X),H(Fi,Ht,Fi),Fi})(u.projection,0,u.center,d,s),f=wi(u);return K(h,h,[f,f,1]),h}function wi(u){let s=u.projection,d=Ui(u.projection,u.zoom,u.width,u.height),h=Yn(s,u.center),f=Yn(s,de.convert(s.center));return Math.pow(2,h*d+(1-d)*f)}function Ui(u,s,d,h,f=1/0){let v=u.range;if(!v)return 0;let b=Math.min(f,Math.max(d,h)),I=Math.log2(b/1024);return ii(v[0]+I,v[1]+I,s)}let Vn=1/4e4;function Yn(u,s){let d=pt(s.lat,-it,it),h=new de(s.lng-180*Vn,d),f=new de(s.lng+180*Vn,d),v=u.project(h.lng,d),b=u.project(f.lng,d),I=ci.fromLngLat(h),k=ci.fromLngLat(f),F=b.x-v.x,U=b.y-v.y,G=k.x-I.x,q=k.y-I.y,Z=Math.sqrt((G*G+q*q)/(F*F+U*U));return Math.log2(Z)}function lr(u,s,d){let h=Math.cos(d),f=Math.sin(d);return{x:u*h-s*f,y:u*f+s*h}}function co(u,s,d){R(u),Te(u,u,At(s[2])),ne(u,u,At(s[0])),me(u,u,At(s[1])),K(u,u,d),H(u,u,[1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1])}function $o(u,s,d,h,f,v,b,I){let k=[d[0]-s[0],d[1]-s[1],0],F=[h[0]-s[0],h[1]-s[1],0];if(Qe(k)<1e-12||Qe(F)<1e-12)return $i(u);let U=ui([],k,F);ht(U,U),Ze(F,h,s),k[2]=(v-f)*I,F[2]=(b-f)*I;let G=k;return ui(G,k,F),ht(G,G),lo(u,U,G)}function Aa(u,s,d=!1){let h=ux(s.zoom),f=(function(v,b,I){let k=b.worldSize,F=[v[12],v[13],v[14]],U=tt(F[1]/k),G=at(F[0]/k),q=R([]),Z=et(1,U)*k,X=et(1,0)*k*Nt(U,b.zoom),ue=1/NH(k),he=X*ue;if(I){let Ve=Ui(b.projection,b.zoom,b.width,b.height,1024);he=ue*b.projection.pixelSpaceConversion(b.center.lat,k,Ve)}let _e=W(U,G);rt(_e,_e,st([],ht([],_e),Z*he*F[2]));let Fe=(function(Ve){let dt=[Ve[0],Ve[1],Ve[2]],ut=[0,1,0],It=ui([],ut,dt);return ui(ut,dt,It),Kt(ut)===0&&(ut=[0,1,0],ui(It,dt,ut)),ht(It,It),ht(ut,ut),ht(dt,dt),[It[0],It[1],It[2],0,ut[0],ut[1],ut[2],0,dt[0],dt[1],dt[2],0,Ve[0],Ve[1],Ve[2],1]})(_e);K(q,q,[he,he,he*Z]),j(q,q,[-F[0],-F[1],-F[2]]);let Le=H([],b.globeMatrix,Fe);return H(Le,Le,q),H(Le,Le,v),Le})(u,s,d);if(h>0){let v=(function(b,I){let k=I.worldSize,F=et(1,0)*k*Nt(I.center.lat,I.zoom)/NH(k),U=et(1,I.center.lat)*k,G=R([]);me(G,G,At(I.center.lng)),ne(G,G,At(I.center.lat)),j(G,G,[0,0,_]),K(G,G,[F,F,F*U]);let q=I.point;return j(G,G,[-q.x,-q.y,0]),H(G,G,b),H(G,I.globeMatrix,G)})(u,s);return(function(b,I,k){let F=(X,ue,he)=>{let _e=Qe(X),Fe=Qe(ue),Le=ov(X,ue,he);return st(Le,Le,1/Qe(Le)*mr(_e,Fe,he))},U=F([b[0],b[1],b[2]],[I[0],I[1],I[2]],k),G=F([b[4],b[5],b[6]],[I[4],I[5],I[6]],k),q=F([b[8],b[9],b[10]],[I[8],I[9],I[10]],k),Z=ov([b[12],b[13],b[14]],[I[12],I[13],I[14]],k);return[U[0],U[1],U[2],0,G[0],G[1],G[2],0,q[0],q[1],q[2],0,Z[0],Z[1],Z[2],1]})(f,v,h)}return f}function $s(u,s,d,h){let f=Lr.projectAabbCorners(h,d),v=Number.MAX_VALUE,b=-1;for(let F=0;Fnew yi(f[F][0],f[F][1]),k;switch(b){case 0:case 6:k=[I(1),I(5),I(4),I(7),I(3),I(2),I(1)];break;case 1:case 7:k=[I(0),I(4),I(5),I(6),I(2),I(3),I(0)];break;case 3:case 5:k=[I(1),I(0),I(4),I(7),I(6),I(2),I(1)];break;default:k=[I(1),I(5),I(6),I(7),I(3),I(0),I(1)]}if(kf(u,k))return v}let ma=64,Bs={CoordinateSpaceTile:1,HasMapboxMeshFeatures:4,HasMeshoptCompression:8};function Rl(u,s,d,h,f,v,b,I,k,F=!1){let U=d.zoom,G=d.project(h),q=Nt(h.lat,U),Z=1/q;R(u),j(u,u,[G.x+b[0]*Z,G.y+b[1]*Z,b[2]]);let X=1,ue=1,he=d.worldSize;if(F){if(d.projection.name==="mercator"){let Ve=0;d.elevation&&(Ve=d.elevation.getAtPointOrZero(new ci(G.x/he,G.y/he),0));let dt=vi([],[G.x,G.y,Ve,1],d.projMatrix)[3]/d.cameraToCenterDistance;X=dt,ue=dt*Nt(d.center.lat,U)}else if(d.projection.name==="globe"){let Ve=Aa(u,d),dt=[0,0,0,1];vi(dt,dt,H([],d.projMatrix,Ve));let ut=dt[3]/d.cameraToCenterDistance,It=ux(U),Ot=d.projection.pixelsPerMeter(h.lat,he)*Nt(h.lat,U),Lt=d.projection.pixelsPerMeter(d.center.lat,he)*Nt(d.center.lat,U);X=ut/mr(Ot,Wt(d.center.lat),It),ue=ut*q/Ot,X*=Lt,ue*=Lt}}else X=Z;K(u,u,[X,X,ue]);let _e=[...u],Fe=s.orientation,Le=[];if(co(Le,[Fe[0]+f[0],Fe[1]+f[1],Fe[2]+f[2]],v),H(u,_e,Le),I&&d.elevation){let Ve=0,dt=[];if(k&&d.elevation){Ve=(function(It,Ot,Lt,ki,Ht){let Fi=Ot.elevation;if(!Fi)return 0;let Ji=Lr.projectAabbCorners(Lt,ki),Vi=et(1,Ht.lat)*Ot.worldSize,Wi=(function(mn,cr){let to=[0,0,1],Tn=[{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 tr of Tn){let Br=mn[tr.corners[0]],uo=mn[tr.corners[1]],Lo=mn[tr.corners[2]],bo=[uo[0]-Br[0],uo[1]-Br[1],cr*(uo[2]-Br[2])],$n=ui(bo,bo,[Lo[0]-Br[0],Lo[1]-Br[1],cr*(Lo[2]-Br[2])]);ht($n,$n),tr.dotProductWithUp=li($n,to)}return Tn.sort((tr,Br)=>tr.dotProductWithUp-Br.dotProductWithUp),Tn[0].corners})(Ji,Vi),rn=Ji[Wi[0]],Ei=Ji[Wi[1]],Qi=Ji[Wi[2]],si=Ji[Wi[3]],ei=Fi.getAtPointOrZero(new ci(rn[0]/Ot.worldSize,rn[1]/Ot.worldSize),0),an=Fi.getAtPointOrZero(new ci(Ei[0]/Ot.worldSize,Ei[1]/Ot.worldSize),0),nn=Fi.getAtPointOrZero(new ci(Qi[0]/Ot.worldSize,Qi[1]/Ot.worldSize),0),dr=Fi.getAtPointOrZero(new ci(si[0]/Ot.worldSize,si[1]/Ot.worldSize),0),Bn=(ei+dr)/2,Qn=(an+nn)/2;return Bn>Qn?an=s.gl.NEAREST_MIPMAP_NEAREST}),u.uploaded=!0,u.image=null)}function Nf(u,s,d){u.indexBuffer=s.createIndexBuffer(u.indexArray,!1,!0),u.vertexBuffer=s.createVertexBuffer(u.vertexArray,Bhe.members,!1,!0),u.normalArray&&(u.normalBuffer=s.createVertexBuffer(u.normalArray,Se.members,!1,!0)),u.texcoordArray&&(u.texcoordBuffer=s.createVertexBuffer(u.texcoordArray,Q.members,!1,!0)),u.colorArray&&(u.colorBuffer=s.createVertexBuffer(u.colorArray,(u.colorArray.bytesPerElement===12?T:B).members,!1,!0)),u.featureArray&&(u.pbrBuffer=s.createVertexBuffer(u.featureArray,St.members,!0)),u.segments=Ml.simpleSegment(0,0,u.vertexArray.length,u.indexArray.length);let h=u.material;h.pbrMetallicRoughness.baseColorTexture&&th(h.pbrMetallicRoughness.baseColorTexture,s),h.pbrMetallicRoughness.metallicRoughnessTexture&&th(h.pbrMetallicRoughness.metallicRoughnessTexture,s),h.normalTexture&&th(h.normalTexture,s),h.occlusionTexture&&th(h.occlusionTexture,s,d),h.emissionTexture&&th(h.emissionTexture,s)}function Ff(u,s,d){if(u.meshes)for(let h of u.meshes)Nf(h,s,d);if(u.children)for(let h of u.children)Ff(h,s,d)}function Wd(u){if(u.meshes)for(let s of u.meshes)s.indexArray.destroy(),s.vertexArray.destroy(),s.colorArray&&s.colorArray.destroy(),s.normalArray&&s.normalArray.destroy(),s.texcoordArray&&s.texcoordArray.destroy(),s.featureArray&&s.featureArray.destroy();if(u.children)for(let s of u.children)Wd(s)}function k_(u){if(u.meshes)for(let d of u.meshes)d.vertexBuffer&&(d.vertexBuffer.destroy(),d.indexBuffer.destroy(),d.normalBuffer&&d.normalBuffer.destroy(),d.texcoordBuffer&&d.texcoordBuffer.destroy(),d.colorBuffer&&d.colorBuffer.destroy(),d.pbrBuffer&&d.pbrBuffer.destroy(),d.segments.destroy(),d.material&&((s=d.material).pbrMetallicRoughness.baseColorTexture&&s.pbrMetallicRoughness.baseColorTexture.gfxTexture&&s.pbrMetallicRoughness.baseColorTexture.gfxTexture.destroy(),s.pbrMetallicRoughness.metallicRoughnessTexture&&s.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture&&s.pbrMetallicRoughness.metallicRoughnessTexture.gfxTexture.destroy(),s.normalTexture&&s.normalTexture.gfxTexture&&s.normalTexture.gfxTexture.destroy(),s.emissionTexture&&s.emissionTexture.gfxTexture&&s.emissionTexture.gfxTexture.destroy(),s.occlusionTexture&&s.occlusionTexture.gfxTexture&&s.occlusionTexture.gfxTexture.destroy()));var s;if(u.children)for(let d of u.children)k_(d)}function Lf(u,s){let d=u.json.bufferViews[s.bufferView],h=U3[s.componentType];return new h(u.buffers[d.buffer],(s.byteOffset||0)+(d.byteOffset||0),s.count*(d.byteStride&&d.byteStride!==VR[s.type]*h.BYTES_PER_ELEMENT?d.byteStride/h.BYTES_PER_ELEMENT:VR[s.type]))}function G3(u,s,d,h){let f=U3[s.componentType],v=(function(U){switch(U){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[s.bufferView],I=b.byteStride?b.byteStride/f.BYTES_PER_ELEMENT:VR[s.type],k=d.float32,F=k.length/d.capacity;for(let U=0,G=0;U0){for(let he=0;he0){v.texcoordArray=new lx;let q=s.json.accessors[f.TEXCOORD_0];v.texcoordArray.resize(q.count);let Z=Lf(s,q);G3(s,q,v.texcoordArray,Z)}if(f._FEATURE_ID_RGBA4444!==void 0){let q=s.json.accessors[f._FEATURE_ID_RGBA4444];s.json.extensionsUsed&&s.json.extensionsUsed.includes("EXT_meshopt_compression")&&(v.featureData=Lf(s,q))}f._FEATURE_RGBA4444!==void 0&&(v.featureData=new Uint32Array(Lf(s,s.json.accessors[f._FEATURE_RGBA4444]).buffer));let G=u.material;return v.material=(function(q,Z){let{emissiveFactor:X=[0,0,0],alphaMode:ue="OPAQUE",alphaCutoff:he=.5,normalTexture:_e,occlusionTexture:Fe,emissiveTexture:Le,doubleSided:Ve}=q,{baseColorFactor:dt=[1,1,1,1],metallicFactor:ut=1,roughnessFactor:It=1,baseColorTexture:Ot,metallicRoughnessTexture:Lt}=q.pbrMetallicRoughness||{},ki=Fe?Z[Fe.index]:void 0;if(Fe&&Fe.extensions&&Fe.extensions.KHR_texture_transform&&ki){let Ht=Fe.extensions.KHR_texture_transform;ki.offsetScale=[Ht.offset[0],Ht.offset[1],Ht.scale[0],Ht.scale[1]]}return{pbrMetallicRoughness:{baseColorFactor:new Xa(...dt),metallicFactor:ut,roughnessFactor:It,baseColorTexture:Ot?Z[Ot.index]:void 0,metallicRoughnessTexture:Lt?Z[Lt.index]:void 0},doubleSided:Ve,emissiveFactor:new Xa(...X),alphaMode:ue,alphaCutoff:he,normalTexture:_e?Z[_e.index]:void 0,occlusionTexture:ki,emissionTexture:Le?Z[Le.index]:void 0,defined:q.defined===void 0}})(G!==void 0?s.json.materials[G]:{defined:!1},d),v}function fRe(u,s,d){let{matrix:h,rotation:f,translation:v,scale:b,mesh:I,extras:k,children:F}=u,U={};if(U.matrix=h||(function(G,q,Z,X){var ue=q[0],he=q[1],_e=q[2],Fe=q[3],Le=ue+ue,Ve=he+he,dt=_e+_e,ut=ue*Le,It=ue*Ve,Ot=ue*dt,Lt=he*Ve,ki=he*dt,Ht=_e*dt,Fi=Fe*Le,Ji=Fe*Ve,Vi=Fe*dt,Wi=X[0],rn=X[1],Ei=X[2];return G[0]=(1-(Lt+Ht))*Wi,G[1]=(It+Vi)*Wi,G[2]=(Ot-Ji)*Wi,G[3]=0,G[4]=(It-Vi)*rn,G[5]=(1-(ut+Ht))*rn,G[6]=(ki+Fi)*rn,G[7]=0,G[8]=(Ot+Ji)*Ei,G[9]=(ki-Fi)*Ei,G[10]=(1-(ut+Lt))*Ei,G[11]=0,G[12]=Z[0],G[13]=Z[1],G[14]=Z[2],G[15]=1,G})([],f||[0,0,0,1],v||[0,0,0],b||[1,1,1]),I!==void 0){U.meshes=d[I];let G=U.anchor=[0,0];for(let q of U.meshes){let{min:Z,max:X}=q.aabb;G[0]+=Z[0]+X[0],G[1]+=Z[1]+X[1]}G[0]=Math.floor(G[0]/U.meshes.length/2),G[1]=Math.floor(G[1]/U.meshes.length/2)}if(k&&(k.id&&(U.id=k.id),k.lights&&(U.lights=(function(G){if(!G.length)return[];let q=(function(_e){let Fe=atob(_e),Le=new Uint8Array(Fe.length);for(let Ve=0;Ve1&&h[h.length-1].equals(h[0])&&h.pop();let f=0;for(let b=0;b0&&h.reverse();let v=KD(h.flatMap(b=>[b.x,b.y]),[]);return v.length===0?null:{vertices:h,indices:v}}function Mst(u,s){let d=[],h=[],f=0,v=[];for(let b of u){f=d.length;let I=b.vertexArray.float32,k=b.indexArray.uint16;for(let F=0;F0&&([h[b+1],h[b+2]]=[h[b+2],h[b+1]])}return{vertices:d,indices:h}}function gRe(u){let s=(function(k,F){let U=[],G=WebGL2RenderingContext;if(k.json.textures)for(let q of k.json.textures){let Z={magFilter:G.LINEAR,minFilter:G.NEAREST,wrapS:G.REPEAT,wrapT:G.REPEAT};q.sampler!==void 0&&Object.assign(Z,k.json.samplers[q.sampler]),U.push({image:F[q.source],sampler:Z,uploaded:!1})}return U})(u,u.images),d=(function(k,F){let U=[];for(let G of k.json.meshes){let q=[];for(let Z of G.primitives)q.push(Ast(Z,k,F));U.push(q)}return U})(u,s),{scenes:h,scene:f,nodes:v}=u.json,b=h?h[f||0].nodes:[...v.keys()],I=[];for(let k of b)I.push(fRe(v[k],u,d));return(function(k,F,U){let G={},q=new Set;for(let Z=0;Z0){let Z=Array.from(q.values()).sort((X,ue)=>X-ue);for(let X=Z.length-1;X>=0;X--)k.splice(Z[X],1)}})(I,b,u.json.nodes),I}function Ost(u){u.heightmap=new Float32Array(4096),u.heightmap.fill(-1);let s=u.vertexArray.float32,d=u.aabb.min[0]-1,h=u.aabb.min[1]-1,f=ma/(u.aabb.max[0]-d+2),v=ma/(u.aabb.max[1]-h+2);for(let b=0;bu.heightmap[F*ma+k]&&(u.heightmap[F*ma+k]=I)}}function _Re(u,s,d,h,f){d.reserve(d.length+4*u.length),h.reserve(h.length+10*u.length),f.reserve(f.length+10*u.length);let v=h.length;for(let b of u){let I=Math.min(10,Math.max(4,1.3*b.height))*s,k=[-b.normal[1],b.normal[0],0],F=Math.min(.29,.1*b.width/b.depth),U=b.width-2*b.depth*s*(F+.01),G=kt([],b.pos,k,U/2),q=kt([],b.pos,k,-U/2),Z=[G[0],G[1],G[2]+b.height],X=[q[0],q[1],q[2]+b.height],ue=kt([],b.normal,k,F);st(ue,ue,I);let he=kt([],b.normal,k,-F);st(he,he,I),rt(ue,G,ue),rt(he,q,he),G[2]+=.1,q[2]+=.1,h.emplaceBack(ue[0],ue[1],ue[2]),h.emplaceBack(he[0],he[1],he[2]),h.emplaceBack(G[0],G[1],G[2]),h.emplaceBack(q[0],q[1],q[2]),h.emplaceBack(Z[0],Z[1],Z[2]),h.emplaceBack(X[0],X[1],X[2]),h.emplaceBack(G[0],G[1],G[2]),h.emplaceBack(q[0],q[1],q[2]),h.emplaceBack(ue[0],ue[1],ue[2]),h.emplaceBack(he[0],he[1],he[2]);let _e=U/I/2;f.emplaceBack(-_e-F,-1,_e,.8),f.emplaceBack(_e+F,-1,_e,.8),f.emplaceBack(-_e,0,_e,1.3),f.emplaceBack(_e,0,_e,1.3),f.emplaceBack(_e+F,-.8,_e,.7),f.emplaceBack(_e+F,-.8,_e,.7),f.emplaceBack(0,0,_e,1.3),f.emplaceBack(0,0,_e,1.3),f.emplaceBack(_e+F,-1.2,_e,.8),f.emplaceBack(_e+F,-1.2,_e,.8),d.emplaceBack(6+v,4+v,8+v),d.emplaceBack(7+v,9+v,5+v),d.emplaceBack(0+v,1+v,2+v),d.emplaceBack(1+v,3+v,2+v),v+=10}}function Rst(u,s){let d={};d.indexArray=new fd,d.vertexArray=new eh,d.colorArray=new Cg,_Re(u,s,d.indexArray,d.vertexArray,d.colorArray);let h={defined:!0};h.emissiveFactor=Xa.black;let f={};return f.baseColorFactor=Xa.white,h.pbrMetallicRoughness=f,d.material=h,d.aabb=new Lr([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),d}let yRe=ia([{name:"a_pos_3f",components:3,type:"Float32"}]),Pst=ia([{name:"a_normal_3",components:3,type:"Int16"}]),Nst=ia([{name:"a_centroid_3",components:3,type:"Int16"}]),vRe=ia([{name:"a_part_color_emissive",components:2,type:"Uint16"}]),Fst=ia([{name:"a_faux_facade_color_emissive",components:2,type:"Uint16"}]),Lst=ia([{name:"a_faux_facade_data",components:4,type:"Uint16"}]),Bst=ia([{name:"a_faux_facade_vertical_range",components:2,type:"Uint16"}]),Vst=ia([{name:"a_bloom_attenuation",components:4,type:"Float32"}]),bRe=Zi.types,Vhe=32767;function zst(u,s){let d=pn+s;for(let h of u)for(let f of h)if(f.x<-s||f.x>d||f.y<-s||f.y>d)return!1;return!0}class CRe{constructor(){this.layoutVertexArray=new eh,this.layoutAttenuationArray=new Cg,this.layoutColorArray=new ld,this.indexArray=new fd,this.indexArrayForConflation=new fd,this.segmentsBucket=new Ml}}class zhe{constructor(){this.layoutVertexArray=new eh,this.layoutNormalArray=new dm,this.layoutCentroidArray=new dm,this.layoutColorArray=new ld,this.layoutFacadePaintArray=null,this.layoutFacadeDataArray=null,this.layoutFacadeVerticalRangeArray=null,this.layoutAOArray=[],this.indexArray=new fd,this.indexArrayForConflation=new fd,this.segmentsBucket=new Ml,this.entranceBloom=new CRe}}class xRe{constructor(s){this.colorBufferUploaded=!1,this.maxHeight=0,this.replacementUpdateTime=0,this.activeReplacements=[],this.footprints=[],this.featuresOnBorder=[],this.buildingFeatures=[],this.buildingWithoutFacade=new zhe,this.buildingWithFacade=new zhe,this.indexArrayForConflationUploaded=!1,this.footprintLookup={},this.zoom=s.zoom,this.canonical=s.canonical,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.fqid),this.index=s.index,this.hasPattern=!1,this.worldview=s.worldview,this.lut=s.lut,this.buildingWithFacade.layoutFacadePaintArray=new ld,this.buildingWithFacade.layoutFacadeDataArray=new I_,this.buildingWithFacade.layoutFacadeVerticalRangeArray=new ld,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut}),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.projection=s.projection,this.groundEffect=new iG(s)}updateFootprints(s,d){for(let h of this.footprints)d.push({footprint:h,id:s})}prepare(){return(function(){if(B3!=null||WZ!=null)return null;if(ik!=null)return ik;let s=fetch(lp.BUILDING_GEN_URL);return ik=(function(d){let h,f,v,b;function I(){h=new Uint8Array(b.buffer),f=new Int32Array(b.buffer),v=new Float32Array(b.buffer)}function k(){throw new Error("Unexpected BuildingGen error.")}let F=()=>{},U={a:{a:k,f:function(G){let q=h.length,Z=Math.max(G>>>0,Math.ceil(1.2*q)),X=Math.ceil((Z-q)/65536);try{return b.grow(X),I(),!0}catch{return!1}},g:k,b:F,c:F,d:F,e:F}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(d,U):d.then(G=>G.arrayBuffer()).then(G=>WebAssembly.instantiate(G,U))).then(G=>{let q=G.instance.exports;return(0,q.g)(),b=q.f,I(),new Mhe({setStyle:q.h,setAOOptions:q.i,setMetricOptions:q.j,setStructuralOptions:q.k,setFacadeOptions:q.l,setFauxFacadeOptions:q.m,setFacadeClassifierOptions:q.n,addFeature:q.o,addFacade:q.p,generateMesh:q.q,getLastError:q.r,getOuterRingLength:q.s,getMeshCount:q.t,getPositionsPtr:q.u,getPositionsLength:q.v,getNormalsPtr:q.w,getNormalsLength:q.x,getColorsPtr:q.y,getColorsLength:q.z,getAOPtr:q.A,getAOLength:q.B,getUVPtr:q.C,getUVLength:q.D,getFauxFacadePtr:q.E,getFauxFacadeLength:q.F,getIndicesPtr:q.G,getIndicesLength:q.H,getBuildingPart:q.I,getRingCount:q.J,getRingPtr:q.K,getRingLength:q.L,free:q.M,malloc:q.N,heapU8:h,heap32:f,heapF32:v})})})(s).then(d=>(ik=null,B3=d,B3)).catch(d=>{Ko("Could not load building-gen"),ik=null,WZ=d}),ik})()}populate(s,d,h,f){let v=Ohe();if(!v)return;let b=jt(h);this.tileToMeter=b,this.brightness=d.brightness,v.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]}),v.setAOOptions(!1,.3),v.setMetricOptions(!1,16),v.setStructuralOptions(!0),v.setFacadeClassifierOptions(3);let I=new Map;for(let{feature:k}of s){if(bRe[k.type]!=="LineString")continue;let F=this.layers[0]._featureFilter.needGeometry,U=en(k,F);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),U,h))continue;let G=F?U.geometry:Mn(k,h,f),q=[];for(let he of G)for(let _e of he)q.push({x:_e.x,y:_e.y});let Z={coordinates:q,crossPerc:k.properties.cross_perc,distanceToRoad:k.properties.distance_to_road,entrances:k.properties.entrances,sourceId:0},X=k.properties.source_id,ue=I.get(X);ue||(ue=[],I.set(X,ue)),ue.push(Z)}this.maxHeight=0;for(let{feature:k,index:F}of s){if(bRe[k.type]==="LineString")continue;let U=this.layers[0]._featureFilter.needGeometry,G=en(k,U);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom),G,h))continue;let q=U?G.geometry:Mn(k,h,f),Z=WD(q,500);if(!zst(q,163))continue;let X=this.layers[0],ue=X.layout.get("building-base").evaluate(k,{},h),he=X.layout.get("building-height").evaluate(k,{},h),_e=X.layout.get("building-roof-shape").evaluate(k,{},h),Fe=X.paint.get("building-ambient-occlusion-intensity"),Le=X.paint.get("building-ambient-occlusion-ground-radius")/this.tileToMeter;if(_e==="flat")continue;let Ve=X.layout.get("building-facade").evaluate(k,{},h);v.setFacadeOptions(4,!0),v.setFauxFacadeOptions(Ve,!1,1);let dt=k.properties.source_id,ut;ut=I.has(dt)?I.get(dt):[];let It=0,Ot=0,Lt=0,ki=0,Ht=0,Fi=0;if(Ve){let $n=Math.round(X.layout.get("building-facade-floors").evaluate(k,{},h));if(ue===0){$n=Math.max(1,$n-(ut.length>0?1:0));let xa=4;if(he>100){let je=[10,13,15];xa=je[k.id?k.id%je.length:0],v.setFacadeOptions(xa,!0)}Ht=1.6803*xa/b}else Ht=ue/b;Fi=he/b,Ht=Math.min(Ht,Fi),Lt=X.layout.get("building-facade-unit-width").evaluate(k,{},h)/b,ki=(Fi-Ht)/$n,v.setFauxFacadeOptions(!0,!0,Lt);let mo=X.layout.get("building-facade-window").evaluate(k,{},h);It=mo[0],Ot=mo[1]}let Ji=[],Vi=new yi(1/0,1/0),Wi=new yi(-1/0,-1/0),rn=new yi(0,0),Ei=0;for(let $n of Z)if($n.length>0){let mo=[];for(let xa of $n){let je=[];for(let Ye=xa.length-1;Ye>=0;Ye--){let ri=xa[Ye];je.push({x:ri.x,y:ri.y}),Vi.x=Math.min(Vi.x,ri.x),Vi.y=Math.min(Vi.y,ri.y),Wi.x=Math.max(Wi.x,ri.x),Wi.y=Math.max(Wi.y,ri.y),rn.x+=ri.x,rn.y+=ri.y,Ei++}mo.push(je)}Ji.push({id:k.id?k.id:0,height:he,minHeight:ue,sourceId:0,roofType:_e,coordinates:mo})}rn.x/=Ei||1,rn.y/=Ei||1;let Qi=v.generateMesh(Ji,ut);if(typeof Qi=="string"){Ko(`Unable to generate building ${k.id}: ${Qi}`);continue}if(Qi.meshes.length===0||Qi.modifiedPolygonRings.length===0)continue;let si=0;for(let $n of Qi.meshes)si+=$n.positions.length/3;let ei=Ve?this.buildingWithFacade:this.buildingWithoutFacade,an=ei.segmentsBucket.prepareSegment(si,ei.layoutVertexArray,ei.indexArray),nn=[],dr=null,Bn=0,Qn=-1,mn=ei.indexArray.length,cr=0;for(let $n of Qi.meshes){let mo=ei.layoutVertexArray.length;if($n.buildingPart==="entrance"){let Di=new Array;for(let vr=0;vr<$n.indices.length;vr+=12){let Bo=$n.positions[vr+0],zo=$n.positions[vr+1],Po=$n.positions[vr+3],gs=$n.positions[vr+4],Ll=$n.positions[vr+2],Oo=$n.positions[vr+8]-Ll,hl=1,As=Po-Bo,ja=gs-zo,Sl=Math.hypot(As,ja);Di.push({pos:[Bo+.5*As,zo+.5*ja,Ll],normal:[ja/Sl,-As/Sl,0],width:Sl,height:Oo,depth:hl,points:[Bo,zo,Po,gs]})}let In=ei.entranceBloom.segmentsBucket.prepareSegment(10*Di.length,ei.entranceBloom.layoutVertexArray,ei.entranceBloom.indexArray),xn=ei.entranceBloom.layoutVertexArray.length;Bn=ei.entranceBloom.indexArray.length,_Re(Di,.5/this.tileToMeter,ei.entranceBloom.indexArray,ei.entranceBloom.layoutVertexArray,ei.entranceBloom.layoutAttenuationArray);let Hn=ei.entranceBloom.layoutVertexArray.length-xn;Qn=ei.entranceBloom.indexArray.length-Bn;for(let vr=0;vrpn||Vi.y<0||Wi.y>pn)&&this.featuresOnBorder.push({featureId:k.id,footprintIndex:this.footprints.length});{let $n=KD(Tn,null,2),mo=new M3(tr,$n,8,256),xa=k.id;k.properties&&k.properties.hasOwnProperty("building_id")&&(xa=k.properties.building_id),this.footprints.push({vertices:tr,indices:$n,grid:mo,min:Br,max:uo,buildingId:xa,hiddenFlags:0,indicesOffset:mn,indicesLength:to,bloomIndicesOffset:Bn,bloomIndicesLength:Qn,groundEffectVertexOffset:Lo,groundEffectVertexLength:bo,hasFauxFacade:Ve,segment:an,height:cr})}this.programConfigurations.populatePaintArrays(ei.layoutVertexArray.length,k,F,{},d.availableImages,h,d.brightness),this.groundEffect.addPaintPropertiesData(k,F,{},d.availableImages,h,d.brightness)}this.groundEffect.prepareBorderSegments(),this.evaluate(this.layers[0],{})}update(s,d,h,f,v,b,I){this.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I),this.groundEffect.update(s,d,v,h,f,b,I),this.evaluate(this.layers[0],s),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(s){let d=h=>{h.layoutVertexBuffer=s.createVertexBuffer(h.layoutVertexArray,yRe.members),h.layoutNormalBuffer=s.createVertexBuffer(h.layoutNormalArray,Pst.members),h.layoutCentroidBuffer=s.createVertexBuffer(h.layoutCentroidArray,Nst.members),h.layoutFacadeDataArray&&h.layoutFacadeDataArray.length&&(h.layoutFacadeDataBuffer=s.createVertexBuffer(h.layoutFacadeDataArray,Lst.members)),h.layoutFacadeVerticalRangeArray&&h.layoutFacadeVerticalRangeArray.length&&(h.layoutFacadeVerticalRangeBuffer=s.createVertexBuffer(h.layoutFacadeVerticalRangeArray,Bst.members)),h.entranceBloom.layoutVertexArray.length&&(h.entranceBloom.layoutVertexBuffer=s.createVertexBuffer(h.entranceBloom.layoutVertexArray,yRe.members),h.entranceBloom.layoutAttenuationBuffer=s.createVertexBuffer(h.entranceBloom.layoutAttenuationArray,Vst.members)),this.uploadUpdatedColorBuffer(s),this.uploadUpdatedIndexBuffer(s)};this.uploaded||(d(this.buildingWithoutFacade),d(this.buildingWithFacade),this.groundEffect.upload(s)),this.groundEffect.uploadPaintProperties(s),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){let s=d=>{d.layoutVertexBuffer&&(d.layoutVertexBuffer.destroy(),d.layoutNormalBuffer.destroy(),d.layoutColorBuffer.destroy(),d.segmentsBucket.destroy(),d.indexBuffer&&d.indexBuffer.destroy(),d.entranceBloom.layoutVertexBuffer&&(d.entranceBloom.layoutVertexBuffer.destroy(),d.entranceBloom.layoutColorBuffer.destroy(),d.entranceBloom.layoutAttenuationBuffer.destroy(),d.entranceBloom.indexBuffer.destroy(),d.entranceBloom.segmentsBucket.destroy()))};s(this.buildingWithoutFacade),s(this.buildingWithFacade),this.groundEffect.destroy(),this.programConfigurations.destroy()}updateFootprintHiddenFlags(s,d,h=!0){let f=!1,v=h?d:0,b=0|(h?-1:~d);this.groundEffect.hiddenByLandmarkVertexArray.length===0&&this.groundEffect.hiddenByLandmarkVertexArray.resize(this.groundEffect.vertexArray.length);for(let I of s){let k=this.footprints[I],F=k.hiddenFlags&b|v;k.hiddenFlags!==F&&(k.hiddenFlags=F,f=!0,this.groundEffect.updateHiddenByLandmarkRange(k.groundEffectVertexOffset,k.groundEffectVertexLength,k.hiddenFlags!==0))}return f&&(this.indexArrayForConflationUploaded=!1),f}uploadUpdatedIndexBuffer(s){if(this.groundEffect.uploadHiddenByLandmark(s),this.indexArrayForConflationUploaded)return;let d=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))};d(this.buildingWithoutFacade),d(this.buildingWithFacade);for(let f of this.footprints){let v=f.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade,b=f.indicesOffset+f.indicesLength;if(f.hiddenFlags!==0){for(let k=f.indicesOffset;k{f.indexArray.length!==0&&(f.indexBuffer?f.indexBuffer.updateData(f.indexArrayForConflation):f.indexBuffer=s.createIndexBuffer(f.indexArrayForConflation,!0),f.entranceBloom.indexBuffer?f.entranceBloom.indexBuffer.updateData(f.entranceBloom.indexArrayForConflation):f.entranceBloom.indexBuffer=s.createIndexBuffer(f.entranceBloom.indexArrayForConflation,!0))};h(this.buildingWithoutFacade),h(this.buildingWithFacade),this.indexArrayForConflationUploaded=!0}uploadUpdatedColorBuffer(s){let d=h=>{h.layoutColorBuffer?h.layoutColorBuffer.updateData(h.layoutColorArray):h.layoutColorBuffer=s.createVertexBuffer(h.layoutColorArray,vRe.members,!0),h.layoutFacadePaintArray&&(h.layoutFacadePaintBuffer?h.layoutFacadePaintBuffer.updateData(h.layoutFacadePaintArray):h.layoutFacadePaintBuffer=s.createVertexBuffer(h.layoutFacadePaintArray,Fst.members,!0)),h.entranceBloom.layoutColorBuffer?h.entranceBloom.layoutColorBuffer.updateData(h.entranceBloom.layoutColorArray):h.entranceBloom.layoutColorBuffer=s.createVertexBuffer(h.entranceBloom.layoutColorArray,vRe.members,!0)};d(this.buildingWithoutFacade),d(this.buildingWithFacade),this.colorBufferUploaded=!0}evaluate(s,d){let h=s.paint.get("building-ambient-occlusion-intensity");for(let f of this.buildingFeatures){let v=d[f.feature.id],b=f.feature;b.properties["building-part"]="roof";let I=s.paint.get("building-color").evaluate(b,v,this.canonical).toPremultipliedRenderColor(this.lut),k=s.paint.get("building-emissive-strength").evaluate(b,v,this.canonical);b.properties["building-part"]="wall";let F=s.paint.get("building-color").evaluate(b,v,this.canonical).toPremultipliedRenderColor(this.lut),U=s.paint.get("building-emissive-strength").evaluate(b,v,this.canonical);b.properties["building-part"]="window";let G=s.paint.get("building-color").evaluate(b,v,this.canonical).toPremultipliedRenderColor(this.lut),q=s.paint.get("building-emissive-strength").evaluate(b,v,this.canonical);b.properties["building-part"]="door";let Z=s.paint.get("building-color").evaluate(b,v,this.canonical).toPremultipliedRenderColor(this.lut),X=s.paint.get("building-emissive-strength").evaluate(b,v,this.canonical),ue=f.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade;for(let _e of f.parts){let Fe,Le=I;_e.part==="roof"?(Le=I,Fe=k):_e.part==="wall"?(Le=F,Fe=U):_e.part==="facade_glazing"?(Le=G,Fe=q):_e.part==="entrance"&&(Le=Z,Fe=X),Fe=pt(Fe,0,1);for(let Ve=0;Ve<_e.vertexLength;Ve++){let dt=_e.vertexOffset+Ve,ut=1+(ue.layoutAOArray[dt]-1)*h;ue.layoutColorArray.emplace(dt,Le.r*ut*255<<8|Le.g*ut*255,Le.b*ut*255<<8|255*Fe),f.hasFauxFacade&&ue.layoutFacadePaintArray.emplace(dt,255*G.r<<8|255*G.g,255*G.b<<8|255*q)}}let he=f.buildingBloom;if(he)for(let _e=0;_eb.max.x||k.max.xb.max.y||k.max.yI.max.x||I.min.x>s||d>I.max.y||I.min.y>d||I.height<=h||JH(b,I)&&(h=I.height,this.footprintLookup[v]=I,f=I.hiddenFlags!==0);if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:f};this.footprintLookup[v]=void 0}}function Ust(u,s,d,h,f,v){let b=Math.pow(2,h.z-f.z);for(let I=0;I1&&(k=s[++I]);let U=Math.abs(F-k.left),G=Math.abs(F-k.right),q=Math.min(U,G),Z,X=v/h*(f+1);if(k.isDash){let ue=f-Math.abs(X);Z=Math.sqrt(q*q+ue*ue)}else Z=f-Math.sqrt(q*q+X*X);this.image.data[b+F]=Math.max(0,Math.min(255,Z+128))}}}addRegularDash(s,d){for(let k=s.length-1;k>=0;--k){let F=s[k],U=s[k+1];F.zeroLength?s.splice(k,1):U&&U.isDash===F.isDash&&(U.left=F.left,s.splice(k,1))}let h=s[0],f=s[s.length-1];h.isDash===f.isDash&&(h.left=f.left-this.width,f.right=h.right+this.width);let v=this.width*this.nextRow,b=0,I=s[b];for(let k=0;k1&&(I=s[++b]);let F=Math.abs(k-I.left),U=Math.abs(k-I.right),G=Math.min(F,U);this.image.data[v+k]=Math.max(0,Math.min(255,(I.isDash?G:-G)+d+128))}}addDash(s,d){let h=this.getKey(s,d);if(this.positions[h])return this.positions[h];let f=d==="round",v=f?7:0,b=2*v+1;if(this.nextRow+b>this.height)return Ko("LineAtlas out of space"),null;s.length===0&&s.push(1);let I=0;for(let U=0;Ud.fqid),this.index=s.index,this.projection=s.projection,this.hasPattern=!1,this.hasCrossSlope=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(d=>{this.gradients[d.id]={}}),this.layoutVertexArray=new sT,this.layoutVertexArray2=new eh,this.patternVertexArray=new eh,this.indexArray=new fd,this.programConfigurations=new wg(s.layers,{zoom:s.zoom,lut:s.lut}),this.segments=new Ml,this.maxLineLength=0,this.zOffsetVertexArray=new eh,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.tessellationStep=s.tessellationStep?s.tessellationStep:pn/64,this.worldview=s.worldview}updateFootprints(s,d){}populate(s,d,h,f){this.hasPattern=D3("line",this.layers,this.pixelRatio,d);let v=this.layers[0].layout.get("line-sort-key");this.tileToMeter=jt(h);let b=this.layers[0].layout.get("line-elevation-reference");if(b==="hd-road-markup")this.elevationType="road";else{let q=this.layers[0].layout.get("line-z-offset"),Z=q.isConstant()&&!q.constantOr(0);this.elevationType=b!=="sea"&&b!=="ground"&&Z?"none":"offset",this.elevationType==="offset"&&b==="none"&&Ko(`line-elevation-reference: ground is used for the layer ${this.layerIds[0]} because non-zero line-z-offset value was found.`)}let I=this.layers[0].layout.get("line-cross-slope");this.hasCrossSlope=this.elevationType==="offset"&&I!==void 0;let k=[];for(let{feature:q,id:Z,index:X,sourceLayerIndex:ue}of s){let he=this.layers[0]._featureFilter.needGeometry,_e=en(q,he);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),_e,h))continue;let Fe=v?v.evaluate(_e,{},h):void 0,Le={id:Z,properties:q.properties,type:q.type,sourceLayerIndex:ue,index:X,geometry:he?_e.geometry:Mn(q,h,f),patterns:{},sortKey:Fe};k.push(Le)}v&&k.sort((q,Z)=>q.sortKey-Z.sortKey);let{lineAtlas:F,featureIndex:U}=d,G=this.addConstantDashes(F);for(let q of k){let{geometry:Z,index:X,sourceLayerIndex:ue}=q;if(G&&this.addFeatureDashes(q,F),this.hasPattern){let he=Eg("line",this.layers,q,this.zoom,this.pixelRatio,d);this.patternFeatures.push(he)}else this.addFeature(q,Z,X,h,F.positions,d.availableImages,d.brightness,d.elevationFeatures);U.insert(s[X].feature,Z,X,ue,this.index)}}addConstantDashes(s){let d=!1;for(let h of this.layers){let f=h.paint.get("line-dasharray").value,v=h.layout.get("line-cap").value;if(f.kind!=="constant"||v.kind!=="constant")d=!0;else{let b=v.value,I=f.value;if(!I)continue;s.addDash(I,b)}}return d}addFeatureDashes(s,d){let h=this.zoom;for(let f of this.layers){let v=f.paint.get("line-dasharray").value,b=f.layout.get("line-cap").value;if(v.kind==="constant"&&b.kind==="constant")continue;let I,k;if(v.kind==="constant"){if(I=v.value,!I)continue}else I=v.evaluate({zoom:h},s);k=b.kind==="constant"?b.value:b.evaluate({zoom:h},s),d.addDash(I,k),s.patterns[f.id]=[d.getKey(I,k)]}}update(s,d,h,f,v,b,I,k){this.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,k)}addFeatures(s,d,h,f,v,b){for(let I of this.patternFeatures)this.addFeature(I,I.geometry,I.index,d,h,f,b)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=s.createVertexBuffer(this.layoutVertexArray2,qst)),this.patternVertexArray.length!==0&&(this.patternVertexBuffer=s.createVertexBuffer(this.patternVertexArray,Kst)),!this.zOffsetVertexBuffer&&this.zOffsetVertexArray.length>0&&(this.zOffsetVertexBuffer=s.createVertexBuffer(this.zOffsetVertexArray,Gst.members,!0)),this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,jst),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.zOffsetVertexBuffer&&this.zOffsetVertexBuffer.destroy(),this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(s,d){let h,f;if(d&&d>0?(h=`mapbox_clip_start_${d}`,f=`mapbox_clip_end_${d}`):(h="mapbox_clip_start",f="mapbox_clip_end"),s.properties&&s.properties.hasOwnProperty(h)&&s.properties.hasOwnProperty(f))return{start:+s.properties[h],end:+s.properties[f]}}addFeature(s,d,h,f,v,b,I,k){let F=this.layers[0].layout,U=F.get("line-join").evaluate(s,{}),G=F.get("line-cap").evaluate(s,{}),q=F.get("line-miter-limit"),Z=F.get("line-round-limit");this.lineClips=this.lineFeatureClips(s),this.lineFeature=s;let X=!(!s.properties||!s.properties.hasOwnProperty("mapbox_line_metrics"))&&s.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 he=this.layoutVertexArray.length;if(!this.addElevatedRoadFeature(s,d,f,k,U,G,q,Z)){let[_e,Fe]=this.clipRuntimeLinesToTile(d,1);for(let Le=0;Le<_e.length;Le++){let Ve=_e[Le],dt=Fe[Le],ut={progress:{min:dt.progress.min,max:dt.progress.max},nextDir:this.computeSegNextDir(dt,Ve),prevDir:this.computeSegPrevDir(dt,Ve)};this.addLine(Ve,s,f,U,G,q,Z,ut,X&&dt.parentIndex>0?dt.parentIndex:null)}this.fillNonElevatedRoadSegment(he)}}else for(let he=0;he0?he:null);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,h,v,b,f,I,void 0,this.worldview)}computeSegNextDir(s,d){return s.nextPoint.sub(d.at(-2)).unit()}computeSegPrevDir(s,d){return d[1].sub(s.prevPoint).unit()}clipLinesToTile(s,d){return NR(s,-d,-d,pn+d,pn+d)}clipRuntimeLinesToTile(s,d){let h=[];return[NR(s,-d,-d,pn+d,pn+d,h),h]}addElevatedRoadFeature(s,d,h,f,v,b,I,k){let F=[],U=xl.getElevationFeature(s,f);if(U){let G=this.clipLinesToTile(d,1),q=this.prepareElevatedLines(G,U,h);for(let Z of q)F.push({geometry:Z,elevation:U,elevationTileID:h,segment:{progress:{min:0,max:1},nextDir:void 0,prevDir:void 0}})}if(F.length===0)return!1;for(let G of F){let q=this.layoutVertexArray.length;this.addLine(G.geometry,s,h,v,b,I,k);let Z=new Jc(h,G.elevationTileID);if(G.elevation)for(let X=q;X>1,this.layoutVertexArray.int16[6*X+1]>>1),he=Z.pointElevation(ue,G.elevation,.05);this.updateHeightRange(he),this.zOffsetVertexArray.emplaceBack(he,0,0)}else this.fillNonElevatedRoadSegment(q)}return!0}prepareElevatedLines(s,d,h){if(d.constantHeight!=null)return s;let f=[],v=1/jt(h);for(let b of s)$Z(b,new ls(d,v),0,f);return f}fillNonElevatedRoadSegment(s){for(let d=s;d0,q=k&&k.progress.max<1;if(this.lineClips){let Lt={min:this.lineClips.start,max:this.lineClips.end},ki=1;if(k){let Ji=this.lineClips.end-this.lineClips.start;Lt=(function(Vi,Wi,rn){return{min:Ny(Vi.min,Wi,rn),max:Ny(Vi.max,Wi,rn)}})(k.progress,{min:0,max:1},Lt),Ji>0&&(ki=(Lt.max-Lt.min)/Ji)}let Ht=+d.properties.mapbox_clip_feature_len,Fi=+d.properties.mapbox_clip_seg_len;if(Number.isNaN(Ht)||Number.isNaN(Fi)){for(let Vi=0;Vi=2&&s[X-1].equals(s[X-2]);)X--;let ue=0;for(;ue0,si=this.overscaling<=16?15*pn/(512*this.overscaling):0;if(ki&&Ht==="round"){if(Wib&&(Ht="bevel"),Ht==="bevel"&&(Wi>2&&(Ht="flipbevel"),Wi2*si){let nn=_e.sub(_e.sub(Fe)._mult(si/ei)._round());this.updateDistance(Fe,nn),this.addCurrentVertex(nn,Ve,0,0,he,Ot),Fe=nn}this.updateDistance(Fe,_e),Ji._mult(Wi),this.addCurrentVertex(_e,Ji,0,0,he,Ot);let an=_e.dist(Le);if(an>2*si){let nn=_e.add(Le.sub(_e)._mult(si/an)._round());this.updateDistance(_e,nn),this.addCurrentVertex(nn,dt,0,0,he,Ot),_e=nn}}else Ji._mult(Wi),this.addCurrentVertex(_e,Ji,0,0,he,Ot);else if(Ht==="flipbevel"){if(Wi>100)Ji=dt.mult(-1);else{let ei=Wi*Ve.add(dt).mag()/Ve.sub(dt).mag();Ji._perp()._mult(ei*(Qi?-1:1))}this.addCurrentVertex(_e,Ji,0,0,he,Ot),this.addCurrentVertex(_e,Ji.mult(-1),0,0,he,Ot)}else if(Ht==="bevel"||Ht==="fakeround"){Ot!=null&&Fe&&this.addCurrentVertex(_e,It||Ve,-1,-1,he,Ot);let ei=_e.dist(Fe)<=2*si&&Ht!=="bevel",an=Ji.mult(Qi?1:-1);an._mult(Wi);let nn=dt.mult(Qi?-1:1),dr=Ve.mult(Qi?-1:1),Bn=this.evaluateLineProgressFeatures(this.distance);if(Ot==null&&(this.addHalfVertex(_e,an.x,an.y,!1,!Qi,0,he,Bn),ei||this.addHalfVertex(_e,an.x+2*dr.x,an.y+2*dr.y,!1,Qi,0,he,Bn)),Ht==="fakeround"){let Qn=Math.round(180*rn/Math.PI/20);this.addHalfVertex(_e,dr.x,dr.y,!1,Qi,0,he,Bn);for(let mn=0;mn1){this.lineSoFar=s.w;let ue=(d.x-s.x)/G,he=(d.y-s.y)/G,_e=(d.z-s.z)/G,Fe=(d.w-s.w)/G;for(let Le=1;Le=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,U),k.primitiveLength++),b?this.e2=U:this.e1=U,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(s,d){this.prevDistance=this.distance,this.distance+=s.dist(d),this.updateScaledDistance()}}function Hhe(u,s,d){return u.xd||u.yd}let TRe,ERe;function ARe(u,s,d){return s*(pn/(u.tileSize*Math.pow(2,d-u.tileID.overscaledZ)))}Ln(Uhe,"LineBucket",{omit:["layers","patternFeatures","currentVertex","currentVertexIsOutside"]});let DRe=(u,s,d)=>(1-d)*u+d*s;function kRe(u,s){return 1/ARe(u,1,s.tileZoom)}function MRe(u,s,d,h){return u.translatePosMatrix(h||s.tileID.projMatrix,s,d.paint.get("line-translate"),d.paint.get("line-translate-anchor"))}let ORe=u=>{let s=[];RRe(u)&&s.push("RENDER_LINE_DASH"),u.paint.get("line-gradient")&&s.push("RENDER_LINE_GRADIENT");let d=u.paint.get("line-trim-offset");d[0]===0&&d[1]===0||s.push("RENDER_LINE_TRIM_OFFSET"),u.paint.get("line-border-width").constantOr(1)!==0&&s.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&&s.push("LINE_JOIN_NONE"),s};function RRe(u){let s=u.paint.get("line-dasharray").value;return s.kind!=="constant"||s.value}let Ghe,PRe=()=>Ghe||(Ghe={layout:TRe||(TRe=new bs({"line-cap":new An(zt.layout_line["line-cap"]),"line-join":new An(zt.layout_line["line-join"]),"line-miter-limit":new on(zt.layout_line["line-miter-limit"]),"line-round-limit":new on(zt.layout_line["line-round-limit"]),"line-sort-key":new An(zt.layout_line["line-sort-key"]),"line-z-offset":new An(zt.layout_line["line-z-offset"]),"line-elevation-reference":new on(zt.layout_line["line-elevation-reference"]),"line-cross-slope":new on(zt.layout_line["line-cross-slope"]),visibility:new on(zt.layout_line.visibility),"line-width-unit":new on(zt.layout_line["line-width-unit"])})),paint:ERe||(ERe=new bs({"line-opacity":new An(zt.paint_line["line-opacity"]),"line-color":new An(zt.paint_line["line-color"]),"line-translate":new on(zt.paint_line["line-translate"]),"line-translate-anchor":new on(zt.paint_line["line-translate-anchor"]),"line-width":new An(zt.paint_line["line-width"]),"line-gap-width":new An(zt.paint_line["line-gap-width"]),"line-offset":new An(zt.paint_line["line-offset"]),"line-blur":new An(zt.paint_line["line-blur"]),"line-dasharray":new An(zt.paint_line["line-dasharray"]),"line-pattern":new An(zt.paint_line["line-pattern"]),"line-pattern-cross-fade":new on(zt.paint_line["line-pattern-cross-fade"]),"line-gradient":new hS(zt.paint_line["line-gradient"]),"line-trim-offset":new on(zt.paint_line["line-trim-offset"]),"line-trim-fade-range":new on(zt.paint_line["line-trim-fade-range"]),"line-trim-color":new on(zt.paint_line["line-trim-color"]),"line-emissive-strength":new on(zt.paint_line["line-emissive-strength"]),"line-border-width":new An(zt.paint_line["line-border-width"]),"line-border-color":new An(zt.paint_line["line-border-color"]),"line-occlusion-opacity":new on(zt.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"})}))},Ghe);class Xst extends An{possiblyEvaluate(s,d){return d=new Fs(Math.floor(d.zoom),{now:d.now,fadeDuration:d.fadeDuration,transition:d.transition,worldview:d.worldview}),super.possiblyEvaluate(s,d)}evaluate(s,d,h,f){return d=Object.assign({},d,{zoom:Math.floor(d.zoom)}),super.evaluate(s,d,h,f)}}let uG;function NRe(u,s){return s>0?s+2*u:u}let Jst=ia([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),elt=ia([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),tlt=ia([{name:"a_projected_pos",components:4,type:"Float32"}],4);ia([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let ilt=ia([{name:"a_auto_z_offset",components:1,type:"Float32"}],4),nlt=ia([{name:"a_x_axis",components:3,type:"Float32"},{name:"a_y_axis",components:3,type:"Float32"}]),rlt=ia([{name:"a_texb",components:2,type:"Uint16"}]),olt=ia([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_elevation_from_sea",components:2,type:"Float32"}]),alt=ia([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"},{name:"a_auto_z_offset",components:1,type:"Float32"}]);ia([{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 FRe=ia([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),slt=ia([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ia([{name:"triangle",components:3,type:"Uint16"}]),ia([{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"}]),ia([{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"}]),ia([{type:"Float32",name:"offsetX"}]),ia([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var pp=24;function llt(u,s,d){return u.sections.forEach(h=>{h.text=(function(f,v,b){let I=v.layout.get("text-transform").evaluate(b,{});return I==="uppercase"?f=f.toLocaleUpperCase():I==="lowercase"&&(f=f.toLocaleLowerCase()),R0.applyArabicShaping&&(f=R0.applyArabicShaping(f)),f})(h.text,s,d)}),u}let pG={"!":"\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 clt(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 dlt(u){return u==="\uFE35"||u==="\uFE47"||u==="\uFE37"||u==="\uFE43"||u==="\uFE41"||u==="\uFE3D"||u==="\uFE3B"||u==="\uFE39"||u==="\uFE17"||u==="\uFE3F"}let jhe=4294967296,LRe=1/jhe,BRe=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),iX=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,s,d=this.length){for(;this.pos>3,v=this.pos;this.type=7&h,u(f,s,this),this.pos===v&&this.skip(h)}return s}readMessage(u,s){return this.readFields(u,s,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)*jhe;return this.pos+=8,u}readSFixed64(){let u=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*jhe;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 s=this.buf,d,h;return h=s[this.pos++],d=127&h,h<128?d:(h=s[this.pos++],d|=(127&h)<<7,h<128?d:(h=s[this.pos++],d|=(127&h)<<14,h<128?d:(h=s[this.pos++],d|=(127&h)<<21,h<128?d:(h=s[this.pos],d|=(15&h)<<28,(function(f,v,b){let I=b.buf,k,F;if(F=I[b.pos++],k=(112&F)>>4,F<128||(F=I[b.pos++],k|=(127&F)<<3,F<128)||(F=I[b.pos++],k|=(127&F)<<10,F<128)||(F=I[b.pos++],k|=(127&F)<<17,F<128)||(F=I[b.pos++],k|=(127&F)<<24,F<128)||(F=I[b.pos++],k|=(1&F)<<31,F<128))return j3(f,k,v);throw new Error("Expected varint not more than 10 bytes")})(d,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,s=this.pos;return this.pos=u,u-s>=12&&BRe?BRe.decode(this.buf.subarray(s,u)):(function(d,h,f){let v="",b=h;for(;b239?4:I>223?3:I>191?2:1;if(b+q>f)break;q===1?I<128&&(G=I):q===2?(k=d[b+1],(192&k)==128&&(G=(31&I)<<6|63&k,G<=127&&(G=null))):q===3?(k=d[b+1],F=d[b+2],(192&k)==128&&(192&F)==128&&(G=(15&I)<<12|(63&k)<<6|63&F,(G<=2047||G>=55296&&G<=57343)&&(G=null))):q===4&&(k=d[b+1],F=d[b+2],U=d[b+3],(192&k)==128&&(192&F)==128&&(192&U)==128&&(G=(15&I)<<18|(63&k)<<12|(63&F)<<6|63&U,(G<=65535||G>=1114112)&&(G=null))),G===null?(G=65533,q=1):G>65535&&(G-=65536,v+=String.fromCharCode(G>>>10&1023|55296),G=56320|1023&G),v+=String.fromCharCode(G),b+=q}return v})(this.buf,s,u)}readBytes(){let u=this.readVarint()+this.pos,s=this.buf.subarray(this.pos,u);return this.pos=u,s}readPackedVarint(u=[],s){let d=this.readPackedEnd();for(;this.pos127;);else if(s===2)this.pos=this.readVarint()+this.pos;else if(s===5)this.pos+=4;else{if(s!==1)throw new Error(`Unimplemented type: ${s}`);this.pos+=8}}writeTag(u,s){this.writeVarint(u<<3|s)}realloc(u){let s=this.length||16;for(;s268435455||u<0?(function(s,d){let h,f;if(s>=0?(h=s%4294967296|0,f=s/4294967296|0):(h=~(-s%4294967296),f=~(-s/4294967296),4294967295^h?h=h+1|0:(h=0,f=f+1|0)),s>=18446744073709552e3||s<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");d.realloc(10),(function(v,b,I){I.buf[I.pos++]=127&v|128,v>>>=7,I.buf[I.pos++]=127&v|128,v>>>=7,I.buf[I.pos++]=127&v|128,v>>>=7,I.buf[I.pos++]=127&v|128,I.buf[I.pos]=127&(v>>>=7)})(h,0,d),(function(v,b){let I=(7&v)<<4;b.buf[b.pos++]|=I|((v>>>=3)?128:0),v&&(b.buf[b.pos++]=127&v|((v>>>=7)?128:0),v&&(b.buf[b.pos++]=127&v|((v>>>=7)?128:0),v&&(b.buf[b.pos++]=127&v|((v>>>=7)?128:0),v&&(b.buf[b.pos++]=127&v|((v>>>=7)?128:0),v&&(b.buf[b.pos++]=127&v)))))})(f,d)})(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 s=this.pos;this.pos=(function(h,f,v){for(let b,I,k=0;k55295&&b<57344){if(!I){b>56319||k+1===f.length?(h[v++]=239,h[v++]=191,h[v++]=189):I=b;continue}if(b<56320){h[v++]=239,h[v++]=191,h[v++]=189,I=b;continue}b=I-55296<<10|b-56320|65536,I=null}else I&&(h[v++]=239,h[v++]=191,h[v++]=189,I=null);b<128?h[v++]=b:(b<2048?h[v++]=b>>6|192:(b<65536?h[v++]=b>>12|224:(h[v++]=b>>18|240,h[v++]=b>>12&63|128),h[v++]=b>>6&63|128),h[v++]=63&b|128)}return v})(this.buf,u,this.pos);let d=this.pos-s;d>=128&&VRe(s,d,this),this.pos=s-1,this.writeVarint(d),this.pos+=d}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 s=u.length;this.writeVarint(s),this.realloc(s);for(let d=0;d=128&&VRe(d,h,this),this.pos=d-1,this.writeVarint(h),this.pos+=h}writeMessage(u,s,d){this.writeTag(u,2),this.writeRawMessage(s,d)}writePackedVarint(u,s){s.length&&this.writeMessage(u,ult,s)}writePackedSVarint(u,s){s.length&&this.writeMessage(u,plt,s)}writePackedBoolean(u,s){s.length&&this.writeMessage(u,flt,s)}writePackedFloat(u,s){s.length&&this.writeMessage(u,mlt,s)}writePackedDouble(u,s){s.length&&this.writeMessage(u,hlt,s)}writePackedFixed32(u,s){s.length&&this.writeMessage(u,glt,s)}writePackedSFixed32(u,s){s.length&&this.writeMessage(u,_lt,s)}writePackedFixed64(u,s){s.length&&this.writeMessage(u,ylt,s)}writePackedSFixed64(u,s){s.length&&this.writeMessage(u,vlt,s)}writeBytesField(u,s){this.writeTag(u,2),this.writeBytes(s)}writeFixed32Field(u,s){this.writeTag(u,5),this.writeFixed32(s)}writeSFixed32Field(u,s){this.writeTag(u,5),this.writeSFixed32(s)}writeFixed64Field(u,s){this.writeTag(u,1),this.writeFixed64(s)}writeSFixed64Field(u,s){this.writeTag(u,1),this.writeSFixed64(s)}writeVarintField(u,s){this.writeTag(u,0),this.writeVarint(s)}writeSVarintField(u,s){this.writeTag(u,0),this.writeSVarint(s)}writeStringField(u,s){this.writeTag(u,2),this.writeString(s)}writeFloatField(u,s){this.writeTag(u,5),this.writeFloat(s)}writeDoubleField(u,s){this.writeTag(u,1),this.writeDouble(s)}writeBooleanField(u,s){this.writeVarintField(u,+s)}};function j3(u,s,d){return d?4294967296*s+(u>>>0):4294967296*(s>>>0)+(u>>>0)}function VRe(u,s,d){let h=s<=16383?1:s<=2097151?2:s<=268435455?3:Math.floor(Math.log(s)/(7*Math.LN2));d.realloc(h);for(let f=d.pos-1;f>=u;f--)d.buf[f+h]=d.buf[f]}function ult(u,s){for(let d=0;d=0&&h>=s&&nX[this.text.charCodeAt(h)];h--)d--;this.text=this.text.substring(s,d),this.sectionIndex=this.sectionIndex.slice(s,d)}substring(s,d){let h=new $3;return h.text=this.text.substring(s,d),h.sectionIndex=this.sectionIndex.slice(s,d),h.sections=this.sections,h}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((s,d)=>Math.max(s,this.sections[d].scale),0)}addTextSection(s,d){this.text+=s.text,this.sections.push(mG.forText(s.scale,s.fontStack||d));let h=this.sections.length-1;for(let f=0;f=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function qhe(u,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue=1){let he=$3.fromFeature(u,f,ue);G===M_.vertical&&he.verticalizePunctuation(q);let _e=[],Fe=(function(It,Ot,Lt,ki,Ht,Fi){if(!It)return[];let Ji=[],Vi=(function(Qi,si,ei,an,nn,dr){let Bn=0;for(let Qn=0;Qn=0,rn=0;for(let Qi=0;Qi0&&hl>bo&&(bo=hl)}else{let Ll=Lt[Ye.fontStack];if(!Ll)continue;Ll[Di]&&(Hn=Ll[Di]);let Oo=Ot[Ye.fontStack];if(!Oo)continue;let hl=Oo.glyphs[Di];if(!hl)continue;if(xn=hl.metrics,Bo=Di!==8203?pp:0,dr){let As=Oo.ascender!==void 0?Math.abs(Oo.ascender):0,ja=Oo.descender!==void 0?Math.abs(Oo.descender):0,Sl=(As+ja)*In;$n-d/2;){if(b--,b<0)return!1;I-=u[b].dist(v),v=u[b]}I+=u[b].dist(u[b+1]),b++;let k=[],F=0;for(;Ih;)F-=k.shift().angleDelta;if(F>f)return!1;b++,I+=U.dist(G)}return!0}function JRe(u){let s=0;for(let d=0;dF){let X=(F-k)/Z,ue=mr(G.x,q.x,X),he=mr(G.y,q.y,X),_e=new xT(ue,he,0,q.angleTo(G),U);return!b||XRe(u,_e,I,b,s)?_e:void 0}k+=Z}}function Elt(u,s,d,h,f,v,b,I,k){let F=ePe(h,v,b),U=tPe(h,f),G=U*b,q=u[0].x===0||u[0].x===k||u[0].y===0||u[0].y===k;return s-G=0&&Ve=0&&dt=0&&q+F<=U){let ut=new xT(Ve,dt,0,Fe,X);h&&!XRe(u,ut,v,h,f)||Z.push(ut)}}G+=_e}return I||Z.length||b||(Z=iPe(u,G/2,d,h,f,v,b,!0,k)),Z}function nPe(u){let s=0,d=0;for(let b of u)s+=b.w*b.h,d=Math.max(d,b.w);u.sort((b,I)=>I.h-b.h);let h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(s/.95)),d),h:1/0}],f=0,v=0;for(let b of u)for(let I=h.length-1;I>=0;I--){let k=h[I];if(!(b.w>k.w||b.h>k.h)){if(b.x=k.x,b.y=k.y,v=Math.max(v,b.y+b.h),f=Math.max(f,b.x+b.w),b.w===k.w&&b.h===k.h){let F=h.pop();F&&I1?X-1:X,cd.copy(G.data,F,{x:0,y:0},{x:ue,y:he},G.data,h),cd.copy(G.data,F,{x:0,y:Fe-X},{x:ue,y:he-X},{width:_e,height:X},h),cd.copy(G.data,F,{x:0,y:0},{x:ue,y:he+Fe},{width:_e,height:X},h),cd.copy(G.data,F,{x:_e-X,y:0},{x:ue-X,y:he},{width:X,height:Fe},h),cd.copy(G.data,F,{x:0,y:0},{x:ue+_e,y:he},{width:X,height:Fe},h),cd.copy(G.data,F,{x:_e-X,y:Fe-X},{x:ue-X,y:he-X},{width:X,height:X},h),cd.copy(G.data,F,{x:0,y:Fe-X},{x:ue+_e,y:he-X},{width:X,height:X},h),cd.copy(G.data,F,{x:0,y:0},{x:ue+_e,y:he+Fe},{width:X,height:X},h),cd.copy(G.data,F,{x:_e-X,y:0},{x:ue-X,y:he+Fe},{width:X,height:X},h)}this.lut=h,this.image=F,this.iconPositions=f,this.patternPositions=v}addImages(s,d,h,f){for(let[v,b]of s.entries()){let{bin:I,imagePosition:k,imageVariant:F}=Whe(v,b,h);d.set(v,k),f.push(I),b.hasRenderCallback&&this.haveRenderCallbacks.push(F.id)}}patchUpdatedImages(s,d,h){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(f=>s.hasImage(f,h)),s.dispatchRenderCallbacks(this.haveRenderCallbacks,h);for(let f of s.getUpdatedImages(h)){for(let v of this.iconPositions.keys()){let b=p_.parse(v);if(Qm.isEqual(b.id,f)){let I=s.getImage(f,h);this.patchUpdatedImage(this.iconPositions.get(v),I,d,null)}}for(let v of this.patternPositions.keys()){let b=p_.parse(v);if(Qm.isEqual(b.id,f)){let I=s.getImage(f,h);this.patchUpdatedImage(this.patternPositions.get(v),I,d,this.lut)}}}}patchUpdatedImage(s,d,h,f=null){if(!s||!d||s.version===d.version)return;s.version=d.version;let[v,b]=s.tl,I=s.sdf;if(this.lut||I){let k={width:d.data.width,height:d.data.height},F=new cd(k);cd.copy(d.data,F,{x:0,y:0},{x:0,y:0},k,f,I),h.update(F,{position:{x:v,y:b}})}else h.update(d.data,{position:{x:v,y:b}})}}Ln(fG,"ImagePosition"),Ln(rPe,"ImageAtlas");let gG=1e20;function oPe(u,s,d,h,f,v,b,I,k){for(let F=s;F-1);k++,v[k]=I,b[k]=F,b[k+1]=gG}for(let I=0,k=0;I{let k=this.entries[v];k||(k=this.entries[v]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let F=k.glyphs[b];if(F!==void 0)return void I(null,{stack:v,id:b,glyph:F});if(F=this._tinySDF(k,v,b),F)return k.glyphs[b]=F,void I(null,{stack:v,id:b,glyph:F});let U=Math.floor(b/256);if(256*U>65535)return Ko("glyphs > 65535 not supported"),void I(null,{stack:v,id:b,glyph:F});if(k.ranges[U])return void I(null,{stack:v,id:b,glyph:F});let G=k.requests[U];G||(G=k.requests[U]=[],q3.loadGlyphRange(v,U,f,this.requestManager,(q,Z)=>{if(Z){k.ascender=Z.ascender,k.descender=Z.descender;for(let X in Z.glyphs)this._doesCharSupportLocalGlyph(+X)||(k.glyphs[+X]=Z.glyphs[+X]);k.ranges[U]=!0}for(let X of G)X(q,Z);delete k.requests[U]})),G.push((q,Z)=>{q?I(q):Z&&I(null,{stack:v,id:b,glyph:Z.glyphs[b]||null})})},(v,b)=>{if(v)d(v);else if(b){let I={};for(let{stack:k,id:F,glyph:U}of b)I[k]===void 0&&(I[k]={}),I[k].glyphs===void 0&&(I[k].glyphs={}),I[k].glyphs[F]=U&&{id:U.id,bitmap:U.bitmap.clone(),metrics:U.metrics},I[k].ascender=this.entries[k].ascender,I[k].descender=this.entries[k].descender;d(null,I)}})}_doesCharSupportLocalGlyph(s){return this.localGlyphMode!==Qhe.none&&(this.localGlyphMode===Qhe.all?!!this.localFontFamily:!!this.localFontFamily&&(Mr["CJK Unified Ideographs"](s)||Mr["Hangul Syllables"](s)||Mr.Hiragana(s)||Mr.Katakana(s)||Mr["CJK Symbols and Punctuation"](s)||Mr["CJK Unified Ideographs Extension A"](s)||Mr["CJK Unified Ideographs Extension B"](s)||Mr.Osage(s)))}_tinySDF(s,d,h){let f=this.localFontFamily;if(!f||!this._doesCharSupportLocalGlyph(h))return;let v=s.tinySDF;if(!v){let ue="400";/bold/i.test(d)?ue="900":/medium/i.test(d)?ue="500":/light/i.test(d)&&(ue="200"),v=s.tinySDF=new q3.TinySDF({fontFamily:f,fontWeight:ue,fontSize:24*gx,buffer:3*gx,radius:8*gx}),v.fontWeight=ue}if(this.localGlyphs[v.fontWeight][h])return this.localGlyphs[v.fontWeight][h];let b=String.fromCodePoint(h),{data:I,width:k,height:F,glyphWidth:U,glyphHeight:G,glyphLeft:q,glyphTop:Z,glyphAdvance:X}=v.draw(b);return this.localGlyphs[v.fontWeight][h]={id:h,bitmap:new ES({width:k,height:F},I),metrics:{width:U/gx,height:G/gx,left:q/gx,top:Z/gx-27,advance:X/gx,localGlyph:!0}}}}q3.loadGlyphRange=function(u,s,d,h,f){let v=256*s,b=v+255,I=h.transformRequest(h.normalizeGlyphsURL(d).replace("{fontstack}",u).replace("{range}",`${v}-${b}`),QA.Glyphs);q1(I,(k,F)=>{if(k)f(k);else if(F){let U={},G=(function(q){return new iX(q).readFields(blt,{})})(F);for(let q of G.glyphs)U[q.id]=q;f(null,{glyphs:U,ascender:G.ascender,descender:G.descender})}})},q3.TinySDF=class{constructor({fontSize:u=24,buffer:s=3,radius:d=8,cutoff:h=.25,fontFamily:f="sans-serif",fontWeight:v="normal",fontStyle:b="normal",lang:I=null}={}){this.buffer=s,this.cutoff=h,this.radius=d,this.lang=I;let k=this.size=u+4*s,F=this._createCanvas(k),U=this.ctx=F.getContext("2d",{willReadFrequently:!0});U.font=`${b} ${v} ${u}px ${f}`,U.textBaseline="alphabetic",U.textAlign="left",U.fillStyle="black",this.gridOuter=new Float64Array(k*k),this.gridInner=new Float64Array(k*k),this.f=new Float64Array(k),this.z=new Float64Array(k+1),this.v=new Uint16Array(k)}_createCanvas(u){let s=document.createElement("canvas");return s.width=s.height=u,s}draw(u){let{width:s,actualBoundingBoxAscent:d,actualBoundingBoxDescent:h,actualBoundingBoxLeft:f,actualBoundingBoxRight:v}=this.ctx.measureText(u),b=Math.ceil(d),I=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(v-f))),k=Math.min(this.size-this.buffer,b+Math.ceil(h)),F=I+2*this.buffer,U=k+2*this.buffer,G=Math.max(F*U,0),q=new Uint8ClampedArray(G),Z={data:q,width:F,height:U,glyphWidth:I,glyphHeight:k,glyphTop:b,glyphLeft:0,glyphAdvance:s};if(I===0||k===0)return Z;let{ctx:X,buffer:ue,gridInner:he,gridOuter:_e}=this;this.lang&&(X.lang=this.lang),X.clearRect(ue,ue,I,k),X.fillText(u,ue,ue+b);let Fe=X.getImageData(ue,ue,I,k);_e.fill(gG,0,G),he.fill(0,0,G);for(let Le=0;Le0?It*It:0,he[ut]=It<0?It*It:0}}oPe(_e,0,0,F,U,F,this.f,this.v,this.z),oPe(he,ue,ue,I,k,F,this.f,this.v,this.z);for(let Le=0;Le{let Wi=oX(Ht.stretch-Fe,Le,U,u.left*f),rn=aX(Ht.fixed-ut,It,Ht.stretch,X),Ei=oX(Fi.stretch-Ve,dt,G,u.top*f),Qi=aX(Fi.fixed-Ot,Lt,Fi.stretch,ue),si=oX(Ji.stretch-Fe,Le,U,u.left*f),ei=aX(Ji.fixed-ut,It,Ji.stretch,X),an=oX(Vi.stretch-Ve,dt,G,u.top*f),nn=aX(Vi.fixed-Ot,Lt,Vi.stretch,ue),dr=new yi(Wi,Ei),Bn=new yi(si,Ei),Qn=new yi(si,an),mn=new yi(Wi,an),cr=new yi(rn/I,Qi/I),to=new yi(ei/I,nn/I),Tn=s*Math.PI/180;if(Tn){let $n=Math.sin(Tn),mo=Math.cos(Tn),xa=[mo,-$n,$n,mo];dr._matMult(xa),Bn._matMult(xa),mn._matMult(xa),Qn._matMult(xa)}let tr=Ht.stretch+Ht.fixed,Br=Ji.stretch+Ji.fixed,uo=Fi.stretch+Fi.fixed,Lo=Vi.stretch+Vi.fixed,bo=u.imageSecondary;return{tl:dr,tr:Bn,bl:mn,br:Qn,texPrimary:{x:b.paddedRect.x+nk+tr,y:b.paddedRect.y+nk+uo,w:Br-tr,h:Lo-uo},texSecondary:bo?{x:bo.paddedRect.x+nk+tr,y:bo.paddedRect.y+nk+uo,w:Br-tr,h:Lo-uo}:void 0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cr,pixelOffsetBR:to,minFontScaleX:It/I/U,minFontScaleY:Lt/I/G,isSDF:d}};if(h&&(b.stretchX||b.stretchY)){let Ht=cPe(q,he,X),Fi=cPe(Z,_e,ue);for(let Ji=0;Jiv)&&(v=X.x),(!Z||X.y>b)&&(b=X.y)}let k=Math.min(v-h,b-f),F=k/2,U=new sD([],klt);if(k===0)return new yi(h,f);for(let Z=h;ZG.d||!G.d)&&(G=Z,d&&console.log("found best %d after %d probes",Math.round(1e4*Z.d)/1e4,q)),Z.max-G.d<=s||(F=Z.h/2,U.push(new Y3(Z.p.x-F,Z.p.y-F,F,u)),U.push(new Y3(Z.p.x+F,Z.p.y-F,F,u)),U.push(new Y3(Z.p.x-F,Z.p.y+F,F,u)),U.push(new Y3(Z.p.x+F,Z.p.y+F,F,u)),q+=4)}return d&&(console.log(`num probes: ${q}`),console.log(`best distance: ${G.d}`)),G.p}function klt(u,s){return s.max-u.max}class Y3{constructor(s,d,h,f){this.p=new yi(s,d),this.h=h,this.d=(function(v,b){let I=!1,k=1/0;for(let F=0;Fv.y!=ue.y>v.y&&v.x<(ue.x-X.x)*(v.y-X.y)/(ue.y-X.y)+X.x&&(I=!I),k=Math.min(k,Ol(v,X,ue))}}return(I?1:-1)*Math.sqrt(k)})(this.p,f),this.max=this.d+this.h*Math.SQRT2}}let Mlt=Object.keys,Zhe=Number.POSITIVE_INFINITY,Olt=Math.sqrt(2);function dPe(u,[s,d]){let h=0,f=0;if(d===Zhe){s<0&&(s=0);let v=s/Olt;switch(u){case"top-right":case"top-left":f=v-7;break;case"bottom-right":case"bottom-left":f=7-v;break;case"bottom":f=7-s;break;case"top":f=s-7}switch(u){case"top-right":case"bottom-right":h=-v;break;case"top-left":case"bottom-left":h=v;break;case"left":h=s;break;case"right":h=-s}}else{switch(s=Math.abs(s),d=Math.abs(d),u){case"top-right":case"top-left":case"top":f=d-7;break;case"bottom-right":case"bottom-left":case"bottom":f=7-d}switch(u){case"top-right":case"bottom-right":case"right":h=-s;break;case"top-left":case"bottom-left":case"left":h=s}}return[h,f]}function sX(u,s,d,h,f,v,b,I,k){if(!s||!s.usvg)return;let F=QRe(h),U=QRe(f),G=v!=="both"&&v!=="width"||!KRe(h)?1:U.width/F.width,q=v!=="both"&&v!=="height"||!WRe(h)?1:U.height/F.height;d.scaleSelf(G,q);let Z=d.toString();b.set(Z,d),I.set(Z,s);let{imagePosition:X}=Whe(Z,s,UR);k.set(Z,X)}function uPe(u,s,d,h,f,v,b,I,k){if(!u)return;let F=(function(U,G,q,Z,X,ue){if(U.kind==="camera")return U.maxSize;if(U.kind==="composite"){let he=G.possiblyEvaluate(new Fs(U.maxZoom,{worldview:ue}),q).evaluate(X,{},q),_e=G.possiblyEvaluate(new Fs(U.minZoom,{worldview:ue}),q).evaluate(X,{},q);return Math.max(he,_e)}return G.possiblyEvaluate(new Fs(Z,{worldview:ue})).evaluate(X,{},q)})(s,d,h,f,v,k);return u.scaleSelf(F*I*b)}function pPe(u,s,d,h,f,v,b,I,k){return{iconPrimary:uPe(u.getPrimary(),s,d,h,f,v,b,I,k),iconSecondary:uPe(u.getSecondary(),s,d,h,f,v,b,I,k)}}function Rlt(u,s,d){if(!s)return;let h=d.get(u.toString()),f=d.get(s.toString());h&&f&&(h.paddedRect.w===f.paddedRect.w&&h.paddedRect.h===f.paddedRect.h||Ko(`Mismatch in icon variant sizes: ${u.toString()} and ${s.toString()}`),h.usvg!==f.usvg&&Ko(`Mismatch in icon variant image types: ${u.id} and ${s.id}`))}function mPe(u,s,d,h){if(!u)return;let f=s.get(d.toString());if(u.imagePrimary=f,h){let v=s.get(h.toString());u.imageSecondary=v}}function Plt(u,s){for(let d in u.horizontal)hPe(u.horizontal[d],s);hPe(u.vertical,s)}function hPe(u,s){if(u){for(let d of u.positionedLines)for(let h of d.positionedGlyphs)if(h.image!==null){let f=h.image.toString();h.rect=s.get(f).paddedRect}}}function Xhe(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 Nlt(u,s,d,h,f,v,b,I,k){let F=Jhe(v.horizontal)||v.vertical,U=d.get("icon-text-fit-padding").evaluate(h,{},f),G,q=s;return s&&k!=="none"&&(u.allowVerticalPlacement&&v.vertical&&(G=YRe(s,v.vertical,k,U,I,b)),F&&(q=YRe(s,F,k,U,I,b))),{defaultShapedIcon:q,verticallyShapedIcon:G}}function Flt(u,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e,Fe,Le){let Ve=b.textMaxSize.evaluate(s,{},q);Ve===void 0?Ve=I*b.textScaleFactor:Ve*=b.textScaleFactor;let dt=u.layers[0].layout,ut=Jhe(d.horizontal)||d.vertical,It=Z.name==="globe",Ot=pp,Lt=u.tilePixelRatio*Ve/Ot,ki=(rn=u.overscaling,u.zoom>18&&rn>2&&(rn>>=1),Math.max(pn/(512*rn),1)*dt.get("symbol-spacing")),Ht=dt.get("text-padding")*u.tilePixelRatio,Fi=dt.get("icon-padding")*u.tilePixelRatio,Ji=At(dt.get("text-max-angle")),Vi=dt.get("icon-rotation-alignment")==="map"&&Le!=="point",Wi=ki/2;var rn;u.hasAnyIconTextFit===!1&&he!=="none"&&(u.hasAnyIconTextFit=!0);let Ei=s.properties?+s.properties[Co]:null,Qi=Ei&&u.elevationFeatureIdToIndex?u.elevationFeatureIdToIndex.get(Ei):65535,si=(ei,an,nn)=>{if(an.x<0||an.x>=pn||an.y<0||an.y>=pn)return;let dr=null;if(It){let{x:Bn,y:Qn,z:mn}=Z.projectTilePoint(an.x,an.y,nn);dr={anchor:new xT(Bn,Qn,mn,0,void 0),up:Z.upVector(nn,an.x,an.y)}}(function(Bn,Qn,mn,cr,to,Tn,tr,Br,uo,Lo,bo,$n,mo,xa,je,Ye,ri,Di,In,xn,Hn,vr,Bo,zo,Po,gs,Ll,Oo,hl){let As=Bn.addToLineVertexArray(Qn,cr),ja,Sl,wl,cl,fl,Ds,Uo,Vs=0,Xl=0,Ur=0,Da=0,Il=-1,Tc=-1,Pl={},Qd=FI(""),qs=mn?mn.anchor:Qn,Od=Oo!=="none",Dg=0,fm=0;if(uo._unevaluatedLayout.getValue("text-radial-offset")===void 0){let Zd=uo.layout.get("text-offset").evaluate(Hn,{},Po);Dg=Zd[0]*pp,fm=Zd[1]*pp}else Dg=uo.layout.get("text-radial-offset").evaluate(Hn,{},Po)*pp,fm=Zhe;if(Bn.allowVerticalPlacement&&to.vertical){let Zd=to.vertical;if(je)Ds=efe(Zd),Br&&(Uo=efe(Br));else{let Iu=uo.layout.get("text-rotate").evaluate(Hn,{},Po)+90;wl=lX(Lo,qs,Qn,bo,$n,mo,Zd,xa,Iu,Ye),Br&&(cl=lX(Lo,qs,Qn,bo,$n,mo,Br,Di,Iu))}}if(Tn){let Zd=Bn.iconSizeData,Iu=uo.layout.get("icon-rotate").evaluate(Hn,{},Po),gm=lPe(Tn,Iu,Bo,Od,vr.iconScaleFactor),zh=Br?lPe(Br,Iu,Bo,Od,vr.iconScaleFactor):void 0;Sl=lX(Lo,qs,Qn,bo,$n,mo,Tn,Di,Iu,null),Vs=4*gm.length;let ih=null;Zd.kind==="source"?(ih=[MS*uo.layout.get("icon-size").evaluate(Hn,{},Po)*vr.iconScaleFactor],ih[0]>rk&&Ko(`${Bn.layerIds[0]}: Value for "icon-size" is >= ${_G}. Reduce your "icon-size".`)):Zd.kind==="composite"&&(ih=[MS*vr.compositeIconSizes[0].evaluate(Hn,{},Po)*vr.iconScaleFactor,MS*vr.compositeIconSizes[1].evaluate(Hn,{},Po)*vr.iconScaleFactor],(ih[0]>rk||ih[1]>rk)&&Ko(`${Bn.layerIds[0]}: Value for "icon-size" is >= ${_G}. Reduce your "icon-size".`)),Bn.addSymbols(Bn.icon,gm,ih,xn,In,Hn,void 0,mn,Qn,As.lineStartIndex,As.lineLength,-1,zo,Po,gs,Ll),Il=Bn.icon.placedSymbolArray.length-1,zh&&(Xl=4*zh.length,Bn.addSymbols(Bn.icon,zh,ih,xn,In,Hn,M_.vertical,mn,Qn,As.lineStartIndex,As.lineLength,-1,zo,Po,gs,Ll),Tc=Bn.icon.placedSymbolArray.length-1)}for(let Zd in to.horizontal){let Iu=Zd,gm=to.horizontal[Iu];ja||(Qd=FI(gm.text),je?fl=efe(gm):ja=lX(Lo,qs,Qn,bo,$n,mo,gm,xa,uo.layout.get("text-rotate").evaluate(Hn,{},Po),Ye));let zh=gm.positionedLines.length===1;if(Ur+=fPe(Bn,mn,Qn,gm,tr,uo,je,Hn,Ye,As,to.vertical?M_.horizontal:M_.horizontalOnly,zh?Mlt(to.horizontal):[Iu],Pl,Il,vr,zo,Po,gs),zh)break}to.vertical&&(Da+=fPe(Bn,mn,Qn,to.vertical,tr,uo,je,Hn,Ye,As,M_.vertical,["vertical"],Pl,Tc,vr,zo,Po,gs));let Bp=-1,kg=(Zd,Iu)=>Zd?Math.max(Zd,Iu):Iu;Bp=kg(fl,Bp),Bp=kg(Ds,Bp),Bp=kg(Uo,Bp);let OS=Bp>-1?1:0;Bn.glyphOffsetArray.length>=65535&&Ko("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Hn.sortKey!==void 0&&Bn.addToSortKeyRanges(Bn.symbolInstances.length,Hn.sortKey),Bn.symbolInstances.emplaceBack(Qn.x,Qn.y,qs.x,qs.y,qs.z,Pl.right>=0?Pl.right:-1,Pl.center>=0?Pl.center:-1,Pl.left>=0?Pl.left:-1,Pl.vertical>=0?Pl.vertical:-1,Il,Tc,Qd,ja!==void 0?ja:Bn.collisionBoxArray.length,ja!==void 0?ja+1:Bn.collisionBoxArray.length,wl!==void 0?wl:Bn.collisionBoxArray.length,wl!==void 0?wl+1:Bn.collisionBoxArray.length,Sl!==void 0?Sl:Bn.collisionBoxArray.length,Sl!==void 0?Sl+1:Bn.collisionBoxArray.length,cl||Bn.collisionBoxArray.length,cl?cl+1:Bn.collisionBoxArray.length,bo,Ur,Da,Vs,Xl,OS,0,Dg,fm,Bp,0,Od?1:0,hl)})(u,an,dr,ei,d,h,v,f,u.layers[0],u.collisionBoxArray,s.index,s.sourceLayerIndex,u.index,Ht,Fe,F,0,Fi,Vi,_e,s,b,U,G,q,X,ue,he,Qi)};if(Le==="line")for(let ei of NR(s.geometry,0,0,pn,pn)){let an=Elt(ei,ki,Ji,d.vertical||ut,h,Ot,Lt,u.overscaling,pn);for(let nn of an)ut&&Llt(u,ut.text,Wi,nn)||si(ei,nn,q)}else if(Le==="line-center"){for(let ei of s.geometry)if(ei.length>1){let an=Tlt(ei,Ji,d.vertical||ut,h,Ot,Lt);an&&si(ei,an,q)}}else if(s.type==="Polygon")for(let ei of WD(s.geometry,0)){let an=Dlt(ei,16);si(ei[0],new xT(an.x,an.y,0,0,void 0),q)}else if(s.type==="LineString")for(let ei of s.geometry)si(ei,new xT(ei[0].x,ei[0].y,0,0,void 0),q);else if(s.type==="Point")for(let ei of s.geometry)for(let an of ei)si([an],new xT(an.x,an.y,0,0,void 0),q)}let _G=255,rk=_G*MS;function fPe(u,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he,_e){let Fe=(function(dt,ut,It,Ot,Lt,ki,Ht,Fi){let Ji=[];if(ut.positionedLines.length===0)return Ji;let Vi=Ot.layout.get("text-rotate").evaluate(ki,{})*Math.PI/180,Wi=(function(ei){let an=ei[0],nn=ei[1],dr=an*nn;return dr>0?[an,-nn]:dr<0?[-an,nn]:an===0?[nn,an]:[nn,-an]})(It),rn=Math.abs(ut.top-ut.bottom);for(let ei of ut.positionedLines)rn-=ei.lineOffset;let Ei=ut.positionedLines.length,Qi=rn/Ei,si=ut.top-It[1];for(let ei=0;eirk&&Ko(`${u.layerIds[0]}: Value for "text-size" is >= ${_G}. Reduce your "text-size".`)):Le.kind==="composite"&&(Ve=[MS*X.compositeTextSizes[0].evaluate(I,{},he)*X.textScaleFactor,MS*X.compositeTextSizes[1].evaluate(I,{},he)*X.textScaleFactor],(Ve[0]>rk||Ve[1]>rk)&&Ko(`${u.layerIds[0]}: Value for "text-size" is >= ${_G}. Reduce your "text-size".`)),u.addSymbols(u.text,Fe,Ve,k,b,I,U,s,d,F.lineStartIndex,F.lineLength,Z,ue,he,_e,!1);for(let dt of G)q[dt]=u.text.placedSymbolArray.length-1;return 4*Fe.length}function Jhe(u){for(let s in u)return u[s];return null}function lX(u,s,d,h,f,v,b,I,k,F){let U=b.top,G=b.bottom,q=b.left,Z=b.right;if(qRe(b)&&b.collisionPadding){let X=b.collisionPadding;q-=X[0],U-=X[1],Z+=X[2],G+=X[3]}if(k){let X=new yi(q,U),ue=new yi(Z,U),he=new yi(q,G),_e=new yi(Z,G),Fe=At(k),Le=new yi(0,0);F&&(Le=new yi(F[0],F[1])),X._rotateAround(Fe,Le),ue._rotateAround(Fe,Le),he._rotateAround(Fe,Le),_e._rotateAround(Fe,Le),q=Math.min(X.x,ue.x,he.x,_e.x),Z=Math.max(X.x,ue.x,he.x,_e.x),U=Math.min(X.y,ue.y,he.y,_e.y),G=Math.max(X.y,ue.y,he.y,_e.y)}return u.emplaceBack(s.x,s.y,s.z,d.x,d.y,q,U,Z,G,I,h,f,v),u.length-1}function efe(u){qRe(u)&&u.collisionPadding&&(u.top-=u.collisionPadding[1],u.bottom+=u.collisionPadding[3]);let s=u.bottom-u.top;return s>0?Math.max(10,s):null}function Llt(u,s,d,h){let f=u.compareText;if(s in f){let v=f[s];for(let b=v.length-1;b>=0;b--)if(h.dist(v[b])Le&&(Ve(ut,Vi,Ot,Lt,Fi,Ji),Ve(Vi,It,Fi,Ji,ki,Ht))}Ve(G,q,h,v,f,v),Ve(q,Z,f,v,f,b),Ve(Z,X,f,b,h,b),Ve(X,G,h,b,h,v),ue-=Le,he-=Le,_e+=Le,Fe+=Le;let dt=1/Math.max(_e-ue,Fe-he);return{scale:dt,x:ue*dt,y:he*dt,x2:_e*dt,y2:Fe*dt,projection:s}}function _Pe(u,{x:s,y:d},h=0){return new yi(((s-h)*u.scale-u.x)*pn,(d*u.scale-u.y)*pn)}let Blt=R(new Float32Array(16));class ok{constructor(s){this.spec=s,this.name=s.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(s,d){return{x:0,y:0,z:0}}unproject(s,d){return new de(0,0)}projectTilePoint(s,d,h){return{x:s,y:d,z:0}}locationPoint(s,d,h,f=!0){return s._coordinatePoint(s.locationCoordinate(d,h),f)}pixelsPerMeter(s,d){return et(1,s)*d}pixelSpaceConversion(s,d,h){return 1}farthestPixelDistance(s){return gPe(s,s.pixelsPerMeter)}pointCoordinate(s,d,h,f){let v=s.horizonLineFromTop(!1),b=new yi(d,Math.max(v,h));return s.rayIntersectionCoordinate(s.pointRayIntersection(b,f))}pointCoordinate3D(s,d,h){let f=new yi(d,h);if(s.elevation)return s.elevation.pointCoordinate(f);{let v=this.pointCoordinate(s,f.x,f.y,0);return[v.x,v.y,v.z]}}isPointAboveHorizon(s,d){if(s.elevation&&s.elevation.visibleDemTiles.length)return!this.pointCoordinate3D(s,d.x,d.y);let h=s.horizonLineFromTop();return d.y0?d<-K3+h&&(d=-K3+h):d>K3-h&&(d=K3-h);let b=v/Math.pow(dX(d),f),I=b*Math.sin(f*s),k=v-b*Math.cos(f*s);return I=.5*(I/Math.PI+.5),k=.5*(k/Math.PI+.5),{x:I,y:this.southernCenter?k:1-k,z:0}}unproject(s,d){s=(2*s-.5)*Math.PI,this.southernCenter&&(d=1-d),d=(2*(1-d)-.5)*Math.PI;let{n:h,f}=this,v=f-d,b=Math.sign(v),I=Math.sign(h)*Math.sqrt(s*s+v*v),k=Math.atan2(s,Math.abs(v))*b;v*h<0&&(k-=Math.PI*Math.sign(s)*b);let F=pt(Ce(k/h)+this.center[0],-180,180),U=pt(Ce(2*Math.atan(Math.pow(f/I,1/h))-K3),-it,it);return new de(F,this.southernCenter?-U:U)}}class yPe extends ok{constructor(s){super(s),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(s,d){return{x:He(s),y:nt(d),z:0}}unproject(s,d){let h=at(s),f=tt(d);return new de(h,f)}}let vPe=At(it);class Glt extends ok{project(s,d){let h=(d=At(d))*d,f=h*h;return{x:.5*((s=At(s))*(.8707-.131979*h+f*(f*(.003971*h-.001529*f)-.013791))/Math.PI+.5),y:1-.5*(d*(1.007226+h*(.015085+f*(.028874*h-.044475-.005916*f)))/Math.PI+1),z:0}}unproject(s,d){s=(2*s-.5)*Math.PI;let h=d=(2*(1-d)-1)*Math.PI,f=25,v=0,b=h*h;do{b=h*h;let F=b*b;v=(h*(1.007226+b*(.015085+F*(.028874*b-.044475-.005916*F)))-d)/(1.007226+b*(.045255+F*(.259866*b-.311325-.005916*11*F))),h=pt(h-v,-vPe,vPe)}while(Math.abs(v)>1e-6&&--f>0);b=h*h;let I=pt(Ce(s/(.8707+b*(b*(b*b*b*(.003971-.001529*b)-.013791)-.131979))),-180,180),k=Ce(h);return new de(I,k)}}let bPe=At(it);class jlt extends ok{project(s,d){d=At(d),s=At(s);let h=Math.cos(d),f=2/Math.PI,v=Math.acos(h*Math.cos(s/2)),b=Math.sin(v)/v,I=.5*(s*f+2*h*Math.sin(s/2)/b)||0,k=.5*(d+Math.sin(d)/b)||0;return{x:.5*(I/Math.PI+.5),y:1-.5*(k/Math.PI+1),z:0}}unproject(s,d){let h=s=(2*s-.5)*Math.PI,f=d=(2*(1-d)-1)*Math.PI,v=25,b=1e-6,I=0,k=0;do{let F=Math.cos(f),U=Math.sin(f),G=2*U*F,q=U*U,Z=F*F,X=Math.cos(h/2),ue=Math.sin(h/2),he=2*X*ue,_e=ue*ue,Fe=1-Z*X*X,Le=Fe?1/Fe:0,Ve=Fe?Math.acos(F*X)*Math.sqrt(1/Fe):0,dt=.5*(2*Ve*F*ue+2*h/Math.PI)-s,ut=.5*(Ve*U+f)-d,It=.5*Le*(Z*_e+Ve*F*X*q)+1/Math.PI,Ot=Le*(he*G/4-Ve*U*ue),Lt=.125*Le*(G*ue-Ve*U*Z*he),ki=.5*Le*(q*X+Ve*_e*F)+.5,Ht=Ot*Lt-ki*It;I=(ut*Ot-dt*ki)/Ht,k=(dt*Lt-ut*It)/Ht,h=pt(h-I,-Math.PI,Math.PI),f=pt(f-k,-bPe,bPe)}while((Math.abs(I)>b||Math.abs(k)>b)&&--v>0);return new de(Ce(h),Ce(f))}}class CPe extends ok{constructor(s){super(s),this.center=s.center||[0,0],this.parallels=s.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(s,d){let{scale:h,cosPhi:f}=this;return{x:At(s)*f*h+.5,y:-Math.sin(At(d))/f*h+.5,z:0}}unproject(s,d){let{scale:h,cosPhi:f}=this,v=-(d-.5)/h,b=pt(Ce((s-.5)/h)/f,-180,180),I=Math.asin(pt(v*f,-1,1)),k=pt(Ce(I),-it,it);return new de(b,k)}}class $lt extends yPe{constructor(s){super(s),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(s,d,h){let f=TR(s,d,h);return wn(f,f,_T(rv(h))),{x:f[0],y:f[1],z:f[2]}}locationPoint(s,d,h){let f=W(d.lat,d.lng),v=ht([],f),b=h?s._centerAltitude+h:s.elevation?s.elevation.getAtPointOrZero(s.locationCoordinate(d),s._centerAltitude):s._centerAltitude;kt(f,f,v,et(1,0)*pn*b);let I=R(new Float64Array(16));return H(I,s.pixelMatrix,s.globeMatrix),wn(f,f,I),new yi(f[0],f[1])}pixelsPerMeter(s,d){return et(1,0)*d}pixelSpaceConversion(s,d,h){let f=et(1,s)*d,v=mr(et(1,45)*d,f,h);return this.pixelsPerMeter(s,d)/v}createTileMatrix(s,d,h){let f=YD(rv(h.canonical));return H(new Float64Array(16),s.globeMatrix,f)}createInversionMatrix(s,d){let{center:h}=s,f=_T(rv(d));return me(f,f,At(h.lng)),ne(f,f,At(h.lat)),K(f,f,[s._pixelsPerMercatorPixel,s._pixelsPerMercatorPixel,1]),Float32Array.from(f)}pointCoordinate(s,d,h,f){return wR(s,d,h,!0)||new ci(0,0)}pointCoordinate3D(s,d,h){let f=this.pointCoordinate(s,d,h,0);return[f.x,f.y,f.z]}isPointAboveHorizon(s,d){return!wR(s,d.x,d.y,!1)}farthestPixelDistance(s){let d=(function(f,v){let b=f.cameraToCenterDistance,I=f._centerAltitude*v,k=f._camera,F=f._camera.forward(),U=rt([],st([],F,-b),[0,0,I]),G=f.worldSize/(2*Math.PI),q=[0,0,-G],Z=f.width/f.height,X=Math.tan(f.fovAboveCenter),ue=st([],k.up(),X),he=st([],k.right(),X*Z),_e=ht([],rt([],rt([],F,ue),he)),Fe=[],Le;if(new wa(U,_e).closestPointOnSphere(q,G,Fe)){let Ve=rt([],Fe,q),dt=bi([],Ve,U);Le=Math.cos(f.fovAboveCenter)*Qe(dt)}else{let Ve=bi([],U,q),dt=bi([],q,U);ht(dt,dt);let ut=Qe(Ve)-G;Le=Math.sqrt(ut*(ut+2*G));let It=Math.acos(Le/(G+ut))-Math.acos(li(F,dt));Le*=Math.cos(It)}return 1.01*Le})(s,this.pixelsPerMeter(s.center.lat,s.worldSize)),h=ux(s.zoom);if(h>0){let f=gPe(s,et(1,s.center.lat)*s.worldSize),v=s.worldSize/(2*Math.PI),b=Math.max(s.width,s.height)/s.worldSize*Math.PI;return mr(d,f+v*(1-Math.cos(b)),Math.pow(h,10))}return d}upVector(s,d,h){return TR(d,h,s,1)}upVectorScale(s){return{metersToTile:w3(E3(rv(s)))}}}function xPe(u){let s=u.parallels,d=!!s&&Math.abs(s[0]+s[1])<.01;switch(u.name){case"mercator":return new yPe(u);case"equirectangular":return new Ult(u);case"naturalEarth":return new Glt(u);case"equalEarth":return new zlt(u);case"winkelTripel":return new jlt(u);case"albers":return d?new CPe(u):new Vlt(u);case"lambertConformalConic":return d?new CPe(u):new Hlt(u);case"globe":return new $lt(u)}throw new Error(`Invalid projection name: ${u.name}`)}let qlt=Zi.types,Ylt=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function uX(u,s,d,h,f,v,b,I,k,F,U,G,q){let Z=I?Math.min(rk,Math.round(I[0])):0,X=I?Math.min(rk,Math.round(I[1])):0;u.emplaceBack(s,d,Math.round(32*h),Math.round(32*f),v,b,(Z<<1)+(k?1:0),X,16*F,16*U,256*G,256*q)}function pX(u,s,d){u.emplaceBack(s,d)}function mX(u,s,d,h,f,v,b){u.emplaceBack(s,d,h,f,v,b)}let hX=(u,s,d,h)=>{for(let f=0;f0&&(this.iconTransitioningVertexBuffer=s.createVertexBuffer(this.iconTransitioningVertexArray,rlt.members,!0)),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=s.createVertexBuffer(this.globeExtVertexArray,elt.members,!0)),!this.zOffsetVertexBuffer&&(this.zOffsetVertexArray.length>0||v)&&(this.zOffsetVertexBuffer=s.createVertexBuffer(this.zOffsetVertexArray,ilt.members,!0)),!this.orientationVertexBuffer&&this.orientationVertexArray&&this.orientationVertexArray.length>0&&(this.orientationVertexBuffer=s.createVertexBuffer(this.orientationVertexArray,nlt.members,!0)),this.opacityVertexBuffer.itemSize=1),(h||f)&&this.programConfigurations.upload(s))}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())}}Ln(tfe,"SymbolBuffers");class ife{constructor(s,d,h){this.layoutVertexArray=new s,this.layoutAttributes=d,this.indexArray=new h,this.segments=new Ml,this.collisionVertexArray=new vR,this.collisionVertexArrayExt=new Cg}upload(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=s.createVertexBuffer(this.collisionVertexArray,olt.members,!0),this.collisionVertexBufferExt=s.createVertexBuffer(this.collisionVertexArrayExt,alt.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Ln(ife,"CollisionBuffers");class gX{constructor(s){this.collisionBoxArray=s.collisionBoxArray,this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(b=>b.fqid),this.index=s.index,this.pixelRatio=s.pixelRatio,this.sourceLayerIndex=s.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.hasAnyIconTextFit=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=R([]),this.placementViewportMatrix=R([]);let d=this.layers[0]._unevaluatedLayout._values;this.worldview=s.worldview,this.textSizeData=ZRe(this.zoom,d["text-size"],this.worldview),this.iconSizeData=ZRe(this.zoom,d["icon-size"],this.worldview);let h=this.layers[0].layout,f=h.get("symbol-sort-key"),v=h.get("symbol-z-order");this.lut=s.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=v!=="viewport-y"&&f.constantOr(1)!==void 0,this.sortFeaturesByY=(v==="viewport-y"||v==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=h.get("text-writing-mode").map(b=>M_[b]),this.stateDependentLayerIds=this.layers.filter(b=>b.isStateDependent()).map(b=>b.id),this.sourceID=s.sourceID,this.projection=s.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 tfe(new wg(this.layers,{zoom:this.zoom,lut:this.lut},s=>s.startsWith("text")||s.startsWith("symbol"))),this.icon=new tfe(new wg(this.layers,{zoom:this.zoom,lut:this.lut},s=>s.startsWith("icon")||s.startsWith("symbol"))),this.glyphOffsetArray=new HD,this.lineVertexArray=new Sb,this.symbolInstances=new uT}calculateGlyphDependencies(s,d,h,f,v){for(let b of s){let I=b.codePointAt(0);if(I===void 0)break;if(d[I]=!0,f&&v&&I<=65535){let k=pG[b];k&&(d[k.charCodeAt(0)]=!0)}}}updateFootprints(s,d){}updateReplacement(s,d){if(d.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=d.updateTime;let h=d.getReplacementRegionsForTile(s.toUnwrapped(),!0);return!RR(this.activeReplacements,h)&&(this.activeReplacements=h,!0)}populate(s,d,h,f){let v=this.layers[0],b=v.layout,I=this.projection.name==="globe",k=b.get("text-font"),F=b.get("text-field"),U=b.get("icon-image"),[G,q]=b.get("icon-size-scale-range"),Z=pt(d.scaleFactor||1,G,q),X=(F.value.kind!=="constant"||F.value.value instanceof Op&&!F.value.value.isEmpty()||F.value.value.toString().length>0)&&(k.value.kind!=="constant"||k.value.value.length>0),ue=U.value.kind!=="constant"||!!U.value.value||Object.keys(U.parameters).length>0,he=b.get("symbol-sort-key");if(this.features=[],!X&&!ue)return;let _e=d.iconDependencies,Fe=d.glyphDependencies,Le=d.availableImages,Ve=new Fs(this.zoom,{worldview:this.worldview});for(let{feature:dt,id:ut,index:It,sourceLayerIndex:Ot}of s){let Lt=v._featureFilter.needGeometry,ki=en(dt,Lt);if(!v._featureFilter.filter(Ve,ki,h))continue;if(Lt||(ki.geometry=Mn(dt,h,f)),I&&dt.type!==1&&h.z<=5){let Wi=ki.geometry,rn=.98078528056,Ei=(Qi,si)=>li(TR(Qi.x,Qi.y,h,1),TR(si.x,si.y,h,1))=0;for(let Ei of Ht.sections)if(Ei.image){let Qi=Ei.image.getPrimary().scaleSelf(this.pixelRatio),si=Qi.id.toString(),ei=_e.get(si)||[];ei.push(Qi),_e.set(si,ei)}else{let Qi=nT(Ht.toString()),si=Ei.fontStack||Wi,ei=Fe[si]=Fe[si]||{};this.calculateGlyphDependencies(Ei.text,ei,rn,this.allowVerticalPlacement,Qi)}}}if(b.get("symbol-placement")==="line"&&(this.features=(function(dt){let ut={},It={},Ot=[],Lt=0;function ki(Vi){Ot.push(dt[Vi]),Lt++}function Ht(Vi,Wi,rn){let Ei=It[Vi];return delete It[Vi],It[Wi]=Ei,Ot[Ei].geometry[0].pop(),Ot[Ei].geometry[0]=Ot[Ei].geometry[0].concat(rn[0]),Ei}function Fi(Vi,Wi,rn){let Ei=ut[Wi];return delete ut[Wi],ut[Vi]=Ei,Ot[Ei].geometry[0].shift(),Ot[Ei].geometry[0]=rn[0].concat(Ot[Ei].geometry[0]),Ei}function Ji(Vi,Wi,rn){let Ei=rn?Wi[0][Wi[0].length-1]:Wi[0][0];return`${Vi}:${Ei.x}:${Ei.y}`}for(let Vi=0;ViVi.geometry)})(this.features)),b.get("symbol-elevation-reference")==="hd-road-markup"){if(this.elevationType="road",d.elevationFeatures){!this.elevationFeatures&&d.elevationFeatures.length>0&&(this.elevationFeatures=[],this.elevationFeatureIdToIndex=new Map);for(let dt of d.elevationFeatures)this.elevationFeatureIdToIndex.set(dt.id,this.elevationFeatures.length),this.elevationFeatures.push(dt)}}else b.get("symbol-z-elevate")&&(this.elevationType="offset");this.elevationType!=="none"&&(this.zOffsetBuffersNeedUpload=!0),this.sortFeaturesByKey&&this.features.sort((dt,ut)=>dt.sortKey-ut.sortKey)}update(s,d,h,f,v,b,I){this.text.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,this.worldview),this.icon.programConfigurations.updatePaintArrays(s,d,v,h,f,b,I,this.worldview)}updateRoadElevation(s){if(this.elevationType!=="road"||!this.elevationFeatures||this.elevationStateComplete)return;this.elevationStateComplete=!0,this.hasAnyZOffset=!1;let d=!1,h=jt(s),f=1/h,v=!1,b=!1;for(let I=0;I0||q>0,he=Z>0,_e=this.elevationFeatures[k.elevationFeatureIndex];if(_e){let Fe=new yi(k.tileAnchorX,k.tileAnchorY),Le=.075+_e.pointElevation(Fe);k.zOffset!==Le&&(d=!0,k.zOffset=Le);let Ve=_e.computeSlopeNormal(Fe,f),dt=lo(Xt(),we(0,0,1),Ve);Xn(F,F,dt),Xn(U,U,dt),F[2]*=h,U[2]*=h,F[0]===1&&F[1]===0&&F[2]===0&&U[0]===0&&U[1]===1&&U[2]===0||(v=v||ue,b=b||he)}if(ue&&(hX(this.text.orientationVertexArray,G,F,U),hX(this.text.orientationVertexArray,q,F,U)),he){let{placedIconSymbolIndex:Fe,verticalPlacedIconSymbolIndex:Le}=k;Fe>=0&&hX(this.icon.orientationVertexArray,Z,F,U),Le>=0&&hX(this.icon.orientationVertexArray,X,F,U)}}v||(this.text.orientationVertexArray=void 0),b||(this.icon.orientationVertexArray=void 0),d&&(this.zOffsetBuffersNeedUpload=!0,this.zOffsetSortDirty=!0)}updateZOffset(){let s=(v,b,I)=>{h+=b,h>v.length&&v.resize(h);for(let k=-b;k<0;k++)v.emplace(k+h,I)},d=(v,b,I)=>{f+=b,f>v.length&&v.resize(f);for(let k=-b;k<0;k++)v.emplace(k+f,I)};if(!this.zOffsetBuffersNeedUpload)return;this.zOffsetBuffersNeedUpload=!1;let h=0,f=0;for(let v=0;v0;if((I>0||k>0)&&(s(this.text.zOffsetVertexArray,I,U),s(this.text.zOffsetVertexArray,k,U)),G){let{placedIconSymbolIndex:q,verticalPlacedIconSymbolIndex:Z}=b;q>=0&&d(this.icon.zOffsetVertexArray,F,U),Z>=0&&d(this.icon.zOffsetVertexArray,b.numVerticalIconVertices,U)}}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(s){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(s),this.iconCollisionBox.upload(s)),this.text.upload(s,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload,this.zOffsetBuffersNeedUpload),this.icon.upload(s,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=xPe(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(s,d){let h=this.lineVertexArray.length;if(s.segment!==void 0)for(let{x:f,y:v}of d)this.lineVertexArray.emplaceBack(f,v);return{lineStartIndex:h,lineLength:this.lineVertexArray.length-h}}addSymbols(s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue,he){let _e=s.indexArray,Fe=s.layoutVertexArray,Le=s.globeExtVertexArray,Ve=s.segments.prepareSegment(4*d.length,Fe,_e,this.canOverlap?b.sortKey:void 0),dt=this.glyphOffsetArray.length,ut=Ve.vertexLength,It=this.allowVerticalPlacement&&I===M_.vertical?Math.PI/2:0,Ot=b.text&&b.text.sections;for(let ki=0;ki=0?d.rightJustifiedTextSymbolIndex:d.centerJustifiedTextSymbolIndex>=0?d.centerJustifiedTextSymbolIndex:d.leftJustifiedTextSymbolIndex>=0?d.leftJustifiedTextSymbolIndex:d.verticalPlacedTextSymbolIndex>=0?d.verticalPlacedTextSymbolIndex:f),b=Khe(this.textSizeData,s,v)/pp;return this.tilePixelRatio*b}getSymbolInstanceIconSize(s,d,h){let f=this.icon.placedSymbolArray.get(h),v=Khe(this.iconSizeData,s,f);return this.tilePixelRatio*v}_commitDebugCollisionVertexUpdate(s,d,h,f){s.emplaceBack(d,-h,-h,f),s.emplaceBack(d,h,-h,f),s.emplaceBack(d,h,h,f),s.emplaceBack(d,-h,h,f)}_updateTextDebugCollisionBoxes(s,d,h,f,v,b,I){for(let k=f;k0}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(s,d){let h=s.placedSymbolArray.get(d),f=h.vertexStartIndex+4*h.numGlyphs;for(let v=h.vertexStartIndex;vf[I]-f[k]||v[k]-v[I]),b}getSortedIndexesByZOffset(){if(!this.zOffsetSortDirty)return this.symbolInstanceIndexesSortedZOffset;if(!this.symbolInstanceIndexesSortedZOffset){this.symbolInstanceIndexesSortedZOffset=[];for(let s=0;sthis.symbolInstances.get(d).zOffset-this.symbolInstances.get(s).zOffset)}addToSortKeyRanges(s,d){let h=this.sortKeyRanges[this.sortKeyRanges.length-1];h&&h.sortKey===d?h.symbolInstanceEnd=s+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:s,symbolInstanceEnd:s+1})}sortFeatures(s){if(this.sortFeaturesByY&&this.sortedAngle!==s&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(s),this.sortedAngle=s,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let d of this.symbolInstanceIndexes){let h=this.symbolInstances.get(d);this.featureSortOrder.push(h.featureIndex);let{rightJustifiedTextSymbolIndex:f,centerJustifiedTextSymbolIndex:v,leftJustifiedTextSymbolIndex:b,verticalPlacedTextSymbolIndex:I,placedIconSymbolIndex:k,verticalPlacedIconSymbolIndex:F}=h;f>=0&&this.addIndicesForPlacedSymbol(this.text,f),v>=0&&v!==f&&this.addIndicesForPlacedSymbol(this.text,v),b>=0&&b!==v&&b!==f&&this.addIndicesForPlacedSymbol(this.text,b),I>=0&&this.addIndicesForPlacedSymbol(this.text,I),k>=0&&this.addIndicesForPlacedSymbol(this.icon,k),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 SPe,wPe,nfe;Ln(gX,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),gX.addDynamicAttributes=fX;class IPe{constructor(s){this.type=s.property.overrides?s.property.overrides.runtimeType:kp,this.defaultValue=s}evaluate(s){if(s.formattedSection){let d=this.defaultValue.property.overrides;if(d&&d.hasOverride(s.formattedSection))return d.getOverride(s.formattedSection)}return s.feature&&s.featureState?this.defaultValue.evaluate(s.feature,s.featureState):this.defaultValue.property.specification.default}eachChild(s){this.defaultValue.isConstant()||s(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ln(IPe,"FormatSectionOverride",{omit:["defaultValue"]});let rfe=()=>nfe||(nfe={layout:SPe||(SPe=new bs({"symbol-placement":new on(zt.layout_symbol["symbol-placement"]),"symbol-spacing":new on(zt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new on(zt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new An(zt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new on(zt.layout_symbol["symbol-z-order"]),"symbol-z-elevate":new on(zt.layout_symbol["symbol-z-elevate"]),"symbol-elevation-reference":new on(zt.layout_symbol["symbol-elevation-reference"]),"icon-allow-overlap":new on(zt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new on(zt.layout_symbol["icon-ignore-placement"]),"icon-optional":new on(zt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new on(zt.layout_symbol["icon-rotation-alignment"]),"icon-size":new An(zt.layout_symbol["icon-size"]),"icon-size-scale-range":new on(zt.layout_symbol["icon-size-scale-range"]),"icon-text-fit":new An(zt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new An(zt.layout_symbol["icon-text-fit-padding"]),"icon-image":new An(zt.layout_symbol["icon-image"]),"icon-image-use-theme":new on({type:"string",default:"default","property-type":"data-constant"}),"icon-rotate":new An(zt.layout_symbol["icon-rotate"]),"icon-padding":new on(zt.layout_symbol["icon-padding"]),"icon-keep-upright":new on(zt.layout_symbol["icon-keep-upright"]),"icon-offset":new An(zt.layout_symbol["icon-offset"]),"icon-anchor":new An(zt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new on(zt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new on(zt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new on(zt.layout_symbol["text-rotation-alignment"]),"text-field":new An(zt.layout_symbol["text-field"]),"text-font":new An(zt.layout_symbol["text-font"]),"text-size":new An(zt.layout_symbol["text-size"]),"text-size-scale-range":new on(zt.layout_symbol["text-size-scale-range"]),"text-max-width":new An(zt.layout_symbol["text-max-width"]),"text-line-height":new An(zt.layout_symbol["text-line-height"]),"text-letter-spacing":new An(zt.layout_symbol["text-letter-spacing"]),"text-justify":new An(zt.layout_symbol["text-justify"]),"text-radial-offset":new An(zt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new on(zt.layout_symbol["text-variable-anchor"]),"text-anchor":new An(zt.layout_symbol["text-anchor"]),"text-max-angle":new on(zt.layout_symbol["text-max-angle"]),"text-writing-mode":new on(zt.layout_symbol["text-writing-mode"]),"text-rotate":new An(zt.layout_symbol["text-rotate"]),"text-padding":new on(zt.layout_symbol["text-padding"]),"text-keep-upright":new on(zt.layout_symbol["text-keep-upright"]),"text-transform":new An(zt.layout_symbol["text-transform"]),"text-offset":new An(zt.layout_symbol["text-offset"]),"text-allow-overlap":new on(zt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new on(zt.layout_symbol["text-ignore-placement"]),"text-optional":new on(zt.layout_symbol["text-optional"]),visibility:new on(zt.layout_symbol.visibility)})),paint:wPe||(wPe=new bs({"icon-opacity":new An(zt.paint_symbol["icon-opacity"]),"icon-occlusion-opacity":new An(zt.paint_symbol["icon-occlusion-opacity"]),"icon-emissive-strength":new An(zt.paint_symbol["icon-emissive-strength"]),"text-emissive-strength":new An(zt.paint_symbol["text-emissive-strength"]),"icon-color":new An(zt.paint_symbol["icon-color"]),"icon-halo-color":new An(zt.paint_symbol["icon-halo-color"]),"icon-halo-width":new An(zt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new An(zt.paint_symbol["icon-halo-blur"]),"icon-translate":new on(zt.paint_symbol["icon-translate"]),"icon-translate-anchor":new on(zt.paint_symbol["icon-translate-anchor"]),"icon-image-cross-fade":new on(zt.paint_symbol["icon-image-cross-fade"]),"text-opacity":new An(zt.paint_symbol["text-opacity"]),"text-occlusion-opacity":new An(zt.paint_symbol["text-occlusion-opacity"]),"text-color":new An(zt.paint_symbol["text-color"],{runtimeType:uu,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new An(zt.paint_symbol["text-halo-color"]),"text-halo-width":new An(zt.paint_symbol["text-halo-width"]),"text-halo-blur":new An(zt.paint_symbol["text-halo-blur"]),"text-translate":new on(zt.paint_symbol["text-translate"]),"text-translate-anchor":new on(zt.paint_symbol["text-translate-anchor"]),"icon-color-saturation":new on(zt.paint_symbol["icon-color-saturation"]),"icon-color-contrast":new on(zt.paint_symbol["icon-color-contrast"]),"icon-color-brightness-min":new on(zt.paint_symbol["icon-color-brightness-min"]),"icon-color-brightness-max":new on(zt.paint_symbol["icon-color-brightness-max"]),"symbol-z-offset":new An(zt.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"})}))},nfe);class _X extends Fp{constructor(s,d,h,f){super(s,rfe(),d,h,f,s.layout?s.layout["icon-image-use-theme"]:null),this._colorAdjustmentMatrix=R([]),this.hasOcclusionOpacityProperties=s.paint!==void 0&&("icon-occlusion-opacity"in s.paint||"text-occlusion-opacity"in s.paint)}_handleSpecialPaintPropertyUpdate(s){s!=="icon-occlusion-opacity"&&s!=="text-occlusion-opacity"||(this.hasOcclusionOpacityProperties=!0)}recalculate(s,d){super.recalculate(s,d),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 v of h)f.indexOf(v)<0&&f.push(v);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(s,d,h,f){return this._saturation===s&&this._contrast===d&&this._brightnessMin===h&&this._brightnessMax===f||(this._colorAdjustmentMatrix=(function(v,b,I,k){v=yf(v),b=sm(b);let F=P(),U=v/3,G=1-2*U,q=[G,U,U,0,U,G,U,0,U,U,G,0,0,0,0,1],Z=.5-.5*b,X=k-I;return H(F,[X,0,0,0,0,X,0,0,0,0,X,0,I,I,I,1],[b,0,0,0,0,b,0,0,0,0,b,0,Z,Z,Z,1]),H(F,F,q),F})(s,d,h,f),this._saturation=s,this._contrast=d,this._brightnessMin=h,this._brightnessMax=f),this._colorAdjustmentMatrix}getValueAndResolveTokens(s,d,h,f){let v=this.layout.get(s).evaluate(d,{},h,f),b=this._unevaluatedLayout._values[s];return b.isDataDriven()||tT(b.value)||!v?v:(function(I,k){return k.replace(/{([^{}]+)}/g,(F,U)=>U in I?String(I[U]):"")})(d.properties,v)}createBucket(s){return new gX(s)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(let s of rfe().paint.overridableProperties){if(!_X.hasPaintOverride(this.layout,s))continue;let d=this.paint.get(s),h=new IPe(d),f=new Ef(h,d.property.specification,this.scope,this.options,this.layout.get("icon-image-use-theme")),v=null;v=d.value.kind==="constant"||d.value.kind==="source"?new b_("source",f):new $y("composite",f,d.value.zoomStops,d.value.interpolationType),this.paint._values[s]=new ix(d.property,v,d.parameters)}}_handleOverridablePaintPropertyUpdate(s,d,h){return!(!this.layout||d.isDataDriven()||h.isDataDriven())&&_X.hasPaintOverride(this.layout,s)}static hasPaintOverride(s,d){let h=s.get("text-field"),f=rfe().paint.properties[d],v=!1,b=I=>{for(let k of I)if(f.overrides&&f.overrides.hasOverride(k))return void(v=!0)};if(h.value.kind==="constant"&&h.value.value instanceof Op)b(h.value.value.sections);else if(h.value.kind==="source"){let I=F=>{v||(F instanceof po&&kd(F.value)===cb?b(F.value.sections):F instanceof GC?b(F.sections):F.eachChild(I))},k=h.value;k._styleExpression&&I(k._styleExpression.expression)}return v}getProgramIds(){return["symbol"]}getDefaultProgramParams(s,d,h){return{config:new B0(this,{zoom:d,lut:h}),overrideFog:!1}}hasElevation(){return this.layout&&this.layout.get("symbol-elevation-reference")==="hd-road-markup"}}let TPe,EPe,APe,DPe;var ofe=ia([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);function yX(u,s,d,h,f,v,b,I){let k=[u,s,1,d,h,1,f,v,1],F=[b,I,1],U=C([],k),[G,q,Z]=yn(F,F,U);return w(k,k,[G,0,0,0,q,0,0,0,Z])}function kPe(u,s,d,h,f,v,b,I){let k=(function(F,U,G,q,Z,X,ue,he){let _e=yX(0,0,1,0,1,1,0,1),Fe=yX(F,U,G,q,Z,X,ue,he);return w(Fe,Fe,C([],_e))})(u,s,d,h,f,v,b,I);return[k[2]/k[8]/pn,k[5]/k[8]/pn]}function vX(u){return[u[0],Math.min(Math.max(u[1],-it),it)]}class MPe extends lb{constructor(s,d,h,f){super(),this.id=s,this.dispatcher=h,this.coordinates=d.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=d,this._dirty=!1}load(s,d){if(this._loaded=d||!1,this.fire(new d_("dataloading",{dataType:"source"})),this.url=this.options.url,!this.url)return s&&(this.coordinates=s),this._loaded=!0,void this._finishLoading();this._imageRequest=ac(this.map._requestManager.transformRequest(this.url,QA.Image),(h,f)=>{this._imageRequest=null,this._loaded=!0,h?this.fire(new qd(h)):f&&(this.image=f instanceof HTMLImageElement?l_.getImageData(f):f,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,s&&(this.coordinates=s),this._finishLoading())})}loaded(){return this._loaded}updateImage(s){return s.url?(this._imageRequest&&s.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=s.url,this.load(s.coordinates,this._loaded),this):this}setTexture(s){if(!(s.handle instanceof WebGLTexture))throw new Error("The provided handle is not a WebGLTexture instance");return this.texture=new zR(this.map.painter.context,s.handle),this.width=s.dimensions[0],this.height=s.dimensions[1],this._dirty=!1,this._loaded=!0,this._finishLoading(),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new d_("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(s){this.map=s,this.load()}onRemove(s){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),!this.texture||this.texture instanceof zR||this.texture.destroy(),this.boundsBuffer&&(this.boundsBuffer.destroy(),this.elevatedGlobeVertexBuffer&&this.elevatedGlobeVertexBuffer.destroy(),this.elevatedGlobeIndexBuffer&&this.elevatedGlobeIndexBuffer.destroy())}setCoordinates(s){if(this.coordinates=s,this._boundsArray=void 0,this._unsupportedCoords=!1,!s.length)return this;this.onNorthPole=!1,this.onSouthPole=!1;let d=s[0][1],h=s[0][1];for(let v of s)v[1]>h&&(h=v[1]),v[1]it?this.onNorthPole=!0:f<-it&&(this.onSouthPole=!0),!this.onNorthPole&&!this.onSouthPole){let v=s.map(ci.fromLngLat);this.tileID=(function(b){let I=1/0,k=1/0,F=-1/0,U=-1/0;for(let ue of b)I=Math.min(I,ue.x),k=Math.min(k,ue.y),F=Math.max(F,ue.x),U=Math.max(U,ue.y);let G=Math.max(F-I,U-k),q=Math.max(0,Math.floor(-Math.log2(G))),Z=Math.pow(2,q),X=Math.floor((I+F)/2*Z);return X>1&&(X-=1),new nv(q,X,Math.floor((k+U)/2*Z))})(v),this.minzoom=this.maxzoom=this.tileID.z}return this.fire(new d_("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){!this.texture||this.texture instanceof zR||(this.texture.destroy(),this._dirty=!0),this.texture=null,this._boundsArray=void 0,this._unsupportedCoords=!1}_prepareData(s){for(let _e in this.tiles){let Fe=this.tiles[_e];Fe.state!=="loaded"&&(Fe.state="loaded",Fe.texture=this.texture)}if(this._boundsArray||this.onNorthPole||this.onSouthPole||this._unsupportedCoords)return;let d=yG(new nv(0,0,0),this.map.transform.projection),h=[d.projection.project(this.coordinates[0][0],this.coordinates[0][1]),d.projection.project(this.coordinates[1][0],this.coordinates[1][1]),d.projection.project(this.coordinates[2][0],this.coordinates[2][1]),d.projection.project(this.coordinates[3][0],this.coordinates[3][1])];if(!(function(_e){let Fe=_e[1].x-_e[0].x,Le=_e[1].y-_e[0].y,Ve=_e[2].x-_e[1].x,dt=_e[2].y-_e[1].y,ut=_e[3].x-_e[2].x,It=_e[3].y-_e[2].y,Ot=_e[0].x-_e[3].x,Lt=_e[0].y-_e[3].y,ki=Fe*dt-Ve*Le,Ht=Ve*It-ut*dt,Fi=ut*Lt-Ot*It,Ji=Ot*Le-Fe*Lt;return ki>0&&Ht>0&&Fi>0&&Ji>0||ki<0&&Ht<0&&Fi<0&&Ji<0})(h))return console.warn("Image source coordinates are defining non-convex area in the Mercator projection"),void(this._unsupportedCoords=!0);let f=yG(this.tileID,this.map.transform.projection),[v,b,I,k]=this.coordinates.map(_e=>{let Fe=f.projection.project(_e[0],_e[1]);return _Pe(f,Fe)._round()});this.perspectiveTransform=kPe(v.x,v.y,b.x,b.y,I.x,I.y,k.x,k.y);let F=this._boundsArray=new ox;F.emplaceBack(v.x,v.y,0,0),F.emplaceBack(b.x,b.y,pn,0),F.emplaceBack(k.x,k.y,0,pn),F.emplaceBack(I.x,I.y,pn,pn),this.boundsBuffer&&(this.boundsBuffer.destroy(),this.elevatedGlobeVertexBuffer&&this.elevatedGlobeVertexBuffer.destroy(),this.elevatedGlobeIndexBuffer&&this.elevatedGlobeIndexBuffer.destroy()),this.boundsBuffer=s.createVertexBuffer(F,ofe.members),this.boundsSegments=Ml.simpleSegment(0,0,4,2);let U=[],G=[vX((q=this.coordinates)[0]),vX(q[1]),vX(q[2]),vX(q[3])];var q;let[Z,X,ue,he]=(function(_e){let Fe=_e[0][0],Le=Fe,Ve=_e[0][1],dt=Ve;for(let ut=1;ut<_e.length;ut++)_e[ut][0]Le&&(Le=_e[ut][0]),_e[ut][1]dt&&(dt=_e[ut][1]);return[Fe,Ve,Le-Fe,dt-Ve]})(G);{let _e=new ox,[Fe,Le,Ve,dt]=(function(Ei){let Qi=Ei[0].x,si=Qi,ei=Ei[0].y,an=ei;for(let nn=1;nnsi&&(si=Ei[nn].x),Ei[nn].yan&&(an=Ei[nn].y);return[Qi,ei,si-Qi,an-ei]})(h),ut=Ei=>[(Ei.x-Fe)/Ve,(Ei.y-Le)/dt],[It,Ot,Lt,ki]=h.map(ut),Ht=(function(Ei,Qi,si,ei,an,nn,dr,Bn){let Qn=yX(0,0,1,0,1,1,0,1);return w(Qn,Qn,C([],yX(Ei,Qi,si,ei,an,nn,dr,Bn)))})(It[0],It[1],Ot[0],Ot[1],Lt[0],Lt[1],ki[0],ki[1]);this.elevatedGlobePerspectiveTransform=kPe(It[0],It[1],Ot[0],Ot[1],Lt[0],Lt[1],ki[0],ki[1]);let Fi=(Ei,Qi)=>{U.push(Ei.lng);let si=Math.round((Ei.lng-Z)/ue*pn),ei=Math.round((Ei.lat-X)/he*pn),an=ut(Qi),nn=yn([],[an[0],an[1],1],Ht),dr=Math.round(nn[0]/nn[2]*pn),Bn=Math.round(nn[1]/nn[2]*pn);_e.emplaceBack(si,ei,dr,Bn)},Ji=h[3].x-h[0].x,Vi=h[3].y-h[0].y,Wi=h[2].x-h[1].x,rn=h[2].y-h[1].y;for(let Ei=0;Ei<65;Ei++){let Qi=Ei/64,si=[h[0].x+Qi*Ji,h[0].y+Qi*Vi],ei=[h[1].x+Qi*Wi,h[1].y+Qi*rn],an=ei[0]-si[0],nn=ei[1]-si[1];for(let dr=0;dr<65;dr++){let Bn=dr/64,Qn={x:si[0]+an*Bn,y:si[1]+nn*Bn};Fi(d.projection.unproject(Qn.x,Qn.y),Qn)}}this.elevatedGlobeVertexBuffer=s.createVertexBuffer(_e,ofe.members)}{this.maxLongitudeTriangleSize=0;let _e=[],Fe=new fd,Le=(Ve,dt,ut)=>{Fe.emplaceBack(Ve,dt,ut);let It=U[Ve],Ot=U[dt],Lt=U[ut],ki=Math.min(Math.min(It,Ot),Lt),Ht=Math.max(Math.max(It,Ot),Lt)-ki;Ht>this.maxLongitudeTriangleSize&&(this.maxLongitudeTriangleSize=Ht),_e.push(ki+Ht/2)};for(let Ve=0;Ve<64;Ve++)for(let dt=0;dt<64;dt++){let ut=65*Ve+dt,It=ut+1,Ot=ut+65,Lt=Ot+1;Le(ut,Ot,It),Le(It,Ot,Lt)}[_e,Fe]=(function(Ve,dt){let ut=Array.from({length:Ve.length},(Lt,ki)=>ki);ut.sort((Lt,ki)=>Ve[Lt]-Ve[ki]);let It=[],Ot=new fd;for(let Lt=0;Lt{b.segments.push({vertexOffset:0,primitiveOffset:G,vertexLength:d.segments[0].vertexLength,primitiveLength:q,sortKey:void 0,vaos:{}})},k=.51*this.maxLongitudeTriangleSize;if(Math.abs(h[0]-f)<=k){let G=Uu(h,0,h.length,f+k);return G===h.length||I(G,sl(h,G+1,h.length,f+360-k)-G),b}fd.fqid),this.projection=s.projection,this.index=s.index,this.worldview=s.worldview,this.hasZoomDependentProperties=this.layers[0].isZoomDependent(),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.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=s.styleDefinedModelURLs}updateFootprints(s,d){}populate(s,d,h,f){this.tileToMeter=jt(h);let v=this.layers[0]._featureFilter.needGeometry;this.lookup=new Uint8Array(this.lookupDim*this.lookupDim);for(let{feature:b,id:I,index:k,sourceLayerIndex:F}of s){let U=I??(b.properties&&b.properties.hasOwnProperty("id")?b.properties.id:void 0),G=en(b,v);if(!this.layers[0]._featureFilter.filter(new Fs(this.zoom,{worldview:this.worldview}),G,h))continue;let q={id:U,sourceLayerIndex:F,index:k,geometry:v?G.geometry:Mn(b,h,f),properties:b.properties,type:b.type,patterns:{}},Z=this.addFeature(q,q.geometry,G);Z&&d.featureIndex.insert(b,q.geometry,k,F,this.index,this.instancesPerModel[Z].instancedDataArray.length,pn/32)}this.lookup=null}update(s,d,h,f){for(let v in this.instancesPerModel){let b=this.instancesPerModel[v];for(let I in s)b.idToFeaturesIndex.hasOwnProperty(I)&&(this.evaluate(b.features[b.idToFeaturesIndex[I]],s[I],b,!0),this.uploaded=!1)}this.maxHeight=0}updateZoomBasedPaintProperties(){if(!this.hasZoomDependentProperties)return!1;let s=!1;for(let d in this.instancesPerModel){let h=this.instancesPerModel[d];for(let f of h.features){let v=this.layers[0],b=f.feature,I=this.canonical,k=v.paint.get("model-rotation").evaluate(b,{},I),F=v.paint.get("model-scale").evaluate(b,{},I),U=v.paint.get("model-translation").evaluate(b,{},I);De(f.rotation,k)&&De(f.scale,F)&&De(f.translation,U)||(this.evaluate(f,f.featureStates,h,!0),s=!0)}}return s}updateReplacement(s,d,h,f){if(d.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=d.updateTime;let v=d.getReplacementRegionsForTile(s.toUnwrapped(),!0);if(RR(this.activeReplacements,v))return!1;this.activeReplacements=v;let b=!1;for(let I in this.instancesPerModel){let k=this.instancesPerModel[I],F=k.instancedDataArray;for(let U of k.features){let G=U.instancedDataOffset,q=U.instancedDataCount;for(let Z=0;Zpn;ue=he?ue-pn:ue;let _e=Math.floor(ue),Fe=F.float32[X+1],Le=!1;for(let Ve of this.activeReplacements)if(!KH(Ve,h,VPe.Model,f)&&!(Ve.min.x>_e||_e>Ve.max.x||Ve.min.y>Fe||Fe>Ve.max.y)&&(Le=JH(XH(_e,Fe,s.canonical,Ve.footprintTileId.canonical),Ve.footprint),Le))break;F.float32[X]=Le?ue+pn:ue,b=b||Le!==he}}}return b}isEmpty(){for(let s in this.instancesPerModel)if(this.instancesPerModel[s].instancedDataArray.length!==0)return!1;return!0}uploadPending(){return!this.uploaded}upload(s){if(!this.uploaded)for(let d in this.instancesPerModel){let h=this.instancesPerModel[d];h.instancedDataArray.length<0||h.instancedDataArray.length===0||(h.instancedDataBuffer?h.instancedDataBuffer.updateData(h.instancedDataArray):h.instancedDataBuffer=s.createVertexBuffer(h.instancedDataArray,Ge.members,!0,void 0,this.instanceCount))}this.uploaded=!0}destroy(){for(let d in this.instancesPerModel){let h=this.instancesPerModel[d];h.instancedDataArray.length!==0&&h.instancedDataBuffer&&h.instancedDataBuffer.destroy()}let s=this.layers[0].modelManager;if(s&&this.modelUris&&this.modelsRequested)for(let d of this.modelUris)s.removeModel(d,"",!0)}addFeature(s,d,h){let f=this.layers[0],v=f.layout.get("model-id").evaluate(h,{},this.canonical);if(!v)return Ko(`modelId is not evaluated for layer ${f.id} and it is not going to get rendered.`),v;(sfe(v,!1)||this.styleDefinedModelURLs[v]!==void 0)&&(this.modelUris.includes(v)||this.modelUris.push(v)),this.instancesPerModel[v]||(this.instancesPerModel[v]=new UPe);let b=this.instancesPerModel[v],I=b.instancedDataArray,k=new zPe(h,I.length);for(let F of d)for(let U of F){if(U.x<0||U.x>=pn||U.y<0||U.y>=pn)continue;if(this.lookupDim!==0){let q=(this.lookupDim-1)/pn,Z=this.lookupDim*(U.y*q|0)+U.x*q|0;if(this.lookup){if(this.lookup[Z]!==0)continue;this.lookup[Z]=1}}this.instanceCount++;let G=I.length;I.resize(G+1),b.instancesEvaluatedElevation.push(0),I.float32[16*G]=U.x,I.float32[16*G+1]=U.y}return k.instancedDataCount=b.instancedDataArray.length-k.instancedDataOffset,k.instancedDataCount>0&&(s.id&&(b.idToFeaturesIndex[s.id]=b.features.length),b.features.push(k),this.evaluate(k,{},b,!1)),v}getModelUris(){return this.modelUris}evaluate(s,d,h,f){let v=this.layers[0],b=s.feature,I=this.canonical,k=s.rotation=v.paint.get("model-rotation").evaluate(b,d,I),F=s.scale=v.paint.get("model-scale").evaluate(b,d,I),U=s.translation=v.paint.get("model-translation").evaluate(b,d,I),G=v.paint.get("model-color").evaluate(b,d,I);G.a=v.paint.get("model-color-mix-intensity").evaluate(b,d,I);let q=[];this.maxVerticalOffset10?this.tileToMeter:jt(I,Le)),_e[he+4]=U[0],_e[he+5]=U[1],_e[he+6]=U[2]+Fe,_e[he+7]=q[0],_e[he+8]=q[1],_e[he+9]=q[2],_e[he+10]=q[4],_e[he+11]=q[5],_e[he+12]=q[6],_e[he+13]=q[8],_e[he+14]=q[9],_e[he+15]=q[10],h.instancesEvaluatedElevation[ue]=U[2]}}}let HPe,GPe;Ln(lfe,"ModelBucket",{omit:["layers"]}),Ln(UPe,"PerModelAttributes"),Ln(zPe,"ModelFeature");class W3{constructor(s,d,h){this._demTile=s,this._dem=this._demTile.dem,this._scale=d,this._offset=h}static create(s,d,h){let f=h||s.findDEMTileFor(d);if(!f||!f.dem)return;let v=f.dem,b=f.tileID,I=1<F.fqid),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id),this.modelTraits|=Bs.CoordinateSpaceTile,this.uploaded=!1,this.hasPattern=!1,f&&(this.modelTraits|=Bs.HasMapboxMeshFeatures),v&&(this.modelTraits|=Bs.HasMeshoptCompression),this.zoom=-1,this.terrainExaggeration=1,this.projection={name:"mercator"},this.replacementUpdateTime=0,this.elevationReadFromZ=255,this.brightness=b,this.worldview=k,this.dirty=!0,this.needsUpload=!1,this.filter=null,this.nodesInfo=[];for(let F of d)this.nodesInfo.push(new YPe(F)),$Pe(F,I.featureIndexArray.length,I.grid),I.featureIndexArray.emplaceBack(this.nodesInfo.length-1,0,I.bucketLayerIDs.length-1,0);this.states={}}updateFootprints(s,d){for(let h of this.getNodesInfo()){let f=h.node;f.footprint&&d.push({footprint:f.footprint,id:s})}}update(s){let d=Object.keys(s).length!==0;if(d&&!this.stateDependentLayers.length)return;let h=d?this.stateDependentLayers:this.layers;if(!as(s,this.states))for(let f of h)this.evaluate(f,s);this.states=structuredClone(s)}populate(){console.log("populate 3D model bucket")}uploadPending(){return!this.uploaded||this.needsUpload}upload(s){if(!this.needsUpload)return;let d=this.getNodesInfo();for(let h of d){let f=h.node;this.uploaded?this.updatePbrBuffer(f):Ff(f,s,!0)}for(let h of d)Wd(h.node);this.uploaded=!0,this.needsUpload=!1}updatePbrBuffer(s){let d=!1;if(!s.meshes)return d;for(let h of s.meshes)h.pbrBuffer&&(h.pbrBuffer.updateData(h.featureArray),d=!0);return d}needsReEvaluation(s,d,h){let f=s.transform.projectionOptions,v=s.style.getBrightness(),b=this.brightness!==v;if(!this.uploaded||this.dirty||f.name!==this.projection.name||SG(h.paint.get("model-color").value,b)||SG(h.paint.get("model-color-mix-intensity").value,b)||SG(h.paint.get("model-roughness").value,b)||SG(h.paint.get("model-emissive-strength").value,b)||SG(h.paint.get("model-height-based-emissive-strength-multiplier").value,b)){this.projection=f,this.brightness=v;let I=this.getNodesInfo();for(let k of I)k.state=null;return!0}return!1}evaluateTransform(s,d){if(s.transform.zoom===this.zoom)return;this.zoom=s.transform.zoom;let h=this.getNodesInfo(),f=this.id.canonical;for(let v of h){let b=v.feature;v.evaluatedTranslation=d.paint.get("model-translation").evaluate(b,{},f),v.evaluatedScale=d.paint.get("model-scale").evaluate(b,{},f)}}evaluate(s,d){let h=this.getNodesInfo();for(let f of h){if(!f.node.meshes)continue;let v=f.feature,b=d&&d[v.id];if(as(b,f.state))continue;f.state=structuredClone(b);let I=f.node.meshes&&f.node.meshes[0].featureData,k=f.evaluatedColor[2],F=f.evaluatedRMEA[2],U=this.id.canonical;if(f.hasTranslucentParts=!1,I){for(let G=0;G=ut)continue;let Ei=cfe[rn],Qi=Math.abs(Ei);Qi>Ht&&(ki=Ei,Ht=Qi,Fi=Wi,Ji=Vi)}if(Ht>.1){let Vi=1-(ut+.5*Math.abs(Fi*Ji))/X,Wi=d._dem.get(Ot,It)+ki*Vi,rn=d._dem.get(Ot+Fi,It+Ji),Ei=d._dem.get(Ot-Fi,It-Ji,!0);(Wi-rn)*(Wi-Ei)>0&&(Wi=(rn+Ei)/2),cfe[Lt]=d._dem.set(Ot,It,Wi),HR[Lt]=ut}}}}}I&&(d._demTile.needsDEMTextureUpload=!0,d._dem._timestamp=l_.now())}setFilter(s){this.filter=s?fS(s):null}getNodesInfo(){return this.filter?this.nodesInfo.filter(s=>this.filter.filter(new Fs(this.id.overscaledZ,{worldview:this.worldview}),s.feature,this.id.canonical)):this.nodesInfo}destroy(){let s=this.getNodesInfo();for(let d of s)Wd(d.node),k_(d.node)}isEmpty(){return!this.nodesInfo.length}updateReplacement(s,d){if(d.updateTime===this.replacementUpdateTime)return;this.replacementUpdateTime=d.updateTime;let h=d.getReplacementRegionsForTile(s.toUnwrapped());for(let f of this.getNodesInfo()){let v=f.node.footprint;f.hiddenByReplacement=!!v&&!h.find(b=>b.footprint===v)}}getHeightAtTileCoord(s,d){let h=[],f=[0,0,0],v=R([]);for(let b of this.getNodesInfo()){let I=b.node.meshes[0],k=I.transformedAabb;if(sk.max[0]||d>k.max[1])continue;if(b.node.hidden===!0)return{height:1/0,maxHeight:b.feature.properties.height,hidden:!1,verticalScale:b.evaluatedScale[2]};z(v,b.node.matrix),f[0]=s,f[1]=d,wn(f,f,v);let F=(f[0]-I.aabb.min[0])/(I.aabb.max[0]-I.aabb.min[0])*ma|0,U=Math.min(63,(f[1]-I.aabb.min[1])/(I.aabb.max[1]-I.aabb.min[1])*ma|0)*ma+Math.min(63,F),G=I.heightmap[U];if(!(G<0&&b.node.footprint))return b.hiddenByReplacement?void 0:{height:G,maxHeight:b.feature.properties.height,hidden:!1,verticalScale:b.evaluatedScale[2]};if(b.node.footprint.grid.query(new yi(s,d),new yi(s,d),h),h.length>0)return{height:void 0,maxHeight:b.feature.properties.height,hidden:b.hiddenByReplacement,verticalScale:b.evaluatedScale[2]}}}}function SG(u,s){return u instanceof b_&&!u.isLightConstant&&s}function Zlt(u,s,d,h,f,v,b,I){let k=(61440&s|(61440&s)>>4)>>8,F=(3840&s|(3840&s)>>4)>>4,U=240&s|(240&s)>>4;d[3]>0&&(k=mr(k,255*d[0],d[3]),F=mr(F,255*d[1],d[3]),U=mr(U,255*d[2],d[3]));let G=k<<8|F,q=U<<8|Math.floor(255*h[3]),Z=(function(ut){let It=pt(ut,0,2);return Math.min(Math.round(.5*It*255),255)})(h[2])<<8|15*h[0]<<4|15*h[1],X=pt(f[0],0,1),ue=pt(f[1],0,1),he=pt(f[2],0,1),_e=pt(f[3],0,1),Fe,Le,Ve,dt;if(X!==ue&&b!==v&&ue!==X){let ut=b-v;Le=1/(ut*(ue-X)),Ve=-(v+ut*X)/(ut*(ue-X));let It=pt(f[4],-1,1);dt=Math.pow(10,It),Fe=255*he<<8|255*_e}else Fe=65535,Le=0,Ve=1,dt=1;if(u.emplaceBack(G,q,Z,Fe,Le,Ve,dt),I){let ut=I.length;I.clear();for(let It=0;It>16&65535,U=v?k>>16&65535:65535&k,G=(15&U)<8?15&U:0,q=u.evaluatedRMEA[G],Z=u.evaluatedColor[G],X=u.emissionHeightBasedParams[G],ue;if(I&&G===2&&h.lights&&(ue=new CS,ue.resize(10*h.lights.length)),Zlt(b.featureArray,F,Z,q,X,b.aabb.min[2],b.aabb.max[2],ue),ue&&I){I=!1;let he=h.meshes[h.lightMeshIndex];he.featureArray=ue,he.featureArray._trim()}}b.featureArray._trim(),f++}}function KPe(u,s,d,h){let f=1<Ve.polygon).flat());let he=Z?I:null,[_e,Fe]=(function(Ve,dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji,Vi){return Ve.projection.name==="globe"?(function(Wi,rn,Ei,Qi,si,ei,an,nn,dr,Bn,Qn){let mn=[],cr=[],to=Wi.projection.upVectorScale(Qn,Wi.center.lat,Wi.worldSize).metersToTile,Tn=[0,0,0,1],tr=[0,0,0,1],Br=(Lo,bo,$n,mo)=>{Lo[0]=bo,Lo[1]=$n,Lo[2]=mo,Lo[3]=1},uo=VZ();Ei>0&&(Ei+=uo),Qi+=uo;for(let Lo of rn){let bo=[],$n=[];for(let mo of Lo){let xa=mo.x+si.x,je=mo.y+si.y,Ye=Wi.projection.projectTilePoint(xa,je,Qn),ri=Wi.projection.upVector(Qn,mo.x,mo.y),Di=Ei,In=Qi;if(an){let xn=F3(xa,je,Ei,Qi,an,nn,dr,Bn);Di+=xn.base,In+=xn.top}Ei!==0?Br(Tn,Ye.x+ri[0]*to*Di,Ye.y+ri[1]*to*Di,Ye.z+ri[2]*to*Di):Br(Tn,Ye.x,Ye.y,Ye.z),Br(tr,Ye.x+ri[0]*to*In,Ye.y+ri[1]*to*In,Ye.z+ri[2]*to*In),wn(Tn,Tn,ei),wn(tr,tr,ei),bo.push(new vT(Tn[0],Tn[1],Tn[2])),$n.push(new vT(tr[0],tr[1],tr[2]))}mn.push(bo),cr.push($n)}return[mn,cr]})(Ve,dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji,Vi):ki?(function(Wi,rn,Ei,Qi,si,ei,an,nn,dr){let Bn=[],Qn=[],mn=[0,0,0,1];for(let cr of Wi){let to=[],Tn=[];for(let tr of cr){let Br=tr.x+Qi.x,uo=tr.y+Qi.y,Lo=F3(Br,uo,rn,Ei,ei,an,nn,dr);mn[0]=Br,mn[1]=uo,mn[2]=Lo.base,mn[3]=1,vi(mn,mn,si),mn[3]=Math.max(mn[3],1e-5);let bo=new vT(mn[0]/mn[3],mn[1]/mn[3],mn[2]/mn[3]);mn[0]=Br,mn[1]=uo,mn[2]=Lo.top,mn[3]=1,vi(mn,mn,si),mn[3]=Math.max(mn[3],1e-5);let $n=new vT(mn[0]/mn[3],mn[1]/mn[3],mn[2]/mn[3]);to.push(bo),Tn.push($n)}Bn.push(to),Qn.push(Tn)}return[Bn,Qn]})(dt,ut,It,Ot,Lt,ki,Ht,Fi,Ji):(function(Wi,rn,Ei,Qi,si){let ei=[],an=[],nn=si[8]*rn,dr=si[9]*rn,Bn=si[10]*rn,Qn=si[11]*rn,mn=si[8]*Ei,cr=si[9]*Ei,to=si[10]*Ei,Tn=si[11]*Ei;for(let tr of Wi){let Br=[],uo=[];for(let Lo of tr){let bo=Lo.x+Qi.x,$n=Lo.y+Qi.y,mo=si[0]*bo+si[4]*$n+si[12],xa=si[1]*bo+si[5]*$n+si[13],je=si[2]*bo+si[6]*$n+si[14],Ye=si[3]*bo+si[7]*$n+si[15],ri=mo+nn,Di=xa+dr,In=je+Bn,xn=Math.max(Ye+Qn,1e-5),Hn=mo+mn,vr=xa+cr,Bo=je+to,zo=Math.max(Ye+Tn,1e-5);Br.push(new vT(ri/xn,Di/xn,In/xn)),uo.push(new vT(Hn/zo,vr/zo,Bo/zo))}ei.push(Br),an.push(uo)}return[ei,an]})(dt,ut,It,Ot,Lt)})(v,h,G,U,F,b,he,q,X,v.center.lat,u.tileID.canonical),Le=u.queryGeometry;return(function(Ve,dt,ut){let It=1/0;Lh(ut,dt)&&(It=YZ(ut,dt[0]));for(let Ot=0;Ot{if(uG)return uG;let d=PRe();return uG=new Xst(d.paint.properties["line-width"].specification),uG.useIntegerZoom=!0,uG})().possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Uhe(u)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getDefaultProgramParams(u,s,d){let h=ORe(this);return{config:new B0(this,{zoom:s,lut:d}),defines:h,overrideFog:!1}}queryRadius(u){let s=u,d=NRe(Tg("line-width",this,s),Tg("line-gap-width",this,s)),h=Tg("line-offset",this,s);return d/2+Math.abs(h)+tv(this.paint.get("line-translate"))}queryIntersectsFeature(u,s,d,h,f,v){if(u.queryGeometry.isAboveHorizon)return!1;let b=wb(u.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),v.angle,u.pixelToTileUnitsFactor),I=u.pixelToTileUnitsFactor/2*NRe(this.paint.get("line-width").evaluate(s,d),this.paint.get("line-gap-width").evaluate(s,d)),k=this.paint.get("line-offset").evaluate(s,d);return k&&(h=(function(F,U){let G=[],q=new yi(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 mct(u,s,d){u===1?(s.rgb_color=IX(d.readVarint()),s.paint="rgb_color"):u===2?(s.linear_gradient_idx=d.readVarint(),s.paint="linear_gradient_idx"):u===3?(s.radial_gradient_idx=d.readVarint(),s.paint="radial_gradient_idx"):u===5?d.readPackedFloat(s.dasharray):u===6?s.dashoffset=d.readFloat():u===7?s.miterlimit=d.readFloat():u===8?s.opacity=d.readVarint():u===9?s.width=d.readFloat():u===10?s.linecap=d.readVarint():u===11&&(s.linejoin=d.readVarint())}function hct(u,s,d){u===1?s.transform=wX(d,d.readVarint()+d.pos):u===2?s.spread_method=d.readVarint():u===3?s.stops.push(XPe(d,d.readVarint()+d.pos)):u===4?s.x1=d.readFloat():u===5?s.y1=d.readFloat():u===6?s.x2=d.readFloat():u===7&&(s.y2=d.readFloat())}function XPe(u,s){return u.readFields(fct,{offset:0,opacity:255,rgb_color:dfe},s)}function fct(u,s,d){u===1?s.offset=d.readFloat():u===2?s.opacity=d.readVarint():u===3&&(s.rgb_color=IX(d.readVarint()))}function gct(u,s,d){u===1?s.transform=wX(d,d.readVarint()+d.pos):u===2?s.spread_method=d.readVarint():u===3?s.stops.push(XPe(d,d.readVarint()+d.pos)):u===4?s.cx=d.readFloat():u===5?s.cy=d.readFloat():u===6?s.r=d.readFloat():u===7?s.fx=d.readFloat():u===8?s.fy=d.readFloat():u===9&&(s.fr=d.readFloat())}function _ct(u,s,d){u===1?s.transform=wX(d,d.readVarint()+d.pos):u===2?s.clip_path_idx=d.readVarint():u===3&&s.children.push(SX(d,d.readVarint()+d.pos))}function yct(u,s,d){u===1?s.left=s.top=d.readFloat():u===2?s.width=s.height=d.readFloat():u===3?s.top=d.readFloat():u===4?s.height=d.readFloat():u===5?s.mask_type=d.readVarint():u===6?s.mask_idx=d.readVarint():u===7&&s.children.push(SX(d,d.readVarint()+d.pos))}class vct{static calculate(s={},d=[]){let h=new Map,f=new Map;if(Object.keys(s).length===0)return h;d.forEach(v=>{f.set(v.name,v.rgb_color||new Xa(0,0,0))});for(let[v,b]of Object.entries(s))f.has(v)?h.set(f.get(v).toString(),b):console.warn(`Ignoring unknown image variable "${v}"`);return h}}function Q3(u,s=255,d){let h=s/255,f=u.toString(),v=d.has(f)?d.get(f).clone():u.clone();return v.a*=h,v.toString()}function IG(u,s){if(!KA()){let d=document.createElement("canvas");return d.width=u,d.height=s,d}return new OffscreenCanvas(u,s)}function bct(u,s){let d=vct.calculate(s.params,u.metadata?u.metadata.variables:[]),h=u.usvg_tree,f=h.width,v=h.height,b=s.transform?s.transform:new DOMMatrix,I=Math.max(1,Math.round(f*b.a)),k=Math.max(1,Math.round(v*b.d)),F=new DOMMatrix([I/f,0,0,k/v,0,0]),U=IG(I,k).getContext("2d");return mfe(U,F,h,h,d),U.getImageData(0,0,I,k)}function mfe(u,s,d,h,f){for(let v of h.children)JPe(u,s,d,v,f)}function JPe(u,s,d,h,f){h.group?(u.save(),(function(v,b,I,k,F){let U=k.mask_idx!=null?I.masks[k.mask_idx]:null,G=k.clip_path_idx!=null?I.clip_paths[k.clip_path_idx]:null;if(k.transform&&(b=Z3(k.transform).preMultiplySelf(b)),!(function(X,ue,he){return X.opacity!==255||ue||he})(k,G!=null,U!=null))return void mfe(v,b,I,k,F);let q=IG(v.canvas.width,v.canvas.height),Z=q.getContext("2d");mfe(Z,b,I,k,F),G&&aNe(Z,b,I,G),U&&sNe(Z,b,I,U,F),v.globalAlpha=k.opacity/255,v.drawImage(q,0,0)})(u,s,d,h.group,f),u.restore()):h.path&&(u.save(),(function(v,b,I,k,F){v.setTransform(b),k.paint_order===tct.PAINT_ORDER_FILL_AND_STROKE?(eNe(v,I,k,F),iNe(v,I,k,F)):(iNe(v,I,k,F),eNe(v,I,k,F))})(u,s,d,h.path,f),u.restore())}function eNe(u,s,d,h){let f=d.fill;if(!f)return;let v=f.opacity/255;switch(u.save(),u.beginPath(),lNe(d,u),f.paint){case"rgb_color":u.fillStyle=Q3(f.rgb_color,f.opacity,h);break;case"linear_gradient_idx":{let b=s.linear_gradients[f.linear_gradient_idx];b.transform&&u.setTransform(Z3(b.transform).preMultiplySelf(u.getTransform())),u.fillStyle=nNe(u,b,v,h);break}case"radial_gradient_idx":{let b=s.radial_gradients[f.radial_gradient_idx];b.transform&&u.setTransform(Z3(b.transform).preMultiplySelf(u.getTransform())),u.fillStyle=rNe(u,b,v,h)}}u.fill(tNe(d)),u.restore()}function tNe(u){return u.rule===ufe.PATH_RULE_NON_ZERO?"nonzero":u.rule===ufe.PATH_RULE_EVEN_ODD?"evenodd":void 0}function iNe(u,s,d,h){let f=d.stroke;if(!f)return;let v=cNe(d);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=Q3(f.rgb_color,f.opacity,h);break;case"linear_gradient_idx":u.strokeStyle=nNe(u,s.linear_gradients[f.linear_gradient_idx],b,h,!0);break;case"radial_gradient_idx":u.strokeStyle=rNe(u,s.radial_gradients[f.radial_gradient_idx],b,h,!0)}switch(f.linejoin){case xX.LINE_JOIN_MITER_CLIP:case xX.LINE_JOIN_MITER:u.lineJoin="miter";break;case xX.LINE_JOIN_ROUND:u.lineJoin="round";break;case xX.LINE_JOIN_BEVEL:u.lineJoin="bevel"}switch(f.linecap){case pfe.LINE_CAP_BUTT:u.lineCap="butt";break;case pfe.LINE_CAP_ROUND:u.lineCap="round";break;case pfe.LINE_CAP_SQUARE:u.lineCap="square"}u.stroke(v)}function nNe(u,s,d,h,f=!1){if(s.stops.length===1){let q=s.stops[0];return Q3(q.rgb_color,q.opacity*d,h)}let{x1:v,y1:b,x2:I,y2:k}=s,F=new DOMPoint(v,b),U=new DOMPoint(I,k);if(f){let q=Z3(s.transform);F=q.transformPoint(F),U=q.transformPoint(U)}let G=u.createLinearGradient(F.x,F.y,U.x,U.y);for(let q of s.stops)G.addColorStop(q.offset,Q3(q.rgb_color,q.opacity*d,h));return G}function rNe(u,s,d,h,f=!1){if(s.stops.length===1){let _e=s.stops[0];return Q3(_e.rgb_color,_e.opacity*d,h)}let v=Z3(s.transform),{fx:b,fy:I,fr:k,cx:F,cy:U,r:G}=s,q=new DOMPoint(b,I),Z=new DOMPoint(F,U),X=k,ue=G;if(f){q=v.transformPoint(q),Z=v.transformPoint(Z);let _e=(v.a+v.d)/2;X=k*_e,ue=s.r*_e}let he=u.createRadialGradient(q.x,q.y,X,Z.x,Z.y,ue);for(let _e of s.stops)he.addColorStop(_e.offset,Q3(_e.rgb_color,_e.opacity*d,h));return he}function oNe(u,s,d,h){let f=h.transform?Z3(h.transform).preMultiplySelf(s):s,v=IG(u.canvas.width,u.canvas.height),b=v.getContext("2d");for(let k of h.children)if(k.group)oNe(b,f,d,k.group);else if(k.path){let F=k.path,U=new Path2D;U.addPath(cNe(F),f),b.fill(U,tNe(F))}let I=h.clip_path_idx!=null?d.clip_paths[h.clip_path_idx]:null;I&&aNe(b,f,d,I),u.globalCompositeOperation="source-over",u.drawImage(v,0,0)}function aNe(u,s,d,h){let f=IG(u.canvas.width,u.canvas.height);oNe(f.getContext("2d"),s,d,h),u.globalCompositeOperation="destination-in",u.drawImage(f,0,0)}function sNe(u,s,d,h,f){if(h.children.length===0)return;let v=h.mask_idx!=null?d.masks[h.mask_idx]:null;v&&sNe(u,s,d,v,f);let b=u.canvas.width,I=u.canvas.height,k=IG(b,I),F=k.getContext("2d"),U=h.width,G=h.height,q=h.left,Z=h.top,X=new Path2D,ue=new Path2D;ue.rect(q,Z,U,G),X.addPath(ue,s),F.clip(X);for(let Fe of h.children)JPe(F,s,d,Fe,f);let he=F.getImageData(0,0,b,I),_e=he.data;if(h.mask_type===WPe.MASK_TYPE_LUMINANCE)for(let Fe=0;Fe<_e.length;Fe+=4)_e[Fe+3]=_e[Fe+3]/255*(.2126*_e[Fe]+.7152*_e[Fe+1]+.0722*_e[Fe+2]);F.putImageData(he,0,0),u.globalCompositeOperation="destination-in",u.drawImage(k,0,0)}function Z3(u){return u?new DOMMatrix([u.sx,u.ky,u.kx,u.sy,u.tx,u.ty]):new DOMMatrix}function lNe(u,s){let d=u.step,h=u.diffs[0]*d,f=u.diffs[1]*d;s.moveTo(h,f);for(let v=0,b=2;vs[b])return null}else{let I=1/h[b],k=(u[b]-d[b])*I,F=(s[b]-d[b])*I;if(k>F){let U=k;k=F,F=U}if(k>f&&(f=k),Fv)return null}return f}function pNe(u,s,d,h,f,v,b,I,k,F,U){let G=h-u,q=f-s,Z=v-d,X=b-u,ue=I-s,he=k-d,_e=U[1]*he-U[2]*ue,Fe=U[2]*X-U[0]*he,Le=U[0]*ue-U[1]*X,Ve=G*_e+q*Fe+Z*Le;if(Math.abs(Ve)<1e-15)return null;let dt=1/Ve,ut=F[0]-u,It=F[1]-s,Ot=F[2]-d,Lt=(ut*_e+It*Fe+Ot*Le)*dt;if(Lt<0||Lt>1)return null;let ki=It*Z-Ot*q,Ht=Ot*G-ut*Z,Fi=ut*q-It*G,Ji=(U[0]*ki+U[1]*Ht+U[2]*Fi)*dt;return Ji<0||Lt+Ji>1?null:(X*ki+ue*Ht+he*Fi)*dt}function mNe(u,s,d){return(u-s)/(d-s)}function hNe(u,s,d,h,f,v,b,I,k){let F=1<{let Fe=he?1:0,Le=(Z+1)*ue-Fe,Ve=X*ue,dt=(X+1)*ue-Fe;_e[0]=Z*ue,_e[1]=Ve,_e[2]=Le,_e[3]=dt},G=new dNe(k),q=[];for(let Z=0;Z=1;k/=2){let Z=I[I.length-1];G=new dNe(k);for(let X=0;X0;){let{idx:X,t:ue,nodex:he,nodey:_e,depth:Fe}=Z.pop();if(this.leaves[X]){hNe(he,_e,Fe,s,d,h,f,G,q);let Ve=1<=rn[2])return ue}continue}let Le=0;for(let Ve=0;Ve=F[U[Ot]]&&(U.splice(Ot,0,Ve),It=!0);It||(U[Le]=Ve),Le++}}for(let Ve=0;Ve=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(s+1)}static pack(s,d){let h=[0,0,0,0],f=EX.getUnpackVector(d),v=Math.floor((s+f[3])/f[2]);return h[2]=v%256,v=Math.floor(v/256),h[1]=v%256,v=Math.floor(v/256),h[0]=v,h}getPixels(){return new hZ({width:this.stride,height:this.stride},this.pixels)}backfillBorder(s,d,h){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");let f=d*this.dim,v=d*this.dim+this.dim,b=h*this.dim,I=h*this.dim+this.dim;switch(d){case-1:f=v-1;break;case 1:v=f+1}switch(h){case-1:b=I-1;break;case 1:I=b+1}let k=-d*this.dim,F=-h*this.dim;for(let U=b;U=1;h--){let f=h===1?1:0,v=h===2?1:0;for(let b=0;b>>1^-(1&u[s]);return u}function Pct(u,s){switch(s){case"uint32":return u;case"uint16":for(let d=0;d>4|(61440&h)>>8|(240&f)<<4|61440&f,u[d+1]=15&h|(3840&h)>>4|(15&f)<<8|(3840&f)<<4}return u;case"uint8":for(let d=0;d>6|(192&f)>>4|(192&v)>>2|192&b,u[d+1]=(48&h)>>4|(48&f)>>2|48&v|(48&b)<<2,u[d+2]=(12&h)>>2|12&f|(12&v)<<2|(12&b)<<4,u[d+3]=3&h|(3&f)<<2|(3&v)<<4|(3&b)<<6}return u;default:throw new Error(`Invalid pixel format, "${s}"`)}}Ln(EX,"DEMData"),Ln(fNe,"DemMinMaxQuadTree",{omit:["dem"]});var sv=Uint8Array,TG=Uint16Array,Nct=Int32Array,_Ne=new sv([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]),yNe=new sv([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]),Fct=new sv([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vNe=function(u,s){for(var d=new TG(31),h=0;h<31;++h)d[h]=s+=1<>1|(21845&gu)<<1;xNe[gu]=((65280&(X3=(61680&(X3=(52428&X3)>>2|(13107&X3)<<2))>>4|(3855&X3)<<4))>>8|(255&X3)<<8)>>1}var EG=function(u,s,d){for(var h=u.length,f=0,v=new TG(s);f>k]=F;return b},AG=new sv(288);for(gu=0;gu<144;++gu)AG[gu]=8;for(gu=144;gu<256;++gu)AG[gu]=9;for(gu=256;gu<280;++gu)AG[gu]=7;for(gu=280;gu<288;++gu)AG[gu]=8;var SNe=new sv(32);for(gu=0;gu<32;++gu)SNe[gu]=5;var Vct=EG(AG,9),zct=EG(SNe,5),ffe=function(u){for(var s=u[0],d=1;ds&&(s=u[d]);return s},_x=function(u,s,d){var h=s/8|0;return(u[h]|u[h+1]<<8)>>(7&s)&d},gfe=function(u,s){var d=s/8|0;return(u[d]|u[d+1]<<8|u[d+2]<<16)>>(7&s)},Uct=["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"],yx=function(u,s,d){var h=new Error(s||Uct[u]);if(h.code=u,Error.captureStackTrace&&Error.captureStackTrace(h,yx),!d)throw h;return h},Hct=new sv(0),Gct=typeof TextDecoder<"u"&&new TextDecoder;try{Gct.decode(Hct,{stream:!0})}catch{}let jct={gzip_data:"gzip"};class Tb extends Error{constructor(s){super(s),this.name="MRTError"}}let $ct={0:"uint32",1:"uint32",2:"uint16",3:"uint8"},wNe={uint32:1,uint16:2,uint8:4},qct={uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array},_fe;class AX{constructor(s=5){this.x=NaN,this.y=NaN,this.z=NaN,this.layers={},this._cacheSize=s}getLayer(s){let d=this.layers[s];if(!d)throw new Tb(`Layer '${s}' not found`);return d}getHeaderLength(s){let d=new Uint8Array(s),h=new DataView(s);if(d[0]!==13)throw new Tb("File is not a valid MRT.");return h.getUint32(1,!0)}parseHeader(s){let d=new Uint8Array(s),h=this.getHeaderLength(s);if(d.length= ${h} but got buffer of length ${d.length}`);let f=new _fe(d.subarray(0,h)).readFields(wct,{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 Tb(`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 v of f.layers)this.layers[v.name]=new INe(v,{cacheSize:this._cacheSize});return this}createDecodingTask(s){let d=[],h=this.getLayer(s.layerName);for(let f of s.blockIndices){let v=h.dataIndex[f],b=v.firstByte-s.firstByte,I=v.lastByte-s.firstByte;if(h._blocksInProgress.has(f))continue;let k={layerName:h.name,firstByte:b,lastByte:I,pixelFormat:h.pixelFormat,blockIndex:f,blockShape:[v.bands.length].concat(h.bandShape),buffer:h.buffer,codec:v.codec.codec,filters:v.filters.map(F=>F.filter)};h._blocksInProgress.add(f),d.push(k)}return new TNe(d,()=>{d.forEach(f=>h._blocksInProgress.delete(f.blockIndex))},(f,v)=>{if(d.forEach(b=>h._blocksInProgress.delete(b.blockIndex)),f)throw f;v.forEach(b=>{this.getLayer(b.layerName).processDecodedData(b)})})}}class INe{constructor({version:s,name:d,units:h,tileSize:f,pixelFormat:v,buffer:b,dataIndex:I},k){if(this.version=s,this.version!==1)throw new Tb(`Cannot parse raster layer encoded with MRT version ${s}`);this.name=d,this.units=h,this.tileSize=f,this.buffer=b,this.pixelFormat=$ct[v],this.dataIndex=I,this.bandShape=[f+2*b,f+2*b,wNe[this.pixelFormat]],this._decodedBlocks=new TX(k?k.cacheSize:5),this._blocksInProgress=new Set}get dimension(){return wNe[this.pixelFormat]}get cacheSize(){return this._decodedBlocks.capacity}getBandList(){return this.dataIndex.map(({bands:s})=>s).flat()}processDecodedData(s){let d=s.blockIndex.toString();this._decodedBlocks.get(d)||this._decodedBlocks.put(d,s.data)}getBlockForBand(s){let d=0;switch(typeof s){case"string":for(let[h,f]of this.dataIndex.entries()){for(let[v,b]of f.bands.entries())if(b===s)return{bandIndex:d+v,blockIndex:h,blockBandIndex:v};d+=f.bands.length}break;case"number":for(let[h,f]of this.dataIndex.entries()){if(s>=d&&sthis.cacheSize)throw new Tb(`Number of blocks to decode (${v.size}) exceeds cache size (${this.cacheSize}).`);return{layerName:this.name,firstByte:d,lastByte:h,blockIndices:f}}hasBand(s){let{blockIndex:d}=this.getBlockForBand(s);return d>=0}hasDataForBand(s){let{blockIndex:d}=this.getBlockForBand(s);return d>=0&&!!this._decodedBlocks.get(d.toString())}getBandView(s){let{blockIndex:d,blockBandIndex:h}=this.getBlockForBand(s);if(d<0)throw new Tb(`Band not found: ${JSON.stringify(s)}`);let f=this._decodedBlocks.get(d.toString());if(!f)throw new Tb(`Data for band ${JSON.stringify(s)} of layer "${this.name}" not decoded.`);let v=this.dataIndex[d],b=this.bandShape.reduce((F,U)=>F*U,1),I=h*b,k=f.subarray(I,I+b);return{data:k,bytes:new Uint8Array(k.buffer).subarray(k.byteOffset,k.byteOffset+k.byteLength),tileSize:this.tileSize,buffer:this.buffer,pixelFormat:this.pixelFormat,dimension:this.dimension,offset:v.offset,scale:v.scale}}}AX.setPbf=function(u){_fe=u};class TNe{constructor(s,d,h){this.tasks=s,this._onCancel=d,this._onComplete=h,this._finalized=!1}cancel(){this._finalized||(this._onCancel(),this._finalized=!0)}complete(s,d){this._finalized||(this._onComplete(s,d),this._finalized=!0)}}AX.performDecoding=function(u,s){let d=new Uint8Array(u);return Promise.all(s.tasks.map(h=>{let{layerName:f,firstByte:v,lastByte:b,pixelFormat:I,blockShape:k,blockIndex:F,filters:U,codec:G}=h,q=d.subarray(v,b+1),Z=new Uint32Array(k[0]*k[1]*k[2]),X;if(G!=="gzip_data")throw new Tb(`Unhandled codec: ${G}`);return X=(function(ue,he){if(!globalThis.DecompressionStream&&he==="gzip_data")return Promise.resolve(((Ve=(function(It){It[0]==31&&It[1]==139&&It[2]==8||yx(6,"invalid gzip data");var Ot=It[3],Lt=10;4&Ot&&(Lt+=2+(It[10]|It[11]<<8));for(var ki=(Ot>>3&1)+(Ot>>4&1);ki>0;ki-=!It[Lt++]);return Lt+(2&Ot)})(Le=ue))+8>Le.length&&yx(6,"invalid gzip data"),(function(It,Ot,Lt,ki){var Ht=It.length;if(!Ht||Ot.f&&!Ot.l)return Lt||new sv(0);var Fi=!Lt,Ji=Fi||Ot.i!=2,Vi=Ot.i;Fi&&(Lt=new sv(3*Ht));var Wi,rn,Ei=function(Sl){var wl=Lt.length;if(Sl>wl){var cl=new sv(Math.max(2*wl,Sl));cl.set(Lt),Lt=cl}},Qi=Ot.f||0,si=Ot.p||0,ei=Ot.b||0,an=Ot.l,nn=Ot.d,dr=Ot.m,Bn=Ot.n,Qn=8*Ht;do{if(!an){Qi=_x(It,si,1);var mn=_x(It,si+1,3);if(si+=3,!mn){var cr=It[(je=4+((si+7)/8|0))-4]|It[je-3]<<8,to=je+cr;if(to>Ht){Vi&&yx(0);break}Ji&&Ei(ei+cr),Lt.set(It.subarray(je,to),ei),Ot.b=ei+=cr,Ot.p=si=8*to,Ot.f=Qi;continue}if(mn==1)an=Vct,nn=zct,dr=9,Bn=5;else if(mn==2){var Tn=_x(It,si,31)+257,tr=_x(It,si+10,15)+4,Br=Tn+_x(It,si+5,31)+1;si+=14;for(var uo=new sv(Br),Lo=new sv(19),bo=0;bo>4)<16)uo[bo++]=je;else{var ri=0,Di=0;for(je==16?(Di=3+_x(It,si,3),si+=2,ri=uo[bo-1]):je==17?(Di=3+_x(It,si,7),si+=3):je==18&&(Di=11+_x(It,si,127),si+=7);Di--;)uo[bo++]=ri}}var In=uo.subarray(0,Tn),xn=uo.subarray(Tn);dr=ffe(In),Bn=ffe(xn),an=EG(In,dr),nn=EG(xn,Bn)}else yx(1);if(si>Qn){Vi&&yx(0);break}}Ji&&Ei(ei+131072);for(var Hn=(1<>4;if((si+=15&ri)>Qn){Vi&&yx(0);break}if(ri||yx(2),zo<256)Lt[ei++]=zo;else{if(zo==256){Bo=si,an=null;break}var Po=zo-254;zo>264&&(Po=_x(It,si,(1<<(Oo=_Ne[bo=zo-257]))-1)+CNe[bo],si+=Oo);var gs=nn[gfe(It,si)&vr],Ll=gs>>4;if(gs||yx(3),si+=15&gs,xn=Bct[Ll],Ll>3){var Oo=yNe[Ll];xn+=gfe(It,si)&(1<Qn){Vi&&yx(0);break}Ji&&Ei(ei+131072);var hl=ei+Po;if(eiWi.length)&&(rn=Wi.length),new sv(Wi.subarray(0,rn))):Lt.subarray(0,ei)})(Le.subarray(Ve,-8),{i:2},new sv(((_e=Le)[(Fe=_e.length)-4]|_e[Fe-3]<<8|_e[Fe-2]<<16|_e[Fe-1]<<24)>>>0))));var _e,Fe,Le,Ve;let dt=jct[he];if(!dt)throw new Error(`Unhandled codec: ${he}`);let ut=new globalThis.DecompressionStream(dt);return new Response(new Blob([ue]).stream().pipeThrough(ut)).arrayBuffer().then(It=>new Uint8Array(It))})(q,G).then(ue=>((function(he,_e){he.readFields(kct,_e)})(new _fe(ue),Z),new qct[I](Z.buffer))),X.then(ue=>{for(let he=U.length-1;he>=0;he--)switch(U[he]){case"delta_filter":Oct(ue,k);break;case"zigzag_filter":Rct(ue);break;case"bitshuffle_filter":Pct(ue,I);break;default:throw new Tb(`Unhandled filter "${U[he]}"`)}return{layerName:f,blockIndex:F,data:ue}}).catch(ue=>{throw ue})}))},Ln(TNe,"MRTDecodingBatch",{omit:["_onCancel","_onComplete"]}),Ln(AX,"MapboxRasterTile"),Ln(INe,"MapboxRasterLayer",{omit:["_blocksInProgress"]});class ENe{constructor(s){this._stringToNumber={},this._numberToString=[];for(let d=0;d=0&&q[3]>=0&&F.insert(k,q[0],q[1],q[2],q[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Zr(new iX(this.rawTileData)).layers,this.sourceLayerCoder=new ENe(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(let s in this.vtLayers)this.vtFeatures[s]=[]}return this.vtLayers}query(s,d){let{tilespaceGeometry:h,transform:f,tileTransform:v,pixelPosMatrix:b,availableImages:I,worldview:k}=d;this.loadVTLayers(),this.serializedLayersCache.clear();let F=h.bufferedTilespaceBounds,U=this.grid.query(F.min.x,F.min.y,F.max.x,F.max.y,(X,ue,he,_e)=>$c(h.bufferedTilespaceGeometry,X,ue,he,_e));U.sort(Kct);let G=null;f.elevation&&U.length>0&&(G=W3.create(f.elevation,this.tileID));let q={},Z;for(let X=0;X(_e||(_e=Mn(Fe,this.tileID.canonical,v)),Le.queryIntersectsFeature(h,Fe,Ve,_e,this.z,f,b,G,dt)))}return q}loadMatchingFeature(s,d,h,f,v,b){let{featureIndex:I,bucketIndex:k,sourceLayerIndex:F,layoutVertexArrayOffset:U}=d,G=this.bucketLayerIDs[k],q=h.layers,Z=Object.keys(q);if(Z.length&&!Fo(Z,G))return;let X=h.sourceCache,ue=this.sourceLayerCoder.decode(F),he=this.vtLayers[ue].feature(I),_e=this.getId(he,ue);for(let Fe=0;Fe`${I.key}: ${I.message}`).join(", ");return void Ko(`Failed to create expression for promoteId: ${b}`)}this.promoteIdExpression=v.value}this.promoteIdExpression._evaluator||(this.promoteIdExpression._evaluator=new cm),h=this.promoteIdExpression.evaluate({zoom:0},s)}else h=s.properties[f];typeof h=="boolean"&&(h=Number(h))}return h}}function DNe(u,s,d,h,f){return Qr(u,(v,b)=>{let I=s instanceof S_?s.get(b):null;return I&&I.evaluate?I.evaluate(d,h,void 0,f):I})}function Kct(u,s){return s-u}Ln(ANe,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});let kNe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class yfe{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[d,h]=new Uint8Array(s,0,2);if(d!==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 v=kNe[15&h];if(!v)throw new Error("Unrecognized array type.");let[b]=new Uint16Array(s,2,1),[I]=new Uint32Array(s,4,1);return new yfe(I,b,v,s)}constructor(s,d=64,h=Float64Array,f){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+d,2),65535),this.ArrayType=h,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;let v=kNe.indexOf(this.ArrayType),b=2*s*this.ArrayType.BYTES_PER_ELEMENT,I=s*this.IndexArrayType.BYTES_PER_ELEMENT,k=(8-I%8)%8;if(v<0)throw new Error(`Unexpected typed array class: ${h}.`);f&&f instanceof ArrayBuffer?(this.data=f,this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+I+k,2*s),this._pos=2*s,this._finished=!0):(this.data=new ArrayBuffer(8+b+I+k),this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+I+k,2*s),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+v]),new Uint16Array(this.data,2,1)[0]=d,new Uint32Array(this.data,4,1)[0]=s)}add(s,d){let h=this._pos>>1;return this.ids[h]=h,this.coords[this._pos++]=s,this.coords[this._pos++]=d,h}finish(){let s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return vfe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,d,h,f){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:v,coords:b,nodeSize:I}=this,k=[0,v.length-1,0],F=[];for(;k.length;){let U=k.pop()||0,G=k.pop()||0,q=k.pop()||0;if(G-q<=I){for(let he=q;he<=G;he++){let _e=b[2*he],Fe=b[2*he+1];_e>=s&&_e<=h&&Fe>=d&&Fe<=f&&F.push(v[he])}continue}let Z=q+G>>1,X=b[2*Z],ue=b[2*Z+1];X>=s&&X<=h&&ue>=d&&ue<=f&&F.push(v[Z]),(U===0?s<=X:d<=ue)&&(k.push(q),k.push(Z-1),k.push(1-U)),(U===0?h>=X:f>=ue)&&(k.push(Z+1),k.push(G),k.push(1-U))}return F}within(s,d,h){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:f,coords:v,nodeSize:b}=this,I=[0,f.length-1,0],k=[],F=h*h;for(;I.length;){let U=I.pop()||0,G=I.pop()||0,q=I.pop()||0;if(G-q<=b){for(let he=q;he<=G;he++)ONe(v[2*he],v[2*he+1],s,d)<=F&&k.push(f[he]);continue}let Z=q+G>>1,X=v[2*Z],ue=v[2*Z+1];ONe(X,ue,s,d)<=F&&k.push(f[Z]),(U===0?s-h<=X:d-h<=ue)&&(I.push(q),I.push(Z-1),I.push(1-U)),(U===0?s+h>=X:d+h>=ue)&&(I.push(Z+1),I.push(G),I.push(1-U))}return k}}function vfe(u,s,d,h,f,v){if(f-h<=d)return;let b=h+f>>1;MNe(u,s,b,h,f,v),vfe(u,s,d,h,b-1,1-v),vfe(u,s,d,b+1,f,1-v)}function MNe(u,s,d,h,f,v){for(;f>h;){if(f-h>600){let F=f-h+1,U=d-h+1,G=Math.log(F),q=.5*Math.exp(2*G/3),Z=.5*Math.sqrt(G*q*(F-q)/F)*(U-F/2<0?-1:1);MNe(u,s,d,Math.max(h,Math.floor(d-U*q/F+Z)),Math.min(f,Math.floor(d+(F-U)*q/F+Z)),v)}let b=s[2*d+v],I=h,k=f;for(DG(u,s,h,d),s[2*f+v]>b&&DG(u,s,h,f);Ib;)k--}s[2*h+v]===b?DG(u,s,h,k):(k++,DG(u,s,k,f)),k<=d&&(h=k+1),d<=k&&(f=k-1)}}function DG(u,s,d,h){bfe(u,d,h),bfe(s,2*d,2*h),bfe(s,2*d+1,2*h+1)}function bfe(u,s,d){let h=u[s];u[s]=u[d],u[d]=h}function ONe(u,s,d,h){let f=u-d,v=s-h;return f*f+v*v}o.$=WO,o.A=p_,o.B=Df,o.C=2,o.D=JD,o.E=lb,o.F=fG,o.G=nPe,o.H=KO,o.I=Qm,o.J=nx,o.K=jr,o.L=T0,o.M=v_,o.N=JI,o.O=XC,o.P=yi,o.Q=tT,o.R=QA,o.S=Yy,o.T=dG,o.U=Af,o.V=bX,o.W=Pp,o.X=k0,o.Y=pb,o.Z=zy,o._=Gu,o.a=function(u){return lp.API_CDN_URL_REGEX.test(u)},o.a$=tt,o.a0=UI,o.a1=eD,o.a2=oT,o.a3=class extends bX{},o.a4=eT,o.a5=yD,o.a6=zt,o.a7=function(u){let s=u.value;return s?UI(s)?sfe(s,!0)?[]:[new bX(u.key,s,`invalid url "${s}"`)]:[new bX(u.key,s,`string expected, "${jr(s)}" found`)]:[]},o.a8=f3,o.a9=bs,o.aA=pt,o.aB=H,o.aC=vi,o.aD=_,o.aE=Kd,o.aF=He,o.aG=qt,o.aH=function(u,s){let d={};for(let h=0;h{h(v,b)},s):h(v,b),()=>{}}return f.callbacks.push(h),f.cancel||(f.cancel=d((v,b)=>{f.result=[v,b];for(let I of f.callbacks)this.scheduler?this.scheduler.add(()=>{I(v,b)},s):I(v,b);setTimeout(()=>delete this.entries[u],3e3)})),()=>{f.result||(f.callbacks=f.callbacks.filter(v=>v!==h),f.callbacks.length||(f.cancel(),delete this.entries[u]))}}},o.aL=function(u,s,d){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 v=q1(u.request,(b,I,k,F)=>{b?f(b):I&&f(null,{vectorTile:d?void 0:new Zr(new iX(I)),rawData:I,cacheControl:k,expires:F})});return()=>{v.cancel(),f()}},s)},o.aM=function(u){Ly++,Ly>c_&&(u.getActor().send("enforceCacheSizeLimit",vf),Ly=0)},o.aN=function(u){return u<=1?1:Math.pow(2,Math.floor(Math.log2(u)))},o.aO=pm,o.aP=OPe,o.aQ=BPe,o.aR=de,o.aS=MPe,o.aT=function(u,s){let d=document.createElement("video");d.muted=!0,d.onloadstart=function(){s(null,d)};for(let h=0;h{}}},o.aU=zR,o.aV=function(u){return fetch(u).then(s=>s.arrayBuffer()).then(s=>tX(s,0,u))},o.aW=gRe,o.aX=class{constructor(u,s,d,h){this.id=u,this.position=s!=null?new de(s[0],s[1]):new de(0,0),this.orientation=d??[0,0,0],this.nodes=h,this.uploaded=!1,this.aabb=new Lr([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),this.matrix=[]}_applyTransformations(u,s){if(H(u.matrix,s,u.matrix),u.meshes)for(let d of u.meshes){let h=Lr.applyTransformFast(d.aabb,u.matrix);this.aabb.encapsulate(h)}if(u.children)for(let d of u.children)this._applyTransformations(d,u.matrix)}computeBoundsAndApplyParent(){let u=R([]);for(let s of this.nodes)this._applyTransformations(s,u)}computeModelMatrix(u,s,d,h,f,v,b=!1){Rl(this.matrix,this,u.transform,this.position,s,d,h,f,v,b)}upload(u){if(!this.uploaded){for(let s of this.nodes)Ff(s,u);for(let s of this.nodes)Wd(s);this.uploaded=!0}}destroy(){for(let u of this.nodes)k_(u)}},o.aY=Pr,o.aZ=yG,o.a_=at,o.aa=on,o.ab=class{constructor(u){this.specification=u}possiblyEvaluate(u,s){return md(u.expression.evaluate(s))}interpolate(u,s,d){return{x:mr(u.x,s.x,d),y:mr(u.y,s.y,d),z:mr(u.z,s.z,d),azimuthal:mr(u.azimuthal,s.azimuthal,d),polar:mr(u.polar,s.polar,d)}}},o.ac=Fs,o.ad=$y,o.ae=ci,o.af=wn,o.ag=Qe,o.ah=ii,o.ai=S_,o.aj=ux,o.ak=mr,o.al=pn,o.am=qO,o.an=At,o.ao=Xa,o.ap=class{constructor(u){this.specification=u}possiblyEvaluate(u,s){return(function([d,h]){let f=md([1,d,h]);return{x:f.x,y:f.y,z:f.z}})(u.expression.evaluate(s))}interpolate(u,s,d){return{x:mr(u.x,s.x,d),y:mr(u.y,s.y,d),z:mr(u.z,s.z,d)}}},o.aq=function(u,s,d=0,h=!0){let f=new yi(d,d),v=u.sub(f),b=s.add(f),I=[v,new yi(b.x,v.y),b,new yi(v.x,b.y)];return h&&I.push(v.clone()),I},o.ar=function(u,s){let d=[];for(let h=0;h0&&d[0]<=u.width&&d[1]>0&&d[1]<=u.height&&!FH(u,new de(u.center.lat,90)),h[0]>0&&h[0]<=u.width&&h[1]>0&&h[1]<=u.height&&!FH(u,new de(u.center.lat,-90))]},o.cM=function(u,s){let{scale:d}=u.tileTransform,h=d*pn/(u.tileSize*Math.pow(2,s.zoom-u.tileID.overscaledZ+u.tileID.canonical.z));return(function(f,v,b){var I=v[1],k=v[2],F=v[3],U=b[0],G=b[1];return f[0]=v[0]*U,f[1]=I*U,f[2]=k*G,f[3]=F*G,f})(new Float32Array(4),s.inverseAdjustmentMatrix,[h,h])},o.cN=Ui,o.cO=Re,o.cP=Zt,o.cQ=function(u){let s=Zt(u,!0);return m([],[s[0],s[1],s[4],s[5]])},o.cR=K,o.cS=Ua,o.cT=ne,o.cU=function(u){let{x:s,y:d}=u.point,{lng:h,lat:f}=u._center;return A3(s,d,u.worldSize,h,f)},o.cV=Et,o.cW=Ce,o.cX=qD,o.cY=up,o.cZ=x,o.c_=function(u,s,d){let h=0;for(let f=0;f<2;++f)u[f]>0&&(h+=(u[f]-0)*(u[f]-0)),s[f]<0&&(h+=(0-s[f])*(0-s[f]));return h},o.ca=function(u,s){return u[0]=-s[0],u[1]=-s[1],u[2]=-s[2],u[3]=s[3],u},o.cb=fe,o.cc=function(u,s,d,h,f){var v=1/Math.tan(s/2);if(u[0]=v/d,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=v,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},o.cd=function(u,s,d,h,f,v,b){var I=1/(s-d),k=1/(h-f),F=1/(v-b);return u[0]=-2*I,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*k,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*F,u[11]=0,u[12]=(s+d)*I,u[13]=(f+h)*k,u[14]=(b+v)*F,u[15]=1,u},o.ce=et,o.cf=function(u,s,d){u[4*s+0]=d[0],u[4*s+1]=d[1],u[4*s+2]=d[2],u[4*s+3]=d[3]},o.cg=hT,o.ch=SS,o.ci=Ql,o.cj=T_,o.ck=gT,o.cl=xPe,o.cm=function(){var u=new c(4);return c!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u},o.cn=function(u,s,d){var h=s[0],f=s[1],v=s[2],b=s[3],I=Math.sin(d),k=Math.cos(d);return u[0]=h*k+v*I,u[1]=f*k+b*I,u[2]=h*-I+v*k,u[3]=f*-I+b*k,u},o.co=function(u,s){return u[0]===s[0]&&u[1]===s[1]&&u[2]===s[2]&&u[3]===s[3]},o.cp=De,o.cq=function(u){var s=u[0],d=u[1],h=u[2],f=u[3];return Math.sqrt(s*s+d*d+h*h+f*f)},o.cr=Sr,o.cs=Xn,o.ct=$D,o.cu=3,o.cv=2,o.cw=7,o.cx=6,o.cy=Bi,o.cz=Ae,o.d=function(u){return lp.API_TILEJSON_REGEX.test(u)},o.d$=ORe,o.d0=Be,o.d1=45,o.d2=fT,o.d3=function(u,s,d){let h=Math.sqrt(u*u+s*s+d*d),f=h>0?Math.acos(d/h)*xu:0,v=u!==0||s!==0?Math.atan2(-s,-u)*xu+90:0;return v<0&&(v+=360),[h,v,f]},o.d4=we,o.d5=md,o.d6=jt,o.d7=rt,o.d8=Lr,o.d9=Ze,o.dA=function(u,s,d){let h=ux(d.zoom),f=u.style.map._antialias,v=u.terrain&&u.terrain.exaggeration()>0;return h===0&&!f&&!v},o.dB=function(u){let s=u.pixelsPerMeter,d=s/et(1,u.center.lat),h=R(new Float64Array(16));return j(h,h,[u.point.x,u.point.y,0]),K(h,h,[d,d,s]),Float32Array.from(h)},o.dC=IR,o.dD=function(u){let s=it-5;u=pt(u,-s,s)/s*90;let d=Math.pow(Math.abs(Math.sin(At(u))),3);return Math.round(d*(V.length-1))},o.dE=function(u,s,d,h){let f=s.getNorth(),v=s.getSouth(),b=s.getWest(),I=s.getEast(),k=1<0){let X=180/h;w(Z,Z,[X/F+1,0,0,0,X/U+1,0,-.5*X/G,.5*X/q,1])}return Z[2]=k,Z[5]=u.x,Z[8]=u.y,Z},o.dF=rv,o.dG=function(u,s,d){let h=R(new Float64Array(16)),f=(s/(1<1)return!1;let d=s.getSource().maxzoom,h=1<1)return s;let f=h.getSource().maxzoom,v=1<{let v=this.getAtTileOffset(u,f.x,f.y),b=h.upVector(u.canonical,f.x,f.y);return st(b,b,v*h.upVectorScale(u.canonical,s,d).metersToTile),b}}getForTilePoints(u,s,d,h){if(this.isUsingMockSource())return!1;let f=W3.create(this,u,h);return!!f&&(s.forEach(v=>{v[2]=this.exaggeration()*f.getElevationAt(v[0],v[1],d)}),!0)}getMinMaxForTile(u){if(this.isUsingMockSource())return null;let s=this.findDEMTileFor(u);if(!s||!s.dem)return null;let d=s.dem.tree,h=s.tileID,f=1<({u_matrix:new gT(u),u_texsize:new T_(u),u_pixels_to_tile_units:new jD(u),u_device_pixel_ratio:new Ql(u),u_width_scale:new Ql(u),u_floor_width_scale:new Ql(u),u_image:new hT(u),u_units_to_pixels:new T_(u),u_tile_units_to_pixels:new Ql(u),u_alpha_discard_threshold:new Ql(u),u_trim_offset:new T_(u),u_trim_fade_range:new T_(u),u_trim_color:new fT(u),u_emissive_strength:new Ql(u),u_zbias_factor:new Ql(u),u_tile_to_meter:new Ql(u),u_ground_shadow_factor:new SS(u),u_pattern_transition:new Ql(u)}),o.dU=u=>({u_matrix:new gT(u),u_pixels_to_tile_units:new jD(u),u_device_pixel_ratio:new Ql(u),u_width_scale:new Ql(u),u_floor_width_scale:new Ql(u),u_units_to_pixels:new T_(u),u_dash_image:new hT(u),u_gradient_image:new hT(u),u_image_height:new Ql(u),u_texsize:new T_(u),u_tile_units_to_pixels:new Ql(u),u_alpha_discard_threshold:new Ql(u),u_trim_offset:new T_(u),u_trim_fade_range:new T_(u),u_trim_color:new fT(u),u_emissive_strength:new Ql(u),u_zbias_factor:new Ql(u),u_tile_to_meter:new Ql(u),u_ground_shadow_factor:new SS(u)}),o.dV=u=>({u_camera_to_center_distance:new Ql(u),u_extrude_scale:new jD(u),u_device_pixel_ratio:new Ql(u),u_matrix:new gT(u),u_inv_rot_matrix:new gT(u),u_merc_center:new T_(u),u_tile_id:new SS(u),u_zoom_transition:new Ql(u),u_up_dir:new SS(u),u_emissive_strength:new Ql(u)}),o.dW=vS,o.dX=slt,o.dY=class{constructor(u,s,d,h){this.context=u,this.format=h,this.size=d,this.texture=u.gl.createTexture();let[f,v,b]=this.size,{gl:I}=u;I.bindTexture(I.TEXTURE_3D,this.texture),u.pixelStoreUnpackFlipY.set(!1),u.pixelStoreUnpack.set(1),u.pixelStoreUnpackPremultiplyAlpha.set(!1),"data"in s&&s.data&&I.texImage3D(I.TEXTURE_3D,0,this.format,f,v,b,0,lG(this.format),cG(this.format),s.data)}bind(u,s){let{context:d}=this,{gl:h}=d;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),s!==this.wrapS&&(h.texParameteri(h.TEXTURE_3D,h.TEXTURE_WRAP_S,s),h.texParameteri(h.TEXTURE_3D,h.TEXTURE_WRAP_T,s),this.wrapS=s)}destroy(){let{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}},o.dZ=lZ,o.d_=(u,s,d,h,f,v)=>{let b=u.transform,I=b.projection.name==="globe",k;if(v.paint.get("circle-pitch-alignment")==="map")if(I){let U=oZ(b.zoom,s.canonical)*b._pixelsPerMercatorPixel;k=Float32Array.from([U,0,0,U])}else k=b.calculatePixelsToTileUnitsMatrix(d);else k=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(s.projMatrix,d,v.paint.get("circle-translate"),v.paint.get("circle-translate-anchor")),u_device_pixel_ratio:l_.devicePixelRatio,u_extrude_scale:k,u_inv_rot_matrix:nhe,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0],u_emissive_strength:v.paint.get("circle-emissive-strength")};if(I){F.u_inv_rot_matrix=h,F.u_merc_center=f,F.u_tile_id=[s.canonical.x,s.canonical.y,1<=0?u.slice(0,s):u},o.dm=function(u){return u.indexOf(aT)>=0},o.dn=function(u){let s=u.lastIndexOf(aT);return s>=0?u.slice(s+1):""},o.dp=function(u){let s=[],d=u.id;return d===void 0&&s.push({message:`layers.${d}: missing required property "id"`}),u.render===void 0&&s.push({message:`layers.${d}: missing required method "render"`}),u.renderingMode&&u.renderingMode!=="2d"&&u.renderingMode!=="3d"&&s.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),s},o.dq=function(u,s,d,h){return u.type==="custom"?new Qlt(u,s):new ect[u.type](u,s,d,h)},o.dr=jo,o.ds=function(u){let s=u.indexOf(aT);return s>=0?u.slice(s+1):""},o.dt=class extends J3{constructor(u,s){super(u._vectorTileFeature,u._z,u._x,u._y,u.id),u.state&&(this.state=Object.assign({},u.state)),this.target=s.target,this.namespace=s.namespace,s.properties&&(this.properties=s.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}},o.du=DD,o.dv=pa,o.dw=function(u){return u({pluginStatus:Np,pluginURL:C_}),DD.on("pluginStateChange",u),u},o.dx=b3,o.dy=class extends P0{constructor(u){super(u),this.current=C3}set(u,s,d){if(this.fetchUniformLocation(u,s)){for(let h=0;h<9;h++)if(d[h]!==this.current[h]){this.current=d,this.gl.uniformMatrix3fv(this.location,!1,d);break}}}},o.dz=Ke,o.e=lp,o.e$=function(){let u=BR;u&&(u.isPreloaded()&&u.numActive()===1?(u.release(LR),BR=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()"))},o.e0=Rp,o.e1=(u,s,d,h,f,v,b,I,k,F)=>{let U=u.transform,G=U.pitch<15?DRe(.07,.7,pt((14-U.zoom)/5,0,1)):.07,q=d.paint.get("line-trim-color-use-theme").constantOr("default")==="none";return{u_matrix:MRe(u,s,d,h),u_texsize:s.imageAtlasTexture?s.imageAtlasTexture.size:[0,0],u_pixels_to_tile_units:U.calculatePixelsToTileUnitsMatrix(s),u_device_pixel_ratio:f,u_width_scale:v,u_floor_width_scale:b,u_image:0,u_tile_units_to_pixels:kRe(s,U),u_units_to_pixels:[1/U.pixelsToGLUnits[0],1/U.pixelsToGLUnits[1]],u_alpha_discard_threshold:0,u_trim_offset:I,u_trim_fade_range:d.paint.get("line-trim-fade-range"),u_trim_color:d.paint.get("line-trim-color").toPremultipliedRenderColor(q?null:d.lut).toArray01(),u_emissive_strength:d.paint.get("line-emissive-strength"),u_zbias_factor:G,u_tile_to_meter:jt(s.tileID.canonical,0),u_ground_shadow_factor:k,u_pattern_transition:F}},o.e2=(u,s,d,h,f,v,b,I,k,F)=>{let U=u.transform,G=U.calculatePixelsToTileUnitsMatrix(s),q=d.paint.get("line-trim-color-use-theme").constantOr("default")==="none",Z=U.pitch<15?DRe(.07,.7,pt((14-U.zoom)/5,0,1)):.07;return{u_matrix:MRe(u,s,d,h),u_pixels_to_tile_units:G,u_device_pixel_ratio:v,u_width_scale:b,u_floor_width_scale:I,u_units_to_pixels:[1/U.pixelsToGLUnits[0],1/U.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:f,u_texsize:RRe(d)&&s.lineAtlasTexture?s.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:kRe(s,u.transform),u_alpha_discard_threshold:0,u_trim_offset:k,u_trim_fade_range:d.paint.get("line-trim-fade-range"),u_trim_color:d.paint.get("line-trim-color").toPremultipliedRenderColor(q?null:d.lut).toArray01(),u_emissive_strength:d.paint.get("line-emissive-strength"),u_zbias_factor:Z,u_tile_to_meter:jt(s.tileID.canonical,0),u_ground_shadow_factor:F}},o.e3=Jn,o.e4=ER,o.e5=Xe,o.e6=Qme,o.e7=P3,o.e8=VZ,o.e9=kS,o.eA=ld,o.eB=lx,o.eC=function(u,s,d,h,f,v,b,I,k,F,U,G,q,Z,X,ue){var he=new c(16);return he[0]=u,he[1]=s,he[2]=d,he[3]=h,he[4]=f,he[5]=v,he[6]=b,he[7]=I,he[8]=k,he[9]=F,he[10]=U,he[11]=G,he[12]=q,he[13]=Z,he[14]=X,he[15]=ue,he},o.eD=oe,o.eE=bS,o.eF=xg,o.eG=class{constructor(){this._updateTime=0,this._sourceIds=[],this._activeRegions=[],this._prevRegions=[],this._globalClipBounds={min:new yi(1/0,1/0),max:new yi(-1/0,-1/0)}}clear(){this._activeRegions.length>0&&++this._updateTime,this._activeRegions=[],this._prevRegions=[]}get updateTime(){return this._updateTime}getReplacementRegionsForTile(u,s=!1){let d=EZ(new yi(0,0),new yi(pn,pn),u),h=[];if(s&&!WH(d,this._globalClipBounds))return h;for(let f of this._activeRegions){if(f.hiddenByOverlap||!WH(d,f))continue;let v=Che(f.min,f.max,u);h.push({min:v.min,max:v.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(s=>({getSourceId:()=>s.cache.id,getFootprints:()=>{let d=[];for(let h of s.cache.getVisibleCoordinates()){let f=s.cache.getTile(h).buckets[s.layer];f&&f.updateFootprints(h.toUnwrapped(),d)}return d},getOrder:()=>s.order,getClipMask:()=>s.clipMask,getClipScope:()=>s.clipScope})))}_addSource(u){let s=u.getFootprints();if(s.length===0)return;let d=u.getOrder(),h=u.getClipMask(),f=u.getClipScope();for(let v of s){if(!v.footprint)continue;let b=EZ(v.footprint.min,v.footprint.max,v.id);this._activeRegions.push({min:b.min,max:b.max,hiddenByOverlap:!1,priority:this._sourceIds.length,tileId:v.id,footprint:v.footprint,order:d,clipMask:h,clipScope:f})}this._sourceIds.push(u.getSourceId())}_computeReplacement(){this._activeRegions.sort((s,d)=>s.priority-d.priority||O3(s.min,d.min)||O3(s.max,d.max)||s.order-d.order||s.clipMask-d.clipMask||(function(h,f){let v=(b,I)=>b+I;return h.length-f.length||h.reduce(v,"").localeCompare(f.reduce(v,""))})(s.clipScope,d.clipScope));let u=this._activeRegions.length!==this._prevRegions.length;if(!u){let s=0;for(;!u&&s!==this._activeRegions.length;){let d=this._activeRegions[s],h=this._prevRegions[s];u=d.priority!==h.priority||!TZ(d,h)||d.order!==h.order||d.clipMask!==h.clipMask||!as(d.clipScope,h.clipScope),++s}}if(u){++this._updateTime;for(let d of this._activeRegions)d.order!==OR&&(this._globalClipBounds.min.x=Math.min(this._globalClipBounds.min.x,d.min.x),this._globalClipBounds.min.y=Math.min(this._globalClipBounds.min.y,d.min.y),this._globalClipBounds.max.x=Math.max(this._globalClipBounds.max.x,d.max.x),this._globalClipBounds.max.y=Math.max(this._globalClipBounds.max.y,d.max.y));let s=d=>{let h=this._activeRegions;if(d>=h.length)return d;let f=h[d].priority;for(;d1){let d=0,h=s(d);for(;d!==h;){let f=d,v=d;for(;f!==h;){let b=this._activeRegions[f];b.hiddenByOverlap=!1;for(let I=0;I=0;s--)this._addSource(u[s]);this._computeReplacement()}},o.eH=OR,o.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,s){let d=new pu,h=new fd,f=[],v=u+1+2,b=s[0]+1,I=s[0]+1+(1+s.length),k=(F,U,G)=>{let q=F===v-1?F-2:F===0?F:F-1;return q+=G?24575:0,[q,U]};for(let F=0;FString.fromCharCode(+("0x"+d))))},o.f0=function(){ek().acquire(LR)},o.f1=kD,o.f2=function(u,s,d=!1){if(Np===Jm.deferred||Np===Jm.loading||Np===Jm.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");C_=l_.resolveURL(u),Np=Jm.deferred,ED=s,AD(),d||_b()},o.f3=function(u){tk=l_.resolveURL(u),CT||(CT=new JD(ek(),new lb)),CT.broadcast("setMeshoptUrl",tk)},o.f4=z3,o.f5=function(u){oG=l_.resolveURL(u),CT||(CT=new JD(ek(),new lb)),CT.broadcast("setDracoUrl",oG)},o.f6=V3,o.f7=hm,o.f8=function(u){let s=UO();if(!s)return;let d=s.delete(Mh);u&&d.then(()=>u()).catch(u)},o.f9=L3,o.fA=function(u){U1(),Dp?.then(s=>{s.keys().then(d=>{for(let h=0;hKo(f.message))}).catch(d=>Ko(d.message))}).catch(s=>Ko(s.message))},o.fa=Ln,o.fb=ES,o.fc=gx,o.fd=ENe,o.fe=ANe,o.ff=IRe,o.fg=Co,o.fh="hd_road_elevation",o.fi=xl,o.fj=Qr,o.fk=fx,o.fl=Whe,o.fm=UR,o.fn=function(u,s,d,h,f,v,b,I=1,k,F,U){u.createArrays(),u.tilePixelRatio=pn/(512*u.overscaling),u.compareText={},u.iconsNeedLinear=!1;let G=u.layers[0].layout,q=u.layers[0]._unevaluatedLayout._values,Z={};Z.scaleFactor=I,Z.textSizeScaleRange=G.get("text-size-scale-range"),Z.iconSizeScaleRange=G.get("icon-size-scale-range");let[X,ue]=Z.textSizeScaleRange,[he,_e]=Z.iconSizeScaleRange;Z.textScaleFactor=pt(Z.scaleFactor,X,ue),Z.iconScaleFactor=pt(Z.scaleFactor,he,_e);let Fe=q["text-size"],Le=q["icon-size"];if(u.textSizeData.kind==="composite"){let{minZoom:Lt,maxZoom:ki}=u.textSizeData;Z.compositeTextSizes=[Fe.possiblyEvaluate(new Fs(Lt,{worldview:U}),v),Fe.possiblyEvaluate(new Fs(ki,{worldview:U}),v)]}if(u.iconSizeData.kind==="composite"){let{minZoom:Lt,maxZoom:ki}=u.iconSizeData;Z.compositeIconSizes=[Le.possiblyEvaluate(new Fs(Lt,{worldview:U}),v),Le.possiblyEvaluate(new Fs(ki,{worldview:U}),v)]}Z.layoutTextSize=Fe.possiblyEvaluate(new Fs(b+1,{worldview:U}),v),Z.layoutIconSize=Le.possiblyEvaluate(new Fs(b+1,{worldview:U}),v),Z.textMaxSize=Fe.possiblyEvaluate(new Fs(18,{worldview:U}),v);let Ve=G.get("symbol-placement"),dt=G.get("text-rotation-alignment")==="map"&&Ve!=="point",ut=G.get("text-size"),It=!1,Ot=[];for(let Lt of u.features){let ki=G.get("text-font").evaluate(Lt,{},v).join(","),Ht=ut.evaluate(Lt,{},v)*Z.textScaleFactor,Fi=Z.layoutTextSize.evaluate(Lt,{},v)*Z.textScaleFactor,Ji=Z.layoutIconSize.evaluate(Lt,{},v)*Z.iconScaleFactor,Vi={horizontal:{},vertical:void 0},Wi=Lt.text,rn,Ei=[0,0];if(Wi){let tr=Wi.toString(),Br=G.get("text-letter-spacing").evaluate(Lt,{},v)*pp,uo=G.get("text-line-height").evaluate(Lt,{},v)*pp,Lo=uR(tr)?Br:0,bo=G.get("text-anchor").evaluate(Lt,{},v),$n=G.get("text-variable-anchor");if(!$n){let ri=G.get("text-radial-offset").evaluate(Lt,{},v);if(ri)Ei=dPe(bo,[ri*pp,Zhe]);else{let Di=G.get("text-offset").evaluate(Lt,{},v);Ei=[Di[0]*pp,Di[1]*pp]}}let mo=dt?"center":G.get("text-justify").evaluate(Lt,{},v),xa=Ve==="point",je=xa?G.get("text-max-width").evaluate(Lt,{},v)*pp:1/0,Ye=ri=>{u.allowVerticalPlacement&&nT(tr)&&(Vi.vertical=qhe(Wi,s,d,f,ki,je,uo,bo,ri,Lo,Ei,M_.vertical,!0,Fi,Ht,k))};if(!dt&&$n){let ri=mo==="auto"?$n.map(In=>Xhe(In)):[mo],Di=!1;for(let In=0;In=0||!nT(tr)){let ri=qhe(Wi,s,d,f,ki,je,uo,bo,mo,Lo,Ei,M_.horizontal,!1,Fi,Ht,k);ri&&(Vi.horizontal[mo]=ri)}Ye(xa?"left":mo)}}let Qi,si,ei,an,nn,dr,Bn=!1,Qn=G.get("icon-text-fit").evaluate(Lt,{},v);if(Lt.icon&&Lt.icon.hasPrimary()){let tr=pPe(Lt.icon,u.iconSizeData,q["icon-size"],v,u.zoom,Lt,k,Z.iconScaleFactor,U);Qi=tr.iconPrimary,ei=tr.iconSecondary;let Br=Qi.toString();if(si=h.get(Br),si&&(nn=G.get("icon-offset").evaluate(Lt,{},v),dr=G.get("icon-anchor").evaluate(Lt,{},v),rn=Ilt(f.get(Br),ei?f.get(ei.toString()):void 0,nn,dr),Bn=si.sdf,u.sdfIcons===void 0?u.sdfIcons=si.sdf:u.sdfIcons!==si.sdf&&Ko("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(si.pixelRatio!==u.pixelRatio||G.get("icon-rotate").constantOr(1)!==0)&&(u.iconsNeedLinear=!0)),ei){let uo=ei.toString();an=h.get(uo)}}It=It||!(!Lt.icon||!Lt.icon.hasSecondary());let mn=Jhe(Vi.horizontal)||Vi.vertical;u.iconsInText||(u.iconsInText=!!mn&&mn.iconsInText);let cr=Fi*Z.textScaleFactor/pp,{defaultShapedIcon:to,verticallyShapedIcon:Tn}=Nlt(u,rn,G,Lt,v,Vi,cr,nn,Qn);Qn!=="none"&&rn&&(KRe(rn)||WRe(rn))&&(sX(0,si,Qi,rn,to,Qn,F,h,f),sX(0,an,ei,rn,to,Qn,F,h,f),Tn&&(sX(0,si,Qi,rn,Tn,Qn,F,h,f),sX(0,an,ei,rn,Tn,Qn,F,h,f))),rn=to,Ot.push({feature:Lt,shapedTextOrientations:Vi,shapedText:mn,shapedIcon:rn,iconPrimary:Qi,iconSecondary:ei,iconOffset:nn,iconAnchor:dr,verticallyShapedIcon:Tn,layoutTextSize:Fi,layoutIconSize:Ji,textOffset:Ei,isSDFIcon:Bn,iconTextFit:Qn})}return{featureData:Ot,sizes:Z,hasAnySecondaryIcon:It,textAlongLine:dt,symbolPlacement:Ve}},o.fo=rPe,o.fp=function(u,s,d,h,f,v,b,I,k,F){let{featureData:U,hasAnySecondaryIcon:G,sizes:q,textAlongLine:Z,symbolPlacement:X}=s;for(let ue of U){let{shapedIcon:he,verticallyShapedIcon:_e,feature:Fe,shapedTextOrientations:Le,shapedText:Ve,layoutTextSize:dt,textOffset:ut,isSDFIcon:It,iconPrimary:Ot,iconSecondary:Lt,iconTextFit:ki,iconOffset:Ht}=ue;mPe(he,F.iconPositions,Ot,Lt),mPe(_e,F.iconPositions,Ot,Lt),Plt(Le,F.iconPositions),Rlt(Ot,Lt,F.iconPositions),(Ve||he)&&Flt(u,Fe,Le,he,_e,k,q,dt,0,ut,It,h,f,b,I,G,ki,Ht,Z,X)}d&&u.generateCollisionDebugBuffers(v,u.collisionBoxArray,q.textScaleFactor)},o.fq=Zr,o.fr=EX,o.fs=Zi,o.ft=function(u){let s=0;if(new Uint32Array(u,0,1)[0]!==ZZ){let d=new Uint32Array(u,0,7),[,,h,f,v,b]=d;s=d.byteLength+f+v+b+v,(h!==u.byteLength||s>=u.byteLength)&&Ko("Invalid b3dm header information.")}return tX(u,s)},o.fu=function(u,s){let d=gRe(u);for(let h of d){for(let f of h.meshes)Ost(f);h.lights&&(h.lightMeshIndex=h.meshes.length,h.meshes.push(Rst(h.lights,s)))}return d},o.fv=CX,o.fw=Ns,o.fx=KZ,o.fy=R0,o.fz=Jm,o.g=function(u,s){return pa(Object.assign(u,{method:"GET"}),s)},o.h=function(u){return u.indexOf("mapbox:")===0},o.i=function(u){return lp.API_STYLE_REGEX.test(u)&&!zO(u)},o.j=UC,o.k=H1,o.l=function(u){return decodeURIComponent(atob(u).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join(""))},o.m=function(u,s){return pa(Object.assign(u,{type:"json"}),s)},o.n=ac,o.o=l_,o.p=function(u,s){return pa(Object.assign(u,{method:"POST"}),s)},o.q=cd,o.r=KA,o.s=function(u){try{let s=self[u];return s.setItem("_mapbox_test_",1),s.removeItem("_mapbox_test_"),!0}catch{return!1}},o.t=function(){return rG||(rG=new L3),rG},o.u=function(){return(function u(s){return s?(s^Math.random()*(16>>s/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,u)})()},o.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)},o.w=Ko,o.x=hfe,o.y=qd,o.z=d_}),n(["./shared"],function(o){function a(At){let Ce=At?At.url.toString():void 0;return Ce?performance.getEntriesByName(Ce):[]}function c(At){if(typeof At=="number"||typeof At=="boolean"||typeof At=="string"||At==null)return JSON.stringify(At);if(Array.isArray(At)){let Me="[";for(let Ke of At)Me+=`${c(Ke)},`;return`${Me}]`}let Ce="{";for(let Me of Object.keys(At).sort())Ce+=`${Me}:${c(At[Me])},`;return`${Ce}}`}function m(At){let Ce="";for(let Me of o.bx)Ce+=`/${c(At[Me])}`;return Ce}class g{constructor(Ce){this.keyCache={},this._layers={},this._layerConfigs={},Ce&&this.replace(Ce)}replace(Ce,Me){this._layerConfigs={},this._layers={},this.update(Ce,[],Me)}update(Ce,Me,Ke){this._options=Ke;for(let mt of Ce)this._layerConfigs[mt.id]=mt,(this._layers[mt.id]=o.dq(mt,this.scope,null,this._options)).compileFilter(Ke),this.keyCache[mt.id]&&delete this.keyCache[mt.id];for(let mt of Me)delete this.keyCache[mt],delete this._layerConfigs[mt],delete this._layers[mt];this.familiesBySource={};let xt=(function(mt,pt){let ii={};for(let oi=0;oithis._layers[Jn.id]),ii=pt[0];if(ii.visibility==="none")continue;let Ft=ii.source||"",oi=this.familiesBySource[Ft];oi||(oi=this.familiesBySource[Ft]={});let ln=ii.sourceLayer||"_geojsonTileLayer",zi=oi[ln];zi||(zi=oi[ln]=[]),zi.push(pt)}}}let C=1*o.fc;class w{constructor(Ce){let Me={},Ke=[];for(let ii in Ce){let Ft=Ce[ii],oi=Me[ii]={};for(let ln in Ft.glyphs){let zi=Ft.glyphs[+ln];if(!zi||zi.bitmap.width===0||zi.bitmap.height===0)continue;let Jn=zi.metrics.localGlyph?C:1,Pr={x:0,y:0,w:zi.bitmap.width+2*Jn,h:zi.bitmap.height+2*Jn};Ke.push(Pr),oi[ln]=Pr}}let{w:xt,h:mt}=o.G(Ke),pt=new o.fb({width:xt||1,height:mt||1});for(let ii in Ce){let Ft=Ce[ii];for(let oi in Ft.glyphs){let ln=Ft.glyphs[+oi];if(!ln||ln.bitmap.width===0||ln.bitmap.height===0)continue;let zi=Me[ii][oi],Jn=ln.metrics.localGlyph?C:1;o.fb.copy(ln.bitmap,pt,{x:0,y:0},{x:zi.x+Jn,y:zi.y+Jn},ln.bitmap)}}this.image=pt,this.positions=Me}}o.fa(w,"GlyphAtlas");class P{constructor(Ce){this.tileID=new o.aO(Ce.tileID.overscaledZ,Ce.tileID.wrap,Ce.tileID.canonical.z,Ce.tileID.canonical.x,Ce.tileID.canonical.y),this.tileZoom=Ce.tileZoom,this.uid=Ce.uid,this.zoom=Ce.zoom,this.lut=Ce.lut,this.canonical=Ce.tileID.canonical,this.pixelRatio=Ce.pixelRatio,this.tileSize=Ce.tileSize,this.source=Ce.source,this.scope=Ce.scope,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ce.showCollisionBoxes,this.collectResourceTiming=!!Ce.request&&Ce.request.collectResourceTiming,this.promoteId=Ce.promoteId,this.isSymbolTile=Ce.isSymbolTile,this.tileTransform=o.aZ(Ce.tileID.canonical,Ce.projection),this.projection=Ce.projection,this.worldview=Ce.worldview,this.localizableLayerIds=Ce.localizableLayerIds,this.brightness=Ce.brightness,this.extraShadowCaster=!!Ce.extraShadowCaster,this.tessellationStep=Ce.tessellationStep,this.scaleFactor=Ce.scaleFactor,this.worldview=Ce.worldview}parse(Ce,Me,Ke,xt,mt,pt){this.status="parsing",this.data=Ce,this.collisionBoxArray=new o.b3;let ii=new o.fd(Object.keys(Ce.layers).sort()),Ft=new o.fe(this.tileID,this.promoteId);Ft.bucketLayerIDs=[];let oi={},ln=new o.ff(256,256),zi={featureIndex:Ft,iconDependencies:new Map,patternDependencies:new Map,glyphDependencies:{},lineAtlas:ln,availableImages:Ke,brightness:this.brightness,scaleFactor:this.scaleFactor,elevationFeatures:void 0},Jn=[],Pr=Me.familiesBySource[this.source];for(let jo in Pr){let Yr=Ce.layers[jo];if(!Yr)continue;let Fo=!1,js=!1,Ko=!1;for(let Ns of Pr[jo])Ns[0].type==="symbol"?Fo=!0:js=!0,Ns[0].is3D()&&Ns[0].type!=="model"&&(Ko=!0);if(this.extraShadowCaster&&!Ko||this.isSymbolTile===!0&&!Fo||this.isSymbolTile===!1&&!js)continue;Yr.version===1&&o.w(`Vector tile source "${this.source}" layer "${jo}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Sc=ii.encode(jo),Gc=[],md=!1;for(let Ns=0,Za=0;Ns=Za.maxzoom||Za.visibility==="none")continue;R(Ns,this.zoom,zi.brightness,Ke,this.worldview);let Kl=oi[Za.id]=Za.createBucket({index:Ft.bucketLayerIDs.length,layers:Ns,zoom:this.zoom,lut:this.lut,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Sc,sourceID:this.source,projection:this.projection.spec,tessellationStep:this.tessellationStep,styleDefinedModelURLs:xt,worldview:this.worldview});Ft.bucketLayerIDs.push(Ns.map(sl=>o.B(sl.id,sl.scope)));let Wl=Kl.prepare?Kl.prepare():null;Wl!=null?(Wl=Wl.then(()=>Kl.populate(Gc,zi,this.tileID.canonical,this.tileTransform)),Jn.push(Wl)):Kl.populate(Gc,zi,this.tileID.canonical,this.tileTransform)}}let Qr=()=>{let jo,Yr,Fo,js,Ko,Sc;ln.trim();let Gc={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},md=()=>{if(jo)return this.status="done",pt(jo);if(this.extraShadowCaster)this.status="done",pt(null,{buckets:Object.values(oi).filter(Za=>!Za.isEmpty()),featureIndex:Ft,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:zi.brightness,glyphMap:null,iconMap:null,glyphPositions:null});else if(Yr&&Fo&&js){let Za=new w(Yr),Kl=new Map;for(let[Uu,sm]of Fo.entries()){let{imagePosition:yf}=o.fl(Uu,sm,o.fm);Kl.set(Uu,yf)}let Wl={};for(let Uu in oi){let sm=oi[Uu];sm instanceof o.b4&&(R(sm.layers,this.zoom,zi.brightness,Ke,this.worldview),Wl[Uu]=o.fn(sm,Yr,Za.positions,Fo,Kl,this.tileID.canonical,this.tileZoom,this.scaleFactor,this.pixelRatio,Ko,this.worldview))}let sl={iconsPending:!0,patternsPending:!0};this.rasterizeIfNeeded(mt,Fo,Ko,()=>{sl.iconsPending=!1,Ns(Wl,Za,sl)}),this.rasterizeIfNeeded(mt,js,Sc,()=>{sl.patternsPending=!1,Ns(Wl,Za,sl)})}},Ns=(Za,Kl,Wl,sl)=>{if(Wl.iconsPending||Wl.patternsPending)return;let Uu=new o.fo(Fo,js,this.lut);for(let sm in oi){let yf=oi[sm];if(sm in Za)o.fp(yf,Za[sm],this.showCollisionBoxes,Ke,this.tileID.canonical,this.tileZoom,this.projection,this.brightness,Fo,Uu);else if(yf.hasPattern&&(yf instanceof o.ba||yf instanceof o.bb||yf instanceof o.e7)){R(yf.layers,this.zoom,zi.brightness,Ke,this.worldview);let Ny=Object.fromEntries(Uu.patternPositions);yf.addFeatures(zi,this.tileID.canonical,Ny,Ke,this.tileTransform,this.brightness)}}this.status="done",pt(null,{buckets:Object.values(oi).filter(sm=>!sm.isEmpty()),featureIndex:Ft,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Kl.image,lineAtlas:ln,imageAtlas:Uu,brightness:zi.brightness})};if(!this.extraShadowCaster){let Za=o.fj(zi.glyphDependencies,sl=>Object.keys(sl).map(Number));Object.keys(Za).length?mt.send("getGlyphs",{uid:this.uid,stacks:Za},(sl,Uu)=>{jo||(jo=sl,Yr=Uu,md())},void 0,!1,Gc):Yr={};let Kl=Array.from(zi.iconDependencies.keys()).map(sl=>o.I.parse(sl));Kl.length?mt.send("getImages",{images:Kl,source:this.source,scope:this.scope,tileID:this.tileID,type:"icons"},(sl,Uu)=>{jo||(jo=sl,Fo=new Map,Ko=this.updateImageMapAndGetImageTaskQueue(Fo,Uu,zi.iconDependencies),md())},void 0,!1,Gc):(Fo=new Map,Ko=new Map);let Wl=Array.from(zi.patternDependencies.keys()).map(sl=>o.I.parse(sl));Wl.length?mt.send("getImages",{images:Wl,source:this.source,scope:this.scope,tileID:this.tileID,type:"patterns"},(sl,Uu)=>{jo||(jo=sl,js=new Map,Sc=this.updateImageMapAndGetImageTaskQueue(js,Uu,zi.patternDependencies),md())},void 0,!1,Gc):(js=new Map,Sc=new Map)}if(zi.elevationFeatures&&zi.elevationFeatures.length>0){let Za=[];for(let Wl of Object.values(oi))if(Wl instanceof o.bb){let sl=Wl.getUnevaluatedPortalGraph();sl&&Za.push(sl)}let Kl=o.fk.evaluate(Za);for(let Wl of Object.values(oi))if(Wl instanceof o.bb){let sl=Ce.layers[ii.decode(Wl.sourceLayerIndex)];Wl.setEvaluatedPortalGraph(Kl,sl,this.tileID.canonical,zi.availableImages,zi.brightness)}}md()};Jn.length>0?Promise.allSettled(Jn).then(Qr).catch(pt):Qr()}rasterizeIfNeeded(Ce,Me,Ke,xt){Array.from(Me.values()).some(mt=>mt.usvg)?this.rasterize(Ce,Me,Ke,xt):xt()}updateImageMapAndGetImageTaskQueue(Ce,Me,Ke){let xt=new Map;for(let mt of Me.keys()){let pt=Ke.get(mt)||[];for(let ii of pt){let Ft=ii.toString(),oi=Me.get(ii.id.toString());oi.usvg?xt.has(Ft)||(xt.set(Ft,ii),Ce.set(Ft,Object.assign({},oi))):Ce.set(Ft,oi)}}return xt}rasterize(Ce,Me,Ke,xt){this.rasterizeTask=Ce.send("rasterizeImages",{scope:this.scope,tasks:Ke},(mt,pt)=>{if(!mt)for(let[ii,Ft]of pt.entries()){let oi=Object.assign(Me.get(ii),{data:Ft});Me.set(ii,oi)}xt()})}cancelRasterize(){this.rasterizeTask&&this.rasterizeTask.cancel()}}function R(At,Ce,Me,Ke,xt){let mt=new o.ac(Ce,{brightness:Me,worldview:xt});for(let pt of At)pt.recalculate(mt,Ke)}class z extends o.E{constructor(Ce,Me,Ke,xt,mt,pt,ii){super(),this.actor=Ce,this.layerIndex=Me,this.availableImages=Ke,this.availableModels=xt,this.loadVectorData=pt||o.aL,this.loading={},this.loaded={},this.deduped=new o.aK(Ce.scheduler),this.isSpriteLoaded=mt,this.scheduler=Ce.scheduler,this.brightness=ii}loadTile(Ce,Me){let Ke=Ce.uid,xt=Ce&&Ce.request,mt=xt&&xt.collectResourceTiming,pt=this.loading[Ke]=new P(Ce);pt.abort=this.loadVectorData(Ce,(ii,Ft)=>{let oi=!this.loading[Ke];if(delete this.loading[Ke],pt.cancelRasterize(),oi||ii||!Ft)return pt.status="done",oi||(this.loaded[Ke]=pt),Me(ii);let ln=Ft.rawData,zi={};Ft.expires&&(zi.expires=Ft.expires),Ft.cacheControl&&(zi.cacheControl=Ft.cacheControl),pt.vectorTile=Ft.vectorTile||new o.fq(new o.bt(ln));let Jn=()=>{pt.parse(pt.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,(Pr,Qr)=>{if(Pr||!Qr)return Me(Pr);let jo={};if(mt){let Yr=a(xt);Yr.length>0&&(jo.resourceTiming=JSON.parse(JSON.stringify(Yr)))}Me(null,Object.assign({rawTileData:ln.slice(0)},Qr,zi,jo))})};this.isSpriteLoaded?Jn():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(Jn,{type:"parseTile",isSymbolTile:Ce.isSymbolTile,zoom:Ce.tileZoom}):Jn()}),this.loaded=this.loaded||{},this.loaded[Ke]=pt})}reloadTile(Ce,Me){let Ke=this.loaded,xt=Ce.uid;if(Ke&&Ke[xt]){let mt=Ke[xt];mt.scaleFactor=Ce.scaleFactor,mt.showCollisionBoxes=Ce.showCollisionBoxes,mt.projection=Ce.projection,mt.brightness=Ce.brightness,mt.tileTransform=o.aZ(Ce.tileID.canonical,Ce.projection),mt.extraShadowCaster=Ce.extraShadowCaster,mt.lut=Ce.lut,mt.worldview=Ce.worldview;let pt=(ii,Ft)=>{let oi=mt.reloadCallback;oi&&(delete mt.reloadCallback,mt.parse(mt.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,oi)),Me(ii,Ft)};mt.status==="parsing"?mt.reloadCallback=pt:mt.status==="done"&&(mt.vectorTile?mt.parse(mt.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,pt):pt())}else Me(null,void 0)}abortTile(Ce,Me){let Ke=Ce.uid,xt=this.loading[Ke];xt&&(xt.abort&&xt.abort(),delete this.loading[Ke]),Me()}removeTile(Ce,Me){let Ke=this.loaded,xt=Ce.uid;Ke&&Ke[xt]&&delete Ke[xt],Me()}}class H{loadTile(Ce,Me){let{uid:Ke,encoding:xt,rawImageData:mt,padding:pt}=Ce,ii=ImageBitmap&&mt instanceof ImageBitmap?this.getImageData(mt,pt):mt;Me(null,new o.fr(Ke,ii,xt,pt<1))}reloadTile(Ce,Me){Me(null,null)}abortTile(Ce,Me){Me()}removeTile(Ce,Me){Me()}getImageData(Ce,Me){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Ce.width,Ce.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=Ce.width,this.offscreenCanvas.height=Ce.height,this.offscreenCanvasContext.drawImage(Ce,0,0,Ce.width,Ce.height);let Ke=this.offscreenCanvasContext.getImageData(-Me,-Me,Ce.width+2*Me,Ce.height+2*Me);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),Ke}}o.bs.setPbf(o.bt);class j{constructor(Ce){this._mrt=new o.bs(Ce.partial?30:1/0),this._isHeaderLoaded=!1,this.uid=Ce.uid,this.tileID=Ce.tileID,this.source=Ce.source}parse(Ce,Me){let Ke=this._mrt;this.status="parsing",this._entireBuffer=Ce;try{Ke.parseHeader(Ce),this._isHeaderLoaded=!0;let xt=[];for(let mt in Ke.layers){let pt=Ke.getLayer(mt),ii=pt.getDataRange(pt.getBandList()),Ft=Ke.createDecodingTask(ii),oi=Ce.slice(ii.firstByte,ii.lastByte+1),ln=o.bs.performDecoding(oi,Ft).then(zi=>Ft.complete(null,zi)).catch(zi=>Ft.complete(zi,null));xt.push(ln)}Promise.allSettled(xt).then(()=>Me(null,Ke)).catch(mt=>Me(mt))}catch(xt){Me(xt)}}}class K{constructor(Ce){this.actor=Ce,this.loading={},this.loaded={}}loadTile(Ce,Me){let Ke=Ce.uid,xt=Ce.request,mt=this.loading[Ke]=new j(Ce),{cancel:pt}=o.bu(xt,(ii,Ft,oi,ln)=>{let zi=!this.loading[Ke];if(delete this.loading[Ke],zi||ii||!Ft)return mt.status="done",zi||(this.loaded[Ke]=mt),Me(ii);mt.parse(Ft,(Jn,Pr)=>{if(Jn||!Pr)return Me(Jn);Me(null,Pr,oi,ln)}),this.loaded[Ke]=mt});mt.abort=pt}reloadTile(Ce,Me){Me(null,void 0)}abortTile(Ce,Me){let Ke=Ce.uid,xt=this.loading[Ke];xt&&(xt.abort&&xt.abort(),delete this.loading[Ke]),Me()}removeTile(Ce,Me){let Ke=Ce.uid;this.loaded[Ke]&&delete this.loaded[Ke],Me()}decodeRasterArray(Ce,Me){o.bs.performDecoding(Ce.buffer,Ce.task).then(Ke=>Me(null,Ke)).catch(Ke=>Me(Ke))}}let ne=o.fs.prototype.toGeoJSON;class me{constructor(Ce){this._feature=Ce,this.extent=o.al,this.type=Ce.type,this.properties=Ce.tags,"id"in Ce&&!isNaN(Ce.id)&&(this.id=parseInt(Ce.id,10))}loadGeometry(){if(this._feature.type===1){let Ce=[];for(let Me of this._feature.geometry)Ce.push([new o.P(Me[0],Me[1])]);return Ce}{let Ce=[];for(let Me of this._feature.geometry){let Ke=[];for(let xt of Me)Ke.push(new o.P(xt[0],xt[1]));Ce.push(Ke)}return Ce}}toGeoJSON(Ce,Me,Ke){return ne.call(this,Ce,Me,Ke)}}class Te{constructor(Ce,Me){this.name=Ce,this.extent=o.al,this.length=Me.length,this._jsonFeatures=Me}feature(Ce){return new me(this._jsonFeatures[Ce])}}class Ie{constructor(Ce){this.layers={},this.extent=o.al;for(let Me of Object.keys(Ce))this.layers[Me]=new Te(Me,Ce[Me])}}let ye=64/4096,fe=128;class Re{constructor(){this.features=new Map}clear(){this.features.clear()}load(Ce=[],Me){for(let Ke of Ce){let xt=Ke.id;if(xt==null)continue;let mt=this.features.get(xt);mt&&this.updateCache(mt,Me),Ke.geometry?(mt=ke(Ke),this.updateCache(mt,Me),this.features.set(xt,mt)):this.features.delete(xt),this.updateCache(mt,Me)}}updateCache(Ce,Me){for(let{canonical:Ke,uid:xt}of Object.values(Me)){let{z:mt,x:pt,y:ii}=Ke;Ae(Ce,Math.pow(2,mt),pt,ii)&&delete Me[xt]}}getTile(Ce,Me,Ke){let xt=Math.pow(2,Ce),mt=[];for(let pt of this.features.values())Ae(pt,xt,Me,Ke)&&mt.push(rt(pt,xt,Me,Ke));return{features:mt}}getFeatures(){return[...this.features.values()]}}function Ae({minX:At,minY:Ce,maxX:Me,maxY:Ke},xt,mt,pt){return At<(mt+1+ye)/xt&&Ce<(pt+1+ye)/xt&&Me>(mt-ye)/xt&&Ke>(pt-ye)/xt}function ke(At){let{id:Ce,geometry:Me,properties:Ke}=At;if(!Me)return;if(Me.type==="GeometryCollection")throw new Error("GeometryCollection not supported in dynamic mode.");let{type:xt,coordinates:mt}=Me,pt={id:Ce,type:1,geometry:[],tags:Ke,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},ii=pt.geometry;if(xt==="Point")Qe(mt,ii,pt);else if(xt==="MultiPoint")for(let Ft of mt)Qe(Ft,ii,pt);else if(xt==="LineString")pt.type=2,we(mt,ii,pt);else if(xt==="MultiLineString")pt.type=2,Rt(mt,ii,pt);else if(xt==="Polygon")pt.type=3,Rt(mt,ii,pt,!0);else{if(xt!=="MultiPolygon")throw new Error("Input data is not a valid GeoJSON object.");pt.type=3;for(let Ft of mt)Rt(Ft,ii,pt,!0)}return pt}function Qe([At,Ce],Me,Ke){let xt=o.aF(At),mt=o.aJ(Ce);mt=mt<0?0:mt>1?1:mt,Me.push(xt,mt),Ke.minX=Math.min(Ke.minX,xt),Ke.minY=Math.min(Ke.minY,mt),Ke.maxX=Math.max(Ke.maxX,xt),Ke.maxY=Math.max(Ke.maxY,mt)}function we(At,Ce,Me,Ke=!1,xt=!1){let mt=[];for(let pt of At)Qe(pt,mt,Me);Ce.push(mt),Ke&&(function(pt,ii){let Ft=0;for(let oi=0,ln=pt.length,zi=ln-2;oi0===ii)for(let oi=0,ln=pt.length;oi=pt&&zi>=pt||(oi>=pt?(ln+=Math.round(Qr*((pt-oi)/Pr)),oi=pt):zi>=pt&&(Jn=ln+Math.round(Qr*((pt-oi)/Pr)),zi=pt),ln>=pt&&Jn>=pt||(ln>=pt?(oi+=Math.round(Pr*((pt-ln)/Qr)),ln=pt):Jn>=pt&&(zi=oi+Math.round(Pr*((pt-ln)/Qr)),Jn=pt),ii&&oi===ii[ii.length-1][0]&&ln===ii[ii.length-1][1]||(ii=[[oi,ln]],xt.push(ii)),ii.push([zi,Jn])))))}}function Et({name:At,features:Ce},Me){Me.writeStringField(1,At),Me.writeVarintField(5,o.al);let Ke=new Map,xt=new Map,mt={keys:Ke,values:xt,feature:null};for(let pt of Ce)mt.feature=pt,Me.writeMessage(2,We,mt);for(let pt of Ke.keys())Me.writeStringField(3,pt);for(let pt of xt.keys())Me.writeMessage(4,Kt,pt)}function We(At,Ce){let Me=At.feature;Me.id!==void 0&&Number.isSafeInteger(+Me.id)&&Ce.writeVarintField(1,+Me.id),Me.tags&&Ce.writeMessage(2,bt,At),Ce.writeVarintField(3,Me.type),Ce.writeMessage(4,pi,Me)}function bt({keys:At,values:Ce,feature:Me},Ke){for(let xt of Object.keys(Me.tags)){let mt=Me.tags[xt];if(mt===null)continue;let pt=At.get(xt);pt===void 0&&(pt=At.size,At.set(xt,pt)),Ke.writeVarint(pt);let ii=typeof mt;ii!=="string"&&ii!=="boolean"&&ii!=="number"&&(mt=JSON.stringify(mt));let Ft=Ce.get(mt);Ft===void 0&&(Ft=Ce.size,Ce.set(mt,Ft)),Ke.writeVarint(Ft)}}function st(At,Ce){return(Ce<<3)+(7&At)}function kt(At){return At<<1^At>>31}function pi(At,Ce){let{geometry:Me,type:Ke}=At,xt=0,mt=0;if(Ke===1){Ce.writeVarint(st(1,Me.length));for(let pt of Me){let ii=pt[0]-xt,Ft=pt[1]-mt;Ce.writeVarint(kt(ii)),Ce.writeVarint(kt(Ft)),xt+=ii,mt+=Ft}}else for(let pt of Me){Ce.writeVarint(st(1,1));let ii=pt.length-(Ke===3?1:0);for(let Ft=0;FtAt},ht=Math.fround||(li=new Float32Array(1),At=>(li[0]=+At,li[0]));var li;let ui=3,Bi=5,wn=6;class yn{constructor(Ce){this.options=Object.assign(Object.create(gt),Ce),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ce){let{log:Me,minZoom:Ke,maxZoom:xt}=this.options;Me&&console.time("total time");let mt=`prepare ${Ce.length} points`;Me&&console.time(mt),this.points=Ce;let pt=[];for(let Ft=0;Ft=Ke;Ft--){let oi=+Date.now();ii=this.trees[Ft]=this._createTree(this._cluster(ii,Ft)),Me&&console.log("z%d: %d clusters in %dms",Ft,ii.numItems,+Date.now()-oi)}return Me&&console.timeEnd("total time"),this}getClusters(Ce,Me){let Ke=((Ce[0]+180)%360+360)%360-180,xt=Math.max(-90,Math.min(90,Ce[1])),mt=Ce[2]===180?180:((Ce[2]+180)%360+360)%360-180,pt=Math.max(-90,Math.min(90,Ce[3]));if(Ce[2]-Ce[0]>=360)Ke=-180,mt=180;else if(Ke>mt){let zi=this.getClusters([Ke,xt,180,pt],Me),Jn=this.getClusters([-180,xt,mt,pt],Me);return zi.concat(Jn)}let ii=this.trees[this._limitZoom(Me)],Ft=ii.range(De(Ke),bi(pt),De(mt),bi(xt)),oi=ii.data,ln=[];for(let zi of Ft){let Jn=this.stride*zi;ln.push(oi[Jn+Bi]>1?Xn(oi,Jn,this.clusterProps):this.points[oi[Jn+ui]])}return ln}getChildren(Ce){let Me=this._getOriginId(Ce),Ke=this._getOriginZoom(Ce),xt="No cluster with the specified id.",mt=this.trees[Ke];if(!mt)throw new Error(xt);let pt=mt.data;if(Me*this.stride>=pt.length)throw new Error(xt);let ii=this.options.radius/(this.options.extent*Math.pow(2,Ke-1)),Ft=mt.within(pt[Me*this.stride],pt[Me*this.stride+1],ii),oi=[];for(let ln of Ft){let zi=ln*this.stride;pt[zi+4]===Ce&&oi.push(pt[zi+Bi]>1?Xn(pt,zi,this.clusterProps):this.points[pt[zi+ui]])}if(oi.length===0)throw new Error(xt);return oi}getLeaves(Ce,Me,Ke){let xt=[];return this._appendLeaves(xt,Ce,Me=Me||10,Ke=Ke||0,0),xt}getTile(Ce,Me,Ke){let xt=this.trees[this._limitZoom(Ce)],mt=Math.pow(2,Ce),{extent:pt,radius:ii}=this.options,Ft=ii/pt,oi=(Ke-Ft)/mt,ln=(Ke+1+Ft)/mt,zi={features:[]};return this._addTileFeatures(xt.range((Me-Ft)/mt,oi,(Me+1+Ft)/mt,ln),xt.data,Me,Ke,mt,zi),Me===0&&this._addTileFeatures(xt.range(1-Ft/mt,oi,1,ln),xt.data,mt,Ke,mt,zi),Me===mt-1&&this._addTileFeatures(xt.range(0,oi,Ft/mt,ln),xt.data,-1,Ke,mt,zi),zi.features.length?zi:null}getClusterExpansionZoom(Ce){let Me=this._getOriginZoom(Ce)-1;for(;Me<=this.options.maxZoom;){let Ke=this.getChildren(Ce);if(Me++,Ke.length!==1)break;Ce=Ke[0].properties.cluster_id}return Me}_appendLeaves(Ce,Me,Ke,xt,mt){let pt=this.getChildren(Me);for(let ii of pt){let Ft=ii.properties;if(Ft&&Ft.cluster?mt+Ft.point_count<=xt?mt+=Ft.point_count:mt=this._appendLeaves(Ce,Ft.cluster_id,Ke,xt,mt):mt1,ln,zi,Jn;if(oi)ln=Rr(Me,Ft,this.clusterProps),zi=Me[Ft],Jn=Me[Ft+1];else{let jo=this.points[Me[Ft+ui]];ln=jo.properties;let[Yr,Fo]=jo.geometry.coordinates;zi=De(Yr),Jn=bi(Fo)}let Pr={type:1,geometry:[[Math.round(this.options.extent*(zi*mt-Ke)),Math.round(this.options.extent*(Jn*mt-xt))]],tags:ln},Qr;Qr=oi||this.options.generateId?Me[Ft+ui]:this.points[Me[Ft+ui]].id,Qr!==void 0&&(Pr.id=Qr),pt.features.push(Pr)}}_limitZoom(Ce){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ce),this.options.maxZoom+1))}_cluster(Ce,Me){let{radius:Ke,extent:xt,reduce:mt,minPoints:pt}=this.options,ii=Ke/(xt*Math.pow(2,Me)),Ft=Ce.data,oi=[],ln=this.stride;for(let zi=0;ziMe&&(Yr+=Ft[js+Bi])}if(Yr>jo&&Yr>=pt){let Fo,js=Jn*jo,Ko=Pr*jo,Sc=-1,Gc=(zi/ln<<5)+(Me+1)+this.points.length;for(let md of Qr){let Ns=md*ln;if(Ft[Ns+2]<=Me)continue;Ft[Ns+2]=Me;let Za=Ft[Ns+Bi];js+=Ft[Ns]*Za,Ko+=Ft[Ns+1]*Za,Ft[Ns+4]=Gc,mt&&(Fo||(Fo=this._map(Ft,zi,!0),Sc=this.clusterProps.length,this.clusterProps.push(Fo)),mt(Fo,this._map(Ft,Ns)))}Ft[zi+4]=Gc,oi.push(js/Yr,Ko/Yr,1/0,Gc,-1,Yr),mt&&oi.push(Sc)}else{for(let Fo=0;Fo1)for(let Fo of Qr){let js=Fo*ln;if(!(Ft[js+2]<=Me)){Ft[js+2]=Me;for(let Ko=0;Ko>5}_getOriginZoom(Ce){return(Ce-this.points.length)%32}_map(Ce,Me,Ke){if(Ce[Me+Bi]>1){let pt=this.clusterProps[Ce[Me+wn]];return Ke?Object.assign({},pt):pt}let xt=this.points[Ce[Me+ui]].properties,mt=this.options.map(xt);return Ke&&mt===xt?Object.assign({},mt):mt}}function Xn(At,Ce,Me){return{type:"Feature",id:At[Ce+ui],properties:Rr(At,Ce,Me),geometry:{type:"Point",coordinates:[(Ke=At[Ce],360*(Ke-.5)),Ci(At[Ce+1])]}};var Ke}function Rr(At,Ce,Me){let Ke=At[Ce+Bi],xt=Ke>=1e4?`${Math.round(Ke/1e3)}k`:Ke>=1e3?Math.round(Ke/100)/10+"k":Ke,mt=At[Ce+wn],pt=mt===-1?{}:Object.assign({},Me[mt]);return Object.assign(pt,{cluster:!0,cluster_id:At[Ce+ui],point_count:Ke,point_count_abbreviated:xt})}function De(At){return At/360+.5}function bi(At){let Ce=Math.sin(At*Math.PI/180),Me=.5-.25*Math.log((1+Ce)/(1-Ce))/Math.PI;return Me<0?0:Me>1?1:Me}function Ci(At){let Ce=(180-360*At)*Math.PI/180;return 360*Math.atan(Math.exp(Ce))/Math.PI-90}function Mt(At,Ce,Me,Ke){let xt=Ke,mt=Ce+(Me-Ce>>1),pt,ii=Me-Ce,Ft=At[Ce],oi=At[Ce+1],ln=At[Me],zi=At[Me+1];for(let Jn=Ce+3;Jnxt)pt=Jn,xt=Pr;else if(Pr===xt){let Qr=Math.abs(Jn-mt);QrKe&&(pt-Ce>3&&Mt(At,Ce,pt,Ke),At[pt+2]=xt,Me-pt>3&&Mt(At,pt,Me,Ke))}function wt(At,Ce,Me,Ke,xt,mt){let pt=xt-Me,ii=mt-Ke;if(pt!==0||ii!==0){let Ft=((At-Me)*pt+(Ce-Ke)*ii)/(pt*pt+ii*ii);Ft>1?(Me=xt,Ke=mt):Ft>0&&(Me+=pt*Ft,Ke+=ii*Ft)}return pt=At-Me,ii=Ce-Ke,pt*pt+ii*ii}function ti(At,Ce,Me,Ke){let xt={id:At??null,type:Ce,geometry:Me,tags:Ke,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ce==="Point"||Ce==="MultiPoint"||Ce==="LineString")Ut(xt,Me);else if(Ce==="Polygon")Ut(xt,Me[0]);else if(Ce==="MultiLineString")for(let mt of Me)Ut(xt,mt);else if(Ce==="MultiPolygon")for(let mt of Me)Ut(xt,mt[0]);return xt}function Ut(At,Ce){for(let Me=0;Me0&&(pt+=Ke?(xt*ln-oi*mt)/2:Math.sqrt(Math.pow(oi-xt,2)+Math.pow(ln-mt,2))),xt=oi,mt=ln}let ii=Ce.length-3;Ce[2]=1,Mt(Ce,0,ii,Me),Ce[ii+2]=1,Ce.size=Math.abs(pt),Ce.start=0,Ce.end=Ce.size}function Bt(At,Ce,Me,Ke){for(let xt=0;xt1?1:Me}function Ki(At,Ce,Me,Ke,xt,mt,pt,ii){if(Ke/=Ce,mt>=(Me/=Ce)&&pt=Ke)return null;let Ft=[];for(let oi of At){let ln=oi.geometry,zi=oi.type,Jn=xt===0?oi.minX:oi.minY,Pr=xt===0?oi.maxX:oi.maxY;if(Jn>=Me&&Pr=Ke)continue;let Qr=[];if(zi==="Point"||zi==="MultiPoint")un(ln,Qr,Me,Ke,xt);else if(zi==="LineString")Sr(ln,Qr,Me,Ke,xt,!1,ii.lineMetrics);else if(zi==="MultiLineString")Wr(ln,Qr,Me,Ke,xt,!1);else if(zi==="Polygon")Wr(ln,Qr,Me,Ke,xt,!0);else if(zi==="MultiPolygon")for(let jo of ln){let Yr=[];Wr(jo,Yr,Me,Ke,xt,!0),Yr.length&&Qr.push(Yr)}if(Qr.length){if(ii.lineMetrics&&zi==="LineString"){for(let jo of Qr)Ft.push(ti(oi.id,zi,jo,oi.tags));continue}zi!=="LineString"&&zi!=="MultiLineString"||(Qr.length===1?(zi="LineString",Qr=Qr[0]):zi="MultiLineString"),zi!=="Point"&&zi!=="MultiPoint"||(zi=Qr.length===3?"Point":"MultiPoint"),Ft.push(ti(oi.id,zi,Qr,oi.tags))}}return Ft.length?Ft:null}function un(At,Ce,Me,Ke,xt){for(let mt=0;mt=Me&&pt<=Ke&&qr(Ce,At[mt],At[mt+1],At[mt+2])}}function Sr(At,Ce,Me,Ke,xt,mt,pt){let ii=lo(At),Ft=xt===0?Eo:os,oi,ln,zi=At.start;for(let Yr=0;YrMe&&(ln=Ft(ii,Fo,js,Sc,Gc,Me),pt&&(ii.start=zi+oi*ln)):md>Ke?Ns=Me&&(ln=Ft(ii,Fo,js,Sc,Gc,Me),Za=!0),Ns>Ke&&md<=Ke&&(ln=Ft(ii,Fo,js,Sc,Gc,Ke),Za=!0),!mt&&Za&&(pt&&(ii.end=zi+oi*ln),Ce.push(ii),ii=lo(At)),pt&&(zi+=oi)}let Jn=At.length-3,Pr=At[Jn],Qr=At[Jn+1],jo=xt===0?Pr:Qr;jo>=Me&&jo<=Ke&&qr(ii,Pr,Qr,At[Jn+2]),Jn=ii.length-3,mt&&Jn>=3&&(ii[Jn]!==ii[0]||ii[Jn+1]!==ii[1])&&qr(ii,ii[0],ii[1],ii[2]),ii.length&&Ce.push(ii)}function lo(At){let Ce=[];return Ce.size=At.size,Ce.start=At.start,Ce.end=At.end,Ce}function Wr(At,Ce,Me,Ke,xt,mt){for(let pt of At)Sr(pt,Ce,Me,Ke,xt,mt,!1)}function qr(At,Ce,Me,Ke){At.push(Ce,Me,Ke)}function Eo(At,Ce,Me,Ke,xt,mt){let pt=(mt-Ce)/(Ke-Ce);return qr(At,mt,Me+(xt-Me)*pt,1),pt}function os(At,Ce,Me,Ke,xt,mt){let pt=(mt-Me)/(xt-Me);return qr(At,Ce+(Ke-Ce)*pt,mt,1),pt}function vl(At,Ce){let Me=[];for(let Ke=0;Ke0&&Ce.size<(xt?pt:Ke))return void(Me.numPoints+=Ce.length/3);let ii=[];for(let Ft=0;Ftpt)&&(Me.numSimplified++,ii.push(Ce[Ft],Ce[Ft+1])),Me.numPoints++;xt&&(function(Ft,oi){let ln=0;for(let zi=0,Jn=Ft.length,Pr=Jn-2;zi0===oi)for(let zi=0,Jn=Ft.length;zi24)throw new Error("maxZoom should be in the 0-24 range");if(Me.promoteId&&Me.generateId)throw new Error("promoteId and generateId cannot be used together.");let xt=(function(mt,pt){let ii=[];if(mt.type==="FeatureCollection")for(let Ft=0;Ft1&&console.time("creation"),Pr=this.tiles[Jn]=xc(Ce,Me,Ke,xt,oi),this.tileCoords.push({z:Me,x:Ke,y:xt}),ln)){ln>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Me,Ke,xt,Pr.numFeatures,Pr.numPoints,Pr.numSimplified),console.timeEnd("creation"));let Za=`z${Me}`;this.stats[Za]=(this.stats[Za]||0)+1,this.total++}if(Pr.source=Ce,mt==null){if(Me===oi.indexMaxZoom||Pr.numPoints<=oi.indexMaxPoints)continue}else{if(Me===oi.maxZoom||Me===mt)continue;if(mt!=null){let Za=mt-Me;if(Ke!==pt>>Za||xt!==ii>>Za)continue}}if(Pr.source=null,Ce.length===0)continue;ln>1&&console.time("clipping");let Qr=.5*oi.buffer/oi.extent,jo=.5-Qr,Yr=.5+Qr,Fo=1+Qr,js=null,Ko=null,Sc=null,Gc=null,md=Ki(Ce,zi,Ke-Qr,Ke+Yr,0,Pr.minX,Pr.maxX,oi),Ns=Ki(Ce,zi,Ke+jo,Ke+Fo,0,Pr.minX,Pr.maxX,oi);Ce=null,md&&(js=Ki(md,zi,xt-Qr,xt+Yr,1,Pr.minY,Pr.maxY,oi),Ko=Ki(md,zi,xt+jo,xt+Fo,1,Pr.minY,Pr.maxY,oi),md=null),Ns&&(Sc=Ki(Ns,zi,xt-Qr,xt+Yr,1,Pr.minY,Pr.maxY,oi),Gc=Ki(Ns,zi,xt+jo,xt+Fo,1,Pr.minY,Pr.maxY,oi),Ns=null),ln>1&&console.timeEnd("clipping"),Ft.push(js||[],Me+1,2*Ke,2*xt),Ft.push(Ko||[],Me+1,2*Ke,2*xt+1),Ft.push(Sc||[],Me+1,2*Ke+1,2*xt),Ft.push(Gc||[],Me+1,2*Ke+1,2*xt+1)}}getTile(Ce,Me,Ke){Ce=+Ce,Me=+Me,Ke=+Ke;let xt=this.options,{extent:mt,debug:pt}=xt;if(Ce<0||Ce>24)return null;let ii=1<1&&console.log("drilling down to z%d-%d-%d",Ce,Me,Ke);let oi,ln=Ce,zi=Me,Jn=Ke;for(;!oi&&ln>0;)ln--,zi>>=1,Jn>>=1,oi=this.tiles[Ao(ln,zi,Jn)];return oi&&oi.source?(pt>1&&(console.log("found parent tile z%d-%d-%d",ln,zi,Jn),console.time("drilling down")),this.splitTile(oi.source,ln,zi,Jn,Ce,Me,Ke),pt>1&&console.timeEnd("drilling down"),this.tiles[Ft]?Dd(this.tiles[Ft],mt):null):null}}function Ao(At,Ce,Me){return 32*((1<oi.tags&&"3d_elevation_id"in oi.tags&&"source"in oi.tags&&oi.tags.source==="elevation",mt=Ke.features.filter(oi=>xt(oi)),pt={_geojsonTileLayer:Ke.features};mt.length>0&&(pt={_geojsonTileLayer:Ke.features.filter(oi=>!xt(oi)),hd_road_elevation:mt});let ii=new Ie(pt),Ft=(function(oi){let ln=new o.bt;for(let zi of Object.keys(oi))ln.writeMessage(3,Et,{name:zi,features:oi[zi]});return ln.finish()})(pt).buffer;Ce(null,{vectorTile:ii,rawData:Ft})}class yi extends z{constructor(Ce,Me,Ke,xt,mt,pt,ii){super(Ce,Me,Ke,xt,mt,ga,ii),pt&&(this.loadGeoJSON=pt),this._dynamicIndex=new Re}loadData(Ce,Me){let Ke=Ce&&Ce.request,xt=Ke&&Ke.collectResourceTiming;this._geoJSONIndex=null,this.loadGeoJSON(Ce,(mt,pt)=>{if(mt||!pt)return Me(mt);if(typeof pt!="object")return Me(new Error(`Input data given to '${Ce.source}' is not a valid GeoJSON object.`));{try{if(Ce.filter){let Ft=o.U(Ce.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ft.result==="error")throw new Error(Ft.value.map(oi=>`${oi.key}: ${oi.message}`).join(", "));pt.features=pt.features.filter(oi=>Ft.value.evaluate({zoom:0},oi))}Ce.dynamic?(pt.type==="Feature"&&(pt={type:"FeatureCollection",features:[pt]}),Ce.append||(this._dynamicIndex.clear(),this.loaded={}),this._dynamicIndex.load(pt.features,this.loaded),Ce.cluster&&(pt.features=this._dynamicIndex.getFeatures())):this.loaded={},this._geoJSONIndex=Ce.cluster?new yn((function({superclusterOptions:Ft,clusterProperties:oi}){if(!oi||!Ft)return Ft;let ln={},zi={},Jn={accumulated:null,zoom:0},Pr={properties:null},Qr=Object.keys(oi);for(let jo of Qr){let[Yr,Fo]=oi[jo],js=o.U(Fo),Ko=o.U(typeof Yr=="string"?[Yr,["accumulated"],["get",jo]]:Yr);ln[jo]=js.value,zi[jo]=Ko.value}return Ft.map=jo=>{Pr.properties=jo;let Yr={};for(let Fo of Qr)Yr[Fo]=ln[Fo].evaluate(Jn,Pr);return Yr},Ft.reduce=(jo,Yr)=>{Pr.properties=Yr;for(let Fo of Qr)Jn.accumulated=jo[Fo],jo[Fo]=zi[Fo].evaluate(Jn,Pr)},Ft})(Ce)).load(pt.features):Ce.dynamic?this._dynamicIndex:(function(Ft,oi){return new wr(Ft,oi)})(pt,Ce.geojsonVtOptions)}catch(Ft){return Me(Ft)}let ii={};if(xt){let Ft=a(Ke);Ft&&(ii.resourceTiming={},ii.resourceTiming[Ce.source]=JSON.parse(JSON.stringify(Ft)))}Me(null,ii)}})}reloadTile(Ce,Me){let Ke=this.loaded;return Ke&&Ke[Ce.uid]?Ce.partial?Me(null,void 0):super.reloadTile(Ce,Me):this.loadTile(Ce,Me)}loadGeoJSON(Ce,Me){if(Ce.request)o.m(Ce.request,Me);else{if(typeof Ce.data!="string")return Me(new Error(`Input data given to '${Ce.source}' is not a valid GeoJSON object.`));setTimeout(()=>{try{return Me(null,JSON.parse(Ce.data))}catch{return Me(new Error(`Input data given to '${Ce.source}' is not a valid GeoJSON object.`))}},0)}}getClusterExpansionZoom(Ce,Me){try{Me(null,this._geoJSONIndex.getClusterExpansionZoom(Ce.clusterId))}catch(Ke){Me(Ke)}}getClusterChildren(Ce,Me){try{Me(null,this._geoJSONIndex.getChildren(Ce.clusterId))}catch(Ke){Me(Ke)}}getClusterLeaves(Ce,Me){try{Me(null,this._geoJSONIndex.getLeaves(Ce.clusterId,Ce.limit,Ce.offset))}catch(Ke){Me(Ke)}}}class as{constructor(Ce,Me,Ke){this.tileID=new o.aO(Ce.tileID.overscaledZ,Ce.tileID.wrap,Ce.tileID.canonical.z,Ce.tileID.canonical.x,Ce.tileID.canonical.y),this.tileZoom=Ce.tileZoom,this.uid=Ce.uid,this.zoom=Ce.zoom,this.canonical=Ce.tileID.canonical,this.pixelRatio=Ce.pixelRatio,this.tileSize=Ce.tileSize,this.source=Ce.source,this.overscaling=this.tileID.overscaleFactor(),this.projection=Ce.projection,this.brightness=Me,this.worldview=Ke}parse(Ce,Me,Ke,xt){this.status="parsing";let mt=new o.aO(Ke.tileID.overscaledZ,Ke.tileID.wrap,Ke.tileID.canonical.z,Ke.tileID.canonical.x,Ke.tileID.canonical.y),pt=[],ii=Me.familiesBySource[Ke.source],Ft=new o.fe(mt,Ke.promoteId);Ft.bucketLayerIDs=[],Ft.is3DTile=!0,o.ft(Ce).then(oi=>{if(!oi)return xt(new Error("Could not parse tile"));let ln=oi.json.extensionsUsed&&oi.json.extensionsUsed.includes("MAPBOX_mesh_features")||oi.json.asset.extras&&oi.json.asset.extras.MAPBOX_mesh_features,zi=oi.json.extensionsUsed&&oi.json.extensionsUsed.includes("EXT_meshopt_compression"),Jn=new o.ac(this.zoom,{brightness:this.brightness,worldview:this.worldview});for(let Pr in ii)for(let Qr of ii[Pr]){let jo=Qr[0];Ft.bucketLayerIDs.push(Qr.map(js=>o.B(js.id,js.scope))),jo.recalculate(Jn,[]);let Yr=o.fu(oi,1/o.d6(Ke.tileID.canonical)),Fo=new o.fv(Qr,Yr,mt,ln,zi,this.brightness,Ft,this.worldview);ln||(Fo.needsUpload=!0),pt.push(Fo),Fo.evaluate(jo)}this.status="done",xt(null,{buckets:pt,featureIndex:Ft,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:null})}).catch(oi=>xt(new Error(oi.message)))}}class Nc{constructor(Ce,Me,Ke,xt,mt,pt,ii,Ft){this.actor=Ce,this.layerIndex=Me,this.availableImages=Ke,this.availableModels=xt,this.brightness=ii,this.loading={},this.loaded={},this.worldview=Ft}loadTile(Ce,Me){let Ke=Ce.uid,xt=this.loading[Ke]=new as(Ce,this.brightness,this.worldview);o.bu(Ce.request,(mt,pt)=>{let ii=!this.loading[Ke];return delete this.loading[Ke],ii||mt?(xt.status="done",ii||(this.loaded[Ke]=xt),Me(mt)):pt&&pt.byteLength!==0?void xt.parse(pt,this.layerIndex,Ce,(Ft,oi)=>{xt.status="done",this.loaded=this.loaded||{},this.loaded[Ke]=xt,Ft||!oi?Me(Ft):Me(null,oi)}):(xt.status="done",this.loaded[Ke]=xt,Me())})}reloadTile(Ce,Me){let Ke=this.loaded,xt=Ce.uid;if(Ke&&Ke[xt]){let mt=Ke[xt];mt.projection=Ce.projection,mt.brightness=Ce.brightness;let pt=(ii,Ft)=>{mt.reloadCallback&&(delete mt.reloadCallback,this.loadTile(Ce,Me)),Me(ii,Ft)};mt.status==="parsing"?mt.reloadCallback=pt:mt.status==="done"&&this.loadTile(Ce,Me)}}abortTile(Ce,Me){let Ke=Ce.uid;this.loading[Ke]&&delete this.loading[Ke],Me()}removeTile(Ce,Me){let Ke=this.loaded,xt=Ce.uid;Ke&&Ke[xt]&&delete Ke[xt],Me()}}class xu{constructor(Ce){this.self=Ce,this.actor=new o.fx(Ce,this),this.layerIndexes={},this.availableImages={},this.availableModels={},this.isSpriteLoaded={},this.imageRasterizer=new o.x,this.rtlPluginParsingListeners=[],this.projections={},this.defaultProjection=o.cl({name:"mercator"}),this.workerSourceTypes={vector:z,geojson:yi,"raster-dem":H,"raster-array":K,"batched-model":Nc},this.workerSources={},this.self.registerWorkerSource=(Me,Ke)=>{if(this.workerSourceTypes[Me])throw new Error(`Worker source with name "${Me}" already registered.`);this.workerSourceTypes[Me]=Ke},this.self.registerRTLTextPlugin=Me=>{if(o.fy.isParsed())throw new Error("RTL text plugin already registered.");o.fy.setState({pluginStatus:o.fz.parsed,pluginURL:o.fy.getPluginURL()}),o.fy.applyArabicShaping=Me.applyArabicShaping,o.fy.processBidirectionalText=Me.processBidirectionalText,o.fy.processStyledBidirectionalText=Me.processStyledBidirectionalText;for(let Ke of this.rtlPluginParsingListeners)Ke(null,!0);this.rtlPluginParsingListeners=[]}}clearCaches(Ce,Me,Ke){delete this.layerIndexes[Ce],delete this.availableImages[Ce],delete this.availableModels[Ce],delete this.workerSources[Ce],Ke()}checkIfReady(Ce,Me,Ke){Ke()}setReferrer(Ce,Me){this.referrer=Me}spriteLoaded(Ce,Me){this.isSpriteLoaded[Ce]||(this.isSpriteLoaded[Ce]={});let{scope:Ke,isLoaded:xt}=Me;if(this.isSpriteLoaded[Ce][Ke]=xt,this.workerSources[Ce]&&this.workerSources[Ce][Ke])for(let mt in this.workerSources[Ce][Ke]){let pt=this.workerSources[Ce][Ke][mt];for(let ii in pt){let Ft=pt[ii];Ft instanceof z&&(Ft.isSpriteLoaded=xt,Ft.fire(new o.z("isSpriteLoaded")))}}}setImages(Ce,Me,Ke){this.availableImages[Ce]||(this.availableImages[Ce]={});let{scope:xt,images:mt}=Me;if(this.availableImages[Ce][xt]=mt,this.workerSources[Ce]&&this.workerSources[Ce][xt]){for(let pt in this.workerSources[Ce][xt]){let ii=this.workerSources[Ce][xt][pt];for(let Ft in ii)ii[Ft].availableImages=mt}Ke()}else Ke()}setModels(Ce,{scope:Me,models:Ke},xt){if(this.availableModels[Ce]||(this.availableModels[Ce]={}),this.availableModels[Ce][Me]=Ke,this.workerSources[Ce]&&this.workerSources[Ce][Me]){for(let mt in this.workerSources[Ce][Me]){let pt=this.workerSources[Ce][Me][mt];for(let ii in pt)pt[ii].availableModels=Ke}xt()}else xt()}setProjection(Ce,Me){this.projections[Ce]=o.cl(Me)}setBrightness(Ce,Me,Ke){this.brightness=Me,Ke()}setWorldview(Ce,Me,Ke){this.worldview=Me,Ke()}setLayers(Ce,Me,Ke){this.getLayerIndex(Ce,Me.scope).replace(Me.layers,Me.options),Ke()}updateLayers(Ce,Me,Ke){this.getLayerIndex(Ce,Me.scope).update(Me.layers,Me.removedIds,Me.options),Ke()}loadTile(Ce,Me,Ke){Me.projection=this.projections[Ce]||this.defaultProjection,this.getWorkerSource(Ce,Me.type,Me.source,Me.scope).loadTile(Me,Ke)}decodeRasterArray(Ce,Me,Ke){this.getWorkerSource(Ce,Me.type,Me.source,Me.scope).decodeRasterArray(Me,Ke)}reloadTile(Ce,Me,Ke){Me.projection=this.projections[Ce]||this.defaultProjection,this.getWorkerSource(Ce,Me.type,Me.source,Me.scope).reloadTile(Me,Ke)}abortTile(Ce,Me,Ke){this.getWorkerSource(Ce,Me.type,Me.source,Me.scope).abortTile(Me,Ke)}removeTile(Ce,Me,Ke){this.getWorkerSource(Ce,Me.type,Me.source,Me.scope).removeTile(Me,Ke)}removeSource(Ce,Me,Ke){if(!(this.workerSources[Ce]&&this.workerSources[Ce][Me.scope]&&this.workerSources[Ce][Me.scope][Me.type]&&this.workerSources[Ce][Me.scope][Me.type][Me.source]))return;let xt=this.workerSources[Ce][Me.scope][Me.type][Me.source];delete this.workerSources[Ce][Me.scope][Me.type][Me.source],xt.removeSource!==void 0?xt.removeSource(Me,Ke):Ke()}loadWorkerSource(Ce,Me,Ke){try{this.self.importScripts(Me.url),Ke()}catch(xt){Ke(xt.toString())}}syncRTLPluginState(Ce,Me,Ke){if(o.fy.isParsed())Ke(null,!0);else if(o.fy.isParsing())this.rtlPluginParsingListeners.push(Ke);else try{o.fy.setState(Me);let xt=o.fy.getPluginURL();!o.fy.isLoaded()||o.fy.isParsed()||o.fy.isParsing()||xt==null||(o.fy.setState({pluginStatus:o.fz.parsing,pluginURL:o.fy.getPluginURL()}),this.self.importScripts(xt),o.fy.isParsed()?Ke(null,!0):this.rtlPluginParsingListeners.push(Ke))}catch(xt){Ke(xt.toString())}}setDracoUrl(Ce,Me){this.dracoUrl=Me}getAvailableImages(Ce,Me){this.availableImages[Ce]||(this.availableImages[Ce]={});let Ke=this.availableImages[Ce][Me];return Ke||(Ke=[]),Ke}getAvailableModels(Ce,Me){this.availableModels[Ce]||(this.availableModels[Ce]={});let Ke=this.availableModels[Ce][Me];return Ke||(Ke={}),Ke}getLayerIndex(Ce,Me){this.layerIndexes[Ce]||(this.layerIndexes[Ce]={});let Ke=this.layerIndexes[Ce][Me];return Ke||(Ke=this.layerIndexes[Ce][Me]=new g,Ke.scope=Me),Ke}getWorkerSource(Ce,Me,Ke,xt){let mt=this.workerSources;return mt[Ce]||(mt[Ce]={}),mt[Ce][xt]||(mt[Ce][xt]={}),mt[Ce][xt][Me]||(mt[Ce][xt][Me]={}),this.isSpriteLoaded[Ce]||(this.isSpriteLoaded[Ce]={}),mt[Ce][xt][Me][Ke]||(mt[Ce][xt][Me][Ke]=new this.workerSourceTypes[Me]({send:(pt,ii,Ft,oi,ln,zi)=>this.actor.send(pt,ii,Ft,Ce,ln,zi),scheduler:this.actor.scheduler},this.getLayerIndex(Ce,xt),this.getAvailableImages(Ce,xt),this.getAvailableModels(Ce,xt),this.isSpriteLoaded[Ce][xt],void 0,this.brightness,this.worldview)),mt[Ce][xt][Me][Ke]}rasterizeImagesWorker(Ce,Me,Ke){let xt=new Map;for(let[mt,{image:pt,imageVariant:ii}]of Me.tasks.entries()){let Ft=this.imageRasterizer.rasterize(ii,pt,Me.scope,Ce);xt.set(mt,Ft)}Ke(void 0,xt)}removeRasterizedImages(Ce,Me,Ke){this.imageRasterizer.removeImagesFromCacheByIds(Me.imageIds,Me.scope,Ce),Ke()}enforceCacheSizeLimit(Ce,Me){o.fA(Me)}getWorkerPerformanceMetrics(Ce,Me,Ke){Ke(void 0,void 0)}}return o.fw(self)&&(self.worker=new xu(self)),xu}),n(["./shared"],function(o){var a="3.15.0";let c={create:"create",load:"load",fullLoad:"fullLoad"},m={mark(y){performance.mark(y)},measure(y,l,p){performance.measure(y,l,p)}};function g(y){let l=y.name.split("?")[0];return o.a(l)&&l.includes("mapbox-gl.js")?"javascript":o.a(l)&&l.includes("mapbox-gl.css")?"css":o.b(l)?"fontRange":o.c(l)?"sprite":o.i(l)?"style":o.d(l)?"tilejson":"other"}var C,w={},P=(function(){if(C)return w;function y(_){return!l(_)}function l(_){return typeof window>"u"||typeof document>"u"?"not a browser":(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var S,A,N=new Blob([""],{type:"text/javascript"}),V=URL.createObjectURL(N);try{A=new Worker(V),S=!0}catch{S=!1}return A&&A.terminate(),URL.revokeObjectURL(V),S})()?(function(){var S=document.createElement("canvas");S.width=S.height=1;var A=S.getContext("2d");if(!A)return!1;var N=A.getImageData(0,0,1,1);return N&&N.width===S.width})()?(p[x=_&&_.failIfMajorPerformanceCaveat]===void 0&&(p[x]=(function(S){var A,N=(function(V){var $=document.createElement("canvas"),Y=Object.create(y.webGLContextAttributes);return Y.failIfMajorPerformanceCaveat=V,$.getContext("webgl2",Y)})(S);if(!N)return!1;try{A=N.createShader(N.VERTEX_SHADER)}catch{return!1}return!(!A||N.isContextLost())&&(N.shaderSource(A,"void main() {}"),N.compileShader(A),N.getShaderParameter(A,N.COMPILE_STATUS)===!0)})(x)),p[x]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL2 support"):"insufficient Canvas/getImageData support":"insufficient worker support";var x}C=1,w.supported=y,w.notSupportedReason=l;var p={};return y.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0},w})();function R(y,l,p){let _=document.createElement(y);return l!=null&&(_.className=l),p&&p.appendChild(_),_}function z(y,l,p){let _=document.createElementNS("http://www.w3.org/2000/svg",y);for(let x of Object.keys(l))_.setAttributeNS(null,x,String(l[x]));return p&&p.appendChild(_),_}let H=typeof document<"u"?document.documentElement&&document.documentElement.style:null,j=H&&H.userSelect!==void 0?"userSelect":"WebkitUserSelect",K;function ne(){H&&j&&(K=H[j],H[j]="none")}function me(){H&&j&&(H[j]=K)}function Te(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",Te,!0)}function Ie(){window.addEventListener("click",Te,!0),window.setTimeout(()=>{window.removeEventListener("click",Te,!0)},0)}function ye(y,l){let p=y.getBoundingClientRect();return Ae(y,p,l)}function fe(y,l){let p=y.getBoundingClientRect(),_=[];for(let x=0;xthis._skuTokenExpiresAt}transformRequest(l,p){return this._transformRequestFn&&this._transformRequestFn(l,p)||{url:l}}normalizeStyleURL(l,p){if(!o.h(l))return l;let _=rt(l);return _.params.push(`sdk=js-${a}`),_.path=`/styles/v1${_.path}`,this._makeAPIURL(_,this._customAccessToken||p)}normalizeGlyphsURL(l,p){if(!o.h(l))return l;let _=rt(l);return _.path=`/fonts/v1${_.path}`,this._makeAPIURL(_,this._customAccessToken||p)}normalizeModelURL(l,p){if(!o.h(l))return l;let _=rt(l);return _.path=`/models/v1${_.path}`,this._makeAPIURL(_,this._customAccessToken||p)}normalizeSourceURL(l,p,_,x){if(!o.h(l))return l;let S=rt(l);return S.path=`/v4/${S.authority}.json`,S.params.push("secure"),_&&S.params.push(`language=${_}`),x&&S.params.push(`worldview=${x}`),this._makeAPIURL(S,this._customAccessToken||p)}normalizeIconsetURL(l,p){let _=rt(l);return o.h(l)?(_.path=`/styles/v1${_.path}/iconset.pbf`,this._makeAPIURL(_,this._customAccessToken||p)):Ze(_)}normalizeSpriteURL(l,p,_,x){let S=rt(l);return o.h(l)?(S.path=`/styles/v1${S.path}/sprite${p}${_}`,this._makeAPIURL(S,this._customAccessToken||x)):(S.path+=`${p}${_}`,Ze(S))}normalizeTileURL(l,p,_){if(this._isSkuTokenExpired()&&this._createSkuToken(),l&&!o.h(l))return l;let x=rt(l);x.path=x.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${p||_&&x.authority!=="raster"&&_===512?"@2x":""}${o.k.supported?".webp":"$1"}`),x.authority==="raster"?x.path=`/${o.e.RASTER_URL_PREFIX}${x.path}`:x.authority==="rasterarrays"?x.path=`/${o.e.RASTERARRAYS_URL_PREFIX}${x.path}`:x.authority==="3dtiles"?x.path=`/${o.e.TILES3D_URL_PREFIX}${x.path}`:(x.path=x.path.replace(/^.+\/v4\//,"/"),x.path=`/${o.e.TILE_URL_VERSION}${x.path}`);let S=this._customAccessToken||(function(A){for(let N of A){let V=N.match(/^access_token=(.*)$/);if(V)return V[1]}return null})(x.params)||o.e.ACCESS_TOKEN;return o.e.REQUIRE_ACCESS_TOKEN&&S&&this._skuToken&&x.params.push(`sku=${this._skuToken}`),this._makeAPIURL(x,S)}canonicalizeTileURL(l,p){let _=rt(l);if(!_.path.match(/^(\/v4\/|\/(raster|rasterarrays)\/v1\/)/)||!_.path.match(/\.[\w]+$/))return l;let x="mapbox://";_.path.match(/^\/raster\/v1\//)?x+=`raster/${_.path.replace(`/${o.e.RASTER_URL_PREFIX}/`,"")}`:_.path.match(/^\/rasterarrays\/v1\//)?x+=`rasterarrays/${_.path.replace(`/${o.e.RASTERARRAYS_URL_PREFIX}/`,"")}`:x+=`tiles/${_.path.replace(`/${o.e.TILE_URL_VERSION}/`,"")}`;let S=_.params;return p&&(S=S.filter(A=>!A.match(/^access_token=/))),S.length&&(x+=`?${S.join("&")}`),x}canonicalizeTileset(l,p){let _=!!p&&o.h(p),x=[];for(let S of l.tiles||[])o.j(S)?x.push(this.canonicalizeTileURL(S,_)):x.push(S);return x}_makeAPIURL(l,p){let _="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",x=rt(o.e.API_URL);if(l.protocol=x.protocol,l.authority=x.authority,l.protocol==="http"){let S=l.params.indexOf("secure");S>=0&&l.params.splice(S,1)}if(x.path!=="/"&&(l.path=`${x.path}${l.path}`),!o.e.REQUIRE_ACCESS_TOKEN)return Ze(l);if(p=p||o.e.ACCESS_TOKEN,!this._silenceAuthErrors){if(!p)throw new Error(`An API access token is required to use Mapbox GL. ${_}`);if(p[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${_}`)}return l.params=l.params.filter(S=>S.indexOf("access_token")===-1),l.params.push(`access_token=${p||""}`),Ze(l)}}let Rt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function rt(y){let l=y.match(Rt);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 Ze(y){let l=y.params.length?`?${y.params.join("&")}`:"";return`${y.protocol}://${y.authority}${y.path}${l}`}let Et="mapbox.eventData";function We(y){if(!y)return null;let l=y.split(".");if(!l||l.length!==3)return null;try{return JSON.parse(o.l(l[1]))}catch{return null}}class bt{constructor(l){this.type=l,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(l){let p=We(o.e.ACCESS_TOKEN),_="";return _=p&&p.u?o.f(p.u):o.e.ACCESS_TOKEN||"",l?`${Et}.${l}:${_}`:`${Et}:${_}`}fetchEventData(){let l=o.s("localStorage"),p=this.getStorageKey(),_=this.getStorageKey("uuid");if(l)try{let x=localStorage.getItem(p);x&&(this.eventData=JSON.parse(x));let S=localStorage.getItem(_);S&&(this.anonId=S)}catch{o.w("Unable to read from LocalStorage")}}saveEventData(){let l=o.s("localStorage"),p=this.getStorageKey(),_=this.getStorageKey("uuid"),x=this.anonId;if(l&&x)try{localStorage.setItem(_,x),Object.keys(this.eventData).length>=1&&localStorage.setItem(p,JSON.stringify(this.eventData))}catch{o.w("Unable to write to LocalStorage")}}processRequests(l){}postEvent(l,p,_,x){if(!o.e.EVENTS_URL)return;let S=rt(o.e.EVENTS_URL);S.params.push(`access_token=${x||o.e.ACCESS_TOKEN||""}`);let A={event:this.type,created:new Date(l).toISOString()},N=p?Object.assign(A,p):A,V={url:Ze(S),headers:{"Content-Type":"text/plain"},body:JSON.stringify([N])};this.pendingRequest=o.p(V,$=>{this.pendingRequest=null,_($),this.saveEventData(),this.processRequests(x)})}queueRequest(l,p){this.queue.push(l),this.processRequests(p)}}let st=new class extends bt{constructor(y){super("appUserTurnstile"),this._customAccessToken=y}postTurnstileEvent(y,l){o.e.EVENTS_URL&&o.e.ACCESS_TOKEN&&Array.isArray(y)&&y.some(p=>o.h(p)||o.j(p))&&this.queueRequest(Date.now(),l)}processRequests(y){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();let l=We(o.e.ACCESS_TOKEN),p=l?l.u:o.e.ACCESS_TOKEN,_=p!==this.eventData.tokenU;o.v(this.anonId)||(this.anonId=o.u(),_=!0);let x=this.queue.shift();if(this.eventData.lastSuccess){let S=new Date(this.eventData.lastSuccess),A=new Date(x),N=(x-this.eventData.lastSuccess)/864e5;_=_||N>=1||N<-1||S.getDate()!==A.getDate()}else _=!0;_?this.postEvent(x,{sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:ke,"enabled.telemetry":!1,userId:this.anonId},S=>{S||(this.eventData.lastSuccess=x,this.eventData.tokenU=p)},y):this.processRequests()}},kt=st.postTurnstileEvent.bind(st),pi=new class extends bt{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(y,l,p,_){this.skuToken=l,this.errorCb=_,o.e.EVENTS_URL&&(p||o.e.ACCESS_TOKEN?this.queueRequest({id:y,timestamp:Date.now()},p):this.errorCb(new Error(Qe)))}processRequests(y){if(this.pendingRequest||this.queue.length===0)return;let{id:l,timestamp:p}=this.queue.shift();l&&this.success[l]||(this.anonId||this.fetchEventData(),o.v(this.anonId)||(this.anonId=o.u()),this.postEvent(p,{sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:ke,skuToken:this.skuToken,userId:this.anonId},_=>{_?this.errorCb(_):l&&(this.success[l]=!0)},y))}remove(){this.errorCb=null}},Kt=pi.postMapLoadEvent.bind(pi),gt=new class extends bt{constructor(){super("style.load"),this.eventIdPerMapInstanceMap=new Map,this.mapInstanceIdMap=new WeakMap}getMapInstanceId(y){let l=this.mapInstanceIdMap.get(y);return l||(l=o.u(),this.mapInstanceIdMap.set(y,l)),l}getEventId(y){let l=this.eventIdPerMapInstanceMap.get(y)||0;return this.eventIdPerMapInstanceMap.set(y,l+1),l}postStyleLoadEvent(y,l){let{map:p,style:_,importedStyles:x}=l;if(!o.e.EVENTS_URL||!y&&!o.e.ACCESS_TOKEN)return;let S=this.getMapInstanceId(p),A={mapInstanceId:S,eventId:this.getEventId(S),style:_};x.length&&(A.importedStyles=x),this.queueRequest({timestamp:Date.now(),payload:A},y)}processRequests(y){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,payload:p}=this.queue.shift();this.postEvent(l,p,()=>{},y)}},ht=gt.postStyleLoadEvent.bind(gt),li=new class extends bt{constructor(){super("gljs.performance")}postPerformanceEvent(y,l){o.e.EVENTS_URL&&(y||o.e.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:l},y)}processRequests(y){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,performanceData:p}=this.queue.shift(),_=(function(x){let S=performance.getEntriesByType("resource"),A=performance.getEntriesByType("mark"),N=(function(oe){let ce={};if(oe){for(let de in oe)if(de!=="other")for(let Ee of oe[de]){let ge=`${de}ResolveRangeMin`,Oe=`${de}ResolveRangeMax`,Be=`${de}RequestCount`,He=`${de}RequestCachedCount`;ce[ge]=Math.min(ce[ge]||1/0,Ee.startTime),ce[Oe]=Math.max(ce[Oe]||-1/0,Ee.responseEnd);let nt=et=>{ce[et]===void 0&&(ce[et]=0),++ce[et]};Ee.transferSize!==void 0&&Ee.transferSize===0&&nt(He),nt(Be)}}return ce})((function(oe,ce){let de={};if(oe)for(let Ee of oe){let ge=ce(Ee);de[ge]===void 0&&(de[ge]=[]),de[ge].push(Ee)}return de})(S,g)),V=window.devicePixelRatio,$=navigator.connection||navigator.mozConnection||navigator.webkitConnection,Y=$?$.effectiveType:void 0,J={counters:[],metadata:[],attributes:[]},W=(oe,ce,de)=>{de!=null&&oe.push({name:ce,value:de.toString()})};for(let oe in N)W(J.counters,oe,N[oe]);if(x.interactionRange[0]!==1/0&&x.interactionRange[1]!==-1/0&&(W(J.counters,"interactionRangeMin",x.interactionRange[0]),W(J.counters,"interactionRangeMax",x.interactionRange[1])),A)for(let oe of Object.keys(c)){let ce=c[oe],de=A.find(Ee=>Ee.name===ce);de&&W(J.counters,ce,de.startTime)}return W(J.counters,"visibilityHidden",x.visibilityHidden),W(J.attributes,"style",(function(oe){if(oe)for(let ce of oe){let de=ce.name.split("?")[0];if(o.i(de)){let Ee=de.split("/").slice(-2);if(Ee.length===2)return`mapbox://styles/${Ee[0]}/${Ee[1]}`}}})(S)),W(J.attributes,"terrainEnabled",x.terrainEnabled?"true":"false"),W(J.attributes,"fogEnabled",x.fogEnabled?"true":"false"),W(J.attributes,"projection",x.projection),W(J.attributes,"zoom",x.zoom),W(J.metadata,"devicePixelRatio",V),W(J.metadata,"connectionEffectiveType",Y),W(J.metadata,"navigatorUserAgent",navigator.userAgent),W(J.metadata,"screenWidth",window.screen.width),W(J.metadata,"screenHeight",window.screen.height),W(J.metadata,"windowWidth",window.innerWidth),W(J.metadata,"windowHeight",window.innerHeight),W(J.metadata,"mapWidth",x.width/V),W(J.metadata,"mapHeight",x.height/V),W(J.metadata,"webglRenderer",x.renderer),W(J.metadata,"webglVendor",x.vendor),W(J.metadata,"sdkVersion",a),W(J.metadata,"sdkIdentifier","mapbox-gl-js"),J})(p);for(let x of _.metadata);for(let x of _.counters);for(let x of _.attributes);this.postEvent(l,_,()=>{},y)}},ui=li.postPerformanceEvent.bind(li),Bi=new class extends bt{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(y,l,p,_){if(!o.e.API_URL||!o.e.SESSION_PATH)return;let x=rt(o.e.API_URL+o.e.SESSION_PATH);x.params.push(`sku=${l||""}`),x.params.push(`access_token=${_||o.e.ACCESS_TOKEN||""}`);let S={url:Ze(x),headers:{"Content-Type":"text/plain"}};this.pendingRequest=o.g(S,A=>{this.pendingRequest=null,p(A),this.saveEventData(),this.processRequests(_)})}getSessionAPI(y,l,p,_){this.skuToken=l,this.errorCb=_,o.e.SESSION_PATH&&o.e.API_URL&&(p||o.e.ACCESS_TOKEN?this.queueRequest({id:y,timestamp:Date.now()},p):this.errorCb(new Error(Qe)))}processRequests(y){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,_=>{_?this.errorCb(_):l&&(this.success[l]=!0)},y)}remove(){this.errorCb=null}},wn=Bi.getSessionAPI.bind(Bi),yn=new Set;function Xn(y,l){l?yn.add(y):yn.delete(y)}class Rr{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(o.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 De(y){let{userImage:l}=y;return!!(l&&l.render&&l.render())&&(y.data.replace(new Uint8Array(l.data.buffer)),!0)}class bi extends o.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"&&o.r()&&(this.imageRasterizerDispatcher=new o.D(o.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 o.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 _ of p.values())_.hasPendingRequests()&&l.push(_);return l}get imageRasterizer(){return this._imageRasterizer||(this._imageRasterizer=new o.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:_,callback:x}of this.requestors)this._notify(_,p,x);this.requestors=[]}}hasImage(l,p){return!!this.getImage(l,p)}getImage(l,p){return this.images.get(p).get(l.toString())}addImage(l,p,_){this._validate(l,_)&&this.images.get(p).set(l.toString(),_)}_validate(l,p){let _=!0;return this._validateStretch(p.stretchX,p.data&&p.data.width)||(this.fire(new o.y(new Error(`Image "${l.name}" has invalid "stretchX" value`))),_=!1),this._validateStretch(p.stretchY,p.data&&p.data.height)||(this.fire(new o.y(new Error(`Image "${l.name}" has invalid "stretchY" value`))),_=!1),this._validateContent(p.content,p)||(this.fire(new o.y(new Error(`Image "${l.name}" has invalid "content" value`))),_=!1),_}_validateStretch(l,p){if(!l)return!0;let _=0;for(let x of l){if(x[0]<_||x[1]o.I.from(p))}getImages(l,p,_){let x=[],S=[],A=this.imageProviders.get(p);for(let Y of l){if(!Y.iconsetId){x.push(Y);continue}let J=A.get(Y.iconsetId);J&&(this.getImage(Y,p)?S.push(Y):J.addPendingRequest(Y))}if(x.length===0)return void this._notify(S,p,_);let N=!0,V=!!this.loaded.get(p),$=this.images.get(p);if(!V)for(let Y of x)$.has(Y.toString())||(N=!1);V||N?this._notify(x,p,_):this.requestors.push({ids:x,scope:p,callback:_})}rasterizeImages(l,p){let _=new Map,{tasks:x,scope:S}=l;for(let[A,N]of x.entries()){let V=this.getImage(N.id,S);V&&_.set(A,{image:V,imageVariant:N})}this._rasterizeImages(S,_,p)}_rasterizeImages(l,p,_){if(o.r())this.imageRasterizerDispatcher.getActor().send("rasterizeImagesWorker",{tasks:p,scope:l},_);else{let x=new Map;for(let[S,{image:A,imageVariant:N}]of p.entries())x.set(S,this.imageRasterizer.rasterize(N,A,l,0));_(void 0,x)}}getUpdatedImages(l){return this.updatedImages.get(l)||new Set}_notify(l,p,_){let x=this.images.get(p),S=new Map;for(let A of l){if(!x.get(A.toString())){if(A.iconsetId)continue;this.fire(new o.z("styleimagemissing",{id:A.name}))}let N=x.get(A.toString());if(!N){o.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 V={data:N.usvg?null:N.data.clone(),pixelRatio:N.pixelRatio,sdf:N.sdf,usvg:N.usvg,version:N.version,stretchX:N.stretchX,stretchY:N.stretchY,content:N.content,hasRenderCallback:!!(N.userImage&&N.userImage.render)};N.usvg&&Object.assign(V,{width:N.icon.usvg_tree.width,height:N.icon.usvg_tree.height}),S.set(o.I.toString(A),V)}_(null,S)}getPixelSize(l){let{width:p,height:_}=this.atlasImage.get(l);return{width:p,height:_}}getPattern(l,p,_){let x=l.toString(),S=this.patterns.get(p),A=S.get(x),N=this.getImage(l,p);if(!N)return null;if(A){if(A.position.version===N.version)return A.position;A.position.version=N.version}else{if(N.usvg&&!N.data){let V=this.getPatternInFlightId(x,p);if(this.patternsInFlight.has(V))return null;this.patternsInFlight.add(V);let $=new o.A(l).scaleSelf(o.o.devicePixelRatio),Y=new Map([[$.toString(),{image:N,imageVariant:$}]]);return this._rasterizeImages(p,Y,(J,W)=>this.storePatternImage($,p,N,_,W)),null}this.storePattern(l,p,N)}return this._updatePatternAtlas(p,_),S.get(x).position}getPatternInFlightId(l,p){return o.B(l,p)}hasPatternsInFlight(){return this.patternsInFlight.size!==0}storePatternImage(l,p,_,x,S){let A=l.toString(),N=S?S.get(A):void 0;N&&(_.data=N,this.storePattern(l.id,p,_),this._updatePatternAtlas(p,x),this.patternsInFlight.delete(this.getPatternInFlightId(l.id.toString(),p)))}storePattern(l,p,_){let x={w:_.data.width+2*o.C,h:_.data.height+2*o.C,x:0,y:0},S=new o.F(x,_,o.C);this.patterns.get(p).set(l.toString(),{bin:x,position:S})}destroyAtlasTextures(){for(let l of this.atlasTexture.values())l&&l.destroy();this.atlasTexture.clear()}bind(l,p){let _=l.gl,x=this.atlasTexture.get(p);x?this.dirty&&(x.update(this.atlasImage.get(p)),this.dirty=!1):(x=new o.T(l,this.atlasImage.get(p),_.RGBA8),this.atlasTexture.set(p,x)),x.bind(_.LINEAR,_.CLAMP_TO_EDGE)}_updatePatternAtlas(l,p){let _=this.patterns.get(l),x=Array.from(_.values()).map(({bin:$})=>$),{w:S,h:A}=o.G(x),N=this.atlasImage.get(l);N.resize({width:S||1,height:A||1});let V=this.images.get(l);for(let[$,{bin:Y,position:J}]of _.entries()){let W=J.padding,oe=Y.x+W,ce=Y.y+W,de=V.get($).data,Ee=de.width,ge=de.height;W=W>1?W-1:W,o.q.copy(de,N,{x:0,y:0},{x:oe,y:ce},{width:Ee,height:ge},p),o.q.copy(de,N,{x:0,y:ge-W},{x:oe,y:ce-W},{width:Ee,height:W},p),o.q.copy(de,N,{x:0,y:0},{x:oe,y:ce+ge},{width:Ee,height:W},p),o.q.copy(de,N,{x:Ee-W,y:0},{x:oe-W,y:ce},{width:W,height:ge},p),o.q.copy(de,N,{x:0,y:0},{x:oe+Ee,y:ce},{width:W,height:ge},p),o.q.copy(de,N,{x:Ee-W,y:ge-W},{x:oe-W,y:ce-W},{width:W,height:W},p),o.q.copy(de,N,{x:0,y:ge-W},{x:oe+Ee,y:ce-W},{width:W,height:W},p),o.q.copy(de,N,{x:0,y:0},{x:oe+Ee,y:ce+ge},{width:W,height:W},p),o.q.copy(de,N,{x:Ee-W,y:0},{x:oe-W,y:ce+ge},{width:W,height:W},p)}this.dirty=!0}beginFrame(){for(let l of this.images.keys())this.callbackDispatchedThisFrame.set(l,new Set)}dispatchRenderCallbacks(l,p){let _=this.images.get(p);for(let x of l){if(this.callbackDispatchedThisFrame.get(p).has(x.toString()))continue;this.callbackDispatchedThisFrame.get(p).add(x.toString());let S=_.get(x.toString());De(S)&&this.updateImage(x,p,S)}}destroy(){this.imageRasterizerDispatcher&&this.imageRasterizerDispatcher.remove()}}function Ci(y){let l=y.value,p=y.valueSpec,_=y.style,x=y.styleSpec,S=y.key,A=y.arrayElementValidator||Na;if(!Array.isArray(l))return[new o.V(S,l,`array expected, ${o.K(l)} found`)];if(p.length&&l.length!==p.length)return[new o.V(S,l,`array length ${p.length} expected, length ${l.length} found`)];if(p["min-length"]&&l.lengthx)return[new o.V(l,p,`${p} is greater than the maximum value ${x}`)]}return[]}function wt(y){let l=y.key,p=y.value;if(!o.H(p))return[new o.V(l,p,`object expected, ${o.K(p)} found`)];let _=y.valueSpec,x=o.J(p.type),S,A,N,V={},$=x!=="categorical"&&p.property===void 0,Y=!$,J=(function(de){let Ee=de.stops;return Array.isArray(Ee)&&Array.isArray(Ee[0])&&o.H(Ee[0][0])})(p),W=xc({key:y.key,value:y.value,valueSpec:y.styleSpec.function,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{stops:function(de){if(x==="identity")return[new o.V(de.key,de.value,'identity function may not have a "stops" property')];let Ee=[],ge=de.value;return Ee=Ee.concat(Ci({key:de.key,value:ge,valueSpec:de.valueSpec,style:de.style,styleSpec:de.styleSpec,arrayElementValidator:oe})),Array.isArray(ge)&&ge.length===0&&Ee.push(new o.V(de.key,ge,"array must have at least one stop")),Ee},default:function(de){return Na({key:de.key,value:de.value,valueSpec:_,style:de.style,styleSpec:de.styleSpec})}}});return x==="identity"&&$&&W.push(new o.V(y.key,y.value,'missing required property "property"')),x==="identity"||p.stops||W.push(new o.V(y.key,y.value,'missing required property "stops"')),x==="exponential"&&_.expression&&!o.M(_)&&W.push(new o.V(y.key,y.value,"exponential functions not supported")),y.styleSpec.$version>=8&&(Y&&!o.N(_)?W.push(new o.V(y.key,y.value,"property functions not supported")):$&&!o.O(_)&&W.push(new o.V(y.key,y.value,"zoom functions not supported"))),x!=="categorical"&&!J||p.property!==void 0||W.push(new o.V(y.key,y.value,'"property" property is required')),W;function oe(de){let Ee=[],ge=de.value,Oe=de.key;if(!Array.isArray(ge))return[new o.V(Oe,ge,`array expected, ${o.K(ge)} found`)];if(ge.length!==2)return[new o.V(Oe,ge,`array length 2 expected, length ${ge.length} found`)];if(J){if(!o.H(ge[0]))return[new o.V(Oe,ge,`object expected, ${o.K(ge[0])} found`)];let Be=ge[0];if(Be.zoom===void 0)return[new o.V(Oe,ge,"object stop key must have zoom")];if(Be.value===void 0)return[new o.V(Oe,ge,"object stop key must have value")];let He=o.J(Be.zoom);if(typeof He!="number")return[new o.V(Oe,Be.zoom,"stop zoom values must be numbers")];if(N&&N>He)return[new o.V(Oe,Be.zoom,"stop zoom values must appear in ascending order")];He!==N&&(N=He,A=void 0,V={}),Ee=Ee.concat(xc({key:`${Oe}[0]`,value:ge[0],valueSpec:{zoom:{}},style:de.style,styleSpec:de.styleSpec,objectElementValidators:{zoom:Mt,value:ce}}))}else Ee=Ee.concat(ce({key:`${Oe}[0]`,value:ge[0],style:de.style,styleSpec:de.styleSpec},ge));return o.Q(o.S(ge[1]))?Ee.concat([new o.V(`${Oe}[1]`,ge[1],"expressions are not allowed in function stops.")]):Ee.concat(Na({key:`${Oe}[1]`,value:ge[1],valueSpec:_,style:de.style,styleSpec:de.styleSpec}))}function ce(de,Ee){let ge=o.K(de.value),Oe=o.J(de.value),Be=de.value!==null?de.value:Ee;if(S){if(ge!==S)return[new o.V(de.key,Be,`${ge} stop domain type must match previous stop domain type ${S}`)]}else S=ge;if(ge!=="number"&&ge!=="string"&&ge!=="boolean"&&typeof Oe!="number"&&typeof Oe!="string"&&typeof Oe!="boolean")return[new o.V(de.key,Be,"stop domain value must be a number, string, or boolean")];if(ge!=="number"&&x!=="categorical"){let He=`number expected, ${ge} found`;return o.N(_)&&x===void 0&&(He+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new o.V(de.key,Be,He)]}return x!=="categorical"||ge!=="number"||typeof Oe=="number"&&isFinite(Oe)&&Math.floor(Oe)===Oe?x!=="categorical"&&ge==="number"&&typeof Oe=="number"&&typeof A=="number"&&A!==void 0&&Oenew o.V(`${y.key}${_.key}`,y.value,_.message));let p=l.value.expression||l.value._styleExpression.expression;if(y.expressionContext==="property"&&y.propertyKey==="text-font"&&!p.outputDefined())return[new o.V(y.key,y.value,`Invalid data expression for "${y.propertyKey}". Output values must be contained as literals within the expression.`)];if(y.expressionContext==="property"&&y.propertyType==="layout"&&!o.Z(p))return[new o.V(y.key,y.value,'"feature-state" data expressions are not supported with layout properties.')];if(y.expressionContext==="filter")return Ut(p,y);if(y.expressionContext==="appearance")return vi(p,y);if(y.expressionContext&&y.expressionContext.indexOf("cluster")===0){if(!o.X(p,["zoom","feature-state"]))return[new o.V(y.key,y.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(y.expressionContext==="cluster-initial"&&!o.Y(p))return[new o.V(y.key,y.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ut(y,l){let p=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(l.valueSpec&&l.valueSpec.expression)for(let x of l.valueSpec.expression.parameters)p.delete(x);if(p.size===0)return[];let _=[];return y instanceof o._&&p.has(y.name)?[new o.V(l.key,l.value,`["${y.name}"] expression is not supported in a filter for a ${l.object.type} layer with id: ${l.object.id}`)]:(y.eachChild(x=>{_.push(...Ut(x,l))}),_)}function vi(y,l){let p=new Set;if(l.valueSpec&&l.valueSpec.expression)for(let x of l.valueSpec.expression.parameters)p.add(x);if(p.size===0)return[];let _=[];return y instanceof o._&&!p.has(y.name)?[new o.V(l.key,l.value,`["${y.name}"] is not an allowed parameter`)]:(y.eachChild(x=>{_.push(...vi(x,l))}),_)}function Xt(y){let l=y.key,p=y.value,_=y.valueSpec,x=[];return Array.isArray(_.values)?_.values.indexOf(o.J(p))===-1&&x.push(new o.V(l,p,`expected one of [${_.values.join(", ")}], ${JSON.stringify(p)} found`)):Object.keys(_.values).indexOf(o.J(p))===-1&&x.push(new o.V(l,p,`expected one of [${Object.keys(_.values).join(", ")}], ${JSON.stringify(p)} found`)),x}function $i(y){return o.a2(o.S(y.value))?ti(Object.assign({},y,{expressionContext:"filter",valueSpec:y.styleSpec[`filter_${y.layerType||"fill"}`]})):Bt(y)}function Bt(y){let l=y.value,p=y.key;if(!Array.isArray(l))return[new o.V(p,l,`array expected, ${o.K(l)} found`)];if(l.length<1)return[new o.V(p,l,"filter array must have at least 1 element")];let _=y.styleSpec,x=Xt({key:`${p}[0]`,value:l[0],valueSpec:_.filter_operator});switch(o.J(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&o.J(l[1])==="$type"&&x.push(new o.V(p,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&x.push(new o.V(p,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(o.a0(l[1])||x.push(new o.V(`${p}[1]`,l[1],`string expected, ${o.K(l[1])} found`)));for(let S=2;S{$ in p&&l.push(new o.V(_,p[$],`"${$}" is prohibited for ref layers`))}),x.layers.forEach($=>{o.J($.id)===N&&(V=$)}),V?V.ref?l.push(new o.V(_,p.ref,"ref cannot reference another ref layer")):A=o.J(V.type):typeof N=="string"&&l.push(new o.V(_,p.ref,`ref layer "${N}" not found`))}else if(A!=="background"&&A!=="sky"&&A!=="slot")if(p.source)if(o.a0(p.source)){let V=x.sources&&x.sources[p.source],$=V&&o.J(V.type);V?$==="vector"&&A==="raster"?l.push(new o.V(_,p.source,`layer "${p.id}" requires a raster source`)):$==="raster"&&A!=="raster"?l.push(new o.V(_,p.source,`layer "${p.id}" requires a vector source`)):$!=="vector"||p["source-layer"]?$==="raster-dem"&&A!=="hillshade"?l.push(new o.V(_,p.source,"raster-dem source can only be used with layer type 'hillshade'.")):$!=="raster-array"||["raster","raster-particle"].includes(A)?A==="line"&&p.paint&&(p.paint["line-gradient"]||p.paint["line-trim-offset"])&&$==="geojson"&&!V.lineMetrics?l.push(new o.V(_,p,`layer "${p.id}" specifies a line-gradient, which requires the GeoJSON source to have \`lineMetrics\` enabled.`)):A==="raster-particle"&&$!=="raster-array"&&l.push(new o.V(_,p.source,`layer "${p.id}" requires a 'raster-array' source.`)):l.push(new o.V(_,p.source,"raster-array source can only be used with layer type 'raster'.")):l.push(new o.V(_,p,`layer "${p.id}" must specify a "source-layer"`)):l.push(new o.V(_,p.source,`source "${p.source}" not found`))}else l.push(new o.V(`${_}.source`,p.source,'"source" must be a string'));else l.push(new o.V(_,p,'missing required property "source"'));return l=l.concat(xc({key:_,value:p,valueSpec:S.layer,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Na({key:`${_}.type`,value:p.type,valueSpec:S.layer.type,style:y.style,styleSpec:y.styleSpec,object:p,objectKey:"type"}),filter:V=>$i(Object.assign({layerType:A},V)),layout:V=>xc({layer:p,key:V.key,value:V.value,valueSpec:{},style:V.style,styleSpec:V.styleSpec,objectElementValidators:{"*":$=>Ki(Object.assign({layerType:A},$))}}),paint:V=>xc({layer:p,key:V.key,value:V.value,valueSpec:{},style:V.style,styleSpec:V.styleSpec,objectElementValidators:{"*":$=>Ti(Object.assign({layerType:A,layer:p},$))}}),appearances(V){let $=Ci({key:V.key,value:V.value,valueSpec:V.valueSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:W=>(function(oe){let{key:ce,layer:de,layerType:Ee}=oe,ge=o.J(oe.value),Oe=o.J(ge.name),Be=o.J(ge.condition),He=xc({key:ce,value:ge,valueSpec:oe.styleSpec.appearance,style:oe.style,styleSpec:oe.styleSpec,objectElementValidators:{condition:nt=>(function(et){let at=[];return at.push(...ti({key:et.key,value:et.object.condition,valueSpec:o.a6.appearance.condition,expressionContext:"appearance"})),at})(Object.assign({layer:de,layerType:Ee},nt)),properties:nt=>(function(et){let at=[],{styleSpec:tt,layer:Xe,layerType:it}=et,Wt=tt[`paint_${it}`],Nt=tt[`layout_${it}`],mi=et.object[et.objectKey];for(let jt in mi){let ci=jt in Wt?"paint":jt in Nt?"layout":void 0;if(!ci){at.push(new o.V(et.key,jt,`unknown property "${jt}" for layer type "${it}"`));continue}let cn=Object.assign({},et,{key:`${et.key}.${jt}`,object:mi,objectKey:jt,layer:Xe,layerType:it,value:mi[jt],valueSpec:ci==="paint"?Wt[jt]:Nt[jt]});at.push(...Qt(cn,ci))}return at})(Object.assign({layer:de,layerType:Ee},nt))}});return Oe==="hidden"||Be||He.push(new o.V(oe.key,"name",'Appearance with name different than "hidden" must have a condition')),He})(Object.assign({layerType:A,layer:p},W))}),Y=Array.isArray(V.value)?V.value:[],J=new Set;return Y.forEach((W,oe)=>{let ce=o.J(W.name);if(ce)if(J.has(ce)){let de=o.J(p.id);$.push(new o.V(V.key,ce,`Duplicated appearance name "${ce}" for layer "${de}"`))}else J.add(ce)}),$}}})),l}function Sr({key:y,value:l}){return o.a0(l)?[]:[new o.V(y,l,`string expected, ${o.K(l)} found`)]}let lo={promoteId:function y({key:l,value:p}){if(o.a0(p))return Sr({key:l,value:p});if(Array.isArray(p)){let x=[],S=o.S(p),A=o.U(S);return A.result==="error"&&A.value.forEach(N=>{x.push(new o.V(`${l}${N.key}`,null,`${N.message}`))}),o.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"])||x.push(new o.V(`${l}`,null,"promoteId expression should be only feature dependent")),x}if(!o.H(p))return[new o.V(l,p,`string, expression or object expected, "${o.K(p)}" found`)];let _=[];for(let x in p)_.push(...y({key:`${l}.${x}`,value:p[x]}));return _}};function Wr(y){let l=y.value,p=y.key,_=y.styleSpec,x=y.style;if(!o.H(l))return[new o.V(p,l,`object expected, ${o.K(l)} found`)];if(!("type"in l))return[new o.V(p,l,'"type" is required')];let S=o.J(l.type),A=[];switch(["vector","raster","raster-dem","raster-array"].includes(S)&&("url"in l||"tiles"in l||A.push(new o.a3(p,l,'Either "url" or "tiles" is required.'))),S){case"vector":case"raster":case"raster-dem":case"raster-array":return A=A.concat(xc({key:p,value:l,valueSpec:_[`source_${S.replace("-","_")}`],style:y.style,styleSpec:_,objectElementValidators:lo})),A;case"geojson":if(A=xc({key:p,value:l,valueSpec:_.source_geojson,style:x,styleSpec:_,objectElementValidators:lo}),"cluster"in l&&"clusterProperties"in l){if(!o.H(l.clusterProperties))return[new o.V(`${p}.clusterProperties`,l,`object expected, ${o.K(l)} found`)];for(let N in l.clusterProperties){let V=l.clusterProperties[N];if(!Array.isArray(V))return[new o.V(`${p}.clusterProperties.${N}`,V,"array expected")];let[$,Y]=V,J=typeof $=="string"?[$,["accumulated"],["get",N]]:$;A.push(...ti({key:`${p}.${N}.map`,value:Y,expressionContext:"cluster-map"})),A.push(...ti({key:`${p}.${N}.reduce`,value:J,expressionContext:"cluster-reduce"}))}}return A;case"video":return xc({key:p,value:l,valueSpec:_.source_video,style:x,styleSpec:_});case"image":return xc({key:p,value:l,valueSpec:_.source_image,style:x,styleSpec:_});case"canvas":return[new o.V(p,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Xt({key:`${p}.type`,value:l.type,valueSpec:{values:qr(_)}})}}function qr(y){return y.source.reduce((l,p)=>{let _=y[p];return _.type.type==="enum"&&(l=l.concat(Object.keys(_.type.values))),l},[])}function Eo(y){let l=y.value,p=y.styleSpec,_=p.light,x=y.style;if(l===void 0)return[];if(!o.H(l))return[new o.V("light",l,`object expected, ${o.K(l)} found`)];let S=[];for(let A in l){let N=A.match(/^(.*)-transition$/),V=A.match(/^(.*)-use-theme$/);S=S.concat(V&&_[V[1]]?Na({key:A,value:l[A],valueSpec:{type:"string"},style:x,styleSpec:p}):N&&_[N[1]]&&_[N[1]].transition?Na({key:A,value:l[A],valueSpec:p.transition,style:x,styleSpec:p}):_[A]?Na({key:A,value:l[A],valueSpec:_[A],style:x,styleSpec:p}):[new o.V(A,l[A],`unknown property "${A}"`)])}return S}function os(y){let l=y.value;if(!l)return[];let p=y.key;if(!o.H(l))return[new o.V(p,l,`object expected, ${o.K(l)} found`)];let _=[],x=y.styleSpec,S=x["light-3d"],A=y.style,N=y.style.lights;for(let Y of["type","id"])if(!(Y in l))return _=_.concat([new o.V(p,l,`missing property "${Y}"`)]),_;if(!o.a0(l.type))return _=_.concat([new o.V(`${p}.type`,l.type,"string expected")]),_;if(N)for(let Y=0;Y[],array:Ci,boolean:function(y){let l=y.value,p=y.key;return o.$(l)?[]:[new o.V(p,l,`boolean expected, ${o.K(l)} found`)]},number:Mt,color:function({key:y,value:l}){return o.a0(l)?o.a1.parseCSSColor(l)===null?[new o.V(y,l,`color expected, "${l}" found`)]:[]:[new o.V(y,l,`color expected, ${o.K(l)} found`)]},enum:Xt,filter:$i,function:wt,layer:un,object:xc,source:Wr,model:o.a7,light:Eo,"light-3d":os,terrain:vl,fog:jl,string:Sr,formatted:function(y){return Sr(y).length===0?[]:ti(y)},resolvedImage:function(y){return Sr(y).length===0?[]:ti(y)},projection:function(y){let l=y.value,p=y.styleSpec,_=p.projection,x=y.style;if(o.H(l)){let S=[];for(let A in l)S=S.concat(Na({key:A,value:l[A],valueSpec:_[A],style:x,styleSpec:p}));return S}return o.a0(l)?[]:[new o.V("projection",l,`object or string expected, ${o.K(l)} found`)]},import:function(y){let l=y.key,{value:p,styleSpec:_}=y;if(!o.H(p))return[new o.V(l,p,"import must be an object")];let N=p,{data:x}=N,S=O_(N,["data"]);Object.defineProperty(S,"__line__",{value:p.__line__,enumerable:!1});let A=xc(Object.assign({},y,{value:S,valueSpec:_.import}));return o.J(S.id)===""&&A.push(new o.V(`${y.key}.id`,S,"import id can't be an empty string")),x&&(A=A.concat(Hi(x,_,{key:`${y.key}.data`}))),A},iconset:function(y){let l=y.value,p=y.key,_=y.styleSpec,x=y.style;if(!o.H(l))return[new o.V(p,l,"object expected")];if(!l.type)return[new o.V(p,l,'"type" is required')];let S=o.J(l.type),A=[];if(A=A.concat(xc({key:p,value:l,valueSpec:_[`iconset_${S}`],style:x,styleSpec:_})),(function(N,V){return!(N!=="source"||!V.source)})(S,l)){let N=x.sources&&x.sources[l.source],V=N&&o.J(N.type);N?V!=="raster-array"&&A.push(new o.V(p,l.source,`iconset cannot be used with a source of type ${String(V)}, it only be used with a "raster-array" source type`)):A.push(new o.V(p,l.source,`source "${l.source}" not found`))}return A}};function Na(y,l=!1){let p=y.value,_=y.valueSpec,x=y.styleSpec;if(_.expression){if(o.a4(o.J(p)))return wt(y);if(o.Q(o.S(p)))return ti(y)}if(_.type&&Dd[_.type]){let S=Dd[_.type](y);return l===!0&&S.length>0&&Array.isArray(y.value)?ti(y):S}return xc(Object.assign({},y,{valueSpec:_.type?x[_.type]:_}))}function xc(y){let l=y.key,p=y.value,_=y.valueSpec||{},x=y.objectElementValidators||{},S=y.style,A=y.styleSpec;if(!o.H(p))return[new o.V(l,p,`object expected, ${o.K(p)} found`)];let N=[];for(let V in p){let $=V.split(".")[0],Y;x[$]?Y=x[$]:_[$]?Y=Na:x["*"]?Y=x["*"]:_["*"]&&(Y=Na),Y?N=N.concat(Y({key:(l&&`${l}.`)+V,value:p[V],valueSpec:_[$]||_["*"],style:S,styleSpec:A,object:p,objectKey:V},p)):N.push(new o.a3(l,p[V],`unknown property "${V}"`))}for(let V in _)x[V]||_[V].required&&_[V].default===void 0&&p[V]===void 0&&N.push(new o.V(l,p,`missing required property "${V}"`));return N}function gg({key:y,value:l}){let p=Sr({key:y,value:l});if(p.length)return p;let _=l;return _.indexOf("{fontstack}")===-1&&p.push(new o.V(y,l,'"glyphs" url must include a "{fontstack}" token')),_.indexOf("{range}")===-1&&p.push(new o.V(y,l,'"glyphs" url must include a "{range}" token')),p}function Hi(y,l=o.a6,p={}){return xc({key:p.key||"",value:y,valueSpec:Object.assign(l.$root,{"*":{type:"*"}}),styleSpec:l,style:y,objectElementValidators:{glyphs:gg}})}function Cn(y,l=o.a6){return mt(Hi(y,l))}let wr=y=>mt(Wr(y)),Ao=y=>mt(Eo(y)),ga=y=>mt(os(y)),yi=y=>mt(vl(y)),as=y=>mt(jl(y)),Nc=y=>mt((function(l){let p=l.value,_=l.style,x=l.styleSpec,S=x.snow;if(p===void 0)return[];if(!o.H(p))return[new o.V("snow",p,`object expected, ${o.K(p)} found`)];let A=[];for(let N in p){let V=N.match(/^(.*)-transition$/);A=A.concat(V&&S[V[1]]&&S[V[1]].transition?Na({key:N,value:p[N],valueSpec:x.transition,style:_,styleSpec:x}):S[N]?Na({key:N,value:p[N],valueSpec:S[N],style:_,styleSpec:x}):[new o.a3(N,p[N],`unknown property "${N}"`)])}return A})(y)),xu=y=>mt((function(l){let p=l.value,_=l.style,x=l.styleSpec,S=x.rain;if(p===void 0)return[];if(!o.H(p))return[new o.V("rain",p,`object expected, ${o.K(p)} found`)];let A=[];for(let N in p){let V=N.match(/^(.*)-transition$/);A=A.concat(V&&S[V[1]]&&S[V[1]].transition?Na({key:N,value:p[N],valueSpec:x.transition,style:_,styleSpec:x}):S[N]?Na({key:N,value:p[N],valueSpec:S[N],style:_,styleSpec:x}):[new o.a3(N,p[N],`unknown property "${N}"`)])}return A})(y)),At=y=>mt(un(y)),Ce=y=>mt($i(y)),Me=y=>mt(Ti(y)),Ke=y=>mt(Ki(y)),xt=y=>mt(o.a7(y));function mt(y){return y.slice().sort((l,p)=>l.line&&p.line?l.line-p.line:0)}function pt(y,l){let p=!1;if(l&&l.length)for(let _ of l)_ instanceof o.a3?o.w(_.message):(y.fire(new o.y(new Error(_.message))),p=!0);return p}let ii;class Ft extends o.E{constructor(l,p="flat"){super(),this._transitionable=new o.a8(ii||(ii=new o.a9({anchor:new o.aa(o.a6.light.anchor),position:new o.ab(o.a6.light.position),color:new o.aa(o.a6.light.color),intensity:new o.aa(o.a6.light.intensity)}))),this.setLight(l,p),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,p,_={}){this._validate(Ao,l,_)||(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,_){return(!_||_.validate!==!1)&&pt(this,l.call(Cn,Object.assign({value:p,style:{glyphs:!0,sprite:!0},styleSpec:o.a6})))}}let oi=class extends o.E{constructor(y,l,p,_,x){super(),this.scope=p,this._transitionable=new o.a8(new o.a9({source:new o.aa(o.a6.terrain.source),exaggeration:new o.aa(o.a6.terrain.exaggeration)}),p,_),this._transitionable.setTransitionOrValue(y,_),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=l,this.worldview=x}get(){return this._transitionable.serialize()}set(y,l){this._transitionable.setTransitionOrValue(y,l)}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}getExaggeration(y){return this._transitioning.possiblyEvaluate(new o.ac(y,{worldview:this.worldview})).get("exaggeration")}getAttenuationRange(){if(!this.isZoomDependent())return null;let y=this._transitionable._values.exaggeration;if(!y)return null;let l=y.value.expression;if(!l)return null;let p=-1,_=-1,x=1;for(let S of l.zoomStops)x=l.evaluate(new o.ac(S,{worldview:this.worldview})),x>.01?(p=S,_=-1):_=S;return x<.01&&p>0&&_>p?[p,_]:null}isZoomDependent(){let y=this._transitionable._values.exaggeration;return y!=null&&y.value!=null&&y.value.expression!=null&&y.value.expression instanceof o.ad}},ln=45,zi=65,Jn=.05;function Pr(y,l,p,_){let x=o.ah(ln,zi,p),[S,A]=Qr(y,_),N=1-Math.min(1,Math.exp((l-S)/(A-S)*-6));return N*=N*N,N=Math.min(1,1.00747*N),N*x*y.alpha}function Qr(y,l){let p=.5/Math.tan(.5*l);return[y.range[0]+p,y.range[1]+p]}function jo(y,l,p,_,x){let S=o.af([],[l,p,_],x.mercatorFogMatrix);return Pr(y,o.ag(S),x.pitch,x._fov)}function Yr(y,l,p,_,x,S,A){let N=[[p,_,0],[x,_,0],[x,S,0],[p,S,0]],V=Number.MAX_VALUE,$=-Number.MAX_VALUE;for(let Y of N){let J=o.af([],Y,l),W=o.ag(J);V=Math.min(V,W),$=Math.max($,W)}return[Pr(y,V,A.pitch,A._fov),Pr(y,$,A.pitch,A._fov)]}class Fo extends o.E{constructor(l,p,_,x){super();let S=new o.a9({range:new o.aa(o.a6.fog.range),color:new o.aa(o.a6.fog.color),"color-use-theme":new o.aa({type:"string","property-type":"data-constant",default:"default"}),"high-color":new o.aa(o.a6.fog["high-color"]),"high-color-use-theme":new o.aa({type:"string","property-type":"data-constant",default:"default"}),"space-color":new o.aa(o.a6.fog["space-color"]),"space-color-use-theme":new o.aa({type:"string","property-type":"data-constant",default:"default"}),"horizon-blend":new o.aa(o.a6.fog["horizon-blend"]),"star-intensity":new o.aa(o.a6.fog["star-intensity"]),"vertical-range":new o.aa(o.a6.fog["vertical-range"])});this._transitionable=new o.a8(S,_,new Map(x)),this.set(l,x),this._transitioning=this._transitionable.untransitioned(),this._transform=p,this.properties=new o.ai(S),this.scope=_}get state(){let l=this._transform,p=l.projection.name==="globe",_=o.aj(l.zoom),x=this.properties.get("range"),S=[.5,3];return{range:p?[o.ak(S[0],x[0],_),o.ak(S[1],x[1],_)]:x,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(l,p,_={}){if(this._validate(as,l,_))return;let x=Object.assign({},l);for(let S of Object.keys(o.a6.fog))x[S]===void 0&&(x[S]=o.a6.fog[S].default);this._options=x,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:o.ah(ln,zi,l))*p.a}getOpacityAtLatLng(l,p){return this._transform.projection.supportsFog?(function(_,x,S){let A=o.ae.fromLngLat(x),N=S.elevation?S.elevation.getAtPointOrZero(A):0;return jo(_,A.x,A.y,N,S)})(this.state,l,p):0}getOpacityForTile(l){if(!this._transform.projection.supportsFog)return[1,1];let p=this._transform.calculateFogTileMatrix(l.toUnwrapped());return Yr(this.state,p,0,0,o.al,o.al,this._transform)}getOpacityForBounds(l,p,_,x,S){return this._transform.projection.supportsFog?Yr(this.state,l,p,_,x,S,this._transform):[1,1]}getFovAdjustedRange(l){return this._transform.projection.supportsFog?Qr(this.state,l):[0,1]}isVisibleOnFrustum(l){if(!this._transform.projection.supportsFog)return!1;let p=[4,5,6,7];for(let _ of p){let x=l.points[_],S;if(x[2]>=0)S=x;else{let A=l.points[_-4];S=o.am(A,x,A[2]/(A[2]-x[2]))}if(jo(this.state,S[0],S[1],0,this._transform)>=Jn)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,_){return(!_||_.validate!==!1)&&pt(this,l.call(Cn,Object.assign({value:p,style:{glyphs:!0,sprite:!0},styleSpec:o.a6})))}}let js,Ko,Sc,Gc,md=class extends o.E{constructor(y,l,p,_){super();let x=js||(js=new o.a9({density:new o.aa(o.a6.snow.density),intensity:new o.aa(o.a6.snow.intensity),color:new o.aa(o.a6.snow.color),opacity:new o.aa(o.a6.snow.opacity),vignette:new o.aa(o.a6.snow.vignette),"vignette-color":new o.aa(o.a6.snow["vignette-color"]),"center-thinning":new o.aa(o.a6.snow["center-thinning"]),direction:new o.aa(o.a6.snow.direction),"flake-size":new o.aa(o.a6.snow["flake-size"])}));this._transitionable=new o.a8(x,p,new Map(_)),this.set(y,_),this._transitioning=this._transitionable.untransitioned(),this.properties=new o.ai(x),this.scope=p}get state(){let y=this.properties.get("opacity"),l=this.properties.get("color"),p=this.properties.get("direction"),_=o.an(p[0]),x=-Math.max(o.an(p[1]),.01),S=[Math.cos(_)*Math.cos(x),Math.sin(_)*Math.cos(x),Math.sin(x)],A=this.properties.get("vignette"),N=this.properties.get("vignette-color");return N.a=A,{density:this.properties.get("density"),intensity:this.properties.get("intensity"),color:new o.ao(l.r,l.g,l.b,l.a*y),direction:S,centerThinning:this.properties.get("center-thinning"),flakeSize:this.properties.get("flake-size"),vignetteColor:N}}get(){return this._transitionable.serialize()}set(y,l,p={}){if(this._validate(Nc,y,p))return;let _=Object.assign({},y);for(let x of Object.keys(o.a6.snow))_[x]===void 0&&(_[x]=o.a6.snow[x].default);this._options=_,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(y){this._transitionable.setTransitionOrValue(this._options,new Map(y))}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}_validate(y,l,p){return(!p||p.validate!==!1)&&pt(this,y.call(Cn,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:o.a6})))}},Ns=class extends o.E{constructor(y,l,p,_){super();let x=Ko||(Ko=new o.a9({density:new o.aa(o.a6.rain.density),intensity:new o.aa(o.a6.rain.intensity),color:new o.aa(o.a6.rain.color),opacity:new o.aa(o.a6.rain.opacity),vignette:new o.aa(o.a6.rain.vignette),"vignette-color":new o.aa(o.a6.rain["vignette-color"]),"center-thinning":new o.aa(o.a6.rain["center-thinning"]),direction:new o.aa(o.a6.rain.direction),"droplet-size":new o.aa(o.a6.rain["droplet-size"]),"distortion-strength":new o.aa(o.a6.rain["distortion-strength"])}));this._transitionable=new o.a8(x,p,new Map(_)),this.set(y,_),this._transitioning=this._transitionable.untransitioned(),this.properties=new o.ai(x),this.scope=p}get state(){let y=this.properties.get("opacity"),l=this.properties.get("color"),p=this.properties.get("direction"),_=o.an(p[0]),x=-Math.max(o.an(p[1]),.01),S=[Math.cos(_)*Math.cos(x),Math.sin(_)*Math.cos(x),Math.sin(x)],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 o.ao(l.r,l.g,l.b,l.a*y),direction:S,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(y,l,p={}){if(this._validate(xu,y,p))return;let _=Object.assign({},y);for(let x of Object.keys(o.a6.rain))_[x]===void 0&&(_[x]=o.a6.rain[x].default);this._options=_,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(y){this._transitionable.setTransitionOrValue(this._options,new Map(y))}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}_validate(y,l,p){return(!p||p.validate!==!1)&&pt(this,y.call(Cn,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:o.a6})))}};class Za extends o.E{constructor(l,p,_,x){super(),this.scope=_,this._options=l,this.properties=new o.ai(p),this._transitionable=new o.a8(p,_,new Map(x)),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 Kl{constructor(l,p,_){this.screenBounds=l,this.cameraPoint=_.getCameraPoint(),this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=p,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,_)}static createFromScreenPoints(l,p){let _,x;if(l instanceof o.P||typeof l[0]=="number"){let S=o.P.convert(l);_=[S],x=p.isPointAboveHorizon(S)}else{let S=o.P.convert(l[0]),A=o.P.convert(l[1]),N=S.add(A)._div(2);_=[S,A],x=o.aq(S,A).every(V=>p.isPointAboveHorizon(V))&&p.isPointAboveHorizon(N)}return new Kl(_,x,p)}isPointQuery(){return this.screenBounds.length===1}bufferedScreenGeometry(l){return o.aq(this.screenBounds[0],this.screenBounds.length===1?this.screenBounds[0]:this.screenBounds[1],l)}bufferedCameraGeometry(l){let p=this.screenBounds[0],_=this.screenBounds.length===1?this.screenBounds[0].add(new o.P(1,1)):this.screenBounds[1],x=o.aq(p,_,0,!1);return this.cameraPoint.y>_.y&&(this.cameraPoint.x>p.x&&this.cameraPoint.x<_.x?x.splice(3,0,this.cameraPoint):this.cameraPoint.x>=_.x?x[2]=this.cameraPoint:this.cameraPoint.x<=p.x&&(x[3]=this.cameraPoint)),o.ar(x,l)}bufferedCameraGeometryGlobe(l){let p=this.screenBounds[0],_=this.screenBounds.length===1?this.screenBounds[0].add(new o.P(1,1)):this.screenBounds[1],x=o.aq(p,_,l),S=this.cameraPoint.clone();switch(3*((S.y>p.y)+(S.y>_.y))+((S.x>p.x)+(S.x>_.x))){case 0:x[0]=S,x[4]=S.clone();break;case 1:x.splice(1,0,S);break;case 2:x[1]=S;break;case 3:x.splice(4,0,S);break;case 5:x.splice(2,0,S);break;case 6:x[3]=S;break;case 7:x.splice(3,0,S);break;case 8:x[2]=S}return x}containsTile(l,p,_,x=0){let S=l.queryPadding/p._pixelsPerMercatorPixel+1,A=_?this._bufferedCameraMercator(S,p):this._bufferedScreenMercator(S,p),N=l.tileID.wrap+(A.unwrapped?x:0),V=A.polygon.map(Ee=>o.as(l.tileTransform,Ee,N));if(!o.at(V,0,0,o.al,o.al))return;N=l.tileID.wrap+(this.screenGeometryMercator.unwrapped?x:0);let $=this.screenGeometryMercator.polygon.map(Ee=>o.au(l.tileTransform,Ee,N)),Y=$.map(Ee=>new o.P(Ee[0],Ee[1])),J=p.getFreeCameraOptions().position||new o.ae(0,0,0),W=o.au(l.tileTransform,J,N),oe=$.map(Ee=>{let ge=o.av(Ee,Ee,W);return o.aw(ge,ge),new o.ax(W,ge)}),ce=o.ay(l,1,p.zoom)*p._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:Y,tilespaceRays:oe,bufferedTilespaceGeometry:V,bufferedTilespaceBounds:(de=o.az(V),de.min.x=o.aA(de.min.x,0,o.al),de.min.y=o.aA(de.min.y,0,o.al),de.max.x=o.aA(de.max.x,0,o.al),de.max.y=o.aA(de.max.y,0,o.al),de),tile:l,tileID:l.tileID,pixelToTileUnitsFactor:ce};var de}_bufferedScreenMercator(l,p){let _=Uu(l);if(this._screenRaycastCache[_])return this._screenRaycastCache[_];{let x;return x=p.projection.name==="globe"?this._projectAndResample(this.bufferedScreenGeometry(l),p):{polygon:this.bufferedScreenGeometry(l).map(S=>p.pointCoordinate3D(S)),unwrapped:!0},this._screenRaycastCache[_]=x,x}}_bufferedCameraMercator(l,p){let _=Uu(l);if(this._cameraRaycastCache[_])return this._cameraRaycastCache[_];{let x;return x=p.projection.name==="globe"?this._projectAndResample(this.bufferedCameraGeometryGlobe(l),p):{polygon:this.bufferedCameraGeometry(l).map(S=>p.pointCoordinate3D(S)),unwrapped:!0},this._cameraRaycastCache[_]=x,x}}_projectAndResample(l,p){let _=(function(S,A){let N=o.aB([],A.pixelMatrix,A.globeMatrix),V=[0,-o.aD,0,1],$=[0,o.aD,0,1],Y=[0,0,0,1];o.aC(V,V,N),o.aC($,$,N),o.aC(Y,Y,N);let J=new o.P(V[0]/V[3],V[1]/V[3]),W=new o.P($[0]/$[3],$[1]/$[3]),oe=o.aE(S,J)&&V[3]1?Wl(S.slice(0,Ee),A):[],Be=Eenew o.P(sl(at.x),at.y)),Be=Be.map(at=>new o.P(sl(at.x),at.y));let He=[...Oe];He.length===0&&He.push(Be[Be.length-1]);let nt=o.ak(He[He.length-1].y,(Be.length===0?Oe[0]:Be[0]).y,ge),et;return et=oe?[new o.P(0,nt),new o.P(0,0),new o.P(1,0),new o.P(1,nt)]:[new o.P(1,nt),new o.P(1,1),new o.P(0,1),new o.P(0,nt)],He.push(...et),Be.length===0?He.push(Oe[0]):He.push(...Be),{polygon:He.map(at=>new o.ae(at.x,at.y)),unwrapped:!1}})(l,p);if(_)return _;let x=(function(S,A){let N=!1,V=-1/0,$=0;for(let J=0;JV&&(V=S[J].x,$=J);for(let J=0;J.5&&(oe.x{J.x-=1}),{polygon:S,unwrapped:N}})(Wl(l,p).map(S=>new o.P(sl(S.x),S.y)),p);return{polygon:x.polygon.map(S=>new o.ae(S.x,S.y)),unwrapped:x.unwrapped}}}function Wl(y,l){return o.aG(y,p=>{let _=l.pointCoordinate3D(p);p.x=_.x,p.y=_.y},1/256)}function sl(y){return y<0?1+y%1:y%1}function Uu(y){return 100*y|0}function sm(y,l,p,_,x){let S=function(N,V){if(N)return x(N);if(V){if(y.url&&V.tiles&&y.tiles&&delete y.tiles,V.variants){if(!Array.isArray(V.variants))return x(new Error("variants must be an array"));for(let Y of V.variants){if(Y==null||typeof Y!="object"||Y.constructor!==Object)return x(new Error("variant must be an object"));if(!Array.isArray(Y.capabilities))return x(new Error("capabilities must be an array"));if(Y.capabilities.length===1&&Y.capabilities[0]==="meshopt"){V=Object.assign(V,Y);break}}}let $=o.aH(Object.assign({},V,y),["tilejson","tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","extra_bounds","scheme","tileSize","encoding","vector_layers","raster_layers","worldview_options","worldview_default","worldview"]);$.tiles=l.canonicalizeTileset($,y.url),x(null,$)}},A=(function(N,V,$){if(!N)return null;if(!V&&!$)return N;$=$||N.worldview_default;let Y=Object.values(N.language||{});if(Y.length===0)return null;let J=Object.values(N.worldview||{});if(J.length===0)return null;let W=Y.every(ce=>ce===V),oe=J.every(ce=>ce===$);return W&&oe?N:V in(N.language_options||{})||$ in(N.worldview_options||{})?null:N.language_options&&N.worldview_options?N:null})(y.data,p,_);return A?o.o.frame(()=>S(null,A)):y.url?o.m(l.transformRequest(l.normalizeSourceURL(y.url,null,p,_),o.R.Source),S):o.o.frame(()=>{let $=y,{data:N}=$,V=O_($,["data"]);S(null,V)})}function yf(y,l){let p=Math.pow(2,l.z),_=Math.floor(o.aF(y.getWest())*p),x=Math.floor(o.aJ(y.getNorth())*p),S=Math.ceil(o.aF(y.getEast())*p),A=Math.ceil(o.aJ(y.getSouth())*p);return l.x>=_&&l.x=x&&l.ythis.maxzoom||l.z{if(this._tileJSONRequest=null,this._loaded=!0,x)p&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${p}`),_&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${_}`),this.fire(new o.y(x));else if(S){if(Object.assign(this,S),this.hasWorldviews=!!S.worldview_options,S.worldview_default&&(this.worldviewDefault=S.worldview_default),S.vector_layers){this.vectorLayers=S.vector_layers,this.vectorLayerIds=[],this.localizableLayerIds=new Set;for(let A of S.vector_layers)this.vectorLayerIds.push(A.id),S.worldview&&S.worldview[A.source]&&this.localizableLayerIds.add(A.id)}this.tileBounds=Ny.fromTileJSON(S),kt(S.tiles,this.map._requestManager._customAccessToken),this.fire(new o.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.z("data",{dataType:"source",sourceDataType:"content"}))}l&&l(x)})}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=o.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 _=l.tileID.canonical.url(this.tiles,this.scheme),x=this.map._requestManager.normalizeTileURL(_),S=this.map._requestManager.transformRequest(x,o.R.Tile),A=this.map.style?this.map.style.getLut(this.scope):null,N=A?{image:A.image.clone()}:null,V={request:S,data:void 0,uid:l.uid,tileID:l.tileID,tileZoom:l.tileZoom,zoom:l.tileID.overscaledZ,maxZoom:this.maxzoom,lut:N,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,pixelRatio:o.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&&o.h(_)&&(V.localizableLayerIds=this.localizableLayerIds),V.request.collectResourceTiming=this._collectResourceTiming,l.actor&&l.state!=="expired")l.state==="loading"?l.reloadCallback=p:l.request=l.actor.send("reloadTile",V,$.bind(this));else if(l.actor=this._tileWorkers[x]=this._tileWorkers[x]||this.dispatcher.getActor(),this.dispatcher.ready)l.request=l.actor.send("loadTile",V,$.bind(this),void 0,!0);else{let Y=o.aL.call({deduped:this._deduped},V,(J,W)=>{J||!W?$.call(this,J):(V.data={cacheControl:W.cacheControl,expires:W.expires,rawData:W.rawData.slice(0)},l.actor&&l.actor.send("loadTile",V,$.bind(this),void 0,!0))},!0);l.request={cancel:Y}}function $(Y,J){return delete l.request,l.aborted?p(null):Y&&Y.status!==404?p(Y):(J&&J.resourceTiming&&(l.resourceTiming=J.resourceTiming),this.map._refreshExpiredTiles&&J&&l.setExpiryData(J),l.loadVectorData(J,this.map.painter),o.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 UC extends o.E{constructor(l,p,_,x){super(),this.id=l,this.dispatcher=_,this.setEventedParent(x),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,o.aH(p,["url","scheme","tileSize"]))}load(l){this._loaded=!1,this.fire(new o.z("dataloading",{dataType:"source"}));let p=this.map.getWorldview();this._tileJSONRequest=sm(this._options,this.map._requestManager,null,p,(_,x)=>{this._tileJSONRequest=null,this._loaded=!0,_?this.fire(new o.y(_)):x&&(Object.assign(this,x),x.raster_layers&&(this.rasterLayers=x.raster_layers,this.rasterLayerIds=this.rasterLayers.map(S=>S.id)),this.tileBounds=Ny.fromTileJSON(x),kt(x.tiles),this.fire(new o.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.z("data",{dataType:"source",sourceDataType:"content"}))),l&&l(_)})}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest();let l=o.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 _=o.o.devicePixelRatio>=2,x=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),_,this.tileSize);l.request=o.n(this.map._requestManager.transformRequest(x,o.R.Tile),(S,A,N,V)=>(delete l.request,l.aborted?(l.state="unloaded",p(null)):S?(l.state="errored",p(S)):A?(this.map._refreshExpiredTiles&&l.setExpiryData({cacheControl:N,expires:V}),l.setTexture(A,this.map.painter),l.state="loaded",o.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 o.T?(l.destroy(!0),l.texture&&l.texture instanceof o.T&&this.map.painter.saveTileTexture(l.texture)):l.destroy(),p&&p()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function zO([y,l],p,_,{scaled:x=!0}={}){let{tileSize:S,buffer:A}=_,{x:N,y:V,z:$}=p;if(!isFinite(N)||!isFinite(V)||!isFinite($))throw new Error("Invalid MRT header");let Y=2**$,J=Y*o.aF(y),W=Y*o.aJ(l);return(function([oe,ce],de,{scaled:Ee=!0}={}){if(!de)throw new Error("bandView is undefined");let{data:ge,tileSize:Oe,buffer:Be,offset:He,scale:nt,dimension:et}=de;if(oe<-Be||oe>Oe+Be||ce<-Be||ce>Oe+Be)throw new Error(`Point (${oe}, ${ce}) out of bounds for tileSize=${Oe}, buffer=${Be}`);let at=(ce+Be)*(Oe+2*Be)+(oe+Be);if(new Uint32Array(ge.buffer)[at]===4294967295)return null;let tt=[];tt=Ee?[]:new de.data.constructor(et);for(let Xe=0;Xe{if(delete l.request,l.aborted)return l.state="unloaded",p(null);if(N)return N.name==="AbortError"?void 0:(l.state="errored",p(N));if(this.map._refreshExpiredTiles&&V&&l.setExpiryData({cacheControl:$,expires:Y}),this.partial&&l.state!=="expired")l.state="empty";else if(!this.partial){if(!V)return p(null);l.state="loaded",l._isHeaderLoaded=!0,l._mrt=V}p(null)};l.request=this.partial?l.fetchHeader(void 0,A.bind(this)):l.actor.send("loadTile",S,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 _=l.texturePerLayer;if(l.flushAllQueues(),_.size){l.destroy(!0);for(let x of _.values())this.map.painter.saveTileTexture(x)}else l.destroy()}prepareTile(l,p,_,x){l._isHeaderLoaded&&(l.state!=="empty"&&(l.state="reloading"),l.fetchBandForRender(p,_,x,(S,A)=>{if(S)return l.state="errored",this.fire(new o.y(S)),void this.triggerRepaint(l);A&&(l._isHeaderLoaded=!0,l.setTexturePerLayer(_,A,this.map.painter),l.state="loaded",this.triggerRepaint(l))}))}getInitialBand(l){if(!this.rasterLayers)return 0;let p=this.rasterLayers.find(({id:S})=>S===l),_=p&&p.fields,x=_&&_.bands&&_.bands;return x?x[0]:0}getTextureDescriptor(l,p,_){if(!l)return;let x=p.sourceLayer||this.rasterLayerIds&&this.rasterLayerIds[0];if(!x)return;let S=null;p instanceof o.aP?S=p.paint.get("raster-array-band"):p instanceof o.aQ&&(S=p.paint.get("raster-particle-array-band"));let A=S||this.getInitialBand(x);if(A==null)return;if(!l.textureDescriptorPerLayer.get(p.id))return void this.prepareTile(l,x,p.id,A);if(l.updateNeeded(p.id,A)&&!_)return;let N=l.textureDescriptorPerLayer.get(p.id);return Object.assign({},N,{texture:l.texturePerLayer.get(p.id)})}getImages(l,p){let _=new Map;for(let x of l)for(let S of p){let[A,N]=S.split("/"),V=x.getLayer(A);if(!V||!V.hasBand(N)||!V.hasDataForBand(N))continue;let{bytes:$,tileSize:Y,buffer:J}=V.getBandView(N),W=Y+2*J,oe={data:new o.q({width:W,height:W},$),pixelRatio:2,sdf:!1,usvg:!1,version:0};_.set(S,oe)}return _}queryRasterArrayValueByBandId(l,p,_){let x=p._mrt;return new Promise(S=>{let A={},N=new Set;for(let[V,$]of Object.entries(x.layers)){if(_.layerName&&V!==_.layerName)continue;let Y={};A[V]=Y;for(let{bands:J}of $.dataIndex)for(let W of J)_.bands&&!_.bands.includes(W)||(N.add(o.B(V,W)),p.fetchBand(V,null,W,oe=>{o.o.frame(()=>{Y[W]=oe?null:zO([l.lng,l.lat],x,$.getBandView(W)),N.delete(o.B(V,W)),N.size===0&&S(A)})},!1))}N.size===0&&S(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 _=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize),x=this.map._requestManager.transformRequest(_,o.R.Tile);l.actor.send("loadTile",{request:x,uid:l.uid,tileID:l.tileID,type:this.type,source:this.id,scope:this.scope,partial:!1},(S,A,N,V)=>S?(this._loadTilePending[l.uid].forEach($=>$(S,null)),void delete this._loadTilePending[l.uid]):A?(this.map._refreshExpiredTiles&&A&&l.setExpiryData({cacheControl:N,expires:V}),l._mrt=A,l._isHeaderLoaded=!0,l.state="loaded",this._loadTilePending[l.uid].forEach($=>$(null,A)),this._loadTileLoaded[l.uid]=!0,void delete this._loadTilePending[l.uid]):(this._loadTilePending[l.uid].forEach($=>$(null,null)),void delete this._loadTilePending[l.uid]),void 0,!0)}queryRasterArrayValueByAllBands(l,p,_){return new Promise((x,S)=>{this._loadTileForQuery(p,(A,N)=>{A?S(A):x(N?this.queryRasterArrayValueByBandId(l,p,_):null)})})}queryRasterArrayValue(l,p){let _=o.aR.convert(l),x=this.findLoadedParent(_);return x&&x._mrt?p.bands||!this.partial?this.queryRasterArrayValueByBandId(_,x,p):this.queryRasterArrayValueByAllBands(_,x,p):Promise.resolve(null)}findLoadedParent(l){let p=o.ae.fromLngLat(l,this.map.transform.tileSize),_=this.maxzoom+1,x=1<<_,S=Math.floor(p.x),A=Math.floor((p.x-S)*x),N=Math.floor(p.y*x),V=this.map.style.getSourceCache(this.id),$=new o.aO(_,S,_,A,N);return V.findLoadedParent($,this.minzoom)}}let V1={vector:lp,raster:UC,"raster-dem":class extends UC{constructor(y,l,p,_){super(y,l,p,_),this.type="raster-dem",this.maxzoom=22,this._options=Object.assign({type:"raster-dem"},l),this.encoding=l.encoding||"mapbox"}loadTile(y,l){let p=this.map._requestManager.normalizeTileURL(y.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function _(x,S){x&&(y.state="errored",l(x)),S&&(y.dem=S,y.dem.onDeserialize(),y.needsHillshadePrepare=!0,y.needsDEMTextureUpload=!0,y.state="loaded",l(null))}y.request=o.n(this.map._requestManager.transformRequest(p,o.R.Tile),function(x,S,A,N){if(delete y.request,y.aborted)y.state="unloaded",l(null);else if(x)y.state="errored",l(x);else if(S){this.map._refreshExpiredTiles&&y.setExpiryData({cacheControl:A,expires:N});let V=ImageBitmap&&S instanceof ImageBitmap&&o.r(),$=1-(S.width-o.aN(S.width))/2;$<1||y.neighboringTiles||(y.neighboringTiles=this._getNeighboringTiles(y.tileID));let Y=V?S:o.o.getImageData(S,$),J={uid:y.uid,tileID:y.tileID,source:this.id,type:this.type,scope:this.scope,rawImageData:Y,encoding:this.encoding,padding:$};y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor(),y.actor.send("loadTile",J,_.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(y){let l=y.canonical,p=Math.pow(2,l.z),_=(l.x-1+p)%p,x=l.x===0?y.wrap-1:y.wrap,S=(l.x+1+p)%p,A=l.x+1===p?y.wrap+1:y.wrap,N={};return N[new o.aO(y.overscaledZ,x,l.z,_,l.y).key]={backfilled:!1},N[new o.aO(y.overscaledZ,A,l.z,S,l.y).key]={backfilled:!1},l.y>0&&(N[new o.aO(y.overscaledZ,x,l.z,_,l.y-1).key]={backfilled:!1},N[new o.aO(y.overscaledZ,y.wrap,l.z,l.x,l.y-1).key]={backfilled:!1},N[new o.aO(y.overscaledZ,A,l.z,S,l.y-1).key]={backfilled:!1}),l.y+1{if(this._loaded=!0,this._pendingLoad=null,_)this.fire(new o.y(_));else{let S={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&x&&x.resourceTiming&&x.resourceTiming[this.id]&&(S.resourceTiming=x.resourceTiming[this.id]),y&&(this._partialReload=!0),this.fire(new o.z("data",S)),this._partialReload=!1,this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(y),this._coalesce=!1)})}loaded(){return this._loaded}reload(){let y=o.B(this.id,this.scope);this.map.style.clearSource(y),this._updateWorkerData()}loadTile(y,l){let p=y.actor?"reloadTile":"loadTile";y.actor=this.actor;let _=this.map.style?this.map.style.getLut(this.scope):null,x=_?{image:_.image.clone()}:null,S=this._partialReload,A={type:this.type,uid:y.uid,tileID:y.tileID,tileZoom:y.tileZoom,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,lut:x,scope:this.scope,pixelRatio:o.o.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:y.isExtraShadowCaster,scaleFactor:this.map.getScaleFactor(),partial:S,worldview:this.map.getWorldview()};y.request=this.actor.send(p,A,(N,V)=>S&&!V?(y.state="loaded",l(null)):(delete y.request,y.destroy(),y.aborted?l(null):N?l(N):(y.loadVectorData(V,this.map.painter,p==="reloadTile"),l(null))),void 0,p==="loadTile")}abortTile(y){y.request&&(y.request.cancel(),delete y.request),y.aborted=!0}unloadTile(y,l){this.actor.send("removeTile",{uid:y.uid,type:this.type,source:this.id,scope:this.scope}),y.destroy()}onRemove(y){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return Object.assign({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends o.aS{constructor(y,l,p,_){super(y,l,p,_),this.roundZoom=!0,this.type="video",this.options=l}load(){this._loaded=!1;let y=this.options;this.urls=[];for(let l of y.urls)this.urls.push(this.map._requestManager.transformRequest(l,o.R.Source).url);o.aT(this.urls,(l,p)=>{this._loaded=!0,l?this.fire(new o.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(y){if(this.video){let l=this.video.seekable;yl.end(0)?this.fire(new o.y(new o.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=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,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 y=this.map.painter.context,l=y.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 o.T(y,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(y)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:o.aS,model:class extends o.E{constructor(y,l,p,_){super(),this.id=y,this.type="model",this.models=[],this._loaded=!1,this._options=l}load(){let y=[];for(let l in this._options.models){let p=this._options.models[l],_=o.aV(this.map._requestManager.transformRequest(p.uri,o.R.Model).url).then(x=>{if(!x)return;let S=o.aW(x),A=new o.aX(l,p.position,p.orientation,S);A.computeBoundsAndApplyParent(),this.models.push(A)}).catch(x=>{this.fire(new o.y(new Error(`Could not load model ${l} from ${p.uri}: ${x.message}`)))});y.push(_)}Promise.allSettled(y).then(()=>{this._loaded=!0,this.fire(new o.z("data",{dataType:"source",sourceDataType:"metadata"}))}).catch(l=>{this._loaded=!0,this.fire(new o.y(new Error(`Could not load models: ${l.message}`)))})}onAdd(y){this.map=y,this.load()}hasTransition(){return!1}loaded(){return this._loaded}getModels(){return this.models}loadTile(y,l){}serialize(){return this._options}},"batched-model":class extends o.E{constructor(y,l,p,_){super(),this.type="batched-model",this.id=y,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(_)}onAdd(y){this.map=y,this.load()}reload(){this.cancelTileJSONRequest();let y=o.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(y))}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}load(y){this._loaded=!1,this.fire(new o.z("dataloading",{dataType:"source"}));let l=Array.isArray(this.map._language)?this.map._language.join():this.map._language,p=this.map.getWorldview();this._tileJSONRequest=sm(this._options,this.map._requestManager,l,p,(_,x)=>{this._tileJSONRequest=null,this._loaded=!0,_?(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 o.y(_))):x&&(Object.assign(this,x),x.bounds&&(this.tileBounds=new Ny(x.bounds,this.minzoom,this.maxzoom)),kt(x.tiles,this.map._requestManager._customAccessToken),this.fire(new o.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.z("data",{dataType:"source",sourceDataType:"content"}))),y&&y(_)})}hasTransition(){return!1}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loaded(){return this._loaded}loadTile(y,l){let p=this.map._requestManager.normalizeTileURL(y.tileID.canonical.url(this.tiles,this.scheme)),_={request:this.map._requestManager.transformRequest(p,o.R.Tile),data:void 0,uid:y.uid,tileID:y.tileID,tileZoom:y.tileZoom,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,showCollisionBoxes:this.map.showCollisionBoxes,isSymbolTile:y.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,pixelRatio:o.o.devicePixelRatio,promoteId:this.promoteId};if(y.actor&&y.state!=="expired")if(y.state==="loading")y.reloadCallback=l;else{if(y.buckets){let S=Object.values(y.buckets);for(let A of S)A.dirty=!0;return void(y.state="loaded")}y.request=y.actor.send("reloadTile",_,x.bind(this))}else y.actor=this.dispatcher.getActor(),y.request=y.actor.send("loadTile",_,x.bind(this),void 0,!0);function x(S,A){return y.aborted?l(null):S&&S.status!==404?l(S):(this.map._refreshExpiredTiles&&A&&y.setExpiryData(A),y.loadModelData(A,this.map.painter),y.state="loaded",void l(null))}}serialize(){return Object.assign({},this._options)}},canvas:class extends o.aS{constructor(y,l,p,_){super(y,l,p,_),l.coordinates?Array.isArray(l.coordinates)&&l.coordinates.length===4&&!l.coordinates.some(x=>!Array.isArray(x)||x.length!==2||x.some(S=>typeof S!="number"))||this.fire(new o.y(new o.V(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.y(new o.V(`sources.${y}`,null,'missing required property "coordinates"'))),l.animate&&typeof l.animate!="boolean"&&this.fire(new o.y(new o.V(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),l.canvas?typeof l.canvas=="string"||l.canvas instanceof HTMLCanvasElement||this.fire(new o.y(new o.V(`sources.${y}`,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 o.y(new o.V(`sources.${y}`,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 o.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(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(y){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let l=this.map.painter.context;this.texture?!y&&!this._playing||this.texture instanceof o.aU||this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.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 y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}},custom:class extends o.E{constructor(y,l,p,_){super(),this.id=y,this.type="custom",this._dataType="raster",this._dispatcher=p,this._implementation=l,this.setEventedParent(_),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new o.y(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new o.y(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new Ny(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,o.aH(l,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return o.aH(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new o.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.z("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(y){this.map=y,this._loaded=!1,this.fire(new o.z("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(y),this.load()}onRemove(y){this._implementation.onRemove&&this._implementation.onRemove(y)}hasTile(y){if(this._implementation.hasTile){let{x:l,y:p,z:_}=y.canonical;return this._implementation.hasTile({x:l,y:p,z:_})}return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y,l){let{x:p,y:_,z:x}=y.tileID.canonical,S=new AbortController;y.request=Promise.resolve(this._implementation.loadTile({x:p,y:_,z:x},{signal:S.signal})).then(function(A){return delete y.request,y.aborted?(y.state="unloaded",l(null)):A===void 0?(y.state="errored",l(null)):A===null?(this.loadTileData(y,{width:this.tileSize,height:this.tileSize,data:null}),y.state="loaded",l(null)):(function(N){return N instanceof ImageData||N instanceof HTMLCanvasElement||N instanceof ImageBitmap||N instanceof HTMLImageElement})(A)?(this.loadTileData(y,A),y.state="loaded",void l(null)):(y.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"&&(y.state="errored",l(A))}),y.request.cancel=()=>S.abort()}loadTileData(y,l){y.setTexture(l,this.map.painter)}unloadTile(y,l){if(y.texture&&y.texture instanceof o.T?(y.destroy(!0),y.texture&&y.texture instanceof o.T&&this.map.painter.saveTileTexture(y.texture)):y.destroy(),this._implementation.unloadTile){let{x:p,y:_,z:x}=y.tileID.canonical;this._implementation.unloadTile({x:p,y:_,z:x})}l&&l()}abortTile(y,l){y.request&&y.request.cancel&&(y.request.cancel(),delete y.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(y=>({x:y.canonical.x,y:y.canonical.y,z:y.canonical.z}))}_clearTiles(){let y=o.B(this.id,this.scope);this.map.style.clearSource(y)}_update(){this.fire(new o.z("data",{dataType:"source",sourceDataType:"content"}))}}},z1=function(y,l,p,_){let x=new V1[l.type](y,l,p,_);if(x.id!==y)throw new Error(`Expected Source id to be ${y} instead of ${x.id}`);return o.aY(["load","abort","unload","serialize","prepare"],x),x};function ob(y,l,p=""){return`${p}:${l.id||""}:${l.layer.id}:${(function(_){if("layerId"in _)return`layer:${_.layerId}`;{let{featuresetId:x,importId:S}=_;return`featureset:${x}${S?`:import:${S}`:""}`}})(y.target)}`}function Fy(y,l,p,_=""){if(y.uniqueFeatureID){let x=ob(y,l,_);if(p.has(x))return!0;p.add(x)}return!1}function RI(y,l,p,_,x=!1){let S=l.sourceCache.transform,A=l.sourceCache.tilesIn(y,l.has3DLayers,x);A.sort(PI);let N=[];for(let V of A){let $=V.tile.queryRenderedFeatures(l,V,p,_,S,x);Object.keys($).length&&N.push({wrappedTileID:V.tile.tileID.wrapped().key,queryResults:$})}return N.length===0?{}:(function(V){let $={},Y={};for(let J of V){let W=J.queryResults,oe=J.wrappedTileID,ce=Y[oe]=Y[oe]||{};for(let de in W){let Ee=W[de],ge=ce[de]=ce[de]||{},Oe=$[de]=$[de]||[];for(let Be of Ee)ge[Be.featureIndex]||(ge[Be.featureIndex]=!0,Oe.push(Be))}}return $})(N)}function KA(y,l,p,_,x,S){let A={},N=_.queryRenderedSymbols(y),V=[];for(let $ of Object.keys(N).map(Number))V.push(x[$]);V.sort(PI);for(let $ of V){let Y=$.featureIndex.lookupSymbolFeatures(N[$.bucketInstanceId],$.bucketIndex,$.sourceLayerIndex,l,p,S);for(let J in Y){let W=A[J]=A[J]||[],oe=Y[J];oe.sort((ce,de)=>{let Ee=$.featureSortOrder;if(Ee){let ge=Ee.indexOf(ce.featureIndex);return Ee.indexOf(de.featureIndex)-ge}return de.featureIndex-ce.featureIndex});for(let ce of oe)W.push(ce)}}return A}function l_(y,l){let p=y.getRenderableIds().map(S=>y.getTileByID(S)),_=[],x={};for(let S=0;Sl.getLayer(S)).filter(Boolean);if(x.length!==0){_.layers=x,_.stateDependentLayerIds&&(_.stateDependentLayers=_.stateDependentLayerIds.map(S=>x.filter(A=>A.id===S)[0]));for(let S of x)p[S.fqid]=_}}return p}let Mh=32,vf=33,c_=new Uint16Array(8184);for(let y=0;y<2046;y++){let l=y+2,p=0,_=0,x=0,S=0,A=0,N=0;for(1&l?x=S=A=Mh:p=_=N=Mh;(l>>=1)>1;){let $=p+x>>1,Y=_+S>>1;1&l?(x=p,S=_,p=A,_=N):(p=x,_=S,x=A,S=N),A=$,N=Y}let V=4*y;c_[V+0]=p,c_[V+1]=_,c_[V+2]=x,c_[V+3]=S}let lm=new Uint16Array(2178),Dp=new Uint8Array(1089),ab=new Uint16Array(1089);function UO(y){return y===0?-.03125:y===32?.03125:0}let U1={type:2,extent:o.al,loadGeometry:()=>[[new o.P(0,0),new o.P(o.al+1,0),new o.P(o.al+1,o.al+1),new o.P(0,o.al+1),new o.P(0,0)]]};class Ly{constructor(l,p,_,x,S,A){this.tileID=l,this.uid=o.b2(),this.uses=0,this.tileSize=p,this.tileZoom=_,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=S,x&&x.style&&(this._lastUpdatedBrightness=x.style.getBrightness()),this.expiredRequestCount=0,this.state="loading",x&&x.transform&&(this.projection=x.transform.projection),this.worldview=A}registerFadeDuration(l){let p=l+this.timeAdded;p_)x=!1;else if(p)if(this.expirationTime0&&!p;(ce&&N.stateDependentLayers.length!==0||p)&&N.update(W,Y,x,oe,ce?N.stateDependentLayers:N.layers,p,S),(N instanceof o.ba||N instanceof o.bb)&&l._terrain&&l._terrain.enabled&&J&&N.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(N)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil=0;Ee--){let ge=4*Ee,Oe=c_[ge+0],Be=c_[ge+1],He=c_[ge+2],nt=c_[ge+3],et=Oe+He>>1,at=Be+nt>>1,tt=et+at-Be,Xe=at+Oe-et,it=Be*vf+Oe,Wt=nt*vf+He,Nt=at*vf+et,mi=Math.hypot((lm[2*it+0]+lm[2*Wt+0])/2-lm[2*Nt+0],(lm[2*it+1]+lm[2*Wt+1])/2-lm[2*Nt+1])>=16;Dp[Nt]=Dp[Nt]||(mi?1:0),Ee<1022&&(Dp[Nt]=Dp[Nt]||Dp[(Be+Xe>>1)*vf+(Oe+tt>>1)]||Dp[(nt+Xe>>1)*vf+(He+tt>>1)])}let J=new o.b0,W=new o.b1,oe=0;function ce(Ee,ge){let Oe=ge*vf+Ee;return ab[Oe]===0&&(J.emplaceBack(lm[2*Oe+0],lm[2*Oe+1],Ee*o.al/Mh,ge*o.al/Mh),ab[Oe]=++oe),ab[Oe]-1}function de(Ee,ge,Oe,Be,He,nt){let et=Ee+Oe>>1,at=ge+Be>>1;if(Math.abs(Ee-He)+Math.abs(ge-nt)>1&&Dp[at*vf+et])de(He,nt,Ee,ge,et,at),de(Oe,Be,He,nt,et,at);else{let tt=ce(Ee,ge),Xe=ce(Oe,Be),it=ce(He,nt);W.emplaceBack(tt,Xe,it)}}return de(0,0,Mh,Mh,Mh,0),de(Mh,Mh,0,0,0,Mh),{vertices:J,indices:W}})(this.tileID.canonical,p);x=A.vertices,S=A.indices}else{x=new o.b0,S=new o.b1;for(let{x:N,y:V}of _)x.emplaceBack(N,V,0,0);let A=o.bh(x.int16.subarray(0,4*x.length),void 0,4);for(let N=0;N0&&(V=o.bl(new Float64Array(16),p.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(l,x,p,A,V,N),this._makeGlobeTileDebugTextBuffer(l,x,p,A,V,N)}_globePoint(l,p,_,x,S,A,N){let V=o.bm(l,p,_);if(A){let $=1<<_.z,Y=o.aF(x.center.lng),J=o.aJ(x.center.lat),W=(_.x+.5)/$-Y,oe=0;W>.5?oe=-1:W<-.5&&(oe=1);let ce=(l/o.al+_.x)/$+oe,de=(p/o.al+_.y)/$;ce=(ce-Y)*x._pixelsPerMercatorPixel+Y,de=(de-J)*x._pixelsPerMercatorPixel+J;let Ee=[ce*x.worldSize,de*x.worldSize,0];o.af(Ee,Ee,A),V=o.bn(V,Ee,N)}return o.af(V,V,S)}_makeGlobeTileDebugBorderBuffer(l,p,_,x,S,A){let N=new o.bd,V=new o.be,$=new o.bo,Y=(W,oe,ce,de,Ee)=>{let ge=(ce-W)/(Ee-1),Oe=(de-oe)/(Ee-1),Be=N.length;for(let He=0;HeJ*oe+ce;for(let oe=0;oe{if(S)p(S);else try{let $=_.getHeaderLength(A);if($>l)return void(this.request=this.fetchHeader($,p));_.parseHeader(A),this._isHeaderLoaded=!0;let Y=0;for(let J of Object.values(_.layers))Y=Math.max(Y,J.dataIndex[J.dataIndex.length-1].lastByte);A.byteLength>=Y&&(this.entireBuffer=A),p(null,this.entireBuffer||A,N,V)}catch($){p($)}}),this.request}fetchBandForRender(l,p,_,x){this.fetchBand(l,p,_,S=>{if(S)return void x(S);this.updateTextureDescriptor(l,p,_);let A=this.textureDescriptorPerLayer.get(p);x(null,A?A.img:null)})}fetchBand(l,p,_,x,S=!0){let A=this._mrt;if(!this._isHeaderLoaded||!A)return void x(new Error("Tile header is not ready"));let N=this.actor;if(!N)return void x(new Error("Can't fetch tile band without an actor"));let V,$=o.B(String(_),o.B(this.tileID.key,l)),Y=this._taskQueue.get($);Y?Y.add(x):(Y=new Set,Y.add(x),this._taskQueue.set($,Y));let J=(de,Ee)=>{V.complete(de,Ee),de?x(de):(Y.values().forEach(ge=>ge(null,Ee)),this._taskQueue.delete($))},W=(de,Ee)=>{if(de)return x(de);let ge=N.send("decodeRasterArray",{type:"raster-array",source:this.source,scope:this.scope,tileID:this.tileID,uid:this.uid,buffer:Ee,task:V},J,void 0,!0);if(p!==null){let Oe=this._workQueuePerLayer.get(p)||[];Oe.push(()=>{ge&&ge.cancel(),V.cancel()}),this._workQueuePerLayer.has(p)||this._workQueuePerLayer.set(p,Oe)}},oe;try{oe=A.getLayer(l)}catch(de){if(this.state==="reloading")return;throw de}if(!oe)return void x(new Error(`Unknown sourceLayer "${l}"`));if(oe.hasDataForBand(_))return Y.values().forEach(de=>de(null,null)),void this._taskQueue.delete($);let ce=oe.getDataRange([_]);if(V=A.createDecodingTask(ce),!V||V.tasks.length)if(p!==null&&this.flushQueues(p),this.entireBuffer)W(null,this.entireBuffer.slice(ce.firstByte,ce.lastByte+1));else{let de=Object.assign({},this.requestParams,{headers:{Range:`bytes=${ce.firstByte}-${ce.lastByte}`}}),Ee=o.bu(de,W);if(p!==null){let ge=this._fetchQueuePerLayer.get(p)||[];ge.push(()=>{Ee.cancel(),V.cancel()}),this._fetchQueuePerLayer.has(p)||this._fetchQueuePerLayer.set(p,ge)}}}updateNeeded(l,p){return(!this.textureDescriptorPerLayer.get(l)||this.textureDescriptorPerLayer.get(l).band!==p||this.refreshedUponExpiration)&&this.state!=="errored"}updateTextureDescriptor(l,p,_){if(!this._mrt)return;let x=this._mrt.getLayer(l);if(!x||!x.hasBand(_)||!x.hasDataForBand(_))return;let{bytes:S,tileSize:A,buffer:N,offset:V,scale:$}=x.getBandView(_),Y=A+2*N,J=new o.q({width:Y,height:Y},S),W=this.texturePerLayer.get(p);W&&W instanceof o.T&&W.update(J,{premultiply:!1}),this.textureDescriptorPerLayer.set(p,{layer:l,band:_,img:J,buffer:N,offset:V,tileSize:A,format:x.pixelFormat,mix:[$,256*$,65536*$,16777216*$]})}destroy(l=!1){if(super.destroy(l),delete this._mrt,!l)for(let p of this.texturePerLayer.values())p&&p instanceof o.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 G1{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,_){let x=l.wrapped().key;this.data[x]===void 0&&(this.data[x]=[]);let S={value:p,timeout:void 0};if(_!==void 0&&(S.timeout=setTimeout(()=>{this.remove(l,S)},_)),this.data[x].push(S),this.order.push(x),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 _=l.wrapped().key,x=p===void 0?0:this.data[_].indexOf(p),S=this.data[_][x];return this.data[_].splice(x,1),S.timeout&&clearTimeout(S.timeout),this.data[_].length===0&&delete this.data[_],this.onRemove(S.value),this.order.splice(this.order.indexOf(_),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 _ in this.data)for(let x of this.data[_])l(x.value)||p.push(x);for(let _ of p)this.remove(_.value.tileID,_)}}class j1{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,p,_){let x=String(p);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][x]=this.stateChanges[l][x]||{},Object.assign(this.stateChanges[l][x],_),this.deletedStates[l]===null){this.deletedStates[l]={};for(let S in this.state[l])S!==x&&(this.deletedStates[l][S]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][x]===null){this.deletedStates[l][x]={};for(let S in this.state[l][x])_[S]||(this.deletedStates[l][x][S]=null)}else for(let S in _)this.deletedStates[l]&&this.deletedStates[l][x]&&this.deletedStates[l][x][S]===null&&delete this.deletedStates[l][x][S]}removeFeatureState(l,p,_){if(this.deletedStates[l]===null)return;let x=String(p);if(this.deletedStates[l]=this.deletedStates[l]||{},_&&p!==void 0)this.deletedStates[l][x]!==null&&(this.deletedStates[l][x]=this.deletedStates[l][x]||{},this.deletedStates[l][x][_]=null);else if(p!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][x])for(_ in this.deletedStates[l][x]={},this.stateChanges[l][x])this.deletedStates[l][x][_]=null;else this.deletedStates[l][x]=null;else this.deletedStates[l]=null}getState(l,p){let _=this.state[l]||{},x=this.stateChanges[l]||{},S=this.deletedStates[l];if(S===null)return{};if(p!==void 0){let N=String(p),V=Object.assign({},_[N],x[N]);if(S){let $=S[p];if($===null)return{};for(let Y in $)delete V[Y]}return V}let A=Object.assign({},_,x);if(S)for(let N in S)delete A[N];return A}initializeTileState(l,p){l.refreshFeatureState(p)}coalesceChanges(l,p){let _={};for(let x in this.stateChanges){this.state[x]=this.state[x]||{};let S={};for(let A in this.stateChanges[x])this.state[x][A]||(this.state[x][A]={}),Object.assign(this.state[x][A],this.stateChanges[x][A]),S[A]=this.state[x][A];_[x]=S}for(let x in this.deletedStates){this.state[x]=this.state[x]||{};let S={};if(this.deletedStates[x]===null)for(let A in this.state[x])S[A]={},this.state[x][A]={};else for(let A in this.deletedStates[x]){if(this.deletedStates[x][A]===null)this.state[x][A]={};else if(this.state[x][A])for(let N of Object.keys(this.deletedStates[x][A]))delete this.state[x][A][N];S[A]=this.state[x][A]}_[x]=_[x]||{},Object.assign(_[x],S)}if(this.stateChanges={},this.deletedStates={},Object.keys(_).length!==0)for(let x in l)l[x].refreshFeatureState(p)}}class bf extends o.E{constructor(l,p,_){super(),this.id=l,this._onlySymbols=_,p.on("data",x=>{x.dataType==="source"&&x.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&x.dataType==="source"&&x.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform))}),p.on("error",()=>{this._sourceErrored=!0}),this._source=p,this._tiles={},this._cache=new G1(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 j1,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 _=this._tiles[p];_.upload(l),_.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(HO).map(l=>l.key)}getRenderableIds(l,p){let _=[];for(let x in this._tiles)this._isIdRenderable(+x,l,p)&&_.push(this._tiles[x]);return l?_.sort((x,S)=>{let A=x.tileID,N=S.tileID,V=new o.P(A.canonical.x,A.canonical.y)._rotate(this.transform.angle),$=new o.P(N.canonical.x,N.canonical.y)._rotate(this.transform.angle);return A.overscaledZ-N.overscaledZ||$.y-V.y||$.x-V.x}).map(x=>x.tileID.key):_.map(x=>x.tileID).sort(HO).map(x=>x.key)}hasRenderableParent(l){let p=this.findLoadedParent(l,0);return!!p&&this._isIdRenderable(p.tileID.key)}_isIdRenderable(l,p,_){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(p||!this._tiles[l].holdingForFade())&&(_||!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 _=this._tiles[l];_&&(_.state!=="loading"&&(_.state=p),this._loadTile(_,this._tileLoaded.bind(this,_,l,p)))}_tileLoaded(l,p,_,x){if(x)if(l.state="errored",x.status!==404)this._source.fire(new o.y(x,{tile:l}));else{if(this._source.fire(new o.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 S=this.map.painter.terrain;this.update(this.transform,S.getScaledDemTileSize(),!0),S.resetTileLookupCache(this.id)}else this.update(this.transform)}else l.timeAdded=o.o.now(),_==="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 o.z("data",{dataType:"source",tile:l,coord:l.tileID,sourceCacheId:this.id}))}_backfillDEM(l){let p=this.getRenderableIds();for(let x=0;x1||(Math.abs(A)>1&&(Math.abs(A+V)===1?A+=V:Math.abs(A-V)===1&&(A-=V)),S.dem&&x.dem&&(x.dem.backfillBorder(S.dem,A,N),x.neighboringTiles&&x.neighboringTiles[$]&&(x.neighboringTiles[$].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,p,_,x){for(let S in this._tiles){let A=this._tiles[S];if(x[S]||!A.hasData()||A.tileID.overscaledZ<=p||A.tileID.overscaledZ>_)continue;let N=A.tileID;for(;A&&A.tileID.overscaledZ>p+1;){let $=A.tileID.scaledTo(A.tileID.overscaledZ-1);A=this._tiles[$.key],A&&A.hasData()&&(N=$)}let V=N;for(;V.overscaledZ>p;)if(V=V.scaledTo(V.overscaledZ-1),l[V.key]){x[N.key]=N;break}}}findLoadedParent(l,p){if(l.key in this._loadedParentTiles){let _=this._loadedParentTiles[l.key];return _&&_.tileID.overscaledZ>=p?_:null}for(let _=l.overscaledZ-1;_>=p;_--){let x=l.scaledTo(_),S=this._getLoadedTile(x);if(S)return S}}_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 _=Math.ceil(l.width/p)+1,x=Math.ceil(l.height/p)+1,S=Math.floor(_*x*5),A=typeof this._minTileCacheSize=="number"?Math.max(this._minTileCacheSize,S):S,N=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,A):A;this._cache.setMaxSize(N)}handleWrapJump(l){let p=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,p){let _={};for(let x in this._tiles){let S=this._tiles[x];S.tileID=S.tileID.unwrapTo(S.tileID.wrap+p),_[S.tileID.key]=S}this._tiles=_;for(let x in this._timers)clearTimeout(this._timers[x]),delete this._timers[x];for(let x in this._tiles)this._setTileReloadTimer(+x,this._tiles[x])}}update(l,p,_,x,S){if(this.transform=l,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!_)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",N,V=this._source.maxzoom,$=this.map&&this.map.painter?this.map.painter._terrain:null;if($&&$.sourceCache===this&&$.attenuationRange()){let W=$.attenuationRange()[0],oe=Math.floor(W)-Math.log2($.getDemUpscale());V>oe&&(V=oe)}if(this.used||this.usedForTerrain){if(this._source.tileID)N=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(W=>new o.aO(W.canonical.z,W.wrap,W.canonical.z,W.canonical.x,W.canonical.y));else if(this.tileCoverLift!==0){let W=l.clone();W.tileCoverLift=this.tileCoverLift,N=W.coveringTiles({tileSize:p||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:V,roundZoom:this._source.roundZoom&&!_,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:A}),this._source.minzoom<=1&&l.projection.name==="globe"&&(N.push(new o.aO(1,0,1,0,0)),N.push(new o.aO(1,0,1,1,0)),N.push(new o.aO(1,0,1,0,1)),N.push(new o.aO(1,0,1,1,1)))}else if(N=l.coveringTiles({tileSize:p||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:V,roundZoom:this._source.roundZoom&&!_,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:A}),this._source.hasTile){let W=this._source.hasTile.bind(this._source);N=N.filter(oe=>W(oe))}}else N=[];if(N.length>0&&this.transform.projection.name!=="globe"&&!this.usedForTerrain&&!NI(this._source.type)){let W=l.coveringZoomLevel({tileSize:p||this._source.tileSize,roundZoom:this._source.roundZoom&&!_}),oe=Math.min(W,this._source.maxzoom);if(A){let ce=l.extendTileCover(N,oe);for(let de of ce)N.push(de)}else if(S){let ce=l.extendTileCoverToNearPlane(N,this.transform.getFrustum(oe),oe);for(let de of ce)N.push(de)}else if(this.castsShadows&&x){let ce=l.extendTileCover(N,oe,x);for(let de of ce)this._shadowCasterTiles[de.key]=!0,N.push(de)}}let Y=this._updateRetainedTiles(N);if(NI(this._source.type)&&N.length!==0){let W={},oe={},ce=Object.keys(Y);for(let Ee of ce){let ge=Y[Ee],Oe=this._tiles[Ee];if(!Oe||Oe.fadeEndTime&&Oe.fadeEndTime<=o.o.now())continue;let Be=this.findLoadedParent(ge,Math.max(ge.overscaledZ-bf.maxOverzooming,this._source.minzoom));Be&&(this._addTile(Be.tileID),W[Be.tileID.key]=Be.tileID),oe[Ee]=ge}let de=N[N.length-1].overscaledZ;for(let Ee in this._tiles){let ge=this._tiles[Ee];if(Y[Ee]||!ge.hasData())continue;let Oe=ge.tileID;for(;Oe.overscaledZ>de;){Oe=Oe.scaledTo(Oe.overscaledZ-1);let Be=this._tiles[Oe.key];if(Be&&Be.hasData()&&oe[Oe.key]){Y[Ee]=ge.tileID;break}}}for(let Ee in W)Y[Ee]||(this._coveredTiles[Ee]=!0,Y[Ee]=W[Ee])}for(let W in Y)this._tiles[W].clearFadeHold();let J=o.bv(this._tiles,Y);for(let W of J){let oe=this._tiles[W];oe.hasSymbolBuckets&&!oe.holdingForFade()?oe.setHoldDuration(this.map._fadeDuration):oe.hasSymbolBuckets&&!oe.symbolFadeFinished()||this._removeTile(+W)}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 _={},x=l.reduce(($,Y)=>Math.min($,Y.overscaledZ),1/0),S=l[0].overscaledZ,A=Math.max(S-bf.maxOverzooming,this._source.minzoom),N=Math.max(S+bf.maxUnderzooming,this._source.minzoom),V={};for(let $ of l){let Y=this._addTile($);p[$.key]=$,Y.hasData()||x=this._source.maxzoom){let W=$.children(this._source.maxzoom)[0],oe=this.getTile(W);if(oe&&oe.hasData()){p[W.key]=W;continue}}else{let W=$.children(this._source.maxzoom);if(p[W[0].key]&&p[W[1].key]&&p[W[2].key]&&p[W[3].key])continue}let J=Y.wasRequested();for(let W=$.overscaledZ-1;W>=A;--W){let oe=$.scaledTo(W);if(_[oe.key]||(_[oe.key]=!0,Y=this.getTile(oe),!Y&&J&&(Y=this._addTile(oe)),Y&&(p[oe.key]=oe,J=Y.wasRequested(),Y.hasData())))break}}return p}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let l in this._tiles){let p=[],_,x=this._tiles[l].tileID;for(;x.overscaledZ>0;){if(x.key in this._loadedParentTiles){_=this._loadedParentTiles[x.key];break}p.push(x.key);let S=x.scaledTo(x.overscaledZ-1);if(_=this._getLoadedTile(S),_)break;x=S}for(let S of p)this._loadedParentTiles[S]=_}}_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 _=!!p;if(!_){let x=this.map?this.map.painter:null,S=this._source.tileSize*l.overscaleFactor();p=this._source.type==="raster-array"?new H1(l,S,this.transform.tileZoom,x,this._isRaster):new Ly(l,S,this.transform.tileZoom,x,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,_||this._source.fire(new o.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 _=p.getExpiryTimeout();_&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},_))}_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,_){let x=[],S=this.transform;if(!S)return x;let A=S.projection.name==="globe",N=o.aF(S.center.lng);for(let V in this._tiles){let $=this._tiles[V];if(_&&$.clearQueryDebugViz(),$.holdingForFade())continue;let Y;if(A){let J=$.tileID.canonical;if(J.z===0){let W=[Math.abs(o.aA(N,...$1(J,-1))-N),Math.abs(o.aA(N,...$1(J,1))-N)];Y=[0,2*W.indexOf(Math.min(...W))-1]}else{let W=[Math.abs(o.aA(N,...$1(J,-1))-N),Math.abs(o.aA(N,...$1(J,0))-N),Math.abs(o.aA(N,...$1(J,1))-N)];Y=[W.indexOf(Math.min(...W))-1]}}else Y=[0];for(let J of Y){let W=l.containsTile($,S,p,J);W&&x.push(W)}}return x}getShadowCasterCoordinates(){return this._getRenderableCoordinates(!1,!0)}getVisibleCoordinates(l){return this._getRenderableCoordinates(l)}_getRenderableCoordinates(l,p){let _=this.getRenderableIds(l,p).map(S=>this._tiles[S].tileID),x=this.transform.projection.name==="globe";for(let S of _)S.projMatrix=this.transform.calculateProjMatrix(S.toUnwrapped()),S.expandedProjMatrix=x?this.transform.calculateProjMatrix(S.toUnwrapped(),!1,!0):S.projMatrix;return _}sortCoordinatesByDistance(l){let p=l.slice(),_=this.transform._camera.position,x=this.transform._camera.forward(),S={};for(let A of p){let N=1/(1<S[A.key]-S[N.key]),p}hasTransition(){if(this._source.hasTransition())return!0;if(NI(this._source.type))for(let l in this._tiles){let p=this._tiles[l];if(p.fadeEndTime!==void 0&&p.fadeEndTime>=o.o.now())return!0}return!1}setFeatureState(l,p,_){this._state.updateState(l=l||"_geojsonTileLayer",p,_)}removeFeatureState(l,p,_){this._state.removeFeatureState(l=l||"_geojsonTileLayer",p,_)}getFeatureState(l,p){return this._state.getState(l=l||"_geojsonTileLayer",p)}setDependencies(l,p,_){let x=this._tiles[l];x&&x.setDependencies(p,_)}reloadTilesForDependencies(l,p){for(let _ in this._tiles)this._tiles[_].hasDependency(l,p)&&this._reloadTile(+_,"reloading");this._cache.filter(_=>!_.hasDependency(l,p))}_preloadTiles(l,p){if(!this._sourceLoaded){let V=()=>{this._sourceLoaded&&(this._source.off("data",V),this._preloadTiles(l,p))};return void this._source.on("data",V)}let _=new Map,x=Array.isArray(l)?l:[l],S=this.map.painter.terrain,A=this.usedForTerrain&&S?S.getScaledDemTileSize():this._source.tileSize;for(let V of x){let $=V.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 Y of $)_.set(Y.key,Y);this.usedForTerrain&&V.updateElevation(!1)}let N=Array.from(_.values());o.bw(N,(V,$)=>{let Y=new Ly(V,this._source.tileSize*V.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster,this._source.worldview);this._loadTile(Y,J=>{this._source.type==="raster-dem"&&Y.dem&&this._backfillDEM(Y),$(J,Y)})},p)}}function HO(y,l){let p=Math.abs(2*y.wrap)-+(y.wrap<0),_=Math.abs(2*l.wrap)-+(l.wrap<0);return y.overscaledZ-l.overscaledZ||_-p||l.canonical.y-y.canonical.y||l.canonical.x-y.canonical.x}function NI(y){return y==="raster"||y==="image"||y==="video"||y==="custom"}function $1(y,l){let p=1<0:_.type==="building"?x=!_.isHidden(l)&&_.paint.get("building-opacity")>0:_.type==="model"&&(x=!_.isHidden(l)&&_.paint.get("model-opacity").constantOr(1)>0),this.layersGotHidden=this.layersGotHidden||!x&&p.visible,p.visible=x}}updateZOffset(l,p){this.currentBuildingBuckets=[];for(let x of this.layers){let S=x.layer,A=this.style.getLayerSourceCache(S),N=1;S.type==="fill-extrusion"?N=x.visible?S.paint.get("fill-extrusion-vertical-scale"):0:S.type==="building"&&(N=x.visible?S.paint.get("building-vertical-scale"):0);let V=A?A.getTile(p):null;if(!V&&A)for(let $ in A._tiles){let Y=A._tiles[$];if(p.canonical.isChildOf(Y.tileID.canonical)){V=Y;break}}this.currentBuildingBuckets.push({bucket:V?V.getBucket(S):null,tileID:V?V.tileID:p,verticalScale:N})}l.hasAnyZOffset=!1;let _=!1;for(let x=0;x{_ in l&&(p[_]=l[_])}),p}function ZA(y){y=y.slice();let l=Object.create(null);for(let p=0;p0?(x-A)/N:0;return this.points[S].mult(1-V).add(this.points[p].mult(V))}}class jO{constructor(l,p,_){let x=this.boxCells=[],S=this.circleCells=[];this.xCellCount=Math.ceil(l/_),this.yCellCount=Math.ceil(p/_);for(let A=0;Athis.width||x<0||p>this.height)return!S&&[];let N=[];if(l<=0&&p<=0&&this.width<=_&&this.height<=x){if(S)return!0;for(let V=0;V0:N}_queryCircle(l,p,_,x,S){let A=l-_,N=l+_,V=p-_,$=p+_;if(N<0||A>this.width||$<0||V>this.height)return!x&&[];let Y=[];return this._forEachCell(A,V,N,$,this._queryCellCircle,Y,{hitTest:x,circle:{x:l,y:p,radius:_},seenUids:{box:{},circle:{}}},S),x?Y.length>0:Y}query(l,p,_,x,S){return this._query(l,p,_,x,!1,S)}hitTest(l,p,_,x,S){return this._query(l,p,_,x,!0,S)}hitTestCircle(l,p,_,x){return this._queryCircle(l,p,_,!0,x)}_queryCell(l,p,_,x,S,A,N,V){let $=N.seenUids,Y=this.boxCells[S];if(Y!==null){let W=this.bboxes;for(let oe of Y)if(!$.box[oe]){$.box[oe]=!0;let ce=4*oe;if(l<=W[ce+2]&&p<=W[ce+3]&&_>=W[ce+0]&&x>=W[ce+1]&&(!V||V(this.boxKeys[oe]))){if(N.hitTest)return A.push(!0),!0;A.push({key:this.boxKeys[oe],x1:W[ce],y1:W[ce+1],x2:W[ce+2],y2:W[ce+3]})}}}let J=this.circleCells[S];if(J!==null){let W=this.circles;for(let oe of J)if(!$.circle[oe]){$.circle[oe]=!0;let ce=3*oe;if(this._circleAndRectCollide(W[ce],W[ce+1],W[ce+2],l,p,_,x)&&(!V||V(this.circleKeys[oe]))){if(N.hitTest)return A.push(!0),!0;{let de=W[ce],Ee=W[ce+1],ge=W[ce+2];A.push({key:this.circleKeys[oe],x1:de-ge,y1:Ee-ge,x2:de+ge,y2:Ee+ge})}}}}}_queryCellCircle(l,p,_,x,S,A,N,V){let $=N.circle,Y=N.seenUids,J=this.boxCells[S];if(J!==null){let oe=this.bboxes;for(let ce of J)if(!Y.box[ce]){Y.box[ce]=!0;let de=4*ce;if(this._circleAndRectCollide($.x,$.y,$.radius,oe[de+0],oe[de+1],oe[de+2],oe[de+3])&&(!V||V(this.boxKeys[ce])))return A.push(!0),!0}}let W=this.circleCells[S];if(W!==null){let oe=this.circles;for(let ce of W)if(!Y.circle[ce]){Y.circle[ce]=!0;let de=3*ce;if(this._circlesCollide(oe[de],oe[de+1],oe[de+2],$.x,$.y,$.radius)&&(!V||V(this.circleKeys[ce])))return A.push(!0),!0}}}_forEachCell(l,p,_,x,S,A,N,V){let $=this._convertToXCellCoord(l),Y=this._convertToYCellCoord(p),J=this._convertToXCellCoord(_),W=this._convertToYCellCoord(x);for(let oe=$;oe<=J;oe++)for(let ce=Y;ce<=W;ce++)if(S.call(this,l,p,_,x,this.xCellCount*ce+oe,A,N,V))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,_,x,S,A){let N=x-l,V=S-p,$=_+A;return $*$>N*N+V*V}_circleAndRectCollide(l,p,_,x,S,A,N){let V=(A-x)/2,$=Math.abs(l-(x+V));if($>V+_)return!1;let Y=(N-S)/2,J=Math.abs(p-(S+Y));if(J>Y+_)return!1;if($<=V||J<=Y)return!0;let W=$-V,oe=J-Y;return W*W+oe*oe<=_*_}}let Y1={unknown:0,flipRequired:1,flipNotRequired:2},FI=Math.tan(85*Math.PI/180);function d_(y,l,p,_,x,S,A){let N=o.bC();if(p)if(S.name==="globe"){let V=o.bD(x,l);o.aB(N,N,V)}else{let V=o.bE([],A);N[0]=V[0],N[1]=V[1],N[4]=V[2],N[5]=V[3],_||o.bB(N,N,x.angle)}else o.aB(N,x.labelPlaneMatrix,y);return N}function qd(y,l,p,_,x,S,A){let N=d_(y,l,p,_,x,S,A);return S.name==="globe"&&p||(N[2]=N[6]=N[10]=N[14]=0),N}function K1(y,l,p,_,x,S,A){if(p){if(S.name==="globe"){let N=d_(y,l,p,_,x,S,A);return o.bl(N,N),o.aB(N,y,N),N}{let N=o.bz(y),V=o.bA([]);return V[0]=A[0],V[1]=A[1],V[4]=A[2],V[5]=A[3],o.aB(N,N,V),_||o.bB(N,N,-x.angle),N}}return x.glCoordMatrix}function Hu(y,l,p,_){let x=[y,l,p,1];p?o.aC(x,x,_):qO(x,x,_);let S=x[3];return x[0]/=S,x[1]/=S,x[2]/=S,x}function lb(y,l){return Math.min(.5+y/l*.5,1.5)}function Qm(y,l){let p=y[0]/y[3],_=y[1]/y[3];return p>=-l[0]&&p<=l[0]&&_>=-l[1]&&_<=l[1]}function Oh(y,l,p,_,x,S,A,N,V,$){let Y=p.transform,J=_?y.textSizeData:y.iconSizeData,W=o.bK(J,p.transform.zoom),oe=Y.projection.name==="globe",ce=[256/p.width*2+1,256/p.height*2+1],de=_?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;de.clear();let Ee=null;oe&&(Ee=_?y.text.globeExtVertexArray:y.icon.globeExtVertexArray);let ge=y.lineVertexArray,Oe=_?y.text.placedSymbolArray:y.icon.placedSymbolArray,Be=p.transform.width/p.transform.height,He,nt=!1;for(let et=0;etMath.abs(p)?{useVertical:!0}:y===o.bL.vertical?_>0?{needsFlipping:!0}:null:l!==Y1.unknown&&(function(x,S){return x===0||Math.abs(S/x)>FI})(p,_)?l===Y1.flipRequired?{needsFlipping:!0}:null:p<0?{needsFlipping:!0}:null}function Xa(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge,Oe,Be){let He=l/24,nt=y.lineOffsetX*He,et=y.lineOffsetY*He,{lineStartIndex:at,glyphStartIndex:tt,numGlyphs:Xe,segment:it,writingMode:Wt,flipState:Nt}=y,mi=at+y.lineLength,jt=ci=>{if(Y){let[Si,Jt,Gi]=ci.up,sn=$.length;o.bN(Y,sn+0,Si,Jt,Gi),o.bN(Y,sn+1,Si,Jt,Gi),o.bN(Y,sn+2,Si,Jt,Gi),o.bN(Y,sn+3,Si,Jt,Gi)}let[cn,qt,Dt]=ci.point;o.bO($,cn,qt,Dt,ci.angle)};if(Xe>1){let ci=LI(He,N,nt,et,p,J,W,y,V,S,oe,de,!1,Ee,ge,Oe,Be);if(!ci)return{notEnoughRoom:!0};if(_&&!p){let[cn,qt,Dt]=ci.first.point,[Si,Jt,Gi]=ci.last.point;[cn,qt]=Hu(cn,qt,Dt,A),[Si,Jt]=Hu(Si,Jt,Gi,A);let sn=eD(Wt,Nt,(Si-cn)*ce,Jt-qt);if(y.flipState=sn&&sn.needsFlipping?Y1.flipRequired:Y1.flipNotRequired,sn)return sn}jt(ci.first);for(let cn=tt+1;cn0?Si:$O(W,Dt,cn,1,x,void 0,Ee,ge.canonical),Gi=eD(Wt,Nt,(Jt[0]-cn[0])*ce,Jt[1]-cn[1]);if(y.flipState=Gi&&Gi.needsFlipping?Y1.flipRequired:Y1.flipNotRequired,Gi)return Gi}let ci=BI(He*N.getoffsetX(tt),nt,et,p,J,W,it,at,mi,V,S,oe,de,!1,!1,Ee,ge,Oe,Be);if(!ci)return{notEnoughRoom:!0};jt(ci)}return{}}function tD(y,l,p,_,x){let{x:S,y:A,z:N}=_.projectTilePoint(y.x,y.y,l);if(!x)return Hu(S,A,N,p);let[V,$,Y]=x(y);return Hu(S+V,A+$,N+Y,p)}function $O(y,l,p,_,x,S,A,N){let V=tD(y.sub(l)._unit()._add(y),N,x,A,S);return o.av(V,p,V),o.aw(V,V),o.bH(V,p,V,_)}function BI(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge,Oe){let Be=_?y-l:y+l,He=Be>0?1:-1,nt=0;_&&(He*=-1,nt=Math.PI),He<0&&(nt+=Math.PI);let et=N+A+(He>0?0:1)|0,at=x,tt=x,Xe=0,it=0,Wt=Math.abs(Be),Nt=[],mi=[],jt=S,ci=jt,cn=o.bF([]),qt=()=>$O(ci,jt,tt,Wt-Xe+1,Y,W,de,Ee.canonical);for(;Xe+it<=Wt;){if(et+=He,et=V)return null;if(tt=at,ci=jt,Nt.push(tt),oe&&mi.push(ci),jt=new o.P($.getx(et),$.gety(et)),at=J[et],!at){let er=tD(jt,Ee.canonical,Y,de,W);at=er[3]>0?J[et]=er:qt()}Xe+=it;let Zi=o.av([],at,tt),or=o.bG(tt,at);if(p&&or>0&&it>0&&o.bJ(cn,Zi)/(it*or)0,Be),at=$*et.perspectiveRatio,tt=(_.x1*p+N.x-_.padding)*at+et.point.x,Xe=(_.y1*p+N.y-_.padding)*at+et.point.y,it=(_.x2*p+N.x+_.padding)*at+et.point.x,Wt=(_.y2*p+N.y+_.padding)*at+et.point.y,Nt=et.perspectiveRatio<=.55||et.occluded;return!this.isInsideGrid(tt,Xe,it,Wt)||!V&&this.grid.hitTest(tt,Xe,it,Wt,J)||Nt?{box:[],offscreen:!1,occluded:et.occluded}:{box:[tt,Xe,it,Wt],offscreen:this.isOffscreen(tt,Xe,it,Wt),occluded:!1}}placeCollisionCircles(l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de){let Ee=[],ge=this.transform.elevation,Oe=l.getProjection(),Be=ge?ge.getAtTileOffsetFunc(de,this.transform.center.lat,this.transform.worldSize,Oe):null,He=new o.P(_.tileAnchorX,_.tileAnchorY),{x:nt,y:et,z:at}=Oe.projectTilePoint(He.x,He.y,de.canonical);if(Be){let[Gi,sn,Mn]=Be(He);nt+=Gi,et+=sn,at+=Mn}let tt=Oe.name==="globe",Xe=this.projectAndGetPerspectiveRatio(N,nt,et,at,de,tt||!!ge||this.transform.pitch>0,Oe),{perspectiveRatio:it}=Xe,Wt=(J?A/it:A*it)/o.bX,Nt=Hu(nt,et,at,V),mi=_.lineOffsetX*Wt,jt=_.lineOffsetY*Wt,ci=o.an(l.layers[0].layout.get("text-max-angle")),cn=Math.cos(ci),qt=Xe.signedDistanceFromCamera>0?LI(Wt,S,mi,jt,!1,Nt,He,_,x,V,{},ge&&!J?Be:null,J&&!!ge,Oe,de,J,cn):null,Dt=!1,Si=!1,Jt=!0;if(qt&&!Xe.occluded){let Gi=.5*oe*it+ce,sn=new o.P(-100,-100),Mn=new o.P(this.screenRightBoundary,this.screenBottomBoundary),en=new e3,{first:Zi,last:or}=qt,er=Zi.path.length,nr=[];for(let go=er-1;go>=1;go--)nr.push(Zi.path[go]);for(let go=1;go(Be&&!tt&&(ss=Be(aogo[3]<=0)&&(nr=[]));let Zr=[];if(nr.length>0){let go=1/0,Co=-1/0,ss=1/0,ao=-1/0;for(let Ea of nr)go=Math.min(go,Ea[0]),ss=Math.min(ss,Ea[1]),Co=Math.max(Co,Ea[0]),ao=Math.max(ao,Ea[1]);Co>=sn.x&&go<=Mn.x&&ao>=sn.y&&ss<=Mn.y&&(Zr=[nr.map(Ea=>new o.P(Ea[0],Ea[1]))],(goMn.x||ssMn.y)&&(Zr=o.bV(Zr,sn.x,sn.y,Mn.x,Mn.y)))}for(let go of Zr){en.reset(go,.25*Gi);let Co=0;Co=en.length<=.5*Gi?1:Math.ceil(en.paddedLength/Wn)+1;for(let ss=0;ss0?(o.aC(V,V,l),this.fogState&&S&&N.name!=="globe"&&($=(function(W,oe,ce,de,Ee,ge){let Oe=ge.calculateFogTileMatrix(Ee),Be=[oe,ce,de];return o.af(Be,Be,Oe),Pr(W,o.ag(Be),ge.pitch,ge._fov)})(this.fogState,p,_,x,S.toUnwrapped(),this.transform)>.9)):qO(V,V,l);let Y=V[3];return{point:new o.P((V[0]/Y+1)/2*this.transform.width+hd,(-V[1]/Y+1)/2*this.transform.height+hd),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(N)/Y*.5,1.5),signedDistanceFromCamera:Y,occluded:A&&V[2]>Y||$}}isOffscreen(l,p,_,x){return _=this.screenRightBoundary||xthis.screenBottomBoundary}isInsideGrid(l,p,_,x){return _>=0&&l=0&&p_.collisionGroupID===p}}return this.collisionGroups[l]}}function By(y,l,p,_,x){let{horizontalAlign:S,verticalAlign:A}=o.c0(y),N=-(S-.5)*l,V=-(A-.5)*p,$=o.c1(y,_);return new o.P(N+$[0]*x,V+$[1]*x)}function Ga(y,l,p,_,x){let S=new o.P(y,l);return p&&S._rotate(_?x:-x),S}class W1{constructor(l,p,_,x,S,A){this.transform=l.clone(),this.projection=l.projection.name,this.collisionIndex=new u_(this.transform,S),this.buildingIndex=A,this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=p,this.retainedQueryData={},this.collisionGroups=new uu(_),this.collisionCircleArrays={},this.prevPlacement=x,x&&(x.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(l,p,_,x,S=1){let A=_.getBucket(p),N=_.latestFeatureIndex;if(!A||!N||p.fqid!==A.layerIds[0])return;let V=A.layers[0].layout,$=A.layers[0].paint,Y=_.collisionBoxArray,J=Math.pow(2,this.transform.zoom-_.tileID.overscaledZ),W=_.tileSize/o.al,oe=_.tileID.toUnwrapped();this.transform.setProjection(A.projection);let ce=(de=_.tileID,Ee=A.getProjection(),ge=this.transform,Ee.name===this.projection?ge.calculateProjMatrix(de.toUnwrapped()):JA(ge,Ee,de));var de,Ee,ge;let Oe=V.get("text-pitch-alignment")==="map",Be=V.get("text-rotation-alignment")==="map";p.compileFilter(p.options);let He=p.dynamicFilter(),nt=p.dynamicFilterNeedsFeature(),et=this.transform.calculatePixelsToTileUnitsMatrix(_),at=qd(ce,_.tileID.canonical,Oe,Be,this.transform,A.getProjection(),et),tt=null,Xe=A.getProjection().createInversionMatrix(this.transform,_.tileID.canonical);if(Oe){let Dt=K1(ce,_.tileID.canonical,Oe,Be,this.transform,A.getProjection(),et);tt=o.aB([],this.transform.labelPlaneMatrix,Dt)}let it=null;He&&_.latestFeatureIndex&&(it={unwrappedTileID:oe,dynamicFilter:He,dynamicFilterNeedsFeature:nt}),this.retainedQueryData[A.bucketInstanceId]=new Do(A.bucketInstanceId,N,A.sourceLayerIndex,A.index,_.tileID);let[Wt,Nt]=A.layers[0].layout.get("text-size-scale-range"),mi=o.aA(S,Wt,Nt),[jt,ci]=V.get("icon-size-scale-range"),cn=o.aA(S,jt,ci),qt={bucket:A,layout:V,paint:$,posMatrix:ce,invMatrix:Xe,mercatorCenter:[o.aF(this.transform.center.lng),o.aJ(this.transform.center.lat)],textLabelPlaneMatrix:at,labelToScreenMatrix:tt,clippingData:it,scale:J,textPixelRatio:W,holdingForFade:_.holdingForFade(),collisionBoxArray:Y,partiallyEvaluatedTextSize:o.bK(A.textSizeData,this.transform.zoom,mi),partiallyEvaluatedIconSize:o.bK(A.iconSizeData,this.transform.zoom,cn),collisionGroup:this.collisionGroups.get(A.sourceID),latestFeatureIndex:_.latestFeatureIndex};if(x)for(let Dt of A.sortKeyRanges){let{sortKey:Si,symbolInstanceStart:Jt,symbolInstanceEnd:Gi}=Dt;l.push({sortKey:Si,symbolInstanceStart:Jt,symbolInstanceEnd:Gi,parameters:qt})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:A.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge,Oe,Be,He,nt){let{textOffset0:et,textOffset1:at,crossTileID:tt}=de,Xe=[et,at],it=By(l,A,N,Xe,V),Wt=this.collisionIndex.placeCollisionBox(ge,V,p,_,x,S,Ga(it.x,it.y,$,Y,this.transform.angle),ce,J,W,oe.predicate);if(Be){let Nt=ge.getSymbolInstanceIconSize(nt,this.transform.zoom,de.placedIconSymbolIndex);if(this.collisionIndex.placeCollisionBox(ge,Nt,Be,_,x,S,Ga(it.x,it.y,$,Y,this.transform.angle),ce,J,W,oe.predicate).box.length===0)return}if(Wt.box.length>0){let Nt;return this.prevPlacement&&this.prevPlacement.variableOffsets[tt]&&this.prevPlacement.placements[tt]&&this.prevPlacement.placements[tt].text&&(Nt=this.prevPlacement.variableOffsets[tt].anchor),this.variableOffsets[tt]={textOffset:Xe,width:A,height:N,anchor:l,textScale:V,prevAnchor:Nt},this.markUsedJustification(ge,l,de,Oe),ge.allowVerticalPlacement&&(this.markUsedOrientation(ge,Oe,de),this.placedOrientations[tt]=Oe),{shift:it,placedGlyphBoxes:Wt}}}placeLayerBucketPart(l,p,_,x,S=1){let{bucket:A,layout:N,paint:V,posMatrix:$,textLabelPlaneMatrix:Y,labelToScreenMatrix:J,clippingData:W,textPixelRatio:oe,mercatorCenter:ce,invMatrix:de,holdingForFade:Ee,collisionBoxArray:ge,partiallyEvaluatedTextSize:Oe,partiallyEvaluatedIconSize:Be,collisionGroup:He,latestFeatureIndex:nt}=l.parameters,et=N.get("text-optional"),at=N.get("icon-optional"),tt=N.get("text-allow-overlap"),Xe=N.get("icon-allow-overlap"),it=N.get("text-rotation-alignment")==="map",Wt=N.get("icon-rotation-alignment")==="map",Nt=N.get("text-pitch-alignment")==="map",mi=V.get("symbol-z-offset"),jt=N.get("symbol-elevation-reference")==="sea",ci=N.get("symbol-placement"),[cn,qt]=N.get("text-size-scale-range"),[Dt,Si]=N.get("icon-size-scale-range"),Jt=o.aA(S,cn,qt),Gi=o.aA(S,Dt,Si),sn=N.get("text-variable-anchor"),Mn=it&&ci!=="point",en=Wt&&ci!=="point",Zi=sn&&A.hasTextData(),or=A.hasIconTextFit()&&Zi&&A.hasIconData();this.transform.setProjection(A.projection);let er=Zi||Mn,nr=en||or,Wn=tt&&(Xe||!A.hasIconData()||at),Zr=Xe&&(tt||!A.hasTextData()||et),go=!mi.isConstant();!A.collisionArrays&&ge&&A.deserializeCollisionBoxes(ge),_&&x&&A.updateCollisionDebugBuffers(this.transform.zoom,ge,Jt,Gi);let Co=(ao,Ea,Ja)=>{let{crossTileID:ml,numVerticalGlyphVertices:_o}=ao,za=null;if(W&&W.dynamicFilterNeedsFeature||go){let cc=this.retainedQueryData[A.bucketInstanceId];za=nt.loadFeature({featureIndex:ao.featureIndex,bucketIndex:cc.bucketIndex,sourceLayerIndex:cc.sourceLayerIndex,layoutVertexArrayOffset:0})}if(W&&!(0,W.dynamicFilter)({zoom:this.transform.zoom,pitch:this.transform.pitch},za,this.retainedQueryData[A.bucketInstanceId].tileID.canonical,new o.P(ao.tileAnchorX,ao.tileAnchorY),this.transform.calculateDistanceTileData(W.unwrappedTileID)))return this.placements[ml]=new ir(!1,!1,!1,!0),void p.add(ml);let wa=mi.evaluate(za,{});if(p.has(ml))return;if(Ee)return void(this.placements[ml]=new ir(!1,!1,!1));let Ua=!1,bl=!1,wc=!0,Yd=!1,Cl=!1,xo=null,Lr={box:null,offscreen:null,occluded:null},ls={box:null},Zl=null,xl=null,Jc=null,Md=0,kf=0,Mf=0;Ja.textFeatureIndex?Md=Ja.textFeatureIndex:ao.useRuntimeCollisionCircles&&(Md=ao.featureIndex),Ja.verticalTextFeatureIndex&&(kf=Ja.verticalTextFeatureIndex);let Lh=cc=>{cc.tileID=this.retainedQueryData[A.bucketInstanceId].tileID;let Ic=this.transform.elevation;cc.elevation=jt?wa:wa+(Ic?Ic.getAtTileOffset(cc.tileID,cc.tileAnchorX,cc.tileAnchorY):0),cc.elevation+=ao.zOffset},Bh=Ja.textBox;if(Bh){Lh(Bh);let cc=Ol=>{let gd=o.bL.horizontal;if(A.allowVerticalPlacement&&!Ol&&this.prevPlacement){let Kd=this.prevPlacement.placedOrientations[ml];Kd&&(this.placedOrientations[ml]=Kd,gd=Kd,this.markUsedOrientation(A,gd,ao))}return gd},Ic=(Ol,gd)=>{if(A.allowVerticalPlacement&&_o>0&&Ja.verticalTextBox){for(let Kd of A.writingModes)if(Kd===o.bL.vertical?(Lr=gd(),ls=Lr):Lr=Ol(),Lr&&Lr.box&&Lr.box.length)break}else Lr=Ol()};if(sn){let Ol=sn;if(this.prevPlacement&&this.prevPlacement.variableOffsets[ml]){let $c=this.prevPlacement.variableOffsets[ml];Ol.indexOf($c.anchor)>0&&(Ol=Ol.filter(up=>up!==$c.anchor),Ol.unshift($c.anchor))}let gd=($c,up,V0)=>{let ev=A.getSymbolInstanceTextSize(Oe,ao,this.transform.zoom,Ea),Tg=($c.x2-$c.x1)*ev+2*$c.padding,tv=($c.y2-$c.y1)*ev+2*$c.padding,wb=ao.hasIconTextFit&&!Xe?up:null;wb&&Lh(wb);let z0={box:[],offscreen:!1,occluded:!1},IS=tt?2*Ol.length:Ol.length;for(let iv=0;iv=Ol.length,ao,Ea,A,V0,wb,Oe,Be);if(Of&&(z0=Of.placedGlyphBoxes,z0&&z0.box&&z0.box.length)){Ua=!0,xo=Of.shift;break}}return z0};Ic(()=>gd(Bh,Ja.iconBox,o.bL.horizontal),()=>{let $c=Ja.verticalTextBox;return $c&&Lh($c),A.allowVerticalPlacement&&!(Lr&&Lr.box&&Lr.box.length)&&_o>0&&$c?gd($c,Ja.verticalIconBox,o.bL.vertical):{box:null,offscreen:null,occluded:null}}),Lr&&(Ua=Lr.box,wc=Lr.offscreen,Yd=Lr.occluded);let Kd=cc(!(!Lr||!Lr.box));if(!Ua&&this.prevPlacement){let $c=this.prevPlacement.variableOffsets[ml];$c&&(this.variableOffsets[ml]=$c,this.markUsedJustification(A,$c.anchor,ao,Kd))}}else{let Ol=(gd,Kd)=>{let $c=A.getSymbolInstanceTextSize(Oe,ao,this.transform.zoom,Ea),up=this.collisionIndex.placeCollisionBox(A,$c,gd,ce,de,er,new o.P(0,0),tt,oe,$,He.predicate);return up&&up.box&&up.box.length&&(this.markUsedOrientation(A,Kd,ao),this.placedOrientations[ml]=Kd),up};Ic(()=>Ol(Bh,o.bL.horizontal),()=>{let gd=Ja.verticalTextBox;return A.allowVerticalPlacement&&_o>0&&gd?(Lh(gd),Ol(gd,o.bL.vertical)):{box:null,offscreen:null,occluded:null}}),cc(!!(Lr&&Lr.box&&Lr.box.length))}}if(Zl=Lr,Ua=Zl&&Zl.box&&Zl.box.length>0,wc=Zl&&Zl.offscreen,Yd=Zl&&Zl.occluded,ao.useRuntimeCollisionCircles){let cc=A.text.placedSymbolArray.get(ao.centerJustifiedTextSymbolIndex>=0?ao.centerJustifiedTextSymbolIndex:ao.verticalPlacedTextSymbolIndex),Ic=o.bM(A.textSizeData,Oe,cc),Ol=N.get("text-padding");xl=this.collisionIndex.placeCollisionCircles(A,tt,cc,A.lineVertexArray,A.glyphOffsetArray,Ic,$,Y,J,_,Nt,He.predicate,ao.collisionCircleDiameter*Ic/o.bX,Ol,this.retainedQueryData[A.bucketInstanceId].tileID),Ua=tt||xl.circles.length>0&&!xl.collisionDetected,wc=wc&&xl.offscreen,Yd=xl.occluded}if(Ja.iconFeatureIndex&&(Mf=Ja.iconFeatureIndex),Ja.iconBox){let cc=Ic=>{Lh(Ic);let Ol=ao.hasIconTextFit&&xo?Ga(xo.x,xo.y,it,Nt,this.transform.angle):new o.P(0,0),gd=A.getSymbolInstanceIconSize(Be,this.transform.zoom,ao.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(A,gd,Ic,ce,de,nr,Ol,Xe,oe,$,He.predicate)};ls&&ls.box&&ls.box.length&&Ja.verticalIconBox?(Jc=cc(Ja.verticalIconBox),bl=Jc.box.length>0):(Jc=cc(Ja.iconBox),bl=Jc.box.length>0),wc=wc&&Jc.offscreen,Cl=Jc.occluded}let um=et||ao.numHorizontalGlyphVertices===0&&_o===0,Ig=at||ao.numIconVertices===0;if(um||Ig?Ig?um||(bl=bl&&Ua):Ua=bl&&Ua:bl=Ua=bl&&Ua,Ua&&Zl&&Zl.box&&this.collisionIndex.insertCollisionBox(Zl.box,N.get("text-ignore-placement"),A.bucketInstanceId,ls&&ls.box&&kf?kf:Md,He.ID),bl&&Jc&&this.collisionIndex.insertCollisionBox(Jc.box,N.get("icon-ignore-placement"),A.bucketInstanceId,Mf,He.ID),xl&&(Ua&&this.collisionIndex.insertCollisionCircles(xl.circles,N.get("text-ignore-placement"),A.bucketInstanceId,Md,He.ID),_)){let cc=A.bucketInstanceId,Ic=this.collisionCircleArrays[cc];Ic===void 0&&(Ic=this.collisionCircleArrays[cc]=new Ha);for(let Ol=0;Ol=0;--Ea){let Ja=ao[Ea];Co(A.symbolInstances.get(Ja),Ja,A.collisionArrays[Ja])}A.hasAnyZOffset&&o.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 ao=A.getSortedIndexesByZOffset();for(let Ea=0;Ea=0&&(l.text.placedSymbolArray.get(S).crossTileID=J>=0&&S!==J?0:$),A>=0&&(l.text.placedSymbolArray.get(A).crossTileID=J>=0&&A!==J?0:$),N>=0&&(l.text.placedSymbolArray.get(N).crossTileID=J>=0&&N!==J?0:$),V>=0&&(l.text.placedSymbolArray.get(V).crossTileID=J>=0&&V!==J?0:$)}markUsedOrientation(l,p,_){let x=p===o.bL.horizontal||p===o.bL.horizontalOnly?p:0,S=p===o.bL.vertical?p:0,{leftJustifiedTextSymbolIndex:A,centerJustifiedTextSymbolIndex:N,rightJustifiedTextSymbolIndex:V,verticalPlacedTextSymbolIndex:$}=_,Y=l.text.placedSymbolArray;A>=0&&(Y.get(A).placedOrientation=x),N>=0&&(Y.get(N).placedOrientation=x),V>=0&&(Y.get(V).placedOrientation=x),$>=0&&(Y.get($).placedOrientation=S)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;let p=this.prevPlacement,_=!1;this.prevZoomAdjustment=p?p.zoomAdjustment(this.transform.zoom):0;let x=p?p.symbolFadeChange(l):1,S=p?p.opacities:{},A=p?p.variableOffsets:{},N=p?p.placedOrientations:{};for(let V in this.placements){let $=this.placements[V],Y=S[V];Y?(this.opacities[V]=new kp(Y,x,$.text,$.icon,null,$.clipped),_=_||$.text!==Y.text.placed||$.icon!==Y.icon.placed):(this.opacities[V]=new kp(null,x,$.text,$.icon,$.skipFade,$.clipped),_=_||$.text||$.icon)}for(let V in S){let $=S[V];if(!this.opacities[V]){let Y=new kp($,x,!1,!1);Y.isHidden()||(this.opacities[V]=Y,_=_||$.text.placed||$.icon.placed)}}for(let V in A)this.variableOffsets[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.variableOffsets[V]=A[V]);for(let V in N)this.placedOrientations[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.placedOrientations[V]=N[V]);_?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=p?p.lastPlacementChangeTime:l)}updateLayerOpacities(l,p,_,x){let S=new Set;for(let A of p){let N=A.getBucket(l);N&&A.latestFeatureIndex&&l.fqid===N.layerIds[0]&&(this.updateBucketOpacities(N,S,A,A.collisionBoxArray,_,x,A.tileID,l.scope),N.elevationType==="offset"&&this.buildingIndex&&this.buildingIndex.updateZOffset(N,A.tileID),N.elevationType==="road"&&N.updateRoadElevation(A.tileID.canonical),N.updateZOffset())}}updateBucketOpacities(l,p,_,x,S,A,N,V){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 $=l.layers[0].layout,Y=l.layers[0].paint,J=!!l.layers[0].dynamicFilter(),W=new kp(null,0,!1,!1,!0),oe=$.get("text-allow-overlap"),ce=$.get("icon-allow-overlap"),de=$.get("text-variable-anchor"),Ee=$.get("text-rotation-alignment")==="map",ge=$.get("text-pitch-alignment")==="map",Oe=Y.get("symbol-z-offset"),Be=$.get("symbol-elevation-reference")==="sea",He=!Oe.isConstant(),nt=new kp(null,0,oe&&(ce||!l.hasIconData()||$.get("icon-optional")),ce&&(oe||!l.hasTextData()||$.get("text-optional")),!0);!l.collisionArrays&&x&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(x);let et=(tt,Xe,it)=>{for(let Wt=0;Wt0||Wt>0,sn=mi>0,Mn=this.placedOrientations[Nt],en=Mn===o.bL.vertical,Zi=Mn===o.bL.horizontal||Mn===o.bL.horizontalOnly;!Gi&&!sn||Jt.isHidden()||at++;let or=!1;if((Gi||sn)&&A)for(let er of l.activeReplacements){if(o.bY(er,S,o.bZ.Symbol,V)||er.min.x>jt||jt>er.max.x||er.min.y>ci||ci>er.max.y)continue;let nr=o.b_(jt,ci,N.canonical,er.footprintTileId.canonical);if(or=o.b$(nr,er.footprint),or)break}if(Gi){let er=or?I0:Z1(Jt.text);et(l.text,it,en?I0:er),et(l.text,Wt,Zi?I0:er);let nr=Jt.text.isHidden(),{leftJustifiedTextSymbolIndex:Wn,centerJustifiedTextSymbolIndex:Zr,rightJustifiedTextSymbolIndex:go,verticalPlacedTextSymbolIndex:Co}=Xe,ss=l.text.placedSymbolArray,ao=nr||en?1:0;Wn>=0&&(ss.get(Wn).hidden=ao),Zr>=0&&(ss.get(Zr).hidden=ao),go>=0&&(ss.get(go).hidden=ao),Co>=0&&(ss.get(Co).hidden=nr||Zi?1:0);let Ea=this.variableOffsets[Nt];Ea&&this.markUsedJustification(l,Ea.anchor,Xe,Mn);let Ja=this.placedOrientations[Nt];Ja&&(this.markUsedJustification(l,"left",Xe,Ja),this.markUsedOrientation(l,Ja,Xe))}if(sn){let er=or?I0:Z1(Jt.icon),{placedIconSymbolIndex:nr,verticalPlacedIconSymbolIndex:Wn}=Xe,Zr=l.icon.placedSymbolArray,go=Jt.icon.isHidden()?1:0;nr>=0&&(et(l.icon,mi,en?I0:er),Zr.get(nr).hidden=go),Wn>=0&&(et(l.icon,Xe.numVerticalIconVertices,Zi?I0:er),Zr.get(Wn).hidden=go)}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){let er=l.collisionArrays[tt];if(er){let nr=new o.P(0,0),Wn=!0;if(er.textBox||er.verticalTextBox){if(de){let go=this.variableOffsets[Nt];go?(nr=By(go.anchor,go.width,go.height,go.textOffset,go.textScale),Ee&&nr._rotate(ge?this.transform.angle:-this.transform.angle)):Wn=!1}J&&(Wn=!Jt.clipped),er.textBox&&cb(l.textCollisionBox.collisionVertexArray,Jt.text.placed,!Wn||en,Dt,Be,nr.x,nr.y),er.verticalTextBox&&cb(l.textCollisionBox.collisionVertexArray,Jt.text.placed,!Wn||Zi,Dt,Be,nr.x,nr.y)}let Zr=Wn&&!!(!Zi&&er.verticalIconBox);er.iconBox&&cb(l.iconCollisionBox.collisionVertexArray,Jt.icon.placed,Zr,Dt,Be,Xe.hasIconTextFit?nr.x:0,Xe.hasIconTextFit?nr.y:0),er.verticalIconBox&&cb(l.iconCollisionBox.collisionVertexArray,Jt.icon.placed,!Zr,Dt,Be,Xe.hasIconTextFit?nr.x:0,Xe.hasIconTextFit?nr.y:0)}}}if(l.fullyClipped=at===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 tt=this.collisionCircleArrays[l.bucketInstanceId];l.placementInvProjMatrix=tt.invProjMatrix,l.placementViewportMatrix=tt.viewportMatrix,l.collisionCircleArray=tt.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 cb(y,l,p,_,x,S,A){y.emplaceBack(l?1:0,p?1:0,S||0,A||0,_,x?1:0),y.emplaceBack(l?1:0,p?1:0,S||0,A||0,_,x?1:0),y.emplaceBack(l?1:0,p?1:0,S||0,A||0,_,x?1:0),y.emplaceBack(l?1:0,p?1:0,S||0,A||0,_,x?1:0)}let zI=Math.pow(2,25),Mp=Math.pow(2,24),sd=Math.pow(2,17),iD=Math.pow(2,16),w0=Math.pow(2,9),YO=Math.pow(2,8),Q1=Math.pow(2,1);function Z1(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;let l=y.placed?1:0,p=Math.floor(127*y.opacity);return p*zI+l*Mp+p*sd+l*iD+p*w0+l*YO+p*Q1+l}let I0=0;class X1{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,_,x,S,A){let N=this._bucketParts;for(;this._currentTileIndexV.sortKey-$.sortKey));this._currentPartIndex{let V=o.o.now()-A;return!this._forceFullPlacement&&V>2};for(;this._currentPlacementIndex>=0;){let V=p[l[this._currentPlacementIndex]],$=this.placement.collisionIndex.transform.zoom;if(V.type==="symbol"&&(!V.minzoom||V.minzoom<=$)&&(!V.maxzoom||V.maxzoom>$)){let Y=V,J=Y.layout.get("symbol-z-elevate"),W=Y.layout.get("symbol-sort-key").constantOr(1)!==void 0,oe=Y.layout.get("symbol-z-order"),ce=oe==="viewport-y"||oe==="auto"&&!(oe!=="viewport-y"&&W),de=Y.layout.get("text-allow-overlap")||Y.layout.get("icon-allow-overlap")||Y.layout.get("text-ignore-placement")||Y.layout.get("icon-ignore-placement"),Ee=ce&&de,ge=this._inProgressLayer=this._inProgressLayer||new X1(Y),Oe=o.B(V.source,V.scope);if(ge.continuePlacement(J||Ee?x[Oe]:_[Oe],this.placement,this._showCollisionBoxes,V,N,S))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}let p_=512/o.al/2;class Rp{constructor(l,p,_){this.tileID=l,this.bucketInstanceId=_,this.index=new o.c3(p.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];let x=l.canonical.x*o.al,S=l.canonical.y*o.al;for(let A=0;AEe-ge);for(let Ee of de){let ge=this.crossTileIDs[Ee];if(this.keys[Ee]===Y&&!_.has(ge)){_.add(ge),$.crossTileID=ge;break}}}}}class nD{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class J1{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){let p=Math.round((l-this.lng)/360);if(p!==0)for(let _ in this.indexes){let x=this.indexes[_],S={};for(let A in x){let N=x[A];N.tileID=N.tileID.unwrapTo(N.tileID.wrap+p),S[N.tileID.key]=N}this.indexes[_]=S}this.lng=l}addBucket(l,p,_){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 S=0;Sl.overscaledZ)for(let N in A){let V=A[N];V.tileID.isChildOf(l)&&V.findMatches(p.symbolInstances,l,x)}else{let N=A[l.scaledTo(Number(S)).key];N&&N.findMatches(p.symbolInstances,l,x)}}for(let S=0;S{p[_]=!0});for(let _ in this.layerIndexes)p[_]||delete this.layerIndexes[_]}}let jc=771;class po{constructor(l,p,_,x){this.blendFunction=l,this.blendColor=p.toNonPremultipliedRenderColor(null),this.mask=_,this.blendEquation=x}}po.Replace=[1,0,1,0],po.disabled=new po(po.Replace,o.ao.transparent,[!1,!1,!1,!1]),po.unblended=new po(po.Replace,o.ao.transparent,[!0,!0,!0,!0]),po.alphaBlended=new po([1,jc,1,jc],o.ao.transparent,[!0,!0,!0,!0]),po.alphaBlendedNonPremultiplied=new po([770,jc,770,jc],o.ao.transparent,[!0,!0,!0,!0]),po.multiply=new po([774,0,774,0],o.ao.transparent,[!0,!0,!0,!0]);class Rn{constructor(l,p,_){this.func=l,this.mask=p,this.range=_}}Rn.ReadOnly=!1,Rn.ReadWrite=!0,Rn.disabled=new Rn(519,Rn.ReadOnly,[0,1]);let eS=7680;class Nr{constructor(l,p,_,x,S,A){this.test=l,this.ref=p,this.mask=_,this.fail=x,this.depthFail=S,this.pass=A}}Nr.disabled=new Nr({func:519,mask:0},0,0,eS,eS,eS);let GC=1029,tS=2305;class jr{constructor(l,p,_){this.enable=l,this.mode=p,this.frontFace=_}}function KO(y,l){let p=o.c9(y,3);o.cb(y,l),o.cf(y,3,p)}function UI(y,l){let p=o.c6([]);return o.c7(p,p,-l),o.c8(p,p,-y),p}function T0(y,l){let p=[y[0],y[1],0],_=[l[0],l[1],0];if(o.ag(p)>=1e-15){let A=o.aw([],p);o.c4(_,A,o.bJ(_,A)),l[0]=_[0],l[1]=_[1]}let x=o.bI([],l,y);if(o.c5(x)<1e-15)return null;let S=Math.atan2(-x[1],x[0]);return UI(Math.atan2(Math.sqrt(y[0]*y[0]+y[1]*y[1]),-y[2]),S)}jr.disabled=new jr(!1,GC,tS),jr.backCCW=new jr(!0,GC,tS),jr.backCW=new jr(!0,GC,2304),jr.frontCW=new jr(!0,1028,2304),jr.frontCCW=new jr(!0,1028,tS);class WO{constructor(l,p){this.position=l,this.orientation=p}get position(){return this._position}set position(l){if(l){let p=l instanceof o.ae?l:new o.ae(l[0],l[1],l[2]);this._renderWorldCopies&&(p.x=o.bT(p.x,0,1)),this._position=p}else this._position=null}lookAtPoint(l,p){if(this.orientation=null,!this.position)return;let _=this.position,x=this._elevation?this._elevation.getAtPointOrZero(o.ae.fromLngLat(l)):0,S=o.ae.fromLngLat(l,x),A=[S.x-_.x,S.y-_.y,S.z-_.z];p||(p=[0,0,1]),p[2]=Math.abs(p[2]),this.orientation=T0(A,p)}setPitchBearing(l,p){this.orientation=UI(o.an(l),o.an(-p))}}class rD{constructor(l,p){this._transform=o.bA([]),this.orientation=p,this.position=l}get mercatorPosition(){let l=this.position;return new o.ae(l[0],l[1],l[2])}get position(){let l=o.c9(this._transform,3);return[l[0],l[1],l[2]]}set position(l){var p;l&&o.cf(this._transform,3,[(p=l)[0],p[1],p[2],1])}get orientation(){return this._orientation}set orientation(l){this._orientation=l||o.c6([]),l&&KO(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=UI(l,p),KO(this._transform,this._orientation)}forward(){let l=o.c9(this._transform,2);return[-l[0],-l[1],-l[2]]}up(){let l=o.c9(this._transform,1);return[-l[0],-l[1],-l[2]]}right(){let l=o.c9(this._transform,0);return[l[0],l[1],l[2]]}getCameraToWorld(l,p){let _=new Float64Array(16);return o.bl(_,this.getWorldToCamera(l,p)),_}getCameraToWorldMercator(){return this._transform}getWorldToCameraPosition(l,p,_){let x=this.position;o.c4(x,x,-l);let S=new Float64Array(16);return o.bq(S,[_,_,_]),o.br(S,S,x),S[10]*=p,S}getWorldToCamera(l,p){let _=new Float64Array(16),x=new Float64Array(4),S=this.position;return o.ca(x,this._orientation),o.c4(S,S,-l),o.cb(_,x),o.br(_,_,S),_[1]*=-1,_[5]*=-1,_[9]*=-1,_[13]*=-1,_[8]*=p,_[9]*=p,_[10]*=p,_[11]*=p,_}getCameraToClipPerspective(l,p,_,x){let S=new Float64Array(16);return o.cc(S,l,p,_,x),S}getCameraToClipOrthographic(l,p,_,x,S,A){let N=new Float64Array(16);return o.cd(N,l,p,_,x,S,A),N}getDistanceToElevation(l,p=!1){let _=l===0?0:o.ce(l,p?o.a$(this.position[1]):this.position[1]),x=this.forward();return(_-this.position[2])/x[2]}clone(){return new rD([...this.position],[...this.orientation])}}let Fc={BaseColor:5,MetallicRoughness:6,Normal:7,Occlusion:8,Emission:9,LUT:10,ShadowMap0:11};class oD{constructor(l=0,p=0,_=0,x=0){if(isNaN(l)||l<0||isNaN(p)||p<0||isNaN(_)||_<0||isNaN(x)||x<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=_,this.right=x}interpolate(l,p,_){return p.top!=null&&l.top!=null&&(this.top=o.ak(l.top,p.top,_)),p.bottom!=null&&l.bottom!=null&&(this.bottom=o.ak(l.bottom,p.bottom,_)),p.left!=null&&l.left!=null&&(this.left=o.ak(l.left,p.left,_)),p.right!=null&&l.right!=null&&(this.right=o.ak(l.right,p.right,_)),this}getCenter(l,p){let _=o.aA((this.left+l-this.right)/2,0,l),x=o.aA((this.top+p-this.bottom)/2,0,p);return new o.P(_,x)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new oD(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let cm=15;class Gu{constructor(l,p,_,x,S,A,N){this.tileSize=512,this._renderWorldCopies=S===void 0||S,this._minZoom=l||0,this._maxZoom=p||22,this._minPitch=_??0,this._maxPitch=x??60,this.setProjection(A),this.setMaxBounds(N),this.width=0,this.height=0,this._center=new o.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 oD,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._expandedProjMatrixCache={},this._distanceTileDataCache={},this._camera=new rD,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 Gu(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 _=this._elevation;p||this._centerAltitude&&this._centerAltitudeValidForExaggeration&&_.exaggeration()&&this._centerAltitudeValidForExaggeration!==_.exaggeration()?(this._centerAltitude=this._centerAltitude/this._centerAltitudeValidForExaggeration*_.exaggeration(),this._centerAltitudeValidForExaggeration=_.exaggeration()):(this._centerAltitude=l||0,this._centerAltitudeValidForExaggeration=_.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]],_=this.horizonLineFromTop(),x=0,S=0;for(let A=0;A{let de=o.cX(J,Y,W,oe,ce);N.has(de)||(x.push(new o.aO(Y,J,W,oe,ce)),N.add(de))};for(let Y=0;Y0,Oe=W.y+10,He=J.wrap-(ge?0:1),nt=J.wrap+(Ee?0:1),et=ge?W.x-1:de-1,at=Ee?W.x+1:0;if(S)_[0]<0?(V(oe,nt,W.z,at,W.y),_[1]<0&&Oe&&(V(oe,ce,W.z,W.x,W.y+1),V(oe,nt,W.z,at,W.y+1)),_[1]>0&&Be&&(V(oe,ce,W.z,W.x,W.y-1),V(oe,nt,W.z,at,W.y-1))):_[0]>0?(V(oe,He,W.z,et,W.y),_[1]<0&&Oe&&(V(oe,ce,W.z,W.x,W.y+1),V(oe,He,W.z,et,W.y+1)),_[1]>0&&Be&&(V(oe,ce,W.z,W.x,W.y-1),V(oe,He,W.z,et,W.y-1))):_[1]<0&&Oe?V(oe,ce,W.z,W.x,W.y+1):Be&&V(oe,ce,W.z,W.x,W.y-1);else{let tt=J.visibleQuadrants;1&tt&&(V(oe,He,W.z,et,W.y),Be&&(V(oe,ce,W.z,W.x,W.y-1),V(oe,He,W.z,et,W.y-1))),2&tt&&(V(oe,nt,W.z,at,W.y),Be&&(V(oe,ce,W.z,W.x,W.y-1),V(oe,nt,W.z,at,W.y-1))),4&tt&&(V(oe,He,W.z,et,W.y),Oe&&(V(oe,ce,W.z,W.x,W.y+1),V(oe,He,W.z,et,W.y+1))),8&tt&&(V(oe,nt,W.z,at,W.y),Oe&&(V(oe,ce,W.z,W.x,W.y+1),V(oe,nt,W.z,at,W.y+1)))}}let $=[];for(let Y of x)x.some(J=>Y.isChildOf(J))||$.push(Y);if(x=$.filter(Y=>!l.some(J=>!!(Y.overscaledZ{let Ee=de.canonical.x+.5-W[0],ge=de.canonical.y+.5-W[1];return Ee*Ee+ge*ge{let at=o.cX(Be,Oe,He,nt,et);S.has(at)||(x.push(new o.aO(Oe,Be,He,nt,et)),S.add(at))},N=l.reduce((Oe,Be)=>Math.max(Oe,Be.overscaledZ),_),V=1<<_,$=[new o.P(0,0),new o.P(o.al,0),new o.P(o.al,o.al),new o.P(0,o.al)],Y=new o.P(0,0),J=new o.P(0,0),W=(Oe,Be)=>{let He=Math.floor(Oe[0]),nt=Math.floor(Oe[1]),et=(Oe[0]-He)*o.al,at=(Oe[1]-nt)*o.al,tt=Math.floor(Be[0]),Xe=Math.floor(Be[1]),it=(Be[0]-tt)*o.al,Wt=(Be[1]-Xe)*o.al;for(let Nt=-1;Nt<=1;Nt++){let mi=He+Nt;if(!(mi<0||mi>=V)){Y.x=et-Nt*o.al,J.x=it-(mi-tt)*o.al;for(let jt=-1;jt<=1;jt++){let ci=nt+jt;Y.y=at-jt*o.al,J.y=Wt-(ci-Xe)*o.al,o.cY(Y,J,$)&&A(N,0,_,mi,ci)}}}},oe=p.points,ce=oe[o.cu],de=oe[o.cv],Ee=this._projectToGround(ce,oe[o.cw]),ge=this._projectToGround(de,oe[o.cx]);return W(ce,Ee),W(de,ge),x}_projectToGround(l,p){return o.cy(o.cz(),l,p,l[2]/(l[2]-p[2]))}coveringTiles(l){let p=this.coveringZoomLevel(l),_=p,x=this.elevation&&this.elevation.exaggeration(),S=x&&!l.isTerrainDEM,A=this.projection.name==="mercator";if(l.minzoom!==void 0&&pl.maxzoom&&(p=l.maxzoom);let N=this.locationCoordinate(this.center),V=this.center.lat,$=1<{let Jt=new o.ae(Dt.x+25e-6,Dt.y,Dt.z),Gi=new o.ae(Dt.x,Dt.y+25e-6,Dt.z),sn=Dt.toLngLat(),Mn=Jt.toLngLat(),en=Gi.toLngLat(),Zi=this.locationCoordinate(sn),or=this.locationCoordinate(Mn),er=this.locationCoordinate(en),nr=Math.hypot(or.x-Zi.x,or.y-Zi.y),Wn=Math.hypot(er.x-Zi.x,er.y-Zi.y);return Math.sqrt(nr*Wn)*at/25e-6},Xe=Dt=>{let Si=nt,Jt=et;return{aabb:o.cE(this,$,0,0,0,Dt,Jt,Si,this.projection),zoom:0,x:0,y:0,minZ:Jt,maxZ:Si,wrap:Dt,fullyVisible:!1}},it=[],Wt=[],Nt=p,mi=l.reparseOverscaled?_:p,jt=(Ee-this._centerAltitude)*de,ci=Dt=>{if(!this._elevation||!Dt.tileID||!A)return;let Si=this._elevation.getMinMaxForTile(Dt.tileID),Jt=Dt.aabb;Si?(Jt.min[2]=Si.min,Jt.max[2]=Si.max,Jt.center[2]=(Jt.min[2]+Jt.max[2])/2):(Dt.shouldSplit=qt(Dt),Dt.shouldSplit||(Jt.min[2]=Jt.max[2]=Jt.center[2]=this._centerAltitude))},cn=(Dt,Si)=>{if(.707*Si{if(Dt.zoom=.9)return!0}else if(S&&(Gi=Dt.aabb.distanceZ(ge)*de),this.projection.isReprojectedInTileSpace&&_<=5){let Wn=Math.pow(2,Dt.zoom),Zr=tt(new o.ae((Dt.x+.5)/Wn,(Dt.y+.5)/Wn));sn=Zr>.85?1:Zr}if(!A){let Wn=Math.sqrt(Si*Si+Jt*Jt+Gi*Gi),Zr=(1<0;){let Dt=it.pop(),Si=Dt.x,Jt=Dt.y,Gi=Dt.fullyVisible,sn=()=>this.projection.name==="globe"&&(Dt.y===0||Dt.y===(1<>1),or={aabb:A?Dt.aabb.quadrant(Mn):o.cE(this,$,Dt.zoom+1,en,Zi,Dt.wrap,Dt.minZ,Dt.maxZ,this.projection),zoom:Dt.zoom+1,x:en,y:Zi,wrap:Dt.wrap,fullyVisible:Gi,tileID:void 0,shouldSplit:void 0,minZ:Dt.minZ,maxZ:Dt.maxZ};S&&!J&&(or.tileID=new o.aO(Dt.zoom+1===Nt?mi:Dt.zoom+1,Dt.wrap,Dt.zoom+1,en,Zi),ci(or)),it.push(or)}else{let Mn=Dt.zoom===Nt?mi:Dt.zoom;if(l.minzoom&&l.minzoom>Mn)continue;let en=0;if(!Gi){let nr=Oe?Dt.aabb.intersectsPrecise(oe):Dt.aabb.intersectsPreciseFlat(oe);if(nr===0&&sn()){let Wn=new o.cC(Dt.zoom,Si,Jt);nr=o.cD(this,$,Wn,!0).intersectsPrecise(oe)}if(nr===0)continue;if(l.calculateQuadrantVisibility)if(oe.containsPoint(Dt.aabb.center))en=15;else for(let Wn=0;Wn<4;Wn++)Dt.aabb.quadrant(Wn).intersects(oe)!==0&&(en|=1<{let Gi=[0,0,0,1],sn=[o.al,o.al,0,1],Mn=this.calculateFogTileMatrix(Jt.tileID.toUnwrapped());o.aC(Gi,Gi,Mn),o.aC(sn,sn,Mn);let en=o.cF([],Gi,sn),Zi=o.cG([],Gi,sn),or=o.c_(en,Zi);if(or===0)return!0;let er=!1,nr=this._elevation;if(nr&&or>Dt&&Si!==0){let Wn=this.calculateProjMatrix(Jt.tileID.toUnwrapped()),Zr;l.isTerrainDEM||(Zr=nr.getMinMaxForTile(Jt.tileID)),Zr||(Zr={min:et,max:nt});let go=o.cH(this.rotation),Co=[go[0]*o.al,go[1]*o.al,Zr.max];o.af(Co,Co,Wn),er=(1-Co[1])*this.height*.5Dt.distanceSq-Si.distanceSq).map(Dt=>Dt.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=o.aA(l.lat,-o.cI,o.cI),_=this.projection.project(l.lng,p);return new o.P(_.x*this.worldSize,_.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/o.ce(1,this.center.lat)/this.worldSize}setLocationAtPoint(l,p){let _,x,S=this.centerPoint;if(this.projection.name==="globe"){let N=this.worldSize;_=(p.x-S.x)/N,x=(p.y-S.y)/N}else{let N=this.pointCoordinate(p),V=this.pointCoordinate(S);_=N.x-V.x,x=N.y-V.y}let A=this.locationCoordinate(l);this.setLocation(new o.ae(A.x-_,A.y-x))}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 _=p?o.ce(p,l.lat):void 0,x=this.projection.project(l.lng,l.lat);return new o.ae(x.x,x.y,_)}coordinateLocation(l){return this.projection.unproject(l.x,l.y)}pointRayIntersection(l,p){let _=p??this._centerAltitude,x=[l.x,l.y,0,1],S=[l.x,l.y,1,1];o.aC(x,x,this.pixelMatrixInverse),o.aC(S,S,this.pixelMatrixInverse);let A=S[3];o.cJ(x,x,1/x[3]),o.cJ(S,S,1/A);let N=x[2],V=S[2];return{p0:x,p1:S,t:N===V?0:(_-N)/(V-N)}}screenPointToMercatorRay(l){let p=[l.x,l.y,0,1],_=[l.x,l.y,1,1];return o.aC(p,p,this.pixelMatrixInverse),o.aC(_,_,this.pixelMatrixInverse),o.cJ(p,p,1/p[3]),o.cJ(_,_,1/_[3]),p[2]=o.ce(p[2],this._center.lat)*this.worldSize,_[2]=o.ce(_[2],this._center.lat)*this.worldSize,o.cJ(p,p,1/this.worldSize),o.cJ(_,_,1/this.worldSize),new o.ax([p[0],p[1],p[2]],o.aw([],o.av([],_,p)))}rayIntersectionCoordinate(l){let{p0:p,p1:_,t:x}=l,S=o.ce(p[2],this._center.lat),A=o.ce(_[2],this._center.lat);return new o.ae(o.ak(p[0],_[0],x)/this.worldSize,o.ak(p[1],_[1],x)/this.worldSize,o.ak(S,A,x))}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 _=this.projection.pointCoordinate3D(this,l.x,l.y);if(_)return new o.ae(_[0],_[1],_[2]);let x=0,S=this.horizonLineFromTop();if(l.y>S)return this.pointCoordinate(l,p);let A=.02*S,N=l.clone();for(let V=0;V<10&&S-x>A;V++){N.y=o.ak(x,S,.66);let $=this.projection.pointCoordinate3D(this,N.x,N.y);$?(S=N.y,_=$):x=N.y}return _?new o.ae(_[0],_[1],_[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>=o.cK)return!this.isPointAboveHorizon(l);let p=this.pointCoordinate(l);return p.y>=0&&p.y<=1}_coordinatePoint(l,p){let _=p&&this.elevation?this.elevation.getAtPointOrZero(l,this._centerAltitude):this._centerAltitude,x=[l.x*this.worldSize,l.y*this.worldSize,_+l.toAltitude(),1];return o.aC(x,x,this.pixelMatrix),x[3]>0?new o.P(x[0]/x[3],x[1]/x[3]):new o.P(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){let{top:l,left:p}=this._edgeInsets,_=this.height-this._edgeInsets.bottom,x=this.width-this._edgeInsets.right,S=this.pointLocation3D(new o.P(p,l)),A=this.pointLocation3D(new o.P(x,l)),N=this.pointLocation3D(new o.P(x,_)),V=this.pointLocation3D(new o.P(p,_)),$=Math.min(S.lng,A.lng,N.lng,V.lng),Y=Math.max(S.lng,A.lng,N.lng,V.lng),J=Math.min(S.lat,A.lat,N.lat,V.lat),W=Math.max(S.lat,A.lat,N.lat,V.lat),oe=Math.pow(2,-this.zoom)/16*270,ce=this.projection.name==="globe"?1:4,de=(Ee,ge,Oe,Be,He)=>{let nt=(Ee+Oe)/2,et=(ge+Be)/2,at=new o.P(nt,et),{lng:tt,lat:Xe}=this.pointLocation3D(at),it=Math.max(0,$-tt,J-Xe,tt-Y,Xe-W);$=Math.min($,tt),Y=Math.max(Y,tt),J=Math.min(J,Xe),W=Math.max(W,Xe),(Heoe)&&(de(Ee,ge,nt,et,He+1),de(nt,et,Oe,Be,He+1))};if(de(p,l,x,l,1),de(x,l,x,_,1),de(x,_,p,_,1),de(p,_,p,l,1),this.projection.name==="globe"){let[Ee,ge]=o.cL(this);Ee?(W=90,Y=180,$=-180):ge&&(J=-90,Y=180,$=-180)}return new o.aI(new o.aR($,J),new o.aR(Y,W))}_getBoundsRectangular(l,p){let{top:_,left:x}=this._edgeInsets,S=this.height-this._edgeInsets.bottom,A=this.width-this._edgeInsets.right,N=new o.P(x,_),V=new o.P(A,_),$=new o.P(A,S),Y=new o.P(x,S),J=this.pointCoordinate(N,l),W=this.pointCoordinate(V,l),oe=this.pointCoordinate($,p),ce=this.pointCoordinate(Y,p),de=(Ee,ge)=>(ge.y-Ee.y)/(ge.x-Ee.x);return J.y>1&&W.y>=0?J=new o.ae((1-ce.y)/de(ce,J)+ce.x,1):J.y<0&&W.y<=1&&(J=new o.ae(-ce.y/de(ce,J)+ce.x,0)),W.y>1&&J.y>=0?W=new o.ae((1-oe.y)/de(oe,W)+oe.x,1):W.y<0&&J.y<=1&&(W=new o.ae(-oe.y/de(oe,W)+oe.x,0)),new o.aI().extend(this.coordinateLocation(J)).extend(this.coordinateLocation(W)).extend(this.coordinateLocation(ce)).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((_,x)=>{if(x.dem){let S=x.dem.tree;_.min=Math.min(_.min,S.minimums[0]),_.max=Math.max(_.max,S.maximums[0])}return _},{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,_=this.height/2-p*(1-this._horizonShift);return l?Math.max(0,_):_}getMaxBounds(){return this.maxBounds}setMaxBounds(l){this.maxBounds=l,this.minLat=-o.cI,this.maxLat=o.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&&(N=J-$),J-Yoe&&(A=oe-V),oe-W{for(let qt=0;qt<16;qt++)mi[qt]=o.ak(jt[qt],ci[qt],cn)})(N,N,V,o.c$(this.pitch>=cm?1:this.pitch/cm))}else N=V;let $=o.cO([],V,A),Y=o.cO([],N,A);if(this.projection.isReprojectedInTileSpace){let Xe=this.locationCoordinate(this.center),it=o.bA([]);o.br(it,it,[Xe.x*this.worldSize,Xe.y*this.worldSize,0]),o.aB(it,it,o.cP(this)),o.br(it,it,[-Xe.x*this.worldSize,-Xe.y*this.worldSize,0]),o.aB(Y,Y,it),o.aB($,$,it),this.inverseAdjustmentMatrix=o.cQ(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];if(this.mercatorMatrix=o.cR([],Y,[this.worldSize,this.worldSize,this.worldSize/S,1]),this.projMatrix=Y,this.invProjMatrix=o.bl(new Float64Array(16),this.projMatrix),p){let Xe=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,1/0);Xe[8]=2*-l.x/this.width,Xe[9]=2*l.y/this.height,this.expandedFarZProjMatrix=o.cO([],Xe,A)}else this.expandedFarZProjMatrix=this.projMatrix;let J=o.bl([],N);this.frustumCorners=o.cS.fromInvProjectionMatrix(J,this.horizonLineFromTop(),this.height),this.cameraFrustum=o.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,0,!p);let W=new Float32Array(16);o.bA(W),o.cR(W,W,[1,-1,1]),o.cT(W,W,this._pitch),o.bB(W,W,this.angle);let oe=o.cc(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ);this.starsProjMatrix=o.bz(oe);let ce=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;oe[8]=2*-l.x/this.width,oe[9]=2*(l.y+ce)/this.height,this.skyboxMatrix=o.aB(W,oe,W);let de=this.point,Ee=de.x,ge=de.y,Oe=this.width%2/2,Be=this.height%2/2,He=Math.cos(this.angle),nt=Math.sin(this.angle),et=Ee-Math.round(Ee)+He*Oe+nt*Be,at=ge-Math.round(ge)+He*Be+nt*Oe,tt=new Float64Array(Y);if(o.br(tt,tt,[et>.5?et-1:et,at>.5?at-1:at,0]),this.alignedProjMatrix=tt,Y=o.bC(),o.cR(Y,Y,[this.width/2,-this.height/2,1]),o.br(Y,Y,[1,-1,0]),this.labelPlaneMatrix=Y,Y=o.bC(),o.cR(Y,Y,[1,-1,1]),o.br(Y,Y,[-1,-1,0]),o.cR(Y,Y,[2/this.width,2/this.height,1]),this.glCoordMatrix=Y,this.pixelMatrix=o.aB(new Float64Array(16),this.labelPlaneMatrix,$),this._calcFogMatrices(),this._distanceTileDataCache={},Y=o.bl(new Float64Array(16),this.pixelMatrix),!Y)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=Y,this.projection.name==="globe"||this.mercatorFromTransition){this.globeMatrix=o.cU(this);let Xe=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=o.af(Xe,Xe,A),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=Y;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={},this._expandedProjMatrixCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};let l=this.cameraWorldSizeForFog,p=this.cameraPixelsPerMeter,_=this._camera.position,x=1/this.height/this._pixelsPerMercatorPixel,S=[l,l,p];o.c4(S,S,x),o.c4(_,_,-1),o.cV(_,_,S);let A=o.bC();o.br(A,A,_),o.cR(A,A,S),this.mercatorFogMatrix=A,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(l,p,x)}_computeCameraPosition(l){let p=(l=l||this.pixelsPerMeter)/this.pixelsPerMeter,_=this._camera.forward(),x=this.point,S=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*p-l/this.worldSize*this._centerAltitude;return[x.x/this.worldSize-_[0]*S,x.y/this.worldSize-_[1]*S,l/this.worldSize*this._centerAltitude-_[2]*S]}_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),_=this._camera.position[2],x=l[2],S=1;this.projection.wrap&&(this.center=this.center.wrap()),x>0&&(S=Math.min((p-_)/x,1)),this._camera.position=o.bH([],this._camera.position,l,S),this._updateStateFromCamera()}_updateStateFromCamera(){let l=this._camera.position,p=this._camera.forward(),{pitch:_,bearing:x}=this._camera.getPitchBearing(),S=o.ce(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,A=this._mercatorZfromZoom(this._maxZoom)*Math.cos(o.an(this._maxPitch)),N=Math.max((l[2]-S)/Math.cos(_),A),V=this._zoomFromMercatorZ(N);o.bH(l,l,p,N),this._pitch=o.aA(_,o.an(this.minPitch),o.an(this.maxPitch)),this.angle=o.bT(x,-Math.PI,Math.PI),this._setZoom(o.aA(V,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new o.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,_=o.cK,x=0,S=1/0;for(;_-p>1e-6&&_>p;){let A=p+.5*(_-p),N=this.tileSize*Math.pow(2,A),V=this.getCameraToCenterDistance(this.projection,A,N),$=this.scaleZoom(V/(Math.max(0,l)*this.tileSize)),Y=Math.abs(A-$);Y$||W.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+o.cW(this.fovAboveCenter)>88||this.anyCornerOffEdge(new o.P(0,0),new o.P(this.width,this.height))}zoomDeltaToMovement(l,p){let _=o.ag(o.av([],this._camera.position,l)),x=this._zoomFromMercatorZ(_)+p;return _-this._mercatorZfromZoom(x)}getCameraPoint(){if(this.projection.name==="globe"){let l=(function([p,_,x],S){let A=[p,_,x,1];o.aC(A,A,S);let N=A[3]=Math.max(A[3],1e-6);return A[0]/=N,A[1]/=N,A[2]/=N,A})([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new o.P(l[0],l[1])}{let l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.P(0,l))}}getCameraToCenterDistance(l,p=this.zoom,_=this.worldSize){let x=o.cN(l,p,this.width,this.height,1024),S=l.pixelSpaceConversion(this.center.lat,_,x),A=.5/Math.tan(.5*this._fov)*this.height*S;return this.isOrthographic&&(A=o.ak(1,A,o.c$(this.pitch>=cm?1:this.pitch/cm))),A}getWorldToCameraMatrix(){let l=this._camera.getWorldToCamera(this.worldSize,this.projection.zAxisUnit==="meters"?this.pixelsPerMeter:1);return this.projection.name==="globe"&&o.aB(l,l,this.globeMatrix),l}getFrustum(l){return o.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,l,this.projection.zAxisUnit==="meters")}}let db=(y,l)=>{if(l>0&&y.terrain&&o.w("Cutoff is currently disabled on terrain"),l<=0||y.terrain)return{shouldRenderCutoff:!1,uniformValues:{u_cutoff_params:[0,0,0,1]}};let p=y.transform,_=Math.max(Math.abs(p._zoom-(y.minCutoffZoom-1)),1),x=p.isLODDisabled(!1)?o.ah(60,45,p.pitch):o.ah(30,15,p.pitch),S=p._farZ-p._nearZ,A=l*p.height,N=((1-(V=x))*p.cameraToCenterDistance+V*(p._farZ+A))*_;var V;return{shouldRenderCutoff:x<1,uniformValues:{u_cutoff_params:[p._nearZ,p._farZ,(N-p._nearZ)/S,(N-A-p._nearZ)/S]}}},ju={cascadeCount:2,normalOffset:3,shadowMapResolution:2048};class t3{constructor(l,p){this.aabb=l,this.lastCascade=p}}class E0{add(l,p){let _=this.receivers[l.key];_!==void 0?(_.aabb.min[0]=Math.min(_.aabb.min[0],p.min[0]),_.aabb.min[1]=Math.min(_.aabb.min[1],p.min[1]),_.aabb.min[2]=Math.min(_.aabb.min[2],p.min[2]),_.aabb.max[0]=Math.max(_.aabb.max[0],p.max[0]),_.aabb.max[1]=Math.max(_.aabb.max[1],p.max[1]),_.aabb.max[2]=Math.max(_.aabb.max[2],p.max[2])):this.receivers[l.key]=new t3(p,null)}clear(){this.receivers={}}get(l){return this.receivers[l.key]}computeRequiredCascades(l,p,_){let x=o.d8.fromPoints(l.points),S=0;for(let A in this.receivers){let N=this.receivers[A];if(!N||!x.intersectsAabb(N.aabb))continue;N.aabb.min=x.closestPoint(N.aabb.min),N.aabb.max=x.closestPoint(N.aabb.max);let V=N.aabb.getCorners();for(let $=0;$<_.length;$++){let Y=!0;for(let J of V){let W=[J[0]*p,J[1]*p,J[2]];if(o.af(W,W,_[$].matrix),W[0]<-1||W[0]>1||W[1]<-1||W[1]>1){Y=!1;break}}if(N.lastCascade=$,S=Math.max(S,$),Y)break}}return S+1}}class m_{constructor(l){this.painter=l,this._enabled=!1,this._shadowLayerCount=0,this._numCascadesToRender=0,this._cascades=[],this._groundShadowTiles=[],this._receivers=new E0,this._depthMode=new Rn(l.context.gl.LEQUAL,Rn.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(ju,["Shadows"],"cascadeCount",{min:1,max:2,step:1}),l.tp.registerParameter(ju,["Shadows"],"normalOffset",{min:0,max:10,step:.05}),l.tp.registerParameter(ju,["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 _=this.painter;if(this._enabled=!1,this._shadowLayerCount=0,this._receivers.clear(),!p||!p.properties)return;let x=p.properties.get("shadow-intensity");if(!p.shadowsEnabled()||x<=0||(this._shadowLayerCount=_.style.order.reduce((ce,de)=>{let Ee=_.style._mergedLayers[de];return ce+(Ee.hasShadowPass()&&!Ee.isHidden(l.zoom)?1:0)},0),this._enabled=this._shadowLayerCount>0,!this.enabled))return;let S=_.context,A=ju.shadowMapResolution,N=ju.shadowMapResolution;if(this._cascades.length===0||ju.shadowMapResolution!==this._cascades[0].texture.size[0]){this._cascades=[];for(let ce=0;ceEe.dem).forEach(Ee=>{let ge=Ee.dem.tree;de[0]=Math.min(de[0],ge.minimums[0]),de[1]=Math.max(de[1],ge.maximums[0])}),de[0]!==1e4&&(V=(de[1]-de[0])*ce.exaggeration())}let $=1.5*l.cameraToCenterDistance,Y=3*$,J=new Float64Array(16);for(let ce=0;ce=0)return{};let S=(function(V,$,Y){let J=Y/(1<0&&(o.d7(S[1],S[1],[x[0]*A,0,0]),o.d7(S[2],S[2],[x[0]*A,0,0])),x[1]<0?(o.d7(S[0],S[0],[0,x[1]*A,0]),o.d7(S[1],S[1],[0,x[1]*A,0])):x[1]>0&&(o.d7(S[2],S[2],[0,x[1]*A,0]),o.d7(S[3],S[3],[0,x[1]*A,0]));let N={};return N.vertices=S,N.planes=[HI(S[1],S[0],S[4]),HI(S[2],S[1],S[5]),HI(S[3],S[2],S[6]),HI(S[0],S[3],S[7])],N}addShadowReceiver(l,p,_){this._receivers.add(l,o.d8.fromTileIdAndHeight(l,p,_))}getMaxCascadeForTile(l){let p=this._receivers.get(l);return p&&p.lastCascade?p.lastCascade:0}}function HI(y,l,p){let _=o.av([],p,l),x=o.av([],y,l),S=o.bI([],_,x),A=o.ag(S);return A===0?[0,0,1,0]:(o.c4(S,S,1/A),[S[0],S[1],S[2],-o.bJ(S,l)])}function iS(y){let l=y.properties.get("direction"),p=o.d3(l.x,l.y,l.z);p[2]=o.aA(p[2],0,75);let _=o.d5([p[0],p[1],p[2]]);return o.d4(_.x,_.y,_.z)}function h_(y,l,p){let _=l.properties.get("color-use-theme")==="none",x=l.properties.get("color"),S=l.properties.get("intensity"),A=l.properties.get("direction"),N=[A.x,A.y,A.z],V=p.properties.get("color-use-theme")==="none",$=p.properties.get("color"),Y=p.properties.get("intensity"),J=Math.max(o.bJ([0,0,1],N),0),W=[0,0,0];o.c4(W,$.toPremultipliedRenderColor(V?null:y.getLut(l.scope)).toArray01Linear().slice(0,3),Y);let oe=[0,0,0];return o.c4(oe,x.toPremultipliedRenderColor(_?null:y.getLut(p.scope)).toArray01Linear().slice(0,3),J*S),o.da([W[0]>0?W[0]/(W[0]+oe[0]):0,W[1]>0?W[1]/(W[1]+oe[1]):0,W[2]>0?W[2]/(W[2]+oe[2]):0])}function fH(y,l,p,_,x,S){let A=y.zoom,N=y.scale,V=y.worldSize,$=1/V,Y=y.aspect,J=Math.sqrt(1+Y*Y)*Math.tan(.5*y.fovX),W=J*J,oe=_-p,ce=_+p,de,Ee;W>oe/ce?(de=_,Ee=_*J):(de=.5*ce*(1+W),Ee=.5*Math.sqrt(oe*oe+2*(_*_+p*p)*W+ce*ce*W*W));let ge=y.projection.pixelsPerMeter(y.center.lat,V),Oe=y._camera.getCameraToWorldMercator(),Be=[0,0,-de*$];o.af(Be,Be,Oe);let He=Ee*$,nt=y._edgeInsets;if(!(nt.left===0&&nt.top===0&&nt.right===0&&nt.bottom===0||nt.left===nt.right&&nt.top===nt.bottom)){let Gi=y._camera.getWorldToCamera(y.worldSize,y.projection.zAxisUnit==="meters"?ge:1),sn=y._camera.getCameraToClipPerspective(y._fov,y.width/y.height,p,_);sn[8]=2*-y.centerOffset.x/y.width,sn[9]=2*y.centerOffset.y/y.height;let Mn=new Float64Array(16);o.cO(Mn,sn,Gi);let en=new Float64Array(16);o.bl(en,Mn);let Zi=o.cA.fromInvProjectionMatrix(en,V,A,!0);for(let or of Zi.points){let er=((et=or)[0]/=N,et[1]/=N,et[2]=o.ce(et[2],y._center.lat),et);He=Math.max(He,o.c5(o.d9([],Be,er)))}}var et;He*=x/(x-1);let at=Math.acos(l[2]),tt=Math.atan2(-l[0],-l[1]),Xe=new rD;Xe.position=Be,Xe.setPitchBearing(at,tt);let it=Xe.getWorldToCamera(V,ge),Wt=He*V,Nt=Math.min(y._mercatorZfromZoom(17)*V*-2,-2*Wt),mi=Xe.getCameraToClipOrthographic(-Wt,Wt,-Wt,Wt,Nt,(Wt+S*ge)/l[2]),jt=new Float64Array(16);o.aB(jt,mi,it);let ci=o.d4(Math.floor(1e6*Be[0])/1e6*V,Math.floor(1e6*Be[1])/1e6*V,0),cn=.5*x,qt=[0,0,0];o.af(qt,ci,jt),o.c4(qt,qt,cn);let Dt=[Math.floor(qt[0]),Math.floor(qt[1]),Math.floor(qt[2])],Si=[0,0,0];o.av(Si,qt,Dt),o.c4(Si,Si,-1/cn);let Jt=new Float64Array(16);return o.bA(Jt),o.br(Jt,Jt,Si),o.aB(jt,Jt,jt),[jt,Wt]}class nS extends o.E{constructor(l){super(),this.requestManager=l,this.models={"":{}},this.modelUris={"":{}},this.modelByURL={},this.numModelsLoading={}}loadModel(l,p){return o.aV(this.requestManager.transformRequest(p,o.R.Model).url).then(_=>{if(!_)return;let x=o.aW(_),S=new o.aX(l,void 0,void 0,x);return S.computeBoundsAndApplyParent(),S}).catch(_=>{if(_&&_.status===404)return null;this.fire(new o.y(new Error(`Could not load model ${l} from ${p}: ${_.message}`)))})}load(l,p,_={forceReload:!1}){this.models[p]||(this.models[p]={});let x=Object.keys(l),S=[],A=[];for(let N of x){let V=l[N];this.hasURLBeenRequested(V)&&!_.forceReload||(this.modelByURL[V]={modelId:N,scope:p},S.push(this.loadModel(N,V)),A.push(N)),this.models[p][N]||(this.models[p][N]={model:null,numReferences:1})}this.numModelsLoading[p]=(this.numModelsLoading[p]||0)+A.length,Promise.allSettled(S).then(N=>{for(let V=0;V{this.fire(new o.y(new Error(`Could not load models: ${N.message}`)))})}isLoaded(){for(let l in this.numModelsLoading)if(this.numModelsLoading[l]>0)return!1;return!0}hasModel(l,p,_={exactIdMatch:!1}){return!!(_.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,_){this.models[_]||(this.models[_]={}),this.modelUris[_]||(this.modelUris[_]={});let x=this.requestManager.normalizeModelURL(p);if((this.hasModel(l,_,{exactIdMatch:!0})||this.hasModelBeenAdded(l,_))&&this.modelUris[_][l]===x)this.models[_][l].numReferences++;else if(this.hasURLBeenRequested(x)){let{scope:S,modelId:A}=this.modelByURL[x];this.models[S][A].numReferences++}else this.modelUris[_][l]=x,this.load({[l]:this.modelUris[_][l]},_)}addModelURLs(l,p){this.models[p]||(this.models[p]={}),this.modelUris[p]||(this.modelUris[p]={});let _=this.modelUris[p];for(let x in l)_[x]=this.requestManager.normalizeModelURL(l[x])}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 _={};for(let x of l)this.hasModel(x,p,{exactIdMatch:!0})||this.hasURLBeenRequested(x)?this.models[p][x].numReferences++:this.modelUris[p][x]&&!this.hasURLBeenRequested(x)?_[x]=this.modelUris[p][x]:!this.hasURLBeenRequested(x)&&o.db(x,!1)&&(this.modelUris[p][x]=this.requestManager.normalizeModelURL(x),_[x]=this.modelUris[p][x]);this.load(_,p)}hasURLBeenRequested(l){return this.modelByURL[l]!==void 0}removeModel(l,p,_=!1,x=!1){if(this.models[p]&&this.models[p][l]&&(this.models[p][l].numReferences--,this.models[p][l].numReferences===0||x)){let S=this.modelUris[p][l];_||delete this.modelUris[p][l],delete this.modelByURL[S];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 _=this.models[l][p].model;delete this.models[l][p],_&&_.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 _ in this.models[p])this.models[p][_].model&&this.models[p][_].model.upload(l.context)}}let i3=new o.a9({data:new o.aa(o.a6.colorTheme.data)});function f_(y){if(!y.metadata||!y.metadata.content_area)return;let l=o.o.devicePixelRatio,{left:p,top:_,width:x,height:S}=y.metadata.content_area,A=p*l,N=_*l;return[A,N,A+x*l,N+S*l]}function Ri(y){if(y)return y.map(([l,p])=>[l*o.o.devicePixelRatio,p*o.o.devicePixelRatio])}class kn{constructor(l,p,_){this.id=l,this.scope=p,this.sourceCache=_,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 _=this.sourceCache.getSource();if(!(_ instanceof S0))return l;let x=p.map(A=>this.sourceCache.getTile(A)),S=_.getImages(x,Array.from(this.pendingRequests));for(let[A,N]of S)l.set(o.I.from({name:A,iconsetId:this.id}),N),this.pendingRequests.delete(A);for(let A of this.pendingRequests)this.missingRequests.add(A);return this.pendingRequests.clear(),l}}let fn=(y,l)=>pt(y,l&&l.filter(p=>p.identifier!=="source.canvas")),ko=o.aH(pa,["addLayer","removeLayer","setLights","setPaintProperty","setLayoutProperty","setSlot","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setSnow","setRain","setProjection","setCamera","addImport","removeImport","updateImport","addIconset","removeIconset"]),us=o.aH(pa,["setCenter","setZoom","setBearing","setPitch"]),Dl=new Set(["background","sky","slot","custom"]),Su={version:8,layers:[],sources:{}},lc={duration:300,delay:0};class Rh extends o.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({},lc),this._buildingIndex=new QA(this),this.crossTileSymbolIndex=new kd,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 Rr,this.dispatcher=p.dispatcher?p.dispatcher:new o.D(o.dd(),this),p.imageManager?this.imageManager=p.imageManager:(this.imageManager=new bi(this.map._spriteFormat),this.imageManager.setEventedParent(this)),this.imageManager.addScope(this.scope),this.glyphManager=p.glyphManager?p.glyphManager:new o.de(l._requestManager,p.localFontFamily?o.df.all:p.localIdeographFontFamily?o.df.ideographs:o.df.none,p.localFontFamily||p.localIdeographFontFamily),p.modelManager?this.modelManager=p.modelManager:(this.modelManager=new nS(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",o.dg());let _=this;this._rtlTextPluginCallback=Rh.registerForPluginStateChange(x=>{_.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:x.pluginStatus,pluginURL:x.pluginURL},(S,A)=>{if(o.dh(S),A&&A.every(N=>N))for(let N in _._sourceCaches){let V=_._sourceCaches[N],$=V.getSource().type;$!=="vector"&&$!=="geojson"||V.reload()}})}),this.on("data",x=>{if(x.dataType!=="source"||x.sourceDataType!=="metadata")return;let S=this.getOwnSource(x.sourceId);if(S&&S.vectorLayerIds)for(let A in this._layers){let N=this._layers[A];N.source===S.id&&this._validateLayer(N)}})}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(o.h(l))return l;let p=o.di(l);if(!p.startsWith("http"))try{return new URL(p,location.href).toString()}catch{return p}return p}return`json://${o.dj(JSON.stringify(l))}`}_diffStyle(l,p,_){this.globalId=this._getGlobalId(l);let x=(S,A)=>{try{A(null,this.setState(S,_))}catch(N){A(N,!1)}};if(typeof l=="string"){let S=this.map._requestManager.normalizeStyleURL(l),A=this.map._requestManager.transformRequest(S,o.R.Style);o.m(A,(N,V)=>{N?this.fire(new o.y(N)):V&&x(V,p)})}else typeof l=="object"&&x(l,p)}loadURL(l,p={}){this.fire(new o.z("dataloading",{dataType:"style"}));let _=typeof p.validate=="boolean"?p.validate:!o.h(l);this.globalId=this._getGlobalId(l),l=this.map._requestManager.normalizeStyleURL(l,p.accessToken),this.resolvedImports.add(l);let x=this.importsCache.get(l);if(x)return this._load(x,_);let S=this.map._requestManager.transformRequest(l,o.R.Style);this._request=o.m(S,(A,N)=>{if(this._request=null,A)this.fire(new o.y(A));else if(N)return this.importsCache.set(l,N),this._load(N,_)})}loadJSON(l,p={}){this.fire(new o.z("dataloading",{dataType:"style"})),this.globalId=this._getGlobalId(l),this._request=o.o.frame(()=>{this._request=null,this._load(l,p.validate!==!1)})}loadEmpty(){this.fire(new o.z("dataloading",{dataType:"style"})),this._load(Su,!1)}_loadImports(l,p,_){if(this.importDepth>=4)return o.w("Style doesn't support nesting deeper than 5"),Promise.resolve();let x=[];for(let S of l){let A=this._createFragmentStyle(S),N=new Promise(Y=>{A.once("style.import.load",Y),A.once("error",Y)}).then(()=>this.mergeAll());if(x.push(N),this.resolvedImports.has(S.url)){A.loadEmpty();continue}let V=S.data||this.importsCache.get(S.url);V?(A.loadJSON(V,{validate:p}),this._isInternalStyle(V)&&(A.globalId=null)):S.url?A.loadURL(S.url,{validate:p}):A.loadEmpty();let $={style:A,id:S.id,config:S.config};if(_){let Y=this.fragments.findIndex(({id:J})=>J===_);this.fragments=this.fragments.slice(0,Y).concat($).concat(this.fragments.slice(Y))}else this.fragments.push($)}return Promise.allSettled(x)}getImportGlobalIds(l=this,p=new Set){for(let _ of l.fragments)_.style.globalId&&p.add(_.style.globalId),this.getImportGlobalIds(_.style,p);return[...p.values()]}_createFragmentStyle(l){let p=this.scope?o.B(l.id,this.scope):l.id,_,x=this._initialConfig&&this._initialConfig[p];(l.config||x)&&(_=Object.assign({},l.config,x));let S=new Rh(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:_,configOptions:this.options,colorThemeOverride:l["color-theme"],configDependentLayers:this._configDependentLayers});return S.setEventedParent(this.map,{style:S}),S}_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 S=Object.assign({},Su,{imports:[{id:"basemap",data:l,url:""}]});return void this._load(S,p)}if(this.updateConfig(this._config,l.schema),p&&fn(this,Cn(l)))return;this._loaded=!0,this.stylesheet=o.dk(l);let _=()=>{for(let V in l.sources)this.addSource(V,l.sources[V],{validate:!1,isInitialLoad:!0});if(l.iconsets)for(let V in l.iconsets)this.addIconset(V,l.iconsets[V]);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 S=ZA(this.stylesheet.layers);if(this._order=S.map(V=>V.id),this.stylesheet.light&&o.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 V=this.stylesheet.lights[0];this.light=new Ft(V.properties,V.id)}else this.setLights(this.stylesheet.lights);this.light||(this.light=new Ft(this.stylesheet.light)),this._layers={};for(let V of S){let $=o.dq(V,this.scope,this._styleColorTheme.lut,this.options);$.configDependencies.size!==0&&this._configDependentLayers.add($.fqid),$.setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=$;let Y=this.getOwnLayerSourceCache($),J=!!this.directionalLight&&this.directionalLight.shadowsEnabled();Y&&$.canCastShadows()&&J&&(Y.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 o.z("data",{dataType:"style"}));let N=this.isRootStyle();l.imports?this._loadImports(l.imports,p).then(()=>{this._reloadImports(),this.fire(new o.z(N?"style.load":"style.import.load"))}).catch(V=>{this.fire(new o.y(new Error("Failed to load imports",V))),this.fire(new o.z(N?"style.load":"style.import.load"))}):(this._reloadImports(),this.fire(new o.z(N?"style.load":"style.import.load")))};this._styleColorTheme.colorTheme=this.stylesheet["color-theme"];let x=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(x){let S=this._evaluateColorThemeData(x);this._loadColorTheme(S).then(()=>{_()}).catch(A=>{o.w(`Couldn't load color theme from the stylesheet: ${A}`),_()})}else this._styleColorTheme.lut=null,_()}isRootStyle(){return this.importDepth===0}mergeAll(){let l,p,_,x,S,A,N,V,$,Y,J={};this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle(W=>{if(W.stylesheet){if(W.light!=null&&(l=W.light),W.stylesheet.lights)for(let oe of W.stylesheet.lights)oe.type==="ambient"&&W.ambientLight!=null&&(p=W.ambientLight),oe.type==="directional"&&W.directionalLight!=null&&(_=W.directionalLight);x=this._prioritizeTerrain(x,W.terrain,W.stylesheet.terrain),W.stylesheet.fog&&W.fog!=null&&(S=W.fog),W.stylesheet.snow&&W.snow!=null&&(A=W.snow),W.stylesheet.rain&&W.rain!=null&&(N=W.rain),W.stylesheet.camera!=null&&(Y=W.stylesheet.camera),W.stylesheet.projection!=null&&(V=W.stylesheet.projection),W.stylesheet.transition!=null&&($=W.stylesheet.transition),J[W.scope]=W._styleColorTheme}}),this.light=l,this.ambientLight=p,this.directionalLight=_,this.fog=S,this.snow=A,this.rain=N,this._styleColorThemeForScope=J,x===null?delete this.terrain:this.terrain=x,this.camera=Y||{"camera-projection":"perspective"},this.projection=V||{name:"mercator"},this.transition=Object.assign({},lc,$),this.mergeSources(),this.mergeLayers()}forEachFragmentStyle(l){let p=_=>{for(let x of _.fragments)p(x.style);l(_)};p(this)}_prioritizeTerrain(l,p,_){let x=l&&l.drapeRenderMode===0;return _===null?p&&p.drapeRenderMode===0?p:x?l:null:p!=null&&(!l||x||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={},_={};this.forEachFragmentStyle(x=>{for(let S in x._sourceCaches){let A=o.B(S,x.scope);l[A]=x._sourceCaches[S]}for(let S in x._otherSourceCaches){let A=o.B(S,x.scope);p[A]=x._otherSourceCaches[S]}for(let S in x._symbolSourceCaches){let A=o.B(S,x.scope);_[A]=x._symbolSourceCaches[S]}}),this._mergedSourceCaches=l,this._mergedOtherSourceCaches=p,this._mergedSymbolSourceCaches=_}mergeLayers(){let l={},p=[],_={};this._mergedSlots=[],this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this.forEachFragmentStyle(A=>{for(let N of A._order){let V=A._layers[N];if(V.type==="slot"){let $=o.dl(N);if(l[$])continue;l[$]=[]}V.slot&&l[V.slot]?l[V.slot].push(V):p.push(V)}}),this._mergedOrder=[];let x=-1,S=(A=[])=>{for(let N of A)if(N.type==="slot"){let V=o.dl(N.id);l[V]&&S(l[V]),this._mergedSlots.push(V)}else{let V=o.B(N.id,N.scope);this._mergedOrder.push(V),_[V]=N,N.is3D(!!this.terrain)&&(this._has3DLayers=!0,x=this._mergedOrder.length-1),N.type==="circle"&&(this._hasCircleLayers=!0),N.type==="symbol"&&(this._hasSymbolLayers=!0),N.type==="clip"&&(this._clipLayerPresent=!0)}};if(S(p),this._has3DLayers){let A={};for(let N=0;NA[N]-A[V])}this._mergedLayers=_,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,_,x,S){let A=Object.assign({},_);for(let V of Object.keys(o.a6.colorTheme))A[V]===void 0&&(A[V]=o.a6.colorTheme[V].default);let N=new o.a8(i3,p,new Map(x));return N.setTransitionOrValue(A,x),N.untransitioned().possiblyEvaluate(new o.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((_,x)=>{let S="data:image/png;base64,";if(!l||l.length===0)return this._styleColorTheme.lut=null,this._styleColorTheme.lutLoading=!1,void _();let A=l;A.startsWith(S)||(A=S+A);let N=o.I.from("mapbox-reserved-lut"),V=new Image;V.src=A,V.onerror=()=>{this._styleColorTheme.lutLoading=!1,x(new Error("Failed to load image data"))},V.onload=()=>{if(this._styleColorTheme.lutLoadingCorrelationID!==p)return void _();this._styleColorTheme.lutLoading=!1;let{width:$,height:Y,data:J}=o.o.getImageData(V);if(Y>32)return void x(new Error("The height of the image must be less than or equal to 32 pixels."));if($!==Y*Y)return void x(new Error("The width of the image must be equal to the height squared."));this.getImage(N)&&this.removeImage(N),this.addImage(N,{data:new o.q({width:$,height:Y},J),pixelRatio:1,sdf:!1,usvg:!1,version:0});let W=this.imageManager.getImage(N,this.scope);W?(this._styleColorTheme.lut={image:W.data,data:l},_()):x(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,_,x){let S,A,N,V=o.o.devicePixelRatio>1?"@2x":"",$=o.m(_.transformRequest(_.normalizeSpriteURL(p,V,".json"),o.R.SpriteJSON),(W,oe)=>{$=null,N||(N=W,S=oe,J())}),Y=o.n(_.transformRequest(_.normalizeSpriteURL(p,V,".png"),o.R.SpriteImage),(W,oe)=>{Y=null,N||(N=W,A=oe,J())});function J(){if(N)x(N);else if(S&&A){let W=o.o.getImageData(A),oe={};for(let ce in S){let{width:de,height:Ee,x:ge,y:Oe,sdf:Be,pixelRatio:He,stretchX:nt,stretchY:et,content:at}=S[ce],tt=new o.q({width:de,height:Ee});o.q.copy(W,tt,{x:ge,y:Oe},{x:0,y:0},{width:de,height:Ee},null),oe[ce]={data:tt,pixelRatio:He!==void 0?He:1,sdf:Be!==void 0&&Be,stretchX:nt,stretchY:et,content:at,usvg:!1,version:0}}x(null,oe)}}return{cancel(){$&&($.cancel(),$=null),Y&&(Y.cancel(),Y=null)}}})(l,this.map._requestManager,(p,_)=>{if(this._spriteRequest=null,p)this.fire(new o.y(p));else if(_){let x=new Map;for(let S in _)x.set(o.I.from(S),_[S]);this.addImages(x)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new o.z("data",{dataType:"style"}))})}addIconset(l,p){if(p.type==="sprite")return void this._loadSprite(p.url);let _=this.getOwnSourceCache(p.source);if(!_)return void this.fire(new o.y(new Error(`Source "${p.source}" as specified by iconset "${l}" does not exist and cannot be used as an iconset source`)));let x=_.getSource();if(x.type!=="raster-array")return void this.fire(new o.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`)));x.partial=!1;let S=new kn(l,this.scope,_);this.imageManager.addImageProvider(S,this.scope)}removeIconset(l){this.imageManager.removeImageProvider(l,this.scope)}_loadIconset(l){if(!o.h(l)&&this.map._spriteFormat!=="icon_set"||this.map._spriteFormat==="raster")return void this._loadSprite(l);let p=this.map._spriteFormat==="auto";var _,x;this._spriteRequest=(x=(S,A)=>{if(this._spriteRequest=null,S)p?this._loadSprite(l):this.fire(new o.y(S));else if(A){let N=new Map;for(let V in A)N.set(o.I.from(V),A[V]);this.addImages(N)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new o.z("data",{dataType:"style"}))},o.bu((_=this.map._requestManager).transformRequest(_.normalizeIconsetURL(l),o.R.Iconset),(S,A)=>{if(S)return void x(S);let N={},V=o.dc(new o.bt(A));for(let $ of V.icons){let Y={version:1,pixelRatio:o.o.devicePixelRatio,content:f_($),stretchX:$.metadata?Ri($.metadata.stretch_x_areas):void 0,stretchY:$.metadata?Ri($.metadata.stretch_y_areas):void 0,sdf:!1,usvg:!0,icon:$};N[$.name]=Y}x(null,N)}))}_validateLayer(l){let p=this.getOwnSource(l.source);if(!p)return;let _=l.sourceLayer;_&&(p.type==="geojson"||p.vectorLayerIds&&p.vectorLayerIds.indexOf(_)===-1)&&this.fire(new o.y(new Error(`Source layer "${_}" 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 _=this.fragments[p];return _&&_.style&&(l.data=_.style.serialize()),l})}_serializeSources(){let l={};for(let p in this._sourceCaches){let _=this._sourceCaches[p].getSource();l[_.id]||(l[_.id]=_.serialize())}return l}_serializeLayers(l){let p=[];for(let _ of l){let x=this._layers[_];x&&x.type!=="custom"&&p.push(x.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 o.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 o.y(new Error(`The source '${l}' does not exist in the map's style.`)))}precompilePrograms(l,p){let _=this.map.painter;if(_)for(let x=l.minzoom||0;x<(l.maxzoom||25.5);x++){let S=l.getProgramIds();if(S)for(let A of S){let N=l.getDefaultProgramParams(A,p.zoom,this._styleColorTheme.lut);N&&(_.style=this,this.fog&&(_._fogVisible=!0,N.overrideFog=!0,_.getOrCreateProgram(A,N)),_._fogVisible=!1,N.overrideFog=!1,_.getOrCreateProgram(A,N),(this.stylesheet.terrain||this.stylesheet.projection&&this.stylesheet.projection.name==="globe")&&(N.overrideRtt=!0,_.getOrCreateProgram(A,N)))}}}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 _=this._changes.isDirty(),x=!1;if(this._changes.isDirty()){let N=this._changes.getLayerUpdatesByScope();for(let V in N){let{updatedIds:$,removedIds:Y}=N[V];($||Y)&&(this._updateWorkerLayers(V,$,Y),x=!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 S={};for(let N in this._mergedSourceCaches){let V=this._mergedSourceCaches[N];S[N]=V.used,V.used=!1,V.tileCoverLift=0}for(let N of this._mergedOrder){let V=this._mergedLayers[N];if(V.recalculate(l,this._availableImages),!V.isHidden(l.zoom)){let $=this.getLayerSourceCache(V);$&&($.used=!0,$.tileCoverLift=Math.max($.tileCoverLift,V.tileCoverLift()))}!this._precompileDone&&this._shouldPrecompile&&("requestIdleCallback"in window?requestIdleCallback(()=>{this.precompilePrograms(V,l)}):this.precompilePrograms(V,l))}this._shouldPrecompile&&(this._precompileDone=!0),this.terrain&&x&&this.mergeLayers();let A=this.imageManager.getPendingImageProviders();for(let N of A)N.sourceCache.used=!0;for(let N in S){let V=this._mergedSourceCaches[N];S[N]!==V.used&&V.getSource().fire(new o.z("data",{sourceDataType:"visibility",dataType:"source",sourceId:V.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),_&&this.fire(new o.z("data",{dataType:"style"}))}updateImageProviders(){let l=this.imageManager.getPendingImageProviders();for(let p of l){let _=p.resolvePendingRequests(),x=this.getFragmentStyle(p.scope);x&&x.addImages(_)}}_updateTilesForChangedImages(){let l={};for(let p in this._mergedSourceCaches){let _=this._mergedSourceCaches[p].getSource().scope;l[_]=l[_]||this._changes.getUpdatedImages(_),l[_].length!==0&&this._mergedSourceCaches[p].reloadTilesForDependencies(["icons","patterns"],l[_])}for(let p in l)this._changes.resetUpdatedImages(p)}_updateWorkerLayers(l,p,_){let x=this.getFragmentStyle(l);x&&this.dispatcher.broadcast("updateLayers",{layers:p?x._serializeLayers(p):[],scope:l,removedIds:_||[],options:x.options})}setState(l,p){if(this._checkLoaded(),fn(this,Cn(l)))return!1;(l=o.dk(l)).layers=ZA(l.layers);let _=(function(A,N){if(!A)return[{command:pa.setStyle,args:[N]}];let V=[];try{if(!o.by(A.version,N.version))return[{command:pa.setStyle,args:[N]}];if(o.by(A.center,N.center)||V.push({command:pa.setCenter,args:[N.center]}),o.by(A.zoom,N.zoom)||V.push({command:pa.setZoom,args:[N.zoom]}),o.by(A.bearing,N.bearing)||V.push({command:pa.setBearing,args:[N.bearing]}),o.by(A.pitch,N.pitch)||V.push({command:pa.setPitch,args:[N.pitch]}),o.by(A.sprite,N.sprite)||V.push({command:pa.setSprite,args:[N.sprite]}),o.by(A.glyphs,N.glyphs)||V.push({command:pa.setGlyphs,args:[N.glyphs]}),o.by(A.imports,N.imports)||(function(oe=[],ce=[],de){ce=ce||[];let Ee=(oe=oe||[]).map(ac),ge=ce.map(ac),Oe=oe.reduce(sc,{}),Be=ce.reduce(sc,{}),He=Ee.slice(),nt,et,at,tt;for(nt=0,et=0;nt{oe.source&&$[oe.source]?V.push({command:pa.removeLayer,args:[oe.id]}):J.push(oe)});let W=A.terrain;W&&$[W.source]&&(V.push({command:pa.setTerrain,args:[void 0]}),W=void 0),V=V.concat(Y),o.by(W,N.terrain)||V.push({command:pa.setTerrain,args:[N.terrain]}),(function(oe,ce,de){ce=ce||[];let Ee=(oe=oe||[]).map(ac),ge=ce.map(ac),Oe=oe.reduce(sc,{}),Be=ce.reduce(sc,{}),He=Ee.slice(),nt=Object.create(null),et,at,tt,Xe,it,Wt,Nt;for(et=0,at=0;et!(A.command in us));if(_.length===0)return!1;let x=_.filter(A=>!(A.command in ko));if(x.length>0)throw new Error(`Unimplemented: ${x.map(A=>A.command).join(", ")}.`);let S=[];return _.forEach(A=>{S.push(this[A.command](...A.args))}),p&&Promise.all(S).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,_]of l.entries()){if(this.getImage(p))return this.fire(new o.y(new Error(`An image with the name "${p.name}" already exists.`)));this.imageManager.addImage(p,this.scope,_),this._changes.updateImage(p,this.scope)}return this._updateWorkerImages(),this.fire(new o.z("data",{dataType:"style"})),this}addImage(l,p){return this.getImage(l)?this.fire(new o.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 o.z("data",{dataType:"style"})),this)}updateImage(l,p,_=!1){this.imageManager.updateImage(l,this.scope,p),_&&(this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new o.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 o.z("data",{dataType:"style"})),this):this.fire(new o.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 o.z("data",{dataType:"style"})),this}addModel(l,p,_={}){return this._checkLoaded(),this._validate(xt,`models.${l}`,p,null,_)||(this.modelManager.addModel(l,p,this.scope),this.fire(new o.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 o.z("data",{dataType:"style"})),this):this.fire(new o.y(new Error("No model with this ID exists.")))}listModels(){return this._checkLoaded(),this.modelManager.listModels(this.scope)}addSource(l,p,_={}){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(wr,`sources.${l}`,p,null,_))return;this.map&&this.map._collectResourceTiming&&(p.collectResourceTiming=!0);let x=z1(l,p,this.dispatcher,this);x.scope=this.scope,x.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(x.id),source:x.serialize(),sourceId:x.id}));let S=A=>{let N=(A?"symbol:":"other:")+x.id,V=o.B(N,this.scope),$=this._sourceCaches[N]=new bf(V,x,A);(A?this._symbolSourceCaches:this._otherSourceCaches)[x.id]=$,$.onAdd(this.map)};S(!1),p.type!=="vector"&&p.type!=="geojson"||S(!0),x.onAdd&&x.onAdd(this.map),_.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 x in this._layers)if(this._layers[x].source===l)return this.fire(new o.y(new Error(`Source "${l}" cannot be removed while layer "${x}" is using it.`)));if(this.terrain&&this.terrain.scope===this.scope&&this.terrain.get().source===l)return this.fire(new o.y(new Error(`Source "${l}" cannot be removed while terrain is using it.`)));if(this.stylesheet.iconsets){let x=Object.entries(this.stylesheet.iconsets).find(([S,A])=>A.type==="source"&&A.source===l);if(x)return this.fire(new o.y(new Error(`Source "${l}" cannot be removed while iconset "${x[0]}" is using it.`)))}let _=this.getOwnSourceCaches(l);for(let x of _){let S=o.dl(x.id);delete this._sourceCaches[S],this._changes.discardSourceCacheUpdate(x.id),x.fire(new o.z("data",{sourceDataType:"metadata",dataType:"source",sourceId:x.getSource().id})),x.setEventedParent(null),x.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 _=this.getOwnSourceCache(p);_&&l.push(_.getSource())}return l}areTilesLoaded(){let l=this._mergedSourceCaches;for(let p in l){let _=l[p]._tiles;for(let x in _){let S=_[x];if(S.state!=="loaded"&&S.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 S of l){if(this._validate(ga,"lights",S))return;switch(S.type){case"ambient":if(this.ambientLight){let A=this.ambientLight;A.set(S),A.updateTransitions(p)}else this.ambientLight=new Za(S,Sc||(Sc=new o.a9({color:new o.aa(o.a6.properties_light_ambient.color),"color-use-theme":new o.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new o.aa(o.a6.properties_light_ambient.intensity)})),this.scope,this.options);break;case"directional":if(this.directionalLight){let A=this.directionalLight;A.set(S),A.updateTransitions(p)}else this.directionalLight=new Za(S,Gc||(Gc=new o.a9({direction:new o.ap(o.a6.properties_light_directional.direction),color:new o.aa(o.a6.properties_light_directional.color),"color-use-theme":new o.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new o.aa(o.a6.properties_light_directional.intensity),"cast-shadows":new o.aa(o.a6.properties_light_directional["cast-shadows"]),"shadow-quality":new o.aa(o.a6.properties_light_directional["shadow-quality"]),"shadow-intensity":new o.aa(o.a6.properties_light_directional["shadow-intensity"])})),this.scope,this.options)}}let _=Object.assign(p,{worldview:this.map.getWorldview()}),x=new o.ac(this.z||0,_);this.ambientLight&&this.ambientLight.recalculate(x),this.directionalLight&&this.directionalLight.recalculate(x),this._brightness=this.calculateLightsBrightness(),this.dispatcher.broadcast("setBrightness",this._brightness)}calculateLightsBrightness(){let l=this.directionalLight,p=this.ambientLight;if(!l||!p)return;let _=W=>.2126*(W[0]<=.03928?W[0]/12.92:Math.pow((W[0]+.055)/1.055,2.4))+.7152*(W[1]<=.03928?W[1]/12.92:Math.pow((W[1]+.055)/1.055,2.4))+.0722*(W[2]<=.03928?W[2]/12.92:Math.pow((W[2]+.055)/1.055,2.4)),x=l.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),S=l.properties.get("intensity"),A=l.properties.get("direction"),N=1-o.d3(A.x,A.y,A.z)[2]/90,V=_(x)*S*N,$=p.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),Y=p.properties.get("intensity"),J=_($)*Y;return Number(((V+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(o.dm(l)){let p=o.dn(l),_=this.fragments.find(({id:S})=>S===p);if(!_)return;let x=o.dl(l);return _.style.getFragmentStyle(x)}{let p=this.fragments.find(({id:_})=>_===l);return p?p.style:void 0}}setFeaturesetSelectors(l){if(!l)return;let p={},_=(x,S="")=>`${x}::${S}`;this._featuresetSelectors={};for(let x in l){let S=this._featuresetSelectors[x]=[];for(let A of l[x].selectors){if(A.featureNamespace){let V=this.getOwnLayer(A.layer);if(!V){o.w(`Layer is undefined for selector: ${A.layer}`);continue}let $=_(V.source,V.sourceLayer);if($ in p&&p[$]!==A.featureNamespace){o.w(`"featureNamespace ${A.featureNamespace} of featureset ${x}'s selector is not associated to the same source, skip this selector`);continue}p[$]=A.featureNamespace}let N;if(A.properties)for(let V in A.properties){let $=o.U(A.properties[V]);$.result==="success"&&(N=N||{},N[V]=$.value)}S.push({layerId:A.layer,namespace:A.featureNamespace,properties:N,uniqueFeatureID:A._uniqueFeatureID})}}}getFeaturesetDescriptors(l){let p=this.getFragmentStyle(l);if(!p||!p.stylesheet.featuresets)return[];let _=[];for(let x in p.stylesheet.featuresets)_.push({featuresetId:x,importId:p.scope?p.scope:void 0});return _}getFeaturesetLayers(l,p){let _=this.getFragmentStyle(p),x=_.stylesheet.featuresets;if(!x||!x[l])return this.fire(new o.y(new Error(`The featureset '${l}' does not exist in the map's style and cannot be queried.`))),[];let S=[];for(let A of x[l].selectors){let N=_.getOwnLayer(A.layer);N&&S.push(N)}return S}getConfigProperty(l,p){let _=this.getFragmentStyle(l);if(!_)return null;let x=o.B(p,_.scope),S=_.options.get(x),A=S?S.value||S.default:null;return A?A.serialize():null}setConfigProperty(l,p,_){let x=this.getFragmentStyle(l);if(!x)return;let S=x.stylesheet.schema;if(!S||!S[p])return;let A=o.U(_);if(A.result!=="success")return void fn(this,A.value);let N=A.value.expression,V=o.B(p,x.scope),$=x.options.get(V);if(!$)return;let Y,{minValue:J,maxValue:W,stepValue:oe,type:ce,values:de}=S[p],Ee=o.U(S[p].default);Ee.result==="success"&&(Y=Ee.value.expression),Y?(this.options.set(V,Object.assign({},$,{value:N,default:Y,minValue:J,maxValue:W,stepValue:oe,type:ce,values:de})),this.updateConfigDependencies(p)):this.fire(new o.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 _=p.stylesheet.schema;if(!_)return null;let x={};for(let S in _){let A=o.B(S,p.scope),N=p.options.get(A),V=N?N.value||N.default:null;x[S]=V?V.serialize():null}return x}setConfig(l,p){let _=this.getFragmentStyle(l);_&&(_.updateConfig(p,_.stylesheet.schema),this.updateConfigDependencies())}getSchema(l){let p=this.getFragmentStyle(l);return p?p.stylesheet.schema:null}setSchema(l,p){let _=this.getFragmentStyle(l);_&&(_.stylesheet.schema=p,_.updateConfig(_._config,p),this.updateConfigDependencies())}updateConfig(l,p){if(this._config=l,l||p)if(p)for(let _ in p){let x,S,A=o.U(p[_].default);if(A.result==="success"&&(x=A.value.expression),l&&l[_]!==void 0){let W=o.U(l[_]);W.result==="success"&&(S=W.value.expression)}let{minValue:N,maxValue:V,stepValue:$,type:Y,values:J}=p[_];if(x){let W=o.B(_,this.scope);this.options.set(W,{default:x,value:S,minValue:N,maxValue:V,stepValue:$,type:Y,values:J})}else this.fire(new o.y(new Error(`No schema defined for config option "${_}".`)))}else this.fire(new o.y(new Error("Attempting to set config for a style without schema.")))}updateConfigDependencies(l){for(let p of this._configDependentLayers){let _=this.getLayer(p);if(_){if(l&&!_.configDependencies.has(l))continue;_.possiblyEvaluateVisibility(),this._updateLayer(_)}}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 _=p._styleColorTheme.colorThemeOverride?p._styleColorTheme.colorThemeOverride:p._styleColorTheme.colorTheme;if(_){let x=p._evaluateColorThemeData(_);(!p._styleColorTheme.lut&&x!==""||p._styleColorTheme.lut&&x!==p._styleColorTheme.lut.data)&&p.setColorTheme(_)}}),this._changes.setDirty()}addLayer(l,p,_={}){this._checkLoaded();let x=l.id;if(this._layers[x])return void this.fire(new o.y(new Error(`Layer with id "${x}" already exists on this map`)));let S;if(l.type==="custom"){if(fn(this,o.dp(l)))return;S=o.dq(l,this.scope,this._styleColorTheme.lut,this.options)}else{if(typeof l.source=="object"&&(this.addSource(x,l.source),l=o.dk(l),l=Object.assign(l,{source:x})),this._validate(At,`layers.${x}`,l,{arrayIndex:-1},_))return;S=o.dq(l,this.scope,this._styleColorTheme.lut,this.options),this._validateLayer(S),S.setEventedParent(this,{layer:{id:x}})}S.configDependencies.size!==0&&this._configDependentLayers.add(S.fqid);let A=this._order.length;if(p){let Y=this._order.indexOf(p);if(Y===-1)return void this.fire(new o.y(new Error(`Layer with id "${p}" does not exist on this map.`)));S.slot===this._layers[p].slot?A=Y:o.w(`Layer with id "${p}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(A,0,x),this._layerOrderChanged=!0,this._layers[x]=S;let N=this.getOwnLayerSourceCache(S),V=!!this.directionalLight&&this.directionalLight.shadowsEnabled();N&&S.canCastShadows()&&V&&(N.castsShadows=!0);let $=this._changes.getRemovedLayer(S);if($&&S.source&&N&&S.type!=="custom"){this._changes.discardLayerRemoval(S);let Y=o.B(S.source,S.scope);$.type!==S.type?this._changes.updateSourceCache(Y,"clear"):(this._changes.updateSourceCache(Y,"reload"),N.pause())}this._updateLayer(S),S.onAdd&&S.onAdd(this.map),S.scope=this.scope,this.mergeLayers()}moveLayer(l,p){this._checkLoaded();let _=this._checkLayer(l);if(!_||l===p)return;let x=this._order.indexOf(l);this._order.splice(x,1);let S=this._order.length;if(p){let A=this._order.indexOf(p);if(A===-1)return void this.fire(new o.y(new Error(`Layer with id "${p}" does not exist on this map.`)));_.slot===this._layers[p].slot?S=A:o.w(`Layer with id "${p}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(S,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 _=this._order.indexOf(l);this._order.splice(_,1),delete this._layers[l],this._changes.setDirty(),this._layerOrderChanged=!0,this._configDependentLayers.delete(p.fqid),this._changes.removeLayer(p);let x=this.getOwnLayerSourceCache(p);if(x&&x.castsShadows){let S=!1;for(let A in this._layers)if(this._layers[A].source===p.source&&this._layers[A].canCastShadows()){S=!0;break}x.castsShadows=S}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,_){this._checkLoaded();let x=this._checkLayer(l);x&&(x.minzoom===p&&x.maxzoom===_||(p!=null&&(x.minzoom=p),_!=null&&(x.maxzoom=_),this._updateLayer(x)))}getSlots(){return this._checkLoaded(),this._mergedSlots}setSlot(l,p){this._checkLoaded();let _=this._checkLayer(l);_&&_.slot!==p&&(_.slot=p,this._updateLayer(_))}setFilter(l,p,_={}){this._checkLoaded();let x=this._checkLayer(l);if(x&&!o.by(x.filter,p))return p==null?(x.filter=void 0,void this._updateLayer(x)):void(this._validate(Ce,`layers.${x.id}.filter`,p,{layerType:x.type},_)||(x.filter=o.dk(p),this._updateLayer(x)))}getFilter(l){let p=this._checkLayer(l);if(p)return o.dk(p.filter)}setLayoutProperty(l,p,_,x={}){this._checkLoaded();let S=this._checkLayer(l);if(S&&!o.by(S.getLayoutProperty(p),_)){if(_!=null&&(!x||x.validate!==!1)&&fn(S,Ke.call(Cn,{key:`layers.${l}.layout.${p}`,layerType:S.type,objectKey:p,value:_,styleSpec:o.a6,style:{glyphs:!0,sprite:!0}})))return;S.setLayoutProperty(p,_),S.configDependencies.size!==0&&this._configDependentLayers.add(S.fqid),this._updateLayer(S)}}getLayoutProperty(l,p){let _=this._checkLayer(l);if(_)return _.getLayoutProperty(p)}setPaintProperty(l,p,_,x={}){this._checkLoaded();let S=this._checkLayer(l);if(!S||o.by(S.getPaintProperty(p),_)||_!=null&&(!x||x.validate!==!1)&&fn(S,Me.call(Cn,{key:`layers.${l}.paint.${p}`,layerType:S.type,objectKey:p,value:_,styleSpec:o.a6})))return;let A=S.setPaintProperty(p,_);S.configDependencies.size!==0&&this._configDependentLayers.add(S.fqid),A&&this._updateLayer(S),this._changes.updatePaintProperties(S)}getPaintProperty(l,p){let _=this._checkLayer(l);if(_)return _.getPaintProperty(p)}setFeatureState(l,p){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:V,importId:$}=l.target,Y=this.getFragmentStyle($),J=Y.getFeaturesetLayers(V);for(let{source:W,sourceLayer:oe}of J)Y.setFeatureState({id:l.id,source:W,sourceLayer:oe},p)}else if("layerId"in l.target){let{layerId:V}=l.target,$=this.getLayer(V);this.setFeatureState({id:l.id,source:$.source,sourceLayer:$.sourceLayer},p)}return}let _=l.source,x=l.sourceLayer,S=this._checkSource(_);if(!S)return;let A=S.type;if(A==="geojson"&&x)return void this.fire(new o.y(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if(A==="vector"&&!x)return void this.fire(new o.y(new Error("The sourceLayer parameter must be provided for vector source types.")));l.id===void 0&&this.fire(new o.y(new Error("The feature id parameter must be provided.")));let N=this.getOwnSourceCaches(_);for(let V of N)V.setFeatureState(x,l.id,p)}removeFeatureState(l,p){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:V,importId:$}=l.target,Y=this.getFragmentStyle($),J=Y.getFeaturesetLayers(V);for(let{source:W,sourceLayer:oe}of J)Y.removeFeatureState({id:l.id,source:W,sourceLayer:oe},p)}else if("layerId"in l.target){let{layerId:V}=l.target,$=this.getLayer(V);this.removeFeatureState({id:l.id,source:$.source,sourceLayer:$.sourceLayer},p)}return}let _=l.source,x=this._checkSource(_);if(!x)return;let S=x.type,A=S==="vector"?l.sourceLayer:void 0;if(S==="vector"&&!A)return void this.fire(new o.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 o.y(new Error("A feature id is required to remove its specific state property.")));let N=this.getOwnSourceCaches(_);for(let V of N)V.removeFeatureState(A,l.id,p)}getFeatureState(l){if(this._checkLoaded(),"target"in l){let S;if("featuresetId"in l.target){let{featuresetId:A,importId:N}=l.target,V=this.getFragmentStyle(N),$=V.getFeaturesetLayers(A);for(let{source:Y,sourceLayer:J}of $){let W=V.getFeatureState({id:l.id,source:Y,sourceLayer:J});if(W&&!S)S=W;else if(!o.by(S,W))return void this.fire(new o.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,N=this.getLayer(A);S=this.getFeatureState({id:l.id,source:N.source,sourceLayer:N.sourceLayer})}return S}let p=l.source,_=l.sourceLayer,x=this._checkSource(p);if(x){if(x.type!=="vector"||_)return l.id===void 0&&this.fire(new o.y(new Error("The feature id parameter must be provided."))),this.getOwnSourceCaches(p)[0].getFeatureState(_,l.id);this.fire(new o.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 o.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)},_=>_!==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),_=o.B(l.source,l.scope),x=this._changes.getUpdatedSourceCaches();l.source&&!x[_]&&p&&p.getSource().type!=="raster"&&(this._changes.updateSourceCache(_,"reload"),p.pause()),l.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(l){let p=N=>this._mergedLayers[N].is3D(!!this.terrain),_=this.order,x={},S=[];for(let N=_.length-1;N>=0;N--){let V=_[N];if(p(V)){x[V]=N;for(let $ of l){let Y=$[V];if(Y)for(let J of Y)S.push(J)}}}S.sort((N,V)=>V.intersectionZ-N.intersectionZ);let A=[];for(let N=_.length-1;N>=0;N--){let V=_[N];if(p(V))for(let $=S.length-1;$>=0;$--){let Y=S[$].feature;if(Y.layer&&x[Y.layer.id]{if(Dl.has(Y.type))return;let J=this.getOwnLayerSourceCache(Y),W=S[J.id]=S[J.id]||{sourceCache:J,layers:{},has3DLayers:!1};Y.is3D(!!this.terrain)&&(W.has3DLayers=!0),W.layers[Y.fqid]=W.layers[Y.fqid]||{styleLayer:Y,targets:[]},W.layers[Y.fqid].targets.push({filter:x})};if(p&&p.layers){if(!Array.isArray(p.layers))return this.fire(new o.y(new Error("parameters.layers must be an Array."))),[];for(let Y of p.layers){let J=this._layers[Y];if(!J)return this.fire(new o.y(new Error(`The layer '${Y}' does not exist in the map's style and cannot be queried for features.`))),[];A(J)}}else for(let Y in this._layers)A(this._layers[Y]);let N=this._queryRenderedFeatures(l,S,_),V=this._flattenAndSortRenderedFeatures(N),$=[];for(let Y of V)o.ds(Y.layer.id)===this.scope&&$.push(Y);return $}queryRenderedFeatureset(l,p,_){let x;p&&!Array.isArray(p)&&p.filter&&(this._validate(Ce,"queryRenderedFeatures.filter",p.filter,null,p),x=o.b6(p.filter));let S="mock",A=[];if(p&&p.target)A.push(Object.assign({},p,{targetId:S,filter:x}));else{let Y=this.getFeaturesetDescriptors();for(let J of Y)A.push({targetId:S,filter:x,target:J});for(let{style:J}of this.fragments){let W=J.getFeaturesetDescriptors();for(let oe of W)A.push({targetId:S,filter:x,target:oe})}}let N=this.queryRenderedTargets(l,A,_),V=[],$=new Set;for(let Y of N)for(let J of Y.variants[S])Fy(J,Y,$)||V.push(new o.dt(Y,J));return V}queryRenderedTargets(l,p,_){let x={},S=(N,V,$,Y)=>{let J=x[V.id]=x[V.id]||{sourceCache:V,layers:{},has3DLayers:!1};if(J.layers[N.fqid]=J.layers[N.fqid]||{styleLayer:N,targets:[]},N.is3D(!!this.terrain)&&(J.has3DLayers=!0),!Y)return $.uniqueFeatureID=!1,void J.layers[N.fqid].targets.push($);J.layers[N.fqid].targets.push(Object.assign({},$,{namespace:Y.namespace,properties:Y.properties,uniqueFeatureID:Y.uniqueFeatureID}))};for(let N of p)if("featuresetId"in N.target){let{featuresetId:V,importId:$}=N.target,Y=this.getFragmentStyle($);if(!Y||!Y._featuresetSelectors)continue;let J=Y._featuresetSelectors[V];if(!J){this.fire(new o.y(new Error(`The featureset '${V}' does not exist in the map's style and cannot be queried for features.`)));continue}for(let W of J){let oe=Y.getOwnLayer(W.layerId);oe&&!Dl.has(oe.type)&&S(oe,Y.getOwnLayerSourceCache(oe),N,W)}}else if("layerId"in N.target){let{layerId:V}=N.target,$=this.getLayer(V);if(!$||Dl.has($.type))continue;S($,this.getLayerSourceCache($),N)}let A=this._queryRenderedFeatures(l,x,_);return this._flattenAndSortRenderedFeatures(A)}_queryRenderedFeatures(l,p,_){let x=[],S=!!this.map._showQueryGeometry,A=Kl.createFromScreenPoints(l,_);for(let N in p){let V=RI(A,p[N],this._availableImages,_,S);Object.keys(V).length&&x.push(V)}if(this.placement)for(let N in p){if(!p[N].sourceCache._onlySymbols)continue;let V=KA(A.screenGeometry,p[N],this._availableImages,this.placement.collisionIndex,this.placement.retainedQueryData,this.map.getWorldview());Object.keys(V).length&&x.push(V)}return x}querySourceFeatures(l,p){let _=p&&p.filter;_&&this._validate(Ce,"querySourceFeatures.filter",_,null,p);let x=[],S=this.getOwnSourceCaches(l);for(let A of S)x=x.concat(l_(A,p));return x}addSourceType(l,p,_){return Rh.getSourceType(l)?_(new Error(`A source type called "${l}" already exists.`)):(Rh.setSourceType(l,p),p.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:l,url:p.workerSourceURL},_):_(null,null))}getFlatLight(){return this.light.getLight()}setFlatLight(l,p,_={}){this._checkLoaded();let x=this.light.getLight(),S=!1;for(let N in l)if(!o.by(l[N],x[N])){S=!0;break}if(!S)return;let A=this._getTransitionParameters();this.light.setLight(l,p,_),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=o.o.hasCanvasFingerprintNoise(),this.disableElevatedTerrain&&o.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 _=l,x=l.source==null;if(p===1){if(this.disableElevatedTerrain)return;if(typeof _.source=="object"){let N="terrain-dem-src";this.addSource(N,_.source),_=o.dk(_),_=Object.assign(_,{source:N})}let S=Object.assign({},_),A={};if(this.terrain&&x){S.source=this.terrain.get().source;let N=this.terrain?this.getFragmentStyle(this.terrain.scope):null;N&&(A.style=N.serialize())}if(this._validate(yi,"terrain",S,A))return}if(!this.terrain||this.terrain.scope!==this.scope&&!x||this.terrain&&p!==this.terrain.drapeRenderMode){if(!_)return;this._createTerrain(_,p),this.fire(new o.z("data",{dataType:"style"}))}else{let S=this.terrain,A=S.get();for(let N of Object.keys(o.a6.terrain))!_.hasOwnProperty(N)&&o.a6.terrain[N].default&&(_[N]=o.a6.terrain[N].default);for(let N in l)if(!o.by(l[N],A[N])){S.set(l,this.options),this.stylesheet.terrain=l;let V=this._getTransitionParameters({duration:0});S.updateTransitions(V),this.fire(new o.z("data",{dataType:"style"}));break}}this.mergeTerrain(),this.updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(l){let p=this.fog=new Fo(l,this.map.transform,this.scope,this.options);this.stylesheet.fog=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}_createSnow(l){let p=this.snow=new md(l,this.map.transform,this.scope,this.options);this.stylesheet.snow=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}_createRain(l){let p=this.rain=new Ns(l,this.map.transform,this.scope,this.options);this.stylesheet.rain=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}_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(!o.by(p.get(),l)){p.set(l,this.options),this.stylesheet.fog=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}}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(!o.by(p.get(),l)){p.set(l,this.options),this.stylesheet.snow=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}}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(!o.by(p.get(),l)){p.set(l,this.options),this.stylesheet.rain=p.get();let _=this._getTransitionParameters({duration:0});p.updateTransitions(_)}}else this._createRain(l);this._markersNeedUpdate=!0}_reloadColorTheme(){let l=()=>{for(let x in this._layers)this._layers[x].lut=this._styleColorTheme.lut;for(let x in this._sourceCaches)this._sourceCaches[x].clearTiles()},p=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(!p)return this._styleColorTheme.lut=null,void l();let _=this._evaluateColorThemeData(p);this._loadColorTheme(_).then(()=>{this.fire(new o.z("colorthemeset")),l()}).catch(x=>{o.w(`Couldn't set color theme: ${x}`)})}setColorTheme(l){this._checkLoaded(),this._styleColorTheme.colorThemeOverride&&o.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 _=this.getFragmentStyle(l);_&&(_._styleColorTheme.colorThemeOverride=p,_._reloadColorTheme())}_getTransitionParameters(l){return{now:o.o.now(),transition:Object.assign(this.transition,l)}}updateDrapeFirstLayers(){if(!this.terrain)return;let l=[],p=[];for(let _ of this._mergedOrder)this.isLayerDraped(this._mergedLayers[_])?l.push(_):p.push(_);this._drapedFirstOrder=[],this._drapedFirstOrder.push(...l),this._drapedFirstOrder.push(...p)}_createTerrain(l,p){let _=this.terrain=new oi(l,p,this.scope,this.options,this.map.getWorldview());p===1&&(this.stylesheet.terrain=l),this.mergeTerrain(),this.updateDrapeFirstLayers(),this._force3DLayerUpdate();let x=this._getTransitionParameters({duration:0});_.updateTransitions(x)}_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,_,x,S={}){if(S&&S.validate===!1)return!1;let A=Object.assign({},this.serialize());return fn(this,l.call(Cn,Object.assign({key:p,style:A,value:_,styleSpec:o.a6},x)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),o.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 _ of p)_.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 _ of p)_.resume(),_.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=iS(this.directionalLight));let _=new Set;for(let x in this._mergedLayers){let S=this._mergedLayers[x];S.hasElevation()&&!_.has(S.source)&&_.add(S.source)}for(let x in this._mergedSourceCaches){let S=this._mergedSourceCaches[x],A=_.has(S._source.id);S.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,_,x,S,A,N=!1){let V=!1,$=!1,Y={},J={};for(let W of this._mergedOrder){let oe=this._mergedLayers[W];if(oe.type!=="symbol")continue;let ce=o.B(oe.source,oe.scope),de=Y[ce];if(!de){let ge=this.getLayerSourceCache(oe);if(!ge)continue;let Oe=ge.getRenderableIds(!0).map(Be=>ge.getTileByID(Be));J[ce]=Oe.slice(),de=Y[ce]=Oe.sort((Be,He)=>He.tileID.overscaledZ-Be.tileID.overscaledZ||(Be.tileID.isLessThan(He.tileID)?-1:1))}let Ee=this.crossTileSymbolIndex.addLayer(oe,de,p.center.lng,p.projection);V=V||Ee}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._mergedOrder),N=N||this._layerOrderChanged||x===0,this._layerOrderChanged&&this.fire(new o.z("neworder")),(N||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.o.now(),p.zoom))&&(this.pauseablePlacement=new Op(p,this._mergedOrder,N,_,x,S,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,Y,J,this.map.painter.scaleFactor),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.o.now()),$=!0),V&&this.pauseablePlacement.placement.setStale()),$||V){this._buildingIndex.onNewFrame(p.zoom);for(let W=0;WS===l.id)!==-1)return void this.fire(new o.y(new Error(`Import with id '${l.id}' already exists in the map's style.`)));if(!p)return _.push(l),this._loadImports([l],!0);let x=_.findIndex(({id:S})=>S===p);return x===-1&&this.fire(new o.y(new Error(`Import with id "${p}" does not exist on this map.`))),this.stylesheet.imports=_.slice(0,x).concat(l).concat(_.slice(x)),this._loadImports([l],!0,p)}updateImport(l,p){this._checkLoaded();let _=this.stylesheet.imports||[],x=this.getImportIndex(l);return x===-1?this:typeof p=="string"?(this.setImportUrl(l,p),this):(p.url&&p.url!==_[x].url&&this.setImportUrl(l,p.url),o.by(p.config,_[x].config)||this.setImportConfig(l,p.config,p.data.schema),o.by(p.data,_[x].data)||this.setImportData(l,p.data),this)}moveImport(l,p){this._checkLoaded();let _=this.stylesheet.imports||[],x=this.getImportIndex(l);if(x===-1)return this;let S=this.getImportIndex(p);if(S===-1)return this;let A=_[x],N=this.fragments[x];return _=_.filter(({id:V})=>V!==l),this.fragments=this.fragments.filter(({id:V})=>V!==l),this.stylesheet.imports=_.slice(0,S).concat(A).concat(_.slice(S)),this.fragments=this.fragments.slice(0,S).concat(N).concat(this.fragments.slice(S)),this.mergeLayers(),this}setImportUrl(l,p){this._checkLoaded();let _=this.stylesheet.imports||[],x=this.getImportIndex(l);if(x===-1)return this;_[x].url=p;let S=this.fragments[x];return S.style=this._createFragmentStyle(_[x]),S.style.on("style.import.load",()=>this.mergeAll()),S.style.loadURL(p),this}setImportData(l,p){this._checkLoaded();let _=this.getImportIndex(l),x=this.stylesheet.imports||[];return _===-1?this:p?(this.fragments[_].style.setState(p),this._reloadImports(),this):(delete x[_].data,this.setImportUrl(l,x[_].url))}setImportConfig(l,p,_){this._checkLoaded();let x=this.getImportIndex(l),S=this.stylesheet.imports||[];if(x===-1)return this;p?S[x].config=p:delete S[x].config;let A=this.fragments[x];_&&A.style.stylesheet&&(A.style.stylesheet.schema=_);let N=A.style.stylesheet&&A.style.stylesheet.schema;return A.config=p,A.style.updateConfig(p,N),this.updateConfigDependencies(),this}removeImport(l){this._checkLoaded();let p=this.stylesheet.imports||[],_=this.getImportIndex(l);_!==-1&&(p.splice(_,1),this.fragments[_].style._remove(),this.fragments.splice(_,1),this._reloadImports())}getImportIndex(l){let p=(this.stylesheet.imports||[]).findIndex(_=>_.id===l);return p===-1&&this.fire(new o.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 _=this._mergedOtherSourceCaches[p];_&&l.push(_.getSource())}return l}getSource(l,p){let _=this.getSourceCache(l,p);return _&&_.getSource()}getLayerSource(l){let p=this.getLayerSourceCache(l);return p&&p.getSource()}getSourceCache(l,p){let _=o.B(l,p);return this._mergedOtherSourceCaches[_]}getLayerSourceCache(l){let p=o.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 _=l[p];_==="reload"?this.reloadSource(p):_==="clear"&&this.clearSource(p)}}updateLayers(l){let p=this._changes.getUpdatedPaintProperties();for(let _ of p){let x=this.getLayer(_);x&&x.updateTransitions(l)}}getGlyphsUrl(){return this.stylesheet.glyphs}setGlyphsUrl(l){this.stylesheet.glyphs=l,this.glyphManager.setURL(l)}getImages(l,p,_){this.imageManager.getImages(p.images,p.scope,_),this._updateTilesForChangedImages();let x=A=>{if(A){let N=p.images.map(V=>o.I.toString(V));A.setDependencies(p.tileID.key,p.type,N)}},S=o.B(p.source,p.scope);x(this._mergedOtherSourceCaches[S]),x(this._mergedSymbolSourceCaches[S]),p.images.some(A=>A.iconsetId)&&this.fire(new o.z("data",{dataType:"style"}))}rasterizeImages(l,p,_){this.imageManager.rasterizeImages(p,_)}getGlyphs(l,p,_){this.glyphManager.getGlyphs(p.stacks,_)}getResource(l,p,_){return o.dv(p,_)}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 o.y(new Error(`There is no source with ID '${l}'`))),!1):p.every(_=>_.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 _=l.type==="fill-extrusion"&&(l.sourceLayer==="building"||l.sourceLayer==="procedural_buildings"),x=l.type==="building";if(l.is3D(!!this.terrain)){if(_||x||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)}}Rh.getSourceType=function(y){return V1[y]},Rh.setSourceType=function(y,l){V1[y]=l},Rh.registerForPluginStateChange=o.dw;class n3{execute(l){let p=this._makeBuildingsQueryArea(l),_=this._makeFloorsQueryArea(l),x=l.queryRenderedFeatures(p).reduce(($,Y)=>{let J=Y.properties.id;return Y.properties.type!=="building"||$.some(W=>W.properties.id===J)||$.push(Y),$},[]),S=l.queryRenderedFeatures(_).reduce(($,Y)=>{let J=Y.properties.id;return Y.properties.type!=="floor"||$.some(W=>W.properties.id===J)||$.push(Y),$},[]),A=[l.getCenter().lng,l.getCenter().lat],N=this._findBuildingAtCenter(A,x),V=x.length>0?x[0]:null;return{floors:S.map($=>({id:$.properties.id,name:$.properties.name,isDefault:$.properties.is_default,zIndex:$.properties.z_index,connectedFloorIds:$.properties.connected_floor_ids,conflictedFloorIds:$.properties.conflicted_floor_ids,buildingIds:$.properties.building_ids})),building:N?{id:N.properties.id,name:N.properties.name}:{id:V.properties.id,name:V.properties.name}}}_makeBuildingsQueryArea(l){let p=l.transform.width,_=l.transform.height,x=Math.min(p,_)*(1/8),S=.5*(p-x),A=.5*(_-x);return[new o.P(S,A),new o.P(S+x,A+x)]}_makeFloorsQueryArea(l){let p=l.transform.width,_=l.transform.height;return[new o.P(0,0),new o.P(p,_)]}_findBuildingAtCenter(l,p){for(let _ of p)if(_.geometry.type==="Polygon"&&this._pointInPolygon(l,_.geometry.coordinates[0]))return _;return null}_pointInPolygon(l,p){let _=!1;for(let x=0,S=p.length-1;xl[1]!=V>l[1]&&l[0]<(p[S][0]-A)*(l[1]-N)/(V-N)+A&&(_=!_)}return _}}class Cf{constructor(){this._floors=new Map,this._buildings=new Map}append(l){let p=l.building,_=!1;if(p){let x=p.id;x&&(this._buildings.set(x,p),_||this._buildings.has(x)||(_=!0))}return l.floors.forEach(x=>{let S=x.id;_||this._floors.has(S)||(_=!0),this._floors.set(S,x)}),_}clear(){this._floors.clear(),this._buildings.clear()}getFloors(l=null){let p=Array.from(this._floors.values());return l?p.filter(_=>{let x=_.buildingIds;return!!x&&x.split(";").includes(l)}):p}}class GI{constructor(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage=new Cf}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(_=>{let x=_.buildingIds;if(!x)return!1;let S=x.split(";");return!!this._selectedBuildingId&&S.includes(this._selectedBuildingId)});return{selectedFloorId:p?p.id:null,floors:l}}getActiveFloors(l=!1){let p=this._featuresStorage.getFloors(),_=p.find(V=>V.id===this._selectedFloorId),x=p.filter(V=>V.isDefault===!0),S=[];if(_)return S=this._calculateCurrentActiveFloors(p,_,x,l),S;if(x.length===0){let V=this._featuresStorage.getFloors(this._selectedBuildingId);S=V.length>0?[V[0]]:[]}else S=x;let A=this._getNonConflictingLastActiveFloors(S),N=[...S,...A];return this._lastActiveFloors=N,N}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,_,x){if(!p)return this._getNonConflictingDefaultFloors(this._lastActiveFloors,_);let S=this._getConnectedFloors(p,l);return x?this._buildExplicitSelectionFloors(p,S,_):this._buildImplicitSelectionFloors(S,_)}_getConnectedFloors(l,p){let _=l.connectedFloorIds;if(!_)return[];let x=new Set(_.split(";"));return p.filter(S=>x.has(S.id))}_buildExplicitSelectionFloors(l,p,_){let x=[l,...p],S=this._getNonConflictingLastActiveFloors(x),A=[...x,...S],N=this._deduplicateFloors(A),V=this._getConflictingFloorIdsFrom(N),$=_.filter(J=>!V.has(J.id)),Y=[...N,...$];return this._lastActiveFloors=Y,Y}_buildImplicitSelectionFloors(l,p){let _=this._getConflictingFloorIdsFrom(this._lastActiveFloors),x=p.filter(A=>!_.has(A.id)),S=this._deduplicateFloors([...this._lastActiveFloors,...x]);return this._lastActiveFloors=S,S}_getNonConflictingDefaultFloors(l,p){let _=this._getConflictingFloorIdsFrom(l),x=p.filter(A=>!_.has(A.id)),S=this._deduplicateFloors([...l,...x]);return this._lastActiveFloors=S,S}_deduplicateFloors(l){let p=new Set;return l.filter(_=>{let x=_.id;return!p.has(x)&&(p.add(x),!0)})}_getConflictingFloorIdsFrom(l){let p=new Set;return l.forEach(_=>{let x=_.conflictedFloorIds;x&&x.split(";").forEach(S=>p.add(S))}),p}_getNonConflictingLastActiveFloors(l){if(!this._lastActiveFloors||this._lastActiveFloors.length===0)return[];let p=new Set(l.map(x=>x.id)),_=this._getConflictingFloorIdsFrom(l);return this._lastActiveFloors.filter(x=>{let S=x.id;return!p.has(S)&&!_.has(S)})}_isFloorConflicted(l,p){let _=l.id;return p.some(x=>{let S=x.conflictedFloorIds;return!!S&&S.split(";").includes(_)})}reset(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage.clear()}}class jC extends o.E{constructor(l){super(),o.aY(["_onLoad","_onMove"],this),this._map=l,this._floorSelectionState=new GI,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 o.y(new Error("Multiple indoor map styles detected, simultaneous usage is not allowed currently."))):(this._scope=l.scope,this._indoorDataQuery=new n3))}),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(_=>({id:_.id,name:_.name,shortName:_.zIndex.toString(),levelOrder:_.zIndex}));this.fire(new o.z("indoorupdate",{selectedFloorId:l.selectedFloorId,floors:p}))}_updateIndoorConfig(l=!1){let p=this._floorSelectionState.getActiveFloors(l).map(_=>_.id)||[];this._map.setConfigProperty(this._scope,"activeFloors",["literal",p])}}var A0=` #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`,rS=` 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;}`,oS=` #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);}`,kl="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;}",aS=` #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`,aD=`#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`,$C=`#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`,xf=`#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`,sD=`#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;}`,pn=`#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`,sS=`#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 Sf=[];Zm(A0,Sf),Zm(oS,Sf),Zm(rS,Sf);let Vy={"_prelude_fog.vertex.glsl":aD,"_prelude_terrain.vertex.glsl":aS,"_prelude_shadow.vertex.glsl":pn,"_prelude_fog.fragment.glsl":$C,"_prelude_shadow.fragment.glsl":sS,"_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":xf,"_prelude_raster_particle.glsl":sD},lS={};ta("",aS),ta($C,aD),ta(sS,pn),ta(xf,""),ta(sD,"");let ub=ta(rS,oS),g_=A0;var jI={background:ta(`#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:ta(`#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:ta(`#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:ta(`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:ta(`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:ta(`#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:ta("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:ta(`#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:ta(`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:ta("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:ta("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:ta("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:ta(`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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta(`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:ta(`#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:ta(`#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:ta(`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:ta(`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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta(`#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:ta("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:ta("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:ta(`#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:ta(`#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:ta(`#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:ta("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:ta(`#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 }`,kl),skyboxGradient:ta(`#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 }`,kl),skyboxCapture:ta(` 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:ta(`#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:ta(`#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:ta(`#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:ta(`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:ta(`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:ta("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:ta("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:ta("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:ta("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 Zm(y,l){let p=y.replace(/\s*\/\/[^\n]*\n/g,` `).split(` `);for(let _ of p)if(_=_.trim(),_[0]==="#"&&_.includes("if")&&!_.includes("endif")){_=_.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();let x=_.split(" ");for(let S of x)l.includes(S)||l.push(S)}}function ta(y,l){let p=/#include\s+"([^"]+)"/g,_=/#pragma mapbox: ([\w\-]+) ([\w]+) ([\w]+) ([\w]+)/g,x={},S=[],A=[];if(y=y.replace(p,(V,$)=>(A.push($),"")),(l=l.replace(p,(V,$)=>(S.push($),""))).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 N=[...Sf];Zm(y,N),Zm(l,N);for(let V of[...S,...A])Vy[V]||console.error(`Undefined include: ${V}`),lS[V]||(lS[V]=[],Zm(Vy[V],lS[V])),N=[...N,...lS[V]];return{fragmentSource:y=y.replace(_,(V,$,Y,J,W)=>(x[W]=!0,$==="define"?` #ifndef HAS_UNIFORM_u_${W} in ${Y} ${J} ${W}; #else uniform ${Y} ${J} u_${W}; #endif `:$==="initialize"?` #ifdef HAS_UNIFORM_u_${W} ${Y} ${J} ${W} = u_${W}; #endif `:$==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${W} in ${Y} ${J} ${W}; #endif `:$==="initialize-attribute"?"":void 0)),vertexSource:l=l.replace(_,(V,$,Y,J,W)=>{let oe=J==="float"?"vec2":J,ce=W.match(/color/)?"color":oe;return $==="define-attribute-vertex-shader-only"?` #ifdef HAS_ATTRIBUTE_a_${W} in ${Y} ${J} a_${W}; #endif `:x[W]?$==="define"?` #ifndef HAS_UNIFORM_u_${W} uniform lowp float u_${W}_t; in ${Y} ${oe} a_${W}; out ${Y} ${J} ${W}; #else uniform ${Y} ${J} u_${W}; #endif `:$==="initialize"?ce==="vec4"?` #ifndef HAS_UNIFORM_u_${W} ${W} = a_${W}; #else ${Y} ${J} ${W} = u_${W}; #endif `:` #ifndef HAS_UNIFORM_u_${W} ${W} = unpack_mix_${ce}(a_${W}, u_${W}_t); #else ${Y} ${J} ${W} = u_${W}; #endif `:$==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${W} in ${Y} ${J} a_${W}; out ${Y} ${J} ${W}; #endif `:$==="initialize-attribute"?` #ifdef HAS_ATTRIBUTE_a_${W} ${W} = a_${W}; #endif `:void 0:$==="define"?` #ifndef HAS_UNIFORM_u_${W} uniform lowp float u_${W}_t; in ${Y} ${oe} a_${W}; #else uniform ${Y} ${J} u_${W}; #endif `:$==="define-instanced"?ce==="mat4"?` #ifdef INSTANCED_ARRAYS in vec4 a_${W}0; in vec4 a_${W}1; in vec4 a_${W}2; in vec4 a_${W}3; #else uniform ${Y} ${J} u_${W}; #endif `:` #ifdef INSTANCED_ARRAYS in ${Y} ${oe} a_${W}; #else uniform ${Y} ${J} u_${W}; #endif `:$==="initialize-attribute-custom"?` #ifdef HAS_ATTRIBUTE_a_${W} ${Y} ${J} ${W} = a_${W}; #endif `:ce==="vec4"?` #ifndef HAS_UNIFORM_u_${W} ${Y} ${J} ${W} = a_${W}; #else ${Y} ${J} ${W} = u_${W}; #endif `:` #ifndef HAS_UNIFORM_u_${W} ${Y} ${J} ${W} = unpack_mix_${ce}(a_${W}, u_${W}_t); #else ${Y} ${J} ${W} = u_${W}; #endif `}),usedDefines:N,vertexIncludes:S,fragmentIncludes:A}}class D0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(l,p,_,x,S,A,N,V){this.context=l;let $=this.boundPaintVertexBuffers.length!==x.length;for(let J=0;!$&&J{let He=Oe.paint.get("hillshade-shadow-color"),nt=Oe.paint.get("hillshade-shadow-color-use-theme").constantOr("default")==="none",et=Oe.paint.get("hillshade-highlight-color"),at=Oe.paint.get("hillshade-highlight-color-use-theme").constantOr("default")==="none",tt=Oe.paint.get("hillshade-accent-color"),Xe=Oe.paint.get("hillshade-accent-color-use-theme").constantOr("default")==="none",it=Oe.paint.get("hillshade-emissive-strength"),Wt=o.an(Oe.paint.get("hillshade-illumination-direction"));if(Oe.paint.get("hillshade-illumination-anchor")==="viewport")Wt-=Ee.transform.angle;else if(Ee.style&&Ee.style.enable3dLights()&&Ee.style.directionalLight){let mi=Ee.style.directionalLight.properties.get("direction"),jt=o.d3(mi.x,mi.y,mi.z);Wt=o.an(jt[1])}let Nt=!Ee.options.moving;return{u_matrix:Be||Ee.transform.calculateProjMatrix(ge.tileID.toUnwrapped(),Nt),u_image:0,u_latrange:qC(0,ge.tileID),u_light:[Oe.paint.get("hillshade-exaggeration"),Wt],u_shadow:He.toPremultipliedRenderColor(nt?null:Oe.lut),u_highlight:et.toPremultipliedRenderColor(at?null:Oe.lut),u_emissive_strength:it,u_accent:tt.toPremultipliedRenderColor(Xe?null:Oe.lut)}})(y,p,_,y.terrain?l.projMatrix:null);y.uploadCommonUniforms(N,J,l.toUnwrapped());let{tileBoundsBuffer:oe,tileBoundsIndexBuffer:ce,tileBoundsSegments:de}=y.getTileBoundsBuffers(p);J.draw(y,V.TRIANGLES,x,S,A,jr.disabled,W,_.id,oe,ce,de)}function cD(y,l,p){if(!l.needsDEMTextureUpload)return;let _=y.context,x=_.gl;_.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||y.getTileTexture(p.stride);let S=p.getPixels();l.demTexture?l.demTexture.update(S,{premultiply:!1}):l.demTexture=new o.T(_,S,x.R32F,{premultiply:!1}),l.needsDEMTextureUpload=!1}function gH(y,l,p){let _=y.context,x=_.gl;if(!l.dem)return;let S=l.dem;if(_.activeTexture.set(x.TEXTURE1),cD(y,l,S),!l.demTexture)return;l.demTexture.bind(x.NEAREST,x.CLAMP_TO_EDGE);let A=S.dim;_.activeTexture.set(x.TEXTURE0);let N=l.hillshadeFBO;if(!N){let W=new o.T(_,{width:A,height:A,data:null},x.RGBA8);W.bind(x.LINEAR,x.CLAMP_TO_EDGE),N=l.hillshadeFBO=_.createFramebuffer(A,A,!0,"renderbuffer"),N.colorAttachment.set(W.texture)}_.bindFramebuffer.set(N.framebuffer),_.viewport.set([0,0,A,A]);let{tileBoundsBuffer:V,tileBoundsIndexBuffer:$,tileBoundsSegments:Y}=y.getMercatorTileBoundsBuffers(),J=[];y.linearFloatFilteringSupported()&&J.push("TERRAIN_DEM_FLOAT_FORMAT"),y.getOrCreateProgram("hillshadePrepare",{defines:J}).draw(y,x.TRIANGLES,Rn.disabled,Nr.disabled,po.unblended,jr.disabled,((W,oe)=>{let ce=oe.stride,de=o.bC();return o.cd(de,0,o.al,-o.al,0,0,1),o.br(de,de,[0,-o.al,0]),{u_matrix:de,u_image:1,u_dimension:[ce,ce],u_zoom:W.overscaledZ}})(l.tileID,S),p.id,V,$,Y),l.needsHillshadePrepare=!1}class Fl{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 $I extends Fl{getDefault(){return o.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 cS extends Fl{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class QO extends Fl{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class _H extends Fl{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 r3 extends Fl{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class yH extends Fl{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class o3 extends Fl{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 $u extends Fl{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 qu extends Fl{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 vH extends Fl{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 a3 extends Fl{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 dD extends Fl{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class uD extends Fl{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 qI extends Fl{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 __ extends Fl{getDefault(){return o.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 pb extends Fl{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 zy extends Fl{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 mb extends Fl{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class k0 extends Fl{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}let YI=class extends Fl{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}};class hb extends Fl{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class s3 extends Fl{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 dS extends Fl{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 pD extends Fl{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 mD extends Fl{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 ZO extends Fl{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 YC extends Fl{getDefault(){return null}set(l){let p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Uy extends Fl{getDefault(){return null}set(l){this.gl&&(l!==this.current||this.dirty)&&(this.gl.bindVertexArray(l),this.current=l,this.dirty=!1)}}class XO extends Fl{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 ft extends Fl{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 KC extends Fl{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 y_ extends Fl{constructor(l,p){super(l),this.context=l,this.parent=p}getDefault(){return null}}class wf extends y_{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 ll extends y_{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 bH extends y_{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 CH extends ll{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}let JO=(y,l,p)=>({u_matrix:y,u_image0:0,u_skirt_height:l,u_ground_shadow_factor:p}),M0=(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de)=>({u_proj_matrix:Float32Array.from(y),u_globe_matrix:l,u_normalize_matrix:Float32Array.from(_),u_merc_matrix:p,u_zoom_transition:x,u_merc_center:S,u_image0:0,u_frustum_tl:A,u_frustum_tr:N,u_frustum_br:V,u_frustum_bl:$,u_globe_pos:Y,u_globe_radius:J,u_viewport:W,u_grid_matrix:de?Float32Array.from(de):new Float32Array(9),u_skirt_height:oe,u_far_z_cutoff:ce});function hD(y,l){return y!=null&&l!=null&&!(!y.hasData()||!l.hasData())&&y.demTexture!=null&&l.demTexture!=null&&y.tileID.key!==l.tileID.key}let fb=new class{constructor(){this.operations={}}newMorphing(y,l,p,_,x){if(y in this.operations){let S=this.operations[y];S.to.tileID.key!==p.tileID.key&&(S.queued=p)}else this.operations[y]={startTime:_,phase:0,duration:x,from:l,to:p,queued:null}}getMorphValuesForProxy(y){if(!(y in this.operations))return null;let l=this.operations[y];return{from:l.from,to:l.to,phase:l.phase}}update(y){for(let l in this.operations){let p=this.operations[l];for(p.phase=(y-p.startTime)/p.duration;p.phase>=1||!this._validOp(p);)if(!this._nextOp(p,y)){delete this.operations[l];break}}}_nextOp(y,l){return!!y.queued&&(y.from=y.to,y.to=y.queued,y.queued=null,y.phase=0,y.startTime=l,!0)}_validOp(y){return y.from.hasData()&&y.to.hasData()}},eR={0:null,1:"TERRAIN_VERTEX_MORPHING"};function tR(y,l,p){if(l===0)return 0;let _=l<1&&p===514?.25/l:1;return 6*Math.pow(1.5,22-y)*Math.max(l,1)*_}function xH(y,l){let p=1<({u_matrix:y});function WC(y,l,p,_,x){if(x>0){let S=o.o.now(),A=(S-y.timeAdded)/x,N=l?(S-l.timeAdded)/x:-1,V=p.getSource(),$=_.coveringZoomLevel({tileSize:V.tileSize,roundZoom:V.roundZoom}),Y=!l||Math.abs(l.tileID.overscaledZ-$)>Math.abs(y.tileID.overscaledZ-$),J=Y&&y.refreshedUponExpiration?1:o.aA(Y?A:1-N,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 l3 extends bf{constructor(l){let p=z1("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 If extends bf{constructor(l){let p=z1("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,_){if(l.freezeTileCoverage)return;this.transform=l;let x=l.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((S,A)=>{if(S[A.key]="",!this._tiles[A.key]){let N=new Ly(A,this._source.tileSize*A.overscaleFactor(),l.tileZoom,void 0,void 0,this._source.worldview);N.state="loaded",this._tiles[A.key]=N}return S},{});for(let S in this._tiles)S in x||(this.freeFBO(S),this._tiles[S].unloadVectorData(),delete this._tiles[S])}freeFBO(l){let p=this.proxyCachedFBO[l];if(p!==void 0){let _=Object.values(p);this.renderCachePool.push(..._),delete this.proxyCachedFBO[l]}}deallocRenderCache(){this.renderCache.forEach(l=>l.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class fD extends o.aO{constructor(l,p,_){super(l.overscaledZ,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y),this.proxyTileKey=p,this.projMatrix=_}}class KI extends o.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[_,x,S]=(function(V){let $=new o.bd,Y=new o.b1,J=131;$.reserve(17161),Y.reserve(33800);let W=o.al/128,oe=o.al+W/2,ce=oe+W;for(let Ee=-W;Eeoe||Ee<0||Ee>oe?24575:0,Be=o.aA(Math.round(ge),0,o.al),He=o.aA(Math.round(Ee),0,o.al);$.emplaceBack(Be+Oe,He)}let de=(Ee,ge)=>{let Oe=ge*J+Ee;Y.emplaceBack(Oe+1,Oe,Oe+J),Y.emplaceBack(Oe+J,Oe+J+1,Oe+1)};for(let Ee=1;Ee<129;Ee++)for(let ge=1;ge<129;ge++)de(ge,Ee);return[0,129].forEach(Ee=>{for(let ge=0;ge<130;ge++)de(ge,Ee),de(Ee,ge)}),[$,Y,32768]})(),A=l.context;this.gridBuffer=A.createVertexBuffer(_,o.bf.members),this.gridIndexBuffer=A.createIndexBuffer(x),this.gridSegments=o.bg.simpleSegment(0,0,_.length,x.length),this.gridNoSkirtSegments=o.bg.simpleSegment(0,0,_.length,S),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new If(p.map),this.orthoMatrix=o.bC(),o.cd(this.orthoMatrix,this.painter.transform.projection.name==="globe"?.015:0,o.al,0,o.al,0,1);let N=A.gl;this._overlapStencilMode=new Nr({func:N.GEQUAL,mask:255},0,255,N.KEEP,N.KEEP,N.REPLACE),this._previousZoom=l.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=p,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new l3(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,_){if(l&&l.terrain){this._style!==l&&(this.style=l,this._evaluationZoom=void 0);let x=l.terrain.properties,S=l.terrain.drapeRenderMode===0,A=l.terrain.isZoomDependent();this._previousUpdateTimestamp=this.enabled?this._updateTimestamp:void 0,this._updateTimestamp=o.o.now();let N=l.terrain&&l.terrain.scope,V=x.get("source"),$=S?this._mockSourceCache:l.getSourceCache(V,N);if(!$)return void o.w(`Couldn't find terrain source "${V}".`);if(this.sourceCache=$,this._attenuationRange=l.terrain.getAttenuationRange(),this._exaggeration=A?this.calculateExaggeration(p):x.get("exaggeration"),!p.projection.requiresDraping&&A&&this._exaggeration===0)return void this._disable();this.enabled=!0;let Y=()=>{this.sourceCache.used&&o.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,Y(),this._initializing=!0),Y(),p.updateElevation(!0,_),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,_=l.getFreeCameraOptions().position.z/l.pixelsPerMeter*l.worldSize;this._previousCameraAltitude=_;let x=p!=null?_-p:Number.MAX_VALUE;if(Math.abs(x)<2)return this._exaggeration;let S=l.zoom,A=this._style.terrain;if(!this._previousUpdateTimestamp)return A.getExaggeration(S);let N=S-this._previousZoom,V=this._previousUpdateTimestamp,$=S;this._evaluationZoom!=null&&($=this._evaluationZoom,Math.abs(S-$)>.5&&(N=.5*(S-$+N)),N*x<0&&($+=N)),this._evaluationZoom=$;let Y=A.getExaggeration($),J=Y===A.getExaggeration(Math.max(0,$-.1));if(J&&Math.abs(Y-this._exaggeration)<.01)return Y;let W=Math.min(.1,.00375*(this._updateTimestamp-V));return(J||Y<.1||Math.abs(N)<1e-4)&&(W=Math.min(.2,4*W)),o.ak(this._exaggeration,Y,W)}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,_=this.painter.transform;this._initializing&&(this._initializing=_._centerAltitude===0&&this.getAtPointOrZero(o.ae.fromLngLat(_.center),-1)===-1,this._emptyDEMTextureDirty=!this._initializing);let x=this.proxyCoords=p.getIds().map(V=>{let $=p.getTileByID(V).tileID;return $.projMatrix=_.calculateProjMatrix($.toUnwrapped()),$});(function(V,$){let Y=$.transform.pointCoordinate($.transform.getCameraPoint()),J=new o.P(Y.x,Y.y);V.sort((W,oe)=>{if(oe.overscaledZ-W.overscaledZ)return oe.overscaledZ-W.overscaledZ;let ce=new o.P(W.canonical.x+(1<{this.proxyToSource[V.key]={}}),this.terrainTileForTile={};let A=this._style._mergedSourceCaches;for(let V in A){let $=A[V];if(!$.used||($!==this.sourceCache&&this.resetTileLookupCache($.id),this._setupProxiedCoordsForOrtho($,l[V],S),$.usedForTerrain))continue;let Y=l[V];$.getSource().reparseOverscaled&&this._assignTerrainTiles(Y)}this.proxiedCoords[p.id]=x.map(V=>new fD(V,V.key,this.orthoMatrix)),this._assignTerrainTiles(x),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(S),this.renderingToTexture=!1;let N={};this._visibleDemTiles=[];for(let V of this.proxyCoords){let $=this.terrainTileForTile[V.key];if(!$)continue;let Y=$.tileID.key;Y in N||(this._visibleDemTiles.push($),N[Y]=Y)}}_assignTerrainTiles(l){this._initializing||l.forEach(p=>{if(this.terrainTileForTile[p.key])return;let _=this._findTileCoveringTileID(p,this.sourceCache);_&&(this.terrainTileForTile[p.key]=_)})}_prepareDEMTextures(){let l=this.painter.context,p=l.gl;for(let _ in this.terrainTileForTile){let x=this.terrainTileForTile[_],S=x.dem;!S||x.demTexture&&!x.needsDEMTextureUpload||(l.activeTexture.set(p.TEXTURE1),cD(this.painter,x,S))}}_prepareDemTileUniforms(l,p,_,x){if(!p||p.demTexture==null)return!1;let S=l.tileID.canonical,A=Math.pow(2,p.tileID.canonical.z-S.z),N=x||"";return _[`u_dem_tl${N}`]=[S.x*A%1,S.y*A%1],_[`u_dem_scale${N}`]=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((_,x)=>{if(!x.dem)return _;let S=x.dem.tree.minimums[0];return S>0&&l++,_+S},0);return l?p/l:0}_updateEmptyDEMTexture(){let l=this.painter.context,p=l.gl;l.activeTexture.set(p.TEXTURE2);let _=this._getLoadedAreaMinimum(),x=new o.dI({width:1,height:1},new Float32Array([_]));this._emptyDEMTextureDirty=!1;let S=this._emptyDEMTexture;return S?S.update(x,{premultiply:!1}):S=this._emptyDEMTexture=new o.T(l,x,p.R32F,{premultiply:!1}),S}setupElevationDraw(l,p,_){let x=this.painter.context,S=x.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 N=null,V=null,$=1;if(_&&_.morphing&&this._useVertexMorphing){let oe=_.morphing.srcDemTile,ce=_.morphing.dstDemTile;$=_.morphing.phase,oe&&ce&&(this._prepareDemTileUniforms(l,oe,A,"_prev")&&(V=oe),this._prepareDemTileUniforms(l,ce,A)&&(N=ce))}let Y=oe=>oe&&oe.demTexture&&this.painter.linearFloatFilteringSupported()?S.LINEAR:S.NEAREST,J=null;var W;if(this.enabled?V&&N?(J=N.demTexture,x.activeTexture.set(S.TEXTURE4),V.demTexture.bind(Y(V),S.CLAMP_TO_EDGE),A.u_dem_lerp=$):(N=this.terrainTileForTile[l.tileID.key],J=this._prepareDemTileUniforms(l,N,A)?N.demTexture:this.emptyDEMTexture):J=this.emptyDEMTexture,x.activeTexture.set(S.TEXTURE2),J&&(A.u_dem_size=(W=J).size[0]===1?1:W.size[0]-2,J.bind(Y(N),S.CLAMP_TO_EDGE)),this.painter.setupDepthForOcclusion(_&&_.useDepthForOcclusion,p,A),_&&_.useMeterToDem&&N){let oe=(1<{if(ge===jt)return;let ci=[eR[jt],"PROJECTION_GLOBE_VIEW"];Be&&ci.push("CUSTOM_ANTIALIASING");let cn=$.isTileAffectedByFog(mi);Ee=$.getOrCreateProgram("globeRaster",{defines:ci,overrideFog:cn}),ge=jt},nt=$.colorModeForRenderPass(),et=new Rn(de.LEQUAL,Rn.ReadWrite,$.depthRangeFor3D);fb.update(oe);let at=o.dB(Oe),tt=[o.aF(Oe.center.lng),o.aJ(Oe.center.lat)],Xe=$.globeSharedBuffers,it=[Oe.width*o.o.devicePixelRatio,Oe.height*o.o.devicePixelRatio],Wt=Float32Array.from(Oe.globeMatrix),Nt={useDenormalizedUpVectorScale:!0};{let mi=$.transform,jt=tR(mi.zoom,Y.exaggeration(),Y.sourceCache._source.tileSize);ge=-1;let ci=de.TRIANGLES;for(let cn of W){let qt=J.getTile(cn),Dt=Nr.disabled,Si=Y.prevTerrainTileForTile[cn.key],Jt=Y.terrainTileForTile[cn.key];hD(Si,Jt)&&fb.newMorphing(cn.key,Si,Jt,oe,250),ce.activeTexture.set(de.TEXTURE0),qt.texture&&qt.texture.bind(de.LINEAR,de.CLAMP_TO_EDGE);let Gi=fb.getMorphValuesForProxy(cn.key),sn=Gi?1:0;Gi&&Object.assign(Nt,{morphing:{srcDemTile:Gi.from,dstDemTile:Gi.to,phase:o.dz(Gi.phase)}});let Mn=o.dC(cn.canonical),en=o.dD(Mn.getCenter().lat),Zi=o.dE(cn.canonical,Mn,en,mi.worldSize/mi._pixelsPerMercatorPixel),or=o.bk(o.dF(cn.canonical)),er=M0(mi.expandedFarZProjMatrix,Wt,at,or,o.aj(mi.zoom),tt,mi.frustumCorners.TL,mi.frustumCorners.TR,mi.frustumCorners.BR,mi.frustumCorners.BL,mi.globeCenterInViewSpace,mi.globeRadius,it,jt,mi._farZ,Zi);if(He(cn,sn),Ee&&(Y.setupElevationDraw(qt,Ee,Nt),$.uploadCommonUniforms(ce,Ee,cn.toUnwrapped()),Xe)){let[nr,Wn,Zr]=Xe.getGridBuffers(en,jt!==0);Ee.draw($,ci,et,Dt,nt,jr.backCCW,er,"globe_raster",nr,Wn,Zr)}}}if(Xe&&($.renderDefaultNorthPole||$.renderDefaultSouthPole)){let mi=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];Be&&mi.push("CUSTOM_ANTIALIASING"),Ee=$.getOrCreateProgram("globeRaster",{defines:mi});for(let jt of W){let{x:ci,y:cn,z:qt}=jt.canonical,Dt=cn===0,Si=cn===(1<nr.draw($,de.TRIANGLES,et,Nr.disabled,nt,jr.disabled,M0(Oe.expandedFarZProjMatrix,Zi,Zi,or,0,tt,Oe.frustumCorners.TL,Oe.frustumCorners.TR,Oe.frustumCorners.BR,Oe.frustumCorners.BL,Oe.globeCenterInViewSpace,Oe.globeRadius,it,0,Oe._farZ),"globe_pole_raster",Wn,sn,Mn);Y.setupElevationDraw(en,Ee,Nt),$.uploadCommonUniforms(ce,Ee,jt.toUnwrapped()),Dt&&$.renderDefaultNorthPole&&er(Ee,Jt),Si&&$.renderDefaultSouthPole&&(Zi=o.cR(o.bC(),Zi,[1,-1,1]),er(Ee,Gi))}}}})(x,S,A,N,V);else{let $=x.context,Y=$.gl,J,W,oe=x.shadowRenderer,ce=db(x,x.longestCutoffRange),de=nt=>{if(W===nt)return;let et=[];et.push(eR[nt]),ce.shouldRenderCutoff&&et.push("RENDER_CUTOFF"),oe&&(et.push("RENDER_SHADOWS","DEPTH_TEXTURE"),oe.useNormalOffset&&et.push("NORMAL_OFFSET")),J=x.getOrCreateProgram("terrainRaster",{defines:et}),W=nt},Ee=x.colorModeForRenderPass(),ge=new Rn(Y.LEQUAL,Rn.ReadWrite,x.depthRangeFor3D);fb.update(V);let Oe=x.transform,Be=tR(Oe.zoom,S.exaggeration(),S.sourceCache._source.tileSize),He=[0,0,0];if(oe){let nt=x.style.directionalLight,et=x.style.ambientLight;nt&&et&&(He=h_(x.style,nt,et))}{W=-1;let nt=Y.TRIANGLES,[et,at]=[S.gridIndexBuffer,S.gridSegments];for(let tt of N){let Xe=A.getTile(tt),it=Nr.disabled,Wt=S.prevTerrainTileForTile[tt.key],Nt=S.terrainTileForTile[tt.key];hD(Wt,Nt)&&fb.newMorphing(tt.key,Wt,Nt,V,250),$.activeTexture.set(Y.TEXTURE0),Xe.texture&&Xe.texture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE);let mi=fb.getMorphValuesForProxy(tt.key),jt=mi?1:0,ci;mi&&(ci={morphing:{srcDemTile:mi.from,dstDemTile:mi.to,phase:o.dz(mi.phase)}});let cn=JO(tt.projMatrix,xH(tt.canonical,Oe.renderWorldCopies)?Be/10:Be,He);if(de(jt),!J)continue;S.setupElevationDraw(Xe,J,ci);let qt=tt.toUnwrapped();oe&&oe.setupShadows(qt,J),x.uploadCommonUniforms($,J,qt,null,ce),J.draw(x,nt,ge,it,Ee,jr.backCCW,cn,"terrain_raster",S.gridBuffer,et,at)}}}})(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,_=this.painter.context,x=this.proxySourceCache,S=this.proxiedCoords[x.id],A=this._drapedRenderBatches.shift(),N=p.style.order,V=[],$=0;for(let Y of S){let J=x.getTileByID(Y.proxyTileKey),W=x.proxyCachedFBO[Y.key]?x.proxyCachedFBO[Y.key][l]:void 0,oe=W!==void 0?x.renderCache[W]:this.pool[$++],ce=W!==void 0;if(J.texture=oe.tex,ce&&!oe.dirty){V.push(J.tileID);continue}let de;_.bindFramebuffer.set(oe.fb.framebuffer),this.renderedToTile=!1,oe.dirty&&(_.clear({color:o.ao.transparent,stencil:0}),oe.dirty=!1);for(let Ee=A.start;Ee<=A.end;++Ee){let ge=p.style._mergedLayers[N[Ee]];if(ge.isHidden(p.transform.zoom))continue;let Oe=p.style.getLayerSourceCache(ge),Be=Oe?this.proxyToSource[Y.key][Oe.id]:[Y];if(!Be)continue;let He=Be;_.viewport.set([0,0,oe.fb.width,oe.fb.height]),de!==(Oe?Oe.id:null)&&(this._setupStencil(oe,Be,ge,Oe),de=Oe?Oe.id:null),p.renderLayer(p,Oe,ge,He)}if(this._drapedRenderBatches.length===0)for(let Ee of this._pendingGroundEffectLayers){let ge=p.style._mergedLayers[N[Ee]];if(ge.isHidden(p.transform.zoom))continue;let Oe=p.style.getLayerSourceCache(ge),Be=Oe?this.proxyToSource[Y.key][Oe.id]:[Y];if(!Be)continue;let He=Be;_.viewport.set([0,0,oe.fb.width,oe.fb.height]),de!==(Oe?Oe.id:null)&&(this._setupStencil(oe,Be,ge,Oe),de=Oe?Oe.id:null),p.renderLayer(p,Oe,ge,He)}this.renderedToTile?(oe.dirty=!0,V.push(J.tileID)):ce||--$,$===5&&($=0,this.renderToBackBuffer(V))}return this.renderToBackBuffer(V),this.renderingToTexture=!1,_.bindFramebuffer.set(null),_.viewport.set([0,0,p.width,p.height]),A.end+1}postRender(){}isLayerOrderingCorrect(l){let p=l.order.length,_=-1,x=p;for(let S=0;S_}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,_){if(!this._visibleDemTiles)return null;let x=this._visibleDemTiles.filter(S=>S.dem).map(S=>{let A=S.tileID,N=1<(S.t!==null?S.t:Number.MAX_VALUE)-(A.t!==null?A.t:Number.MAX_VALUE));for(let S of x){if(S.t==null)return null;let A=S.tile.dem.tree.raycast(S.minx,S.miny,S.maxx,S.maxy,l,p,_);if(A!=null)return A}return null}_createFBO(){let l=this.painter.context,p=l.gl,_=this.drapeBufferSize;l.activeTexture.set(p.TEXTURE0);let x=new o.T(l,{width:_[0],height:_[1],data:null},p.RGBA8);x.bind(p.LINEAR,p.CLAMP_TO_EDGE);let S=l.createFramebuffer(_[0],_[1],!0,null);return S.colorAttachment.set(x.texture),S.depthAttachment=new CH(l,S.framebuffer),this._sharedDepthStencil===void 0?(this._sharedDepthStencil=l.createRenderbuffer(l.gl.DEPTH_STENCIL,_[0],_[1]),this._stencilRef=0,S.depthAttachment.set(this._sharedDepthStencil),l.clear({stencil:0})):S.depthAttachment.set(this._sharedDepthStencil),l.extTextureFilterAnisotropic&&p.texParameterf(p.TEXTURE_2D,l.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,l.extTextureFilterAnisotropicMax),{fb:S,tex:x,dirty:!1}}_initFBOPool(){for(;this.pool.length{let p=this._style._mergedLayers[l],_=p.isHidden(this.painter.transform.zoom);return p.type==="hillshade"||p.type==="custom"?!_&&p.shouldRedrape():!_&&p.hasTransition()})}_clearLineLayersFromRenderCache(){let l=!1;for(let _ of this._style.getSources())if(_ instanceof lp){l=!0;break}if(!l)return;let p={};for(let _=0;_V>N.end)||o.w("fill-extrusion with flood lighting and/or ground ambient occlusion should be moved to be on top of all draped layers.")}this._drapedRenderBatches=_}_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 N=0;N=0;A--){let N=_[A];if(p.getTileByID(N.key),p.proxyCachedFBO[N.key]!==void 0){let V=l[N.key],$=this.proxyToSource[N.key],Y=0;for(let J in $){let W=$[J],oe=V[J];if(!oe||oe.length!==W.length||W.some((ce,de)=>ce!==oe[de]||x[J]&&x[J].hasOwnProperty(ce.key))){Y=-1;break}++Y}for(let J in p.proxyCachedFBO[N.key])p.renderCache[p.proxyCachedFBO[N.key][J]].dirty=Y<0||Y!==Object.values(V).length}}let S=[...this._drapedRenderBatches];S.sort((A,N)=>N.end-N.start-(A.end-A.start));for(let A of S)for(let N of _){if(p.proxyCachedFBO[N.key])continue;let V=p.renderCachePool.pop();V===void 0&&p.renderCache.length<50&&(V=p.renderCache.length,p.renderCache.push(this._createFBO())),V!==void 0&&(p.proxyCachedFBO[N.key]={},p.proxyCachedFBO[N.key][A.start]=V,p.renderCache[V].dirty=!0)}this._tilesDirty={}}_setupStencil(l,p,_,x){if(!x||!this._sourceTilesOverlap[x.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));let S=this.painter.context,A=S.gl;if(p.length<=1)return void(this._overlapStencilType=!1);let N;if(_.isTileClipped())N=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);N=1,this._overlapStencilMode.test={func:A.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+N>255&&(S.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=N,this._overlapStencilMode.ref=this._stencilRef,_.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):Nr.disabled}_renderTileClippingMasks(l,p){let _=this.painter,x=this.painter.context,S=x.gl;_._tileClippingMaskIDs={},x.setColorMode(po.disabled),x.setDepthMode(Rn.disabled);let A=_.getOrCreateProgram("clippingMask");for(let N of l){let V=_._tileClippingMaskIDs[N.key]=--p;A.draw(_,S.TRIANGLES,Rn.disabled,new Nr({func:S.ALWAYS,mask:0},V,255,S.KEEP,S.KEEP,S.REPLACE),po.disabled,jr.disabled,Xm(N.projMatrix),"$clipping",_.tileExtentBuffer,_.quadTriangleIndexBuffer,_.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 _=[l.x,l.y,1,1];o.aC(_,_,p.pixelMatrixInverse),o.cJ(_,_,1/_[3]),_[0]/=p.worldSize,_[1]/=p.worldSize;let x=p._camera.position,S=o.ce(1,p.center.lat),A=[x[0],x[1],x[2]/S,0],N=o.d9([],_.slice(0,3),A);o.aw(N,N);let V=this.raycast(A,N,this._exaggeration);return V!==null&&V?(o.bH(A,A,N,V),A[3]=A[2],A[2]*=S,A):null}_setupProxiedCoordsForOrtho(l,p,_){if(l.getSource()instanceof o.aS)return this._setupProxiedCoordsForImageSource(l,p,_);this._findCoveringTileCache[l.id]=this._findCoveringTileCache[l.id]||{};let x=this.proxiedCoords[l.id]=[],S=this.proxyCoords;for(let V=0;VY.overscaledZ-$.overscaledZ)}_setupProxiedCoordsForImageSource(l,p,_){if(!l.getSource().loaded())return;let x=this.proxiedCoords[l.id]=[],S=this.proxyCoords,A=l.getSource(),N=A.tileID;if(!N)return;let V=new o.P(N.x,N.y)._div(1<(J.min.x=Math.min(J.min.x,W.x-V.x),J.min.y=Math.min(J.min.y,W.y-V.y),J.max.x=Math.max(J.max.x,W.x-V.x),J.max.y=Math.max(J.max.y,W.y-V.y),J),{min:new o.P(Number.MAX_VALUE,Number.MAX_VALUE),max:new o.P(-Number.MAX_VALUE,-Number.MAX_VALUE)}),Y=(J,W)=>{let oe=J.wrap+J.canonical.x/(1<Ee+$.max.x||ce+dege+$.max.y};for(let J=0;JA.key===p.tileID.key);if(S)return S}if(p.tileID.key!==l.key){let S=l.canonical.z-p.tileID.canonical.z,A,N,V;x=o.bC();let $=p.tileID.wrap-l.wrap<0?(A=o.al>>S,N=A*((p.tileID.canonical.x<=J){let W=l.canonical.z-J;p.getSource().reparseOverscaled?(N=Math.max(l.canonical.z+2,p.transform.tileZoom),A=new o.aO(N,l.wrap,J,l.canonical.x>>W,l.canonical.y>>W)):W!==0&&(N=J,A=new o.aO(N,l.wrap,J,l.canonical.x>>W,l.canonical.y>>W))}A.key!==l.key&&($.push(A.key),_=p.getTile(A))}let Y=J=>{$.forEach(W=>{x[W]=J}),$.length=0};for(N-=1;N>=V&&(!_||!_.hasData());N--){_&&Y(_.tileID.key);let J=A.calculateScaledKey(N);if(_=p.getTileByID(J),_&&_.hasData())break;let W=x[J];if(W===null)break;W===void 0?$.push(J):_=p.getTileByID(W)}return Y(_?_.tileID.key:null),_&&_.hasData()?_:null}findDEMTileFor(l){return this.enabled?this._findTileCoveringTileID(l,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(l,p){let _=this._tilesDirty[l];_||(_=this._tilesDirty[l]={}),_[p.key]=!0}}function _g(y,l,p){let _=(function(N,V,$){let Y=o.bJ(V,N),J=o.bJ($,[.2126,.7152,.0722]),W=(ce,de,Ee)=>(1-Ee)*ce+Ee*de,oe=W(1-.3*Math.min(J,1),1,Math.min(Y+1,1));return W(.92,1,Math.asin(o.aA(V[2],-1,1))/Math.PI+.5)*oe})(y,[0,0,1],l),x=[0,0,0];o.c4(x,p.slice(0,3),_);let S=[0,0,0];o.c4(S,l.slice(0,3),y[2]);let A=[0,0,0];return o.d7(A,x,S),o.da(A)}let iR=["fill","fillOutline","fillPattern","line","linePattern","background","backgroundPattern","hillshade","raster"],nR=["stars","rainParticle","snowParticle","fillExtrusion","fillExtrusionGroundEffect","elevatedStructures","model","symbol"];class gD{static cacheKey(l,p,_,x){let S=`${p}${x?x.cacheKey:""}`;for(let A of _)l.usedDefines.includes(A)&&(S+=`/${A}`);return S}constructor(l,p,_,x,S,A){let N=l.gl;this.program=N.createProgram(),this.configuration=x,this.name=p,this.fixedDefines=[...A];let V=x?x.defines():[];V=V.concat(A.map(ce=>`#define ${ce}`));let $=`#version 300 es `,Y=$+V.concat("precision mediump float;",g_,ub.fragmentSource).join(` `);for(let ce of _.fragmentIncludes)Y+=` ${Vy[ce]}`;Y+=` ${_.fragmentSource}`;let J=$+V.concat("precision highp float;",g_,ub.vertexSource).join(` `);for(let ce of _.vertexIncludes)J+=` ${Vy[ce]}`;this.forceManualRenderingForInstanceIDShaders=l.forceManualRenderingForInstanceIDShaders&&_.vertexSource.indexOf("gl_InstanceID")!==-1,this.forceManualRenderingForInstanceIDShaders&&(J+=` uniform int u_instanceID; `),J+=` ${_.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(J=J.replaceAll("gl_InstanceID","u_instanceID"));let W=N.createShader(N.FRAGMENT_SHADER);if(N.isContextLost())return void(this.failedToCreate=!0);N.shaderSource(W,Y),N.compileShader(W),N.attachShader(this.program,W);let oe=N.createShader(N.VERTEX_SHADER);N.isContextLost()?this.failedToCreate=!0:(N.shaderSource(oe,J),N.compileShader(oe),N.attachShader(this.program,oe),this.attributes={},N.linkProgram(this.program),N.deleteShader(oe),N.deleteShader(W),this.fixedUniforms=S(l),this.binderUniforms=x?x.getUniforms(l):[],this.forceManualRenderingForInstanceIDShaders&&(this.instancingUniforms=(ce=>({u_instanceID:new o.cg(ce)}))(l)),(A.includes("TERRAIN")||p.indexOf("symbol")!==-1||p.indexOf("circle")!==-1)&&(this.terrainUniforms=(ce=>({u_dem:new o.cg(ce),u_dem_prev:new o.cg(ce),u_dem_tl:new o.cj(ce),u_dem_scale:new o.ci(ce),u_dem_tl_prev:new o.cj(ce),u_dem_scale_prev:new o.ci(ce),u_dem_size:new o.ci(ce),u_dem_lerp:new o.ci(ce),u_exaggeration:new o.ci(ce),u_depth:new o.cg(ce),u_depth_size_inv:new o.cj(ce),u_depth_range_unpack:new o.cj(ce),u_occluder_half_size:new o.ci(ce),u_occlusion_depth_offset:new o.ci(ce),u_meter_to_dem:new o.ci(ce),u_label_plane_matrix_inv:new o.ck(ce)}))(l)),A.includes("GLOBE")&&(this.globeUniforms=(ce=>({u_tile_tl_up:new o.ch(ce),u_tile_tr_up:new o.ch(ce),u_tile_br_up:new o.ch(ce),u_tile_bl_up:new o.ch(ce),u_tile_up_scale:new o.ci(ce)}))(l)),A.includes("FOG")&&(this.fogUniforms=(ce=>({u_fog_matrix:new o.ck(ce),u_fog_range:new o.cj(ce),u_fog_color:new o.d2(ce),u_fog_horizon_blend:new o.ci(ce),u_fog_vertical_limit:new o.cj(ce),u_fog_temporal_offset:new o.ci(ce),u_frustum_tl:new o.ch(ce),u_frustum_tr:new o.ch(ce),u_frustum_br:new o.ch(ce),u_frustum_bl:new o.ch(ce),u_globe_pos:new o.ch(ce),u_globe_radius:new o.ci(ce),u_globe_transition:new o.ci(ce),u_is_globe:new o.cg(ce),u_viewport:new o.cj(ce)}))(l)),A.includes("RENDER_CUTOFF")&&(this.cutoffUniforms=(ce=>({u_cutoff_params:new o.d2(ce)}))(l)),A.includes("LIGHTING_3D_MODE")&&(this.lightsUniforms=(ce=>({u_lighting_ambient_color:new o.ch(ce),u_lighting_directional_dir:new o.ch(ce),u_lighting_directional_color:new o.ch(ce),u_ground_radiance:new o.ch(ce)}))(l)),A.includes("RENDER_SHADOWS")&&(this.shadowUniforms=(ce=>({u_light_matrix_0:new o.ck(ce),u_light_matrix_1:new o.ck(ce),u_fade_range:new o.cj(ce),u_shadow_normal_offset:new o.ch(ce),u_shadow_intensity:new o.ci(ce),u_shadow_texel_size:new o.ci(ce),u_shadow_map_resolution:new o.ci(ce),u_shadow_direction:new o.ch(ce),u_shadow_bias:new o.ch(ce),u_shadowmap_0:new o.cg(ce),u_shadowmap_1:new o.cg(ce)}))(l)))}getAttributeLocation(l,p){let _=this.attributes[p];return _===void 0&&(_=this.attributes[p]=l.getAttribLocation(this.program,p)),_}setTerrainUniformValues(l,p){if(!this.terrainUniforms)return;let _=this.terrainUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let x in p)_[x]&&_[x].set(this.program,x,p[x])}}setGlobeUniformValues(l,p){if(!this.globeUniforms)return;let _=this.globeUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let x in p)_[x]&&_[x].set(this.program,x,p[x])}}setFogUniformValues(l,p){if(!this.fogUniforms)return;let _=this.fogUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let x in p)_[x].set(this.program,x,p[x])}}setCutoffUniformValues(l,p){if(!this.cutoffUniforms)return;let _=this.cutoffUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let x in p)_[x].set(this.program,x,p[x])}}setLightsUniformValues(l,p){if(!this.lightsUniforms)return;let _=this.lightsUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let x in p)_[x].set(this.program,x,p[x])}}setShadowUniformValues(l,p){if(this.failedToCreate||!this.shadowUniforms)return;let _=this.shadowUniforms;l.program.set(this.program);for(let x in p)_[x].set(this.program,x,p[x])}_drawDebugWireframe(l,p,_,x,S,A,N,V,$,Y){let J=l.options.wireframe;if(J.terrain===!1&&J.layers2D===!1&&J.layers3D===!1)return;let W=l.context;if(!(!(!J.terrain||this.name!=="terrainRaster"&&this.name!=="globeRaster")||!(!J.layers2D||l._terrain&&l._terrain.renderingToTexture||!iR.includes(this.name))||!(!J.layers3D||!nR.includes(this.name))))return;let oe=W.gl,ce=l.wireframeDebugCache.getLinesFromTrianglesBuffer(l.frameCounter,S,W);if(!ce)return;let de=[...this.fixedDefines];de.push("DEBUG_WIREFRAME");let Ee=l.getOrCreateProgram(this.name,{config:this.configuration,defines:de});W.program.set(Ee.program);let ge=(He,nt,et)=>{if(nt[He]&&et[He])for(let at in nt[He])et[He][at]&&et[He][at].set(et.program,at,nt[He][at].current)};$&&$.setUniforms(Ee.program,W,Ee.binderUniforms,N,{zoom:V}),ge("fixedUniforms",this,Ee),ge("terrainUniforms",this,Ee),ge("globeUniforms",this,Ee),ge("fogUniforms",this,Ee),ge("lightsUniforms",this,Ee),ge("shadowUniforms",this,Ee),ce.bind(),W.setColorMode(new po([oe.ONE,oe.ONE_MINUS_SRC_ALPHA,oe.ZERO,oe.ONE],o.ao.transparent,[!0,!0,!0,!1])),W.setDepthMode(new Rn(p.func===oe.LESS?oe.LEQUAL:p.func,Rn.ReadOnly,p.range)),W.setStencilMode(Nr.disabled);let Oe=3*A.primitiveLength*2,Be=3*A.primitiveOffset*2*2;if(this.forceManualRenderingForInstanceIDShaders){let He=Y||1;for(let nt=0;nt1?oe.drawElementsInstanced(oe.LINES,Oe,oe.UNSIGNED_SHORT,Be,Y):oe.drawElements(oe.LINES,Oe,oe.UNSIGNED_SHORT,Be);S.bind(),W.program.set(this.program),W.setDepthMode(p),W.setStencilMode(_),W.setColorMode(x)}checkUniforms(l,p,_){if(this.fixedDefines.includes(p)){for(let x of Object.keys(_))if(!_[x].initialized)throw new Error(`Program '${this.name}', from draw '${l}': uniform ${x} not set but required by ${p} being defined`)}}draw(l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee){let ge=l.context,Oe=ge.gl;if(this.failedToCreate)return;ge.program.set(this.program),ge.setDepthMode(_),ge.setStencilMode(x),ge.setColorMode(S),ge.setCullFace(A);for(let nt of Object.keys(this.fixedUniforms))this.fixedUniforms[nt].set(this.program,nt,N[nt]);ce&&ce.setUniforms(this.program,ge,this.binderUniforms,W,{zoom:oe});let Be={[Oe.POINTS]:1,[Oe.LINES]:2,[Oe.TRIANGLES]:3,[Oe.LINE_STRIP]:1}[p];this.checkUniforms(V,"RENDER_SHADOWS",this.shadowUniforms);let He=Ee&&Ee>0?1:void 0;for(let nt of J.get()){let et=nt.vaos||(nt.vaos={});if((et[V]||(et[V]=new D0)).bind(ge,this,$,ce?ce.getPaintVertexBuffers():[],Y,nt.vertexOffset,de||[],He),this.forceManualRenderingForInstanceIDShaders){let at=Ee||1;for(let tt=0;tt1?Oe.drawElementsInstanced(p,nt.primitiveLength*Be,Oe.UNSIGNED_SHORT,nt.primitiveOffset*Be*2,Ee):Y?Oe.drawElements(p,nt.primitiveLength*Be,Oe.UNSIGNED_SHORT,nt.primitiveOffset*Be*2):Oe.drawArrays(p,nt.vertexOffset,nt.vertexLength);p===Oe.TRIANGLES&&Y&&this._drawDebugWireframe(l,_,x,S,Y,nt,W,oe,ce,Ee)}}}function WI(y,l,p=0){let _=Math.pow(2,l.tileID.overscaledZ),x=l.tileSize*Math.pow(2,y.transform.tileZoom)/_,S=x*(l.tileID.canonical.x+l.tileID.wrap*_),A=x*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture?l.imageAtlasTexture.size:[0,0],u_tile_units_to_pixels:1/o.ay(l,1,y.transform.tileZoom),u_pixel_coord_upper:[S>>16,A>>16],u_pixel_coord_lower:[65535&S,65535&A],u_pattern_transition:p}}let uS={terrain:0,flat:1},Hy=o.bC(),QI=(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge)=>{let Oe=l.style.light,Be=Oe.properties.get("position"),He=[Be.x,Be.y,Be.z],nt=o.dL();Oe.properties.get("anchor")==="viewport"&&(o.dM(nt,-l.transform.angle),o.dN(He,He,nt));let et=Oe.properties.get("color").toPremultipliedRenderColor(null),at=l.transform,tt={u_matrix:y,u_lightpos:He,u_lightintensity:Oe.properties.get("intensity"),u_lightcolor:[et.r,et.g,et.b],u_vertical_gradient:+p,u_opacity:_,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Hy,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_height_type:uS[$],u_base_type:uS[Y],u_ao:x,u_edge_radius:S,u_width_scale:A,u_flood_light_color:ce,u_vertical_scale:de,u_flood_light_intensity:Ee,u_ground_shadow_factor:ge};return at.projection.name==="globe"&&(tt.u_tile_id=[N.canonical.x,N.canonical.y,1<({u_matrix:y,u_edge_radius:l,u_width_scale:p,u_vertical_scale:_,u_height_type:uS[x],u_base_type:uS[S]}),yg=(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge)=>{let Oe=QI(y,l,p,_,x,S,A,N,$,Y,J,W,oe,ce,de,Ee,1,[0,0,0]),Be={u_height_factor:-Math.pow(2,N.overscaledZ)/V.tileSize/8};return Object.assign(Oe,WI(l,V,ge),Be)},oR=(y,l,p)=>({u_matrix:y,u_emissive_strength:l,u_ground_shadow_factor:p}),QC=(y,l,p,_,x,S=0)=>Object.assign(oR(y,l,x),WI(p,_,S)),SH=(y,l,p,_)=>({u_matrix:y,u_world:p,u_emissive_strength:l,u_ground_shadow_factor:_}),wH=(y,l,p,_,x,S,A=0)=>Object.assign(QC(y,l,p,_,S,A),{u_world:x}),IH=(y,l)=>({u_matrix:y,u_ground_shadow_factor:l}),ZI=(y,l,p,_,x)=>({u_matrix:y,u_camera_pos:[l[0],l[1],l[2]],u_depth_bias:p,u_height_scale:_,u_reset_depth:x}),c3=(y,l,p,_,x,S,A)=>({u_matrix:y,u_normal_matrix:l,u_opacity:p,u_faux_facade_ao_intensity:_,u_camera_pos:x,u_tile_to_meter:S,u_facade_emissive_chance:A}),TH=y=>({u_matrix:y}),aR=y=>({u_matrix:y}),XI=(y,l,p,_,x,S,A,N)=>{let V=o.al/S.tileSize;return{u_matrix:y,u_inv_rot_matrix:l,u_camera_to_center_distance:p.getCameraToCenterDistance(N),u_extrude_scale:[p.pixelsToGLUnits[0]/V,p.pixelsToGLUnits[1]/V],u_zoom_transition:_,u_tile_id:A,u_merc_center:x}},ZC=(y,l,p=1)=>({u_matrix:y,u_color:l,u_overlay:0,u_overlay_scale:p}),Gy=o.bC(),d3=(y,l,p,_,x,S,A)=>{let N=y.transform,V=N.projection.name==="globe",$=V?o.dO(N.zoom,l.canonical)*N._pixelsPerMercatorPixel:o.ay(p,1,S),Y={u_matrix:l.projMatrix,u_extrude_scale:$,u_intensity:A,u_inv_rot_matrix:Gy,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(V){Y.u_inv_rot_matrix=_,Y.u_merc_center=x,Y.u_tile_id=[l.canonical.x,l.canonical.y,1<({u_matrix:y,u_normalize_matrix:l,u_globe_matrix:p,u_merc_matrix:_,u_grid_matrix:x,u_tl_parent:S,u_scale_parent:$,u_fade_t:Y.mix,u_opacity:Y.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:o.dQ(J.paint.get("raster-saturation")),u_contrast_factor:o.dP(J.paint.get("raster-contrast")),u_spin_weights:jy(J.paint.get("raster-hue-rotate")),u_perspective_transform:W,u_raster_elevation:oe,u_zoom_transition:A,u_merc_center:N,u_cutoff_params:V,u_colorization_mix:_D(o.dR,de,ge),u_colorization_offset:sR(o.dR,Ee,ge),u_color_ramp:ce,u_texture_offset:[Be/(Oe+2*Be),Oe/(Oe+2*Be)],u_texture_res:[Oe+2*Be,Oe+2*Be],u_emissive_strength:He});function jy(y){y*=Math.PI/180;let l=Math.sin(y),p=Math.cos(y);return[(2*p+1)/3,(-Math.sqrt(3)*l-p+1)/3,(Math.sqrt(3)*l-p+1)/3]}let Tf=.05,Yu=(y,l,p,_,x,S,A,N,V,$,Y,J)=>({u_matrix:y,u_normalize_matrix:l,u_globe_matrix:p,u_merc_matrix:_,u_grid_matrix:x,u_tl_parent:S,u_scale_parent:$,u_fade_t:Y.mix,u_opacity:Y.opacity,u_image0:0,u_image1:1,u_raster_elevation:J,u_zoom_transition:A,u_merc_center:N,u_cutoff_params:V}),lR=(y,l,p,_,x,S,A,N,V,$)=>({u_particle_texture:y,u_particle_texture_side_len:l,u_tile_offset:p,u_velocity:_,u_color_ramp:S,u_velocity_res:x,u_max_speed:A,u_uv_offset:N,u_data_scale:[255*V[0],255*V[1]],u_data_offset:$,u_particle_pos_scale:1.1,u_particle_pos_offset:[Tf,Tf]}),JI=(y,l,p,_,x,S,A,N,V,$)=>({u_particle_texture:y,u_particle_texture_side_len:l,u_velocity:p,u_velocity_res:_,u_max_speed:x,u_speed_factor:S,u_reset_rate:A,u_rand_seed:Math.random(),u_uv_offset:N,u_data_scale:[255*V[0],255*V[1]],u_data_offset:$,u_particle_pos_scale:1.1,u_particle_pos_offset:[Tf,Tf]}),yD=o.bC(),XC=(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge,Oe,Be,He,nt,et,at)=>{let tt=x.transform,Xe={u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:tt.getCameraToCenterDistance(Oe),u_rotate_symbol:+p,u_aspect_ratio:tt.width/tt.height,u_fade_change:x.options.fadeDuration?x.symbolFadeChange:1,u_matrix:S,u_label_plane_matrix:A,u_coord_matrix:N,u_is_text:+$,u_elevation_from_sea:V?1:0,u_pitch_with_map:+_,u_texsize:Y,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:yD,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:yD,u_up_vector:[0,-1,0],u_color_adj_mat:nt,u_icon_transition:et||0,u_gamma_scale:_?x.transform.getCameraToCenterDistance(Oe)*Math.cos(x.terrain?0:x.transform._pitch):1,u_device_pixel_ratio:o.o.devicePixelRatio,u_is_halo:1,u_scale_factor:at||1,u_ground_shadow_factor:Be,u_inv_matrix:o.bl(o.bC(),A),u_normal_scale:He,u_lutTexture:Fc.LUT};return Oe.name==="globe"&&(Xe.u_tile_id=[oe.canonical.x,oe.canonical.y,1<({u_matrix:y,u_emissive_strength:l,u_opacity:p,u_color:_}),eT=(y,l,p,_,x,S,A,N,V)=>Object.assign((function($,Y,J,W,oe,ce){let{width:de,height:Ee}=W.imageManager.getPixelSize(Y),ge=Math.pow(2,ce.tileID.overscaledZ),Oe=ce.tileSize*Math.pow(2,W.transform.tileZoom)/ge,Be=Oe*(ce.tileID.canonical.x+ce.tileID.wrap*ge),He=Oe*ce.tileID.canonical.y;return{u_image:0,u_pattern_tl:J.tl,u_pattern_br:J.br,u_texsize:[de,Ee],u_pattern_size:J.displaySize,u_pattern_units_to_pixels:oe?[W.transform.width,-1*W.transform.height]:[1/o.ay(ce,1,W.transform.tileZoom),1/o.ay(ce,1,W.transform.tileZoom)],u_pixel_coord_upper:[Be>>16,He>>16],u_pixel_coord_lower:[65535&Be,65535&He]}})(0,S,A,_,N,V),{u_matrix:y,u_emissive_strength:l,u_opacity:p}),cR=new Float32Array(o.bA([])),JC=(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe=[0,0,0],ce)=>{let de=x.style.light,Ee=de.properties.get("position"),ge=[-Ee.x,-Ee.y,Ee.z],Oe=o.dL();de.properties.get("anchor")==="viewport"&&(o.dM(Oe,-x.transform.angle),o.dN(ge,ge,Oe));let Be=Y.alphaMode==="MASK",He=de.properties.get("color").toNonPremultipliedRenderColor(null),nt=W.paint.get("model-ambient-occlusion-intensity"),et=W.paint.get("model-color").constantOr(o.ao.white).toNonPremultipliedRenderColor(null);return et.a=W.paint.get("model-color-mix-intensity").constantOr(0),{u_matrix:y,u_lighting_matrix:l,u_normal_matrix:p,u_node_matrix:_||cR,u_lightpos:ge,u_lightintensity:de.properties.get("intensity"),u_lightcolor:[He.r,He.g,He.b],u_camera_pos:oe,u_opacity:S,u_baseTextureIsAlpha:0,u_alphaMask:+Be,u_alphaCutoff:Y.alphaCutoff,u_baseColorFactor:A.toNonPremultipliedRenderColor(null).toArray01(),u_emissiveFactor:N.toNonPremultipliedRenderColor(null).toArray01(),u_metallicFactor:V,u_roughnessFactor:$,u_baseColorTexture:Fc.BaseColor,u_metallicRoughnessTexture:Fc.MetallicRoughness,u_normalTexture:Fc.Normal,u_occlusionTexture:Fc.Occlusion,u_emissionTexture:Fc.Emission,u_lutTexture:Fc.LUT,u_color_mix:et.toArray01(),u_aoIntensity:nt,u_emissive_strength:J,u_occlusionTextureTransform:ce||[0,0,0,0]}},pS=(y,l=cR,p=cR)=>({u_matrix:y,u_instance:l,u_node_matrix:p}),u3={fillExtrusion:y=>({u_matrix:new o.ck(y),u_lightpos:new o.ch(y),u_lightintensity:new o.ci(y),u_lightcolor:new o.ch(y),u_vertical_gradient:new o.ci(y),u_opacity:new o.ci(y),u_edge_radius:new o.ci(y),u_width_scale:new o.ci(y),u_ao:new o.cj(y),u_height_type:new o.cg(y),u_base_type:new o.cg(y),u_tile_id:new o.ch(y),u_zoom_transition:new o.ci(y),u_inv_rot_matrix:new o.ck(y),u_merc_center:new o.cj(y),u_up_dir:new o.ch(y),u_height_lift:new o.ci(y),u_flood_light_color:new o.ch(y),u_vertical_scale:new o.ci(y),u_flood_light_intensity:new o.ci(y),u_ground_shadow_factor:new o.ch(y)}),fillExtrusionDepth:y=>({u_matrix:new o.ck(y),u_edge_radius:new o.ci(y),u_width_scale:new o.ci(y),u_vertical_scale:new o.ci(y),u_height_type:new o.cg(y),u_base_type:new o.cg(y)}),fillExtrusionPattern:y=>({u_matrix:new o.ck(y),u_lightpos:new o.ch(y),u_lightintensity:new o.ci(y),u_lightcolor:new o.ch(y),u_vertical_gradient:new o.ci(y),u_height_factor:new o.ci(y),u_edge_radius:new o.ci(y),u_width_scale:new o.ci(y),u_ao:new o.cj(y),u_height_type:new o.cg(y),u_base_type:new o.cg(y),u_tile_id:new o.ch(y),u_zoom_transition:new o.ci(y),u_inv_rot_matrix:new o.ck(y),u_merc_center:new o.cj(y),u_up_dir:new o.ch(y),u_height_lift:new o.ci(y),u_image:new o.cg(y),u_texsize:new o.cj(y),u_pixel_coord_upper:new o.cj(y),u_pixel_coord_lower:new o.cj(y),u_tile_units_to_pixels:new o.ci(y),u_opacity:new o.ci(y),u_pattern_transition:new o.ci(y)}),fillExtrusionGroundEffect:y=>({u_matrix:new o.ck(y),u_opacity:new o.ci(y),u_ao_pass:new o.ci(y),u_meter_to_tile:new o.ci(y),u_ao:new o.cj(y),u_flood_light_intensity:new o.ci(y),u_flood_light_color:new o.ch(y),u_attenuation:new o.ci(y),u_edge_radius:new o.ci(y),u_fb:new o.cg(y),u_fb_size:new o.ci(y),u_dynamic_offset:new o.ci(y)}),fill:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_ground_shadow_factor:new o.ch(y)}),fillPattern:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_image:new o.cg(y),u_texsize:new o.cj(y),u_pixel_coord_upper:new o.cj(y),u_pixel_coord_lower:new o.cj(y),u_tile_units_to_pixels:new o.ci(y),u_ground_shadow_factor:new o.ch(y),u_pattern_transition:new o.ci(y)}),fillOutline:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_world:new o.cj(y),u_ground_shadow_factor:new o.ch(y)}),fillOutlinePattern:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_world:new o.cj(y),u_image:new o.cg(y),u_texsize:new o.cj(y),u_pixel_coord_upper:new o.cj(y),u_pixel_coord_lower:new o.cj(y),u_tile_units_to_pixels:new o.ci(y),u_ground_shadow_factor:new o.ch(y),u_pattern_transition:new o.ci(y)}),building:y=>({u_matrix:new o.ck(y),u_normal_matrix:new o.ck(y),u_opacity:new o.ci(y),u_faux_facade_ao_intensity:new o.ci(y),u_camera_pos:new o.ch(y),u_tile_to_meter:new o.ci(y),u_facade_emissive_chance:new o.ci(y)}),buildingBloom:y=>({u_matrix:new o.ck(y)}),buildingDepth:y=>({u_matrix:new o.ck(y)}),elevatedStructuresDepth:y=>({u_matrix:new o.ck(y),u_depth_bias:new o.ci(y)}),elevatedStructures:y=>({u_matrix:new o.ck(y),u_ground_shadow_factor:new o.ch(y)}),elevatedStructuresDepthReconstruct:y=>({u_matrix:new o.ck(y),u_camera_pos:new o.ch(y),u_depth_bias:new o.ci(y),u_height_scale:new o.ci(y),u_reset_depth:new o.ci(y)}),circle:o.dV,collisionBox:y=>({u_matrix:new o.ck(y),u_inv_rot_matrix:new o.ck(y),u_camera_to_center_distance:new o.ci(y),u_extrude_scale:new o.cj(y),u_zoom_transition:new o.ci(y),u_merc_center:new o.cj(y),u_tile_id:new o.ch(y)}),collisionCircle:y=>({u_matrix:new o.ck(y),u_inv_matrix:new o.ck(y),u_camera_to_center_distance:new o.ci(y),u_viewport_size:new o.cj(y)}),debug:y=>({u_color:new o.dx(y),u_matrix:new o.ck(y),u_overlay:new o.cg(y),u_overlay_scale:new o.ci(y)}),clippingMask:y=>({u_matrix:new o.ck(y)}),heatmap:y=>({u_extrude_scale:new o.ci(y),u_intensity:new o.ci(y),u_matrix:new o.ck(y),u_inv_rot_matrix:new o.ck(y),u_merc_center:new o.cj(y),u_tile_id:new o.ch(y),u_zoom_transition:new o.ci(y),u_up_dir:new o.ch(y)}),heatmapTexture:y=>({u_image:new o.cg(y),u_color_ramp:new o.cg(y),u_opacity:new o.ci(y)}),hillshade:y=>({u_matrix:new o.ck(y),u_image:new o.cg(y),u_latrange:new o.cj(y),u_light:new o.cj(y),u_shadow:new o.dx(y),u_highlight:new o.dx(y),u_emissive_strength:new o.ci(y),u_accent:new o.dx(y)}),hillshadePrepare:y=>({u_matrix:new o.ck(y),u_image:new o.cg(y),u_dimension:new o.cj(y),u_zoom:new o.ci(y)}),line:o.dU,linePattern:o.dT,raster:y=>({u_matrix:new o.ck(y),u_normalize_matrix:new o.ck(y),u_globe_matrix:new o.ck(y),u_merc_matrix:new o.ck(y),u_grid_matrix:new o.dy(y),u_tl_parent:new o.cj(y),u_scale_parent:new o.ci(y),u_fade_t:new o.ci(y),u_opacity:new o.ci(y),u_image0:new o.cg(y),u_image1:new o.cg(y),u_brightness_low:new o.ci(y),u_brightness_high:new o.ci(y),u_saturation_factor:new o.ci(y),u_contrast_factor:new o.ci(y),u_spin_weights:new o.ch(y),u_perspective_transform:new o.cj(y),u_raster_elevation:new o.ci(y),u_zoom_transition:new o.ci(y),u_merc_center:new o.cj(y),u_cutoff_params:new o.d2(y),u_colorization_mix:new o.d2(y),u_colorization_offset:new o.ci(y),u_color_ramp:new o.cg(y),u_texture_offset:new o.cj(y),u_texture_res:new o.cj(y),u_emissive_strength:new o.ci(y)}),rasterParticle:y=>({u_matrix:new o.ck(y),u_normalize_matrix:new o.ck(y),u_globe_matrix:new o.ck(y),u_merc_matrix:new o.ck(y),u_grid_matrix:new o.dy(y),u_tl_parent:new o.cj(y),u_scale_parent:new o.ci(y),u_fade_t:new o.ci(y),u_opacity:new o.ci(y),u_image0:new o.cg(y),u_image1:new o.cg(y),u_raster_elevation:new o.ci(y),u_zoom_transition:new o.ci(y),u_merc_center:new o.cj(y),u_cutoff_params:new o.d2(y)}),rasterParticleTexture:y=>({u_texture:new o.cg(y),u_opacity:new o.ci(y)}),rasterParticleDraw:y=>({u_particle_texture:new o.cg(y),u_particle_texture_side_len:new o.ci(y),u_tile_offset:new o.cj(y),u_velocity:new o.cg(y),u_color_ramp:new o.cg(y),u_velocity_res:new o.cj(y),u_max_speed:new o.ci(y),u_uv_offset:new o.cj(y),u_data_scale:new o.cj(y),u_data_offset:new o.ci(y),u_particle_pos_scale:new o.ci(y),u_particle_pos_offset:new o.cj(y)}),rasterParticleUpdate:y=>({u_particle_texture:new o.cg(y),u_particle_texture_side_len:new o.ci(y),u_velocity:new o.cg(y),u_velocity_res:new o.cj(y),u_max_speed:new o.ci(y),u_speed_factor:new o.ci(y),u_reset_rate:new o.ci(y),u_rand_seed:new o.ci(y),u_uv_offset:new o.cj(y),u_data_scale:new o.cj(y),u_data_offset:new o.ci(y),u_particle_pos_scale:new o.ci(y),u_particle_pos_offset:new o.cj(y)}),symbol:y=>({u_is_size_zoom_constant:new o.cg(y),u_is_size_feature_constant:new o.cg(y),u_size_t:new o.ci(y),u_size:new o.ci(y),u_camera_to_center_distance:new o.ci(y),u_rotate_symbol:new o.cg(y),u_aspect_ratio:new o.ci(y),u_fade_change:new o.ci(y),u_matrix:new o.ck(y),u_label_plane_matrix:new o.ck(y),u_coord_matrix:new o.ck(y),u_is_text:new o.cg(y),u_elevation_from_sea:new o.cg(y),u_pitch_with_map:new o.cg(y),u_texsize:new o.cj(y),u_texsize_icon:new o.cj(y),u_texture:new o.cg(y),u_texture_icon:new o.cg(y),u_gamma_scale:new o.ci(y),u_device_pixel_ratio:new o.ci(y),u_tile_id:new o.ch(y),u_zoom_transition:new o.ci(y),u_inv_rot_matrix:new o.ck(y),u_merc_center:new o.cj(y),u_camera_forward:new o.ch(y),u_tile_matrix:new o.ck(y),u_up_vector:new o.ch(y),u_ecef_origin:new o.ch(y),u_is_halo:new o.cg(y),u_icon_transition:new o.ci(y),u_color_adj_mat:new o.ck(y),u_scale_factor:new o.ci(y),u_ground_shadow_factor:new o.ch(y),u_inv_matrix:new o.ck(y),u_normal_scale:new o.ci(y),u_lutTexture:new o.cg(y)}),background:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_opacity:new o.ci(y),u_color:new o.dx(y)}),backgroundPattern:y=>({u_matrix:new o.ck(y),u_emissive_strength:new o.ci(y),u_opacity:new o.ci(y),u_image:new o.cg(y),u_pattern_tl:new o.cj(y),u_pattern_br:new o.cj(y),u_texsize:new o.cj(y),u_pattern_size:new o.cj(y),u_pixel_coord_upper:new o.cj(y),u_pixel_coord_lower:new o.cj(y),u_pattern_units_to_pixels:new o.cj(y)}),terrainRaster:y=>({u_matrix:new o.ck(y),u_image0:new o.cg(y),u_skirt_height:new o.ci(y),u_ground_shadow_factor:new o.ch(y)}),skybox:y=>({u_matrix:new o.ck(y),u_sun_direction:new o.ch(y),u_cubemap:new o.cg(y),u_opacity:new o.ci(y),u_temporal_offset:new o.ci(y)}),skyboxGradient:y=>({u_matrix:new o.ck(y),u_color_ramp:new o.cg(y),u_center_direction:new o.ch(y),u_radius:new o.ci(y),u_opacity:new o.ci(y),u_temporal_offset:new o.ci(y)}),skyboxCapture:y=>({u_matrix_3f:new o.dy(y),u_sun_direction:new o.ch(y),u_sun_intensity:new o.ci(y),u_color_tint_r:new o.d2(y),u_color_tint_m:new o.d2(y),u_luminance:new o.ci(y)}),globeRaster:y=>({u_proj_matrix:new o.ck(y),u_globe_matrix:new o.ck(y),u_normalize_matrix:new o.ck(y),u_merc_matrix:new o.ck(y),u_zoom_transition:new o.ci(y),u_merc_center:new o.cj(y),u_image0:new o.cg(y),u_grid_matrix:new o.dy(y),u_skirt_height:new o.ci(y),u_far_z_cutoff:new o.ci(y),u_frustum_tl:new o.ch(y),u_frustum_tr:new o.ch(y),u_frustum_br:new o.ch(y),u_frustum_bl:new o.ch(y),u_globe_pos:new o.ch(y),u_globe_radius:new o.ci(y),u_viewport:new o.cj(y)}),globeAtmosphere:y=>({u_frustum_tl:new o.ch(y),u_frustum_tr:new o.ch(y),u_frustum_br:new o.ch(y),u_frustum_bl:new o.ch(y),u_horizon:new o.ci(y),u_transition:new o.ci(y),u_fadeout_range:new o.ci(y),u_atmosphere_fog_color:new o.d2(y),u_high_color:new o.d2(y),u_space_color:new o.d2(y),u_temporal_offset:new o.ci(y),u_horizon_angle:new o.ci(y)}),model:y=>({u_matrix:new o.ck(y),u_lighting_matrix:new o.ck(y),u_normal_matrix:new o.ck(y),u_node_matrix:new o.ck(y),u_lightpos:new o.ch(y),u_lightintensity:new o.ci(y),u_lightcolor:new o.ch(y),u_camera_pos:new o.ch(y),u_opacity:new o.ci(y),u_baseColorFactor:new o.d2(y),u_emissiveFactor:new o.d2(y),u_metallicFactor:new o.ci(y),u_roughnessFactor:new o.ci(y),u_baseTextureIsAlpha:new o.cg(y),u_alphaMask:new o.cg(y),u_alphaCutoff:new o.ci(y),u_baseColorTexture:new o.cg(y),u_metallicRoughnessTexture:new o.cg(y),u_normalTexture:new o.cg(y),u_occlusionTexture:new o.cg(y),u_emissionTexture:new o.cg(y),u_lutTexture:new o.cg(y),u_color_mix:new o.d2(y),u_aoIntensity:new o.ci(y),u_emissive_strength:new o.ci(y),u_occlusionTextureTransform:new o.d2(y)}),modelDepth:y=>({u_matrix:new o.ck(y),u_instance:new o.ck(y),u_node_matrix:new o.ck(y)}),groundShadow:y=>({u_matrix:new o.ck(y),u_ground_shadow_factor:new o.ch(y)}),stars:y=>({u_matrix:new o.ck(y),u_up:new o.ch(y),u_right:new o.ch(y),u_intensity_multiplier:new o.ci(y)}),snowParticle:y=>({u_modelview:new o.ck(y),u_projection:new o.ck(y),u_time:new o.ci(y),u_cam_pos:new o.ch(y),u_velocityConeAperture:new o.ci(y),u_velocity:new o.ci(y),u_horizontalOscillationRadius:new o.ci(y),u_horizontalOscillationRate:new o.ci(y),u_boxSize:new o.ci(y),u_billboardSize:new o.ci(y),u_simpleShapeParameters:new o.cj(y),u_screenSize:new o.cj(y),u_thinningCenterPos:new o.cj(y),u_thinningShape:new o.ch(y),u_thinningAffectedRatio:new o.ci(y),u_thinningParticleOffset:new o.ci(y),u_particleColor:new o.d2(y),u_direction:new o.ch(y)}),rainParticle:y=>({u_modelview:new o.ck(y),u_projection:new o.ck(y),u_time:new o.ci(y),u_cam_pos:new o.ch(y),u_texScreen:new o.cg(y),u_velocityConeAperture:new o.ci(y),u_velocity:new o.ci(y),u_boxSize:new o.ci(y),u_rainDropletSize:new o.cj(y),u_distortionStrength:new o.ci(y),u_rainDirection:new o.ch(y),u_color:new o.d2(y),u_screenSize:new o.cj(y),u_thinningCenterPos:new o.cj(y),u_thinningShape:new o.ch(y),u_thinningAffectedRatio:new o.ci(y),u_thinningParticleOffset:new o.ci(y),u_shapeDirectionalPower:new o.ci(y),u_shapeNormalPower:new o.ci(y),u_mode:new o.ci(y)}),vignette:y=>({u_vignetteShape:new o.ch(y),u_vignetteColor:new o.d2(y)}),occlusion:y=>({u_matrix:new o.ck(y),u_anchorPos:new o.ch(y),u_screenSizePx:new o.cj(y),u_occluderSizePx:new o.cj(y),u_color:new o.d2(y)})},cp=(()=>{class y{constructor(p,_,x,S){this.id=y.uniqueIdxCounter,y.uniqueIdxCounter++,this.context=p;let A=p.gl;this.buffer=A.createBuffer(),this.dynamicDraw=!!x,this.context.unbindVAO(),p.bindElementBuffer.set(this.buffer),A.bufferData(A.ELEMENT_ARRAY_BUFFER,_.arrayBuffer,this.dynamicDraw?A.DYNAMIC_DRAW:A.STATIC_DRAW),this.dynamicDraw||S||_.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(p){this.id=y.uniqueIdxCounter,y.uniqueIdxCounter++;let _=this.context.gl;this.context.unbindVAO(),this.bind(),_.bufferSubData(_.ELEMENT_ARRAY_BUFFER,0,p.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}return y.uniqueIdxCounter=0,y})(),vD={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class p3{constructor(l,p,_,x,S,A){this.length=p.length,this.attributes=_,this.itemSize=p.bytesPerElement,this.dynamicDraw=x,this.instanceCount=A,this.context=l;let N=l.gl;this.buffer=N.createBuffer(),l.bindVertexBuffer.set(this.buffer),N.bufferData(N.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?N.DYNAMIC_DRAW:N.STATIC_DRAW),this.dynamicDraw||S||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 _=0;_0&&l.vertexAttribDivisor(S,_)}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Ef{constructor(l,p,_,x,S){this.context=l,this.width=p,this.height=_;let A=this.framebuffer=l.gl.createFramebuffer();x&&(this.colorAttachment=new wf(l,A)),S&&(this.depthAttachmentType=S,this.depthAttachment=S==="renderbuffer"?new ll(l,A):new bH(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 tT{constructor(l,p){this.gl=l,this.clearColor=new $I(this),this.clearDepth=new cS(this),this.clearStencil=new QO(this),this.colorMask=new _H(this),this.depthMask=new r3(this),this.stencilMask=new yH(this),this.stencilFunc=new o3(this),this.stencilOp=new $u(this),this.stencilTest=new qu(this),this.depthRange=new vH(this),this.depthTest=new a3(this),this.depthFunc=new dD(this),this.blend=new uD(this),this.blendFunc=new qI(this),this.blendColor=new __(this),this.blendEquation=new pb(this),this.cullFace=new zy(this),this.cullFaceSide=new mb(this),this.frontFace=new k0(this),this.program=new YI(this),this.activeTexture=new hb(this),this.viewport=new s3(this),this.bindFramebuffer=new dS(this),this.bindRenderbuffer=new pD(this),this.bindTexture=new mD(this),this.bindVertexBuffer=new ZO(this),this.bindElementBuffer=new YC(this),this.bindVertexArrayOES=new Uy(this),this.pixelStoreUnpack=new XO(this),this.pixelStoreUnpackPremultiplyAlpha=new ft(this),this.pixelStoreUnpackFlipY=new KC(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,_){return new cp(this,l,p,_)}createVertexBuffer(l,p,_,x,S){return new p3(this,l,p,_,x,S)}createRenderbuffer(l,p,_){let x=this.gl,S=x.createRenderbuffer();return this.bindRenderbuffer.set(S),x.renderbufferStorage(x.RENDERBUFFER,l,p,_),this.bindRenderbuffer.set(null),S}createFramebuffer(l,p,_,x){return new Ef(this,l,p,_,x)}clear({color:l,depth:p,stencil:_,colorMask:x}){let S=this.gl,A=0;l&&(A|=S.COLOR_BUFFER_BIT,this.clearColor.set(l.toNonPremultipliedRenderColor(null)),this.colorMask.set(x||[!0,!0,!0,!0])),p!==void 0&&(A|=S.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),_!==void 0&&(A|=S.STENCIL_BUFFER_BIT,this.clearStencil.set(_),this.stencilMask.set(255)),S.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){o.by(l.blendFunction,po.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 Af;function b_(y,l,p,_,x,S,A){let N=y.context,V=N.gl,$=y.transform,Y=[o.aF($.center.lng),o.aJ($.center.lat)],J=p.layout.get("symbol-placement"),W=p.layout.get("text-variable-anchor"),oe=p.layout.get("icon-rotation-alignment")==="map",ce=p.layout.get("text-rotation-alignment")==="map",de=J!=="point",Ee=[],ge=0,Oe=0;for(let Xe=0;Xe<_.length;Xe++){let it=_[Xe],Wt=l.getTile(it),Nt=Wt.getBucket(p);if(!Nt)continue;let mi=Nt.getProjection().createInversionMatrix($,it.canonical),jt=[],ci=JB(it,Nt,$),cn=!A&&oe&&de,qt=A&&ce&&de,Dt=W&&Nt.hasTextData(),Si=Nt.hasIconTextFit()&&Dt&&Nt.hasIconData(),Jt=cn||qt||A&&Dt||Si,Gi=Nt.projection.name==="globe",sn=Gi?o.aj($.zoom):0;Gi&&(jt.push("PROJECTION_GLOBE_VIEW"),Jt&&jt.push("PROJECTED_POS_ON_VIEWPORT"));let Mn=y.getOrCreateProgram("collisionBox",{defines:jt}),en=ci;x[0]===0&&x[1]===0||(en=y.translatePosMatrix(ci,Wt,x,S));let Zi=A?Nt.textCollisionBox:Nt.iconCollisionBox,or=Nt.collisionCircleArray;if(or.length>0){let nr=o.bC(),Wn=en;o.cO(nr,Nt.placementInvProjMatrix,$.glCoordMatrix),o.cO(nr,nr,Nt.placementViewportMatrix),Ee.push({circleArray:or,circleOffset:Oe,transform:Wn,invTransform:nr,projection:Nt.getProjection()}),ge+=or.length/4,Oe=ge}if(!Zi)continue;y.terrain&&y.terrain.setupElevationDraw(Wt,Mn);let er=Gi?[it.canonical.x,it.canonical.y,1<=0&&(oe[Be.associatedIconIndex]={x:Wt,y:Nt,z:mi,angle:Dt})}else mr(et,J)}if($){W.clear();let Oe=y.icon.placedSymbolArray;for(let Be=0;Be{let xo=[0,0,0];if(Cl){let Lr=y.style.directionalLight,ls=y.style.ambientLight;Lr&&ls&&(xo=h_(y.style,Lr,ls))}return xo},Ea=Cl=>{Xe.depthOcclusionForSymbolsAndCircles&&(p.hasOcclusionOpacityProperties||y.terrain)&&(Cl.push("DEPTH_D24"),Cl.push("DEPTH_OCCLUSION"))},Ja=Cl=>{p.lut&&!et&&(p.lut.texture||(p.lut.texture=new o.dY(y.context,p.lut.image,[p.lut.image.height,p.lut.image.height,p.lut.image.height],at.gl.RGBA8)),at.activeTexture.set(at.gl.TEXTURE0+Fc.LUT),p.lut.texture&&p.lut.texture.bind(at.gl.LINEAR,at.gl.CLAMP_TO_EDGE),Cl.push("APPLY_LUT_ON_GPU"))},ml=()=>{let Cl=it&&p.layout.get("symbol-placement")!=="point",xo=[];Ea(xo),Ja(xo);let Lr=Cl||go,ls=Zi.elevationType==="road",Zl=y.shadowRenderer,xl=ls&&Nt&&!!Zl&&Zl.enabled,Jc=ao(xl),Md=ls&&Nt&&!y.terrain?qt:cn,kf=p.paint.get("icon-image-cross-fade");y.terrainRenderModeElevated()&&Nt&&xo.push("PITCH_WITH_MAP_TERRAIN"),or&&(xo.push("PROJECTION_GLOBE_VIEW"),Lr&&xo.push("PROJECTED_POS_ON_VIEWPORT")),kf>0&&Zi.hasAnySecondaryIcon&&xo.push("ICON_TRANSITION"),!Zi.icon.zOffsetVertexBuffer||ls&&y.terrain||xo.push("Z_OFFSET"),ge===0&&Oe===0&&Be===0&&He===1||xo.push("COLOR_ADJUSTMENT"),Zi.sdfIcons&&xo.push("RENDER_SDF"),xl&&xo.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),ls&&Nt&&!y.terrain&&Zi.icon.orientationVertexBuffer&&xo.push("ELEVATED_ROADS");let Mf=Zi.icon.programConfigurations.get(p.id),Lh=y.getOrCreateProgram("symbol",{config:Mf,defines:xo}),Bh=en.imageAtlasTexture?en.imageAtlasTexture.size:[0,0],um=Zi.iconSizeData,Ig=o.bK(um,Xe.zoom),D_=Nt||!Xe.isOrthographic,cc=d_(nr,en.tileID.canonical,Nt,it,Xe,Zi.getProjection(),Wn),Ic=K1(nr,en.tileID.canonical,Nt,it,Xe,Zi.getProjection(),Wn),Ol=y.translatePosMatrix(Ic,en,N,$,!0),gd=y.translatePosMatrix(nr,en,N,$),Kd=Lr?$y:cc,$c=it&&!Nt&&!Cl,up=sn;!Jt&&!Xe.mercatorFromTransition||it||(up=Pp(Xe));let V0=or?up:sn,ev=p.getColorAdjustmentMatrix(ge,Oe,Be,He),Tg=XC(um.kind,Ig,$c,Nt,y,gd,Kd,Ol,nt,!1,Bh,[0,0],0,Mn,er,Dt,Co,V0,Zi.getProjection(),Jc,ss,ev,kf,null),tv=en.imageAtlasTexture?en.imageAtlasTexture:null,wb=p.layout.get("icon-size").constantOr(0)!==1||Zi.iconsNeedLinear,z0=Zi.sdfIcons||y.options.rotating||y.options.zooming||wb||D_?tt.LINEAR:tt.NEAREST,IS=Zi.sdfIcons&&p.paint.get("icon-halo-width").constantOr(1)!==0,iv=y.terrain&&Nt&&Cl?o.bl(o.bC(),cc):$y;if(Cl&&Zi.icon){let Of=Xe.elevation,nv=Of?Of.getAtTileOffsetFunc(Mn,Xe.center.lat,Xe.worldSize,Zi.getProjection()):null,$D=qd(nr,en.tileID.canonical,Nt,it,Xe,Zi.getProjection(),Wn);Oh(Zi,nr,y,!1,$D,Ic,Nt,de,nv,Mn)}return{program:Lh,buffers:Zi.icon,uniformValues:Tg,atlasTexture:tv,atlasTextureIcon:null,atlasInterpolation:z0,atlasInterpolationIcon:null,isSDF:Zi.sdfIcons,hasHalo:IS,depthMode:Md,tile:en,renderWithShadows:xl,labelPlaneMatrixInv:iv}},_o=()=>{let Cl=Wt&&p.layout.get("symbol-placement")!=="point",xo=[],Lr=Cl||Si||go,ls=Zi.elevationType==="road",Zl=y.shadowRenderer,xl=ls&&mi&&!!Zl&&Zl.enabled,Jc=ao(xl),Md=ls&&mi&&!y.terrain?qt:cn;y.terrainRenderModeElevated()&&mi&&xo.push("PITCH_WITH_MAP_TERRAIN"),or&&(xo.push("PROJECTION_GLOBE_VIEW"),Lr&&xo.push("PROJECTED_POS_ON_VIEWPORT")),!Zi.text.zOffsetVertexBuffer||ls&&y.terrain||xo.push("Z_OFFSET"),Zi.iconsInText&&xo.push("RENDER_TEXT_AND_SYMBOL"),xo.push("RENDER_SDF"),xl&&xo.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),ls&&mi&&!y.terrain&&Zi.text.orientationVertexBuffer&&xo.push("ELEVATED_ROADS"),Ea(xo);let kf=Zi.text.programConfigurations.get(p.id),Mf=y.getOrCreateProgram("symbol",{config:kf,defines:xo}),Lh,Bh=[0,0],um=null,Ig=Zi.textSizeData;Zi.iconsInText&&(Bh=en.imageAtlasTexture?en.imageAtlasTexture.size:[0,0],um=en.imageAtlasTexture?en.imageAtlasTexture:null,Lh=mi||!Xe.isOrthographic||y.options.rotating||y.options.zooming||Ig.kind==="composite"||Ig.kind==="camera"?tt.LINEAR:tt.NEAREST);let D_=en.glyphAtlasTexture?en.glyphAtlasTexture.size:[0,0],cc=p.layout.get("text-size-scale-range"),Ic=o.aA(y.scaleFactor,cc[0],cc[1]),Ol=o.bK(Ig,Xe.zoom,Ic),gd=d_(nr,en.tileID.canonical,mi,Wt,Xe,Zi.getProjection(),Wn),Kd=K1(nr,en.tileID.canonical,mi,Wt,Xe,Zi.getProjection(),Wn),$c=y.translatePosMatrix(Kd,en,V,Y,!0),up=y.translatePosMatrix(nr,en,V,Y),V0=Lr?$y:gd,ev=Wt&&!mi&&!Cl,Tg=sn;!Jt&&!Xe.mercatorFromTransition||Wt||(Tg=Pp(Xe));let tv=XC(Ig.kind,Ol,ev,mi,y,up,V0,$c,nt,!0,D_,Bh,0,Mn,er,Dt,Co,or?Tg:sn,Zi.getProjection(),Jc,ss,null,null,Ic),wb=en.glyphAtlasTexture?en.glyphAtlasTexture:null,z0=tt.LINEAR,IS=p.paint.get("text-halo-width").constantOr(1)!==0,iv=y.terrain&&mi&&Cl?o.bl(o.bC(),gd):$y;if(Cl&&Zi.text){let Of=Xe.elevation,nv=Of?Of.getAtTileOffsetFunc(Mn,Xe.center.lat,Xe.worldSize,Zi.getProjection()):null,$D=qd(nr,en.tileID.canonical,mi,Wt,Xe,Zi.getProjection(),Wn);Oh(Zi,nr,y,!0,$D,Kd,mi,Ee,nv,Mn)}return{program:Mf,buffers:Zi.text,uniformValues:tv,atlasTexture:wb,atlasTextureIcon:um,atlasInterpolation:z0,atlasInterpolationIcon:Lh,isSDF:!0,hasHalo:IS,depthMode:Md,tile:en,renderWithShadows:xl,labelPlaneMatrixInv:iv}},za=Zi.icon.segments.get().length,wa=Zi.text.segments.get().length,Ua=za&&!A.onlyText?ml():null,bl=wa&&!A.onlyIcons?_o():null,wc=p.paint.get("icon-opacity").constantOr(1),Yd=p.paint.get("text-opacity").constantOr(1);if(jt&&Zi.canOverlap){ci=!0;let Cl=wc&&!A.onlyText?Zi.icon.segments.get():[],xo=Yd&&!A.onlyIcons?Zi.text.segments.get():[];for(let Lr of Cl)Gi.push({segments:new o.bg([Lr]),sortKey:Lr.sortKey,state:Ua});for(let Lr of xo)Gi.push({segments:new o.bg([Lr]),sortKey:Lr.sortKey,state:bl})}else A.onlyText||Gi.push({segments:wc?Zi.icon.segments:new o.bg([]),sortKey:0,state:Ua}),A.onlyIcons||Gi.push({segments:Yd?Zi.text.segments:new o.bg([]),sortKey:0,state:bl})}ci&&Gi.sort((Mn,en)=>Mn.sortKey-en.sortKey);for(let Mn of Gi){let en=Mn.state;if(en)if(y.terrain?y.terrain.setupElevationDraw(en.tile,en.program,{useDepthForOcclusion:Xe.depthOcclusionForSymbolsAndCircles,labelPlaneMatrixInv:en.labelPlaneMatrixInv}):y.setupDepthForOcclusion(Xe.depthOcclusionForSymbolsAndCircles,en.program),at.activeTexture.set(tt.TEXTURE0),en.atlasTexture&&en.atlasTexture.bind(en.atlasInterpolation,tt.CLAMP_TO_EDGE,!0),en.atlasTextureIcon&&(at.activeTexture.set(tt.TEXTURE1),en.atlasTextureIcon&&en.atlasTextureIcon.bind(en.atlasInterpolationIcon,tt.CLAMP_TO_EDGE,!0)),en.renderWithShadows&&y.shadowRenderer.setupShadows(en.tile.tileID.toUnwrapped(),en.program,"vector-tile"),y.uploadCommonLightUniforms(y.context,en.program),en.hasHalo){let Zi=en.uniformValues;Zi.u_is_halo=1,CD(en.buffers,Mn.segments,p,y,en.program,en.depthMode,x,S,Zi,2),Zi.u_is_halo=0}else{if(en.isSDF){let Zi=en.uniformValues;en.hasHalo&&(Zi.u_is_halo=1,CD(en.buffers,Mn.segments,p,y,en.program,en.depthMode,x,S,Zi,1)),Zi.u_is_halo=0}CD(en.buffers,Mn.segments,p,y,en.program,en.depthMode,x,S,en.uniformValues,1)}}}function CD(y,l,p,_,x,S,A,N,V,$){let Y=[y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer,y.iconTransitioningVertexBuffer,y.globeExtVertexBuffer,y.zOffsetVertexBuffer,y.orientationVertexBuffer];x.draw(_,_.context.gl.TRIANGLES,S,A,N,jr.disabled,V,p.id,y.layoutVertexBuffer,y.indexBuffer,l,p.paint,_.transform.zoom,y.programConfigurations.get(p.id),Y,$)}function xD(y,l){let p=1<=cm?1:oe.pitch/cm))),2*ce})(y.transform),$=y.transform.getFreeCameraOptions().position,Y="elevatedStructuresDepthReconstruct",J=y.getOrCreateProgram(Y,{defines:["DEPTH_RECONSTRUCTION"]}),W=y.getOrCreateProgram(Y);for(let oe of _){let ce=l.getTile(oe),de=ce.getBucket(p);if(!de)continue;let Ee=de.elevatedStructures;if(!Ee)continue;let ge=de.elevationBufferData.heightRange,Oe=xD(oe.toUnwrapped(),$),Be=y.translatePosMatrix(oe.projMatrix,ce,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor")),He,nt,et,at;if(x==="initialize"){if(!ge||ge.min>=1||Ee.depthSegments.segments[0].primitiveLength===0)continue;He=ZI(Be,Oe,V,1,0),nt=A,et=Ee.depthSegments,at=J}else if(x==="reset"){if(!ge||ge.min>=0||Ee.maskSegments.segments[0].primitiveLength===0)continue;He=ZI(Be,Oe,0,0,1),nt=N,et=Ee.maskSegments,at=J}else if(x==="geometry"){if(Ee.depthSegments.segments[0].primitiveLength===0)continue;He=ZI(Be,Oe,V,1,0),nt=A,et=Ee.depthSegments,at=W}at.draw(y,S.TRIANGLES,nt,Nr.disabled,po.disabled,jr.disabled,He,p.id,Ee.vertexBuffer,Ee.indexBuffer,et,p.paint,y.transform.zoom)}}function O0(y,l,p){let{painter:_,sourceCache:x,layer:S,coords:A,colorMode:N,elevationType:V,terrainEnabled:$,pass:Y}=y,J=_.context.gl,W=S.paint.get("fill-pattern"),oe=S.paint.get("fill-pattern-cross-fade"),ce=W.constantOr(null),de=V;V!=="road"||l&&!$||(de="none");let Ee=de==="road",ge=y.painter.shadowRenderer,Oe=Ee&&!!ge&&ge.enabled,Be=new Rn(_.context.gl.LEQUAL,Rn.ReadOnly,_.depthRangeFor3D),He=[0,0,0];if(Oe){let at=_.style.directionalLight,tt=_.style.ambientLight;at&&tt&&(He=h_(_.style,at,tt))}let nt=W&&W.constantOr(1),et=(at,tt)=>{let Xe,it,Wt,Nt,mi;tt?(Xe=nt&&!S.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Wt=J.LINES):(Xe=nt?"fillPattern":"fill",Wt=J.TRIANGLES);for(let jt of A){let ci=x.getTile(jt);if(nt&&!ci.patternsLoaded())continue;let cn=ci.getBucket(S);if(!cn)continue;let qt=l?cn.elevationBufferData:cn.bufferData;if(qt.isEmpty())continue;_.prepareDrawTile();let Dt=qt.programConfigurations.get(S.id),Si=_.isTileAffectedByFog(jt),Jt=[],Gi=[];Ee&&(Jt.push("ELEVATED_ROADS"),Gi.push(qt.elevatedLayoutVertexBuffer)),Oe&&Jt.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),nt&&(_.context.activeTexture.set(J.TEXTURE0),ci.imageAtlasTexture&&ci.imageAtlasTexture.bind(J.LINEAR,J.CLAMP_TO_EDGE),Dt.updatePaintBuffers());let sn=!1;if(ce&&ci.imageAtlas){let er=ci.imageAtlas,nr=o.e0.from(ce),Wn=nr.getPrimary().scaleSelf(o.o.devicePixelRatio).toString(),Zr=nr.getSecondary(),go=er.patternPositions.get(Wn),Co=Zr?er.patternPositions.get(Zr.scaleSelf(o.o.devicePixelRatio).toString()):null;sn=!!go&&!!Co,go&&Dt.setConstantPatternPositions(go,Co)}oe>0&&(sn||Dt.getPatternTransitionVertexBuffer("fill-pattern"))&&Jt.push("FILL_PATTERN_TRANSITION");let Mn=_.getOrCreateProgram(Xe,{config:Dt,overrideFog:Si,defines:Jt}),en=_.translatePosMatrix(jt.projMatrix,ci,S.paint.get("fill-translate"),S.paint.get("fill-translate-anchor"));Oe&&ge.setupShadows(ci.tileID.toUnwrapped(),Mn,"vector-tile");let Zi=S.paint.get("fill-emissive-strength");if(tt){Nt=qt.lineIndexBuffer,mi=qt.lineSegments;let er=_.terrain&&_.terrain.renderingToTexture?_.terrain.drapeBufferSize:[J.drawingBufferWidth,J.drawingBufferHeight];it=Xe==="fillOutlinePattern"&&nt?wH(en,Zi,_,ci,er,He,oe):SH(en,Zi,er,He)}else Nt=qt.indexBuffer,mi=qt.triangleSegments,it=nt?QC(en,Zi,_,ci,He,oe):oR(en,Zi,He);_.uploadCommonUniforms(_.context,Mn,jt.toUnwrapped());let or=at;(V==="road"&&!$||V==="offset")&&(or=Be),Mn.draw(_,Wt,or,p||_.stencilModeForClipping(jt),N,jr.disabled,it,S.id,qt.layoutVertexBuffer,Nt,mi,S.paint,_.transform.zoom,Dt,Gi)}};_.renderPass===Y&&et(_.depthModeForSublayer(1,_.renderPass==="opaque"?Rn.ReadWrite:Rn.ReadOnly),!1),de==="none"&&_.renderPass==="translucent"&&S.paint.get("fill-antialias")&&et(_.depthModeForSublayer(S.getPaintProperty("fill-outline-color")?2:0,Rn.ReadOnly),!0)}function Ln(y,l,p,_,x,S,A,N){p.resetLayerRenderingStats(y);let V=y.context,$=V.gl,Y=y.transform,J=p.paint.get("fill-extrusion-pattern"),W=p.paint.get("fill-extrusion-pattern-cross-fade"),oe=J.constantOr(null),ce=J.constantOr(1),de=p.paint.get("fill-extrusion-opacity"),Ee=y.style.enable3dLights(),ge=p.paint.get(Ee&&!ce?"fill-extrusion-ambient-occlusion-wall-radius":"fill-extrusion-ambient-occlusion-radius"),Oe=[p.paint.get("fill-extrusion-ambient-occlusion-intensity"),ge],Be=p.layout.get("fill-extrusion-edge-radius"),He=Be>0&&!p.paint.get("fill-extrusion-rounded-roof"),nt=He?0:Be,et=Y.projection.name==="globe"?o.e8():0,at=Y.projection.name==="globe",tt=at?o.aj(Y.zoom):0,Xe=[o.aF(Y.center.lng),o.aJ(Y.center.lat)],it=p.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",Wt=p.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(it?null:p.lut).toArray01().slice(0,3),Nt=p.paint.get("fill-extrusion-flood-light-intensity"),mi=p.paint.get("fill-extrusion-vertical-scale"),jt=p.paint.get("fill-extrusion-line-width").constantOr(1)!==0,ci=p.paint.get("fill-extrusion-height-alignment"),cn=p.paint.get("fill-extrusion-base-alignment"),qt=db(y,p.paint.get("fill-extrusion-cutoff-fade-range")),Dt=[],Si;at&&Dt.push("PROJECTION_GLOBE_VIEW"),Oe[0]>0&&Dt.push("FAUX_AO"),He&&Dt.push("ZERO_ROOF_RADIUS"),N&&Dt.push("HAS_CENTROID"),Nt>0&&Dt.push("FLOOD_LIGHT"),qt.shouldRenderCutoff&&Dt.push("RENDER_CUTOFF"),jt&&Dt.push("RENDER_WALL_MODE");let Jt=y.renderPass==="shadow",Gi=y.shadowRenderer,sn=Jt&&!!Gi,Mn=Jt?jr.disabled:jr.backCCW;y.shadowRenderer&&(y.shadowRenderer.useNormalOffset=!0);let en=[0,0,0];if(Gi){let er=y.style.directionalLight,nr=y.style.ambientLight;er&&nr&&(en=h_(y.style,er,nr)),Jt||(Dt.push("RENDER_SHADOWS","DEPTH_TEXTURE"),Gi.useNormalOffset&&Dt.push("NORMAL_OFFSET")),Si=Dt.concat(["SHADOWS_SINGLE_CASCADE"])}let Zi=sn?"fillExtrusionDepth":ce?"fillExtrusionPattern":"fillExtrusion",or=p.getLayerRenderingStats();for(let er of _){let nr=l.getTile(er),Wn=nr.getBucket(p);if(!Wn||Wn.projection.name!==Y.projection.name)continue;let Zr=!1;Gi&&(Zr=Gi.getMaxCascadeForTile(er.toUnwrapped())===0);let go=y.isTileAffectedByFog(er),Co=Wn.programConfigurations.get(p.id),ss=!1;if(oe&&nr.imageAtlas){let wa=nr.imageAtlas,Ua=o.e0.from(oe),bl=Ua.getPrimary().scaleSelf(o.o.devicePixelRatio).toString(),wc=Ua.getSecondary(),Yd=wa.patternPositions.get(bl),Cl=wc?wa.patternPositions.get(wc.scaleSelf(o.o.devicePixelRatio).toString()):null;ss=!!Yd&&!!Cl,Yd&&Co.setConstantPatternPositions(Yd,Cl)}W>0&&(ss||Co.getPatternTransitionVertexBuffer("fill-extrusion-pattern"))&&Dt.push("FILL_EXTRUSION_PATTERN_TRANSITION");let ao=y.getOrCreateProgram(Zi,{config:Co,defines:Zr?Si:Dt,overrideFog:go});if(y.terrain&&y.terrain.setupElevationDraw(nr,ao,{useMeterToDem:!0}),!Wn.centroidVertexBuffer){let wa=ao.getAttributeLocation($,"a_centroid_pos");wa!==-1&&$.vertexAttrib2f(wa,0,0)}!Jt&&Gi&&Gi.setupShadows(nr.tileID.toUnwrapped(),ao,"vector-tile"),ce&&(y.context.activeTexture.set($.TEXTURE0),nr.imageAtlasTexture&&nr.imageAtlasTexture.bind($.LINEAR,$.CLAMP_TO_EDGE),Co.updatePaintBuffers());let Ea=p.paint.get("fill-extrusion-vertical-gradient"),Ja=1/Wn.tileToMeter,ml;if(Jt&&Gi){if(uR(nr.tileID,Wn.maxHeight,y))continue;let wa=Gi.calculateShadowPassMatrixFromTile(nr.tileID.toUnwrapped());ml=rR(wa,nt,Ja,mi,ci,cn)}else{let wa=y.translatePosMatrix(er.expandedProjMatrix,nr,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Ua=Y.projection.createInversionMatrix(Y,er.canonical);ml=ce?yg(wa,y,Ea,de,Oe,nt,Ja,er,nr,et,ci,cn,tt,Xe,Ua,Wt,mi,W):QI(wa,y,Ea,de,Oe,nt,Ja,er,et,ci,cn,tt,Xe,Ua,Wt,mi,Nt,en)}y.uploadCommonUniforms(V,ao,er.toUnwrapped(),null,qt);let _o=Wn.segments;if(Y.projection.name==="mercator"&&!Jt&&(_o=Wn.getVisibleSegments(nr.tileID,y.terrain,y.transform.getFrustum(0)),!_o.get().length))continue;if(or)if(Jt)for(let wa of _o.get())or.numRenderedVerticesInShadowPass+=wa.primitiveLength;else for(let wa of _o.get())or.numRenderedVerticesInTransparentPass+=wa.primitiveLength;let za=[];(y.terrain||N)&&za.push(Wn.centroidVertexBuffer),at&&za.push(Wn.layoutVertexExtBuffer),jt&&za.push(Wn.wallVertexBuffer),ao.draw(y,V.gl.TRIANGLES,x,S,A,Mn,ml,p.id,Wn.layoutVertexBuffer,Wn.indexBuffer,_o,p.paint,y.transform.zoom,Co,za)}y.shadowRenderer&&(y.shadowRenderer.useNormalOffset=!1)}class dR{constructor(){this.translate=[0,0],this.translateAnchor="map",this.edgeRadius=0,this.cutoffFadeRange=0}}function qy(y,l,p,_,x,S,A,N,V,$,Y,J,W,oe,ce,de,Ee,ge,Oe,Be){let He=l.context,nt=He.gl,et=l.transform,at=l.transform.zoom,tt=[],Xe=y.translate,it=y.translateAnchor,Wt=y.edgeRadius,Nt=db(l,y.cutoffFadeRange);Y==="clear"?(tt.push("CLEAR_SUBPASS"),Be&&(tt.push("CLEAR_FROM_TEXTURE"),He.activeTexture.set(nt.TEXTURE0),Be.bind(nt.LINEAR,nt.CLAMP_TO_EDGE))):Y==="sdf"&&tt.push("SDF_SUBPASS"),ge&&tt.push("HAS_CENTROID"),Nt.shouldRenderCutoff&&tt.push("RENDER_CUTOFF");let mi=(jt,ci,cn,qt,Dt)=>{let Si=ci.programConfigurations.get(_.id),Jt=l.isTileAffectedByFog(jt),Gi=l.getOrCreateProgram("fillExtrusionGroundEffect",{config:Si,defines:tt,overrideFog:Jt}),sn=((en,Zi,or,er,nr,Wn,Zr,go,Co,ss,ao)=>({u_matrix:Zi,u_opacity:or,u_ao_pass:er?1:0,u_meter_to_tile:nr,u_ao:Wn,u_flood_light_intensity:Zr,u_flood_light_color:go,u_attenuation:Co,u_edge_radius:ss,u_fb:0,u_fb_size:ao,u_dynamic_offset:1}))(0,qt,J,$,Dt,[W,oe*Dt],ce,de,Ee,at>=17?0:Wt*Dt,Be?Be.size[0]:0),Mn=[];ge&&Mn.push(ci.hiddenByLandmarkVertexBuffer),l.uploadCommonUniforms(He,Gi,jt.toUnwrapped(),null,Nt),Gi.draw(l,He.gl.TRIANGLES,S,A,N,V,sn,_.id,ci.vertexBuffer,ci.indexBuffer,cn,_.paint,at,Si,Mn)};for(let jt of x){let ci=p.getTile(jt),cn=ci.getBucket(_);if(!cn||cn.projection.name!==et.projection.name||!cn.groundEffect||cn.groundEffect&&!cn.groundEffect.hasData())continue;let qt=cn.groundEffect,Dt=1/cn.tileToMeter;{let Si=l.translatePosMatrix(jt.projMatrix,ci,Xe,it),Jt=qt.getDefaultSegment();mi(jt,qt,Jt,Si,Dt)}if(Oe)for(let Si=0;Si<4;Si++){let Jt=o.e6[Si](jt),Gi=p.getTile(Jt);if(!Gi)continue;let sn=Gi.getBucket(_);if(!sn||sn.projection.name!==et.projection.name||!sn.groundEffect||sn.groundEffect&&!sn.groundEffect.hasData())continue;let Mn=sn.groundEffect,en,Zi;Si===0?(en=[-o.al,0,0],Zi=1):Si===1?(en=[o.al,0,0],Zi=0):Si===2?(en=[0,-o.al,0],Zi=3):(en=[0,o.al,0],Zi=2);let or=Mn.regionSegments[Zi];if(!or)continue;let er=new Float32Array(16);o.br(er,jt.projMatrix,en),mi(jt,Mn,or,l.translatePosMatrix(er,ci,Xe,it),Dt)}}}function bg(y,l,p,_,x,S,A){_.centroidVertexArray.length===0&&_.createCentroidsBuffer();let N=S?S.findDEMTileFor(p):null;if(!(N&&N.dem||A))return;S&&N&&N.dem&&_.selfDEMTileTimestamp!==N.dem._timestamp&&(_.borderDoneWithNeighborZ=[-1,-1,-1,-1],_.selfDEMTileTimestamp=N.dem._timestamp);let V=ge=>new o.P(Math.ceil((ge+o.ea)*o.eb),0),$=ge=>{let Oe=l.getSource().minzoom,Be=nt=>{let et=l.getTileByID(nt);if(et&&et.hasData())return et.getBucket(x)},He=[0,-1,1];for(let nt of He){if(ge.overscaledZ+nt(Y[0]=Math.min(ge.min.y,Oe.min.y),Y[1]=Math.max(ge.max.y,Oe.max.y),Y[2]=o.al-Oe.min.x>ge.max.x?Oe.min.x-o.al:ge.max.x,Y),W=(ge,Oe)=>(Y[0]=Math.min(ge.min.x,Oe.min.x),Y[1]=Math.max(ge.max.x,Oe.max.x),Y[2]=o.al-Oe.min.y>ge.max.y?Oe.min.y-o.al:ge.max.y,Y),oe=[(ge,Oe)=>J(ge,Oe),(ge,Oe)=>J(Oe,ge),(ge,Oe)=>W(ge,Oe),(ge,Oe)=>W(Oe,ge)],ce=(ge,Oe,Be,He,nt,et,at)=>{if(!S)return 0;let tt=[[et?Be:ge,et?ge:Be,0],[et?Be:Oe,et?Oe:Be,0]],Xe=at<0?o.al+at:at,it=[et?Xe:(ge+Oe)/2,et?(ge+Oe)/2:Xe,0];return Be===0&&at<0||Be!==0&&at>0?S.getForTilePoints(nt,[it],!0,He):tt.push(it),S.getForTilePoints(p,tt,!0,N),Math.max(tt[0][2],tt[1][2],it[2])/S.exaggeration()};for(let ge=0;ge<4;ge++){let Oe=_.borderFeatureIndices[ge];if(Oe.length===0)continue;let Be=o.e6[ge](p),He=$(Be);if(!(He&&He instanceof o.e7))continue;let nt=S?S.findDEMTileFor(Be):null;if(!(nt&&nt.dem||A)||(S&&nt&&nt.dem&&_.borderDEMTileTimestamp[ge]!==nt.dem._timestamp&&(_.borderDoneWithNeighborZ[ge]=-1,_.borderDEMTileTimestamp[ge]=nt.dem._timestamp),_.borderDoneWithNeighborZ[ge]===He.canonical.z))continue;He.centroidVertexArray.length===0&&He.createCentroidsBuffer();let et=(ge<2?1:5)-ge,at=He.borderDoneWithNeighborZ[et]!==_.canonical.z,tt=He.borderFeatureIndices[et],Xe=0;if(_.canonical.z!==He.canonical.z){for(let it of Oe)_.showCentroid(_.featuresOnBorder[it]);if(at)for(let it of tt)He.showCentroid(He.featuresOnBorder[it]);_.borderDoneWithNeighborZ[ge]=He.canonical.z,He.borderDoneWithNeighborZ[et]=_.canonical.z}for(let it of Oe){let Wt=_.featuresOnBorder[it],Nt=_.centroidData[Wt.centroidDataIndex],mi=Wt.borders[ge],jt;for(;Xemi[0]+3||ci[0]>mi[0]-3)break;He.showCentroid(jt),Xe++}if(jt&&Xemi[1]-3)&&(cn++,++Xe!==tt.length);)jt=He.featuresOnBorder[tt[Xe]];jt=He.featuresOnBorder[tt[ci]];let qt=!1;if(cn>=1){let Jt=jt.borders[et];Math.abs(mi[0]-Jt[0])<3&&Math.abs(mi[1]-Jt[1])<3&&(cn=1,qt=!0,Xe=ci+1)}else if(cn===0){_.showCentroid(Wt);continue}let Dt=He.centroidData[jt.centroidDataIndex];A&&qt&&(((de=Nt).flags|(Ee=Dt).flags)&o.e9?(de.flags|=o.e9,Ee.flags|=o.e9):(de.flags&=~o.e9,Ee.flags&=~o.e9));let Si=Wt.intersectsCount()>1||jt.intersectsCount()>1;if(cn>1)Xe=ci,Nt.centroidXY=Dt.centroidXY=new o.P(0,0);else if(nt&&nt.dem&&!Si){let Jt=oe[ge](Nt,Dt),Gi=ge%2?o.al-1:0,sn=ce(Jt[0],Math.min(o.al-1,Jt[1]),Gi,nt,Be,ge<2,Jt[2]);Nt.centroidXY=Dt.centroidXY=V(sn)}else Si?Nt.centroidXY=Dt.centroidXY=new o.P(0,0):(Nt.centroidXY=_.encodeBorderCentroid(Wt),Dt.centroidXY=He.encodeBorderCentroid(jt));_.writeCentroidToBuffer(Nt),He.writeCentroidToBuffer(Dt)}else _.showCentroid(Wt)}_.borderDoneWithNeighborZ[ge]=He.canonical.z,He.borderDoneWithNeighborZ[et]=_.canonical.z}var de,Ee;(_.needsCentroidUpdate||!_.centroidVertexBuffer&&_.centroidVertexArray.length!==0)&&_.uploadCentroid(y)}let gb=[1,0,0],Mr=[0,1,0],nT=[0,0,1];function uR(y,l,p){let _=p.transform,x=p.shadowRenderer;if(!x)return!0;let S=y.toUnwrapped(),A=_.tileSize*x._cascades[p.currentShadowCascade].scale,N=l;if(_.elevation){let de=_.elevation.getMinMaxForTile(y);de&&(N+=de.max)}let V=[...x.shadowDirection];V[2]=-V[2];let $=x.computeSimplifiedTileShadowVolume(S,N,A,V);if(!$)return!1;let Y=[gb,Mr,nT,V,[V[0],0,V[2]],[0,V[1],V[2]]],J=_.projection.name==="globe",W=_.scaleZoom(A),oe=o.cA.fromInvProjectionMatrix(_.invProjMatrix,_.worldSize,W,!J),ce=x.getCurrentCascadeFrustum();return oe.intersectsPrecise($.vertices,$.planes,Y)===0||ce.intersectsPrecise($.vertices,$.planes,Y)===0}function SD(y){let{painter:l,source:p,layer:_,coords:x}=y,S=y.defines,A=l.context,N=l.renderPass==="shadow",V=l.renderPass==="light-beam",$=l.shadowRenderer,Y=o.ec(l.transform.center.lat,l.transform.zoom),J=db(l,_.paint.get("building-cutoff-fade-range"));J.shouldRenderCutoff&&(S=S.concat("RENDER_CUTOFF"));for(let W of x){let oe=p.getTile(W),ce=oe.getBucket(_);if(!ce)continue;$&&$.getMaxCascadeForTile(W.toUnwrapped())===0&&(S=S.concat("SHADOWS_SINGLE_CASCADE"));let de=ce.programConfigurations.get(_.id),Ee,ge,Oe,Be=l.translatePosMatrix(W.expandedProjMatrix,oe,[0,0],"map");if(Be=o.cR(o.bC(),Be,[1,1,y.verticalScale]),N&&$){if(uR(oe.tileID,ce.maxHeight*Y,l))continue;let nt=$.calculateShadowPassMatrixFromTile(oe.tileID.toUnwrapped());nt=o.cR(o.bC(),nt,[1,1,y.verticalScale]),Oe=aR(nt),Ee=ge=l.getOrCreateProgram("buildingDepth",{config:de,defines:S,overrideFog:!1})}else if(V)Ee=ge=l.getOrCreateProgram("buildingBloom",{config:de,defines:S,overrideFog:!1}),Oe=TH(Be);else{let nt=l.transform.calculatePosMatrix(W.toUnwrapped(),l.transform.worldSize);o.cR(nt,nt,[1,1,y.verticalScale]);let et=o.bC();o.cR(et,nt,[1,-1,1/Y]),o.bl(et,et),o.ed(et,et);let at=l.transform.getFreeCameraOptions().position,tt=1<{if(V){let at=nt.entranceBloom;et.draw(l,A.gl.TRIANGLES,y.depthMode,Nr.disabled,y.blendMode,jr.disabled,Oe,_.id,at.layoutVertexBuffer,at.indexBuffer,at.segmentsBucket,_.paint,l.transform.zoom,de,[at.layoutAttenuationBuffer,at.layoutColorBuffer])}else{let at=nt.segmentsBucket,tt=[nt.layoutNormalBuffer,nt.layoutCentroidBuffer,nt.layoutColorBuffer];nt.layoutFacadePaintBuffer&&(tt=tt.concat([nt.layoutFacadeDataBuffer,nt.layoutFacadeVerticalRangeBuffer,nt.layoutFacadePaintBuffer])),et.draw(l,A.gl.TRIANGLES,y.depthMode,Nr.disabled,y.blendMode,N?jr.disabled:jr.backCW,Oe,_.id,nt.layoutVertexBuffer,nt.indexBuffer,at,_.paint,l.transform.zoom,de,tt)}};l.uploadCommonUniforms(A,ge,W.toUnwrapped(),null,J),ce.buildingWithoutFacade&&He(ce.buildingWithoutFacade,ge),Ee!==ge&&l.uploadCommonUniforms(A,Ee,W.toUnwrapped(),null,J),ce.buildingWithFacade&&He(ce.buildingWithFacade,Ee)}}function wD(y){return[y[0]*o.ee,y[1]*o.ee,y[2]*o.ee,0]}function ID(y,l,p,_,x,S,A,N,V){let $=_.getSource(),Y=p.globeSharedBuffers;if(!Y)return;let J,W,oe;if(l&&(J=_.getTile(l)),$ instanceof o.aS?(W=$.texture,oe=o.dG(0,0,p.transform)):J&&l&&(W=J.texture,oe=o.dG(l.canonical.z,l.canonical.x,p.transform)),!W||!oe)return;y||(oe=o.cR(o.bC(),oe,[1,-1,1]));let ce=p.context,de=ce.gl,Ee=x.paint.get("raster-resampling")==="nearest"?de.NEAREST:de.LINEAR,ge=p.colorModeForDrapableLayerRenderPass(S),Oe=A.defines;Oe.push("GLOBE_POLES");let Be=new Rn(de.LEQUAL,Rn.ReadWrite,p.depthRangeFor3D),He=Float32Array.from(p.transform.expandedFarZProjMatrix),nt=Float32Array.from(o.bk(o.dF(new o.cC(0,0,0))));p.terrain&&p.terrain.prepareDrawTile(),ce.activeTexture.set(de.TEXTURE0),W.bind(Ee,de.CLAMP_TO_EDGE),ce.activeTexture.set(de.TEXTURE1),W.bind(Ee,de.CLAMP_TO_EDGE),"useMipmap"in W&&ce.extTextureFilterAnisotropic&&p.transform.pitch>20&&de.texParameterf(de.TEXTURE_2D,ce.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ce.extTextureFilterAnisotropicMax);let[et,at,tt,Xe]=l?Y.getPoleBuffers(l.canonical.z,!1):Y.getPoleBuffers(0,!0),it=x.paint.get("raster-elevation"),Wt;y?(Wt=et,p.renderDefaultNorthPole=it!==0):(Wt=at,p.renderDefaultSouthPole=it!==0);let Nt=wD(A.mix),mi=((ci,cn,qt,Dt,Si,Jt,Gi,sn,Mn,en,Zi,or,er)=>vg(ci,cn,qt,new Float32Array(16),new Float32Array(9),[0,0],Dt,[0,0],[0,0,0,0],1,{opacity:1,mix:0},Jt,[0,0],sn,2,en,Zi,or,1,0,er))(He,nt,oe,o.aj(p.transform.zoom),0,x,0,it,0,Nt,A.offset,A.range,S),jt=p.getOrCreateProgram("raster",{defines:Oe});p.uploadCommonUniforms(ce,jt,null),jt.draw(p,de.TRIANGLES,Be,V,ge,N,mi,x.id,Wt,tt,Xe)}function m3(y){let l=y._nearZ,p=y.projection.farthestPixelDistance(y),_=p-l,x=.2*y.height,S=l+x;return[l,p,(S-x-l)/_,(S-l)/_]}function TD(y,l,p,_){if(y)return l instanceof S0&&y instanceof H1?l.getTextureDescriptor(y,p,!0):{texture:y.texture,mix:wD(_.mix),offset:_.offset,buffer:0,tileSize:1}}var EH=o.ef([{name:"a_index",type:"Int16",components:1}]);class pR{constructor(l,p,_,x){let S={width:_[0],height:_[1],data:null},A=l.gl;this.targetColorTexture=new o.T(l,S,A.RGBA8,{useMipmap:!1}),this.backgroundColorTexture=new o.T(l,S,A.RGBA8,{useMipmap:!1}),this.context=l,this.updateParticleTexture(p,x),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 _=this.context.gl,x=p.width*p.height;this.particleTexture0=new o.T(this.context,p,_.RGBA8,{premultiply:!1,useMipmap:!1}),this.particleTexture1=new o.T(this.context,p,_.RGBA8,{premultiply:!1,useMipmap:!1});let S=new o.eg;S.reserve(x);for(let A=0;A0){let Nt=o.bj(p.canonical,V),mi=o.ei(Nt);W=o.aB(new Float32Array(16),V.globeMatrix,mi),o.aB(W,V.projMatrix,W)}let oe=o.bC();oe[12]+=2*x/(o.o.devicePixelRatio*V.width),oe[13]+=2*S/(o.o.devicePixelRatio*V.height),o.aB(W,oe,W);let ce=y.getOrCreateProgram("debug",{defines:J}),de=l.getTileByID(p.key);y.terrain&&y.terrain.setupElevationDraw(de,ce);let Ee=Rn.disabled,ge=Nr.disabled,Oe=y.colorModeForRenderPass(),Be="$debug";N.activeTexture.set($.TEXTURE0),y.emptyTexture.bind($.LINEAR,$.CLAMP_TO_EDGE),Y?de._makeGlobeTileDebugBuffers(y.context,V):de._makeDebugTileBoundsBuffers(y.context,V.projection);let He=de._tileDebugBuffer||y.debugBuffer,nt=de._tileDebugIndexBuffer||y.debugIndexBuffer,et=de._tileDebugSegments||y.debugSegments;if(ce.draw(y,$.LINE_STRIP,Ee,ge,Oe,jr.disabled,ZC(W,_.toPremultipliedRenderColor(null)),Be,He,nt,et,null,null,null,[de._globeTileDebugBorderBuffer]),A){let Nt=de.latestRawTileData,mi=Math.floor((Nt&&Nt.byteLength||0)/1024),jt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(jt+=` => ${p.overscaledZ}`),jt+=` ${de.state}`,jt+=` ${mi}kb`,(function(ci,cn){ci.initDebugOverlayCanvas();let qt=ci.debugOverlayCanvas,Dt=ci.context.gl,Si=ci.debugOverlayCanvas.getContext("2d");Si.clearRect(0,0,qt.width,qt.height),Si.shadowColor="white",Si.shadowBlur=2,Si.lineWidth=1.5,Si.strokeStyle="white",Si.textBaseline="top",Si.font="bold 36px Open Sans, sans-serif",Si.fillText(cn,5,5),Si.strokeText(cn,5,5),ci.debugOverlayTexture.update(qt),ci.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)})(y,jt)}let at=l.getTile(p).tileSize,tt=512/Math.min(at,512)*(p.overscaledZ/V.zoom)*.5,Xe=de._tileDebugTextBuffer||y.debugBuffer,it=de._tileDebugTextIndexBuffer||y.quadTriangleIndexBuffer,Wt=de._tileDebugTextSegments||y.debugSegments;ce.draw(y,$.TRIANGLES,Ee,ge,po.alphaBlended,jr.disabled,ZC(W,o.ao.transparent.toPremultipliedRenderColor(null),tt),Be,Xe,it,Wt,null,null,null,[de._globeTileDebugTextBuffer])}function R0(y,l,p,_){yb(y,0,l+p/2,y.transform.width,p,_)}function Fs(y,l,p,_){yb(y,l-p/2,0,p,y.transform.height,_)}function yb(y,l,p,_,x,S){let A=y.context,N=A.gl;N.enable(N.SCISSOR_TEST),N.scissor(l*o.o.devicePixelRatio,p*o.o.devicePixelRatio,_*o.o.devicePixelRatio,x*o.o.devicePixelRatio),A.clear({color:S}),N.disable(N.SCISSOR_TEST)}let rT=o.ef([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:f3}=rT;function x_(y,l,p,_){y.emplaceBack(l,p,_)}class Es{constructor(l){this.vertexArray=new o.ej,this.indices=new o.b1,x_(this.vertexArray,-1,-1,1),x_(this.vertexArray,1,-1,1),x_(this.vertexArray,-1,1,1),x_(this.vertexArray,1,1,1),x_(this.vertexArray,-1,-1,-1),x_(this.vertexArray,1,-1,-1),x_(this.vertexArray,-1,1,-1),x_(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,f3),this.indexBuffer=l.createIndexBuffer(this.indices),this.segment=o.bg.simpleSegment(0,0,36,12)}}function tx(y,l,p,_,x,S){let A=y.context.gl,N=l.paint.get("sky-atmosphere-color"),V=l.paint.get("sky-atmosphere-halo-color"),$=l.paint.get("sky-atmosphere-sun-intensity"),Y=((J,W,oe,ce,de)=>({u_matrix_3f:J,u_sun_direction:W,u_sun_intensity:oe,u_color_tint_r:[ce.r,ce.g,ce.b,ce.a],u_color_tint_m:[de.r,de.g,de.b,de.a],u_luminance:5e-5}))(o.el(o.dL(),_),x,$,N.toPremultipliedRenderColor(null),V.toPremultipliedRenderColor(null));A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+S,l.skyboxTexture,0),p.draw(y,A.TRIANGLES,Rn.disabled,Nr.disabled,po.unblended,jr.frontCW,Y,"skyboxCapture",l.skyboxGeometry.vertexBuffer,l.skyboxGeometry.indexBuffer,l.skyboxGeometry.segment)}let ix=o.ef([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class S_{constructor(l){let p=new o.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 _=new o.b1;_.emplaceBack(0,1,2),_.emplaceBack(2,3,0),this.vertexBuffer=l.createVertexBuffer(p,ix.members),this.indexBuffer=l.createIndexBuffer(_),this.segments=o.bg.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}let on=o.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 hS{constructor(l){this.colorModeAlphaBlendedWriteRGB=new po([1,jc,1,jc],o.ao.transparent,[!0,!0,!0,!1]),this.colorModeWriteAlpha=new po([1,0,1,0],o.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 S_(p);let _=this.params.sizeRange,x=this.params.intensityRange,S=(function(Y){let J=o.eo(30),W=[];for(let oe=0;oe{let tt=S.projection.name==="globe"?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"];at&&tt.push("ALPHA_PASS");let Xe=l.getOrCreateProgram("globeAtmosphere",{defines:tt}),it=((Nt,mi,jt,ci,cn,qt,Dt,Si,Jt,Gi,sn,Mn)=>({u_frustum_tl:Nt,u_frustum_tr:mi,u_frustum_br:jt,u_frustum_bl:ci,u_horizon:cn,u_transition:qt,u_fadeout_range:Dt,u_atmosphere_fog_color:Si.toArray01(),u_high_color:Jt.toArray01(),u_space_color:Gi.toArray01(),u_temporal_offset:sn,u_horizon_angle:Mn}))(S.frustumCorners.TL,S.frustumCorners.TR,S.frustumCorners.BR,S.frustumCorners.BL,S.frustumCorners.horizon,N,Ee,Y,W,ce,Oe,nt);l.uploadCommonUniforms(_,Xe);let Wt=this.atmosphereBuffer;Wt&&Xe.draw(l,x.TRIANGLES,A,Nr.disabled,at?this.colorModeWriteAlpha:this.colorModeAlphaBlendedWriteRGB,jr.backCW,it,at?"atmosphere_glow_alpha":"atmosphere_glow",Wt.vertexBuffer,Wt.indexBuffer,Wt.segments)};et(!1),et(!0)}drawStars(l,p){let _=o.aA(p.properties.get("star-intensity"),0,1);if(_===0)return;let x=l.context,S=x.gl,A=l.transform,N=l.getOrCreateProgram("stars"),V=o.c6([]);o.c8(V,V,-A._pitch),o.c7(V,V,-A.angle),o.c8(V,V,o.an(A._center.lat)),o.eq(V,V,-o.an(A._center.lng));let $=o.cb(new Float32Array(16),V),Y=o.aB([],A.starsProjMatrix,$),J=o.el([],$),W=o.er([],J),oe=[0,1,0];o.dN(oe,oe,W),o.c4(oe,oe,this.params.sizeMultiplier);let ce=[1,0,0];o.dN(ce,ce,W),o.c4(ce,ce,this.params.sizeMultiplier);let de=(Ee=oe,ge=ce,Oe=_,{u_matrix:Float32Array.from(Y),u_up:Ee,u_right:ge,u_intensity_multiplier:Oe});var Ee,ge,Oe;l.uploadCommonUniforms(x,N),this.starsVx&&this.starsIdx&&N.draw(l,S.TRIANGLES,Rn.disabled,Nr.disabled,this.colorModeAlphaBlendedWriteRGB,jr.disabled,de,"atmosphere_stars",this.starsVx,this.starsIdx,this.starsSegments)}}class bs{constructor(){this.visibleTiles=[]}updateBorders(l,p){let _=[],x=[],S=l._getRenderableCoordinates(!1,!0);for(let V of S){let $=l.getTile(V);if(!$.hasData())continue;let Y=$.getBucket(p);Y&&(Y.isEmpty()||(_.push(V.key),x.push({bucket:Y,tileID:V.canonical})))}let A=_.length!==this.visibleTiles.length;if(!A){_.sort();for(let V=0;V<_.length;V++)if(_[V]!==this.visibleTiles[V]){A=!0;break}}if(!A)return;let N=new Set;this.visibleTiles=_,x.sort((V,$)=>V.tileID.z-$.tileID.z||V.tileID.x-$.tileID.x||V.tileID.y-$.tileID.y);for(let V of x){let $=new Array,Y=new Array,J=V.bucket;for(let W of J.featuresOnBorder)N.has(W.featureId)?Y.push(W.footprintIndex):(N.add(W.featureId),$.push(W.footprintIndex));J.updateFootprintHiddenFlags($,o.es,!1),J.updateFootprintHiddenFlags(Y,o.es,!0)}}}function zt(y,l){let p=[...y],_=l.cameraWorldSizeForFog/l.worldSize,x=o.bA([]);return o.cR(x,x,[_,_,1]),o.aB(p,x,p),o.aB(p,l.worldToFogMatrix,p),p}function nx(y,l,p,_,x){let S=p.material,A=_.context,{baseColorTexture:N,metallicRoughnessTexture:V}=S.pbrMetallicRoughness,{normalTexture:$,occlusionTexture:Y,emissionTexture:J}=S;function W(ce,de,Ee){if(ce&&(y.push(de),A.activeTexture.set(A.gl.TEXTURE0+Ee),ce.gfxTexture)){let{minFilter:ge,magFilter:Oe,wrapS:Be,wrapT:He}=ce.sampler;ce.gfxTexture.bindExtraParam(ge,Oe,Be,He)}}W(N,"HAS_TEXTURE_u_baseColorTexture",Fc.BaseColor),W(V,"HAS_TEXTURE_u_metallicRoughnessTexture",Fc.MetallicRoughness),W($,"HAS_TEXTURE_u_normalTexture",Fc.Normal),W(Y,"HAS_TEXTURE_u_occlusionTexture",Fc.Occlusion),W(J,"HAS_TEXTURE_u_emissionTexture",Fc.Emission),x&&(x.texture||(x.texture=new o.dY(_.context,x.image,[x.image.height,x.image.height,x.image.height],A.gl.RGBA8)),A.activeTexture.set(A.gl.TEXTURE0+Fc.LUT),x.texture&&x.texture.bind(A.gl.LINEAR,A.gl.CLAMP_TO_EDGE),y.push("APPLY_LUT_ON_GPU")),p.texcoordBuffer&&(y.push("HAS_ATTRIBUTE_a_uv_2f"),l.push(p.texcoordBuffer)),p.colorBuffer&&(y.push(p.colorBuffer.itemSize===12?"HAS_ATTRIBUTE_a_color_3f":"HAS_ATTRIBUTE_a_color_4f"),l.push(p.colorBuffer)),p.normalBuffer&&(y.push("HAS_ATTRIBUTE_a_normal_3f"),l.push(p.normalBuffer)),p.pbrBuffer&&(y.push("HAS_ATTRIBUTE_a_pbr"),y.push("HAS_ATTRIBUTE_a_heightBasedEmissiveStrength"),l.push(p.pbrBuffer)),S.alphaMode!=="OPAQUE"&&S.alphaMode!=="MASK"||y.push("UNPREMULT_TEXTURE_IN_SHADER"),S.defined||y.push("DIFFUSE_SHADED");let oe=_.shadowRenderer;oe&&(y.push("RENDER_SHADOWS","DEPTH_TEXTURE"),oe.useNormalOffset&&y.push("NORMAL_OFFSET"))}function Yy(y,l,p,_,x,S){let A=p.paint.get("model-opacity").constantOr(1),N=l.context,V=new Rn(l.context.gl.LEQUAL,Rn.ReadWrite,l.depthRangeFor3D),$=l.transform,Y=y.mesh,J=Y.material,W=J.pbrMetallicRoughness,oe=l.style.fog,ce;ce=l.transform.projection.zAxisUnit==="pixels"?[...y.nodeModelMatrix]:o.aB([],_.zScaleMatrix,y.nodeModelMatrix),o.aB(ce,_.negCameraPosMatrix,ce);let de=o.bl([],ce);o.ed(de,de);let Ee=p.paint.get("model-color-use-theme").constantOr("default")==="none",ge=p.paint.get("model-emissive-strength").constantOr(0),Oe=JC(new Float32Array(y.worldViewProjection),new Float32Array(ce),new Float32Array(de),null,l,A,W.baseColorFactor,J.emissiveFactor,W.metallicFactor,W.roughnessFactor,J,ge,p),Be={defines:[]},He=[],nt=l.shadowRenderer;nt&&(nt.useNormalOffset=!1),nx(Be.defines,He,Y,l,Ee?null:p.lut);let et=null;if(oe){let Xe=zt(y.nodeModelMatrix,l.transform);if(et=new Float32Array(Xe),$.projection.name!=="globe"){let it=Y.aabb.min,Wt=Y.aabb.max,[Nt,mi]=oe.getOpacityForBounds(Xe,it[0],it[1],Wt[0],Wt[1]);Be.overrideFog=Nt>=Jn||mi>=Jn}}let at=db(l,p.paint.get("model-cutoff-fade-range"));at.shouldRenderCutoff&&Be.defines.push("RENDER_CUTOFF");let tt=l.getOrCreateProgram("model",Be);l.uploadCommonUniforms(N,tt,null,et,at),l.renderPass!=="shadow"&&nt&&nt.setupShadowsFromMatrix(y.nodeModelMatrix,tt),tt.draw(l,N.gl.TRIANGLES,V,x,S,Y.material.doubleSided?jr.disabled:jr.backCCW,Oe,p.id,Y.vertexBuffer,Y.indexBuffer,Y.segments,p.paint,l.transform.zoom,void 0,He)}function oT(y,l,p,_,x,S,A){let N;N=y.projection.name==="globe"?o.eu(p,y):[...p],o.aB(N,N,l.matrix);let V=o.aB([],_,N);if(l.meshes)for(let $ of l.meshes){if($.material.alphaMode!=="BLEND"){A.push({mesh:$,depth:0,modelIndex:x,worldViewProjection:V,nodeModelMatrix:N});continue}let Y=o.af([],$.centroid,V);!y.isOrthographic&&Y[2]<=0||S.push({mesh:$,depth:Y[2],modelIndex:x,worldViewProjection:V,nodeModelMatrix:N})}if(l.children)for(let $ of l.children)oT(y,$,p,_,x,S,A)}function fS(y,l,p,_){let x=p.shadowRenderer;if(!x)return;let S=x.getShadowPassDepthMode(),A=x.getShadowPassColorMode(),N=x.calculateShadowPassMatrixFromMatrix(l),V=pS(N);p.getOrCreateProgram("modelDepth",{defines:p._shadowMapDebug?[]:["DEPTH_TEXTURE"]}).draw(p,p.context.gl.TRIANGLES,S,Nr.disabled,A,jr.backCCW,V,_.id,y.vertexBuffer,y.indexBuffer,y.segments,_.paint,p.transform.zoom,void 0,void 0)}function Ph(y,l,p){let _=l.updateZoomBasedPaintProperties(),x=(function(S,A,N){let V,$,Y,J=S.terrain?S.terrain.exaggeration():0;if(S.terrain&&J>0){let W=S.terrain,oe=W.findDEMTileFor(N);oe&&oe.dem?V=o.ew.create(W,N,oe):J=0}if(J===0&&(A.terrainElevationMin=0,A.terrainElevationMax=0),J===A.validForExaggeration&&(J===0||V&&V._demTile&&V._demTile.tileID===A.validForDEMTile.id&&V._dem._timestamp===A.validForDEMTile.timestamp))return!1;for(let W in A.instancesPerModel){let oe=A.instancesPerModel[W];for(let ce=0;ce$&&($=oe.max)}let Y=o.aA(_.x,S,A)-_.x,J=o.aA(_.y,N,V)-_.y,W=o.ce($,l.center.lat)-_.z;return l._zoomFromMercatorZ(Math.sqrt(Y*Y+J*J+W*W))}function mR(y,l,p,_,x,S,A){let N=y.context,V=y.renderPass==="shadow",$=y.shadowRenderer,Y=V&&$?$.getShadowPassDepthMode():new Rn(N.gl.LEQUAL,Rn.ReadWrite,y.depthRangeFor3D),J=y.isTileAffectedByFog(S);if(p.meshes)for(let W of p.meshes){let oe=["MODEL_POSITION_ON_GPU"],ce=[],de,Ee,ge;_.instancedDataArray.length>20&&oe.push("INSTANCED_ARRAYS");let Oe=db(y,l.paint.get("model-cutoff-fade-range"));if(Oe.shouldRenderCutoff&&oe.push("RENDER_CUTOFF"),V&&$)de=y.getOrCreateProgram("modelDepth",{defines:oe}),Ee=pS(A.shadowTileMatrix,A.shadowTileMatrix,Float32Array.from(p.matrix)),ge=$.getShadowPassColorMode();else{nx(oe,ce,W,y,l.paint.get("model-color-use-theme").constantOr("default")==="none"?null:l.lut),de=y.getOrCreateProgram("model",{defines:oe,overrideFog:J});let He=W.material,nt=He.pbrMetallicRoughness,et=l.paint.get("model-opacity").constantOr(1),at=l.paint.get("model-emissive-strength").constantOr(0);Ee=JC(S.expandedProjMatrix,Float32Array.from(p.matrix),new Float32Array(16),null,y,et,nt.baseColorFactor,He.emissiveFactor,nt.metallicFactor,nt.roughnessFactor,He,at,l,x),$&&(A.shadowUniformsInitialized?de.setShadowUniformValues(N,$.getShadowUniformValues()):($.setupShadows(S.toUnwrapped(),de,"model-tile"),A.shadowUniformsInitialized=!0)),ge=Oe.shouldRenderCutoff||et<1||He.alphaMode!=="OPAQUE"?po.alphaBlended:po.unblended}y.uploadCommonUniforms(N,de,S.toUnwrapped(),null,Oe);let Be=W.material.doubleSided?jr.disabled:jr.backCCW;if(_.instancedDataArray.length>20)ce.push(_.instancedDataBuffer),de.draw(y,N.gl.TRIANGLES,Y,Nr.disabled,ge,Be,Ee,l.id,W.vertexBuffer,W.indexBuffer,W.segments,l.paint,y.transform.zoom,void 0,ce,_.instancedDataArray.length);else{let He=V?"u_instance":"u_normal_matrix";for(let nt=0;nt<_.instancedDataArray.length;++nt)Ee[He]=new Float32Array(_.instancedDataArray.arrayBuffer,64*nt,16),de.draw(y,N.gl.TRIANGLES,Y,Nr.disabled,ge,Be,Ee,l.id,W.vertexBuffer,W.indexBuffer,W.segments,l.paint,y.transform.zoom,void 0,ce)}}if(p.children)for(let W of p.children)mR(y,l,W,_,x,S,A)}let MD=[1,-1,1];function hR(y,l,p,_){if(!p.modelManager)return!0;let x=p.modelManager;if(!p.shadowRenderer)return!0;let S=p.shadowRenderer,A=l.aabb,N=!0,V=y.maxHeight;if(V===0){let Y=0;for(let J in y.instancesPerModel){let W=x.getModel(J,_);W?Y=Math.max(Y,Math.max(Math.max(W.aabb.max[0],W.aabb.max[1]),W.aabb.max[2])):N=!1}V=y.maxScale*Y*1.41+y.maxVerticalOffset,N&&(y.maxHeight=V)}A.max[2]=V,A.min[2]+=y.terrainElevationMin,A.max[2]+=y.terrainElevationMax,o.af(A.min,A.min,l.tileMatrix),o.af(A.max,A.max,l.tileMatrix);let $=A.intersects(S.getCurrentCascadeFrustum());return p.currentShadowCascade===0&&(y.isInsideFirstShadowMapFrustum=$===2),$===0}function gS(y,l){let p=y.uniformValues.u_cutoff_params[0],_=y.uniformValues.u_cutoff_params[1],x=y.uniformValues.u_cutoff_params[2],S=y.uniformValues.u_cutoff_params[3];return _===p||S===x?1:o.aA(((l-p)/(_-p)-x)/(S-x),0,1)}function OD(y,l,p,_){if(l.pitch<20)return 1;let x=l.getWorldToCameraMatrix();o.aB(x,x,y);let S=o.bU(p.min[0],p.min[1],p.min[2],1),A=o.aC(o.ex(),S,x),N=A,V=A;S[1]=p.max[1],A=o.aC(o.ex(),S,x),N=A[1]V[1]?A:V,S[0]=p.max[0],A=o.aC(o.ex(),S,x),N=A[1]V[1]?A:V,S[1]=p.min[1],A=o.aC(o.ex(),S,x),N=A[1]V[1]?A:V;let $=o.aA(_[0],0,1),Y=100*l.pixelsPerMeter*o.aA(_[1],0,1),J=o.aA(_[2],0,1),W=o.ey(o.ex(),N,V,$),oe=Math.tan(.5*l.fovX),ce=-W[2]*oe;if(Y===0)return W[1]<-Math.abs(ce)?J:1;let de=(-Math.abs(ce)-W[1])/Y,Ee=(Oe,Be,He)=>(1-He)*Oe+He*Be,ge=o.aA(Ee(1,J,de),J,1);return Ee(1,ge,o.aA((l.pitch-20)/20,0,1))}class RD{}class PD{constructor(){this._storage=new Map}getLinesFromTrianglesBuffer(l,p,_){{let J=this._storage.get(p.id);if(J)return J.lastUsedFrameIdx=l,J.buf}let x=_.gl,S=x.getBufferParameter(x.ELEMENT_ARRAY_BUFFER,x.BUFFER_SIZE),A=new ArrayBuffer(S),N=new Int16Array(A);x.getBufferSubData(x.ELEMENT_ARRAY_BUFFER,0,new Int16Array(A));let V=new o.eA;for(let J=0;J30&&(_.buf.destroy(),this._storage.delete(p))}destroy(){for(let[l,p]of this._storage)p.buf.destroy(),this._storage.delete(l)}}class w_{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 aT=o.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_rainParticleData",components:4}]);class Df{registerParameter(){}registerButton(){}registerBinding(){}refreshUI(){}}class ND{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 fR=o.ef([{type:"Float32",name:"a_pos_2f",components:2}]);class gR{destroy(){this.vignetteVx&&this.vignetteVx.destroy(),this.vignetteIdx&&this.vignetteIdx.destroy()}draw(l,p){let _=l.getOrCreateProgram("vignette");if(!this.vignetteVx||!this.vignetteIdx){let A=new o.eB,N=new o.b1;A.emplaceBack(-1,-1),A.emplaceBack(1,-1),A.emplaceBack(1,1),A.emplaceBack(-1,1),N.emplaceBack(0,1,2),N.emplaceBack(0,2,3),this.vignetteVx=l.context.createVertexBuffer(A,fR.members),this.vignetteIdx=l.context.createIndexBuffer(N)}let x=o.bg.simpleSegment(0,0,4,6);if(this.vignetteVx&&this.vignetteIdx){l.uploadCommonUniforms(l.context,_);let A={u_vignetteShape:(S={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:S.vignetteColor};_.draw(l,l.context.gl.TRIANGLES,Rn.disabled,Nr.disabled,po.alphaBlended,jr.disabled,A,"vignette",this.vignetteVx,this.vignetteIdx,x)}var S}}class g3{constructor(){this._accumulatedOffsetX=0,this._accumulatedOffsetY=0,this._accumulatedElevation=0}update(l,p){let _=l.getFreeCameraOptions().position,x=_.toAltitude(),S=_.toLngLat(),A=o.an(S.lng),N=o.an(S.lat),V=l.pixelsPerMeter/p,$=A*o.eD,Y=o.eD*Math.log(Math.tan(Math.PI/4+N/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+Y,W=-this._elevationPrev+x;this._accumulatedOffsetX+=(-this._offsetXPrev+$)*V,this._accumulatedOffsetY+=J*V,this._accumulatedElevation+=W*V,this._offsetXPrev=$,this._offsetYPrev=Y,this._elevationPrev=x}}getPosition(){return[this._accumulatedOffsetX,this._accumulatedOffsetY,this._accumulatedElevation]}}function _3(y,l){return[-(y[0]-Math.floor(y[0]/l)*l),-(y[1]-Math.floor(y[1]/l)*l),-(y[2]-Math.floor(y[2]/l)*l)]}function Fp(y){let l=o.eo(1323123451230),p=[];for(let _=0;__)return;let x=Ky(0,1,p.revealStart,p.revealStart+p.revealRange,_);if(!this.particlesVx||!this.particlesIdx)return;let S=structuredClone(this._params),A=[-S.direction.x,S.direction.y,-100];o.aw(A,A);let N=structuredClone(this._vignetteParams);N.strength*=x,S.overrideStyleParameters||(S.intensity=l.style.rain.state.density,S.timeFactor=l.style.rain.state.intensity,S.color=structuredClone(l.style.rain.state.color),A=structuredClone(l.style.rain.state.direction),S.screenThinning.intensity=l.style.rain.state.centerThinning,S.dropletSizeX=l.style.rain.state.dropletSize[0],S.dropletSizeYScale=l.style.rain.state.dropletSize[1]/l.style.rain.state.dropletSize[0],S.distortionStrength=100*l.style.rain.state.distortionStrength,N.strength=1,N.color=structuredClone(l.style.rain.state.vignetteColor));let V=this.updateOnRender(l,S.timeFactor),$=l.context,Y=$.gl,J=l.transform;this.screenTexture&&this.screenTexture.size[0]===l.width&&this.screenTexture.size[1]===l.height||(this.screenTexture=new o.T($,{width:l.width,height:l.height,data:null},Y.RGBA8)),S.distortionStrength>0&&($.activeTexture.set(Y.TEXTURE0),this.screenTexture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE),Y.copyTexSubImage2D(Y.TEXTURE_2D,0,0,0,0,0,l.width,l.height));let W=l.getOrCreateProgram("rainParticle");l.uploadCommonUniforms($,W),$.activeTexture.set(Y.TEXTURE0),this.screenTexture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE);let oe=[S.color.r,S.color.g,S.color.b,S.color.a],ce=(de,Ee)=>{let ge=_3(this._movement.getPosition(),de),Oe=S.dropletSizeX,Be=S.dropletSizeX*S.dropletSizeYScale,He=l.width/2,nt=l.height/2,et=Ky(0,S.screenThinning.start,0,1,S.screenThinning.intensity),at=Ky(.001,S.screenThinning.range,0,1,S.screenThinning.intensity),tt=Ky(0,S.screenThinning.particleOffset,0,1,S.screenThinning.intensity),Xe=(it={modelview:V.modelviewMatrix,projection:V.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:ge,velocityConeAperture:S.velocityConeAperture,velocity:S.velocity,boxSize:de,rainDropletSize:[Oe,Be],distortionStrength:S.distortionStrength,rainDirection:A,color:oe,screenSize:[J.width,J.height],thinningCenterPos:[He,nt],thinningShape:[et,at,Math.pow(10,S.screenThinning.fadePower)],thinningAffectedRatio:S.screenThinning.affectedRatio,thinningParticleOffset:tt,shapeDirectionalPower:S.shapeDirPower,shapeNormalPower:S.shapeNormalPower,mode:Ee?0:1},{u_modelview:Float32Array.from(it.modelview),u_projection:Float32Array.from(it.projection),u_time:it.time,u_cam_pos:it.camPos,u_texScreen:0,u_velocityConeAperture:it.velocityConeAperture,u_velocity:it.velocity,u_boxSize:it.boxSize,u_rainDropletSize:it.rainDropletSize,u_distortionStrength:it.distortionStrength,u_rainDirection:it.rainDirection,u_color:it.color,u_screenSize:it.screenSize,u_thinningCenterPos:it.thinningCenterPos,u_thinningShape:it.thinningShape,u_thinningAffectedRatio:it.thinningAffectedRatio,u_thinningParticleOffset:it.thinningParticleOffset,u_shapeDirectionalPower:it.shapeDirectionalPower,u_shapeNormalPower:it.shapeNormalPower,u_mode:it.mode});var it;let Wt=Math.round(S.intensity*this.particlesCount),Nt=o.bg.simpleSegment(0,0,4*Wt,2*Wt);W.draw(l,Y.TRIANGLES,Rn.disabled,Nr.disabled,po.alphaBlended,jr.disabled,Xe,"rain_particles",this.particlesVx,this.particlesIdx,Nt)};S.distortionStrength>0&&ce(S.boxSize,!0),ce(S.boxSize,!1),this._vignette.draw(l,N)}}let ia=o.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 _R extends rx{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 ND(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 _=Fp(this.particlesCount),x=new o.eF,S=new o.b1,A=0,N=o.eo(1323123451230);for(let V=0;V<_.length;++V){let $=_[V],Y=N(),J=N(),W=N(),oe=[V/_.length,Y,J,W],ce=[N(),N()];x.emplaceBack($[0],$[1],$[2],-1,-1,...oe,...ce),x.emplaceBack($[0],$[1],$[2],1,-1,...oe,...ce),x.emplaceBack($[0],$[1],$[2],1,1,...oe,...ce),x.emplaceBack($[0],$[1],$[2],-1,1,...oe,...ce),S.emplaceBack(A+0,A+1,A+2),S.emplaceBack(A+0,A+2,A+3),A+=4}this.particlesVx=p.createVertexBuffer(x,ia.members),this.particlesIdx=p.createIndexBuffer(S)}}draw(l){if(!this._params.overrideStyleParameters&&!l.style.snow)return;let p=structuredClone(this._params),_=[-p.direction.x,p.direction.y,-100];o.aw(_,_);let x=structuredClone(this._vignetteParams),S=p.overrideStyleParameters?this._revealParams:{revealStart:0,revealRange:.01},A=l.transform.zoom;if(S.revealStart>A)return;let N=Ky(0,1,S.revealStart,S.revealStart+S.revealRange,A);x.strength*=N,p.overrideStyleParameters||(p.intensity=l.style.snow.state.density,p.timeFactor=l.style.snow.state.intensity,p.color=structuredClone(l.style.snow.state.color),_=structuredClone(l.style.snow.state.direction),p.screenThinning.intensity=l.style.snow.state.centerThinning,p.billboardSize=2.79*l.style.snow.state.flakeSize,x.strength=1,x.color=structuredClone(l.style.snow.state.vignetteColor));let V=this.updateOnRender(l,p.timeFactor);if(!this.particlesVx||!this.particlesIdx)return;let $=l.context,Y=$.gl,J=l.transform,W=l.getOrCreateProgram("snowParticle");l.uploadCommonUniforms($,W),((oe,ce,de)=>{let Ee=_3(this._movement.getPosition(),oe),ge=J.width/2,Oe=J.height/2,Be=Ky(0,de.screenThinning.start,0,1,de.screenThinning.intensity),He=Ky(.001,de.screenThinning.range,0,1,de.screenThinning.intensity),nt=Ky(0,de.screenThinning.particleOffset,0,1,de.screenThinning.intensity),et=(at={modelview:V.modelviewMatrix,projection:V.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:Ee,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:[ge,Oe],thinningShape:[Be,He,Math.pow(10,de.screenThinning.fadePower)],thinningAffectedRatio:de.screenThinning.affectedRatio,thinningParticleOffset:nt,color:[de.color.r,de.color.g,de.color.b,de.color.a],direction:_},{u_modelview:Float32Array.from(at.modelview),u_projection:Float32Array.from(at.projection),u_time:at.time,u_cam_pos:at.camPos,u_velocityConeAperture:at.velocityConeAperture,u_velocity:at.velocity,u_horizontalOscillationRadius:at.horizontalOscillationRadius,u_horizontalOscillationRate:at.horizontalOscillationRate,u_boxSize:at.boxSize,u_billboardSize:at.billboardSize,u_simpleShapeParameters:at.simpleShapeParameters,u_screenSize:at.screenSize,u_thinningCenterPos:at.thinningCenterPos,u_thinningShape:at.thinningShape,u_thinningAffectedRatio:at.thinningAffectedRatio,u_thinningParticleOffset:at.thinningParticleOffset,u_particleColor:at.color,u_direction:at.direction});var at;let tt=Math.round(de.intensity*this.particlesCount),Xe=o.bg.simpleSegment(0,0,4*tt,2*tt);this.particlesVx&&this.particlesIdx&&W.draw(l,Y.TRIANGLES,Rn.disabled,Nr.disabled,po.alphaBlended,jr.disabled,et,"snow_particles",this.particlesVx,this.particlesIdx,Xe)})(p.boxSize,0,p),this._vignette.draw(l,x)}}let pu={symbol:function(y,l,p,_,x){if(y.renderPass!=="translucent")return;let S=Nr.disabled,A=y.colorModeForRenderPass(),N=p.layout.get("text-variable-anchor"),V=p.layout.get("text-size-scale-range"),$=o.aA(y.scaleFactor,V[0],V[1]);N&&(function(W,oe,ce,de,Ee,ge,Oe,Be){let He=oe.transform,nt=Ee==="map",et=ge==="map";for(let at of W){let tt=de.getTile(at),Xe=tt.getBucket(ce);if(!Xe||!Xe.text||!Xe.text.segments.get().length)continue;let it=o.bK(Xe.textSizeData,He.zoom,Be),Wt=HC(at,Xe.getProjection(),He),Nt=He.calculatePixelsToTileUnitsMatrix(tt),mi=d_(Wt,tt.tileID.canonical,et,nt,He,Xe.getProjection(),Nt),jt=Xe.hasIconTextFit()&&Xe.hasIconData();it&&bD(Xe,nt,et,Oe,He,mi,at,Math.pow(2,He.zoom-tt.tileID.overscaledZ),it,jt)}})(_,y,p,l,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),x,$);let Y=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&&(Y||J)?iT(y,l,p,_,S,A):(Y&&iT(y,l,p,_,S,A,{onlyIcons:!0}),J&&iT(y,l,p,_,S,A,{onlyText:!0})),l.map.showCollisionBoxes&&(b_(y,l,p,_,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),!0),b_(y,l,p,_,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),!1))},circle:function(y,l,p,_){if(y.renderPass!=="translucent")return;let x=p.paint.get("circle-opacity"),S=p.paint.get("circle-stroke-width"),A=p.paint.get("circle-stroke-opacity"),N=p.layout.get("circle-sort-key").constantOr(1)!==void 0,V=p.paint.get("circle-emissive-strength");if(x.constantOr(1)===0&&(S.constantOr(1)===0||A.constantOr(1)===0))return;let $=y.context,Y=$.gl,J=y.transform,W=!(!y.terrain||!y.terrain.enabled),oe=p.layout.get("circle-elevation-reference"),ce=y.depthModeForSublayer(0,Rn.ReadOnly),de=new Rn(y.context.gl.LEQUAL,Rn.ReadOnly,y.depthRangeFor3D),Ee=oe==="none"||W?ce:de,ge=Nr.disabled,Oe=y.colorModeForDrapableLayerRenderPass(V),Be=J.projection.name==="globe",He=[o.aF(J.center.lng),o.aJ(J.center.lat)],nt=[];for(let at=0;at<_.length;at++){let tt=_[at],Xe=l.getTile(tt),it=Xe.getBucket(p);if(!it||it.projection.name!==J.projection.name)continue;let Wt=it.programConfigurations.get(p.id),Nt=it.layoutVertexBuffer,mi=it.globeExtVertexBuffer,jt=it.indexBuffer,ci=o.dZ(p),cn=[mi],qt=y.isTileAffectedByFog(tt);Be&&ci.push("PROJECTION_GLOBE_VIEW"),ci.push("DEPTH_D24"),y.terrain&&J.depthOcclusionForSymbolsAndCircles&&ci.push("DEPTH_OCCLUSION"),it.hasElevation&&!y.terrain&&(ci.push("ELEVATED_ROADS"),cn.push(it.elevatedLayoutVertexBuffer));let Dt=y.getOrCreateProgram("circle",{config:Wt,defines:ci,overrideFog:qt}),Si=J.projection.createInversionMatrix(J,tt.canonical),Jt={programConfiguration:Wt,program:Dt,layoutVertexBuffer:Nt,dynamicBuffers:cn,indexBuffer:jt,uniformValues:o.d_(y,tt,Xe,Si,He,p),tile:Xe};if(N){let Gi=it.segments.get();for(let sn of Gi)nt.push({segments:new o.bg([sn]),sortKey:sn.sortKey,state:Jt})}else nt.push({segments:it.segments,sortKey:0,state:Jt})}N&&nt.sort((at,tt)=>at.sortKey-tt.sortKey);let et={useDepthForOcclusion:J.depthOcclusionForSymbolsAndCircles};for(let at of nt){let{programConfiguration:tt,program:Xe,layoutVertexBuffer:it,dynamicBuffers:Wt,indexBuffer:Nt,uniformValues:mi,tile:jt}=at.state,ci=at.segments;y.terrain&&y.terrain.setupElevationDraw(jt,Xe,et),y.uploadCommonUniforms($,Xe,jt.tileID.toUnwrapped()),Xe.draw(y,Y.TRIANGLES,Ee,ge,Oe,jr.disabled,mi,p.id,it,Nt,ci,p.paint,J.zoom,tt,Wt)}},heatmap:function(y,l,p,_){if(p.paint.get("heatmap-opacity")!==0)if(y.renderPass==="offscreen"){let x=y.context,S=x.gl,A=Nr.disabled,N=new po([S.ONE,S.ONE,S.ONE,S.ONE],o.ao.transparent,[!0,!0,!0,!0]);(function(oe,ce,de,Ee){let ge=oe.gl,Oe=ce.width*Ee,Be=ce.height*Ee;oe.activeTexture.set(ge.TEXTURE1),oe.viewport.set([0,0,Oe,Be]);let He=de.heatmapFbo;if(!He||He&&(He.width!==Oe||He.height!==Be)){He&&He.destroy();let nt=ge.createTexture();ge.bindTexture(ge.TEXTURE_2D,nt),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_WRAP_S,ge.CLAMP_TO_EDGE),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_WRAP_T,ge.CLAMP_TO_EDGE),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_MIN_FILTER,ge.LINEAR),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_MAG_FILTER,ge.LINEAR),He=de.heatmapFbo=oe.createFramebuffer(Oe,Be,!0,null),(function(et,at,tt,Xe,it,Wt){let Nt=et.gl;Nt.texImage2D(Nt.TEXTURE_2D,0,et.extRenderToTextureHalfFloat?Nt.RGBA16F:Nt.RGBA,it,Wt,0,Nt.RGBA,et.extRenderToTextureHalfFloat?Nt.HALF_FLOAT:Nt.UNSIGNED_BYTE,null),Xe.colorAttachment.set(tt)})(oe,0,nt,He,Oe,Be)}else ge.bindTexture(ge.TEXTURE_2D,He.colorAttachment.get()),oe.bindFramebuffer.set(He.framebuffer)})(x,y,p,y.transform.projection.name==="globe"?.5:.25),x.clear({color:o.ao.transparent});let V=y.transform,$=V.projection.name==="globe",Y=$?["PROJECTION_GLOBE_VIEW"]:[],J=$?jr.frontCCW:jr.disabled,W=[o.aF(V.center.lng),o.aJ(V.center.lat)];for(let oe=0;oe<_.length;oe++){let ce=_[oe];if(l.hasRenderableParent(ce))continue;let de=l.getTile(ce),Ee=de.getBucket(p);if(!Ee||Ee.projection.name!==V.projection.name)continue;let ge=y.isTileAffectedByFog(ce),Oe=Ee.programConfigurations.get(p.id),Be=y.getOrCreateProgram("heatmap",{config:Oe,defines:Y,overrideFog:ge}),{zoom:He}=y.transform;y.terrain&&y.terrain.setupElevationDraw(de,Be),y.uploadCommonUniforms(x,Be,ce.toUnwrapped());let nt=V.projection.createInversionMatrix(V,ce.canonical);Be.draw(y,S.TRIANGLES,Rn.disabled,A,N,J,d3(y,ce,de,nt,W,He,p.paint.get("heatmap-intensity")),p.id,Ee.layoutVertexBuffer,Ee.indexBuffer,Ee.segments,p.paint,y.transform.zoom,Oe,$?[Ee.globeExtVertexBuffer]:null)}x.viewport.set([0,0,y.width,y.height])}else y.renderPass==="translucent"&&(y.context.setColorMode(y.colorModeForRenderPass()),(function(x,S){let A=x.context,N=A.gl,V=S.heatmapFbo;if(!V)return;A.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,V.colorAttachment.get()),A.activeTexture.set(N.TEXTURE1);let $=S.colorRampTexture;$||($=S.colorRampTexture=new o.T(A,S.colorRamp,N.RGBA8)),$.bind(N.LINEAR,N.CLAMP_TO_EDGE),x.getOrCreateProgram("heatmapTexture").draw(x,N.TRIANGLES,Rn.disabled,Nr.disabled,x.colorModeForRenderPass(),jr.disabled,((Y,J,W,oe)=>({u_image:0,u_color_ramp:1,u_opacity:J.paint.get("heatmap-opacity")}))(0,S),S.id,x.viewportBuffer,x.quadTriangleIndexBuffer,x.viewportSegments,S.paint,x.transform.zoom)})(y,p))},line:function(y,l,p,_){if(y.renderPass!=="translucent")return;let x=p.paint.get("line-opacity"),S=p.paint.get("line-width");if(x.constantOr(1)===0||S.constantOr(1)===0)return;let A=p.paint.get("line-emissive-strength"),N=p.paint.get("line-occlusion-opacity"),V=p.layout.get("line-elevation-reference"),$=p.layout.get("line-width-unit")==="meters",Y=V==="sea",J=!(!y.terrain||!y.terrain.enabled),W=y.context,oe=W.gl;if(p.hasElevatedBuckets&&y.transform.projection.name==="globe")return;let ce=p.layout.get("line-cross-slope"),de=ce!==void 0,Ee=ce<1,ge=y.colorModeForDrapableLayerRenderPass(A),Oe=y.terrain&&y.terrain.renderingToTexture,Be=Oe?1:o.o.devicePixelRatio,He=p.paint.get("line-dasharray"),nt=He.constantOr(1),et=p.layout.get("line-cap"),at=He.constantOr(null),tt=et.constantOr(null),Xe=p.paint.get("line-pattern"),it=Xe.constantOr(1),Wt=p.paint.get("line-pattern-cross-fade"),Nt=Xe.constantOr(null),mi=p.paint.get("line-opacity").constantOr(1),jt=!it&&mi!==1||y.depthOcclusion&&N>0&&N<1,ci=p.paint.get("line-gradient"),cn=it?"linePattern":"line",qt=o.d$(p),Dt;if(Oe&&y.terrain&&y.terrain.clipOrMaskOverlapStencilType()&&(jt=!1),N!==0&&y.depthOcclusion){let sn=p.paint._values["line-opacity"];sn&&sn.value&&sn.value.kind==="constant"?Dt=sn.value:o.w(`Occlusion opacity for layer ${p.id} is supported only when line-opacity isn't data-driven.`)}S.value.kind!=="constant"&&S.value.isLineProgressConstant===!1&&qt.push("VARIABLE_LINE_WIDTH");let Si=(sn,Mn,en,Zi,or,er)=>{for(let nr of sn){let Wn=l.getTile(nr);if(it&&!Wn.patternsLoaded())continue;let Zr=Wn.getBucket(p);if(!Zr||Zr.elevationType!=="none"&&!or||Zr.elevationType==="none"&&or)continue;y.prepareDrawTile();let go=[...Mn],Co=y.shadowRenderer,ss=Zr.elevationType==="road"&&!!Co&&Co.enabled,ao=[0,0,0];if(ss){let xo=y.style.directionalLight,Lr=y.style.ambientLight;xo&&Lr&&(ao=h_(y.style,xo,Lr)),go.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET")}let Ea=Zr.programConfigurations.get(p.id),Ja=!1;if(Nt&&Wn.imageAtlas){let xo=o.e0.from(Nt),Lr=xo.getPrimary().scaleSelf(Be).toString(),ls=Wn.imageAtlas.patternPositions.get(Lr),Zl=xo.getSecondary(),xl=Zl?Wn.imageAtlas.patternPositions.get(Zl.scaleSelf(Be).toString()):null;Ja=!!ls&&!!xl,ls&&Ea.setConstantPatternPositions(ls,xl)}Wt>0&&(Ja||Ea.getPatternTransitionVertexBuffer("line-pattern"))&&go.push("LINE_PATTERN_TRANSITION");let ml=y.isTileAffectedByFog(nr),_o=y.getOrCreateProgram(cn,{config:Ea,defines:go,overrideFog:ml});if(!it&&at&&tt&&Wn.lineAtlas){let xo=Wn.lineAtlas.getDash(at,tt);xo&&Ea.setConstantPatternPositions(xo)}ss&&Co.setupShadows(Wn.tileID.toUnwrapped(),_o,"vector-tile");let[za,wa]=p.paint.get("line-trim-offset");(tt==="round"||tt==="square")&&za!==wa&&(za===0&&(za-=1),wa===1&&(wa+=1));let Ua=Oe?nr.projMatrix:null,bl=$?1/Zr.tileToMeter/o.ay(Wn,1,y.transform.zoom):1,wc=$?1/Zr.tileToMeter/o.ay(Wn,1,Math.floor(y.transform.zoom)):1,Yd=it?o.e1(y,Wn,p,Ua,Be,bl,wc,[za,wa],ao,Wt):o.e2(y,Wn,p,Ua,Zr.lineClipsArray.length,Be,bl,wc,[za,wa],ao);if(ci){let xo=Zr.gradients[p.id],Lr=xo.texture;if(p.gradientVersion!==xo.version){let ls=256;if(p.stepInterpolant){let Zl=l.getSource().maxzoom,xl=nr.canonical.z===Zl?Math.ceil(1<{Dt!=null&&(Dt.value=mi*N),_o.draw(y,oe.TRIANGLES,en,xo,ge,jr.disabled,Yd,p.id,Zr.layoutVertexBuffer,Zr.indexBuffer,Zr.segments,p.paint,y.transform.zoom,Ea,[Zr.layoutVertexBuffer2,Zr.patternVertexBuffer,Zr.zOffsetVertexBuffer]),Dt!=null&&(Dt.value=mi)};if(jt&&!or){let xo=y.stencilModeForClipping(nr).ref;xo===0&&Oe&&W.clear({stencil:0});let Lr={func:oe.EQUAL,mask:255};Yd.u_alpha_discard_threshold=.8,Cl(new Nr(Lr,xo,255,oe.KEEP,oe.KEEP,oe.INVERT)),Yd.u_alpha_discard_threshold=0,Cl(new Nr(Lr,xo,255,oe.KEEP,oe.KEEP,oe.KEEP))}else Yd.u_alpha_discard_threshold=jt&&or&&er?.8:0,Cl(or?Zi:y.stencilModeForClipping(nr))}},Jt=y.depthModeForSublayer(0,Rn.ReadOnly),Gi=new Rn(y.depthOcclusion?oe.GREATER:oe.LEQUAL,Rn.ReadOnly,y.depthRangeFor3D);if(p.hasNonElevatedBuckets){let sn=!Oe&&y.terrain;N!==0&&sn?o.w(`Occlusion opacity for layer ${p.id} is supported on terrain only if the layer has line-z-offset enabled.`):sn?o.w(`Cannot render non-elevated lines in immediate mode when terrain is enabled. Layer: ${p.id}.`):Si(_,qt,Jt,Nr.disabled,!1,!0)}if(p.hasElevatedBuckets){V==="hd-road-markup"?J||(Jt=Gi,qt.push("ELEVATED_ROADS")):(qt.push("ELEVATED"),Jt=Gi,de&&qt.push(Ee?"CROSS_SLOPE_HORIZONTAL":"CROSS_SLOPE_VERTICAL"),Y&&qt.push("ELEVATION_REFERENCE_SEA"));let sn=jt?y.stencilModeFor3D():Nr.disabled;y.forceTerrainMode=!0,Si(_,qt,Jt,sn,!0,!0),jt&&Si(_,qt,Jt,sn,!0,!1),y.forceTerrainMode=!1}jt&&(y.resetStencilClippingMasks(),Oe&&W.clear({stencil:0})),N===0||y.depthOcclusion||Oe||y.layersWithOcclusionOpacity.push(y.currentLayer)},fill:function(y,l,p,_){let x=p.paint.get("fill-color"),S=p.paint.get("fill-opacity");if(S.constantOr(1)===0)return;let A=p.paint.get("fill-emissive-strength"),N=y.colorModeForDrapableLayerRenderPass(A),V=p.paint.get("fill-pattern"),$=y.opaquePassEnabledForLayer()&&!V.constantOr(1)&&x.constantOr(o.ao.transparent).a===1&&S.constantOr(0)===1?"opaque":"translucent",Y="none";p.layout.get("fill-elevation-reference")!=="none"?Y="road":p.paint.get("fill-z-offset").constantOr(1)!==0&&(Y="offset");let J=!(!y.terrain||!y.terrain.enabled),W={painter:y,sourceCache:l,layer:p,coords:_,colorMode:N,elevationType:Y,terrainEnabled:J,pass:$};if(y.renderPass!=="shadow")if(Y!=="offset"){if(O0(W,!1),Y==="road"){let oe=!J&&y.renderPass==="translucent";oe&&ex(y,l,p,_,"geometry"),O0(W,!0,Nr.disabled),oe&&(function(ce){let{painter:de,sourceCache:Ee,layer:ge,coords:Oe,colorMode:Be}=ce,He=de.context.gl,nt=ce.painter.shadowRenderer,et=!!nt&&nt.enabled,at=new Rn(de.context.gl.LEQUAL,Rn.ReadOnly,de.depthRangeFor3D),tt=[0,0,0];if(et){let it=de.style.directionalLight,Wt=de.style.ambientLight;it&&Wt&&(tt=h_(de.style,it,Wt))}let Xe=it=>{for(let Wt of Oe){let Nt=Ee.getTile(Wt),mi=Nt.getBucket(ge);if(!mi)continue;let jt=mi.elevatedStructures;if(!jt)continue;let ci,cn;if(it?(ci=jt.renderableBridgeSegments,cn=jt.bridgeProgramConfigurations.get(ge.id)):(ci=jt.renderableTunnelSegments,cn=jt.tunnelProgramConfigurations.get(ge.id)),!ci||ci.segments[0].primitiveLength===0)continue;cn.updatePaintBuffers(),de.prepareDrawTile();let qt=de.isTileAffectedByFog(Wt),Dt=[];et&&Dt.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET");let Si=de.getOrCreateProgram("elevatedStructures",{config:cn,overrideFog:qt,defines:Dt}),Jt=de.translatePosMatrix(Wt.projMatrix,Nt,ge.paint.get("fill-translate"),ge.paint.get("fill-translate-anchor"));et&&nt.setupShadows(Nt.tileID.toUnwrapped(),Si,"vector-tile");let Gi=IH(Jt,tt);de.uploadCommonUniforms(de.context,Si,Wt.toUnwrapped()),Si.draw(de,He.TRIANGLES,at,Nr.disabled,Be,jr.backCCW,Gi,ge.id,jt.vertexBuffer,jt.indexBuffer,ci,ge.paint,de.transform.zoom,cn,[jt.vertexBufferNormal])}};Xe(!0),Xe(!1)})(W)}}else O0(W,!1,y.stencilModeFor3D());else y.shadowRenderer&&Y==="road"&&!J&&(function(oe){let{painter:ce,sourceCache:de,layer:Ee,coords:ge}=oe,Oe=ce.context.gl,Be=oe.painter.shadowRenderer;for(let He of ge){let nt=de.getTile(He),et=nt.getBucket(Ee);if(!et)continue;let at=et.elevatedStructures;if(!at||!at.shadowCasterSegments||at.shadowCasterSegments.segments[0].primitiveLength===0)continue;ce.prepareDrawTile();let tt=et.bufferData.programConfigurations.get(Ee.id),Xe=ce.isTileAffectedByFog(He),it=ce.getOrCreateProgram("elevatedStructuresDepth",{config:tt,overrideFog:Xe}),Wt=Be.calculateShadowPassMatrixFromTile(nt.tileID.toUnwrapped());ce.uploadCommonUniforms(ce.context,it,He.toUnwrapped());let Nt={u_matrix:Wt,u_depth_bias:0};it.draw(ce,Oe.TRIANGLES,Be.getShadowPassDepthMode(),Nr.disabled,Be.getShadowPassColorMode(),jr.disabled,Nt,Ee.id,at.vertexBuffer,at.indexBuffer,at.shadowCasterSegments,Ee.paint,ce.transform.zoom,tt)}})(W)},"fill-extrusion":function(y,l,p,_){let x=p.paint.get("fill-extrusion-opacity"),S=y.context,A=S.gl,N=y.terrain,V=N&&N.renderingToTexture;if(x===0)return;let $=y.conflationActive&&y.style.isLayerClipped(p,l.getSource()),Y=y.style.order.indexOf(p.fqid);if($&&(function(J,W,oe,ce,de){for(let Ee of ce){let ge=W.getTile(Ee).getBucket(oe);ge&&(ge.updateReplacement(Ee,J.replacementSource,de),ge.uploadCentroid(J.context))}})(y,l,p,_,Y),N||$)for(let J of _){let W=l.getTile(J).getBucket(p);W&&bg(y.context,l,J,W,p,N,$)}if(y.renderPass==="shadow"&&y.shadowRenderer){let J=y.shadowRenderer;if(N&&x<.65&&p._transitionablePaint._values["fill-extrusion-opacity"].value.expression instanceof o.ad)return;let W=J.getShadowPassDepthMode(),oe=J.getShadowPassColorMode();Ln(y,l,p,_,W,Nr.disabled,oe,$)}else if(y.renderPass==="translucent"){let J=!p.paint.get("fill-extrusion-pattern").constantOr(1),W=p.paint.get("fill-extrusion-color").constantOr(o.ao.white);if(!V&&W.a!==0){let oe=new Rn(y.context.gl.LEQUAL,Rn.ReadWrite,y.depthRangeFor3D);x===1&&J?Ln(y,l,p,_,oe,Nr.disabled,po.unblended,$):(Ln(y,l,p,_,oe,Nr.disabled,po.disabled,$),Ln(y,l,p,_,oe,y.stencilModeFor3D(),y.colorModeForRenderPass(),$),y.resetStencilClippingMasks())}if(y.style.enable3dLights()&&J&&(!N&&y.transform.projection.name!=="globe"||V)){let oe=p.paint.get("fill-extrusion-opacity"),ce=p.paint.get("fill-extrusion-ambient-occlusion-intensity"),de=p.paint.get("fill-extrusion-ambient-occlusion-ground-radius"),Ee=p.paint.get("fill-extrusion-flood-light-intensity"),ge=p.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",Oe=p.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(ge?null:p.lut).toArray01().slice(0,3),Be=ce>0&&de>0,He=Ee>0,nt=(tt,Xe,it)=>(1-it)*tt+it*Xe,et=new dR;et.translate=p.paint.get("fill-extrusion-translate"),et.translateAnchor=p.paint.get("fill-extrusion-translate-anchor"),et.edgeRadius=p.layout.get("fill-extrusion-edge-radius"),et.cutoffFadeRange=p.paint.get("fill-extrusion-cutoff-fade-range");let at=tt=>{let Xe=y.depthModeForSublayer(1,Rn.ReadOnly,A.LEQUAL,!0),it=p.paint.get(tt?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),Wt=nt(.1,3,it),Nt=y._showOverdrawInspector;if(!Nt){let mi=new Nr({func:A.ALWAYS,mask:255},255,255,A.KEEP,A.KEEP,A.REPLACE),jt=new po([A.ONE,A.ONE,A.ONE,A.ONE],o.ao.transparent,[!1,!1,!1,!0],A.MIN);qy(et,y,l,p,_,Xe,mi,jt,jr.disabled,tt,"sdf",oe,ce,de,Ee,Oe,Wt,$,!1)}{let mi=Nt?Nr.disabled:new Nr({func:A.EQUAL,mask:255},255,255,A.KEEP,A.DECR,A.DECR),jt=Nt?y.colorModeForRenderPass():new po([A.ONE_MINUS_DST_ALPHA,A.DST_ALPHA,A.ONE,A.ONE],o.ao.transparent,[!0,!0,!0,!0]);qy(et,y,l,p,_,Xe,mi,jt,jr.disabled,tt,"color",oe,ce,de,Ee,Oe,Wt,$,!1)}};if(V){let tt=(Xe,it,Wt)=>{let Nt=y.depthModeForSublayer(1,Rn.ReadOnly,A.LEQUAL,!1),mi=p.paint.get(Xe?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),jt=nt(.1,3,mi);{let ci=new po([A.ONE,A.ONE,A.ONE,A.ONE],o.ao.transparent,[!1,!1,!1,!0]);qy(et,y,l,p,_,Nt,Nr.disabled,ci,jr.disabled,Xe,"clear",oe,ce,de,Ee,Oe,jt,$,it)}{let ci=new Nr({func:A.ALWAYS,mask:255},255,255,A.KEEP,A.KEEP,A.REPLACE),cn=new po([A.ONE,A.ONE,A.ONE,A.ONE],o.ao.transparent,[!1,!1,!1,!0],A.MIN);qy(et,y,l,p,_,Nt,ci,cn,jr.disabled,Xe,"sdf",oe,ce,de,Ee,Oe,jt,$,it)}{let ci=Xe?A.ZERO:A.ONE_MINUS_DST_ALPHA,cn=new Nr({func:A.EQUAL,mask:255},255,255,A.KEEP,A.DECR,A.DECR),qt=new po([ci,A.DST_ALPHA,A.ONE_MINUS_DST_ALPHA,A.ZERO],o.ao.transparent,[!0,!0,!0,!0]);qy(et,y,l,p,_,Nt,cn,qt,jr.disabled,Xe,"color",oe,ce,de,Ee,Oe,jt,$,it)}{let ci=new po([A.ONE,A.ONE,A.ONE,Xe?A.ZERO:A.ONE],o.ao.transparent,[!1,!1,!1,!0],Xe?A.FUNC_ADD:A.MAX);qy(et,y,l,p,_,Nt,Nr.disabled,ci,jr.disabled,Xe,"clear",oe,ce,de,Ee,Oe,jt,$,it,Wt)}};if(Be||He){let Xe;if(y.prepareDrawTile(),N){let it=N.drapeBufferSize[0],Wt=N.drapeBufferSize[1];Xe=N.framebufferCopyTexture,Xe&&(!Xe||Xe.size[0]===it&&Xe.size[1]===Wt)||(Xe&&Xe.destroy(),Xe=N.framebufferCopyTexture=new o.T(S,new o.q({width:it,height:Wt}),A.RGBA8)),Xe.bind(A.LINEAR,A.CLAMP_TO_EDGE),A.copyTexSubImage2D(A.TEXTURE_2D,0,0,0,0,0,it,Wt)}Be&&tt(!0,!1,Xe),He&&tt(!1,!0,Xe)}}else Be&&at(!0),He&&at(!1),(Be||He)&&y.resetStencilClippingMasks()}}},building:function(y,l,p,_){y.currentLayer0&&S>0,$=!0,Y=p.paint.get("building-vertical-scale");(!y.shadowRenderer||Y<1)&&($=!1);let J=y.conflationActive&&y.style.isLayerClipped(p,l.getSource()),W=y.style.order.indexOf(p.fqid);if((function(oe,ce,de,Ee,ge,Oe){for(let Be of Oe){let He=ce.getTile(Be).getBucket(de);He&&(ge&&He.updateReplacement(Be,oe.replacementSource,Ee),He.uploadUpdatedIndexBuffer(oe.context))}})(y,l,p,W,J,_),(function(oe,ce,de,Ee){for(let ge of Ee){let Oe=ce.getTile(ge).getBucket(de);Oe&&Oe.needsEvaluation()&&Oe.uploadUpdatedColorBuffer(oe.context)}})(y,l,p,_),p.resetLayerRenderingStats(y),y.shadowRenderer&&(y.shadowRenderer.useNormalOffset=!0),y.renderPass==="shadow"&&y.shadowRenderer){let oe=y.shadowRenderer,ce=[],de=oe.getShadowPassDepthMode();SD({painter:y,source:l,layer:p,coords:_,defines:ce,blendMode:oe.getShadowPassColorMode(),depthMode:de,opacity:N,verticalScale:Y,facadeEmissiveChance:0,facadeAOIntensity:0})}else if(y.renderPass==="translucent"){let oe=["HAS_ATTRIBUTE_a_part_color_emissive","LIGHTING_3D_MODE"];$&&(oe=oe.concat("RENDER_SHADOWS","DEPTH_TEXTURE")),y.shadowRenderer&&y.shadowRenderer.useNormalOffset&&(oe=oe.concat("NORMAL_OFFSET"));let ce=p.paint.get("building-facade-emissive-chance"),de=p.paint.get("building-ambient-occlusion-intensity"),Ee=new Rn(y.context.gl.LEQUAL,Rn.ReadWrite,y.depthRangeFor3D);N<1&&SD({painter:y,source:l,layer:p,coords:_,defines:oe,blendMode:po.disabled,depthMode:Ee,opacity:N,verticalScale:Y,facadeEmissiveChance:ce,facadeAOIntensity:de});let ge=y.colorModeForRenderPass();SD({painter:y,source:l,layer:p,coords:_,defines:oe,blendMode:ge,depthMode:Ee,opacity:N,verticalScale:Y,facadeEmissiveChance:ce,facadeAOIntensity:de}),V&&(function(Oe,Be,He,nt,et,at,tt,Xe,it,Wt,Nt,mi,jt){let ci=Oe.context.gl,cn=Oe.depthModeForSublayer(1,Rn.ReadOnly,ci.LEQUAL,!0),qt=.1*(1-(Dt=Nt))+3*Dt;var Dt;let Si=Oe._showOverdrawInspector,Jt=mi,Gi=new dR;Si||qy(Gi,Oe,Be,He,nt,cn,new Nr({func:ci.ALWAYS,mask:255},255,255,ci.KEEP,ci.KEEP,ci.REPLACE),new po([ci.ONE,ci.ONE,ci.ONE,ci.ONE],o.ao.transparent,[!1,!1,!1,!0],ci.MIN),jr.disabled,et,"sdf",at,tt,Xe,0,Wt,qt,Jt,!1);{let sn=Si?Nr.disabled:new Nr({func:ci.EQUAL,mask:255},255,255,ci.KEEP,ci.DECR,ci.DECR),Mn=Si?Oe.colorModeForRenderPass():new po([ci.ONE_MINUS_DST_ALPHA,ci.DST_ALPHA,ci.ONE,ci.ONE],o.ao.transparent,[!0,!0,!0,!0]);qy(Gi,Oe,Be,He,nt,cn,sn,Mn,jr.disabled,et,"color",at,tt,Xe,0,Wt,qt,Jt,!1)}})(y,l,p,_,!0,N,x,S,0,[0,0,0],A,J)}else if(y.renderPass==="light-beam"){let oe=["HAS_ATTRIBUTE_a_part_color_emissive","HAS_ATTRIBUTE_a_bloom_attenuation"],ce=new Rn(y.context.gl.LEQUAL,Rn.ReadOnly,y.depthRangeFor3D);SD({painter:y,source:l,layer:p,coords:_,defines:oe,blendMode:po.alphaBlended,depthMode:ce,opacity:N,verticalScale:Y,facadeEmissiveChance:0,facadeAOIntensity:0})}y.shadowRenderer&&(y.shadowRenderer.useNormalOffset=!1),y.resetStencilClippingMasks()},hillshade:function(y,l,p,_){if(y.renderPass!=="offscreen"&&y.renderPass!=="translucent"||y.style.disableElevatedTerrain)return;let x=y.context,S=y.terrain&&y.terrain.renderingToTexture,[A,N]=y.renderPass!=="translucent"||S?[{},_]:y.stencilConfigForOverlap(_);for(let V of N){let $=l.getTile(V);if($.needsHillshadePrepare&&y.renderPass==="offscreen")gH(y,$,p);else if(y.renderPass==="translucent"){let Y=y.depthModeForSublayer(0,Rn.ReadOnly),J=p.paint.get("hillshade-emissive-strength"),W=y.colorModeForDrapableLayerRenderPass(J),oe=S&&y.terrain?y.terrain.stencilModeForRTTOverlap(V):A[V.overscaledZ];lD(y,V,$,p,Y,oe,W)}}x.viewport.set([0,0,y.width,y.height]),y.resetStencilClippingMasks()},raster:function(y,l,p,_,x,S){if(y.renderPass!=="translucent"||p.paint.get("raster-opacity")===0)return;let A=y.transform.projection.name==="globe",N=p.paint.get("raster-elevation")!==0,V=N&&A;if(y.renderElevatedRasterBackface&&!V)return;let $=y.context,Y=$.gl,J=l.getSource(),W=(function(et,at,tt,Xe){let it=at.paint.get("raster-color"),Wt=et.type==="raster-array",Nt=[],mi=at.paint.get("raster-resampling"),jt=at.paint.get("raster-color-mix"),ci=at.paint.get("raster-color-range"),cn=[jt[0],jt[1],jt[2],0],qt=jt[3],Dt=mi==="nearest"?Xe.NEAREST:Xe.LINEAR;if(Wt&&(Nt.push("RASTER_ARRAY"),it||Nt.push("RASTER_COLOR"),mi==="linear"&&Nt.push("RASTER_ARRAY_LINEAR"),Dt=Xe.NEAREST,!ci&&et.rasterLayers)){let Si=et.rasterLayers.find(({id:Jt})=>Jt===at.sourceLayer);Si&&Si.fields&&Si.fields.range&&(ci=Si.fields.range)}if(ci=ci||[0,1],it){Nt.push("RASTER_COLOR"),tt.activeTexture.set(Xe.TEXTURE2),at.updateColorRamp(ci);let Si=at.colorRampTexture;Si||(Si=at.colorRampTexture=new o.T(tt,at.colorRamp,Xe.RGBA8)),Si.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}return{mix:cn,range:ci,offset:qt,defines:Nt,resampling:Dt}})(J,p,$,Y);if(J instanceof o.aS&&!_.length&&!A)return;let oe=p.paint.get("raster-emissive-strength"),ce=y.colorModeForDrapableLayerRenderPass(oe),de=y.terrain&&y.terrain.renderingToTexture,Ee=!y.options.moving,ge=p.paint.get("raster-resampling")==="nearest"?Y.NEAREST:Y.LINEAR;if(J instanceof o.aS&&!_.length&&(J.onNorthPole||J.onSouthPole)){let et=N?y.stencilModeFor3D():Nr.disabled;return void ID(!!J.onNorthPole,null,y,l,p,oe,W,jr.disabled,et)}if(!_.length)return;let[Oe,Be]=J instanceof o.aS||de?[{},_]:y.stencilConfigForOverlap(_),He=Be[Be.length-1].overscaledZ;V&&W.defines.push("PROJECTION_GLOBE_VIEW"),N&&W.defines.push("RENDER_CUTOFF");let nt=(et,at,tt)=>{for(let Xe of et){let it=Xe.toUnwrapped(),Wt=l.getTile(Xe);if(de&&(!Wt||!Wt.hasData()))continue;$.activeTexture.set(Y.TEXTURE0);let Nt=TD(Wt,J,p,W);if(!Nt||!Nt.texture)continue;let{texture:mi,mix:jt,offset:ci,tileSize:cn,buffer:qt}=Nt,Dt,Si;de?(Dt=Rn.disabled,Si=Xe.projMatrix):N?(Dt=new Rn(Y.LEQUAL,Rn.ReadWrite,y.depthRangeFor3D),Si=A?Float32Array.from(y.transform.expandedFarZProjMatrix):y.transform.calculateProjMatrix(it,Ee)):(Dt=y.depthModeForSublayer(Xe.overscaledZ-He,p.paint.get("raster-opacity")===1?Rn.ReadWrite:Rn.ReadOnly,Y.LESS),Si=y.transform.calculateProjMatrix(it,Ee));let Jt=y.terrain&&de?y.terrain.stencilModeForRTTOverlap(Xe):Oe[Xe.overscaledZ],Gi=S?0:p.paint.get("raster-fade-duration");Wt.registerFadeDuration(Gi);let sn=l.findLoadedParent(Xe,0),Mn=WC(Wt,sn,l,y.transform,Gi),en,Zi;!Mn.isFading&&Wt.refreshedUponExpiration&&(Wt.refreshedUponExpiration=!1),y.terrain&&y.terrain.prepareDrawTile(),$.activeTexture.set(Y.TEXTURE0),mi.bind(ge,Y.CLAMP_TO_EDGE),$.activeTexture.set(Y.TEXTURE1),sn?(sn.texture&&sn.texture.bind(ge,Y.CLAMP_TO_EDGE),en=Math.pow(2,sn.tileID.overscaledZ-Wt.tileID.overscaledZ),Zi=[Wt.tileID.canonical.x*en%1,Wt.tileID.canonical.y*en%1]):mi.bind(ge,Y.CLAMP_TO_EDGE),"useMipmap"in mi&&$.extTextureFilterAnisotropic&&y.transform.pitch>20&&Y.texParameterf(Y.TEXTURE_2D,$.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$.extTextureFilterAnisotropicMax);let or=y.transform,er,nr=N?m3(or):[0,0,0,0],Wn,Zr,go,Co,ss,ao=0;if(V&&J instanceof o.aS&&J.coordinates.length>3)Wn=Float32Array.from(o.bk(o.dF(new o.cC(0,0,0)))),Zr=Float32Array.from(or.globeMatrix),go=Float32Array.from(o.dB(or)),Co=[o.aF(or.center.lng),o.aJ(or.center.lat)],er=J.elevatedGlobePerspectiveTransform,ss=J.elevatedGlobeGridMatrix||new Float32Array(9);else if(V){let _o=o.dC(Xe.canonical);ao=o.dD(_o.getCenter().lat),Wn=Float32Array.from(o.bk(o.dF(Xe.canonical))),Zr=Float32Array.from(or.globeMatrix),go=Float32Array.from(o.dB(or)),Co=[o.aF(or.center.lng),o.aJ(or.center.lat)],er=[0,0],ss=Float32Array.from(o.dE(Xe.canonical,_o,ao,or.worldSize/or._pixelsPerMercatorPixel))}else er=J instanceof o.aS?J.perspectiveTransform:[0,0],Wn=new Float32Array(16),Zr=new Float32Array(9),go=new Float32Array(16),Co=[0,0],ss=new Float32Array(9);let Ea=vg(Si,Wn,Zr,go,ss,Zi||[0,0],o.aj(y.transform.zoom),Co,nr,en||1,Mn,p,er,N?p.paint.get("raster-elevation"):0,2,jt,ci,W.range,cn,qt,oe),Ja=y.isTileAffectedByFog(Xe),ml=y.getOrCreateProgram("raster",{defines:W.defines,overrideFog:Ja});if(y.uploadCommonUniforms($,ml,it),J instanceof o.aS){let _o=J.elevatedGlobeVertexBuffer,za=J.elevatedGlobeIndexBuffer;if(de||!A)J.boundsBuffer&&J.boundsSegments&&ml.draw(y,Y.TRIANGLES,Dt,Nr.disabled,ce,jr.disabled,Ea,p.id,J.boundsBuffer,y.quadTriangleIndexBuffer,J.boundsSegments);else if(_o&&za){let wa=or.zoom<=o.cZ?J.elevatedGlobeSegments:J.getSegmentsForLongitude(or.center.lng);wa&&ml.draw(y,Y.TRIANGLES,Dt,Nr.disabled,ce,at,Ea,p.id,_o,za,wa)}}else if(V){Dt=new Rn(Y.LEQUAL,Rn.ReadOnly,y.depthRangeFor3D);let _o=y.globeSharedBuffers;if(_o){let[za,wa,Ua]=_o.getGridBuffers(ao,!1);ml.draw(y,Y.TRIANGLES,Dt,tt||Jt,y.colorModeForRenderPass(),at,Ea,p.id,za,wa,Ua)}}else{let{tileBoundsBuffer:_o,tileBoundsIndexBuffer:za,tileBoundsSegments:wa}=y.getTileBoundsBuffers(Wt);ml.draw(y,Y.TRIANGLES,Dt,Jt,ce,jr.disabled,Ea,p.id,_o,za,wa)}}if(!(J instanceof o.aS)&&V)for(let Xe of et){let it=Xe.canonical.y===(1<>>16,2654435769),((Xe=Math.imul(Xe^Xe>>>16,2654435769))>>>0)/4294967296},tt=1/1.1;for(let Xe=0;Xeo.e6[Jt](mi));qt.push(mi);let Dt=mi.canonical.x,Si=mi.canonical.y;for(let Jt of qt){let Gi=He.getTile(it?Jt.wrapped():Jt);if(!Gi)continue;let sn=Gi.rasterParticleState;if(!sn)continue;let Mn=Jt.canonical.x+(1<et.tileID)),oe&&($.activeTexture.set(Y.TEXTURE0),y.imageManager.bind(y.context,p.scope)),V){let et=y.getOrCreateProgram(Be,{overrideFog:!1,overrideRtt:!0}),at=new Float32Array(o.bA([])),tt=new o.aO(0,0,0,0,0),Xe=oe?eT(at,N,A,y,0,p.scope,ce,V,{tileID:tt,tileSize:W}):v_(at,N,A,x.toPremultipliedRenderColor(S?null:p.lut));et.draw(y,Y.TRIANGLES,ge,Ee,Oe,jr.disabled,Xe,p.id,y.viewportBuffer,y.quadTriangleIndexBuffer,y.viewportSegments)}else for(let et of nt){let at=y.isTileAffectedByFog(et),tt=y.getOrCreateProgram(Be,{overrideFog:at}),Xe=et.toUnwrapped(),it=_?et.projMatrix:y.transform.calculateProjMatrix(Xe);y.prepareDrawTile();let Wt=l?l.getTile(et):He?He[et.key]:new Ly(et,W,J.zoom,y),Nt=oe?eT(it,N,A,y,0,p.scope,ce,V,{tileID:et,tileSize:W}):v_(it,N,A,x.toPremultipliedRenderColor(S?null:p.lut));y.uploadCommonUniforms($,tt,Xe);let{tileBoundsBuffer:mi,tileBoundsIndexBuffer:jt,tileBoundsSegments:ci}=y.getTileBoundsBuffers(Wt);tt.draw(y,Y.TRIANGLES,ge,Ee,Oe,jr.disabled,Nt,p.id,mi,jt,ci)}},sky:function(y,l,p){let _=y._atmosphere?o.aj(y.transform.zoom):1,x=p.paint.get("sky-opacity")*_;if(x===0)return;let S=y.context,A=p.paint.get("sky-type"),N=new Rn(S.gl.LEQUAL,Rn.ReadOnly,[0,1]),V=y.frameCounter/1e3%1;A==="atmosphere"?y.renderPass==="offscreen"?p.needsSkyboxCapture(y)&&((function($,Y,J,W){let oe=$.context,ce=oe.gl,de=Y.skyboxFbo;if(!de){de=Y.skyboxFbo=oe.createFramebuffer(32,32,!0,null),Y.skyboxGeometry=new Es(oe),Y.skyboxTexture=oe.gl.createTexture(),ce.bindTexture(ce.TEXTURE_CUBE_MAP,Y.skyboxTexture),ce.texParameteri(ce.TEXTURE_CUBE_MAP,ce.TEXTURE_WRAP_S,ce.CLAMP_TO_EDGE),ce.texParameteri(ce.TEXTURE_CUBE_MAP,ce.TEXTURE_WRAP_T,ce.CLAMP_TO_EDGE),ce.texParameteri(ce.TEXTURE_CUBE_MAP,ce.TEXTURE_MIN_FILTER,ce.LINEAR),ce.texParameteri(ce.TEXTURE_CUBE_MAP,ce.TEXTURE_MAG_FILTER,ce.LINEAR);for(let Be=0;Be<6;++Be)ce.texImage2D(ce.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0,ce.RGBA,32,32,0,ce.RGBA,ce.UNSIGNED_BYTE,null)}oe.bindFramebuffer.set(de.framebuffer),oe.viewport.set([0,0,32,32]);let Ee=Y.getCenter($,!0),ge=$.getOrCreateProgram("skyboxCapture"),Oe=new Float64Array(16);o.bA(Oe),o.ek(Oe,Oe,.5*-Math.PI),tx($,Y,ge,Oe,Ee,0),o.bA(Oe),o.ek(Oe,Oe,.5*Math.PI),tx($,Y,ge,Oe,Ee,1),o.bA(Oe),o.cT(Oe,Oe,.5*-Math.PI),tx($,Y,ge,Oe,Ee,2),o.bA(Oe),o.cT(Oe,Oe,.5*Math.PI),tx($,Y,ge,Oe,Ee,3),o.bA(Oe),tx($,Y,ge,Oe,Ee,4),o.bA(Oe),o.ek(Oe,Oe,Math.PI),tx($,Y,ge,Oe,Ee,5),oe.viewport.set([0,0,$.width,$.height])})(y,p),p.markSkyboxValid(y)):y.renderPass==="sky"&&(function($,Y,J,W,oe){let ce=$.context,de=ce.gl,Ee=$.transform,ge=$.getOrCreateProgram("skybox");ce.activeTexture.set(de.TEXTURE0),de.bindTexture(de.TEXTURE_CUBE_MAP,Y.skyboxTexture);let Oe=((Be,He,nt,et,at)=>({u_matrix:Be,u_sun_direction:He,u_cubemap:0,u_opacity:et,u_temporal_offset:at}))(Ee.skyboxMatrix,Y.getCenter($,!1),0,W,oe);$.uploadCommonUniforms(ce,ge),ge.draw($,de.TRIANGLES,J,Nr.disabled,$.colorModeForRenderPass(),jr.backCW,Oe,"skybox",Y.skyboxGeometry.vertexBuffer,Y.skyboxGeometry.indexBuffer,Y.skyboxGeometry.segment)})(y,p,N,x,V):A==="gradient"&&y.renderPass==="sky"&&(function($,Y,J,W,oe){let ce=$.context,de=ce.gl,Ee=$.transform,ge=$.getOrCreateProgram("skyboxGradient");Y.skyboxGeometry||(Y.skyboxGeometry=new Es(ce)),ce.activeTexture.set(de.TEXTURE0);let Oe=Y.colorRampTexture;Oe||(Oe=Y.colorRampTexture=new o.T(ce,Y.colorRamp,de.RGBA8)),Oe.bind(de.LINEAR,de.CLAMP_TO_EDGE);let Be=((He,nt,et,at,tt)=>({u_matrix:He,u_color_ramp:0,u_center_direction:nt,u_radius:o.an(et),u_opacity:at,u_temporal_offset:tt}))(Ee.skyboxMatrix,Y.getCenter($,!1),Y.paint.get("sky-gradient-radius"),W,oe);$.uploadCommonUniforms(ce,ge),ge.draw($,de.TRIANGLES,J,Nr.disabled,$.colorModeForRenderPass(),jr.backCW,Be,"skyboxGradient",Y.skyboxGeometry.vertexBuffer,Y.skyboxGeometry.indexBuffer,Y.skyboxGeometry.segment)})(y,p,N,x,V)},custom:function(y,l,p,_){let x=y.context,S=p.implementation;if(!y.transform.projection.unsupportedLayers||!y.transform.projection.unsupportedLayers.includes("custom")||y.terrain&&(y.terrain.renderingToTexture||y.renderPass==="offscreen")&&p.isDraped(l)){if(y.renderPass==="offscreen"){let A=S.prerender;if(A){if(y.setCustomLayerDefaults(),x.setColorMode(y.colorModeForRenderPass()),y.transform.projection.name==="globe"){let N=y.transform.pointMerc;A.call(S,x.gl,y.transform.customLayerMatrix(),y.transform.getProjection(),y.transform.globeToMercatorMatrix(),o.aj(y.transform.zoom),[N.x,N.y],y.transform.pixelsPerMeterRatio)}else A.call(S,x.gl,y.transform.customLayerMatrix());x.setDirty(),y.setBaseState()}}else if(y.renderPass==="translucent"){if(y.terrain&&y.terrain.renderingToTexture){let N=S.renderToTile;if(N){let V=_[0].canonical,$={x:V.x+_[0].wrap*(S.wrapTileId?0:1<{A&&(A.useNormalOffset=!0,N||(A.enabled=!0))},$=l.getSource();if(y.renderPass==="light-beam"&&$.type!=="batched-model")return;if($.type==="vector"||$.type==="geojson")return(function(ge,Oe,Be,He,nt){let et=ge.transform;if(et.projection.name!=="mercator")return void o.w(`Drawing 3D models for ${et.projection.name} projection is not yet implemented`);let at=et.getFreeCameraOptions().position;if(!ge.modelManager)return;let tt=ge.modelManager;Be.modelManager=tt;let Xe=ge.shadowRenderer;if(!Be._unevaluatedLayout._values.hasOwnProperty("model-id"))return;let it=Be._unevaluatedLayout._values["model-id"],Wt=Object.assign({},Be.layout.get("model-id").parameters),Nt=ge.style.order.indexOf(Be.fqid);for(let mi of He){let jt=Oe.getTile(mi).getBucket(Be);if(!jt||jt.projection.name!==et.projection.name)continue;let ci=jt.getModelUris();ci&&!jt.modelsRequested&&(tt.addModelsFromBucket(ci,nt),jt.modelsRequested=!0);let cn=vb(mi,et);Wt.zoom=cn;let qt=it.possiblyEvaluate(Wt);if(Ph(ge,jt,mi),dp.shadowUniformsInitialized=!1,dp.useSingleShadowCascade=!!Xe&&Xe.getMaxCascadeForTile(mi.toUnwrapped())===0,ge.renderPass==="shadow"&&Xe){if(ge.currentShadowCascade===1&&jt.isInsideFirstShadowMapFrustum)continue;let Jt=et.calculatePosMatrix(mi.toUnwrapped(),et.worldSize);if(dp.tileMatrix.set(Jt),dp.shadowTileMatrix=Float32Array.from(Xe.calculateShadowPassMatrixFromMatrix(Jt)),dp.aabb.min=[0,0,0],dp.aabb.max[0]=dp.aabb.max[1]=o.al,dp.aabb.max[2]=0,hR(jt,dp,ge,Be.scope))continue}let Dt=1<0&&ge.style.isLayerClipped(Be,Oe.getSource())&&jt.updateReplacement(mi,ge.replacementSource,Nt,nt)&&(jt.uploaded=!1,jt.upload(ge.context));for(let Jt in jt.instancesPerModel){let Gi=jt.instancesPerModel[Jt];Gi.features.length>0&&(Jt=qt.evaluate(Gi.features[0].feature,{}));let sn=tt.getModel(Jt,nt);if(sn||tt.hasURLBeenRequested(Jt)||jt.modelUris.includes(Jt)||(jt.modelUris.push(Jt),jt.modelsRequested=!1),sn&&sn.uploaded)for(let Mn of sn.nodes)mR(ge,Be,Mn,Gi,Si,mi,dp)}}})(y,l,p,_,$.type==="vector"?p.scope:""),void V();if(!$.loaded())return;if($.type==="batched-model")return(function(ge,Oe,Be,He){Be.resetLayerRenderingStats(ge);let nt=ge.context,et=ge.transform,at=ge.style.fog,tt=ge.shadowRenderer;if(et.projection.name!=="mercator")return void o.w(`Drawing 3D landmark models for ${et.projection.name} projection is not yet implemented`);let Xe=ge.transform.getFreeCameraOptions().position,it=o.c4([],[Xe.x,Xe.y,Xe.z],ge.transform.worldSize),Wt=o.et([],it),Nt=o.bA([]),mi=o.ec(et.center.lat,et.zoom),jt=o.bq([],[1,1,1/mi]);o.br(Nt,Nt,Wt);let ci=Be.paint.get("model-opacity").constantOr(1),cn=new Rn(nt.gl.LEQUAL,Rn.ReadWrite,ge.depthRangeFor3D),qt=new Rn(nt.gl.LEQUAL,Rn.ReadOnly,ge.depthRangeFor3D),Dt=new o.d8([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),Si=ge.renderPass==="shadow",Jt=Si&&tt?tt.getCurrentCascadeFrustum():et.getFrustum(et.scaleZoom(et.worldSize)),Gi=Be.paint.get("model-front-cutoff"),sn=Gi[2]<1,Mn=db(ge,Be.paint.get("model-cutoff-fade-range")),en=Be.getLayerRenderingStats();(function(Zi,or,er,nr){let Wn=Zi.terrain?Zi.terrain.exaggeration():0,Zr=Zi.transform.zoom;for(let go of nr){let Co=or.getTile(go).getBucket(er);Co&&(Co.setFilter(er.filter),Zi.conflationActive&&Co.updateReplacement(go,Zi.replacementSource),Co.evaluateTransform(Zi,er),Zi.terrain&&Wn>0&&Co.elevationUpdate(Zi.terrain,Wn,go,er.source),Co.needsReEvaluation(Zi,Zr,er)&&Co.evaluate(er))}})(ge,Oe,Be,He),(function(){let Zi,or,er;sn?(Zi=He.length-1,or=-1,er=-1):(Zi=0,or=He.length,er=1);let nr=new Float64Array(16),Wn=o.cz(),Zr=new o.P(0,0);for(let go=Zi;go!==or;go+=er){let Co=He[go],ss=Oe.getTile(Co).getBucket(Be);if(!ss||!ss.uploaded)continue;let ao=!1;tt&&(ao=tt.getMaxCascadeForTile(Co.toUnwrapped())===0);let Ea=et.calculatePosMatrix(Co.toUnwrapped(),et.worldSize),Ja=ss.modelTraits;!Si&&sn&&(o.bl(nr,Ea),o.af(Wn,it,nr),Zr.x=Wn[0],Zr.y=Wn[1]);let ml=[];ss.setFilter(Be.filter);for(let _o of ss.getNodesInfo()){if(_o.hiddenByReplacement||!_o.node.meshes)continue;let za=_o.node,wa=0;ge.terrain&&za.elevation&&(wa=za.elevation*ge.terrain.exaggeration());let Ua=(()=>{let Md=_o.aabb;return Dt.min=[...Md.min],Dt.max=[...Md.max],Dt.min[2]+=wa,Dt.max[2]+=wa,o.af(Dt.min,Dt.min,Ea),o.af(Dt.max,Dt.max,Ea),Dt})(),bl=_o.evaluatedScale;if(bl[0]<=1&&bl[1]<=1&&bl[2]<=1&&Ua.intersects(Jt)===0)continue;if(!Si&&sn){let Md=.16666666666666666;_o.cameraCollisionOpacity=it[0]>Ua.min[0]&&it[0]Ua.min[1]&&it[1]!sn||_o.opacity===1&&za.opacity===1?_o.depthza.depth?-1:1);for(let _o of ml){let za=_o.nodeInfo,wa=za.node,Ua=o.aB([],jt,_o.tileModelMatrix);o.aB(Ua,Nt,Ua);let bl=o.bl([],Ua);o.ed(bl,bl),o.cR(bl,bl,MD),Ua=o.aB(Ua,Ua,wa.matrix);let wc=ge.renderPass==="light-beam",Yd=Be.paint.get("model-color-use-theme").constantOr("default")==="none",Cl=Ja&o.ez.HasMapboxMeshFeatures,xo=Cl?0:za.evaluatedRMEA[0][2];for(let Lr=0;Lr=Jn||gd>=Jn}}let Mf=ls.material,Lh;Mf.occlusionTexture&&Mf.occlusionTexture.offsetScale&&(Lh=Mf.occlusionTexture.offsetScale,Jc.defines.push("OCCLUSION_TEXTURE_TRANSFORM"));let Bh=ge.getOrCreateProgram("model",Jc);!Si&&tt&&tt.setupShadowsFromMatrix(_o.tileModelMatrix,Bh,tt.useNormalOffset),ge.uploadCommonUniforms(nt,Bh,null,kf);let um=Mf.pbrMetallicRoughness;um.metallicFactor=.9,um.roughnessFactor=.5;let Ig=JC(new Float32Array(xl),new Float32Array(Ua),new Float32Array(bl),new Float32Array(wa.matrix),ge,_o.opacity,um.baseColorFactor,Mf.emissiveFactor,um.metallicFactor,um.roughnessFactor,Mf,xo,Be,[0,0,0],Lh);!Zl&&(za.hasTranslucentParts||_o.opacity<1)&&Bh.draw(ge,nt.gl.TRIANGLES,cn,Nr.disabled,po.disabled,jr.backCCW,Ig,Be.id,ls.vertexBuffer,ls.indexBuffer,ls.segments,Be.paint,ge.transform.zoom,void 0,Md),Bh.draw(ge,nt.gl.TRIANGLES,Zl?qt:cn,Nr.disabled,Zl||_o.opacity<1||za.hasTranslucentParts?po.alphaBlended:po.unblended,jr.backCCW,Ig,Be.id,ls.vertexBuffer,ls.indexBuffer,ls.segments,Be.paint,ge.transform.zoom,void 0,Md)}}}})()})(y,l,p,_),void V();if($.type!=="model")return;let Y=$.getModels(),J=[],W=y.transform.getFreeCameraOptions().position,oe=o.c4([],[W.x,W.y,W.z],y.transform.worldSize);o.et(oe,oe);let ce=[],de=[],Ee=0;for(let ge of Y){let Oe=p.paint.get("model-rotation").constantOr(null),Be=p.paint.get("model-scale").constantOr(null),He=p.paint.get("model-translation").constantOr(null);ge.computeModelMatrix(y,Oe,Be,He,!0,!0,!1);let nt=o.bA([]),et=o.ec(ge.position.lat,y.transform.zoom),at=o.bq([],[1,1,1/et]);o.br(nt,nt,oe),J.push({zScaleMatrix:at,negCameraPosMatrix:nt});for(let tt of ge.nodes)oT(y.transform,tt,ge.matrix,y.transform.expandedFarZProjMatrix,Ee,ce,de);Ee++}if(ce.sort((ge,Oe)=>Oe.depth-ge.depth),y.renderPass!=="shadow"){if(x===1)for(let ge of de)Yy(ge,y,p,J[ge.modelIndex],Nr.disabled,y.colorModeForRenderPass());else{for(let ge of de)Yy(ge,y,p,J[ge.modelIndex],Nr.disabled,po.disabled);for(let ge of de)Yy(ge,y,p,J[ge.modelIndex],y.stencilModeFor3D(),y.colorModeForRenderPass());y.resetStencilClippingMasks()}for(let ge of ce)Yy(ge,y,p,J[ge.modelIndex],Nr.disabled,y.colorModeForRenderPass());V()}else{for(let ge of de)fS(ge.mesh,ge.nodeModelMatrix,y,p);for(let ge of ce)fS(ge.mesh,ge.nodeModelMatrix,y,p);V()}}},dm={line:function(y,l,p){if(y.hasElevatedBuckets=!1,y.hasNonElevatedBuckets=!1,y._unevaluatedLayout.getValue("line-elevation-reference")!==void 0||y._unevaluatedLayout.getValue("line-z-offset")!==void 0){if(l){let _=l.getVisibleCoordinates();for(let x of _){let S=l.getTile(x).getBucket(y);if(S&&(S.elevationType!=="none"?y.hasElevatedBuckets=!0:y.hasNonElevatedBuckets=!0,y.hasElevatedBuckets&&y.hasNonElevatedBuckets))break}}}else y.hasNonElevatedBuckets=!0},model:function(y,l,p){let _=l.getSource();if(!_.loaded())return;if(_.type==="vector"||_.type==="geojson")return void(p.modelManager&&p.modelManager.upload(p,_.type==="vector"?y.scope:""));if(_.type==="batched-model"||_.type!=="model")return;let x=_.getModels();for(let S of x)S.upload(p.context)},raster:function(y,l,p){let _=l.getSource();if(!(_ instanceof S0&&_.loaded()))return;let x=y.sourceLayer||_.rasterLayerIds&&_.rasterLayerIds[0];if(!x)return;let S=y.paint.get("raster-array-band")||_.getInitialBand(x);if(S==null)return;let A=l.getIds().map(N=>l.getTileByID(N));for(let N of A)N.updateNeeded(y.id,S)&&_.prepareTile(N,x,y.id,S)},"raster-particle":function(y,l,p){let _=l.getSource();if(!(_ instanceof S0&&_.loaded()))return;let x=y.sourceLayer||_.rasterLayerIds&&_.rasterLayerIds[0];if(!x)return;let S=y.paint.get("raster-particle-array-band")||_.getInitialBand(x);if(S==null)return;let A=l.getIds().map(N=>l.getTileByID(N));for(let N of A)N.updateNeeded(y.id,S)&&_.prepareTile(N,x,y.id,S)}},ox={fill:ex},bb={fill:function(y,l,p,_){if(!p.layout||p.layout.get("fill-elevation-reference")==="none")return;let x=y.context.gl,S=new Rn(x.LEQUAL,Rn.ReadOnly,y.depthRangeFor3D),A=new Nr({func:x.ALWAYS,mask:255},255,255,x.KEEP,x.KEEP,x.REPLACE),N=y.transform.getFreeCameraOptions().position,V=y.getOrCreateProgram("elevatedStructuresDepthReconstruct");for(let $ of _){let Y=l.getTile($),J=Y.getBucket(p);if(!J)continue;let W=J.elevatedStructures;if(!W||W.depthSegments.segments[0].primitiveLength===0)continue;let oe=xD($.toUnwrapped(),N),ce=y.translatePosMatrix($.projMatrix,Y,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor")),de=ZI(ce,oe,0,1,0);V.draw(y,x.TRIANGLES,S,A,po.disabled,jr.disabled,de,p.id,W.vertexBuffer,W.indexBuffer,W.depthSegments,p.paint,y.transform.zoom)}}};class _S{constructor(l,p,_,x,S,A){this.context=new tT(l,p),this.transform=_,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.tp=S,this._timeStamp=o.o.now(),this._averageFPS=0,this._fpsHistory=[],this._dt=0,this._debugParams={forceEnablePrecipitation:!1,showTerrainProxyTiles:!1,fpsWindow:30,continousRedraw:!1,enabledLayers:{}};let N=["fill","line","symbol","circle","heatmap","fill-extrusion","building","raster","raster-particle","hillshade","model","background","sky"];for(let $ of N)this._debugParams.enabledLayers[$]=!0;S.registerParameter(this._debugParams,["Terrain"],"showTerrainProxyTiles",{},()=>{this.style.map.triggerRepaint()}),S.registerParameter(this._debugParams,["Precipitation"],"forceEnablePrecipitation"),S.registerParameter(this._debugParams,["FPS"],"fpsWindow",{min:1,max:100,step:1}),S.registerBinding(this._debugParams,["FPS"],"continousRedraw",{readonly:!0,label:"continuous redraw"}),S.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"value"}),S.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"graph",view:"graph",min:0,max:200});for(let $ of N)S.registerParameter(this._debugParams.enabledLayers,["Debug","Layers"],$);this.occlusionParams=new w_(S),this.setup(),this.numSublayers=bf.maxUnderzooming+bf.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={},this.conflationActive=!1,this.replacementSource=new o.eG,this.longestCutoffRange=0,this.minCutoffZoom=0,this._fogVisible=!1,this._cachedTileFogOpacities={},this._shadowRenderer=new m_(this),this._wireframeDebugCache=new PD,this.renderDefaultNorthPole=!0,this.renderDefaultSouthPole=!0,this.layersWithOcclusionOpacity=[];let V=new o.q({width:1,height:1},Uint8Array.of(0,0,0,0));this.emptyDepthTexture=new o.T(this.context,V,l.RGBA8),this._clippingActiveLastFrame=!1,this.scaleFactor=x,this.worldview=A}updateTerrain(l,p){let _=!!l&&!!l.terrain&&this.transform.projection.supportsTerrain;if(!(_||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new KI(this,l));let x=this._terrain;this.transform.elevation=_?x:null,x.update(l,this.transform,p),this.transform.elevation&&!x.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[_,x]=p.getFovAdjustedRange(this.transform._fov);if(_>x)return void(this.transform.fogCullDistSq=null);let S=_+.78*(x-_);this.transform.fogCullDistSq=S*S}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 KI(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*o.o.devicePixelRatio,this.height=p*o.o.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let _ of this.style.order)this.style._mergedLayers[_].resize()}setup(){let l=this.context,p=new o.bd;p.emplaceBack(0,0),p.emplaceBack(o.al,0),p.emplaceBack(0,o.al),p.emplaceBack(o.al,o.al),this.tileExtentBuffer=l.createVertexBuffer(p,o.bf.members),this.tileExtentSegments=o.bg.simpleSegment(0,0,4,2);let _=new o.bd;_.emplaceBack(0,0),_.emplaceBack(o.al,0),_.emplaceBack(0,o.al),_.emplaceBack(o.al,o.al),this.debugBuffer=l.createVertexBuffer(_,o.bf.members),this.debugSegments=o.bg.simpleSegment(0,0,4,5);let x=new o.bd;x.emplaceBack(-1,-1),x.emplaceBack(1,-1),x.emplaceBack(-1,1),x.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(x,o.bf.members),this.viewportSegments=o.bg.simpleSegment(0,0,4,2);let S=new o.b0;S.emplaceBack(0,0,0,0),S.emplaceBack(o.al,0,o.al,0),S.emplaceBack(0,o.al,0,o.al),S.emplaceBack(o.al,o.al,o.al,o.al),this.mercatorBoundsBuffer=l.createVertexBuffer(S,o.bi.members),this.mercatorBoundsSegments=o.bg.simpleSegment(0,0,4,2);let A=new o.b1;A.emplaceBack(0,1,2),A.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(A);let N=new o.be;for(let $ of[0,1,3,2,0])N.emplaceBack($);this.debugIndexBuffer=l.createIndexBuffer(N),this.emptyTexture=new o.T(l,new o.q({width:1,height:1},Uint8Array.of(0,0,0,0)),l.gl.RGBA8),this.identityMat=o.bC();let V=this.context.gl;this.stencilClearMode=new Nr({func:V.ALWAYS,mask:0},0,255,V.ZERO,V.ZERO,V.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,Rn.disabled,this.stencilClearMode,po.disabled,jr.disabled,Xm(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(l,p,_){if(!p||this.currentStencilSource===p.id||!l.isTileClipped()||!_||_.length===0)return;if(this._tileClippingMaskIDs&&!this.terrain){let N=!1;for(let V of _)if(this._tileClippingMaskIDs[V.key]===void 0){N=!0;break}if(!N)return}this.currentStencilSource=p.id;let x=this.context,S=x.gl;this.nextStencilID+_.length>256&&this.clearStencil(),x.setColorMode(po.disabled),x.setDepthMode(Rn.disabled);let A=this.getOrCreateProgram("clippingMask");this._tileClippingMaskIDs={};for(let N of _){let V=p.getTile(N),$=this._tileClippingMaskIDs[N.key]=this.nextStencilID++,{tileBoundsBuffer:Y,tileBoundsIndexBuffer:J,tileBoundsSegments:W}=this.getTileBoundsBuffers(V);A.draw(this,S.TRIANGLES,Rn.disabled,new Nr({func:S.ALWAYS,mask:0},$,255,S.KEEP,S.KEEP,S.REPLACE),po.disabled,jr.disabled,Xm(N.projMatrix),"$clipping",Y,J,W)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let l=this.nextStencilID++,p=this.context.gl;return new Nr({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 Nr({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(l){let p=this.context.gl,_=l.sort((A,N)=>N.overscaledZ-A.overscaledZ),x=_[_.length-1].overscaledZ,S=_[0].overscaledZ-x+1;if(S>1){this.currentStencilSource=void 0,this.nextStencilID+S>256&&this.clearStencil();let A={};for(let N=0;Nthis._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 _=o.o.now();this._dt=_-this._timeStamp,this._timeStamp=_,this._wireframeDebugCache.update(this.frameCounter),this._debugParams.continousRedraw=l.map.repaint,this.style=l,this.options=p;let x=this.style._mergedLayers,S=!(!this.terrain||!this.terrain.enabled),A=()=>this.style._getOrder(S).filter(qt=>{let Dt=x[qt];return!(Dt.type in this._debugParams.enabledLayers)||this._debugParams.enabledLayers[Dt.type]}),N=A(),V=!1,$=!1,Y=null;for(let qt of N){let Dt=x[qt];Dt.type==="circle"?V=!0:Dt.type==="building"?Y=Dt:Dt.type==="symbol"&&(Dt.hasOcclusionOpacityProperties?$=!0:V=!0)}let J=N.map(qt=>x[qt]),W=this.style._mergedSourceCaches;this.imageManager=l.imageManager,this.modelManager=l.modelManager,this.symbolFadeChange=l.placement.symbolFadeChange(o.o.now()),this.imageManager.beginFrame();let oe=0,ce=!1;for(let qt in W){let Dt=W[qt];Dt.used&&(Dt.prepare(this.context),Dt.getSource().usedInConflation&&++oe)}let de=!1;for(let qt of J)qt.isHidden(this.transform.zoom)||(qt.type==="clip"&&(de=!0),this.prepareLayer(qt));let Ee={},ge={},Oe={},Be={},He={};for(let qt in W){let Dt=W[qt];Ee[qt]=Dt.getVisibleCoordinates(),ge[qt]=Ee[qt].slice().reverse(),Oe[qt]=Dt.getVisibleCoordinates(!0).reverse(),Be[qt]=Dt.getShadowCasterCoordinates(),He[qt]=Dt.sortCoordinatesByDistance(Ee[qt])}let nt=qt=>{let Dt=this.style.getLayerSourceCache(qt);return Dt&&Dt.used?Dt.getSource():null};if(oe||de||this._clippingActiveLastFrame){let qt=[],Dt=[],Si=0;for(let Jt of J)this.isSourceForClippingOrConflation(Jt,nt(Jt))&&(qt.push(Jt),Dt.push(Si)),Si++;if(qt&&(de||qt.length>1)||this._clippingActiveLastFrame){de=!1;let Jt=[];for(let Gi=0;Gi0){let Jt=nt(Dt);Jt&&(this.minCutoffZoom=Math.max(Jt.minzoom,this.minCutoffZoom)),Dt.minzoom&&(this.minCutoffZoom=Math.max(Dt.minzoom,this.minCutoffZoom))}Dt.is3D(S)&&(this.opaquePassCutoff===1/0&&(this.opaquePassCutoff=qt),this._lastOcclusionLayer=qt)}let et=this.style&&this.style.fog;et?(this._fogVisible=et.getOpacity(this.transform.pitch)!==0,this._fogVisible&&this.transform.projection.name!=="globe"&&(this._fogVisible=et.isVisibleOnFrustum(this.transform.cameraFrustum))):this._fogVisible=!1,this._cachedTileFogOpacities={},this.terrain&&(this.terrain.updateTileBinding(Oe),this.opaquePassCutoff=0,N=A(),J=N.map(qt=>x[qt]));let at=this._shadowRenderer;if(at){at.updateShadowParameters(this.transform,this.style.directionalLight);for(let qt in W)for(let Dt of Ee[qt]){let Si={min:0,max:0};this.terrain&&(Si=this.terrain.getMinMaxForTile(Dt)||Si),at.addShadowReceiver(Dt.toUnwrapped(),Si.min,Si.max)}}this.transform.projection.name!=="globe"||this.globeSharedBuffers||(this.globeSharedBuffers=new o.eI(this.context)),this.style.fog&&this.transform.projection.supportsFog?(this._atmosphere||(this._atmosphere=new hS(this)),this._atmosphere.update(this)):this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0);let tt=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.snow),Xe=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.rain);if(tt&&!this._snow&&(this._snow=new _R(this)),!tt&&this._snow&&(this._snow.destroy(),delete this._snow),Xe&&!this._rain&&(this._rain=new pl(this)),!Xe&&this._rain&&(this._rain.destroy(),delete this._rain),this._snow&&this._snow.update(this),this._rain&&this._rain.update(this),Y){this.buildingTileBorderManager||(this.buildingTileBorderManager=new bs);let qt=this.style.getLayerSourceCache(Y);this.buildingTileBorderManager.updateBorders(qt,Y)}if(!yn.has(this.context.gl))return;this.renderPass="offscreen";for(let qt of J){let Dt=l.getLayerSourceCache(qt);if(!qt.hasOffscreenPass()||qt.isHidden(this.transform.zoom))continue;let Si=Dt?ge[Dt.id]:void 0;(qt.type==="custom"||qt.type==="raster"||qt.type==="raster-particle"||qt.isSky()||Si&&Si.length)&&this.renderLayer(this,Dt,qt,Si)}this.depthRangeFor3D=[0,1-(J.length+2)*this.numSublayers*this.depthEpsilon],this._shadowRenderer&&(this.renderPass="shadow",this._shadowRenderer.drawShadowPass(this.style,Be)),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]);let it=this.transform.projection.name==="globe"||this.transform.isHorizonVisible(),Wt=(()=>{if(p.showOverdrawInspector)return o.ao.black;let qt=this.style.fog;if(qt&&this.transform.projection.supportsFog){let Dt=this.style.getLut(qt.scope);if(!it){let Si=qt.properties.get("color-use-theme")==="none",Jt=qt.properties.get("color").toNonPremultipliedRenderColor(Si?null:Dt).toArray01();return new o.ao(...Jt)}if(it){let Si=qt.properties.get("space-color-use-theme")==="none",Jt=qt.properties.get("space-color").toNonPremultipliedRenderColor(Si?null:Dt).toArray01();return new o.ao(...Jt)}}return o.ao.transparent})();if(this.context.clear({color:Wt,depth:1}),this.clearStencil(),this._showOverdrawInspector=p.showOverdrawInspector,this.renderPass="opaque",this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&it&&this._atmosphere.drawStars(this,this.style.fog),!this.terrain)for(this.currentLayer=N.length-1;this.currentLayer>=0;this.currentLayer--){let qt=J[this.currentLayer],Dt=l.getLayerSourceCache(qt);if(qt.isSky())continue;let Si=Dt?(qt.is3D(S)?He:ge)[Dt.id]:void 0;this._renderTileClippingMasks(qt,Dt,Si),this.renderLayer(this,Dt,qt,Si)}if(this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&it&&this._atmosphere.drawAtmosphereGlow(this,this.style.fog),this.renderPass="sky",(!this._atmosphere||o.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&&qt.hasShadowPass()&&--mi==0){{this.clearStencil(),this.resetStencilClippingMasks();let Si=this.currentLayer;for(this.currentLayer=0;this.currentLayer=this._lastOcclusionLayer&&this.layersWithOcclusionOpacity.length>0){let Si=this.currentLayer;this.depthOcclusion=!0;for(let Jt of this.layersWithOcclusionOpacity){this.currentLayer=Jt;let Gi=J[this.currentLayer],sn=l.getLayerSourceCache(Gi),Mn=sn?ge[sn.id]:void 0;this.terrain||this._renderTileClippingMasks(Gi,sn,sn?Ee[sn.id]:void 0),this.renderLayer(this,sn,Gi,Mn)}this.depthOcclusion=!1,this.currentLayer=Si,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 qt=null;J.forEach(Dt=>{let Si=l.getLayerSourceCache(Dt);Si&&!Dt.isHidden(this.transform.zoom)&&Si.getVisibleCoordinates().length&&(!qt||qt.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,_){let x=_===void 0?this.terrain&&this.terrain.renderingToTexture:_,S=[];return this.style&&this.style.enable3dLights()&&(l==="globeRaster"||l==="terrainRaster"?(S.push("LIGHTING_3D_MODE"),S.push("LIGHTING_3D_ALPHA_EMISSIVENESS")):x||S.push("LIGHTING_3D_MODE")),this.renderPass==="shadow"&&(this._shadowMapDebug||S.push("DEPTH_TEXTURE")),this.terrainRenderModeElevated()&&(S.push("TERRAIN"),this.linearFloatFilteringSupported()&&S.push("TERRAIN_DEM_FLOAT_FORMAT")),this.transform.projection.name==="globe"&&S.push("GLOBE"),!this._fogVisible||x||p!==void 0&&!p||S.push("FOG","FOG_DITHERING"),x&&S.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&S.push("OVERDRAW_INSPECTOR"),S}getOrCreateProgram(l,p){this.cache=this.cache||{};let _=p&&p.defines||[],x=p&&p.config,S=this.currentGlobalDefines(l,p&&p.overrideFog,p&&p.overrideRtt).concat(_),A=gD.cacheKey(jI[l],l,S,x);return this.cache[A]||(this.cache[A]=new gD(this.context,l,jI[l],x,u3[l],S)),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 o.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 _=this.style.directionalLight,x=this.style.ambientLight;if(_&&x){let S=((A,N,V)=>{let $=A.properties.get("direction"),Y=A.properties.get("color-use-theme")==="none",J=A.properties.get("color").toNonPremultipliedRenderColor(Y?null:V.getLut(A.scope)).toArray01(),W=A.properties.get("intensity"),oe=N.properties.get("color-use-theme")==="none",ce=N.properties.get("color").toNonPremultipliedRenderColor(oe?null:V.getLut(N.scope)).toArray01(),de=N.properties.get("intensity"),Ee=[$.x,$.y,$.z],ge=o.dK(ce,de),Oe=o.dK(J,W);return{u_lighting_ambient_color:ge,u_lighting_directional_dir:Ee,u_lighting_directional_color:Oe,u_ground_radiance:_g(Ee,Oe,ge)}})(_,x,this.style);p.setLightsUniformValues(l,S)}}}uploadCommonUniforms(l,p,_,x,S){if(this.uploadCommonLightUniforms(l,p),this.terrain&&this.terrain.renderingToTexture)return;let A=this.style.fog;if(A){let N=A.getOpacity(this.transform.pitch),V=(($,Y,J,W,oe,ce,de,Ee,ge,Oe,Be,He)=>{let nt=$.transform,et=Y.properties.get("color-use-theme")==="none",at=Y.properties.get("color").toNonPremultipliedRenderColor(et?null:$.style.getLut(Y.scope)).toArray01();at[3]=W;let tt=$.frameCounter/1e3%1,[Xe,it]=Y.properties.get("vertical-range");return{u_fog_matrix:J?nt.calculateFogTileMatrix(J):He||$.identityMat,u_fog_range:Y.getFovAdjustedRange(nt._fov),u_fog_color:at,u_fog_horizon_blend:Y.properties.get("horizon-blend"),u_fog_vertical_limit:[Math.min(Xe,it),it],u_fog_temporal_offset:tt,u_frustum_tl:oe,u_frustum_tr:ce,u_frustum_br:de,u_frustum_bl:Ee,u_globe_pos:ge,u_globe_radius:Oe,u_viewport:Be,u_globe_transition:o.aj(nt.zoom),u_is_globe:+(nt.projection.name==="globe")}})(this,A,_,N,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*o.o.devicePixelRatio,this.transform.height*o.o.devicePixelRatio],x);p.setFogUniformValues(l,V)}S&&p.setCutoffUniformValues(l,S.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={},_=this.transform.coveringTiles({tileSize:512});for(let x of _)p[x.key]=l[x.key]||new Ly(x,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]>=Jn||p[1]>=Jn}setupDepthForOcclusion(l,p,_){let x=this.context,S=x.gl,A=!!_;var N;_||(_={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}),x.activeTexture.set(S.TEXTURE3),l&&this.depthFBO&&this.depthTexture?(this.depthTexture.bind(S.NEAREST,S.CLAMP_TO_EDGE),_.u_depth_size_inv=[1/this.depthFBO.width,1/this.depthFBO.height],_.u_depth_range_unpack=[2/((N=this.depthRangeFor3D)[1]-N[0]),-1-2*N[0]/(N[1]-N[0])],_.u_occluder_half_size=.5*this.occlusionParams.occluderSize,_.u_occlusion_depth_offset=this.occlusionParams.depthOffset):this.emptyDepthTexture.bind(S.NEAREST,S.CLAMP_TO_EDGE),x.activeTexture.set(S.TEXTURE0),A||p.setTerrainUniformValues(x,_)}}function Wy(y,l){let p=!1,_=null,x=()=>{_=null,p&&(y(),_=setTimeout(x,l),p=!1)};return()=>(p=!0,_||x(),_)}class FD{constructor(l){this._hashName=l&&encodeURIComponent(l),o.aY(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Wy(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=sT(l);if(this._hashName){let _=this._hashName,x=!1,S=location.hash.slice(1).split("&").map(A=>{let N=A.split("=")[0];return N===_?(x=!0,`${N}=${p}`):A}).filter(A=>A);return x||S.push(`${_}=${p}`),`#${S.join("&")}`}return`#${p}`}_getCurrentHash(){let l=location.hash.replace("#","");if(this._hashName){let p;return l.split("&").map(_=>_.split("=")).forEach(_=>{_[0]===this._hashName&&(p=_)}),(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(_=>isNaN(Number(_)))){let _=l.dragRotate.isEnabled()&&l.touchZoomRotate.isEnabled()?+(p[3]||0):l.getBearing();return l.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:_,pitch:+(p[4]||0)}),!0}return!1}_updateHashUnthrottled(){history.replaceState(history.state,"",location.href.replace(/(#.+)?$/,this.getHashString()))}}function sT(y,l){let p=y.getCenter(),_=Math.round(100*y.getZoom())/100,x=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),S=Math.pow(10,x),A=Math.round(p.lng*S)/S,N=Math.round(p.lat*S)/S,V=y.getBearing(),$=y.getPitch(),Y=l?`/${A}/${N}/${_}`:`${_}/${N}/${A}`;return(V||$)&&(Y+="/"+Math.round(10*V)/10),$&&(Y+=`/${Math.round($)}`),Y}let eh={linearity:.3,easing:o.eK(0,0,.3,1)},Qy=Object.assign({deceleration:2500,maxSpeed:1400},eh),I_=Object.assign({deceleration:20,maxSpeed:1400},eh),Cb=Object.assign({deceleration:1e3,maxSpeed:360},eh),yR=Object.assign({deceleration:1e3,maxSpeed:90},eh);class LD{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.o.now(),settings:l})}_drainInertiaBuffer(){let l=this._inertiaBuffer,p=o.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 o.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:S}of this._inertiaBuffer)p.zoom+=S.zoomDelta||0,p.bearing+=S.bearingDelta||0,p.pitch+=S.pitchDelta||0,S.panDelta&&p.pan._add(S.panDelta),S.around&&(p.around=S.around),S.pinchAround&&(p.pinchAround=S.pinchAround);let _=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,x={};if(p.pan.mag()){let S=Zy(p.pan.mag(),_,Object.assign({},Qy,l||{}));x.offset=p.pan.mult(S.amount/p.pan.mag()),x.center=this._map.transform.center,Cg(x,S)}if(p.zoom){let S=Zy(p.zoom,_,I_);x.zoom=this._map.transform.zoom+S.amount,Cg(x,S)}if(p.bearing){let S=Zy(p.bearing,_,Cb);x.bearing=this._map.transform.bearing+o.aA(S.amount,-179,179),Cg(x,S)}if(p.pitch){let S=Zy(p.pitch,_,yR);x.pitch=this._map.transform.pitch+S.amount,Cg(x,S)}if(x.zoom||x.bearing){let S=p.pinchAround===void 0?p.around:p.pinchAround;x.around=S?this._map.unproject(S):this._map.getCenter()}return this.clear(),x.noMoveStart=!0,x}}function Cg(y,l){(!y.duration||y.durationp.unproject(V)),N=S.reduce((V,$,Y,J)=>V.add($.div(J.length)),new o.P(0,0));super(l,{points:S,point:N,lngLats:A,lngLat:p.unproject(N),originalEvent:_}),this._defaultPrevented=!1}}class yS extends o.z{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p){super("wheel",{originalEvent:p}),this._defaultPrevented=!1}}class vS{constructor(l,p){this._map=l,this._clickTolerance=p.clickTolerance}reset(){this._mousedownPos=void 0}wheel(l){return this._firePreventable(new yS(this._map,l))}mousedown(l,p){return this._mousedownPos=p,this._firePreventable(new ld(l.type,this._map,l))}mouseup(l){this._map.fire(new ld(l.type,this._map,l))}preclick(l){let p=new MouseEvent("preclick",l);this._map.fire(new ld(p.type,this._map,p))}click(l,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||(this.preclick(l),this._map.fire(new ld(l.type,this._map,l)))}dblclick(l){return this._firePreventable(new ld(l.type,this._map,l))}mouseover(l){this._map.fire(new ld(l.type,this._map,l))}mouseout(l){this._map.fire(new ld(l.type,this._map,l))}touchstart(l){return this._firePreventable(new Xy(l.type,this._map,l))}touchmove(l){this._map.fire(new Xy(l.type,this._map,l))}touchend(l){this._map.fire(new Xy(l.type,this._map,l))}touchcancel(l){this._map.fire(new Xy(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class vR{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(l){this._map.fire(new ld(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ld("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new ld(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class fd{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&&(ne(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(l,p){if(!this._active)return;let _=p,x=this._startPos,S=this._lastPos;if(!x||!S||S.equals(_)||!this._box&&_.dist(x){this._box&&(this._box.style.transform=`translate(${A}px,${V}px)`,this._box.style.width=N-A+"px",this._box.style.height=$-V+"px")})}mouseupWindow(l,p){if(!this._active)return;let _=this._startPos,x=p;if(_&&l.button===0){if(this.reset(),Ie(),_.x!==x.x||_.y!==x.y)return this._map.fire(new o.z("boxzoomend",{originalEvent:l})),{cameraAnimation:S=>S.fitScreenCoordinates(_,x,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),me(),delete this._startPos,delete this._lastPos}_fireEvent(l,p){return this._map.fire(new o.z(l,{originalEvent:p}))}}function xb(y,l){let p={};for(let _=0;_this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===0&&(this.startTime=l.timeStamp),_.length===this.numTouches&&(this.centroid=(function(x){let S=new o.P(0,0);for(let A of x)S._add(A);return S.div(x.length)})(p),this.touches=xb(_,p)))}touchmove(l,p,_){if(this.aborted||!this.centroid)return;let x=xb(_,p);for(let S in this.touches){let A=x[S];(!A||A.dist(this.touches[S])>30)&&(this.aborted=!0)}}touchend(l,p,_){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),_.length===0){let x=!this.aborted&&this.centroid;if(this.reset(),x)return x}}}class ax{constructor(l){this.singleTap=new BD(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,_){this.singleTap.touchstart(l,p,_)}touchmove(l,p,_){this.singleTap.touchmove(l,p,_)}touchend(l,p,_){let x=this.singleTap.touchend(l,p,_);if(x){let S=l.timeStamp-this.lastTime<500,A=!this.lastTap||this.lastTap.dist(x)<30;if(S&&A||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=x,this.count===this.numTaps)return this.reset(),x}}}class sx{constructor(){this._zoomIn=new ax({numTouches:1,numTaps:2}),this._zoomOut=new ax({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,p,_){this._zoomIn.touchstart(l,p,_),this._zoomOut.touchstart(l,p,_)}touchmove(l,p,_){this._zoomIn.touchmove(l,p,_),this._zoomOut.touchmove(l,p,_)}touchend(l,p,_){let x=this._zoomIn.touchend(l,p,_),S=this._zoomOut.touchend(l,p,_);return 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})}):S?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:A=>A.easeTo({duration:300,zoom:A.getZoom()-1,around:A.unproject(S)},{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 VD={0:1,2:2},xg={Control:"ctrlKey",Alt:"altKey",Shift:"shiftKey",Meta:"metaKey"};class bS{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 _=Re(l);this._correctButton(l,_)&&(this._lastPoint=p,this._eventButton=_)}mousemoveWindow(l,p){let _=this._lastPoint;if(_){if(l.preventDefault(),this._eventButton!=null&&(function(x,S){let A=VD[S];return x.buttons===void 0||(x.buttons&A)!==A})(l,this._eventButton))this.reset();else if(this._moved||!(p.dist(_)0&&(this._active=!0);let x=xb(_,p),S=new o.P(0,0),A=new o.P(0,0),N=0;for(let $ in x){let Y=x[$],J=this._touches[$];J&&(S._add(Y),A._add(Y.sub(J)),N++,x[$]=Y)}if(this._touches=x,N{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.removeAttribute("role")},500)}}class CS{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(l){}_move(l,p,_){return{}}touchstart(l,p,_){this._firstTwoTouches||_.length<2||(this._firstTwoTouches=[_[0].identifier,_[1].identifier],this._start([p[0],p[1]]))}touchmove(l,p,_){let x=this._firstTwoTouches;if(!x)return;l.preventDefault();let[S,A]=x,N=Nh(_,p,S),V=Nh(_,p,A);if(!N||!V)return;let $=this._aroundCenter?null:N.add(V).div(2);return this._move([N,V],$,l)}touchend(l,p,_){if(!this._firstTwoTouches)return;let[x,S]=this._firstTwoTouches,A=Nh(_,p,x),N=Nh(_,p,S);A&&N||(this._active&&Ie(),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 Nh(y,l,p){for(let _=0;_Math.abs(y.x)}class Ca extends CS{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,Jy(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,p,_){let x=this._lastPoints;if(!x)return;let S=l[0].sub(x[0]),A=l[1].sub(x[1]);return this._map._cooperativeGestures&&!o.eL()&&_.touches.length<3||(this._valid=this.gestureBeginsVertically(S,A,_.timeStamp),!this._valid)?void 0:(this._lastPoints=l,this._active=!0,{pitchDelta:(S.y+A.y)/2*-.5})}gestureBeginsVertically(l,p,_){if(this._valid!==void 0)return this._valid;let x=l.mag()>=2,S=p.mag()>=2;if(!x&&!S)return;if(!x||!S)return this._firstMove==null&&(this._firstMove=_),_-this._firstMove<100&&void 0;let A=l.y>0==p.y>0;return Jy(l)&&Jy(p)&&A}}let uT={panStep:100,bearingStep:15,pitchStep:10};class HD{constructor(){let l=uT;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,_=0,x=0,S=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?_=-1:(l.preventDefault(),S=-1);break;case 39:l.shiftKey?_=1:(l.preventDefault(),S=1);break;case 38:l.shiftKey?x=1:(l.preventDefault(),A=-1);break;case 40:l.shiftKey?x=-1:(l.preventDefault(),A=1);break;default:return}return this._rotationDisabled&&(_=0,x=0),{cameraAnimation:N=>{let V=N.getZoom();N.easeTo({duration:300,easeId:"keyboardHandler",easing:Sb,zoom:p?Math.round(V)+p*(l.shiftKey?2:1):V,bearing:N.getBearing()+_*this._bearingStep,pitch:N.getPitch()+x*this._pitchStep,offset:[-S*this._panStep,-A*this._panStep],center:N.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 Sb(y){return y*(2-y)}let CR=4.000244140625,GD=1/450;class xR{constructor(l,p){this._map=l,this._el=l.getCanvasContainer(),this._handler=p,this._delta=0,this._lastDelta=0,this._defaultZoomRate=.01,this._wheelZoomRate=GD,o.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()||o.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,_=o.o.now(),x=_-(this._lastWheelEventTime||0);this._lastWheelEventTime=_,p!==0&&p%CR==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":x>400?(this._type=null,this._lastValue=p,this._timeout=window.setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(x*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=ye(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 $=this._type==="wheel"&&Math.abs(this._delta)>CR?this._wheelZoomRate:this._defaultZoomRate,Y=2/(1+Math.exp(-Math.abs(this._delta*$)));this._delta<0&&Y!==0&&(Y=1/Y);let J=p(),W=Math.pow(2,J),oe=typeof this._targetZoom=="number"?l.zoomScale(this._targetZoom):W;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(oe*Y))),this._type==="wheel"&&(this._startZoom=J,this._easing=this._smoothOutEasing(200)),this._lastDelta=this._delta,this._delta=0}let _=typeof this._targetZoom=="number"?this._targetZoom:p(),x=this._startZoom,S=this._easing,A,N=!1;if(this._type==="wheel"&&x&&S){let $=Math.min((o.o.now()-this._lastWheelEventTime)/200,1),Y=S($);A=o.ak(x,_,Y),$<1?this._frameId||(this._frameId=!0):N=!0}else A=_,N=!0;this._active=!0,N&&(this._active=!1,this._finishTimeout=window.setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200));let V=A-p();return V*this._lastDelta<0&&(V=0),{noInertia:!0,needsRenderFrame:!N,zoomDelta:V,around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let p=o.eM;if(this._prevEase){let _=this._prevEase,x=(o.o.now()-_.start)/_.duration,S=_.easing(x+.01)-_.easing(x),A=.27/Math.sqrt(S*S+1e-4)*.01,N=Math.sqrt(.0729-A*A);p=o.eK(A,N,.25,1)}return this._prevEase={start:o.o.now(),duration:l,easing:p},p}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=R("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 Lp{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 y3{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(l,p){return l.preventDefault(),{cameraAnimation:_=>{_.easeTo({duration:300,zoom:_.getZoom()+(l.shiftKey?-1:1),around:_.unproject(p)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class AH{constructor(){this._tap=new ax({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,_){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?_.length>0&&(this._swipePoint=p[0],this._swipeTouch=_[0].identifier):this._tap.touchstart(l,p,_))}touchmove(l,p,_){if(this._tapTime){if(this._swipePoint){if(_[0].identifier!==this._swipeTouch)return;let x=p[0],S=x.y-this._swipePoint.y;return this._swipePoint=x,l.preventDefault(),this._active=!0,{zoomDelta:S/128}}}else this._tap.touchmove(l,p,_)}touchend(l,p,_){this._tapTime?this._swipePoint&&_.length===0&&this.reset():this._tap.touchend(l,p,_)&&(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 v3{constructor(l,p,_){this._el=l,this._mousePan=p,this._touchPan=_}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 DH{constructor(l,p,_){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=p,this._mousePitch=_}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 Ml{constructor(l,p,_,x){this._el=l,this._touchZoom=p,this._touchRotate=_,this._tapDragZoom=x,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 pT=y=>y.zoom||y.drag||y.pitch||y.rotate;class kH extends o.z{}class MH{constructor(){this.constants=[1,1,.01],this.radius=0}setup(l,p){let _=o.av([],p,l);this.radius=o.ag(_[2]<0?o.eO([],_,this.constants):[_[0],_[1],0])}projectRay(l){o.eO(l,l,this.constants),o.aw(l,l),o.eP(l,l,this.constants);let p=o.c4([],l,this.radius);if(p[2]>0){let _=o.c4([],[0,0,1],o.bJ(p,[0,0,1])),x=o.c4([],o.aw([],[p[0],p[1],0]),this.radius),S=o.d7([],p,o.c4([],o.av([],o.d7([],x,_),p),2));p[0]=S[0],p[1]=S[1]}return p}}function Sg(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Ku{constructor(l,p){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new LD(l),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new MH,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(p),o.aY(["handleEvent","handleWindowEvent"],this);let _=this._el;this._listeners=[[_,"touchstart",{passive:!0}],[_,"touchmove",{passive:!1}],[_,"touchend",void 0],[_,"touchcancel",void 0],[_,"mousedown",void 0],[_,"mousemove",void 0],[_,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[_,"mouseover",void 0],[_,"mouseout",void 0],[_,"dblclick",void 0],[_,"click",void 0],[_,"keydown",{capture:!1}],[_,"keyup",void 0],[_,"wheel",{passive:!1}],[_,"contextmenu",void 0],[window,"blur",void 0]];for(let[x,S,A]of this._listeners){let N=x===document?this.handleWindowEvent:this.handleEvent;x.addEventListener(S,N,A)}}destroy(){for(let[l,p,_]of this._listeners){let x=l===document?this.handleWindowEvent:this.handleEvent;l.removeEventListener(p,x,_)}}_addDefaultHandlers(l){let p=this._map,_=p.getCanvasContainer();this._add("mapEvent",new vS(p,l));let x=p.boxZoom=new fd(p,l);this._add("boxZoom",x);let S=new sx,A=new y3;p.doubleClickZoom=new Lp(A,S),this._add("tapZoom",S),this._add("clickZoom",A);let N=new AH;this._add("tapDragZoom",N);let V=p.touchPitch=new Ca(p);this._add("touchPitch",V);let $=new zD(l),Y=new lT(l);p.dragRotate=new DH(l,$,Y),this._add("mouseRotate",$,["mousePitch"]),this._add("mousePitch",Y,["mouseRotate"]);let J=new lx(l),W=new bR(p,l);p.dragPan=new v3(_,J,W),this._add("mousePan",J),this._add("touchPan",W,["touchZoom","touchRotate"]);let oe=new dT,ce=new UD;p.touchZoomRotate=new Ml(_,ce,oe,N),this._add("touchRotate",oe,["touchPan","touchZoom"]),this._add("touchZoom",ce,["touchPan","touchRotate"]),this._add("blockableMapEvent",new vR(p));let de=p.scrollZoom=new xR(p,this);this._add("scrollZoom",de,["mousePan"]);let Ee=p.keyboard=new HD;this._add("keyboard",Ee);for(let ge of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])l.interactive&&l[ge]&&p[ge].enable(l[ge])}_add(l,p,_){this._handlers.push({handlerName:l,handler:p,allowed:_}),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!!pT(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(l,p,_){for(let x in l)if(x!==_&&(!p||p.indexOf(x)<0))return!0;return!1}handleWindowEvent(l){this.handleEvent(l,`${l.type}Window`)}_getMapTouches(l){let p=[];for(let _ of l)this._el.contains(_.target)&&p.push(_);return p}handleEvent(l,p){this._updatingCamera=!0;let _=l.type==="renderFrame",x=_?void 0:l,S={needsRenderFrame:!1},A={},N={},V=l.touches?this._getMapTouches(l.touches):void 0,$=V?fe(this._el,V):_?void 0:ye(this._el,l);for(let{handlerName:W,handler:oe,allowed:ce}of this._handlers){if(!oe.isEnabled())continue;let de;this._blockedByActive(N,ce,W)?oe.reset():oe[p||l.type]&&(de=oe[p||l.type](l,$,V),this.mergeHandlerResult(S,A,de,W,x),de&&de.needsRenderFrame&&this._triggerRenderFrame()),(de||oe.isActive())&&(N[W]=oe)}let Y={};for(let W in this._previousActiveHandlers)N[W]||(Y[W]=x);this._previousActiveHandlers=N,(Object.keys(Y).length||Sg(S))&&(this._changes.push([S,A,Y]),this._triggerRenderFrame()),(Object.keys(N).length||Sg(S))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:J}=S;J&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],J(this._map))}mergeHandlerResult(l,p,_,x,S){if(!_)return;Object.assign(l,_);let A={handlerName:x,originalEvent:_.originalEvent||S};_.zoomDelta!==void 0&&(p.zoom=A),_.panDelta!==void 0&&(p.drag=A),_.pitchDelta!==void 0&&(p.pitch=A),_.bearingDelta!==void 0&&(p.rotate=A)}_applyChanges(){let l={},p={},_={};for(let[x,S,A]of this._changes)x.panDelta&&(l.panDelta=(l.panDelta||new o.P(0,0))._add(x.panDelta)),x.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+x.zoomDelta),x.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+x.bearingDelta),x.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+x.pitchDelta),x.around!==void 0&&(l.around=x.around),x.aroundCoord!==void 0&&(l.aroundCoord=x.aroundCoord),x.pinchAround!==void 0&&(l.pinchAround=x.pinchAround),x.noInertia&&(l.noInertia=x.noInertia),Object.assign(p,S),Object.assign(_,A);this._updateMapTransform(l,p,_),this._changes=[]}_updateMapTransform(l,p,_){let x=this._map,S=x.transform,A=Oe=>[Oe.x,Oe.y,Oe.z];if((Oe=>{let Be=this._eventsInProgress.drag;return Be&&!this._handlersById[Be.handlerName].isActive()})()&&!Sg(l)){let Oe=S.zoom;S.cameraElevationReference="sea",this._originalZoom!=null&&S._orthographicProjectionAtLowPitch&&S.projection.name!=="globe"&&S.pitch===0?(S.cameraElevationReference="ground",S.zoom=this._originalZoom):(S.recenterOnTerrain(),S.cameraElevationReference="ground"),Oe!==S.zoom&&this._map._update(!0)}if(S._isCameraConstrained&&x._stop(!0),!Sg(l))return void this._fireEvents(p,_,!0);let{panDelta:N,zoomDelta:V,bearingDelta:$,pitchDelta:Y,around:J,aroundCoord:W,pinchAround:oe}=l;S._isCameraConstrained&&(V>0&&(V=0),S._isCameraConstrained=!1),oe!==void 0&&(J=oe),(V||(Oe=>p[Oe]&&!this._eventsInProgress[Oe])("drag"))&&J&&(this._dragOrigin=A(S.pointCoordinate3D(J)),this._originalZoom=S.zoom,this._trackingEllipsoid.setup(S._camera.position,this._dragOrigin)),S.cameraElevationReference="sea",x._stop(!0),J=J||x.transform.centerPoint,$&&(S.bearing+=$),Y&&(S.pitch+=Y),S._updateCameraState();let ce=[0,0,0];if(N)if(S.projection.name==="mercator"){let Oe=this._trackingEllipsoid.projectRay(S.screenPointToMercatorRay(J).dir),Be=this._trackingEllipsoid.projectRay(S.screenPointToMercatorRay(J.sub(N)).dir);ce[0]=Be[0]-Oe[0],ce[1]=Be[1]-Oe[1]}else{let Oe=S.pointCoordinate(J);if(S.projection.name==="globe"){N=N.rotate(-S.angle);let Be=S._pixelsPerMercatorPixel/S.worldSize;ce[0]=-N.x*o.eN(o.a$(Oe.y))*Be,ce[1]=-N.y*o.eN(S.center.lat)*Be}else{let Be=S.pointCoordinate(J.sub(N));Oe&&Be&&(ce[0]=Be.x-Oe.x,ce[1]=Be.y-Oe.y)}}let de=S.zoom,Ee=[0,0,0];if(V){let Oe=A(W||S.pointCoordinate3D(J)),Be={dir:o.aw([],o.av([],Oe,S._camera.position))};if(Be.dir[2]<0){let He=S.zoomDeltaToMovement(Oe,V);o.c4(Ee,Be.dir,He)}}let ge=o.d7(ce,ce,Ee);S._translateCameraConstrained(ge),V&&Math.abs(S.zoom-de)>1e-4&&S.recenterOnTerrain(),S.cameraElevationReference="ground",this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(p,_,!0)}_fireEvents(l,p,_){let x=pT(this._eventsInProgress),S=pT(l),A={};for(let Y in l){let{originalEvent:J}=l[Y];this._eventsInProgress[Y]||(A[`${Y}start`]=J),this._eventsInProgress[Y]=l[Y]}!x&&S&&this._fireEvent("movestart",S.originalEvent);for(let Y in A)this._fireEvent(Y,A[Y]);S&&this._fireEvent("move",S.originalEvent);for(let Y in l){let{originalEvent:J}=l[Y];this._fireEvent(Y,J)}let N={},V;for(let Y in this._eventsInProgress){let{handlerName:J,originalEvent:W}=this._eventsInProgress[Y];this._handlersById[J].isActive()||(delete this._eventsInProgress[Y],V=p[J]||W,N[`${Y}end`]=V)}for(let Y in N)this._fireEvent(Y,N[Y]);let $=pT(this._eventsInProgress);if(_&&(x||S)&&!$){this._updatingCamera=!0;let Y=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),J=W=>W!==0&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new kH("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}let mT="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class SR extends o.E{constructor(l,p){super(),this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=p.bearingSnap,this._respectPrefersReducedMotion=p.respectPrefersReducedMotion!==!1,o.aY(["_renderFrameCallback"],this)}getCenter(){return new o.aR(this.transform.center.lng,this.transform.center.lat)}setCenter(l,p){return this.jumpTo({center:l},p)}panBy(l,p,_){return l=o.P.convert(l).mult(-1),this.panTo(this.transform.center,Object.assign({offset:l},p),_)}panTo(l,p,_){return this.easeTo(Object.assign({center:l},p),_)}getZoom(){return this.transform.zoom}setZoom(l,p){return this.jumpTo({zoom:l},p),this}zoomTo(l,p,_){return this.easeTo(Object.assign({zoom:l},p),_)}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,_){return this.easeTo(Object.assign({bearing:l},p),_)}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?_/(2*Math.tan(.5*l.fovX)*l.aspect):x/(2*Math.tan(.5*l.fovY)*l.aspect)}_cameraForBoundsOnGlobe(l,p,_,x,S,A){let N=l.clone(),V=this._extendCameraOptions(A);N.bearing=x,N.pitch=S;let $=o.aR.convert(p),Y=o.aR.convert(_),J=.5*($.lat+Y.lat),W=.5*($.lng+Y.lng),oe=o.eQ(J,W),ce=o.aw([],oe),de=o.aw([],o.bI([],ce,[0,1,0])),Ee=o.bI([],de,ce),ge=[de[0],de[1],de[2],0,Ee[0],Ee[1],Ee[2],0,ce[0],ce[1],ce[2],0,0,0,0,1],Oe=[oe,o.eQ($.lat,$.lng),o.eQ(Y.lat,$.lng),o.eQ(Y.lat,Y.lng),o.eQ($.lat,Y.lng),o.eQ(J,$.lng),o.eQ(J,Y.lng),o.eQ($.lat,W),o.eQ(Y.lat,W)],Be=o.d8.fromPoints(Oe.map(Jt=>[o.bJ(de,Jt),o.bJ(Ee,Jt),o.bJ(ce,Jt)])),He=o.af([],Be.center,ge);o.eR(He)===0&&o.eS(He,0,0,1),o.aw(He,He),o.c4(He,He,o.aD),N.center=o.eT(He);let nt=N.getWorldToCameraMatrix(),et=o.bl(new Float64Array(16),nt);Be=o.d8.applyTransform(Be,o.aB([],nt,ge));let at=this._extendAABB(Be,N,V,x);if(!at)return void o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");Be=at,o.af(He,He,nt);let tt=.5*(Be.max[2]-Be.min[2]),Xe=this._minimumAABBFrustumDistance(N,Be),it=o.c4([],[0,0,1],tt),Wt=o.d7(it,He,it),Nt=Xe+(N.pitch===0?0:o.bG(He,Wt)),mi=N.globeCenterInViewSpace,jt=o.av([],He,[mi[0],mi[1],mi[2]]);o.aw(jt,jt),o.c4(jt,jt,Nt);let ci=o.d7([],He,jt);o.af(ci,ci,et);let cn=o.eD/o.aD,qt=o.ag(ci),Dt=o.ce(Math.max(qt*cn-o.eD,Number.EPSILON),0),Si=Math.min(N.zoomFromMercatorZAdjusted(Dt),V.maxZoom);return Si>.5*(o.cZ+o.cK)?(N.setProjection({name:"mercator"}),N.zoom=Si,this._cameraForBounds(N,p,_,x,S,A)):{center:N.center,zoom:Si,bearing:x,pitch:S}}_extendAABB(l,p,_,x){let S=.5*((_.padding.left||0)+(_.padding.right||0)),A=.5*((_.padding.top||0)+(_.padding.bottom||0)),N=A,V=S,$=S,Y=A,J=p.width-(V+$),W=p.height-(N+Y),oe=o.av([],l.max,l.min),ce=Math.min(J/oe[0],W/oe[1]),de=Math.min(p.scaleZoom(p.scale*ce),_.maxZoom);if(isNaN(de))return null;let Ee=p.scale/p.zoomScale(de),ge=new o.d8([l.min[0]-V*Ee,l.min[1]-Y*Ee,l.min[2]],[l.max[0]+$*Ee,l.max[1]+N*Ee,l.max[2]]),Oe=(typeof _.offset.x=="number"&&typeof _.offset.y=="number"?new o.P(_.offset.x,_.offset.y):o.P.convert(_.offset)).rotate(-o.an(x));return ge.center[0]-=Oe.x*Ee,ge.center[1]+=Oe.y*Ee,ge}queryTerrainElevation(l,p){let _=this.transform.elevation;return _?(p=Object.assign({},{exaggerated:!0},p),_.getAtPoint(o.ae.fromLngLat(l),null,p.exaggerated)):null}_cameraForBounds(l,p,_,x,S,A){if(l.projection.name==="globe")return this._cameraForBoundsOnGlobe(l,p,_,x,S,A);let N=l.clone(),V=this._extendCameraOptions(A);N.bearing=x,N.pitch=S;let $=o.aR.convert(p),Y=o.aR.convert(_),J=new o.aR($.lng,Y.lat),W=new o.aR(Y.lng,$.lat),oe=N.project($),ce=N.project(Y),de=this.queryTerrainElevation($),Ee=this.queryTerrainElevation(Y),ge=this.queryTerrainElevation(J),Oe=this.queryTerrainElevation(W),Be=[[oe.x,oe.y,Math.min(de||0,Ee||0,ge||0,Oe||0)],[ce.x,ce.y,Math.max(de||0,Ee||0,ge||0,Oe||0)]],He=o.d8.fromPoints(Be),nt=N.getWorldToCameraMatrix(),et=o.bl(new Float64Array(16),nt);He=o.d8.applyTransform(He,nt);let at=this._extendAABB(He,N,V,x);if(!at)return void o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");He=at;let tt=.5*o.av([],He.max,He.min)[2],Xe=this._minimumAABBFrustumDistance(N,He),it=[0,0,1,0];o.aC(it,it,nt),o.eU(it,it);let Wt=o.c4([],it,Xe+tt),Nt=o.d7([],He.center,Wt);o.af(He.center,He.center,et),o.af(Nt,Nt,et);let mi=N.unproject(new o.P(He.center[0],He.center[1])),jt=o.eV(N.projection,mi),ci=Math.pow(2,jt),cn=Math.min(N._zoomFromMercatorZ(Nt[2]*N.pixelsPerMeter*ci/N.worldSize),V.maxZoom);return N.mercatorFromTransition&&cn<.5*(o.cZ+o.cK)?(N.setProjection({name:"globe"}),N.zoom=cn,this._cameraForBounds(N,p,_,x,S,A)):{center:mi,zoom:cn,bearing:x,pitch:S}}fitBounds(l,p,_){let x=this.cameraForBounds(l,p);return this._fitInternal(x,p,_)}fitScreenCoordinates(l,p,_,x,S){let A=o.P.convert(l),N=o.P.convert(p),V=new o.P(Math.min(A.x,N.x),Math.min(A.y,N.y)),$=new o.P(Math.max(A.x,N.x),Math.max(A.y,N.y));if(this.transform.projection.name==="mercator"&&this.transform.anyCornerOffEdge(A,N))return this;let Y=this.transform.pointLocation3D(V),J=this.transform.pointLocation3D($),W=this.transform.pointLocation3D(new o.P(V.x,$.y)),oe=this.transform.pointLocation3D(new o.P($.x,V.y)),ce=[Math.min(Y.lng,J.lng,W.lng,oe.lng),Math.min(Y.lat,J.lat,W.lat,oe.lat)],de=[Math.max(Y.lng,J.lng,W.lng,oe.lng),Math.max(Y.lat,J.lat,W.lat,oe.lat)],Ee=x&&x.pitch?x.pitch:this.getPitch(),ge=this._cameraForBounds(this.transform,ce,de,_,Ee,x);return this._fitInternal(ge,x,S)}_fitInternal(l,p,_){return l?(p=Object.assign(l,p)).linear?this.easeTo(p,_):this.flyTo(p,_):this}jumpTo(l,p){this.stop();let _=l.preloadOnly?this.transform.clone():this.transform,x=!1,S=!1,A=!1;"zoom"in l&&_.zoom!==+l.zoom&&(x=!0,_.zoom=+l.zoom),l.center!==void 0&&(_.center=o.aR.convert(l.center)),"bearing"in l&&_.bearing!==+l.bearing&&(S=!0,_.bearing=+l.bearing),"pitch"in l&&_.pitch!==+l.pitch&&(A=!0,_.pitch=+l.pitch);let N=typeof l.padding=="number"?this._extendPadding(l.padding):l.padding;if(l.padding!=null&&!_.isPaddingEqual(N))if(l.retainPadding===!1){let V=_.clone();V.padding=N,_.setLocationAtPoint(_.center,V.centerPoint)}else _.padding=N;return l.preloadOnly?(this._preloadTiles(_),this):(this.fire(new o.z("movestart",p)).fire(new o.z("move",p)),x&&this.fire(new o.z("zoomstart",p)).fire(new o.z("zoom",p)).fire(new o.z("zoomend",p)),S&&this.fire(new o.z("rotatestart",p)).fire(new o.z("rotate",p)).fire(new o.z("rotateend",p)),A&&this.fire(new o.z("pitchstart",p)).fire(new o.z("pitch",p)).fire(new o.z("pitchend",p)),this.fire(new o.z("moveend",p)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||o.w(mT),this.transform.getFreeCameraOptions()}setFreeCameraOptions(l,p){let _=this.transform;if(!_.projection.supportsFreeCamera)return o.w(mT),this;this.stop();let x=_.zoom,S=_.pitch,A=_.bearing;_.setFreeCameraOptions(l);let N=x!==_.zoom,V=S!==_.pitch,$=A!==_.bearing;return this.fire(new o.z("movestart",p)).fire(new o.z("move",p)),N&&this.fire(new o.z("zoomstart",p)).fire(new o.z("zoom",p)).fire(new o.z("zoomend",p)),$&&this.fire(new o.z("rotatestart",p)).fire(new o.z("rotate",p)).fire(new o.z("rotateend",p)),V&&this.fire(new o.z("pitchstart",p)).fire(new o.z("pitch",p)).fire(new o.z("pitchend",p)),this.fire(new o.z("moveend",p)),this}easeTo(l,p){this._stop(!1,l.easeId),((l=Object.assign({offset:[0,0],duration:500,easing:o.eM},l)).animate===!1||this._prefersReducedMotion(l))&&(l.duration=0);let _=this.transform,x=this.getZoom(),S=this.getBearing(),A=this.getPitch(),N=this.getPadding(),V="zoom"in l?+l.zoom:x,$="bearing"in l?this._normalizeBearing(l.bearing,S):S,Y="pitch"in l?+l.pitch:A,J=this._extendPadding(l.padding),W=o.P.convert(l.offset),oe,ce,de;if(_.projection.name==="globe"){let it=o.ae.fromLngLat(_.center),Wt=W.rotate(-_.angle);it.x+=Wt.x/_.worldSize,it.y+=Wt.y/_.worldSize;let Nt=it.toLngLat(),mi=o.aR.convert(l.center||Nt);this._normalizeCenter(mi),oe=_.centerPoint.add(Wt),ce=new o.P(it.x,it.y).mult(_.worldSize),de=new o.P(o.aF(mi.lng),o.aJ(mi.lat)).mult(_.worldSize).sub(ce)}else{oe=_.centerPoint.add(W);let it=_.pointLocation(oe),Wt=o.aR.convert(l.center||it);this._normalizeCenter(Wt),ce=_.project(it),de=_.project(Wt).sub(ce)}let Ee=_.zoomScale(V-x),ge,Oe;l.around&&(ge=o.aR.convert(l.around),Oe=_.locationPoint(ge));let Be=this._zooming||V!==x,He=this._rotating||S!==$,nt=this._pitching||Y!==A,et=!_.isPaddingEqual(J),at=l.retainPadding===!1?_.clone():_,tt=it=>Wt=>{if(Be&&(it.zoom=o.ak(x,V,Wt)),He&&(it.bearing=o.ak(S,$,Wt)),nt&&(it.pitch=o.ak(A,Y,Wt)),et&&(at.interpolatePadding(N,J,Wt),oe=at.centerPoint.add(W)),ge)it.setLocationAtPoint(ge,Oe);else{let Nt=it.zoomScale(it.zoom-x),mi=V>x?Math.min(2,Ee):Math.max(.5,Ee),jt=Math.pow(mi,1-Wt),ci=it.unproject(ce.add(de.mult(Wt*jt)).mult(Nt));it.setLocationAtPoint(it.renderWorldCopies?ci.wrap():ci,oe)}return l.preloadOnly||this._fireMoveEvents(p),it};if(l.preloadOnly){let it=this._emulate(tt,l.duration,_);return this._preloadTiles(it),this}let Xe={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=Be,this._rotating=He,this._pitching=nt,this._padding=et,this._easeId=l.easeId,this._prepareEase(p,l.noMoveStart,Xe),this._ease(tt(_),it=>{_.cameraElevationReference==="sea"&&_.recenterOnTerrain(),this._afterEase(p,it)},l),this}_prepareEase(l,p,_={}){this._moving=!0,this.transform.cameraElevationReference="sea",this.transform._orthographicProjectionAtLowPitch&&this.transform.pitch===0&&this.transform.projection.name!=="globe"&&(this.transform.cameraElevationReference="ground"),p||_.moving||this.fire(new o.z("movestart",l)),this._zooming&&!_.zooming&&this.fire(new o.z("zoomstart",l)),this._rotating&&!_.rotating&&this.fire(new o.z("rotatestart",l)),this._pitching&&!_.pitching&&this.fire(new o.z("pitchstart",l))}_fireMoveEvents(l){this.fire(new o.z("move",l)),this._zooming&&this.fire(new o.z("zoom",l)),this._rotating&&this.fire(new o.z("rotate",l)),this._pitching&&this.fire(new o.z("pitch",l))}_afterEase(l,p){if(this._easeId&&p&&this._easeId===p)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";let _=this._zooming,x=this._rotating,S=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_&&this.fire(new o.z("zoomend",l)),x&&this.fire(new o.z("rotateend",l)),S&&this.fire(new o.z("pitchend",l)),this.fire(new o.z("moveend",l))}flyTo(l,p){if(this._prefersReducedMotion(l)){let Jt=o.aH(l,["center","zoom","bearing","pitch","around","padding","retainPadding"]);return this.jumpTo(Jt,p)}this.stop(),l=Object.assign({offset:[0,0],speed:1.2,curve:1.42,easing:o.eM},l);let _=this.transform,x=this.getZoom(),S=this.getBearing(),A=this.getPitch(),N=this.getPadding(),V="zoom"in l?o.aA(+l.zoom,_.minZoom,_.maxZoom):x,$="bearing"in l?this._normalizeBearing(l.bearing,S):S,Y="pitch"in l?+l.pitch:A,J=this._extendPadding(l.padding),W=_.zoomScale(V-x),oe=o.P.convert(l.offset),ce=_.centerPoint.add(oe),de=_.pointLocation(ce),Ee=o.aR.convert(l.center||de);this._normalizeCenter(Ee);let ge=_.project(de),Oe=_.project(Ee).sub(ge),Be=l.curve,He=Math.max(_.width,_.height),nt=He/W,et=Oe.mag();if("minZoom"in l){let Jt=o.aA(Math.min(l.minZoom,x,V),_.minZoom,_.maxZoom),Gi=He/_.zoomScale(Jt-x);Be=Math.sqrt(Gi/et*2)}let at=Be*Be;function tt(Jt){let Gi=(nt*nt-He*He+(Jt?-1:1)*at*at*et*et)/(2*(Jt?nt:He)*at*et);return Math.log(Math.sqrt(Gi*Gi+1)-Gi)}function Xe(Jt){return(Math.exp(Jt)-Math.exp(-Jt))/2}function it(Jt){return(Math.exp(Jt)+Math.exp(-Jt))/2}let Wt=tt(0),Nt=function(Jt){return it(Wt)/it(Wt+Be*Jt)},mi=function(Jt){return He*((it(Wt)*(Xe(Gi=Wt+Be*Jt)/it(Gi))-Xe(Wt))/at)/et;var Gi},jt=(tt(1)-Wt)/Be;if(Math.abs(et)<1e-6||!isFinite(jt)){if(Math.abs(He-nt)<1e-6)return this.easeTo(l,p);let Jt=ntl.maxDuration&&(l.duration=0);let ci=S!==$,cn=Y!==A,qt=!_.isPaddingEqual(J),Dt=l.retainPadding===!1?_.clone():_,Si=Jt=>Gi=>{let sn=Gi*jt,Mn=1/Nt(sn);Jt.zoom=Gi===1?V:x+Jt.scaleZoom(Mn),ci&&(Jt.bearing=o.ak(S,$,Gi)),cn&&(Jt.pitch=o.ak(A,Y,Gi)),qt&&(Dt.interpolatePadding(N,J,Gi),ce=Dt.centerPoint.add(oe));let en=Gi===1?Ee:Jt.unproject(ge.add(Oe.mult(mi(sn))).mult(Mn));return Jt.setLocationAtPoint(Jt.renderWorldCopies?en.wrap():en,ce),Jt._updateCameraOnTerrain(),l.preloadOnly||this._fireMoveEvents(p),Jt};if(l.preloadOnly){let Jt=this._emulate(Si,l.duration,_);return this._preloadTiles(Jt),this}return this._zooming=!0,this._rotating=ci,this._pitching=cn,this._padding=qt,this._prepareEase(p,!1),this._ease(Si(_),()=>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 _=this._onEaseEnd;this._onEaseEnd=void 0,_.call(this,p)}if(!l){let _=this.handlers;_&&_.stop(!1)}return this}_ease(l,p,_){_.animate===!1||_.duration===0?(l(1),p()):(this._easeStart=o.o.now(),this._easeOptions=_,this._onEaseFrame=l,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){let l=Math.min((o.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=o.bT(l,-180,180);let _=Math.abs(l-p);return Math.abs(l-360-p)<_&&(l-=360),Math.abs(l+360-p)<_&&(l+=360),l}_normalizeCenter(l){let p=this.transform;if(p.maxBounds||p.projection.name!=="globe"&&!p.renderWorldCopies)return;let _=l.lng-p.center.lng;l.lng+=_>180?-360:_<-180?360:0}_prefersReducedMotion(l){return this._respectPrefersReducedMotion&&o.o.prefersReducedMotion&&!(l&&l.essential)}_emulate(l,p,_){let x=Math.ceil(15*p/1e3),S=[],A=l(_.clone());for(let N=0;N<=x;N++){let V=A(N/x);S.push(V.clone())}return S}_preloadTiles(l,p){}}class cx{constructor(l={}){this.options=l,o.aY(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(l){let p=this.options&&this.options.compact,_=l._getUIString("AttributionControl.ToggleAttribution");this._map=l,this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=R("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._compactButton.setAttribute("aria-label",_);let x=R("span","mapboxgl-ctrl-icon",this._compactButton);return x.setAttribute("aria-hidden","true"),x.setAttribute("title",_),this._innerContainer=R("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||o.e.ACCESS_TOKEN}];if(l){let _=p.reduce((x,S,A)=>(S.value&&(x+=`${S.key}=${S.value}${Ax.length-S.length),l=l.filter((x,S)=>{for(let A=S+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 _=l.join(" | ");_!==this._attribHTML&&(this._attribHTML=_,l.length?(this._innerContainer.innerHTML=_,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 P0{constructor(){o.aY(["_updateLogo","_updateCompact"],this)}onAdd(l){this._map=l,this._container=R("div","mapboxgl-ctrl");let p=R("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 _=l[p].getSource();if(_.hasOwnProperty("mapbox_logo")&&!_.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 hT{constructor(){o.aY(["_onIndoorUpdate"],this)}onAdd(l){return this._map=l,this._container=R("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 _=R("button",l,this._container);return _.type="button",_.addEventListener("click",p),_}_createSeparator(){return R("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 _=l.floors.sort((x,S)=>S.levelOrder-x.levelOrder);p?(Array.from(this._container.children).forEach(x=>x.remove()),this.addCurrentFloors(_)):this.addCurrentFloors(_)}addCurrentFloors(l){for(let p=0;p{this._map._selectIndoorFloor(_.id),this._model&&(this._model.selectedFloorId=_.id),Array.from(this._container.children).forEach(S=>{S.classList.contains("mapboxgl-ctrl-level-button")&&S.classList.remove("mapboxgl-ctrl-level-button-selected")}),x.classList.add("mapboxgl-ctrl-level-button-selected")});this._setButtonTitle(x,_.shortName),this._model&&_.id===this._model.selectedFloorId&&x.classList.add("mapboxgl-ctrl-level-button-selected"),this._container.append(x),p=this._endTime)return this._end;let p=o.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,_){this._start=this.getValue(p),this._end=l,this._startTime=p,this._endTime=p+_}}let SS={"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 fT extends o.z{constructor(l,p,_,x){let{point:S,lngLat:A,originalEvent:N,target:V}=l;super(l.type,{point:S,lngLat:A,originalEvent:N,target:V}),this.preventDefault=()=>{l.preventDefault()},this.id=p,this.interaction=_,this.feature=x}}class b3{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 _=p.filter,x=p.type;_&&this.filters.set(l,o.b6(_)),x==="mouseover"&&(x="mouseenter"),x==="mouseout"&&(x="mouseleave");let S=this.interactionsByType.get(x)||new Map;x==="mouseenter"||x==="mouseleave"?(this.delegatedInteractions.size===0&&(this.map.on("mousemove",this.handleMove),this.map.on("mouseout",this.handleOut)),this.delegatedInteractions.set(l,p)):S.size===0&&this.map.on(x,this.handleType),S.size===0&&this.interactionsByType.set(x,S),S.set(l,p),this.typeById.set(l,x)}get(l){let p=this.typeById.get(l);if(!p)return;let _=this.interactionsByType.get(p);return _?_.get(l):void 0}remove(l){let p=this.typeById.get(l);if(!p)return;this.typeById.delete(l),this.filters.delete(l);let _=this.interactionsByType.get(p);_&&(_.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))):_.size===0&&this.map.off(p,this.handleType))}queryTargets(l,p){let _=[];for(let[x,S]of p)S.target&&_.push({targetId:x,target:S.target,filter:this.filters.get(x)});return this.map.style.queryRenderedTargets(l,_,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 _=new Map;for(let[x,{feature:S}]of this.prevHoveredFeatures)this.hoveredFeatures.has(x)||_.set(S.id,S);_.size&&(l.type="mouseleave",this.handleType(l,Array.from(_.values())))}handleOut(l){let p=Array.from(this.hoveredFeatures.values()).map(({feature:_})=>_);p.length&&(l.type="mouseleave",this.handleType(l,p)),this.hoveredFeatures.clear()}handleType(l,p){let _=l.type==="mouseenter";if(_&&!this.interactionsByType.has(l.type))return void o.w("mouseenter interaction required for mouseleave to work.");let x=Array.from(this.interactionsByType.get(l.type)).reverse(),S=!!p;p=p||this.queryTargets(l.point,x);let A=!1,N=new Set;for(let V of p){for(let[$,Y]of x){if(!Y.target)continue;let J=V.variants?V.variants[$]:null;if(J){for(let W of J){if(Fy(W,V,N,$))continue;let oe=new o.dt(V,W),ce=ob(W,V,$);S&&(oe.state=this.map.getFeatureState(oe));let de=_?this.prevHoveredFeatures.get(ce):null,Ee=new fT(l,$,Y,oe),ge=de?de.stop:Y.handler(Ee);if(_&&this.hoveredFeatures.set(ce,{feature:V,stop:ge}),ge!==!1){A=!0;break}}if(A)break}}if(A)break}if(!A)for(let[V,$]of x){let{handler:Y,target:J}=$;if(!J&&Y(new fT(l,V,$,null))!==!1)break}}}function OH(y,l){if(Array.isArray(y)&&Array.isArray(l)){let p=new Set(y),_=new Set(l);return p.size===_.size&&y.every(x=>_.has(x))}return o.by(y,l)}let gT={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"},C3={showCompass:!0,showZoom:!0,visualizePitch:!1};class x3{constructor(l,p,_=!1){this._clickTolerance=10,this.element=p,this.mouseRotate=new zD({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,_&&(this.mousePitch=new lT({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),o.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),ne()}move(l,p){let _=this.map,x=this.mouseRotate.mousemoveWindow(l,p),S=x&&x.bearingDelta;if(S&&_.setBearing(_.getBearing()+S),this.mousePitch){let A=this.mousePitch.mousemoveWindow(l,p),N=A&&A.pitchDelta;N&&_.setPitch(_.getPitch()+N)}}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(){me(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup)}mousedown(l){this.down(Object.assign({},l,{ctrlKey:!0,preventDefault:()=>l.preventDefault()}),ye(this.element,l)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)}mousemove(l){this.move(l,ye(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=fe(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=fe(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(_).distSqr(l)180;){let _=p.locationPoint3D(y);if(_.x>=0&&_.y>=0&&_.x<=p.width&&_.y<=p.height)break;y.lng>p.center.lng?y.lng-=360:y.lng+=360}return y}let dx={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%)"},Fh={rotation:0,rotationAlignment:"auto",pitchAlignment:"auto",occludedOpacity:.2,altitude:0};class E_ extends o.E{constructor(l,p){super(),(l instanceof HTMLElement||p)&&(l=Object.assign({element:l},p)),o.aY(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this);let{anchor:_="center",color:x="#3FB1CE",scale:S=1,draggable:A=!1,clickTolerance:N=0,rotation:V=Fh.rotation,rotationAlignment:$=Fh.rotationAlignment,pitchAlignment:Y=Fh.pitchAlignment,occludedOpacity:J=Fh.occludedOpacity,altitude:W=Fh.altitude}=l||{};this._anchor=_,this._color=x,this._scale=S,this._draggable=A,this._clickTolerance=N,this._rotation=V,this._rotationAlignment=$,this._pitchAlignment=Y,this._occludedOpacity=J,this._altitude=W,this._state="inactive",this._isDragging=!1,this._updateMoving=()=>this._update(!0),l&&l.element?(this._element=l.element,this._offset=o.P.convert(l&&l.offset||[0,0])):(this._defaultMarker=!0,this._element=this._createDefaultMarker(),this._offset=o.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 dx)oe.remove(`mapboxgl-marker-anchor-${de}`);oe.add(`mapboxgl-marker-anchor-${this._anchor}`);let ce=l&&l.className?l.className.trim().split(/\s+/):[];oe.add(...ce),this._popup=null}_createDefaultMarker(){let l=R("div"),p=z("svg",{display:"block",height:41*this._scale+"px",width:27*this._scale+"px",viewBox:"0 0 27 41"},l);if(this._altitude===0){let _=z("radialGradient",{id:"shadowGradient"},z("defs",{},p));z("stop",{offset:"10%","stop-opacity":.4},_),z("stop",{offset:"100%","stop-opacity":.05},_),z("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},p)}return z("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),z("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),z("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=o.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||Fh.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 x=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":[x,-1*(38.1-13.5+x)],"bottom-right":[-x,-1*(38.1-13.5+x)],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,_=l.charCode||l.keyCode;p!=="Space"&&p!=="Enter"&&_!==32&&_!==13||this.togglePopup()}_onMapClick(l){let p=l.originalEvent.target,_=this._element;this._popup&&(p===_||_.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 _=l.unproject(p,this._altitude),x=l.getFreeCameraOptions();if(!x.position)return!1;let S=x.position.toLngLat();return S.distanceTo(_)<.9*S.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 _=l.unproject(p,this._altitude),x;l._showingGlobe()&&o.eY(l.transform,this._lngLat)?x=0:(x=1-l._queryFogOpacity(_),l.transform._terrainEnabled()&&l.getTerrain()&&this._behindTerrain()&&(x*=this._occludedOpacity)),this._element.style.opacity=`${x}`,this._element.style.pointerEvents=x>0?"auto":"none",this._popup&&this._popup._setOpacity(x),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) ${dx[this._anchor]} ${this._calculateXYTransform()} ${this._calculateZTransform()} translate(${p.x}px,${p.y}px) `}_calculateXYTransform(){let l=this._pos,p=this._map,_=this.getPitchAlignment();if(!p||!l||_!=="map")return"";if(!p._showingGlobe()){let V=p.getPitch();return V?`rotateX(${V}deg)`:""}let x=o.cW(o.eZ(p.transform,this._lngLat)),S=l.sub(o.e_(p.transform)),A=Math.abs(S.x)+Math.abs(S.y);if(A===0)return"";let N=x/A;return`rotateX(${-S.y*N}deg) rotateY(${S.x*N}deg)`}_calculateZTransform(){let l=this._pos,p=this._map;if(!p||!l)return"";let _=0,x=this.getRotationAlignment();if(x==="map")if(p._showingGlobe()){let S=p.project(new o.aR(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),A=p.project(new o.aR(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(S);_=o.cW(Math.atan2(A.y,A.x))-90}else _=-p.getBearing();else if(x==="horizon"){let S=o.ah(4,6,p.getZoom()),A=o.e_(p.transform);A.y+=S*p.transform.height;let N=l.sub(A),V=o.cW(Math.atan2(N.y,N.x));_=(V>90?V-270:V+90)*(1-S)}return _+=this._rotation,_?`rotateZ(${_}deg)`:""}_update(l){cancelAnimationFrame(this._updateFrameId);let p=this._map;p&&(p.transform.renderWorldCopies&&(this._lngLat=jD(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=o.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 _=this._pointerdownPos,x=this._positionDelta;if(_&&x){if(!this._isDragging){let S=this._clickTolerance||p._clickTolerance;if(l.point.dist(_)y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(y.antialias&&o.eW(window)&&(y.antialias=!1,o.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Gu(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies,null,null),y),this._repaint=!!y.repaint,this._interactive=y.interactive,this._minTileCacheSize=y.minTileCacheSize,this._maxTileCacheSize=y.maxTileCacheSize,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=y.crossSourceCollisions,this._collectResourceTiming=y.collectResourceTiming,this._language=this._parseLanguage(y.language),this._worldview=y.worldview,this._renderTaskQueue=new Ql,this._domRenderTaskQueue=new Ql,this._controls=[],this._markers=[],this._popups=[],this._mapId=o.b2(),this._locale=Object.assign({},SS,y.locale),this._clickTolerance=y.clickTolerance,this._cooperativeGestures=y.cooperativeGestures,this._performanceMetricsCollection=y.performanceMetricsCollection,this._tessellationStep=y.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=y.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new T_(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=y.scaleFactor,this._requestManager=new we(y.transformRequest,y.accessToken,y.testMode),this._silenceAuthErrors=!!y.testMode,this._contextCreateOptions=y.contextCreateOptions?Object.assign({},y.contextCreateOptions):{},typeof y.container=="string"){let p=document.getElementById(y.container);if(!p)throw new Error(`Container '${y.container.toString()}' not found.`);this._container=p}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(this._container.childNodes.length>0&&o.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."),y.maxBounds&&this.setMaxBounds(y.maxBounds),this._spriteFormat=y.spriteFormat,o.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new Df),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 Ku(this,y),this._localFontFamily=y.localFontFamily,this._localIdeographFontFamily=y.localIdeographFontFamily,(y.style||!y.testMode)&&this.setStyle(y.style||o.e.DEFAULT_STYLE,{config:y.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),y.projection&&this.setProjection(y.projection),this.indoor=new jC(this),y.hash&&(this._hash=new FD(typeof y.hash=="string"&&y.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){l.center==null&&l.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch});let p=y.bounds;p&&(this.resize(),this.fitBounds(p,Object.assign({},y.fitBoundsOptions,{duration:0})))}this.resize(),y.attributionControl&&this.addControl(new cx({customAttribution:y.customAttribution})),this._logoControl=new P0,this.addControl(this._logoControl,y.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 o.z(`${p.dataType}data`,p))}),this.on("dataloading",p=>{this.fire(new o.z(`${p.dataType}dataloading`,p))}),this._interactions=new b3(this)}_getMapId(){return this._mapId}addControl(y,l){if(l===void 0&&(l=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new o.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let p=y.onAdd(this);this._controls.push(y);let _=this._controlPositions[l];return l.indexOf("bottom")!==-1?_.insertBefore(p,_.firstChild):_.appendChild(p),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new o.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let l=this._controls.indexOf(y);return l>-1&&this._controls.splice(l,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(y){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 o.z("movestart",y)).fire(new o.z("move",y)),this.fire(new o.z("resize",y)),l&&this.fire(new o.z("moveend",y)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(y){return this.transform.setMaxBounds(o.aI.convert(y)),this._update()}setMinZoom(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y?this.setZoom(y):this.fire(new o.z("zoomstart")).fire(new o.z("zoom")).fire(new o.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y?this.setPitch(y):this.fire(new o.z("pitchstart")).fire(new o.z("pitch")).fire(new o.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(y){return this._scaleFactor=y,this.painter.scaleFactor=y,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(l=>l.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(y){return y==="auto"?navigator.language:Array.isArray(y)?y.length===0?void 0:y.map(l=>l==="auto"?navigator.language:l):y}setLanguage(y){let l=this._parseLanguage(y);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(y){return this.style&&y!==this._worldview?(this._worldview=y,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(y){return this._lazyInitEmptyStyle(),y?typeof y=="string"&&(y={name:y}):y=null,this._useExplicitProjection=!!y,this._prioritizeAndUpdateProjection(y,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;let y=this.transform,l=y.projection.name,p;l==="globe"&&y.zoom>=o.cK?(y.setMercatorFromTransition(),p=!0):l==="mercator"&&y.zoom=o.cK?this.transform.setMercatorFromTransition():this.transform.setProjection(y),this.style.applyProjectionUpdate(),l&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(y,l){return this.transform.locationPoint3D(o.aR.convert(y),l)}unproject(y,l){return this.transform.pointLocation3D(o.P.convert(y),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(y,l,p){let _=x=>{let S=[];if(Array.isArray(l)){let A=l.filter(N=>this.getLayer(N));S=A.length?this.queryRenderedFeatures(x,{layers:A}):[]}else S=this.queryRenderedFeatures(x,{target:l});return S};if(y==="mouseenter"||y==="mouseover"){let x=!1;return{listener:p,targets:l,delegates:{mousemove:A=>{let N=_(A.point);N.length?x||(x=!0,p.call(this,new ld(y,this,A.originalEvent,{features:N}))):x=!1},mouseout:()=>{x=!1}}}}if(y==="mouseleave"||y==="mouseout"){let x=!1;return{listener:p,targets:l,delegates:{mousemove:N=>{_(N.point).length?x=!0:x&&(x=!1,p.call(this,new ld(y,this,N.originalEvent)))},mouseout:N=>{x&&(x=!1,p.call(this,new ld(y,this,N.originalEvent)))}}}}{let x=S=>{let A=_(S.point);A.length&&(S.features=A,p.call(this,S),delete S.features)};return{listener:p,targets:l,delegates:{[y]:x}}}}on(y,l,p){if(typeof l=="function"||p===void 0)return super.on(y,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let _=this._createDelegatedListener(y,l,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(_);for(let x in _.delegates)this.on(x,_.delegates[x]);return this}once(y,l,p){if(typeof l=="function"||p===void 0)return super.once(y,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let _=this._createDelegatedListener(y,l,p);for(let x in _.delegates)this.once(x,_.delegates[x]);return this}off(y,l,p){if(typeof l=="function"||p===void 0)return super.off(y,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let _=this._delegatedListeners?this._delegatedListeners[y]:void 0;return _&&(x=>{for(let S=0;S{if(p){let x=typeof p=="string"?p:p instanceof Error?p.message:p.error;o.w(`Unable to perform style diff: ${x}. Rebuilding the style from scratch.`),this._updateStyle(y,l)}else _&&this._update(!0)},()=>this._postStyleLoadEvent()),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._localFontFamily=l.localFontFamily,this._updateStyle(y,l))}_getUIString(y){let l=this._locale[y];if(l==null)throw new Error(`Missing UI string '${y}'`);return l}_updateStyle(y,l){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),y){let p=Object.assign({},l);l&&l.config&&(p.initialConfig=l.config,delete p.config),this.style=new Rh(this,p).load(y),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new Rh(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():(o.w("There is no style added to the map."),!1)}_isValidId(y){return y==null?(this.fire(new o.y(new Error("IDs can't be empty."))),!1):!o.dm(y)||(this.fire(new o.y(new Error(`IDs can't contain special symbols: "${y}".`))),!1)}_isTargetValid(y){return"featuresetId"in y?this._isValidId("importId"in y?y.importId:y.featuresetId):"layerId"in y&&this._isValidId(y.layerId)}_areTargetsValid(y){if(Array.isArray(y)){for(let l of y)if(!this._isValidId(l))return!1;return!0}return this._isTargetValid(y)}addSource(y,l){return this._isValidId(y)?(this._lazyInitEmptyStyle(),this.style.addSource(y,l),this._update(!0)):this}isSourceLoaded(y){return!!this._isValidId(y)&&!!this.style&&this.style._isSourceCacheLoaded(y)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(y,l,p){this._lazyInitEmptyStyle(),this.style.addSourceType(y,l,p)}removeSource(y){return this._isValidId(y)?(this.style.removeSource(y),this._updateTerrain(),this._update(!0)):this}getSource(y){return this._isValidId(y)?this.style.getOwnSource(y):null}addImage(y,l,{pixelRatio:p=1,sdf:_=!1,stretchX:x,stretchY:S,content:A}={}){this._lazyInitEmptyStyle();let N=o.I.from(y);if(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap){let{width:V,height:$,data:Y}=o.o.getImageData(l);this.style.addImage(N,{data:new o.q({width:V,height:$},Y),pixelRatio:p,stretchX:x,stretchY:S,content:A,sdf:_,version:0,usvg:!1})}else if(l.width===void 0||l.height===void 0)this.fire(new o.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:V,height:$}=l,Y=l;this.style.addImage(N,{data:new o.q({width:V,height:$},new Uint8Array(Y.data)),pixelRatio:p,stretchX:x,stretchY:S,content:A,sdf:_,usvg:!1,version:0,userImage:Y}),Y.onAdd&&Y.onAdd(this,y)}}updateImage(y,l){this._lazyInitEmptyStyle();let p=o.I.from(y),_=this.style.getImage(p);if(!_)return void this.fire(new o.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let x=l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap?o.o.getImageData(l):l,{width:S,height:A,data:N}=x;if(S===void 0||A===void 0)return void this.fire(new o.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(S!==(_.usvg?_.icon.usvg_tree.width:_.data.width)||A!==(_.usvg?_.icon.usvg_tree.height:_.data.height))return void this.fire(new o.y(new Error(`The width and height of the updated image (${S}, ${A}) must be that same as the previous version of the image (${_.data.width}, ${_.data.height})`)));let V=!(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap),$=!1;_.usvg?(_.data=new o.q({width:S,height:A},new Uint8Array(N)),_.usvg=!1,_.icon=void 0,$=!0):_.data.replace(N,V),this.style.updateImage(p,_,$)}hasImage(y){return y?!!this.style&&!!this.style.getImage(o.I.from(y)):(this.fire(new o.y(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(o.I.from(y))}loadImage(y,l){o.n(this._requestManager.transformRequest(y,o.R.Image),(p,_)=>{l(p,_ instanceof HTMLImageElement?o.o.getImageData(_):_)})}listImages(){return this.style.listImages().map(y=>y.name)}addModel(y,l){this._lazyInitEmptyStyle(),this.style.addModel(y,l)}hasModel(y){return y?this.style.hasModel(y):(this.fire(new o.y(new Error("Missing required model id"))),!1)}removeModel(y){this.style.removeModel(y)}listModels(){return this.style.listModels()}addLayer(y,l){return this._isValidId(y.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(y,l),this._update(!0)):this}getSlot(y){let l=this.getLayer(y);return l&&l.slot||null}setSlot(y,l){return this.style.setSlot(y,l),this.style.mergeLayers(),this._update(!0)}addImport(y,l){return this.style.addImport(y,l).catch(p=>this.fire(new o.y(new Error("Failed to add import",p)))),this}updateImport(y,l){return typeof l!="string"&&l.id!==y?(this.removeImport(y),this.addImport(l)):(this.style.updateImport(y,l),this._update(!0))}removeImport(y){return this.style.removeImport(y),this}moveImport(y,l){return this.style.moveImport(y,l),this._update(!0)}moveLayer(y,l){return this._isValidId(y)?(this.style.moveLayer(y,l),this._update(!0)):this}removeLayer(y){return this._isValidId(y)?(this.style.removeLayer(y),this._update(!0)):this}getLayer(y){if(!this._isValidId(y))return null;let l=this.style.getOwnLayer(y);return l?l.type==="custom"?l.implementation:l.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(y,l,p){return this._isValidId(y)?(this.style.setLayerZoomRange(y,l,p),this._update(!0)):this}setFilter(y,l,p={}){return this._isValidId(y)?(this.style.setFilter(y,l,p),this._update(!0)):this}getFilter(y){return this._isValidId(y)?this.style.getFilter(y):null}setPaintProperty(y,l,p,_={}){return this._isValidId(y)?(this.style.setPaintProperty(y,l,p,_),this._update(!0)):this}getPaintProperty(y,l){return this._isValidId(y)?this.style.getPaintProperty(y,l):null}setLayoutProperty(y,l,p,_={}){return this._isValidId(y)?(this.style.setLayoutProperty(y,l,p,_),this._update(!0)):this}getLayoutProperty(y,l){return this._isValidId(y)?this.style.getLayoutProperty(y,l):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(y){return this.style.setGlyphsUrl(y),this._update(!0)}getSchema(y){return this.style.getSchema(y)}setSchema(y,l){return this.style.setSchema(y,l),this._update(!0)}getConfig(y){return this.style.getConfig(y)}setConfig(y,l){return this.style.setConfig(y,l),this._update(!0)}getConfigProperty(y,l){return this.style.getConfigProperty(y,l)}setConfigProperty(y,l,p){return this.style.setConfigProperty(y,l,p),this._update(!0)}getFeaturesetDescriptors(y){return this.style.getFeaturesetDescriptors(y)}setLights(y){if(this._lazyInitEmptyStyle(),y&&y.length===1&&y[0].type==="flat"){let l=y[0];l.properties?this.style.setFlatLight(l.properties,l.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(y),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){let y=this.style.getLights()||[];return y.length===0&&y.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),y}setLight(y,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:y}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(y){return this._lazyInitEmptyStyle(),!y&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(y),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(y){return this._lazyInitEmptyStyle(),this.style.setFog(y),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(y){return this._lazyInitEmptyStyle(),this.style.setSnow(y),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(y){return this._lazyInitEmptyStyle(),this.style.setRain(y),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(y){return this._lazyInitEmptyStyle(),this.style.setColorTheme(y),this._update(!0)}setImportColorTheme(y,l){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(y,l),this._update(!0)}setCamera(y){return this.style.setCamera(y),this._triggerCameraUpdate(y)}_triggerCameraUpdate(y){return this._update(this.transform.setOrthographicProjectionAtLowPitch(y["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(y){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(o.aR.convert(y),this.transform):0}setFeatureState(y,l){return y.source&&!this._isValidId(y.source)?this:(this.style.setFeatureState(y,l),this._update())}removeFeatureState(y,l){return y.source&&!this._isValidId(y.source)?this:(this.style.removeFeatureState(y,l),this._update())}getFeatureState(y){return y.source&&!this._isValidId(y.source)?null:this.style.getFeatureState(y)}_selectIndoorFloor(y){this.indoor.selectFloor(y)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new hT),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;let y=this._container.getBoundingClientRect().width||400,l=this._container.getBoundingClientRect().height||300,p,_,x,S=this._container;for(;S&&(!_||!x);){let A=window.getComputedStyle(S).transform;A&&A!=="none"&&(p=A.match(/matrix.*\((.+)\)/)[1].split(", "),p[0]&&p[0]!=="0"&&p[0]!=="1"&&(_=p[0]),p[3]&&p[3]!=="0"&&p[3]!=="1"&&(x=p[3])),S=S.parentElement}this._containerWidth=_?Math.abs(y/_):y,this._containerHeight=x?Math.abs(l/x):l}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.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 y=this._container;y.classList.add("mapboxgl-map"),(this._missingCSSCanary=R("div","mapboxgl-canary",y)).style.visibility="hidden",this._detectMissingCSS();let l=this._canvasContainer=R("div","mapboxgl-canvas-container",y);this._canvas=R("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=R("div","mapboxgl-control-container",y),_=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(x=>{_[x]=R("div",`mapboxgl-ctrl-${x}`,p)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(y,l){let p=o.o.devicePixelRatio||1;this._canvas.width=p*Math.ceil(y),this._canvas.height=p*Math.ceil(l),this._canvas.style.width=`${y}px`,this._canvas.style.height=`${l}px`}_addMarker(y){this._markers.push(y)}_removeMarker(y){let l=this._markers.indexOf(y);l!==-1&&this._markers.splice(l,1)}_addPopup(y){this._popups.push(y)}_removePopup(y){let l=this._popups.indexOf(y);l!==-1&&this._popups.splice(l,1)}_setupPainter(){let y=Object.assign({},P.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),l=this._canvas.getContext("webgl2",y);l?(Xn(l,!0),this.painter=new _S(l,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",p=>{p.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),o.k.testSupport(l)):this.fire(new o.y(new Error("Failed to initialize WebGL")))}_contextLost(y){y.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.z("webglcontextlost",{originalEvent:y}))}_contextRestored(y){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 o.z("webglcontextrestored",{originalEvent:y}))}_onMapScroll(y){if(y.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(y){return this.style?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_requestDomTask(y){!this.loaded()||this.loaded()&&!this.isMoving()?y():this._domRenderTaskQueue.add(y)}_render(y){let l;this.fire(new o.z("renderstart")),++this._frameId;let p=this.painter.context.extTimerQuery,_=o.o.now(),x=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(l=x.createQuery(),x.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(y),this._domRenderTaskQueue.run(y),this._removed)return;this._updateProjectionTransition();let S=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;let $=this.transform.zoom,Y=this.transform.pitch,J=o.o.now(),W=new o.ac($,{now:J,fadeDuration:S,pitch:Y,transition:this.style.transition,worldview:this._worldview});this.style.update(W)}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(_),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):A=this._updateAverageElevation(_);let N=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,S,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),N&&(this._placementDirty=N.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:S,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 o.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,m.mark(c.load),this.fire(new o.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 $=o.o.now()-_;x.endQuery(p.TIME_ELAPSED_EXT),setTimeout(()=>{let Y=x.getQueryParameter(l,x.QUERY_RESULT)/1e6;x.deleteQuery(l),this.fire(new o.z("gpu-timing-frame",{cpuTime:$,gpuTime:Y}))},50)}if(this.listens("gpu-timing-layer")){let $=this.painter.collectGpuTimers();setTimeout(()=>{let Y=this.painter.queryGpuTimers($);this.fire(new o.z("gpu-timing-layer",{layerTimes:Y}))},50)}if(this.listens("gpu-timing-deferred-render")){let $=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{let Y=this.painter.queryGpuTimeDeferredRender($);this.fire(new o.z("gpu-timing-deferred-render",{gpuTime:Y}))},50)}let V=this._sourcesDirty||this._styleDirty||this._placementDirty||A;if(V||this._repaint)this.triggerRepaint();else{let $=this.idle();if($&&(A=this._updateAverageElevation(_,!0)),A)this.triggerRepaint();else if(this._triggerFrame(!1),$&&(this.fire(new o.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){let Y=this._calculateSpeedIndex();this.fire(new o.z("speedindexcompleted",{speedIndex:Y})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||V||(this._fullyLoaded=!0,m.mark(c.fullLoad),this._performanceMetricsCollection&&ui(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(y){for(let l of this._markers)y&&!this.getRenderWorldCopies()&&(l._lngLat=l._lngLat.wrap()),l._update();for(let l of this._popups)!y||this.getRenderWorldCopies()||l._trackPointer||(l._lngLat=l._lngLat.wrap()),l._update()}_updateAverageElevation(y,l=!1){let p=x=>(this.transform.averageElevation=x,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&p(0);let _=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(_||(l||y-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(y)){let x=this.transform.averageElevation,S=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(S)?S=0:this._averageElevationLastSampledAt=y;let A=Math.abs(x-S);if(A>1){if(this._isInitialLoad||_)return this._averageElevation.jumpTo(S),p(S);this._averageElevation.easeTo(S,y,300)}else if(A>1e-4)return this._averageElevation.jumpTo(S),p(S)}return!!this._averageElevation.isEasing(y)&&p(this._averageElevation.getValue(y))}_authenticate(){wn(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,y=>{if(y&&(y.message===Qe||y.status===401)){let l=this.painter.context.gl;Xn(l,!1),this._logoControl instanceof P0&&this._logoControl._updateLogo(),l&&l.clear(l.DEPTH_BUFFER_BIT|l.COLOR_BUFFER_BIT|l.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new o.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/")))}}),Kt(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&ht(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){let y=this._isDragging();this.painter.updateTerrain(this.style,y)}_calculateSpeedIndex(){let y=this.painter.canvasCopy(),l=this.painter.getCanvasCopiesAndTimestamps();l.timeStamps.push(performance.now());let p=this.painter.context.gl,_=p.createFramebuffer();function x(S){p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,S,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,_),this._canvasPixelComparison(x(y),l.canvasCopies.map(x),l.timeStamps)}_canvasPixelComparison(y,l,p){let _=p[1]-p[0],x=y.length/4;for(let S=0;S{let p=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,p&&this._render(l)}))}_preloadTiles(y){let l=this.style?this.style.getSourceCaches():[];return o.bw(l,(p,_)=>p._preloadTiles(y,_),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(y){this._trackResize&&this.resize({originalEvent:y})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(y){this._showParseStatus!==y&&(this._showParseStatus=y,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(y){this._showTerrainWireframe!==y&&(this._showTerrainWireframe=y,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(y){this._showLayers2DWireframe!==y&&(this._showLayers2DWireframe=y,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(y){this._showLayers3DWireframe!==y&&(this._showLayers3DWireframe=y,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(y){this._speedIndexTiming!==y&&(this._speedIndexTiming=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,this._tp.refreshUI(),y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(y){this._showTileAABBs!==y&&(this._showTileAABBs=y,this._tp.refreshUI(),y&&this._update())}_setCacheLimits(y,l){o.eX(y,l)}get version(){return a}},NavigationControl:class{constructor(y={}){this.options=Object.assign({},C3,y),this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(o.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",l=>{this._map&&this._map.zoomIn({},{originalEvent:l})}),R("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})}),R("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.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=R("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){let y=this._map;if(!y)return;let l=y.getZoom(),p=l===y.getMaxZoom(),_=l===y.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=_,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",_.toString())}_rotateCompassArrow(){let y=this._map;if(!y)return;let l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(y.transform.pitch*(Math.PI/180)),.5)}) rotateX(${y.transform.pitch}deg) rotateZ(${y.transform.angle*(180/Math.PI)}deg)`:`rotate(${y.transform.angle*(180/Math.PI)}deg)`;y._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=l)})}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),y.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&y.on("pitch",this._rotateCompassArrow),y.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new x3(y,this._compass,this.options.visualizePitch)),this._container}onRemove(){let y=this._map;y&&(this._container.remove(),this.options.showZoom&&y.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&y.off("pitch",this._rotateCompassArrow),y.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(y,l){let p=R("button",y,this._container);return p.type="button",p.addEventListener("click",l),p}_setButtonTitle(y,l){if(!this._map)return;let p=this._map._getUIString(`NavigationControl.${l}`);y.setAttribute("aria-label",p),y.firstElementChild&&y.firstElementChild.setAttribute("title",p)}},GeolocateControl:class extends o.E{constructor(y={}){super();let l=navigator.geolocation;this.options=Object.assign({geolocation:l},N0,y),o.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Wy(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(y){return this._map=y,this._container=R("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(y){let l=(p=!!this.options.geolocation)=>{this._supportsGeolocation=p,y(p)};this._supportsGeolocation!==void 0?y(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(p=>l(p.state!=="denied")).catch(()=>l()):l()}_isOutOfMapMaxBounds(y){let l=this._map.getMaxBounds(),p=y.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(y){if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new o.z("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,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(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("geolocate",y)),this._finish()}}_updateCamera(y){let l=new o.aR(y.coords.longitude,y.coords.latitude),p=y.coords.accuracy,_=this._map.getBearing(),x=Object.assign({bearing:_},this.options.fitBoundsOptions);this._map.fitBounds(l.toBounds(p),x,{geolocateSource:!0})}_updateMarker(y){if(y){let l=new o.aR(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=y.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){let y=this._map.transform,l=o.ce(1,y._center.lat)*y.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(y){if(this._map){if(this.options.trackUserLocation)if(y.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(y.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("error",y)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(y){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=R("button","mapboxgl-ctrl-geolocate",this._container),R("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",y===!1){o.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=R("div","mapboxgl-user-location"),this._dotElement.appendChild(R("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(R("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new E_({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=R("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new E_({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 o.z("trackuserlocationend")))})}}_onDeviceOrientation(y){this._userLocationDotMarker&&(y.webkitCompassHeading?this._heading=y.webkitCompassHeading:y.absolute===!0&&(this._heading=-1*y.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return o.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 o.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 o.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 o.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 y;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(y={maximumAge:6e5,timeout:0},this._noTimeout=!0):(y=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,y),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 y=()=>{"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"&&y()}).catch(console.error):y()}_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:cx,ScaleControl:class{constructor(y={}){this.options=Object.assign({},F0,y),this._isNumberFormatSupported=(function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}})(),o.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){let y=this.options.maxWidth||100,l=this._map,p=l._containerHeight/2,_=l._containerWidth/2-y/2,x=l.unproject([_,p]),S=l.unproject([_+y,p]),A=x.distanceTo(S);if(this.options.unit==="imperial"){let N=3.2808*A;N>5280?this._setScale(y,N/5280,"mile"):this._setScale(y,N,"foot")}else this.options.unit==="nautical"?this._setScale(y,A/1852,"nautical-mile"):A>=1e3?this._setScale(y,A/1e3,"kilometer"):this._setScale(y,A,"meter")}_setScale(y,l,p){this._map._requestDomTask(()=>{let _=(function(S){let A=Math.pow(10,`${Math.floor(S)}`.length-1),N=S/A;return N=N>=10?10:N>=5?5:N>=3?3:N>=2?2:N>=1?1:(function(V){let $=Math.pow(10,Math.ceil(-Math.log(V)/Math.LN10));return Math.round(V*$)/$})(N),A*N})(l),x=_/l;this._container.innerHTML=this._isNumberFormatSupported&&p!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:p}).format(_):`${_} ${L0[p]}`,this._container.style.width=y*x+"px"})}onAdd(y){return this._map=y,this._language=y.getLanguage(),this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-scale",y.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(y){this._language=y,this._update()}setUnit(y){this.options.unit=y,this._update()}},FullscreenControl:class{constructor(y={}){this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:o.w("Full screen control 'container' must be a DOM element.")),o.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=R("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.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 y=this._fullscreenButton=R("button","mapboxgl-ctrl-fullscreen",this._controlContainer);R("span","mapboxgl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){let y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",y)}_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:hT,Popup:class extends o.E{constructor(y){super(),this.options=Object.assign(Object.create(B0),y),this._altitude=this.options.altitude,o.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(y&&y.className?y.className.trim().split(/\s+/):[])}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&y.on("preclick",this._onClose),this.options.closeOnMove&&y.on("move",this._onClose),y.on("remove",this.remove),this._update(),y._addPopup(this),this._focusFirstElement(),this._trackPointer?(y.on("mousemove",this._onMouseEvent),y.on("mouseup",this._onMouseEvent),y._canvasContainer.classList.add("mapboxgl-track-pointer")):y.on("move",this._update),this.fire(new o.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);let y=this._map;return y&&(y.off("move",this._update),y.off("move",this._onClose),y.off("preclick",this._onClose),y.off("click",this._onClose),y.off("remove",this.remove),y.off("mousemove",this._onMouseEvent),y.off("mouseup",this._onMouseEvent),y.off("drag",this._onMouseEvent),y._canvasContainer&&y._canvasContainer.classList.remove("mapboxgl-track-pointer"),y._removePopup(this),this._map=void 0),this.fire(new o.z("close")),this}getLngLat(){return this._lngLat}setLngLat(y){this._lngLat=o.aR.convert(y),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(y){return this._altitude=y,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();let y=this._map;return y&&(y.off("move",this._update),y.on("mousemove",this._onMouseEvent),y.on("drag",this._onMouseEvent),y._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){let l=document.createDocumentFragment(),p=document.createElement("body"),_;for(p.innerHTML=y;_=p.firstChild,_;)l.appendChild(_);return this.setDOMContent(l)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){let l=this._content;if(l)for(;l.hasChildNodes();)l.firstChild&&l.removeChild(l.firstChild);else l=this._content=R("div","mapboxgl-popup-content",this._container||void 0);if(l.appendChild(y),this.options.closeButton){let p=this._closeButton=R("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(y){return this._classList.add(y),this._updateClassList(),this}removeClassName(y){return this._classList.delete(y),this._updateClassList(),this}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){let l;return this._classList.delete(y)?l=!1:(this._classList.add(y),l=!0),this._updateClassList(),l}_onMouseEvent(y){this._update(y.point)}_getAnchor(y){if(this.options.anchor)return this.options.anchor;let l=this._map,p=this._container,_=this._pos;if(!l||!p||!_)return"bottom";let x=p.offsetWidth,S=p.offsetHeight,A=_.xl.transform.width-x/2;if(_.y+yl.transform.height-S){if(A)return"bottom-left";if(N)return"bottom-right"}return A?"left":N?"right":"bottom"}_updateClassList(){let y=this._container;if(!y)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"),y.className=l.join(" ")}_update(y){let l=this._map,p=this._content;if(!l||!this._lngLat&&!this._trackPointer||!p)return;let _=this._container;if(_||(_=this._container=R("div","mapboxgl-popup",l.getContainer()),this._tip=R("div","mapboxgl-popup-tip",_),_.appendChild(p)),this.options.maxWidth&&_.style.maxWidth!==this.options.maxWidth&&(_.style.maxWidth=this.options.maxWidth),l.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=jD(this._lngLat,this._pos,l.transform)),!this._trackPointer||y){let x=this._pos=this._trackPointer&&y instanceof o.P?y:l.project(this._lngLat,this._altitude),S=A_(this.options.offset),A=this._anchor=this._getAnchor(S.y),N=A_(this.options.offset,A),V=x.add(N).round();l._requestDomTask(()=>{this._container&&A&&(this._container.style.transform=`${dx[A]} translate(${V.x}px,${V.y}px)`)})}if(!this._marker&&l._showingGlobe()){let x=o.eY(l.transform,this._lngLat)?0:1;this._setOpacity(x)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let y=this._container.querySelector(wg);y&&y.focus()}_onClose(){this.remove()}_setOpacity(y){this._container&&(this._container.style.opacity=`${y}`),this._content&&(this._content.style.pointerEvents=y?"auto":"none")}},Marker:E_,Style:Rh,LngLat:o.aR,LngLatBounds:o.aI,Point:o.P,MercatorCoordinate:o.ae,FreeCameraOptions:WO,Evented:o.E,config:o.e,prewarm:o.f0,clearPrewarmedResources:o.e$,get accessToken(){return o.e.ACCESS_TOKEN},set accessToken(y){o.e.ACCESS_TOKEN=y},get baseApiUrl(){return o.e.API_URL},set baseApiUrl(y){o.e.API_URL=y},get workerCount(){return o.f9.workerCount},set workerCount(y){o.f9.workerCount=y},get maxParallelImageRequests(){return o.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(y){o.e.MAX_PARALLEL_IMAGE_REQUESTS=y},clearStorage(y){o.f8(y)},get workerUrl(){return o.f7.workerUrl},set workerUrl(y){o.f7.workerUrl=y},get workerClass(){return o.f7.workerClass},set workerClass(y){o.f7.workerClass=y},get workerParams(){return o.f7.workerParams},set workerParams(y){o.f7.workerParams=y},get dracoUrl(){return o.f6()},set dracoUrl(y){o.f5(y)},get meshoptUrl(){return o.f4()},set meshoptUrl(y){o.f3(y)},setNow:o.o.setNow,restoreNow:o.o.restoreNow}});var r=e;return r})});var dq=Wu((oSe,aSe)=>{"use strict";(function(t,i){typeof define=="function"&&define.amd?define([],i):typeof oSe<"u"?i():(i(),t.FileSaver={})})(oSe,function(){"use strict";function t(c,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(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,m,g){var C=new XMLHttpRequest;C.open("GET",c),C.responseType="blob",C.onload=function(){a(C.response,m,g)},C.onerror=function(){console.error("could not download file")},C.send()}function e(c){var m=new XMLHttpRequest;m.open("HEAD",c,!1);try{m.send()}catch{}return 200<=m.status&&299>=m.status}function n(c){try{c.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),c.dispatchEvent(m)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,m,g){var C=r.URL||r.webkitURL,w=document.createElement("a");m=m||c.name||"download",w.download=m,w.rel="noopener",typeof c=="string"?(w.href=c,w.origin===location.origin?n(w):e(w.href)?i(c,m,g):n(w,w.target="_blank")):(w.href=C.createObjectURL(c),setTimeout(function(){C.revokeObjectURL(w.href)},4e4),setTimeout(function(){n(w)},0))}:"msSaveOrOpenBlob"in navigator?function(c,m,g){if(m=m||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,g),m);else if(e(c))i(c,m,g);else{var C=document.createElement("a");C.href=c,C.target="_blank",setTimeout(function(){n(C)})}}:function(c,m,g,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof c=="string")return i(c,m,g);var w=c.type==="application/octet-stream",P=/constructor/i.test(r.HTMLElement)||r.safari,R=/CriOS\/[\d]+/.test(navigator.userAgent);if((R||w&&P||o)&&typeof FileReader<"u"){var z=new FileReader;z.onloadend=function(){var K=z.result;K=R?K:K.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=K:location=K,C=null},z.readAsDataURL(c)}else{var H=r.URL||r.webkitURL,j=H.createObjectURL(c);C?C.location=j:location.href=j,C=null,setTimeout(function(){H.revokeObjectURL(j)},4e4)}});r.saveAs=a.saveAs=a,typeof aSe<"u"&&(aSe.exports=a)})});var TTe=Wu((wTe,ITe)=>{"use strict";((t,i)=>{typeof define=="function"&&define.amd?define([],i):typeof ITe=="object"&&typeof wTe<"u"?ITe.exports=i():t.Papa=i()})(wTe,function t(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},e,n=!i.document&&!!i.postMessage,r=i.IS_PAPA_WORKER||!1,o={},a=0,c={};function m(ye){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(fe){var Re=me(fe);Re.chunkSize=parseInt(Re.chunkSize),fe.step||fe.chunk||(Re.chunkSize=null),this._handle=new R(Re),(this._handle.streamer=this)._config=Re}.call(this,ye),this.parseChunk=function(fe,Re){var Ae=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),r)i.postMessage({results:ke,workerId:c.WORKER_ID,finished:Ae});else if(Ie(this._config.chunk)&&!Re){if(this._config.chunk(ke,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=ke=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(ke.data),this._completeResults.errors=this._completeResults.errors.concat(ke.errors),this._completeResults.meta=ke.meta),this._completed||!Ae||!Ie(this._config.complete)||ke&&ke.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Ae||ke&&ke.meta.paused||this._nextChunk(),ke}this._halted=!0},this._sendError=function(fe){Ie(this._config.error)?this._config.error(fe):r&&this._config.error&&i.postMessage({workerId:c.WORKER_ID,error:fe,finished:!1})}}function g(ye){var fe;(ye=ye||{}).chunkSize||(ye.chunkSize=c.RemoteChunkSize),m.call(this,ye),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Re){this._input=Re,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(fe=new XMLHttpRequest,this._config.withCredentials&&(fe.withCredentials=this._config.withCredentials),n||(fe.onload=Te(this._chunkLoaded,this),fe.onerror=Te(this._chunkError,this)),fe.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var Re,Ae=this._config.downloadRequestHeaders;for(Re in Ae)fe.setRequestHeader(Re,Ae[Re])}var ke;this._config.chunkSize&&(ke=this._start+this._config.chunkSize-1,fe.setRequestHeader("Range","bytes="+this._start+"-"+ke));try{fe.send(this._config.downloadRequestBody)}catch(Qe){this._chunkError(Qe.message)}n&&fe.status===0&&this._chunkError()}},this._chunkLoaded=function(){fe.readyState===4&&(fe.status<200||400<=fe.status?this._chunkError():(this._start+=this._config.chunkSize||fe.responseText.length,this._finished=!this._config.chunkSize||this._start>=(Re=>(Re=Re.getResponseHeader("Content-Range"))!==null?parseInt(Re.substring(Re.lastIndexOf("/")+1)):-1)(fe),this.parseChunk(fe.responseText)))},this._chunkError=function(Re){Re=fe.statusText||Re,this._sendError(new Error(Re))}}function C(ye){(ye=ye||{}).chunkSize||(ye.chunkSize=c.LocalChunkSize),m.call(this,ye);var fe,Re,Ae=typeof FileReader<"u";this.stream=function(ke){this._input=ke,Re=ke.slice||ke.webkitSlice||ke.mozSlice,Ae?((fe=new FileReader).onload=Te(this._chunkLoaded,this),fe.onerror=Te(this._chunkError,this)):fe=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(ke.target.result)},this._chunkError=function(){this._sendError(fe.error)}}function w(ye){var fe;m.call(this,ye=ye||{}),this.stream=function(Re){return fe=Re,this._nextChunk()},this._nextChunk=function(){var Re,Ae;if(!this._finished)return Re=this._config.chunkSize,fe=Re?(Ae=fe.substring(0,Re),fe.substring(Re)):(Ae=fe,""),this._finished=!fe,this.parseChunk(Ae)}}function P(ye){m.call(this,ye=ye||{});var fe=[],Re=!0,Ae=!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(ke){this._input=ke,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){Ae&&fe.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),fe.length?this.parseChunk(fe.shift()):Re=!0},this._streamData=Te(function(ke){try{fe.push(typeof ke=="string"?ke:ke.toString(this._config.encoding)),Re&&(Re=!1,this._checkIsFinished(),this.parseChunk(fe.shift()))}catch(Qe){this._streamError(Qe)}},this),this._streamError=Te(function(ke){this._streamCleanUp(),this._sendError(ke)},this),this._streamEnd=Te(function(){this._streamCleanUp(),Ae=!0,this._streamData("")},this),this._streamCleanUp=Te(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function R(ye){var fe,Re,Ae,ke,Qe=Math.pow(2,53),we=-Qe,Rt=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,rt=/^((\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)))$/,Ze=this,Et=0,We=0,bt=!1,st=!1,kt=[],pi={data:[],errors:[],meta:{}};function Kt(ui){return ye.skipEmptyLines==="greedy"?ui.join("").trim()==="":ui.length===1&&ui[0].length===0}function gt(){if(pi&&Ae&&(li("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),Ae=!1),ye.skipEmptyLines&&(pi.data=pi.data.filter(function(Xn){return!Kt(Xn)})),ht()){let Xn=function(Rr,De){Ie(ye.transformHeader)&&(Rr=ye.transformHeader(Rr,De)),kt.push(Rr)};var yn=Xn;if(pi)if(Array.isArray(pi.data[0])){for(var ui=0;ht()&&ui(Ut=>(ye.dynamicTypingFunction&&ye.dynamicTyping[Ut]===void 0&&(ye.dynamicTyping[Ut]=ye.dynamicTypingFunction(Ut)),(ye.dynamicTyping[Ut]||ye.dynamicTyping)===!0))(wt)?ti==="true"||ti==="TRUE"||ti!=="false"&&ti!=="FALSE"&&((Ut=>{if(Rt.test(Ut)&&(Ut=parseFloat(Ut),we=kt.length?"__parsed_extra":kt[bi]:Ci,Mt=ye.transform?ye.transform(Mt,Ci):Mt);Ci==="__parsed_extra"?(De[Ci]=De[Ci]||[],De[Ci].push(Mt)):De[Ci]=Mt}return ye.header&&(bi>kt.length?li("FieldMismatch","TooManyFields","Too many fields: expected "+kt.length+" fields but parsed "+bi,We+Rr):biye.preview?Re.abort():(pi.data=pi.data[0],ke(pi,Ze))))}),this.parse=function(ui,Bi,wn){var yn=ye.quoteChar||'"',yn=(ye.newline||(ye.newline=this.guessLineEndings(ui,yn)),Ae=!1,ye.delimiter?Ie(ye.delimiter)&&(ye.delimiter=ye.delimiter(ui),pi.meta.delimiter=ye.delimiter):((yn=((Xn,Rr,De,bi,Ci)=>{var Mt,wt,ti,Ut;Ci=Ci||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var vi=0;vi=wn.length/2?`\r `:"\r"}}function z(ye){return ye.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function H(ye){var fe=(ye=ye||{}).delimiter,Re=ye.newline,Ae=ye.comments,ke=ye.step,Qe=ye.preview,we=ye.fastMode,Rt=null,rt=!1,Ze=ye.quoteChar==null?'"':ye.quoteChar,Et=Ze;if(ye.escapeChar!==void 0&&(Et=ye.escapeChar),(typeof fe!="string"||-1=Qe)return Bt(!0);break}wn.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Bi.length,index:We}),wt++}}else if(Ae&&yn.length===0&&st.substring(We,We+li)===Ae){if(Ci===-1)return Bt();We=Ci+ht,Ci=st.indexOf(Re,We),bi=st.indexOf(fe,We)}else if(bi!==-1&&(bi=Qe)return Bt(!0)}return Xt();function Ut(Ti){Bi.push(Ti),Xn=We}function vi(Ti){var Ki=0;return Ki=Ti!==-1&&(Ti=st.substring(wt+1,Ti))&&Ti.trim()===""?Ti.length:Ki}function Xt(Ti){return pi||(Ti===void 0&&(Ti=st.substring(We)),yn.push(Ti),We=Kt,Ut(yn),ui&&Qt()),Bt()}function $i(Ti){We=Ti,Ut(yn),yn=[],Ci=st.indexOf(Re,We)}function Bt(Ti){if(ye.header&&!kt&&Bi.length&&!rt){var Ki=Bi[0],un=Object.create(null),Sr=new Set(Ki);let lo=!1;for(let Wr=0;WrAe.charCodeAt(0)!==65279?Ae:Ae.slice(1))(ye),Re=new(fe.download?g:w)(fe)):ye.readable===!0&&Ie(ye.read)&&Ie(ye.on)?Re=new P(fe):(i.File&&ye instanceof File||ye instanceof Object)&&(Re=new C(fe)),Re.stream(ye);(Re=(()=>{var Ae;return!!c.WORKERS_SUPPORTED&&(Ae=(()=>{var ke=i.URL||i.webkitURL||null,Qe=t.toString();return c.BLOB_URL||(c.BLOB_URL=ke.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; ","(",Qe,")();"],{type:"text/javascript"})))})(),(Ae=new i.Worker(Ae)).onmessage=j,Ae.id=a++,o[Ae.id]=Ae)})()).userStep=fe.step,Re.userChunk=fe.chunk,Re.userComplete=fe.complete,Re.userError=fe.error,fe.step=Ie(fe.step),fe.chunk=Ie(fe.chunk),fe.complete=Ie(fe.complete),fe.error=Ie(fe.error),delete fe.worker,Re.postMessage({input:ye,config:fe,workerId:Re.id})},c.unparse=function(ye,fe){var Re=!1,Ae=!0,ke=",",Qe=`\r `,we='"',Rt=we+we,rt=!1,Ze=null,Et=!1,We=((()=>{if(typeof fe=="object"){if(typeof fe.delimiter!="string"||c.BAD_DELIMITERS.filter(function(kt){return fe.delimiter.indexOf(kt)!==-1}).length||(ke=fe.delimiter),typeof fe.quotes!="boolean"&&typeof fe.quotes!="function"&&!Array.isArray(fe.quotes)||(Re=fe.quotes),typeof fe.skipEmptyLines!="boolean"&&typeof fe.skipEmptyLines!="string"||(rt=fe.skipEmptyLines),typeof fe.newline=="string"&&(Qe=fe.newline),typeof fe.quoteChar=="string"&&(we=fe.quoteChar),typeof fe.header=="boolean"&&(Ae=fe.header),Array.isArray(fe.columns)){if(fe.columns.length===0)throw new Error("Option columns is empty");Ze=fe.columns}fe.escapeChar!==void 0&&(Rt=fe.escapeChar+we),fe.escapeFormulae instanceof RegExp?Et=fe.escapeFormulae:typeof fe.escapeFormulae=="boolean"&&fe.escapeFormulae&&(Et=/^[=+\-@\t\r].*$/)}})(),new RegExp(z(we),"g"));if(typeof ye=="string"&&(ye=JSON.parse(ye)),Array.isArray(ye)){if(!ye.length||Array.isArray(ye[0]))return bt(null,ye,rt);if(typeof ye[0]=="object")return bt(Ze||Object.keys(ye[0]),ye,rt)}else if(typeof ye=="object")return typeof ye.data=="string"&&(ye.data=JSON.parse(ye.data)),Array.isArray(ye.data)&&(ye.fields||(ye.fields=ye.meta&&ye.meta.fields||Ze),ye.fields||(ye.fields=Array.isArray(ye.data[0])?ye.fields:typeof ye.data[0]=="object"?Object.keys(ye.data[0]):[]),Array.isArray(ye.data[0])||typeof ye.data[0]=="object"||(ye.data=[ye.data])),bt(ye.fields||[],ye.data||[],rt);throw new Error("Unable to serialize unrecognized input");function bt(kt,pi,Kt){var gt="",ht=(typeof kt=="string"&&(kt=JSON.parse(kt)),typeof pi=="string"&&(pi=JSON.parse(pi)),Array.isArray(kt)&&0{for(var ui=0;ui{"use strict";(function(t){typeof QWe=="object"&&typeof ETe<"u"?ETe.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(i,e,n){function r(c,m){if(!e[c]){if(!i[c]){var g=typeof MG=="function"&&MG;if(!m&&g)return g(c,!0);if(o)return o(c,!0);var C=new Error("Cannot find module '"+c+"'");throw C.code="MODULE_NOT_FOUND",C}var w=e[c]={exports:{}};i[c][0].call(w.exports,function(P){var R=i[c][1][P];return r(R||P)},w,w.exports,t,i,e,n)}return e[c].exports}for(var o=typeof MG=="function"&&MG,a=0;a>2,w=(3&c)<<4|m>>4,P=1>6:64,R=2>4,m=(15&C)<<4|(w=o.indexOf(a.charAt(R++)))>>2,g=(3&w)<<6|(P=o.indexOf(a.charAt(R++))),j[z++]=c,w!==64&&(j[z++]=m),P!==64&&(j[z++]=g);return j}},{"./support":30,"./utils":32}],2:[function(t,i,e){"use strict";var n=t("./external"),r=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function c(m,g,C,w,P){this.compressedSize=m,this.uncompressedSize=g,this.crc32=C,this.compression=w,this.compressedContent=P}c.prototype={getContentWorker:function(){var m=new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),g=this;return m.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),m},getCompressedWorker:function(){return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(m,g,C){return m.pipe(new o).pipe(new a("uncompressedSize")).pipe(g.compressWorker(C)).pipe(new a("compressedSize")).withStreamInfo("compression",g)},i.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,i,e){"use strict";var n=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,i,e){"use strict";var n=t("./utils"),r=(function(){for(var o,a=[],c=0;c<256;c++){o=c;for(var m=0;m<8;m++)o=1&o?3988292384^o>>>1:o>>>1;a[c]=o}return a})();i.exports=function(o,a){return o!==void 0&&o.length?n.getTypeOf(o)!=="string"?(function(c,m,g,C){var w=r,P=C+g;c^=-1;for(var R=C;R>>8^w[255&(c^m[R])];return-1^c})(0|a,o,o.length,0):(function(c,m,g,C){var w=r,P=C+g;c^=-1;for(var R=C;R>>8^w[255&(c^m.charCodeAt(R))];return-1^c})(0|a,o,o.length,0):0}},{"./utils":32}],5:[function(t,i,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,i,e){"use strict";var n=null;n=typeof Promise<"u"?Promise:t("lie"),i.exports={Promise:n}},{lie:37}],7:[function(t,i,e){"use strict";var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",r=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),c=n?"uint8array":"array";function m(g,C){a.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=C,this.meta={}}e.magic="\b\0",o.inherits(m,a),m.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,g.data),!1)},m.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},m.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},m.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(C){g.push({data:C,meta:g.meta})}},e.compressWorker=function(g){return new m("Deflate",g)},e.uncompressWorker=function(){return new m("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,i,e){"use strict";function n(w,P){var R,z="";for(R=0;R>>=8;return z}function r(w,P,R,z,H,j){var K,ne,me=w.file,Te=w.compression,Ie=j!==c.utf8encode,ye=o.transformTo("string",j(me.name)),fe=o.transformTo("string",c.utf8encode(me.name)),Re=me.comment,Ae=o.transformTo("string",j(Re)),ke=o.transformTo("string",c.utf8encode(Re)),Qe=fe.length!==me.name.length,we=ke.length!==Re.length,Rt="",rt="",Ze="",Et=me.dir,We=me.date,bt={crc32:0,compressedSize:0,uncompressedSize:0};P&&!R||(bt.crc32=w.crc32,bt.compressedSize=w.compressedSize,bt.uncompressedSize=w.uncompressedSize);var st=0;P&&(st|=8),Ie||!Qe&&!we||(st|=2048);var kt=0,pi=0;Et&&(kt|=16),H==="UNIX"?(pi=798,kt|=(function(gt,ht){var li=gt;return gt||(li=ht?16893:33204),(65535&li)<<16})(me.unixPermissions,Et)):(pi=20,kt|=(function(gt){return 63&(gt||0)})(me.dosPermissions)),K=We.getUTCHours(),K<<=6,K|=We.getUTCMinutes(),K<<=5,K|=We.getUTCSeconds()/2,ne=We.getUTCFullYear()-1980,ne<<=4,ne|=We.getUTCMonth()+1,ne<<=5,ne|=We.getUTCDate(),Qe&&(rt=n(1,1)+n(m(ye),4)+fe,Rt+="up"+n(rt.length,2)+rt),we&&(Ze=n(1,1)+n(m(Ae),4)+ke,Rt+="uc"+n(Ze.length,2)+Ze);var Kt="";return Kt+=` \0`,Kt+=n(st,2),Kt+=Te.magic,Kt+=n(K,2),Kt+=n(ne,2),Kt+=n(bt.crc32,4),Kt+=n(bt.compressedSize,4),Kt+=n(bt.uncompressedSize,4),Kt+=n(ye.length,2),Kt+=n(Rt.length,2),{fileRecord:g.LOCAL_FILE_HEADER+Kt+ye+Rt,dirRecord:g.CENTRAL_FILE_HEADER+n(pi,2)+Kt+n(Ae.length,2)+"\0\0\0\0"+n(kt,4)+n(z,4)+ye+Rt+Ae}}var o=t("../utils"),a=t("../stream/GenericWorker"),c=t("../utf8"),m=t("../crc32"),g=t("../signature");function C(w,P,R,z){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=P,this.zipPlatform=R,this.encodeFileName=z,this.streamFiles=w,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(C,a),C.prototype.push=function(w){var P=w.meta.percent||0,R=this.entriesCount,z=this._sources.length;this.accumulate?this.contentBuffer.push(w):(this.bytesWritten+=w.data.length,a.prototype.push.call(this,{data:w.data,meta:{currentFile:this.currentFile,percent:R?(P+100*(R-z-1))/R:100}}))},C.prototype.openedSource=function(w){this.currentSourceOffset=this.bytesWritten,this.currentFile=w.file.name;var P=this.streamFiles&&!w.file.dir;if(P){var R=r(w,P,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:R.fileRecord,meta:{percent:0}})}else this.accumulate=!0},C.prototype.closedSource=function(w){this.accumulate=!1;var P=this.streamFiles&&!w.file.dir,R=r(w,P,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(R.dirRecord),P)this.push({data:(function(z){return g.DATA_DESCRIPTOR+n(z.crc32,4)+n(z.compressedSize,4)+n(z.uncompressedSize,4)})(w),meta:{percent:100}});else for(this.push({data:R.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},C.prototype.flush=function(){for(var w=this.bytesWritten,P=0;P=this.index;a--)c=(c<<8)+this.byteAt(a);return this.index+=o,c},readString:function(o){return n.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},i.exports=r},{"../utils":32}],19:[function(t,i,e){"use strict";var n=t("./Uint8ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,i,e){"use strict";var n=t("./DataReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},r.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},r.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},r.prototype.readData=function(o){this.checkOffset(o);var a=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./DataReader":18}],21:[function(t,i,e){"use strict";var n=t("./ArrayReader");function r(o){n.call(this,o)}t("../utils").inherits(r,n),r.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,a},i.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(t,i,e){"use strict";var n=t("../utils"),r=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),c=t("./NodeBufferReader"),m=t("./Uint8ArrayReader");i.exports=function(g){var C=n.getTypeOf(g);return n.checkSupport(C),C!=="string"||r.uint8array?C==="nodebuffer"?new c(g):r.uint8array?new m(n.transformTo("uint8array",g)):new o(n.transformTo("array",g)):new a(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,i,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,i,e){"use strict";var n=t("./GenericWorker"),r=t("../utils");function o(a){n.call(this,"ConvertWorker to "+a),this.destType=a}r.inherits(o,n),o.prototype.processChunk=function(a){this.push({data:r.transformTo(this.destType,a.data),meta:a.meta})},i.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,i,e){"use strict";var n=t("./GenericWorker"),r=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(a){this.streamInfo.crc32=r(a.data,this.streamInfo.crc32||0),this.push(a)},i.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,i,e){"use strict";var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}n.inherits(o,r),o.prototype.processChunk=function(a){if(a){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+a.data.length}r.prototype.processChunk.call(this,a)},i.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,i,e){"use strict";var n=t("../utils"),r=t("./GenericWorker");function o(a){r.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(m){c.dataIsReady=!0,c.data=m,c.max=m&&m.length||0,c.type=n.getTypeOf(m),c.isPaused||c._tickAndRepeat()},function(m){c.error(m)})}n.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,c);break;case"uint8array":a=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":a=this.data.slice(this.index,c)}return this.index=c,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,i,e){"use strict";function n(r){this.name=r||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return!this.isFinished&&(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,o){return this._listeners[r].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,o){if(this._listeners[r])for(var a=0;a "+r:r}},i.exports=n},{}],29:[function(t,i,e){"use strict";var n=t("../utils"),r=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),c=t("../support"),m=t("../external"),g=null;if(c.nodestream)try{g=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function C(P,R){return new m.Promise(function(z,H){var j=[],K=P._internalType,ne=P._outputType,me=P._mimeType;P.on("data",function(Te,Ie){j.push(Te),R&&R(Ie)}).on("error",function(Te){j=[],H(Te)}).on("end",function(){try{var Te=(function(Ie,ye,fe){switch(Ie){case"blob":return n.newBlob(n.transformTo("arraybuffer",ye),fe);case"base64":return a.encode(ye);default:return n.transformTo(Ie,ye)}})(ne,(function(Ie,ye){var fe,Re=0,Ae=null,ke=0;for(fe=0;fe"u")e.blob=!1;else{var n=new ArrayBuffer(0);try{e.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(n),e.blob=r.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,i,e){"use strict";for(var n=t("./utils"),r=t("./support"),o=t("./nodejsUtils"),a=t("./stream/GenericWorker"),c=new Array(256),m=0;m<256;m++)c[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;c[254]=c[254]=1;function g(){a.call(this,"utf-8 decode"),this.leftOver=null}function C(){a.call(this,"utf-8 encode")}e.utf8encode=function(w){return r.nodebuffer?o.newBufferFrom(w,"utf-8"):(function(P){var R,z,H,j,K,ne=P.length,me=0;for(j=0;j>>6:(z<65536?R[K++]=224|z>>>12:(R[K++]=240|z>>>18,R[K++]=128|z>>>12&63),R[K++]=128|z>>>6&63),R[K++]=128|63&z);return R})(w)},e.utf8decode=function(w){return r.nodebuffer?n.transformTo("nodebuffer",w).toString("utf-8"):(function(P){var R,z,H,j,K=P.length,ne=new Array(2*K);for(R=z=0;R>10&1023,ne[z++]=56320|1023&H)}return ne.length!==z&&(ne.subarray?ne=ne.subarray(0,z):ne.length=z),n.applyFromCharCode(ne)})(w=n.transformTo(r.uint8array?"uint8array":"array",w))},n.inherits(g,a),g.prototype.processChunk=function(w){var P=n.transformTo(r.uint8array?"uint8array":"array",w.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var R=P;(P=new Uint8Array(R.length+this.leftOver.length)).set(this.leftOver,0),P.set(R,this.leftOver.length)}else P=this.leftOver.concat(P);this.leftOver=null}var z=(function(j,K){var ne;for((K=K||j.length)>j.length&&(K=j.length),ne=K-1;0<=ne&&(192&j[ne])==128;)ne--;return ne<0||ne===0?K:ne+c[j[ne]]>K?ne:K})(P),H=P;z!==P.length&&(r.uint8array?(H=P.subarray(0,z),this.leftOver=P.subarray(z,P.length)):(H=P.slice(0,z),this.leftOver=P.slice(z,P.length))),this.push({data:e.utf8decode(H),meta:w.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=g,n.inherits(C,a),C.prototype.processChunk=function(w){this.push({data:e.utf8encode(w.data),meta:w.meta})},e.Utf8EncodeWorker=C},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,i,e){"use strict";var n=t("./support"),r=t("./base64"),o=t("./nodejsUtils"),a=t("./external");function c(R){return R}function m(R,z){for(var H=0;H>8;this.dir=!!(16&this.externalFileAttributes),w==0&&(this.dosPermissions=63&this.externalFileAttributes),w==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var w=n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=w.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=w.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=w.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=w.readInt(4))}},readExtraFields:function(w){var P,R,z,H=w.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});w.index+4>>6:(w<65536?C[z++]=224|w>>>12:(C[z++]=240|w>>>18,C[z++]=128|w>>>12&63),C[z++]=128|w>>>6&63),C[z++]=128|63&w);return C},e.buf2binstring=function(g){return m(g,g.length)},e.binstring2buf=function(g){for(var C=new n.Buf8(g.length),w=0,P=C.length;w>10&1023,j[P++]=56320|1023&R)}return m(j,P)},e.utf8border=function(g,C){var w;for((C=C||g.length)>g.length&&(C=g.length),w=C-1;0<=w&&(192&g[w])==128;)w--;return w<0||w===0?C:w+a[g[w]]>C?w:C}},{"./common":41}],43:[function(t,i,e){"use strict";i.exports=function(n,r,o,a){for(var c=65535&n|0,m=n>>>16&65535|0,g=0;o!==0;){for(o-=g=2e3>>1:r>>>1;o[a]=r}return o})();i.exports=function(r,o,a,c){var m=n,g=c+a;r^=-1;for(var C=c;C>>8^m[255&(r^o[C])];return-1^r}},{}],46:[function(t,i,e){"use strict";var n,r=t("../utils/common"),o=t("./trees"),a=t("./adler32"),c=t("./crc32"),m=t("./messages"),g=0,C=4,w=0,P=-2,R=-1,z=4,H=2,j=8,K=9,ne=286,me=30,Te=19,Ie=2*ne+1,ye=15,fe=3,Re=258,Ae=Re+fe+1,ke=42,Qe=113,we=1,Rt=2,rt=3,Ze=4;function Et(De,bi){return De.msg=m[bi],bi}function We(De){return(De<<1)-(4De.avail_out&&(Ci=De.avail_out),Ci!==0&&(r.arraySet(De.output,bi.pending_buf,bi.pending_out,Ci,De.next_out),De.next_out+=Ci,bi.pending_out+=Ci,De.total_out+=Ci,De.avail_out-=Ci,bi.pending-=Ci,bi.pending===0&&(bi.pending_out=0))}function kt(De,bi){o._tr_flush_block(De,0<=De.block_start?De.block_start:-1,De.strstart-De.block_start,bi),De.block_start=De.strstart,st(De.strm)}function pi(De,bi){De.pending_buf[De.pending++]=bi}function Kt(De,bi){De.pending_buf[De.pending++]=bi>>>8&255,De.pending_buf[De.pending++]=255&bi}function gt(De,bi){var Ci,Mt,wt=De.max_chain_length,ti=De.strstart,Ut=De.prev_length,vi=De.nice_match,Xt=De.strstart>De.w_size-Ae?De.strstart-(De.w_size-Ae):0,$i=De.window,Bt=De.w_mask,Qt=De.prev,Ti=De.strstart+Re,Ki=$i[ti+Ut-1],un=$i[ti+Ut];De.prev_length>=De.good_match&&(wt>>=2),vi>De.lookahead&&(vi=De.lookahead);do if($i[(Ci=bi)+Ut]===un&&$i[Ci+Ut-1]===Ki&&$i[Ci]===$i[ti]&&$i[++Ci]===$i[ti+1]){ti+=2,Ci++;do;while($i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&$i[++ti]===$i[++Ci]&&tiXt&&--wt!=0);return Ut<=De.lookahead?Ut:De.lookahead}function ht(De){var bi,Ci,Mt,wt,ti,Ut,vi,Xt,$i,Bt,Qt=De.w_size;do{if(wt=De.window_size-De.lookahead-De.strstart,De.strstart>=Qt+(Qt-Ae)){for(r.arraySet(De.window,De.window,Qt,Qt,0),De.match_start-=Qt,De.strstart-=Qt,De.block_start-=Qt,bi=Ci=De.hash_size;Mt=De.head[--bi],De.head[bi]=Qt<=Mt?Mt-Qt:0,--Ci;);for(bi=Ci=Qt;Mt=De.prev[--bi],De.prev[bi]=Qt<=Mt?Mt-Qt:0,--Ci;);wt+=Qt}if(De.strm.avail_in===0)break;if(Ut=De.strm,vi=De.window,Xt=De.strstart+De.lookahead,$i=wt,Bt=void 0,Bt=Ut.avail_in,$i=fe)for(ti=De.strstart-De.insert,De.ins_h=De.window[ti],De.ins_h=(De.ins_h<=fe&&(De.ins_h=(De.ins_h<=fe)if(Mt=o._tr_tally(De,De.strstart-De.match_start,De.match_length-fe),De.lookahead-=De.match_length,De.match_length<=De.max_lazy_match&&De.lookahead>=fe){for(De.match_length--;De.strstart++,De.ins_h=(De.ins_h<=fe&&(De.ins_h=(De.ins_h<=fe&&De.match_length<=De.prev_length){for(wt=De.strstart+De.lookahead-fe,Mt=o._tr_tally(De,De.strstart-1-De.prev_match,De.prev_length-fe),De.lookahead-=De.prev_length-1,De.prev_length-=2;++De.strstart<=wt&&(De.ins_h=(De.ins_h<De.pending_buf_size-5&&(Ci=De.pending_buf_size-5);;){if(De.lookahead<=1){if(ht(De),De.lookahead===0&&bi===g)return we;if(De.lookahead===0)break}De.strstart+=De.lookahead,De.lookahead=0;var Mt=De.block_start+Ci;if((De.strstart===0||De.strstart>=Mt)&&(De.lookahead=De.strstart-Mt,De.strstart=Mt,kt(De,!1),De.strm.avail_out===0)||De.strstart-De.block_start>=De.w_size-Ae&&(kt(De,!1),De.strm.avail_out===0))return we}return De.insert=0,bi===C?(kt(De,!0),De.strm.avail_out===0?rt:Ze):(De.strstart>De.block_start&&(kt(De,!1),De.strm.avail_out),we)}),new Bi(4,4,8,4,li),new Bi(4,5,16,8,li),new Bi(4,6,32,32,li),new Bi(4,4,16,16,ui),new Bi(8,16,32,32,ui),new Bi(8,16,128,128,ui),new Bi(8,32,128,256,ui),new Bi(32,128,258,1024,ui),new Bi(32,258,258,4096,ui)],e.deflateInit=function(De,bi){return Rr(De,bi,j,15,8,0)},e.deflateInit2=Rr,e.deflateReset=Xn,e.deflateResetKeep=yn,e.deflateSetHeader=function(De,bi){return De&&De.state?De.state.wrap!==2?P:(De.state.gzhead=bi,w):P},e.deflate=function(De,bi){var Ci,Mt,wt,ti;if(!De||!De.state||5>8&255),pi(Mt,Mt.gzhead.time>>16&255),pi(Mt,Mt.gzhead.time>>24&255),pi(Mt,Mt.level===9?2:2<=Mt.strategy||Mt.level<2?4:0),pi(Mt,255&Mt.gzhead.os),Mt.gzhead.extra&&Mt.gzhead.extra.length&&(pi(Mt,255&Mt.gzhead.extra.length),pi(Mt,Mt.gzhead.extra.length>>8&255)),Mt.gzhead.hcrc&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending,0)),Mt.gzindex=0,Mt.status=69):(pi(Mt,0),pi(Mt,0),pi(Mt,0),pi(Mt,0),pi(Mt,0),pi(Mt,Mt.level===9?2:2<=Mt.strategy||Mt.level<2?4:0),pi(Mt,3),Mt.status=Qe);else{var Ut=j+(Mt.w_bits-8<<4)<<8;Ut|=(2<=Mt.strategy||Mt.level<2?0:Mt.level<6?1:Mt.level===6?2:3)<<6,Mt.strstart!==0&&(Ut|=32),Ut+=31-Ut%31,Mt.status=Qe,Kt(Mt,Ut),Mt.strstart!==0&&(Kt(Mt,De.adler>>>16),Kt(Mt,65535&De.adler)),De.adler=1}if(Mt.status===69)if(Mt.gzhead.extra){for(wt=Mt.pending;Mt.gzindex<(65535&Mt.gzhead.extra.length)&&(Mt.pending!==Mt.pending_buf_size||(Mt.gzhead.hcrc&&Mt.pending>wt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),st(De),wt=Mt.pending,Mt.pending!==Mt.pending_buf_size));)pi(Mt,255&Mt.gzhead.extra[Mt.gzindex]),Mt.gzindex++;Mt.gzhead.hcrc&&Mt.pending>wt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),Mt.gzindex===Mt.gzhead.extra.length&&(Mt.gzindex=0,Mt.status=73)}else Mt.status=73;if(Mt.status===73)if(Mt.gzhead.name){wt=Mt.pending;do{if(Mt.pending===Mt.pending_buf_size&&(Mt.gzhead.hcrc&&Mt.pending>wt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),st(De),wt=Mt.pending,Mt.pending===Mt.pending_buf_size)){ti=1;break}ti=Mt.gzindexwt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),ti===0&&(Mt.gzindex=0,Mt.status=91)}else Mt.status=91;if(Mt.status===91)if(Mt.gzhead.comment){wt=Mt.pending;do{if(Mt.pending===Mt.pending_buf_size&&(Mt.gzhead.hcrc&&Mt.pending>wt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),st(De),wt=Mt.pending,Mt.pending===Mt.pending_buf_size)){ti=1;break}ti=Mt.gzindexwt&&(De.adler=c(De.adler,Mt.pending_buf,Mt.pending-wt,wt)),ti===0&&(Mt.status=103)}else Mt.status=103;if(Mt.status===103&&(Mt.gzhead.hcrc?(Mt.pending+2>Mt.pending_buf_size&&st(De),Mt.pending+2<=Mt.pending_buf_size&&(pi(Mt,255&De.adler),pi(Mt,De.adler>>8&255),De.adler=0,Mt.status=Qe)):Mt.status=Qe),Mt.pending!==0){if(st(De),De.avail_out===0)return Mt.last_flush=-1,w}else if(De.avail_in===0&&We(bi)<=We(Ci)&&bi!==C)return Et(De,-5);if(Mt.status===666&&De.avail_in!==0)return Et(De,-5);if(De.avail_in!==0||Mt.lookahead!==0||bi!==g&&Mt.status!==666){var vi=Mt.strategy===2?(function(Xt,$i){for(var Bt;;){if(Xt.lookahead===0&&(ht(Xt),Xt.lookahead===0)){if($i===g)return we;break}if(Xt.match_length=0,Bt=o._tr_tally(Xt,0,Xt.window[Xt.strstart]),Xt.lookahead--,Xt.strstart++,Bt&&(kt(Xt,!1),Xt.strm.avail_out===0))return we}return Xt.insert=0,$i===C?(kt(Xt,!0),Xt.strm.avail_out===0?rt:Ze):Xt.last_lit&&(kt(Xt,!1),Xt.strm.avail_out===0)?we:Rt})(Mt,bi):Mt.strategy===3?(function(Xt,$i){for(var Bt,Qt,Ti,Ki,un=Xt.window;;){if(Xt.lookahead<=Re){if(ht(Xt),Xt.lookahead<=Re&&$i===g)return we;if(Xt.lookahead===0)break}if(Xt.match_length=0,Xt.lookahead>=fe&&0Xt.lookahead&&(Xt.match_length=Xt.lookahead)}if(Xt.match_length>=fe?(Bt=o._tr_tally(Xt,1,Xt.match_length-fe),Xt.lookahead-=Xt.match_length,Xt.strstart+=Xt.match_length,Xt.match_length=0):(Bt=o._tr_tally(Xt,0,Xt.window[Xt.strstart]),Xt.lookahead--,Xt.strstart++),Bt&&(kt(Xt,!1),Xt.strm.avail_out===0))return we}return Xt.insert=0,$i===C?(kt(Xt,!0),Xt.strm.avail_out===0?rt:Ze):Xt.last_lit&&(kt(Xt,!1),Xt.strm.avail_out===0)?we:Rt})(Mt,bi):n[Mt.level].func(Mt,bi);if(vi!==rt&&vi!==Ze||(Mt.status=666),vi===we||vi===rt)return De.avail_out===0&&(Mt.last_flush=-1),w;if(vi===Rt&&(bi===1?o._tr_align(Mt):bi!==5&&(o._tr_stored_block(Mt,0,0,!1),bi===3&&(bt(Mt.head),Mt.lookahead===0&&(Mt.strstart=0,Mt.block_start=0,Mt.insert=0))),st(De),De.avail_out===0))return Mt.last_flush=-1,w}return bi!==C?w:Mt.wrap<=0?1:(Mt.wrap===2?(pi(Mt,255&De.adler),pi(Mt,De.adler>>8&255),pi(Mt,De.adler>>16&255),pi(Mt,De.adler>>24&255),pi(Mt,255&De.total_in),pi(Mt,De.total_in>>8&255),pi(Mt,De.total_in>>16&255),pi(Mt,De.total_in>>24&255)):(Kt(Mt,De.adler>>>16),Kt(Mt,65535&De.adler)),st(De),0=Ci.w_size&&(ti===0&&(bt(Ci.head),Ci.strstart=0,Ci.block_start=0,Ci.insert=0),$i=new r.Buf8(Ci.w_size),r.arraySet($i,bi,Bt-Ci.w_size,Ci.w_size,0),bi=$i,Bt=Ci.w_size),Ut=De.avail_in,vi=De.next_in,Xt=De.input,De.avail_in=Bt,De.next_in=0,De.input=bi,ht(Ci);Ci.lookahead>=fe;){for(Mt=Ci.strstart,wt=Ci.lookahead-(fe-1);Ci.ins_h=(Ci.ins_h<>>=fe=ye>>>24,K-=fe,(fe=ye>>>16&255)===0)Rt[m++]=65535&ye;else{if(!(16&fe)){if((64&fe)==0){ye=ne[(65535&ye)+(j&(1<>>=fe,K-=fe),K<15&&(j+=we[a++]<>>=fe=ye>>>24,K-=fe,!(16&(fe=ye>>>16&255))){if((64&fe)==0){ye=me[(65535&ye)+(j&(1<>>=fe,K-=fe,(fe=m-g)>3,j&=(1<<(K-=Re<<3))-1,n.next_in=a,n.next_out=m,n.avail_in=a>>24&255)+(ke>>>8&65280)+((65280&ke)<<8)+((255&ke)<<24)}function j(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function K(ke){var Qe;return ke&&ke.state?(Qe=ke.state,ke.total_in=ke.total_out=Qe.total=0,ke.msg="",Qe.wrap&&(ke.adler=1&Qe.wrap),Qe.mode=P,Qe.last=0,Qe.havedict=0,Qe.dmax=32768,Qe.head=null,Qe.hold=0,Qe.bits=0,Qe.lencode=Qe.lendyn=new n.Buf32(R),Qe.distcode=Qe.distdyn=new n.Buf32(z),Qe.sane=1,Qe.back=-1,C):w}function ne(ke){var Qe;return ke&&ke.state?((Qe=ke.state).wsize=0,Qe.whave=0,Qe.wnext=0,K(ke)):w}function me(ke,Qe){var we,Rt;return ke&&ke.state?(Rt=ke.state,Qe<0?(we=0,Qe=-Qe):(we=1+(Qe>>4),Qe<48&&(Qe&=15)),Qe&&(Qe<8||15=Ze.wsize?(n.arraySet(Ze.window,Qe,we-Ze.wsize,Ze.wsize,0),Ze.wnext=0,Ze.whave=Ze.wsize):(Rt<(rt=Ze.wsize-Ze.wnext)&&(rt=Rt),n.arraySet(Ze.window,Qe,we-Rt,rt,Ze.wnext),(Rt-=rt)?(n.arraySet(Ze.window,Qe,we-Rt,Rt,0),Ze.wnext=Rt,Ze.whave=Ze.wsize):(Ze.wnext+=rt,Ze.wnext===Ze.wsize&&(Ze.wnext=0),Ze.whave>>8&255,we.check=o(we.check,ti,2,0),kt=st=0,we.mode=2;break}if(we.flags=0,we.head&&(we.head.done=!1),!(1&we.wrap)||(((255&st)<<8)+(st>>8))%31){ke.msg="incorrect header check",we.mode=30;break}if((15&st)!=8){ke.msg="unknown compression method",we.mode=30;break}if(kt-=4,De=8+(15&(st>>>=4)),we.wbits===0)we.wbits=De;else if(De>we.wbits){ke.msg="invalid window size",we.mode=30;break}we.dmax=1<>8&1),512&we.flags&&(ti[0]=255&st,ti[1]=st>>>8&255,we.check=o(we.check,ti,2,0)),kt=st=0,we.mode=3;case 3:for(;kt<32;){if(We===0)break e;We--,st+=Rt[Ze++]<>>8&255,ti[2]=st>>>16&255,ti[3]=st>>>24&255,we.check=o(we.check,ti,4,0)),kt=st=0,we.mode=4;case 4:for(;kt<16;){if(We===0)break e;We--,st+=Rt[Ze++]<>8),512&we.flags&&(ti[0]=255&st,ti[1]=st>>>8&255,we.check=o(we.check,ti,2,0)),kt=st=0,we.mode=5;case 5:if(1024&we.flags){for(;kt<16;){if(We===0)break e;We--,st+=Rt[Ze++]<>>8&255,we.check=o(we.check,ti,2,0)),kt=st=0}else we.head&&(we.head.extra=null);we.mode=6;case 6:if(1024&we.flags&&(We<(gt=we.length)&&(gt=We),gt&&(we.head&&(De=we.head.extra_len-we.length,we.head.extra||(we.head.extra=new Array(we.head.extra_len)),n.arraySet(we.head.extra,Rt,Ze,gt,De)),512&we.flags&&(we.check=o(we.check,Rt,gt,Ze)),We-=gt,Ze+=gt,we.length-=gt),we.length))break e;we.length=0,we.mode=7;case 7:if(2048&we.flags){if(We===0)break e;for(gt=0;De=Rt[Ze+gt++],we.head&&De&&we.length<65536&&(we.head.name+=String.fromCharCode(De)),De&>>9&1,we.head.done=!0),ke.adler=we.check=0,we.mode=12;break;case 10:for(;kt<32;){if(We===0)break e;We--,st+=Rt[Ze++]<>>=7&kt,kt-=7&kt,we.mode=27;break}for(;kt<3;){if(We===0)break e;We--,st+=Rt[Ze++]<>>=1)){case 0:we.mode=14;break;case 1:if(Re(we),we.mode=20,Qe!==6)break;st>>>=2,kt-=2;break e;case 2:we.mode=17;break;case 3:ke.msg="invalid block type",we.mode=30}st>>>=2,kt-=2;break;case 14:for(st>>>=7&kt,kt-=7&kt;kt<32;){if(We===0)break e;We--,st+=Rt[Ze++]<>>16^65535)){ke.msg="invalid stored block lengths",we.mode=30;break}if(we.length=65535&st,kt=st=0,we.mode=15,Qe===6)break e;case 15:we.mode=16;case 16:if(gt=we.length){if(We>>=5,kt-=5,we.ndist=1+(31&st),st>>>=5,kt-=5,we.ncode=4+(15&st),st>>>=4,kt-=4,286>>=3,kt-=3}for(;we.have<19;)we.lens[Ut[we.have++]]=0;if(we.lencode=we.lendyn,we.lenbits=7,Ci={bits:we.lenbits},bi=c(0,we.lens,0,19,we.lencode,0,we.work,Ci),we.lenbits=Ci.bits,bi){ke.msg="invalid code lengths set",we.mode=30;break}we.have=0,we.mode=19;case 19:for(;we.have>>16&255,wn=65535&wt,!((ui=wt>>>24)<=kt);){if(We===0)break e;We--,st+=Rt[Ze++]<>>=ui,kt-=ui,we.lens[we.have++]=wn;else{if(wn===16){for(Mt=ui+2;kt>>=ui,kt-=ui,we.have===0){ke.msg="invalid bit length repeat",we.mode=30;break}De=we.lens[we.have-1],gt=3+(3&st),st>>>=2,kt-=2}else if(wn===17){for(Mt=ui+3;kt>>=ui)),st>>>=3,kt-=3}else{for(Mt=ui+7;kt>>=ui)),st>>>=7,kt-=7}if(we.have+gt>we.nlen+we.ndist){ke.msg="invalid bit length repeat",we.mode=30;break}for(;gt--;)we.lens[we.have++]=De}}if(we.mode===30)break;if(we.lens[256]===0){ke.msg="invalid code -- missing end-of-block",we.mode=30;break}if(we.lenbits=9,Ci={bits:we.lenbits},bi=c(m,we.lens,0,we.nlen,we.lencode,0,we.work,Ci),we.lenbits=Ci.bits,bi){ke.msg="invalid literal/lengths set",we.mode=30;break}if(we.distbits=6,we.distcode=we.distdyn,Ci={bits:we.distbits},bi=c(g,we.lens,we.nlen,we.ndist,we.distcode,0,we.work,Ci),we.distbits=Ci.bits,bi){ke.msg="invalid distances set",we.mode=30;break}if(we.mode=20,Qe===6)break e;case 20:we.mode=21;case 21:if(6<=We&&258<=bt){ke.next_out=Et,ke.avail_out=bt,ke.next_in=Ze,ke.avail_in=We,we.hold=st,we.bits=kt,a(ke,Kt),Et=ke.next_out,rt=ke.output,bt=ke.avail_out,Ze=ke.next_in,Rt=ke.input,We=ke.avail_in,st=we.hold,kt=we.bits,we.mode===12&&(we.back=-1);break}for(we.back=0;Bi=(wt=we.lencode[st&(1<>>16&255,wn=65535&wt,!((ui=wt>>>24)<=kt);){if(We===0)break e;We--,st+=Rt[Ze++]<>yn)])>>>16&255,wn=65535&wt,!(yn+(ui=wt>>>24)<=kt);){if(We===0)break e;We--,st+=Rt[Ze++]<>>=yn,kt-=yn,we.back+=yn}if(st>>>=ui,kt-=ui,we.back+=ui,we.length=wn,Bi===0){we.mode=26;break}if(32&Bi){we.back=-1,we.mode=12;break}if(64&Bi){ke.msg="invalid literal/length code",we.mode=30;break}we.extra=15&Bi,we.mode=22;case 22:if(we.extra){for(Mt=we.extra;kt>>=we.extra,kt-=we.extra,we.back+=we.extra}we.was=we.length,we.mode=23;case 23:for(;Bi=(wt=we.distcode[st&(1<>>16&255,wn=65535&wt,!((ui=wt>>>24)<=kt);){if(We===0)break e;We--,st+=Rt[Ze++]<>yn)])>>>16&255,wn=65535&wt,!(yn+(ui=wt>>>24)<=kt);){if(We===0)break e;We--,st+=Rt[Ze++]<>>=yn,kt-=yn,we.back+=yn}if(st>>>=ui,kt-=ui,we.back+=ui,64&Bi){ke.msg="invalid distance code",we.mode=30;break}we.offset=wn,we.extra=15&Bi,we.mode=24;case 24:if(we.extra){for(Mt=we.extra;kt>>=we.extra,kt-=we.extra,we.back+=we.extra}if(we.offset>we.dmax){ke.msg="invalid distance too far back",we.mode=30;break}we.mode=25;case 25:if(bt===0)break e;if(gt=Kt-bt,we.offset>gt){if((gt=we.offset-gt)>we.whave&&we.sane){ke.msg="invalid distance too far back",we.mode=30;break}ht=gt>we.wnext?(gt-=we.wnext,we.wsize-gt):we.wnext-gt,gt>we.length&&(gt=we.length),li=we.window}else li=rt,ht=Et-we.offset,gt=we.length;for(btIe?(fe=ht[li+z[Qe]],kt[pi+z[Qe]]):(fe=96,0),j=1<>Et)+(K-=j)]=ye<<24|fe<<16|Re|0,K!==0;);for(j=1<>=1;if(j!==0?(st&=j-1,st+=j):st=0,Qe++,--Kt[ke]==0){if(ke===Rt)break;ke=g[C+z[Qe]]}if(rt>>7)]}function pi(wt,ti){wt.pending_buf[wt.pending++]=255&ti,wt.pending_buf[wt.pending++]=ti>>>8&255}function Kt(wt,ti,Ut){wt.bi_valid>H-Ut?(wt.bi_buf|=ti<>H-wt.bi_valid,wt.bi_valid+=Ut-H):(wt.bi_buf|=ti<>>=1,Ut<<=1,0<--ti;);return Ut>>>1}function li(wt,ti,Ut){var vi,Xt,$i=new Array(z+1),Bt=0;for(vi=1;vi<=z;vi++)$i[vi]=Bt=Bt+Ut[vi-1]<<1;for(Xt=0;Xt<=ti;Xt++){var Qt=wt[2*Xt+1];Qt!==0&&(wt[2*Xt]=ht($i[Qt]++,Qt))}}function ui(wt){var ti;for(ti=0;ti>1;1<=Ut;Ut--)yn(wt,$i,Ut);for(Xt=Ti;Ut=wt.heap[1],wt.heap[1]=wt.heap[wt.heap_len--],yn(wt,$i,1),vi=wt.heap[1],wt.heap[--wt.heap_max]=Ut,wt.heap[--wt.heap_max]=vi,$i[2*Xt]=$i[2*Ut]+$i[2*vi],wt.depth[Xt]=(wt.depth[Ut]>=wt.depth[vi]?wt.depth[Ut]:wt.depth[vi])+1,$i[2*Ut+1]=$i[2*vi+1]=Xt,wt.heap[1]=Xt++,yn(wt,$i,1),2<=wt.heap_len;);wt.heap[--wt.heap_max]=wt.heap[1],(function(un,Sr){var lo,Wr,qr,Eo,os,vl,jl=Sr.dyn_tree,Dd=Sr.max_code,Na=Sr.stat_desc.static_tree,xc=Sr.stat_desc.has_stree,gg=Sr.stat_desc.extra_bits,Hi=Sr.stat_desc.extra_base,Cn=Sr.stat_desc.max_length,wr=0;for(Eo=0;Eo<=z;Eo++)un.bl_count[Eo]=0;for(jl[2*un.heap[un.heap_max]+1]=0,lo=un.heap_max+1;lo>=7;Xt>>=1)if(1&Ki&&Qt.dyn_ltree[2*Ti]!==0)return r;if(Qt.dyn_ltree[18]!==0||Qt.dyn_ltree[20]!==0||Qt.dyn_ltree[26]!==0)return o;for(Ti=32;Ti>>3,($i=wt.static_len+3+7>>>3)<=Xt&&(Xt=$i)):Xt=$i=Ut+5,Ut+4<=Xt&&ti!==-1?Mt(wt,ti,Ut,vi):wt.strategy===4||$i===Xt?(Kt(wt,2+(vi?1:0),3),Xn(wt,Ae,ke)):(Kt(wt,4+(vi?1:0),3),(function(Qt,Ti,Ki,un){var Sr;for(Kt(Qt,Ti-257,5),Kt(Qt,Ki-1,5),Kt(Qt,un-4,4),Sr=0;Sr>>8&255,wt.pending_buf[wt.d_buf+2*wt.last_lit+1]=255&ti,wt.pending_buf[wt.l_buf+wt.last_lit]=255&Ut,wt.last_lit++,ti===0?wt.dyn_ltree[2*Ut]++:(wt.matches++,ti--,wt.dyn_ltree[2*(we[Ut]+g+1)]++,wt.dyn_dtree[2*kt(ti)]++),wt.last_lit===wt.lit_bufsize-1},e._tr_align=function(wt){Kt(wt,2,3),gt(wt,K,Ae),(function(ti){ti.bi_valid===16?(pi(ti,ti.bi_buf),ti.bi_buf=0,ti.bi_valid=0):8<=ti.bi_valid&&(ti.pending_buf[ti.pending++]=255&ti.bi_buf,ti.bi_buf>>=8,ti.bi_valid-=8)})(wt)}},{"../utils/common":41}],53:[function(t,i,e){"use strict";i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,i,e){(function(n){(function(r,o){"use strict";if(!r.setImmediate){var a,c,m,g,C=1,w={},P=!1,R=r.document,z=Object.getPrototypeOf&&Object.getPrototypeOf(r);z=z&&z.setTimeout?z:r,a={}.toString.call(r.process)==="[object process]"?function(ne){process.nextTick(function(){j(ne)})}:(function(){if(r.postMessage&&!r.importScripts){var ne=!0,me=r.onmessage;return r.onmessage=function(){ne=!1},r.postMessage("","*"),r.onmessage=me,ne}})()?(g="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",K,!1):r.attachEvent("onmessage",K),function(ne){r.postMessage(g+ne,"*")}):r.MessageChannel?((m=new MessageChannel).port1.onmessage=function(ne){j(ne.data)},function(ne){m.port2.postMessage(ne)}):R&&"onreadystatechange"in R.createElement("script")?(c=R.documentElement,function(ne){var me=R.createElement("script");me.onreadystatechange=function(){j(ne),me.onreadystatechange=null,c.removeChild(me),me=null},c.appendChild(me)}):function(ne){setTimeout(j,0,ne)},z.setImmediate=function(ne){typeof ne!="function"&&(ne=new Function(""+ne));for(var me=new Array(arguments.length-1),Te=0;Te"u"?n===void 0?this:n:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var Vet=Wu($ke=>{"use strict";$ke.supported=jke;$ke.notSupportedReason=Bet;function jke(t){return!Bet(t)}function Bet(t){if(!Bni())return"not a browser";if(!Vni())return"insufficient worker support";if(!zni())return"insufficient Canvas/getImageData support";if(!Uni(t&&t.failIfMajorPerformanceCaveat))return"insufficient WebGL2 support";if(!jni())return"insufficient ECMAScript 6 support"}function Bni(){return typeof window<"u"&&typeof document<"u"}function Vni(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(t),e,n;try{n=new Worker(i),e=!0}catch{e=!1}return n&&n.terminate(),URL.revokeObjectURL(i),e}function zni(){var t=document.createElement("canvas");t.width=t.height=1;var i=t.getContext("2d");if(!i)return!1;var e=i.getImageData(0,0,1,1);return e&&e.width===t.width}var Gke={};function Uni(t){return Gke[t]===void 0&&(Gke[t]=Gni(t)),Gke[t]}jke.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Hni(t){var i=document.createElement("canvas"),e=Object.create(jke.webGLContextAttributes);return e.failIfMajorPerformanceCaveat=t,i.getContext("webgl2",e)}function Gni(t){var i=Hni(t);if(!i)return!1;var e;try{e=i.createShader(i.VERTEX_SHADER)}catch{return!1}return!e||i.isContextLost()?!1:(i.shaderSource(e,"void main() {}"),i.compileShader(e),i.getShaderParameter(e,i.COMPILE_STATUS)===!0)}function jni(){return!document.documentMode}});var Xet=Wu((nGr,Zet)=>{"use strict";Zet.exports=function(i,e,n,r){var o=i[0],a=i[1],c=!1;n===void 0&&(n=0),r===void 0&&(r=e.length);for(var m=(r-n)/2,g=0,C=m-1;ga!=z>a&&o<(R-w)*(a-P)/(z-P)+w;H&&(c=!c)}return c}});var ett=Wu((rGr,Jet)=>{"use strict";Jet.exports=function(i,e,n,r){var o=i[0],a=i[1],c=!1;n===void 0&&(n=0),r===void 0&&(r=e.length);for(var m=r-n,g=0,C=m-1;ga!=z>a&&o<(R-w)*(a-P)/(z-P)+w;H&&(c=!c)}return c}});var ntt=Wu((oGr,que)=>{"use strict";var ttt=Xet(),itt=ett();que.exports=function(i,e,n,r){return e.length>0&&Array.isArray(e[0])?itt(i,e,n,r):ttt(i,e,n,r)};que.exports.nested=itt;que.exports.flat=ttt});var ftt=Wu((rMe,oMe)=>{"use strict";(function(t,i){typeof rMe=="object"&&typeof oMe<"u"?oMe.exports=i():typeof define=="function"&&define.amd?define(i):(t=t||self).RBush=i()})(rMe,function(){"use strict";function t(j,K,ne,me,Te){(function Ie(ye,fe,Re,Ae,ke){for(;Ae>Re;){if(Ae-Re>600){var Qe=Ae-Re+1,we=fe-Re+1,Rt=Math.log(Qe),rt=.5*Math.exp(2*Rt/3),Ze=.5*Math.sqrt(Rt*rt*(Qe-rt)/Qe)*(we-Qe/2<0?-1:1),Et=Math.max(Re,Math.floor(fe-we*rt/Qe+Ze)),We=Math.min(Ae,Math.floor(fe+(Qe-we)*rt/Qe+Ze));Ie(ye,fe,Et,We,ke)}var bt=ye[fe],st=Re,kt=Ae;for(i(ye,Re,fe),ke(ye[Ae],bt)>0&&i(ye,Re,Ae);st0;)kt--}ke(ye[Re],bt)===0?i(ye,Re,kt):i(ye,++kt,Ae),kt<=fe&&(Re=kt+1),fe<=kt&&(Ae=kt-1)}})(j,K,ne||0,me||j.length-1,Te||e)}function i(j,K,ne){var me=j[K];j[K]=j[ne],j[ne]=me}function e(j,K){return jK?1:0}var n=function(j){j===void 0&&(j=9),this._maxEntries=Math.max(4,j),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(j,K,ne){if(!ne)return K.indexOf(j);for(var me=0;me=j.minX&&K.maxY>=j.minY}function z(j){return{children:j,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function H(j,K,ne,me,Te){for(var Ie=[K,ne];Ie.length;)if(!((ne=Ie.pop())-(K=Ie.pop())<=me)){var ye=K+Math.ceil((ne-K)/me/2)*me;t(j,ye,K,ne,Te),Ie.push(K,ye,ye,ne)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(j){var K=this.data,ne=[];if(!R(j,K))return ne;for(var me=this.toBBox,Te=[];K;){for(var Ie=0;Ie=0&&Te[K].children.length>this._maxEntries;)this._split(Te,K),K--;this._adjustParentBBoxes(me,Te,K)},n.prototype._split=function(j,K){var ne=j[K],me=ne.children.length,Te=this._minEntries;this._chooseSplitAxis(ne,Te,me);var Ie=this._chooseSplitIndex(ne,Te,me),ye=z(ne.children.splice(Ie,ne.children.length-Ie));ye.height=ne.height,ye.leaf=ne.leaf,o(ne,this.toBBox),o(ye,this.toBBox),K?j[K-1].children.push(ye):this._splitRoot(ne,ye)},n.prototype._splitRoot=function(j,K){this.data=z([j,K]),this.data.height=j.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(j,K,ne){for(var me,Te,Ie,ye,fe,Re,Ae,ke=1/0,Qe=1/0,we=K;we<=ne-K;we++){var Rt=a(j,0,we,this.toBBox),rt=a(j,we,ne,this.toBBox),Ze=(Te=Rt,Ie=rt,ye=void 0,fe=void 0,Re=void 0,Ae=void 0,ye=Math.max(Te.minX,Ie.minX),fe=Math.max(Te.minY,Ie.minY),Re=Math.min(Te.maxX,Ie.maxX),Ae=Math.min(Te.maxY,Ie.maxY),Math.max(0,Re-ye)*Math.max(0,Ae-fe)),Et=C(Rt)+C(rt);Ze=K;ke--){var Qe=j.children[ke];c(ye,j.leaf?Te(Qe):Qe),fe+=w(ye)}return fe},n.prototype._adjustParentBBoxes=function(j,K,ne){for(var me=ne;me>=0;me--)c(K[me],j)},n.prototype._condense=function(j){for(var K=j.length-1,ne=void 0;K>=0;K--)j[K].children.length===0?K>0?(ne=j[K-1].children).splice(ne.indexOf(j[K]),1):this.clear():o(j[K],this.toBBox)},n})});var dMe=Wu(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.earthRadius=63710088e-1;Wa.factors={centimeters:Wa.earthRadius*100,centimetres:Wa.earthRadius*100,degrees:Wa.earthRadius/111325,feet:Wa.earthRadius*3.28084,inches:Wa.earthRadius*39.37,kilometers:Wa.earthRadius/1e3,kilometres:Wa.earthRadius/1e3,meters:Wa.earthRadius,metres:Wa.earthRadius,miles:Wa.earthRadius/1609.344,millimeters:Wa.earthRadius*1e3,millimetres:Wa.earthRadius*1e3,nauticalmiles:Wa.earthRadius/1852,radians:1,yards:Wa.earthRadius*1.0936};Wa.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/Wa.earthRadius,yards:1.0936133};Wa.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 EO(t,i,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=i||{},n.geometry=t,n}Wa.feature=EO;function Gri(t,i,e){switch(e===void 0&&(e={}),t){case"Point":return aMe(i).geometry;case"LineString":return lMe(i).geometry;case"Polygon":return sMe(i).geometry;case"MultiPoint":return _tt(i).geometry;case"MultiLineString":return gtt(i).geometry;case"MultiPolygon":return ytt(i).geometry;default:throw new Error(t+" is invalid")}}Wa.geometry=Gri;function aMe(t,i,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(!Kue(t[0])||!Kue(t[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:t};return EO(n,i,e)}Wa.point=aMe;function jri(t,i,e){return e===void 0&&(e={}),Wue(t.map(function(n){return aMe(n,i)}),e)}Wa.points=jri;function sMe(t,i,e){e===void 0&&(e={});for(var n=0,r=t;n=0))throw new Error("precision must be a positive number");var e=Math.pow(10,i||0);return Math.round(t*e)/e}Wa.round=Kri;function vtt(t,i){i===void 0&&(i="kilometers");var e=Wa.factors[i];if(!e)throw new Error(i+" units is invalid");return t*e}Wa.radiansToLength=vtt;function cMe(t,i){i===void 0&&(i="kilometers");var e=Wa.factors[i];if(!e)throw new Error(i+" units is invalid");return t/e}Wa.lengthToRadians=cMe;function Wri(t,i){return btt(cMe(t,i))}Wa.lengthToDegrees=Wri;function Qri(t){var i=t%360;return i<0&&(i+=360),i}Wa.bearingToAzimuth=Qri;function btt(t){var i=t%(2*Math.PI);return i*180/Math.PI}Wa.radiansToDegrees=btt;function Zri(t){var i=t%360;return i*Math.PI/180}Wa.degreesToRadians=Zri;function Xri(t,i,e){if(i===void 0&&(i="kilometers"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("length must be a positive number");return vtt(cMe(t,i),e)}Wa.convertLength=Xri;function Jri(t,i,e){if(i===void 0&&(i="meters"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("area must be a positive number");var n=Wa.areaFactors[i];if(!n)throw new Error("invalid original units");var r=Wa.areaFactors[e];if(!r)throw new Error("invalid final units");return t/n*r}Wa.convertArea=Jri;function Kue(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}Wa.isNumber=Kue;function eoi(t){return!!t&&t.constructor===Object}Wa.isObject=eoi;function toi(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(i){if(!Kue(i))throw new Error("bbox must only contain numbers")})}Wa.validateBBox=toi;function ioi(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")}Wa.validateId=ioi});var Itt=Wu(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var o_=dMe();function kQ(t,i,e){if(t!==null)for(var n,r,o,a,c,m,g,C=0,w=0,P,R=t.type,z=R==="FeatureCollection",H=R==="Feature",j=z?t.features.length:1,K=0;Km||z>g||H>C){c=w,m=n,g=z,C=H,o=0;return}var j=o_.lineString([c,w],e.properties);if(i(j,n,r,H,o)===!1)return!1;o++,c=w})===!1)return!1}}})}function coi(t,i,e){var n=e,r=!1;return Stt(t,function(o,a,c,m,g){r===!1&&e===void 0?n=o:n=i(n,o,a,c,m,g),r=!0}),n}function wtt(t,i){if(!t)throw new Error("geojson is required");Que(t,function(e,n,r){if(e.geometry!==null){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(i(e,n,r,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var My=63710088e-1,mMe={centimeters:My*100,centimetres:My*100,degrees:360/(2*Math.PI),feet:My*3.28084,inches:My*39.37,kilometers:My/1e3,kilometres:My/1e3,meters:My,metres:My,miles:My/1609.344,millimeters:My*1e3,millimetres:My*1e3,nauticalmiles:My/1852,radians:1,yards:My*1.0936},pMe={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 AO(t,i,e={}){let n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=i||{},n.geometry=t,n}function moi(t,i,e={}){switch(t){case"Point":return hMe(i).geometry;case"LineString":return gMe(i).geometry;case"Polygon":return fMe(i).geometry;case"MultiPoint":return Ett(i).geometry;case"MultiLineString":return Ttt(i).geometry;case"MultiPolygon":return Att(i).geometry;default:throw new Error(t+" is invalid")}}function hMe(t,i,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(!Zue(t[0])||!Zue(t[1]))throw new Error("coordinates must contain numbers");return AO({type:"Point",coordinates:t},i,e)}function hoi(t,i,e={}){return Xue(t.map(n=>hMe(n,i)),e)}function fMe(t,i,e={}){for(let r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let o=0;ofMe(n,i)),e)}function gMe(t,i,e={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return AO({type:"LineString",coordinates:t},i,e)}function goi(t,i,e={}){return Xue(t.map(n=>gMe(n,i)),e)}function Xue(t,i={}){let e={type:"FeatureCollection"};return i.id&&(e.id=i.id),i.bbox&&(e.bbox=i.bbox),e.features=t,e}function Ttt(t,i,e={}){return AO({type:"MultiLineString",coordinates:t},i,e)}function Ett(t,i,e={}){return AO({type:"MultiPoint",coordinates:t},i,e)}function Att(t,i,e={}){return AO({type:"MultiPolygon",coordinates:t},i,e)}function _oi(t,i,e={}){return AO({type:"GeometryCollection",geometries:t},i,e)}function yoi(t,i=0){if(i&&!(i>=0))throw new Error("precision must be a positive number");let e=Math.pow(10,i||0);return Math.round(t*e)/e}function Dtt(t,i="kilometers"){let e=mMe[i];if(!e)throw new Error(i+" units is invalid");return t*e}function _Me(t,i="kilometers"){let e=mMe[i];if(!e)throw new Error(i+" units is invalid");return t/e}function voi(t,i){return ktt(_Me(t,i))}function boi(t){let i=t%360;return i<0&&(i+=360),i}function Coi(t){return t=t%360,t>180?t-360:t<-180?t+360:t}function ktt(t){return t%(2*Math.PI)*180/Math.PI}function xoi(t){return t%360*Math.PI/180}function Soi(t,i="kilometers",e="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return Dtt(_Me(t,i),e)}function woi(t,i="meters",e="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");let n=pMe[i];if(!n)throw new Error("invalid original units");let r=pMe[e];if(!r)throw new Error("invalid final units");return t/n*r}function Zue(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Ioi(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Toi(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(i=>{if(!Zue(i))throw new Error("bbox must only contain numbers")})}function Eoi(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")}Hc.areaFactors=pMe;Hc.azimuthToBearing=Coi;Hc.bearingToAzimuth=boi;Hc.convertArea=woi;Hc.convertLength=Soi;Hc.degreesToRadians=xoi;Hc.earthRadius=My;Hc.factors=mMe;Hc.feature=AO;Hc.featureCollection=Xue;Hc.geometry=moi;Hc.geometryCollection=_oi;Hc.isNumber=Zue;Hc.isObject=Ioi;Hc.lengthToDegrees=voi;Hc.lengthToRadians=_Me;Hc.lineString=gMe;Hc.lineStrings=goi;Hc.multiLineString=Ttt;Hc.multiPoint=Ett;Hc.multiPolygon=Att;Hc.point=hMe;Hc.points=hoi;Hc.polygon=fMe;Hc.polygons=foi;Hc.radiansToDegrees=ktt;Hc.radiansToLength=Dtt;Hc.round=yoi;Hc.validateBBox=Toi;Hc.validateId=Eoi});var Ftt=Wu(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var a_=Mtt();function MQ(t,i,e){if(t!==null)for(var n,r,o,a,c,m,g,C=0,w=0,P,R=t.type,z=R==="FeatureCollection",H=R==="Feature",j=z?t.features.length:1,K=0;Km||z>g||H>C){c=w,m=n,g=z,C=H,o=0;return}var j=a_.lineString.call(void 0,[c,w],e.properties);if(i(j,n,r,H,o)===!1)return!1;o++,c=w})===!1)return!1}}})}function Poi(t,i,e){var n=e,r=!1;return Ptt(t,function(o,a,c,m,g){r===!1&&e===void 0?n=o:n=i(n,o,a,c,m,g),r=!0}),n}function Ntt(t,i){if(!t)throw new Error("geojson is required");Jue(t,function(e,n,r){if(e.geometry!==null){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(i(e,n,r,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c{"use strict";Object.defineProperty(epe,"__esModule",{value:!0});var Boi=Ftt();function Ltt(t,i={}){if(t.bbox!=null&&i.recompute!==!0)return t.bbox;let e=[1/0,1/0,-1/0,-1/0];return Boi.coordEach.call(void 0,t,n=>{e[0]>n[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]{"use strict";var SI=ftt(),ztt=dMe(),Utt=Itt(),_8=Btt().default,zoi=Utt.featureEach,X7r=Utt.coordEach,J7r=ztt.polygon,Vtt=ztt.featureCollection;function Htt(t){var i=new SI(t);return i.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:_8(e),SI.prototype.insert.call(this,e)},i.load=function(e){var n=[];return Array.isArray(e)?e.forEach(function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:_8(r),n.push(r)}):zoi(e,function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:_8(r),n.push(r)}),SI.prototype.load.call(this,n)},i.remove=function(e,n){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:_8(e),SI.prototype.remove.call(this,e,n)},i.clear=function(){return SI.prototype.clear.call(this)},i.search=function(e){var n=SI.prototype.search.call(this,this.toBBox(e));return Vtt(n)},i.collides=function(e){return SI.prototype.collides.call(this,this.toBBox(e))},i.all=function(){var e=SI.prototype.all.call(this);return Vtt(e)},i.toJSON=function(){return SI.prototype.toJSON.call(this)},i.fromJSON=function(e){return SI.prototype.fromJSON.call(this,e)},i.toBBox=function(e){var n;if(e.bbox)n=e.bbox;else if(Array.isArray(e)&&e.length===4)n=e;else if(Array.isArray(e)&&e.length===6)n=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")n=_8(e);else if(e.type==="FeatureCollection")n=_8(e);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},i}vMe.exports=Htt;vMe.exports.default=Htt});var Sfe;function DX(){return Sfe}function RS(t){let i=Sfe;return Sfe=t,i}var NNe=Symbol("NotFound");function eV(t){return t===NNe||t?.name==="\u0275NotFound"}function PX(t,i){return Object.is(t,i)}var Mg=null,kX=!1,wfe=1,Xct=null,_m=Symbol("SIGNAL");function cs(t){let i=Mg;return Mg=t,i}function NX(){return Mg}var GR={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 lk(t){if(kX)throw new Error("");if(Mg===null)return;Mg.consumerOnSignalRead(t);let i=Mg.producersTail;if(i!==void 0&&i.producer===t)return;let e,n=Mg.recomputing;if(n&&(e=i!==void 0?i.nextProducer:Mg.producers,e!==void 0&&e.producer===t)){Mg.producersTail=e,e.lastReadVersion=t.version;return}let r=t.consumersTail;if(r!==void 0&&r.consumer===Mg&&(!n||edt(r,Mg)))return;let o=tV(Mg),a={producer:t,consumer:Mg,nextProducer:e,prevConsumer:r,lastReadVersion:t.version,nextConsumer:void 0};Mg.producersTail=a,i!==void 0?i.nextProducer=a:Mg.producers=a,o&&VNe(t,a)}function FNe(){wfe++}function FX(t){if(!(tV(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===wfe)){if(!t.producerMustRecompute(t)&&!$R(t)){RX(t);return}t.producerRecomputeValue(t),RX(t)}}function Ife(t){if(t.consumers===void 0)return;let i=kX;kX=!0;try{for(let e=t.consumers;e!==void 0;e=e.nextConsumer){let n=e.consumer;n.dirty||Jct(n)}}finally{kX=i}}function Tfe(){return Mg?.consumerAllowSignalWrites!==!1}function Jct(t){t.dirty=!0,Ife(t),t.consumerMarkedDirty?.(t)}function RX(t){t.dirty=!1,t.lastCleanEpoch=wfe}function ck(t){return t&&LNe(t),cs(t)}function LNe(t){t.producersTail=void 0,t.recomputing=!0}function jR(t,i){cs(i),t&&BNe(t)}function BNe(t){t.recomputing=!1;let i=t.producersTail,e=i!==void 0?i.nextProducer:t.producers;if(e!==void 0){if(tV(t))do e=Efe(e);while(e!==void 0);i!==void 0?i.nextProducer=void 0:t.producers=void 0}}function $R(t){for(let i=t.producers;i!==void 0;i=i.nextProducer){let e=i.producer,n=i.lastReadVersion;if(n!==e.version||(FX(e),n!==e.version))return!0}return!1}function dk(t){if(tV(t)){let i=t.producers;for(;i!==void 0;)i=Efe(i)}t.producers=void 0,t.producersTail=void 0,t.consumers=void 0,t.consumersTail=void 0}function VNe(t,i){let e=t.consumersTail,n=tV(t);if(e!==void 0?(i.nextConsumer=e.nextConsumer,e.nextConsumer=i):(i.nextConsumer=void 0,t.consumers=i),i.prevConsumer=e,t.consumersTail=i,!n)for(let r=t.producers;r!==void 0;r=r.nextProducer)VNe(r.producer,r)}function Efe(t){let i=t.producer,e=t.nextProducer,n=t.nextConsumer,r=t.prevConsumer;if(t.nextConsumer=void 0,t.prevConsumer=void 0,n!==void 0?n.prevConsumer=r:i.consumersTail=r,r!==void 0)r.nextConsumer=n;else if(i.consumers=n,!tV(i)){let o=i.producers;for(;o!==void 0;)o=Efe(o)}return e}function tV(t){return t.consumerIsAlwaysLive||t.consumers!==void 0}function LX(t){Xct?.(t)}function edt(t,i){let e=i.producersTail;if(e!==void 0){let n=i.producers;do{if(n===t)return!0;if(n===e)break;n=n.nextProducer}while(n!==void 0)}return!1}function RG(t,i){let e=Object.create(tdt);e.computation=t,i!==void 0&&(e.equal=i);let n=()=>{if(FX(e),lk(e),e.value===OG)throw e.error;return e.value};return n[_m]=e,LX(e),n}var MX=Symbol("UNSET"),OX=Symbol("COMPUTING"),OG=Symbol("ERRORED"),tdt=$e(pe({},GR),{value:MX,dirty:!0,error:null,equal:PX,kind:"computed",producerMustRecompute(t){return t.value===MX||t.value===OX},producerRecomputeValue(t){if(t.value===OX)throw new Error("");let i=t.value;t.value=OX;let e=ck(t),n,r=!1;try{n=t.computation(),cs(null),r=i!==MX&&i!==OG&&n!==OG&&t.equal(i,n)}catch(o){n=OG,t.error=o}finally{jR(t,e)}if(r){t.value=i;return}t.value=n,t.version++}});function idt(){throw new Error}var zNe=idt;function UNe(t){zNe(t)}function Afe(t){zNe=t}var ndt=null;function Dfe(t,i){let e=Object.create(PG);e.value=t,i!==void 0&&(e.equal=i);let n=()=>HNe(e);return n[_m]=e,LX(e),[n,a=>qR(e,a),a=>kfe(e,a)]}function HNe(t){return lk(t),t.value}function qR(t,i){Tfe()||UNe(t),t.equal(t.value,i)||(t.value=i,rdt(t))}function kfe(t,i){Tfe()||UNe(t),qR(t,i(t.value))}var PG=$e(pe({},GR),{equal:PX,value:void 0,kind:"signal"});function rdt(t){t.version++,FNe(),Ife(t),ndt?.(t)}function $a(t){return typeof t=="function"}function iV(t){let e=t(n=>{Error.call(n),n.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var BX=iV(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: ${e.map((n,r)=>`${r+1}) ${n.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function ST(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var Ia=class t{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:n}=this;if($a(n))try{n()}catch(o){i=o instanceof BX?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{GNe(o)}catch(a){i=i??[],a instanceof BX?i=[...i,...a.errors]:i.push(a)}}if(i)throw new BX(i)}}add(i){var e;if(i&&i!==this)if(this.closed)GNe(i);else{if(i instanceof t){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(i)}}_hasParent(i){let{_parentage:e}=this;return e===i||Array.isArray(e)&&e.includes(i)}_addParent(i){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(i),e):e?[e,i]:i}_removeParent(i){let{_parentage:e}=this;e===i?this._parentage=null:Array.isArray(e)&&ST(e,i)}remove(i){let{_finalizers:e}=this;e&&ST(e,i),i instanceof t&&i._removeParent(this)}};Ia.EMPTY=(()=>{let t=new Ia;return t.closed=!0,t})();var Mfe=Ia.EMPTY;function VX(t){return t instanceof Ia||t&&"closed"in t&&$a(t.remove)&&$a(t.add)&&$a(t.unsubscribe)}function GNe(t){$a(t)?t():t.unsubscribe()}var vx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var nV={setTimeout(t,i,...e){let{delegate:n}=nV;return n?.setTimeout?n.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=nV;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function zX(t){nV.setTimeout(()=>{let{onUnhandledError:i}=vx;if(i)i(t);else throw t})}function wT(){}var jNe=Ofe("C",void 0,void 0);function $Ne(t){return Ofe("E",void 0,t)}function qNe(t){return Ofe("N",t,void 0)}function Ofe(t,i,e){return{kind:t,value:i,error:e}}var YR=null;function rV(t){if(vx.useDeprecatedSynchronousErrorHandling){let i=!YR;if(i&&(YR={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:n}=YR;if(YR=null,e)throw n}}else t()}function YNe(t){vx.useDeprecatedSynchronousErrorHandling&&YR&&(YR.errorThrown=!0,YR.error=t)}var KR=class extends Ia{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,VX(i)&&i.add(this)):this.destination=sdt}static create(i,e,n){return new bx(i,e,n)}next(i){this.isStopped?Pfe(qNe(i),this):this._next(i)}error(i){this.isStopped?Pfe($Ne(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?Pfe(jNe,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},odt=Function.prototype.bind;function Rfe(t,i){return odt.call(t,i)}var Nfe=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(n){UX(n)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(n){UX(n)}else UX(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){UX(e)}}},bx=class extends KR{constructor(i,e,n){super();let r;if($a(i)||!i)r={next:i??void 0,error:e??void 0,complete:n??void 0};else{let o;this&&vx.useDeprecatedNextContext?(o=Object.create(i),o.unsubscribe=()=>this.unsubscribe(),r={next:i.next&&Rfe(i.next,o),error:i.error&&Rfe(i.error,o),complete:i.complete&&Rfe(i.complete,o)}):r=i}this.destination=new Nfe(r)}};function UX(t){vx.useDeprecatedSynchronousErrorHandling?YNe(t):zX(t)}function adt(t){throw t}function Pfe(t,i){let{onStoppedNotification:e}=vx;e&&nV.setTimeout(()=>e(t,i))}var sdt={closed:!0,next:wT,error:adt,complete:wT};var oV=typeof Symbol=="function"&&Symbol.observable||"@@observable";function R_(t){return t}function Ffe(...t){return Lfe(t)}function Lfe(t){return t.length===0?R_:t.length===1?t[0]:function(e){return t.reduce((n,r)=>r(n),e)}}var qo=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,r){let o=cdt(e)?e:new bx(e,n,r);return rV(()=>{let{operator:a,source:c}=this;o.add(a?a.call(o,c):c?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return n=KNe(n),new n((r,o)=>{let a=new bx({next:c=>{try{e(c)}catch(m){o(m),a.unsubscribe()}},error:o,complete:r});this.subscribe(a)})}_subscribe(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)}[oV](){return this}pipe(...e){return Lfe(e)(this)}toPromise(e){return e=KNe(e),new e((n,r)=>{let o;this.subscribe(a=>o=a,a=>r(a),()=>n(o))})}}return t.create=i=>new t(i),t})();function KNe(t){var i;return(i=t??vx.Promise)!==null&&i!==void 0?i:Promise}function ldt(t){return t&&$a(t.next)&&$a(t.error)&&$a(t.complete)}function cdt(t){return t&&t instanceof KR||ldt(t)&&VX(t)}function Bfe(t){return $a(t?.lift)}function es(t){return i=>{if(Bfe(i))return i.lift(function(e){try{return t(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Fa(t,i,e,n,r){return new Vfe(t,i,e,n,r)}var Vfe=class extends KR{constructor(i,e,n,r,o,a){super(i),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=e?function(c){try{e(c)}catch(m){i.error(m)}}:super._next,this._error=r?function(c){try{r(c)}catch(m){i.error(m)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(c){i.error(c)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((i=this.onFinalize)===null||i===void 0||i.call(this))}}};function aV(){return es((t,i)=>{let e=null;t._refCount++;let n=Fa(i,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let r=t._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),i.unsubscribe()});t.subscribe(n),n.closed||(e=t.connect())})}var sV=class extends qo{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Bfe(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){let i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Ia;let e=this.getSubject();i.add(this.source.subscribe(Fa(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Ia.EMPTY)}return i}refCount(){return aV()(this)}};var WNe=iV(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ai=(()=>{class t extends qo{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let n=new HX(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new WNe}next(e){rV(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){rV(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){rV(()=>{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:n,isStopped:r,observers:o}=this;return n||r?Mfe:(this.currentObservers=null,o.push(e),new Ia(()=>{this.currentObservers=null,ST(o,e)}))}_checkFinalizedStatuses(e){let{hasError:n,thrownError:r,isStopped:o}=this;n?e.error(r):o&&e.complete()}asObservable(){let e=new qo;return e.source=this,e}}return t.create=(i,e)=>new HX(i,e),t})(),HX=class extends Ai{constructor(i,e){super(),this.destination=i,this.source=e}next(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,i)}error(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,i)}complete(){var i,e;(e=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||e===void 0||e.call(i)}_subscribe(i){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(i))!==null&&n!==void 0?n:Mfe}};var Sa=class extends Ai{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){let e=super._subscribe(i);return!e.closed&&i.next(this._value),e}getValue(){let{hasError:i,thrownError:e,_value:n}=this;if(i)throw e;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}};var NG={now(){return(NG.delegate||Date).now()},delegate:void 0};var hi=class extends Ai{constructor(i=1/0,e=1/0,n=NG){super(),this._bufferSize=i,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,e)}next(i){let{isStopped:e,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:a}=this;e||(n.push(i),!r&&n.push(o.now()+a)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let a=0;at.complete());function cV(t){return t&&$a(t.schedule)}function zfe(t){return t[t.length-1]}function qX(t){return $a(zfe(t))?t.pop():void 0}function PS(t){return cV(zfe(t))?t.pop():void 0}function ZNe(t,i){return typeof zfe(t)=="number"?t.pop():i}function JNe(t,i,e,n){var r=arguments.length,o=r<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,i,e,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(o=(r<3?a(o):r>3?a(i,e,o):a(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o}function Ufe(t,i){return function(e,n){i(e,n,t)}}function eFe(t,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,i)}function tFe(t,i,e,n){function r(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function c(C){try{g(n.next(C))}catch(w){a(w)}}function m(C){try{g(n.throw(C))}catch(w){a(w)}}function g(C){C.done?o(C.value):r(C.value).then(c,m)}g((n=n.apply(t,i||[])).next())})}function XNe(t){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&t[i],n=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function WR(t){return this instanceof WR?(this.v=t,this):new WR(t)}function iFe(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(t,i||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",a),r[Symbol.asyncIterator]=function(){return this},r;function a(R){return function(z){return Promise.resolve(z).then(R,w)}}function c(R,z){n[R]&&(r[R]=function(H){return new Promise(function(j,K){o.push([R,H,j,K])>1||m(R,H)})},z&&(r[R]=z(r[R])))}function m(R,z){try{g(n[R](z))}catch(H){P(o[0][3],H)}}function g(R){R.value instanceof WR?Promise.resolve(R.value.v).then(C,w):P(o[0][2],R)}function C(R){m("next",R)}function w(R){m("throw",R)}function P(R,z){R(z),o.shift(),o.length&&m(o[0][0],o[0][1])}}function nFe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t[Symbol.asyncIterator],e;return i?i.call(t):(t=typeof XNe=="function"?XNe(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(o){e[o]=t[o]&&function(a){return new Promise(function(c,m){a=t[o](a),r(c,m,a.done,a.value)})}}function r(o,a,c,m){Promise.resolve(m).then(function(g){o({value:g,done:c})},a)}}var dV=t=>t&&typeof t.length=="number"&&typeof t!="function";function YX(t){return $a(t?.then)}function KX(t){return $a(t[oV])}function WX(t){return Symbol.asyncIterator&&$a(t?.[Symbol.asyncIterator])}function QX(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 ddt(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ZX=ddt();function XX(t){return $a(t?.[ZX])}function JX(t){return iFe(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:r}=yield WR(e.read());if(r)return yield WR(void 0);yield yield WR(n)}}finally{e.releaseLock()}})}function eJ(t){return $a(t?.getReader)}function dc(t){if(t instanceof qo)return t;if(t!=null){if(KX(t))return udt(t);if(dV(t))return pdt(t);if(YX(t))return mdt(t);if(WX(t))return rFe(t);if(XX(t))return hdt(t);if(eJ(t))return fdt(t)}throw QX(t)}function udt(t){return new qo(i=>{let e=t[oV]();if($a(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function pdt(t){return new qo(i=>{for(let e=0;e{t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,zX)})}function hdt(t){return new qo(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function rFe(t){return new qo(i=>{gdt(t,i).catch(e=>i.error(e))})}function fdt(t){return rFe(JX(t))}function gdt(t,i){var e,n,r,o;return tFe(this,void 0,void 0,function*(){try{for(e=nFe(t);n=yield e.next(),!n.done;){let a=n.value;if(i.next(a),i.closed)return}}catch(a){r={error:a}}finally{try{n&&!n.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}i.complete()})}function j0(t,i,e,n=0,r=!1){let o=i.schedule(function(){e(),r?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!r)return o}function uV(t,i=0){return es((e,n)=>{e.subscribe(Fa(n,r=>j0(n,t,()=>n.next(r),i),()=>j0(n,t,()=>n.complete(),i),r=>j0(n,t,()=>n.error(r),i)))})}function pV(t,i=0){return es((e,n)=>{n.add(t.schedule(()=>e.subscribe(n),i))})}function oFe(t,i){return dc(t).pipe(pV(i),uV(i))}function aFe(t,i){return dc(t).pipe(pV(i),uV(i))}function sFe(t,i){return new qo(e=>{let n=0;return i.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})}function lFe(t,i){return new qo(e=>{let n;return j0(e,i,()=>{n=t[ZX](),j0(e,i,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(a){e.error(a);return}o?e.complete():e.next(r)},0,!0)}),()=>$a(n?.return)&&n.return()})}function tJ(t,i){if(!t)throw new Error("Iterable cannot be null");return new qo(e=>{j0(e,i,()=>{let n=t[Symbol.asyncIterator]();j0(e,i,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function cFe(t,i){return tJ(JX(t),i)}function dFe(t,i){if(t!=null){if(KX(t))return oFe(t,i);if(dV(t))return sFe(t,i);if(YX(t))return aFe(t,i);if(WX(t))return tJ(t,i);if(XX(t))return lFe(t,i);if(eJ(t))return cFe(t,i)}throw QX(t)}function Hr(t,i){return i?dFe(t,i):dc(t)}function $t(...t){let i=PS(t);return Hr(t,i)}function NS(t,i){let e=$a(t)?t:()=>t,n=r=>r.error(e());return new qo(i?r=>i.schedule(n,0,r):n)}function mV(t){return!!t&&(t instanceof qo||$a(t.lift)&&$a(t.subscribe))}var Cx=iV(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function ym(t,i){let e=typeof i=="object";return new Promise((n,r)=>{let o=new bx({next:a=>{n(a),o.unsubscribe()},error:r,complete:()=>{e?n(i.defaultValue):r(new Cx)}});t.subscribe(o)})}function uFe(t){return t instanceof Date&&!isNaN(t)}function ot(t,i){return es((e,n)=>{let r=0;e.subscribe(Fa(n,o=>{n.next(t.call(i,o,r++))}))})}var{isArray:_dt}=Array;function ydt(t,i){return _dt(i)?t(...i):t(i)}function uk(t){return ot(i=>ydt(t,i))}function iJ(t,i,e,n){if(e)if(cV(e))n=e;else return function(...r){return iJ(t,i,n).apply(this,r).pipe(uk(e))};return n?function(...r){return iJ(t,i).apply(this,r).pipe(pV(n),uV(n))}:function(...r){let o=new Bf,a=!0;return new qo(c=>{let m=o.subscribe(c);if(a){a=!1;let g=!1,C=!1;i.apply(this,[...r,(...w)=>{if(t){let P=w.shift();if(P!=null){o.error(P);return}}o.next(1i[n]),keys:e}}}return{args:t,keys:null}}function Sdt(t){return t&&typeof t=="object"&&bdt(t)===Cdt}function rJ(t,i){return t.reduce((e,n,r)=>(e[n]=i[r],e),{})}function Ec(...t){let i=PS(t),e=qX(t),{args:n,keys:r}=nJ(t);if(n.length===0)return Hr([],i);let o=new qo(wdt(n,i,r?a=>rJ(r,a):R_));return e?o.pipe(uk(e)):o}function wdt(t,i,e=R_){return n=>{pFe(i,()=>{let{length:r}=t,o=new Array(r),a=r,c=r;for(let m=0;m{let g=Hr(t[m],i),C=!1;g.subscribe(Fa(n,w=>{o[m]=w,C||(C=!0,c--),c||n.next(e(o.slice()))},()=>{--a||n.complete()}))},n)},n)}}function pFe(t,i,e){t?j0(e,t,i):i()}function mFe(t,i,e,n,r,o,a,c){let m=[],g=0,C=0,w=!1,P=()=>{w&&!m.length&&!g&&i.complete()},R=H=>g{o&&i.next(H),g++;let j=!1;dc(e(H,C++)).subscribe(Fa(i,K=>{r?.(K),o?R(K):i.next(K)},()=>{j=!0},void 0,()=>{if(j)try{for(g--;m.length&&gz(K)):z(K)}P()}catch(K){i.error(K)}}))};return t.subscribe(Fa(i,R,()=>{w=!0,P()})),()=>{c?.()}}function ps(t,i,e=1/0){return $a(i)?ps((n,r)=>ot((o,a)=>i(n,o,r,a))(dc(t(n,r))),e):(typeof i=="number"&&(e=i),es((n,r)=>mFe(n,r,t,e)))}function $0(t=1/0){return ps(R_,t)}function hFe(){return $0(1)}function FS(...t){return hFe()(Hr(t,PS(t)))}function lv(t){return new qo(i=>{dc(t()).subscribe(i)})}function Ys(...t){let i=qX(t),{args:e,keys:n}=nJ(t),r=new qo(o=>{let{length:a}=e;if(!a){o.complete();return}let c=new Array(a),m=a,g=a;for(let C=0;C{w||(w=!0,g--),c[C]=P},()=>m--,void 0,()=>{(!m||!w)&&(g||o.next(n?rJ(n,c):c),o.complete())}))}});return i?r.pipe(uk(i)):r}var Idt=["addListener","removeListener"],Tdt=["addEventListener","removeEventListener"],Edt=["on","off"];function Eb(t,i,e,n){if($a(e)&&(n=e,e=void 0),n)return Eb(t,i,e).pipe(uk(n));let[r,o]=kdt(t)?Tdt.map(a=>c=>t[a](i,c,e)):Adt(t)?Idt.map(fFe(t,i)):Ddt(t)?Edt.map(fFe(t,i)):[];if(!r&&dV(t))return ps(a=>Eb(a,i,e))(dc(t));if(!r)throw new TypeError("Invalid event target");return new qo(a=>{let c=(...m)=>a.next(1o(c)})}function fFe(t,i){return e=>n=>t[e](i,n)}function Adt(t){return $a(t.addListener)&&$a(t.removeListener)}function Ddt(t){return $a(t.on)&&$a(t.off)}function kdt(t){return $a(t.addEventListener)&&$a(t.removeEventListener)}function Gfe(t,i,e){return lv(()=>t()?i:e)}function cv(t=0,i,e=QNe){let n=-1;return i!=null&&(cV(i)?e=i:n=i),new qo(r=>{let o=uFe(t)?+t-e.now():t;o<0&&(o=0);let a=0;return e.schedule(function(){r.closed||(r.next(a++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function hV(t=0,i=IT){return t<0&&(t=0),cv(t,t,i)}function Vp(...t){let i=PS(t),e=ZNe(t,1/0),n=t;return n.length?n.length===1?dc(n[0]):$0(e)(Hr(n,i)):Xd}var dl=new qo(wT);var{isArray:Mdt}=Array;function gFe(t){return t.length===1&&Mdt(t[0])?t[0]:t}function vn(t,i){return es((e,n)=>{let r=0;e.subscribe(Fa(n,o=>t.call(i,o,r++)&&n.next(o)))})}function LG(...t){return t=gFe(t),t.length===1?dc(t[0]):new qo(Odt(t))}function Odt(t){return i=>{let e=[];for(let n=0;e&&!i.closed&&n{if(e){for(let o=0;o{let n=!1,r=null,o=null,a=!1,c=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let g=r;r=null,e.next(g)}a&&e.complete()},m=()=>{o=null,a&&e.complete()};i.subscribe(Fa(e,g=>{n=!0,r=g,o||dc(t(g)).subscribe(o=Fa(e,c,m))},()=>{a=!0,(!n||!o||o.closed)&&e.complete()}))})}function oJ(t,i=IT){return _Fe(()=>cv(t,i))}function jfe(t,i=null){return i=i??t,es((e,n)=>{let r=[],o=0;e.subscribe(Fa(n,a=>{let c=null;o++%i===0&&r.push([]);for(let m of r)m.push(a),t<=m.length&&(c=c??[],c.push(m));if(c)for(let m of c)ST(r,m),n.next(m)},()=>{for(let a of r)n.next(a);n.complete()},void 0,()=>{r=null}))})}function Ac(t){return es((i,e)=>{let n=null,r=!1,o;n=i.subscribe(Fa(e,void 0,void 0,a=>{o=dc(t(a,Ac(t)(i))),n?(n.unsubscribe(),n=null,o.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(e))})}function yFe(t,i,e,n,r){return(o,a)=>{let c=e,m=i,g=0;o.subscribe(Fa(a,C=>{let w=g++;m=c?t(m,C,w):(c=!0,C),n&&a.next(m)},r&&(()=>{c&&a.next(m),a.complete()})))}}function Uh(t,i){return $a(i)?ps(t,i,1):ps(t,1)}function Hh(t,i=IT){return es((e,n)=>{let r=null,o=null,a=null,c=()=>{if(r){r.unsubscribe(),r=null;let g=o;o=null,n.next(g)}};function m(){let g=a+t,C=i.now();if(C{o=g,a=i.now(),r||(r=i.schedule(m,t),n.add(r))},()=>{c(),n.complete()},void 0,()=>{o=r=null}))})}function P_(t){return es((i,e)=>{let n=!1;i.subscribe(Fa(e,r=>{n=!0,e.next(r)},()=>{n||e.next(t),e.complete()}))})}function ar(t){return t<=0?()=>Xd:es((i,e)=>{let n=0;i.subscribe(Fa(e,r=>{++n<=t&&(e.next(r),t<=n&&e.complete())}))})}function vFe(){return es((t,i)=>{t.subscribe(Fa(i,wT))})}function bFe(t){return ot(()=>t)}function $fe(t,i){return i?e=>FS(i.pipe(ar(1),vFe()),e.pipe($fe(t))):ps((e,n)=>dc(t(e,n)).pipe(ar(1),bFe(e)))}function BG(t,i=IT){let e=cv(t,i);return $fe(()=>e)}function vm(t,i=R_){return t=t??Rdt,es((e,n)=>{let r,o=!0;e.subscribe(Fa(n,a=>{let c=i(a);(o||!t(r,c))&&(o=!1,r=c,n.next(a))}))})}function Rdt(t,i){return t===i}function aJ(t=Pdt){return es((i,e)=>{let n=!1;i.subscribe(Fa(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(t())))})}function Pdt(){return new Cx}function LS(t){return es((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function q0(t,i){let e=arguments.length>=2;return n=>n.pipe(t?vn((r,o)=>t(r,o,n)):R_,ar(1),e?P_(i):aJ(()=>new Cx))}function fV(t){return t<=0?()=>Xd:es((i,e)=>{let n=[];i.subscribe(Fa(e,r=>{n.push(r),t{for(let r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function qfe(t,i){let e=arguments.length>=2;return n=>n.pipe(t?vn((r,o)=>t(r,o,n)):R_,fV(1),e?P_(i):aJ(()=>new Cx))}function sJ(){return es((t,i)=>{let e,n=!1;t.subscribe(Fa(i,r=>{let o=e;e=r,n&&i.next([o,r]),n=!0}))})}function Yfe(t,i){return es(yFe(t,i,arguments.length>=2,!0))}function VG(t={}){let{connector:i=()=>new Ai,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=t;return o=>{let a,c,m,g=0,C=!1,w=!1,P=()=>{c?.unsubscribe(),c=void 0},R=()=>{P(),a=m=void 0,C=w=!1},z=()=>{let H=a;R(),H?.unsubscribe()};return es((H,j)=>{g++,!w&&!C&&P();let K=m=m??i();j.add(()=>{g--,g===0&&!w&&!C&&(c=Kfe(z,r))}),K.subscribe(j),!a&&g>0&&(a=new bx({next:ne=>K.next(ne),error:ne=>{w=!0,P(),c=Kfe(R,e,ne),K.error(ne)},complete:()=>{C=!0,P(),c=Kfe(R,n),K.complete()}}),dc(H).subscribe(a))})(o)}}function Kfe(t,i,...e){if(i===!0){t();return}if(i===!1)return;let n=new bx({next:()=>{n.unsubscribe(),t()}});return dc(i(...e)).subscribe(n)}function qc(t,i,e){let n,r=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:i=1/0,refCount:r=!1,scheduler:e}=t:n=t??1/0,VG({connector:()=>new hi(n,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function QR(t){return vn((i,e)=>t<=e)}function ks(...t){let i=PS(t);return es((e,n)=>{(i?FS(t,e,i):FS(t,e)).subscribe(n)})}function On(t,i){return es((e,n)=>{let r=null,o=0,a=!1,c=()=>a&&!r&&n.complete();e.subscribe(Fa(n,m=>{r?.unsubscribe();let g=0,C=o++;dc(t(m,C)).subscribe(r=Fa(n,w=>n.next(i?i(m,w,C,g++):w),()=>{r=null,c()}))},()=>{a=!0,c()}))})}function ha(t){return es((i,e)=>{dc(t).subscribe(Fa(e,()=>e.complete(),wT)),!e.closed&&i.subscribe(e)})}function zG(t,i=!1){return es((e,n)=>{let r=0;e.subscribe(Fa(n,o=>{let a=t(o,r++);(a||i)&&n.next(o),!a&&n.complete()}))})}function yo(t,i,e){let n=$a(t)||i||e?{next:t,error:i,complete:e}:t;return n?es((r,o)=>{var a;(a=n.subscribe)===null||a===void 0||a.call(n);let c=!0;r.subscribe(Fa(o,m=>{var g;(g=n.next)===null||g===void 0||g.call(n,m),o.next(m)},()=>{var m;c=!1,(m=n.complete)===null||m===void 0||m.call(n),o.complete()},m=>{var g;c=!1,(g=n.error)===null||g===void 0||g.call(n,m),o.error(m)},()=>{var m,g;c&&((m=n.unsubscribe)===null||m===void 0||m.call(n)),(g=n.finalize)===null||g===void 0||g.call(n)}))}):R_}function CFe(t){let i=cs(null);try{return t()}finally{cs(i)}}var xFe=$e(pe({},GR),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,kind:"effect"});function SFe(t){if(t.dirty=!1,t.hasRun&&!$R(t))return;t.hasRun=!0;let i=ck(t);try{t.cleanup(),t.fn()}finally{jR(t,i)}}var uJ="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Nn=class extends Error{code;constructor(i,e){super(BS(i,e)),this.code=i}};function Ndt(t){return`NG0${Math.abs(t)}`}function BS(t,i){return`${Ndt(t)}${i?": "+i:""}`}var oh=globalThis;function ed(t){for(let i in t)if(t[i]===ed)return i;throw Error("")}function TFe(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function ET(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(ET).join(", ")}]`;if(t==null)return""+t;let i=t.overriddenName||t.name;if(i)return`${i}`;let e=t.toString();if(e==null)return""+e;let n=e.indexOf(` `);return n>=0?e.slice(0,n):e}function pJ(t,i){return t?i?`${t} ${i}`:t:i||""}var Fdt=ed({__forward_ref__:ed});function No(t){return t.__forward_ref__=No,t.toString=function(){return ET(this())},t}function nh(t){return age(t)?t():t}function age(t){return typeof t=="function"&&t.hasOwnProperty(Fdt)&&t.__forward_ref__===No}function EFe(t,i,e){t!=i&&AFe(e,t,i,"==")}function AFe(t,i,e,n){throw new Error(`ASSERTION ERROR: ${t}`+(n==null?"":` [Expected=> ${e} ${n} ${i} <=Actual]`))}function ct(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ji(t){return{providers:t.providers||[],imports:t.imports||[]}}function $G(t){return Ldt(t,mJ)}function sge(t){return $G(t)!==null}function Ldt(t,i){return t.hasOwnProperty(i)&&t[i]||null}function Bdt(t){let i=t?.[mJ]??null;return i||null}function Qfe(t){return t&&t.hasOwnProperty(cJ)?t[cJ]:null}var mJ=ed({\u0275prov:ed}),cJ=ed({\u0275inj:ed}),Mi=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(i,e){this._desc=i,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=ct({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function lge(t){return t&&!!t.\u0275providers}var cge=ed({\u0275cmp:ed}),dge=ed({\u0275dir:ed}),uge=ed({\u0275pipe:ed}),pge=ed({\u0275mod:ed}),HG=ed({\u0275fac:ed}),tP=ed({__NG_ELEMENT_ID__:ed}),wFe=ed({__NG_ENV_ID__:ed});function hk(t){return typeof t=="string"?t:t==null?"":String(t)}function DFe(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():hk(t)}var kFe=ed({ngErrorCode:ed}),Vdt=ed({ngErrorMessage:ed}),zdt=ed({ngTokenPath:ed});function mge(t,i){return MFe("",-200,i)}function hJ(t,i){throw new Nn(-201,!1)}function MFe(t,i,e){let n=new Nn(i,t);return n[kFe]=i,n[Vdt]=t,e&&(n[zdt]=e),n}function Udt(t){return t[kFe]}var Zfe;function OFe(){return Zfe}function N_(t){let i=Zfe;return Zfe=t,i}function hge(t,i,e){let n=$G(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(e&8)return null;if(i!==void 0)return i;hJ(t,"Injector")}var Hdt={},ZR=Hdt,Xfe="__NG_DI_FLAG__",Jfe=class{injector;constructor(i){this.injector=i}retrieve(i,e){let n=XR(e)||0;try{return this.injector.get(i,n&8?null:ZR,n)}catch(r){if(eV(r))return r;throw r}}};function Gdt(t,i=0){let e=DX();if(e===void 0)throw new Nn(-203,!1);if(e===null)return hge(t,void 0,i);{let n=jdt(i),r=e.retrieve(t,n);if(eV(r)){if(n.optional)return null;throw r}return r}}function ai(t,i=0){return(OFe()||Gdt)(nh(t),i)}function ae(t,i){return ai(t,XR(i))}function XR(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function jdt(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function ege(t){let i=[];for(let e=0;eArray.isArray(e)?gJ(e,i):i(e))}function fge(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function qG(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function NFe(t,i){let e=[];for(let n=0;ni;){let o=r-2;t[r]=t[o],r--}t[i]=e,t[i+1]=n}}function YG(t,i,e){let n=_V(t,i);return n>=0?t[n|1]=e:(n=~n,FFe(t,n,i,e)),n}function _J(t,i){let e=_V(t,i);if(e>=0)return t[e|1]}function _V(t,i){return qdt(t,i,1)}function qdt(t,i,e){let n=0,r=t.length>>e;for(;r!==n;){let o=n+(r-n>>1),a=t[o<i?r=o:n=o+1}return~(r<{e.push(a)};return gJ(i,a=>{let c=a;dJ(c,o,[],n)&&(r||=[],r.push(c))}),r!==void 0&&BFe(r,o),e}function BFe(t,i){for(let e=0;e{i(o,n)})}}function dJ(t,i,e,n){if(t=nh(t),!t)return!1;let r=null,o=Qfe(t),a=!o&&VS(t);if(!o&&!a){let m=t.ngModule;if(o=Qfe(m),o)r=m;else return!1}else{if(a&&!a.standalone)return!1;r=t}let c=n.has(r);if(a){if(c)return!1;if(n.add(r),a.dependencies){let m=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let g of m)dJ(g,i,e,n)}}else if(o){if(o.imports!=null&&!c){n.add(r);let g;try{gJ(o.imports,C=>{dJ(C,i,e,n)&&(g||=[],g.push(C))})}finally{}g!==void 0&&BFe(g,i)}if(!c){let g=pk(r)||(()=>new r);i({provide:r,useFactory:g,deps:Vf},r),i({provide:_ge,useValue:r,multi:!0},r),i({provide:AT,useValue:()=>ai(r),multi:!0},r)}let m=o.providers;if(m!=null&&!c){let g=t;bge(m,C=>{i(C,g)})}}else return!1;return r!==t&&t.providers!==void 0}function bge(t,i){for(let e of t)lge(e)&&(e=e.\u0275providers),Array.isArray(e)?bge(e,i):i(e)}var Ydt=ed({provide:String,useValue:ed});function VFe(t){return t!==null&&typeof t=="object"&&Ydt in t}function Kdt(t){return!!(t&&t.useExisting)}function Wdt(t){return!!(t&&t.useFactory)}function JR(t){return typeof t=="function"}function zFe(t){return!!t.useClass}var WG=new Mi(""),lJ={},IFe={},Wfe;function yV(){return Wfe===void 0&&(Wfe=new GG),Wfe}var _d=class{},eP=class extends _d{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(i,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,ige(i,a=>this.processProvider(a)),this.records.set(gge,gV(void 0,this)),r.has("environment")&&this.records.set(_d,gV(void 0,this));let o=this.records.get(WG);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(_ge,Vf,{self:!0}))}retrieve(i,e){let n=XR(e)||0;try{return this.get(i,ZR,n)}catch(r){if(eV(r))return r;throw r}}destroy(){UG(this),this._destroyed=!0;let i=cs(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),cs(i)}}onDestroy(i){return UG(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){UG(this);let e=RS(this),n=N_(void 0),r;try{return i()}finally{RS(e),N_(n)}}get(i,e=ZR,n){if(UG(this),i.hasOwnProperty(wFe))return i[wFe](this);let r=XR(n),o,a=RS(this),c=N_(void 0);try{if(!(r&4)){let g=this.records.get(i);if(g===void 0){let C=eut(i)&&$G(i);C&&this.injectableDefInScope(C)?g=gV(tge(i),lJ):g=null,this.records.set(i,g)}if(g!=null)return this.hydrate(i,g,r)}let m=r&2?yV():this.parent;return e=r&8&&e===ZR?null:e,m.get(i,e)}catch(m){let g=Udt(m);throw g===-200||g===-201?new Nn(g,null):m}finally{N_(c),RS(a)}}resolveInjectorInitializers(){let i=cs(null),e=RS(this),n=N_(void 0),r;try{let o=this.get(AT,Vf,{self:!0});for(let a of o)a()}finally{RS(e),N_(n),cs(i)}}toString(){let i=[],e=this.records;for(let n of e.keys())i.push(ET(n));return`R3Injector[${i.join(", ")}]`}processProvider(i){i=nh(i);let e=JR(i)?i:nh(i&&i.provide),n=Zdt(i);if(!JR(i)&&i.multi===!0){let r=this.records.get(e);r||(r=gV(void 0,lJ,!0),r.factory=()=>ege(r.multi),this.records.set(e,r)),e=i,r.multi.push(i)}this.records.set(e,n)}hydrate(i,e,n){let r=cs(null);try{if(e.value===IFe)throw mge(ET(i));return e.value===lJ&&(e.value=IFe,e.value=e.factory(void 0,n)),typeof e.value=="object"&&e.value&&Jdt(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{cs(r)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=nh(i.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(i){let e=this._onDestroyHooks.indexOf(i);e!==-1&&this._onDestroyHooks.splice(e,1)}};function tge(t){let i=$G(t),e=i!==null?i.factory:pk(t);if(e!==null)return e;if(t instanceof Mi)throw new Nn(204,!1);if(t instanceof Function)return Qdt(t);throw new Nn(204,!1)}function Qdt(t){if(t.length>0)throw new Nn(204,!1);let e=Bdt(t);return e!==null?()=>e.factory(t):()=>new t}function Zdt(t){if(VFe(t))return gV(void 0,t.useValue);{let i=Cge(t);return gV(i,lJ)}}function Cge(t,i,e){let n;if(JR(t)){let r=nh(t);return pk(r)||tge(r)}else if(VFe(t))n=()=>nh(t.useValue);else if(Wdt(t))n=()=>t.useFactory(...ege(t.deps||[]));else if(Kdt(t))n=(r,o)=>ai(nh(t.useExisting),o!==void 0&&o&8?8:void 0);else{let r=nh(t&&(t.useClass||t.provide));if(Xdt(t))n=()=>new r(...ege(t.deps));else return pk(r)||tge(r)}return n}function UG(t){if(t.destroyed)throw new Nn(205,!1)}function gV(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function Xdt(t){return!!t.deps}function Jdt(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function eut(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function ige(t,i){for(let e of t)Array.isArray(e)?ige(e,i):e&&lge(e)?ige(e.\u0275providers,i):i(e)}function Gh(t,i){let e;t instanceof eP?(UG(t),e=t):e=new Jfe(t);let n,r=RS(e),o=N_(void 0);try{return i()}finally{RS(r),N_(o)}}function xge(){return OFe()!==void 0||DX()!=null}var Sx=0,ka=1,ts=2,rh=3,Db=4,Og=5,iP=6,vV=7,zp=8,bV=9,US=10,Yc=11,CV=12,Sge=13,nP=14,Rg=15,fk=16,rP=17,HS=18,QG=19,wge=20,TT=21,vJ=22,DT=23,dv=24,oP=25,zf=26,yd=27,UFe=1,Ige=6,gk=7,ZG=8,aP=9,bm=10;function GS(t){return Array.isArray(t)&&typeof t[UFe]=="object"}function wx(t){return Array.isArray(t)&&t[UFe]===!0}function Tge(t){return(t.flags&4)!==0}function kT(t){return t.componentOffset>-1}function xV(t){return(t.flags&1)===1}function Ix(t){return!!t.template}function SV(t){return(t[ts]&512)!==0}function sP(t){return(t[ts]&256)===256}var Ege="svg",HFe="math";function uv(t){for(;Array.isArray(t);)t=t[Sx];return t}function Age(t,i){return uv(i[t])}function kb(t,i){return uv(i[t.index])}function XG(t,i){return t.data[i]}function JG(t,i){return t[i]}function Dge(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}function Mb(t,i){let e=i[t];return GS(e)?e:e[Sx]}function GFe(t){return(t[ts]&4)===4}function bJ(t){return(t[ts]&128)===128}function jFe(t){return wx(t[rh])}function Y0(t,i){return i==null?null:t[i]}function kge(t){t[rP]=0}function Mge(t){t[ts]&1024||(t[ts]|=1024,bJ(t)&&_k(t))}function $Fe(t,i){for(;t>0;)i=i[nP],t--;return i}function ej(t){return!!(t[ts]&9216||t[dv]?.dirty)}function CJ(t){t[US].changeDetectionScheduler?.notify(8),t[ts]&64&&(t[ts]|=1024),ej(t)&&_k(t)}function _k(t){t[US].changeDetectionScheduler?.notify(0);let i=mk(t);for(;i!==null&&!(i[ts]&8192||(i[ts]|=8192,!bJ(i)));)i=mk(i)}function Oge(t,i){if(sP(t))throw new Nn(911,!1);t[TT]===null&&(t[TT]=[]),t[TT].push(i)}function qFe(t,i){if(t[TT]===null)return;let e=t[TT].indexOf(i);e!==-1&&t[TT].splice(e,1)}function mk(t){let i=t[rh];return wx(i)?i[rh]:i}function Rge(t){return t[vV]??=[]}function Pge(t){return t.cleanup??=[]}function YFe(t,i,e,n){let r=Rge(i);r.push(e),t.firstCreatePass&&Pge(t).push(n,r.length-1)}var Ks={lFrame:rLe(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var nge=!1;function KFe(){return Ks.lFrame.elementDepthCount}function WFe(){Ks.lFrame.elementDepthCount++}function Nge(){Ks.lFrame.elementDepthCount--}function xJ(){return Ks.bindingsEnabled}function Fge(){return Ks.skipHydrationRootTNode!==null}function Lge(t){return Ks.skipHydrationRootTNode===t}function Bge(){Ks.skipHydrationRootTNode=null}function Wo(){return Ks.lFrame.lView}function vd(){return Ks.lFrame.tView}function se(t){return Ks.lFrame.contextLView=t,t[zp]}function le(t){return Ks.lFrame.contextLView=null,t}function Cm(){let t=Vge();for(;t!==null&&t.type===64;)t=t.parent;return t}function Vge(){return Ks.lFrame.currentTNode}function wV(){let t=Ks.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function MT(t,i){let e=Ks.lFrame;e.currentTNode=t,e.isParent=i}function zge(){return Ks.lFrame.isParent}function Uge(){Ks.lFrame.isParent=!1}function QFe(){return Ks.lFrame.contextLView}function Hge(){return nge}function IV(t){let i=nge;return nge=t,i}function K0(){let t=Ks.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function ZFe(){return Ks.lFrame.bindingIndex}function XFe(t){return Ks.lFrame.bindingIndex=t}function OT(){return Ks.lFrame.bindingIndex++}function SJ(t){let i=Ks.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function JFe(){return Ks.lFrame.inI18n}function Gge(t){Ks.lFrame.inI18n=t}function eLe(t,i){let e=Ks.lFrame;e.bindingIndex=e.bindingRootIndex=t,wJ(i)}function tLe(){return Ks.lFrame.currentDirectiveIndex}function wJ(t){Ks.lFrame.currentDirectiveIndex=t}function iLe(t){let i=Ks.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}function IJ(){return Ks.lFrame.currentQueryIndex}function tj(t){Ks.lFrame.currentQueryIndex=t}function tut(t){let i=t[ka];return i.type===2?i.declTNode:i.type===1?t[Og]:null}function jge(t,i,e){if(e&4){let r=i,o=t;for(;r=r.parent,r===null&&!(e&1);)if(r=tut(o),r===null||(o=o[nP],r.type&10))break;if(r===null)return!1;i=r,t=o}let n=Ks.lFrame=nLe();return n.currentTNode=i,n.lView=t,!0}function TJ(t){let i=nLe(),e=t[ka];Ks.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function nLe(){let t=Ks.lFrame,i=t===null?null:t.child;return i===null?rLe(t):i}function rLe(t){let i={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=i),i}function oLe(){let t=Ks.lFrame;return Ks.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var $ge=oLe;function EJ(){let t=oLe();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 aLe(t){return(Ks.lFrame.contextLView=$Fe(t,Ks.lFrame.contextLView))[zp]}function jS(){return Ks.lFrame.selectedIndex}function yk(t){Ks.lFrame.selectedIndex=t}function TV(){let t=Ks.lFrame;return XG(t.tView,t.selectedIndex)}function Pi(){Ks.lFrame.currentNamespace=Ege}function RT(){iut()}function iut(){Ks.lFrame.currentNamespace=null}function sLe(){return Ks.lFrame.currentNamespace}var lLe=!0;function ij(){return lLe}function EV(t){lLe=t}function rge(t,i=null,e=null,n){let r=qge(t,i,e,n);return r.resolveInjectorInitializers(),r}function qge(t,i=null,e=null,n,r=new Set){let o=[e||Vf,KG(t)];return n=n||(typeof t=="object"?void 0:ET(t)),new eP(o,i||yV(),n||null,r)}var Ir=class t{static THROW_IF_NOT_FOUND=ZR;static NULL=new GG;static create(i,e){if(Array.isArray(i))return rge({name:""},e,i,"");{let n=i.name??"";return rge({name:n},i.parent,i.providers,n)}}static \u0275prov=ct({token:t,providedIn:"any",factory:()=>ai(gge)});static __NG_ELEMENT_ID__=-1},Gr=new Mi(""),F_=(()=>{class t{static __NG_ELEMENT_ID__=nut;static __NG_ENV_ID__=e=>e}return t})(),jG=class extends F_{_lView;constructor(i){super(),this._lView=i}get destroyed(){return sP(this._lView)}onDestroy(i){let e=this._lView;return Oge(e,i),()=>qFe(e,i)}};function nut(){return new jG(Wo())}var hp=class{_console=console;handleError(i){this._console.error("ERROR",i)}},L_=new Mi("",{providedIn:"root",factory:()=>{let t=ae(_d),i;return e=>{t.destroyed&&!i?setTimeout(()=>{throw e}):(i??=t.get(hp),i.handleError(e))}}}),cLe={provide:AT,useValue:()=>void ae(hp),multi:!0};function $S(t){return typeof t=="function"&&t[_m]!==void 0}function hr(t,i){let[e,n,r]=Dfe(t,i?.equal),o=e,a=o[_m];return o.set=n,o.update=r,o.asReadonly=AJ.bind(o),o}function AJ(){let t=this[_m];if(t.readonlyFn===void 0){let i=()=>this();i[_m]=t,t.readonlyFn=i}return t.readonlyFn}function Yge(t){return $S(t)&&typeof t.set=="function"}var Ab=class{},nj=new Mi("",{providedIn:"root",factory:()=>!1});var Kge=new Mi(""),Wge=new Mi("");var lP=(()=>{class t{view;node;constructor(e,n){this.view=e,this.node=n}static __NG_ELEMENT_ID__=rut}return t})();function rut(){return new lP(Wo(),Cm())}var qS=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Sa(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new qo(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=ct({token:t,providedIn:"root",factory:()=>new t})}return t})(),AV=(()=>{class t{internalPendingTasks=ae(qS);scheduler=ae(Ab);errorHandler=ae(L_);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let n=this.add();e().catch(this.errorHandler).finally(n)}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})();function cP(...t){}var rj=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new oge})}return t})(),oge=class{dirtyEffectCount=0;queues=new Map;add(i){this.enqueue(i),this.schedule(i)}schedule(i){i.dirty&&this.dirtyEffectCount++}remove(i){let e=i.zone,n=this.queues.get(e);n.has(i)&&(n.delete(i),i.dirty&&this.dirtyEffectCount--)}enqueue(i){let e=i.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(i)||n.add(i)}flush(){for(;this.dirtyEffectCount>0;){let i=!1;for(let[e,n]of this.queues)e===null?i||=this.flushQueue(n):i||=e.run(()=>this.flushQueue(n));i||(this.dirtyEffectCount=0)}}flushQueue(i){let e=!1;for(let n of i)n.dirty&&(this.dirtyEffectCount--,e=!0,n.run());return e}};function zV(t){return{toString:t}.toString()}var DJ="__parameters__";function dut(t){return function(...e){if(t){let n=t(...e);for(let r in n)this[r]=n[r]}}}function J_e(t,i,e){return zV(()=>{let n=dut(i);function r(...o){if(this instanceof r)return n.apply(this,o),this;let a=new r(...o);return c.annotation=a,c;function c(m,g,C){let w=m.hasOwnProperty(DJ)?m[DJ]:Object.defineProperty(m,DJ,{value:[]})[DJ];for(;w.length<=C;)w.push(null);return(w[C]=w[C]||[]).push(a),m}}return r.prototype.ngMetadataName=t,r.annotationCls=r,r})}var gj=fJ(J_e("Inject",t=>({token:t})),-1),mP=fJ(J_e("Optional"),8);var _j=fJ(J_e("SkipSelf"),4);function uut(t){return typeof t=="function"}var UJ=class{previousValue;currentValue;firstChange;constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function YLe(t,i,e,n){i!==null?i.applyValueToInputSignal(i,n):t[e]=n}var Yt=(()=>{let t=()=>KLe;return t.ngInherit=!0,t})();function KLe(t){return t.type.prototype.ngOnChanges&&(t.setInput=mut),put}function put(){let t=QLe(this),i=t?.current;if(i){let e=t.previous;if(e===xx)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function mut(t,i,e,n,r){let o=this.declaredInputs[n],a=QLe(t)||hut(t,{previous:xx,current:null}),c=a.current||(a.current={}),m=a.previous,g=m[o];c[o]=new UJ(g&&g.currentValue,e,m===xx),YLe(t,i,r,e)}var WLe="__ngSimpleChanges__";function QLe(t){return t[WLe]||null}function hut(t,i){return t[WLe]=i}var dLe=[];var dd=function(t,i=null,e){for(let n=0;n=n)break}else i[m]<0&&(t[rP]+=65536),(c>14>16&&(t[ts]&3)===i&&(t[ts]+=16384,uLe(c,o)):uLe(c,o)}var kV=-1,uP=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(i,e,n,r){this.factory=i,this.name=r,this.canSeeViewProviders=e,this.injectImpl=n}};function _ut(t){return(t.flags&8)!==0}function yut(t){return(t.flags&16)!==0}function vut(t,i,e){let n=0;for(;ni){a=o-1;break}}}for(;o>16}function GJ(t,i){let e=Cut(t),n=i;for(;e>0;)n=n[nP],e--;return n}var l_e=!0;function jJ(t){let i=l_e;return l_e=t,i}var xut=256,tBe=xut-1,iBe=5,Sut=0,YS={};function wut(t,i,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(tP)&&(n=e[tP]),n==null&&(n=e[tP]=Sut++);let r=n&tBe,o=1<>iBe)]|=o}function $J(t,i){let e=nBe(t,i);if(e!==-1)return e;let n=i[ka];n.firstCreatePass&&(t.injectorIndex=i.length,Zge(n.data,t),Zge(i,null),Zge(n.blueprint,null));let r=e0e(t,i),o=t.injectorIndex;if(eBe(r)){let a=HJ(r),c=GJ(r,i),m=c[ka].data;for(let g=0;g<8;g++)i[o+g]=c[a+g]|m[a+g]}return i[o+8]=r,o}function Zge(t,i){t.push(0,0,0,0,0,0,0,0,i)}function nBe(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function e0e(t,i){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,n=null,r=i;for(;r!==null;){if(n=lBe(r),n===null)return kV;if(e++,r=r[nP],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return kV}function c_e(t,i,e){wut(t,i,e)}function Iut(t,i){if(i==="class")return t.classes;if(i==="style")return t.styles;let e=t.attrs;if(e){let n=e.length,r=0;for(;r>20,w=n?c:c+C,P=r?c+C:g;for(let R=w;R=m&&z.type===e)return R}if(r){let R=a[m];if(R&&Ix(R)&&R.type===e)return m}return null}function cj(t,i,e,n,r){let o=t[e],a=i.data;if(o instanceof uP){let c=o;if(c.resolving){let R=DFe(a[e]);throw mge(R)}let m=jJ(c.canSeeViewProviders);c.resolving=!0;let g=a[e].type||a[e],C,w=c.injectImpl?N_(c.injectImpl):null,P=jge(t,n,0);try{o=t[e]=c.factory(void 0,r,a,t,n),i.firstCreatePass&&e>=n.directiveStart&&fut(e,a[e],i)}finally{w!==null&&N_(w),jJ(m),c.resolving=!1,$ge()}}return o}function Eut(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(tP)?t[tP]:void 0;return typeof i=="number"?i>=0?i&tBe:Aut:i}function mLe(t,i,e){let n=1<>iBe)]&n)}function hLe(t,i){return!(t&2)&&!(t&1&&i)}var dP=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,n){return aBe(this._tNode,this._lView,i,XR(n),e)}};function Aut(){return new dP(Cm(),Wo())}function Gt(t){return zV(()=>{let i=t.prototype.constructor,e=i[HG]||d_e(i),n=Object.prototype,r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==n;){let o=r[HG]||d_e(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function d_e(t){return age(t)?()=>{let i=d_e(nh(t));return i&&i()}:pk(t)}function Dut(t,i,e,n,r){let o=t,a=i;for(;o!==null&&a!==null&&a[ts]&2048&&!SV(a);){let c=sBe(o,a,e,n|2,YS);if(c!==YS)return c;let m=o.parent;if(!m){let g=a[wge];if(g){let C=g.get(e,YS,n);if(C!==YS)return C}m=lBe(a),a=a[nP]}o=m}return r}function lBe(t){let i=t[ka],e=i.type;return e===2?i.declTNode:e===1?t[Og]:null}function yj(t){return Iut(Cm(),t)}function kut(){return UV(Cm(),Wo())}function UV(t,i){return new qn(kb(t,i))}var qn=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=kut}return t})();function cBe(t){return t instanceof qn?t.nativeElement:t}function Mut(){return this._results[Symbol.iterator]()}var Uf=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 Ai}constructor(i=!1){this._emitDistinctChangesOnly=i}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){this.dirty=!1;let n=PFe(i);(this._changesDetected=!RFe(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(i){this._onDirty=i}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Mut};function dBe(t){return(t.flags&128)===128}var t0e=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(t0e||{}),uBe=new Map,Out=0;function Rut(){return Out++}function Put(t){uBe.set(t[QG],t)}function u_e(t){uBe.delete(t[QG])}var fLe="__ngContext__";function OV(t,i){GS(i)?(t[fLe]=i[QG],Put(i)):t[fLe]=i}function pBe(t){return hBe(t[CV])}function mBe(t){return hBe(t[Db])}function hBe(t){for(;t!==null&&!wx(t);)t=t[Db];return t}var p_e;function i0e(t){p_e=t}function oee(){if(p_e!==void 0)return p_e;if(typeof document<"u")return document;throw new Nn(210,!1)}var Ck=new Mi("",{providedIn:"root",factory:()=>Nut}),Nut="ng",aee=new Mi(""),Hf=new Mi("",{providedIn:"platform",factory:()=>"unknown"});var xk=new Mi(""),HV=new Mi("",{providedIn:"root",factory:()=>oee().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Fut="h",Lut="b";var fBe="r";var gBe="di";var _Be=!1,yBe=new Mi("",{providedIn:"root",factory:()=>_Be});var see=new Mi("");var But=(t,i,e,n)=>{};function Vut(t,i,e,n){But(t,i,e,n)}function lee(t){return(t.flags&32)===32}var zut=()=>null;function vBe(t,i,e=!1){return zut(t,i,e)}function bBe(t,i){let e=t.contentQueries;if(e!==null){let n=cs(null);try{for(let r=0;rt,createScript:t=>t,createScriptURL:t=>t})}catch{}return kJ}function cee(t){return Uut()?.createHTML(t)||t}var MJ;function CBe(){if(MJ===void 0&&(MJ=null,oh.trustedTypes))try{MJ=oh.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return MJ}function gLe(t){return CBe()?.createHTML(t)||t}function _Le(t){return CBe()?.createScriptURL(t)||t}var FT=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${uJ})`}},h_e=class extends FT{getTypeName(){return"HTML"}},f_e=class extends FT{getTypeName(){return"Style"}},g_e=class extends FT{getTypeName(){return"Script"}},__e=class extends FT{getTypeName(){return"URL"}},y_e=class extends FT{getTypeName(){return"ResourceURL"}};function W0(t){return t instanceof FT?t.changingThisBreaksApplicationSecurity:t}function KS(t,i){let e=xBe(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${uJ})`)}return e===i}function xBe(t){return t instanceof FT&&t.getTypeName()||null}function r0e(t){return new h_e(t)}function o0e(t){return new f_e(t)}function a0e(t){return new g_e(t)}function s0e(t){return new __e(t)}function l0e(t){return new y_e(t)}function SBe(t){let i=new b_e(t);return Hut()?new v_e(i):i}var v_e=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{let e=new window.DOMParser().parseFromString(cee(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.firstChild?.remove(),e)}catch{return null}}},b_e=class{defaultDoc;inertDocument;constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){let e=this.inertDocument.createElement("template");return e.innerHTML=cee(i),e}};function Hut(){try{return!!new window.DOMParser().parseFromString(cee(""),"text/html")}catch{return!1}}var Gut=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function GV(t){return t=String(t),t.match(Gut)?t:"unsafe:"+t}function LT(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function vj(...t){let i={};for(let e of t)for(let n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}var wBe=LT("area,br,col,hr,img,wbr"),IBe=LT("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),TBe=LT("rp,rt"),jut=vj(TBe,IBe),$ut=vj(IBe,LT("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")),qut=vj(TBe,LT("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")),C_e=vj(wBe,$ut,qut,jut),c0e=LT("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Yut=LT("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"),Kut=LT("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"),EBe=vj(c0e,Yut,Kut),Wut=LT("script,style,template"),x_e=class{sanitizedSomething=!1;buf=[];sanitizeChildren(i){let e=i.firstChild,n=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){r.push(e),e=Xut(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=Zut(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(i){let e=yLe(i).toLowerCase();if(!C_e.hasOwnProperty(e))return this.sanitizedSomething=!0,!Wut.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=i.attributes;for(let r=0;r"),!0}endElement(i){let e=yLe(i).toLowerCase();C_e.hasOwnProperty(e)&&!wBe.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(vLe(i))}};function Qut(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Zut(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw ABe(i);return i}function Xut(t){let i=t.firstChild;if(i&&Qut(t,i))throw ABe(i);return i}function yLe(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function ABe(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var Jut=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ept=/([^\#-~ |!])/g;function vLe(t){return t.replace(/&/g,"&").replace(Jut,function(i){let e=i.charCodeAt(0),n=i.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(ept,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}var OJ;function dee(t,i){let e=null;try{OJ=OJ||SBe(t);let n=i?String(i):"";e=OJ.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=e.innerHTML,e=OJ.getInertBodyElement(n)}while(n!==o);let c=new x_e().sanitizeChildren(S_e(e)||e);return cee(c)}finally{if(e){let n=S_e(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function S_e(t){return"content"in t&&tpt(t)?t.content:null}function tpt(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var jh=(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})(jh||{});function Dx(t){let i=u0e();return i?gLe(i.sanitize(jh.HTML,t)||""):KS(t,"HTML")?gLe(W0(t)):dee(oee(),hk(t))}function td(t){let i=u0e();return i?i.sanitize(jh.URL,t)||"":KS(t,"URL")?W0(t):GV(hk(t))}function DBe(t){let i=u0e();if(i)return _Le(i.sanitize(jh.RESOURCE_URL,t)||"");if(KS(t,"ResourceURL"))return _Le(W0(t));throw new Nn(904,!1)}function ipt(t,i){return i==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||i==="href"&&(t==="base"||t==="link")?DBe:td}function d0e(t,i,e){return ipt(i,e)(t)}function u0e(){let t=Wo();return t&&t[US].sanitizer}var npt=/^>|^->||--!>|)/g,opt="\u200B$1\u200B";function apt(t){return t.replace(npt,i=>i.replace(rpt,opt))}function uee(t){return t.ownerDocument.defaultView}function kBe(t){return t instanceof Function?t():t}function spt(t,i,e){let n=t.length;for(;;){let r=t.indexOf(i,e);if(r===-1)return r;if(r===0||t.charCodeAt(r-1)<=32){let o=i.length;if(r+o===n||t.charCodeAt(r+o)<=32)return r}e=r+1}}var MBe="ng-template";function lpt(t,i,e,n){let r=0;if(n){for(;r-1){let o;for(;++ro?w="":w=r[C+1].toLowerCase(),n&2&&g!==w){if(Tx(n))return!1;a=!0}}}}return Tx(n)||a}function Tx(t){return(t&1)===0}function upt(t,i,e,n){if(i===null)return-1;let r=0;if(n||!e){let o=!1;for(;r-1)for(e++;e0?'="'+c+'"':"")+"]"}else n&8?r+="."+a:n&4&&(r+=" "+a);else r!==""&&!Tx(a)&&(i+=bLe(o,r),r=""),n=a,o=o||!Tx(n);e++}return r!==""&&(i+=bLe(o,r)),i}function _pt(t){return t.map(gpt).join(",")}function ypt(t){let i=[],e=[],n=1,r=2;for(;n{FBe(i,m,c)}):t===3&&xLe(o,()=>{i.destroyNode(m)}),a!=null&&Rpt(i,t,a,e,r)}}function Tpt(t,i){zBe(t,i),i[Sx]=null,i[Og]=null}function Ept(t,i,e,n,r,o){n[Sx]=r,n[Og]=i,fee(t,n,e,1,r,o)}function zBe(t,i){i[US].changeDetectionScheduler?.notify(9),fee(t,i,i[Yc],2,null,null)}function Apt(t){let i=t[CV];if(!i)return Xge(t[ka],t);for(;i;){let e=null;if(GS(i))e=i[CV];else{let n=i[bm];n&&(e=n)}if(!e){for(;i&&!i[Db]&&i!==t;)GS(i)&&Xge(i[ka],i),i=i[rh];i===null&&(i=t),GS(i)&&Xge(i[ka],i),e=i&&i[Db]}i=e}}function y0e(t,i){let e=t[aP],n=e.indexOf(i);e.splice(n,1)}function hee(t,i){if(sP(i))return;let e=i[Yc];e.destroyNode&&fee(t,i,e,3,null,null),Apt(i)}function Xge(t,i){if(sP(i))return;let e=cs(null);try{i[ts]&=-129,i[ts]|=256,i[dv]&&dk(i[dv]),Mpt(t,i),kpt(t,i),i[ka].type===1&&i[Yc].destroy();let n=i[fk];if(n!==null&&wx(i[rh])){n!==i[rh]&&y0e(n,i);let r=i[HS];r!==null&&r.detachView(t)}u_e(i)}finally{cs(e)}}function xLe(t,i){if(t&&t[zf]&&t[zf].leave)if(t[zf].skipLeaveAnimations)t[zf].skipLeaveAnimations=!1;else{let e=t[zf].leave,n=[];for(let r=0;r{t[zf]&&t[zf].running&&(t[zf].running=void 0),mee.delete(t),i()});return}i()}function kpt(t,i){let e=t.cleanup,n=i[vV];if(e!==null)for(let a=0;a=0?n[c]():n[-c].unsubscribe(),a+=2}else{let c=n[e[a+1]];e[a].call(c)}n!==null&&(i[vV]=null);let r=i[TT];if(r!==null){i[TT]=null;for(let a=0;ayd&&VBe(t,i,yd,!1),dd(a?2:0,r,e),e(n,r)}finally{yk(o),dd(a?3:1,r,e)}}function gee(t,i,e){Vpt(t,i,e),(e.flags&64)===64&&zpt(t,i,e)}function Cj(t,i,e=kb){let n=i.localNames;if(n!==null){let r=i.index+1;for(let o=0;onull;function Bpt(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function QBe(t,i,e,n,r,o){let a=i[ka];if(_ee(t,a,i,e,n)){kT(t)&&XBe(i,t.index);return}t.type&3&&(e=Bpt(e)),ZBe(t,i,e,n,r,o)}function ZBe(t,i,e,n,r,o){if(t.type&3){let a=kb(t,i);n=o!=null?o(n,t.value||"",e):n,r.setProperty(a,e,n)}else t.type&12}function XBe(t,i){let e=Mb(i,t);e[ts]&16||(e[ts]|=64)}function Vpt(t,i,e){let n=e.directiveStart,r=e.directiveEnd;kT(e)&&wpt(i,e,t.data[n+e.componentOffset]),t.firstCreatePass||$J(e,i);let o=e.initialInputs;for(let a=n;a{_k(t.lView)},consumerOnSignalRead(){this.lView[dv]=this}});function Xpt(t){let i=t[dv]??Object.create(Jpt);return i.lView=t,i}var Jpt=$e(pe({},GR),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=mk(t.lView);for(;i&&!n3e(i[ka]);)i=mk(i);i&&Mge(i)},consumerOnSignalRead(){this.lView[dv]=this}});function n3e(t){return t.type!==2}function r3e(t){if(t[DT]===null)return;let i=!0;for(;i;){let e=!1;for(let n of t[DT])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));i=e&&!!(t[ts]&8192)}}var emt=100;function o3e(t,i=0){let n=t[US].rendererFactory,r=!1;r||n.begin?.();try{tmt(t,i)}finally{r||n.end?.()}}function tmt(t,i){let e=Hge();try{IV(!0),A_e(t,i);let n=0;for(;ej(t);){if(n===emt)throw new Nn(103,!1);n++,A_e(t,1)}}finally{IV(e)}}function imt(t,i,e,n){if(sP(i))return;let r=i[ts],o=!1,a=!1;TJ(i);let c=!0,m=null,g=null;o||(n3e(t)?(g=Kpt(i),m=ck(g)):NX()===null?(c=!1,g=Xpt(i),m=ck(g)):i[dv]&&(dk(i[dv]),i[dv]=null));try{kge(i),XFe(t.bindingStartIndex),e!==null&&WBe(t,i,e,2,n),nmt(i);let C=(r&3)===3;if(!o)if(C){let R=t.preOrderCheckHooks;R!==null&&NJ(i,R,null)}else{let R=t.preOrderHooks;R!==null&&FJ(i,R,0,null),Qge(i,0)}if(a||rmt(i),r3e(i),a3e(i,0),t.contentQueries!==null&&bBe(t,i),!o)if(C){let R=t.contentCheckHooks;R!==null&&NJ(i,R)}else{let R=t.contentHooks;R!==null&&FJ(i,R,1),Qge(i,1)}amt(t,i);let w=t.components;w!==null&&l3e(i,w,0);let P=t.viewQuery;if(P!==null&&m_e(2,P,n),!o)if(C){let R=t.viewCheckHooks;R!==null&&NJ(i,R)}else{let R=t.viewHooks;R!==null&&FJ(i,R,2),Qge(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[vJ]){for(let R of i[vJ])R();i[vJ]=null}o||(t3e(i),i[ts]&=-73)}catch(C){throw o||_k(i),C}finally{g!==null&&(jR(g,m),c&&Qpt(g)),EJ()}}function nmt(t){let i=t[zf];if(i?.enter){for(let e of i.enter)e();i.enter=void 0}}function a3e(t,i){for(let e=pBe(t);e!==null;e=mBe(e))for(let n=bm;n0&&(t[e-1][Db]=n[Db]);let o=qG(t,bm+i);Tpt(n[ka],n);let a=o[HS];a!==null&&a.detachView(o[ka]),n[rh]=null,n[Db]=null,n[ts]&=-129}return n}function smt(t,i,e,n){let r=bm+n,o=e.length;n>0&&(e[r-1][Db]=i),n-1&&(uj(i,n),qG(e,n))}this._attachedToViewContainer=!1}hee(this._lView[ka],this._lView)}onDestroy(i){Oge(this._lView,i)}markForCheck(){I0e(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[ts]&=-129}reattach(){CJ(this._lView),this._lView[ts]|=128}detectChanges(){this._lView[ts]|=1024,o3e(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Nn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=SV(this._lView),e=this._lView[fk];e!==null&&!i&&y0e(e,this._lView),zBe(this._lView[ka],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new Nn(902,!1);this._appRef=i;let e=SV(this._lView),n=this._lView[fk];n!==null&&!e&&p3e(n,this._lView),CJ(this._lView)}};var Bl=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=lmt;constructor(e,n,r){this._declarationLView=e,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,r){let o=xj(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:r});return new vk(o)}}return t})();function lmt(){return yee(Cm(),Wo())}function yee(t,i){return t.type&4?new Bl(i,t,UV(t,i)):null}function m3e(t,i,e){let n=i.insertBeforeIndex,r=Array.isArray(n)?n[0]:n;return r===null?jBe(t,i,e):uv(e[r])}function h3e(t,i,e,n,r){let o=i.insertBeforeIndex;if(Array.isArray(o)){let a=n,c=null;if(i.type&3||(c=a,a=r),a!==null&&i.componentOffset===-1)for(let m=1;m1)for(let e=t.length-2;e>=0;e--){let n=t[e];g3e(n)||umt(n,i)&&pmt(n)===null&&mmt(n,i.index)}}function g3e(t){return!(t.type&64)}function umt(t,i){return g3e(i)||t.index>i.index}function pmt(t){let i=t.insertBeforeIndex;return Array.isArray(i)?i[0]:i}function mmt(t,i){let e=t.insertBeforeIndex;Array.isArray(e)?e[0]=i:(qBe(m3e,h3e),t.insertBeforeIndex=i)}function hmt(t,i,e){let n=t.data[i];n===null?t.data[i]=e:n.value=e}function fmt(t,i){let e=t.insertBeforeIndex;e===null?(qBe(m3e,h3e),e=t.insertBeforeIndex=[null,i]):(EFe(Array.isArray(e),!0,"Expecting array here"),e.push(i))}function gmt(t,i,e){let n=T0e(t,e,64,null,null);return f3e(i,n),n}function _mt(t,i){let e=i[t.currentCaseLViewIndex];return e===null?e:e<0?~e:e}function ymt(t,i,e){return t|i<<17|e<<1}function vmt(t){return t===-1}function _3e(t,i,e){t.index=0;let n=_mt(i,e);n!==null?t.removes=i.remove[n]:t.removes=Vf}function D_e(t){if(t.index0)return t.lView[i];{t.stack.push(t.index,t.removes);let e=~i,n=t.lView[ka].data[e];return _3e(t,n,t.lView),D_e(t)}}else return t.stack.length===0?null:(t.removes=t.stack.pop(),t.index=t.stack.pop(),D_e(t))}function bmt(){let t={stack:[],index:-1};function i(e,n){for(t.lView=n;t.stack.length;)t.stack.pop();return _3e(t,e.value,n),D_e.bind(null,t)}return i}var P2i=new RegExp(`^(\\d+)*(${Lut}|${Fut})*(.*)`);var Cmt=()=>{};function xmt(t,i,e,n){Cmt(t,i,e,n)}function Smt(t){let i=t[Ige]??[],n=t[rh][Yc],r=[];for(let o of i)o.data[gBe]!==void 0?r.push(o):wmt(o,n);t[Ige]=r}function wmt(t,i){let e=0,n=t.firstChild;if(n){let r=t.data[fBe];for(;enull,Tmt=()=>null;function qJ(t,i){return Imt(t,i)}function y3e(t,i,e){return Tmt(t,i,e)}var v3e=class{},vee=class{},k_e=class{resolveComponentFactory(i){throw new Nn(917,!1)}},wj=class{static NULL=new k_e},Jd=class{},Ma=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>Emt()}return t})();function Emt(){let t=Wo(),i=Cm(),e=Mb(i.index,t);return(GS(e)?e:t)[Yc]}var b3e=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>null})}return t})();var BJ={},M_e=class{injector;parentInjector;constructor(i,e){this.injector=i,this.parentInjector=e}get(i,e,n){let r=this.injector.get(i,BJ,n);return r!==BJ||e===BJ?r:this.parentInjector.get(i,e,n)}};function YJ(t,i,e){let n=e?t.styles:null,r=e?t.classes:null,o=0;if(i!==null)for(let a=0;a0&&(e.directiveToIndex=new Map);for(let P=0;P0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function Nmt(t,i,e){if(e){if(i.exportAs)for(let n=0;nn(uv(H[t.index])):t.index;T3e(z,i,e,o,c,R,!1)}}return g}function Bmt(t){return t.startsWith("animation")||t.startsWith("transition")}function Vmt(t,i,e,n){let r=t.cleanup;if(r!=null)for(let o=0;om?c[m]:null}typeof a=="string"&&(o+=2)}return null}function T3e(t,i,e,n,r,o,a){let c=i.firstCreatePass?Pge(i):null,m=Rge(e),g=m.length;m.push(r,o),c&&c.push(n,t,g,(g+1)*(a?-1:1))}function ELe(t,i,e,n,r,o){let a=i[e],c=i[ka],g=c.data[e].outputs[n],w=a[g].subscribe(o);T3e(t.index,c,i,r,o,w,!0)}var O_e=Symbol("BINDING");var KJ=class extends wj{ngModule;constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){let e=VS(i);return new bk(e,this.ngModule)}};function zmt(t){return Object.keys(t).map(i=>{let[e,n,r]=t[i],o={propName:e,templateName:i,isSignal:(n&pee.SignalBased)!==0};return r&&(o.transform=r),o})}function Umt(t){return Object.keys(t).map(i=>({propName:t[i],templateName:i}))}function Hmt(t,i,e){let n=i instanceof _d?i:i?.injector;return n&&t.getStandaloneInjector!==null&&(n=t.getStandaloneInjector(n)||n),n?new M_e(e,n):e}function Gmt(t){let i=t.get(Jd,null);if(i===null)throw new Nn(407,!1);let e=t.get(b3e,null),n=t.get(Ab,null);return{rendererFactory:i,sanitizer:e,changeDetectionScheduler:n,ngReflect:!1}}function jmt(t,i){let e=E3e(t);return m0e(i,e,e==="svg"?Ege:e==="math"?HFe:null)}function E3e(t){return(t.selectors[0][0]||"div").toLowerCase()}var bk=class extends vee{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=zmt(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Umt(this.componentDef.outputs),this.cachedOutputs}constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=_pt(i.selectors),this.ngContentSelectors=i.ngContentSelectors??[],this.isBoundToModule=!!e}create(i,e,n,r,o,a){dd(22);let c=cs(null);try{let m=this.componentDef,g=$mt(n,m,a,o),C=Hmt(m,r||this.ngModule,i),w=Gmt(C),P=w.rendererFactory.createRenderer(null,m),R=n?Npt(P,n,m.encapsulation,C):jmt(m,P),z=a?.some(ALe)||o?.some(K=>typeof K!="function"&&K.bindings.some(ALe)),H=f0e(null,g,null,512|BBe(m),null,null,w,P,C,null,vBe(R,C,!0));H[yd]=R,TJ(H);let j=null;try{let K=E0e(yd,H,2,"#host",()=>g.directiveRegistry,!0,0);R&&(LBe(P,R,K),OV(R,H)),gee(g,H,K),n0e(g,K,H),A0e(g,K),e!==void 0&&Ymt(K,this.ngContentSelectors,e),j=Mb(K.index,H),H[zp]=j[zp],w0e(g,H,null)}catch(K){throw j!==null&&u_e(j),u_e(H),K}finally{dd(23),EJ()}return new WJ(this.componentType,H,!!z)}finally{cs(c)}}};function $mt(t,i,e,n){let r=t?["ng-version","20.3.1"]:ypt(i.selectors[0]),o=null,a=null,c=0;if(e)for(let C of e)c+=C[O_e].requiredVars,C.create&&(C.targetIdx=0,(o??=[]).push(C)),C.update&&(C.targetIdx=0,(a??=[]).push(C));if(n)for(let C=0;C{if(e&1&&t)for(let n of t)n.create();if(e&2&&i)for(let n of i)n.update()}}function ALe(t){let i=t[O_e].kind;return i==="input"||i==="twoWay"}var WJ=class extends v3e{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e,n){super(),this._rootLView=e,this._hasInputBindings=n,this._tNode=XG(e[ka],yd),this.location=UV(this._tNode,e),this.instance=Mb(this._tNode.index,e)[zp],this.hostView=this.changeDetectorRef=new vk(e,void 0),this.componentType=i}setInput(i,e){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(i)&&Object.is(this.previousInputValues.get(i),e))return;let r=this._rootLView,o=_ee(n,r[ka],r,i,e);this.previousInputValues.set(i,e);let a=Mb(n.index,r);I0e(a,1)}get injector(){return new dP(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function Ymt(t,i,e){let n=t.projection=[];for(let r=0;r{class t{static __NG_ELEMENT_ID__=Kmt}return t})();function Kmt(){let t=Cm();return D3e(t,Wo())}var Wmt=$l,A3e=class extends Wmt{_lContainer;_hostTNode;_hostLView;constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return UV(this._hostTNode,this._hostLView)}get injector(){return new dP(this._hostTNode,this._hostLView)}get parentInjector(){let i=e0e(this._hostTNode,this._hostLView);if(eBe(i)){let e=GJ(i,this._hostLView),n=HJ(i),r=e[ka].data[n+8];return new dP(r,e)}else return new dP(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=DLe(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-bm}createEmbeddedView(i,e,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let a=qJ(this._lContainer,i.ssrId),c=i.createEmbeddedViewImpl(e||{},o,a);return this.insertImpl(c,r,PV(this._hostTNode,a)),c}createComponent(i,e,n,r,o,a,c){let m=i&&!uut(i),g;if(m)g=e;else{let j=e||{};g=j.index,n=j.injector,r=j.projectableNodes,o=j.environmentInjector||j.ngModuleRef,a=j.directives,c=j.bindings}let C=m?i:new bk(VS(i)),w=n||this.parentInjector;if(!o&&C.ngModule==null){let K=(m?w:this.parentInjector).get(_d,null);K&&(o=K)}let P=VS(C.componentType??{}),R=qJ(this._lContainer,P?.id??null),z=R?.firstChild??null,H=C.create(w,r,z,o,a,c);return this.insertImpl(H.hostView,g,PV(this._hostTNode,R)),H}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,n){let r=i._lView;if(jFe(r)){let c=this.indexOf(i);if(c!==-1)this.detach(c);else{let m=r[rh],g=new A3e(m,m[Og],m[rh]);g.detach(g.indexOf(i))}}let o=this._adjustIndex(e),a=this._lContainer;return Sj(a,r,o,n),i.attachToViewContainerRef(),fge(Jge(a),o,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=DLe(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),n=uj(this._lContainer,e);n&&(qG(Jge(this._lContainer),e),hee(n[ka],n))}detach(i){let e=this._adjustIndex(i,-1),n=uj(this._lContainer,e);return n&&qG(Jge(this._lContainer),e)!=null?new vk(n):null}_adjustIndex(i,e=0){return i??this.length+e}};function DLe(t){return t[ZG]}function Jge(t){return t[ZG]||(t[ZG]=[])}function D3e(t,i){let e,n=i[t.index];return wx(n)?e=n:(e=c3e(n,i,null,t),i[t.index]=e,g0e(i,e)),Zmt(e,i,t,n),new A3e(e,t,i)}function Qmt(t,i){let e=t[Yc],n=e.createComment(""),r=kb(i,t),o=e.parentNode(r);return RV(e,o,n,e.nextSibling(r),!1),n}var Zmt=eht,Xmt=()=>!1;function Jmt(t,i,e){return Xmt(t,i,e)}function eht(t,i,e,n){if(t[gk])return;let r;e.type&8?r=uv(n):r=Qmt(i,e),t[gk]=r}var R_e=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},P_e=class t{queries;constructor(i=[]){this.queries=i}createEmbeddedView(i){let e=i.queries;if(e!==null){let n=i.contentQueries!==null?i.contentQueries[0]:e.length,r=[];for(let o=0;o0)n.push(a[c/2]);else{let g=o[c+1],C=i[-m];for(let w=bm;wi.trim())}function P3e(t,i,e){t.queries===null&&(t.queries=new N_e),t.queries.track(new F_e(i,e))}function aht(t,i){let e=t.contentQueries||(t.contentQueries=[]),n=e.length?e[e.length-1]:-1;i!==n&&e.push(t.queries.length-1,i)}function M0e(t,i){return t.queries.getByIndex(i)}function N3e(t,i){let e=t[ka],n=M0e(e,i);return n.crossesNgTemplate?L_e(e,t,i,[]):k3e(e,t,n,i)}function O0e(t,i,e){let n,r=RG(()=>{n._dirtyCounter();let o=sht(n,t);if(i&&o===void 0)throw new Nn(-951,!1);return o});return n=r[_m],n._dirtyCounter=hr(0),n._flatValue=void 0,r}function R0e(t){return O0e(!0,!1,t)}function P0e(t){return O0e(!0,!0,t)}function F3e(t){return O0e(!1,!1,t)}function L3e(t,i){let e=t[_m];e._lView=Wo(),e._queryIndex=i,e._queryList=k0e(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function sht(t,i){let e=t._lView,n=t._queryIndex;if(e===void 0||n===void 0||e[ts]&4)return i?void 0:Vf;let r=k0e(e,n),o=N3e(e,n);return r.reset(o,cBe),i?r.first:r._changesDetected||t._flatValue===void 0?t._flatValue=r.toArray():t._flatValue}var kLe=new Set;function Ob(t){kLe.has(t)||(kLe.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var Ax=class{},Cee=class{};function N0e(t,i){return new pj(t,i??null,[])}var pj=class extends Ax{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new KJ(this);constructor(i,e,n,r=!0){super(),this.ngModuleType=i,this._parent=e;let o=yge(i);this._bootstrapComponents=kBe(o.bootstrap),this._r3Injector=qge(i,e,[{provide:Ax,useValue:this},{provide:wj,useValue:this.componentFactoryResolver},...n],ET(i),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}},ZJ=class extends Cee{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new pj(this.moduleType,i,[])}};var mj=class extends Ax{injector;componentFactoryResolver=new KJ(this);instance=null;constructor(i){super();let e=new eP([...i.providers,{provide:Ax,useValue:this},{provide:wj,useValue:this.componentFactoryResolver}],i.parent||yV(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function $V(t,i,e=null){return new mj({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var lht=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let n=vge(!1,e.type),r=n.length>0?$V([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ct({token:t,providedIn:"environment",factory:()=>new t(ai(_d))})}return t})();function re(t){return zV(()=>{let i=B3e(t),e=$e(pe({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===t0e.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?r=>r.get(lht).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||NT.Emulated,styles:t.styles||Vf,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&Ob("NgStandalone"),V3e(e);let n=t.dependencies;return e.directiveDefs=MLe(n,cht),e.pipeDefs=MLe(n,LFe),e.id=pht(e),e})}function cht(t){return VS(t)||yJ(t)}function qi(t){return zV(()=>({type:t.type,bootstrap:t.bootstrap||Vf,declarations:t.declarations||Vf,imports:t.imports||Vf,exports:t.exports||Vf,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function dht(t,i){if(t==null)return xx;let e={};for(let n in t)if(t.hasOwnProperty(n)){let r=t[n],o,a,c,m;Array.isArray(r)?(c=r[0],o=r[1],a=r[2]??o,m=r[3]||null):(o=r,a=r,c=pee.None,m=null),e[o]=[n,c,m],i[o]=a}return e}function uht(t){if(t==null)return xx;let i={};for(let e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}function hn(t){return zV(()=>{let i=B3e(t);return V3e(i),i})}function Tu(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 B3e(t){let i={};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:i,inputConfig:t.inputs||xx,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Vf,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:dht(t.inputs,i),outputs:uht(t.outputs),debugInfo:null}}function V3e(t){t.features?.forEach(i=>i(t))}function MLe(t,i){return t?()=>{let e=typeof t=="function"?t():t,n=[];for(let r of e){let o=i(r);o!==null&&n.push(o)}return n}:null}function pht(t){let i=0,e=typeof t.consts=="function"?"":t.consts,n=[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 o of n.join("|"))i=Math.imul(31,i)+o.charCodeAt(0)<<0;return i+=2147483648,"c"+i}function mht(t){return Object.getPrototypeOf(t.prototype).constructor}function Tt(t){let i=mht(t.type),e=!0,n=[t];for(;i;){let r;if(Ix(t))r=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new Nn(903,!1);r=i.\u0275dir}if(r){if(e){n.push(r);let a=t;a.inputs=e_e(t.inputs),a.declaredInputs=e_e(t.declaredInputs),a.outputs=e_e(t.outputs);let c=r.hostBindings;c&&yht(t,c);let m=r.viewQuery,g=r.contentQueries;if(m&&ght(t,m),g&&_ht(t,g),hht(t,r),TFe(t.outputs,r.outputs),Ix(r)&&r.data.animation){let C=t.data;C.animation=(C.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let a=0;a=0;n--){let r=t[n];r.hostVars=i+=r.hostVars,r.hostAttrs=MV(r.hostAttrs,e=MV(e,r.hostAttrs))}}function e_e(t){return t===xx?{}:t===Vf?[]:t}function ght(t,i){let e=t.viewQuery;e?t.viewQuery=(n,r)=>{i(n,r),e(n,r)}:t.viewQuery=i}function _ht(t,i){let e=t.contentQueries;e?t.contentQueries=(n,r,o)=>{i(n,r,o),e(n,r,o)}:t.contentQueries=i}function yht(t,i){let e=t.hostBindings;e?t.hostBindings=(n,r)=>{i(n,r),e(n,r)}:t.hostBindings=i}function BT(t){let i=e=>{let n=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=vht,e.hostDirectives=n?t.map(B_e):[t]):n?e.hostDirectives.unshift(...t.map(B_e)):e.hostDirectives.unshift(t)};return i.ngInherit=!0,i}function vht(t){let i=[],e=!1,n=null,r=null;for(let o=0;onull),a=n;if(i&&typeof i=="object"){let m=i;r=m.next?.bind(m),o=m.error?.bind(m),a=m.complete?.bind(m)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),a&&(a=this.wrapInTimeout(a)));let c=super.subscribe({next:r,error:o,complete:a});return i instanceof Ia&&i.add(c),c}wrapInTimeout(i){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{i(e)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},ve=V_e;function G3e(t){let i,e;function n(){t=cP;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),i!==void 0&&clearTimeout(i)}catch{}}return i=setTimeout(()=>{t(),n()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),n()})),()=>n()}function PLe(t){return queueMicrotask(()=>t()),()=>{t=cP}}var F0e="isAngularZone",XJ=F0e+"_ID",wht=0,Pn=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(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=H3e}=i;if(typeof Zone>"u")throw new Nn(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!r&&n,a.shouldCoalesceRunChangeDetection=r,a.callbackScheduled=!1,a.scheduleInRootZone=o,Eht(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(F0e)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new Nn(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new Nn(909,!1)}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,r){let o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+r,i,Iht,cP,cP);try{return o.runTask(a,e,n)}finally{o.cancelTask(a)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}},Iht={};function L0e(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 Tht(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){G3e(()=>{t.callbackScheduled=!1,z_e(t),t.isCheckStableRunning=!0,L0e(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),z_e(t)}function Eht(t){let i=()=>{Tht(t)},e=wht++;t._inner=t._inner.fork({name:"angular",properties:{[F0e]:!0,[XJ]:e,[XJ+e]:!0},onInvokeTask:(n,r,o,a,c,m)=>{if(Aht(m))return n.invokeTask(o,a,c,m);try{return NLe(t),n.invokeTask(o,a,c,m)}finally{(t.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),FLe(t)}},onInvoke:(n,r,o,a,c,m,g)=>{try{return NLe(t),n.invoke(o,a,c,m,g)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!Dht(m)&&i(),FLe(t)}},onHasTask:(n,r,o,a)=>{n.hasTask(o,a),r===o&&(a.change=="microTask"?(t._hasPendingMicrotasks=a.microTask,z_e(t),L0e(t)):a.change=="macroTask"&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(n,r,o,a)=>(n.handleError(o,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}function z_e(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function NLe(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function FLe(t){t._nesting--,L0e(t)}var JJ=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ve;onMicrotaskEmpty=new ve;onStable=new ve;onError=new ve;run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,r){return i.apply(e,n)}};function Aht(t){return j3e(t,"__ignore_ng_zone__")}function Dht(t){return j3e(t,"__scheduler_tick__")}function j3e(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}var See=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})(),B0e=[0,1,2,3],V0e=(()=>{class t{ngZone=ae(Pn);scheduler=ae(Ab);errorHandler=ae(hp,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){ae(Sk,{optional:!0})}execute(){let e=this.sequences.size>0;e&&dd(16),this.executing=!0;for(let n of B0e)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&dd(17)}register(e){let{view:n}=e;n!==void 0?((n[oP]??=[]).push(e),_k(n),n[ts]|=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,n){return n?n.run(xee.AFTER_NEXT_RENDER,e):e()}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})(),hj=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(i,e,n,r,o,a=null){this.impl=i,this.hooks=e,this.view=n,this.once=r,this.snapshot=a,this.unregisterOnDestroy=o?.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 i=this.view?.[oP];i&&(this.view[oP]=i.filter(e=>e!==this))}};function Rd(t,i){let e=i?.injector??ae(Ir);return Ob("NgAfterNextRender"),Mht(t,e,i,!0)}function kht(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function Mht(t,i,e,n){let r=i.get(See);r.impl??=i.get(V0e);let o=i.get(Sk,null,{optional:!0}),a=e?.manualCleanup!==!0?i.get(F_):null,c=i.get(lP,null,{optional:!0}),m=new hj(r.impl,kht(t),c?.view,n,a,o?.snapshot(null));return r.impl.register(m),m}var wee=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var Iee=new Mi(""),qV=new Mi(""),Ej=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,n,r){this._ngZone=e,this.registry=n,xge()&&(this._destroyRef=ae(F_,{optional:!0})??void 0),z0e||($3e(r),r.addToWindow(n)),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}}),n=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{Pn.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),n.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(n=>n.updateCb&&n.updateCb(e)?(clearTimeout(n.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,r){let o=-1;n&&n>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==o),e()},n)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,n,r){if(r&&!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,n,r),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,r){return[]}static \u0275fac=function(n){return new(n||t)(ai(Pn),ai(Aj),ai(qV))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Aj=(()=>{class t{_applications=new Map;registerApplication(e,n){this._applications.set(e,n)}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,n=!0){return z0e?.findTestabilityInTree(this,e,n)??null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function $3e(t){z0e=t}var z0e;function zT(t){return!!t&&typeof t.then=="function"}function Tee(t){return!!t&&typeof t.subscribe=="function"}var U0e=new Mi("");function wk(t){return zS([{provide:U0e,multi:!0,useValue:t}])}var H0e=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n});appInits=ae(U0e,{optional:!0})??[];injector=ae(Ir);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=Gh(this.injector,r);if(zT(o))e.push(o);else if(Tee(o)){let a=new Promise((c,m)=>{o.subscribe({complete:c,error:m})});e.push(a)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),e.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dj=new Mi("");function q3e(){Afe(()=>{let t="";throw new Nn(600,t)})}function Y3e(t){return t.isBoundToModule}var Oht=10;var $h=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=ae(L_);afterRenderManager=ae(See);zonelessEnabled=ae(nj);rootEffectScheduler=ae(rj);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ai;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=ae(qS);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ot(e=>!e))}constructor(){ae(Sk,{optional:!0})}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{e.unsubscribe()})}_injector=ae(_d);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,n){return this.bootstrapImpl(e,n)}bootstrapImpl(e,n,r=Ir.NULL){return this._injector.get(Pn).run(()=>{dd(10);let a=e instanceof vee;if(!this._injector.get(H0e).done){let z="";throw new Nn(405,z)}let m;a?m=e:m=this._injector.get(wj).resolveComponentFactory(e),this.componentTypes.push(m.componentType);let g=Y3e(m)?void 0:this._injector.get(Ax),C=n||m.selector,w=m.create(r,[],C,g),P=w.location.nativeElement,R=w.injector.get(Iee,null);return R?.registerApplication(P),w.onDestroy(()=>{this.detachView(w.hostView),aj(this.components,w),R?.unregisterApplication(P)}),this._loadComponent(w),dd(11,w),w})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){dd(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(xee.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new Nn(101,!1);let e=cs(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,cs(e),this.afterTick.next(),dd(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Jd,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++ej(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){let n=e;aj(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(e),this._injector.get(Dj,[]).forEach(r=>r(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),()=>aj(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Nn(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function aj(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var t_e="aria";function uc(t,i){let e=Wo(),n=OT();if(Pg(e,n,i)){let r=vd(),o=TV();if(_ee(o,r,e,t,i))kT(o)&&XBe(e,o.index);else{let c=kb(o,e),m=Rht(t);JBe(e[Yc],c,null,o.value,m,i,null)}}return uc}function Rht(t){return t.charAt(t_e.length)!=="-"?t_e+"-"+t.slice(t_e.length).toLowerCase():t}function lt(t,i,e,n){let r=Wo(),o=OT();if(Pg(r,o,i)){let a=vd(),c=TV();Hpt(c,r,t,i,e,n)}return lt}var U2i=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var U_e=class{destroy(i){}updateValue(i,e){}swap(i,e){let n=Math.min(i,e),r=Math.max(i,e),o=this.detach(r);if(r-n>1){let a=this.detach(n);this.attach(n,o),this.attach(r,a)}else this.attach(n,o)}move(i,e){this.attach(e,this.detach(i,!0))}};function i_e(t,i,e,n,r){return t===e&&Object.is(i,n)?1:Object.is(r(t,i),r(e,n))?-1:0}function Pht(t,i,e){let n,r,o=0,a=t.length-1,c=void 0;if(Array.isArray(i)){let m=i.length-1;for(;o<=a&&o<=m;){let g=t.at(o),C=i[o],w=i_e(o,g,o,C,e);if(w!==0){w<0&&t.updateValue(o,C),o++;continue}let P=t.at(a),R=i[m],z=i_e(a,P,m,R,e);if(z!==0){z<0&&t.updateValue(a,R),a--,m--;continue}let H=e(o,g),j=e(a,P),K=e(o,C);if(Object.is(K,j)){let ne=e(m,R);Object.is(ne,H)?(t.swap(o,a),t.updateValue(a,R),m--,a--):t.move(a,o),t.updateValue(o,C),o++;continue}if(n??=new eee,r??=BLe(t,o,a,e),H_e(t,n,o,K))t.updateValue(o,C),o++,a++;else if(r.has(K))n.set(H,t.detach(o)),a--;else{let ne=t.create(o,i[o]);t.attach(o,ne),o++,a++}}for(;o<=m;)LLe(t,n,e,o,i[o]),o++}else if(i!=null){let m=i[Symbol.iterator](),g=m.next();for(;!g.done&&o<=a;){let C=t.at(o),w=g.value,P=i_e(o,C,o,w,e);if(P!==0)P<0&&t.updateValue(o,w),o++,g=m.next();else{n??=new eee,r??=BLe(t,o,a,e);let R=e(o,w);if(H_e(t,n,o,R))t.updateValue(o,w),o++,a++,g=m.next();else if(!r.has(R))t.attach(o,t.create(o,w)),o++,a++,g=m.next();else{let z=e(o,C);n.set(z,t.detach(o)),a--}}}for(;!g.done;)LLe(t,n,e,t.length,g.value),g=m.next()}for(;o<=a;)t.destroy(t.detach(a--));n?.forEach(m=>{t.destroy(m)})}function H_e(t,i,e,n){return i!==void 0&&i.has(n)?(t.attach(e,i.get(n)),i.delete(n),!0):!1}function LLe(t,i,e,n,r){if(H_e(t,i,n,e(n,r)))t.updateValue(n,r);else{let o=t.create(n,r);t.attach(n,o)}}function BLe(t,i,e,n){let r=new Set;for(let o=i;o<=e;o++)r.add(n(o,t.at(o)));return r}var eee=class{kvMap=new Map;_vMap=void 0;has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;let e=this.kvMap.get(i);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(i,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,e){if(this.kvMap.has(i)){let n=this.kvMap.get(i);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,e)}else this.kvMap.set(i,e)}forEach(i){for(let[e,n]of this.kvMap)if(i(n,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),i(n,e)}}};function yt(t,i,e,n,r,o,a,c){Ob("NgControlFlow");let m=Wo(),g=vd(),C=Y0(g.consts,o);return LV(m,g,t,i,e,n,r,C,256,a,c),G0e}function G0e(t,i,e,n,r,o,a,c){Ob("NgControlFlow");let m=Wo(),g=vd(),C=Y0(g.consts,o);return LV(m,g,t,i,e,n,r,C,512,a,c),G0e}function vt(t,i){Ob("NgControlFlow");let e=Wo(),n=OT(),r=e[n]!==B_?e[n]:-1,o=r!==-1?tee(e,yd+r):void 0,a=0;if(Pg(e,n,t)){let c=cs(null);try{if(o!==void 0&&u3e(o,a),t!==-1){let m=yd+t,g=tee(e,m),C=q_e(e[ka],m),w=y3e(g,C,e),P=xj(e,C,i,{dehydratedView:w});Sj(g,P,a,PV(C,w))}}finally{cs(c)}}else if(o!==void 0){let c=d3e(o,a);c!==void 0&&(c[zp]=i)}}var G_e=class{lContainer;$implicit;$index;constructor(i,e,n){this.lContainer=i,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-bm}};function kj(t){return t}function ms(t,i){return i}var j_e=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,n){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=n}};function Qo(t,i,e,n,r,o,a,c,m,g,C,w,P){Ob("NgControlFlow");let R=Wo(),z=vd(),H=m!==void 0,j=Wo(),K=c?a.bind(j[Rg][zp]):a,ne=new j_e(H,K);j[yd+t]=ne,LV(R,z,t+1,i,e,n,r,Y0(z.consts,o),256),H&&LV(R,z,t+2,m,g,C,w,Y0(z.consts,P),512)}var $_e=class extends U_e{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(i,e,n){super(),this.lContainer=i,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-bm}at(i){return this.getLView(i)[zp].$implicit}attach(i,e){let n=e[iP];this.needsIndexUpdate||=i!==this.length,Sj(this.lContainer,e,i,PV(this.templateTNode,n))}detach(i,e){return this.needsIndexUpdate||=i!==this.length-1,e&&Nht(this.lContainer,i),Fht(this.lContainer,i)}create(i,e){let n=qJ(this.lContainer,this.templateTNode.tView.ssrId),r=xj(this.hostLView,this.templateTNode,new G_e(this.lContainer,e,i),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(i){hee(i[ka],i),this.operationsCounter?.recordDestroy()}updateValue(i,e){this.getLView(i)[zp].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i(EV(!0),m0e(i[Yc],n,sLe()));function fi(t,i,e){let n=Wo(),r=n[ka],o=t+yd,a=r.firstCreatePass?E0e(o,n,8,"ng-container",C0e,xJ(),i,e):r.data[o];if(x0e(a,n,t,"ng-container",Bht),xV(a)){let c=n[ka];gee(c,n,a),n0e(c,a,n)}return e!=null&&Cj(n,a),fi}function gi(){let t=vd(),i=Cm(),e=S0e(i);return t.firstCreatePass&&A0e(t,e),gi}function Li(t,i,e){return fi(t,i,e),gi(),Li}var Bht=(t,i,e,n,r)=>(EV(!0),PBe(i[Yc],""));function qe(){return Wo()}function sa(t,i,e){let n=Wo(),r=OT();if(Pg(n,r,i)){let o=vd(),a=TV();ZBe(a,n,t,i,n[Yc],e)}return sa}var RJ=void 0;function Vht(t){let i=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return i===1&&e===0?1:5}var zht=["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"]],RJ,[["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"]],RJ,[["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}",RJ,"{1} 'at' {0}",RJ],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Vht],sj={};function j0e(t,i,e){typeof i!="string"&&(e=i,i=t[eu.LocaleId]),i=i.toLowerCase().replace(/_/g,"-"),sj[i]=t,e&&(sj[i][eu.ExtraData]=e)}function Ng(t){let i=Uht(t),e=VLe(i);if(e)return e;let n=i.split("-")[0];if(e=VLe(n),e)return e;if(n==="en")return zht;throw new Nn(701,!1)}function $0e(t){return Ng(t)[eu.PluralCase]}function VLe(t){return t in sj||(sj[t]=oh.ng&&oh.ng.common&&oh.ng.common.locales&&oh.ng.common.locales[t]),sj[t]}var eu=(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})(eu||{});function Uht(t){return t.toLowerCase().replace(/_/g,"-")}var Mj="en-US",Hht="USD",Ght={marker:"element"},jht={marker:"ICU"},PT=(function(t){return t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT",t})(PT||{}),$ht=Mj;function W3e(t){typeof t=="string"&&($ht=t.toLowerCase().replace(/_/g,"-"))}function qht(t,i,e){let n=t[Yc];switch(e){case Node.COMMENT_NODE:return PBe(n,i);case Node.TEXT_NODE:return RBe(n,i);case Node.ELEMENT_NODE:return m0e(n,i,null)}}var Yht=(t,i,e,n)=>(EV(!0),qht(t,e,n));function Kht(t,i,e,n){let r=t[Yc];for(let o=0;o>>PT.SHIFT,w=t[C],P=!1;w===null&&(w=t[C]=Yht(t,C,c,m?Node.COMMENT_NODE:Node.TEXT_NODE),P=ij()),g&&e!==null&&P&&RV(r,e,w,n,!1)}}var iee=/�(\d+):?\d*�/gi;var Wht=/�(\d+)�/,Q3e=/^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/,lj="\uFFFD",Qht=/�\/?\*(\d+:\d+)�/gi,Zht=/�(\/?[#*]\d+):?\d*�/gi,Xht=/\uE500/g;function Jht(t){return t.replace(Xht," ")}function eft(t,i,e,n,r,o){let a=wV(),c=[],m=[],g=[[]],C=[[]];r=ift(r,o);let w=Jht(r).split(Zht);for(let P=0;P`}}let z=[];C.push(z),c=rft(z,i,m,e,n,r,o.cases[w],P.join(""),R)|c}c&&sft(n,c,a),t.push({kind:3,index:a,cases:C,currentCaseLViewIndex:m.currentCaseLViewIndex})}function nft(t){let i=[],e=[],n=1,r=0;t=t.replace(Q3e,function(a,c,m){return m==="select"?n=0:n=1,r=parseInt(c.slice(1),10),""});let o=K_e(t);for(let a=0;ae.length&&e.push(m)}return{type:n,mainBinding:r,cases:i,values:e}}function K_e(t){if(!t)return[];let i=0,e=[],n=[],r=/[{}]/g;r.lastIndex=0;let o;for(;o=r.exec(t);){let c=o.index;if(o[0]=="}"){if(e.pop(),e.length==0){let m=t.substring(i,c);Q3e.test(m)?n.push(nft(m)):n.push(m),i=c+1}}else{if(e.length==0){let m=t.substring(i,c);n.push(m),i=c+1}e.push("{")}}let a=t.substring(i);return n.push(a),n}function rft(t,i,e,n,r,o,a,c,m){let g=[],C=[],w=[];e.cases.push(a),e.create.push(g),e.remove.push(C),e.update.push(w);let R=SBe(oee()).getInertBodyElement(c),z=S_e(R)||R;return z?eVe(t,i,e,n,r,g,C,w,z,o,m,0):0}function eVe(t,i,e,n,r,o,a,c,m,g,C,w){let P=0,R=m.firstChild;for(;R;){let z=bj(i,n,1,null);switch(R.nodeType){case Node.ELEMENT_NODE:let H=R,j=H.tagName.toLowerCase();if(C_e.hasOwnProperty(j)){n_e(o,Ght,j,g,z),i.data[z]=j;let Te=H.attributes;for(let ye=0;ye>17&32767}function uft(t){return(t&2)==2}function pft(t,i){return t&131071|i<<17}function W_e(t){return t|2}function BV(t){return(t&131068)>>2}function r_e(t,i){return t&-131069|i<<2}function mft(t){return(t&1)===1}function Q_e(t){return t|1}function hft(t,i,e,n,r,o){let a=o?i.classBindings:i.styleBindings,c=pP(a),m=BV(a);t[n]=e;let g=!1,C;if(Array.isArray(e)){let w=e;C=w[1],(C===null||_V(w,C)>0)&&(g=!0)}else C=e;if(r)if(m!==0){let P=pP(t[c+1]);t[n+1]=PJ(P,c),P!==0&&(t[P+1]=r_e(t[P+1],n)),t[c+1]=pft(t[c+1],n)}else t[n+1]=PJ(c,0),c!==0&&(t[c+1]=r_e(t[c+1],n)),c=n;else t[n+1]=PJ(m,0),c===0?c=n:t[m+1]=r_e(t[m+1],n),m=n;g&&(t[n+1]=W_e(t[n+1])),HLe(t,C,n,!0),HLe(t,C,n,!1),fft(i,C,t,n,o),a=PJ(c,m),o?i.classBindings=a:i.styleBindings=a}function fft(t,i,e,n,r){let o=r?t.residualClasses:t.residualStyles;o!=null&&typeof i=="string"&&_V(o,i)>=0&&(e[n+1]=Q_e(e[n+1]))}function HLe(t,i,e,n){let r=t[e+1],o=i===null,a=n?pP(r):BV(r),c=!1;for(;a!==0&&(c===!1||o);){let m=t[a],g=t[a+1];gft(m,i)&&(c=!0,t[a+1]=n?Q_e(g):W_e(g)),a=n?pP(g):BV(g)}c&&(t[e+1]=n?W_e(r):Q_e(r))}function gft(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?_V(t,i)>=0:!1}var ah={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function rVe(t){return t.substring(ah.key,ah.keyEnd)}function _ft(t){return t.substring(ah.value,ah.valueEnd)}function yft(t){return sVe(t),oVe(t,VV(t,0,ah.textEnd))}function oVe(t,i){let e=ah.textEnd;return e===i?-1:(i=ah.keyEnd=bft(t,ah.key=i,e),VV(t,i,e))}function vft(t){return sVe(t),aVe(t,VV(t,0,ah.textEnd))}function aVe(t,i){let e=ah.textEnd,n=ah.key=VV(t,i,e);return e===n?-1:(n=ah.keyEnd=Cft(t,n,e),n=GLe(t,n,e,58),n=ah.value=VV(t,n,e),n=ah.valueEnd=xft(t,n,e),GLe(t,n,e,59))}function sVe(t){ah.key=0,ah.keyEnd=0,ah.value=0,ah.valueEnd=0,ah.textEnd=t.length}function VV(t,i,e){for(;i32;)i++;return i}function Cft(t,i,e){let n;for(;i=65&&(n&-33)<=90||n>=48&&n<=57);)i++;return i}function GLe(t,i,e,n){return i=VV(t,i,e),i32&&(c=a),o=r,r=n,n=m&-33}return c}function jLe(t,i,e,n){let r=-1,o=e;for(;o=0;e=aVe(i,e))pVe(t,rVe(i),_ft(i))}function Pe(t){cVe(kft,wft,t,!0)}function wft(t,i){for(let e=yft(i);e>=0;e=oVe(i,e))YG(t,rVe(i),!0)}function lVe(t,i,e,n){let r=Wo(),o=vd(),a=SJ(2);if(o.firstUpdatePass&&uVe(o,t,a,n),i!==B_&&Pg(r,a,i)){let c=o.data[jS()];mVe(o,c,r,r[Yc],t,r[a+1]=Oft(i,e),n,a)}}function cVe(t,i,e,n){let r=vd(),o=SJ(2);r.firstUpdatePass&&uVe(r,null,o,n);let a=Wo();if(e!==B_&&Pg(a,o,e)){let c=r.data[jS()];if(hVe(c,n)&&!dVe(r,o)){let m=n?c.classesWithoutHost:c.stylesWithoutHost;m!==null&&(e=pJ(m,e||"")),Y_e(r,c,a,e,n)}else Mft(r,c,a,a[Yc],a[o+1],a[o+1]=Dft(t,i,e),n,o)}}function dVe(t,i){return i>=t.expandoStartIndex}function uVe(t,i,e,n){let r=t.data;if(r[e+1]===null){let o=r[jS()],a=dVe(t,e);hVe(o,n)&&i===null&&!a&&(i=!1),i=Ift(r,o,i,n),hft(r,o,i,e,a,n)}}function Ift(t,i,e,n){let r=iLe(t),o=n?i.residualClasses:i.residualStyles;if(r===null)(n?i.classBindings:i.styleBindings)===0&&(e=o_e(null,t,i,e,n),e=fj(e,i.attrs,n),o=null);else{let a=i.directiveStylingLast;if(a===-1||t[a]!==r)if(e=o_e(r,t,i,e,n),o===null){let m=Tft(t,i,n);m!==void 0&&Array.isArray(m)&&(m=o_e(null,t,i,m[1],n),m=fj(m,i.attrs,n),Eft(t,i,n,m))}else o=Aft(t,i,n)}return o!==void 0&&(n?i.residualClasses=o:i.residualStyles=o),e}function Tft(t,i,e){let n=e?i.classBindings:i.styleBindings;if(BV(n)!==0)return t[pP(n)]}function Eft(t,i,e,n){let r=e?i.classBindings:i.styleBindings;t[pP(r)]=n}function Aft(t,i,e){let n,r=i.directiveEnd;for(let o=1+i.directiveStylingLast;o0;){let m=t[r],g=Array.isArray(m),C=g?m[1]:m,w=C===null,P=e[r+1];P===B_&&(P=w?Vf:void 0);let R=w?_J(P,n):C===n?P:void 0;if(g&&!nee(R)&&(R=_J(m,n)),nee(R)&&(c=R,a))return c;let z=t[r+1];r=a?pP(z):BV(z)}if(i!==null){let m=o?i.residualClasses:i.residualStyles;m!=null&&(c=_J(m,n))}return c}function nee(t){return t!==void 0}function Oft(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=ET(W0(t)))),t}function hVe(t,i){return(t.flags&(i?8:16))!==0}function ee(t,i=""){let e=Wo(),n=vd(),r=t+yd,o=n.firstCreatePass?jV(n,r,1,i,null):n.data[r],a=Rft(n,e,o,i,t);e[r]=a,ij()&&v0e(n,e,a,o),MT(o,!1)}var Rft=(t,i,e,n,r)=>(EV(!0),RBe(i[Yc],n));function fVe(t,i,e,n=""){return Pg(t,OT(),e)?i+hk(e)+n:B_}function Pft(t,i,e,n,r,o=""){let a=ZFe(),c=NV(t,a,e,r);return SJ(2),c?i+hk(e)+n+hk(r)+o:B_}function Pt(t){return gn("",t),Pt}function gn(t,i,e){let n=Wo(),r=fVe(n,t,i,e);return r!==B_&&gVe(n,jS(),r),gn}function Pd(t,i,e,n,r){let o=Wo(),a=Pft(o,t,i,e,n,r);return a!==B_&&gVe(o,jS(),a),Pd}function gVe(t,i,e){let n=Age(i,t);vpt(t[Yc],n,e)}function Gf(t,i,e){Yge(i)&&(i=i());let n=Wo(),r=OT();if(Pg(n,r,i)){let o=vd(),a=TV();QBe(a,n,t,i,n[Yc],e)}return Gf}function Fg(t,i){let e=Yge(t);return e&&t.set(i),e}function jf(t,i){let e=Wo(),n=vd(),r=Cm();return nVe(n,e,e[Yc],r,t,i),jf}function Oj(t,i,e=""){return fVe(Wo(),t,i,e)}function Nft(t,i,e){let n=vd();if(n.firstCreatePass){let r=Ix(t);Z_e(e,n.data,n.blueprint,r,!0),Z_e(i,n.data,n.blueprint,r,!1)}}function Z_e(t,i,e,n,r){if(t=nh(t),Array.isArray(t))for(let o=0;o>20;if(JR(t)||!t.multi){let R=new uP(g,r,xe,null),z=s_e(m,i,r?C:C+P,w);z===-1?(c_e($J(c,a),o,m),a_e(o,t,i.length),i.push(m),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(R),a.push(R)):(e[z]=R,a[z]=R)}else{let R=s_e(m,i,C+P,w),z=s_e(m,i,C,C+P),H=R>=0&&e[R],j=z>=0&&e[z];if(r&&!j||!r&&!H){c_e($J(c,a),o,m);let K=Bft(r?Lft:Fft,e.length,r,n,g,t);!r&&j&&(e[z].providerFactory=K),a_e(o,t,i.length,0),i.push(m),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(K),a.push(K)}else{let K=_Ve(e[r?z:R],g,!r&&n);a_e(o,t,R>-1?R:z,K)}!r&&n&&j&&e[z].componentProviders++}}}function a_e(t,i,e,n){let r=JR(i),o=zFe(i);if(r||o){let m=(o?nh(i.useClass):i).prototype.ngOnDestroy;if(m){let g=t.destroyHooks||(t.destroyHooks=[]);if(!r&&i.multi){let C=g.indexOf(e);C===-1?g.push(e,[n,m]):g[C+1].push(n,m)}else g.push(e,m)}}}function _Ve(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function s_e(t,i,e,n){for(let r=e;r{e.providersResolver=(n,r)=>Nft(n,r?r(t):t,i)}}function Vr(t,i,e){let n=K0()+t,r=Wo();return r[n]===B_?WS(r,n,e?i.call(e):i()):Tj(r,n)}function Yi(t,i,e,n){return yVe(Wo(),K0(),t,i,e,n)}function na(t,i,e,n,r){return vVe(Wo(),K0(),t,i,e,n,r)}function Qu(t,i,e,n,r,o){return bVe(Wo(),K0(),t,i,e,n,r,o)}function YV(t,i,e,n,r,o,a){return Vft(Wo(),K0(),t,i,e,n,r,o,a)}function hP(t,i,e,n,r,o,a,c){let m=K0()+t,g=Wo(),C=FV(g,m,e,n,r,o);return Pg(g,m+4,a)||C?WS(g,m+5,c?i.call(c,e,n,r,o,a):i(e,n,r,o,a)):Tj(g,m+5)}function KV(t,i,e,n,r,o,a,c,m){let g=K0()+t,C=Wo(),w=FV(C,g,e,n,r,o);return NV(C,g+4,a,c)||w?WS(C,g+6,m?i.call(m,e,n,r,o,a,c):i(e,n,r,o,a,c)):Tj(C,g+6)}function q0e(t,i,e,n,r,o,a,c,m,g){let C=K0()+t,w=Wo(),P=FV(w,C,e,n,r,o);return w3e(w,C+4,a,c,m)||P?WS(w,C+7,g?i.call(g,e,n,r,o,a,c,m):i(e,n,r,o,a,c,m)):Tj(w,C+7)}function Y0e(t,i,e,n,r,o,a,c,m,g,C){let w=K0()+t,P=Wo(),R=FV(P,w,e,n,r,o);return FV(P,w+4,a,c,m,g)||R?WS(P,w+8,C?i.call(C,e,n,r,o,a,c,m,g):i(e,n,r,o,a,c,m,g)):Tj(P,w+8)}function Rj(t,i,e,n){return zft(Wo(),K0(),t,i,e,n)}function Pj(t,i){let e=t[i];return e===B_?void 0:e}function yVe(t,i,e,n,r,o){let a=i+e;return Pg(t,a,r)?WS(t,a+1,o?n.call(o,r):n(r)):Pj(t,a+1)}function vVe(t,i,e,n,r,o,a){let c=i+e;return NV(t,c,r,o)?WS(t,c+2,a?n.call(a,r,o):n(r,o)):Pj(t,c+2)}function bVe(t,i,e,n,r,o,a,c){let m=i+e;return w3e(t,m,r,o,a)?WS(t,m+3,c?n.call(c,r,o,a):n(r,o,a)):Pj(t,m+3)}function Vft(t,i,e,n,r,o,a,c,m){let g=i+e;return FV(t,g,r,o,a,c)?WS(t,g+4,m?n.call(m,r,o,a,c):n(r,o,a,c)):Pj(t,g+4)}function zft(t,i,e,n,r,o){let a=i+e,c=!1;for(let m=0;m=0;e--){let n=i[e];if(t===n.name)return n}}function ca(t,i,e){let n=t+yd,r=Wo(),o=JG(r,n);return W0e(r,n)?yVe(r,K0(),i,o.transform,e,o):o.transform(e)}function gl(t,i,e,n){let r=t+yd,o=Wo(),a=JG(o,r);return W0e(o,r)?vVe(o,K0(),i,a.transform,e,n,a):a.transform(e,n)}function K0e(t,i,e,n,r){let o=t+yd,a=Wo(),c=JG(a,o);return W0e(a,o)?bVe(a,K0(),i,c.transform,e,n,r,c):c.transform(e,n,r)}function W0e(t,i){return t[ka].data[i].pure}function di(t,i){return yee(t,i)}var ree=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},Q0e=(()=>{class t{compileModuleSync(e){return new ZJ(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),r=yge(e),o=kBe(r.declarations).reduce((a,c)=>{let m=VS(c);return m&&a.push(new bk(m)),a},[]);return new ree(n,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hft=(()=>{class t{zone=ae(Pn);changeDetectionScheduler=ae(Ab);applicationRef=ae($h);applicationErrorHandler=ae(L_);_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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function CVe({ngZoneFactory:t,ignoreChangesOutsideZone:i,scheduleInRootZone:e}){return t??=()=>new Pn($e(pe({},xVe()),{scheduleInRootZone:e})),[{provide:Pn,useFactory:t},{provide:AT,multi:!0,useFactory:()=>{let n=ae(Hft,{optional:!0});return()=>n.initialize()}},{provide:AT,multi:!0,useFactory:()=>{let n=ae(Gft);return()=>{n.initialize()}}},i===!0?{provide:Kge,useValue:!0}:[],{provide:Wge,useValue:e??H3e},{provide:L_,useFactory:()=>{let n=ae(Pn),r=ae(_d),o;return a=>{n.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw a}):(o??=r.get(hp),o.handleError(a))})}}}]}function xVe(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var Gft=(()=>{class t{subscription=new Ia;initialized=!1;zone=ae(Pn);pendingTasks=ae(qS);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(()=>{Pn.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Pn.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var SVe=(()=>{class t{applicationErrorHandler=ae(L_);appRef=ae($h);taskService=ae(qS);ngZone=ae(Pn);zonelessEnabled=ae(nj);tracing=ae(Sk,{optional:!0});disableScheduling=ae(Kge,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ia;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(XJ):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(ae(Wge,{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 JJ||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let n=!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,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!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(n))return;let r=this.useMicrotaskScheduler?PLe:G3e;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>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(XJ+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(n){this.taskService.remove(e),this.applicationErrorHandler(n)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,PLe(()=>{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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jft(){return typeof $localize<"u"&&$localize.locale||Mj}var xm=new Mi("",{providedIn:"root",factory:()=>ae(xm,{optional:!0,skipSelf:!0})||jft()}),Z0e=new Mi("",{providedIn:"root",factory:()=>Hht});var Nj=class{destroyed=!1;listeners=null;errorHandler=ae(hp,{optional:!0});destroyRef=ae(F_);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(i){if(this.destroyed)throw new Nn(953,!1);return(this.listeners??=[]).push(i),{unsubscribe:()=>{let e=this.listeners?.indexOf(i);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(i){if(this.destroyed){console.warn(BS(953,!1));return}if(this.listeners===null)return;let e=cs(null);try{for(let n of this.listeners)try{n(i)}catch(r){this.errorHandler?.handleError(r)}}finally{cs(e)}}};function Eu(t){return CFe(t)}function Or(t,i){return RG(t,i?.equal)}var X0e=class{[_m];constructor(i){this[_m]=i}destroy(){this[_m].destroy()}};function tu(t,i){let e=i?.injector??ae(Ir),n=i?.manualCleanup!==!0?e.get(F_):null,r,o=e.get(lP,null,{optional:!0}),a=e.get(Ab);return o!==null?(r=Yft(o.view,a,t),n instanceof jG&&n._lView===o.view&&(n=null)):r=Kft(t,e.get(rj),a),r.injector=e,n!==null&&(r.onDestroyFn=n.onDestroy(()=>r.destroy())),new X0e(r)}var wVe=$e(pe({},xFe),{cleanupFns:void 0,zone:null,onDestroyFn:cP,run(){let t=IV(!1);try{SFe(this)}finally{IV(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=cs(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],cs(t)}}}),$ft=$e(pe({},wVe),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){dk(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),qft=$e(pe({},wVe),{consumerMarkedDirty(){this.view[ts]|=8192,_k(this.view),this.notifier.notify(13)},destroy(){dk(this),this.onDestroyFn(),this.cleanup(),this.view[DT]?.delete(this)}});function Yft(t,i,e){let n=Object.create(qft);return n.view=t,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=i,n.fn=IVe(n,e),t[DT]??=new Set,t[DT].add(n),n.consumerMarkedDirty(n),n}function Kft(t,i,e){let n=Object.create($ft);return n.fn=IVe(n,t),n.scheduler=i,n.notifier=e,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function IVe(t,i){return()=>{i(e=>(t.cleanupFns??=[]).push(e))}}var Mee=Symbol("InputSignalNode#UNSET"),NVe=$e(pe({},PG),{transformFn:void 0,applyValueToInputSignal(t,i){qR(t,i)}});function FVe(t,i){let e=Object.create(NVe);e.value=t,e.transformFn=i?.transform;function n(){if(lk(e),e.value===Mee){let r=null;throw new Nn(-950,r)}return e.value}return n[_m]=e,n}var $f=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>yj(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},Jft=new Mi("");Jft.__NG_ELEMENT_ID__=t=>{let i=Cm();if(i===null)throw new Nn(204,!1);if(i.type&2)return i.value;if(t&8)return null;throw new Nn(204,!1)};function LVe(t){return new Nj}function TVe(t,i){return FVe(t,i)}function egt(t){return FVe(Mee,t)}var kr=(TVe.required=egt,TVe);function EVe(t,i){return R0e(i)}function tgt(t,i){return P0e(i)}var fP=(EVe.required=tgt,EVe);function AVe(t,i){return R0e(i)}function igt(t,i){return P0e(i)}var UT=(AVe.required=igt,AVe);function Oee(t,i){return F3e(i)}function BVe(t,i){let e=Object.create(NVe),n=new Nj;e.value=t;function r(){return lk(e),DVe(e.value),e.value}return r[_m]=e,r.asReadonly=AJ.bind(r),r.set=o=>{e.equal(e.value,o)||(qR(e,o),n.emit(o))},r.update=o=>{DVe(e.value),r.set(o(e.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function DVe(t){if(t===Mee)throw new Nn(952,!1)}function kVe(t,i){return BVe(t,i)}function ngt(t){return BVe(Mee,t)}var Pb=(kVe.required=ngt,kVe);var eye=new Mi(""),rgt=new Mi("");function Fj(t){return!t.moduleRef}function ogt(t){let i=Fj(t)?t.r3Injector:t.moduleRef.injector,e=i.get(Pn);return e.run(()=>{Fj(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let n=i.get(L_),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:n})}),Fj(t)){let o=()=>i.destroy(),a=t.platformInjector.get(eye);a.add(o),i.onDestroy(()=>{r.unsubscribe(),a.delete(o)})}else{let o=()=>t.moduleRef.destroy(),a=t.platformInjector.get(eye);a.add(o),t.moduleRef.onDestroy(()=>{aj(t.allPlatformModules,t.moduleRef),r.unsubscribe(),a.delete(o)})}return sgt(n,e,()=>{let o=i.get(qS),a=o.add(),c=i.get(H0e);return c.runInitializers(),c.donePromise.then(()=>{let m=i.get(xm,Mj);if(W3e(m||Mj),!i.get(rgt,!0))return Fj(t)?i.get($h):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Fj(t)){let C=i.get($h);return t.rootComponent!==void 0&&C.bootstrap(t.rootComponent),C}else return agt?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void o.remove(a))})})}var agt;function sgt(t,i,e){try{let n=e();return zT(n)?n.catch(r=>{throw i.runOutsideAngular(()=>t(r)),r}):n}catch(n){throw i.runOutsideAngular(()=>t(n)),n}}var Dee=null;function lgt(t=[],i){return Ir.create({name:i,providers:[{provide:WG,useValue:"platform"},{provide:eye,useValue:new Set([()=>Dee=null])},...t]})}function cgt(t=[]){if(Dee)return Dee;let i=lgt(t);return Dee=i,q3e(),dgt(i),i}function dgt(t){let i=t.get(aee,null);Gh(t,()=>{i?.forEach(e=>e())})}var dn=(()=>{class t{static __NG_ELEMENT_ID__=ugt}return t})();function ugt(t){return pgt(Cm(),Wo(),(t&16)===16)}function pgt(t,i,e){if(kT(t)&&!e){let n=Mb(t.index,i);return new vk(n,n)}else if(t.type&175){let n=i[Rg];return new vk(n,i)}return null}var tye=class{constructor(){}supports(i){return D0e(i)}create(i){return new iye(i)}},mgt=(t,i)=>i,iye=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(i){this._trackByFn=i||mgt}forEachItem(i){let e;for(e=this._itHead;e!==null;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,n=this._removalsHead,r=0,o=null;for(;e||n;){let a=!n||e&&e.currentIndex{a=this._trackByFn(r,c),e===null||!Object.is(e.trackById,a)?(e=this._mismatch(e,c,a,r),n=!0):(n&&(e=this._verifyReinsertion(e,c,a,r)),Object.is(e.item,c)||this._addIdentityChange(e,c)),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;i!==null;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;i!==null;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,n,r){let o;return i===null?o=this._itTail:(o=i._prev,this._remove(i)),i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,o,r)):(i=this._linkedRecords===null?null:this._linkedRecords.get(n,r),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,o,r)):i=this._addAfter(new nye(e,n),o,r)),i}_verifyReinsertion(i,e,n,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?i=this._reinsertAfter(o,i._prev,r):i.currentIndex!=r&&(i.currentIndex=r,this._addToMoves(i,r)),i}_truncate(i){for(;i!==null;){let e=i._next;this._addToRemovals(this._unlink(i)),i=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(i,e,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(i);let r=i._prevRemoved,o=i._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(i,e,n),this._addToMoves(i,n),i}_moveAfter(i,e,n){return this._unlink(i),this._insertAfter(i,e,n),this._addToMoves(i,n),i}_addAfter(i,e,n){return this._insertAfter(i,e,n),this._additionsTail===null?this._additionsTail=this._additionsHead=i:this._additionsTail=this._additionsTail._nextAdded=i,i}_insertAfter(i,e,n){let r=e===null?this._itHead:e._next;return i._next=r,i._prev=e,r===null?this._itTail=i:r._prev=i,e===null?this._itHead=i:e._next=i,this._linkedRecords===null&&(this._linkedRecords=new kee),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){this._linkedRecords!==null&&this._linkedRecords.remove(i);let e=i._prev,n=i._next;return e===null?this._itHead=n:e._next=n,n===null?this._itTail=e:n._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=i:this._movesTail=this._movesTail._nextMoved=i),i}_addToRemovals(i){return this._unlinkedRecords===null&&(this._unlinkedRecords=new kee),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=i:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=i,i}},nye=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(i,e){this.item=i,this.trackById=e}},rye=class{_head=null;_tail=null;add(i){this._head===null?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let n;for(n=this._head;n!==null;n=n._nextDup)if((e===null||e<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){let e=i._prevDup,n=i._nextDup;return e===null?this._head=n:e._nextDup=n,n===null?this._tail=e:n._prevDup=e,this._head===null}},kee=class{map=new Map;put(i){let e=i.trackById,n=this.map.get(e);n||(n=new rye,this.map.set(e,n)),n.add(i)}get(i,e){let n=i,r=this.map.get(n);return r?r.get(i,e):null}remove(i){let e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function MVe(t,i,e){let n=t.previousIndex;if(n===null)return n;let r=0;return e&&n{if(e&&e.key===r)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{let o=this._getOrCreateRecordForKey(r,n);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){let n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){let r=this._records.get(i);this._maybeAddToChanges(r,e);let o=r._prev,a=r._next;return o&&(o._next=a),a&&(a._prev=o),r._next=null,r._prev=null,r}let n=new sye(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;i!==null;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;i!=null;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){this._additionsHead===null?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){this._changesHead===null?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(n=>e(i[n],n))}},sye=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function OVe(){return new Ree([new tye])}var Ree=(()=>{class t{factories;static \u0275prov=ct({token:t,providedIn:"root",factory:OVe});constructor(e){this.factories=e}static create(e,n){if(n!=null){let r=n.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=ae(t,{optional:!0,skipSelf:!0});return t.create(e,n||OVe())}}}find(e){let n=this.factories.find(r=>r.supports(e));if(n!=null)return n;throw new Nn(901,!1)}}return t})();function RVe(){return new dye([new oye])}var dye=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:RVe});factories;constructor(e){this.factories=e}static create(e,n){if(n){let r=n.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=ae(t,{optional:!0,skipSelf:!0});return t.create(e,n||RVe())}}}find(e){let n=this.factories.find(r=>r.supports(e));if(n)return n;throw new Nn(901,!1)}}return t})();var VVe=(()=>{class t{constructor(e){}static \u0275fac=function(n){return new(n||t)(ai($h))};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();function zVe(t){let{rootComponent:i,appProviders:e,platformProviders:n,platformRef:r}=t;dd(8);try{let o=r?.injector??cgt(n),a=[CVe({}),{provide:Ab,useExisting:SVe},cLe,...e||[]],c=new mj({providers:a,parent:o,debugName:"",runEnvironmentInitializers:!1});return ogt({r3Injector:c.injector,platformInjector:o,rootComponent:i})}catch(o){return Promise.reject(o)}finally{dd(9)}}function Je(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function En(t,i=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):i}var J0e=Symbol("NOT_SET"),UVe=new Set,hgt=$e(pe({},PG),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:J0e,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(lk(g),g.value),g.signal[_m]=g,g.registerCleanupFn=C=>(g.cleanup??=new Set).add(C),this.nodes[c]=g,this.hooks[c]=C=>g.phaseFn(C)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let i of this.nodes)if(i)try{for(let e of i.cleanup??UVe)e()}finally{dk(i)}}};function HVe(t,i){let e=i?.injector??ae(Ir),n=e.get(Ab),r=e.get(See),o=e.get(Sk,null,{optional:!0});r.impl??=e.get(V0e);let a=t;typeof a=="function"&&(a={mixedReadWrite:t});let c=e.get(lP,null,{optional:!0}),m=new lye(r.impl,[a.earlyRead,a.write,a.mixedReadWrite,a.read],c?.view,n,e,o?.snapshot(null));return r.impl.register(m),m}function WV(t,i){let e=VS(t),n=i.elementInjector||yV();return new bk(e).create(n,i.projectableNodes,i.hostElement,i.environmentInjector,i.directives,i.bindings)}function Pee(t){let i=VS(t);if(!i)return null;let e=new bk(i);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 i.standalone},get isSignal(){return i.signals}}}var $Ve=null;function mv(){return $Ve}function uye(t){$Ve??=t}var Lj=class{},Bj=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(qVe),providedIn:"platform"})}return t})(),pye=new Mi(""),qVe=(()=>{class t extends Bj{_location;_history;_doc=ae(Gr);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mv().getBaseHref(this._doc)}onPopState(e){let n=mv().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=mv().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.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,n,r){this._history.pushState(e,n,r)}replaceState(e,n,r){this._history.replaceState(e,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function Nee(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function GVe(t){let i=t.search(/#|\?|$/);return t[i-1]==="/"?t.slice(0,i-1)+t.slice(i):t}function kx(t){return t&&t[0]!=="?"?`?${t}`:t}var Mx=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(Lee),providedIn:"root"})}return t})(),Fee=new Mi(""),Lee=(()=>{class t extends Mx{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??ae(Gr).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 Nee(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+kx(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,o){let a=this.prepareExternalUrl(r+kx(o));this._platformLocation.pushState(e,n,a)}replaceState(e,n,r,o){let a=this.prepareExternalUrl(r+kx(o));this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(ai(Bj),ai(Fee,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Lg=(()=>{class t{_subject=new Ai;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=_gt(GVe(jVe(n))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+kx(n))}normalize(e){return t.stripTrailingSlash(ggt(this._basePath,jVe(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kx(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+kx(n)),r)}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(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n??void 0,complete:r??void 0})}static normalizeQueryParams=kx;static joinWithSlash=Nee;static stripTrailingSlash=GVe;static \u0275fac=function(n){return new(n||t)(ai(Mx))};static \u0275prov=ct({token:t,factory:()=>fgt(),providedIn:"root"})}return t})();function fgt(){return new Lg(ai(Mx))}function ggt(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function jVe(t){return t.replace(/\/index.html$/,"")}function _gt(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var xye=(()=>{class t extends Mx{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,n!=null&&(this._baseHref=n)}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 n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(e){let n=Nee(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,r,o){let a=this.prepareExternalUrl(r+kx(o))||this._platformLocation.pathname;this._platformLocation.pushState(e,n,a)}replaceState(e,n,r,o){let a=this.prepareExternalUrl(r+kx(o))||this._platformLocation.pathname;this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(ai(Bj),ai(Fee,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),e4e={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]},Gj=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(Gj||{}),gP=(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})(gP||{}),Bg=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(Bg||{}),bd=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(bd||{}),Q0=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(Q0||{}),Up={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 t4e(t){return Ng(t)[eu.LocaleId]}function i4e(t,i,e){let n=Ng(t),r=[n[eu.DayPeriodsFormat],n[eu.DayPeriodsStandalone]],o=Nb(r,i);return Nb(o,e)}function n4e(t,i,e){let n=Ng(t),r=[n[eu.DaysFormat],n[eu.DaysStandalone]],o=Nb(r,i);return Nb(o,e)}function r4e(t,i,e){let n=Ng(t),r=[n[eu.MonthsFormat],n[eu.MonthsStandalone]],o=Nb(r,i);return Nb(o,e)}function o4e(t,i){let n=Ng(t)[eu.Eras];return Nb(n,i)}function Vj(t,i){let e=Ng(t);return Nb(e[eu.DateFormat],i)}function zj(t,i){let e=Ng(t);return Nb(e[eu.TimeFormat],i)}function Uj(t,i){let n=Ng(t)[eu.DateTimeFormat];return Nb(n,i)}function hv(t,i){let e=Ng(t),n=e[eu.NumberSymbols][i];if(typeof n>"u"){if(i===Up.CurrencyDecimal)return e[eu.NumberSymbols][Up.Decimal];if(i===Up.CurrencyGroup)return e[eu.NumberSymbols][Up.Group]}return n}function Yee(t,i){return Ng(t)[eu.NumberFormats][i]}function ygt(t){return Ng(t)[eu.Currencies]}var a4e=$0e;function s4e(t){if(!t[eu.ExtraData])throw new Nn(2303,!1)}function l4e(t){let i=Ng(t);return s4e(i),(i[eu.ExtraData][2]||[]).map(n=>typeof n=="string"?mye(n):[mye(n[0]),mye(n[1])])}function c4e(t,i,e){let n=Ng(t);s4e(n);let r=[n[eu.ExtraData][0],n[eu.ExtraData][1]],o=Nb(r,i)||[];return Nb(o,e)||[]}function Nb(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Nn(2304,!1)}function mye(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}function d4e(t,i,e="en"){let n=ygt(e)[t]||e4e[t]||[],r=n[1];return i==="narrow"&&typeof r=="string"?r:n[0]||t}var vgt=2;function u4e(t){let i,e=e4e[t];return e&&(i=e[2]),typeof i=="number"?i:vgt}var bgt=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Bee={},Cgt=/((?:[^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 p4e(t,i,e,n){let r=kgt(t);i=HT(e,i)||i;let a=[],c;for(;i;)if(c=Cgt.exec(i),c){a=a.concat(c.slice(1));let C=a.pop();if(!C)break;i=C}else{a.push(i);break}let m=r.getTimezoneOffset();n&&(m=h4e(n,m),r=Dgt(r,n));let g="";return a.forEach(C=>{let w=Egt(C);g+=w?w(r,e,m):C==="''"?"'":C.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),g}function Gee(t,i,e){let n=new Date(0);return n.setFullYear(t,i,e),n.setHours(0,0,0),n}function HT(t,i){let e=t4e(t);if(Bee[e]??={},Bee[e][i])return Bee[e][i];let n="";switch(i){case"shortDate":n=Vj(t,Q0.Short);break;case"mediumDate":n=Vj(t,Q0.Medium);break;case"longDate":n=Vj(t,Q0.Long);break;case"fullDate":n=Vj(t,Q0.Full);break;case"shortTime":n=zj(t,Q0.Short);break;case"mediumTime":n=zj(t,Q0.Medium);break;case"longTime":n=zj(t,Q0.Long);break;case"fullTime":n=zj(t,Q0.Full);break;case"short":let r=HT(t,"shortTime"),o=HT(t,"shortDate");n=Vee(Uj(t,Q0.Short),[r,o]);break;case"medium":let a=HT(t,"mediumTime"),c=HT(t,"mediumDate");n=Vee(Uj(t,Q0.Medium),[a,c]);break;case"long":let m=HT(t,"longTime"),g=HT(t,"longDate");n=Vee(Uj(t,Q0.Long),[m,g]);break;case"full":let C=HT(t,"fullTime"),w=HT(t,"fullDate");n=Vee(Uj(t,Q0.Full),[C,w]);break}return n&&(Bee[e][i]=n),n}function Vee(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,n){return i!=null&&n in i?i[n]:e})),t}function Ox(t,i,e="-",n,r){let o="";(t<0||r&&t<=0)&&(r?t=-t+1:(t=-t,o=e));let a=String(t);for(;a.length0||c>-e)&&(c+=e),t===3)c===0&&e===-12&&(c=12);else if(t===6)return xgt(c,i);let m=hv(a,Up.MinusSign);return Ox(c,i,m,n,r)}}function Sgt(t,i){switch(t){case 0:return i.getFullYear();case 1:return i.getMonth();case 2:return i.getDate();case 3:return i.getHours();case 4:return i.getMinutes();case 5:return i.getSeconds();case 6:return i.getMilliseconds();case 7:return i.getDay();default:throw new Nn(2301,!1)}}function iu(t,i,e=Bg.Format,n=!1){return function(r,o){return wgt(r,o,t,i,e,n)}}function wgt(t,i,e,n,r,o){switch(e){case 2:return r4e(i,r,n)[t.getMonth()];case 1:return n4e(i,r,n)[t.getDay()];case 0:let a=t.getHours(),c=t.getMinutes();if(o){let g=l4e(i),C=c4e(i,r,n),w=g.findIndex(P=>{if(Array.isArray(P)){let[R,z]=P,H=a>=R.hours&&c>=R.minutes,j=a0?Math.floor(r/60):Math.ceil(r/60);switch(t){case 0:return(r>=0?"+":"")+Ox(a,2,o)+Ox(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+Ox(a,1,o);case 2:return"GMT"+(r>=0?"+":"")+Ox(a,2,o)+":"+Ox(Math.abs(r%60),2,o);case 3:return n===0?"Z":(r>=0?"+":"")+Ox(a,2,o)+":"+Ox(Math.abs(r%60),2,o);default:throw new Nn(2310,!1)}}}var Igt=0,Hee=4;function Tgt(t){let i=Gee(t,Igt,1).getDay();return Gee(t,0,1+(i<=Hee?Hee:Hee+7)-i)}function m4e(t){let i=t.getDay(),e=i===0?-3:Hee-i;return Gee(t.getFullYear(),t.getMonth(),t.getDate()+e)}function hye(t,i=!1){return function(e,n){let r;if(i){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,a=e.getDate();r=1+Math.floor((a+o)/7)}else{let o=m4e(e),a=Tgt(o.getFullYear()),c=o.getTime()-a.getTime();r=1+Math.round(c/6048e5)}return Ox(r,t,hv(n,Up.MinusSign))}}function Uee(t,i=!1){return function(e,n){let o=m4e(e).getFullYear();return Ox(o,t,hv(n,Up.MinusSign),i)}}var fye={};function Egt(t){if(fye[t])return fye[t];let i;switch(t){case"G":case"GG":case"GGG":i=iu(3,bd.Abbreviated);break;case"GGGG":i=iu(3,bd.Wide);break;case"GGGGG":i=iu(3,bd.Narrow);break;case"y":i=Sm(0,1,0,!1,!0);break;case"yy":i=Sm(0,2,0,!0,!0);break;case"yyy":i=Sm(0,3,0,!1,!0);break;case"yyyy":i=Sm(0,4,0,!1,!0);break;case"Y":i=Uee(1);break;case"YY":i=Uee(2,!0);break;case"YYY":i=Uee(3);break;case"YYYY":i=Uee(4);break;case"M":case"L":i=Sm(1,1,1);break;case"MM":case"LL":i=Sm(1,2,1);break;case"MMM":i=iu(2,bd.Abbreviated);break;case"MMMM":i=iu(2,bd.Wide);break;case"MMMMM":i=iu(2,bd.Narrow);break;case"LLL":i=iu(2,bd.Abbreviated,Bg.Standalone);break;case"LLLL":i=iu(2,bd.Wide,Bg.Standalone);break;case"LLLLL":i=iu(2,bd.Narrow,Bg.Standalone);break;case"w":i=hye(1);break;case"ww":i=hye(2);break;case"W":i=hye(1,!0);break;case"d":i=Sm(2,1);break;case"dd":i=Sm(2,2);break;case"c":case"cc":i=Sm(7,1);break;case"ccc":i=iu(1,bd.Abbreviated,Bg.Standalone);break;case"cccc":i=iu(1,bd.Wide,Bg.Standalone);break;case"ccccc":i=iu(1,bd.Narrow,Bg.Standalone);break;case"cccccc":i=iu(1,bd.Short,Bg.Standalone);break;case"E":case"EE":case"EEE":i=iu(1,bd.Abbreviated);break;case"EEEE":i=iu(1,bd.Wide);break;case"EEEEE":i=iu(1,bd.Narrow);break;case"EEEEEE":i=iu(1,bd.Short);break;case"a":case"aa":case"aaa":i=iu(0,bd.Abbreviated);break;case"aaaa":i=iu(0,bd.Wide);break;case"aaaaa":i=iu(0,bd.Narrow);break;case"b":case"bb":case"bbb":i=iu(0,bd.Abbreviated,Bg.Standalone,!0);break;case"bbbb":i=iu(0,bd.Wide,Bg.Standalone,!0);break;case"bbbbb":i=iu(0,bd.Narrow,Bg.Standalone,!0);break;case"B":case"BB":case"BBB":i=iu(0,bd.Abbreviated,Bg.Format,!0);break;case"BBBB":i=iu(0,bd.Wide,Bg.Format,!0);break;case"BBBBB":i=iu(0,bd.Narrow,Bg.Format,!0);break;case"h":i=Sm(3,1,-12);break;case"hh":i=Sm(3,2,-12);break;case"H":i=Sm(3,1);break;case"HH":i=Sm(3,2);break;case"m":i=Sm(4,1);break;case"mm":i=Sm(4,2);break;case"s":i=Sm(5,1);break;case"ss":i=Sm(5,2);break;case"S":i=Sm(6,1);break;case"SS":i=Sm(6,2);break;case"SSS":i=Sm(6,3);break;case"Z":case"ZZ":case"ZZZ":i=zee(0);break;case"ZZZZZ":i=zee(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=zee(1);break;case"OOOO":case"ZZZZ":case"zzzz":i=zee(2);break;default:return null}return fye[t]=i,i}function h4e(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function Agt(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function Dgt(t,i,e){let r=t.getTimezoneOffset(),o=h4e(i,r);return Agt(t,-1*(o-r))}function kgt(t){if(YVe(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[r,o=1,a=1]=t.split("-").map(c=>+c);return Gee(r,o-1,a)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match(bgt))return Mgt(n)}let i=new Date(t);if(!YVe(i))throw new Nn(2311,!1);return i}function Mgt(t){let i=new Date(0),e=0,n=0,r=t[8]?i.setUTCFullYear:i.setFullYear,o=t[8]?i.setUTCHours:i.setHours;t[9]&&(e=Number(t[9]+t[10]),n=Number(t[9]+t[11])),r.call(i,Number(t[1]),Number(t[2])-1,Number(t[3]));let a=Number(t[4]||0)-e,c=Number(t[5]||0)-n,m=Number(t[6]||0),g=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(i,a,c,m,g),i}function YVe(t){return t instanceof Date&&!isNaN(t.valueOf())}var Ogt=/^(\d+)?\.((\d+)(-(\d+))?)?$/,KVe=22,jee=".",Hj="0",Rgt=";",Pgt=",",gye="#",WVe="\xA4",Ngt="%";function Sye(t,i,e,n,r,o,a=!1){let c="",m=!1;if(!isFinite(t))c=hv(e,Up.Infinity);else{let g=Lgt(t);a&&(g=Fgt(g));let C=i.minInt,w=i.minFrac,P=i.maxFrac;if(o){let ne=o.match(Ogt);if(ne===null)throw new Nn(2306,!1);let me=ne[1],Te=ne[3],Ie=ne[5];me!=null&&(C=_ye(me)),Te!=null&&(w=_ye(Te)),Ie!=null?P=_ye(Ie):Te!=null&&w>P&&(P=w)}Bgt(g,w,P);let R=g.digits,z=g.integerLen,H=g.exponent,j=[];for(m=R.every(ne=>!ne);z0?j=R.splice(z,R.length):(j=R,R=[0]);let K=[];for(R.length>=i.lgSize&&K.unshift(R.splice(-i.lgSize,R.length).join(""));R.length>i.gSize;)K.unshift(R.splice(-i.gSize,R.length).join(""));R.length&&K.unshift(R.join("")),c=K.join(hv(e,n)),j.length&&(c+=hv(e,r)+j.join("")),H&&(c+=hv(e,Up.Exponential)+"+"+H)}return t<0&&!m?c=i.negPre+c+i.negSuf:c=i.posPre+c+i.posSuf,c}function f4e(t,i,e,n,r){let o=Yee(i,Gj.Currency),a=wye(o,hv(i,Up.MinusSign));return a.minFrac=u4e(n),a.maxFrac=a.minFrac,Sye(t,a,i,Up.CurrencyGroup,Up.CurrencyDecimal,r).replace(WVe,e).replace(WVe,"").trim()}function g4e(t,i,e){let n=Yee(i,Gj.Percent),r=wye(n,hv(i,Up.MinusSign));return Sye(t,r,i,Up.Group,Up.Decimal,e,!0).replace(new RegExp(Ngt,"g"),hv(i,Up.PercentSign))}function _4e(t,i,e){let n=Yee(i,Gj.Decimal),r=wye(n,hv(i,Up.MinusSign));return Sye(t,r,i,Up.Group,Up.Decimal,e)}function wye(t,i="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(Rgt),r=n[0],o=n[1],a=r.indexOf(jee)!==-1?r.split(jee):[r.substring(0,r.lastIndexOf(Hj)+1),r.substring(r.lastIndexOf(Hj)+1)],c=a[0],m=a[1]||"";e.posPre=c.substring(0,c.indexOf(gye));for(let C=0;C-1&&(i=i.replace(jee,"")),(o=i.search(/e/i))>0?(r<0&&(r=o),r+=+i.slice(o+1),i=i.substring(0,o)):r<0&&(r=i.length),o=0;i.charAt(o)===Hj;o++);if(o===(c=i.length))n=[0],r=1;else{for(c--;i.charAt(c)===Hj;)c--;for(r-=o,n=[],a=0;o<=c;o++,a++)n[a]=Number(i.charAt(o))}return r>KVe&&(n=n.splice(0,KVe-1),e=r-1,r=1),{digits:n,exponent:e,integerLen:r}}function Bgt(t,i,e){if(i>e)throw new Nn(2307,!1);let n=t.digits,r=n.length-t.integerLen,o=Math.min(Math.max(i,r),e),a=o+t.integerLen,c=n[a];if(a>0){n.splice(Math.max(t.integerLen,a));for(let w=a;w=5)if(a-1<0){for(let w=0;w>a;w--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[a-1]++;for(;r=g?z.pop():m=!1),P>=10?1:0},0);C&&(n.unshift(C),t.integerLen++)}function _ye(t){let i=parseInt(t);if(isNaN(i))throw new Nn(2305,!1);return i}var Iye=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:function(n){let r=null;return n?r=new n:r=(o=>new y4e(o))(ai(xm)),r},providedIn:"root"})}return t})();function Vgt(t,i,e,n){let r=`=${t}`;if(i.indexOf(r)>-1||(r=e.getPluralCategory(t,n),i.indexOf(r)>-1))return r;if(i.indexOf("other")>-1)return"other";throw new Nn(2308,!1)}var y4e=(()=>{class t extends Iye{locale;constructor(e){super(),this.locale=e}getPluralCategory(e,n){switch(a4e(n||this.locale)(e)){case gP.Zero:return"zero";case gP.One:return"one";case gP.Two:return"two";case gP.Few:return"few";case gP.Many:return"many";default:return"other"}}static \u0275fac=function(n){return new(n||t)(ai(xm))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),yye=/\s+/,QVe=[],qa=(()=>{class t{_ngEl;_renderer;initialClasses=QVe;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(yye):QVe}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(yye):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let r=this.stateMap.get(e);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(yye).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(n){return new(n||t)(xe(qn),xe(Ma))};static \u0275dir=hn({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})(),Tye=(()=>{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 n=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(e)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=N0e(this.ngComponentOutletNgModule,ZVe(n)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(ZVe(n)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:n,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[n,r]of this._inputsUsed)r?(e.setInput(n,this.ngComponentOutletInputs[n]),this._inputsUsed.set(n,!1)):(e.setInput(n,void 0),this._inputsUsed.delete(n))}static \u0275fac=function(n){return new(n||t)(xe($l))};static \u0275dir=hn({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletEnvironmentInjector:"ngComponentOutletEnvironmentInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},exportAs:["ngComponentOutlet"],features:[Yt]})}return t})();function ZVe(t){return t.get(Ax).injector}var $ee=class{$implicit;ngForOf;index;count;constructor(i,e,n,r){this.$implicit=i,this.ngForOf=e,this.index=n,this.count=r}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}},Vl=(()=>{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,n,r){this._viewContainer=e,this._template=n,this._differs=r}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 n=this._viewContainer;e.forEachOperation((r,o,a)=>{if(r.previousIndex==null)n.createEmbeddedView(this._template,new $ee(r.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)n.remove(o===null?void 0:o);else if(o!==null){let c=n.get(o);n.move(c,a),XVe(c,r)}});for(let r=0,o=n.length;r{let o=n.get(r.currentIndex);XVe(o,r)})}static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(xe($l),xe(Bl),xe(Ree))};static \u0275dir=hn({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function XVe(t,i){t.context.$implicit=i.item}var Xr=(()=>{class t{_viewContainer;_context=new qee;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,n){this._viewContainer=e,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){JVe(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){JVe(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,n){return!0}static \u0275fac=function(n){return new(n||t)(xe($l),xe(Bl))};static \u0275dir=hn({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),qee=class{$implicit=null;ngIf=null};function JVe(t,i){if(t&&!t.createEmbeddedView)throw new Nn(2020,!1)}var vye=class{_viewContainerRef;_templateRef;_created=!1;constructor(i,e){this._viewContainerRef=i,this._templateRef=e}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(i){i&&!this._created?this.create():!i&&this._created&&this.destroy()}},Kee=(()=>{class t{_defaultViews=[];_defaultUsed=!1;_caseCount=0;_lastCaseCheckIndex=0;_lastCasesMatched=!1;_ngSwitch;set ngSwitch(e){this._ngSwitch=e,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let n=e===this._ngSwitch;return this._lastCasesMatched||=n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let n of this._defaultViews)n.enforceState(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}})}return t})(),Eye=(()=>{class t{ngSwitch;_view;ngSwitchCase;constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new vye(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static \u0275fac=function(n){return new(n||t)(xe($l),xe(Bl),xe(Kee,9))};static \u0275dir=hn({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}})}return t})();var Xs=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,n,r){this._ngEl=e,this._differs=n,this._renderer=r}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,n){let[r,o]=e.split("."),a=r.indexOf("-")===-1?void 0:Ex.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${n}${o}`:n,a):this._renderer.removeStyle(this._ngEl.nativeElement,r,a)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||t)(xe(qn),xe(dye),xe(Ma))};static \u0275dir=hn({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Jr=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(e,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||t)(xe($l))};static \u0275dir=hn({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Yt]})}return t})();function QV(t,i){return new Nn(2100,!1)}var bye=class{createSubscription(i,e,n){return Eu(()=>i.subscribe({next:e,error:n}))}dispose(i){Eu(()=>i.unsubscribe())}},Cye=class{createSubscription(i,e,n){return i.then(r=>e?.(r),r=>n?.(r)),{unsubscribe:()=>{e=null,n=null}}}dispose(i){i.unsubscribe()}},zgt=new Cye,Ugt=new bye,Dc=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=ae(L_);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,n=>this._updateLatestValue(e,n),n=>this.applicationErrorHandler(n))}_selectStrategy(e){if(zT(e))return zgt;if(Tee(e))return Ugt;throw QV(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(n){return new(n||t)(xe(dn,16))};static \u0275pipe=Tu({name:"async",type:t,pure:!1})}return t})();var Hgt="mediumDate",v4e=new Mi(""),b4e=new Mi(""),Hp=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,n,r){this.locale=e,this.defaultTimezone=n,this.defaultOptions=r}transform(e,n,r,o){if(e==null||e===""||e!==e)return null;try{let a=n??this.defaultOptions?.dateFormat??Hgt,c=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return p4e(e,a,o||this.locale,c)}catch(a){throw QV(t,a.message)}}static \u0275fac=function(n){return new(n||t)(xe(xm,16),xe(v4e,24),xe(b4e,24))};static \u0275pipe=Tu({name:"date",type:t,pure:!0})}return t})(),Ggt=/#/g,_P=(()=>{class t{_localization;constructor(e){this._localization=e}transform(e,n,r){if(e==null)return"";if(typeof n!="object"||n===null)throw QV(t,n);let o=Vgt(e,Object.keys(n),this._localization,r);return n[o].replace(Ggt,e.toString())}static \u0275fac=function(n){return new(n||t)(xe(Iye,16))};static \u0275pipe=Tu({name:"i18nPlural",type:t,pure:!0})}return t})();var V_=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,n,r){if(!Dye(e))return null;r||=this._locale;try{let o=kye(e);return _4e(o,r,n)}catch(o){throw QV(t,o.message)}}static \u0275fac=function(n){return new(n||t)(xe(xm,16))};static \u0275pipe=Tu({name:"number",type:t,pure:!0})}return t})(),GT=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,n,r){if(!Dye(e))return null;r||=this._locale;try{let o=kye(e);return g4e(o,r,n)}catch(o){throw QV(t,o.message)}}static \u0275fac=function(n){return new(n||t)(xe(xm,16))};static \u0275pipe=Tu({name:"percent",type:t,pure:!0})}return t})(),Aye=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,n="USD"){this._locale=e,this._defaultCurrencyCode=n}transform(e,n=this._defaultCurrencyCode,r="symbol",o,a){if(!Dye(e))return null;a||=this._locale,typeof r=="boolean"&&(r=r?"symbol":"code");let c=n||this._defaultCurrencyCode;r!=="code"&&(r==="symbol"||r==="symbol-narrow"?c=d4e(c,r==="symbol"?"wide":"narrow",a):c=r);try{let m=kye(e);return f4e(m,a,c,n,o)}catch(m){throw QV(t,m.message)}}static \u0275fac=function(n){return new(n||t)(xe(xm,16),xe(Z0e,16))};static \u0275pipe=Tu({name:"currency",type:t,pure:!0})}return t})();function Dye(t){return!(t==null||t===""||t!==t)}function kye(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Nn(2309,!1);return t}var rr=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();function jj(t,i){i=encodeURIComponent(i);for(let e of t.split(";")){let n=e.indexOf("="),[r,o]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(r.trim()===i)return decodeURIComponent(o)}return null}var yP=class{};function C4e(t,i,e){return j0e(t,i,e)}var Oye="browser",jgt="server";function Js(t){return t===Oye}function x4e(t){return t===jgt}var S4e=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new Mye(ae(Gr),window)})}return t})(),Mye=class{document;window;offset=()=>[0,0];constructor(i,e){this.document=i,this.window=e}setOffset(i){Array.isArray(i)?this.offset=()=>i:this.offset=i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,e){this.window.scrollTo($e(pe({},e),{left:i[0],top:i[1]}))}scrollToAnchor(i,e){let n=$gt(this.document,i);n&&(this.scrollToElement(n,e),n.focus())}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch{console.warn(BS(2400,!1))}}scrollToElement(i,e){let n=i.getBoundingClientRect(),r=n.left+this.window.pageXOffset,o=n.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo($e(pe({},e),{left:r-a[0],top:o-a[1]}))}};function $gt(t,i){let e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),r=n.currentNode;for(;r;){let o=r.shadowRoot;if(o){let a=o.getElementById(i)||o.querySelector(`[name="${i}"]`);if(a)return a}r=n.nextNode()}}return null}var Qee=new Mi(""),Lye=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,r,o){return this._findPluginFor(n).addEventListener(e,n,r,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new Nn(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||t)(ai(Qee),ai(Pn))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),$j=class{_doc;constructor(i){this._doc=i}manager},Rye="ng-app-id";function w4e(t){for(let i of t)i.remove()}function I4e(t,i){let e=i.createElement("style");return e.textContent=t,e}function qgt(t,i,e,n){let r=t.head?.querySelectorAll(`style[${Rye}="${i}"],link[${Rye}="${i}"]`);if(r)for(let o of r)o.removeAttribute(Rye),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function Nye(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var Bye=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,r,o={}){this.doc=e,this.appId=n,this.nonce=r,qgt(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let r of e)this.addUsage(r,this.inline,I4e);n?.forEach(r=>this.addUsage(r,this.external,Nye))}removeStyles(e,n){for(let r of e)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,n,r){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,r(e,this.doc)))})}removeUsage(e,n){let r=n.get(e);r&&(r.usage--,r.usage<=0&&(w4e(r.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])w4e(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(e,I4e(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(e,Nye(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||t)(ai(Gr),ai(Ck),ai(HV,8),ai(Hf))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Pye={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"},Vye=/%COMP%/g;var E4e="%COMP%",Ygt=`_nghost-${E4e}`,Kgt=`_ngcontent-${E4e}`,Wgt=!0,Qgt=new Mi("",{providedIn:"root",factory:()=>Wgt});function Zgt(t){return Kgt.replace(Vye,t)}function Xgt(t){return Ygt.replace(Vye,t)}function A4e(t,i){return i.map(e=>e.replace(Vye,t))}var Kj=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,r,o,a,c,m,g=null,C=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=c,this.ngZone=m,this.nonce=g,this.tracingService=C,this.platformIsServer=!1,this.defaultRenderer=new qj(e,a,m,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,n);return r instanceof Wee?r.applyToHost(e):r instanceof Yj&&r.applyStyles(),r}getOrCreateRenderer(e,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let a=this.doc,c=this.ngZone,m=this.eventManager,g=this.sharedStylesHost,C=this.removeStylesOnCompDestroy,w=this.platformIsServer,P=this.tracingService;switch(n.encapsulation){case NT.Emulated:o=new Wee(m,g,n,this.appId,C,a,c,w,P);break;case NT.ShadowDom:return new Fye(m,g,e,n,a,c,this.nonce,w,P);default:o=new Yj(m,g,n,C,a,c,w,P);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||t)(ai(Lye),ai(Bye),ai(Ck),ai(Qgt),ai(Gr),ai(Hf),ai(Pn),ai(HV),ai(Sk,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),qj=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(i,e,n,r,o){this.eventManager=i,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(i,e){return e?this.doc.createElementNS(Pye[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(T4e(i)?i.content:i).appendChild(e)}insertBefore(i,e,n){i&&(T4e(i)?i.content:i).insertBefore(e,n)}removeChild(i,e){e.remove()}selectRootElement(i,e){let n=typeof i=="string"?this.doc.querySelector(i):i;if(!n)throw new Nn(-5104,!1);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,r){if(r){e=r+":"+e;let o=Pye[r];o?i.setAttributeNS(o,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){let r=Pye[n];r?i.removeAttributeNS(r,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,r){r&(Ex.DashCase|Ex.Important)?i.style.setProperty(e,n,r&Ex.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&Ex.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i!=null&&(i[e]=n)}setValue(i,e){i.nodeValue=e}listen(i,e,n,r){if(typeof i=="string"&&(i=mv().getGlobalEventTarget(this.doc,i),!i))throw new Nn(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(i,e,o)),this.eventManager.addEventListener(i,e,o,r)}decoratePreventDefault(i){return e=>{if(e==="__ngUnwrap__")return i;i(e)===!1&&e.preventDefault()}}};function T4e(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var Fye=class extends qj{sharedStylesHost;hostEl;shadowRoot;constructor(i,e,n,r,o,a,c,m,g){super(i,o,a,m,g),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let C=r.styles;C=A4e(r.id,C);for(let P of C){let R=document.createElement("style");c&&R.setAttribute("nonce",c),R.textContent=P,this.shadowRoot.appendChild(R)}let w=r.getExternalStyles?.();if(w)for(let P of w){let R=Nye(P,o);c&&R.setAttribute("nonce",c),this.shadowRoot.appendChild(R)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,e){return super.appendChild(this.nodeOrShadowRoot(i),e)}insertBefore(i,e,n){return super.insertBefore(this.nodeOrShadowRoot(i),e,n)}removeChild(i,e){return super.removeChild(null,e)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Yj=class extends qj{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,n,r,o,a,c,m,g){super(i,o,a,c,m),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let C=n.styles;this.styles=g?A4e(g,C):C,this.styleUrls=n.getExternalStyles?.(g)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&mee.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wee=class extends Yj{contentAttr;hostAttr;constructor(i,e,n,r,o,a,c,m,g){let C=r+"-"+n.id;super(i,e,n,o,a,c,m,g,C),this.contentAttr=Zgt(C),this.hostAttr=Xgt(C)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,e){let n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}};var Zee=class t extends Lj{supportsDOMEvents=!0;static makeCurrent(){uye(new t)}onAndCancel(i,e,n,r){return i.addEventListener(e,n,r),()=>{i.removeEventListener(e,n,r)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.remove()}createElement(i,e){return e=e||this.getDefaultDocument(),e.createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return e==="window"?window:e==="document"?i:e==="body"?i.body:null}getBaseHref(i){let e=Jgt();return e==null?null:e_t(e)}resetBaseElement(){Wj=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return jj(document.cookie,i)}},Wj=null;function Jgt(){return Wj=Wj||document.head.querySelector("base"),Wj?Wj.getAttribute("href"):null}function e_t(t){return new URL(t,document.baseURI).pathname}var Xee=class{addToWindow(i){oh.getAngularTestability=(n,r=!0)=>{let o=i.findTestabilityInTree(n,r);if(o==null)throw new Nn(5103,!1);return o},oh.getAllAngularTestabilities=()=>i.getAllTestabilities(),oh.getAllAngularRootElements=()=>i.getAllRootElements();let e=n=>{let r=oh.getAllAngularTestabilities(),o=r.length,a=function(){o--,o==0&&n()};r.forEach(c=>{c.whenStable(a)})};oh.frameworkStabilizers||(oh.frameworkStabilizers=[]),oh.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,n){if(e==null)return null;let r=i.getTestability(e);return r??(n?mv().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},t_t=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),k4e=(()=>{class t extends $j{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r,o){return e.addEventListener(n,r,o),()=>this.removeEventListener(e,n,r,o)}removeEventListener(e,n,r,o){return e.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||t)(ai(Gr))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),D4e=["alt","control","meta","shift"],i_t={"\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"},n_t={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},M4e=(()=>{class t extends $j{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,n,r,o){let a=t.parseEventName(n),c=t.eventCallback(a.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mv().onAndCancel(e,a.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=t._normalizeKey(n.pop()),a="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),a="code."),D4e.forEach(g=>{let C=n.indexOf(g);C>-1&&(n.splice(C,1),a+=g+".")}),a+=o,n.length!=0||o.length===0)return null;let m={};return m.domEventName=r,m.fullKey=a,m}static matchEventFullKeyCode(e,n){let r=i_t[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),D4e.forEach(a=>{if(a!==r){let c=n_t[a];c(e)&&(o+=a+".")}}),o+=r,o===n)}static eventCallback(e,n,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||t)(ai(Gr))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function zye(t,i,e){let n=pe({rootComponent:t,platformRef:e?.platformRef},r_t(i));return zVe(n)}function r_t(t){return{appProviders:[...O4e,...t?.providers??[]],platformProviders:l_t}}function o_t(){Zee.makeCurrent()}function a_t(){return new hp}function s_t(){return i0e(document),document}var l_t=[{provide:Hf,useValue:Oye},{provide:aee,useValue:o_t,multi:!0},{provide:Gr,useFactory:s_t}];var c_t=[{provide:qV,useClass:Xee},{provide:Iee,useClass:Ej,deps:[Pn,Aj,qV]},{provide:Ej,useClass:Ej,deps:[Pn,Aj,qV]}],O4e=[{provide:WG,useValue:"root"},{provide:hp,useFactory:a_t},{provide:Qee,useClass:k4e,multi:!0,deps:[Gr]},{provide:Qee,useClass:M4e,multi:!0,deps:[Gr]},Kj,Bye,Lye,{provide:Jd,useExisting:Kj},{provide:yP,useClass:t_t},[]],Qj=(()=>{class t{constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[...O4e,...c_t],imports:[rr,VVe]})}return t})();var JV=class{},Zj=class{},Tk=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(i){i?typeof i=="string"?this.lazyInit=()=>{this.headers=new Map,i.split(` `).forEach(e=>{let n=e.indexOf(":");if(n>0){let r=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let r=(i.op==="a"?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":let o=i.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(c=>o.indexOf(c)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=i.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(i,r)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var ete=class{encodeKey(i){return R4e(i)}encodeValue(i){return R4e(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function d_t(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[a,c]=o==-1?[i.decodeKey(r),""]:[i.decodeKey(r.slice(0,o)),i.decodeValue(r.slice(o+1))],m=e.get(a)||[];m.push(c),e.set(a,m)}),e}var u_t=/%(\d[a-f0-9])/gi,p_t={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function R4e(t){return encodeURIComponent(t).replace(u_t,(i,e)=>p_t[e]??i)}function Jee(t){return`${t}`}var Vo=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new ete,i.fromString){if(i.fromObject)throw new Nn(2805,!1);this.map=d_t(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],r=Array.isArray(n)?n.map(Jee):[Jee(n)];this.map.set(e,r)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:r,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Jee(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],r=n.indexOf(Jee(i.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var tte=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function m_t(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function P4e(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function N4e(t){return typeof Blob<"u"&&t instanceof Blob}function F4e(t){return typeof FormData<"u"&&t instanceof FormData}function h_t(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var L4e="Content-Type",B4e="Accept",z4e="X-Request-URL",U4e="text/plain",H4e="application/json",f_t=`${H4e}, ${U4e}, */*`,ZV=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(i,e,n,r){this.url=e,this.method=i.toUpperCase();let o;if(m_t(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Nn(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new Tk,this.context??=new tte,!this.params)this.params=new Vo,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),m=c===-1?"?":cIe.set(ye,i.setHeaders[ye]),ne)),i.setParams&&(me=Object.keys(i.setParams).reduce((Ie,ye)=>Ie.set(ye,i.setParams[ye]),me)),new t(e,n,H,{params:me,headers:ne,context:Te,reportProgress:K,responseType:r,withCredentials:j,transferCache:R,keepalive:o,cache:c,priority:a,timeout:z,mode:m,redirect:g,credentials:C,referrer:w,integrity:P})}},Rx=(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})(Rx||{}),e4=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new Tk,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.ok=this.status>=200&&this.status<300}},ite=class t extends e4{constructor(i={}){super(i)}type=Rx.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},Xj=class t extends e4{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=Rx.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected})}},XV=class extends e4{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},g_t=200,__t=204;function Uye(t,i){return{body:i,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 no=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,r={}){let o;if(e instanceof ZV)o=e;else{let m;r.headers instanceof Tk?m=r.headers:m=new Tk(r.headers);let g;r.params&&(r.params instanceof Vo?g=r.params:g=new Vo({fromObject:r.params})),o=new ZV(e,n,r.body!==void 0?r.body:null,{headers:m,context:r.context,params:g,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let a=$t(o).pipe(Uh(m=>this.handler.handle(m)));if(e instanceof ZV||r.observe==="events")return a;let c=a.pipe(vn(m=>m instanceof Xj));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(ot(m=>{if(m.body!==null&&!(m.body instanceof ArrayBuffer))throw new Nn(2806,!1);return m.body}));case"blob":return c.pipe(ot(m=>{if(m.body!==null&&!(m.body instanceof Blob))throw new Nn(2807,!1);return m.body}));case"text":return c.pipe(ot(m=>{if(m.body!==null&&typeof m.body!="string")throw new Nn(2808,!1);return m.body}));case"json":default:return c.pipe(ot(m=>m.body))}case"response":return c;default:throw new Nn(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new Vo().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,r={}){return this.request("PATCH",e,Uye(r,n))}post(e,n,r={}){return this.request("POST",e,Uye(r,n))}put(e,n,r={}){return this.request("PUT",e,Uye(r,n))}static \u0275fac=function(n){return new(n||t)(ai(JV))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var y_t=new Mi("");function G4e(t,i){return i(t)}function v_t(t,i){return(e,n)=>i.intercept(e,{handle:r=>t(r,n)})}function b_t(t,i,e){return(n,r)=>Gh(e,()=>i(n,o=>t(o,r)))}var rte=new Mi(""),Gye=new Mi(""),j4e=new Mi(""),jye=new Mi("",{providedIn:"root",factory:()=>!0});function C_t(){let t=null;return(i,e)=>{t===null&&(t=(ae(rte,{optional:!0})??[]).reduceRight(v_t,G4e));let n=ae(AV);if(ae(jye)){let o=n.add();return t(i,e).pipe(LS(o))}else return t(i,e)}}var nte=(()=>{class t extends JV{backend;injector;chain=null;pendingTasks=ae(AV);contributeToStability=ae(jye);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Gye),...this.injector.get(j4e,[])]));this.chain=n.reduceRight((r,o)=>b_t(r,o,this.injector),G4e)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(LS(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(ai(Zj),ai(_d))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var x_t=/^\)\]\}',?\n/,S_t=RegExp(`^${z4e}:`,"m");function w_t(t){return"responseURL"in t&&t.responseURL?t.responseURL:S_t.test(t.getAllResponseHeaders())?t.getResponseHeader(z4e):null}var Hye=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new Nn(-2800,!1);let n=this.xhrFactory;return $t(null).pipe(On(()=>new qo(o=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((j,K)=>a.setRequestHeader(j,K.join(","))),e.headers.has(B4e)||a.setRequestHeader(B4e,f_t),!e.headers.has(L4e)){let j=e.detectContentTypeHeader();j!==null&&a.setRequestHeader(L4e,j)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let j=e.responseType.toLowerCase();a.responseType=j!=="json"?j:"text"}let c=e.serializeBody(),m=null,g=()=>{if(m!==null)return m;let j=a.statusText||"OK",K=new Tk(a.getAllResponseHeaders()),ne=w_t(a)||e.url;return m=new ite({headers:K,status:a.status,statusText:j,url:ne}),m},C=()=>{let{headers:j,status:K,statusText:ne,url:me}=g(),Te=null;K!==__t&&(Te=typeof a.response>"u"?a.responseText:a.response),K===0&&(K=Te?g_t:0);let Ie=K>=200&&K<300;if(e.responseType==="json"&&typeof Te=="string"){let ye=Te;Te=Te.replace(x_t,"");try{Te=Te!==""?JSON.parse(Te):null}catch(fe){Te=ye,Ie&&(Ie=!1,Te={error:fe,text:Te})}}Ie?(o.next(new Xj({body:Te,headers:j,status:K,statusText:ne,url:me||void 0})),o.complete()):o.error(new XV({error:Te,headers:j,status:K,statusText:ne,url:me||void 0}))},w=j=>{let{url:K}=g(),ne=new XV({error:j,status:a.status||0,statusText:a.statusText||"Unknown Error",url:K||void 0});o.error(ne)},P=w;e.timeout&&(P=j=>{let{url:K}=g(),ne=new XV({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:K||void 0});o.error(ne)});let R=!1,z=j=>{R||(o.next(g()),R=!0);let K={type:Rx.DownloadProgress,loaded:j.loaded};j.lengthComputable&&(K.total=j.total),e.responseType==="text"&&a.responseText&&(K.partialText=a.responseText),o.next(K)},H=j=>{let K={type:Rx.UploadProgress,loaded:j.loaded};j.lengthComputable&&(K.total=j.total),o.next(K)};return a.addEventListener("load",C),a.addEventListener("error",w),a.addEventListener("timeout",P),a.addEventListener("abort",w),e.reportProgress&&(a.addEventListener("progress",z),c!==null&&a.upload&&a.upload.addEventListener("progress",H)),a.send(c),o.next({type:Rx.Sent}),()=>{a.removeEventListener("error",w),a.removeEventListener("abort",w),a.removeEventListener("load",C),a.removeEventListener("timeout",P),e.reportProgress&&(a.removeEventListener("progress",z),c!==null&&a.upload&&a.upload.removeEventListener("progress",H)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(ai(yP))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),$4e=new Mi(""),I_t="XSRF-TOKEN",T_t=new Mi("",{providedIn:"root",factory:()=>I_t}),E_t="X-XSRF-TOKEN",A_t=new Mi("",{providedIn:"root",factory:()=>E_t}),Jj=class{},D_t=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=jj(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(ai(Gr),ai(T_t))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function k_t(t,i){let e=t.url.toLowerCase();if(!ae($4e)||t.method==="GET"||t.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return i(t);let n=ae(Jj).getToken(),r=ae(A_t);return n!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,n)})),i(t)}var $ye=(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})($ye||{});function M_t(t,i){return{\u0275kind:t,\u0275providers:i}}function qye(...t){let i=[no,Hye,nte,{provide:JV,useExisting:nte},{provide:Zj,useFactory:()=>ae(y_t,{optional:!0})??ae(Hye)},{provide:Gye,useValue:k_t,multi:!0},{provide:$4e,useValue:!0},{provide:Jj,useClass:D_t}];for(let e of t)i.push(...e.\u0275providers);return zS(i)}var V4e=new Mi("");function Yye(){return M_t($ye.LegacyInterceptors,[{provide:V4e,useFactory:C_t},{provide:Gye,useExisting:V4e,multi:!0}])}var ote=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(ai(Gr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var vP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:function(n){let r=null;return n?r=new(n||t):r=ai(O_t),r},providedIn:"root"})}return t})(),O_t=(()=>{class t extends vP{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case jh.NONE:return n;case jh.HTML:return KS(n,"HTML")?W0(n):dee(this._doc,String(n)).toString();case jh.STYLE:return KS(n,"Style")?W0(n):n;case jh.SCRIPT:if(KS(n,"Script"))return W0(n);throw new Nn(5200,!1);case jh.URL:return KS(n,"URL")?W0(n):GV(String(n));case jh.RESOURCE_URL:if(KS(n,"ResourceURL"))return W0(n);throw new Nn(5201,!1);default:throw new Nn(5202,!1)}}bypassSecurityTrustHtml(e){return r0e(e)}bypassSecurityTrustStyle(e){return o0e(e)}bypassSecurityTrustScript(e){return a0e(e)}bypassSecurityTrustUrl(e){return s0e(e)}bypassSecurityTrustResourceUrl(e){return l0e(e)}static \u0275fac=function(n){return new(n||t)(ai(Gr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var el="primary",p7=Symbol("RouteTitle"),Xye=class{params;constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function xP(t){return new Xye(t)}function J4e(t,i,e){let n=e.path.split("/");if(n.length>t.length||e.pathMatch==="full"&&(i.hasChildren()||n.lengthn[o]===r)}else return t===i}function tze(t){return t.length>0?t[t.length-1]:null}function jT(t){return mV(t)?t:zT(t)?Hr(Promise.resolve(t)):$t(t)}var P_t={exact:nze,subset:rze},ize={exact:N_t,subset:F_t,ignored:()=>!0};function q4e(t,i,e){return P_t[e.paths](t.root,i.root,e.matrixParams)&&ize[e.queryParams](t.queryParams,i.queryParams)&&!(e.fragment==="exact"&&t.fragment!==i.fragment)}function N_t(t,i){return QS(t,i)}function nze(t,i,e){if(!bP(t.segments,i.segments)||!cte(t.segments,i.segments,e)||t.numberOfChildren!==i.numberOfChildren)return!1;for(let n in i.children)if(!t.children[n]||!nze(t.children[n],i.children[n],e))return!1;return!0}function F_t(t,i){return Object.keys(i).length<=Object.keys(t).length&&Object.keys(i).every(e=>eze(t[e],i[e]))}function rze(t,i,e){return oze(t,i,i.segments,e)}function oze(t,i,e,n){if(t.segments.length>e.length){let r=t.segments.slice(0,e.length);return!(!bP(r,e)||i.hasChildren()||!cte(r,e,n))}else if(t.segments.length===e.length){if(!bP(t.segments,e)||!cte(t.segments,e,n))return!1;for(let r in i.children)if(!t.children[r]||!rze(t.children[r],i.children[r],n))return!1;return!0}else{let r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!bP(t.segments,r)||!cte(t.segments,r,n)||!t.children[el]?!1:oze(t.children[el],i,o,n)}}function cte(t,i,e){return i.every((n,r)=>ize[e](t[r].parameters,n.parameters))}var XS=class{root;queryParams;fragment;_queryParamMap;constructor(i=new Kc([],{}),e={},n=null){this.root=i,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=xP(this.queryParams),this._queryParamMap}toString(){return V_t.serialize(this)}},Kc=class{segments;children;parent=null;constructor(i,e){this.segments=i,this.children=e,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dte(this)}},Ek=class{path;parameters;_parameterMap;constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap??=xP(this.parameters),this._parameterMap}toString(){return sze(this)}};function L_t(t,i){return bP(t,i)&&t.every((e,n)=>QS(e.parameters,i[n].parameters))}function bP(t,i){return t.length!==i.length?!1:t.every((e,n)=>e.path===i[n].path)}function B_t(t,i){let e=[];return Object.entries(t.children).forEach(([n,r])=>{n===el&&(e=e.concat(i(r,n)))}),Object.entries(t.children).forEach(([n,r])=>{n!==el&&(e=e.concat(i(r,n)))}),e}var SP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>new Ak,providedIn:"root"})}return t})(),Ak=class{parse(i){let e=new tve(i);return new XS(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){let e=`/${e7(i.root,!0)}`,n=H_t(i.queryParams),r=typeof i.fragment=="string"?`#${z_t(i.fragment)}`:"";return`${e}${n}${r}`}},V_t=new Ak;function dte(t){return t.segments.map(i=>sze(i)).join("/")}function e7(t,i){if(!t.hasChildren())return dte(t);if(i){let e=t.children[el]?e7(t.children[el],!1):"",n=[];return Object.entries(t.children).forEach(([r,o])=>{r!==el&&n.push(`${r}:${e7(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=B_t(t,(n,r)=>r===el?[e7(t.children[el],!1)]:[`${r}:${e7(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[el]!=null?`${dte(t)}/${e[0]}`:`${dte(t)}/(${e.join("//")})`}}function aze(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ste(t){return aze(t).replace(/%3B/gi,";")}function z_t(t){return encodeURI(t)}function eve(t){return aze(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ute(t){return decodeURIComponent(t)}function Y4e(t){return ute(t.replace(/\+/g,"%20"))}function sze(t){return`${eve(t.path)}${U_t(t.parameters)}`}function U_t(t){return Object.entries(t).map(([i,e])=>`;${eve(i)}=${eve(e)}`).join("")}function H_t(t){let i=Object.entries(t).map(([e,n])=>Array.isArray(n)?n.map(r=>`${ste(e)}=${ste(r)}`).join("&"):`${ste(e)}=${ste(n)}`).filter(e=>e);return i.length?`?${i.join("&")}`:""}var G_t=/^[^\/()?;#]+/;function Kye(t){let i=t.match(G_t);return i?i[0]:""}var j_t=/^[^\/()?;=#]+/;function $_t(t){let i=t.match(j_t);return i?i[0]:""}var q_t=/^[^=?&#]+/;function Y_t(t){let i=t.match(q_t);return i?i[0]:""}var K_t=/^[^&#]+/;function W_t(t){let i=t.match(K_t);return i?i[0]:""}var tve=class{url;remaining;constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Kc([],{}):new Kc([],this.parseChildren())}parseQueryParams(){let i={};if(this.consumeOptional("?"))do this.parseQueryParam(i);while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(e).length>0)&&(n[el]=new Kc(i,e)),n}parseSegment(){let i=Kye(this.remaining);if(i===""&&this.peekStartsWith(";"))throw new Nn(4009,!1);return this.capture(i),new Ek(ute(i),this.parseMatrixParams())}parseMatrixParams(){let i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){let e=$_t(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let r=Kye(this.remaining);r&&(n=r,this.capture(n))}i[ute(e)]=ute(n)}parseQueryParam(i){let e=Y_t(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let a=W_t(this.remaining);a&&(n=a,this.capture(n))}let r=Y4e(e),o=Y4e(n);if(i.hasOwnProperty(r)){let a=i[r];Array.isArray(a)||(a=[a],i[r]=a),a.push(o)}else i[r]=o}parseParens(i){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=Kye(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new Nn(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):i&&(o=el);let a=this.parseChildren();e[o]=Object.keys(a).length===1?a[el]:new Kc([],a),this.consumeOptional("//")}return e}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return this.peekStartsWith(i)?(this.remaining=this.remaining.substring(i.length),!0):!1}capture(i){if(!this.consumeOptional(i))throw new Nn(4011,!1)}};function lze(t){return t.segments.length>0?new Kc([],{[el]:t}):t}function cze(t){let i={};for(let[n,r]of Object.entries(t.children)){let o=cze(r);if(n===el&&o.segments.length===0&&o.hasChildren())for(let[a,c]of Object.entries(o.children))i[a]=c;else(o.segments.length>0||o.hasChildren())&&(i[n]=o)}let e=new Kc(t.segments,i);return Q_t(e)}function Q_t(t){if(t.numberOfChildren===1&&t.children[el]){let i=t.children[el];return new Kc(t.segments.concat(i.segments),i.children)}return t}function Dk(t){return t instanceof XS}function dze(t,i,e=null,n=null){let r=uze(t);return pze(r,i,e,n)}function uze(t){let i;function e(o){let a={};for(let m of o.children){let g=e(m);a[m.outlet]=g}let c=new Kc(o.url,a);return o===t&&(i=c),c}let n=e(t.root),r=lze(n);return i??r}function pze(t,i,e,n){let r=t;for(;r.parent;)r=r.parent;if(i.length===0)return Wye(r,r,r,e,n);let o=Z_t(i);if(o.toRoot())return Wye(r,r,new Kc([],{}),e,n);let a=X_t(o,r,t),c=a.processChildren?i7(a.segmentGroup,a.index,o.commands):hze(a.segmentGroup,a.index,o.commands);return Wye(r,a.segmentGroup,c,e,n)}function pte(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function r7(t){return typeof t=="object"&&t!=null&&t.outlets}function Wye(t,i,e,n,r){let o={};n&&Object.entries(n).forEach(([m,g])=>{o[m]=Array.isArray(g)?g.map(C=>`${C}`):`${g}`});let a;t===i?a=e:a=mze(t,i,e);let c=lze(cze(a));return new XS(c,o,r)}function mze(t,i,e){let n={};return Object.entries(t.children).forEach(([r,o])=>{o===i?n[r]=e:n[r]=mze(o,i,e)}),new Kc(t.segments,n)}var mte=class{isAbsolute;numberOfDoubleDots;commands;constructor(i,e,n){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=n,i&&n.length>0&&pte(n[0]))throw new Nn(4003,!1);let r=n.find(r7);if(r&&r!==tze(n))throw new Nn(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Z_t(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new mte(!0,0,t);let i=0,e=!1,n=t.reduce((r,o,a)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let c={};return Object.entries(o.outlets).forEach(([m,g])=>{c[m]=typeof g=="string"?g.split("/"):g}),[...r,{outlets:c}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:a===0?(o.split("/").forEach((c,m)=>{m==0&&c==="."||(m==0&&c===""?e=!0:c===".."?i++:c!=""&&r.push(c))}),r):[...r,o]},[]);return new mte(e,i,n)}var n4=class{segmentGroup;processChildren;index;constructor(i,e,n){this.segmentGroup=i,this.processChildren=e,this.index=n}};function X_t(t,i,e){if(t.isAbsolute)return new n4(i,!0,0);if(!e)return new n4(i,!1,NaN);if(e.parent===null)return new n4(e,!0,0);let n=pte(t.commands[0])?0:1,r=e.segments.length-1+n;return J_t(e,r,t.numberOfDoubleDots)}function J_t(t,i,e){let n=t,r=i,o=e;for(;o>r;){if(o-=r,n=n.parent,!n)throw new Nn(4005,!1);r=n.segments.length}return new n4(n,!1,r-o)}function e0t(t){return r7(t[0])?t[0].outlets:{[el]:t}}function hze(t,i,e){if(t??=new Kc([],{}),t.segments.length===0&&t.hasChildren())return i7(t,i,e);let n=t0t(t,i,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndexo!==el)&&t.children[el]&&t.numberOfChildren===1&&t.children[el].segments.length===0){let o=i7(t.children[el],i,e);return new Kc(t.segments,o.children)}return Object.entries(n).forEach(([o,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(r[o]=hze(t.children[o],i,a))}),Object.entries(t.children).forEach(([o,a])=>{n[o]===void 0&&(r[o]=a)}),new Kc(t.segments,r)}}function t0t(t,i,e){let n=0,r=i,o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;let a=t.segments[r],c=e[n];if(r7(c))break;let m=`${c}`,g=n0&&m===void 0)break;if(m&&g&&typeof g=="object"&&g.outlets===void 0){if(!W4e(m,g,a))return o;n+=2}else{if(!W4e(m,{},a))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function ive(t,i,e){let n=t.segments.slice(0,i),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(i[e]=ive(new Kc([],{}),0,n))}),i}function K4e(t){let i={};return Object.entries(t).forEach(([e,n])=>i[e]=`${n}`),i}function W4e(t,i,e){return t==e.path&&QS(i,e.parameters)}var r4="imperative",sh=(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})(sh||{}),gv=class{id;url;constructor(i,e){this.id=i,this.url=e}},kk=class extends gv{type=sh.NavigationStart;navigationTrigger;restoredState;constructor(i,e,n="imperative",r=null){super(i,e),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},qf=class extends gv{urlAfterRedirects;type=sh.NavigationEnd;constructor(i,e,n){super(i,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},z_=(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})(z_||{}),a4=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(a4||{}),ZS=class extends gv{reason;code;type=sh.NavigationCancel;constructor(i,e,n,r){super(i,e),this.reason=n,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},JS=class extends gv{reason;code;type=sh.NavigationSkipped;constructor(i,e,n,r){super(i,e),this.reason=n,this.code=r}},s4=class extends gv{error;target;type=sh.NavigationError;constructor(i,e,n,r){super(i,e),this.error=n,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},o7=class extends gv{urlAfterRedirects;state;type=sh.RoutesRecognized;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},hte=class extends gv{urlAfterRedirects;state;type=sh.GuardsCheckStart;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},fte=class extends gv{urlAfterRedirects;state;shouldActivate;type=sh.GuardsCheckEnd;constructor(i,e,n,r,o){super(i,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},gte=class extends gv{urlAfterRedirects;state;type=sh.ResolveStart;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_te=class extends gv{urlAfterRedirects;state;type=sh.ResolveEnd;constructor(i,e,n,r){super(i,e),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},yte=class{route;type=sh.RouteConfigLoadStart;constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},vte=class{route;type=sh.RouteConfigLoadEnd;constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},bte=class{snapshot;type=sh.ChildActivationStart;constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Cte=class{snapshot;type=sh.ChildActivationEnd;constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},xte=class{snapshot;type=sh.ActivationStart;constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},l4=class{snapshot;type=sh.ActivationEnd;constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},c4=class{routerEvent;position;anchor;type=sh.Scroll;constructor(i,e,n){this.routerEvent=i,this.position=e,this.anchor=n}toString(){let i=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${i}')`}},a7=class{},d4=class{url;navigationBehaviorOptions;constructor(i,e){this.url=i,this.navigationBehaviorOptions=e}};function n0t(t){return!(t instanceof a7)&&!(t instanceof d4)}function r0t(t,i){return t.providers&&!t._injector&&(t._injector=$V(t.providers,i,`Route: ${t.path}`)),t._injector??i}function Px(t){return t.outlet||el}function o0t(t,i){let e=t.filter(n=>Px(n)===i);return e.push(...t.filter(n=>Px(n)!==i)),e}function m4(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let i=t.parent;i;i=i.parent){let e=i.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Ste=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return m4(this.route?.snapshot)??this.rootInjector}constructor(i){this.rootInjector=i,this.children=new wP(this.rootInjector)}},wP=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,n){let r=this.getOrCreateContext(e);r.outlet=n,this.contexts.set(e,r)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new Ste(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(n){return new(n||t)(ai(_d))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),wte=class{_root;constructor(i){this._root=i}get root(){return this._root.value}parent(i){let e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){let e=nve(i,this._root);return e?e.children.map(n=>n.value):[]}firstChild(i){let e=nve(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){let e=rve(i,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==i)}pathFromRoot(i){return rve(i,this._root).map(e=>e.value)}};function nve(t,i){if(t===i.value)return i;for(let e of i.children){let n=nve(t,e);if(n)return n}return null}function rve(t,i){if(t===i.value)return[i];for(let e of i.children){let n=rve(t,e);if(n.length)return n.unshift(i),n}return[]}var fv=class{value;children;constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}};function i4(t){let i={};return t&&t.children.forEach(e=>i[e.value.outlet]=e),i}var s7=class extends wte{snapshot;constructor(i,e){super(i),this.snapshot=e,pve(this,i)}toString(){return this.snapshot.toString()}};function fze(t){let i=a0t(t),e=new Sa([new Ek("",{})]),n=new Sa({}),r=new Sa({}),o=new Sa({}),a=new Sa(""),c=new id(e,n,o,a,r,el,t,i.root);return c.snapshot=i.root,new s7(new fv(c,[]),i)}function a0t(t){let i={},e={},n={},o=new CP([],i,n,"",e,el,t,null,{});return new l7("",new fv(o,[]))}var id=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(i,e,n,r,o,a,c,m){this.urlSubject=i,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=a,this.component=c,this._futureSnapshot=m,this.title=this.dataSubject?.pipe(ot(g=>g[p7]))??$t(void 0),this.url=i,this.params=e,this.queryParams=n,this.fragment=r,this.data=o}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(ot(i=>xP(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ot(i=>xP(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ite(t,i,e="emptyOnly"){let n,{routeConfig:r}=t;return i!==null&&(e==="always"||r?.path===""||!i.component&&!i.routeConfig?.loadComponent)?n={params:pe(pe({},i.params),t.params),data:pe(pe({},i.data),t.data),resolve:pe(pe(pe(pe({},t.data),i.data),r?.data),t._resolvedData)}:n={params:pe({},t.params),data:pe({},t.data),resolve:pe(pe({},t.data),t._resolvedData??{})},r&&_ze(r)&&(n.resolve[p7]=r.title),n}var CP=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[p7]}constructor(i,e,n,r,o,a,c,m,g){this.url=i,this.params=e,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=a,this.component=c,this.routeConfig=m,this._resolve=g}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??=xP(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=xP(this.queryParams),this._queryParamMap}toString(){let i=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${i}', path:'${e}')`}},l7=class extends wte{url;constructor(i,e){super(e),this.url=i,pve(this,e)}toString(){return gze(this._root)}};function pve(t,i){i.value._routerState=t,i.children.forEach(e=>pve(t,e))}function gze(t){let i=t.children.length>0?` { ${t.children.map(gze).join(", ")} } `:"";return`${t.value}${i}`}function Qye(t){if(t.snapshot){let i=t.snapshot,e=t._futureSnapshot;t.snapshot=e,QS(i.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),i.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),QS(i.params,e.params)||t.paramsSubject.next(e.params),R_t(i.url,e.url)||t.urlSubject.next(e.url),QS(i.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function ove(t,i){let e=QS(t.params,i.params)&&L_t(t.url,i.url),n=!t.parent!=!i.parent;return e&&!n&&(!t.parent||ove(t.parent,i.parent))}function _ze(t){return typeof t.title=="string"||t.title===null}var yze=new Mi(""),m7=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=el;activateEvents=new ve;deactivateEvents=new ve;attachEvents=new ve;detachEvents=new ve;routerOutletData=kr(void 0);parentContexts=ae(wP);location=ae($l);changeDetector=ae(dn);inputBinder=ae(h7,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:r}=e.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),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 Nn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Nn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Nn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,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,n){if(this.isActivated)throw new Nn(4013,!1);this._activatedRoute=e;let r=this.location,a=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,m=new ave(e,c,r.injector,this.routerOutletData);this.activated=r.createComponent(a,{index:r.length,injector:m,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Yt]})}return t})(),ave=class{route;childContexts;parent;outletData;constructor(i,e,n,r){this.route=i,this.childContexts=e,this.parent=n,this.outletData=r}get(i,e){return i===id?this.route:i===wP?this.childContexts:i===yze?this.outletData:this.parent.get(i,e)}},h7=new Mi(""),mve=(()=>{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:n}=e,r=Ec([n.queryParams,n.params,n.data]).pipe(On(([o,a,c],m)=>(c=pe(pe(pe({},o),a),c),m===0?$t(c):Promise.resolve(c)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(e);return}let a=Pee(n.component);if(!a){this.unsubscribeFromRouteData(e);return}for(let{templateName:c}of a.inputs)e.activatedComponentRef.setInput(c,o[c])});this.outletDataSubscriptions.set(e,r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),hve=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,r){n&1&&be(0,"router-outlet")},dependencies:[m7],encapsulation:2})}return t})();function fve(t){let i=t.children&&t.children.map(fve),e=i?$e(pe({},t),{children:i}):pe({},t);return!e.component&&!e.loadComponent&&(i||e.loadChildren)&&e.outlet&&e.outlet!==el&&(e.component=hve),e}function s0t(t,i,e){let n=c7(t,i._root,e?e._root:void 0);return new s7(n,i)}function c7(t,i,e){if(e&&t.shouldReuseRoute(i.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=i.value;let r=l0t(t,i,e);return new fv(n,r)}else{if(t.shouldAttach(i.value)){let o=t.retrieve(i.value);if(o!==null){let a=o.route;return a.value._futureSnapshot=i.value,a.children=i.children.map(c=>c7(t,c)),a}}let n=c0t(i.value),r=i.children.map(o=>c7(t,o));return new fv(n,r)}}function l0t(t,i,e){return i.children.map(n=>{for(let r of e.children)if(t.shouldReuseRoute(n.value,r.value.snapshot))return c7(t,n,r);return c7(t,n)})}function c0t(t){return new id(new Sa(t.url),new Sa(t.params),new Sa(t.queryParams),new Sa(t.fragment),new Sa(t.data),t.outlet,t.component,t)}var u4=class{redirectTo;navigationBehaviorOptions;constructor(i,e){this.redirectTo=i,this.navigationBehaviorOptions=e}},vze="ngNavigationCancelingError";function Tte(t,i){let{redirectTo:e,navigationBehaviorOptions:n}=Dk(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,r=bze(!1,z_.Redirect);return r.url=e,r.navigationBehaviorOptions=n,r}function bze(t,i){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[vze]=!0,e.cancellationCode=i,e}function d0t(t){return Cze(t)&&Dk(t.url)}function Cze(t){return!!t&&t[vze]}var u0t=(t,i,e,n)=>ot(r=>(new sve(i,r.targetRouterState,r.currentRouterState,e,n).activate(t),r)),sve=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(i,e,n,r,o){this.routeReuseStrategy=i,this.futureState=e,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(i){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,i),Qye(this.futureState.root),this.activateChildRoutes(e,n,i)}deactivateChildRoutes(i,e,n){let r=i4(e);i.children.forEach(o=>{let a=o.value.outlet;this.deactivateRoutes(o,r[a],n),delete r[a]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(i,e,n){let r=i.value,o=e?e.value:null;if(r===o)if(r.component){let a=n.getContext(r.outlet);a&&this.deactivateChildRoutes(i,e,a.children)}else this.deactivateChildRoutes(i,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){let n=e.getContext(i.value.outlet),r=n&&i.value.component?n.children:e,o=i4(i);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,r);if(n&&n.outlet){let a=n.outlet.detach(),c=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:a,route:i,contexts:c})}}deactivateRouteAndOutlet(i,e){let n=e.getContext(i.value.outlet),r=n&&i.value.component?n.children:e,o=i4(i);for(let a of Object.values(o))this.deactivateRouteAndItsChildren(a,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,e,n){let r=i4(e);i.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new l4(o.value.snapshot))}),i.children.length&&this.forwardEvent(new Cte(i.value.snapshot))}activateRoutes(i,e,n){let r=i.value,o=e?e.value:null;if(Qye(r),r===o)if(r.component){let a=n.getOrCreateContext(r.outlet);this.activateChildRoutes(i,e,a.children)}else this.activateChildRoutes(i,e,n);else if(r.component){let a=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let c=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),Qye(c.route.value),this.activateChildRoutes(i,null,a.children)}else a.attachRef=null,a.route=r,a.outlet&&a.outlet.activateWith(r,a.injector),this.activateChildRoutes(i,null,a.children)}else this.activateChildRoutes(i,null,n)}},Ete=class{path;route;constructor(i){this.path=i,this.route=this.path[this.path.length-1]}},o4=class{component;route;constructor(i,e){this.component=i,this.route=e}};function p0t(t,i,e){let n=t._root,r=i?i._root:null;return t7(n,r,e,[n.value])}function m0t(t){let i=t.routeConfig?t.routeConfig.canActivateChild:null;return!i||i.length===0?null:{node:t,guards:i}}function h4(t,i){let e=Symbol(),n=i.get(t,e);return n===e?typeof t=="function"&&!sge(t)?t:i.get(t):n}function t7(t,i,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i4(i);return t.children.forEach(a=>{h0t(a,o[a.value.outlet],e,n.concat([a.value]),r),delete o[a.value.outlet]}),Object.entries(o).forEach(([a,c])=>n7(c,e.getContext(a),r)),r}function h0t(t,i,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,a=i?i.value:null,c=e?e.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){let m=f0t(a,o,o.routeConfig.runGuardsAndResolvers);m?r.canActivateChecks.push(new Ete(n)):(o.data=a.data,o._resolvedData=a._resolvedData),o.component?t7(t,i,c?c.children:null,n,r):t7(t,i,e,n,r),m&&c&&c.outlet&&c.outlet.isActivated&&r.canDeactivateChecks.push(new o4(c.outlet.component,a))}else a&&n7(i,c,r),r.canActivateChecks.push(new Ete(n)),o.component?t7(t,null,c?c.children:null,n,r):t7(t,null,e,n,r);return r}function f0t(t,i,e){if(typeof e=="function")return e(t,i);switch(e){case"pathParamsChange":return!bP(t.url,i.url);case"pathParamsOrQueryParamsChange":return!bP(t.url,i.url)||!QS(t.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ove(t,i)||!QS(t.queryParams,i.queryParams);case"paramsChange":default:return!ove(t,i)}}function n7(t,i,e){let n=i4(t),r=t.value;Object.entries(n).forEach(([o,a])=>{r.component?i?n7(a,i.children.getContext(o),e):n7(a,null,e):n7(a,i,e)}),r.component?i&&i.outlet&&i.outlet.isActivated?e.canDeactivateChecks.push(new o4(i.outlet.component,r)):e.canDeactivateChecks.push(new o4(null,r)):e.canDeactivateChecks.push(new o4(null,r))}function f7(t){return typeof t=="function"}function g0t(t){return typeof t=="boolean"}function _0t(t){return t&&f7(t.canLoad)}function y0t(t){return t&&f7(t.canActivate)}function v0t(t){return t&&f7(t.canActivateChild)}function b0t(t){return t&&f7(t.canDeactivate)}function C0t(t){return t&&f7(t.canMatch)}function xze(t){return t instanceof Cx||t?.name==="EmptyError"}var lte=Symbol("INITIAL_VALUE");function p4(){return On(t=>Ec(t.map(i=>i.pipe(ar(1),ks(lte)))).pipe(ot(i=>{for(let e of i)if(e!==!0){if(e===lte)return lte;if(e===!1||x0t(e))return e}return!0}),vn(i=>i!==lte),ar(1)))}function x0t(t){return Dk(t)||t instanceof u4}function S0t(t,i){return ps(e=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:a}}=e;return a.length===0&&o.length===0?$t($e(pe({},e),{guardsResult:!0})):w0t(a,n,r,t).pipe(ps(c=>c&&g0t(c)?I0t(n,o,t,i):$t(c)),ot(c=>$e(pe({},e),{guardsResult:c})))})}function w0t(t,i,e,n){return Hr(t).pipe(ps(r=>k0t(r.component,r.route,e,i,n)),q0(r=>r!==!0,!0))}function I0t(t,i,e,n){return Hr(i).pipe(Uh(r=>FS(E0t(r.route.parent,n),T0t(r.route,n),D0t(t,r.path,e),A0t(t,r.route,e))),q0(r=>r!==!0,!0))}function T0t(t,i){return t!==null&&i&&i(new xte(t)),$t(!0)}function E0t(t,i){return t!==null&&i&&i(new bte(t)),$t(!0)}function A0t(t,i,e){let n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||n.length===0)return $t(!0);let r=n.map(o=>lv(()=>{let a=m4(i)??e,c=h4(o,a),m=y0t(c)?c.canActivate(i,t):Gh(a,()=>c(i,t));return jT(m).pipe(q0())}));return $t(r).pipe(p4())}function D0t(t,i,e){let n=i[i.length-1],o=i.slice(0,i.length-1).reverse().map(a=>m0t(a)).filter(a=>a!==null).map(a=>lv(()=>{let c=a.guards.map(m=>{let g=m4(a.node)??e,C=h4(m,g),w=v0t(C)?C.canActivateChild(n,t):Gh(g,()=>C(n,t));return jT(w).pipe(q0())});return $t(c).pipe(p4())}));return $t(o).pipe(p4())}function k0t(t,i,e,n,r){let o=i&&i.routeConfig?i.routeConfig.canDeactivate:null;if(!o||o.length===0)return $t(!0);let a=o.map(c=>{let m=m4(i)??r,g=h4(c,m),C=b0t(g)?g.canDeactivate(t,i,e,n):Gh(m,()=>g(t,i,e,n));return jT(C).pipe(q0())});return $t(a).pipe(p4())}function M0t(t,i,e,n){let r=i.canLoad;if(r===void 0||r.length===0)return $t(!0);let o=r.map(a=>{let c=h4(a,t),m=_0t(c)?c.canLoad(i,e):Gh(t,()=>c(i,e));return jT(m)});return $t(o).pipe(p4(),Sze(n))}function Sze(t){return Ffe(yo(i=>{if(typeof i!="boolean")throw Tte(t,i)}),ot(i=>i===!0))}function O0t(t,i,e,n){let r=i.canMatch;if(!r||r.length===0)return $t(!0);let o=r.map(a=>{let c=h4(a,t),m=C0t(c)?c.canMatch(i,e):Gh(t,()=>c(i,e));return jT(m)});return $t(o).pipe(p4(),Sze(n))}var d7=class{segmentGroup;constructor(i){this.segmentGroup=i||null}},u7=class extends Error{urlTree;constructor(i){super(),this.urlTree=i}};function t4(t){return NS(new d7(t))}function R0t(t){return NS(new Nn(4e3,!1))}function P0t(t){return NS(bze(!1,z_.GuardRejected))}var lve=class{urlSerializer;urlTree;constructor(i,e){this.urlSerializer=i,this.urlTree=e}lineralizeSegments(i,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return $t(n);if(r.numberOfChildren>1||!r.children[el])return R0t(`${i.redirectTo}`);r=r.children[el]}}applyRedirectCommands(i,e,n,r,o){return N0t(e,r,o).pipe(ot(a=>{if(a instanceof XS)throw new u7(a);let c=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),i,n);if(a[0]==="/")throw new u7(c);return c}))}applyRedirectCreateUrlTree(i,e,n,r){let o=this.createSegmentGroup(i,e.root,n,r);return new XS(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){let n={};return Object.entries(i).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let c=o.substring(1);n[r]=e[c]}else n[r]=o}),n}createSegmentGroup(i,e,n,r){let o=this.createSegments(i,e.segments,n,r),a={};return Object.entries(e.children).forEach(([c,m])=>{a[c]=this.createSegmentGroup(i,m,n,r)}),new Kc(o,a)}createSegments(i,e,n,r){return e.map(o=>o.path[0]===":"?this.findPosParam(i,o,r):this.findOrReturn(o,n))}findPosParam(i,e,n){let r=n[e.path.substring(1)];if(!r)throw new Nn(4001,!1);return r}findOrReturn(i,e){let n=0;for(let r of e){if(r.path===i.path)return e.splice(n),r;n++}return i}};function N0t(t,i,e){if(typeof t=="string")return $t(t);let n=t,{queryParams:r,fragment:o,routeConfig:a,url:c,outlet:m,params:g,data:C,title:w}=i;return jT(Gh(e,()=>n({params:g,data:C,queryParams:r,fragment:o,routeConfig:a,url:c,outlet:m,title:w})))}var cve={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function F0t(t,i,e,n,r){let o=wze(t,i,e);return o.matched?(n=r0t(i,n),O0t(n,i,e,r).pipe(ot(a=>a===!0?o:pe({},cve)))):$t(o)}function wze(t,i,e){if(i.path==="**")return L0t(e);if(i.path==="")return i.pathMatch==="full"&&(t.hasChildren()||e.length>0)?pe({},cve):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(i.matcher||J4e)(e,t,i);if(!r)return pe({},cve);let o={};Object.entries(r.posParams??{}).forEach(([c,m])=>{o[c]=m.path});let a=r.consumed.length>0?pe(pe({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:a,positionalParamSegments:r.posParams??{}}}function L0t(t){return{matched:!0,parameters:t.length>0?tze(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Q4e(t,i,e,n){return e.length>0&&z0t(t,e,n)?{segmentGroup:new Kc(i,V0t(n,new Kc(e,t.children))),slicedSegments:[]}:e.length===0&&U0t(t,e,n)?{segmentGroup:new Kc(t.segments,B0t(t,e,n,t.children)),slicedSegments:e}:{segmentGroup:new Kc(t.segments,t.children),slicedSegments:e}}function B0t(t,i,e,n){let r={};for(let o of e)if(Dte(t,i,o)&&!n[Px(o)]){let a=new Kc([],{});r[Px(o)]=a}return pe(pe({},n),r)}function V0t(t,i){let e={};e[el]=i;for(let n of t)if(n.path===""&&Px(n)!==el){let r=new Kc([],{});e[Px(n)]=r}return e}function z0t(t,i,e){return e.some(n=>Dte(t,i,n)&&Px(n)!==el)}function U0t(t,i,e){return e.some(n=>Dte(t,i,n))}function Dte(t,i,e){return(t.hasChildren()||i.length>0)&&e.pathMatch==="full"?!1:e.path===""}function H0t(t,i,e){return i.length===0&&!t.children[e]}var dve=class{};function G0t(t,i,e,n,r,o,a="emptyOnly"){return new uve(t,i,e,n,r,a,o).recognize()}var j0t=31,uve=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(i,e,n,r,o,a,c){this.injector=i,this.configLoader=e,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.applyRedirects=new lve(this.urlSerializer,this.urlTree)}noMatchError(i){return new Nn(4002,`'${i.segmentGroup}'`)}recognize(){let i=Q4e(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(i).pipe(ot(({children:e,rootSnapshot:n})=>{let r=new fv(n,e),o=new l7("",r),a=dze(n,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(a),{state:o,tree:a}}))}match(i){let e=new CP([],Object.freeze({}),Object.freeze(pe({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),el,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,i,el,e).pipe(ot(n=>({children:n,rootSnapshot:e})),Ac(n=>{if(n instanceof u7)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof d7?this.noMatchError(n):n}))}processSegmentGroup(i,e,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(i,e,n,o):this.processSegment(i,e,n,n.segments,r,!0,o).pipe(ot(a=>a instanceof fv?[a]:[]))}processChildren(i,e,n,r){let o=[];for(let a of Object.keys(n.children))a==="primary"?o.unshift(a):o.push(a);return Hr(o).pipe(Uh(a=>{let c=n.children[a],m=o0t(e,a);return this.processSegmentGroup(i,m,c,a,r)}),Yfe((a,c)=>(a.push(...c),a)),P_(null),qfe(),ps(a=>{if(a===null)return t4(n);let c=Ize(a);return $0t(c),$t(c)}))}processSegment(i,e,n,r,o,a,c){return Hr(e).pipe(Uh(m=>this.processSegmentAgainstRoute(m._injector??i,e,m,n,r,o,a,c).pipe(Ac(g=>{if(g instanceof d7)return $t(null);throw g}))),q0(m=>!!m),Ac(m=>{if(xze(m))return H0t(n,r,o)?$t(new dve):t4(n);throw m}))}processSegmentAgainstRoute(i,e,n,r,o,a,c,m){return Px(n)!==a&&(a===el||!Dte(r,o,n))?t4(r):n.redirectTo===void 0?this.matchSegmentAgainstRoute(i,r,n,o,a,m):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(i,r,e,n,o,a,m):t4(r)}expandSegmentAgainstRouteUsingRedirect(i,e,n,r,o,a,c){let{matched:m,parameters:g,consumedSegments:C,positionalParamSegments:w,remainingSegments:P}=wze(e,r,o);if(!m)return t4(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>j0t&&(this.allowRedirects=!1));let R=new CP(o,g,Object.freeze(pe({},this.urlTree.queryParams)),this.urlTree.fragment,Z4e(r),Px(r),r.component??r._loadedComponent??null,r,X4e(r)),z=Ite(R,c,this.paramsInheritanceStrategy);return R.params=Object.freeze(z.params),R.data=Object.freeze(z.data),this.applyRedirects.applyRedirectCommands(C,r.redirectTo,w,R,i).pipe(On(j=>this.applyRedirects.lineralizeSegments(r,j)),ps(j=>this.processSegment(i,n,e,j.concat(P),a,!1,c)))}matchSegmentAgainstRoute(i,e,n,r,o,a){let c=F0t(e,n,r,i,this.urlSerializer);return n.path==="**"&&(e.children={}),c.pipe(On(m=>m.matched?(i=n._injector??i,this.getChildConfig(i,n,r).pipe(On(({routes:g})=>{let C=n._loadedInjector??i,{parameters:w,consumedSegments:P,remainingSegments:R}=m,z=new CP(P,w,Object.freeze(pe({},this.urlTree.queryParams)),this.urlTree.fragment,Z4e(n),Px(n),n.component??n._loadedComponent??null,n,X4e(n)),H=Ite(z,a,this.paramsInheritanceStrategy);z.params=Object.freeze(H.params),z.data=Object.freeze(H.data);let{segmentGroup:j,slicedSegments:K}=Q4e(e,P,R,g);if(K.length===0&&j.hasChildren())return this.processChildren(C,g,j,z).pipe(ot(me=>new fv(z,me)));if(g.length===0&&K.length===0)return $t(new fv(z,[]));let ne=Px(n)===o;return this.processSegment(C,g,j,K,ne?el:o,!0,z).pipe(ot(me=>new fv(z,me instanceof fv?[me]:[])))}))):t4(e)))}getChildConfig(i,e,n){return e.children?$t({routes:e.children,injector:i}):e.loadChildren?e._loadedRoutes!==void 0?$t({routes:e._loadedRoutes,injector:e._loadedInjector}):M0t(i,e,n,this.urlSerializer).pipe(ps(r=>r?this.configLoader.loadChildren(i,e).pipe(yo(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):P0t(e))):$t({routes:[],injector:i})}};function $0t(t){t.sort((i,e)=>i.value.outlet===el?-1:e.value.outlet===el?1:i.value.outlet.localeCompare(e.value.outlet))}function q0t(t){let i=t.value.routeConfig;return i&&i.path===""}function Ize(t){let i=[],e=new Set;for(let n of t){if(!q0t(n)){i.push(n);continue}let r=i.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),e.add(r)):i.push(n)}for(let n of e){let r=Ize(n.children);i.push(new fv(n.value,r))}return i.filter(n=>!e.has(n))}function Z4e(t){return t.data||{}}function X4e(t){return t.resolve||{}}function Y0t(t,i,e,n,r,o){return ps(a=>G0t(t,i,e,n,a.extractedUrl,r,o).pipe(ot(({state:c,tree:m})=>$e(pe({},a),{targetSnapshot:c,urlAfterRedirects:m}))))}function K0t(t,i){return ps(e=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return $t(e);let o=new Set(r.map(m=>m.route)),a=new Set;for(let m of o)if(!a.has(m))for(let g of Tze(m))a.add(g);let c=0;return Hr(a).pipe(Uh(m=>o.has(m)?W0t(m,n,t,i):(m.data=Ite(m,m.parent,t).resolve,$t(void 0))),yo(()=>c++),fV(1),ps(m=>c===a.size?$t(e):Xd))})}function Tze(t){let i=t.children.map(e=>Tze(e)).flat();return[t,...i]}function W0t(t,i,e,n){let r=t.routeConfig,o=t._resolve;return r?.title!==void 0&&!_ze(r)&&(o[p7]=r.title),lv(()=>(t.data=Ite(t,t.parent,e).resolve,Q0t(o,t,i,n).pipe(ot(a=>(t._resolvedData=a,t.data=pe(pe({},t.data),a),null)))))}function Q0t(t,i,e,n){let r=Jye(t);if(r.length===0)return $t({});let o={};return Hr(r).pipe(ps(a=>Z0t(t[a],i,e,n).pipe(q0(),yo(c=>{if(c instanceof u4)throw Tte(new Ak,c);o[a]=c}))),fV(1),ot(()=>o),Ac(a=>xze(a)?Xd:NS(a)))}function Z0t(t,i,e,n){let r=m4(i)??n,o=h4(t,r),a=o.resolve?o.resolve(i,e):Gh(r,()=>o(i,e));return jT(a)}function Zye(t){return On(i=>{let e=t(i);return e?Hr(e).pipe(ot(()=>i)):$t(i)})}var gve=(()=>{class t{buildTitle(e){let n,r=e.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(o=>o.outlet===el);return n}getResolvedTitleForRoute(e){return e.data[p7]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(Eze),providedIn:"root"})}return t})(),Eze=(()=>{class t extends gve{title;constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||t)(ai(ote))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Mk=new Mi("",{providedIn:"root",factory:()=>({})}),IP=new Mi(""),kte=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=ae(Q0e);loadComponent(e,n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return $t(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=jT(Gh(e,()=>n.loadComponent())).pipe(ot(Dze),On(kze),yo(a=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=a}),LS(()=>{this.componentLoaders.delete(n)})),o=new sV(r,()=>new Ai).pipe(aV());return this.componentLoaders.set(n,o),o}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return $t({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=Aze(n,this.compiler,e,this.onLoadEndListener).pipe(LS(()=>{this.childrenLoaders.delete(n)})),a=new sV(o,()=>new Ai).pipe(aV());return this.childrenLoaders.set(n,a),a}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Aze(t,i,e,n){return jT(Gh(e,()=>t.loadChildren())).pipe(ot(Dze),On(kze),ps(r=>r instanceof Cee||Array.isArray(r)?$t(r):Hr(i.compileModuleAsync(r))),ot(r=>{n&&n(t);let o,a,c=!1;return Array.isArray(r)?(a=r,c=!0):(o=r.create(e).injector,a=o.get(IP,[],{optional:!0,self:!0}).flat()),{routes:a.map(fve),injector:o}}))}function X0t(t){return t&&typeof t=="object"&&"default"in t}function Dze(t){return X0t(t)?t.default:t}function kze(t){return $t(t)}var Mte=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(J0t),providedIn:"root"})}return t})(),J0t=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_ve=new Mi(""),yve=new Mi("");function Mze(t,i,e){let n=t.get(yve),r=t.get(Gr);if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(g=>setTimeout(g));let o,a=new Promise(g=>{o=g}),c=r.startViewTransition(()=>(o(),eyt(t)));c.ready.catch(g=>{});let{onViewTransitionCreated:m}=n;return m&&Gh(t,()=>m({transition:c,from:i,to:e})),a}function eyt(t){return new Promise(i=>{Rd({read:()=>setTimeout(i)},{injector:t})})}var vve=new Mi(""),Ote=(()=>{class t{currentNavigation=hr(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new Ai;transitionAbortWithErrorSubject=new Ai;configLoader=ae(kte);environmentInjector=ae(_d);destroyRef=ae(F_);urlSerializer=ae(SP);rootContexts=ae(wP);location=ae(Lg);inputBindingEnabled=ae(h7,{optional:!0})!==null;titleStrategy=ae(gve);options=ae(Mk,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=ae(Mte);createViewTransition=ae(_ve,{optional:!0});navigationErrorHandler=ae(vve,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>$t(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=r=>this.events.next(new yte(r)),n=r=>this.events.next(new vte(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;Eu(()=>{this.transitions?.next($e(pe({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:n}))})}setupNavigations(e){return this.transitions=new Sa(null),this.transitions.pipe(vn(n=>n!==null),On(n=>{let r=!1;return $t(n).pipe(On(o=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",z_.SupersededByNewNavigation),Xd;this.currentTransition=n,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?$e(pe({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let a=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),c=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!a&&c!=="reload")return this.events.next(new JS(o.id,this.urlSerializer.serialize(o.rawUrl),"",a4.IgnoredSameUrlNavigation)),o.resolve(!1),Xd;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return $t(o).pipe(On(m=>(this.events.next(new kk(m.id,this.urlSerializer.serialize(m.extractedUrl),m.source,m.restoredState)),m.id!==this.navigationId?Xd:Promise.resolve(m))),Y0t(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),yo(m=>{n.targetSnapshot=m.targetSnapshot,n.urlAfterRedirects=m.urlAfterRedirects,this.currentNavigation.update(C=>(C.finalUrl=m.urlAfterRedirects,C));let g=new o7(m.id,this.urlSerializer.serialize(m.extractedUrl),this.urlSerializer.serialize(m.urlAfterRedirects),m.targetSnapshot);this.events.next(g)}));if(a&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:m,extractedUrl:g,source:C,restoredState:w,extras:P}=o,R=new kk(m,this.urlSerializer.serialize(g),C,w);this.events.next(R);let z=fze(this.rootComponentType).snapshot;return this.currentTransition=n=$e(pe({},o),{targetSnapshot:z,urlAfterRedirects:g,extras:$e(pe({},P),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(H=>(H.finalUrl=g,H)),$t(n)}else return this.events.next(new JS(o.id,this.urlSerializer.serialize(o.extractedUrl),"",a4.IgnoredByUrlHandlingStrategy)),o.resolve(!1),Xd}),yo(o=>{let a=new hte(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),ot(o=>(this.currentTransition=n=$e(pe({},o),{guards:p0t(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),n)),S0t(this.environmentInjector,o=>this.events.next(o)),yo(o=>{if(n.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Tte(this.urlSerializer,o.guardsResult);let a=new fte(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(a)}),vn(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",z_.GuardRejected),!1)),Zye(o=>{if(o.guards.canActivateChecks.length!==0)return $t(o).pipe(yo(a=>{let c=new gte(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}),On(a=>{let c=!1;return $t(a).pipe(K0t(this.paramsInheritanceStrategy,this.environmentInjector),yo({next:()=>c=!0,complete:()=>{c||this.cancelNavigationTransition(a,"",z_.NoDataFromResolver)}}))}),yo(a=>{let c=new _te(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(c)}))}),Zye(o=>{let a=c=>{let m=[];if(c.routeConfig?.loadComponent){let g=m4(c)??this.environmentInjector;m.push(this.configLoader.loadComponent(g,c.routeConfig).pipe(yo(C=>{c.component=C}),ot(()=>{})))}for(let g of c.children)m.push(...a(g));return m};return Ec(a(o.targetSnapshot.root)).pipe(P_(null),ar(1))}),Zye(()=>this.afterPreactivation()),On(()=>{let{currentSnapshot:o,targetSnapshot:a}=n,c=this.createViewTransition?.(this.environmentInjector,o.root,a.root);return c?Hr(c).pipe(ot(()=>n)):$t(n)}),ot(o=>{let a=s0t(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=n=$e(pe({},o),{targetRouterState:a}),this.currentNavigation.update(c=>(c.targetRouterState=a,c)),n}),yo(()=>{this.events.next(new a7)}),u0t(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ar(1),ha(new qo(o=>{let a=n.abortController.signal,c=()=>o.next();return a.addEventListener("abort",c),()=>a.removeEventListener("abort",c)}).pipe(vn(()=>!r&&!n.targetRouterState),yo(()=>{this.cancelNavigationTransition(n,n.abortController.signal.reason+"",z_.Aborted)}))),yo({next:o=>{r=!0,this.lastSuccessfulNavigation=Eu(this.currentNavigation),this.events.next(new qf(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),ha(this.transitionAbortWithErrorSubject.pipe(yo(o=>{throw o}))),LS(()=>{r||this.cancelNavigationTransition(n,"",z_.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Ac(o=>{if(this.destroyed)return n.resolve(!1),Xd;if(r=!0,Cze(o))this.events.next(new ZS(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode)),d0t(o)?this.events.next(new d4(o.url,o.navigationBehaviorOptions)):n.resolve(!1);else{let a=new s4(n.id,this.urlSerializer.serialize(n.extractedUrl),o,n.targetSnapshot??void 0);try{let c=Gh(this.environmentInjector,()=>this.navigationErrorHandler?.(a));if(c instanceof u4){let{message:m,cancellationCode:g}=Tte(this.urlSerializer,c);this.events.next(new ZS(n.id,this.urlSerializer.serialize(n.extractedUrl),m,g)),this.events.next(new d4(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(a),o}catch(c){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(c)}}return Xd}))}))}cancelNavigationTransition(e,n,r){let o=new ZS(e.id,this.urlSerializer.serialize(e.extractedUrl),n,r);this.events.next(o),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))),n=Eu(this.currentNavigation),r=n?.targetBrowserUrl??n?.extractedUrl;return e.toString()!==r?.toString()&&!n?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function tyt(t){return t!==r4}var Oze=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(iyt),providedIn:"root"})}return t})(),Ate=class{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}},iyt=(()=>{class t extends Ate{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Rze=(()=>{class t{urlSerializer=ae(SP);options=ae(Mk,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=ae(Lg);urlHandlingStrategy=ae(Mte);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new XS;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:n,targetBrowserUrl:r}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,n):n,a=r??o;return a instanceof XS?this.urlSerializer.serialize(a):a}commitTransition({targetRouterState:e,finalUrl:n,initialUrl:r}){n&&e?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,r),this.routerState=e):this.rawUrlTree=r}routerState=fze(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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:()=>ae(nyt),providedIn:"root"})}return t})(),nyt=(()=>{class t extends Rze{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(n=>{n.type==="popstate"&&setTimeout(()=>{e(n.url,n.state,"popstate")})})}handleRouterEvent(e,n){e instanceof kk?this.updateStateMemento():e instanceof JS?this.commitTransition(n):e instanceof o7?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof a7?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):e instanceof ZS&&e.code!==z_.SupersededByNewNavigation&&e.code!==z_.Redirect?this.restoreHistory(n):e instanceof s4?this.restoreHistory(n,!0):e instanceof qf&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:n,id:r}){let{replaceUrl:o,state:a}=n;if(this.location.isCurrentPathEqualTo(e)||o){let c=this.browserPageId,m=pe(pe({},a),this.generateNgRouterState(r,c));this.location.replaceState(e,"",m)}else{let c=pe(pe({},a),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(e,"",c)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Rte(t,i){t.events.pipe(vn(e=>e instanceof qf||e instanceof ZS||e instanceof s4||e instanceof JS),ot(e=>e instanceof qf||e instanceof JS?0:(e instanceof ZS?e.code===z_.Redirect||e.code===z_.SupersededByNewNavigation:!1)?2:1),vn(e=>e!==2),ar(1)).subscribe(()=>{i()})}var ryt={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},oyt={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ws=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=ae(wee);stateManager=ae(Rze);options=ae(Mk,{optional:!0})||{};pendingTasks=ae(qS);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=ae(Ote);urlSerializer=ae(SP);location=ae(Lg);urlHandlingStrategy=ae(Mte);injector=ae(_d);_events=new Ai;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=ae(Oze);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=ae(IP,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!ae(h7,{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 Ia;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,o=Eu(this.navigationTransitions.currentNavigation);if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof ZS&&n.code!==z_.Redirect&&n.code!==z_.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof qf)this.navigated=!0;else if(n instanceof d4){let a=n.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),m=pe({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||tyt(r.source)},a);this.scheduleNavigation(c,r4,null,m,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}n0t(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortWithErrorSubject.next(r)}});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),r4,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n,r)=>{this.navigateToSyncWithBrowser(e,r,n)})}navigateToSyncWithBrowser(e,n,r){let o={replaceUrl:!0},a=r?.navigationId?r:null;if(r){let m=pe({},r);delete m.navigationId,delete m.\u0275routerPageId,Object.keys(m).length!==0&&(o.state=m)}let c=this.parseUrl(e);this.scheduleNavigation(c,n,a,o).catch(m=>{this.disposed||this.injector.get(L_)(m)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Eu(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(fve),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,n={}){let{relativeTo:r,queryParams:o,fragment:a,queryParamsHandling:c,preserveFragment:m}=n,g=m?this.currentUrlTree.fragment:a,C=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":C=pe(pe({},this.currentUrlTree.queryParams),o);break;case"preserve":C=this.currentUrlTree.queryParams;break;default:C=o||null}C!==null&&(C=this.removeEmptyProps(C));let w;try{let P=r?r.snapshot:this.routerState.snapshot.root;w=uze(P)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),w=this.currentUrlTree.root}return pze(w,e,C,g??null)}navigateByUrl(e,n={skipLocationChange:!1}){let r=Dk(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,r4,null,n)}navigate(e,n={skipLocationChange:!1}){return ayt(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,n){let r;if(n===!0?r=pe({},ryt):n===!1?r=pe({},oyt):r=n,Dk(e))return q4e(this.currentUrlTree,e,r);let o=this.parseUrl(e);return q4e(this.currentUrlTree,o,r)}removeEmptyProps(e){return Object.entries(e).reduce((n,[r,o])=>(o!=null&&(n[r]=o),n),{})}scheduleNavigation(e,n,r,o,a){if(this.disposed)return Promise.resolve(!1);let c,m,g;a?(c=a.resolve,m=a.reject,g=a.promise):g=new Promise((w,P)=>{c=w,m=P});let C=this.pendingTasks.add();return Rte(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(C))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:c,reject:m,promise:g,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),g.catch(w=>Promise.reject(w))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ayt(t){for(let i=0;i{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=hr(null);get href(){return Eu(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new Ai;applicationErrorHandler=ae(L_);options=ae(Mk,{optional:!0});constructor(e,n,r,o,a,c){this.router=e,this.route=n,this.tabIndexAttribute=r,this.renderer=o,this.el=a,this.locationStrategy=c,this.reactiveHref.set(ae(new $f("href"),{optional:!0}));let m=a.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,n=r=>r==="merge"||r==="preserve";e||=n(this.queryParamsHandling),e||=!this.queryParamsHandling&&!n(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(r=>{r instanceof qf&&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)):(Dk(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,n,r,o,a){let c=this.urlTree;if(c===null||this.isAnchorElement&&(e!==0||n||r||o||a||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(c,m)?.catch(g=>{this.applicationErrorHandler(g)}),!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,n){let r=this.renderer,o=this.el.nativeElement;n!==null?r.setAttribute(o,e,n):r.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:Dk(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(n){return new(n||t)(xe(Ws),xe(id),yj("tabindex"),xe(Ma),xe(qn),xe(Mx))};static \u0275dir=hn({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),n&2&<("href",r.reactiveHref(),d0e)("target",r.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:[Yt]})}return t})(),f4=(()=>{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,n,r,o,a){this.router=e,this.element=n,this.renderer=r,this.cdr=o,this.link=a,this.routerEventsSubscription=e.events.subscribe(c=>{c instanceof qf&&this.update()})}ngAfterContentInit(){$t(this.links.changes,$t(null)).pipe($0()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(n=>!!n).map(n=>n.onChanges);this.linkInputChangesSubscription=Hr(e).pipe($0()).subscribe(n=>{this._isActive!==this.isLinkActive(this.router)(n)&&this.update()})}set routerLinkActive(e){let n=Array.isArray(e)?e:e.split(" ");this.classes=n.filter(r=>!!r)}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(n=>{e?this.renderer.addClass(this.element.nativeElement,n):this.renderer.removeClass(this.element.nativeElement,n)}),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 n=syt(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>{let o=r.urlTree;return o?e.isActive(o,n):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(n){return new(n||t)(xe(Ws),xe(qn),xe(Ma),xe(dn),xe(Ms,8))};static \u0275dir=hn({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(n,r,o){if(n&1&&Vt(o,Ms,5),n&2){let a;ze(a=Ue())&&(r.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Yt]})}return t})();function syt(t){return!!t.paths}var g7=class{};var Pze=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,n,r,o){this.router=e,this.injector=n,this.preloadingStrategy=r,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(vn(e=>e instanceof qf),Uh(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,n){let r=[];for(let o of n){o.providers&&!o._injector&&(o._injector=$V(o.providers,e,`Route: ${o.path}`));let a=o._injector??e,c=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(c,o.children??o._loadedRoutes))}return Hr(r).pipe($0())}preloadConfig(e,n){return this.preloadingStrategy.preload(n,()=>{let r;n.loadChildren&&n.canLoad===void 0?r=this.loader.loadChildren(e,n):r=$t(null);let o=r.pipe(ps(a=>a===null?$t(void 0):(n._loadedRoutes=a.routes,n._loadedInjector=a.injector,this.processRoutes(a.injector??e,a.routes))));if(n.loadComponent&&!n._loadedComponent){let a=this.loader.loadComponent(e,n);return Hr([o,a]).pipe($0())}else return o})}static \u0275fac=function(n){return new(n||t)(ai(Ws),ai(_d),ai(g7),ai(kte))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Nze=new Mi(""),lyt=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=r4;restoredId=0;store={};constructor(e,n,r,o,a={}){this.urlSerializer=e,this.transitions=n,this.viewportScroller=r,this.zone=o,this.options=a,a.scrollPositionRestoration||="disabled",a.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 kk?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof qf?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof JS&&e.code===a4.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 c4&&(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,n){this.zone.runOutsideAngular(()=>_t(this,null,function*(){yield new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new c4(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,n))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){Ij()};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function Cve(t,...i){return zS([{provide:IP,multi:!0,useValue:t},[],{provide:id,useFactory:Fze,deps:[Ws]},{provide:Dj,multi:!0,useFactory:Lze},i.map(e=>e.\u0275providers)])}function Fze(t){return t.routerState.root}function _7(t,i){return{\u0275kind:t,\u0275providers:i}}function Lze(){let t=ae(Ir);return i=>{let e=t.get($h);if(i!==e.components[0])return;let n=t.get(Ws),r=t.get(Bze);t.get(xve)===1&&n.initialNavigation(),t.get(Uze,null,{optional:!0})?.setUpPreloading(),t.get(Nze,null,{optional:!0})?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Bze=new Mi("",{factory:()=>new Ai}),xve=new Mi("",{providedIn:"root",factory:()=>1});function Vze(){let t=[{provide:see,useValue:!0},{provide:xve,useValue:0},wk(()=>{let i=ae(Ir);return i.get(pye,Promise.resolve()).then(()=>new Promise(n=>{let r=i.get(Ws),o=i.get(Bze);Rte(r,()=>{n(!0)}),i.get(Ote).afterPreactivation=()=>(n(!0),o.closed?$t(void 0):o),r.initialNavigation()}))})];return _7(2,t)}function zze(){let t=[wk(()=>{ae(Ws).setUpLocationChangeListener()}),{provide:xve,useValue:2}];return _7(3,t)}var Uze=new Mi("");function Hze(t){return _7(0,[{provide:Uze,useExisting:Pze},{provide:g7,useExisting:t}])}function Gze(){return _7(8,[mve,{provide:h7,useExisting:mve}])}function jze(t){Ob("NgRouterViewTransitions");let i=[{provide:_ve,useValue:Mze},{provide:yve,useValue:pe({skipNextTransition:!!t?.skipInitialTransition},t)}];return _7(9,i)}var $ze=[Lg,{provide:SP,useClass:Ak},Ws,wP,{provide:id,useFactory:Fze,deps:[Ws]},kte,[]],Yf=(()=>{class t{constructor(){}static forRoot(e,n){return{ngModule:t,providers:[$ze,[],{provide:IP,multi:!0,useValue:e},[],n?.errorHandler?{provide:vve,useValue:n.errorHandler}:[],{provide:Mk,useValue:n||{}},n?.useHash?dyt():uyt(),cyt(),n?.preloadingStrategy?Hze(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?pyt(n):[],n?.bindToComponentInputs?Gze().\u0275providers:[],n?.enableViewTransitions?jze().\u0275providers:[],myt()]}}static forChild(e){return{ngModule:t,providers:[{provide:IP,multi:!0,useValue:e}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();function cyt(){return{provide:Nze,useFactory:()=>{let t=ae(S4e),i=ae(Pn),e=ae(Mk),n=ae(Ote),r=ae(SP);return e.scrollOffset&&t.setOffset(e.scrollOffset),new lyt(r,n,t,i,e)}}}function dyt(){return{provide:Mx,useClass:xye}}function uyt(){return{provide:Mx,useClass:Lee}}function pyt(t){return[t.initialNavigation==="disabled"?zze().\u0275providers:[],t.initialNavigation==="enabledBlocking"?Vze().\u0275providers:[]]}var bve=new Mi("");function myt(){return[{provide:bve,useFactory:Lze},{provide:Dj,multi:!0,useExisting:bve}]}var Sve=new Mi("BD_FRONTEND_APP_CONFIG"),xr=(()=>{class t{_appConfig;static 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(r=>{let o=`${t.envStoragePrefix}.${r}`,a=e[r];a.toString().match('[\\[\\{][\\\\\\"].*([\\"\\\\]|\\w)[\\]\\}]')&&(a=JSON.parse(a)),sessionStorage.setItem(o,JSON.stringify(a))})}load(e,n=!1){let r=`${t.envStoragePrefix}.${e}`,o=sessionStorage.getItem(r),a=null;if(!o&&!n)throw new Error(`${e} is missing in storage.`);try{a=JSON.parse(o)}catch{a=o}return a}static \u0275fac=function(n){return new(n||t)(ai(Sve))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hyt=["*"],fyt=t=>({chip__stacked:t}),gyt=(t,i)=>({color:t,backgroundColor:i}),qze=(()=>{class t{stacked=!1;fontColor="rgba(0,0,0,0.87)";color="#e0e0e0";static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-chip-dummy"]],inputs:{stacked:"stacked",fontColor:"fontColor",color:"color"},ngContentSelectors:hyt,decls:2,vars:7,consts:[[1,"chip","mat-body-1",3,"ngClass","ngStyle"]],template:function(n,r){n&1&&(Kn(),O(0,"div",0),Sn(1),M()),n&2&&D("ngClass",Yi(2,fyt,r.stacked))("ngStyle",na(4,gyt,r.fontColor,r.color))},dependencies:[qa,Xs],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 Xo=class{_subs=[];unsubscribeAll(){this._subs.forEach(i=>i.unsubscribe()),this._subs=[]}};function _yt(){return window}var Pte=(()=>{class t{get(){return _yt()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Nte=class t{static loadFrontendConfig(i,e){let n=t.frontendConfigUrl(e.configRequestMethod,e.configRequestUrl);return fetch(n,{method:e.configRequestMethod,mode:"cors",body:e.configRequestMethod==="GET"?null:JSON.stringify(i),headers:new Headers({"content-type":"application/json"})}).then(r=>r.json())}static frontendConfigUrl(i,e){let n=t.extractHostname(window.location.origin,!0);return i==="GET"?e:`${window.location.protocol}//frontend-config-api.${n}${e}`}static extractHostname(i,e=!1){let n;if(i.indexOf("://")>-1?n=i.split("/")[2]:n=i.split("/")[0],n=n.split(":")[0],n=n.split("?")[0],e){let r=n.split(".");n=r[r.length-2]+"."+r[r.length-1]}return n}};var y7=class{_attachedHost;attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;i!=null&&(this._attachedHost=null,i.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(i){this._attachedHost=i}},qh=class extends y7{component;viewContainerRef;injector;projectableNodes;constructor(i,e,n,r){super(),this.component=i,this.viewContainerRef=e,this.injector=n,this.projectableNodes=r}},Yh=class extends y7{templateRef;viewContainerRef;context;injector;constructor(i,e,n,r){super(),this.templateRef=i,this.viewContainerRef=e,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(i,e=this.context){return this.context=e,super.attach(i)}detach(){return this.context=void 0,super.detach()}},wve=class extends y7{element;constructor(i){super(),this.element=i instanceof qn?i.nativeElement:i}},Ok=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(i){if(i instanceof qh)return this._attachedPortal=i,this.attachComponentPortal(i);if(i instanceof Yh)return this._attachedPortal=i,this.attachTemplatePortal(i);if(this.attachDomPortal&&i instanceof wve)return this._attachedPortal=i,this.attachDomPortal(i)}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(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},v7=class extends Ok{outletElement;_appRef;_defaultInjector;constructor(i,e,n){super(),this.outletElement=i,this._appRef=e,this._defaultInjector=n}attachComponentPortal(i){let e;if(i.viewContainerRef){let n=i.injector||i.viewContainerRef.injector,r=n.get(Ax,null,{optional:!0})||void 0;e=i.viewContainerRef.createComponent(i.component,{index:i.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:i.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let n=this._appRef,r=i.injector||this._defaultInjector||Ir.NULL,o=r.get(_d,n.injector);e=WV(i.component,{elementInjector:r,environmentInjector:o,projectableNodes:i.projectableNodes||void 0}),n.attachView(e.hostView),this.setDisposeFn(()=>{n.viewCount>0&&n.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=i,e}attachTemplatePortal(i){let e=i.viewContainerRef,n=e.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(n);r!==-1&&e.remove(r)}),this._attachedPortal=i,n}attachDomPortal=i=>{let e=i.element;e.parentNode;let n=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),this._attachedPortal=i,super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}},Kze=(()=>{class t extends Yh{constructor(){let e=ae(Bl),n=ae($l);super(e,n)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Tt]})}return t})();var Gp=(()=>{class t extends Ok{_moduleRef=ae(Ax,{optional:!0});_document=ae(Gr);_viewContainerRef=ae($l);_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 n=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,r=n.createComponent(e.component,{index:n.length,injector:e.injector||n.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return n!==this._viewContainerRef&&this._getRootNode().appendChild(r.hostView.rootNodes[0]),super.setDisposeFn(()=>r.destroy()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachTemplatePortal(e){e.setAttachedHost(this);let n=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");e.setAttachedHost(this),n.parentNode.insertBefore(r,n),this._getRootNode().appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Tt]})}return t})();var Vg=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();function TP(t){return t.buttons===0||t.detail===0}function EP(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var Tve;function Wze(){if(Tve==null){let t=typeof document<"u"?document.head:null;Tve=!!(t&&(t.createShadowRoot||t.attachShadow))}return Tve}function Eve(t){if(Wze()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function Rk(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}function U_(t){return t.composedPath?t.composedPath()[0]:t.target}var Ave;try{Ave=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Ave=!1}var _s=(()=>{class t{_platformId=ae(Hf);isBrowser=this._platformId?Js(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||Ave)&&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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var b7;function Qze(){if(b7==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>b7=!0}))}finally{b7=b7||!1}return b7}function Pk(t){return Qze()?t:!!t.capture}function _v(t,i=0){return Zze(t)?Number(t):arguments.length===2?i:0}function Zze(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function H_(t){return t instanceof qn?t.nativeElement:t}var Xze=new Mi("cdk-input-modality-detector-options"),Jze={ignoreKeys:[18,17,224,91,16]},e5e=650,Dve={passive:!0,capture:!0},t5e=(()=>{class t{_platform=ae(_s);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Sa(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(n=>n===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=U_(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(EP(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=U_(e)};constructor(){let e=ae(Pn),n=ae(Gr),r=ae(Xze,{optional:!0});if(this._options=pe(pe({},Jze),r),this.modalityDetected=this._modality.pipe(QR(1)),this.modalityChanged=this.modalityDetected.pipe(vm()),this._platform.isBrowser){let o=ae(Jd).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[o.listen(n,"keydown",this._onKeydown,Dve),o.listen(n,"mousedown",this._onMousedown,Dve),o.listen(n,"touchstart",this._onTouchstart,Dve)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),C7=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(C7||{}),i5e=new Mi("cdk-focus-monitor-default-options"),Fte=Pk({passive:!0,capture:!0}),wm=(()=>{class t{_ngZone=ae(Pn);_platform=ae(_s);_inputModalityDetector=ae(t5e);_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=ae(Gr);_stopInputModalityDetector=new Ai;constructor(){let e=ae(i5e,{optional:!0});this._detectionMode=e?.detectionMode||C7.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let n=U_(e);for(let r=n;r;r=r.parentElement)e.type==="focus"?this._onFocus(e,r):this._onBlur(e,r)};monitor(e,n=!1){let r=H_(e);if(!this._platform.isBrowser||r.nodeType!==1)return $t();let o=Eve(r)||this._document,a=this._elementInfo.get(r);if(a)return n&&(a.checkChildren=!0),a.subject;let c={checkChildren:n,subject:new Ai,rootNode:o};return this._elementInfo.set(r,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(e){let n=H_(e),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(e,n,r){let o=H_(e),a=this._document.activeElement;o===a?this._getClosestElementsInfo(o).forEach(([c,m])=>this._originChanged(c,n,m)):(this._setOrigin(n),typeof o.focus=="function"&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_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===C7.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused",n==="touch"),e.classList.toggle("cdk-keyboard-focused",n==="keyboard"),e.classList.toggle("cdk-mouse-focused",n==="mouse"),e.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&n,this._detectionMode===C7.IMMEDIATE){clearTimeout(this._originTimeoutId);let r=this._originFromTouchInteraction?e5e:1;this._originTimeoutId=setTimeout(()=>this._origin=null,r)}})}_onFocus(e,n){let r=this._elementInfo.get(n),o=U_(e);!r||!r.checkChildren&&n!==o||this._originChanged(n,this._getFocusOrigin(o),r)}_onBlur(e,n){let r=this._elementInfo.get(n);!r||r.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,Fte),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,Fte)}),this._rootNodeFocusListenerCount.set(n,r+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ha(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Fte),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Fte),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,r){this._setClasses(e,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){let n=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&n.push([o,r])}),n}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if(r!=="mouse"||!n||n===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let o=e.labels;if(o){for(let a=0;a{class t{_elementRef=ae(qn);_focusMonitor=ae(wm);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new ve;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var Lte=new WeakMap,pc=(()=>{class t{_appRef;_injector=ae(Ir);_environmentInjector=ae(_d);load(e){let n=this._appRef=this._appRef||this._injector.get($h),r=Lte.get(n);r||(r={loaders:new Set,refs:[]},Lte.set(n,r),n.onDestroy(()=>{Lte.get(n)?.refs.forEach(o=>o.destroy()),Lte.delete(n)})),r.loaders.has(e)||(r.loaders.add(e),r.refs.push(WV(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Nk=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,r){},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 g4(t){return Array.isArray(t)?t:[t]}var n5e=new Set,AP,Bte=(()=>{class t{_platform=ae(_s);_nonce=ae(HV,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):byt}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&vyt(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vyt(t,i){if(!n5e.has(t))try{AP||(AP=document.createElement("style"),i&&AP.setAttribute("nonce",i),AP.setAttribute("type","text/css"),document.head.appendChild(AP)),AP.sheet&&(AP.sheet.insertRule(`@media ${t} {body{ }}`,0),n5e.add(t))}catch(e){console.error(e)}}function byt(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var yv=(()=>{class t{_mediaMatcher=ae(Bte);_zone=ae(Pn);_queries=new Map;_destroySubject=new Ai;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return r5e(g4(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let r=r5e(g4(e)).map(a=>this._registerQuery(a).observable),o=Ec(r);return o=FS(o.pipe(ar(1)),o.pipe(QR(1),Hh(0))),o.pipe(ot(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:m,query:g})=>{c.matches=c.matches||m,c.breakpoints[g]=m}),c}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let n=this._mediaMatcher.matchMedia(e),o={observable:new qo(a=>{let c=m=>this._zone.run(()=>a.next(m));return n.addListener(c),()=>{n.removeListener(c)}}).pipe(ks(n),ot(({matches:a})=>({query:e,matches:a})),ha(this._destroySubject)),mql:n};return this._queries.set(e,o),o}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function r5e(t){return t.map(i=>i.split(",")).reduce((i,e)=>i.concat(e)).map(i=>i.trim())}function Cyt(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let i=0;i{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),a5e=(()=>{class t{_mutationObserverFactory=ae(o5e);_observedElements=new Map;_ngZone=ae(Pn);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){let n=H_(e);return new qo(r=>{let a=this._observeElement(n).pipe(ot(c=>c.filter(m=>!Cyt(m))),vn(c=>!!c.length)).subscribe(c=>{this._ngZone.run(()=>{r.next(c)})});return()=>{a.unsubscribe(),this._unobserveElement(n)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let n=new Ai,r=this._mutationObserverFactory.create(o=>n.next(o));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:n,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:n,stream:r}=this._observedElements.get(e);n&&n.disconnect(),r.complete(),this._observedElements.delete(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vte=(()=>{class t{_contentObserver=ae(a5e);_elementRef=ae(qn);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=_v(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(Hh(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",Je],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),_4=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[o5e]})}return t})();var Rve=(()=>{class t{_platform=ae(_s);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return Syt(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let n=xyt(Myt(e));if(n&&(s5e(n)===-1||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),o=s5e(e);return e.hasAttribute("contenteditable")?o!==-1:r==="iframe"||r==="object"||this._platform.WEBKIT&&this._platform.IOS&&!Dyt(e)?!1:r==="audio"?e.hasAttribute("controls")?o!==-1:!1:r==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,n){return kyt(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function xyt(t){try{return t.frameElement}catch{return null}}function Syt(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function wyt(t){let i=t.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function Iyt(t){return Eyt(t)&&t.type=="hidden"}function Tyt(t){return Ayt(t)&&t.hasAttribute("href")}function Eyt(t){return t.nodeName.toLowerCase()=="input"}function Ayt(t){return t.nodeName.toLowerCase()=="a"}function d5e(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let i=t.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function s5e(t){if(!d5e(t))return null;let i=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function Dyt(t){let i=t.nodeName.toLowerCase(),e=i==="input"&&t.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function kyt(t){return Iyt(t)?!1:wyt(t)||Tyt(t)||t.hasAttribute("contenteditable")||d5e(t)}function Myt(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Ove=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,n,r,o=!1,a){this._element=i,this._checker=e,this._ngZone=n,this._document=r,this._injector=a,o||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.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(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(i),!!n}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let n=0;n=0;n--){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?Rd(i,{injector:this._injector}):setTimeout(i)}},Pve=(()=>{class t{_checker=ae(Rve);_ngZone=ae(Pn);_document=ae(Gr);_injector=ae(Ir);constructor(){ae(pc).load(Nk)}create(e,n=!1){return new Ove(e,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var u5e=new Mi("liveAnnouncerElement",{providedIn:"root",factory:p5e});function p5e(){return null}var m5e=new Mi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Oyt=0,x7=(()=>{class t{_ngZone=ae(Pn);_defaultOptions=ae(m5e,{optional:!0});_liveElement;_document=ae(Gr);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=ae(u5e,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...n){let r=this._defaultOptions,o,a;return n.length===1&&typeof n[0]=="number"?a=n[0]:[o,a]=n,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),a==null&&r&&(a=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(c=>this._currentResolve=c)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),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",n=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class t{_platform=ae(_s);_hasCheckedHighContrastMode;_document=ae(Gr);_breakpointSubscription;constructor(){this._breakpointSubscription=ae(yv).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Fk.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Fk.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Fk.BLACK_ON_WHITE}return Fk.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Mve,l5e,c5e),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===Fk.BLACK_ON_WHITE?e.add(Mve,l5e):n===Fk.WHITE_ON_BLACK&&e.add(Mve,c5e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),S7=(()=>{class t{constructor(){ae(zte)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_4]})}return t})();function Au(t,...i){return i.length?i.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}function Nve(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function jp(t){return t==null?"":typeof t=="string"?t:`${t}px`}var Ryt=new Mi("cdk-dir-doc",{providedIn:"root",factory:Pyt});function Pyt(){return ae(Gr)}var Nyt=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function h5e(t){let i=t?.toLowerCase()||"";return i==="auto"&&typeof navigator<"u"&&navigator?.language?Nyt.test(navigator.language)?"rtl":"ltr":i==="rtl"?"rtl":"ltr"}var Du=(()=>{class t{get value(){return this.valueSignal()}valueSignal=hr("ltr");change=new ve;constructor(){let e=ae(Ryt,{optional:!0});if(e){let n=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(h5e(n||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Nx=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(Nx||{}),Ute,DP;function Hte(){if(DP==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return DP=!1,DP;if("scrollBehavior"in document.documentElement.style)DP=!0;else{let t=Element.prototype.scrollTo;t?DP=!/\{\s*\[native code\]\s*\}/.test(t.toString()):DP=!1}}return DP}function y4(){if(typeof document!="object"||!document)return Nx.NORMAL;if(Ute==null){let t=document.createElement("div"),i=t.style;t.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";let e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",t.appendChild(e),document.body.appendChild(t),Ute=Nx.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,Ute=t.scrollLeft===0?Nx.NEGATED:Nx.INVERTED),t.remove()}return Ute}var Lk=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var Fyt=20,Bk=(()=>{class t{_ngZone=ae(Pn);_platform=ae(_s);_renderer=ae(Jd).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new Ai;_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 n=this.scrollContainers.get(e);n&&(n.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Fyt){return this._platform.isBrowser?new qo(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(oJ(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):$t()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(e,n){let r=this.getAncestorScrollContainers(e);return this.scrolled(n).pipe(vn(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let n=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&n.push(o)}),n}_scrollableContainsElement(e,n){let r=H_(n),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),w7=(()=>{class t{elementRef=ae(qn);scrollDispatcher=ae(Bk);ngZone=ae(Pn);dir=ae(Du,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new Ai;_renderer=ae(Ma);_cleanupScroll;_elementScrolled=new Ai;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 n=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=r?e.end:e.start),e.right==null&&(e.right=r?e.start:e.end),e.bottom!=null&&(e.top=n.scrollHeight-n.clientHeight-e.bottom),r&&y4()!=Nx.NORMAL?(e.left!=null&&(e.right=n.scrollWidth-n.clientWidth-e.left),y4()==Nx.INVERTED?e.left=e.right:y4()==Nx.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=n.scrollWidth-n.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let n=this.elementRef.nativeElement;Hte()?n.scrollTo(e):(e.top!=null&&(n.scrollTop=e.top),e.left!=null&&(n.scrollLeft=e.left))}measureScrollOffset(e){let n="left",r="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let a=this.dir&&this.dir.value=="rtl";return e=="start"?e=a?r:n:e=="end"&&(e=a?n:r),a&&y4()==Nx.INVERTED?e==n?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:a&&y4()==Nx.NEGATED?e==n?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==n?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})(),Lyt=20,Fb=(()=>{class t{_platform=ae(_s);_listeners;_viewportSize;_change=new Ai;_document=ae(Gr);constructor(){let e=ae(Pn),n=ae(Jd).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=o=>this._change.next(o);this._listeners=[n.listen("window","resize",r),n.listen("window","orientationchange",r)]}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:n,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,n=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),a=-o.top||e.body.scrollTop||n.scrollY||r.scrollTop||0,c=-o.left||e.body.scrollLeft||n.scrollX||r.scrollLeft||0;return{top:a,left:c}}change(e=Lyt){return e>0?this._change.pipe(oJ(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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $T=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})(),Fve=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Lk,$T,Lk,$T]})}return t})();var Lve={},Tl=(()=>{class t{_appId=ae(Ck);getId(e){return this._appId!=="ng"&&(e+=this._appId),Lve.hasOwnProperty(e)||(Lve[e]=0),`${e}${Lve[e]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var f5e=Hte();function C4(t){return new Gte(t.get(Fb),t.get(Gr))}var Gte=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(i,e){this._viewportRuler=i,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=jp(-this._previousScrollPosition.left),i.style.top=jp(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let i=this._document.documentElement,e=this._document.body,n=i.style,r=e.style,o=n.scrollBehavior||"",a=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),f5e&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),f5e&&(n.scrollBehavior=o,r.scrollBehavior=a)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,n=this._viewportRuler.getViewportSize();return e.scrollHeight>n.height||e.scrollWidth>n.width}};function x5e(t,i){return new jte(t.get(Bk),t.get(Pn),t.get(Fb),i)}var jte=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(i,e,n,r){this._scrollDispatcher=i,this._ngZone=e,this._viewportRuler=n,this._config=r}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(this._scrollSubscription)return;let i=this._scrollDispatcher.scrolled(0).pipe(vn(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=i.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.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 I7=class{enable(){}disable(){}attach(){}};function Bve(t,i){return i.some(e=>{let n=t.bottome.bottom,o=t.righte.right;return n||r||o||a})}function g5e(t,i){return i.some(e=>{let n=t.tope.bottom,o=t.lefte.right;return n||r||o||a})}function G_(t,i){return new $te(t.get(Bk),t.get(Fb),t.get(Pn),i)}var $te=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(i,e,n,r){this._scrollDispatcher=i,this._viewportRuler=e,this._ngZone=n,this._config=r}attach(i){this._overlayRef,this._overlayRef=i}enable(){if(!this._scrollSubscription){let i=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(i).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Bve(e,[{width:n,height:r,bottom:r,right:n,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}},S5e=(()=>{class t{_injector=ae(Ir);constructor(){}noop=()=>new I7;close=e=>x5e(this._injector,e);block=()=>C4(this._injector);reposition=e=>G_(this._injector,e);static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Lb=class{positionStrategy;scrollStrategy=new I7;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(i){if(i){let e=Object.keys(i);for(let n of e)i[n]!==void 0&&(this[n]=i[n])}}};var qte=class{connectionPair;scrollableViewProperties;constructor(i,e){this.connectionPair=i,this.scrollableViewProperties=e}};var w5e=(()=>{class t{_attachedOverlays=[];_document=ae(Gr);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let n=this._attachedOverlays.indexOf(e);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),I5e=(()=>{class t extends w5e{_ngZone=ae(Pn);_renderer=ae(Jd).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 n=this._attachedOverlays;for(let r=n.length-1;r>-1;r--)if(n[r]._keydownEvents.observers.length>0){this._ngZone.run(()=>n[r]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),T5e=(()=>{class t extends w5e{_platform=ae(_s);_ngZone=ae(Pn);_renderer=ae(Jd).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let n=this._document.body,r={capture:!0},o=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[o.listen(n,"pointerdown",this._pointerDownListener,r),o.listen(n,"click",this._clickListener,r),o.listen(n,"auxclick",this._clickListener,r),o.listen(n,"contextmenu",this._clickListener,r)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.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=U_(e)};_clickListener=e=>{let n=U_(e),r=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:n;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let a=o.length-1;a>-1;a--){let c=o[a];if(c._outsidePointerEvents.observers.length<1||!c.hasAttached())continue;if(_5e(c.overlayElement,n)||_5e(c.overlayElement,r))break;let m=c._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>m.next(e)):m.next(e)}};static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function _5e(t,i){let e=typeof ShadowRoot<"u"&&ShadowRoot,n=i;for(;n;){if(n===t)return!0;n=e&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var E5e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(n,r){},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})(),Wte=(()=>{class t{_platform=ae(_s);_containerElement;_document=ae(Gr);_styleLoader=ae(pc);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||Nve()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o{let i=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(i,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),i.style.pointerEvents="none",i.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()}},v4=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new Ai;_attachments=new Ai;_detachments=new Ai;_positionStrategy;_scrollStrategy;_locationChanges=Ia.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new Ai;_outsidePointerEvents=new Ai;_afterNextRenderRef;constructor(i,e,n,r,o,a,c,m,g,C=!1,w,P){this._portalOutlet=i,this._host=e,this._pane=n,this._config=r,this._ngZone=o,this._keyboardDispatcher=a,this._document=c,this._location=m,this._outsideClickDispatcher=g,this._animationsDisabled=C,this._injector=w,this._renderer=P,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Rd(()=>{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 i=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){let i=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,i&&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(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config=pe(pe({},this._config),i),this._updateElementSize()}setDirection(i){this._config=$e(pe({},this._config),{direction:i}),this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){let i=this._config.direction;return i?typeof i=="string"?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let i=this._pane.style;i.width=jp(this._config.width),i.height=jp(this._config.height),i.minWidth=jp(this._config.minWidth),i.minHeight=jp(this._config.minHeight),i.maxWidth=jp(this._config.maxWidth),i.maxHeight=jp(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){let i="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Vve(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(i))}):this._backdropRef.element.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(i,e,n){let r=g4(e||[]).filter(o=>!!o);r.length&&(n?i.classList.add(...r):i.classList.remove(...r))}_detachContentWhenEmpty(){let i=!1;try{this._detachContentAfterRenderRef=Rd(()=>{i=!0,this._detachContent()},{injector:this._injector})}catch(e){if(i)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 i=this._scrollStrategy;i?.disable(),i?.detach?.()}},y5e="cdk-overlay-connected-position-bounding-box",Vyt=/([A-Za-z%]+)$/;function Vk(t,i){return new Yte(i,t.get(Fb),t.get(Gr),t.get(_s),t.get(Wte))}var Yte=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 Ai;_resizeSubscription=Ia.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(i,e,n,r,o){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=o,this.setOrigin(i)}attach(i){this._overlayRef&&this._overlayRef,this._validatePositions(),i.hostElement.classList.add(y5e),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.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 i=this._originRect,e=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],a;for(let c of this._preferredPositions){let m=this._getOriginPoint(i,r,c),g=this._getOverlayPoint(m,e,c),C=this._getOverlayFit(g,e,n,c);if(C.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(c,m);return}if(this._canFitWithFlexibleDimensions(C,g,n)){o.push({position:c,origin:m,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(m,c)});continue}(!a||a.overlayFit.visibleAream&&(m=C,c=g)}this._isPushed=!1,this._applyPosition(c.position,c.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(a.position,a.originPoint);return}this._applyPosition(a.position,a.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&kP(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(y5e),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let i=this._lastPosition;if(i){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,i);this._applyPosition(i,e)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,i.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,e,n){let r;if(n.originX=="center")r=i.left+i.width/2;else{let a=this._isRtl()?i.right:i.left,c=this._isRtl()?i.left:i.right;r=n.originX=="start"?a:c}e.left<0&&(r-=e.left);let o;return n.originY=="center"?o=i.top+i.height/2:o=n.originY=="top"?i.top:i.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(i,e,n){let r;n.overlayX=="center"?r=-e.width/2:n.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let o;return n.overlayY=="center"?o=-e.height/2:o=n.overlayY=="top"?0:-e.height,{x:i.x+r,y:i.y+o}}_getOverlayFit(i,e,n,r){let o=b5e(e),{x:a,y:c}=i,m=this._getOffset(r,"x"),g=this._getOffset(r,"y");m&&(a+=m),g&&(c+=g);let C=0-a,w=a+o.width-n.width,P=0-c,R=c+o.height-n.height,z=this._subtractOverflows(o.width,C,w),H=this._subtractOverflows(o.height,P,R),j=z*H;return{visibleArea:j,isCompletelyWithinViewport:o.width*o.height===j,fitsInViewportVertically:H===o.height,fitsInViewportHorizontally:z==o.width}}_canFitWithFlexibleDimensions(i,e,n){if(this._hasFlexibleDimensions){let r=n.bottom-e.y,o=n.right-e.x,a=v5e(this._overlayRef.getConfig().minHeight),c=v5e(this._overlayRef.getConfig().minWidth),m=i.fitsInViewportVertically||a!=null&&a<=r,g=i.fitsInViewportHorizontally||c!=null&&c<=o;return m&&g}return!1}_pushOverlayOnScreen(i,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};let r=b5e(e),o=this._viewportRect,a=Math.max(i.x+r.width-o.width,0),c=Math.max(i.y+r.height-o.height,0),m=Math.max(o.top-n.top-i.y,0),g=Math.max(o.left-n.left-i.x,0),C=0,w=0;return r.width<=o.width?C=g||-a:C=i.xz&&!this._isInitialRender&&!this._growAfterOpen&&(a=i.y-z/2)}let m=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,g=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,C,w,P;if(g)P=n.width-i.x+this._viewportMargin*2,C=i.x-this._viewportMargin;else if(m)w=i.x,C=n.right-i.x;else{let R=Math.min(n.right-i.x+n.left,i.x),z=this._lastBoundingBoxSize.width;C=R*2,w=i.x-R,C>z&&!this._isInitialRender&&!this._growAfterOpen&&(w=i.x-z/2)}return{top:a,left:w,bottom:c,right:P,width:C,height:o}}_setBoundingBoxStyles(i,e){let n=this._calculateBoundingBoxRect(i,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;r.height=jp(n.height),r.top=jp(n.top),r.bottom=jp(n.bottom),r.width=jp(n.width),r.left=jp(n.left),r.right=jp(n.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=jp(o)),a&&(r.maxWidth=jp(a))}this._lastBoundingBoxSize=n,kP(this._boundingBox.style,r)}_resetBoundingBoxStyles(){kP(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){kP(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,e){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(r){let C=this._viewportRuler.getViewportScrollPosition();kP(n,this._getExactOverlayY(e,i,C)),kP(n,this._getExactOverlayX(e,i,C))}else n.position="static";let c="",m=this._getOffset(e,"x"),g=this._getOffset(e,"y");m&&(c+=`translateX(${m}px) `),g&&(c+=`translateY(${g}px)`),n.transform=c.trim(),a.maxHeight&&(r?n.maxHeight=jp(a.maxHeight):o&&(n.maxHeight="")),a.maxWidth&&(r?n.maxWidth=jp(a.maxWidth):o&&(n.maxWidth="")),kP(this._pane.style,n)}_getExactOverlayY(i,e,n){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,i);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),i.overlayY==="bottom"){let a=this._document.documentElement.clientHeight;r.bottom=`${a-(o.y+this._overlayRect.height)}px`}else r.top=jp(o.y);return r}_getExactOverlayX(i,e,n){let r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,i);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let a;if(this._isRtl()?a=i.overlayX==="end"?"left":"right":a=i.overlayX==="end"?"right":"left",a==="right"){let c=this._document.documentElement.clientWidth;r.right=`${c-(o.x+this._overlayRect.width)}px`}else r.left=jp(o.x);return r}_getScrollVisibility(){let i=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:g5e(i,n),isOriginOutsideView:Bve(i,n),isOverlayClipped:g5e(e,n),isOverlayOutsideView:Bve(e,n)}}_subtractOverflows(i,...e){return e.reduce((n,r)=>n-Math.max(r,0),i)}_getNarrowedViewportRect(){let i=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+i-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:i-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,e){return e==="x"?i.offsetX==null?this._offsetX:i.offsetX:i.offsetY==null?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&g4(i).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){let i=this._origin;if(i instanceof qn)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();let e=i.width||0,n=i.height||0;return{top:i.y,bottom:i.y+n,left:i.x,right:i.x+e,height:n,width:e}}};function kP(t,i){for(let e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}function v5e(t){if(typeof t!="number"&&t!=null){let[i,e]=t.split(Vyt);return!e||e==="px"?parseFloat(i):null}return t||null}function b5e(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 zyt(t,i){return t===i?!0:t.isOriginClipped===i.isOriginClipped&&t.isOriginOutsideView===i.isOriginOutsideView&&t.isOverlayClipped===i.isOverlayClipped&&t.isOverlayOutsideView===i.isOverlayOutsideView}var C5e="cdk-global-overlay-wrapper";function zk(t){return new Kte}var Kte=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(i){let e=i.getConfig();this._overlayRef=i,this._width&&!e.width&&i.updateSize({width:this._width}),this._height&&!e.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(C5e),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:a,maxHeight:c}=n,m=(r==="100%"||r==="100vw")&&(!a||a==="100%"||a==="100vw"),g=(o==="100%"||o==="100vh")&&(!c||c==="100%"||c==="100vh"),C=this._xPosition,w=this._xOffset,P=this._overlayRef.getConfig().direction==="rtl",R="",z="",H="";m?H="flex-start":C==="center"?(H="center",P?z=w:R=w):P?C==="left"||C==="end"?(H="flex-end",R=w):(C==="right"||C==="start")&&(H="flex-start",z=w):C==="left"||C==="start"?(H="flex-start",R=w):(C==="right"||C==="end")&&(H="flex-end",z=w),i.position=this._cssPosition,i.marginLeft=m?"0":R,i.marginTop=g?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=m?"0":z,e.justifyContent=H,e.alignItems=g?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let i=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(C5e),n.justifyContent=n.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}},A5e=(()=>{class t{_injector=ae(Ir);constructor(){}global(){return zk()}flexibleConnectedTo(e){return Vk(this._injector,e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Bb(t,i){t.get(pc).load(E5e);let e=t.get(Wte),n=t.get(Gr),r=t.get(Tl),o=t.get($h),a=t.get(Du),c=n.createElement("div"),m=n.createElement("div");m.id=r.getId("cdk-overlay-"),m.classList.add("cdk-overlay-pane"),c.appendChild(m),e.getContainerElement().appendChild(c);let g=new v7(m,o,t),C=new Lb(i),w=t.get(Ma,null,{optional:!0})||t.get(Jd).createRenderer(null,null);return C.direction=C.direction||a.value,new v4(g,c,m,C,t.get(Pn),t.get(I5e),n,t.get(Lg),t.get(T5e),i?.disableAnimations??t.get(xk,null,{optional:!0})==="NoopAnimations",t.get(_d),w)}var D5e=(()=>{class t{scrollStrategies=ae(S5e);_positionBuilder=ae(A5e);_injector=ae(Ir);constructor(){}create(e){return Bb(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Uyt=[{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"}],k5e=new Mi("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>G_(t)}}),b4=(()=>{class t{elementRef=ae(qn);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return t})(),Qte=(()=>{class t{_dir=ae(Du,{optional:!0});_injector=ae(Ir);_overlayRef;_templatePortal;_backdropSubscription=Ia.EMPTY;_attachSubscription=Ia.EMPTY;_detachSubscription=Ia.EMPTY;_positionSubscription=Ia.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=ae(k5e);_disposeOnNavigation=!1;_ngZone=ae(Pn);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=ae(Bl),n=ae($l);this._templatePortal=new Yh(e,n),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=Uyt);let e=this._overlayRef=Bb(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),n.keyCode===27&&!this.disableClose&&!Au(n)&&(n.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{let r=this._getOriginElement(),o=U_(n);(!r||r!==o&&!r.contains(o))&&this.overlayOutsideClick.next(n)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),n=new Lb({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(n.width=this.width),(this.height||this.height===0)&&(n.height=this.height),(this.minWidth||this.minWidth===0)&&(n.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(e){let n=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=Vk(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof b4?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof b4?this.origin.elementRef.nativeElement:this.origin instanceof qn?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(zG(()=>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(n){return new(n||t)};static \u0275dir=hn({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:[Yt]})}return t})();function Hyt(t){let i=ae(Ir);return()=>G_(i)}var Gyt={provide:k5e,useFactory:Hyt},vv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[D5e,Gyt],imports:[Lk,Vg,Fve,Fve]})}return t})();function jyt(t,i){}var Uk=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 Uve=(()=>{class t extends Ok{_elementRef=ae(qn);_focusTrapFactory=ae(Pve);_config;_interactivityChecker=ae(Rve);_ngZone=ae(Pn);_focusMonitor=ae(wm);_renderer=ae(Ma);_changeDetectorRef=ae(dn);_injector=ae(Ir);_platform=ae(_s);_document=ae(Gr);_portalOutlet;_focusTrapped=new Ai;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=ae(Uk,{optional:!0})||new Uk,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let n=this._ariaLabelledByQueue.indexOf(e);n>-1&&(this._ariaLabelledByQueue.splice(n,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 n=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),n}attachTemplatePortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),n}attachDomPortal=e=>{this._portalOutlet.hasAttached();let n=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),n};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,n){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{o(),a(),e.removeAttribute("tabindex")},o=this._renderer.listen(e,"blur",r),a=this._renderer.listen(e,"mousedown",r)})),e.focus(n)}_focusByCssSelector(e,n){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,n)}_trapFocus(e){this._isDestroyed||Rd(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.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,n=null;if(typeof e=="string"?n=this._document.querySelector(e):typeof e=="boolean"?n=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(n=e),this._config.restoreFocus&&n&&typeof n.focus=="function"){let r=Rk(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,n=Rk();return e===n||e.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Rk()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Xi(Gp,7),n&2){let o;ze(o=Ue())&&(r._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&<("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},features:[Tt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&ie(0,jyt,0,0,"ng-template",0)},dependencies:[Gp],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit} `],encapsulation:2})}return t})(),T7=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new Ai;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(i,e){this.overlayRef=i,this.config=e,this.disableClose=e.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!Au(n)&&(n.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=i.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(i,e){if(this._canClose(i)){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",e=""){return this.overlayRef.updateSize({width:i,height:e}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}_canClose(i){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(i,e,this.componentInstance))}},$yt=new Mi("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>C4(t)}}),qyt=new Mi("DialogData"),Yyt=new Mi("DefaultDialogConfig");function Kyt(t){let i=hr(t),e=new ve;return{valueSignal:i,get value(){return i()},change:e,ngOnDestroy(){e.complete()}}}var Hve=(()=>{class t{_injector=ae(Ir);_defaultOptions=ae(Yyt,{optional:!0});_parentDialog=ae(t,{optional:!0,skipSelf:!0});_overlayContainer=ae(Wte);_idGenerator=ae(Tl);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Ai;_afterOpenedAtThisLevel=new Ai;_ariaHiddenElements=new Map;_scrollStrategy=ae($yt);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=lv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ks(void 0)));constructor(){}open(e,n){let r=this._defaultOptions||new Uk;n=pe(pe({},r),n),n.id=n.id||this._idGenerator.getId("cdk-dialog-"),n.id&&this.getDialogById(n.id);let o=this._getOverlayConfig(n),a=Bb(this._injector,o),c=new T7(a,n),m=this._attachContainer(a,c,n);if(c.containerInstance=m,!this.openDialogs.length){let g=this._overlayContainer.getContainerElement();m._focusTrapped?m._focusTrapped.pipe(ar(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(g)}):this._hideNonDialogContentFromAssistiveTechnology(g)}return this._attachDialogContent(e,c,m,n),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){zve(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){zve(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),zve(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let n=new Lb({positionStrategy:e.positionStrategy||zk().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&&(n.backdropClass=e.backdropClass),n}_attachContainer(e,n,r){let o=r.injector||r.viewContainerRef?.injector,a=[{provide:Uk,useValue:r},{provide:T7,useValue:n},{provide:v4,useValue:e}],c;r.container?typeof r.container=="function"?c=r.container:(c=r.container.type,a.push(...r.container.providers(r))):c=Uve;let m=new qh(c,r.viewContainerRef,Ir.create({parent:o||this._injector,providers:a}));return e.attach(m).instance}_attachDialogContent(e,n,r,o){if(e instanceof Bl){let a=this._createInjector(o,n,r,void 0),c={$implicit:o.data,dialogRef:n};o.templateContext&&(c=pe(pe({},c),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),r.attachTemplatePortal(new Yh(e,null,c,a))}else{let a=this._createInjector(o,n,r,this._injector),c=r.attachComponentPortal(new qh(e,o.viewContainerRef,a));n.componentRef=c,n.componentInstance=c.instance}}_createInjector(e,n,r,o){let a=e.injector||e.viewContainerRef?.injector,c=[{provide:qyt,useValue:e.data},{provide:T7,useValue:n}];return e.providers&&(typeof e.providers=="function"?c.push(...e.providers(n,e,r)):c.push(...e.providers)),e.direction&&(!a||!a.get(Du,null,{optional:!0}))&&c.push({provide:Du,useValue:Kyt(e.direction)}),Ir.create({parent:a||o,providers:c})}_removeOpenDialog(e,n){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,a)=>{o?a.setAttribute("aria-hidden",o):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let n=e.parentElement.children;for(let r=n.length-1;r>-1;r--){let o=n[r];o!==e&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zve(t,i){let e=t.length;for(;e--;)i(t[e])}var M5e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[Hve],imports:[vv,Vg,S7,Vg]})}return t})();function Kh(t){return t!=null&&`${t}`!="false"}var j_={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 Wyt=new Mi("MATERIAL_ANIMATIONS");var O5e=null;function E7(){return ae(Wyt,{optional:!0})?.animationsDisabled||ae(xk,{optional:!0})==="NoopAnimations"?"di-disabled":(O5e??=ae(Bte).matchMedia("(prefers-reduced-motion)").matches,O5e?"reduced-motion":"enabled")}function tl(){return E7()!=="enabled"}var Qyt=200,Xte=class{_letterKeyStream=new Ai;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new Ai;selectedItem=this._selectedItem;constructor(i,e){let n=typeof e?.debounceInterval=="number"?e.debounceInterval:Qyt;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(i),this._setupKeyHandler(n)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){let e=i.keyCode;i.key&&i.key.length===1?this._letterKeyStream.next(i.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(i){this._letterKeyStream.pipe(yo(e=>this._pressedLetters.push(e)),Hh(i),vn(()=>this._pressedLetters.length>0),ot(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let n=1;ni.disabled;constructor(i,e){this._items=i,i instanceof Uf?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):$S(i)&&(this._effectRef=tu(()=>this._itemsChanged(i()),{injector:e}))}tabOut=new Ai;change=new Ai;skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Xte(e,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:n=>this._skipPredicateFn(n)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(n=>{this.setActiveItem(n)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,e=10){return this._pageUpAndDown={enabled:i,delta:e},this}setActiveItem(i){let e=this._activeItem();this.updateActiveItem(i),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(i){let e=i.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!i[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex()+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(o-1&&n!==this._activeItemIndex()&&(this._activeItemIndex.set(n),this._typeahead?.setCurrentSelectedItemIndex(n))}}};var O7=class extends x4{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}};var ew=class extends x4{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};var N5e=" ";function $ve(t,i,e){let n=eie(t,i);e=e.trim(),!n.some(r=>r.trim()===e)&&(n.push(e),t.setAttribute(i,n.join(N5e)))}function tie(t,i,e){let n=eie(t,i);e=e.trim();let r=n.filter(o=>o!==e);r.length?t.setAttribute(i,r.join(N5e)):t.removeAttribute(i)}function eie(t,i){return t.getAttribute(i)?.match(/\S+/g)??[]}var F5e="cdk-describedby-message",Jte="cdk-describedby-host",jve=0,L5e=(()=>{class t{_platform=ae(_s);_document=ae(Gr);_messageRegistry=new Map;_messagesContainer=null;_id=`${jve++}`;constructor(){ae(pc).load(Nk),this._id=ae(Ck)+"-"+jve++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;let o=Gve(n,r);typeof n!="string"?(P5e(n,this._id),this._messageRegistry.set(o,{messageElement:n,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(n,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,n,r){if(!n||!this._isElementNode(e))return;let o=Gve(n,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),typeof n=="string"){let a=this._messageRegistry.get(o);a&&a.referenceCount===0&&this._deleteMessageElement(o)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${Jte}="${this._id}"]`);for(let n=0;nr.indexOf(F5e)!=0);e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){let r=this._messageRegistry.get(n);$ve(e,"aria-describedby",r.messageElement.id),e.setAttribute(Jte,this._id),r.referenceCount++}_removeMessageReference(e,n){let r=this._messageRegistry.get(n);r.referenceCount--,tie(e,"aria-describedby",r.messageElement.id),e.removeAttribute(Jte)}_isElementDescribedByMessage(e,n){let r=eie(e,"aria-describedby"),o=this._messageRegistry.get(n),a=o&&o.messageElement.id;return!!a&&r.indexOf(a)!=-1}_canBeDescribed(e,n){if(!this._isElementNode(e))return!1;if(n&&typeof n=="object")return!0;let r=n==null?"":`${n}`.trim(),o=e.getAttribute("aria-label");return r?!o||o.trim()!==r:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gve(t,i){return typeof t=="string"?`${i||""}/${t}`:t}function P5e(t,i){t.id||(t.id=`${F5e}-${i}-${jve++}`)}var _a=(()=>{class t{constructor(){ae(zte)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Lk,Lk]})}return t})();function Zyt(t,i){}var MP=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},qve="mdc-dialog--open",B5e="mdc-dialog--opening",V5e="mdc-dialog--closing",Xyt=150,Jyt=75,H5e=(()=>{class t extends Uve{_animationStateChanged=new ve;_animationsEnabled=!tl();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?U5e(this._config.enterAnimationDuration)??Xyt:0;_exitAnimationDuration=this._animationsEnabled?U5e(this._config.exitAnimationDuration)??Jyt:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(z5e,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(B5e,qve)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(qve),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(qve),this._animationsEnabled?(this._hostElement.style.setProperty(z5e,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(V5e)),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(B5e,V5e)}_waitForAnimationToComplete(e,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,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 n=super.attachComponentPortal(e);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,r){n&2&&(sa("id",r._config.id),lt("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),zn("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},features:[Tt],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(n,r){n&1&&(O(0,"div",0)(1,"div",1),ie(2,Zyt,0,0,"ng-template",2),M()())},dependencies:[Gp],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})(),z5e="--mat-dialog-transition-duration";function U5e(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?_v(t.substring(0,t.length-2)):t.endsWith("s")?_v(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var R7=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(R7||{}),Im=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new Ai;_beforeClosed=new Ai;_result;_closeFallbackTimeout;_state=R7.OPEN;_closeInteractionType;constructor(i,e,n){this._ref=i,this._config=e,this._containerInstance=n,this.disableClose=e.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(vn(r=>r.state==="opened"),ar(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(vn(r=>r.state==="closed"),ar(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Vp(this.backdropClick(),this.keydownEvents().pipe(vn(r=>r.keyCode===27&&!this.disableClose&&!Au(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Yve(this,r.type==="keydown"?"keyboard":"mouse"))})}close(i){let e=this._config.closePredicate;e&&!e(i,this._config,this.componentInstance)||(this._result=i,this._containerInstance._animationStateChanged.pipe(vn(n=>n.state==="closing"),ar(1)).subscribe(n=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),n.totalTime+100)}),this._state=R7.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(i){let e=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?e.left(i.left):e.right(i.right):e.centerHorizontally(),i&&(i.top||i.bottom)?i.top?e.top(i.top):e.bottom(i.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",e=""){return this._ref.updateSize(i,e),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=R7.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Yve(t,i,e){return t._closeInteractionType=i,t.close(e)}var Z0=new Mi("MatMdcDialogData"),G5e=new Mi("mat-mdc-dialog-default-options"),j5e=new Mi("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>C4(t)}}),ku=(()=>{class t{_defaultOptions=ae(G5e,{optional:!0});_scrollStrategy=ae(j5e);_parentDialog=ae(t,{optional:!0,skipSelf:!0});_idGenerator=ae(Tl);_injector=ae(Ir);_dialog=ae(Hve);_animationsDisabled=tl();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new Ai;_afterOpenedAtThisLevel=new Ai;dialogConfigClass=MP;_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=lv(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ks(void 0)));constructor(){this._dialogRefConstructor=Im,this._dialogContainerType=H5e,this._dialogDataToken=Z0}open(e,n){let r;n=pe(pe({},this._defaultOptions||new MP),n),n.id=n.id||this._idGenerator.getId("mat-mdc-dialog-"),n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,$e(pe({},n),{positionStrategy:zk(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||n.enterAnimationDuration?.toLocaleString()==="0"||n.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:Uk,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(a,c,m)=>(r=new this._dialogRefConstructor(a,n,m),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:m},{provide:this._dialogDataToken,useValue:c.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentRef=o.componentRef,r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(r);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let n=e.length;for(;n--;)e[n].close()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Kf=(()=>{class t{dialogRef=ae(Im,{optional:!0});_elementRef=ae(qn);_dialog=ae(ku);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=q5e(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){Yve(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,r){n&1&&te("click",function(a){return r._onButtonClick(a)}),n&2&<("aria-label",r.ariaLabel||null)("type",r.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Yt]})}return t})(),$5e=(()=>{class t{_dialogRef=ae(Im,{optional:!0});_elementRef=ae(qn);_dialog=ae(ku);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=q5e(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t})}return t})(),$_=(()=>{class t extends $5e{id=ae(Tl).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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,r){n&2&&sa("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Tt]})}return t})(),lh=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[BT([w7])]})}return t})(),bv=(()=>{class t extends $5e{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,r){n&2&&zn("mat-mdc-dialog-actions-align-start",r.align==="start")("mat-mdc-dialog-actions-align-center",r.align==="center")("mat-mdc-dialog-actions-align-end",r.align==="end")},inputs:{align:"align"},features:[Tt]})}return t})();function q5e(t,i){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?i.find(n=>n.id===e.id):null}var Kve=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[ku],imports:[M5e,vv,Vg,_a,_a]})}return t})();var iie=class{static getResponsiveConfig(){let i=new MP;return i.maxHeight="80vh",i.width=i.maxWidth="100%",i.height=i.maxHeight="100%",i.panelClass=["mat-dialog-container-fullscreen"],i}};var Tm=(()=>{class t{_breakpointObserver;_destroyed=new Ai;constructor(e){this._breakpointObserver=e}config(){return this._breakpointObserver.isMatched([j_.XSmall])?iie.getResponsiveConfig():{width:"80vw",maxHeight:"80vh"}}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static \u0275fac=function(n){return new(n||t)(ai(yv))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var nie=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[Tm]})}return t})();var rie=class{dialogTitle;dialogMessage;dialogSubmitButtonText;constructor(i,e,n){this.dialogTitle=i,this.dialogMessage=e,this.dialogSubmitButtonText=n}};var S4,Y5e=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Wve(){if(S4)return S4;if(typeof document!="object"||!document)return S4=new Set(Y5e),S4;let t=document.createElement("input");return S4=new Set(Y5e.filter(i=>(t.setAttribute("type",i),t.type===i))),S4}var q_=(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})(q_||{}),Qve=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=q_.HIDDEN;constructor(i,e,n,r=!1){this._renderer=i,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=r}fadeOut(){this._renderer.fadeOutRipple(this)}},K5e=Pk({passive:!0,capture:!0}),Zve=class{_events=new Map;addHandler(i,e,n,r){let o=this._events.get(e);if(o){let a=o.get(n);a?a.add(r):o.set(n,new Set([r]))}else this._events.set(e,new Map([[n,new Set([r])]])),i.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,K5e)})}removeHandler(i,e,n){let r=this._events.get(i);if(!r)return;let o=r.get(e);o&&(o.delete(n),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,K5e)))}_delegateEventHandler=i=>{let e=U_(i);e&&this._events.get(i.type)?.forEach((n,r)=>{(r===e||r.contains(e))&&n.forEach(o=>o.handleEvent(i))})}},P7={enterDuration:225,exitDuration:150},evt=800,W5e=Pk({passive:!0,capture:!0}),Q5e=["mousedown","touchstart"],Z5e=["mouseup","mouseleave","touchend","touchcancel"],tvt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(n,r){},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})(),OP=class t{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new Zve;constructor(i,e,n,r,o){this._target=i,this._ngZone=e,this._platform=r,r.isBrowser&&(this._containerElement=H_(n)),o&&o.get(pc).load(tvt)}fadeInRipple(i,e,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=pe(pe({},P7),n.animation);n.centered&&(i=r.left+r.width/2,e=r.top+r.height/2);let a=n.radius||ivt(i,e,r),c=i-r.left,m=e-r.top,g=o.enterDuration,C=document.createElement("div");C.classList.add("mat-ripple-element"),C.style.left=`${c-a}px`,C.style.top=`${m-a}px`,C.style.height=`${a*2}px`,C.style.width=`${a*2}px`,n.color!=null&&(C.style.backgroundColor=n.color),C.style.transitionDuration=`${g}ms`,this._containerElement.appendChild(C);let w=window.getComputedStyle(C),P=w.transitionProperty,R=w.transitionDuration,z=P==="none"||R==="0s"||R==="0s, 0s"||r.width===0&&r.height===0,H=new Qve(this,C,n,z);C.style.transform="scale3d(1, 1, 1)",H.state=q_.FADING_IN,n.persistent||(this._mostRecentTransientRipple=H);let j=null;return!z&&(g||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let K=()=>{j&&(j.fallbackTimer=null),clearTimeout(me),this._finishRippleTransition(H)},ne=()=>this._destroyRipple(H),me=setTimeout(ne,g+100);C.addEventListener("transitionend",K),C.addEventListener("transitioncancel",ne),j={onTransitionEnd:K,onTransitionCancel:ne,fallbackTimer:me}}),this._activeRipples.set(H,j),(z||!g)&&this._finishRippleTransition(H),H}fadeOutRipple(i){if(i.state===q_.FADING_OUT||i.state===q_.HIDDEN)return;let e=i.element,n=pe(pe({},P7),i.config.animation);e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",i.state=q_.FADING_OUT,(i._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(i)}fadeOutAll(){this._getActiveRipples().forEach(i=>i.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(i=>{i.config.persistent||i.fadeOut()})}setupTriggerEvents(i){let e=H_(i);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,Q5e.forEach(n=>{t._eventManager.addHandler(this._ngZone,n,e,this)}))}handleEvent(i){i.type==="mousedown"?this._onMousedown(i):i.type==="touchstart"?this._onTouchStart(i):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Z5e.forEach(e=>{this._triggerElement.addEventListener(e,this,W5e)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(i){i.state===q_.FADING_IN?this._startFadeOutTransition(i):i.state===q_.FADING_OUT&&this._destroyRipple(i)}_startFadeOutTransition(i){let e=i===this._mostRecentTransientRipple,{persistent:n}=i.config;i.state=q_.VISIBLE,!n&&(!e||!this._isPointerDown)&&i.fadeOut()}_destroyRipple(i){let e=this._activeRipples.get(i)??null;this._activeRipples.delete(i),this._activeRipples.size||(this._containerRect=null),i===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),i.state=q_.HIDDEN,e!==null&&(i.element.removeEventListener("transitionend",e.onTransitionEnd),i.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),i.element.remove()}_onMousedown(i){let e=TP(i),n=this._lastTouchStartEvent&&Date.now(){let e=i.state===q_.VISIBLE||i.config.terminateOnPointerUp&&i.state===q_.FADING_IN;!i.config.persistent&&e&&i.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let i=this._triggerElement;i&&(Q5e.forEach(e=>t._eventManager.removeHandler(e,i,this)),this._pointerUpEventsRegistered&&(Z5e.forEach(e=>i.removeEventListener(e,this,W5e)),this._pointerUpEventsRegistered=!1))}};function ivt(t,i,e){let n=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),r=Math.max(Math.abs(i-e.top),Math.abs(i-e.bottom));return Math.sqrt(n*n+r*r)}var Hk=new Mi("mat-ripple-global-options"),Wh=(()=>{class t{_elementRef=ae(qn);_animationsDisabled=tl();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=ae(Pn),n=ae(_s),r=ae(Hk,{optional:!0}),o=ae(Ir);this._globalOptions=r||{},this._rippleRenderer=new OP(this,e,this._elementRef,n,o)}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:pe(pe(pe({},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,n=0,r){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,n,pe(pe({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,pe(pe({},this.rippleConfig),e))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){n&2&&zn("mat-ripple-unbounded",r.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 nvt={capture:!0},rvt=["focus","mousedown","mouseenter","touchstart"],Xve="mat-ripple-loader-uninitialized",Jve="mat-ripple-loader-class-name",X5e="mat-ripple-loader-centered",oie="mat-ripple-loader-disabled",J5e=(()=>{class t{_document=ae(Gr);_animationsDisabled=tl();_globalRippleOptions=ae(Hk,{optional:!0});_platform=ae(_s);_ngZone=ae(Pn);_injector=ae(Ir);_eventCleanups;_hosts=new Map;constructor(){let e=ae(Jd).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>rvt.map(n=>e.listen(this._document,n,this._onInteraction,nvt)))}ngOnDestroy(){let e=this._hosts.keys();for(let n of e)this.destroyRipple(n);this._eventCleanups.forEach(n=>n())}configureRipple(e,n){e.setAttribute(Xve,this._globalRippleOptions?.namespace??""),(n.className||!e.hasAttribute(Jve))&&e.setAttribute(Jve,n.className||""),n.centered&&e.setAttribute(X5e,""),n.disabled&&e.setAttribute(oie,"")}setDisabled(e,n){let r=this._hosts.get(e);r?(r.target.rippleDisabled=n,!n&&!r.hasSetUpEvents&&(r.hasSetUpEvents=!0,r.renderer.setupTriggerEvents(e))):n?e.setAttribute(oie,""):e.removeAttribute(oie)}_onInteraction=e=>{let n=U_(e);if(n instanceof HTMLElement){let r=n.closest(`[${Xve}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let n=this._document.createElement("span");n.classList.add("mat-ripple",e.getAttribute(Jve)),e.append(n);let r=this._globalRippleOptions,o=this._animationsDisabled?0:r?.animation?.enterDuration??P7.enterDuration,a=this._animationsDisabled?0:r?.animation?.exitDuration??P7.exitDuration,c={rippleDisabled:this._animationsDisabled||r?.disabled||e.hasAttribute(oie),rippleConfig:{centered:e.hasAttribute(X5e),terminateOnPointerUp:r?.terminateOnPointerUp,animation:{enterDuration:o,exitDuration:a}}},m=new OP(c,this._ngZone,n,this._platform,this._injector),g=!c.rippleDisabled;g&&m.setupTriggerEvents(e),this._hosts.set(e,{target:c,renderer:m,hasSetUpEvents:g}),e.removeAttribute(Xve)}destroyRipple(e){let n=this._hosts.get(e);n&&(n.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var gp=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(n,r){},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 ovt=["mat-icon-button",""],avt=["*"],tUe=new Mi("MAT_BUTTON_CONFIG");function eUe(t){return t==null?void 0:En(t)}var ebe=(()=>{class t{_elementRef=ae(qn);_ngZone=ae(Pn);_animationsDisabled=tl();_config=ae(tUe,{optional:!0});_focusMonitor=ae(wm);_cleanupClick;_renderer=ae(Ma);_rippleLoader=ae(J5e);_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(){ae(pc).load(gp);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",n){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,n):this._elementRef.nativeElement.focus(n)}_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(n){return new(n||t)};static \u0275dir=hn({type:t,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(n,r){n&2&&(lt("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled())("tabindex",r._getTabIndex()),Pe(r.color?"mat-"+r.color:""),zn("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("mat-unthemed",!r.color)("_mat-animation-noopable",r._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",eUe],_tabindex:[2,"tabindex","_tabindex",eUe]}})}return t})(),il=(()=>{class t extends ebe{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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:[Tt],attrs:ovt,ngContentSelectors:avt,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(n,r){n&1&&(Kn(),Cr(0,"span",0),Sn(1),Cr(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})(),RP=il;var tw=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_a]})}return t})();var svt=["matButton",""],lvt=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],cvt=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var iUe=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"]]]),Kr=(()=>{class t extends ebe{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=dvt(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let n=this._elementRef.nativeElement.classList,r=this._appearance?iUe.get(this._appearance):null,o=iUe.get(e);r&&n.remove(...r),n.add(...o),this._appearance=e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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:[Tt],attrs:svt,ngContentSelectors:cvt,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(n,r){n&1&&(Kn(lvt),Cr(0,"span",0),Sn(1),vo(2,"span",1),Sn(3,1),So(),Sn(4,2),Cr(5,"span",2)(6,"span",3)),n&2&&zn("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._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 dvt(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 iw=Kr;var so=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,tw,_a]})}return t})();var nUe=(()=>{class t{data;constructor(e){this.data=e}static \u0275fac=function(n){return new(n||t)(xe(Z0))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"h1",0),ee(1),M(),O(2,"mat-dialog-content"),ee(3),M(),O(4,"mat-dialog-actions",1)(5,"button",2),ee(6,"Abbrechen"),M(),O(7,"button",3),ee(8),M()()),n&2&&(E(),gn(" ",r.data.dialogTitle," "),E(2),gn(" ",r.data.dialogMessage," "),E(),D("align","end"),E(3),D("mat-dialog-close",!0),E(),gn(" ",r.data.dialogSubmitButtonText," "))},dependencies:[$_,lh,bv,so,Kr,Kf],styles:["*[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}"]})}return t})();var Vb=(()=>{class t{dialog;constructor(e){this.dialog=e}get(e="Objekt l\xF6schen",n="Best\xE4tigen um das Objekt endg\xFCltig zu l\xF6schen.",r="L\xF6schen"){let o={data:new rie(e,n,r)},a=this.dialog.open(nUe,o);return ym(a.afterClosed())}static \u0275fac=function(n){return new(n||t)(ai(ku))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var uvt=["*"],N7=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-flat-error"]],ngContentSelectors:uvt,decls:2,vars:0,consts:[[1,"bd-error","bd-warn-text","bd-flat-error"]],template:function(n,r){n&1&&(Kn(),vo(0,"span",0),Sn(1),So())},styles:[".bd-error[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;font-size:1em;font-weight:500}"]})}return t})();var rUe={type:"relative",labelClass:"mat-subheading",rateClass:"mat-headline",hideLabels:!1,format:"1.0-1",valueJudgementPositive:"good"};var pvt=t=>({inactive:t});function mvt(t,i){if(t&1&&(O(0,"div",1),ee(1),M()),t&2){let e=L(2);D("ngClass",e.config.labelClass),E(),Pd(" ",e.base.displayName," - ",e.comparator.displayName," ")}}function hvt(t,i){t&1&&(O(0,"span",3),ee(1,"n/a"),M())}function fvt(t,i){if(t&1&&(O(0,"span",4),ee(1,"~"),M(),O(2,"span",5),ee(3,"-"),M(),O(4,"span",6),ee(5,"+"),M(),O(6,"span"),ee(7),Dr(8,"percent"),M()),t&2){let e=L(3);E(7),gn(" ",gl(8,1,e.growthRate,e.config.format)," ")}}function gvt(t,i){if(t&1&&(O(0,"span",4),ee(1,"~"),M(),O(2,"span",5),ee(3,"-"),M(),O(4,"span",6),ee(5,"+"),M(),O(6,"span"),ee(7),Dr(8,"number"),M()),t&2){let e=L(3);E(7),gn(" ",gl(8,1,e.growthRate,e.config.format)," ")}}function _vt(t,i){if(t&1&&yt(0,fvt,9,4)(1,gvt,9,4),t&2){let e=L(2);vt(e.config.type==="relative"?0:1)}}function yvt(t,i){if(t&1&&(O(0,"div",0),yt(1,mvt,2,3,"div",1),O(2,"div",2),yt(3,hvt,2,0,"span",3),yt(4,_vt,2,1),M()()),t&2){let e=L();D("ngClass",Yi(5,pvt,!e.base.value||!e.comparator.value)),E(),vt(e.config.hideLabels?-1:1),E(),D("ngClass",e.growthRateClasses),E(),vt(!e.growthRate&&e.growthRate!==0?3:-1),E(),vt(e.growthRate!==null?4:-1)}}var tbe=(()=>{class t{comparator;base;config=rUe;growthRate=null;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?i[1].length:0}function nbe(t,i){return 100/(i-t)}function ibe(t,i,e){return i*100/(t[e+1]-t[e])}function xvt(t,i){return ibe(t,t[0]<0?i+Math.abs(t[0]):i-t[0],0)}function Svt(t,i){return i*(t[1]-t[0])/100+t[0]}function F7(t,i){for(var e=1;t>=i[e];)e+=1;return e}function wvt(t,i,e){if(e>=t.slice(-1)[0])return 100;var n=F7(e,t),r=t[n-1],o=t[n],a=i[n-1],c=i[n];return a+xvt([r,o],e)/nbe(a,c)}function Ivt(t,i,e){if(e>=100)return t.slice(-1)[0];var n=F7(e,i),r=t[n-1],o=t[n],a=i[n-1],c=i[n];return Svt([r,o],(e-a)*nbe(a,c))}function Tvt(t,i,e,n){if(n===100)return n;var r=F7(n,t),o=t[r-1],a=t[r];return e?n-o>(a-o)/2?a:o:i[r-1]?t[r-1]+vvt(n-t[r-1],i[r-1]):n}var A8i=(function(){function t(i,e,n){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.snap=e;var r,o=[];for(Object.keys(i).forEach(function(a){o.push([bvt(i[a]),a])}),o.sort(function(a,c){return a[0][0]-c[0][0]}),r=0;rthis.xPct[r+1];)r++;else i===this.xPct[this.xPct.length-1]&&(r=this.xPct.length-2);!n&&i===this.xPct[r+1]&&r++,e===null&&(e=[]);var o,a=1,c=e[r],m=0,g=0,C=0,w=0;for(n?o=(i-this.xPct[r])/(this.xPct[r+1]-this.xPct[r]):o=(this.xPct[r+1]-i)/(this.xPct[r+1]-this.xPct[r]);c>0;)m=this.xPct[r+1+w]-this.xPct[r+w],e[r+w]*a+100-o*100>100?(g=m*o,a=(c-100*o)/e[r+w],o=1):(g=e[r+w]*m/100*a,a=0),n?(C=C-g,this.xPct.length+w>=1&&w--):(C=C+g,this.xPct.length-w>=1&&w++),c=e[r+w]*a;return i+C},t.prototype.toStepping=function(i){return i=wvt(this.xVal,this.xPct,i),i},t.prototype.fromStepping=function(i){return Ivt(this.xVal,this.xPct,i)},t.prototype.getStep=function(i){return i=Tvt(this.xPct,this.xSteps,this.snap,i),i},t.prototype.getDefaultStep=function(i,e,n){var r=F7(i,this.xPct);return(i===100||e&&i===this.xPct[r-1])&&(r=Math.max(r-1,1)),(this.xVal[r]-this.xVal[r-1])/n},t.prototype.getNearbySteps=function(i){var e=F7(i,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 i=this.xNumSteps.map(Cvt);return Math.max.apply(null,i)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(i){return this.getStep(this.toStepping(i))},t.prototype.handleEntryPoint=function(i,e){var n;if(i==="min"?n=0:i==="max"?n=100:n=parseFloat(i),!oUe(n)||!oUe(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(n),this.xVal.push(e[0]);var r=Number(e[1]);n?this.xSteps.push(isNaN(r)?!1:r):isNaN(r)||(this.xSteps[0]=r),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(i,e){if(e){if(this.xVal[i]===this.xVal[i+1]){this.xSteps[i]=this.xHighestCompleteStep[i]=this.xVal[i];return}this.xSteps[i]=ibe([this.xVal[i],this.xVal[i+1]],e,0)/nbe(this.xPct[i],this.xPct[i+1]);var n=(this.xVal[i+1]-this.xVal[i])/this.xNumSteps[i],r=Math.ceil(Number(n.toFixed(3))-1),o=this.xVal[i]+this.xNumSteps[i]*r;this.xHighestCompleteStep[i]=o}},t})();var pUe=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,n){this._renderer=e,this._elementRef=n}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(n){return new(n||t)(xe(Ma),xe(qn))};static \u0275dir=hn({type:t})}return t})(),mUe=(()=>{class t extends pUe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,features:[Tt]})}return t})(),Wc=new Mi("");var Avt={provide:Wc,useExisting:No(()=>nd),multi:!0};function Dvt(){let t=mv()?mv().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var kvt=new Mi(""),nd=(()=>{class t extends pUe{_compositionMode;_composing=!1;constructor(e,n,r){super(e,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Dvt())}writeValue(e){let n=e??"";this.setProperty("value",n)}_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(n){return new(n||t)(xe(Ma),xe(qn),xe(kvt,8))};static \u0275dir=hn({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(n,r){n&1&&te("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[Ii([Avt]),Tt]})}return t})();function obe(t){return t==null||abe(t)===0}function abe(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Lx=new Mi(""),G7=new Mi(""),Mvt=/^(?=.{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])?)*$/,La=class{static min(i){return hUe(i)}static max(i){return Ovt(i)}static required(i){return fUe(i)}static requiredTrue(i){return Rvt(i)}static email(i){return Pvt(i)}static minLength(i){return Nvt(i)}static maxLength(i){return Fvt(i)}static pattern(i){return Lvt(i)}static nullValidator(i){return sie()}static compose(i){return CUe(i)}static composeAsync(i){return xUe(i)}};function hUe(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function fUe(t){return obe(t.value)?{required:!0}:null}function Rvt(t){return t.value===!0?null:{required:!0}}function Pvt(t){return obe(t.value)||Mvt.test(t.value)?null:{email:!0}}function Nvt(t){return i=>{let e=i.value?.length??abe(i.value);return e===null||e===0?null:e{let e=i.value?.length??abe(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function Lvt(t){if(!t)return sie;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),n=>{if(obe(n.value))return null;let r=n.value;return i.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function sie(t){return null}function gUe(t){return t!=null}function _Ue(t){return zT(t)?Hr(t):t}function yUe(t){let i={};return t.forEach(e=>{i=e!=null?pe(pe({},i),e):i}),Object.keys(i).length===0?null:i}function vUe(t,i){return i.map(e=>e(t))}function Bvt(t){return!t.validate}function bUe(t){return t.map(i=>Bvt(i)?i:e=>i.validate(e))}function CUe(t){if(!t)return null;let i=t.filter(gUe);return i.length==0?null:function(e){return yUe(vUe(e,i))}}function sbe(t){return t!=null?CUe(bUe(t)):null}function xUe(t){if(!t)return null;let i=t.filter(gUe);return i.length==0?null:function(e){let n=vUe(e,i).map(_Ue);return Ys(n).pipe(ot(yUe))}}function lbe(t){return t!=null?xUe(bUe(t)):null}function aUe(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function SUe(t){return t._rawValidators}function wUe(t){return t._rawAsyncValidators}function rbe(t){return t?Array.isArray(t)?t:[t]:[]}function lie(t,i){return Array.isArray(t)?t.includes(i):t===i}function sUe(t,i){let e=rbe(i);return rbe(t).forEach(r=>{lie(e,r)||e.push(r)}),e}function lUe(t,i){return rbe(i).filter(e=>!lie(t,e))}var cie=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(i){this._rawValidators=i||[],this._composedValidatorFn=sbe(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=lbe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},Fx=class extends cie{name;get formDirective(){return null}get path(){return null}},$p=class extends cie{_parent=null;name=null;valueAccessor=null},die=class{_cd;constructor(i){this._cd=i}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}},Vvt={"[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"},J8i=$e(pe({},Vvt),{"[class.ng-submitted]":"isSubmitted"}),yr=(()=>{class t extends die{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(xe($p,2))};static \u0275dir=hn({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&zn("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Tt]})}return t})(),Em=(()=>{class t extends die{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(xe(Fx,10))};static \u0275dir=hn({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&zn("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[Tt]})}return t})();var L7="VALID",aie="INVALID",w4="PENDING",B7="DISABLED",Gk=class{},uie=class extends Gk{value;source;constructor(i,e){super(),this.value=i,this.source=e}},z7=class extends Gk{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},U7=class extends Gk{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},I4=class extends Gk{status;source;constructor(i,e){super(),this.status=i,this.source=e}},pie=class extends Gk{source;constructor(i){super(),this.source=i}},mie=class extends Gk{source;constructor(i){super(),this.source=i}};function IUe(t){return(yie(t)?t.validators:t)||null}function zvt(t){return Array.isArray(t)?sbe(t):t||null}function TUe(t,i){return(yie(i)?i.asyncValidators:t)||null}function Uvt(t){return Array.isArray(t)?lbe(t):t||null}function yie(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function Hvt(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new Nn(1e3,"");if(!n[e])throw new Nn(1001,"")}function Gvt(t,i,e){t._forEachChild((n,r)=>{if(e[r]===void 0)throw new Nn(1002,"")})}var hie=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return Eu(this.statusReactive)}set status(i){Eu(()=>this.statusReactive.set(i))}_status=Or(()=>this.statusReactive());statusReactive=hr(void 0);get valid(){return this.status===L7}get invalid(){return this.status===aie}get pending(){return this.status==w4}get disabled(){return this.status===B7}get enabled(){return this.status!==B7}errors;get pristine(){return Eu(this.pristineReactive)}set pristine(i){Eu(()=>this.pristineReactive.set(i))}_pristine=Or(()=>this.pristineReactive());pristineReactive=hr(!0);get dirty(){return!this.pristine}get touched(){return Eu(this.touchedReactive)}set touched(i){Eu(()=>this.touchedReactive.set(i))}_touched=Or(()=>this.touchedReactive());touchedReactive=hr(!1);get untouched(){return!this.touched}_events=new Ai;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(sUe(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(sUe(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(lUe(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(lUe(i,this._rawAsyncValidators))}hasValidator(i){return lie(this._rawValidators,i)}hasAsyncValidator(i){return lie(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched($e(pe({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new U7(!0,n))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),e&&i.emitEvent!==!1&&this._events.next(new U7(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty($e(pe({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new z7(!1,n))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),e&&i.emitEvent!==!1&&this._events.next(new z7(!0,n))}markAsPending(i={}){this.status=w4;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new I4(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending($e(pe({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=B7,this.errors=null,this._forEachChild(r=>{r.disable($e(pe({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new uie(this.value,n)),this._events.next(new I4(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors($e(pe({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=L7,this._forEachChild(n=>{n.enable($e(pe({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors($e(pe({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===L7||this.status===w4)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new uie(this.value,e)),this._events.next(new I4(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity($e(pe({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?B7:L7}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=w4,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=_Ue(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(i,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new I4(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new ve,this.statusChanges=new ve}_calculateStatus(){return this._allControlsDisabled()?B7:this.errors?aie:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(w4)?w4:this._anyControlsHaveStatus(aie)?aie:L7}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),r&&this._events.next(new z7(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new U7(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){yie(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=zvt(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Uvt(this._rawAsyncValidators)}},Mu=class extends hie{constructor(i,e,n){super(IUe(e),TUe(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){Gvt(this,!0,i),Object.keys(i).forEach(n=>{Hvt(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(n=>{let r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(i,e){let n=i;return this._forEachChild((r,o)=>{n=e(n,r,o)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var T4=new Mi("",{providedIn:"root",factory:()=>vie}),vie="always";function EUe(t,i){return[...i.path,t]}function H7(t,i,e=vie){cbe(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),$vt(t,i),Yvt(t,i),qvt(t,i),jvt(t,i)}function fie(t,i,e=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),_ie(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function gie(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function jvt(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function cbe(t,i){let e=SUe(t);i.validator!==null?t.setValidators(aUe(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=wUe(t);i.asyncValidator!==null?t.setAsyncValidators(aUe(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let r=()=>t.updateValueAndValidity();gie(i._rawValidators,r),gie(i._rawAsyncValidators,r)}function _ie(t,i){let e=!1;if(t!==null){if(i.validator!==null){let r=SUe(t);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==i.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(i.asyncValidator!==null){let r=wUe(t);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==i.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}let n=()=>{};return gie(i._rawValidators,n),gie(i._rawAsyncValidators,n),e}function $vt(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&AUe(t,i)})}function qvt(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&AUe(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function AUe(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Yvt(t,i){let e=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function DUe(t,i){t==null,cbe(t,i)}function Kvt(t,i){return _ie(t,i)}function dbe(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function Wvt(t){return Object.getPrototypeOf(t.constructor)===mUe}function kUe(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function ube(t,i){if(!i)return null;Array.isArray(i);let e,n,r;return i.forEach(o=>{o.constructor===nd?e=o:Wvt(o)?n=o:r=o}),r||n||e||null}function Qvt(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var Zvt={provide:Fx,useExisting:No(()=>j7)},V7=Promise.resolve(),j7=(()=>{class t extends Fx{callSetDisabledState;get submitted(){return Eu(this.submittedReactive)}_submitted=Or(()=>this.submittedReactive());submittedReactive=hr(!1);_directives=new Set;form;ngSubmit=new ve;options;constructor(e,n,r){super(),this.callSetDisabledState=r,this.form=new Mu({},sbe(e),lbe(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){V7.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),H7(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){V7.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){V7.then(()=>{let n=this._findContainer(e.path),r=new Mu({});DUe(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){V7.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){V7.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),kUe(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new pie(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 mie(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(n){return new(n||t)(xe(Lx,10),xe(G7,10),xe(T4,8))};static \u0275dir=hn({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&te("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Ii([Zvt]),Tt]})}return t})();function cUe(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function dUe(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var ho=class extends hie{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(IUe(e),TUe(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),yie(e)&&(e.nonNullable||e.initialValueIsDefault)&&(dUe(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){cUe(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){cUe(this._onDisabledChange,i)}_forEachChild(i){}_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(i){dUe(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},MUe=ho,Xvt=t=>t instanceof ho;var Jvt={provide:$p,useExisting:No(()=>ya)},uUe=Promise.resolve(),ya=(()=>{class t extends $p{_changeDetectorRef;callSetDisabledState;control=new ho;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ve;constructor(e,n,r,o,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=ube(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),dbe(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(){H7(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){uUe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,r=n!==0&&Je(n);uUe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?EUe(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(xe(Fx,9),xe(Lx,10),xe(G7,10),xe(Wc,10),xe(dn,8),xe(T4,8))};static \u0275dir=hn({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:[Ii([Jvt]),Tt,Yt]})}return t})();var Am=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),ebt={provide:Wc,useExisting:No(()=>YT),multi:!0},YT=(()=>{class t extends mUe{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&te("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Ii([ebt]),Tt]})}return t})();var pbe=new Mi(""),tbt={provide:$p,useExisting:No(()=>Mc)},Mc=(()=>{class t extends $p{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new ve;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=ube(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&fie(n,this,!1),H7(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}dbe(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&fie(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(n){return new(n||t)(xe(Lx,10),xe(G7,10),xe(Wc,10),xe(pbe,8),xe(T4,8))};static \u0275dir=hn({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:[Ii([tbt]),Tt,Yt]})}return t})(),ibt={provide:Fx,useExisting:No(()=>Xu)},Xu=(()=>{class t extends Fx{callSetDisabledState;get submitted(){return Eu(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Or(()=>this._submittedReactive());_submittedReactive=hr(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new ve;constructor(e,n,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(_ie(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 n=this.form.get(e.path);return H7(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){fie(e.control||null,e,!1),Qvt(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,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),kUe(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new pie(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,n={}){this.form.reset(e,n),this._submittedReactive.set(!1),n?.emitEvent!==!1&&this.form._events.next(new mie(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,r=this.form.get(e.path);n!==r&&(fie(n||null,e),Xvt(r)&&(H7(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);DUe(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&Kvt(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){cbe(this.form,this),this._oldForm&&_ie(this._oldForm,this)}static \u0275fac=function(n){return new(n||t)(xe(Lx,10),xe(G7,10),xe(T4,8))};static \u0275dir=hn({type:t,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&te("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Ii([ibt]),Tt,Yt]})}return t})();var nbt={provide:$p,useExisting:No(()=>Y_)},Y_=(()=>{class t extends $p{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new ve;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=ube(this,o)}ngOnChanges(e){this._added||this._setUpControl(),dbe(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 EUe(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(n){return new(n||t)(xe(Fx,13),xe(Lx,10),xe(G7,10),xe(Wc,10),xe(pbe,8))};static \u0275dir=hn({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[Ii([nbt]),Tt,Yt]})}return t})();function rbt(t){return typeof t=="number"?t:parseFloat(t)}var OUe=(()=>{class t{_validator=sie;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):sie,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,features:[Yt]})}return t})();var obt={provide:Lx,useExisting:No(()=>mbe),multi:!0},mbe=(()=>{class t extends OUe{min;inputName="min";normalizeInput=e=>rbt(e);createValidator=e=>hUe(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&<("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[Ii([obt]),Tt]})}return t})(),abt={provide:Lx,useExisting:No(()=>Bx),multi:!0};var Bx=(()=>{class t extends OUe{required;inputName="required";normalizeInput=Je;createValidator=e=>fUe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){n&2&<("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[Ii([abt]),Tt]})}return t})();var RUe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var ra=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:T4,useValue:e.callSetDisabledState??vie}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[RUe]})}return t})(),oa=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:pbe,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:T4,useValue:e.callSetDisabledState??vie}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[RUe]})}return t})();function E4(...t){if(t){let i=[];for(let e=0;ec?a:void 0);i=o.length?i.concat(o.filter(a=>!!a)):i}}return i.join(" ").trim()}}function Cd(t,i){return t?t.classList?t.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(t.className):!1}function nu(t,i){if(t&&i){let e=n=>{Cd(t,n)||(t.classList?t.classList.add(n):t.className+=" "+n)};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(e))}}function sbt(){return window.innerWidth-document.documentElement.offsetWidth}function PUe(t){typeof t=="string"?nu(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.setProperty(t.variableName,sbt()+"px"),nu(document.body,t?.className||"p-overflow-hidden"))}function qp(t,i){if(t&&i){let e=n=>{t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(e))}}function NUe(t){typeof t=="string"?qp(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.removeProperty(t.variableName),qp(document.body,t?.className||"p-overflow-hidden"))}function $7(t){for(let i of document?.styleSheets)try{for(let e of i?.cssRules)for(let n of e?.style)if(t.test(n))return{name:n,value:e.style.getPropertyValue(n).trim()}}catch{}return null}function FUe(t){let i={width:0,height:0};if(t){let[e,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block",i.width=t.offsetWidth,i.height=t.offsetHeight,t.style.display=n,t.style.visibility=e}return i}function jk(){let t=window,i=document,e=i.documentElement,n=i.getElementsByTagName("body")[0],r=t.innerWidth||e.clientWidth||n.clientWidth,o=t.innerHeight||e.clientHeight||n.clientHeight;return{width:r,height:o}}function gbe(t){return t?Math.abs(t.scrollLeft):0}function _be(){let t=document.documentElement;return(window.pageXOffset||gbe(t))-(t.clientLeft||0)}function ybe(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function bie(t){return t?getComputedStyle(t).direction==="rtl":!1}function Cie(t,i,e=!0){var n,r,o,a;if(t){let c=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:FUe(t),m=c.height,g=c.width,C=i.offsetHeight,w=i.offsetWidth,P=i.getBoundingClientRect(),R=ybe(),z=_be(),H=jk(),j,K,ne="top";P.top+C+m>H.height?(j=P.top+R-m,ne="bottom",j<0&&(j=R)):j=C+P.top+R,P.left+g>H.width?K=Math.max(0,P.left+z+w-g):K=P.left+z,bie(t)?t.style.insetInlineEnd=K+"px":t.style.insetInlineStart=K+"px",t.style.top=j+"px",t.style.transformOrigin=ne,e&&(t.style.marginTop=ne==="bottom"?`calc(${(r=(n=$7(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(a=(o=$7(/-anchor-gutter$/))==null?void 0:o.value)!=null?a:"")}}function A4(t,i){t&&(typeof i=="string"?t.style.cssText=i:Object.entries(i||{}).forEach(([e,n])=>t.style[e]=n))}function Nd(t,i){if(t instanceof HTMLElement){let e=t.offsetWidth;if(i){let n=getComputedStyle(t);e+=parseFloat(n.marginLeft)+parseFloat(n.marginRight)}return e}return 0}function xie(t,i,e=!0,n=void 0){var r;if(t){let o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:FUe(t),a=i.offsetHeight,c=i.getBoundingClientRect(),m=jk(),g,C,w=n??"top";if(!n&&c.top+a+o.height>m.height?(g=-1*o.height,w="bottom",c.top+g<0&&(g=-1*c.top)):g=a,o.width>m.width?C=c.left*-1:c.left+o.width>m.width?C=(c.left+o.width-m.width)*-1:C=0,t.style.top=g+"px",t.style.insetInlineStart=C+"px",t.style.transformOrigin=w,e){let P=(r=$7(/-anchor-gutter$/))==null?void 0:r.value;t.style.marginTop=w==="bottom"?`calc(${P??"2px"} * -1)`:P??""}}}function LUe(t){if(t){let i=t.parentNode;return i&&i instanceof ShadowRoot&&i.host&&(i=i.host),i}return null}function lbt(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&LUe(t))}function D4(t){return typeof Element<"u"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}function BUe(t){let i=t;return t&&typeof t=="object"&&(Object.hasOwn(t,"current")?i=t.current:Object.hasOwn(t,"el")&&(Object.hasOwn(t.el,"nativeElement")?i=t.el.nativeElement:i=t.el)),D4(i)?i:void 0}function vbe(t,i){var e,n,r;if(t)switch(t){case"document":return document;case"window":return window;case"body":return document.body;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@first":return i?.firstElementChild;case"@last":return i?.lastElementChild;case"@child":return(e=i?.children)==null?void 0:e[0];case"@parent":return i?.parentElement;case"@grandparent":return(n=i?.parentElement)==null?void 0:n.parentElement;default:{if(typeof t=="string"){let c=t.match(/^@child\[(\d+)]/);return c?((r=i?.children)==null?void 0:r[parseInt(c[1],10)])||null:document.querySelector(t)||null}let o=(c=>typeof c=="function"&&"call"in c&&"apply"in c)(t)?t():t,a=BUe(o);return lbt(a)?a:o?.nodeType===9?o:void 0}}}function KT(t,i){let e=vbe(t,i);if(e)e.appendChild(i);else throw new Error("Cannot append "+i+" to "+t)}var hbe;function VUe(t){if(t){let i=getComputedStyle(t);return t.offsetHeight-t.clientHeight-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)}else{if(hbe!=null)return hbe;let i=document.createElement("div");A4(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let e=i.offsetHeight-i.clientHeight;return document.body.removeChild(i),hbe=e,e}}var fbe;function q7(t){if(t){let i=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(fbe!=null)return fbe;let i=document.createElement("div");A4(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let e=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),fbe=e,e}}function zUe(){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 Sie(t,i={}){if(D4(t)){let e=(n,r)=>{var o,a;let c=(o=t?.$attrs)!=null&&o[n]?[(a=t?.$attrs)==null?void 0:a[n]]:[];return[r].flat().reduce((m,g)=>{if(g!=null){let C=typeof g;if(C==="string"||C==="number")m.push(g);else if(C==="object"){let w=Array.isArray(g)?e(n,g):Object.entries(g).map(([P,R])=>n==="style"&&(R||R===0)?`${P.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${R}`:R?P:void 0);m=w.length?m.concat(w.filter(P=>!!P)):m}}return m},c)};Object.entries(i).forEach(([n,r])=>{if(r!=null){let o=n.match(/^on(.+)/);o?t.addEventListener(o[1].toLowerCase(),r):n==="p-bind"||n==="pBind"?Sie(t,r):(r=n==="class"?[...new Set(e("class",r))].join(" ").trim():n==="style"?e("style",r).join(";").trim():r,(t.$attrs=t.$attrs||{})&&(t.$attrs[n]=r),t.setAttribute(n,r))}})}}function UUe(t,i={},...e){if(t){let n=document.createElement(t);return Sie(n,i),n.append(...e),n}}function HUe(t,i){if(t){t.style.opacity="0";let e=+new Date,n="0",r=function(){n=`${+t.style.opacity+(new Date().getTime()-e)/i}`,t.style.opacity=n,e=+new Date,+n<1&&("requestAnimationFrame"in window?requestAnimationFrame(r):setTimeout(r,16))};r()}}function Yp(t,i){return D4(t)?Array.from(t.querySelectorAll(i)):[]}function $r(t,i){return D4(t)?t.matches(i)?t:t.querySelector(i):null}function Ba(t,i){t&&document.activeElement!==t&&t.focus(i)}function Qh(t,i){if(D4(t)){let e=t.getAttribute(i);return isNaN(e)?e==="true"||e==="false"?e==="true":e:+e}}function WT(t,i=""){let e=Yp(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [href]:not([tabindex = "-1"]):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}`),n=[];for(let r of e)getComputedStyle(r).display!="none"&&getComputedStyle(r).visibility!="hidden"&&n.push(r);return n}function k4(t,i){let e=WT(t,i);return e.length>0?e[0]:null}function nw(t){if(t){let i=t.offsetHeight,e=getComputedStyle(t);return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),i}return 0}function bbe(t){if(t){let[i,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let n=t.offsetHeight;return t.style.display=e,t.style.visibility=i,n}return 0}function Cbe(t){if(t){let[i,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let n=t.offsetWidth;return t.style.display=e,t.style.visibility=i,n}return 0}function rw(t){var i;if(t){let e=(i=LUe(t))==null?void 0:i.childNodes,n=0;if(e)for(let r=0;r0?e[e.length-1]:null}function Vx(t){if(t){let i=t.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||gbe(document.documentElement)||gbe(document.body)||0)}}return{top:"auto",left:"auto"}}function zg(t,i){if(t){let e=t.offsetHeight;if(i){let n=getComputedStyle(t);e+=parseFloat(n.marginTop)+parseFloat(n.marginBottom)}return e}return 0}function GUe(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function K_(t){if(t){let i=t.offsetWidth,e=getComputedStyle(t);return i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth),i}return 0}function xbe(t){return!!(t&&t.offsetParent!=null)}function zb(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function jUe(t,i){var e,n;if(t){let r=t.parentElement,o=Vx(r),a=jk(),c=t.offsetParent?t.offsetWidth:Cbe(t),m=t.offsetParent?t.offsetHeight:bbe(t),g=Nd((e=r?.children)==null?void 0:e[0]),C=zg((n=r?.children)==null?void 0:n[0]),w="",P="";o.left+g+c>a.width-q7()?o.lefta.height?P=`-${m-C}px`:P="0px",t.style.top=P,t.style.insetInlineStart=w}}function $Ue(t){var i;t&&("remove"in Element.prototype?t.remove():(i=t.parentNode)==null||i.removeChild(t))}function qUe(t,i){let e=BUe(t);if(e)e.removeChild(i);else throw new Error("Cannot remove "+i+" from "+t)}function YUe(t,i){let e=getComputedStyle(t).getPropertyValue("borderTopWidth"),n=e?parseFloat(e):0,r=getComputedStyle(t).getPropertyValue("paddingTop"),o=r?parseFloat(r):0,a=t.getBoundingClientRect(),c=i.getBoundingClientRect().top+document.body.scrollTop-(a.top+document.body.scrollTop)-n-o,m=t.scrollTop,g=t.clientHeight,C=zg(i);c<0?t.scrollTop=m+c:c+C>g&&(t.scrollTop=m+c-g+C)}function $k(t,i="",e){D4(t)&&e!==null&&e!==void 0&&t.setAttribute(i,e)}function KUe(){let t=new Map;return{on(i,e){let n=t.get(i);return n?n.push(e):n=[e],t.set(i,n),this},off(i,e){let n=t.get(i);return n&&n.splice(n.indexOf(e)>>>0,1),this},emit(i,e){let n=t.get(i);n&&n.forEach(r=>{r(e)})},clear(){t.clear()}}}var cbt=Object.defineProperty,WUe=Object.getOwnPropertySymbols,dbt=Object.prototype.hasOwnProperty,ubt=Object.prototype.propertyIsEnumerable,QUe=(t,i,e)=>i in t?cbt(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,pbt=(t,i)=>{for(var e in i||(i={}))dbt.call(i,e)&&QUe(t,e,i[e]);if(WUe)for(var e of WUe(i))ubt.call(i,e)&&QUe(t,e,i[e]);return t};function ru(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function Sbe(t,i,e=new WeakSet){if(t===i)return!0;if(!t||!i||typeof t!="object"||typeof i!="object"||e.has(t)||e.has(i))return!1;e.add(t).add(i);let n=Array.isArray(t),r=Array.isArray(i),o,a,c;if(n&&r){if(a=t.length,a!=i.length)return!1;for(o=a;o--!==0;)if(!Sbe(t[o],i[o],e))return!1;return!0}if(n!=r)return!1;let m=t instanceof Date,g=i instanceof Date;if(m!=g)return!1;if(m&&g)return t.getTime()==i.getTime();let C=t instanceof RegExp,w=i instanceof RegExp;if(C!=w)return!1;if(C&&w)return t.toString()==i.toString();let P=Object.keys(t);if(a=P.length,a!==Object.keys(i).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,P[o]))return!1;for(o=a;o--!==0;)if(c=P[o],!Sbe(t[c],i[c],e))return!1;return!0}function Y7(t,i){return Sbe(t,i)}function XUe(t){return typeof t=="function"&&"call"in t&&"apply"in t}function Ro(t){return!ru(t)}function Os(t,i){if(!t||!i)return null;try{let e=t[i];if(Ro(e))return e}catch{}if(Object.keys(t).length){if(XUe(i))return i(t);if(i.indexOf(".")===-1)return t[i];{let e=i.split("."),n=t;for(let r=0,o=e.length;r{let r=n;zx(i[r])&&r in t&&zx(t[r])?e[r]=e6e(t[r],i[r]):e[r]=i[r]}),e}function t6e(...t){return t.reduce((i,e,n)=>n===0?e:e6e(i,e),{})}function i6e(t,i){let e=-1;if(i){for(let n=0;nZUe(a)===r)||"";return wie(Kp(t[o],e),n.join("."),e)}return}return Kp(t,e)}function Ibe(t,i=!0){return Array.isArray(t)&&(i||t.length!==0)}function K7(t){return t instanceof Date}function n6e(t){return Ro(t)&&!isNaN(t)}function Yk(t=""){return Ro(t)&&t.length===1&&!!t.match(/\S| /)}function Ux(t,i){if(i){let e=i.test(t);return i.lastIndex=0,e}return!1}function PP(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 Ug(t){if(t&&/[\xC0-\xFF\u0100-\u017E]/.test(t)){let i={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 i)t=t.replace(i[e],e)}return t}function r6e(t,i,e){t&&i!==e&&(e>=t.length&&(e%=t.length,i%=t.length),t.splice(e,0,t.splice(i,1)[0]))}function Iie(t){return qk(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(i,e)=>e===0?i:"-"+i.toLowerCase()).toLowerCase():t}var Tie={};function fa(t="pui_id_"){return Object.hasOwn(Tie,t)||(Tie[t]=0),Tie[t]++,`${t}${Tie[t]}`}var o6e=["*"];var Ju=(()=>{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})(),O4=(()=>{class t{static AND="and";static OR="or"}return t})(),Kk=(()=>{class t{filter(e,n,r,o,a){let c=[];if(e)for(let m of e)for(let g of n){let C=Os(m,g);if(this.filters[o](C,r,a)){c.push(m);break}}return c}filters={startsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=Ug(n.toString()).toLocaleLowerCase(r);return Ug(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=Ug(n.toString()).toLocaleLowerCase(r);return Ug(e.toString()).toLocaleLowerCase(r).indexOf(o)!==-1},notContains:(e,n,r)=>{if(n==null||typeof n=="string"&&n.trim()==="")return!0;if(e==null)return!1;let o=Ug(n.toString()).toLocaleLowerCase(r);return Ug(e.toString()).toLocaleLowerCase(r).indexOf(o)===-1},endsWith:(e,n,r)=>{if(n==null||n.trim()==="")return!0;if(e==null)return!1;let o=Ug(n.toString()).toLocaleLowerCase(r),a=Ug(e.toString()).toLocaleLowerCase(r);return a.indexOf(o,a.length-o.length)!==-1},equals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()===n.getTime():e==n?!0:Ug(e.toString()).toLocaleLowerCase(r)==Ug(n.toString()).toLocaleLowerCase(r),notEquals:(e,n,r)=>n==null||typeof n=="string"&&n.trim()===""?!1:e==null?!0:e.getTime&&n.getTime?e.getTime()!==n.getTime():e==n?!1:Ug(e.toString()).toLocaleLowerCase(r)!=Ug(n.toString()).toLocaleLowerCase(r),in:(e,n)=>{if(n==null||n.length===0)return!0;for(let r=0;rn==null||n[0]==null||n[1]==null?!0:e==null?!1:e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1],lt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n,gt:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>n.getTime():e>n,gte:(e,n,r)=>n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n,is:(e,n,r)=>this.filters.equals(e,n,r),isNot:(e,n,r)=>this.filters.notEquals(e,n,r),before:(e,n,r)=>this.filters.lt(e,n,r),after:(e,n,r)=>this.filters.gt(e,n,r),dateIs:(e,n)=>n==null?!0:e==null?!1:e.toDateString()===n.toDateString(),dateIsNot:(e,n)=>n==null?!0:e==null?!1:e.toDateString()!==n.toDateString(),dateBefore:(e,n)=>n==null?!0:e==null?!1:e.getTime()n==null?!0:e==null?!1:(e.setHours(0,0,0,0),e.getTime()>n.getTime())};register(e,n){this.filters[e]=n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Cv=(()=>{class t{clickSource=new Ai;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var a6e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["p-header"]],standalone:!1,ngContentSelectors:o6e,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},encapsulation:2})}return t})(),s6e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["p-footer"]],standalone:!1,ngContentSelectors:o6e,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},encapsulation:2})}return t})(),Tr=(()=>{class t{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(n){return new(n||t)(xe(Bl))};static \u0275dir=hn({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]}})}return t})(),Un=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[rr]})}return t})(),xs=(()=>{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})(),l6e=(()=>{class t{dragStartSource=new Ai;dragStopSource=new Ai;dragStart$=this.dragStartSource.asObservable();dragStop$=this.dragStopSource.asObservable();startDrag(e){this.dragStartSource.next(e)}stopDrag(e){this.dragStopSource.next(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var mbt=Object.defineProperty,hbt=Object.defineProperties,fbt=Object.getOwnPropertyDescriptors,Eie=Object.getOwnPropertySymbols,u6e=Object.prototype.hasOwnProperty,p6e=Object.prototype.propertyIsEnumerable,c6e=(t,i,e)=>i in t?mbt(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,Gx=(t,i)=>{for(var e in i||(i={}))u6e.call(i,e)&&c6e(t,e,i[e]);if(Eie)for(var e of Eie(i))p6e.call(i,e)&&c6e(t,e,i[e]);return t},Tbe=(t,i)=>hbt(t,fbt(i)),QT=(t,i)=>{var e={};for(var n in t)u6e.call(t,n)&&i.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Eie)for(var n of Eie(t))i.indexOf(n)<0&&p6e.call(t,n)&&(e[n]=t[n]);return e};function P4(...t){return t6e(...t)}var gbt=KUe(),xv=gbt,W7=/{([^}]*)}/g,m6e=/(\d+\s+[\+\-\*\/]\s+\d+)/g,h6e=/var\([^)]+\)/g;function d6e(t){return qk(t)?t.replace(/[A-Z]/g,(i,e)=>e===0?i:"."+i.toLowerCase()).toLowerCase():t}function _bt(t){return zx(t)&&t.hasOwnProperty("$value")&&t.hasOwnProperty("$type")?t.$value:t}function ybt(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function Ebe(t="",i=""){return ybt(`${qk(t,!1)&&qk(i,!1)?`${t}-`:t}${i}`)}function f6e(t="",i=""){return`--${Ebe(t,i)}`}function vbt(t=""){let i=(t.match(/{/g)||[]).length,e=(t.match(/}/g)||[]).length;return(i+e)%2!==0}function g6e(t,i="",e="",n=[],r){if(qk(t)){let o=t.trim();if(vbt(o))return;if(Ux(o,W7)){let a=o.replaceAll(W7,c=>{let m=c.replace(/{|}/g,"").split(".").filter(g=>!n.some(C=>Ux(g,C)));return`var(${f6e(e,Iie(m.join("-")))}${Ro(r)?`, ${r}`:""})`});return Ux(a.replace(h6e,"0"),m6e)?`calc(${a})`:a}return o}else if(n6e(t))return t}function bbt(t,i,e){qk(i,!1)&&t.push(`${i}:${e};`)}function R4(t,i){return t?`${t}{${i}}`:""}function _6e(t,i){if(t.indexOf("dt(")===-1)return t;function e(a,c){let m=[],g=0,C="",w=null,P=0;for(;g<=a.length;){let R=a[g];if((R==='"'||R==="'"||R==="`")&&a[g-1]!=="\\"&&(w=w===R?null:R),!w&&(R==="("&&P++,R===")"&&P--,(R===","||g===a.length)&&P===0)){let z=C.trim();z.startsWith("dt(")?m.push(_6e(z,c)):m.push(n(z)),C="",g++;continue}R!==void 0&&(C+=R),g++}return m}function n(a){let c=a[0];if((c==='"'||c==="'"||c==="`")&&a[a.length-1]===c)return a.slice(1,-1);let m=Number(a);return isNaN(m)?a:m}let r=[],o=[];for(let a=0;a0){let c=o.pop();o.length===0&&r.push([c,a])}if(!r.length)return t;for(let a=r.length-1;a>=0;a--){let[c,m]=r[a],g=t.slice(c+3,m),C=e(g,i),w=i(...C);t=t.slice(0,c)+w+t.slice(m+1)}return t}var Dbe=t=>{var i;let e=Sd.getTheme(),n=Abe(e,t,void 0,"variable"),r=(i=n?.match(/--[\w-]+/g))==null?void 0:i[0],o=Abe(e,t,void 0,"value");return{name:r,variable:n,value:o}},ZT=(...t)=>Abe(Sd.getTheme(),...t),Abe=(t={},i,e,n)=>{if(i){let{variable:r,options:o}=Sd.defaults||{},{prefix:a,transform:c}=t?.options||o||{},m=Ux(i,W7)?i:`{${i}}`;return n==="value"||ru(n)&&c==="strict"?Sd.getTokenValue(i):g6e(m,void 0,a,[r.excludedKeyRegex],e)}return""};function N4(t,...i){if(t instanceof Array){let e=t.reduce((n,r,o)=>{var a;return n+r+((a=Kp(i[o],{dt:ZT}))!=null?a:"")},"");return _6e(e,ZT)}return Kp(t,{dt:ZT})}function Cbt(t,i={}){let e=Sd.defaults.variable,{prefix:n=e.prefix,selector:r=e.selector,excludedKeyRegex:o=e.excludedKeyRegex}=i,a=[],c=[],m=[{node:t,path:n}];for(;m.length;){let{node:C,path:w}=m.pop();for(let P in C){let R=C[P],z=_bt(R),H=Ux(P,o)?Ebe(w):Ebe(w,Iie(P));if(zx(z))m.push({node:z,path:H});else{let j=f6e(H),K=g6e(z,H,n,[o]);bbt(c,j,K);let ne=H;n&&ne.startsWith(n+"-")&&(ne=ne.slice(n.length+1)),a.push(ne.replace(/-/g,"."))}}}let g=c.join("");return{value:c,tokens:a,declarations:g,css:R4(r,g)}}var Hx={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 i=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[t].flat().map(e=>{var n;return(n=i.map(r=>r.resolve(e)).find(r=>r.matched))!=null?n:this.rules.custom.resolve(e)})}},_toVariables(t,i){return Cbt(t,{prefix:i?.prefix})},getCommon({name:t="",theme:i={},params:e,set:n,defaults:r}){var o,a,c,m,g,C,w;let{preset:P,options:R}=i,z,H,j,K,ne,me,Te;if(Ro(P)&&R.transform!=="strict"){let{primitive:Ie,semantic:ye,extend:fe}=P,Re=ye||{},{colorScheme:Ae}=Re,ke=QT(Re,["colorScheme"]),Qe=fe||{},{colorScheme:we}=Qe,Rt=QT(Qe,["colorScheme"]),rt=Ae||{},{dark:Ze}=rt,Et=QT(rt,["dark"]),We=we||{},{dark:bt}=We,st=QT(We,["dark"]),kt=Ro(Ie)?this._toVariables({primitive:Ie},R):{},pi=Ro(ke)?this._toVariables({semantic:ke},R):{},Kt=Ro(Et)?this._toVariables({light:Et},R):{},gt=Ro(Ze)?this._toVariables({dark:Ze},R):{},ht=Ro(Rt)?this._toVariables({semantic:Rt},R):{},li=Ro(st)?this._toVariables({light:st},R):{},ui=Ro(bt)?this._toVariables({dark:bt},R):{},[Bi,wn]=[(o=kt.declarations)!=null?o:"",kt.tokens],[yn,Xn]=[(a=pi.declarations)!=null?a:"",pi.tokens||[]],[Rr,De]=[(c=Kt.declarations)!=null?c:"",Kt.tokens||[]],[bi,Ci]=[(m=gt.declarations)!=null?m:"",gt.tokens||[]],[Mt,wt]=[(g=ht.declarations)!=null?g:"",ht.tokens||[]],[ti,Ut]=[(C=li.declarations)!=null?C:"",li.tokens||[]],[vi,Xt]=[(w=ui.declarations)!=null?w:"",ui.tokens||[]];z=this.transformCSS(t,Bi,"light","variable",R,n,r),H=wn;let $i=this.transformCSS(t,`${yn}${Rr}`,"light","variable",R,n,r),Bt=this.transformCSS(t,`${bi}`,"dark","variable",R,n,r);j=`${$i}${Bt}`,K=[...new Set([...Xn,...De,...Ci])];let Qt=this.transformCSS(t,`${Mt}${ti}color-scheme:light`,"light","variable",R,n,r),Ti=this.transformCSS(t,`${vi}color-scheme:dark`,"dark","variable",R,n,r);ne=`${Qt}${Ti}`,me=[...new Set([...wt,...Ut,...Xt])],Te=Kp(P.css,{dt:ZT})}return{primitive:{css:z,tokens:H},semantic:{css:j,tokens:K},global:{css:ne,tokens:me},style:Te}},getPreset({name:t="",preset:i={},options:e,params:n,set:r,defaults:o,selector:a}){var c,m,g;let C,w,P;if(Ro(i)&&e.transform!=="strict"){let R=t.replace("-directive",""),z=i,{colorScheme:H,extend:j,css:K}=z,ne=QT(z,["colorScheme","extend","css"]),me=j||{},{colorScheme:Te}=me,Ie=QT(me,["colorScheme"]),ye=H||{},{dark:fe}=ye,Re=QT(ye,["dark"]),Ae=Te||{},{dark:ke}=Ae,Qe=QT(Ae,["dark"]),we=Ro(ne)?this._toVariables({[R]:Gx(Gx({},ne),Ie)},e):{},Rt=Ro(Re)?this._toVariables({[R]:Gx(Gx({},Re),Qe)},e):{},rt=Ro(fe)?this._toVariables({[R]:Gx(Gx({},fe),ke)},e):{},[Ze,Et]=[(c=we.declarations)!=null?c:"",we.tokens||[]],[We,bt]=[(m=Rt.declarations)!=null?m:"",Rt.tokens||[]],[st,kt]=[(g=rt.declarations)!=null?g:"",rt.tokens||[]],pi=this.transformCSS(R,`${Ze}${We}`,"light","variable",e,r,o,a),Kt=this.transformCSS(R,st,"dark","variable",e,r,o,a);C=`${pi}${Kt}`,w=[...new Set([...Et,...bt,...kt])],P=Kp(K,{dt:ZT})}return{css:C,tokens:w,style:P}},getPresetC({name:t="",theme:i={},params:e,set:n,defaults:r}){var o;let{preset:a,options:c}=i,m=(o=a?.components)==null?void 0:o[t];return this.getPreset({name:t,preset:m,options:c,params:e,set:n,defaults:r})},getPresetD({name:t="",theme:i={},params:e,set:n,defaults:r}){var o,a;let c=t.replace("-directive",""),{preset:m,options:g}=i,C=((o=m?.components)==null?void 0:o[c])||((a=m?.directives)==null?void 0:a[c]);return this.getPreset({name:c,preset:C,options:g,params:e,set:n,defaults:r})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,i){var e;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?i.options.darkModeSelector:(e=t.darkModeSelector)!=null?e:i.options.darkModeSelector):[]},getLayerOrder(t,i={},e,n){let{cssLayer:r}=i;return r?`@layer ${Kp(r.order||r.name||"primeui",e)}`:""},getCommonStyleSheet({name:t="",theme:i={},params:e,props:n={},set:r,defaults:o}){let a=this.getCommon({name:t,theme:i,params:e,set:r,defaults:o}),c=Object.entries(n).reduce((m,[g,C])=>m.push(`${g}="${C}"`)&&m,[]).join(" ");return Object.entries(a||{}).reduce((m,[g,C])=>{if(zx(C)&&Object.hasOwn(C,"css")){let w=PP(C.css),P=`${g}-variables`;m.push(``)}return m},[]).join("")},getStyleSheet({name:t="",theme:i={},params:e,props:n={},set:r,defaults:o}){var a;let c={name:t,theme:i,params:e,set:r,defaults:o},m=(a=t.includes("-directive")?this.getPresetD(c):this.getPresetC(c))==null?void 0:a.css,g=Object.entries(n).reduce((C,[w,P])=>C.push(`${w}="${P}"`)&&C,[]).join(" ");return m?``:""},createTokens(t={},i,e="",n="",r={}){let o=function(c,m={},g=[]){if(g.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:c,path:this.path,paths:m,value:void 0};g.push(this.path),m.name=this.path,m.binding||(m.binding={});let C=this.value;if(typeof this.value=="string"&&W7.test(this.value)){let w=this.value.trim().replace(W7,P=>{var R;let z=P.slice(1,-1),H=this.tokens[z];if(!H)return console.warn(`Token not found for path: ${z}`),"__UNRESOLVED__";let j=H.computed(c,m,g);return Array.isArray(j)&&j.length===2?`light-dark(${j[0].value},${j[1].value})`:(R=j?.value)!=null?R:"__UNRESOLVED__"});C=m6e.test(w.replace(h6e,"0"))?`calc(${w})`:w}return ru(m.binding)&&delete m.binding,g.pop(),{colorScheme:c,path:this.path,paths:m,value:C.includes("__UNRESOLVED__")?void 0:C}},a=(c,m,g)=>{Object.entries(c).forEach(([C,w])=>{let P=Ux(C,i.variable.excludedKeyRegex)?m:m?`${m}.${d6e(C)}`:d6e(C),R=g?`${g}.${C}`:C;zx(w)?a(w,P,R):(r[P]||(r[P]={paths:[],computed:(z,H={},j=[])=>{if(r[P].paths.length===1)return r[P].paths[0].computed(r[P].paths[0].scheme,H.binding,j);if(z&&z!=="none")for(let K=0;KK.computed(K.scheme,H[K.scheme],j))}}),r[P].paths.push({path:R,value:w,scheme:R.includes("colorScheme.light")?"light":R.includes("colorScheme.dark")?"dark":"none",computed:o,tokens:r}))})};return a(t,e,n),r},getTokenValue(t,i,e){var n;let r=(c=>c.split(".").filter(m=>!Ux(m.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(i),o=i.includes("colorScheme.light")?"light":i.includes("colorScheme.dark")?"dark":void 0,a=[(n=t[r])==null?void 0:n.computed(o)].flat().filter(c=>c);return a.length===1?a[0].value:a.reduce((c={},m)=>{let g=m,{colorScheme:C}=g,w=QT(g,["colorScheme"]);return c[C]=w,c},void 0)},getSelectorRule(t,i,e,n){return e==="class"||e==="attr"?R4(Ro(i)?`${t}${i},${t} ${i}`:t,n):R4(t,R4(i??":root",n))},transformCSS(t,i,e,n,r={},o,a,c){if(Ro(i)){let{cssLayer:m}=r;if(n!=="style"){let g=this.getColorSchemeOption(r,a);i=e==="dark"?g.reduce((C,{type:w,selector:P})=>(Ro(P)&&(C+=P.includes("[CSS]")?P.replace("[CSS]",i):this.getSelectorRule(P,c,w,i)),C),""):R4(c??":root",i)}if(m){let g={name:"primeui",order:"primeui"};zx(m)&&(g.name=Kp(m.name,{name:t,type:n})),Ro(g.name)&&(i=R4(`@layer ${g.name}`,i),o?.layerNames(g.name))}return i}return""}},Sd={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:i}=t;i&&(this._theme=Tbe(Gx({},i),{options:Gx(Gx({},this.defaults.options),i.options)}),this._tokens=Hx.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}),xv.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Tbe(Gx({},this.theme),{preset:t}),this._tokens=Hx.createTokens(t,this.defaults),this.clearLoadedStyleNames(),xv.emit("preset:change",t),xv.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Tbe(Gx({},this.theme),{options:t}),this.clearLoadedStyleNames(),xv.emit("options:change",t),xv.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 Hx.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",i){return Hx.getCommon({name:t,theme:this.theme,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",i){let e={name:t,theme:this.theme,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Hx.getPresetC(e)},getDirective(t="",i){let e={name:t,theme:this.theme,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Hx.getPresetD(e)},getCustomPreset(t="",i,e,n){let r={name:t,preset:i,options:this.options,selector:e,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Hx.getPreset(r)},getLayerOrderCSS(t=""){return Hx.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",i,e="style",n){return Hx.transformCSS(t,i,n,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",i,e={}){return Hx.getCommonStyleSheet({name:t,theme:this.theme,params:i,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,i,e={}){return Hx.getStyleSheet({name:t,theme:this.theme,params:i,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:i}){this._loadingStyles.size&&(this._loadingStyles.delete(i),xv.emit(`theme:${i}:load`,t),!this._loadingStyles.size&&xv.emit("theme:load"))}};var y6e=` *, ::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 xbt=0,v6e=(()=>{class t{document=ae(Gr);use(e,n={}){let r=!1,o=e,a=null,{immediate:c=!0,manual:m=!1,name:g=`style_${++xbt}`,id:C=void 0,media:w=void 0,nonce:P=void 0,first:R=!1,props:z={}}=n;if(this.document){if(a=this.document.querySelector(`style[data-primeng-style-id="${g}"]`)||C&&this.document.getElementById(C)||this.document.createElement("style"),!a.isConnected){o=e;let H=this.document.head;$k(a,"nonce",P),R&&H.firstChild?H.insertBefore(a,H.firstChild):H.appendChild(a),Sie(a,{type:"text/css",media:w,nonce:P,"data-primeng-style-id":g})}return a.textContent!==o&&(a.textContent=o),{id:C,name:g,el:a,css:o}}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var F4={_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()}},Sbt=` .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'); } `,br=(()=>{class t{name="base";useStyle=ae(v6e);theme=void 0;css=void 0;classes={};inlineStyles={};load=(e,n={},r=o=>o)=>{let o=r(N4`${Kp(e,{dt:ZT})}`);return o?this.useStyle.use(PP(o),pe({name:this.name},n)):{}};loadCSS=(e={})=>this.load(this.css,e);loadTheme=(e={},n="")=>this.load(this.theme,e,(r="")=>Sd.transformCSS(e.name||this.name,`${r}${N4`${n}`}`));loadGlobalCSS=(e={})=>this.load(Sbt,e);loadGlobalTheme=(e={},n="")=>this.load(y6e,e,(r="")=>Sd.transformCSS(e.name||this.name,`${r}${N4`${n}`}`));getCommonTheme=e=>Sd.getCommon(this.name,e);getComponentTheme=e=>Sd.getComponent(this.name,e);getDirectiveTheme=e=>Sd.getDirective(this.name,e);getPresetTheme=(e,n,r)=>Sd.getCustomPreset(this.name,e,n,r);getLayerOrderThemeCSS=()=>Sd.getLayerOrderCSS(this.name);getStyleSheet=(e="",n={})=>{if(this.css){let r=Kp(this.css,{dt:ZT}),o=PP(N4`${r}${e}`),a=Object.entries(n).reduce((c,[m,g])=>c.push(`${m}="${g}"`)&&c,[]).join(" ");return``}return""};getCommonThemeStyleSheet=(e,n={})=>Sd.getCommonStyleSheet(this.name,e,n);getThemeStyleSheet=(e,n={})=>{let r=[Sd.getStyleSheet(this.name,e,n)];if(this.theme){let o=this.name==="base"?"global-style":`${this.name}-style`,a=N4`${Kp(this.theme,{dt:ZT})}`,c=PP(Sd.transformCSS(o,a)),m=Object.entries(n).reduce((g,[C,w])=>g.push(`${C}="${w}"`)&&g,[]).join(" ");r.push(``)}return r.join("")};static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var wbt=(()=>{class t{theme=hr(void 0);csp=hr({nonce:void 0});isThemeChanged=!1;document=ae(Gr);baseStyle=ae(br);constructor(){tu(()=>{xv.on("theme:change",e=>{Eu(()=>{this.isThemeChanged=!0,this.theme.set(e)})})}),tu(()=>{let e=this.theme();this.document&&e&&(this.isThemeChanged||this.onThemeChange(e),this.isThemeChanged=!1)})}ngOnDestroy(){Sd.clearLoadedStyleNames(),xv.clear()}onThemeChange(e){Sd.setTheme(e),this.document&&this.loadCommonTheme()}loadCommonTheme(){if(this.theme()!=="none"&&!Sd.isStyleNameLoaded("common")){let{primitive:e,semantic:n,global:r,style:o}=this.baseStyle.getCommonTheme?.()||{},a={nonce:this.csp?.()?.nonce};this.baseStyle.load(e?.css,pe({name:"primitive-variables"},a)),this.baseStyle.load(n?.css,pe({name:"semantic-variables"},a)),this.baseStyle.load(r?.css,pe({name:"global-variables"},a)),this.baseStyle.loadGlobalTheme(pe({name:"global-style"},a),o),Sd.setLoadedStyleName("common")}}setThemeConfig(e){let{theme:n,csp:r}=e||{};n&&this.theme.set(n),r&&this.csp.set(r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Q7=(()=>{class t extends wbt{ripple=hr(!1);platformId=ae(Hf);inputStyle=hr(null);inputVariant=hr(null);overlayAppendTo=hr("self");overlayOptions={};csp=hr({nonce:void 0});filterMatchModeOptions={text:[Ju.STARTS_WITH,Ju.CONTAINS,Ju.NOT_CONTAINS,Ju.ENDS_WITH,Ju.EQUALS,Ju.NOT_EQUALS],numeric:[Ju.EQUALS,Ju.NOT_EQUALS,Ju.LESS_THAN,Ju.LESS_THAN_OR_EQUAL_TO,Ju.GREATER_THAN,Ju.GREATER_THAN_OR_EQUAL_TO],date:[Ju.DATE_IS,Ju.DATE_IS_NOT,Ju.DATE_BEFORE,Ju.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 Ai;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=pe(pe({},this.translation),e),this.translationSource.next(this.translation)}setConfig(e){let{csp:n,ripple:r,inputStyle:o,inputVariant:a,theme:c,overlayOptions:m,translation:g,filterMatchModeOptions:C,overlayAppendTo:w,zIndex:P}=e||{};n&&this.csp.set(n),w&&this.overlayAppendTo.set(w),r&&this.ripple.set(r),o&&this.inputStyle.set(o),a&&this.inputVariant.set(a),m&&(this.overlayOptions=m),g&&this.setTranslation(g),C&&(this.filterMatchModeOptions=C),P&&(this.zIndex=P),c&&this.setThemeConfig({theme:c,csp:n})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ibt=new Mi("PRIME_NG_CONFIG");function b6e(...t){let i=t?.map(n=>({provide:Ibt,useValue:n,multi:!1})),e=wk(()=>{let n=ae(Q7);t?.forEach(r=>n.setConfig(r))});return zS([...i,e])}var C6e=(()=>{class t extends br{name="common";static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ur=(()=>{class t{document=ae(Gr);platformId=ae(Hf);el=ae(qn);injector=ae(Ir);cd=ae(dn);renderer=ae(Ma);config=ae(Q7);baseComponentStyle=ae(C6e);baseStyle=ae(br);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=fa("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,n="",r={}){return wie(e,n,r)}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&&!x4e(this.platformId)){let{dt:n}=e;n&&n.currentValue&&(this._loadScopedThemeStyles(n.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(n.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(e=>xv.off("theme:change",e))}_loadStyles(){let e=()=>{F4.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),F4.setLoadedStyleName("base")),this._loadThemeStyles()};e(),this._themeChangeListener(()=>e())}_loadCoreStyles(){!F4.isStyleNameLoaded("base")&&this.componentStyle?.name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),F4.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!Sd.isStyleNameLoaded("common")){let{primitive:e,semantic:n,global:r,style:o}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(e?.css,pe({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(n?.css,pe({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(r?.css,pe({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(pe({name:"global-style"},this.styleOptions),o),Sd.setLoadedStyleName("common")}if(!Sd.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:e,style:n}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(e,pe({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(pe({name:`${this.componentStyle?.name}-style`},this.styleOptions),n),Sd.setLoadedStyleName(this.componentStyle?.name)}if(!Sd.isStyleNameLoaded("layer-order")){let e=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(e,pe({name:"layer-order",first:!0},this.styleOptions)),Sd.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(e){let{css:n}=this.componentStyle?.getPresetTheme?.(e,`[${this.attrSelector}]`)||{},r=this.componentStyle?.load(n,pe({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=r?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(e=()=>{}){F4.clearLoadedStyleNames(),xv.on("theme:change",e),this.themeChangeListeners.push(e)}cx(e,n={}){return E4(this._getOptionValue(this.$style?.classes,e,pe({instance:this},n)))}sx(e="",n=!0,r={}){if(n)return this._getOptionValue(this.$style?.inlineStyles,e,pe({instance:this},r))}get parent(){return this.parentInstance}get $style(){return this.parent?this.parent.componentStyle:this.componentStyle}cn=E4;static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,inputs:{dt:"dt"},features:[Ii([C6e,br]),Yt]})}return t})();var eo=(()=>{class t{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(e,n){e&&n&&(e.classList?e.classList.add(n):e.className+=" "+n)}static addMultipleClasses(e,n){if(e&&n)if(e.classList){let r=n.trim().split(" ");for(let o=0;or.split(" ").forEach(o=>this.removeClass(e,o)))}static hasClass(e,n){return e&&n?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1}static siblings(e){return Array.prototype.filter.call(e.parentNode.children,function(n){return n!==e})}static find(e,n){return Array.from(e.querySelectorAll(n))}static findSingle(e,n){return this.isElement(e)?e.querySelector(n):null}static index(e){let n=e.parentNode.childNodes,r=0;for(var o=0;o{if(me)return getComputedStyle(me).getPropertyValue("position")==="relative"?me:o(me.parentElement)},a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),c=n.offsetHeight,m=n.getBoundingClientRect(),g=this.getWindowScrollTop(),C=this.getWindowScrollLeft(),w=this.getViewport(),R=o(e)?.getBoundingClientRect()||{top:-1*g,left:-1*C},z,H,j="top";m.top+c+a.height>w.height?(z=m.top-R.top-a.height,j="bottom",m.top+z<0&&(z=-1*m.top)):(z=c+m.top-R.top,j="top");let K=m.left+a.width-w.width,ne=m.left-R.left;if(a.width>w.width?H=(m.left-R.left)*-1:K>0?H=ne-K:H=m.left-R.left,e.style.top=z+"px",e.style.left=H+"px",e.style.transformOrigin=j,r){let me=$7(/-anchor-gutter$/)?.value;e.style.marginTop=j==="bottom"?`calc(${me??"2px"} * -1)`:me??""}}static absolutePosition(e,n,r=!0){let o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),a=o.height,c=o.width,m=n.offsetHeight,g=n.offsetWidth,C=n.getBoundingClientRect(),w=this.getWindowScrollTop(),P=this.getWindowScrollLeft(),R=this.getViewport(),z,H;C.top+m+a>R.height?(z=C.top+w-a,e.style.transformOrigin="bottom",z<0&&(z=w)):(z=m+C.top+w,e.style.transformOrigin="top"),C.left+c>R.width?H=Math.max(0,C.left+P+g-c):H=C.left+P,e.style.top=z+"px",e.style.left=H+"px",r&&(e.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(e,n=[]){return e.parentNode===null?n:this.getParents(e.parentNode,n.concat([e.parentNode]))}static getScrollableParents(e){let n=[];if(e){let r=this.getParents(e),o=/(auto|scroll)/,a=c=>{let m=window.getComputedStyle(c,null);return o.test(m.getPropertyValue("overflow"))||o.test(m.getPropertyValue("overflowX"))||o.test(m.getPropertyValue("overflowY"))};for(let c of r){let m=c.nodeType===1&&c.dataset.scrollselectors;if(m){let g=m.split(",");for(let C of g){let w=this.findSingle(c,C);w&&a(w)&&n.push(w)}}c.nodeType!==9&&a(c)&&n.push(c)}}return n}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}static getHiddenElementDimensions(e){let n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}static scrollInView(e,n){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,a=getComputedStyle(e).getPropertyValue("paddingTop"),c=a?parseFloat(a):0,m=e.getBoundingClientRect(),C=n.getBoundingClientRect().top+document.body.scrollTop-(m.top+document.body.scrollTop)-o-c,w=e.scrollTop,P=e.clientHeight,R=this.getOuterHeight(n);C<0?e.scrollTop=w+C:C+R>P&&(e.scrollTop=w+C-P+R)}static fadeIn(e,n){e.style.opacity=0;let r=+new Date,o=0,a=function(){o=+e.style.opacity.replace(",",".")+(new Date().getTime()-r)/n,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(a)||setTimeout(a,16))};a()}static fadeOut(e,n){var r=1,o=50,a=n,c=o/a;let m=setInterval(()=>{r=r-c,r<=0&&(r=0,clearInterval(m)),e.style.opacity=r},o)}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,n){var r=Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(a){return[].indexOf.call(document.querySelectorAll(a),this)!==-1};return o.call(e,n)}static getOuterWidth(e,n){let r=e.offsetWidth;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let n=getComputedStyle(e);return parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}static getHorizontalMargin(e){let n=getComputedStyle(e);return parseFloat(n.marginLeft)+parseFloat(n.marginRight)}static innerWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static width(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}static getInnerHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),n}static getOuterHeight(e,n){let r=e.offsetHeight;if(n){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let n=e.offsetHeight,r=getComputedStyle(e);return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),n}static getWidth(e){let n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),n}static getViewport(){let e=window,n=document,r=n.documentElement,o=n.getElementsByTagName("body")[0],a=e.innerWidth||r.clientWidth||o.clientWidth,c=e.innerHeight||r.clientHeight||o.clientHeight;return{width:a,height:c}}static getOffset(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,n){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(n,e)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var e=window.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return!0;var r=e.indexOf("Trident/");if(r>0){var o=e.indexOf("rv:");return!0}var a=e.indexOf("Edge/");return a>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,n){if(this.isElement(n))n.appendChild(e);else if(n&&n.el&&n.el.nativeElement)n.el.nativeElement.appendChild(e);else throw"Cannot append "+n+" to "+e}static removeChild(e,n){if(this.isElement(n))n.removeChild(e);else if(n.el&&n.el.nativeElement)n.el.nativeElement.removeChild(e);else throw"Cannot remove "+e+" from "+n}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 n=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);let r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let n=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n}static invokeElementMethod(e,n,r){e[n].apply(e,r)}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(),n=/(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:n[1]||"",version:n[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,n){e&&document.activeElement!==e&&e.focus(n)}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,n=""){let r=this.find(e,this.getFocusableSelectorString(n)),o=[];for(let a of r){let c=getComputedStyle(a);this.isVisible(a)&&c.display!="none"&&c.visibility!="hidden"&&o.push(a)}return o}static getFocusableElement(e,n=""){let r=this.findSingle(e,this.getFocusableSelectorString(n));if(r){let o=getComputedStyle(r);if(this.isVisible(r)&&o.display!="none"&&o.visibility!="hidden")return r}return null}static getFirstFocusableElement(e,n=""){let r=this.getFocusableElements(e,n);return r.length>0?r[0]:null}static getLastFocusableElement(e,n){let r=this.getFocusableElements(e,n);return r.length>0?r[r.length-1]:null}static getNextFocusableElement(e,n=!1){let r=t.getFocusableElements(e),o=0;if(r&&r.length>0){let a=r.indexOf(r[0].ownerDocument.activeElement);n?a==-1||a===0?o=r.length-1:o=a-1:a!=-1&&a!==r.length-1&&(o=a+1)}return r[o]}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,n){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@parent":return n?.parentElement;case"@grandparent":return n?.parentElement.parentElement;default:let r=typeof e;if(r==="string")return document.querySelector(e);if(r==="object"&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;let a=(c=>!!(c&&c.constructor&&c.call&&c.apply))(e)?e():e;return a&&a.nodeType===9||this.isExist(a)?a:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(e,n){if(e){let r=e.getAttribute(n);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}}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,n={},...r){if(e){let o=document.createElement(e);return this.setAttributes(o,n),o.append(...r),o}}static setAttribute(e,n="",r){this.isElement(e)&&r!==null&&r!==void 0&&e.setAttribute(n,r)}static setAttributes(e,n={}){if(this.isElement(e)){let r=(o,a)=>{let c=e?.$attrs?.[o]?[e?.$attrs?.[o]]:[];return[a].flat().reduce((m,g)=>{if(g!=null){let C=typeof g;if(C==="string"||C==="number")m.push(g);else if(C==="object"){let w=Array.isArray(g)?r(o,g):Object.entries(g).map(([P,R])=>o==="style"&&(R||R===0)?`${P.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${R}`:R?P:void 0);m=w.length?m.concat(w.filter(P=>!!P)):m}}return m},c)};Object.entries(n).forEach(([o,a])=>{if(a!=null){let c=o.match(/^on(.+)/);c?e.addEventListener(c[1].toLowerCase(),a):o==="pBind"?this.setAttributes(e,a):(a=o==="class"?[...new Set(r("class",a))].join(" ").trim():o==="style"?r("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[o]=a),e.setAttribute(o,a))}})}}static isFocusableElement(e,n=""){return this.isElement(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):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}`):!1}}return t})();function x6e(){PUe({variableName:Dbe("scrollbar.width").name})}function L4(){NUe({variableName:Dbe("scrollbar.width").name})}var Ub=class{element;listener;scrollableParents;constructor(i,e=()=>{}){this.element=i,this.listener=e}bindScrollListener(){this.scrollableParents=eo.getScrollableParents(this.element);for(let i=0;i{class t extends ur{autofocus=!1;focused=!1;platformId=ae(Hf);document=ae(Gr);host=ae(qn);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(){Js(this.platformId)&&this.autofocus&&setTimeout(()=>{let e=eo.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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[0,"pAutoFocus","autofocus"]},features:[Tt]})}return t})(),S6e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var Aie=(()=>{class t extends ur{modelValue=hr(void 0);$filled=Or(()=>Ro(this.modelValue()));writeModelValue(e){this.modelValue.set(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,features:[Tt]})}return t})();var Hb=(()=>{class t extends Aie{required=kr(void 0,{transform:Je});invalid=kr(void 0,{transform:Je});disabled=kr(void 0,{transform:Je});name=kr();_disabled=hr(!1);$disabled=Or(()=>this.disabled()||this._disabled());onModelChange=()=>{};onModelTouched=()=>{};writeDisabledState(e){this._disabled.set(e)}writeControlValue(e,n){}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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,inputs:{required:[1,"required"],invalid:[1,"invalid"],disabled:[1,"disabled"],name:[1,"name"]},features:[Tt]})}return t})();var Die=` .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 Ebt=["*"],Abt={root:"p-fluid"},w6e=(()=>{class t extends br{name="fluid";classes=Abt;theme=Die;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var XT=(()=>{class t extends ur{_componentStyle=ae(w6e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-fluid"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("root"))},features:[Ii([w6e]),Tt],ngContentSelectors:Ebt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})();var Wk=(()=>{class t extends Hb{pcFluid=ae(XT,{optional:!0,host:!0,skipSelf:!0});fluid=kr(void 0,{transform:Je});variant=kr();size=kr();inputSize=kr();pattern=kr();min=kr();max=kr();step=kr();minlength=kr();maxlength=kr();$variant=Or(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({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:[Tt]})}return t})();var Dbt=["*"],kbt=` .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); } } `,I6e=(()=>{class t extends br{name="baseicon";css=kbt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var aa=(()=>{class t extends ur{spin=!1;_componentStyle=ae(I6e);getClassNames(){return E4("p-icon",{"p-icon-spin":this.spin})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({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(n,r){n&2&&Pe(r.getClassNames())},inputs:{spin:[2,"spin","spin",Je]},features:[Ii([I6e]),Tt],ngContentSelectors:Dbt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},encapsulation:2,changeDetection:0})}return t})();var Mbt=["data-p-icon","angle-double-left"],T6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Tt],attrs:Mbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Obt=["data-p-icon","angle-double-right"],E6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Tt],attrs:Obt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Rbt=["data-p-icon","angle-down"],A6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-down"]],features:[Tt],attrs:Rbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Pbt=["data-p-icon","angle-left"],D6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Tt],attrs:Pbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Nbt=["data-p-icon","angle-right"],kie=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Tt],attrs:Nbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Fbt=["data-p-icon","angle-up"],k6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","angle-up"]],features:[Tt],attrs:Fbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Lbt=["data-p-icon","arrow-down"],B4=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Tt],attrs:Lbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Bbt=["data-p-icon","arrow-up"],V4=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Tt],attrs:Bbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Vbt=["data-p-icon","blank"],M6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","blank"]],features:[Tt],attrs:Vbt,decls:1,vars:0,consts:[["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(n,r){n&1&&(Pi(),Cr(0,"rect",0))},encapsulation:2})}return t})();var zbt=["data-p-icon","calendar"],O6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","calendar"]],features:[Tt],attrs:zbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Ubt=["data-p-icon","check"],Qk=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","check"]],features:[Tt],attrs:Ubt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Hbt=["data-p-icon","chevron-down"],Dm=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","chevron-down"]],features:[Tt],attrs:Hbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Gbt=["data-p-icon","chevron-left"],Mie=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Tt],attrs:Gbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var jbt=["data-p-icon","chevron-right"],Gb=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Tt],attrs:jbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var $bt=["data-p-icon","chevron-up"],Oie=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Tt],attrs:$bt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var qbt=["data-p-icon","filter"],kbe=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","filter"]],features:[Tt],attrs:qbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Ybt=["data-p-icon","filter-slash"],R6e=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Tt],attrs:Ybt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Kbt=["data-p-icon","minus"],P6e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","minus"]],features:[Tt],attrs:Kbt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var Wbt=["data-p-icon","plus"],Z7=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","plus"]],features:[Tt],attrs:Wbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Qbt=["data-p-icon","search"],z4=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","search"]],features:[Tt],attrs:Qbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Zbt=["data-p-icon","sort-alt"],X7=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Tt],attrs:Zbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),So(),vo(5,"defs")(6,"clipPath",4),Cr(7,"rect",5),So()()),n&2&&(lt("clip-path",r.pathId),E(6),sa("id",r.pathId))},encapsulation:2})}return t})();var Xbt=["data-p-icon","sort-amount-down"],J7=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Tt],attrs:Xbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var Jbt=["data-p-icon","sort-amount-up-alt"],e9=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Tt],attrs:Jbt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var eCt=["data-p-icon","spinner"],W_=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","spinner"]],features:[Tt],attrs:eCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var tCt=["data-p-icon","times"],Qf=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","times"]],features:[Tt],attrs:tCt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var iCt=["data-p-icon","times-circle"],Rie=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","times-circle"]],features:[Tt],attrs:iCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var nCt=["data-p-icon","trash"],Mbe=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","trash"]],features:[Tt],attrs:nCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var rCt=["data-p-icon","upload"],N6e=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","upload"]],features:[Tt],attrs:rCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var oCt=["data-p-icon","window-maximize"],F6e=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","window-maximize"]],features:[Tt],attrs:oCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var aCt=["data-p-icon","window-minimize"],L6e=(()=>{class t extends aa{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+fa()+")"}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","window-minimize"]],features:[Tt],attrs:aCt,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(n,r){n&1&&(Pi(),vo(0,"g"),Cr(1,"path",0),So(),vo(2,"defs")(3,"clipPath",1),Cr(4,"rect",2),So()()),n&2&&(lt("clip-path",r.pathId),E(3),sa("id",r.pathId))},encapsulation:2})}return t})();var B6e=` .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 sCt=` ${B6e} /* 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'); } `,lCt={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}]},V6e=(()=>{class t extends br{name="inputtext";theme=sCt;classes=lCt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var _p=(()=>{class t extends Aie{ngControl=ae($p,{optional:!0,self:!0});pcFluid=ae(XT,{optional:!0,host:!0,skipSelf:!0});pSize;variant=kr();fluid=kr(void 0,{transform:Je});invalid=kr(void 0,{transform:Je});$variant=Or(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());_componentStyle=ae(V6e);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pInputText",""]],hostVars:2,hostBindings:function(n,r){n&1&&te("input",function(a){return r.onInput(a)}),n&2&&Pe(r.cx("root"))},inputs:{pSize:"pSize",variant:[1,"variant"],fluid:[1,"fluid"],invalid:[1,"invalid"]},features:[Ii([V6e]),Tt]})}return t})(),ow=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var z6e=` .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 cCt=["clearicon"],dCt=["incrementbuttonicon"],uCt=["decrementbuttonicon"],pCt=["input"];function mCt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",7),te("click",function(){se(e);let r=L(2);return le(r.clear())}),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearIcon")}}function hCt(t,i){}function fCt(t,i){t&1&&ie(0,hCt,0,0,"ng-template")}function gCt(t,i){if(t&1){let e=qe();O(0,"span",8),te("click",function(){se(e);let r=L(2);return le(r.clear())}),ie(1,fCt,1,0,null,9),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearIcon"),E(),D("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function _Ct(t,i){if(t&1&&(fi(0),ie(1,mCt,1,3,"svg",5)(2,gCt,2,4,"span",6),gi()),t&2){let e=L();E(),D("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),E(),D("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function yCt(t,i){if(t&1&&be(0,"span",12),t&2){let e=L(2);D("ngClass",e.incrementButtonIcon),lt("data-pc-section","incrementbuttonicon")}}function vCt(t,i){t&1&&(Pi(),be(0,"svg",14)),t&2&<("data-pc-section","incrementbuttonicon")}function bCt(t,i){}function CCt(t,i){t&1&&ie(0,bCt,0,0,"ng-template")}function xCt(t,i){if(t&1&&(fi(0),ie(1,vCt,1,1,"svg",13)(2,CCt,1,0,null,9),gi()),t&2){let e=L(2);E(),D("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),E(),D("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function SCt(t,i){if(t&1&&be(0,"span",12),t&2){let e=L(2);D("ngClass",e.decrementButtonIcon),lt("data-pc-section","decrementbuttonicon")}}function wCt(t,i){t&1&&(Pi(),be(0,"svg",16)),t&2&<("data-pc-section","decrementbuttonicon")}function ICt(t,i){}function TCt(t,i){t&1&&ie(0,ICt,0,0,"ng-template")}function ECt(t,i){if(t&1&&(fi(0),ie(1,wCt,1,1,"svg",15)(2,TCt,1,0,null,9),gi()),t&2){let e=L(2);E(),D("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),E(),D("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function ACt(t,i){if(t&1){let e=qe();O(0,"span")(1,"button",10),te("mousedown",function(r){se(e);let o=L();return le(o.onUpButtonMouseDown(r))})("mouseup",function(){se(e);let r=L();return le(r.onUpButtonMouseUp())})("mouseleave",function(){se(e);let r=L();return le(r.onUpButtonMouseLeave())})("keydown",function(r){se(e);let o=L();return le(o.onUpButtonKeyDown(r))})("keyup",function(){se(e);let r=L();return le(r.onUpButtonKeyUp())}),ie(2,yCt,1,2,"span",11)(3,xCt,3,2,"ng-container",2),M(),O(4,"button",10),te("mousedown",function(r){se(e);let o=L();return le(o.onDownButtonMouseDown(r))})("mouseup",function(){se(e);let r=L();return le(r.onDownButtonMouseUp())})("mouseleave",function(){se(e);let r=L();return le(r.onDownButtonMouseLeave())})("keydown",function(r){se(e);let o=L();return le(o.onDownButtonKeyDown(r))})("keyup",function(){se(e);let r=L();return le(r.onDownButtonKeyUp())}),ie(5,SCt,1,2,"span",11)(6,ECt,3,2,"ng-container",2),M()()}if(t&2){let e=L();Pe(e.cx("buttonGroup")),lt("data-pc-section","buttonGroup"),E(),Pe(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),lt("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),E(),D("ngIf",e.incrementButtonIcon),E(),D("ngIf",!e.incrementButtonIcon),E(),Pe(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),lt("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),E(),D("ngIf",e.decrementButtonIcon),E(),D("ngIf",!e.decrementButtonIcon)}}function DCt(t,i){if(t&1&&be(0,"span",12),t&2){let e=L(2);D("ngClass",e.incrementButtonIcon),lt("data-pc-section","incrementbuttonicon")}}function kCt(t,i){t&1&&(Pi(),be(0,"svg",14)),t&2&<("data-pc-section","incrementbuttonicon")}function MCt(t,i){}function OCt(t,i){t&1&&ie(0,MCt,0,0,"ng-template")}function RCt(t,i){if(t&1&&(fi(0),ie(1,kCt,1,1,"svg",13)(2,OCt,1,0,null,9),gi()),t&2){let e=L(2);E(),D("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),E(),D("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function PCt(t,i){if(t&1){let e=qe();O(0,"button",10),te("mousedown",function(r){se(e);let o=L();return le(o.onUpButtonMouseDown(r))})("mouseup",function(){se(e);let r=L();return le(r.onUpButtonMouseUp())})("mouseleave",function(){se(e);let r=L();return le(r.onUpButtonMouseLeave())})("keydown",function(r){se(e);let o=L();return le(o.onUpButtonKeyDown(r))})("keyup",function(){se(e);let r=L();return le(r.onUpButtonKeyUp())}),ie(1,DCt,1,2,"span",11)(2,RCt,3,2,"ng-container",2),M()}if(t&2){let e=L();Pe(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),lt("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),E(),D("ngIf",e.incrementButtonIcon),E(),D("ngIf",!e.incrementButtonIcon)}}function NCt(t,i){if(t&1&&be(0,"span",12),t&2){let e=L(2);D("ngClass",e.decrementButtonIcon),lt("data-pc-section","decrementbuttonicon")}}function FCt(t,i){t&1&&(Pi(),be(0,"svg",16)),t&2&<("data-pc-section","decrementbuttonicon")}function LCt(t,i){}function BCt(t,i){t&1&&ie(0,LCt,0,0,"ng-template")}function VCt(t,i){if(t&1&&(fi(0),ie(1,FCt,1,1,"svg",15)(2,BCt,1,0,null,9),gi()),t&2){let e=L(2);E(),D("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),E(),D("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function zCt(t,i){if(t&1){let e=qe();O(0,"button",10),te("mousedown",function(r){se(e);let o=L();return le(o.onDownButtonMouseDown(r))})("mouseup",function(){se(e);let r=L();return le(r.onDownButtonMouseUp())})("mouseleave",function(){se(e);let r=L();return le(r.onDownButtonMouseLeave())})("keydown",function(r){se(e);let o=L();return le(o.onDownButtonKeyDown(r))})("keyup",function(){se(e);let r=L();return le(r.onDownButtonKeyUp())}),ie(1,NCt,1,2,"span",11)(2,VCt,3,2,"ng-container",2),M()}if(t&2){let e=L();Pe(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),lt("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),E(),D("ngIf",e.decrementButtonIcon),E(),D("ngIf",!e.decrementButtonIcon)}}var UCt=` ${z6e} /* 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'); } `,HCt={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"},U6e=(()=>{class t extends br{name="inputnumber";theme=UCt;classes=HCt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var GCt={provide:Wc,useExisting:No(()=>U4),multi:!0},U4=(()=>{class t extends Wk{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=ae(U6e);ngControl=null;constructor(e){super(),this.injector=e}ngOnChanges(e){super.ngOnChanges(e),["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(r=>!!e[r])&&this.updateConstructParser()}ngOnInit(){super.ngOnInit(),this.ngControl=this.injector.get($p,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(),n=new Map(e.map((r,o)=>[r,o]));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=r=>n.get(r)}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,$e(pe({},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 r=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&e!=this.prefix&&(r=this.prefix+r),this.suffix&&e!=this.suffix&&(r=r+this.suffix),r}return e.toString()}return""}parseValue(e){let n=new RegExp(this._suffix,""),r=new RegExp(this._prefix,""),o=new RegExp(this._currency,""),a=e.replace(n,"").replace(r,"").trim().replace(/\s/g,"").replace(o,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(a){if(a==="-")return a;let c=+a;return isNaN(c)?null:c}return null}repeat(e,n,r){if(this.readonly)return;let o=n||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,r)},o),this.spin(e,r)}spin(e,n){let r=(this.step()??1)*n,o=this.parseValue(this.input?.nativeElement.value)||0,a=this.validateValue(o+r);this.maxlength()&&this.maxlength()=0;c--)if(this.isNumeralChar(o.charAt(c))){this.input.nativeElement.setSelectionRange(c,c);break}break;case"Tab":case"Enter":a=this.validateValue(this.parseValue(this.input.nativeElement.value)),this.input.nativeElement.value=this.formatValue(a),this.input.nativeElement.setAttribute("aria-valuenow",a),this.updateModel(e,a);break;case"Backspace":{if(e.preventDefault(),n===r){if(n==1&&this.prefix||n==o.length&&this.suffix)break;let c=o.charAt(n-1),{decimalCharIndex:m,decimalCharIndexWithoutPrefix:g}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(c)){let C=this.getDecimalLength(o);if(this._group.test(c))this._group.lastIndex=0,a=o.slice(0,n-2)+o.slice(n-1);else if(this._decimal.test(c))this._decimal.lastIndex=0,C?this.input?.nativeElement.setSelectionRange(n-1,n-1):a=o.slice(0,n-1)+o.slice(n);else if(m>0&&n>m){let w=this.isDecimalMode()&&(this.minFractionDigits||0)0?a:""):a=o.slice(0,n-1)+o.slice(n)}else this.mode==="currency"&&c.search(this._currency)!=-1&&(a=o.slice(1));this.updateValue(e,a,null,"delete-single")}else a=this.deleteRange(o,n,r),this.updateValue(e,a,null,"delete-range");break}case"Delete":if(e.preventDefault(),n===r){if(n==0&&this.prefix||n==o.length-1&&this.suffix)break;let c=o.charAt(n),{decimalCharIndex:m,decimalCharIndexWithoutPrefix:g}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(c)){let C=this.getDecimalLength(o);if(this._group.test(c))this._group.lastIndex=0,a=o.slice(0,n)+o.slice(n+2);else if(this._decimal.test(c))this._decimal.lastIndex=0,C?this.input?.nativeElement.setSelectionRange(n+1,n+1):a=o.slice(0,n)+o.slice(n+1);else if(m>0&&n>m){let w=this.isDecimalMode()&&(this.minFractionDigits||0)0?a:""):a=o.slice(0,n)+o.slice(n+1)}this.updateValue(e,a,null,"delete-back-single")}else a=this.deleteRange(o,n,r),this.updateValue(e,a,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 n=e.which||e.keyCode,r=String.fromCharCode(n),o=this.isDecimalSign(r),a=this.isMinusSign(r);n!=13&&e.preventDefault(),!o&&e.code==="NumpadDecimal"&&(o=!0,r=this._decimalChar,n=r.charCodeAt(0));let{value:c,selectionStart:m,selectionEnd:g}=this.input.nativeElement,C=this.parseValue(c+r),w=C!=null?C.toString():"",P=c.substring(m,g),R=this.parseValue(P),z=R!=null?R.toString():"";if(m!==g&&z.length>0){this.insert(e,r,{isDecimalSign:o,isMinusSign:a});return}this.maxlength()&&w.length>this.maxlength()||(48<=n&&n<=57||a||o)&&this.insert(e,r,{isDecimalSign:o,isMinusSign:a})}onPaste(e){if(!this.$disabled()&&!this.readonly){e.preventDefault();let n=(e.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(this.inputId==="integeronly"&&/[^\d-]/.test(n))return;if(n){this.maxlength()&&(n=n.toString().substring(0,this.maxlength()));let r=this.parseValue(n);r!=null&&this.insert(e,r.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 n=e.search(this._decimal);this._decimal.lastIndex=0;let o=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:o}}getCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;let r=e.search(this._minusSign);this._minusSign.lastIndex=0;let o=e.search(this._suffix);this._suffix.lastIndex=0;let a=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:r,suffixCharIndex:o,currencyCharIndex:a}}insert(e,n,r={isDecimalSign:!1,isMinusSign:!1}){let o=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&o!==-1)return;let a=this.input?.nativeElement.selectionStart,c=this.input?.nativeElement.selectionEnd,m=this.input?.nativeElement.value.trim(),{decimalCharIndex:g,minusCharIndex:C,suffixCharIndex:w,currencyCharIndex:P}=this.getCharIndexes(m),R;if(r.isMinusSign)a===0&&(R=m,(C===-1||c!==0)&&(R=this.insertText(m,n,0,c)),this.updateValue(e,R,n,"insert"));else if(r.isDecimalSign)g>0&&a===g?this.updateValue(e,m,n,"insert"):g>a&&g0&&a>g){if(a+n.length-(g+1)<=z){let j=P>=a?P-1:w>=a?w:m.length;R=m.slice(0,a)+n+m.slice(a+n.length,j)+m.slice(j),this.updateValue(e,R,n,H)}}else R=this.insertText(m,n,a,c),this.updateValue(e,R,n,H)}}insertText(e,n,r,o){if((n==="."?n:n.split(".")).length===2){let c=e.slice(r,o).search(this._decimal);return this._decimal.lastIndex=0,c>0?e.slice(0,r)+this.formatValue(n)+e.slice(o):e||this.formatValue(n)}else return o-r===e.length?this.formatValue(n):r===0?n+e.slice(o):o===e.length?e.slice(0,r)+n:e.slice(0,r)+n+e.slice(o)}deleteRange(e,n,r){let o;return r-n===e.length?o="":n===0?o=e.slice(r):r===e.length?o=e.slice(0,n):o=e.slice(0,n)+e.slice(r),o}initCursor(){let e=this.input?.nativeElement.selectionStart,n=this.input?.nativeElement.selectionEnd,r=this.input?.nativeElement.value,o=r.length,a=null,c=(this.prefixChar||"").length;r=r.replace(this._prefix,""),(e===n||e!==0||n=0;)if(m=r.charAt(g),this.isNumeralChar(m)){a=g+c;break}else g--;if(a!==null)this.input?.nativeElement.setSelectionRange(a+1,a+1);else{for(g=e;gthis.max()?this.max():e}updateInput(e,n,r,o){n=n||"";let a=this.input?.nativeElement.value,c=this.formatValue(e),m=a.length;if(c!==o&&(c=this.concatValues(c,o)),m===0){this.input.nativeElement.value=c,this.input.nativeElement.setSelectionRange(0,0);let C=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(C,C)}else{let g=this.input.nativeElement.selectionStart,C=this.input.nativeElement.selectionEnd;if(this.maxlength()&&c.length>this.maxlength()&&(c=c.slice(0,this.maxlength()),g=Math.min(g,this.maxlength()),C=Math.min(C,this.maxlength())),this.maxlength()&&this.maxlength()En(e,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>En(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:[Ii([GCt,U6e]),Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"input",1,0),te("input",function(c){return se(o),le(r.onUserInput(c))})("keydown",function(c){return se(o),le(r.onInputKeyDown(c))})("keypress",function(c){return se(o),le(r.onInputKeyPress(c))})("paste",function(c){return se(o),le(r.onPaste(c))})("click",function(){return se(o),le(r.onInputClick())})("focus",function(c){return se(o),le(r.onInputFocus(c))})("blur",function(c){return se(o),le(r.onInputBlur(c))}),M(),ie(2,_Ct,3,2,"ng-container",2)(3,ACt,7,17,"span",3)(4,PCt,3,7,"button",4)(5,zCt,3,7,"button",4)}n&2&&(Pe(r.cn(r.cx("pcInputText"),r.inputStyleClass)),D("value",r.formattedValue())("ngStyle",r.inputStyle)("variant",r.$variant())("invalid",r.invalid())("pSize",r.size())("pAutoFocus",r.autofocus)("fluid",r.hasFluid),lt("id",r.inputId)("aria-valuemin",r.min())("aria-valuemax",r.max())("aria-valuenow",r.value)("placeholder",r.placeholder)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy)("title",r.title)("size",r.inputSize())("name",r.name())("autocomplete",r.autocomplete)("maxlength",r.maxlength())("minlength",r.minlength())("tabindex",r.tabindex)("aria-required",r.ariaRequired)("min",r.min())("max",r.max())("step",r.step()??1)("required",r.required()?"":void 0)("readonly",r.readonly?"":void 0)("disabled",r.$disabled()?"":void 0)("data-pc-section","input"),E(2),D("ngIf",r.buttonLayout!="vertical"&&r.showClear&&r.value),E(),D("ngIf",r.showButtons&&r.buttonLayout==="stacked"),E(),D("ngIf",r.showButtons&&r.buttonLayout!=="stacked"),E(),D("ngIf",r.showButtons&&r.buttonLayout!=="stacked"))},dependencies:[rr,qa,Xr,Jr,Xs,_p,Zh,Qf,k6e,A6e,Un],encapsulation:2,changeDetection:0})}return t})(),H6e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[U4,Un,Un]})}return t})();var $Ct=["*"],qCt={root:"p-inputgroupaddon"},G6e=(()=>{class t extends br{name="inputgroupaddon";classes=qCt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Pie=(()=>{class t extends ur{style;styleClass;_componentStyle=ae(G6e);get hostStyle(){return this.style}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-inputgroup-addon"],["p-inputGroupAddon"]],hostVars:7,hostBindings:function(n,r){n&2&&(lt("data-pc-name","inputgroupaddon"),is(r.hostStyle),Pe(r.styleClass),zn("p-inputgroupaddon",!0))},inputs:{style:"style",styleClass:"styleClass"},features:[Ii([G6e]),Tt],ngContentSelectors:$Ct,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2})}return t})();var j6e=` .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 YCt=["*"],KCt=` ${j6e} /*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%; } `,WCt={root:({instance:t})=>["p-inputgroup",{"p-inputgroup-fluid":t.fluid}]},$6e=(()=>{class t extends br{name="inputgroup";theme=KCt;classes=WCt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Nie=(()=>{class t extends ur{styleClass;_componentStyle=ae($6e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-inputgroup"],["p-inputGroup"],["p-input-group"]],hostVars:3,hostBindings:function(n,r){n&2&&(lt("data-pc-name","inputgroup"),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{styleClass:"styleClass"},features:[Ii([$6e]),Tt],ngContentSelectors:YCt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2})}return t})();var q6e=` .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 QCt=["*"],ZCt=` ${q6e} /* For PrimeNG */ .p-iftalabel:has(.ng-invalid.ng-dirty) label { color: dt('iftalabel.invalid.color'); } `,XCt={root:"p-iftalabel"},Y6e=(()=>{class t extends br{name="iftalabel";theme=ZCt;classes=XCt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Ho=(()=>{class t extends ur{_componentStyle=ae(Y6e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-iftalabel"],["p-iftaLabel"],["p-ifta-label"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("root"))},features:[Ii([Y6e]),Tt],ngContentSelectors:QCt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},encapsulation:2,changeDetection:0})}return t})();var K6e=` .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 JCt=` ${K6e} /* 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; } `,ext={root:({instance:t})=>["p-badge p-component",{"p-badge-circle":Ro(t.value())&&String(t.value()).length===1,"p-badge-dot":ru(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"}]},W6e=(()=>{class t extends br{name="badge";theme=JCt;classes=ext;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var JT=(()=>{class t extends ur{styleClass=kr();badgeSize=kr();size=kr();severity=kr();value=kr();badgeDisabled=kr(!1,{transform:Je});_componentStyle=ae(W6e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-badge"]],hostVars:4,hostBindings:function(n,r){n&2&&(Pe(r.cn(r.cx("root"),r.styleClass())),la("display",r.badgeDisabled()?"none":null))},inputs:{styleClass:[1,"styleClass"],badgeSize:[1,"badgeSize"],size:[1,"size"],severity:[1,"severity"],value:[1,"value"],badgeDisabled:[1,"badgeDisabled"]},features:[Ii([W6e]),Tt],decls:1,vars:1,template:function(n,r){n&1&&ee(0),n&2&&Pt(r.value())},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),H4=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[JT,Un,Un]})}return t})();var Z6e=` .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 txt=` ${Z6e} /* 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); } } `,ixt={root:"p-ink"},X6e=(()=>{class t extends br{name="ripple";theme=txt;classes=ixt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Qc=(()=>{class t extends ur{zone=ae(Pn);_componentStyle=ae(X6e);animationListener;mouseDownListener;timeout;constructor(){super(),tu(()=>{Js(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 n=this.getInk();if(!n||this.document.defaultView?.getComputedStyle(n,null).display==="none")return;if(qp(n,"p-ink-active"),!nw(n)&&!K_(n)){let c=Math.max(Nd(this.el.nativeElement),zg(this.el.nativeElement));n.style.height=c+"px",n.style.width=c+"px"}let r=Vx(this.el.nativeElement),o=e.pageX-r.left+this.document.body.scrollTop-K_(n)/2,a=e.pageY-r.top+this.document.body.scrollLeft-nw(n)/2;this.renderer.setStyle(n,"top",a+"px"),this.renderer.setStyle(n,"left",o+"px"),nu(n,"p-ink-active"),this.timeout=setTimeout(()=>{let c=this.getInk();c&&qp(c,"p-ink-active")},401)}getInk(){let e=this.el.nativeElement.children;for(let n=0;n{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var e8e=` .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 nxt=["content"],rxt=["loadingicon"],oxt=["icon"],axt=["*"],i8e=t=>({class:t});function sxt(t,i){t&1&&Li(0)}function lxt(t,i){if(t&1&&be(0,"span"),t&2){let e=L(3);Pe(e.cx("loadingIcon")),lt("aria-hidden",!0)("data-pc-section","loadingicon")}}function cxt(t,i){if(t&1&&(Pi(),be(0,"svg",7)),t&2){let e=L(3);Pe(e.cn(e.cx("loadingIcon"),e.spinnerIconClass())),D("spin",!0),lt("aria-hidden",!0)("data-pc-section","loadingicon")}}function dxt(t,i){if(t&1&&(fi(0),ie(1,lxt,1,4,"span",3)(2,cxt,1,5,"svg",6),gi()),t&2){let e=L(2);E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function uxt(t,i){}function pxt(t,i){if(t&1&&ie(0,uxt,0,0,"ng-template",8),t&2){let e=L(2);D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function mxt(t,i){if(t&1&&(fi(0),ie(1,dxt,3,2,"ng-container",2)(2,pxt,1,1,null,5),gi()),t&2){let e=L();E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)("ngTemplateOutletContext",Yi(3,i8e,e.cx("loadingIcon")))}}function hxt(t,i){if(t&1&&be(0,"span"),t&2){let e=L(2);Pe(e.cx("icon")),lt("data-pc-section","icon")}}function fxt(t,i){}function gxt(t,i){if(t&1&&ie(0,fxt,0,0,"ng-template",8),t&2){let e=L(2);D("ngIf",!e.icon&&(e.iconTemplate||e._iconTemplate))}}function _xt(t,i){if(t&1&&(fi(0),ie(1,hxt,1,3,"span",3)(2,gxt,1,1,null,5),gi()),t&2){let e=L();E(),D("ngIf",e.icon&&!e.iconTemplate&&!e._iconTemplate),E(),D("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",Yi(3,i8e,e.cx("icon")))}}function yxt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L();Pe(e.cx("label")),lt("aria-hidden",e.icon&&!e.label)("data-pc-section","label"),E(),Pt(e.label)}}function vxt(t,i){if(t&1&&be(0,"p-badge",9),t&2){let e=L();D("value",e.badge)("severity",e.badgeSeverity)}}var bxt={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(([,i])=>!!i).reduce((i,[e])=>i+` ${e}`,"p-button-loading-icon"),label:"p-button-label"},Xk=(()=>{class t extends br{name="button";theme=e8e;classes=bxt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Zk={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"},t8e=(()=>{class t extends ur{_componentStyle=ae(Xk);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pButtonLabel",""]],hostVars:2,hostBindings:function(n,r){n&2&&zn("p-button-label",!0)},features:[Ii([Xk]),Tt]})}return t})(),G4=(()=>{class t extends ur{_componentStyle=ae(Xk);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pButtonIcon",""]],hostVars:2,hostBindings:function(n,r){n&2&&zn("p-button-icon",!0)},features:[Ii([Xk]),Tt]})}return t})(),aw=(()=>{class t extends ur{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=UT(G4);labelSignal=UT(t8e);isIconOnly=Or(()=>!!(!this.labelSignal()&&this.iconSignal()));set buttonProps(e){this._buttonProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,r])=>this[`_${n}`]!==r&&(this[`_${n}`]=r))}_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=kr(void 0,{transform:Je});_label;_icon;_loading=!1;initialized;get htmlElement(){return this.el.nativeElement}_internalClasses=Object.values(Zk);pcFluid=ae(XT,{optional:!0,host:!0,skipSelf:!0});isTextButton=Or(()=>!!(!this.iconSignal()&&this.labelSignal()&&this.text));get label(){return this._label}get icon(){return this._icon}get buttonProps(){return this._buttonProps}spinnerIcon=` `;_componentStyle=ae(Xk);ngAfterViewInit(){super.ngAfterViewInit(),nu(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){let e=[Zk.button,Zk.component];return this.icon&&!this.label&&ru(this.htmlElement.textContent)&&e.push(Zk.iconOnly),this.loading&&(e.push(Zk.disabled,Zk.loading),!this.icon&&this.label&&e.push(Zk.labelOnly),this.icon&&!this.label&&!ru(this.htmlElement.textContent)&&e.push(Zk.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"],n=this.htmlElement.classList.value.split(" ").find(r=>e.some(o=>r===`p-button-${o}`));n&&this.htmlElement.classList.remove(n)}createLabel(){if(!$r(this.htmlElement,".p-button-label")&&this.label){let n=this.document.createElement("span");this.icon&&!this.label&&n.setAttribute("aria-hidden","true"),n.className="p-button-label",n.appendChild(this.document.createTextNode(this.label)),this.htmlElement.appendChild(n)}}createIcon(){if(!$r(this.htmlElement,".p-button-icon")&&(this.icon||this.loading)){let n=this.document.createElement("span");n.className="p-button-icon",n.setAttribute("aria-hidden","true");let r=this.label?"p-button-icon-"+this.iconPos:null;r&&nu(n,r);let o=this.getIconClass();o&&nu(n,o),!this.loadingIcon&&this.loading&&(n.innerHTML=this.spinnerIcon),this.htmlElement.insertBefore(n,this.htmlElement.firstChild)}}updateLabel(){let e=$r(this.htmlElement,".p-button-label");if(!this.label){e&&this.htmlElement.removeChild(e);return}e?e.textContent=this.label:this.createLabel()}updateIcon(){let e=$r(this.htmlElement,".p-button-icon"),n=$r(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 "+(n?"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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pButton",""]],contentQueries:function(n,r,o){n&1&&(pv(o,r.iconSignal,G4,5),pv(o,r.labelSignal,t8e,5)),n&2&&Rb(2)},hostVars:4,hostBindings:function(n,r){n&2&&zn("p-button-icon-only",r.isIconOnly())("p-button-text",r.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:[Ii([Xk]),Tt]})}return t})(),Yl=(()=>{class t extends ur{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=kr(void 0,{transform:Je});onClick=new ve;onFocus=new ve;onBlur=new ve;contentTemplate;loadingIconTemplate;iconTemplate;templates;pcFluid=ae(XT,{optional:!0,host:!0,skipSelf:!0});get hasFluid(){return this.fluid()??!!this.pcFluid}_componentStyle=ae(Xk);_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,[n])=>e+` ${n}`,"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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-button"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,nxt,5),Vt(o,rxt,5),Vt(o,oxt,5),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.loadingIconTemplate=a.first),ze(a=Ue())&&(r.iconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},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",En],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:[Ii([Xk]),Tt],ngContentSelectors:axt,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(n,r){n&1&&(Kn(),O(0,"button",0),te("click",function(a){return r.onClick.emit(a)})("focus",function(a){return r.onFocus.emit(a)})("blur",function(a){return r.onBlur.emit(a)}),Sn(1),ie(2,sxt,1,0,"ng-container",1)(3,mxt,3,5,"ng-container",2)(4,_xt,3,5,"ng-container",2)(5,yxt,2,5,"span",3)(6,vxt,1,2,"p-badge",4),M()),n&2&&(Pe(r.cn(r.cx("root"),r.styleClass,r.buttonProps==null?null:r.buttonProps.styleClass)),D("ngStyle",r.style||(r.buttonProps==null?null:r.buttonProps.style))("disabled",r.disabled||r.loading||(r.buttonProps==null?null:r.buttonProps.disabled))("pAutoFocus",r.autofocus||(r.buttonProps==null?null:r.buttonProps.autofocus)),lt("type",r.type||(r.buttonProps==null?null:r.buttonProps.type))("aria-label",r.ariaLabel||(r.buttonProps==null?null:r.buttonProps.ariaLabel))("data-pc-name","button")("data-pc-section","root")("tabindex",r.tabindex||(r.buttonProps==null?null:r.buttonProps.tabindex)),E(2),D("ngTemplateOutlet",r.contentTemplate||r._contentTemplate),E(),D("ngIf",r.loading),E(),D("ngIf",!r.loading),E(),D("ngIf",!r.contentTemplate&&!r._contentTemplate&&r.label),E(),D("ngIf",!r.contentTemplate&&!r._contentTemplate&&r.badge))},dependencies:[rr,Xr,Jr,Xs,Qc,Zh,W_,H4,JT,Un],encapsulation:2,changeDetection:0})}return t})(),n8e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[rr,Yl,Un,Un]})}return t})();var Ss=(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})(Ss||{}),jb="*";function Wp(t,i){return{type:Ss.Trigger,name:t,definitions:i,options:{}}}function Jl(t,i=null){return{type:Ss.Animate,styles:i,timings:t}}function r8e(t,i=null){return{type:Ss.Sequence,steps:t,options:i}}function ul(t){return{type:Ss.Style,styles:t,offset:null}}function J0(t,i,e){return{type:Ss.State,name:t,styles:i,options:e}}function Oc(t,i,e=null){return{type:Ss.Transition,expr:t,animation:i,options:e}}function lw(t,i=null){return{type:Ss.Reference,animation:t,options:i}}function Jk(t,i=null){return{type:Ss.AnimateRef,animation:t,options:i}}var sw=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},NP=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,n=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==o&&this._onFinish()}),a.onDestroy(()=>{++n==o&&this._onDestroy()}),a.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(r)})}getPosition(){let i=this.players.reduce((e,n)=>e===null||n.totalTime>e.totalTime?n:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},j4="!";var Ta=class t{static isArray(i,e=!0){return Array.isArray(i)&&(e||i.length!==0)}static isObject(i,e=!0){return typeof i=="object"&&!Array.isArray(i)&&i!=null&&(e||Object.keys(i).length!==0)}static equals(i,e,n){return n?this.resolveFieldData(i,n)===this.resolveFieldData(e,n):this.equalsByValue(i,e)}static equalsByValue(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){var n=Array.isArray(i),r=Array.isArray(e),o,a,c;if(n&&r){if(a=i.length,a!=e.length)return!1;for(o=a;o--!==0;)if(!this.equalsByValue(i[o],e[o]))return!1;return!0}if(n!=r)return!1;var m=this.isDate(i),g=this.isDate(e);if(m!=g)return!1;if(m&&g)return i.getTime()==e.getTime();var C=i instanceof RegExp,w=e instanceof RegExp;if(C!=w)return!1;if(C&&w)return i.toString()==e.toString();var P=Object.keys(i);if(a=P.length,a!==Object.keys(e).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,P[o]))return!1;for(o=a;o--!==0;)if(c=P[o],!this.equalsByValue(i[c],e[c]))return!1;return!0}return i!==i&&e!==e}static resolveFieldData(i,e){if(i&&e){if(this.isFunction(e))return e(i);if(e.indexOf(".")==-1)return i[e];{let n=e.split("."),r=i;for(let o=0,a=n.length;o=i.length&&(n%=i.length,e%=i.length),i.splice(n,0,i.splice(e,1)[0]))}static insertIntoOrderedArray(i,e,n,r){if(n.length>0){let o=!1;for(let a=0;ae){n.splice(a,0,i),o=!0;break}o||n.push(i)}else n.push(i)}static findIndexInList(i,e){let n=-1;if(e){for(let r=0;re?1:0,o}static sort(i,e,n=1,r,o=1){let a=t.compare(i,e,r,n),c=n;return(t.isEmpty(i)||t.isEmpty(e))&&(c=o===1?n:o),c*a}static merge(i,e){if(!(i==null&&e==null)){{if((i==null||typeof i=="object")&&(e==null||typeof e=="object"))return pe(pe({},i||{}),e||{});if((i==null||typeof i=="string")&&(e==null||typeof e=="string"))return[i||"",e||""].join(" ")}return e||i}}static isPrintableCharacter(i=""){return this.isNotEmpty(i)&&i.length===1&&i.match(/\S| /)}static getItemValue(i,...e){return this.isFunction(i)?i(...e):i}static findLastIndex(i,e){let n=-1;if(this.isNotEmpty(i))try{n=i.findLastIndex(e)}catch{n=i.lastIndexOf([...i].reverse().find(e))}return n}static findLast(i,e){let n;if(this.isNotEmpty(i))try{n=i.findLast(e)}catch{n=[...i].reverse().find(e)}return n}static deepEquals(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){var n=Array.isArray(i),r=Array.isArray(e),o,a,c;if(n&&r){if(a=i.length,a!=e.length)return!1;for(o=a;o--!==0;)if(!this.deepEquals(i[o],e[o]))return!1;return!0}if(n!=r)return!1;var m=i instanceof Date,g=e instanceof Date;if(m!=g)return!1;if(m&&g)return i.getTime()==e.getTime();var C=i instanceof RegExp,w=e instanceof RegExp;if(C!=w)return!1;if(C&&w)return i.toString()==e.toString();var P=Object.keys(i);if(a=P.length,a!==Object.keys(e).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,P[o]))return!1;for(o=a;o--!==0;)if(c=P[o],!this.deepEquals(i[c],e[c]))return!1;return!0}return i!==i&&e!==e}static minifyCSS(i){return i&&i.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}static toFlatCase(i){return this.isString(i)?i.replace(/(-|_)/g,"").toLowerCase():i}static isString(i,e=!0){return typeof i=="string"&&(e||i!=="")}},o8e=0;function Pbe(t="pn_id_"){return o8e++,`${t}${o8e}`}function xxt(){let t=[],i=(o,a)=>{let c=t.length>0?t[t.length-1]:{key:o,value:a},m=c.value+(c.key===o?0:a)+2;return t.push({key:o,value:m}),m},e=o=>{t=t.filter(a=>a.value!==o)},n=()=>t.length>0?t[t.length-1].value:0,r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,a,c)=>{a&&(a.style.zIndex=String(i(o,c)))},clear:o=>{o&&(e(r(o)),o.style.zIndex="")},getCurrent:()=>n(),generateZIndex:i,revertZIndex:e}}var Fd=xxt(),FP=t=>!!t;var a8e=(()=>{class t{_animationsDisabled=tl();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,r){n&2&&zn("mat-pseudo-checkbox-indeterminate",r.state==="indeterminate")("mat-pseudo-checkbox-checked",r.state==="checked")("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal",r.appearance==="minimal")("mat-pseudo-checkbox-full",r.appearance==="full")("_mat-animation-noopable",r._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(n,r){},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 wxt=["text"],Ixt=[[["mat-icon"]],"*"],Txt=["mat-icon","*"];function Ext(t,i){if(t&1&&be(0,"mat-pseudo-checkbox",1),t&2){let e=L();D("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function Axt(t,i){if(t&1&&be(0,"mat-pseudo-checkbox",3),t&2){let e=L();D("disabled",e.disabled)}}function Dxt(t,i){if(t&1&&(O(0,"span",4),ee(1),M()),t&2){let e=L();E(),gn("(",e.group.label,")")}}var Lie=new Mi("MAT_OPTION_PARENT_COMPONENT"),Bie=new Mi("MatOptgroup");var Fie=class{source;isUserInput;constructor(i,e=!1){this.source=i,this.isUserInput=e}},$b=(()=>{class t{_element=ae(qn);_changeDetectorRef=ae(dn);_parent=ae(Lie,{optional:!0});group=ae(Bie,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=ae(Tl).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=hr(!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 Ai;constructor(){let e=ae(pc);e.load(gp),e.load(Nk),this._signalDisableRipple=!!this._parent&&$S(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,n){let r=this._getHostElement();typeof r.focus=="function"&&r.focus(n)}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)&&!Au(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 Fie(this,e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-option"]],viewQuery:function(n,r){if(n&1&&Xi(wxt,7),n&2){let o;ze(o=Ue())&&(r._text=o.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,r){n&1&&te("click",function(){return r._selectViaInteraction()})("keydown",function(a){return r._handleKeydown(a)}),n&2&&(sa("id",r.id),lt("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),zn("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",Je]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Txt,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(n,r){n&1&&(Kn(Ixt),yt(0,Ext,1,2,"mat-pseudo-checkbox",1),Sn(1),O(2,"span",2,0),Sn(4,1),M(),yt(5,Axt,1,1,"mat-pseudo-checkbox",3),yt(6,Dxt,2,1,"span",4),be(7,"div",5)),n&2&&(vt(r.multiple?0:-1),E(5),vt(!r.multiple&&r.selected&&!r.hideSingleSelectionIndicator?5:-1),E(),vt(r.group&&r.group._inert?6:-1),E(),D("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[a8e,Wh],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 Nbe(t,i,e){if(e.length){let n=i.toArray(),r=e.toArray(),o=0;for(let a=0;ae+n?Math.max(0,t-n+i):e}var Lbe=class{_box;_destroyed=new Ai;_resizeSubject=new Ai;_resizeObserver;_elementObservables=new Map;constructor(i){this._box=i,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new qo(e=>{let n=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),n.unsubscribe(),this._elementObservables.delete(i)}}).pipe(vn(e=>e.some(n=>n.target===i)),qc({bufferSize:1,refCount:!0}),ha(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Vie=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=ae(Pn);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,n){let r=n?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new Lbe(r)),this._observers.get(r).observe(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var kxt=["notch"],Mxt=["matFormFieldNotchedOutline",""],Oxt=["*"],s8e=["iconPrefixContainer"],l8e=["textPrefixContainer"],c8e=["iconSuffixContainer"],d8e=["textSuffixContainer"],Rxt=["textField"],Pxt=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Nxt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Fxt(t,i){t&1&&be(0,"span",20)}function Lxt(t,i){if(t&1&&(O(0,"label",19),Sn(1,1),yt(2,Fxt,1,0,"span",20),M()),t&2){let e=L(2);D("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),lt("for",e._control.disableAutomaticLabeling?null:e._control.id),E(2),vt(!e.hideRequiredMarker&&e._control.required?2:-1)}}function Bxt(t,i){if(t&1&&yt(0,Lxt,3,5,"label",19),t&2){let e=L();vt(e._hasFloatingLabel()?0:-1)}}function Vxt(t,i){t&1&&be(0,"div",7)}function zxt(t,i){}function Uxt(t,i){if(t&1&&ie(0,zxt,0,0,"ng-template",13),t&2){L(2);let e=Oi(1);D("ngTemplateOutlet",e)}}function Hxt(t,i){if(t&1&&(O(0,"div",9),yt(1,Uxt,1,1,null,13),M()),t&2){let e=L();D("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),E(),vt(e._forceDisplayInfixLabel()?-1:1)}}function Gxt(t,i){t&1&&(O(0,"div",10,2),Sn(2,2),M())}function jxt(t,i){t&1&&(O(0,"div",11,3),Sn(2,3),M())}function $xt(t,i){}function qxt(t,i){if(t&1&&ie(0,$xt,0,0,"ng-template",13),t&2){L();let e=Oi(1);D("ngTemplateOutlet",e)}}function Yxt(t,i){t&1&&(O(0,"div",14,4),Sn(2,4),M())}function Kxt(t,i){t&1&&(O(0,"div",15,5),Sn(2,5),M())}function Wxt(t,i){t&1&&be(0,"div",16)}function Qxt(t,i){t&1&&Sn(0,6)}function Zxt(t,i){if(t&1&&(O(0,"mat-hint",21),ee(1),M()),t&2){let e=L(2);D("id",e._hintLabelId),E(),Pt(e.hintLabel)}}function Xxt(t,i){if(t&1&&(yt(0,Zxt,2,2,"mat-hint",21),Sn(1,7),be(2,"div",22),Sn(3,8)),t&2){let e=L();vt(e.hintLabel?0:-1)}}var rd=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-label"]]})}return t})(),Bbe=new Mi("MatError"),Uie=(()=>{class t{id=ae(Tl).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(n,r){n&2&&sa("id",r.id)},inputs:{id:"id"},features:[Ii([{provide:Bbe,useExisting:t}])]})}return t})(),yp=(()=>{class t{align="start";id=ae(Tl).getId("mat-mdc-hint-");static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,r){n&2&&(sa("id",r.id),lt("align",null),zn("mat-mdc-form-field-hint-end",r.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),_8e=new Mi("MatPrefix");var Vbe=new Mi("MatSuffix"),km=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[Ii([{provide:Vbe,useExisting:t}])]})}return t})(),y8e=new Mi("FloatingLabelParent"),u8e=(()=>{class t{_elementRef=ae(qn);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=ae(Vie);_ngZone=ae(Pn);_parent=ae(y8e);_resizeSubscription=new Ia;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return Jxt(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(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,r){n&2&&zn("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function Jxt(t){let i=t;if(i.offsetParent!==null)return i.scrollWidth;let e=i.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let n=e.scrollWidth;return e.remove(),n}var p8e="mdc-line-ripple--active",zie="mdc-line-ripple--deactivating",m8e=(()=>{class t{_elementRef=ae(qn);_cleanupTransitionEnd;constructor(){let e=ae(Pn),n=ae(Ma);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=n.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(zie),e.add(p8e)}deactivate(){this._elementRef.nativeElement.classList.add(zie)}_handleTransitionEnd=e=>{let n=this._elementRef.nativeElement.classList,r=n.contains(zie);e.propertyName==="opacity"&&r&&n.remove(p8e,zie)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),h8e=(()=>{class t{_elementRef=ae(qn);_ngZone=ae(Pn);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,n=e.querySelector(".mdc-floating-label");n?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(n.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>n.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let n=this._notch.nativeElement;!this.open||!e?n.style.width="":n.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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,r){if(n&1&&Xi(kxt,5),n&2){let o;ze(o=Ue())&&(r._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,r){n&2&&zn("mdc-notched-outline--notched",r.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:Mxt,ngContentSelectors:Oxt,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(n,r){n&1&&(Kn(),Cr(0,"div",1),vo(1,"div",2,0),Sn(3),So(),Cr(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),$4=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t})}return t})();var q4=new Mi("MatFormField"),v8e=new Mi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),f8e="fill",e1t="auto",g8e="fixed",t1t="translateY(-50%)",Oa=(()=>{class t{_elementRef=ae(qn);_changeDetectorRef=ae(dn);_platform=ae(_s);_idGenerator=ae(Tl);_ngZone=ae(Pn);_defaults=ae(v8e,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=fP("iconPrefixContainer");_textPrefixContainerSignal=fP("textPrefixContainer");_iconSuffixContainerSignal=fP("iconSuffixContainer");_textSuffixContainerSignal=fP("textSuffixContainer");_prefixSuffixContainers=Or(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=UT(rd);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Kh(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||e1t}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let n=e||this._defaults?.appearance||f8e;this._appearanceSignal.set(n)}_appearanceSignal=hr(f8e);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||g8e}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||g8e}_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 Ai;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=tl();constructor(){let e=this._defaults,n=ae(Du);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),tu(()=>this._currentDirection=n.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=Or(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let n=this._control,r="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(r+e.controlType),n.controlType&&this._elementRef.nativeElement.classList.add(r+n.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=n.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=n.stateChanges.pipe(ks([void 0,void 0]),ot(()=>[n.errorState,n.userAriaDescribedBy]),sJ(),vn(([[o,a],[c,m]])=>o!==c||a!==m)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),n.ngControl&&n.ngControl.valueChanges&&(this._valueChanges=n.ngControl.valueChanges.pipe(ha(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(),Vp(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(){HVe({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=Or(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let n=this._control?this._control.ngControl:null;return n&&n[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 o=this._hintChildren?this._hintChildren.find(c=>c.align==="start"):null,a=this._hintChildren?this._hintChildren.find(c=>c.align==="end"):null;o?e.push(o.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id)}else this._errorChildren&&e.push(...this._errorChildren.map(o=>o.id));let n=this._control.describedByIds,r;if(n){let o=this._describedByIds||e;r=e.concat(n.filter(a=>a&&!o.includes(a)))}else r=e;this._control.setDescribedByIds(r),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,n=this._textPrefixContainer?.nativeElement,r=this._iconSuffixContainer?.nativeElement,o=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,c=n?.getBoundingClientRect().width??0,m=r?.getBoundingClientRect().width??0,g=o?.getBoundingClientRect().width??0,C=this._currentDirection==="rtl"?"-1":"1",w=`${a+c}px`,R=`calc(${C} * (${w} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,z=`var(--mat-mdc-form-field-label-transform, ${t1t} translateX(${R}))`,H=a+c+m+g;return[z,H]}_writeOutlinedLabelStyles(e){if(e!==null){let[n,r]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=n),r!==null&&this._notchedOutline?._setMaxWidth(r)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let n=e.getRootNode();return n&&n!==e}return document.documentElement.contains(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-form-field"]],contentQueries:function(n,r,o){if(n&1&&(pv(o,r._labelChild,rd,5),Vt(o,$4,5),Vt(o,_8e,5),Vt(o,Vbe,5),Vt(o,Bbe,5),Vt(o,yp,5)),n&2){Rb();let a;ze(a=Ue())&&(r._formFieldControl=a.first),ze(a=Ue())&&(r._prefixChildren=a),ze(a=Ue())&&(r._suffixChildren=a),ze(a=Ue())&&(r._errorChildren=a),ze(a=Ue())&&(r._hintChildren=a)}},viewQuery:function(n,r){if(n&1&&(Ik(r._iconPrefixContainerSignal,s8e,5),Ik(r._textPrefixContainerSignal,l8e,5),Ik(r._iconSuffixContainerSignal,c8e,5),Ik(r._textSuffixContainerSignal,d8e,5),Xi(Rxt,5),Xi(s8e,5),Xi(l8e,5),Xi(c8e,5),Xi(d8e,5),Xi(u8e,5),Xi(h8e,5),Xi(m8e,5)),n&2){Rb(4);let o;ze(o=Ue())&&(r._textField=o.first),ze(o=Ue())&&(r._iconPrefixContainer=o.first),ze(o=Ue())&&(r._textPrefixContainer=o.first),ze(o=Ue())&&(r._iconSuffixContainer=o.first),ze(o=Ue())&&(r._textSuffixContainer=o.first),ze(o=Ue())&&(r._floatingLabel=o.first),ze(o=Ue())&&(r._notchedOutline=o.first),ze(o=Ue())&&(r._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(n,r){n&2&&zn("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-appearance-fill",r.appearance=="fill")("mat-form-field-appearance-outline",r.appearance=="outline")("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-primary",r.color!=="accent"&&r.color!=="warn")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Ii([{provide:q4,useExisting:t},{provide:y8e,useExisting:t}])],ngContentSelectors:Nxt,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(n,r){if(n&1){let o=qe();Kn(Pxt),ie(0,Bxt,1,1,"ng-template",null,0,di),O(2,"div",6,1),te("click",function(c){return se(o),le(r._control.onContainerClick(c))}),yt(4,Vxt,1,0,"div",7),O(5,"div",8),yt(6,Hxt,2,2,"div",9),yt(7,Gxt,3,0,"div",10),yt(8,jxt,3,0,"div",11),O(9,"div",12),yt(10,qxt,1,1,null,13),Sn(11),M(),yt(12,Yxt,3,0,"div",14),yt(13,Kxt,3,0,"div",15),M(),yt(14,Wxt,1,0,"div",16),M(),O(15,"div",17)(16,"div",18),yt(17,Qxt,1,0)(18,Xxt,4,1),M()()}if(n&2){let o;E(2),zn("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),E(2),vt(!r._hasOutline()&&!r._control.disabled?4:-1),E(2),vt(r._hasOutline()?6:-1),E(),vt(r._hasIconPrefix?7:-1),E(),vt(r._hasTextPrefix?8:-1),E(2),vt(!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),E(2),vt(r._hasTextSuffix?12:-1),E(),vt(r._hasIconSuffix?13:-1),E(),vt(r._hasOutline()?-1:14),E(),zn("mat-mdc-form-field-subscript-dynamic-size",r.subscriptSizing==="dynamic");let a=r._getSubscriptMessageType();E(),zn("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),E(),vt((o=a)==="error"?17:o==="hint"?18:-1)}},dependencies:[u8e,h8e,Jr,m8e,yp],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 Hie=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a]})}return t})();var eE=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[tw,_a,Hie,$b]})}return t})();var i1t=new Mi("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>G_(t)}});function n1t(t){let i=ae(Ir);return()=>G_(i)}var r1t={provide:i1t,deps:[],useFactory:n1t};var b8e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[r1t],imports:[vv,eE,_a,$T,eE,_a]})}return t})();function a1t(t,i){t&1&&Cr(0,"div",2)}var s1t=new Mi("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var x8e=(()=>{class t{_elementRef=ae(qn);_ngZone=ae(Pn);_changeDetectorRef=ae(dn);_renderer=ae(Ma);_cleanupTransitionEnd;constructor(){let e=E7(),n=ae(s1t,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),n&&(n.color&&(this.color=this._defaultColor=n.color),this.mode=n.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=C8e(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=C8e(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(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&2&&(lt("aria-valuenow",r._isIndeterminate()?null:r.value)("mode",r.mode),Pe("mat-"+r.color),zn("_mat-animation-noopable",r._isNoopAnimation)("mdc-linear-progress--animation-ready",!r._isNoopAnimation)("mdc-linear-progress--indeterminate",r._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",En],bufferValue:[2,"bufferValue","bufferValue",En],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(n,r){n&1&&(vo(0,"div",0),Cr(1,"div",1),yt(2,a1t,1,0,"div",2),So(),vo(3,"div",3),Cr(4,"span",4),So(),vo(5,"div",5),Cr(6,"span",4),So()),n&2&&(E(),la("flex-basis",r._getBufferBarFlexBasis()),E(),vt(r.mode==="buffer"?2:-1),E(),la("transform",r._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 C8e(t,i=0,e=100){return Math.max(i,Math.min(e,t))}var S8e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a]})}return t})();var c1t=["mat-internal-form-field",""],d1t=["*"],Y4=(()=>{class t{labelPosition;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,r){n&2&&zn("mdc-form-field--align-end",r.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:c1t,ngContentSelectors:d1t,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(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 K4=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(i,e,n,r,o){this._defaultMatcher=i,this.ngControl=e,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=o}updateErrorState(){let i=this.errorState,e=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=n?.isErrorState(r,e)??!1;o!==i&&(this.errorState=o,this._stateChanges.next())}};var iE=new Mi("MAT_DATE_LOCALE",{providedIn:"root",factory:u1t});function u1t(){return ae(xm)}var W4="Method not implemented",tE=class{locale;_localeChanges=new Ai;localeChanges=this._localeChanges;setTime(i,e,n,r){throw new Error(W4)}getHours(i){throw new Error(W4)}getMinutes(i){throw new Error(W4)}getSeconds(i){throw new Error(W4)}parseTime(i,e){throw new Error(W4)}addSeconds(i,e){throw new Error(W4)}getValidDateOrNull(i){return this.isDateInstance(i)&&this.isValid(i)?i:null}deserialize(i){return i==null||this.isDateInstance(i)&&this.isValid(i)?i:this.invalid()}setLocale(i){this.locale=i,this._localeChanges.next()}compareDate(i,e){return this.getYear(i)-this.getYear(e)||this.getMonth(i)-this.getMonth(e)||this.getDate(i)-this.getDate(e)}compareTime(i,e){return this.getHours(i)-this.getHours(e)||this.getMinutes(i)-this.getMinutes(e)||this.getSeconds(i)-this.getSeconds(e)}sameDate(i,e){if(i&&e){let n=this.isValid(i),r=this.isValid(e);return n&&r?!this.compareDate(i,e):n==r}return i==e}sameTime(i,e){if(i&&e){let n=this.isValid(i),r=this.isValid(e);return n&&r?!this.compareTime(i,e):n==r}return i==e}clampDate(i,e,n){return e&&this.compareDate(i,e)<0?e:n&&this.compareDate(i,n)>0?n:i}},Q4=new Mi("mat-date-formats");var LP=(()=>{class t{isErrorState(e,n){return!!(e&&e.invalid&&(e.touched||n&&n.submitted))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p1t=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(n,r){},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})(),m1t={passive:!0},w8e=(()=>{class t{_platform=ae(_s);_ngZone=ae(Pn);_renderer=ae(Jd).createRenderer(null,null);_styleLoader=ae(pc);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Xd;this._styleLoader.load(p1t);let n=H_(e),r=this._monitoredElements.get(n);if(r)return r.subject;let o=new Ai,a="cdk-text-field-autofilled",c=g=>{g.animationName==="cdk-text-field-autofill-start"&&!n.classList.contains(a)?(n.classList.add(a),this._ngZone.run(()=>o.next({target:g.target,isAutofilled:!0}))):g.animationName==="cdk-text-field-autofill-end"&&n.classList.contains(a)&&(n.classList.remove(a),this._ngZone.run(()=>o.next({target:g.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(n.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(n,"animationstart",c,m1t)));return this._monitoredElements.set(n,{subject:o,unlisten:m}),o}stopMonitoring(e){let n=H_(e),r=this._monitoredElements.get(n);r&&(r.unlisten(),r.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((e,n)=>this.stopMonitoring(n))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var I8e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var T8e=new Mi("MAT_INPUT_VALUE_ACCESSOR");var mc=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_4,Oa,_a]})}return t})();var h1t=["button","checkbox","file","hidden","image","radio","range","reset","submit"],f1t=new Mi("MAT_INPUT_CONFIG"),zs=(()=>{class t{_elementRef=ae(qn);_platform=ae(_s);ngControl=ae($p,{optional:!0,self:!0});_autofillMonitor=ae(w8e);_ngZone=ae(Pn);_formField=ae(q4,{optional:!0});_renderer=ae(Ma);_uid=ae(Tl).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=ae(f1t,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new Ai;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Kh(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(La.required)??!1}set required(e){this._required=Kh(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Wve().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=Kh(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=>Wve().has(e));constructor(){let e=ae(j7,{optional:!0}),n=ae(Xu,{optional:!0}),r=ae(LP),o=ae(T8e,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();o?$S(o.value)?this._signalBasedValueAccessor=o:this._inputValueAccessor=o:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new K4(r,this.ngControl,n,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&tu(()=>{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 n=this._elementRef.nativeElement;n.type==="number"?(n.type="text",n.setSelectionRange(0,0),n.type="number"):n.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 n=this._elementRef.nativeElement;this._previousPlaceholder=e,e?n.setAttribute("placeholder",e):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){h1t.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,n=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&n&&n.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let n=this._elementRef.nativeElement;e.length?n.setAttribute("aria-describedby",e.join(" ")):n.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 n=e.target;!n.value&&n.selectionStart===0&&n.selectionEnd===0&&(n.setSelectionRange(1,1),n.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(n,r){n&1&&te("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),n&2&&(sa("id",r.id)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),lt("name",r.name||null)("readonly",r._getReadonlyAttribute())("aria-disabled",r.disabled&&r.disabledInteractive?"true":null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),zn("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mat-mdc-input-disabled-interactive",r.disabledInteractive)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._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:[Ii([{provide:$4,useExisting:t}]),Yt]})}return t})(),hc=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,mc,mc,I8e,_a]})}return t})();var Gie;function _1t(){if(Gie===void 0&&(Gie=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(Gie=t.trustedTypes.createPolicy("angular#components",{createHTML:i=>i}))}return Gie}function t9(t){return _1t()?.createHTML(t)||t}function E8e(t){return Error(`Unable to find icon with the name "${t}"`)}function y1t(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function A8e(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function D8e(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}var nE=class{url;svgText;options;svgElement;constructor(i,e,n){this.url=i,this.svgText=e,this.options=n}},M8e=(()=>{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,n,r,o){this._httpClient=e,this._sanitizer=n,this._errorHandler=o,this._document=r}addSvgIcon(e,n,r){return this.addSvgIconInNamespace("",e,n,r)}addSvgIconLiteral(e,n,r){return this.addSvgIconLiteralInNamespace("",e,n,r)}addSvgIconInNamespace(e,n,r,o){return this._addSvgIconConfig(e,n,new nE(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,o){let a=this._sanitizer.sanitize(jh.HTML,r);if(!a)throw D8e(r);let c=t9(a);return this._addSvgIconConfig(e,n,new nE("",c,o))}addSvgIconSet(e,n){return this.addSvgIconSetInNamespace("",e,n)}addSvgIconSetLiteral(e,n){return this.addSvgIconSetLiteralInNamespace("",e,n)}addSvgIconSetInNamespace(e,n,r){return this._addSvgIconSetConfig(e,new nE(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){let o=this._sanitizer.sanitize(jh.HTML,n);if(!o)throw D8e(n);let a=t9(o);return this._addSvgIconSetConfig(e,new nE("",a,r))}registerFontClassAlias(e,n=e){return this._fontCssClassesByAlias.set(e,n),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let n=this._sanitizer.sanitize(jh.RESOURCE_URL,e);if(!n)throw A8e(e);let r=this._cachedIconsByUrl.get(n);return r?$t(jie(r)):this._loadSvgIconFromConfig(new nE(e,null)).pipe(yo(o=>this._cachedIconsByUrl.set(n,o)),ot(o=>jie(o)))}getNamedSvgIcon(e,n=""){let r=k8e(n,e),o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(n,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);let a=this._iconSetConfigs.get(n);return a?this._getSvgFromIconSetConfigs(e,a):NS(E8e(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?$t(jie(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(ot(n=>jie(n)))}_getSvgFromIconSetConfigs(e,n){let r=this._extractIconWithNameFromAnySet(e,n);if(r)return $t(r);let o=n.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(Ac(c=>{let g=`Loading icon set URL: ${this._sanitizer.sanitize(jh.RESOURCE_URL,a.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(g)),$t(null)})));return Ys(o).pipe(ot(()=>{let a=this._extractIconWithNameFromAnySet(e,n);if(!a)throw E8e(e);return a}))}_extractIconWithNameFromAnySet(e,n){for(let r=n.length-1;r>=0;r--){let o=n[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let a=this._svgElementFromConfig(o),c=this._extractSvgIconFromSet(a,e,o.options);if(c)return c}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(yo(n=>e.svgText=n),ot(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?$t(null):this._fetchIcon(e).pipe(yo(n=>e.svgText=n))}_extractSvgIconFromSet(e,n,r){let o=e.querySelector(`[id="${n}"]`);if(!o)return null;let a=o.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,r);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),r);let c=this._svgElementFromString(t9(""));return c.appendChild(a),this._setSvgAttributes(c,r)}_svgElementFromString(e){let n=this._document.createElement("DIV");n.innerHTML=e;let r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){let n=this._svgElementFromString(t9("")),r=e.attributes;for(let o=0;ot9(g)),LS(()=>this._inProgressUrlFetches.delete(a)),VG());return this._inProgressUrlFetches.set(a,m),m}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(k8e(e,n),r),this}_addSvgIconSetConfig(e,n){let r=this._iconSetConfigs.get(e);return r?r.push(n):this._iconSetConfigs.set(e,[n]),this}_svgElementFromConfig(e){if(!e.svgElement){let n=this._svgElementFromString(e.svgText);this._setSvgAttributes(n,e.options),e.svgElement=n}return e.svgElement}_getIconConfigFromResolvers(e,n){for(let r=0;ri?i.pathname+i.search:""}}var O8e=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],w1t=O8e.map(t=>`[${t}]`).join(", "),I1t=/^url\(['"]?#(.*?)['"]?\)$/,zr=(()=>{class t{_elementRef=ae(qn);_iconRegistry=ae(M8e);_location=ae(x1t);_errorHandler=ae(hp);_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 n=this._cleanupFontValue(e);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let n=this._cleanupFontValue(e);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Ia.EMPTY;constructor(){let e=ae(new $f("aria-hidden"),{optional:!0}),n=ae(C1t,{optional:!0});n&&(n.color&&(this.color=this._defaultColor=n.color),n.fontSet&&(this.fontSet=n.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let n=e.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,n=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){let r=e.childNodes[n];(r.nodeType!==1||r.nodeName.toLowerCase()==="svg")&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),n.forEach(r=>e.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.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 n=this._elementsWithExternalReferences;n&&n.forEach((r,o)=>{r.forEach(a=>{o.setAttribute(a.name,`url('${e}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(e){let n=e.querySelectorAll(w1t),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o{let c=n[o],m=c.getAttribute(a),g=m?m.match(I1t):null;if(g){let C=r.get(c);C||(C=[],r.set(c,C)),C.push({name:a,value:g[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[n,r]=this._splitIconName(e);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(ar(1)).subscribe(o=>this._setSvgElement(o),o=>{let a=`Error retrieving icon ${n}:${r}! ${o.message}`;this._errorHandler.handleError(new Error(a))})}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,r){n&2&&(lt("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),Pe(r.color?"mat-"+r.color:""),zn("mat-icon-inline",r.inline)("mat-icon-no-color",r.color!=="primary"&&r.color!=="accent"&&r.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",Je],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:b1t,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(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})(),da=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_a]})}return t})();var T1t=["tooltip"],zbe=20;var Ube=new Mi("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>G_(t,{scrollThrottle:zbe})}});function N8e(t){let i=ae(Ir);return()=>G_(i,{scrollThrottle:zbe})}var Hbe={provide:Ube,deps:[],useFactory:N8e};function F8e(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var L8e=new Mi("mat-tooltip-default-options",{providedIn:"root",factory:F8e});var R8e="tooltip-panel",P8e=Pk({passive:!0}),E1t=8,A1t=8,D1t=24,k1t=200,Ld=(()=>{class t{_elementRef=ae(qn);_ngZone=ae(Pn);_platform=ae(_s);_ariaDescriber=ae(L5e);_focusMonitor=ae(wm);_dir=ae(Du);_injector=ae(Ir);_viewContainerRef=ae($l);_animationsDisabled=tl();_defaultOptions=ae(L8e,{optional:!0});_overlayRef;_tooltipInstance;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=B8e;_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=Kh(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let n=Kh(e);this._disabled!==n&&(this._disabled=n,n?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=_v(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=_v(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let n=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(n)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_touchstartTimeout=null;_destroyed=new Ai;_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=E1t}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ha(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(([n,r])=>{e.removeEventListener(n,r,P8e)}),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,n){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let r=this._createOverlay(n);this._detach(),this._portal=this._portal||new qh(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(ha(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){let n=this._tooltipInstance;n&&(n.isVisible()?n.hide(e):(n._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 a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&a._origin instanceof qn)return this._overlayRef;this._detach()}let n=this._injector.get(Bk).getAncestorScrollContainers(this._elementRef),r=`${this._cssClassPrefix}-${R8e}`,o=Vk(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(n);return o.positionChanges.pipe(ha(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=Bb(this._injector,{direction:this._dir,positionStrategy:o,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,r]:r,scrollStrategy:this._injector.get(Ube)(),disableAnimations:this._animationsDisabled}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ha(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ha(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ha(this._destroyed)).subscribe(a=>{this._isTooltipVisible()&&a.keyCode===27&&!Au(a)&&(a.preventDefault(),a.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(ha(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 n=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();n.withPositions([this._addOffset(pe(pe({},r.main),o.main)),this._addOffset(pe(pe({},r.fallback),o.fallback))])}_addOffset(e){let n=A1t,r=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-n:e.originY==="bottom"?e.offsetY=n:e.originX==="start"?e.offsetX=r?-n:n:e.originX==="end"&&(e.offsetX=r?n:-n),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",n=this.position,r;n=="above"||n=="below"?r={originX:"center",originY:n=="above"?"top":"bottom"}:n=="before"||n=="left"&&e||n=="right"&&!e?r={originX:"start",originY:"center"}:(n=="after"||n=="right"&&e||n=="left"&&!e)&&(r={originX:"end",originY:"center"});let{x:o,y:a}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:a}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",n=this.position,r;n=="above"?r={overlayX:"center",overlayY:"bottom"}:n=="below"?r={overlayX:"center",overlayY:"top"}:n=="before"||n=="left"&&e||n=="right"&&!e?r={overlayX:"end",overlayY:"center"}:(n=="after"||n=="right"&&e||n=="left"&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:o,y:a}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Rd(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,n){return this.position==="above"||this.position==="below"?n==="top"?n="bottom":n==="bottom"&&(n="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:n}}_updateCurrentPositionClass(e){let{overlayY:n,originX:r,originY:o}=e,a;if(n==="center"?this._dir&&this._dir.value==="rtl"?a=r==="end"?"left":"right":a=r==="start"?"left":"right":a=n==="bottom"&&o==="top"?"above":"below",a!==this._currentPosition){let c=this._overlayRef;if(c){let m=`${this._cssClassPrefix}-${R8e}-`;c.removePanelClass(m+this._currentPosition),c.addPanelClass(m+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let n;e.x!==void 0&&e.y!==void 0&&(n=e),this.show(void 0,n)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let n=e.targetTouches?.[0],r=n?{x:n.clientX,y:n.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let o=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,r)},this._defaultOptions?.touchLongPressShowDelay??o)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",n=>{let r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let n=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",n],["touchcancel",n])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,P8e)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let n=this._injector.get(Gr).elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let n=this._elementRef.nativeElement,r=n.style;(e==="on"||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA")&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),(e==="on"||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Rd({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(n,r){n&2&&zn("mat-mdc-tooltip-disabled",r.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})(),B8e=(()=>{class t{_changeDetectorRef=ae(dn);_elementRef=ae(qn);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=tl();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new Ai;_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>D1t&&e.width>=k1t}_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 n=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(n.classList.remove(e?o:r),n.classList.add(e?r:o),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(n);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(n,r){if(n&1&&Xi(T1t,7),n&2){let o;ze(o=Ue())&&(r._tooltip=o.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(n,r){n&1&&te("mouseleave",function(a){return r._handleMouseLeave(a)})},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(n,r){if(n&1){let o=qe();O(0,"div",1,0),te("animationend",function(c){return se(o),le(r._handleAnimationEnd(c))}),O(2,"div",2),ee(3),M()()}n&2&&(zn("mdc-tooltip--multiline",r._isMultiline),D("ngClass",r.tooltipClass),E(3),Pt(r.message))},dependencies:[qa],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 Xf=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[Hbe],imports:[S7,vv,_a,_a,$T]})}return t})();var M1t={type:"loader-circle",width:"100px"},V8e=M1t;var ni=(function(t){return t[t.INIT=0]="INIT",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.ERROR=3]="ERROR",t})(ni||{}),$ie=class{state$=new Ai;destroy(){this.state$.unsubscribe()}},qie=class extends $ie{constructor(){super()}connect(i){this.state$.next(ni.LOADING),i.then(()=>this.state$.next(ni.SUCCESS)).catch(()=>this.state$.next(ni.ERROR))}},Yie=class extends $ie{_loadSubscription;constructor(){super()}connect(i){this._loadSubscription=i.pipe(ks(ni.INIT),Ac(e=>(this.state$.next(ni.ERROR),e)),zG(e=>!(e instanceof Error))).subscribe(e=>this.state$.next(e))}destroy(){super.destroy(),this._loadSubscription&&this._loadSubscription.unsubscribe()}};var O1t=["determinateSpinner"];function R1t(t,i){if(t&1&&(Pi(),O(0,"svg",11),be(1,"circle",12),M()),t&2){let e=L();lt("viewBox",e._viewBox()),E(),la("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),lt("r",e._circleRadius())}}var P1t=new Mi("mat-progress-spinner-default-options",{providedIn:"root",factory:N1t});function N1t(){return{diameter:z8e}}var z8e=100,F1t=10,Kie=(()=>{class t{_elementRef=ae(qn);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=ae(P1t),n=E7(),r=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=r.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&r.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=z8e;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-F1t)/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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(n&1&&Xi(O1t,5),n&2){let o;ze(o=Ue())&&(r._determinateCircle=o.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){n&2&&(lt("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),Pe("mat-"+r.color),la("width",r.diameter,"px")("height",r.diameter,"px")("--mat-progress-spinner-size",r.diameter+"px")("--mat-progress-spinner-active-indicator-width",r.diameter+"px"),zn("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",En],diameter:[2,"diameter","diameter",En],strokeWidth:[2,"strokeWidth","strokeWidth",En]},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(n,r){if(n&1&&(ie(0,R1t,2,8,"ng-template",null,0,di),O(2,"div",2,1),Pi(),O(4,"svg",3),be(5,"circle",4),M()(),RT(),O(6,"div",5)(7,"div",6)(8,"div",7),Li(9,8),M(),O(10,"div",9),Li(11,8),M(),O(12,"div",10),Li(13,8),M()()()),n&2){let o=Oi(1);E(4),lt("viewBox",r._viewBox()),E(),la("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),lt("r",r._circleRadius()),E(4),D("ngTemplateOutlet",o),E(2),D("ngTemplateOutlet",o),E(2),D("ngTemplateOutlet",o)}},dependencies:[Jr],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 U8e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a]})}return t})();var Gbe=t=>({$implicit:t});function B1t(t,i){t&1&&Li(0)}function V1t(t,i){if(t&1&&ie(0,B1t,1,0,"ng-container",1),t&2){let e=L(2);D("ngTemplateOutlet",e.customLoadingTemplate)}}function z1t(t,i){t&1&&(O(0,"div",0)(1,"div",2),be(2,"mat-spinner",3),M()())}function U1t(t,i){if(t&1&&yt(0,V1t,1,1,"ng-container")(1,z1t,3,0,"div",0),t&2){let e=L();vt(e.customLoadingTemplate?0:1)}}function H1t(t,i){t&1&&Li(0)}function G1t(t,i){if(t&1&&ie(0,H1t,1,0,"ng-container",4),t&2){let e=L();D("ngTemplateOutlet",e.initTemplate)("ngTemplateOutletContext",Yi(2,Gbe,e.initTemplateContext))}}function j1t(t,i){t&1&&Li(0)}function $1t(t,i){if(t&1&&ie(0,j1t,1,0,"ng-container",4),t&2){let e=L();D("ngTemplateOutlet",e.successTemplate)("ngTemplateOutletContext",Yi(2,Gbe,e.successTemplateContext))}}function q1t(t,i){t&1&&Li(0)}function Y1t(t,i){if(t&1&&ie(0,q1t,1,0,"ng-container",4),t&2){let e=L();D("ngTemplateOutlet",e.errorTemplate)("ngTemplateOutletContext",Yi(2,Gbe,e.errorTemplateContext))}}var fr=(()=>{class t{_cdr;customLoadingTemplate=null;errorTemplate=null;successTemplate=null;initTemplate=null;errorTemplateContext;successTemplateContext;initTemplateContext;loadItem;options=V8e;BdLoaderState=ni;currentState=ni.INIT;_loader;_stateSubscription;constructor(e){this._cdr=e}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 qie,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_setSubjectLoader(e){this._loader=new Yie,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_subscribeLoaderState(e){this._stateSubscription&&this._stateSubscription.unsubscribe(),this._stateSubscription=e.state$.subscribe(n=>{this.currentState=n,this._cdr.detectChanges()})}_isPromise(e){return!!e.then&&typeof e.then=="function"}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({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:[Yt],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(n,r){if(n&1&&(O(0,"div"),yt(1,U1t,2,1)(2,G1t,1,4,"ng-container")(3,$1t,1,4,"ng-container")(4,Y1t,1,4,"ng-container"),M()),n&2){let o;E(),vt((o=r.currentState)===r.BdLoaderState.LOADING?1:o===r.BdLoaderState.INIT?2:o===r.BdLoaderState.SUCCESS?3:o===r.BdLoaderState.ERROR?4:-1)}},dependencies:[Jr,U8e,Kie],encapsulation:2,changeDetection:0})}return t})();var ec=(()=>{class t{icon="visibility_off";message="";static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),ee(4),M()(),O(5,"div",2)(6,"span",3),ee(7),M()()()()),n&2&&(E(4),Pt(r.icon),E(3),Pt(r.message))},dependencies:[da,zr],styles:[".message__empty[_ngcontent-%COMP%]{color:#0000008a}.mat-caption[_ngcontent-%COMP%]{line-height:28px}"]})}return t})();var VP=(()=>{class t{_listeners=[];notify(e,n){for(let r of this._listeners)r(e,n)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(n=>e!==n)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Jf=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 Ai;constructor(i=!1,e,n=!0,r){this._multiple=i,this._emitChanges=n,this.compareWith=r,e&&e.length&&(i?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...i){this._verifyValueAssignment(i),i.forEach(n=>this._markSelected(n));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...i){this._verifyValueAssignment(i),i.forEach(n=>this._unmarkSelected(n));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...i){this._verifyValueAssignment(i);let e=this.selected,n=new Set(i.map(o=>this._getConcreteValue(o)));i.forEach(o=>this._markSelected(o)),e.filter(o=>!n.has(this._getConcreteValue(o,n))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(i){return this.isSelected(i)?this.deselect(i):this.select(i)}clear(i=!0){this._unmarkAll();let e=this._hasQueuedChanges();return i&&this._emitChangeEvent(),e}isSelected(i){return this._selection.has(this._getConcreteValue(i))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(i){this._multiple&&this.selected&&this._selected.sort(i)}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(i){i=this._getConcreteValue(i),this.isSelected(i)||(this._multiple||this._unmarkAll(),this.isSelected(i)||this._selection.add(i),this._emitChanges&&this._selectedToEmit.push(i))}_unmarkSelected(i){i=this._getConcreteValue(i),this.isSelected(i)&&(this._selection.delete(i),this._emitChanges&&this._deselectedToEmit.push(i))}_unmarkAll(){this.isEmpty()||this._selection.forEach(i=>this._unmarkSelected(i))}_verifyValueAssignment(i){i.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(i,e){if(this.compareWith){e=e??this._selection;for(let n of e)if(this.compareWith(i,n))return n;return i}else return i}};var K1t=["trigger"],W1t=["panel"],Q1t=[[["mat-select-trigger"]],"*"],Z1t=["mat-select-trigger","*"];function X1t(t,i){if(t&1&&(O(0,"span",4),ee(1),M()),t&2){let e=L();E(),Pt(e.placeholder)}}function J1t(t,i){t&1&&Sn(0)}function eSt(t,i){if(t&1&&(O(0,"span",11),ee(1),M()),t&2){let e=L(2);E(),Pt(e.triggerValue)}}function tSt(t,i){if(t&1&&(O(0,"span",5),yt(1,J1t,1,0)(2,eSt,2,1,"span",11),M()),t&2){let e=L();E(),vt(e.customTrigger?1:2)}}function iSt(t,i){if(t&1){let e=qe();O(0,"div",12,1),te("keydown",function(r){se(e);let o=L();return le(o._handleKeydown(r))}),Sn(2,1),M()}if(t&2){let e=L();Pe(Oj("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),zn("mat-select-panel-animations-enabled",!e._animationsDisabled),D("ngClass",e.panelClass),lt("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var jbe=new Mi("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>G_(t)}});function H8e(t){let i=ae(Ir);return()=>G_(i)}var G8e=new Mi("MAT_SELECT_CONFIG"),j8e={provide:jbe,deps:[],useFactory:H8e},$be=new Mi("MatSelectTrigger"),Wie=class{source;value;constructor(i,e){this.source=i,this.value=e}},zP=(()=>{class t{_viewportRuler=ae(Fb);_changeDetectorRef=ae(dn);_elementRef=ae(qn);_dir=ae(Du,{optional:!0});_idGenerator=ae(Tl);_renderer=ae(Ma);_parentFormField=ae(q4,{optional:!0});ngControl=ae($p,{self:!0,optional:!0});_liveAnnouncer=ae(x7);_defaultOptions=ae(G8e,{optional:!0});_animationsDisabled=tl();_initialized=new Ai;_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 n=this.options.toArray()[e];if(n){let r=this.panel.nativeElement,o=Nbe(e,this.options,this.optionGroups),a=n._getHostElement();e===0&&o===1?r.scrollTop=0:r.scrollTop=Fbe(a.offsetTop,a.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Wie(this,e)}_scrollStrategyFactory=ae(jbe);_panelOpen=!1;_compareWith=(e,n)=>e===n;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new Ai;_errorStateTracker;stateChanges=new Ai;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=hr(!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(La.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=lv(()=>{let e=this.options;return e?e.changes.pipe(ks(e),On(()=>Vp(...e.map(n=>n.onSelectionChange)))):this._initialized.pipe(On(()=>this.optionSelectionChanges))});openedChange=new ve;_openedStream=this.openedChange.pipe(vn(e=>e),ot(()=>{}));_closedStream=this.openedChange.pipe(vn(e=>!e),ot(()=>{}));selectionChange=new ve;valueChange=new ve;constructor(){let e=ae(LP),n=ae(j7,{optional:!0}),r=ae(Xu,{optional:!0}),o=ae(new $f("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new K4(e,this.ngControl,r,n,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=o==null?0:parseInt(o)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Jf(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(ha(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(ha(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(ks(null),ha(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),n=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(this._previousControl!==void 0&&n.disabled!==null&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.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(ar(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 n=`${this.id}-panel`;this._trackedModal&&tie(this._trackedModal,"aria-owns",n),$ve(e,"aria-owns",n),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;tie(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=()=>{n(),clearTimeout(r),this._cleanupDetach=void 0};let e=this.panel.nativeElement,n=this._renderer.listen(e,"animationend",o=>{o.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),r=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(n=>n.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 n=e.keyCode,r=n===40||n===38||n===37||n===39,o=n===13||n===32,a=this._keyManager;if(!a.isTyping()&&o&&!Au(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let c=this.selected;a.onKeydown(e);let m=this.selected;m&&c!==m&&this._liveAnnouncer.announce(m.viewValue,1e4)}}_handleOpenKeydown(e){let n=this._keyManager,r=e.keyCode,o=r===40||r===38,a=n.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(!a&&(r===13||r===32)&&n.activeItem&&!Au(e))e.preventDefault(),n.activeItem._selectViaInteraction();else if(!a&&this._multiple&&r===65&&e.ctrlKey){e.preventDefault();let c=this.options.some(m=>!m.disabled&&!m.selected);this.options.forEach(m=>{m.disabled||(c?m.select():m.deselect())})}else{let c=n.activeItemIndex;n.onKeydown(e),this._multiple&&o&&e.shiftKey&&n.activeItem&&n.activeItemIndex!==c&&n.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Au(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(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{let n=this._selectOptionByValue(e);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let n=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return(r.value!=null||this.canSelectNullableOptions)&&this._compareWith(r.value,e)}catch{return!1}});return n&&this._selectionModel.select(n),n}_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 b4?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 O7(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=Vp(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ha(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Vp(...this.options.map(n=>n._stateChanges)).pipe(ha(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,n){let r=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),n&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),n&&this.focus())),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((n,r)=>this.sortComparator?this.sortComparator(n,r,e):e.indexOf(n)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let n;this.multiple?n=this.selected.map(r=>r.value):n=this.selected?this.selected.value:e,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let n=0;n0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,n=e?e+" ":"";return this.ariaLabelledby?n+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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-select"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,$be,5),Vt(o,$b,5),Vt(o,Bie,5)),n&2){let a;ze(a=Ue())&&(r.customTrigger=a.first),ze(a=Ue())&&(r.options=a),ze(a=Ue())&&(r.optionGroups=a)}},viewQuery:function(n,r){if(n&1&&(Xi(K1t,5),Xi(W1t,5),Xi(Qte,5)),n&2){let o;ze(o=Ue())&&(r.trigger=o.first),ze(o=Ue())&&(r.panel=o.first),ze(o=Ue())&&(r._overlayDir=o.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,r){n&1&&te("keydown",function(a){return r._handleKeydown(a)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),n&2&&(lt("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),zn("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.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:En(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",En],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:[Ii([{provide:$4,useExisting:t},{provide:Lie,useExisting:t}]),Yt],ngContentSelectors:Z1t,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(n,r){if(n&1){let o=qe();Kn(Q1t),O(0,"div",2,0),te("click",function(){return se(o),le(r.open())}),O(3,"div",3),yt(4,X1t,2,1,"span",4)(5,tSt,3,1,"span",5),M(),O(6,"div",6)(7,"div",7),Pi(),O(8,"svg",8),be(9,"path",9),M()()()(),ie(10,iSt,3,10,"ng-template",10),te("detach",function(){return se(o),le(r.close())})("backdropClick",function(){return se(o),le(r.close())})("overlayKeydown",function(c){return se(o),le(r._handleOverlayKeydown(c))})}if(n&2){let o=Oi(1);E(3),lt("id",r._valueId),E(),vt(r.empty?4:5),E(6),D("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||o)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[b4,Qte,qa],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})(),qbe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-select-trigger"]],features:[Ii([{provide:$be,useExisting:t}])]})}return t})(),UP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[j8e],imports:[vv,eE,_a,$T,mc,eE,_a]})}return t})();function nSt(t,i){if(t&1&&(O(0,"mat-option",17),ee(1),M()),t&2){let e=i.$implicit;D("value",e),E(),gn(" ",e," ")}}function rSt(t,i){if(t&1){let e=qe();O(0,"mat-form-field",14)(1,"mat-select",16,0),te("selectionChange",function(r){se(e);let o=L(2);return le(o._changePageSize(r.value))}),Qo(3,nSt,2,2,"mat-option",17,ms),M(),O(5,"div",18),te("click",function(){se(e);let r=Oi(2);return le(r.open())}),M()()}if(t&2){let e=L(2);D("appearance",e._formFieldAppearance)("color",e.color),E(),D("value",e.pageSize)("disabled",e.disabled),uc("aria-labelledby",e._pageSizeLabelId),D("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),E(2),Zo(e._displayedPageSizeOptions)}}function oSt(t,i){if(t&1&&(O(0,"div",15),ee(1),M()),t&2){let e=L(2);E(),Pt(e.pageSize)}}function aSt(t,i){if(t&1&&(O(0,"div",3)(1,"div",13),ee(2),M(),yt(3,rSt,6,7,"mat-form-field",14),yt(4,oSt,2,1,"div",15),M()),t&2){let e=L();E(),lt("id",e._pageSizeLabelId),E(),gn(" ",e._intl.itemsPerPageLabel," "),E(),vt(e._displayedPageSizeOptions.length>1?3:-1),E(),vt(e._displayedPageSizeOptions.length<=1?4:-1)}}function sSt(t,i){if(t&1){let e=qe();O(0,"button",19),te("click",function(){se(e);let r=L();return le(r._buttonClicked(0,r._previousButtonsDisabled()))}),Pi(),O(1,"svg",8),be(2,"path",20),M()()}if(t&2){let e=L();D("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),lt("aria-label",e._intl.firstPageLabel)}}function lSt(t,i){if(t&1){let e=qe();O(0,"button",21),te("click",function(){se(e);let r=L();return le(r._buttonClicked(r.getNumberOfPages()-1,r._nextButtonsDisabled()))}),Pi(),O(1,"svg",8),be(2,"path",22),M()()}if(t&2){let e=L();D("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),lt("aria-label",e._intl.lastPageLabel)}}var cw=(()=>{class t{changes=new Ai;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,n,r)=>{if(r==0||n==0)return`0 of ${r}`;r=Math.max(r,0);let o=e*n,a=o{class t{_intl=ae(cw);_changeDetectorRef=ae(dn);_formFieldAppearance;_pageSizeLabelId=ae(Tl).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new hi(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(n=>En(n,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new ve;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,n=ae(i9,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),n){let{pageSize:r,pageSizeOptions:o,hidePageSize:a,showFirstLastButtons:c}=n;r!=null&&(this._pageSize=r),o!=null&&(this._pageSizeOptions=o),a!=null&&(this.hidePageSize=a),c!=null&&(this.showFirstLastButtons=c)}this._formFieldAppearance=n?.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-n),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let n=this.pageIndex;e!==n&&(this.pageIndex=e,this._emitPageEvent(n))}_buttonClicked(e,n){n||this._navigate(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",En],length:[2,"length","length",En],pageSize:[2,"pageSize","pageSize",En],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(n,r){n&1&&(O(0,"div",1)(1,"div",2),yt(2,aSt,5,4,"div",3),O(3,"div",4)(4,"div",5),ee(5),M(),yt(6,sSt,3,5,"button",6),O(7,"button",7),te("click",function(){return r._buttonClicked(r.pageIndex-1,r._previousButtonsDisabled())}),Pi(),O(8,"svg",8),be(9,"path",9),M()(),RT(),O(10,"button",10),te("click",function(){return r._buttonClicked(r.pageIndex+1,r._nextButtonsDisabled())}),Pi(),O(11,"svg",8),be(12,"path",11),M()(),yt(13,lSt,3,5,"button",12),M()()()),n&2&&(E(2),vt(r.hidePageSize?-1:2),E(3),gn(" ",r._intl.getRangeLabel(r.pageIndex,r.pageSize,r.length)," "),E(),vt(r.showFirstLastButtons?6:-1),E(),D("matTooltip",r._intl.previousPageLabel)("matTooltipDisabled",r._previousButtonsDisabled())("disabled",r._previousButtonsDisabled())("tabindex",r._previousButtonsDisabled()?-1:null),lt("aria-label",r._intl.previousPageLabel),E(3),D("matTooltip",r._intl.nextPageLabel)("matTooltipDisabled",r._nextButtonsDisabled())("disabled",r._nextButtonsDisabled())("tabindex",r._nextButtonsDisabled()?-1:null),lt("aria-label",r._intl.nextPageLabel),E(3),vt(r.showFirstLastButtons?13:-1))},dependencies:[Oa,zP,$b,il,Ld],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})(),Z4=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[dSt],imports:[so,UP,Xf,n9]})}return t})();var Qie=(()=>{class t extends cw{itemsPerPageLabel="Elemente pro Seite";nextPageLabel="N\xE4chste Seite";previousPageLabel="Vorherige Seite";getRangeLabel=this.buildRangeLabel;buildRangeLabel(e,n,r){return`${e*n+1} - ${e*n+n} von ${r}`}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rE=class{static responseToPage(i,e){return $e(pe({},i),{content:e(i.content)})}},X4=class t{pageSize;pageIndex;static toHttpParams(i){let e=new Vo;return e=e.set("size",i.rows.toString()),e=e.set("page",i.page.toString()),e}static from(i){return new t(i.rows,Math.ceil(i.first/i.rows))}totalRecords;first;pageCount;rows;page;constructor(i,e){this.pageSize=i,this.pageIndex=e,this.totalRecords=0,this.page=e,this.rows=this.pageSize,this.first=this.pageSize*this.pageIndex}};var Zie=class t{size;page;static DEFAULT=new t(20,0);constructor(i,e){this.size=i,this.page=e}static of(i){return new t(i.pageSize,i.pageIndex)}toHttpParams(){let i=new Vo;return i=i.set("size",this.size.toString()),i=i.set("page",this.page.toString()),i}};var pSt=Math.pow(10,8)*24*60*60*1e3,bZi=-pSt,Xie=6048e5,q8e=864e5,r9=6e4,o9=36e5,Y8e=1e3;var mSt=3600;var K8e=mSt*24,CZi=K8e*7,hSt=K8e*365.2425,fSt=hSt/12,xZi=fSt*3,Ybe=Symbol.for("constructDateFrom");function hs(t,i){return typeof t=="function"?t(i):t&&typeof t=="object"&&Ybe in t?t[Ybe](i):t instanceof Date?new t.constructor(i):new Date(i)}function fo(t,i){return hs(i||t,t)}function wv(t,i,e){let n=fo(t,e?.in);return isNaN(i)?hs(e?.in||t,NaN):(i&&n.setDate(n.getDate()+i),n)}function qx(t,i,e){let n=fo(t,e?.in);if(isNaN(i))return hs(e?.in||t,NaN);if(!i)return n;let r=n.getDate(),o=hs(e?.in||t,n.getTime());o.setMonth(n.getMonth()+i+1,0);let a=o.getDate();return r>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}function W8e(t,i,e){return hs(e?.in||t,+fo(t)+i)}var gSt={};function qb(){return gSt}function eg(t,i){let e=qb(),n=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,r=fo(t,i?.in),o=r.getDay(),a=(o=o.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}function HP(t){let i=fo(t),e=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return e.setUTCFullYear(i.getFullYear()),+t-+e}function ene(t,...i){let e=hs.bind(null,t||i.find(n=>typeof n=="object"));return i.map(e)}function Yb(t,i){let e=fo(t,i?.in);return e.setHours(0,0,0,0),e}function Q8e(t,i,e){let[n,r]=ene(e?.in,t,i),o=Yb(n),a=Yb(r),c=+o-HP(o),m=+a-HP(a);return Math.round((c-m)/q8e)}function Z8e(t,i){let e=Jie(t,i),n=hs(i?.in||t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Yx(n)}function a9(t,i,e){return qx(t,i*3,e)}function tne(t,i,e){return W8e(t,i*1e3,e)}function s9(t,i,e){return wv(t,i*7,e)}function GP(t,i,e){return qx(t,i*12,e)}function Kbe(t,i,e){let[n,r]=ene(e?.in,t,i);return+Yb(n)==+Yb(r)}function ine(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function nne(t){return!(!ine(t)&&typeof t!="number"||isNaN(+fo(t)))}function X8e(t,i){let e=fo(t,i?.in);return e.setHours(23,59,59,999),e}function J4(t,i){let e=fo(t,i?.in),n=e.getMonth(),r=n-n%3;return e.setMonth(r,1),e.setHours(0,0,0,0),e}function ez(t,i){let e=fo(t,i?.in);return e.setDate(1),e.setHours(0,0,0,0),e}function J8e(t,i){let e=fo(t,i?.in),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function jP(t,i){let e=fo(t,i?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}var _St={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"}},eHe=(t,i,e)=>{let n,r=_St[t];return typeof r=="string"?n=r:i===1?n=r.one:n=r.other.replace("{{count}}",i.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function eM(t){return(i={})=>{let e=i.width?String(i.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}var ySt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vSt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bSt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tHe={date:eM({formats:ySt,defaultWidth:"full"}),time:eM({formats:vSt,defaultWidth:"full"}),dateTime:eM({formats:bSt,defaultWidth:"full"})};var CSt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iHe=(t,i,e,n)=>CSt[t];function Jh(t){return(i,e)=>{let n=e?.context?String(e.context):"standalone",r;if(n==="formatting"&&t.formattingValues){let a=t.defaultFormattingWidth||t.defaultWidth,c=e?.width?String(e.width):a;r=t.formattingValues[c]||t.formattingValues[a]}else{let a=t.defaultWidth,c=e?.width?String(e.width):t.defaultWidth;r=t.values[c]||t.values[a]}let o=t.argumentCallback?t.argumentCallback(i):i;return r[o]}}var xSt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},SSt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wSt={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"]},ISt={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"]},TSt={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"}},ESt={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"}},ASt=(t,i)=>{let e=Number(t),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},nHe={ordinalNumber:ASt,era:Jh({values:xSt,defaultWidth:"wide"}),quarter:Jh({values:SSt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Jh({values:wSt,defaultWidth:"wide"}),day:Jh({values:ISt,defaultWidth:"wide"}),dayPeriod:Jh({values:TSt,defaultWidth:"wide",formattingValues:ESt,defaultFormattingWidth:"wide"})};function Kb(t){return(i,e={})=>{let n=e.width,r=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=i.match(r);if(!o)return null;let a=o[0],c=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(c)?kSt(c,w=>w.test(a)):DSt(c,w=>w.test(a)),g;g=t.valueCallback?t.valueCallback(m):m,g=e.valueCallback?e.valueCallback(g):g;let C=i.slice(a.length);return{value:g,rest:C}}}function DSt(t,i){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&i(t[e]))return e}function kSt(t,i){for(let e=0;e{let n=i.match(t.matchPattern);if(!n)return null;let r=n[0],o=i.match(t.parsePattern);if(!o)return null;let a=t.valueCallback?t.valueCallback(o[0]):o[0];a=e.valueCallback?e.valueCallback(a):a;let c=i.slice(r.length);return{value:a,rest:c}}}var MSt=/^(\d+)(th|st|nd|rd)?/i,OSt=/\d+/i,RSt={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},PSt={any:[/^b/i,/^(a|c)/i]},NSt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},FSt={any:[/1/i,/2/i,/3/i,/4/i]},LSt={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},BSt={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]},VSt={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},zSt={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]},USt={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},HSt={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}},rHe={ordinalNumber:rne({matchPattern:MSt,parsePattern:OSt,valueCallback:t=>parseInt(t,10)}),era:Kb({matchPatterns:RSt,defaultMatchWidth:"wide",parsePatterns:PSt,defaultParseWidth:"any"}),quarter:Kb({matchPatterns:NSt,defaultMatchWidth:"wide",parsePatterns:FSt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Kb({matchPatterns:LSt,defaultMatchWidth:"wide",parsePatterns:BSt,defaultParseWidth:"any"}),day:Kb({matchPatterns:VSt,defaultMatchWidth:"wide",parsePatterns:zSt,defaultParseWidth:"any"}),dayPeriod:Kb({matchPatterns:USt,defaultMatchWidth:"any",parsePatterns:HSt,defaultParseWidth:"any"})};var l9={code:"en-US",formatDistance:eHe,formatLong:tHe,formatRelative:iHe,localize:nHe,match:rHe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function oHe(t,i){let e=fo(t,i?.in);return Q8e(e,jP(e))+1}function one(t,i){let e=fo(t,i?.in),n=+Yx(e)-+Z8e(e);return Math.round(n/Xie)+1}function tz(t,i){let e=fo(t,i?.in),n=e.getFullYear(),r=qb(),o=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=hs(i?.in||t,0);a.setFullYear(n+1,0,o),a.setHours(0,0,0,0);let c=eg(a,i),m=hs(i?.in||t,0);m.setFullYear(n,0,o),m.setHours(0,0,0,0);let g=eg(m,i);return+e>=+c?n+1:+e>=+g?n:n-1}function aHe(t,i){let e=qb(),n=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,r=tz(t,i),o=hs(i?.in||t,0);return o.setFullYear(r,0,n),o.setHours(0,0,0,0),eg(o,i)}function ane(t,i){let e=fo(t,i?.in),n=+eg(e,i)-+aHe(e,i);return Math.round(n/Xie)+1}function _l(t,i){let e=t<0?"-":"",n=Math.abs(t).toString().padStart(i,"0");return e+n}var oE={y(t,i){let e=t.getFullYear(),n=e>0?e:1-e;return _l(i==="yy"?n%100:n,i.length)},M(t,i){let e=t.getMonth();return i==="M"?String(e+1):_l(e+1,2)},d(t,i){return _l(t.getDate(),i.length)},a(t,i){let e=t.getHours()/12>=1?"pm":"am";switch(i){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,i){return _l(t.getHours()%12||12,i.length)},H(t,i){return _l(t.getHours(),i.length)},m(t,i){return _l(t.getMinutes(),i.length)},s(t,i){return _l(t.getSeconds(),i.length)},S(t,i){let e=i.length,n=t.getMilliseconds(),r=Math.trunc(n*Math.pow(10,e-3));return _l(r,i.length)}};var iz={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wbe={G:function(t,i,e){let n=t.getFullYear()>0?1:0;switch(i){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(t,i,e){if(i==="yo"){let n=t.getFullYear(),r=n>0?n:1-n;return e.ordinalNumber(r,{unit:"year"})}return oE.y(t,i)},Y:function(t,i,e,n){let r=tz(t,n),o=r>0?r:1-r;if(i==="YY"){let a=o%100;return _l(a,2)}return i==="Yo"?e.ordinalNumber(o,{unit:"year"}):_l(o,i.length)},R:function(t,i){let e=Jie(t);return _l(e,i.length)},u:function(t,i){let e=t.getFullYear();return _l(e,i.length)},Q:function(t,i,e){let n=Math.ceil((t.getMonth()+1)/3);switch(i){case"Q":return String(n);case"QQ":return _l(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,i,e){let n=Math.ceil((t.getMonth()+1)/3);switch(i){case"q":return String(n);case"qq":return _l(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,i,e){let n=t.getMonth();switch(i){case"M":case"MM":return oE.M(t,i);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(t,i,e){let n=t.getMonth();switch(i){case"L":return String(n+1);case"LL":return _l(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(t,i,e,n){let r=ane(t,n);return i==="wo"?e.ordinalNumber(r,{unit:"week"}):_l(r,i.length)},I:function(t,i,e){let n=one(t);return i==="Io"?e.ordinalNumber(n,{unit:"week"}):_l(n,i.length)},d:function(t,i,e){return i==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):oE.d(t,i)},D:function(t,i,e){let n=oHe(t);return i==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):_l(n,i.length)},E:function(t,i,e){let n=t.getDay();switch(i){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(t,i,e,n){let r=t.getDay(),o=(r-n.weekStartsOn+8)%7||7;switch(i){case"e":return String(o);case"ee":return _l(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})}},c:function(t,i,e,n){let r=t.getDay(),o=(r-n.weekStartsOn+8)%7||7;switch(i){case"c":return String(o);case"cc":return _l(o,i.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})}},i:function(t,i,e){let n=t.getDay(),r=n===0?7:n;switch(i){case"i":return String(r);case"ii":return _l(r,i.length);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(t,i,e){let r=t.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,i,e){let n=t.getHours(),r;switch(n===12?r=iz.noon:n===0?r=iz.midnight:r=n/12>=1?"pm":"am",i){case"b":case"bb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,i,e){let n=t.getHours(),r;switch(n>=17?r=iz.evening:n>=12?r=iz.afternoon:n>=4?r=iz.morning:r=iz.night,i){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,i,e){if(i==="ho"){let n=t.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return oE.h(t,i)},H:function(t,i,e){return i==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):oE.H(t,i)},K:function(t,i,e){let n=t.getHours()%12;return i==="Ko"?e.ordinalNumber(n,{unit:"hour"}):_l(n,i.length)},k:function(t,i,e){let n=t.getHours();return n===0&&(n=24),i==="ko"?e.ordinalNumber(n,{unit:"hour"}):_l(n,i.length)},m:function(t,i,e){return i==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):oE.m(t,i)},s:function(t,i,e){return i==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):oE.s(t,i)},S:function(t,i){return oE.S(t,i)},X:function(t,i,e){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(i){case"X":return lHe(n);case"XXXX":case"XX":return $P(n);case"XXXXX":case"XXX":default:return $P(n,":")}},x:function(t,i,e){let n=t.getTimezoneOffset();switch(i){case"x":return lHe(n);case"xxxx":case"xx":return $P(n);case"xxxxx":case"xxx":default:return $P(n,":")}},O:function(t,i,e){let n=t.getTimezoneOffset();switch(i){case"O":case"OO":case"OOO":return"GMT"+sHe(n,":");case"OOOO":default:return"GMT"+$P(n,":")}},z:function(t,i,e){let n=t.getTimezoneOffset();switch(i){case"z":case"zz":case"zzz":return"GMT"+sHe(n,":");case"zzzz":default:return"GMT"+$P(n,":")}},t:function(t,i,e){let n=Math.trunc(+t/1e3);return _l(n,i.length)},T:function(t,i,e){return _l(+t,i.length)}};function sHe(t,i=""){let e=t>0?"-":"+",n=Math.abs(t),r=Math.trunc(n/60),o=n%60;return o===0?e+String(r):e+String(r)+i+_l(o,2)}function lHe(t,i){return t%60===0?(t>0?"-":"+")+_l(Math.abs(t)/60,2):$P(t,i)}function $P(t,i=""){let e=t>0?"-":"+",n=Math.abs(t),r=_l(Math.trunc(n/60),2),o=_l(n%60,2);return e+r+i+o}var cHe=(t,i)=>{switch(t){case"P":return i.date({width:"short"});case"PP":return i.date({width:"medium"});case"PPP":return i.date({width:"long"});case"PPPP":default:return i.date({width:"full"})}},dHe=(t,i)=>{switch(t){case"p":return i.time({width:"short"});case"pp":return i.time({width:"medium"});case"ppp":return i.time({width:"long"});case"pppp":default:return i.time({width:"full"})}},GSt=(t,i)=>{let e=t.match(/(P+)(p+)?/)||[],n=e[1],r=e[2];if(!r)return cHe(t,i);let o;switch(n){case"P":o=i.dateTime({width:"short"});break;case"PP":o=i.dateTime({width:"medium"});break;case"PPP":o=i.dateTime({width:"long"});break;case"PPPP":default:o=i.dateTime({width:"full"});break}return o.replace("{{date}}",cHe(n,i)).replace("{{time}}",dHe(r,i))},c9={p:dHe,P:GSt};var jSt=/^D+$/,$St=/^Y+$/,qSt=["D","DD","YY","YYYY"];function sne(t){return jSt.test(t)}function lne(t){return $St.test(t)}function d9(t,i,e){let n=YSt(t,i,e);if(console.warn(n),qSt.includes(t))throw new RangeError(n)}function YSt(t,i,e){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${i}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var KSt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WSt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QSt=/^'([^]*?)'?$/,ZSt=/''/g,XSt=/[a-zA-Z]/;function uHe(t,i,e){let n=qb(),r=e?.locale??n.locale??l9,o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,c=fo(t,e?.in);if(!nne(c))throw new RangeError("Invalid time value");let m=i.match(WSt).map(C=>{let w=C[0];if(w==="p"||w==="P"){let P=c9[w];return P(C,r.formatLong)}return C}).join("").match(KSt).map(C=>{if(C==="''")return{isToken:!1,value:"'"};let w=C[0];if(w==="'")return{isToken:!1,value:JSt(C)};if(Wbe[w])return{isToken:!0,value:C};if(w.match(XSt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:C}});r.localize.preprocessor&&(m=r.localize.preprocessor(c,m));let g={firstWeekContainsDate:o,weekStartsOn:a,locale:r};return m.map(C=>{if(!C.isToken)return C.value;let w=C.value;(!e?.useAdditionalWeekYearTokens&&lne(w)||!e?.useAdditionalDayOfYearTokens&&sne(w))&&d9(w,i,String(t));let P=Wbe[w[0]];return P(c,w,r.localize,g)}).join("")}function JSt(t){let i=t.match(QSt);return i?i[1].replace(ZSt,"'"):t}function u9(t,i){let e=fo(t,i?.in);if(isNaN(+e))throw new RangeError("Invalid time value");let n=i?.format??"extended",r=i?.representation??"complete",o="",a="",c=n==="extended"?"-":"",m=n==="extended"?":":"";if(r!=="time"){let g=_l(e.getDate(),2),C=_l(e.getMonth()+1,2);o=`${_l(e.getFullYear(),4)}${c}${C}${c}${g}`}if(r!=="date"){let g=e.getTimezoneOffset();if(g!==0){let H=Math.abs(g),j=_l(Math.trunc(H/60),2),K=_l(H%60,2);a=`${g<0?"+":"-"}${j}:${K}`}else a="Z";let C=_l(e.getHours(),2),w=_l(e.getMinutes(),2),P=_l(e.getSeconds(),2),R=o===""?"":"T",z=[C,w,P].join(m);o=`${o}${R}${z}${a}`}return o}function pHe(t,i){return fo(t,i?.in).getDate()}function mHe(t,i){return fo(t,i?.in).getDay()}function cne(t,i){let e=fo(t,i?.in),n=e.getFullYear(),r=e.getMonth(),o=hs(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function hHe(){return Object.assign({},qb())}function fHe(t,i){return fo(t,i?.in).getHours()}function gHe(t,i){let e=fo(t,i?.in).getDay();return e===0?7:e}function _He(t,i){return fo(t,i?.in).getMinutes()}function dne(t,i){return fo(t,i?.in).getMonth()}function yHe(t){return fo(t).getSeconds()}function une(t,i){return fo(t,i?.in).getFullYear()}function vHe(t,i){let e=ewt(i)?new i(0):hs(i,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}function ewt(t){return typeof t=="function"&&t.prototype?.constructor===t}var twt=10,pne=class{subPriority=0;validate(i,e){return!0}},mne=class extends pne{constructor(i,e,n,r,o){super(),this.value=i,this.validateValue=e,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(i,e){return this.validateValue(i,this.value,e)}set(i,e,n){return this.setValue(i,e,this.value,n)}},hne=class extends pne{priority=twt;subPriority=-1;constructor(i,e){super(),this.context=i||(n=>hs(e,n))}set(i,e){return e.timestampIsSet?i:hs(i,vHe(i,this.context))}};var Jo=class{run(i,e,n,r){let o=this.parse(i,e,n,r);return o?{setter:new mne(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(i,e,n){return!0}};var fne=class extends Jo{priority=140;parse(i,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"})||n.era(i,{width:"narrow"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})||n.era(i,{width:"abbreviated"})||n.era(i,{width:"narrow"})}}set(i,e,n){return e.era=n,i.setFullYear(n,0,1),i.setHours(0,0,0,0),i}incompatibleTokens=["R","u","t","T"]};var fc={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}/},Wb={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 ud(t,i){return t&&{value:i(t.value),rest:t.rest}}function tc(t,i){let e=i.match(t);return e?{value:parseInt(e[0],10),rest:i.slice(e[0].length)}:null}function Qb(t,i){let e=i.match(t);if(!e)return null;if(e[0]==="Z")return{value:0,rest:i.slice(1)};let n=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,o=e[3]?parseInt(e[3],10):0,a=e[5]?parseInt(e[5],10):0;return{value:n*(r*o9+o*r9+a*Y8e),rest:i.slice(e[0].length)}}function gne(t){return tc(fc.anyDigitsSigned,t)}function nl(t,i){switch(t){case 1:return tc(fc.singleDigit,i);case 2:return tc(fc.twoDigits,i);case 3:return tc(fc.threeDigits,i);case 4:return tc(fc.fourDigits,i);default:return tc(new RegExp("^\\d{1,"+t+"}"),i)}}function nz(t,i){switch(t){case 1:return tc(fc.singleDigitSigned,i);case 2:return tc(fc.twoDigitsSigned,i);case 3:return tc(fc.threeDigitsSigned,i);case 4:return tc(fc.fourDigitsSigned,i);default:return tc(new RegExp("^-?\\d{1,"+t+"}"),i)}}function rz(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 _ne(t,i){let e=i>0,n=e?i:1-i,r;if(n<=50)r=t||100;else{let o=n+50,a=Math.trunc(o/100)*100,c=t>=o%100;r=t+a-(c?100:0)}return e?r:1-r}function yne(t){return t%400===0||t%4===0&&t%100!==0}var vne=class extends Jo{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(i,e,n){let r=o=>({year:o,isTwoDigitYear:e==="yy"});switch(e){case"y":return ud(nl(4,i),r);case"yo":return ud(n.ordinalNumber(i,{unit:"year"}),r);default:return ud(nl(e.length,i),r)}}validate(i,e){return e.isTwoDigitYear||e.year>0}set(i,e,n){let r=i.getFullYear();if(n.isTwoDigitYear){let a=_ne(n.year,r);return i.setFullYear(a,0,1),i.setHours(0,0,0,0),i}let o=!("era"in e)||e.era===1?n.year:1-n.year;return i.setFullYear(o,0,1),i.setHours(0,0,0,0),i}};var bne=class extends Jo{priority=130;parse(i,e,n){let r=o=>({year:o,isTwoDigitYear:e==="YY"});switch(e){case"Y":return ud(nl(4,i),r);case"Yo":return ud(n.ordinalNumber(i,{unit:"year"}),r);default:return ud(nl(e.length,i),r)}}validate(i,e){return e.isTwoDigitYear||e.year>0}set(i,e,n,r){let o=tz(i,r);if(n.isTwoDigitYear){let c=_ne(n.year,o);return i.setFullYear(c,0,r.firstWeekContainsDate),i.setHours(0,0,0,0),eg(i,r)}let a=!("era"in e)||e.era===1?n.year:1-n.year;return i.setFullYear(a,0,r.firstWeekContainsDate),i.setHours(0,0,0,0),eg(i,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var Cne=class extends Jo{priority=130;parse(i,e){return e==="R"?nz(4,i):nz(e.length,i)}set(i,e,n){let r=hs(i,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Yx(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var xne=class extends Jo{priority=130;parse(i,e){return e==="u"?nz(4,i):nz(e.length,i)}set(i,e,n){return i.setFullYear(n,0,1),i.setHours(0,0,0,0),i}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var Sne=class extends Jo{priority=120;parse(i,e,n){switch(e){case"Q":case"QQ":return nl(e.length,i);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"})||n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})||n.quarter(i,{width:"abbreviated",context:"formatting"})||n.quarter(i,{width:"narrow",context:"formatting"})}}validate(i,e){return e>=1&&e<=4}set(i,e,n){return i.setMonth((n-1)*3,1),i.setHours(0,0,0,0),i}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var wne=class extends Jo{priority=120;parse(i,e,n){switch(e){case"q":case"qq":return nl(e.length,i);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"})||n.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})||n.quarter(i,{width:"abbreviated",context:"standalone"})||n.quarter(i,{width:"narrow",context:"standalone"})}}validate(i,e){return e>=1&&e<=4}set(i,e,n){return i.setMonth((n-1)*3,1),i.setHours(0,0,0,0),i}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var Ine=class extends Jo{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(i,e,n){let r=o=>o-1;switch(e){case"M":return ud(tc(fc.month,i),r);case"MM":return ud(nl(2,i),r);case"Mo":return ud(n.ordinalNumber(i,{unit:"month"}),r);case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"})||n.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})||n.month(i,{width:"abbreviated",context:"formatting"})||n.month(i,{width:"narrow",context:"formatting"})}}validate(i,e){return e>=0&&e<=11}set(i,e,n){return i.setMonth(n,1),i.setHours(0,0,0,0),i}};var Tne=class extends Jo{priority=110;parse(i,e,n){let r=o=>o-1;switch(e){case"L":return ud(tc(fc.month,i),r);case"LL":return ud(nl(2,i),r);case"Lo":return ud(n.ordinalNumber(i,{unit:"month"}),r);case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"})||n.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})||n.month(i,{width:"abbreviated",context:"standalone"})||n.month(i,{width:"narrow",context:"standalone"})}}validate(i,e){return e>=0&&e<=11}set(i,e,n){return i.setMonth(n,1),i.setHours(0,0,0,0),i}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function bHe(t,i,e){let n=fo(t,e?.in),r=ane(n,e)-i;return n.setDate(n.getDate()-r*7),fo(n,e?.in)}var Ene=class extends Jo{priority=100;parse(i,e,n){switch(e){case"w":return tc(fc.week,i);case"wo":return n.ordinalNumber(i,{unit:"week"});default:return nl(e.length,i)}}validate(i,e){return e>=1&&e<=53}set(i,e,n,r){return eg(bHe(i,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function CHe(t,i,e){let n=fo(t,e?.in),r=one(n,e)-i;return n.setDate(n.getDate()-r*7),n}var Ane=class extends Jo{priority=100;parse(i,e,n){switch(e){case"I":return tc(fc.week,i);case"Io":return n.ordinalNumber(i,{unit:"week"});default:return nl(e.length,i)}}validate(i,e){return e>=1&&e<=53}set(i,e,n){return Yx(CHe(i,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var iwt=[31,28,31,30,31,30,31,31,30,31,30,31],nwt=[31,29,31,30,31,30,31,31,30,31,30,31],Dne=class extends Jo{priority=90;subPriority=1;parse(i,e,n){switch(e){case"d":return tc(fc.date,i);case"do":return n.ordinalNumber(i,{unit:"date"});default:return nl(e.length,i)}}validate(i,e){let n=i.getFullYear(),r=yne(n),o=i.getMonth();return r?e>=1&&e<=nwt[o]:e>=1&&e<=iwt[o]}set(i,e,n){return i.setDate(n),i.setHours(0,0,0,0),i}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var kne=class extends Jo{priority=90;subpriority=1;parse(i,e,n){switch(e){case"D":case"DD":return tc(fc.dayOfYear,i);case"Do":return n.ordinalNumber(i,{unit:"date"});default:return nl(e.length,i)}}validate(i,e){let n=i.getFullYear();return yne(n)?e>=1&&e<=366:e>=1&&e<=365}set(i,e,n){return i.setMonth(0,n),i.setHours(0,0,0,0),i}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function oz(t,i,e){let n=qb(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=fo(t,e?.in),a=o.getDay(),m=(i%7+7)%7,g=7-r,C=i<0||i>6?i-(a+g)%7:(m+g)%7-(a+g)%7;return wv(o,C,e)}var Mne=class extends Jo{priority=90;parse(i,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})||n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"})}}validate(i,e){return e>=0&&e<=6}set(i,e,n,r){return i=oz(i,n,r),i.setHours(0,0,0,0),i}incompatibleTokens=["D","i","e","c","t","T"]};var One=class extends Jo{priority=90;parse(i,e,n,r){let o=a=>{let c=Math.floor((a-1)/7)*7;return(a+r.weekStartsOn+6)%7+c};switch(e){case"e":case"ee":return ud(nl(e.length,i),o);case"eo":return ud(n.ordinalNumber(i,{unit:"day"}),o);case"eee":return n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})||n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"})}}validate(i,e){return e>=0&&e<=6}set(i,e,n,r){return i=oz(i,n,r),i.setHours(0,0,0,0),i}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var Rne=class extends Jo{priority=90;parse(i,e,n,r){let o=a=>{let c=Math.floor((a-1)/7)*7;return(a+r.weekStartsOn+6)%7+c};switch(e){case"c":case"cc":return ud(nl(e.length,i),o);case"co":return ud(n.ordinalNumber(i,{unit:"day"}),o);case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"})||n.day(i,{width:"short",context:"standalone"})||n.day(i,{width:"narrow",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"})||n.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})||n.day(i,{width:"abbreviated",context:"standalone"})||n.day(i,{width:"short",context:"standalone"})||n.day(i,{width:"narrow",context:"standalone"})}}validate(i,e){return e>=0&&e<=6}set(i,e,n,r){return i=oz(i,n,r),i.setHours(0,0,0,0),i}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function xHe(t,i,e){let n=fo(t,e?.in),r=gHe(n,e),o=i-r;return wv(n,o,e)}var Pne=class extends Jo{priority=90;parse(i,e,n){let r=o=>o===0?7:o;switch(e){case"i":case"ii":return nl(e.length,i);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return ud(n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"}),r);case"iiiii":return ud(n.day(i,{width:"narrow",context:"formatting"}),r);case"iiiiii":return ud(n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"}),r);case"iiii":default:return ud(n.day(i,{width:"wide",context:"formatting"})||n.day(i,{width:"abbreviated",context:"formatting"})||n.day(i,{width:"short",context:"formatting"})||n.day(i,{width:"narrow",context:"formatting"}),r)}}validate(i,e){return e>=1&&e<=7}set(i,e,n){return i=xHe(i,n),i.setHours(0,0,0,0),i}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var Nne=class extends Jo{priority=80;parse(i,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})||n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"})}}set(i,e,n){return i.setHours(rz(n),0,0,0),i}incompatibleTokens=["b","B","H","k","t","T"]};var Fne=class extends Jo{priority=80;parse(i,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})||n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"})}}set(i,e,n){return i.setHours(rz(n),0,0,0),i}incompatibleTokens=["a","B","H","k","t","T"]};var Lne=class extends Jo{priority=80;parse(i,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})||n.dayPeriod(i,{width:"abbreviated",context:"formatting"})||n.dayPeriod(i,{width:"narrow",context:"formatting"})}}set(i,e,n){return i.setHours(rz(n),0,0,0),i}incompatibleTokens=["a","b","t","T"]};var Bne=class extends Jo{priority=70;parse(i,e,n){switch(e){case"h":return tc(fc.hour12h,i);case"ho":return n.ordinalNumber(i,{unit:"hour"});default:return nl(e.length,i)}}validate(i,e){return e>=1&&e<=12}set(i,e,n){let r=i.getHours()>=12;return r&&n<12?i.setHours(n+12,0,0,0):!r&&n===12?i.setHours(0,0,0,0):i.setHours(n,0,0,0),i}incompatibleTokens=["H","K","k","t","T"]};var Vne=class extends Jo{priority=70;parse(i,e,n){switch(e){case"H":return tc(fc.hour23h,i);case"Ho":return n.ordinalNumber(i,{unit:"hour"});default:return nl(e.length,i)}}validate(i,e){return e>=0&&e<=23}set(i,e,n){return i.setHours(n,0,0,0),i}incompatibleTokens=["a","b","h","K","k","t","T"]};var zne=class extends Jo{priority=70;parse(i,e,n){switch(e){case"K":return tc(fc.hour11h,i);case"Ko":return n.ordinalNumber(i,{unit:"hour"});default:return nl(e.length,i)}}validate(i,e){return e>=0&&e<=11}set(i,e,n){return i.getHours()>=12&&n<12?i.setHours(n+12,0,0,0):i.setHours(n,0,0,0),i}incompatibleTokens=["h","H","k","t","T"]};var Une=class extends Jo{priority=70;parse(i,e,n){switch(e){case"k":return tc(fc.hour24h,i);case"ko":return n.ordinalNumber(i,{unit:"hour"});default:return nl(e.length,i)}}validate(i,e){return e>=1&&e<=24}set(i,e,n){let r=n<=24?n%24:n;return i.setHours(r,0,0,0),i}incompatibleTokens=["a","b","h","H","K","t","T"]};var Hne=class extends Jo{priority=60;parse(i,e,n){switch(e){case"m":return tc(fc.minute,i);case"mo":return n.ordinalNumber(i,{unit:"minute"});default:return nl(e.length,i)}}validate(i,e){return e>=0&&e<=59}set(i,e,n){return i.setMinutes(n,0,0),i}incompatibleTokens=["t","T"]};var Gne=class extends Jo{priority=50;parse(i,e,n){switch(e){case"s":return tc(fc.second,i);case"so":return n.ordinalNumber(i,{unit:"second"});default:return nl(e.length,i)}}validate(i,e){return e>=0&&e<=59}set(i,e,n){return i.setSeconds(n,0),i}incompatibleTokens=["t","T"]};var jne=class extends Jo{priority=30;parse(i,e){let n=r=>Math.trunc(r*Math.pow(10,-e.length+3));return ud(nl(e.length,i),n)}set(i,e,n){return i.setMilliseconds(n),i}incompatibleTokens=["t","T"]};var $ne=class extends Jo{priority=10;parse(i,e){switch(e){case"X":return Qb(Wb.basicOptionalMinutes,i);case"XX":return Qb(Wb.basic,i);case"XXXX":return Qb(Wb.basicOptionalSeconds,i);case"XXXXX":return Qb(Wb.extendedOptionalSeconds,i);case"XXX":default:return Qb(Wb.extended,i)}}set(i,e,n){return e.timestampIsSet?i:hs(i,i.getTime()-HP(i)-n)}incompatibleTokens=["t","T","x"]};var qne=class extends Jo{priority=10;parse(i,e){switch(e){case"x":return Qb(Wb.basicOptionalMinutes,i);case"xx":return Qb(Wb.basic,i);case"xxxx":return Qb(Wb.basicOptionalSeconds,i);case"xxxxx":return Qb(Wb.extendedOptionalSeconds,i);case"xxx":default:return Qb(Wb.extended,i)}}set(i,e,n){return e.timestampIsSet?i:hs(i,i.getTime()-HP(i)-n)}incompatibleTokens=["t","T","X"]};var Yne=class extends Jo{priority=40;parse(i){return gne(i)}set(i,e,n){return[hs(i,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var Kne=class extends Jo{priority=20;parse(i){return gne(i)}set(i,e,n){return[hs(i,n),{timestampIsSet:!0}]}incompatibleTokens="*"};var SHe={G:new fne,y:new vne,Y:new bne,R:new Cne,u:new xne,Q:new Sne,q:new wne,M:new Ine,L:new Tne,w:new Ene,I:new Ane,d:new Dne,D:new kne,E:new Mne,e:new One,c:new Rne,i:new Pne,a:new Nne,b:new Fne,B:new Lne,h:new Bne,H:new Vne,K:new zne,k:new Une,m:new Hne,s:new Gne,S:new jne,X:new $ne,x:new qne,t:new Yne,T:new Kne};var rwt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,owt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,awt=/^'([^]*?)'?$/,swt=/''/g,lwt=/\S/,cwt=/[a-zA-Z]/;function wHe(t,i,e,n){let r=()=>hs(n?.in||e,NaN),o=hHe(),a=n?.locale??o.locale??l9,c=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,m=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!i)return t?r():fo(e,n?.in);let g={firstWeekContainsDate:c,weekStartsOn:m,locale:a},C=[new hne(n?.in,e)],w=i.match(owt).map(j=>{let K=j[0];if(K in c9){let ne=c9[K];return ne(j,a.formatLong)}return j}).join("").match(rwt),P=[];for(let j of w){!n?.useAdditionalWeekYearTokens&&lne(j)&&d9(j,i,t),!n?.useAdditionalDayOfYearTokens&&sne(j)&&d9(j,i,t);let K=j[0],ne=SHe[K];if(ne){let{incompatibleTokens:me}=ne;if(Array.isArray(me)){let Ie=P.find(ye=>me.includes(ye.token)||ye.token===K);if(Ie)throw new RangeError(`The format string mustn't contain \`${Ie.fullToken}\` and \`${j}\` at the same time`)}else if(ne.incompatibleTokens==="*"&&P.length>0)throw new RangeError(`The format string mustn't contain \`${j}\` and any other token at the same time`);P.push({token:K,fullToken:j});let Te=ne.run(t,j,a.match,g);if(!Te)return r();C.push(Te.setter),t=Te.rest}else{if(K.match(cwt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");if(j==="''"?j="'":K==="'"&&(j=dwt(j)),t.indexOf(j)===0)t=t.slice(j.length);else return r()}}if(t.length>0&&lwt.test(t))return r();let R=C.map(j=>j.priority).sort((j,K)=>K-j).filter((j,K,ne)=>ne.indexOf(j)===K).map(j=>C.filter(K=>K.priority===j).sort((K,ne)=>ne.subPriority-K.subPriority)).map(j=>j[0]),z=fo(e,n?.in);if(isNaN(+z))return r();let H={};for(let j of R){if(!j.validate(z,g))return r();let K=j.set(z,H,g);Array.isArray(K)?(z=K[0],Object.assign(H,K[1])):z=K}return z}function dwt(t){return t.match(awt)[1].replace(swt,"'")}function Wne(t,i,e){return wv(t,-i,e)}function Zbe(t,i){let e=()=>hs(i?.in,NaN),n=i?.additionalDigits??2,r=hwt(t),o;if(r.date){let g=fwt(r.date,n);o=gwt(g.restDateString,g.year)}if(!o||isNaN(+o))return e();let a=+o,c=0,m;if(r.time&&(c=_wt(r.time),isNaN(c)))return e();if(r.timezone){if(m=ywt(r.timezone),isNaN(m))return e()}else{let g=new Date(a+c),C=fo(0,i?.in);return C.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),C.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),C}return fo(a+c+m,i?.in)}var Qne={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},uwt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pwt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,mwt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function hwt(t){let i={},e=t.split(Qne.dateTimeDelimiter),n;if(e.length>2)return i;if(/:/.test(e[0])?n=e[0]:(i.date=e[0],n=e[1],Qne.timeZoneDelimiter.test(i.date)&&(i.date=t.split(Qne.timeZoneDelimiter)[0],n=t.substr(i.date.length,t.length))),n){let r=Qne.timezone.exec(n);r?(i.time=n.replace(r[1],""),i.timezone=r[1]):i.time=n}return i}function fwt(t,i){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+i)+"})|(\\d{2}|[+-]\\d{"+(2+i)+"})$)"),n=t.match(e);if(!n)return{year:NaN,restDateString:""};let r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?r:o*100,restDateString:t.slice((n[1]||n[2]).length)}}function gwt(t,i){if(i===null)return new Date(NaN);let e=t.match(uwt);if(!e)return new Date(NaN);let n=!!e[4],r=p9(e[1]),o=p9(e[2])-1,a=p9(e[3]),c=p9(e[4]),m=p9(e[5])-1;if(n)return Swt(i,c,m)?vwt(i,c,m):new Date(NaN);{let g=new Date(0);return!Cwt(i,o,a)||!xwt(i,r)?new Date(NaN):(g.setUTCFullYear(i,o,Math.max(r,a)),g)}}function p9(t){return t?parseInt(t):1}function _wt(t){let i=t.match(pwt);if(!i)return NaN;let e=Qbe(i[1]),n=Qbe(i[2]),r=Qbe(i[3]);return wwt(e,n,r)?e*o9+n*r9+r*1e3:NaN}function Qbe(t){return t&&parseFloat(t.replace(",","."))||0}function ywt(t){if(t==="Z")return 0;let i=t.match(mwt);if(!i)return 0;let e=i[1]==="+"?-1:1,n=parseInt(i[2]),r=i[3]&&parseInt(i[3])||0;return Iwt(n,r)?e*(n*o9+r*r9):NaN}function vwt(t,i,e){let n=new Date(0);n.setUTCFullYear(t,0,4);let r=n.getUTCDay()||7,o=(i-1)*7+e+1-r;return n.setUTCDate(n.getUTCDate()+o),n}var bwt=[31,null,31,30,31,30,31,31,30,31,30,31];function IHe(t){return t%400===0||t%4===0&&t%100!==0}function Cwt(t,i,e){return i>=0&&i<=11&&e>=1&&e<=(bwt[i]||(IHe(t)?29:28))}function xwt(t,i){return i>=1&&i<=(IHe(t)?366:365)}function Swt(t,i,e){return i>=1&&i<=53&&e>=0&&e<=6}function wwt(t,i,e){return t===24?i===0&&e===0:e>=0&&e<60&&i>=0&&i<60&&t>=0&&t<25}function Iwt(t,i){return i>=0&&i<=59}function THe(t,i,e){let n=fo(t,e?.in),r=n.getFullYear(),o=n.getDate(),a=hs(e?.in||t,0);a.setFullYear(r,i,15),a.setHours(0,0,0,0);let c=cne(a);return n.setMonth(i,Math.min(o,c)),n}function EHe(t,i,e){let n=fo(t,e?.in);return isNaN(+n)?hs(e?.in||t,NaN):(i.year!=null&&n.setFullYear(i.year),i.month!=null&&(n=THe(n,i.month)),i.date!=null&&n.setDate(i.date),i.hours!=null&&n.setHours(i.hours),i.minutes!=null&&n.setMinutes(i.minutes),i.seconds!=null&&n.setSeconds(i.seconds),i.milliseconds!=null&&n.setMilliseconds(i.milliseconds),n)}function Zne(t,i,e){return qx(t,-i,e)}function Xne(t,i,e){let{years:n=0,months:r=0,weeks:o=0,days:a=0,hours:c=0,minutes:m=0,seconds:g=0}=i,C=Zne(t,r+n*12,e),w=Wne(C,a+o*7,e),P=m+c*60,z=(g+P*60)*1e3;return hs(e?.in||t,+w-z)}function AHe(t,i,e){return a9(t,-i,e)}function DHe(t,i,e){return tne(t,-i,e)}function kHe(t,i,e){return s9(t,-i,e)}function MHe(t,i,e){return GP(t,-i,e)}var Mm=class t{start;end;static equals(i,e){return!i&&!e||!!i&&!!e&&Kbe(i.start,e.start)&&Kbe(i.end,e.end)}static byUnit(i,e=new Date){let n,r,o,a,c;switch(i){case"previous-month":r=Xne(ez(e),{days:1}),n=ez(r);break;case"previous-quarter":r=Xne(J4(e),{days:1}),n=J4(r);break;case"previous-half-year":o=dne(e),a=une(e),o>6?(n=new Date(a,0,1),r=new Date(a,5,30)):(n=new Date(a-1,6,1),r=new Date(a-1,11,31));break;case"previous-year":default:c=Xne(e,{years:1}),n=jP(c),r=J8e(c);break}return new t(n,r)}static fromObject(i){let e=new Date(i.start),n=new Date(i.end);return new t(e,n)}error={invalidRange:!1};constructor(i,e){this.start=i,this.end=e}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(i="de-DE"){if(!this.start||!this.end)return"";let e=new Intl.DateTimeFormat(i,{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 i=this.start.getFullYear(),e=this.end.getFullYear(),n=[];for(let r=i;r<=e;r++)n.push(r);return n}};var ef=class{_start;_duration;static equals(i,e){return i.start.temporalUnit===e.start.temporalUnit&&i.start.count===e.start.count&&i.duration.temporalUnit===e.duration.temporalUnit&&i.duration.count===e.duration.count}_startDate;_endDate;constructor(i,e){this._start=i,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 i=new Date,e=null;switch(this._duration.temporalUnit){case"year":e=jP(GP(i,1));break;case"quarter":e=J4(a9(i,1));break;case"month":e=ez(qx(i,1));break;case"week":e=eg(s9(i,1));break;case"day":e=wv(i,1);break}return Yb(e)}get startDate(){return this._startDate}get endDate(){return this._endDate}get start(){return this._start}set start(i){this._start=i,this._startDate=this._getStartDate(),this._endDate=this._getEndDate(this._startDate,this._duration)}get duration(){return this._duration}set duration(i){this._duration=i,this._endDate=this._getEndDate(this._startDate,this._duration)}_getStartDate(){let i;switch(this._start.temporalUnit){case"year":i=MHe(new Date,this._start.count),i=jP(i);break;case"quarter":i=AHe(new Date,this._start.count),i=J4(i);break;case"month":i=Zne(new Date,this._start.count),i=ez(i);break;case"week":i=kHe(new Date,this._start.count),i=eg(i);break;case"day":i=Wne(new Date,this._start.count)}return Yb(i)}_getEndDate(i,e){let n;switch(e.temporalUnit){case"year":n=GP(i,e.count);break;case"quarter":n=a9(i,e.count);break;case"month":n=qx(i,e.count);break;case"week":n=s9(i,e.count);break;case"day":n=wv(i,e.count)}return n=Yb(n),DHe(n,1)}};var qP=class{static fromObject(i){if(!i)throw new Error("Missing input object.");let e;switch(i.type){case"relative":e=aE.fromObject(i);break;case"calendric":e=Zb.fromObject(i);break;default:throw new Error(`Invalid timeSelection type: ${i.type}`)}return e}type},aE=class t extends qP{intervalRelative;static fromObject(i){let e=new ef(i.intervalRelative.start||i.intervalRelative._start,i.intervalRelative.duration||i.intervalRelative._duration);return new t(e)}type="relative";constructor(i){super(),this.intervalRelative=i}equals(i){return this.type===i.type&&ef.equals(this.intervalRelative,i.intervalRelative)}clone(){return new t(new ef(this.intervalRelative.start,this.intervalRelative.duration))}valid(){return!!this.type&&!!this.intervalRelative}toJSON(){return{type:this.type,intervalRelative:this.intervalRelative.toJSON()}}},Zb=class t extends qP{interval;static fromObject(i){let e=Mm.fromObject(i.interval);return new t(e)}type="calendric";constructor(i){super(),this.interval=i}clone(){return new t(this.interval.clone())}equals(i){return this.type===i.type&&Mm.equals(this.interval,i.interval)}valid(){return!!this.type&&!!this.interval&&this.interval.isValid()}toJSON(){return{type:this.type,interval:this.interval}}};var OHe=` .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 Ewt=["date"],Awt=["header"],Dwt=["footer"],kwt=["disabledDate"],Mwt=["decade"],Owt=["previousicon"],Rwt=["nexticon"],Pwt=["triggericon"],Nwt=["clearicon"],Fwt=["decrementicon"],Lwt=["incrementicon"],Bwt=["inputicon"],Vwt=["inputfield"],zwt=["contentWrapper"],Uwt=[[["p-header"]],[["p-footer"]]],Hwt=["p-header","p-footer"],Gwt=t=>({clickCallBack:t}),jwt=(t,i)=>({showTransitionParams:t,hideTransitionParams:i}),$wt=t=>({value:"visible",params:t}),RHe=t=>({visibility:t}),Xbe=t=>({$implicit:t}),qwt=t=>({date:t}),Ywt=(t,i)=>({month:t,index:i}),Kwt=t=>({year:t});function Wwt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",10),te("click",function(){se(e);let r=L(3);return le(r.clear())}),M()}if(t&2){let e=L(3);Pe(e.cx("clearIcon"))}}function Qwt(t,i){}function Zwt(t,i){t&1&&ie(0,Qwt,0,0,"ng-template")}function Xwt(t,i){if(t&1){let e=qe();O(0,"span",11),te("click",function(){se(e);let r=L(3);return le(r.clear())}),ie(1,Zwt,1,0,null,12),M()}if(t&2){let e=L(3);Pe(e.cx("clearIcon")),E(),D("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Jwt(t,i){if(t&1&&(fi(0),ie(1,Wwt,1,2,"svg",8)(2,Xwt,2,3,"span",9),gi()),t&2){let e=L(2);E(),D("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),E(),D("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function eIt(t,i){if(t&1&&be(0,"span",15),t&2){let e=L(3);D("ngClass",e.icon)}}function tIt(t,i){t&1&&(Pi(),be(0,"svg",17))}function iIt(t,i){}function nIt(t,i){t&1&&ie(0,iIt,0,0,"ng-template")}function rIt(t,i){if(t&1&&(fi(0),ie(1,tIt,1,0,"svg",16)(2,nIt,1,0,null,12),gi()),t&2){let e=L(3);E(),D("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),E(),D("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function oIt(t,i){if(t&1){let e=qe();O(0,"button",13),te("click",function(r){se(e),L();let o=Oi(1),a=L();return le(a.onButtonClick(r,o))}),ie(1,eIt,1,1,"span",14)(2,rIt,3,2,"ng-container",6),M()}if(t&2){let e=L(2);Pe(e.cx("dropdown")),D("disabled",e.$disabled()),lt("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null),E(),D("ngIf",e.icon),E(),D("ngIf",!e.icon)}}function aIt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",20),te("click",function(r){se(e);let o=L(3);return le(o.onButtonClick(r))}),M()}if(t&2){let e=L(3);Pe(e.cx("inputIcon"))}}function sIt(t,i){t&1&&Li(0)}function lIt(t,i){if(t&1&&(fi(0),O(1,"span"),ie(2,aIt,1,2,"svg",18)(3,sIt,1,0,"ng-container",19),M(),gi()),t&2){let e=L(2);E(),Pe(e.cx("inputIconContainer")),E(),D("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),E(),D("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Yi(5,Gwt,e.onButtonClick.bind(e)))}}function cIt(t,i){if(t&1){let e=qe();O(0,"input",5,0),te("focus",function(r){se(e);let o=L();return le(o.onInputFocus(r))})("keydown",function(r){se(e);let o=L();return le(o.onInputKeydown(r))})("click",function(){se(e);let r=L();return le(r.onInputClick())})("blur",function(r){se(e);let o=L();return le(o.onInputBlur(r))})("input",function(r){se(e);let o=L();return le(o.onUserInput(r))}),M(),ie(2,Jwt,3,2,"ng-container",6)(3,oIt,3,8,"button",7)(4,lIt,4,7,"ng-container",6)}if(t&2){let e=L();Pe(e.cn(e.cx("pcInputText"),e.inputStyleClass)),D("pSize",e.size())("value",e.inputFieldValue)("ngStyle",e.inputStyle)("pAutoFocus",e.autofocus)("variant",e.$variant())("fluid",e.hasFluid)("invalid",e.invalid()),lt("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),E(2),D("ngIf",e.showClear&&!e.$disabled()&&e.value!=null),E(),D("ngIf",e.showIcon&&e.iconDisplay==="button"),E(),D("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function dIt(t,i){t&1&&Li(0)}function uIt(t,i){t&1&&(Pi(),be(0,"svg",29))}function pIt(t,i){}function mIt(t,i){t&1&&ie(0,pIt,0,0,"ng-template")}function hIt(t,i){if(t&1&&(O(0,"span"),ie(1,mIt,1,0,null,12),M()),t&2){let e=L(5);E(),D("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function fIt(t,i){if(t&1&&ie(0,uIt,1,0,"svg",28)(1,hIt,2,1,"span",6),t&2){let e=L(4);D("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),E(),D("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function gIt(t,i){if(t&1){let e=qe();O(0,"button",30),te("click",function(r){se(e);let o=L(4);return le(o.switchToMonthView(r))})("keydown",function(r){se(e);let o=L(4);return le(o.onContainerButtonKeydown(r))}),ee(1),M()}if(t&2){let e=L().$implicit,n=L(3);Pe(n.cx("selectMonth")),lt("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth")),E(),gn(" ",n.getMonthName(e.month)," ")}}function _It(t,i){if(t&1){let e=qe();O(0,"button",30),te("click",function(r){se(e);let o=L(4);return le(o.switchToYearView(r))})("keydown",function(r){se(e);let o=L(4);return le(o.onContainerButtonKeydown(r))}),ee(1),M()}if(t&2){let e=L().$implicit,n=L(3);Pe(n.cx("selectYear")),lt("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear")),E(),gn(" ",n.getYear(e)," ")}}function yIt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(5);E(),Pd("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function vIt(t,i){t&1&&Li(0)}function bIt(t,i){if(t&1&&(O(0,"span"),ie(1,yIt,2,2,"ng-container",6)(2,vIt,1,0,"ng-container",19),M()),t&2){let e=L(4);Pe(e.cx("decade")),E(),D("ngIf",!e.decadeTemplate&&!e._decadeTemplate),E(),D("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Yi(5,Xbe,e.yearPickerValues))}}function CIt(t,i){t&1&&(Pi(),be(0,"svg",32))}function xIt(t,i){}function SIt(t,i){t&1&&ie(0,xIt,0,0,"ng-template")}function wIt(t,i){if(t&1&&(fi(0),ie(1,SIt,1,0,null,12),gi()),t&2){let e=L(5);E(),D("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function IIt(t,i){if(t&1&&ie(0,CIt,1,0,"svg",31)(1,wIt,2,1,"ng-container",6),t&2){let e=L(4);D("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),E(),D("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function TIt(t,i){if(t&1&&(O(0,"th")(1,"span"),ee(2),M()()),t&2){let e=L(5);Pe(e.cx("weekHeader")),E(2),Pt(e.getTranslation("weekHeader"))}}function EIt(t,i){if(t&1&&(O(0,"th",36)(1,"span"),ee(2),M()()),t&2){let e=i.$implicit,n=L(5);Pe(n.cx("weekDayCell")),E(),Pe(n.cx("weekDay")),E(),Pt(e)}}function AIt(t,i){if(t&1&&(O(0,"td")(1,"span"),ee(2),M()()),t&2){let e=L().index,n=L(2).$implicit,r=L(3);Pe(r.cx("weekNumber")),E(),Pe(r.cx("weekLabelContainer")),E(),gn(" ",n.weekNumbers[e]," ")}}function DIt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(2).$implicit;E(),Pt(e.day)}}function kIt(t,i){t&1&&Li(0)}function MIt(t,i){if(t&1&&(fi(0),ie(1,kIt,1,0,"ng-container",19),gi()),t&2){let e=L(2).$implicit,n=L(6);E(),D("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Yi(2,Xbe,e))}}function OIt(t,i){t&1&&Li(0)}function RIt(t,i){if(t&1&&(fi(0),ie(1,OIt,1,0,"ng-container",19),gi()),t&2){let e=L(2).$implicit,n=L(6);E(),D("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Yi(2,Xbe,e))}}function PIt(t,i){if(t&1&&(O(0,"div",39),ee(1),M()),t&2){let e=L(2).$implicit;E(),gn(" ",e.day," ")}}function NIt(t,i){if(t&1){let e=qe();fi(0),O(1,"span",37),te("click",function(r){se(e);let o=L().$implicit,a=L(6);return le(a.onDateSelect(r,o))})("keydown",function(r){se(e);let o=L().$implicit,a=L(3).index,c=L(3);return le(c.onDateCellKeydown(r,o,a))}),ie(2,DIt,2,1,"ng-container",6)(3,MIt,2,4,"ng-container",6)(4,RIt,2,4,"ng-container",6),M(),ie(5,PIt,2,1,"div",38),gi()}if(t&2){let e=L().$implicit,n=L(6);E(),D("ngClass",n.dayClass(e)),lt("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),E(),D("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),E(),D("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),E(),D("ngIf",!e.selectable),E(),D("ngIf",n.isSelected(e))}}function FIt(t,i){if(t&1&&(O(0,"td"),ie(1,NIt,6,6,"ng-container",6),M()),t&2){let e=i.$implicit,n=L(6);Pe(n.cx("dayCell",Yi(4,qwt,e))),lt("aria-label",e.day),E(),D("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function LIt(t,i){if(t&1&&(O(0,"tr"),ie(1,AIt,3,5,"td",22)(2,FIt,2,6,"td",23),M()),t&2){let e=i.$implicit,n=L(5);E(),D("ngIf",n.showWeek),E(),D("ngForOf",e)}}function BIt(t,i){if(t&1&&(O(0,"table",33)(1,"thead")(2,"tr"),ie(3,TIt,3,3,"th",22)(4,EIt,3,5,"th",34),M()(),O(5,"tbody"),ie(6,LIt,3,2,"tr",35),M()()),t&2){let e=L().$implicit,n=L(3);Pe(n.cx("dayView")),E(3),D("ngIf",n.showWeek),E(),D("ngForOf",n.weekDays),E(2),D("ngForOf",e.dates)}}function VIt(t,i){if(t&1){let e=qe();O(0,"div")(1,"div")(2,"p-button",24),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("onClick",function(r){se(e);let o=L(3);return le(o.onPrevButtonClick(r))}),ie(3,fIt,2,2,"ng-template",null,2,di),M(),O(5,"div"),ie(6,gIt,2,5,"button",25)(7,_It,2,5,"button",25)(8,bIt,3,7,"span",22),M(),O(9,"p-button",26),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("onClick",function(r){se(e);let o=L(3);return le(o.onNextButtonClick(r))}),ie(10,IIt,2,2,"ng-template",null,2,di),M()(),ie(12,BIt,7,5,"table",27),M()}if(t&2){let e=i.index,n=L(3);Pe(n.cx("calendar")),E(),Pe(n.cx("header")),E(),D("styleClass",n.cx("pcPrevButton"))("ngStyle",Yi(16,RHe,e===0?"visible":"hidden")),uc("ariaLabel",n.prevIconAriaLabel),E(3),Pe(n.cx("title")),E(),D("ngIf",n.currentView==="date"),E(),D("ngIf",n.currentView!=="year"),E(),D("ngIf",n.currentView==="year"),E(),D("styleClass",n.cx("pcNextButton"))("ngStyle",Yi(18,RHe,e===n.months.length-1?"visible":"hidden")),uc("ariaLabel",n.nextIconAriaLabel),E(3),D("ngIf",n.currentView==="date")}}function zIt(t,i){if(t&1&&(O(0,"div",39),ee(1),M()),t&2){let e=L().$implicit;E(),gn(" ",e," ")}}function UIt(t,i){if(t&1){let e=qe();O(0,"span",41),te("click",function(r){let o=se(e).index,a=L(4);return le(a.onMonthSelect(r,o))})("keydown",function(r){let o=se(e).index,a=L(4);return le(a.onMonthCellKeydown(r,o))}),ee(1),ie(2,zIt,2,1,"div",38),M()}if(t&2){let e=i.$implicit,n=i.index,r=L(4);Pe(r.cx("month",na(4,Ywt,e,n))),E(),gn(" ",e," "),E(),D("ngIf",r.isMonthSelected(n))}}function HIt(t,i){if(t&1&&(O(0,"div"),ie(1,UIt,3,7,"span",40),M()),t&2){let e=L(3);Pe(e.cx("monthView")),E(),D("ngForOf",e.monthPickerValues())}}function GIt(t,i){if(t&1&&(O(0,"div",39),ee(1),M()),t&2){let e=L().$implicit;E(),gn(" ",e," ")}}function jIt(t,i){if(t&1){let e=qe();O(0,"span",41),te("click",function(r){let o=se(e).$implicit,a=L(4);return le(a.onYearSelect(r,o))})("keydown",function(r){let o=se(e).$implicit,a=L(4);return le(a.onYearCellKeydown(r,o))}),ee(1),ie(2,GIt,2,1,"div",38),M()}if(t&2){let e=i.$implicit,n=L(4);Pe(n.cx("year",Yi(4,Kwt,e))),E(),gn(" ",e," "),E(),D("ngIf",n.isYearSelected(e))}}function $It(t,i){if(t&1&&(O(0,"div"),ie(1,jIt,3,6,"span",40),M()),t&2){let e=L(3);Pe(e.cx("yearView")),E(),D("ngForOf",e.yearPickerValues())}}function qIt(t,i){if(t&1&&(fi(0),O(1,"div"),ie(2,VIt,13,20,"div",23),M(),ie(3,HIt,2,3,"div",22)(4,$It,2,3,"div",22),gi()),t&2){let e=L(2);E(),Pe(e.cx("calendarContainer")),E(),D("ngForOf",e.months),E(),D("ngIf",e.currentView==="month"),E(),D("ngIf",e.currentView==="year")}}function YIt(t,i){t&1&&(Pi(),be(0,"svg",45))}function KIt(t,i){}function WIt(t,i){t&1&&ie(0,KIt,0,0,"ng-template")}function QIt(t,i){if(t&1&&ie(0,YIt,1,0,"svg",44)(1,WIt,1,0,null,12),t&2){let e=L(3);D("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),E(),D("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function ZIt(t,i){t&1&&(fi(0),ee(1,"0"),gi())}function XIt(t,i){t&1&&(Pi(),be(0,"svg",47))}function JIt(t,i){}function eTt(t,i){t&1&&ie(0,JIt,0,0,"ng-template")}function tTt(t,i){if(t&1&&ie(0,XIt,1,0,"svg",46)(1,eTt,1,0,null,12),t&2){let e=L(3);D("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),E(),D("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function iTt(t,i){t&1&&(Pi(),be(0,"svg",45))}function nTt(t,i){}function rTt(t,i){t&1&&ie(0,nTt,0,0,"ng-template")}function oTt(t,i){if(t&1&&ie(0,iTt,1,0,"svg",44)(1,rTt,1,0,null,12),t&2){let e=L(3);D("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),E(),D("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function aTt(t,i){t&1&&(fi(0),ee(1,"0"),gi())}function sTt(t,i){t&1&&(Pi(),be(0,"svg",47))}function lTt(t,i){}function cTt(t,i){t&1&&ie(0,lTt,0,0,"ng-template")}function dTt(t,i){if(t&1&&ie(0,sTt,1,0,"svg",46)(1,cTt,1,0,null,12),t&2){let e=L(3);D("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),E(),D("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function uTt(t,i){if(t&1&&(O(0,"div")(1,"span"),ee(2),M()()),t&2){let e=L(3);Pe(e.cx("separator")),E(2),Pt(e.timeSeparator)}}function pTt(t,i){t&1&&(Pi(),be(0,"svg",45))}function mTt(t,i){}function hTt(t,i){t&1&&ie(0,mTt,0,0,"ng-template")}function fTt(t,i){if(t&1&&ie(0,pTt,1,0,"svg",44)(1,hTt,1,0,null,12),t&2){let e=L(4);D("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),E(),D("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function gTt(t,i){t&1&&(fi(0),ee(1,"0"),gi())}function _Tt(t,i){t&1&&(Pi(),be(0,"svg",47))}function yTt(t,i){}function vTt(t,i){t&1&&ie(0,yTt,0,0,"ng-template")}function bTt(t,i){if(t&1&&ie(0,_Tt,1,0,"svg",46)(1,vTt,1,0,null,12),t&2){let e=L(4);D("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),E(),D("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function CTt(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-button",42),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(3);return le(o.incrementSecond(r))})("keydown.space",function(r){se(e);let o=L(3);return le(o.incrementSecond(r))})("mousedown",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseDown(r,2,1))})("mouseup",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(3);return le(r.onTimePickerElementMouseLeave())}),ie(2,fTt,2,2,"ng-template",null,2,di),M(),O(4,"span"),ie(5,gTt,2,0,"ng-container",6),ee(6),M(),O(7,"p-button",42),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(3);return le(o.decrementSecond(r))})("keydown.space",function(r){se(e);let o=L(3);return le(o.decrementSecond(r))})("mousedown",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseDown(r,2,-1))})("mouseup",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(3);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(3);return le(r.onTimePickerElementMouseLeave())}),ie(8,bTt,2,2,"ng-template",null,2,di),M()()}if(t&2){let e=L(3);Pe(e.cx("secondPicker")),E(),D("styleClass",e.cx("pcIncrementButton")),lt("aria-label",e.getTranslation("nextSecond")),E(4),D("ngIf",e.currentSecond<10),E(),Pt(e.currentSecond),E(),D("styleClass",e.cx("pcDecrementButton")),lt("aria-label",e.getTranslation("prevSecond"))}}function xTt(t,i){if(t&1&&(O(0,"div")(1,"span"),ee(2),M()()),t&2){let e=L(3);Pe(e.cx("separator")),E(2),Pt(e.timeSeparator)}}function STt(t,i){t&1&&(Pi(),be(0,"svg",45))}function wTt(t,i){}function ITt(t,i){t&1&&ie(0,wTt,0,0,"ng-template")}function TTt(t,i){if(t&1&&ie(0,STt,1,0,"svg",44)(1,ITt,1,0,null,12),t&2){let e=L(4);D("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),E(),D("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function ETt(t,i){t&1&&(Pi(),be(0,"svg",47))}function ATt(t,i){}function DTt(t,i){t&1&&ie(0,ATt,0,0,"ng-template")}function kTt(t,i){if(t&1&&ie(0,ETt,1,0,"svg",46)(1,DTt,1,0,null,12),t&2){let e=L(4);D("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),E(),D("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function MTt(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-button",48),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("onClick",function(r){se(e);let o=L(3);return le(o.toggleAMPM(r))})("keydown.enter",function(r){se(e);let o=L(3);return le(o.toggleAMPM(r))}),ie(2,TTt,2,2,"ng-template",null,2,di),M(),O(4,"span"),ee(5),M(),O(6,"p-button",49),te("keydown",function(r){se(e);let o=L(3);return le(o.onContainerButtonKeydown(r))})("click",function(r){se(e);let o=L(3);return le(o.toggleAMPM(r))})("keydown.enter",function(r){se(e);let o=L(3);return le(o.toggleAMPM(r))}),ie(7,kTt,2,2,"ng-template",null,2,di),M()()}if(t&2){let e=L(3);Pe(e.cx("ampmPicker")),E(),D("styleClass",e.cx("pcIncrementButton")),lt("aria-label",e.getTranslation("am")),E(4),Pt(e.pm?"PM":"AM"),E(),D("styleClass",e.cx("pcDecrementButton")),lt("aria-label",e.getTranslation("pm"))}}function OTt(t,i){if(t&1){let e=qe();O(0,"div")(1,"div")(2,"p-button",42),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(2);return le(o.incrementHour(r))})("keydown.space",function(r){se(e);let o=L(2);return le(o.incrementHour(r))})("mousedown",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseDown(r,0,1))})("mouseup",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(2);return le(r.onTimePickerElementMouseLeave())}),ie(3,QIt,2,2,"ng-template",null,2,di),M(),O(5,"span"),ie(6,ZIt,2,0,"ng-container",6),ee(7),M(),O(8,"p-button",42),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(2);return le(o.decrementHour(r))})("keydown.space",function(r){se(e);let o=L(2);return le(o.decrementHour(r))})("mousedown",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseDown(r,0,-1))})("mouseup",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(2);return le(r.onTimePickerElementMouseLeave())}),ie(9,tTt,2,2,"ng-template",null,2,di),M()(),O(11,"div",43)(12,"span"),ee(13),M()(),O(14,"div")(15,"p-button",42),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(2);return le(o.incrementMinute(r))})("keydown.space",function(r){se(e);let o=L(2);return le(o.incrementMinute(r))})("mousedown",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseDown(r,1,1))})("mouseup",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(2);return le(r.onTimePickerElementMouseLeave())}),ie(16,oTt,2,2,"ng-template",null,2,di),M(),O(18,"span"),ie(19,aTt,2,0,"ng-container",6),ee(20),M(),O(21,"p-button",42),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("keydown.enter",function(r){se(e);let o=L(2);return le(o.decrementMinute(r))})("keydown.space",function(r){se(e);let o=L(2);return le(o.decrementMinute(r))})("mousedown",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseDown(r,1,-1))})("mouseup",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.enter",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("keyup.space",function(r){se(e);let o=L(2);return le(o.onTimePickerElementMouseUp(r))})("mouseleave",function(){se(e);let r=L(2);return le(r.onTimePickerElementMouseLeave())}),ie(22,dTt,2,2,"ng-template",null,2,di),M()(),ie(24,uTt,3,3,"div",22)(25,CTt,10,8,"div",22)(26,xTt,3,3,"div",22)(27,MTt,9,7,"div",22),M()}if(t&2){let e=L(2);Pe(e.cx("timePicker")),E(),Pe(e.cx("hourPicker")),E(),D("styleClass",e.cx("pcIncrementButton")),lt("aria-label",e.getTranslation("nextHour")),E(4),D("ngIf",e.currentHour<10),E(),Pt(e.currentHour),E(),D("styleClass",e.cx("pcDecrementButton")),lt("aria-label",e.getTranslation("prevHour")),E(5),Pt(e.timeSeparator),E(),Pe(e.cx("minutePicker")),E(),D("styleClass",e.cx("pcIncrementButton")),lt("aria-label",e.getTranslation("nextMinute")),E(4),D("ngIf",e.currentMinute<10),E(),Pt(e.currentMinute),E(),D("styleClass",e.cx("pcDecrementButton")),lt("aria-label",e.getTranslation("prevMinute")),E(3),D("ngIf",e.showSeconds),E(),D("ngIf",e.showSeconds),E(),D("ngIf",e.hourFormat=="12"),E(),D("ngIf",e.hourFormat=="12")}}function RTt(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-button",50),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("onClick",function(r){se(e);let o=L(2);return le(o.onTodayButtonClick(r))}),M(),O(2,"p-button",50),te("keydown",function(r){se(e);let o=L(2);return le(o.onContainerButtonKeydown(r))})("onClick",function(r){se(e);let o=L(2);return le(o.onClearButtonClick(r))}),M()()}if(t&2){let e=L(2);Pe(e.cx("buttonbar")),E(),D("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass),E(),D("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)}}function PTt(t,i){t&1&&Li(0)}function NTt(t,i){if(t&1){let e=qe();O(0,"div",21,1),te("@overlayAnimation.start",function(r){se(e);let o=L();return le(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){se(e);let o=L();return le(o.onOverlayAnimationDone(r))})("click",function(r){se(e);let o=L();return le(o.onOverlayClick(r))}),Sn(2),ie(3,dIt,1,0,"ng-container",12)(4,qIt,5,5,"ng-container",6)(5,OTt,28,23,"div",22)(6,RTt,3,8,"div",22),Sn(7,1),ie(8,PTt,1,0,"ng-container",12),M()}if(t&2){let e=L();Pe(e.cn(e.cx("panel"),e.panelStyleClass)),D("ngStyle",e.panelStyle)("@overlayAnimation",Yi(17,$wt,na(14,jwt,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),lt("id",e.panelId)("aria-label",e.getTranslation("chooseDate"))("role",e.inline?null:"dialog")("aria-modal",e.inline?null:"true"),E(3),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),E(),D("ngIf",!e.timeOnly),E(),D("ngIf",(e.showTime||e.timeOnly)&&e.currentView==="date"),E(),D("ngIf",e.showButtonBar),E(2),D("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var FTt=` ${OHe} /* For PrimeNG */ .p-datepicker.ng-invalid.ng-dirty .p-inputtext { border-color: dt('inputtext.invalid.border.color'); } `,LTt={root:()=>({position:"relative"})},BTt={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:i})=>{let e="";if(t.isRangeSelection()&&t.isSelected(i)&&i.selectable){let n=t.value[0],r=t.value[1],o=n&&i.year===n.getFullYear()&&i.month===n.getMonth()&&i.day===n.getDate(),a=r&&i.year===r.getFullYear()&&i.month===r.getMonth()&&i.day===r.getDate();e=o||a?"p-datepicker-day-selected":"p-datepicker-day-selected-range"}return{"p-datepicker-day":!0,"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(i)&&i.selectable,"p-disabled":t.$disabled()||!i.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:i})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(i),"p-disabled":t.isMonthDisabled(i)}],yearView:"p-datepicker-year-view",year:({instance:t,year:i})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(i),"p-disabled":t.isYearDisabled(i)}],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"},PHe=(()=>{class t extends br{name="datepicker";theme=FTt;classes=BTt;inlineStyles=LTt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var VTt={provide:Wc,useExisting:No(()=>az),multi:!0},az=(()=>{class t extends Wk{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 n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=kr(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=ae(PHe);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;$appendTo=Or(()=>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,n){super(),this.zone=e,this.overlayService=n,this.window=this.document.defaultView}ngOnInit(){super.ngOnInit(),this.attributeSelector=fa("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=Nd(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,n){this.yearOptions=[];for(let r=e;r<=n;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(xs.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(n[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(n+r);return e}createMonths(e,n){this.months=this.months=[];for(let r=0;r11&&(o=o%12,a=n+Math.floor((e+r)/12)),this.months.push(this.createMonth(o,a))}}getWeekNumber(e){let n=new Date(e.getTime());if(this.startWeekFromFirstDayOfYear){let o=+this.getFirstDateOfWeek();n.setDate(n.getDate()+6+o-n.getDay())}else n.setDate(n.getDate()+4-(n.getDay()||7));let r=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((r-n.getTime())/864e5)/7)+1}createMonth(e,n){let r=[],o=this.getFirstDayOfMonthIndex(e,n),a=this.getDaysCountInMonth(e,n),c=this.getDaysCountInPrevMonth(e,n),m=1,g=new Date,C=[],w=Math.ceil((a+o)/7);for(let P=0;Pa){let H=this.getNextMonthAndYear(e,n);R.push({day:m-a,month:H.month,year:H.year,otherMonth:!0,today:this.isToday(g,m-a,H.month,H.year),selectable:this.isSelectable(m-a,H.month,H.year,!0)})}else R.push({day:m,month:e,year:n,today:this.isToday(g,m,e,n),selectable:this.isSelectable(m,e,n,!1)});m++}this.showWeek&&C.push(this.getWeekNumber(new Date(R[0].year,R[0].month,R[0].day))),r.push(R)}return{month:e,year:n,dates:r,weekNumbers:C}}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 n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.$disabled()||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,n)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),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,n){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){this.view==="year"?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,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 n=0;n11,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 n=this.formatDateMetaToDate(e);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?n.setHours(this.pm?12:0):n.setHours(this.pm?this.currentHour+12:this.currentHour):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=n:(r=n,o=null),this.updateModel([r,o])}else this.updateModel([n,null]);this.onSelect.emit(n)}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 n=null;Array.isArray(this.value)&&(n=this.value.map(r=>this.formatDateTime(r))),this.writeModelValue(n),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(n);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let r=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,n){let r,o;return e===0?(r=11,o=n-1):(r=e-1,o=n),{month:r,year:o}}getNextMonthAndYear(e,n){let r,o;return e===11?(r=0,o=n+1):(r=e+1,o=n),{month:r,year:o}}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 n=!1;for(let r of this.value)if(n=this.isDateEquals(r,e),n)break;return n}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(n=>n.getMonth()===e&&n.getFullYear()===this.currentYear);if(this.isRangeSelection())if(this.value[1]){let n=new Date(this.currentYear,e,1),r=new Date(this.value[0].getFullYear(),this.value[0].getMonth(),1),o=new Date(this.value[1].getFullYear(),this.value[1].getMonth(),1);return n>=r&&n<=o}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,n){let r=n??this.currentYear;for(let o=1;othis.isMonthDisabled(r,e))}isYearSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return this.isMultipleSelection()?!1:n.getFullYear()===e}return!1}isDateEquals(e,n){return e&&K7(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,r){let o=!1;if(K7(e)&&K7(n)){let a=this.formatDateMetaToDate(r);return e.getTime()<=a.getTime()&&n.getTime()>=a.getTime()}return o}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,n,r,o){return e.getDate()===n&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,n,r,o){let a=!0,c=!0,m=!0,g=!0;return o&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&this.currentView!="year"&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(a=!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 n=$r(this.el?.nativeElement,".p-datepicker-header"),r=e.target;if(this.timeOnly)return;r==n.children[n?.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&&(WT(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,r){let o=e.currentTarget,a=o.parentElement,c=this.formatDateMetaToDate(n);switch(e.which){case 40:{o.tabIndex="-1";let z=rw(a),H=a.parentElement.nextElementSibling;if(H){let j=H.children[z].children[0];Cd(j,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(H.children[z].children[0].tabIndex="0",H.children[z].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{o.tabIndex="-1";let z=rw(a),H=a.parentElement.previousElementSibling;if(H){let j=H.children[z].children[0];Cd(j,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(j.tabIndex="0",j.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let z=a.previousElementSibling;if(z){let H=z.children[0];Cd(H,"p-disabled")||Cd(H.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(H.tabIndex="0",H.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let z=a.nextElementSibling;if(z){let H=z.children[0];Cd(H,"p-disabled")?this.navigateToMonth(!1,r):(H.tabIndex="0",H.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,n),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:{o.tabIndex="-1";let z=new Date(c.getFullYear(),c.getMonth()-1,c.getDate()),H=this.formatDateKey(z);this.navigateToMonth(!0,r,`span[data-date='${H}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{o.tabIndex="-1";let z=new Date(c.getFullYear(),c.getMonth()+1,c.getDate()),H=this.formatDateKey(z);this.navigateToMonth(!1,r,`span[data-date='${H}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:o.tabIndex="-1";let m=new Date(c.getFullYear(),c.getMonth(),1),g=this.formatDateKey(m),C=$r(o.offsetParent,`span[data-date='${g}']:not(.p-disabled):not(.p-ink)`);C&&(C.tabIndex="0",C.focus()),e.preventDefault();break;case 35:o.tabIndex="-1";let w=new Date(c.getFullYear(),c.getMonth()+1,0),P=this.formatDateKey(w),R=$r(o.offsetParent,`span[data-date='${P}']:not(.p-disabled):not(.p-ink)`);w&&(R.tabIndex="0",R.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,a=rw(r);let c=o[e.which===40?a+3:a-3];c&&(c.tabIndex="0",c.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let c=r.previousElementSibling;c?(c.tabIndex="0",c.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let c=r.nextElementSibling;c?(c.tabIndex="0",c.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,n),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,n){let r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,a=rw(r);let c=o[e.which===40?a+2:a-2];c&&(c.tabIndex="0",c.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let c=r.previousElementSibling;c?(c.tabIndex="0",c.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let c=r.nextElementSibling;c?(c.tabIndex="0",c.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,n),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,n,r){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this._focusKey=r,this.navBackward(event);else{let o=this.contentViewChild.nativeElement.children[n-1];if(r){let a=$r(o,r);a.tabIndex="0",a.focus()}else{let a=Yp(o,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),c=a[a.length-1];c.tabIndex="0",c.focus()}}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this._focusKey=r,this.navForward(event);else{let o=this.contentViewChild.nativeElement.children[n+1];if(r){let a=$r(o,r);a.tabIndex="0",a.focus()}else{let a=$r(o,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");a.tabIndex="0",a.focus()}}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?$r(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():$r(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=Yp(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=Yp(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=Yp(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else this.currentView==="month"?e=$r(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=$r(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=$r(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,n;if(this.currentView==="month"){let r=Yp(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),o=$r(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");r.forEach(a=>a.tabIndex=-1),n=o||r[0],r.length===0&&Yp(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(c=>c.tabIndex=-1)}else if(this.currentView==="year"){let r=Yp(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),o=$r(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");r.forEach(a=>a.tabIndex=-1),n=o||r[0],r.length===0&&Yp(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(c=>c.tabIndex=-1)}else if(n=$r(e,"span.p-highlight"),!n){let r=$r(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");r?n=r:n=$r(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}n&&(n.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.$disabled()||n.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=WT(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let r=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(r==-1||r===0)if(this.focusTrap)n[n.length-1].focus();else{if(r===-1)return this.hideOverlay();if(r===0)return}else n[r-1].focus();else if(r==-1)if(this.timeOnly)n[0].focus();else{let o=0;for(let a=0;a=12),!0){case(z&&c&&this.minDate.getHours()===12&&this.minDate.getHours()>g):a[0]=11;case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r):a[2]=this.minDate.getSeconds();break;case(z&&!c&&this.minDate.getHours()-1===g&&this.minDate.getHours()>g):a[0]=11,this.pm=!0;case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r):a[2]=this.minDate.getSeconds();break;case(z&&c&&this.minDate.getHours()>g&&g!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour;case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r):a[2]=this.minDate.getSeconds();break;case(z&&this.minDate.getHours()>g):a[0]=this.minDate.getHours();case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(z&&this.minDate.getHours()===g&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>r):a[2]=this.minDate.getSeconds();break;case(H&&this.maxDate.getHours()=24?r-24:r:this.hourFormat=="12"&&(n<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.toggleAMPMIfNotMinDate(o),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(r,this.currentMinute,this.currentSecond,o),e.preventDefault()}toggleAMPMIfNotMinDate(e){let n=this.value,r=n?n.toDateString():null;this.minDate&&r&&this.minDate.toDateString()===r&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,n,r){this.$disabled()||(this.repeat(e,null,n,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,r,o){let a=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},a),r){case 0:o===1?this.incrementHour(e):this.decrementHour(e);break;case 1:o===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:o===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=(this.currentHour??0)-this.stepHour,r=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(r=!this.pm),n=n<=0?12+n:n),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(n,this.currentMinute,this.currentSecond,r),e.preventDefault()}incrementMinute(e){let n=(this.currentMinute??0)+this.stepMinute;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,n,this.currentSecond,this.pm),e.preventDefault()}decrementMinute(e){let n=(this.currentMinute??0)-this.stepMinute;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,n,this.currentSecond,this.pm),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,n,this.pm),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,n,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 n=!this.pm;this.pm=n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,this.currentSecond,n),this.updateTime(),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let r=this.parseValueFromString(n);this.isValidSelection(r)?(this.updateModel(r),this.updateUI()):this.keepInvalid&&this.updateModel(r)}catch{let o=this.keepInvalid?n:null;this.updateModel(o)}this.onInput.emit(e)}isValidSelection(e){if(this.isSingleSelection())return this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1);let n=e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1));return n&&this.isRangeSelection()&&(n=e.length===1||e.length>1&&e[1]>=e[0]),n}parseValueFromString(e){if(!e||e.trim().length===0)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);n=[];for(let o of r)n.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");n=[];for(let o=0;o{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),x6e())}disableModality(){this.mask&&(nu(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,n;for(let r=0;r{let w=r+1{let R=""+w;if(o(C))for(;R.lengtho(C)?R[w]:P[w],m="",g=!1;if(e)for(r=0;r11&&r!=12&&(r-=12),this.hourFormat=="12"?n+=r===0?12:r<10?"0"+r:r:n+=r<10?"0"+r:r,n+=":",n+=o<10?"0"+o:o,this.showSeconds&&(n+=":",n+=a<10?"0"+a:a),this.hourFormat=="12"&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":"),r=this.showSeconds?3:2;if(n.length!==r)throw"Invalid time";let o=parseInt(n[0]),a=parseInt(n[1]),c=this.showSeconds?parseInt(n[2]):null;if(isNaN(o)||isNaN(a)||o>23||a>59||this.hourFormat=="12"&&o>12||this.showSeconds&&(isNaN(c)||c>59))throw"Invalid time";return this.hourFormat=="12"&&(o!==12&&this.pm?o+=12:!this.pm&&o===12&&(o-=12)),{hour:o,minute:a,second:c}}parseDate(e,n){if(n==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let r,o,a,c=0,m=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),g=-1,C=-1,w=-1,P=-1,R=!1,z,H=me=>{let Te=r+1{let Te=H(me),Ie=me==="@"?14:me==="!"?20:me==="y"&&Te?4:me==="o"?3:2,ye=me==="y"?Ie:1,fe=new RegExp("^\\d{"+ye+","+Ie+"}"),Re=e.substring(c).match(fe);if(!Re)throw"Missing number at position "+c;return c+=Re[0].length,parseInt(Re[0],10)},K=(me,Te,Ie)=>{let ye=-1,fe=H(me)?Ie:Te,Re=[];for(let Ae=0;Ae-(Ae[1].length-ke[1].length));for(let Ae=0;Ae{if(e.charAt(c)!==n.charAt(r))throw"Unexpected literal at position "+c;c++};for(this.view==="month"&&(w=1),r=0;r-1){C=1,w=P;do{if(o=this.getDaysCountInMonth(g,C-1),w<=o)break;C++,w-=o}while(!0)}if(this.view==="year"&&(C=C===-1?1:C,w=w===-1?1:w),z=this.daylightSavingAdjust(new Date(g,C-1,w)),z.getFullYear()!==g||z.getMonth()+1!==C||z.getDate()!==w)throw"Invalid date";return z}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 n=new Date,r={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(n.getMonth(),n.getFullYear()),this.onDateSelect(e,r),this.onTodayClick.emit(n)}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",$k(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(r=>!!(r.breakpoint&&r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),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 Ub(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 Cd(e.target,"p-datepicker-prev-button")||Cd(e.target,"p-datepicker-prev-icon")||Cd(e.target,"p-datepicker-next-button")||Cd(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!zb()&&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&&Fd.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Pn),xe(Cv))};static \u0275cmp=re({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,Ewt,4),Vt(o,Awt,4),Vt(o,Dwt,4),Vt(o,kwt,4),Vt(o,Mwt,4),Vt(o,Owt,4),Vt(o,Rwt,4),Vt(o,Pwt,4),Vt(o,Nwt,4),Vt(o,Fwt,4),Vt(o,Lwt,4),Vt(o,Bwt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.dateTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.disabledDateTemplate=a.first),ze(a=Ue())&&(r.decadeTemplate=a.first),ze(a=Ue())&&(r.previousIconTemplate=a.first),ze(a=Ue())&&(r.nextIconTemplate=a.first),ze(a=Ue())&&(r.triggerIconTemplate=a.first),ze(a=Ue())&&(r.clearIconTemplate=a.first),ze(a=Ue())&&(r.decrementIconTemplate=a.first),ze(a=Ue())&&(r.incrementIconTemplate=a.first),ze(a=Ue())&&(r.inputIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(Vwt,5),Xi(zwt,5)),n&2){let o;ze(o=Ue())&&(r.inputfieldViewChild=o.first),ze(o=Ue())&&(r.content=o.first)}},hostVars:4,hostBindings:function(n,r){n&2&&(is(r.sx("root")),Pe(r.cn(r.cx("root"),r.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",En],stepMinute:[2,"stepMinute","stepMinute",En],stepSecond:[2,"stepSecond","stepSecond",En],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",En],showButtonBar:[2,"showButtonBar","showButtonBar",Je],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",Je],autoZIndex:[2,"autoZIndex","autoZIndex",Je],baseZIndex:[2,"baseZIndex","baseZIndex",En],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",En],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:[Ii([VTt,PHe]),Tt],ngContentSelectors:Hwt,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(n,r){n&1&&(Kn(Uwt),ie(0,cIt,5,26,"ng-template",3)(1,NTt,9,19,"div",4)),n&2&&(D("ngIf",!r.inline),E(),D("ngIf",r.inline||r.overlayVisible))},dependencies:[rr,qa,Vl,Xr,Jr,Xs,Yl,Qc,Mie,Gb,Oie,Dm,Qf,O6e,Zh,_p,Un],encapsulation:2,data:{animation:[Wp("overlayAnimation",[J0("visibleTouchUI",ul({transform:"translate(-50%,-50%)",opacity:1})),Oc("void => visible",[ul({opacity:0,transform:"scaleY(0.8)"}),Jl("{{showTransitionParams}}",ul({opacity:1,transform:"*"}))]),Oc("visible => void",[Jl("{{hideTransitionParams}}",ul({opacity:0}))]),Oc("void => visibleTouchUI",[ul({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Jl("{{showTransitionParams}}")]),Oc("visibleTouchUI => void",[Jl("{{hideTransitionParams}}",ul({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return t})(),NHe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[az,Un,Un]})}return t})();var FHe=` .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 UTt=["*"],HTt=` ${FHe} /* For PrimeNG */ .p-floatlabel:has(.ng-invalid.ng-dirty) label { color: dt('floatlabel.invalid.color'); } `,GTt={root:({instance:t})=>["p-floatlabel",{"p-floatlabel-over":t.variant==="over","p-floatlabel-on":t.variant==="on","p-floatlabel-in":t.variant==="in"}]},LHe=(()=>{class t extends br{name="floatlabel";theme=HTt;classes=GTt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Jbe=(()=>{class t extends ur{_componentStyle=ae(LHe);variant="over";static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("root"))},inputs:{variant:"variant"},features:[Ii([LHe]),Tt],ngContentSelectors:UTt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),BHe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Jbe,Un,Un]})}return t})();function jTt(t,i){if(t&1){let e=qe();O(0,"div",5)(1,"i",6),te("click",function(r){let o=se(e).clickCallBack;return le(o(r))}),M(),O(2,"i",7),te("click",function(){se(e);let r=L();return le(r.moreOptionsChange.emit())}),M()()}}function $Tt(t,i){if(t&1&&(O(0,"small",4),ee(1),M()),t&2){let e=L();E(),Pt((e.range.errors==null?null:e.range.errors.invalidDate)??(e.range.errors==null?null:e.range.errors.dateOrder))}}var VHe=(()=>{class t{interval=new Mm;intervalChange=new ve;moreOptionsChange=new ve;range=new ho(null,[La.required,qTt()]);constructor(){this.range.valueChanges.pipe(Hh(500),vn(()=>this.range.valid),ot(e=>new Mm(e[0],e[1])),vm((e,n)=>Mm.equals(e,n))).subscribe(e=>{this.intervalChange.emit(e.clone())})}ngOnChanges(){this.interval&&this.interval.isValid()&&this.range.patchValue([this.interval.start,this.interval.end])}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-interval-calendric-input"]],inputs:{interval:"interval"},outputs:{intervalChange:"intervalChange",moreOptionsChange:"moreOptionsChange"},features:[Yt],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(n,r){n&1&&(O(0,"p-floatlabel",0)(1,"p-datePicker",1),ie(2,jTt,3,0,"ng-template",2),M(),O(3,"label",3),ee(4,"Zeitraum"),M(),yt(5,$Tt,2,1,"small",4),M()),n&2&&(E(),Pe(r.range.dirty&&r.range.invalid?"ng-invalid ng-dirty":"mb-8"),D("formControl",r.range),E(4),vt(r.range.errors?5:-1))},dependencies:[oa,yr,Mc,az,Jbe,Tr],encapsulation:2})}return t})();function qTt(){return t=>{let i=t.value;if(!Array.isArray(i)||i.length!==2)return{invalidFormat:"Array must contain exactly two items"};let[e,n]=i,r=e,o=n;return!(r instanceof Date)||isNaN(r.getTime())||!(o instanceof Date)||isNaN(o.getTime())?{invalidDate:"Bitte Start und End Datum eingeben"}:r>o?{dateOrder:"Start Datum muss vor End Datum sein"}:null}}var zHe=` .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 YTt=["*"],KTt={root:({instance:t})=>["p-iconfield",{"p-iconfield-left":t.iconPosition=="left","p-iconfield-right":t.iconPosition=="right"}]},UHe=(()=>{class t extends br{name="iconfield";theme=zHe;classes=KTt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var tM=(()=>{class t extends ur{iconPosition="left";styleClass;_componentStyle=ae(UHe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.styleClass))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[Ii([UHe]),Tt],ngContentSelectors:YTt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})();var WTt=["*"],QTt={root:"p-inputicon"},HHe=(()=>{class t extends br{name="inputicon";classes=QTt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),iM=(()=>{class t extends ur{styleClass;_componentStyle=ae(HHe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.styleClass))},inputs:{styleClass:"styleClass"},features:[Ii([HHe]),Tt],ngContentSelectors:WTt,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})();var GHe=["content"],ZTt=["overlay"],XTt=["*"],JTt=(t,i,e,n,r,o,a,c,m,g,C,w,P,R)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":t,"p-overlay-center":i,"p-overlay-top":e,"p-overlay-top-start":n,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":a,"p-overlay-bottom-end":c,"p-overlay-left":m,"p-overlay-left-start":g,"p-overlay-left-end":C,"p-overlay-right":w,"p-overlay-right-start":P,"p-overlay-right-end":R}),eEt=(t,i,e)=>({showTransitionParams:t,hideTransitionParams:i,transform:e}),tEt=t=>({value:"visible",params:t}),iEt=t=>({mode:t}),nEt=t=>({$implicit:t});function rEt(t,i){t&1&&Li(0)}function oEt(t,i){if(t&1){let e=qe();O(0,"div",3,1),te("click",function(r){se(e);let o=L(2);return le(o.onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){se(e);let o=L(2);return le(o.onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){se(e);let o=L(2);return le(o.onOverlayContentAnimationDone(r))}),Sn(2),ie(3,rEt,1,0,"ng-container",4),M()}if(t&2){let e=L(2);Pe(e.contentStyleClass),D("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",Yi(11,tEt,Qu(7,eEt,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),E(3),D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Yi(15,nEt,Yi(13,iEt,e.overlayMode)))}}function aEt(t,i){if(t&1){let e=qe();O(0,"div",3,0),te("click",function(){se(e);let r=L();return le(r.onOverlayClick())}),ie(2,oEt,4,17,"div",2),M()}if(t&2){let e=L();Pe(e.styleClass),D("ngStyle",e.style)("ngClass",Rj(5,JTt,[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"])),E(2),D("ngIf",e.visible)}}var sEt=` .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; } `,jHe=(()=>{class t extends br{name="overlay";theme=sEt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),lEt=lw([ul({transform:"{{transform}}",opacity:0}),Jl("{{showTransitionParams}}")]),cEt=lw([Jl("{{hideTransitionParams}}",ul({transform:"{{transform}}",opacity:0}))]),sz=(()=>{class t extends ur{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 Ta.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Ta.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Ta.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Ta.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=kr(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=kr();$appendTo=Or(()=>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=ae(jHe);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(Js(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 pe(pe({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return pe(pe({},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 vbe(this.target,this.el?.nativeElement)}constructor(e,n){super(),this.overlayService=e,this.zone=n}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}show(e,n=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&Ba(this.targetEl),this.modal&&nu(this.document?.body,"p-overflow-hidden")}hide(e,n=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),n&&Ba(this.targetEl),this.modal&&qp(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&eo.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&&Fd.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),this.hostAttrSelector()&&this.overlayEl.setAttribute(this.hostAttrSelector(),""),eo.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&&nu(this.overlayEl,"p-overlay-mask-leave");break}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){let n=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.visible&&(this.show(n,!0),this.bindListeners());break;case"void":if(!this.visible){this.hide(n,!0),this.modalVisible=!1,this.unbindListeners(),eo.appendOverlay(this.overlayEl,this.targetEl,this.$appendTo()),Fd.clear(n),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",e)}handleEvents(e,n){this[e].emit(n),this.options&&this.options[e]&&this.options[e](n),this.config?.overlayOptions&&(this.config?.overlayOptions)[e]&&(this.config?.overlayOptions)[e](n)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ub(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 r=!(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&&r}):r)&&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:!zb()}):!zb())&&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:!zb()}):!zb())&&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),Fd.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Cv),xe(Pn))};static \u0275cmp=re({type:t,selectors:[["p-overlay"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,GHe,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(ZTt,5),Xi(GHe,5)),n&2){let o;ze(o=Ue())&&(r.overlayViewChild=o.first),ze(o=Ue())&&(r.contentViewChild=o.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:[Ii([jHe]),Tt],ngContentSelectors:XTt,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(Kn(),ie(0,aEt,3,20,"div",2)),n&2&&D("ngIf",r.modalVisible)},dependencies:[rr,qa,Xr,Jr,Xs,Un],encapsulation:2,data:{animation:[Wp("overlayContentAnimation",[Oc(":enter",[Jk(lEt)]),Oc(":leave",[Jk(cEt)])])]},changeDetection:0})}return t})();var $He=["content"],dEt=["item"],uEt=["loader"],pEt=["loadericon"],mEt=["element"],hEt=["*"],eCe=(t,i)=>({$implicit:t,options:i}),fEt=t=>({numCols:t}),YHe=t=>({options:t}),gEt=()=>({styleClass:"p-virtualscroller-loading-icon"}),_Et=(t,i)=>({rows:t,columns:i});function yEt(t,i){t&1&&Li(0)}function vEt(t,i){if(t&1&&(fi(0),ie(1,yEt,1,0,"ng-container",10),gi()),t&2){let e=L(2);E(),D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",na(2,eCe,e.loadedItems,e.getContentOptions()))}}function bEt(t,i){t&1&&Li(0)}function CEt(t,i){if(t&1&&(fi(0),ie(1,bEt,1,0,"ng-container",10),gi()),t&2){let e=i.$implicit,n=i.index,r=L(3);E(),D("ngTemplateOutlet",r.itemTemplate||r._itemTemplate)("ngTemplateOutletContext",na(2,eCe,e,r.getOptions(n)))}}function xEt(t,i){if(t&1&&(O(0,"div",null,3),ie(2,CEt,2,5,"ng-container",11),M()),t&2){let e=L(2);is(e.contentStyle),Pe(e.cn(e.cx("content"),e.contentStyleClass)),lt("data-pc-section","content"),E(2),D("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy)}}function SEt(t,i){if(t&1&&be(0,"div",12),t&2){let e=L(2);Pe(e.cx("spacer")),D("ngStyle",e.spacerStyle),lt("data-pc-section","spacer")}}function wEt(t,i){t&1&&Li(0)}function IEt(t,i){if(t&1&&(fi(0),ie(1,wEt,1,0,"ng-container",10),gi()),t&2){let e=i.index,n=L(4);E(),D("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",Yi(4,YHe,n.getLoaderOptions(e,n.both&&Yi(2,fEt,n.numItemsInViewport.cols))))}}function TEt(t,i){if(t&1&&(fi(0),ie(1,IEt,2,6,"ng-container",13),gi()),t&2){let e=L(3);E(),D("ngForOf",e.loaderArr)}}function EEt(t,i){t&1&&Li(0)}function AEt(t,i){if(t&1&&(fi(0),ie(1,EEt,1,0,"ng-container",10),gi()),t&2){let e=L(4);E(),D("ngTemplateOutlet",e.loaderIconTemplate||e._loaderIconTemplate)("ngTemplateOutletContext",Yi(3,YHe,Vr(2,gEt)))}}function DEt(t,i){if(t&1&&(Pi(),be(0,"svg",14)),t&2){let e=L(4);Pe(e.cx("loadingIcon")),D("spin",!0),lt("data-pc-section","loadingIcon")}}function kEt(t,i){if(t&1&&ie(0,AEt,2,5,"ng-container",6)(1,DEt,1,4,"ng-template",null,5,di),t&2){let e=Oi(2),n=L(3);D("ngIf",n.loaderIconTemplate||n._loaderIconTemplate)("ngIfElse",e)}}function MEt(t,i){if(t&1&&(O(0,"div"),ie(1,TEt,2,1,"ng-container",6)(2,kEt,3,2,"ng-template",null,4,di),M()),t&2){let e=Oi(3),n=L(2);Pe(n.cx("loader")),lt("data-pc-section","loader"),E(),D("ngIf",n.loaderTemplate||n._loaderTemplate)("ngIfElse",e)}}function OEt(t,i){if(t&1){let e=qe();fi(0),O(1,"div",7,1),te("scroll",function(r){se(e);let o=L();return le(o.onContainerScroll(r))}),ie(3,vEt,2,5,"ng-container",6)(4,xEt,3,7,"ng-template",null,2,di)(6,SEt,1,4,"div",8)(7,MEt,4,5,"div",9),M(),gi()}if(t&2){let e=Oi(5),n=L();E(),Pe(n.cn(n.cx("root"),n.styleClass)),D("ngStyle",n._style),lt("id",n._id)("tabindex",n.tabindex)("data-pc-name","scroller")("data-pc-section","root"),E(2),D("ngIf",n.contentTemplate||n._contentTemplate)("ngIfElse",e),E(3),D("ngIf",n._showSpacer),E(),D("ngIf",!n.loaderDisabled&&n._showLoader&&n.d_loading)}}function REt(t,i){t&1&&Li(0)}function PEt(t,i){if(t&1&&(fi(0),ie(1,REt,1,0,"ng-container",10),gi()),t&2){let e=L(2);E(),D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",na(5,eCe,e.items,na(2,_Et,e._items,e.loadedColumns)))}}function NEt(t,i){if(t&1&&(Sn(0),ie(1,PEt,2,8,"ng-container",15)),t&2){let e=L();E(),D("ngIf",e.contentTemplate||e._contentTemplate)}}var FEt=` .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; } `,LEt={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"},qHe=(()=>{class t extends br{name="virtualscroller";theme=FEt;classes=LEt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var ey=(()=>{class t extends ur{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(([n,r])=>this[`_${n}`]!==r&&(this[`_${n}`]=r)),Object.entries(e).forEach(([n,r])=>this[`${n}`]!==r&&(this[`${n}`]=r)))}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=ae(qHe);constructor(e){super(),this.zone=e}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(e){super.ngOnChanges(e);let n=!1;if(this.scrollHeight=="100%"&&(this.height="100%"),e.loading){let{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,n=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){let{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){let{previousValue:r,currentValue:o}=e.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,n=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!n&&(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(){Js(this.platformId)&&!this.initialized&&xbe(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=K_(this.elementViewChild?.nativeElement),this.defaultHeight=nw(this.elementViewChild?.nativeElement),this.defaultContentWidth=K_(this.contentEl),this.defaultContentHeight=nw(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||$r(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,n="auto"){if(this.both?e.every(o=>o>-1):e>-1){let o=this.first,{scrollTop:a=0,scrollLeft:c=0}=this.elementViewChild?.nativeElement,{numToleratedItems:m}=this.calculateNumItems(),g=this.getContentPosition(),C=this.itemSize,w=(K=0,ne)=>K<=ne?0:K,P=(K,ne,me)=>K*ne+me,R=(K=0,ne=0)=>this.scrollTo({left:K,top:ne,behavior:n}),z=this.both?{rows:0,cols:0}:0,H=!1,j=!1;this.both?(z={rows:w(e[0],m[0]),cols:w(e[1],m[1])},R(P(z.cols,C[1],g.left),P(z.rows,C[0],g.top)),j=this.lastScrollPos.top!==a||this.lastScrollPos.left!==c,H=z.rows!==o.rows||z.cols!==o.cols):(z=w(e,m),this.horizontal?R(P(z,C,g.left),a):R(c,P(z,C,g.top)),j=this.lastScrollPos!==(this.horizontal?c:a),H=z!==o),this.isRangeChanged=H,j&&(this.first=z)}}scrollInView(e,n,r="auto"){if(n){let{first:o,viewport:a}=this.getRenderedRange(),c=(C=0,w=0)=>this.scrollTo({left:C,top:w,behavior:r}),m=n==="to-start",g=n==="to-end";if(m){if(this.both)a.first.rows-o.rows>e[0]?c(a.first.cols*this._itemSize[1],(a.first.rows-1)*this._itemSize[0]):a.first.cols-o.cols>e[1]&&c((a.first.cols-1)*this._itemSize[1],a.first.rows*this._itemSize[0]);else if(a.first-o>e){let C=(a.first-1)*this._itemSize;this.horizontal?c(C,0):c(0,C)}}else if(g){if(this.both)a.last.rows-o.rows<=e[0]+1?c(a.first.cols*this._itemSize[1],(a.first.rows+1)*this._itemSize[0]):a.last.cols-o.cols<=e[1]+1&&c((a.first.cols+1)*this._itemSize[1],a.first.rows*this._itemSize[0]);else if(a.last-o<=e+1){let C=(a.first+1)*this._itemSize;this.horizontal?c(C,0):c(0,C)}}}else this.scrollToIndex(e,r)}getRenderedRange(){let e=(o,a)=>a||o?Math.floor(o/(a||o)):0,n=this.first,r=0;if(this.elementViewChild?.nativeElement){let{scrollTop:o,scrollLeft:a}=this.elementViewChild.nativeElement;if(this.both)n={rows:e(o,this._itemSize[0]),cols:e(a,this._itemSize[1])},r={rows:n.rows+this.numItemsInViewport.rows,cols:n.cols+this.numItemsInViewport.cols};else{let c=this.horizontal?a:o;n=e(c,this._itemSize),r=n+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:n,last:r}}}calculateNumItems(){let e=this.getContentPosition(),n=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0)||0,r=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0)||0,o=(g,C)=>C||g?Math.ceil(g/(C||g)):0,a=g=>Math.ceil(g/2),c=this.both?{rows:o(r,this._itemSize[0]),cols:o(n,this._itemSize[1])}:o(this.horizontal?n:r,this._itemSize),m=this.d_numToleratedItems||(this.both?[a(c.rows),a(c.cols)]:a(c));return{numItemsInViewport:c,numToleratedItems:m}}calculateOptions(){let{numItemsInViewport:e,numToleratedItems:n}=this.calculateNumItems(),r=(c,m,g,C=!1)=>this.getLast(c+m+(cArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,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,n]=[K_(this.contentEl),nw(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),n!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[r,o]=[K_(this.elementViewChild.nativeElement),nw(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[a]=c;this.both||this.horizontal?(o("height",r),o("width",n)):o("height",r)}}setSpacerSize(){if(this._items){let e=this.getContentPosition(),n=(r,o,a,c=0)=>this.spacerStyle=$e(pe({},this.spacerStyle),{[`${r}`]:(o||[]).length*a+c+"px"});this.both?(n("height",this._items,this._itemSize[0],e.y),n("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?n("width",this._columns||this._items,this._itemSize,e.x):n("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){let n=e?e.first:this.first,r=(a,c)=>a*c,o=(a=0,c=0)=>this.contentStyle=$e(pe({},this.contentStyle),{transform:`translate3d(${a}px, ${c}px, 0)`});if(this.both)o(r(n.cols,this._itemSize[1]),r(n.rows,this._itemSize[0]));else{let a=r(n,this._itemSize);this.horizontal?o(a,0):o(0,a)}}}onScrollPositionChange(e){let n=e.target;if(!n)throw new Error("Event target is null");let r=this.getContentPosition(),o=(j,K)=>j?j>K?j-K:j:0,a=(j,K)=>K||j?Math.floor(j/(K||j)):0,c=(j,K,ne,me,Te,Ie)=>j<=Te?Te:Ie?ne-me-Te:K+Te-1,m=(j,K,ne,me,Te,Ie,ye)=>j<=Ie?0:Math.max(0,ye?jK?ne:j-2*Ie),g=(j,K,ne,me,Te,Ie=!1)=>{let ye=K+me+2*Te;return j>=Te&&(ye+=Te+1),this.getLast(ye,Ie)},C=o(n.scrollTop,r.top),w=o(n.scrollLeft,r.left),P=this.both?{rows:0,cols:0}:0,R=this.last,z=!1,H=this.lastScrollPos;if(this.both){let j=this.lastScrollPos.top<=C,K=this.lastScrollPos.left<=w;if(!this._appendOnly||this._appendOnly&&(j||K)){let ne={rows:a(C,this._itemSize[0]),cols:a(w,this._itemSize[1])},me={rows:c(ne.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],j),cols:c(ne.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],K)};P={rows:m(ne.rows,me.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],j),cols:m(ne.cols,me.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],K)},R={rows:g(ne.rows,P.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:g(ne.cols,P.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},z=P.rows!==this.first.rows||R.rows!==this.last.rows||P.cols!==this.first.cols||R.cols!==this.last.cols||this.isRangeChanged,H={top:C,left:w}}}else{let j=this.horizontal?w:C,K=this.lastScrollPos<=j;if(!this._appendOnly||this._appendOnly&&K){let ne=a(j,this._itemSize),me=c(ne,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,K);P=m(ne,me,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,K),R=g(ne,P,this.last,this.numItemsInViewport,this.d_numToleratedItems),z=P!==this.first||R!==this.last||this.isRangeChanged,H=j}}return{first:P,last:R,isRangeChanged:z,scrollPos:H}}onScrollChange(e){let{first:n,last:r,isRangeChanged:o,scrollPos:a}=this.onScrollPositionChange(e);if(o){let c={first:n,last:r};if(this.setContentPosition(c),this.first=n,this.last=r,this.lastScrollPos=a,this.handleEvents("onScrollIndexChange",c),this._lazy&&this.isPageChanged(n)){let m={first:this._step?Math.min(this.getPageByFirst(n)*this._step,this._items.length-this._step):n,last:Math.min(this._step?(this.getPageByFirst(n)+1)*this._step:r,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:n}=this.onScrollPositionChange(e);(n||(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(){Js(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let e=this.document.defaultView,n=zb()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(e,n,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(xbe(this.elementViewChild?.nativeElement)){let[e,n]=[K_(this.elementViewChild?.nativeElement),nw(this.elementViewChild?.nativeElement)],[r,o]=[e!==this.defaultWidth,n!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical?o:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=n,this.defaultContentWidth=K_(this.contentEl),this.defaultContentHeight=nw(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,n){return this.options&&this.options[e]?this.options[e](n):this[e].emit(n)}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,n)=>this.getLoaderOptions(e,n),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 n=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:n,first:r===0,last:r===n-1,even:r%2===0,odd:r%2!==0}}getLoaderOptions(e,n){let r=this.loaderArr.length;return pe({index:e,count:r,first:e===0,last:e===r-1,even:e%2===0,odd:e%2!==0,loading:this.d_loading},n)}static \u0275fac=function(n){return new(n||t)(xe(Pn))};static \u0275cmp=re({type:t,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,$He,4),Vt(o,dEt,4),Vt(o,uEt,4),Vt(o,pEt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.loaderTemplate=a.first),ze(a=Ue())&&(r.loaderIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(mEt,5),Xi($He,5)),n&2){let o;ze(o=Ue())&&(r.elementViewChild=o.first),ze(o=Ue())&&(r.contentViewChild=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&la("height",r.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:[Ii([qHe]),Tt,Yt],ngContentSelectors:hEt,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(n,r){if(n&1&&(Kn(),ie(0,OEt,8,11,"ng-container",6)(1,NEt,2,1,"ng-template",null,0,di)),n&2){let o=Oi(2);D("ngIf",!r._disabled)("ngIfElse",o)}},dependencies:[rr,Vl,Xr,Jr,Xs,W_,Un],encapsulation:2})}return t})(),tCe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[ey,Un,Un]})}return t})();var KHe=` .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 VEt={root:"p-tooltip p-component",arrow:"p-tooltip-arrow",text:"p-tooltip-text"},WHe=(()=>{class t extends br{name="tooltip";theme=KHe;classes=VEt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var tg=(()=>{class t extends ur{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=kr(void 0);$appendTo=Or(()=>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:fa("pn_id_")+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;documentEscapeListener;scrollHandler;resizeListener;_componentStyle=ae(WHe);interactionInProgress=!1;constructor(e,n){super(),this.zone=e,this.viewContainer=n}ngAfterViewInit(){super.ngAfterViewInit(),Js(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 n=this.el.nativeElement.querySelector(".p-component");n||(n=this.getTarget(this.el.nativeElement)),n.addEventListener("focus",this.focusListener),n.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=pe(pe({},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():!(Cd(e.relatedTarget,"p-tooltip")||Cd(e.relatedTarget,"p-tooltip-text")||Cd(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"?KT(this.container,this.el.nativeElement):KT(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",n=>{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()),HUe(this.container,250),this.getOption("tooltipZIndex")==="auto"?Fd.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&Fd.clear(this.container),this.remove()}updateText(){let e=this.getOption("tooltipLabel");if(e instanceof Bl){let n=this.viewContainer.createEmbeddedView(e);n.detectChanges(),n.rootNodes.forEach(r=>this.tooltipText.appendChild(r))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(e))):this.tooltipText.innerHTML=e}align(){let e=this.getOption("tooltipPosition"),n={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[r,o]of n[e].entries())if(r===0)o.call(this);else if(this.isOutOfBounds())o.call(this);else break}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let e=this.el.nativeElement.getBoundingClientRect(),n=e.left+_be(),r=e.top+ybe();return{left:n,top:r}}else return{left:0,top:0}}get activeElement(){return this.el.nativeElement.nodeName.startsWith("P-")?$r(this.el.nativeElement,".p-component"):this.el.nativeElement}alignRight(){this.preAlign("right");let e=this.activeElement,n=Nd(e),r=(zg(e)-zg(this.container))/2;this.alignTooltip(n,r);let o=this.getArrowElement();o.style.top="50%",o.style.right=null,o.style.bottom=null,o.style.left="0"}alignLeft(){this.preAlign("left");let e=this.getArrowElement(),n=Nd(this.container),r=(zg(this.el.nativeElement)-zg(this.container))/2;this.alignTooltip(-n,r),e.style.top="50%",e.style.right="0",e.style.bottom=null,e.style.left=null}alignTop(){this.preAlign("top");let e=this.getArrowElement(),n=this.getHostOffset(),r=Nd(this.container),o=(Nd(this.el.nativeElement)-Nd(this.container))/2,a=zg(this.container);this.alignTooltip(o,-a);let c=n.left-this.getHostOffset().left+r/2;e.style.top=null,e.style.right=null,e.style.bottom="0",e.style.left=c+"px"}getArrowElement(){return $r(this.container,'[data-pc-section="arrow"]')}alignBottom(){this.preAlign("bottom");let e=this.getArrowElement(),n=Nd(this.container),r=this.getHostOffset(),o=(Nd(this.el.nativeElement)-Nd(this.container))/2,a=zg(this.el.nativeElement);this.alignTooltip(o,a);let c=r.left-this.getHostOffset().left+n/2;e.style.top="0",e.style.right=null,e.style.bottom=null,e.style.left=c+"px"}alignTooltip(e,n){let r=this.getHostOffset(),o=r.left+e,a=r.top+n;this.container.style.left=o+this.getOption("positionLeft")+"px",this.container.style.top=a+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=pe(pe({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return Cd(e,"p-inputwrapper")?$r(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let n="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?n+" "+this.getOption("tooltipStyleClass"):n}isOutOfBounds(){let e=this.container.getBoundingClientRect(),n=e.top,r=e.left,o=Nd(this.container),a=zg(this.container),c=jk();return r+o>c.width||r<0||n<0||n+a>c.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 Ub(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 n=this.el.nativeElement.querySelector(".p-component");n||(n=this.getTarget(this.el.nativeElement)),n.removeEventListener("focus",this.focusListener),n.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):qUe(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&&Fd.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.documentEscapeListener&&this.documentEscapeListener()}static \u0275fac=function(n){return new(n||t)(xe(Pn),xe($l))};static \u0275dir=hn({type:t,selectors:[["","pTooltip",""]],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[2,"escape","escape",Je],showDelay:[2,"showDelay","showDelay",En],hideDelay:[2,"hideDelay","hideDelay",En],life:[2,"life","life",En],positionTop:[2,"positionTop","positionTop",En],positionLeft:[2,"positionLeft","positionLeft",En],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:[Ii([WHe]),Tt,Yt]})}return t})(),sE=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({})}return t})();var QHe=` .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 m9=t=>({height:t}),nCe=t=>({$implicit:t});function zEt(t,i){if(t&1&&(Pi(),be(0,"svg",5)),t&2){let e=L(2);Pe(e.cx("optionCheckIcon"))}}function UEt(t,i){if(t&1&&(Pi(),be(0,"svg",6)),t&2){let e=L(2);Pe(e.cx("optionBlankIcon"))}}function HEt(t,i){if(t&1&&(fi(0),ie(1,zEt,1,2,"svg",3)(2,UEt,1,2,"svg",4),gi()),t&2){let e=L();E(),D("ngIf",e.selected),E(),D("ngIf",!e.selected)}}function GEt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L();E(),Pt(e.label??"empty")}}function jEt(t,i){t&1&&Li(0)}var $Et=["item"],qEt=["group"],YEt=["loader"],KEt=["selectedItem"],WEt=["header"],ZHe=["filter"],QEt=["footer"],ZEt=["emptyfilter"],XEt=["empty"],JEt=["dropdownicon"],eAt=["loadingicon"],tAt=["clearicon"],iAt=["filtericon"],nAt=["onicon"],rAt=["officon"],oAt=["cancelicon"],aAt=["focusInput"],sAt=["editableInput"],lAt=["items"],cAt=["scroller"],dAt=["overlay"],uAt=["firstHiddenFocusableEl"],pAt=["lastHiddenFocusableEl"],XHe=t=>({class:t}),JHe=t=>({options:t}),eGe=(t,i)=>({$implicit:t,options:i}),mAt=()=>({});function hAt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(2);E(),Pt(e.label()==="p-emptylabel"?"\xA0":e.label())}}function fAt(t,i){if(t&1&&Li(0,24),t&2){let e=L(2);D("ngTemplateOutlet",e.selectedItemTemplate||e._selectedItemTemplate)("ngTemplateOutletContext",Yi(2,nCe,e.selectedOption))}}function gAt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(3);E(),Pt(e.label()==="p-emptylabel"?"\xA0":e.label())}}function _At(t,i){if(t&1&&ie(0,gAt,2,1,"span",18),t&2){let e=L(2);D("ngIf",e.isSelectedOptionEmpty())}}function yAt(t,i){if(t&1){let e=qe();O(0,"span",22,3),te("focus",function(r){se(e);let o=L();return le(o.onInputFocus(r))})("blur",function(r){se(e);let o=L();return le(o.onInputBlur(r))})("keydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))}),ie(2,hAt,2,1,"ng-container",20)(3,fAt,1,4,"ng-container",23)(4,_At,1,1,"ng-template",null,4,di),M()}if(t&2){let e=Oi(5),n=L();Pe(n.cx("label")),D("pTooltip",n.tooltip)("tooltipPosition",n.tooltipPosition)("positionStyle",n.tooltipPositionStyle)("tooltipStyleClass",n.tooltipStyleClass)("pAutoFocus",n.autofocus),lt("aria-disabled",n.$disabled())("id",n.inputId)("aria-label",n.ariaLabel||(n.label()==="p-emptylabel"?void 0:n.label()))("aria-labelledby",n.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",n.overlayVisible??!1)("aria-controls",n.overlayVisible?n.id+"_list":null)("tabindex",n.$disabled()?-1:n.tabindex)("aria-activedescendant",n.focused?n.focusedOptionId:void 0)("aria-required",n.required())("required",n.required()?"":void 0)("disabled",n.$disabled()?"":void 0),E(2),D("ngIf",!n.selectedItemTemplate&&!n._selectedItemTemplate)("ngIfElse",e),E(),D("ngIf",(n.selectedItemTemplate||n._selectedItemTemplate)&&!n.isSelectedOptionEmpty())}}function vAt(t,i){if(t&1){let e=qe();O(0,"input",25,5),te("input",function(r){se(e);let o=L();return le(o.onEditableInput(r))})("keydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))})("focus",function(r){se(e);let o=L();return le(o.onInputFocus(r))})("blur",function(r){se(e);let o=L();return le(o.onInputBlur(r))}),M()}if(t&2){let e=L();Pe(e.cx("label")),D("pAutoFocus",e.autofocus),lt("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 bAt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",28),te("click",function(r){se(e);let o=L(2);return le(o.clear(r))}),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearicon")}}function CAt(t,i){}function xAt(t,i){t&1&&ie(0,CAt,0,0,"ng-template")}function SAt(t,i){if(t&1){let e=qe();O(0,"span",29),te("click",function(r){se(e);let o=L(2);return le(o.clear(r))}),ie(1,xAt,1,0,null,30),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearicon"),E(),D("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)("ngTemplateOutletContext",Yi(5,XHe,e.cx("clearIcon")))}}function wAt(t,i){if(t&1&&(fi(0),ie(1,bAt,1,3,"svg",26)(2,SAt,2,7,"span",27),gi()),t&2){let e=L();E(),D("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),E(),D("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function IAt(t,i){t&1&&Li(0)}function TAt(t,i){if(t&1&&(fi(0),ie(1,IAt,1,0,"ng-container",31),gi()),t&2){let e=L(2);E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function EAt(t,i){if(t&1&&be(0,"span",33),t&2){let e=L(3);Pe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function AAt(t,i){if(t&1&&be(0,"span",33),t&2){let e=L(3);Pe(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin"))}}function DAt(t,i){if(t&1&&(fi(0),ie(1,EAt,1,2,"span",32)(2,AAt,1,2,"span",32),gi()),t&2){let e=L(2);E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function kAt(t,i){if(t&1&&(fi(0),ie(1,TAt,2,1,"ng-container",18)(2,DAt,3,2,"ng-container",18),gi()),t&2){let e=L();E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function MAt(t,i){if(t&1&&be(0,"span"),t&2){let e=L(3);Pe(e.cn(e.cx("dropdownIcon"),e.dropdownIcon))}}function OAt(t,i){if(t&1&&(Pi(),be(0,"svg",36)),t&2){let e=L(3);Pe(e.cx("dropdownIcon"))}}function RAt(t,i){if(t&1&&(fi(0),ie(1,MAt,1,2,"span",34)(2,OAt,1,2,"svg",35),gi()),t&2){let e=L(2);E(),D("ngIf",e.dropdownIcon),E(),D("ngIf",!e.dropdownIcon)}}function PAt(t,i){}function NAt(t,i){t&1&&ie(0,PAt,0,0,"ng-template")}function FAt(t,i){if(t&1&&(O(0,"span"),ie(1,NAt,1,0,null,30),M()),t&2){let e=L(2);Pe(e.cx("dropdownIcon")),E(),D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)("ngTemplateOutletContext",Yi(4,XHe,e.cx("dropdownIcon")))}}function LAt(t,i){if(t&1&&ie(0,RAt,3,2,"ng-container",18)(1,FAt,2,6,"span",34),t&2){let e=L();D("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),E(),D("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function BAt(t,i){t&1&&Li(0)}function VAt(t,i){t&1&&Li(0)}function zAt(t,i){if(t&1&&(fi(0),ie(1,VAt,1,0,"ng-container",30),gi()),t&2){let e=L(3);E(),D("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",Yi(2,JHe,e.filterOptions))}}function UAt(t,i){t&1&&(Pi(),be(0,"svg",42))}function HAt(t,i){}function GAt(t,i){t&1&&ie(0,HAt,0,0,"ng-template")}function jAt(t,i){if(t&1&&(O(0,"span"),ie(1,GAt,1,0,null,31),M()),t&2){let e=L(4);E(),D("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function $At(t,i){if(t&1){let e=qe();O(0,"p-iconfield")(1,"input",40,10),te("input",function(r){se(e);let o=L(3);return le(o.onFilterInputChange(r))})("keydown",function(r){se(e);let o=L(3);return le(o.onFilterKeyDown(r))})("blur",function(r){se(e);let o=L(3);return le(o.onFilterBlur(r))}),M(),O(3,"p-inputicon"),ie(4,UAt,1,0,"svg",41)(5,jAt,2,1,"span",18),M()()}if(t&2){let e=L(3);E(),Pe(e.cx("pcFilter")),D("pSize",e.size())("value",e._filterValue()||"")("variant",e.$variant()),lt("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),E(3),D("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),E(),D("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function qAt(t,i){if(t&1){let e=qe();O(0,"div",29),te("click",function(r){return se(e),le(r.stopPropagation())}),ie(1,zAt,2,4,"ng-container",20)(2,$At,6,11,"ng-template",null,9,di),M()}if(t&2){let e=Oi(3),n=L(2);Pe(n.cx("header")),E(),D("ngIf",n.filterTemplate||n._filterTemplate)("ngIfElse",e)}}function YAt(t,i){t&1&&Li(0)}function KAt(t,i){if(t&1&&ie(0,YAt,1,0,"ng-container",30),t&2){let e=i.$implicit,n=i.options;L(2);let r=Oi(9);D("ngTemplateOutlet",r)("ngTemplateOutletContext",na(2,eGe,e,n))}}function WAt(t,i){t&1&&Li(0)}function QAt(t,i){if(t&1&&ie(0,WAt,1,0,"ng-container",30),t&2){let e=i.options,n=L(4);D("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",Yi(2,JHe,e))}}function ZAt(t,i){t&1&&(fi(0),ie(1,QAt,1,4,"ng-template",null,12,di),gi())}function XAt(t,i){if(t&1){let e=qe();O(0,"p-scroller",43,11),te("onLazyLoad",function(r){se(e);let o=L(2);return le(o.onLazyLoad.emit(r))}),ie(2,KAt,1,5,"ng-template",null,2,di)(4,ZAt,3,0,"ng-container",18),M()}if(t&2){let e=L(2);is(Yi(8,m9,e.scrollHeight)),D("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),E(4),D("ngIf",e.loaderTemplate||e._loaderTemplate)}}function JAt(t,i){t&1&&Li(0)}function eDt(t,i){if(t&1&&(fi(0),ie(1,JAt,1,0,"ng-container",30),gi()),t&2){L();let e=Oi(9),n=L();E(),D("ngTemplateOutlet",e)("ngTemplateOutletContext",na(3,eGe,n.visibleOptions(),Vr(2,mAt)))}}function tDt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2).$implicit,n=L(3);E(),Pt(n.getOptionGroupLabel(e.optionGroup))}}function iDt(t,i){t&1&&Li(0)}function nDt(t,i){if(t&1&&(fi(0),O(1,"li",47),ie(2,tDt,2,1,"span",18)(3,iDt,1,0,"ng-container",30),M(),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),Pe(a.cx("optionGroup")),D("ngStyle",Yi(7,m9,o.itemSize+"px")),lt("id",a.id+"_"+a.getOptionIndex(r,o)),E(),D("ngIf",!a.groupTemplate&&!a._groupTemplate),E(),D("ngTemplateOutlet",a.groupTemplate||a._groupTemplate)("ngTemplateOutletContext",Yi(9,nCe,n.optionGroup))}}function rDt(t,i){if(t&1){let e=qe();fi(0),O(1,"p-selectItem",48),te("onClick",function(r){se(e);let o=L().$implicit,a=L(3);return le(a.onOptionSelect(r,o))})("onMouseEnter",function(r){se(e);let o=L().index,a=L().options,c=L(2);return le(c.onOptionMouseEnter(r,c.getOptionIndex(o,a)))}),M(),gi()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),D("id",a.id+"_"+a.getOptionIndex(r,o))("option",n)("checkmark",a.checkmark)("selected",a.isSelected(n))("label",a.getOptionLabel(n))("disabled",a.isOptionDisabled(n))("template",a.itemTemplate||a._itemTemplate)("focused",a.focusedOptionIndex()===a.getOptionIndex(r,o)),uc("ariaPosInset",a.getAriaPosInset(a.getOptionIndex(r,o)))("ariaSetSize",a.ariaSetSize)}}function oDt(t,i){if(t&1&&ie(0,nDt,4,11,"ng-container",18)(1,rDt,2,10,"ng-container",18),t&2){let e=i.$implicit,n=L(3);D("ngIf",n.isOptionGroup(e)),E(),D("ngIf",!n.isOptionGroup(e))}}function aDt(t,i){if(t&1&&ee(0),t&2){let e=L(4);gn(" ",e.emptyFilterMessageLabel," ")}}function sDt(t,i){t&1&&Li(0,null,14)}function lDt(t,i){if(t&1&&ie(0,sDt,2,0,"ng-container",31),t&2){let e=L(4);D("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyTemplate)}}function cDt(t,i){if(t&1&&(O(0,"li",47),yt(1,aDt,1,1)(2,lDt,1,1,"ng-container"),M()),t&2){let e=L().options,n=L(2);Pe(n.cx("emptyMessage")),D("ngStyle",Yi(4,m9,e.itemSize+"px")),E(),vt(!n.emptyFilterTemplate&&!n._emptyFilterTemplate&&!n.emptyTemplate?1:2)}}function dDt(t,i){if(t&1&&ee(0),t&2){let e=L(4);gn(" ",e.emptyFilterMessageLabel||e.emptyMessageLabel," ")}}function uDt(t,i){t&1&&Li(0,null,15)}function pDt(t,i){if(t&1&&ie(0,uDt,2,0,"ng-container",31),t&2){let e=L(4);D("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function mDt(t,i){if(t&1&&(O(0,"li",47),yt(1,dDt,1,1)(2,pDt,1,1,"ng-container"),M()),t&2){let e=L().options,n=L(2);Pe(n.cx("emptyMessage")),D("ngStyle",Yi(4,m9,e.itemSize+"px")),E(),vt(!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function hDt(t,i){if(t&1&&(O(0,"ul",44,13),ie(2,oDt,2,2,"ng-template",45)(3,cDt,3,6,"li",46)(4,mDt,3,6,"li",46),M()),t&2){let e=i.$implicit,n=i.options,r=L(2);is(n.contentStyle),Pe(r.cn(r.cx("list"),n.contentStyleClass)),lt("id",r.id+"_list")("aria-label",r.listLabel),E(2),D("ngForOf",e),E(),D("ngIf",r.filterValue&&r.isEmpty()),E(),D("ngIf",!r.filterValue&&r.isEmpty())}}function fDt(t,i){t&1&&Li(0)}function gDt(t,i){if(t&1){let e=qe();O(0,"div",37)(1,"span",38,6),te("focus",function(r){se(e);let o=L();return le(o.onFirstHiddenFocus(r))}),M(),ie(3,BAt,1,0,"ng-container",31)(4,qAt,4,4,"div",27),O(5,"div"),ie(6,XAt,5,10,"p-scroller",39)(7,eDt,2,6,"ng-container",18)(8,hDt,5,9,"ng-template",null,7,di),M(),ie(10,fDt,1,0,"ng-container",31),O(11,"span",38,8),te("focus",function(r){se(e);let o=L();return le(o.onLastHiddenFocus(r))}),M()()}if(t&2){let e=L();Pe(e.cn(e.cx("overlay"),e.panelStyleClass)),D("ngStyle",e.panelStyle),E(),lt("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),E(2),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),E(),D("ngIf",e.filter),E(),Pe(e.cx("listContainer")),la("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),E(),D("ngIf",e.virtualScroll),E(),D("ngIf",!e.virtualScroll),E(3),D("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),E(),lt("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var _Dt=` ${QHe} /* 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'); } `,yDt={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"},Jne=(()=>{class t extends br{name="select";theme=_Dt;classes=yDt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var vDt={provide:Wc,useExisting:No(()=>Us),multi:!0},bDt=(()=>{class t extends ur{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new ve;onMouseEnter=new ve;_componentStyle=ae(Jne);onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({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",En],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",Je]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[Ii([Jne]),Tt],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(n,r){n&1&&(O(0,"li",0),te("click",function(a){return r.onOptionClick(a)})("mouseenter",function(a){return r.onOptionMouseEnter(a)}),ie(1,HEt,3,2,"ng-container",1)(2,GEt,2,1,"span",1)(3,jEt,1,0,"ng-container",2),M()),n&2&&(Pe(r.cx("option")),D("id",r.id)("ngStyle",Yi(15,m9,r.itemSize+"px")),lt("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),E(),D("ngIf",r.checkmark),E(),D("ngIf",!r.template),E(),D("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Yi(17,nCe,r.option)))},dependencies:[rr,Xr,Jr,Xs,Un,Qc,Qk,M6e],encapsulation:2})}return t})(),Us=(()=>{class t extends Wk{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){Y7(e,this._options())||this._options.set(e)}appendTo=kr(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=ae(Jne);filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;itemsWrapper;$appendTo=Or(()=>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=hr(null);_placeholder=hr(void 0);value;hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=hr(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=hr(-1);labelId;listId;clicked=hr(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(xs.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(xs.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.$disabled()}get listLabel(){return this.config.getTranslation(xs.ARIA).listLabel}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=Or(()=>{let e=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let r=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.label?o.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:o.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 o=this.options||[],a=[];return o.forEach(c=>{let g=this.getOptionGroupChildren(c).filter(C=>r.includes(C));g.length>0&&a.push($e(pe({},c),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...g]}))}),this.flatOptions(a)}return r}return e});label=Or(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),n=e.findIndex(r=>this.isOptionValueEqualsModelValue(r));return n!==-1?this.getOptionLabel(e[n]):this.placeholder()||"p-emptylabel"});selectedOption;constructor(e,n){super(),this.zone=e,this.filterService=n,tu(()=>{let r=this.modelValue(),o=this.visibleOptions();if(o&&Ro(o)){let a=this.findSelectedOptionIndex();(a!==-1||r===void 0||typeof r=="string"&&r.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=o[a])}ru(o)&&(r===void 0||this.isModelValueNotSet())&&Ro(this.selectedOption)&&(this.selectedOption=null),r!==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||fa("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=$r(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-select-option-selected");e&&YUe(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}flatOptions(e){return(e||[]).reduce((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let a=this.getOptionGroupChildren(r);return a&&a.forEach(c=>n.push(c)),n},[])}autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1))}onOptionSelect(e,n,r=!0,o=!1){if(!this.isSelected(n)){let a=this.getOptionValue(n);this.updateModel(a,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),o===!1&&this.onChange.emit({originalEvent:e,value:a})}r&&this.hide(!0)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}updateModel(e,n){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)&&xd(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){super.ngAfterViewInit(),this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){let e=this.el.nativeElement.parentElement,n=e?.classList.contains("p-float-label");if(e&&n&&!this.selectedOption){let r=e.querySelector("label");r&&this._placeholder.set(r.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?Os(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?Os(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isSelectedOptionEmpty(){return ru(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?Os(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?Os(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?Os(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).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 n=e.target.value;this.searchValue="",!this.searchOptions(e,n)&&this.focusedOptionIndex.set(-1),this.onModelChange(n),this.updateModel(n||null,e),setTimeout(()=>{this.onChange.emit({originalEvent:e,value:n})},1),!this.overlayVisible&&Ro(n)&&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&&Ba(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=$r(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 n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=$r(this.itemsWrapper,".p-select-option.p-select-option-selected");n&&n.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"&&L4(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&Ba(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&Ba(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.$disabled())return;this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),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,n=!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,n);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&&Yk(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 n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n)}e.preventDefault(),e.stopPropagation()}changeFocusedOptionIndex(e,n){if(this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus)){let r=this.visibleOptions()[n];this.onOptionSelect(e,r,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=$r(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.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 n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?X0(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastOptionIndex(){return X0(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,n=!1){if(e.altKey&&!n){if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide()}else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show()}e.preventDefault(),e.stopPropagation()}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,n=!1){if(n){let r=e.currentTarget;e.shiftKey?r.setSelectionRange(0,r.value.length):(r.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,n=!1){if(n){let r=e.currentTarget;if(e.shiftKey)r.setSelectionRange(0,r.value.length);else{let o=r.value.length;r.setSelectionRange(o,o),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,n=!1){!this.editable&&!n&&this.onEnterKey(e)}onEnterKey(e,n=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}!n&&this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()}onTabKey(e,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())Ba(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,r)}this.overlayVisible&&this.hide(this.filter)}e.stopPropagation()}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?k4(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;Ba(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?M4(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;Ba(n)}hasFocusableElements(){return WT(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,n=!1){n&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return r=this.visibleOptions().findIndex(a=>this.isOptionMatched(a)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&setTimeout(()=>{this.changeFocusedOptionIndex(e,r)}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(e){let n=e.target.value;this._filterValue.set(n),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?$r(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():Ba(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,n){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),n(this.value),this.updateEditableLabel(),this.cd.markForCheck()}static \u0275fac=function(n){return new(n||t)(xe(Pn),xe(Kk))};static \u0275cmp=re({type:t,selectors:[["p-select"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,$Et,4),Vt(o,qEt,4),Vt(o,YEt,4),Vt(o,KEt,4),Vt(o,WEt,4),Vt(o,ZHe,4),Vt(o,QEt,4),Vt(o,ZEt,4),Vt(o,XEt,4),Vt(o,JEt,4),Vt(o,eAt,4),Vt(o,tAt,4),Vt(o,iAt,4),Vt(o,nAt,4),Vt(o,rAt,4),Vt(o,oAt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.groupTemplate=a.first),ze(a=Ue())&&(r.loaderTemplate=a.first),ze(a=Ue())&&(r.selectedItemTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.filterTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.emptyFilterTemplate=a.first),ze(a=Ue())&&(r.emptyTemplate=a.first),ze(a=Ue())&&(r.dropdownIconTemplate=a.first),ze(a=Ue())&&(r.loadingIconTemplate=a.first),ze(a=Ue())&&(r.clearIconTemplate=a.first),ze(a=Ue())&&(r.filterIconTemplate=a.first),ze(a=Ue())&&(r.onIconTemplate=a.first),ze(a=Ue())&&(r.offIconTemplate=a.first),ze(a=Ue())&&(r.cancelIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(ZHe,5),Xi(aAt,5),Xi(sAt,5),Xi(lAt,5),Xi(cAt,5),Xi(dAt,5),Xi(uAt,5),Xi(pAt,5)),n&2){let o;ze(o=Ue())&&(r.filterViewChild=o.first),ze(o=Ue())&&(r.focusInputViewChild=o.first),ze(o=Ue())&&(r.editableInputViewChild=o.first),ze(o=Ue())&&(r.itemsViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first),ze(o=Ue())&&(r.overlayViewChild=o.first),ze(o=Ue())&&(r.firstHiddenFocusableElementOnOverlay=o.first),ze(o=Ue())&&(r.lastHiddenFocusableElementOnOverlay=o.first)}},hostVars:3,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onContainerClick(a)}),n&2&&(lt("id",r.id),Pe(r.cn(r.cx("root"),r.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",En],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",En],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:[Ii([vDt,Jne]),Tt],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(n,r){if(n&1){let o=qe();ie(0,yAt,6,22,"span",16)(1,vAt,2,18,"input",17)(2,wAt,3,2,"ng-container",18),O(3,"div",19),ie(4,kAt,3,2,"ng-container",20)(5,LAt,2,2,"ng-template",null,0,di),M(),O(7,"p-overlay",21,1),jf("visibleChange",function(c){return se(o),Fg(r.overlayVisible,c)||(r.overlayVisible=c),le(c)}),te("onAnimationStart",function(c){return se(o),le(r.onOverlayAnimationStart(c))})("onHide",function(){return se(o),le(r.hide())}),ie(9,gDt,13,18,"ng-template",null,2,di),M()}if(n&2){let o=Oi(6);D("ngIf",!r.editable),E(),D("ngIf",r.editable),E(),D("ngIf",r.isVisibleClearIcon),E(),Pe(r.cx("dropdown")),lt("aria-expanded",r.overlayVisible??!1)("data-pc-section","trigger"),E(),D("ngIf",r.loading)("ngIfElse",o),E(3),D("hostAttrSelector",r.attrSelector),Gf("visible",r.overlayVisible),D("options",r.overlayOptions)("target","@parent")("appendTo",r.$appendTo())}},dependencies:[rr,Vl,Xr,Jr,Xs,bDt,sz,tg,Zh,Qf,Dm,z4,_p,tM,iM,ey,Un],encapsulation:2,changeDetection:0})}return t})(),ere=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Us,Un,Un]})}return t})();var iGe=(()=>{class t{relativeInterval=new ef({temporalUnit:"year",count:1},{temporalUnit:"year",count:1});relativeIntervalChange=new ve;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)"}];startCountFormCtrl=new ho;durationCountFormCtrl=new ho;constructor(){this.startCountFormCtrl.valueChanges.subscribe(e=>{this.relativeInterval.start=$e(pe({},this.relativeInterval.start),{count:e}),this._update()}),this.durationCountFormCtrl.valueChanges.subscribe(e=>{this.relativeInterval.duration=$e(pe({},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,n){this.relativeInterval[e]=$e(pe({},this.relativeInterval[e]),{temporalUnit:n})}_update(){this.relativeIntervalChange.emit(this.relativeInterval)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"mat-form-field")(5,"mat-label"),ee(6,"Start vor"),M(),be(7,"input",3),M()(),O(8,"div",1)(9,"p-iftalabel")(10,"p-select",4),te("onChange",function(a){return r.onTemporalUnitChange("start",a.value)}),M(),O(11,"label",5),ee(12,"Zeiteinheit"),M()()()()(),O(13,"div",1)(14,"div",2)(15,"div")(16,"mat-form-field")(17,"mat-label"),ee(18,"f\xFCr Dauer"),M(),be(19,"input",3),M()(),O(20,"div",1)(21,"p-iftalabel")(22,"p-select",6),te("onChange",function(a){return r.onTemporalUnitChange("duration",a.value)}),M(),O(23,"label",7),ee(24,"Zeiteinheit"),M()()()()(),O(25,"div",8)(26,"mat-icon"),ee(27,"arrow_forward"),M()(),O(28,"div",9)(29,"span",10),ee(30),Dr(31,"date"),M(),O(32,"span",10),ee(33," - "),M(),O(34,"span",10),ee(35),Dr(36,"date"),M()()()),n&2&&(E(7),D("formControl",r.startCountFormCtrl),E(3),D("options",r.durationOptions)("ngModel",r.relativeInterval.start.temporalUnit),E(9),D("formControl",r.durationCountFormCtrl),E(3),D("options",r.durationOptions)("ngModel",r.relativeInterval.duration.temporalUnit),E(8),Pt(gl(31,8,r.relativeInterval.startDate,"dd.MM.yyyy")),E(5),Pt(gl(36,11,r.relativeInterval.endDate,"dd.MM.yyyy")))},dependencies:[mc,Oa,rd,hc,zs,oa,nd,YT,yr,mbe,Mc,da,zr,Ho,Us,ra,ya,Hp],styles:[".label[_ngcontent-%COMP%]{line-height:46px} .mat-mdc-form-field-infix{width:50px}"]})}return t})();var CDt=()=>["displayName"],nGe=(()=>{class t{_datePipe;_pluralPipe;relativeInterval=new ef({temporalUnit:"year",count:1},{temporalUnit:"year",count:1});relativeIntervalOptions=[this._lastYear(),this._lastHalfYear(),this._lastQuarter(),this._lastMonth()];relativeIntervalChange=new ve;moreOptionsChange=new ve;options=[];initial;_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"}};constructor(e,n){this._datePipe=e,this._pluralPipe=n,this._updateOptions()}ngOnChanges(e){if(e.relativeIntervalOptions&&this._updateOptions(),e.relativeInterval){let n=`${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:n},this.options.some(r=>r.key===n)||this.options.push({interval:this.relativeInterval,displayName:this.displayText(this.relativeInterval),key:n})}}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,n){return!!e&&!!n&&e?.duration?.temporalUnit===n?.duration?.temporalUnit&&e?.duration?.count===n?.duration?.count&&e?.start?.temporalUnit===n?.start?.temporalUnit&&e?.start.count===n?.start?.count}onMoreOptionsChange(e){e.stopPropagation(),this.moreOptionsChange.emit()}_lastYear(){return new ef({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})}_lastHalfYear(){return new ef({temporalUnit:"month",count:6},{temporalUnit:"month",count:6})}_lastQuarter(){return new ef({temporalUnit:"quarter",count:1},{temporalUnit:"quarter",count:1})}_lastMonth(){return new ef({temporalUnit:"month",count:1},{temporalUnit:"month",count:1})}_displayTextForCustom(e){let n=this._pluralPipe.transform(e.duration.count,this._temporalUnitPluralMapping[e.duration.temporalUnit]),r=this._datePipe.transform(e.startDate,"shortDate"),o=this._datePipe.transform(e.endDate,"shortDate");return`${n} (${r} - ${o})`}static \u0275fac=function(n){return new(n||t)(xe(Hp),xe(_P))};static \u0275cmp=re({type:t,selectors:[["bd-interval-relative-input-inline"]],inputs:{relativeInterval:"relativeInterval",relativeIntervalOptions:"relativeIntervalOptions"},outputs:{relativeIntervalChange:"relativeIntervalChange",moreOptionsChange:"moreOptionsChange"},features:[Yt],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(n,r){n&1&&(O(0,"p-inputgroup")(1,"p-iftalabel")(2,"p-select",0),te("onChange",function(a){return r.onRelativeIntervalChange(a.value)}),M(),O(3,"label",1),ee(4,"Zeitraum"),M()(),O(5,"p-inputgroup-addon")(6,"i",2),te("click",function(a){return r.onMoreOptionsChange(a)}),M()()()),n&2&&(E(2),D("ngModel",r.initial)("options",r.options)("filter",!0)("filterFields",Vr(4,CDt)))},dependencies:[Pie,Us,ra,yr,ya,Nie,Ho],encapsulation:2})}return t})();var rGe=$e(pe({},i9),{formFieldAppearance:"fill"});var h9=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[{provide:i9,useValue:rGe},{provide:cw,useClass:Qie}]})}return t})();var tre=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[h9,h9]})}return t})();var xDt=["switch"],SDt=["*"];function wDt(t,i){t&1&&(O(0,"span",11),Pi(),O(1,"svg",13),be(2,"path",14),M(),O(3,"svg",15),be(4,"path",16),M()())}var IDt=new Mi("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),ire=class{source;checked;constructor(i,e){this.source=i,this.checked=e}},rCe=(()=>{class t{_elementRef=ae(qn);_focusMonitor=ae(wm);_changeDetectorRef=ae(dn);defaults=ae(IDt);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new ire(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=tl();_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(){ae(pc).load(gp);let e=ae(new $f("tabindex"),{optional:!0}),n=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=n.color||"accent",this.id=this._uniqueId=ae(Tl).getId("mat-mdc-slide-toggle-"),this.hideIcon=n.hideIcon??!1,this.disabledInteractive=n.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 ire(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(n,r){if(n&1&&Xi(xDt,5),n&2){let o;ze(o=Ue())&&(r._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(n,r){n&2&&(sa("id",r.id),lt("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Pe(r.color?"mat-"+r.color:""),zn("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._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:En(e)],checked:[2,"checked","checked",Je],hideIcon:[2,"hideIcon","hideIcon",Je],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Je]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[Ii([{provide:Wc,useExisting:No(()=>t),multi:!0},{provide:Lx,useExisting:t,multi:!0}]),Yt],ngContentSelectors:SDt,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(n,r){if(n&1){let o=qe();Kn(),O(0,"div",1)(1,"button",2,0),te("click",function(){return se(o),le(r._handleClick())}),be(3,"div",3)(4,"span",4),O(5,"span",5)(6,"span",6)(7,"span",7),be(8,"span",8),M(),O(9,"span",9),be(10,"span",10),M(),yt(11,wDt,5,0,"span",11),M()()(),O(12,"label",12),te("click",function(c){return se(o),le(c.stopPropagation())}),Sn(13),M()()}if(n&2){let o=Oi(2);D("labelPosition",r.labelPosition),E(),zn("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled)("mat-mdc-slide-toggle-disabled-interactive",r.disabledInteractive),D("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("disabled",r.disabled&&!r.disabledInteractive),lt("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),E(9),D("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),E(),vt(r.hideIcon?-1:11),E(),D("for",r.buttonId),lt("id",r._labelId)}},dependencies:[Wh,Y4],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})(),oGe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[rCe,_a,_a]})}return t})();var EDt=["*",[["mat-toolbar-row"]]],ADt=["*","mat-toolbar-row"],DDt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]})}return t})(),nM=(()=>{class t{_elementRef=ae(qn);_platform=ae(_s);_document=ae(Gr);color;_toolbarRows;constructor(){}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){this._toolbarRows.length}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-toolbar"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,DDt,5),n&2){let a;ze(a=Ue())&&(r._toolbarRows=a)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,r){n&2&&(Pe(r.color?"mat-"+r.color:""),zn("mat-toolbar-multiple-rows",r._toolbarRows.length>0)("mat-toolbar-single-row",r._toolbarRows.length===0))},inputs:{color:"color"},exportAs:["matToolbar"],ngContentSelectors:ADt,decls:2,vars:0,template:function(n,r){n&1&&(Kn(EDt),Sn(0),Sn(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 nre=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_a]})}return t})();var MDt=["*"],ODt=(t,i)=>({"bd-primary":t,"bd-primary-text":i}),zl=(()=>{class t extends Xo{_breakpointObserver;layout="bar";constructor(e){super(),this._breakpointObserver=e;let n=this._breakpointObserver.observe([j_.Small,j_.XSmall]).pipe(vm((r,o)=>r.matches===o.matches)).subscribe(r=>{this.layout=r.matches?"line":"bar"});this._subs.push(n)}ngOnDestroy(){this.unsubscribeAll()}static \u0275fac=function(n){return new(n||t)(xe(yv))};static \u0275cmp=re({type:t,selectors:[["bd-toolbar"]],features:[Tt],ngContentSelectors:MDt,decls:2,vars:4,consts:[[3,"ngClass"]],template:function(n,r){n&1&&(Kn(),O(0,"mat-toolbar",0),Sn(1),M()),n&2&&D("ngClass",na(1,ODt,r.layout==="bar",r.layout==="line"))},dependencies:[nM,qa],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 Qre={};G0(Qre,{addClientCapabilitiesToClaims:()=>zkt,blockAPICallsBeforeInitialize:()=>Kre,blockAcquireTokenInPopups:()=>KGe,blockNonBrowserEnvironment:()=>Yre,blockRedirectInIframe:()=>YGe,blockReloadInHiddenIframes:()=>qGe,clearHash:()=>x$,createGuid:()=>Nxe,getCurrentUri:()=>i0,getHomepage:()=>Pxe,invoke:()=>tp,invokeAsync:()=>bn,isInIframe:()=>S$,isInPopup:()=>$Ge,preconnect:()=>I$,preflightCheck:()=>w$,redirectPreflightCheck:()=>Wre,replaceHash:()=>Rxe});var Dn={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"},Kx={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},Xb={GET:"GET",POST:"POST"},Iv=[Dn.OPENID_SCOPE,Dn.PROFILE_SCOPE,Dn.OFFLINE_ACCESS_SCOPE],oCe=[...Iv,Dn.EMAIL_SCOPE],Qp={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"},rre={ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},Wx={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},lz={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Zp={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"};var f9={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},dw={QUERY:"query",FRAGMENT:"fragment"},aCe={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},g9={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"},cz={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},lE={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Xp={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"};var _9="appmetadata",aGe="client_info",YP="1",dz={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Q_={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},ch={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"},rl={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},cE={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},ore={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},are={username:"username",password:"password"},KP={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},sre={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},uw={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},lre={Jwt:"JWT",Jwk:"JWK",Pop:"pop"};var y9=300;var rM={};G0(rM,{postRequestFailed:()=>b9,unexpectedError:()=>v9});var v9="unexpected_error",b9="post_request_failed";var cre={[v9]:"Unexpected error in authentication.",[b9]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},sGe={unexpectedError:{code:v9,desc:cre[v9]},postRequestFailed:{code:b9,desc:cre[b9]}},ds=class t extends Error{constructor(i,e,n){let r=e?`${i}: ${e}`:i;super(r),Object.setPrototypeOf(this,t.prototype),this.errorCode=i||Dn.EMPTY_STRING,this.errorMessage=e||Dn.EMPTY_STRING,this.subError=n||Dn.EMPTY_STRING,this.name="AuthError"}setCorrelationId(i){this.correlationId=i}};function uz(t,i){return new ds(t,i?`${cre[t]} ${i}`:cre[t])}var dh={};G0(dh,{authTimeNotFound:()=>dE,authorizationCodeMissingFromServerResponse:()=>cN,bindingKeyNotRemoved:()=>M9,cannotAppendScopeSet:()=>aN,cannotRemoveEmptyScope:()=>oN,clientInfoDecodingError:()=>oM,clientInfoEmptyError:()=>WP,deviceCodeExpired:()=>w9,deviceCodePollingCancelled:()=>S9,deviceCodeUnknownError:()=>I9,emptyInputScopeSet:()=>lM,endSessionEndpointNotSupported:()=>dN,endpointResolutionError:()=>Z_,hashNotDeserialized:()=>JP,invalidAssertion:()=>A9,invalidCacheEnvironment:()=>pE,invalidCacheRecord:()=>sN,invalidClientCredential:()=>D9,invalidState:()=>Qx,keyIdMissing:()=>uN,maxAgeTranspired:()=>iN,methodNotImplemented:()=>Hs,missingTenantIdError:()=>P9,multipleMatchingAccounts:()=>x9,multipleMatchingAppMetadata:()=>nN,multipleMatchingTokens:()=>C9,nestedAppAuthBridgeDisabled:()=>N9,networkError:()=>ZP,noAccountFound:()=>T9,noAccountInSilentRequest:()=>uE,noCryptoObject:()=>cM,noNetworkConnectivity:()=>O9,nonceMismatch:()=>tN,nullOrEmptyToken:()=>QP,openIdConfigError:()=>XP,requestCannotBeMade:()=>rN,stateMismatch:()=>eN,stateNotFound:()=>sM,tokenClaimsCnfRequiredForSignedJwt:()=>lN,tokenParsingError:()=>aM,tokenRefreshRequired:()=>mE,unexpectedCredentialType:()=>E9,userCanceled:()=>R9,userTimeoutReached:()=>k9});var oM="client_info_decoding_error",WP="client_info_empty_error",aM="token_parsing_error",QP="null_or_empty_token",Z_="endpoints_resolution_error",ZP="network_error",XP="openid_config_error",JP="hash_not_deserialized",Qx="invalid_state",eN="state_mismatch",sM="state_not_found",tN="nonce_mismatch",dE="auth_time_not_found",iN="max_age_transpired",C9="multiple_matching_tokens",x9="multiple_matching_accounts",nN="multiple_matching_appMetadata",rN="request_cannot_be_made",oN="cannot_remove_empty_scope",aN="cannot_append_scopeset",lM="empty_input_scopeset",S9="device_code_polling_cancelled",w9="device_code_expired",I9="device_code_unknown_error",uE="no_account_in_silent_request",sN="invalid_cache_record",pE="invalid_cache_environment",T9="no_account_found",cM="no_crypto_object",E9="unexpected_credential_type",A9="invalid_assertion",D9="invalid_client_credential",mE="token_refresh_required",k9="user_timeout_reached",lN="token_claims_cnf_required_for_signedjwt",cN="authorization_code_missing_from_server_response",M9="binding_key_not_removed",dN="end_session_endpoint_not_supported",uN="key_id_missing",O9="no_network_connectivity",R9="user_canceled",P9="missing_tenant_id_error",Hs="method_not_implemented",N9="nested_app_auth_bridge_disabled";var Rs={[oM]:"The client info could not be parsed/decoded correctly",[WP]:"The client info was empty",[aM]:"Token cannot be parsed",[QP]:"The token is null or empty",[Z_]:"Endpoints cannot be resolved",[ZP]:"Network request failed",[XP]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[JP]:"The hash parameters could not be deserialized",[Qx]:"State was not the expected format",[eN]:"State mismatch error",[sM]:"State not found",[tN]:"Nonce mismatch error",[dE]:"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.",[iN]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[C9]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[x9]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[nN]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[rN]:"Token request cannot be made without authorization code or refresh token.",[oN]:"Cannot remove null or empty scope from ScopeSet",[aN]:"Cannot append ScopeSet",[lM]:"Empty input ScopeSet cannot be processed",[S9]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[w9]:"Device code is expired.",[I9]:"Device code stopped polling for unknown reasons.",[uE]:"Please pass an account object, silent flow is not supported without account information",[sN]:"Cache record object was null or undefined.",[pE]:"Invalid environment when attempting to create cache entry",[T9]:"No account found in cache for given key.",[cM]:"No crypto object detected.",[E9]:"Unexpected credential type.",[A9]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[D9]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[mE]:"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.",[k9]:"User defined timeout for device code polling reached",[lN]:"Cannot generate a POP jwt if the token_claims are not populated",[cN]:"Server response does not contain an authorization code to proceed",[M9]:"Could not remove the credential's binding key from storage.",[dN]:"The provided authority does not support logout",[uN]:"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.",[O9]:"No network connectivity. Check your internet connection.",[R9]:"User cancelled the flow.",[P9]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Hs]:"This method has not been implemented",[N9]:"The nested app auth bridge is disabled"},lGe={clientInfoDecodingError:{code:oM,desc:Rs[oM]},clientInfoEmptyError:{code:WP,desc:Rs[WP]},tokenParsingError:{code:aM,desc:Rs[aM]},nullOrEmptyToken:{code:QP,desc:Rs[QP]},endpointResolutionError:{code:Z_,desc:Rs[Z_]},networkError:{code:ZP,desc:Rs[ZP]},unableToGetOpenidConfigError:{code:XP,desc:Rs[XP]},hashNotDeserialized:{code:JP,desc:Rs[JP]},invalidStateError:{code:Qx,desc:Rs[Qx]},stateMismatchError:{code:eN,desc:Rs[eN]},stateNotFoundError:{code:sM,desc:Rs[sM]},nonceMismatchError:{code:tN,desc:Rs[tN]},authTimeNotFoundError:{code:dE,desc:Rs[dE]},maxAgeTranspired:{code:iN,desc:Rs[iN]},multipleMatchingTokens:{code:C9,desc:Rs[C9]},multipleMatchingAccounts:{code:x9,desc:Rs[x9]},multipleMatchingAppMetadata:{code:nN,desc:Rs[nN]},tokenRequestCannotBeMade:{code:rN,desc:Rs[rN]},removeEmptyScopeError:{code:oN,desc:Rs[oN]},appendScopeSetError:{code:aN,desc:Rs[aN]},emptyInputScopeSetError:{code:lM,desc:Rs[lM]},DeviceCodePollingCancelled:{code:S9,desc:Rs[S9]},DeviceCodeExpired:{code:w9,desc:Rs[w9]},DeviceCodeUnknownError:{code:I9,desc:Rs[I9]},NoAccountInSilentRequest:{code:uE,desc:Rs[uE]},invalidCacheRecord:{code:sN,desc:Rs[sN]},invalidCacheEnvironment:{code:pE,desc:Rs[pE]},noAccountFound:{code:T9,desc:Rs[T9]},noCryptoObj:{code:cM,desc:Rs[cM]},unexpectedCredentialType:{code:E9,desc:Rs[E9]},invalidAssertion:{code:A9,desc:Rs[A9]},invalidClientCredential:{code:D9,desc:Rs[D9]},tokenRefreshRequired:{code:mE,desc:Rs[mE]},userTimeoutReached:{code:k9,desc:Rs[k9]},tokenClaimsRequired:{code:lN,desc:Rs[lN]},noAuthorizationCodeFromServer:{code:cN,desc:Rs[cN]},bindingKeyNotRemovedError:{code:M9,desc:Rs[M9]},logoutNotSupported:{code:dN,desc:Rs[dN]},keyIdMissing:{code:uN,desc:Rs[uN]},noNetworkConnectivity:{code:O9,desc:Rs[O9]},userCanceledError:{code:R9,desc:Rs[R9]},missingTenantIdError:{code:P9,desc:Rs[P9]},nestedAppAuthBridgeDisabled:{code:N9,desc:Rs[N9]}},F9=class t extends ds{constructor(i,e){super(i,e?`${Rs[i]}: ${e}`:Rs[i]),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype)}};function jn(t,i){return new F9(t,i)}var dM={createNewGuid:()=>{throw jn(Hs)},base64Decode:()=>{throw jn(Hs)},base64Encode:()=>{throw jn(Hs)},base64UrlEncode:()=>{throw jn(Hs)},encodeKid:()=>{throw jn(Hs)},getPublicKeyThumbprint(){return _t(this,null,function*(){throw jn(Hs)})},removeTokenBindingKey(){return _t(this,null,function*(){throw jn(Hs)})},clearKeystore(){return _t(this,null,function*(){throw jn(Hs)})},signJwt(){return _t(this,null,function*(){throw jn(Hs)})},hashString(){return _t(this,null,function*(){throw jn(Hs)})}};var wd=(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})(wd||{}),X_=class t{constructor(i,e,n){this.level=wd.Info;let r=()=>{},o=i||t.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||r,this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level=typeof o.logLevel=="number"?o.logLevel:wd.Info,this.correlationId=o.correlationId||Dn.EMPTY_STRING,this.packageName=e||Dn.EMPTY_STRING,this.packageVersion=n||Dn.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:wd.Info}}clone(i,e,n){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},i,e)}logMessage(i,e){if(e.logLevel>this.level||!this.piiLoggingEnabled&&e.containsPii)return;let o=`${`[${new Date().toUTCString()}] : [${e.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${wd[e.logLevel]} - ${i}`;this.executeCallback(e.logLevel,o,e.containsPii||!1)}executeCallback(i,e,n){this.localCallback&&this.localCallback(i,e,n)}error(i,e){this.logMessage(i,{logLevel:wd.Error,containsPii:!1,correlationId:e||Dn.EMPTY_STRING})}errorPii(i,e){this.logMessage(i,{logLevel:wd.Error,containsPii:!0,correlationId:e||Dn.EMPTY_STRING})}warning(i,e){this.logMessage(i,{logLevel:wd.Warning,containsPii:!1,correlationId:e||Dn.EMPTY_STRING})}warningPii(i,e){this.logMessage(i,{logLevel:wd.Warning,containsPii:!0,correlationId:e||Dn.EMPTY_STRING})}info(i,e){this.logMessage(i,{logLevel:wd.Info,containsPii:!1,correlationId:e||Dn.EMPTY_STRING})}infoPii(i,e){this.logMessage(i,{logLevel:wd.Info,containsPii:!0,correlationId:e||Dn.EMPTY_STRING})}verbose(i,e){this.logMessage(i,{logLevel:wd.Verbose,containsPii:!1,correlationId:e||Dn.EMPTY_STRING})}verbosePii(i,e){this.logMessage(i,{logLevel:wd.Verbose,containsPii:!0,correlationId:e||Dn.EMPTY_STRING})}trace(i,e){this.logMessage(i,{logLevel:wd.Trace,containsPii:!1,correlationId:e||Dn.EMPTY_STRING})}tracePii(i,e){this.logMessage(i,{logLevel:wd.Trace,containsPii:!0,correlationId:e||Dn.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};var dre="@azure/msal-common",pz="15.12.0";var uM={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 J_={};G0(J_,{authorityMismatch:()=>j9,authorityUriInsecure:()=>mN,cannotAllowPlatformBroker:()=>G9,cannotSetOIDCOptions:()=>H9,claimsRequestParsingError:()=>L9,emptyInputScopesError:()=>fN,invalidAuthenticationHeader:()=>U9,invalidAuthorityMetadata:()=>vN,invalidAuthorizePostBodyParameters:()=>q9,invalidClaims:()=>pM,invalidCloudDiscoveryMetadata:()=>mM,invalidCodeChallengeMethod:()=>B9,invalidRequestMethodForEAR:()=>$9,logoutRequestEmpty:()=>_N,missingNonceAuthenticationHeader:()=>z9,missingSshJwk:()=>hE,missingSshKid:()=>V9,pkceParamsMissing:()=>yN,redirectUriEmpty:()=>pN,tokenRequestEmpty:()=>gN,untrustedAuthority:()=>bN,urlEmptyError:()=>hN,urlParseError:()=>pw});var pN="redirect_uri_empty",L9="claims_request_parsing_error",mN="authority_uri_insecure",pw="url_parse_error",hN="empty_url_error",fN="empty_input_scopes_error",pM="invalid_claims",gN="token_request_empty",_N="logout_request_empty",B9="invalid_code_challenge_method",yN="pkce_params_missing",mM="invalid_cloud_discovery_metadata",vN="invalid_authority_metadata",bN="untrusted_authority",hE="missing_ssh_jwk",V9="missing_ssh_kid",z9="missing_nonce_authentication_header",U9="invalid_authentication_header",H9="cannot_set_OIDCOptions",G9="cannot_allow_platform_broker",j9="authority_mismatch",$9="invalid_request_method_for_EAR",q9="invalid_authorize_post_body_parameters";var Ou={[pN]:"A redirect URI is required for all calls, and none has been set.",[L9]:"Could not parse the given claims request object.",[mN]:"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",[pw]:"URL could not be parsed into appropriate segments.",[hN]:"URL was empty or null.",[fN]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[pM]:"Given claims parameter must be a stringified JSON object.",[gN]:"Token request was empty and not found in cache.",[_N]:"The logout request was null or undefined.",[B9]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[yN]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[mM]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[vN]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[bN]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[hE]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[V9]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[z9]:"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.",[U9]:"Invalid authentication header provided",[H9]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[G9]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[j9]:"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.",[q9]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[$9]:"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."},cGe={redirectUriNotSet:{code:pN,desc:Ou[pN]},claimsRequestParsingError:{code:L9,desc:Ou[L9]},authorityUriInsecure:{code:mN,desc:Ou[mN]},urlParseError:{code:pw,desc:Ou[pw]},urlEmptyError:{code:hN,desc:Ou[hN]},emptyScopesError:{code:fN,desc:Ou[fN]},invalidClaimsRequest:{code:pM,desc:Ou[pM]},tokenRequestEmptyError:{code:gN,desc:Ou[gN]},logoutRequestEmptyError:{code:_N,desc:Ou[_N]},invalidCodeChallengeMethod:{code:B9,desc:Ou[B9]},invalidCodeChallengeParams:{code:yN,desc:Ou[yN]},invalidCloudDiscoveryMetadata:{code:mM,desc:Ou[mM]},invalidAuthorityMetadata:{code:vN,desc:Ou[vN]},untrustedAuthority:{code:bN,desc:Ou[bN]},missingSshJwk:{code:hE,desc:Ou[hE]},missingSshKid:{code:V9,desc:Ou[V9]},missingNonceAuthenticationHeader:{code:z9,desc:Ou[z9]},invalidAuthenticationHeader:{code:U9,desc:Ou[U9]},cannotSetOIDCOptions:{code:H9,desc:Ou[H9]},cannotAllowPlatformBroker:{code:G9,desc:Ou[G9]},authorityMismatch:{code:j9,desc:Ou[j9]},invalidAuthorizePostBodyParameters:{code:q9,desc:Ou[q9]},invalidRequestMethodForEAR:{code:$9,desc:Ou[$9]}},Y9=class t extends ds{constructor(i){super(i,Ou[i]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype)}};function Nl(t){return new Y9(t)}var Bd=class{static isEmptyObj(i){if(i)try{let e=JSON.parse(i);return Object.keys(e).length===0}catch{}return!0}static startsWith(i,e){return i.indexOf(e)===0}static endsWith(i,e){return i.length>=e.length&&i.lastIndexOf(e)===i.length-e.length}static queryStringToObject(i){let e={},n=i.split("&"),r=o=>decodeURIComponent(o.replace(/\+/g," "));return n.forEach(o=>{if(o.trim()){let[a,c]=o.split(/=(.+)/g,2);a&&c&&(e[r(a)]=r(c))}}),e}static trimArrayEntries(i){return i.map(e=>e.trim())}static removeEmptyStringsFromArray(i){return i.filter(e=>!!e)}static jsonParseHelper(i){try{return JSON.parse(i)}catch{return null}}static matchPattern(i,e){return new RegExp(i.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(e)}};var ep=class t{constructor(i){let e=i?Bd.trimArrayEntries([...i]):[],n=e?Bd.removeEmptyStringsFromArray(e):[];if(!n||!n.length)throw Nl(fN);this.scopes=new Set,n.forEach(r=>this.scopes.add(r))}static fromString(i){let n=(i||Dn.EMPTY_STRING).split(" ");return new t(n)}static createSearchScopes(i){let e=i&&i.length>0?i:[...Iv],n=new t(e);return n.containsOnlyOIDCScopes()?n.removeScope(Dn.OFFLINE_ACCESS_SCOPE):n.removeOIDCScopes(),n}containsScope(i){let e=this.printScopesLowerCase().split(" "),n=new t(e);return i?n.scopes.has(i.toLowerCase()):!1}containsScopeSet(i){return!i||i.scopes.size<=0?!1:this.scopes.size>=i.scopes.size&&i.asArray().every(e=>this.containsScope(e))}containsOnlyOIDCScopes(){let i=0;return oCe.forEach(e=>{this.containsScope(e)&&(i+=1)}),this.scopes.size===i}appendScope(i){i&&this.scopes.add(i.trim())}appendScopes(i){try{i.forEach(e=>this.appendScope(e))}catch{throw jn(aN)}}removeScope(i){if(!i)throw jn(oN);this.scopes.delete(i.trim())}removeOIDCScopes(){oCe.forEach(i=>{this.scopes.delete(i)})}unionScopeSets(i){if(!i)throw jn(lM);let e=new Set;return i.scopes.forEach(n=>e.add(n.toLowerCase())),this.scopes.forEach(n=>e.add(n.toLowerCase())),e}intersectingScopeSets(i){if(!i)throw jn(lM);i.containsOnlyOIDCScopes()||i.removeOIDCScopes();let e=this.unionScopeSets(i),n=i.getScopeCount(),r=this.getScopeCount();return e.sizei.push(e)),i}printScopes(){return this.scopes?this.asArray().join(" "):Dn.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}};function sCe(t,i){return!!t&&!!i&&t===i.split(".")[1]}function mz(t,i,e,n){if(n){let{oid:r,sub:o,tid:a,name:c,tfp:m,acr:g,preferred_username:C,upn:w,login_hint:P}=n,R=a||m||g||"";return{tenantId:R,localAccountId:r||o||"",name:c,username:C||w||"",loginHint:P,isHomeTenant:sCe(R,t)}}else return{tenantId:e,localAccountId:i,username:"",isHomeTenant:sCe(e,t)}}function CN(t,i,e,n){let r=t;if(i){let o=i,{isHomeTenant:c}=o,m=O_(o,["isHomeTenant"]);r=pe(pe({},t),m)}if(e){let a=mz(t.homeAccountId,t.localAccountId,t.tenantId,e),{isHomeTenant:c}=a,m=O_(a,["isHomeTenant"]);return r=$e(pe(pe({},r),m),{idTokenClaims:e,idToken:n}),r}return r}var hz={};G0(hz,{checkMaxAge:()=>K9,extractTokenClaims:()=>fE,getJWSPayload:()=>dGe});function fE(t,i){let e=dGe(t);try{let n=i(e);return JSON.parse(n)}catch{throw jn(aM)}}function dGe(t){if(!t)throw jn(QP);let e=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!e||e.length<4)throw jn(aM);return e[2]}function K9(t,i){if(i===0||Date.now()-3e5>t+i)throw jn(iN)}var hw={};G0(hw,{getDeserializedResponse:()=>lCe,mapToQueryString:()=>mw,normalizeUrlForComparison:()=>RDt,stripLeadingHashOrQuery:()=>pGe});function uGe(t){if(!t)return t;let i=t.toLowerCase();return Bd.endsWith(i,"?")?i=i.slice(0,-1):Bd.endsWith(i,"?/")&&(i=i.slice(0,-2)),Bd.endsWith(i,"/")||(i+="/"),i}function pGe(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}function lCe(t){if(!t||t.indexOf("=")<0)return null;try{let i=pGe(t),e=Object.fromEntries(new URLSearchParams(i));if(e.code||e.ear_jwe||e.error||e.error_description||e.state)return e}catch{throw jn(JP)}return null}function mw(t,i=!0,e){let n=new Array;return t.forEach((r,o)=>{!i&&e&&o in e?n.push(`${o}=${r}`):n.push(`${o}=${encodeURIComponent(r)}`)}),n.join("&")}function RDt(t){if(!t)return t;let i=t.split("#")[0];try{let e=new URL(i),n=e.origin+e.pathname+e.search;return uGe(n)}catch{return uGe(i)}}var Gs=class t{get urlString(){return this._urlString}constructor(i){if(this._urlString=i,!this._urlString)throw Nl(hN);i.includes("#")||(this._urlString=t.canonicalizeUri(i))}static canonicalizeUri(i){if(i){let e=i.toLowerCase();return Bd.endsWith(e,"?")?e=e.slice(0,-1):Bd.endsWith(e,"?/")&&(e=e.slice(0,-2)),Bd.endsWith(e,"/")||(e+="/"),e}return i}validateAsUri(){let i;try{i=this.getUrlComponents()}catch{throw Nl(pw)}if(!i.HostNameAndPort||!i.PathSegments)throw Nl(pw);if(!i.Protocol||i.Protocol.toLowerCase()!=="https:")throw Nl(mN)}static appendQueryString(i,e){return e?i.indexOf("?")<0?`${i}?${e}`:`${i}&${e}`:i}static removeHashFromUrl(i){return t.canonicalizeUri(i.split("#")[0])}replaceTenantPath(i){let e=this.getUrlComponents(),n=e.PathSegments;return i&&n.length!==0&&(n[0]===Wx.COMMON||n[0]===Wx.ORGANIZATIONS)&&(n[0]=i),t.constructAuthorityUriFromObject(e)}getUrlComponents(){let i=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),e=this.urlString.match(i);if(!e)throw Nl(pw);let n={Protocol:e[1],HostNameAndPort:e[4],AbsolutePath:e[5],QueryString:e[7]},r=n.AbsolutePath.split("/");return r=r.filter(o=>o&&o.length>0),n.PathSegments=r,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(i){let e=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=i.match(e);if(!n)throw Nl(pw);return n[2]}static getAbsoluteUrl(i,e){if(i[0]===Dn.FORWARD_SLASH){let r=new t(e).getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+i}return i}static constructAuthorityUriFromObject(i){return new t(i.Protocol+"//"+i.HostNameAndPort+"/"+i.PathSegments.join("/"))}static hashContainsKnownProperties(i){return!!lCe(i)}};var hGe={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"]}]}},cCe=hGe.endpointMetadata,dCe=hGe.instanceDiscoveryMetadata,uCe=new Set;dCe.metadata.forEach(t=>{t.aliases.forEach(i=>{uCe.add(i)})});function fGe(t,i){let e,n=t.canonicalAuthority;if(n){let r=new Gs(n).getUrlComponents().HostNameAndPort;e=mGe(r,t.cloudDiscoveryMetadata?.metadata,Q_.CONFIG,i)||mGe(r,dCe.metadata,Q_.HARDCODED_VALUES,i)||t.knownAuthorities}return e||[]}function mGe(t,i,e,n){if(n?.trace(`getAliasesFromMetadata called with source: ${e}`),t&&i){let r=W9(i,t);if(r)return n?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${e}, returning aliases`),r.aliases;n?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${e}`)}return null}function gGe(t){return W9(dCe.metadata,t)}function W9(t,i){for(let e=0;eQ9,cacheQuotaExceeded:()=>ure});var ure="cache_quota_exceeded",Q9="cache_error_unknown";var pCe={[ure]:"Exceeded cache storage capacity.",[Q9]:"Unexpected error occurred when using cache storage."},hM=class t extends ds{constructor(i,e){let n=e||(pCe[i]?pCe[i]:pCe[Q9]);super(`${i}: ${n}`),Object.setPrototypeOf(this,t.prototype),this.name="CacheError",this.errorCode=i,this.errorMessage=n}};function fz(t){return t instanceof Error?t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED"||t.message.includes("exceeded the quota")?new hM(ure):new hM(t.name,t.message):new hM(Q9)}var xN=class{constructor(i,e,n,r,o){this.clientId=i,this.cryptoImpl=e,this.commonLogger=n.clone(dre,pz),this.staticAuthorityOptions=o,this.performanceClient=r}getAllAccounts(i,e){return this.buildTenantProfiles(this.getAccountsFilteredBy(i,e),e,i)}getAccountInfoFilteredBy(i,e){if(Object.keys(i).length===0||Object.values(i).every(r=>!r))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;let n=this.getAllAccounts(i,e);return n.length>1?n.sort(o=>o.idTokenClaims?-1:1)[0]:n.length===1?n[0]:null}getBaseAccountInfo(i,e){let n=this.getAccountsFilteredBy(i,e);return n.length>0?n[0].getAccountInfo():null}buildTenantProfiles(i,e,n){return i.flatMap(r=>this.getTenantProfilesFromAccountEntity(r,e,n?.tenantId,n))}getTenantedAccountInfoByFilter(i,e,n,r,o){let a=null,c;if(o&&!this.tenantProfileMatchesFilter(n,o))return null;let m=this.getIdToken(i,r,e,n.tenantId);return m&&(c=fE(m.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(c,o))?null:(a=CN(i,n,c,m?.secret),a)}getTenantProfilesFromAccountEntity(i,e,n,r){let o=i.getAccountInfo(),a=o.tenantProfiles||new Map,c=this.getTokenKeys();if(n){let g=a.get(n);if(g)a=new Map([[n,g]]);else return[]}let m=[];return a.forEach(g=>{let C=this.getTenantedAccountInfoByFilter(o,c,g,e,r);C&&m.push(C)}),m}tenantProfileMatchesFilter(i,e){return!(e.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(i,e.localAccountId)||e.name&&i.name!==e.name||e.isHomeTenant!==void 0&&i.isHomeTenant!==e.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(i,e){return!(e&&(e.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(i,e.localAccountId)||e.loginHint&&!this.matchLoginHintFromTokenClaims(i,e.loginHint)||e.username&&!this.matchUsername(i.preferred_username,e.username)||e.name&&!this.matchName(i,e.name)||e.sid&&!this.matchSid(i,e.sid)))}saveCacheRecord(i,e,n){return _t(this,null,function*(){if(!i)throw jn(sN);try{i.account&&(yield this.setAccount(i.account,e)),i.idToken&&n?.idToken!==!1&&(yield this.setIdTokenCredential(i.idToken,e)),i.accessToken&&n?.accessToken!==!1&&(yield this.saveAccessToken(i.accessToken,e)),i.refreshToken&&n?.refreshToken!==!1&&(yield this.setRefreshTokenCredential(i.refreshToken,e)),i.appMetadata&&this.setAppMetadata(i.appMetadata,e)}catch(r){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),r instanceof ds?r:fz(r)}})}saveAccessToken(i,e){return _t(this,null,function*(){let n={clientId:i.clientId,credentialType:i.credentialType,environment:i.environment,homeAccountId:i.homeAccountId,realm:i.realm,tokenType:i.tokenType,requestedClaimsHash:i.requestedClaimsHash},r=this.getTokenKeys(),o=ep.fromString(i.target);r.accessToken.forEach(a=>{if(!this.accessTokenKeyMatchesFilter(a,n,!1))return;let c=this.getAccessTokenCredential(a,e);c&&this.credentialMatchesFilter(c,n)&&ep.fromString(c.target).intersectingScopeSets(o)&&this.removeAccessToken(a,e)}),yield this.setAccessTokenCredential(i,e)})}getAccountsFilteredBy(i,e){let n=this.getAccountKeys(),r=[];return n.forEach(o=>{let a=this.getAccount(o,e);if(!a||i.homeAccountId&&!this.matchHomeAccountId(a,i.homeAccountId)||i.username&&!this.matchUsername(a.username,i.username)||i.environment&&!this.matchEnvironment(a,i.environment)||i.realm&&!this.matchRealm(a,i.realm)||i.nativeAccountId&&!this.matchNativeAccountId(a,i.nativeAccountId)||i.authorityType&&!this.matchAuthorityType(a,i.authorityType))return;let c={localAccountId:i?.localAccountId,name:i?.name},m=a.tenantProfiles?.filter(g=>this.tenantProfileMatchesFilter(g,c));m&&m.length===0||r.push(a)}),r}credentialMatchesFilter(i,e){return!(e.clientId&&!this.matchClientId(i,e.clientId)||e.userAssertionHash&&!this.matchUserAssertionHash(i,e.userAssertionHash)||typeof e.homeAccountId=="string"&&!this.matchHomeAccountId(i,e.homeAccountId)||e.environment&&!this.matchEnvironment(i,e.environment)||e.realm&&!this.matchRealm(i,e.realm)||e.credentialType&&!this.matchCredentialType(i,e.credentialType)||e.familyId&&!this.matchFamilyId(i,e.familyId)||e.target&&!this.matchTarget(i,e.target)||(e.requestedClaimsHash||i.requestedClaimsHash)&&i.requestedClaimsHash!==e.requestedClaimsHash||i.credentialType===Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(e.tokenType&&!this.matchTokenType(i,e.tokenType)||e.tokenType===rl.SSH&&e.keyId&&!this.matchKeyId(i,e.keyId)))}getAppMetadataFilteredBy(i){let e=this.getKeys(),n={};return e.forEach(r=>{if(!this.isAppMetadata(r))return;let o=this.getAppMetadata(r);o&&(i.environment&&!this.matchEnvironment(o,i.environment)||i.clientId&&!this.matchClientId(o,i.clientId)||(n[r]=o))}),n}getAuthorityMetadataByAlias(i){let e=this.getAuthorityMetadataKeys(),n=null;return e.forEach(r=>{if(!this.isAuthorityMetadata(r)||r.indexOf(this.clientId)===-1)return;let o=this.getAuthorityMetadata(r);o&&o.aliases.indexOf(i)!==-1&&(n=o)}),n}removeAllAccounts(i){this.getAllAccounts({},i).forEach(n=>{this.removeAccount(n,i)})}removeAccount(i,e){this.removeAccountContext(i,e);let n=this.getAccountKeys(),r=o=>o.includes(i.homeAccountId)&&o.includes(i.environment);n.filter(r).forEach(o=>{this.removeItem(o,e),this.performanceClient.incrementFields({accountsRemoved:1},e)})}removeAccountContext(i,e){let n=this.getTokenKeys(),r=o=>o.includes(i.homeAccountId)&&o.includes(i.environment);n.idToken.filter(r).forEach(o=>{this.removeIdToken(o,e)}),n.accessToken.filter(r).forEach(o=>{this.removeAccessToken(o,e)}),n.refreshToken.filter(r).forEach(o=>{this.removeRefreshToken(o,e)})}removeAccessToken(i,e){let n=this.getAccessTokenCredential(i,e);if(this.removeItem(i,e),this.performanceClient.incrementFields({accessTokensRemoved:1},e),!n||n.credentialType.toLowerCase()!==Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||n.tokenType!==rl.POP)return;let r=n.keyId;r&&this.cryptoImpl.removeTokenBindingKey(r).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${r}`,e),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},e)})}removeAppMetadata(i){return this.getKeys().forEach(n=>{this.isAppMetadata(n)&&this.removeItem(n,i)}),!0}getIdToken(i,e,n,r,o){this.commonLogger.trace("CacheManager - getIdToken called");let a={homeAccountId:i.homeAccountId,environment:i.environment,credentialType:Xp.ID_TOKEN,clientId:this.clientId,realm:r},c=this.getIdTokensByFilter(a,e,n),m=c.size;if(m<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(m>1){let g=c;if(!r){let C=new Map;c.forEach((P,R)=>{P.realm===i.tenantId&&C.set(R,P)});let w=C.size;if(w<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),c.values().next().value;if(w===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),C.values().next().value;g=C}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((C,w)=>{this.removeIdToken(w,e)}),o&&e&&o.addFields({multiMatchedID:c.size},e),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),c.values().next().value}getIdTokensByFilter(i,e,n){let r=n&&n.idToken||this.getTokenKeys().idToken,o=new Map;return r.forEach(a=>{if(!this.idTokenKeyMatchesFilter(a,pe({clientId:this.clientId},i)))return;let c=this.getIdTokenCredential(a,e);c&&this.credentialMatchesFilter(c,i)&&o.set(a,c)}),o}idTokenKeyMatchesFilter(i,e){let n=i.toLowerCase();return!(e.clientId&&n.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&n.indexOf(e.homeAccountId.toLowerCase())===-1)}removeIdToken(i,e){this.removeItem(i,e)}removeRefreshToken(i,e){this.removeItem(i,e)}getAccessToken(i,e,n,r){let o=e.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",o);let a=ep.createSearchScopes(e.scopes),c=e.authenticationScheme||rl.BEARER,m=c&&c.toLowerCase()!==rl.BEARER.toLowerCase()?Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME:Xp.ACCESS_TOKEN,g={homeAccountId:i.homeAccountId,environment:i.environment,credentialType:m,clientId:this.clientId,realm:r||i.tenantId,target:a,tokenType:c,keyId:e.sshKid,requestedClaimsHash:e.requestedClaimsHash},C=n&&n.accessToken||this.getTokenKeys().accessToken,w=[];C.forEach(R=>{if(this.accessTokenKeyMatchesFilter(R,g,!0)){let z=this.getAccessTokenCredential(R,o);z&&this.credentialMatchesFilter(z,g)&&w.push(z)}});let P=w.length;return P<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",o),null):P>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",o),w.forEach(R=>{this.removeAccessToken(this.generateCredentialKey(R),o)}),this.performanceClient.addFields({multiMatchedAT:w.length},o),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",o),w[0])}accessTokenKeyMatchesFilter(i,e,n){let r=i.toLowerCase();if(e.clientId&&r.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&r.indexOf(e.homeAccountId.toLowerCase())===-1||e.realm&&r.indexOf(e.realm.toLowerCase())===-1||e.requestedClaimsHash&&r.indexOf(e.requestedClaimsHash.toLowerCase())===-1)return!1;if(e.target){let o=e.target.asArray();for(let a=0;a{if(!this.accessTokenKeyMatchesFilter(o,i,!0))return;let a=this.getAccessTokenCredential(o,e);a&&this.credentialMatchesFilter(a,i)&&r.push(a)}),r}getRefreshToken(i,e,n,r,o){this.commonLogger.trace("CacheManager - getRefreshToken called");let a=e?YP:void 0,c={homeAccountId:i.homeAccountId,environment:i.environment,credentialType:Xp.REFRESH_TOKEN,clientId:this.clientId,familyId:a},m=r&&r.refreshToken||this.getTokenKeys().refreshToken,g=[];m.forEach(w=>{if(this.refreshTokenKeyMatchesFilter(w,c)){let P=this.getRefreshTokenCredential(w,n);P&&this.credentialMatchesFilter(P,c)&&g.push(P)}});let C=g.length;return C<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(C>1&&o&&n&&o.addFields({multiMatchedRT:C},n),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),g[0])}refreshTokenKeyMatchesFilter(i,e){let n=i.toLowerCase();return!(e.familyId&&n.indexOf(e.familyId.toLowerCase())===-1||!e.familyId&&e.clientId&&n.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&n.indexOf(e.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(i){let e={environment:i,clientId:this.clientId},n=this.getAppMetadataFilteredBy(e),r=Object.keys(n).map(a=>n[a]),o=r.length;if(o<1)return null;if(o>1)throw jn(nN);return r[0]}isAppMetadataFOCI(i){let e=this.readAppMetadataFromCache(i);return!!(e&&e.familyId===YP)}matchHomeAccountId(i,e){return typeof i.homeAccountId=="string"&&e===i.homeAccountId}matchLocalAccountIdFromTokenClaims(i,e){let n=i.oid||i.sub;return e===n}matchLocalAccountIdFromTenantProfile(i,e){return i.localAccountId===e}matchName(i,e){return e.toLowerCase()===i.name?.toLowerCase()}matchUsername(i,e){return!!(i&&typeof i=="string"&&e?.toLowerCase()===i.toLowerCase())}matchUserAssertionHash(i,e){return!!(i.userAssertionHash&&e===i.userAssertionHash)}matchEnvironment(i,e){if(this.staticAuthorityOptions){let r=fGe(this.staticAuthorityOptions,this.commonLogger);if(r.includes(e)&&r.includes(i.environment))return!0}let n=this.getAuthorityMetadataByAlias(e);return!!(n&&n.aliases.indexOf(i.environment)>-1)}matchCredentialType(i,e){return i.credentialType&&e.toLowerCase()===i.credentialType.toLowerCase()}matchClientId(i,e){return!!(i.clientId&&e===i.clientId)}matchFamilyId(i,e){return!!(i.familyId&&e===i.familyId)}matchRealm(i,e){return i.realm?.toLowerCase()===e.toLowerCase()}matchNativeAccountId(i,e){return!!(i.nativeAccountId&&e===i.nativeAccountId)}matchLoginHintFromTokenClaims(i,e){return i.login_hint===e||i.preferred_username===e||i.upn===e}matchSid(i,e){return i.sid===e}matchAuthorityType(i,e){return!!(i.authorityType&&e.toLowerCase()===i.authorityType.toLowerCase())}matchTarget(i,e){return i.credentialType!==Xp.ACCESS_TOKEN&&i.credentialType!==Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME||!i.target?!1:ep.fromString(i.target).containsScopeSet(e)}matchTokenType(i,e){return!!(i.tokenType&&i.tokenType===e)}matchKeyId(i,e){return!!(i.keyId&&i.keyId===e)}isAppMetadata(i){return i.indexOf(_9)!==-1}isAuthorityMetadata(i){return i.indexOf(dz.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(i){return`${dz.CACHE_KEY}-${this.clientId}-${i}`}static toObject(i,e){for(let n in e)i[n]=e[n];return i}},X9=class extends xN{setAccount(){return _t(this,null,function*(){throw jn(Hs)})}getAccount(){throw jn(Hs)}setIdTokenCredential(){return _t(this,null,function*(){throw jn(Hs)})}getIdTokenCredential(){throw jn(Hs)}setAccessTokenCredential(){return _t(this,null,function*(){throw jn(Hs)})}getAccessTokenCredential(){throw jn(Hs)}setRefreshTokenCredential(){return _t(this,null,function*(){throw jn(Hs)})}getRefreshTokenCredential(){throw jn(Hs)}setAppMetadata(){throw jn(Hs)}getAppMetadata(){throw jn(Hs)}setServerTelemetry(){throw jn(Hs)}getServerTelemetry(){throw jn(Hs)}setAuthorityMetadata(){throw jn(Hs)}getAuthorityMetadata(){throw jn(Hs)}getAuthorityMetadataKeys(){throw jn(Hs)}setThrottlingCache(){throw jn(Hs)}getThrottlingCache(){throw jn(Hs)}removeItem(){throw jn(Hs)}getKeys(){throw jn(Hs)}getAccountKeys(){throw jn(Hs)}getTokenKeys(){throw jn(Hs)}generateCredentialKey(){throw jn(Hs)}generateAccountKey(){throw jn(Hs)}};var yu={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"},Tun=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"]]),mCe={NotStarted:0,InProgress:1,Completed:2};var pre=class{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}},gE=class{generateId(){return"callback-id"}startMeasurement(i,e){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:mCe.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:i,startTimeMs:Date.now(),correlationId:e||""},measurement:new pre}}startPerformanceMeasurement(){return new pre}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}};var mre={tokenRenewalOffsetSeconds:y9,preventCorsPreflight:!1},PDt={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:wd.Info,correlationId:Dn.EMPTY_STRING},NDt={claimsBasedCachingEnabled:!1},FDt={sendGetRequestAsync(){return _t(this,null,function*(){throw jn(Hs)})},sendPostRequestAsync(){return _t(this,null,function*(){throw jn(Hs)})}},LDt={sku:Dn.SKU,version:pz,cpu:Dn.EMPTY_STRING,os:Dn.EMPTY_STRING},BDt={clientSecret:Dn.EMPTY_STRING,clientAssertion:void 0},VDt={azureCloudInstance:uM.None,tenant:`${Dn.DEFAULT_COMMON_TENANT}`},zDt={application:{appName:"",appVersion:""}};function _Ge({authOptions:t,systemOptions:i,loggerOptions:e,cacheOptions:n,storageInterface:r,networkInterface:o,cryptoInterface:a,clientCredentials:c,libraryInfo:m,telemetry:g,serverTelemetryManager:C,persistencePlugin:w,serializableCache:P}){let R=pe(pe({},PDt),e);return{authOptions:UDt(t),systemOptions:pe(pe({},mre),i),loggerOptions:R,cacheOptions:pe(pe({},NDt),n),storageInterface:r||new X9(t.clientId,dM,new X_(R),new gE),networkInterface:o||FDt,cryptoInterface:a||dM,clientCredentials:c||BDt,libraryInfo:pe(pe({},LDt),m),telemetry:pe(pe({},zDt),g),serverTelemetryManager:C||null,persistencePlugin:w||null,serializableCache:P||null}}function UDt(t){return pe({clientCapabilities:[],azureCloudOptions:VDt,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1},t)}function hre(t){return t.authOptions.authority.options.protocolMode===yu.OIDC}var Hg={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};function gz(t,i){if(!t)throw jn(WP);try{let e=i(t);return JSON.parse(e)}catch{throw jn(oM)}}function fw(t){if(!t)throw jn(oM);let i=t.split(lE.CLIENT_INFO_SEPARATOR,2);return{uid:i[0],utid:i.length<2?Dn.EMPTY_STRING:i[1]}}var Om={};G0(Om,{addApplicationTelemetry:()=>t$,addAuthorizationCode:()=>rxe,addBrokerParameters:()=>bE,addCcsOid:()=>yE,addCcsUpn:()=>fM,addClaims:()=>EN,addClientAssertion:()=>r$,addClientAssertionType:()=>o$,addClientCapabilitiesToClaims:()=>yGe,addClientId:()=>IN,addClientInfo:()=>DN,addClientSecret:()=>n$,addCodeChallengeParams:()=>ikt,addCodeVerifier:()=>axe,addCorrelationId:()=>AN,addDeviceCode:()=>nkt,addDomainHint:()=>txe,addEARParameters:()=>lkt,addExtraQueryParameters:()=>vE,addGrantType:()=>a$,addIdTokenHint:()=>exe,addInstanceAware:()=>s$,addLibraryInfo:()=>e$,addLoginHint:()=>yz,addLogoutHint:()=>sxe,addNativeBroker:()=>tkt,addNonce:()=>nxe,addOboAssertion:()=>rkt,addPassword:()=>skt,addPopToken:()=>l$,addPostBodyParameters:()=>ckt,addPostLogoutRedirectUri:()=>JCe,addPrompt:()=>ixe,addRedirectUri:()=>TN,addRefreshToken:()=>oxe,addRequestTokenUse:()=>okt,addResponseMode:()=>XCe,addResponseType:()=>ekt,addScopes:()=>wN,addServerTelemetry:()=>d$,addSid:()=>bre,addSshJwk:()=>c$,addState:()=>i$,addThrottling:()=>u$,addUsername:()=>akt,instrumentBrokerParams:()=>SN});var _E={};G0(_E,{ACCESS_TOKEN:()=>jDt,BROKER_CLIENT_ID:()=>J9,BROKER_REDIRECT_URI:()=>vre,CCS_HEADER:()=>XDt,CLAIMS:()=>_Ce,CLIENT_ASSERTION:()=>UCe,CLIENT_ASSERTION_TYPE:()=>HCe,CLIENT_ID:()=>gw,CLIENT_INFO:()=>WDt,CLIENT_REQUEST_ID:()=>ECe,CLIENT_SECRET:()=>zCe,CODE:()=>SCe,CODE_CHALLENGE:()=>wCe,CODE_CHALLENGE_METHOD:()=>ICe,CODE_VERIFIER:()=>TCe,DEVICE_CODE:()=>VCe,DOMAIN_HINT:()=>WCe,EAR_JWE_CRYPTO:()=>ZCe,EAR_JWK:()=>QCe,ERROR:()=>HDt,ERROR_DESCRIPTION:()=>GDt,EXPIRES_IN:()=>qDt,FOCI:()=>ZDt,GRANT_TYPE:()=>gCe,ID_TOKEN:()=>$Dt,ID_TOKEN_HINT:()=>BCe,INSTANCE_AWARE:()=>_z,LOGIN_HINT:()=>KCe,LOGOUT_HINT:()=>qCe,NATIVE_BROKER:()=>$Ce,NONCE:()=>CCe,OBO_ASSERTION:()=>GCe,ON_BEHALF_OF:()=>QDt,POST_LOGOUT_URI:()=>LCe,PROMPT:()=>xCe,REDIRECT_URI:()=>fre,REFRESH_TOKEN:()=>vCe,REFRESH_TOKEN_EXPIRES_IN:()=>YDt,REQUESTED_TOKEN_USE:()=>jCe,REQ_CNF:()=>_re,RESPONSE_MODE:()=>fCe,RESPONSE_TYPE:()=>hCe,RETURN_SPA_CODE:()=>yre,SCOPE:()=>yCe,SESSION_STATE:()=>KDt,SID:()=>YCe,STATE:()=>bCe,TOKEN_TYPE:()=>gre,X_APP_NAME:()=>NCe,X_APP_VER:()=>FCe,X_CLIENT_CPU:()=>MCe,X_CLIENT_CURR_TELEM:()=>OCe,X_CLIENT_EXTRA_SKU:()=>JDt,X_CLIENT_LAST_TELEM:()=>RCe,X_CLIENT_OS:()=>kCe,X_CLIENT_SKU:()=>ACe,X_CLIENT_VER:()=>DCe,X_MS_LIB_CAPABILITY:()=>PCe});var gw="client_id",fre="redirect_uri",hCe="response_type",fCe="response_mode",gCe="grant_type",_Ce="claims",yCe="scope",HDt="error",GDt="error_description",jDt="access_token",$Dt="id_token",vCe="refresh_token",qDt="expires_in",YDt="refresh_token_expires_in",bCe="state",CCe="nonce",xCe="prompt",KDt="session_state",WDt="client_info",SCe="code",wCe="code_challenge",ICe="code_challenge_method",TCe="code_verifier",ECe="client-request-id",ACe="x-client-SKU",DCe="x-client-VER",kCe="x-client-OS",MCe="x-client-CPU",OCe="x-client-current-telemetry",RCe="x-client-last-telemetry",PCe="x-ms-lib-capability",NCe="x-app-name",FCe="x-app-ver",LCe="post_logout_redirect_uri",BCe="id_token_hint",VCe="device_code",zCe="client_secret",UCe="client_assertion",HCe="client_assertion_type",gre="token_type",_re="req_cnf",GCe="assertion",jCe="requested_token_use",QDt="on_behalf_of",ZDt="foci",XDt="X-AnchorMailbox",yre="return_spa_code",$Ce="nativebroker",qCe="logout_hint",YCe="sid",KCe="login_hint",WCe="domain_hint",JDt="x-client-xtra-sku",J9="brk_client_id",vre="brk_redirect_uri",_z="instance_aware",QCe="ear_jwk",ZCe="ear_jwe_crypto";function SN(t,i,e){if(!i)return;let n=t.get(gw);n&&t.has(J9)&&e?.addFields({embeddedClientId:n,embeddedRedirectUri:t.get(fre)},i)}function ekt(t,i){t.set(hCe,i)}function XCe(t,i){t.set(fCe,i||aCe.QUERY)}function tkt(t){t.set($Ce,"1")}function wN(t,i,e=!0,n=Iv){e&&!n.includes("openid")&&!i.includes("openid")&&n.push("openid");let r=e?[...i||[],...n]:i||[],o=new ep(r);t.set(yCe,o.printScopes())}function IN(t,i){t.set(gw,i)}function TN(t,i){t.set(fre,i)}function JCe(t,i){t.set(LCe,i)}function exe(t,i){t.set(BCe,i)}function txe(t,i){t.set(WCe,i)}function yz(t,i){t.set(KCe,i)}function fM(t,i){t.set(Qp.CCS_HEADER,`UPN:${i}`)}function yE(t,i){t.set(Qp.CCS_HEADER,`Oid:${i.uid}@${i.utid}`)}function bre(t,i){t.set("sid",i)}function EN(t,i,e){let n=yGe(i,e);try{JSON.parse(n)}catch{throw Nl(pM)}t.set(_Ce,n)}function AN(t,i){t.set(ECe,i)}function e$(t,i){t.set(ACe,i.sku),t.set(DCe,i.version),i.os&&t.set(kCe,i.os),i.cpu&&t.set(MCe,i.cpu)}function t$(t,i){i?.appName&&t.set(NCe,i.appName),i?.appVersion&&t.set(FCe,i.appVersion)}function ixe(t,i){t.set(xCe,i)}function i$(t,i){i&&t.set(bCe,i)}function nxe(t,i){t.set(CCe,i)}function ikt(t,i,e){if(i&&e)t.set(wCe,i),t.set(ICe,e);else throw Nl(yN)}function rxe(t,i){t.set(SCe,i)}function nkt(t,i){t.set(VCe,i)}function oxe(t,i){t.set(vCe,i)}function axe(t,i){t.set(TCe,i)}function n$(t,i){t.set(zCe,i)}function r$(t,i){i&&t.set(UCe,i)}function o$(t,i){i&&t.set(HCe,i)}function rkt(t,i){t.set(GCe,i)}function okt(t,i){t.set(jCe,i)}function a$(t,i){t.set(gCe,i)}function DN(t){t.set(aGe,"1")}function s$(t){t.has(_z)||t.set(_z,"true")}function vE(t,i){Object.entries(i).forEach(([e,n])=>{!t.has(e)&&n&&t.set(e,n)})}function yGe(t,i){let e;if(!t)e={};else try{e=JSON.parse(t)}catch{throw Nl(pM)}return i&&i.length>0&&(e.hasOwnProperty(lz.ACCESS_TOKEN)||(e[lz.ACCESS_TOKEN]={}),e[lz.ACCESS_TOKEN][lz.XMS_CC]={values:i}),JSON.stringify(e)}function akt(t,i){t.set(are.username,i)}function skt(t,i){t.set(are.password,i)}function l$(t,i){i&&(t.set(gre,rl.POP),t.set(_re,i))}function c$(t,i){i&&(t.set(gre,rl.SSH),t.set(_re,i))}function d$(t,i){t.set(OCe,i.generateCurrentRequestHeaderValue()),t.set(RCe,i.generateLastRequestHeaderValue())}function u$(t){t.set(PCe,cE.X_MS_LIB_CAPABILITY_VALUE)}function sxe(t,i){t.set(qCe,i)}function bE(t,i,e){t.has(J9)||t.set(J9,i),t.has(vre)||t.set(vre,e)}function lkt(t,i){t.set(QCe,encodeURIComponent(i)),t.set(ZCe,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}function ckt(t,i){Object.entries(i).forEach(([e,n])=>{n&&t.set(e,n)})}var Ire={};G0(Ire,{createDiscoveredInstance:()=>mxe});var e0={Default:0,Adfs:1,Dsts:2,Ciam:3};function vGe(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}function bGe(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}function CGe(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}var tp=(t,i,e,n,r)=>(...o)=>{e.trace(`Executing function ${i}`);let a=n?.startMeasurement(i,r);if(r){let c=i+"CallCount";n?.incrementFields({[c]:1},r)}try{let c=t(...o);return a?.end({success:!0}),e.trace(`Returning result from ${i}`),c}catch(c){e.trace(`Error occurred in ${i}`);try{e.trace(JSON.stringify(c))}catch{e.trace("Unable to print error message.")}throw a?.end({success:!1},c),c}},bn=(t,i,e,n,r)=>(...o)=>{e.trace(`Executing function ${i}`);let a=n?.startMeasurement(i,r);if(r){let c=i+"CallCount";n?.incrementFields({[c]:1},r)}return n?.setPreQueueTime(i,r),t(...o).then(c=>(e.trace(`Returning result from ${i}`),a?.end({success:!0}),c)).catch(c=>{e.trace(`Error occurred in ${i}`);try{e.trace(JSON.stringify(c))}catch{e.trace("Unable to print error message.")}throw a?.end({success:!1},c),c})};var xGe=(()=>{class t{constructor(e,n,r,o){this.networkInterface=e,this.logger=n,this.performanceClient=r,this.correlationId=o}detectRegion(e,n){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RegionDiscoveryDetectRegion,this.correlationId);let r=e;if(r)n.region_source=KP.ENVIRONMENT_VARIABLE;else{let o=t.IMDS_OPTIONS;try{let a=yield bn(this.getRegionFromIMDS.bind(this),Ct.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(Dn.IMDS_VERSION,o);if(a.status===Kx.SUCCESS&&(r=a.body,n.region_source=KP.IMDS),a.status===Kx.BAD_REQUEST){let c=yield bn(this.getCurrentVersion.bind(this),Ct.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(o);if(!c)return n.region_source=KP.FAILED_AUTO_DETECTION,null;let m=yield bn(this.getRegionFromIMDS.bind(this),Ct.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(c,o);m.status===Kx.SUCCESS&&(r=m.body,n.region_source=KP.IMDS)}}catch{return n.region_source=KP.FAILED_AUTO_DETECTION,null}}return r||(n.region_source=KP.FAILED_AUTO_DETECTION),r||null})}getRegionFromIMDS(e,n){return _t(this,null,function*(){return this.performanceClient?.addQueueMeasurement(Ct.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Dn.IMDS_ENDPOINT}?api-version=${e}&format=text`,n,Dn.IMDS_TIMEOUT)})}getCurrentVersion(e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let n=yield this.networkInterface.sendGetRequestAsync(`${Dn.IMDS_ENDPOINT}?format=json`,e);return n.status===Kx.BAD_REQUEST&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}})}}return t.IMDS_OPTIONS={headers:{Metadata:"true"}},t})();var vp={};G0(vp,{createAccessTokenEntity:()=>dxe,createIdTokenEntity:()=>cxe,createRefreshTokenEntity:()=>uxe,generateAppMetadataKey:()=>ykt,generateAuthorityMetadataExpiresAt:()=>xre,isAccessTokenEntity:()=>mkt,isAppMetadataEntity:()=>vkt,isAuthorityMetadataEntity:()=>bkt,isAuthorityMetadataExpired:()=>Sre,isCredentialEntity:()=>Cre,isIdTokenEntity:()=>hkt,isRefreshTokenEntity:()=>fkt,isServerTelemetryEntity:()=>gkt,isThrottlingEntity:()=>_kt,updateAuthorityEndpointMetadata:()=>bz,updateCloudDiscoveryMetadata:()=>m$});var uh={};G0(uh,{delay:()=>pkt,isCacheExpired:()=>ukt,isTokenExpired:()=>vz,nowSeconds:()=>Tv,toDateFromSeconds:()=>p$,toSecondsFromDate:()=>dkt,wasClockTurnedBack:()=>lxe});function Tv(){return Math.round(new Date().getTime()/1e3)}function dkt(t){return t.getTime()/1e3}function p$(t){return t?new Date(Number(t)*1e3):new Date}function vz(t,i){let e=Number(t)||0;return Tv()+i>e}function ukt(t,i){let e=Number(t)+i*24*60*60*1e3;return Date.now()>e}function lxe(t){return Number(t)>Tv()}function pkt(t,i){return new Promise(e=>setTimeout(()=>e(i),t))}function cxe(t,i,e,n,r){return{credentialType:Xp.ID_TOKEN,homeAccountId:t,environment:i,clientId:n,secret:e,realm:r,lastUpdatedAt:Date.now().toString()}}function dxe(t,i,e,n,r,o,a,c,m,g,C,w,P,R,z){let H={homeAccountId:t,credentialType:Xp.ACCESS_TOKEN,secret:e,cachedAt:Tv().toString(),expiresOn:a.toString(),extendedExpiresOn:c.toString(),environment:i,clientId:n,realm:r,target:o,tokenType:C||rl.BEARER,lastUpdatedAt:Date.now().toString()};if(w&&(H.userAssertionHash=w),g&&(H.refreshOn=g.toString()),R&&(H.requestedClaims=R,H.requestedClaimsHash=z),H.tokenType?.toLowerCase()!==rl.BEARER.toLowerCase())switch(H.credentialType=Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME,H.tokenType){case rl.POP:let j=fE(e,m);if(!j?.cnf?.kid)throw jn(lN);H.keyId=j.cnf.kid;break;case rl.SSH:H.keyId=P}return H}function uxe(t,i,e,n,r,o,a){let c={credentialType:Xp.REFRESH_TOKEN,homeAccountId:t,environment:i,clientId:n,secret:e,lastUpdatedAt:Date.now().toString()};return o&&(c.userAssertionHash=o),r&&(c.familyId=r),a&&(c.expiresOn=a.toString()),c}function Cre(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}function mkt(t){return t?Cre(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===Xp.ACCESS_TOKEN||t.credentialType===Xp.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function hkt(t){return t?Cre(t)&&t.hasOwnProperty("realm")&&t.credentialType===Xp.ID_TOKEN:!1}function fkt(t){return t?Cre(t)&&t.credentialType===Xp.REFRESH_TOKEN:!1}function gkt(t,i){let e=t.indexOf(ch.CACHE_KEY)===0,n=!0;return i&&(n=i.hasOwnProperty("failedRequests")&&i.hasOwnProperty("errors")&&i.hasOwnProperty("cacheHits")),e&&n}function _kt(t,i){let e=!1;t&&(e=t.indexOf(cE.THROTTLING_PREFIX)===0);let n=!0;return i&&(n=i.hasOwnProperty("throttleTime")),e&&n}function ykt({environment:t,clientId:i}){return[_9,t,i].join(lE.CACHE_KEY_SEPARATOR).toLowerCase()}function vkt(t,i){return i?t.indexOf(_9)===0&&i.hasOwnProperty("clientId")&&i.hasOwnProperty("environment"):!1}function bkt(t,i){return i?t.indexOf(dz.CACHE_KEY)===0&&i.hasOwnProperty("aliases")&&i.hasOwnProperty("preferred_cache")&&i.hasOwnProperty("preferred_network")&&i.hasOwnProperty("canonical_authority")&&i.hasOwnProperty("authorization_endpoint")&&i.hasOwnProperty("token_endpoint")&&i.hasOwnProperty("issuer")&&i.hasOwnProperty("aliasesFromNetwork")&&i.hasOwnProperty("endpointsFromNetwork")&&i.hasOwnProperty("expiresAt")&&i.hasOwnProperty("jwks_uri"):!1}function xre(){return Tv()+dz.REFRESH_TIME_SECONDS}function bz(t,i,e){t.authorization_endpoint=i.authorization_endpoint,t.token_endpoint=i.token_endpoint,t.end_session_endpoint=i.end_session_endpoint,t.issuer=i.issuer,t.endpointsFromNetwork=e,t.jwks_uri=i.jwks_uri}function m$(t,i,e){t.aliases=i.aliases,t.preferred_cache=i.preferred_cache,t.preferred_network=i.preferred_network,t.aliasesFromNetwork=e}function Sre(t){return t.expiresAt<=Tv()}var Jb=class t{constructor(i,e,n,r,o,a,c,m){this.canonicalAuthority=i,this._canonicalAuthority.validateAsUri(),this.networkInterface=e,this.cacheManager=n,this.authorityOptions=r,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=o,this.performanceClient=c,this.correlationId=a,this.managedIdentity=m||!1,this.regionDiscovery=new xGe(e,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(i){if(i.HostNameAndPort.endsWith(Dn.CIAM_AUTH_URL))return e0.Ciam;let e=i.PathSegments;if(e.length)switch(e[0].toLowerCase()){case Dn.ADFS:return e0.Adfs;case Dn.DSTS:return e0.Dsts}return e0.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(i){this._canonicalAuthority=new Gs(i),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 jn(Z_)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw jn(Z_)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw jn(Z_)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw jn(dN);return this.replacePath(this.metadata.end_session_endpoint)}else throw jn(Z_)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw jn(Z_)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw jn(Z_)}canReplaceTenant(i){return i.PathSegments.length===1&&!t.reservedTenantDomains.has(i.PathSegments[0])&&this.getAuthorityType(i)===e0.Default&&this.protocolMode!==yu.OIDC}replaceTenant(i){return i.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(i){let e=i,r=new Gs(this.metadata.canonical_authority).getUrlComponents(),o=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((c,m)=>{let g=o[m];if(m===0&&this.canReplaceTenant(r)){let C=new Gs(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==C&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${C}`),g=C)}c!==g&&(e=e.replace(`/${g}/`,`/${c}/`))}),this.replaceTenant(e)}get defaultOpenIdConfigurationEndpoint(){let i=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===e0.Adfs||this.protocolMode===yu.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(i)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}resolveEndpointsAsync(){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityResolveEndpointsAsync,this.correlationId);let i=this.getCurrentMetadataEntity(),e=yield bn(this.updateCloudDiscoveryMetadata.bind(this),Ct.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(i);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,i.preferred_network);let n=yield bn(this.updateEndpointMetadata.bind(this),Ct.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(i);this.updateCachedMetadata(i,e,{source:n}),this.performanceClient?.addFields({cloudDiscoverySource:e,authorityEndpointSource:n},this.correlationId)})}getCurrentMetadataEntity(){let i=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return i||(i={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:xre(),jwks_uri:""}),i}updateCachedMetadata(i,e,n){e!==Q_.CACHE&&n?.source!==Q_.CACHE&&(i.expiresAt=xre(),i.canonical_authority=this.canonicalAuthority);let r=this.cacheManager.generateAuthorityMetadataCacheKey(i.preferred_cache);this.cacheManager.setAuthorityMetadata(r,i),this.metadata=i}updateEndpointMetadata(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityUpdateEndpointMetadata,this.correlationId);let e=this.updateEndpointMetadataFromLocalSources(i);if(e){if(e.source===Q_.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&e.metadata){let r=yield bn(this.updateMetadataWithRegionalInformation.bind(this),Ct.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(e.metadata);bz(i,r,!1),i.canonical_authority=this.canonicalAuthority}return e.source}let n=yield bn(this.getEndpointMetadataFromNetwork.bind(this),Ct.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(n=yield bn(this.updateMetadataWithRegionalInformation.bind(this),Ct.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),bz(i,n,!0),Q_.NETWORK;throw jn(XP,this.defaultOpenIdConfigurationEndpoint)})}updateEndpointMetadataFromLocalSources(i){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"),bz(i,e,!1),{source:Q_.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 r=this.getEndpointMetadataFromHardcodedValues();if(r)return bz(i,r,!1),{source:Q_.HARDCODED_VALUES,metadata:r};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}let n=Sre(i);return this.isAuthoritySameType(i)&&i.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Q_.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(i){return new Gs(i.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Nl(vN)}return null}getEndpointMetadataFromNetwork(){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let i={},e=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${e}`);try{let n=yield this.networkInterface.sendGetRequestAsync(e,i);return vGe(n.body)?n.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(n){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${n}`),null}})}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in cCe?cCe[this.hostnameAndPort]:null}updateMetadataWithRegionalInformation(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let e=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(e){if(e!==Dn.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=sre.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=e,t.replaceWithRegionalInformation(i,e);let n=yield bn(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),Ct.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(n)return this.regionDiscoveryMetadata.region_outcome=sre.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=n,t.replaceWithRegionalInformation(i,n);this.regionDiscoveryMetadata.region_outcome=sre.AUTO_DETECTION_REQUESTED_FAILED}return i})}updateCloudDiscoveryMetadata(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let e=this.updateCloudDiscoveryMetadataFromLocalSources(i);if(e)return e;let n=yield bn(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Ct.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return m$(i,n,!0),Q_.NETWORK;throw Nl(bN)})}updateCloudDiscoveryMetadataFromLocalSources(i){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Dn.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${i.canonical_authority||Dn.NOT_APPLICABLE}`);let e=this.getCloudDiscoveryMetadataFromConfig();if(e)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),m$(i,e,!1),Q_.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 r=gGe(this.hostnameAndPort);if(r)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),m$(i,r,!1),Q_.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 n=Sre(i);return this.isAuthoritySameType(i)&&i.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Q_.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===e0.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 i=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),e=W9(i.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."),Nl(mM)}}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 _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let i=`${Dn.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,e={},n=null;try{let r=yield this.networkInterface.sendGetRequestAsync(i,e),o,a;if(bGe(r.body))o=r.body,a=o.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${o.tenant_discovery_endpoint}`);else if(CGe(r.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${r.status}`),o=r.body,o.error===Dn.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${o.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${o.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),a=[]}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."),n=W9(a,this.hostnameAndPort)}catch(r){if(r instanceof ds)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. Error: ${r.errorCode} Error Description: ${r.errorMessage}`);else{let o=r;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. Error: ${o.name} Error Description: ${o.message}`)}return null}return n||(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."),n=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n})}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&Gs.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(i,e){let n;if(e&&e.azureCloudInstance!==uM.None){let r=e.tenant?e.tenant:Dn.DEFAULT_COMMON_TENANT;n=`${e.azureCloudInstance}/${r}/`}return n||i}static createCloudDiscoveryMetadataFromHost(i){return{preferred_network:i,preferred_cache:i,aliases:[i]}}getPreferredCache(){if(this.managedIdentity)return Dn.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw jn(Z_)}isAlias(i){return this.metadata.aliases.indexOf(i)>-1}isAliasOfKnownMicrosoftAuthority(i){return uCe.has(i)}static isPublicCloudAuthority(i){return Dn.KNOWN_PUBLIC_CLOUDS.indexOf(i)>=0}static buildRegionalAuthorityString(i,e,n){let r=new Gs(i);r.validateAsUri();let o=r.getUrlComponents(),a=`${e}.${o.HostNameAndPort}`;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=`${e}.${Dn.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);let c=Gs.constructAuthorityUriFromObject($e(pe({},r.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?`${c}?${n}`:c}static replaceWithRegionalInformation(i,e){let n=pe({},i);return n.authorization_endpoint=t.buildRegionalAuthorityString(n.authorization_endpoint,e),n.token_endpoint=t.buildRegionalAuthorityString(n.token_endpoint,e),n.end_session_endpoint&&(n.end_session_endpoint=t.buildRegionalAuthorityString(n.end_session_endpoint,e)),n}static transformCIAMAuthority(i){let e=i,r=new Gs(i).getUrlComponents();if(r.PathSegments.length===0&&r.HostNameAndPort.endsWith(Dn.CIAM_AUTH_URL)){let o=r.HostNameAndPort.split(".")[0];e=`${e}${o}${Dn.AAD_TENANT_DOMAIN_SUFFIX}`}return e}};Jb.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Wx.COMMON,Wx.CONSUMERS,Wx.ORGANIZATIONS]);function SGe(t){let n=new Gs(t).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(n){case Wx.COMMON:case Wx.ORGANIZATIONS:case Wx.CONSUMERS:return;default:return n}}function wre(t){return t.endsWith(Dn.FORWARD_SLASH)?t:`${t}${Dn.FORWARD_SLASH}`}function pxe(t){let i=t.cloudDiscoveryMetadata,e;if(i)try{e=JSON.parse(i)}catch{throw Nl(mM)}return{canonicalAuthority:t.authority?wre(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:e}}function mxe(t,i,e,n,r,o,a){return _t(this,null,function*(){a?.addQueueMeasurement(Ct.AuthorityFactoryCreateDiscoveredInstance,o);let c=Jb.transformCIAMAuthority(wre(t)),m=new Jb(c,i,e,n,r,o,a);try{return yield bn(m.resolveEndpointsAsync.bind(m),Ct.AuthorityResolveEndpointsAsync,r,a,o)(),m}catch{throw jn(Z_)}})}var ty=class t extends ds{constructor(i,e,n,r,o){super(i,e,n),this.name="ServerError",this.errorNo=r,this.status=o,Object.setPrototypeOf(this,t.prototype)}};function CE(t,i,e){return{clientId:t,authority:i.authority,scopes:i.scopes,homeAccountIdentifier:e,claims:i.claims,authenticationScheme:i.authenticationScheme,resourceRequestMethod:i.resourceRequestMethod,resourceRequestUri:i.resourceRequestUri,shrClaims:i.shrClaims,sshKid:i.sshKid,embeddedClientId:i.embeddedClientId||i.tokenBodyParameters?.clientId}}var xE=class t{static generateThrottlingStorageKey(i){return`${cE.THROTTLING_PREFIX}.${JSON.stringify(i)}`}static preProcess(i,e,n){let r=t.generateThrottlingStorageKey(e),o=i.getThrottlingCache(r);if(o){if(o.throttleTime=500&&i.status<600}static checkResponseForRetryAfter(i){return i.headers?i.headers.hasOwnProperty(Qp.RETRY_AFTER)&&(i.status<200||i.status>=300):!1}static calculateThrottleTime(i){let e=i<=0?0:i,n=Date.now()/1e3;return Math.floor(Math.min(n+(e||cE.DEFAULT_THROTTLE_TIME_SECONDS),n+cE.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(i,e,n,r){let o=CE(e,n,r),a=this.generateThrottlingStorageKey(o);i.removeItem(a,n.correlationId)}};var Cz=class t extends ds{constructor(i,e,n){super(i.errorCode,i.errorMessage,i.subError),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.error=i,this.httpStatus=e,this.responseHeaders=n}};function kN(t,i,e,n){return t.errorMessage=`${t.errorMessage}, additionalErrorInfo: error.name:${n?.name}, error.message:${n?.message}`,new Cz(t,i,e)}var gM=class{constructor(i,e){this.config=_Ge(i),this.logger=new X_(this.config.loggerOptions,dre,pz),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(i){let e={};if(e[Qp.CONTENT_TYPE]=Dn.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case Hg.HOME_ACCOUNT_ID:try{let n=fw(i.credential);e[Qp.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case Hg.UPN:e[Qp.CCS_HEADER]=`UPN: ${i.credential}`;break}return e}executePostToTokenEndpoint(i,e,n,r,o,a){return _t(this,null,function*(){a&&this.performanceClient?.addQueueMeasurement(a,o);let c=yield this.sendPostRequest(r,i,{body:e,headers:n},o);return this.config.serverTelemetryManager&&c.status<500&&c.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),c})}sendPostRequest(i,e,n,r){return _t(this,null,function*(){xE.preProcess(this.cacheManager,i,r);let o;try{o=yield bn(this.networkClient.sendPostRequestAsync.bind(this.networkClient),Ct.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,r)(e,n);let a=o.headers||{};this.performanceClient?.addFields({refreshTokenSize:o.body.refresh_token?.length||0,httpVerToken:a[Qp.X_MS_HTTP_VERSION]||"",requestId:a[Qp.X_MS_REQUEST_ID]||""},r)}catch(a){if(a instanceof Cz){let c=a.responseHeaders;throw c&&this.performanceClient?.addFields({httpVerToken:c[Qp.X_MS_HTTP_VERSION]||"",requestId:c[Qp.X_MS_REQUEST_ID]||"",contentTypeHeader:c[Qp.CONTENT_TYPE]||void 0,contentLengthHeader:c[Qp.CONTENT_LENGTH]||void 0,httpStatus:a.httpStatus},r),a.error}throw a instanceof ds?a:jn(ZP)}return xE.postProcess(this.cacheManager,i,o,r),o})}updateAuthority(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.UpdateTokenEndpointAuthority,e);let n=`https://${i}/${this.authority.tenant}/`,r=yield mxe(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,e,this.performanceClient);this.authority=r})}createTokenQueryParameters(i){let e=new Map;return i.embeddedClientId&&bE(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),i.tokenQueryParameters&&vE(e,i.tokenQueryParameters),AN(e,i.correlationId),SN(e,i.correlationId,this.performanceClient),mw(e)}};function Tre(t){return t&&(t.tid||t.tfp||t.acr)||null}var ig=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(i=>[i.tenantId,i]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(i,e,n){let r=new t;e.authorityType===e0.Adfs?r.authorityType=cz.ADFS_ACCOUNT_TYPE:e.protocolMode===yu.OIDC?r.authorityType=cz.GENERIC_ACCOUNT_TYPE:r.authorityType=cz.MSSTS_ACCOUNT_TYPE;let o;i.clientInfo&&n&&(o=gz(i.clientInfo,n)),r.clientInfo=i.clientInfo,r.homeAccountId=i.homeAccountId,r.nativeAccountId=i.nativeAccountId;let a=i.environment||e&&e.getPreferredCache();if(!a)throw jn(pE);r.environment=a,r.realm=o?.utid||Tre(i.idTokenClaims)||"",r.localAccountId=o?.uid||i.idTokenClaims?.oid||i.idTokenClaims?.sub||"";let c=i.idTokenClaims?.preferred_username||i.idTokenClaims?.upn,m=i.idTokenClaims?.emails?i.idTokenClaims.emails[0]:null;if(r.username=c||m||"",r.loginHint=i.idTokenClaims?.login_hint,r.name=i.idTokenClaims?.name||"",r.cloudGraphHostName=i.cloudGraphHostName,r.msGraphHost=i.msGraphHost,i.tenantProfiles)r.tenantProfiles=i.tenantProfiles;else{let g=mz(i.homeAccountId,r.localAccountId,r.realm,i.idTokenClaims);r.tenantProfiles=[g]}return r}static createFromAccountInfo(i,e,n){let r=new t;return r.authorityType=i.authorityType||cz.GENERIC_ACCOUNT_TYPE,r.homeAccountId=i.homeAccountId,r.localAccountId=i.localAccountId,r.nativeAccountId=i.nativeAccountId,r.realm=i.tenantId,r.environment=i.environment,r.username=i.username,r.name=i.name,r.loginHint=i.loginHint,r.cloudGraphHostName=e,r.msGraphHost=n,r.tenantProfiles=Array.from(i.tenantProfiles?.values()||[]),r}static generateHomeAccountId(i,e,n,r,o){if(!(e===e0.Adfs||e===e0.Dsts)){if(i)try{let a=gz(i,r.base64Decode);if(a.uid&&a.utid)return`${a.uid}.${a.utid}`}catch{}n.warning("No client info in response")}return o?.sub||""}static isAccountEntity(i){return i?i.hasOwnProperty("homeAccountId")&&i.hasOwnProperty("environment")&&i.hasOwnProperty("realm")&&i.hasOwnProperty("localAccountId")&&i.hasOwnProperty("username")&&i.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(i,e,n){if(!i||!e)return!1;let r=!0;if(n){let o=i.idTokenClaims||{},a=e.idTokenClaims||{};r=o.iat===a.iat&&o.nonce===a.nonce}return i.homeAccountId===e.homeAccountId&&i.localAccountId===e.localAccountId&&i.username===e.username&&i.tenantId===e.tenantId&&i.loginHint===e.loginHint&&i.environment===e.environment&&i.nativeAccountId===e.nativeAccountId&&r}};var _w={};G0(_w,{badToken:()=>yM,consentRequired:()=>fxe,interactionRequired:()=>hxe,loginRequired:()=>gxe,nativeAccountUnavailable:()=>h$,noTokensFound:()=>_M,refreshTokenExpired:()=>f$,uxNotAllowed:()=>Ere});var _M="no_tokens_found",h$="native_account_unavailable",f$="refresh_token_expired",Ere="ux_not_allowed",hxe="interaction_required",fxe="consent_required",gxe="login_required",yM="bad_token";var wGe=[hxe,fxe,gxe,yM,Ere],Ckt=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Are={[_M]:"No refresh token found in the cache. Please sign-in.",[h$]:"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.",[f$]:"Refresh token has expired.",[yM]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[Ere]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."},IGe={noTokensFoundError:{code:_M,desc:Are[_M]},native_account_unavailable:{code:h$,desc:Are[h$]},bad_token:{code:yM,desc:Are[yM]}},tf=class t extends ds{constructor(i,e,n,r,o,a,c,m){super(i,e,n),Object.setPrototypeOf(this,t.prototype),this.timestamp=r||Dn.EMPTY_STRING,this.traceId=o||Dn.EMPTY_STRING,this.correlationId=a||Dn.EMPTY_STRING,this.claims=c||Dn.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=m}};function Dre(t,i,e){let n=!!t&&wGe.indexOf(t)>-1,r=!!e&&Ckt.indexOf(e)>-1,o=!!i&&wGe.some(a=>i.indexOf(a)>-1);return n||o||r}function MN(t){return new tf(t,Are[t])}var Zx=class t{static setRequestState(i,e,n){let r=t.generateLibraryState(i,n);return e?`${r}${Dn.RESOURCE_DELIM}${e}`:r}static generateLibraryState(i,e){if(!i)throw jn(cM);let n={id:i.createNewGuid()};e&&(n.meta=e);let r=JSON.stringify(n);return i.base64Encode(r)}static parseRequestState(i,e){if(!i)throw jn(cM);if(!e)throw jn(Qx);try{let n=e.split(Dn.RESOURCE_DELIM),r=n[0],o=n.length>1?n.slice(1).join(Dn.RESOURCE_DELIM):Dn.EMPTY_STRING,a=i.base64Decode(r),c=JSON.parse(a);return{userRequestState:o||Dn.EMPTY_STRING,libraryState:c}}catch{throw jn(Qx)}}};var xkt={SW:"sw"},iy=class{constructor(i,e){this.cryptoUtils=i,this.performanceClient=e}generateCnf(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.PopTokenGenerateCnf,i.correlationId);let n=yield bn(this.generateKid.bind(this),Ct.PopTokenGenerateCnf,e,this.performanceClient,i.correlationId)(i),r=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:r}})}generateKid(i){return _t(this,null,function*(){return this.performanceClient?.addQueueMeasurement(Ct.PopTokenGenerateKid,i.correlationId),{kid:yield this.cryptoUtils.getPublicKeyThumbprint(i),xms_ksl:xkt.SW}})}signPopToken(i,e,n){return _t(this,null,function*(){return this.signPayload(i,e,n)})}signPayload(i,e,n,r){return _t(this,null,function*(){let{resourceRequestMethod:o,resourceRequestUri:a,shrClaims:c,shrNonce:m,shrOptions:g}=n,w=(a?new Gs(a):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt(pe({at:i,ts:Tv(),m:o?.toUpperCase(),u:w?.HostNameAndPort,nonce:m||this.cryptoUtils.createNewGuid(),p:w?.AbsolutePath,q:w?.QueryString?[[],w.QueryString]:void 0,client_claims:c||void 0},r),e,g,n.correlationId)})}};var kre=class{constructor(i,e){this.cache=i,this.hasChanged=e}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};var Xx=class t{constructor(i,e,n,r,o,a,c){this.clientId=i,this.cacheStorage=e,this.cryptoObj=n,this.logger=r,this.serializableCache=o,this.persistencePlugin=a,this.performanceClient=c}validateTokenResponse(i,e){if(i.error||i.error_description||i.suberror){let n=`Error(s): ${i.error_codes||Dn.NOT_AVAILABLE} - Timestamp: ${i.timestamp||Dn.NOT_AVAILABLE} - Description: ${i.error_description||Dn.NOT_AVAILABLE} - Correlation ID: ${i.correlation_id||Dn.NOT_AVAILABLE} - Trace ID: ${i.trace_id||Dn.NOT_AVAILABLE}`,r=i.error_codes?.length?i.error_codes[0]:void 0,o=new ty(i.error,n,i.suberror,r,i.status);if(e&&i.status&&i.status>=Kx.SERVER_ERROR_RANGE_START&&i.status<=Kx.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. ${o}`);return}else if(e&&i.status&&i.status>=Kx.CLIENT_ERROR_RANGE_START&&i.status<=Kx.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. ${o}`);return}throw Dre(i.error,i.error_description,i.suberror)?new tf(i.error,i.error_description,i.suberror,i.timestamp||Dn.EMPTY_STRING,i.trace_id||Dn.EMPTY_STRING,i.correlation_id||Dn.EMPTY_STRING,i.claims||Dn.EMPTY_STRING,r):o}}handleServerTokenResponse(i,e,n,r,o,a,c,m,g){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.HandleServerTokenResponse,i.correlation_id);let C;if(i.id_token){if(C=fE(i.id_token||Dn.EMPTY_STRING,this.cryptoObj.base64Decode),o&&o.nonce&&C.nonce!==o.nonce)throw jn(tN);if(r.maxAge||r.maxAge===0){let z=C.auth_time;if(!z)throw jn(dE);K9(z,r.maxAge)}}this.homeAccountIdentifier=ig.generateHomeAccountId(i.client_info||Dn.EMPTY_STRING,e.authorityType,this.logger,this.cryptoObj,C);let w;o&&o.state&&(w=Zx.parseRequestState(this.cryptoObj,o.state)),i.key_id=i.key_id||r.sshKid||void 0;let P=this.generateCacheRecord(i,e,n,r,C,a,o),R;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),R=new kre(this.serializableCache,!0),yield this.persistencePlugin.beforeCacheAccess(R)),c&&!m&&P.account){let z=this.cacheStorage.generateAccountKey(P.account.getAccountInfo());if(!this.cacheStorage.getAccount(z,r.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,P,!1,r,C,w,void 0,g)}yield this.cacheStorage.saveCacheRecord(P,r.correlationId,r.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&R&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),yield this.persistencePlugin.afterCacheAccess(R))}return t.generateAuthenticationResult(this.cryptoObj,e,P,!1,r,C,w,i,g)})}generateCacheRecord(i,e,n,r,o,a,c){let m=e.getPreferredCache();if(!m)throw jn(pE);let g=Tre(o),C,w;i.id_token&&o&&(C=cxe(this.homeAccountIdentifier,m,i.id_token,this.clientId,g||""),w=xz(this.cacheStorage,e,this.homeAccountIdentifier,this.cryptoObj.base64Decode,r.correlationId,o,i.client_info,m,g,c,void 0,this.logger));let P=null;if(i.access_token){let H=i.scope?ep.fromString(i.scope):new ep(r.scopes||[]),j=(typeof i.expires_in=="string"?parseInt(i.expires_in,10):i.expires_in)||0,K=(typeof i.ext_expires_in=="string"?parseInt(i.ext_expires_in,10):i.ext_expires_in)||0,ne=(typeof i.refresh_in=="string"?parseInt(i.refresh_in,10):i.refresh_in)||void 0,me=n+j,Te=me+K,Ie=ne&&ne>0?n+ne:void 0;P=dxe(this.homeAccountIdentifier,m,i.access_token,this.clientId,g||e.tenant||"",H.printScopes(),me,Te,this.cryptoObj.base64Decode,Ie,i.token_type,a,i.key_id,r.claims,r.requestedClaimsHash)}let R=null;if(i.refresh_token){let H;if(i.refresh_token_expires_in){let j=typeof i.refresh_token_expires_in=="string"?parseInt(i.refresh_token_expires_in,10):i.refresh_token_expires_in;H=n+j}R=uxe(this.homeAccountIdentifier,m,i.refresh_token,this.clientId,i.foci,a,H)}let z=null;return i.foci&&(z={clientId:this.clientId,environment:m,familyId:i.foci}),{account:w,idToken:C,accessToken:P,refreshToken:R,appMetadata:z}}static generateAuthenticationResult(i,e,n,r,o,a,c,m,g){return _t(this,null,function*(){let C=Dn.EMPTY_STRING,w=[],P=null,R,z,H=Dn.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===rl.POP&&!o.popKid){let me=new iy(i),{secret:Te,keyId:Ie}=n.accessToken;if(!Ie)throw jn(uN);C=yield me.signPopToken(Te,Ie,o)}else C=n.accessToken.secret;w=ep.fromString(n.accessToken.target).asArray(),P=p$(n.accessToken.expiresOn),R=p$(n.accessToken.extendedExpiresOn),n.accessToken.refreshOn&&(z=p$(n.accessToken.refreshOn))}n.appMetadata&&(H=n.appMetadata.familyId===YP?YP:"");let j=a?.oid||a?.sub||"",K=a?.tid||"";m?.spa_accountid&&n.account&&(n.account.nativeAccountId=m?.spa_accountid);let ne=n.account?CN(n.account.getAccountInfo(),void 0,a,n.idToken?.secret):null;return{authority:e.canonicalAuthority,uniqueId:j,tenantId:K,scopes:w,account:ne,idToken:n?.idToken?.secret||"",idTokenClaims:a||{},accessToken:C,fromCache:r,expiresOn:P,extExpiresOn:R,refreshOn:z,correlationId:o.correlationId,requestId:g||Dn.EMPTY_STRING,familyId:H,tokenType:n.accessToken?.tokenType||Dn.EMPTY_STRING,state:c?c.userRequestState:Dn.EMPTY_STRING,cloudGraphHostName:n.account?.cloudGraphHostName||Dn.EMPTY_STRING,msGraphHost:n.account?.msGraphHost||Dn.EMPTY_STRING,code:m?.spa_code,fromNativeBroker:!1}})}};function xz(t,i,e,n,r,o,a,c,m,g,C,w){w?.verbose("setCachedAccount called");let R=t.getAccountKeys().find(ne=>ne.startsWith(e)),z=null;R&&(z=t.getAccount(R,r));let H=z||ig.createAccount({homeAccountId:e,idTokenClaims:o,clientInfo:a,environment:c,cloudGraphHostName:g?.cloud_graph_host_name,msGraphHost:g?.msgraph_host,nativeAccountId:C},i,n),j=H.tenantProfiles||[],K=m||H.realm;if(K&&!j.find(ne=>ne.tenantId===K)){let ne=mz(e,H.localAccountId,K,o);j.push(ne)}return H.tenantProfiles=j,H}function Mre(t,i,e){return _t(this,null,function*(){return typeof t=="string"?t:t({clientId:i,tokenEndpoint:e})})}var ON=class extends gM{constructor(i,e){super(i,e),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}acquireToken(i,e){return _t(this,null,function*(){if(this.performanceClient?.addQueueMeasurement(Ct.AuthClientAcquireToken,i.correlationId),!i.code)throw jn(rN);let n=Tv(),r=yield bn(this.executeTokenRequest.bind(this),Ct.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,i.correlationId)(this.authority,i),o=r.headers?.[Qp.X_MS_REQUEST_ID],a=new Xx(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return a.validateTokenResponse(r.body),bn(a.handleServerTokenResponse.bind(a),Ct.HandleServerTokenResponse,this.logger,this.performanceClient,i.correlationId)(r.body,this.authority,n,i,e,void 0,void 0,void 0,o)})}getLogoutUri(i){if(!i)throw Nl(_N);let e=this.createLogoutUrlQueryString(i);return Gs.appendQueryString(this.authority.endSessionEndpoint,e)}executeTokenRequest(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthClientExecuteTokenRequest,e.correlationId);let n=this.createTokenQueryParameters(e),r=Gs.appendQueryString(i.tokenEndpoint,n),o=yield bn(this.createTokenRequestBody.bind(this),Ct.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),a;if(e.clientInfo)try{let g=gz(e.clientInfo,this.cryptoUtils.base64Decode);a={credential:`${g.uid}${lE.CLIENT_INFO_SEPARATOR}${g.utid}`,type:Hg.HOME_ACCOUNT_ID}}catch(g){this.logger.verbose("Could not parse client info for CCS Header: "+g)}let c=this.createTokenRequestHeaders(a||e.ccsCredential),m=CE(this.config.authOptions.clientId,e);return bn(this.executePostToTokenEndpoint.bind(this),Ct.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(r,o,c,m,e.correlationId,Ct.AuthorizationCodeClientExecutePostToTokenEndpoint)})}createTokenRequestBody(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.AuthClientCreateTokenRequestBody,i.correlationId);let e=new Map;if(IN(e,i.embeddedClientId||i.tokenBodyParameters?.[gw]||this.config.authOptions.clientId),this.includeRedirectUri)TN(e,i.redirectUri);else if(!i.redirectUri)throw Nl(pN);if(wN(e,i.scopes,!0,this.oidcDefaultScopes),rxe(e,i.code),e$(e,this.config.libraryInfo),t$(e,this.config.telemetry.application),u$(e),this.serverTelemetryManager&&!hre(this.config)&&d$(e,this.serverTelemetryManager),i.codeVerifier&&axe(e,i.codeVerifier),this.config.clientCredentials.clientSecret&&n$(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let r=this.config.clientCredentials.clientAssertion;r$(e,yield Mre(r.assertion,this.config.authOptions.clientId,i.resourceRequestUri)),o$(e,r.assertionType)}if(a$(e,g9.AUTHORIZATION_CODE_GRANT),DN(e),i.authenticationScheme===rl.POP){let r=new iy(this.cryptoUtils,this.performanceClient),o;i.popKid?o=this.cryptoUtils.encodeKid(i.popKid):o=(yield bn(r.generateCnf.bind(r),Ct.PopTokenGenerateCnf,this.logger,this.performanceClient,i.correlationId)(i,this.logger)).reqCnfString,l$(e,o)}else if(i.authenticationScheme===rl.SSH)if(i.sshJwk)c$(e,i.sshJwk);else throw Nl(hE);(!Bd.isEmptyObj(i.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&EN(e,i.claims,this.config.authOptions.clientCapabilities);let n;if(i.clientInfo)try{let r=gz(i.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${r.uid}${lE.CLIENT_INFO_SEPARATOR}${r.utid}`,type:Hg.HOME_ACCOUNT_ID}}catch(r){this.logger.verbose("Could not parse client info for CCS Header: "+r)}else n=i.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case Hg.HOME_ACCOUNT_ID:try{let r=fw(n.credential);yE(e,r)}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case Hg.UPN:fM(e,n.credential);break}return i.embeddedClientId&&bE(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),i.tokenBodyParameters&&vE(e,i.tokenBodyParameters),i.enableSpaAuthorizationCode&&(!i.tokenBodyParameters||!i.tokenBodyParameters[yre])&&vE(e,{[yre]:"1"}),SN(e,i.correlationId,this.performanceClient),mw(e)})}createLogoutUrlQueryString(i){let e=new Map;return i.postLogoutRedirectUri&&JCe(e,i.postLogoutRedirectUri),i.correlationId&&AN(e,i.correlationId),i.idTokenHint&&exe(e,i.idTokenHint),i.state&&i$(e,i.state),i.logoutHint&&sxe(e,i.logoutHint),i.extraQueryParameters&&vE(e,i.extraQueryParameters),this.config.authOptions.instanceAware&&s$(e),mw(e,this.config.authOptions.encodeExtraQueryParams,i.extraQueryParameters)}};var Skt=300,g$=class extends gM{constructor(i,e){super(i,e)}acquireToken(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RefreshTokenClientAcquireToken,i.correlationId);let e=Tv(),n=yield bn(this.executeTokenRequest.bind(this),Ct.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,i.correlationId)(i,this.authority),r=n.headers?.[Qp.X_MS_REQUEST_ID],o=new Xx(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return o.validateTokenResponse(n.body),bn(o.handleServerTokenResponse.bind(o),Ct.HandleServerTokenResponse,this.logger,this.performanceClient,i.correlationId)(n.body,this.authority,e,i,void 0,void 0,!0,i.forceCache,r)})}acquireTokenByRefreshToken(i){return _t(this,null,function*(){if(!i)throw Nl(gN);if(this.performanceClient?.addQueueMeasurement(Ct.RefreshTokenClientAcquireTokenByRefreshToken,i.correlationId),!i.account)throw jn(uE);if(this.cacheManager.isAppMetadataFOCI(i.account.environment))try{return yield bn(this.acquireTokenWithCachedRefreshToken.bind(this),Ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,i.correlationId)(i,!0)}catch(n){let r=n instanceof tf&&n.errorCode===_M,o=n instanceof ty&&n.errorCode===ore.INVALID_GRANT_ERROR&&n.subError===ore.CLIENT_MISMATCH_ERROR;if(r||o)return bn(this.acquireTokenWithCachedRefreshToken.bind(this),Ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,i.correlationId)(i,!1);throw n}return bn(this.acquireTokenWithCachedRefreshToken.bind(this),Ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,i.correlationId)(i,!1)})}acquireTokenWithCachedRefreshToken(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RefreshTokenClientAcquireTokenWithCachedRefreshToken,i.correlationId);let n=tp(this.cacheManager.getRefreshToken.bind(this.cacheManager),Ct.CacheManagerGetRefreshToken,this.logger,this.performanceClient,i.correlationId)(i.account,e,i.correlationId,void 0,this.performanceClient);if(!n)throw MN(_M);if(n.expiresOn&&vz(n.expiresOn,i.refreshTokenExpirationOffsetSeconds||Skt))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(n.expiresOn)},i.correlationId),MN(f$);let r=$e(pe({},i),{refreshToken:n.secret,authenticationScheme:i.authenticationScheme||rl.BEARER,ccsCredential:{credential:i.account.homeAccountId,type:Hg.HOME_ACCOUNT_ID}});try{return yield bn(this.acquireToken.bind(this),Ct.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,i.correlationId)(r)}catch(o){if(o instanceof tf&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(n.expiresOn)},i.correlationId),o.subError===yM)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let a=this.cacheManager.generateCredentialKey(n);this.cacheManager.removeRefreshToken(a,i.correlationId)}throw o}})}executeTokenRequest(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RefreshTokenClientExecuteTokenRequest,i.correlationId);let n=this.createTokenQueryParameters(i),r=Gs.appendQueryString(e.tokenEndpoint,n),o=yield bn(this.createTokenRequestBody.bind(this),Ct.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,i.correlationId)(i),a=this.createTokenRequestHeaders(i.ccsCredential),c=CE(this.config.authOptions.clientId,i);return bn(this.executePostToTokenEndpoint.bind(this),Ct.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,i.correlationId)(r,o,a,c,i.correlationId,Ct.RefreshTokenClientExecutePostToTokenEndpoint)})}createTokenRequestBody(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.RefreshTokenClientCreateTokenRequestBody,i.correlationId);let e=new Map;if(IN(e,i.embeddedClientId||i.tokenBodyParameters?.[gw]||this.config.authOptions.clientId),i.redirectUri&&TN(e,i.redirectUri),wN(e,i.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),a$(e,g9.REFRESH_TOKEN_GRANT),DN(e),e$(e,this.config.libraryInfo),t$(e,this.config.telemetry.application),u$(e),this.serverTelemetryManager&&!hre(this.config)&&d$(e,this.serverTelemetryManager),oxe(e,i.refreshToken),this.config.clientCredentials.clientSecret&&n$(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let n=this.config.clientCredentials.clientAssertion;r$(e,yield Mre(n.assertion,this.config.authOptions.clientId,i.resourceRequestUri)),o$(e,n.assertionType)}if(i.authenticationScheme===rl.POP){let n=new iy(this.cryptoUtils,this.performanceClient),r;i.popKid?r=this.cryptoUtils.encodeKid(i.popKid):r=(yield bn(n.generateCnf.bind(n),Ct.PopTokenGenerateCnf,this.logger,this.performanceClient,i.correlationId)(i,this.logger)).reqCnfString,l$(e,r)}else if(i.authenticationScheme===rl.SSH)if(i.sshJwk)c$(e,i.sshJwk);else throw Nl(hE);if((!Bd.isEmptyObj(i.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&EN(e,i.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&i.ccsCredential)switch(i.ccsCredential.type){case Hg.HOME_ACCOUNT_ID:try{let n=fw(i.ccsCredential.credential);yE(e,n)}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case Hg.UPN:fM(e,i.ccsCredential.credential);break}return i.embeddedClientId&&bE(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),i.tokenBodyParameters&&vE(e,i.tokenBodyParameters),SN(e,i.correlationId,this.performanceClient),mw(e)})}};var _$=class extends gM{constructor(i,e){super(i,e)}acquireCachedToken(i){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.SilentFlowClientAcquireCachedToken,i.correlationId);let e=uw.NOT_APPLICABLE;if(i.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bd.isEmptyObj(i.claims))throw this.setCacheOutcome(uw.FORCE_REFRESH_OR_CLAIMS,i.correlationId),jn(mE);if(!i.account)throw jn(uE);let n=i.account.tenantId||SGe(i.authority),r=this.cacheManager.getTokenKeys(),o=this.cacheManager.getAccessToken(i.account,i,r,n);if(o){if(lxe(o.cachedAt)||vz(o.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(uw.CACHED_ACCESS_TOKEN_EXPIRED,i.correlationId),jn(mE);o.refreshOn&&vz(o.refreshOn,0)&&(e=uw.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(uw.NO_CACHED_ACCESS_TOKEN,i.correlationId),jn(mE);let a=i.authority||this.authority.getPreferredCache(),c={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(i.account),i.correlationId),accessToken:o,idToken:this.cacheManager.getIdToken(i.account,i.correlationId,r,n,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(e,i.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[yield bn(this.generateResultFromCacheRecord.bind(this),Ct.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,i.correlationId)(c,i),e]})}setCacheOutcome(i,e){this.serverTelemetryManager?.setCacheOutcome(i),this.performanceClient?.addFields({cacheOutcome:i},e),i!==uw.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${i}`)}generateResultFromCacheRecord(i,e){return _t(this,null,function*(){this.performanceClient?.addQueueMeasurement(Ct.SilentFlowClientGenerateResultFromCacheRecord,e.correlationId);let n;if(i.idToken&&(n=fE(i.idToken.secret,this.config.cryptoInterface.base64Decode)),e.maxAge||e.maxAge===0){let r=n?.auth_time;if(!r)throw jn(dE);K9(r,e.maxAge)}return Xx.generateAuthenticationResult(this.cryptoUtils,this.authority,i,!0,e,n)})}};var _xe={sendGetRequestAsync:()=>Promise.reject(jn(Hs)),sendPostRequestAsync:()=>Promise.reject(jn(Hs))};var yw={};G0(yw,{getAuthorizationCodePayload:()=>Tkt,getAuthorizeUrl:()=>Ikt,getStandardAuthorizeRequestParameters:()=>wkt,validateAuthorizationResponse:()=>TGe});function wkt(t,i,e,n){let r=i.correlationId,o=new Map;IN(o,i.embeddedClientId||i.extraQueryParameters?.[gw]||t.clientId);let a=[...i.scopes||[],...i.extraScopesToConsent||[]];if(wN(o,a,!0,t.authority.options.OIDCOptions?.defaultScopes),TN(o,i.redirectUri),AN(o,r),XCe(o,i.responseMode),DN(o),i.prompt&&(ixe(o,i.prompt),n?.addFields({prompt:i.prompt},r)),i.domainHint&&(txe(o,i.domainHint),n?.addFields({domainHintFromRequest:!0},r)),i.prompt!==Zp.SELECT_ACCOUNT)if(i.sid&&i.prompt===Zp.NONE)e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),bre(o,i.sid),n?.addFields({sidFromRequest:!0},r);else if(i.account){let c=Akt(i.account),m=Dkt(i.account);if(m&&i.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"),yz(o,m),n?.addFields({loginHintFromClaim:!0},r);try{let g=fw(i.account.homeAccountId);yE(o,g)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(c&&i.prompt===Zp.NONE){e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),bre(o,c),n?.addFields({sidFromClaim:!0},r);try{let g=fw(i.account.homeAccountId);yE(o,g)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(i.loginHint)e.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),yz(o,i.loginHint),fM(o,i.loginHint),n?.addFields({loginHintFromRequest:!0},r);else if(i.account.username){e.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),yz(o,i.account.username),n?.addFields({loginHintFromUpn:!0},r);try{let g=fw(i.account.homeAccountId);yE(o,g)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else i.loginHint&&(e.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),yz(o,i.loginHint),fM(o,i.loginHint),n?.addFields({loginHintFromRequest:!0},r));else e.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return i.nonce&&nxe(o,i.nonce),i.state&&i$(o,i.state),(i.claims||t.clientCapabilities&&t.clientCapabilities.length>0)&&EN(o,i.claims,t.clientCapabilities),i.embeddedClientId&&bE(o,t.clientId,t.redirectUri),t.instanceAware&&(!i.extraQueryParameters||!Object.keys(i.extraQueryParameters).includes(_z))&&s$(o),o}function Ikt(t,i,e,n){let r=mw(i,e,n);return Gs.appendQueryString(t.authorizationEndpoint,r)}function Tkt(t,i){if(TGe(t,i),!t.code)throw jn(cN);return t}function TGe(t,i){if(!t.state||!i)throw t.state?jn(sM,"Cached State"):jn(sM,"Server State");let e,n;try{e=decodeURIComponent(t.state)}catch{throw jn(Qx,t.state)}try{n=decodeURIComponent(i)}catch{throw jn(Qx,t.state)}if(e!==n)throw jn(eN);if(t.error||t.error_description||t.suberror){let r=Ekt(t);throw Dre(t.error,t.error_description,t.suberror)?new tf(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||"",r):new ty(t.error||"",t.error_description,t.suberror,r)}}function Ekt(t){let i="code=",e=t.error_uri?.lastIndexOf(i);return e&&e>=0?t.error_uri?.substring(e+i.length):void 0}function Akt(t){return t.idTokenClaims?.sid||null}function Dkt(t){return t.loginHint||t.idTokenClaims?.login_hint||null}var EGe=",",AGe="|";function kkt(t){let{skus:i,libraryName:e,libraryVersion:n,extensionName:r,extensionVersion:o}=t,a=new Map([[0,[e,n]],[2,[r,o]]]),c=[];if(i?.length){if(c=i.split(EGe),c.length<4)return i}else c=Array.from({length:4},()=>AGe);return a.forEach((m,g)=>{m.length===2&&m[0]?.length&&m[1]?.length&&Mkt({skuArr:c,index:g,skuName:m[0],skuVersion:m[1]})}),c.join(EGe)}function Mkt(t){let{skuArr:i,index:e,skuName:n,skuVersion:r}=t;e>=i.length||(i[e]=[n,r].join(AGe))}var RN=class t{constructor(i,e){this.cacheOutcome=uw.NOT_APPLICABLE,this.cacheManager=e,this.apiId=i.apiId,this.correlationId=i.correlationId,this.wrapperSKU=i.wrapperSKU||Dn.EMPTY_STRING,this.wrapperVer=i.wrapperVer||Dn.EMPTY_STRING,this.telemetryCacheKey=ch.CACHE_KEY+lE.CACHE_KEY_SEPARATOR+i.clientId}generateCurrentRequestHeaderValue(){let i=`${this.apiId}${ch.VALUE_SEPARATOR}${this.cacheOutcome}`,e=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n?.length&&e.push(`broker_error=${n}`);let r=e.join(ch.VALUE_SEPARATOR),o=this.getRegionDiscoveryFields(),a=[i,o].join(ch.VALUE_SEPARATOR);return[ch.SCHEMA_VERSION,a,r].join(ch.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let i=this.getLastRequests(),e=t.maxErrorsToSend(i),n=i.failedRequests.slice(0,2*e).join(ch.VALUE_SEPARATOR),r=i.errors.slice(0,e).join(ch.VALUE_SEPARATOR),o=i.errors.length,a=e=ch.MAX_CACHED_ERRORS&&(e.failedRequests.shift(),e.failedRequests.shift(),e.errors.shift()),e.failedRequests.push(this.apiId,this.correlationId),i instanceof Error&&i&&i.toString()?i instanceof ds?i.subError?e.errors.push(i.subError):i.errorCode?e.errors.push(i.errorCode):e.errors.push(i.toString()):e.errors.push(i.toString()):e.errors.push(ch.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}incrementCacheHits(){let i=this.getLastRequests();return i.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i,this.correlationId),i.cacheHits}getLastRequests(){let i={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||i}clearTelemetryCache(){let i=this.getLastRequests(),e=t.maxErrorsToSend(i),n=i.errors.length;if(e===n)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let r={failedRequests:i.failedRequests.slice(e*2),errors:i.errors.slice(e),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r,this.correlationId)}}static maxErrorsToSend(i){let e,n=0,r=0,o=i.errors.length;for(e=0;eString.fromCodePoint(e)).join("");return btoa(i)}function Gg(t){return new TextDecoder().decode(ww(t))}function ww(t){let i=t.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw Er(Yz)}let e=atob(i);return Uint8Array.from(e,n=>n.codePointAt(0)||0)}var Rkt="RSASSA-PKCS1-v1_5",Zz="AES-GCM",NGe="HKDF",Ixe="SHA-256",Pkt=2048,Nkt=new Uint8Array([1,0,1]),RGe="0123456789abcdef",PGe=new Uint32Array(1),Txe="raw",FGe="encrypt",Exe="decrypt",Fkt="deriveKey",Lkt="crypto_subtle_undefined",Axe={name:Rkt,hash:Ixe,modulusLength:Pkt,publicExponent:Nkt};function LGe(t){if(!window)throw Er(Cw);if(!window.crypto)throw Er(NN);if(!t&&!window.crypto.subtle)throw Er(NN,Lkt)}function Dxe(t,i,e){return _t(this,null,function*(){i?.addQueueMeasurement(Ct.Sha256Digest,e);let r=new TextEncoder().encode(t);return window.crypto.subtle.digest(Ixe,r)})}function BGe(t){return window.crypto.getRandomValues(t)}function wxe(){return window.crypto.getRandomValues(PGe),PGe[0]}function ph(){let t=Date.now(),i=wxe()*1024+(wxe()&1023),e=new Uint8Array(16),n=Math.trunc(i/2**30),r=i&2**30-1,o=wxe();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|n>>>8,e[7]=n,e[8]=128|r>>>24,e[9]=r>>>16,e[10]=r>>>8,e[11]=r,e[12]=o>>>24,e[13]=o>>>16,e[14]=o>>>8,e[15]=o;let a="";for(let c=0;c>>4),a+=RGe.charAt(e[c]&15),(c===3||c===5||c===7||c===9)&&(a+="-");return a}function VGe(t,i){return _t(this,null,function*(){return window.crypto.subtle.generateKey(Axe,t,i)})}function Gre(t){return _t(this,null,function*(){return window.crypto.subtle.exportKey(xxe,t)})}function zGe(t,i,e){return _t(this,null,function*(){return window.crypto.subtle.importKey(xxe,t,Axe,i,e)})}function UGe(t,i){return _t(this,null,function*(){return window.crypto.subtle.sign(Axe,t,i)})}function Xz(){return _t(this,null,function*(){let t=yield kxe(),e={alg:"dir",kty:"oct",k:eC(new Uint8Array(t))};return SM(JSON.stringify(e))})}function Bkt(t){return _t(this,null,function*(){let i=Gg(t),n=JSON.parse(i).k,r=ww(n);return window.crypto.subtle.importKey(Txe,r,Zz,!1,[Exe])})}function HGe(t,i){return _t(this,null,function*(){let e=i.split(".");if(e.length!==5)throw Er(Wz,"jwe_length");let n=yield Bkt(t).catch(()=>{throw Er(Wz,"import_key")});try{let r=new TextEncoder().encode(e[0]),o=ww(e[2]),a=ww(e[3]),c=ww(e[4]),m=c.byteLength*8,g=new Uint8Array(a.length+c.length);g.set(a),g.set(c,a.length);let C=yield window.crypto.subtle.decrypt({name:Zz,iv:o,tagLength:m,additionalData:r},n,g);return new TextDecoder().decode(C)}catch{throw Er(Wz,"decrypt")}})}function kxe(){return _t(this,null,function*(){let t=yield window.crypto.subtle.generateKey({name:Zz,length:256},!0,[FGe,Exe]);return window.crypto.subtle.exportKey(Txe,t)})}function Mxe(t){return _t(this,null,function*(){return window.crypto.subtle.importKey(Txe,t,NGe,!1,[Fkt])})}function GGe(t,i,e){return _t(this,null,function*(){return window.crypto.subtle.deriveKey({name:NGe,salt:i,hash:Ixe,info:new TextEncoder().encode(e)},t,{name:Zz,length:256},!1,[FGe,Exe])})}function jGe(t,i,e){return _t(this,null,function*(){let n=new TextEncoder().encode(i),r=window.crypto.getRandomValues(new Uint8Array(16)),o=yield GGe(t,r,e),a=yield window.crypto.subtle.encrypt({name:Zz,iv:new Uint8Array(12)},o,n);return{data:eC(new Uint8Array(a)),nonce:eC(r)}})}function Oxe(t,i,e,n){return _t(this,null,function*(){let r=ww(n),o=yield GGe(t,ww(i),e),a=yield window.crypto.subtle.decrypt({name:Zz,iv:new Uint8Array(12)},o,r);return new TextDecoder().decode(a)})}function jre(t){return _t(this,null,function*(){let i=yield Dxe(t),e=new Uint8Array(i);return eC(e)})}var wM="storage_not_supported",$re="stubbed_public_client_application_called",Jz="in_mem_redirect_unavailable";var qre={[wM]:"Given storage configuration option was not supported.",[$re]:"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",[Jz]:"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."},Vkt={storageNotSupportedError:{code:wM,desc:qre[wM]},stubPcaInstanceCalled:{code:$re,desc:qre[$re]},inMemRedirectUnavailable:{code:Jz,desc:qre[Jz]}},VN=class t extends ds{constructor(i,e){super(i,e),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,t.prototype)}};function e5(t){return new VN(t,qre[t])}function x$(t){t.location.hash="",typeof t.history.replaceState=="function"&&t.history.replaceState(null,"",`${t.location.origin}${t.location.pathname}${t.location.search}`)}function Rxe(t){let i=t.split("#");i.shift(),window.location.hash=i.length>0?i.join("#"):""}function S$(){return window.parent!==window}function $Ge(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${ip.POPUP_NAME_PREFIX}.`)===0}function i0(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Pxe(){let i=new Gs(window.location.href).getUrlComponents();return`${i.Protocol}//${i.HostNameAndPort}/`}function qGe(){if(Gs.hashContainsKnownProperties(window.location.hash)&&S$())throw Er(Oz)}function YGe(t){if(S$()&&!t)throw Er(Mz)}function KGe(){if($Ge())throw Er(Rz)}function Yre(){if(typeof window>"u")throw Er(Cw)}function Kre(t){if(!t)throw Er(Sw)}function w$(t){Yre(),qGe(),KGe(),Kre(t)}function Wre(t,i){if(w$(t),YGe(i.system.allowRedirectInIframe),i.cache.cacheLocation===au.MemoryStorage&&!i.cache.storeAuthStateInCookie)throw e5(Jz)}function I$(t){let i=document.createElement("link");i.rel="preconnect",i.href=new URL(t).origin,i.crossOrigin="anonymous",document.head.appendChild(i),window.setTimeout(()=>{try{document.head.removeChild(i)}catch{}},1e4)}function Nxe(){return ph()}var zkt=Om.addClientCapabilitiesToClaims;var T$=class t{navigateInternal(i,e){return t.defaultNavigateWindow(i,e)}navigateExternal(i,e){return t.defaultNavigateWindow(i,e)}static defaultNavigateWindow(i,e){return e.noHistory?window.location.replace(i):window.location.assign(i),new Promise((n,r)=>{setTimeout(()=>{r(Er(LN,"failed_to_redirect"))},e.timeout)})}};var Zre=class{sendGetRequestAsync(i,e){return _t(this,null,function*(){let n,r={},o=0,a=WGe(e);try{n=yield fetch(i,{method:bxe.GET,headers:a})}catch(c){throw kN(Er(window.navigator.onLine?Bz:SE),void 0,void 0,c)}r=QGe(n.headers);try{return o=n.status,{headers:r,body:yield n.json(),status:o}}catch(c){throw kN(Er(FN),o,r,c)}})}sendPostRequestAsync(i,e){return _t(this,null,function*(){let n=e&&e.body||"",r=WGe(e),o,a=0,c={};try{o=yield fetch(i,{method:bxe.POST,headers:r,body:n})}catch(m){throw kN(Er(window.navigator.onLine?Lz:SE),void 0,void 0,m)}c=QGe(o.headers);try{return a=o.status,{headers:c,body:yield o.json(),status:a}}catch(m){throw kN(Er(FN),a,c,m)}})}};function WGe(t){try{let i=new Headers;if(!(t&&t.headers))return i;let e=t.headers;return Object.entries(e).forEach(([n,r])=>{i.append(n,r)}),i}catch(i){throw kN(Er(zre),void 0,void 0,i)}}function QGe(t){try{let i={};return t.forEach((e,n)=>{i[n]=e}),i}catch{throw Er(Ure)}}var Ukt=6e4,Xre=1e4,Hkt=3e4,Fxe=2e3;function ZGe({auth:t,cache:i,system:e,telemetry:n},r){let o={clientId:Dn.EMPTY_STRING,authority:`${Dn.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Dn.EMPTY_STRING,authorityMetadata:Dn.EMPTY_STRING,redirectUri:typeof window<"u"?i0():"",postLogoutRedirectUri:Dn.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:yu.AAD,OIDCOptions:{serverResponseType:dw.FRAGMENT,defaultScopes:[Dn.OPENID_SCOPE,Dn.PROFILE_SCOPE,Dn.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:uM.None,tenant:Dn.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:au.SessionStorage,cacheRetentionDays:5,temporaryCacheLocation:au.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(i&&i.cacheLocation===au.LocalStorage),claimsBasedCachingEnabled:!1},c={loggerCallback:()=>{},logLevel:wd.Info,piiLoggingEnabled:!1},m=$e(pe({},mre),{loggerOptions:c,networkClient:r?new Zre:_xe,navigationClient:new T$,loadFrameTimeout:0,windowHashTimeout:e?.loadFrameTimeout||Ukt,iframeHashTimeout:e?.loadFrameTimeout||Xre,navigateFrameWait:0,redirectNavigationTimeout:Hkt,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:e?.nativeBrokerHandshakeTimeout||Fxe,pollIntervalMilliseconds:ip.DEFAULT_POLL_INTERVAL_MS}),g=$e(pe(pe({},m),e),{loggerOptions:e?.loggerOptions||c}),C={application:{appName:Dn.EMPTY_STRING,appVersion:Dn.EMPTY_STRING},client:new gE};if(t?.protocolMode!==yu.OIDC&&t?.OIDCOptions&&new X_(g.loggerOptions).warning(JSON.stringify(Nl(J_.cannotSetOIDCOptions))),t?.protocolMode&&t.protocolMode===yu.OIDC&&g?.allowPlatformBroker)throw Nl(J_.cannotAllowPlatformBroker);return{auth:$e(pe(pe({},o),t),{OIDCOptions:pe(pe({},o.OIDCOptions),t?.OIDCOptions)}),cache:pe(pe({},a),i),system:g,telemetry:pe(pe({},C),n)}}var XGe="@azure/msal-browser",Ev="4.23.0";var Jp="msal",Jre="browser";var tje=`${Jp}.${Jre}.log.level`,ije=`${Jp}.${Jre}.log.pii`,__n=`${Jp}.${Jre}.performance.enabled`,nje=`${Jp}.${Jre}.platform.auth.dom`,Lxe=`${Jp}.version`,JGe="account.keys",eje="token.keys";function Av(t=1){return t<1?`${Jp}.${JGe}`:`${Jp}.${t}.${JGe}`}function Iw(t,i=1){return i<1?`${Jp}.${eje}.${t}`:`${Jp}.${i}.${eje}.${t}`}var eoe=class t{static loggerCallback(i,e){switch(i){case wd.Error:console.error(e);return;case wd.Info:console.info(e);return;case wd.Verbose:console.debug(e);return;case wd.Warning:console.warn(e);return;default:console.log(e);return}}constructor(i){this.browserEnvironment=typeof window<"u",this.config=ZGe(i,this.browserEnvironment);let e;try{e=window[au.SessionStorage]}catch{}let n=e?.getItem(tje),r=e?.getItem(ije)?.toLowerCase(),o=r==="true"?!0:r==="false"?!1:void 0,a=pe({},this.config.system.loggerOptions),c=n&&Object.keys(wd).includes(n)?wd[n]:void 0;c&&(a.loggerCallback=t.loggerCallback,a.logLevel=c),o!==void 0&&(a.piiLoggingEnabled=o),this.logger=new X_(a,XGe,Ev),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}};var toe=(()=>{class t extends eoe{getModuleName(){return t.MODULE_NAME}getId(){return t.ID}initialize(){return _t(this,null,function*(){return this.available=typeof window<"u",this.available})}}return t.MODULE_NAME="",t.ID="StandardOperatingContext",t})();var ioe=class{constructor(){this.dbName=Hre,this.version=DGe,this.tableName=kGe,this.dbOpen=!1}open(){return _t(this,null,function*(){return new Promise((i,e)=>{let n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",r=>{r.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",r=>{let o=r;this.db=o.target.result,this.dbOpen=!0,i()}),n.addEventListener("error",()=>e(Er(CM)))})})}closeConnection(){let i=this.db;i&&this.dbOpen&&(i.close(),this.dbOpen=!1)}validateDbIsOpen(){return _t(this,null,function*(){if(!this.dbOpen)return this.open()})}getItem(i){return _t(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,n)=>{if(!this.db)return n(Er(xw));let a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(i);a.addEventListener("success",c=>{let m=c;this.closeConnection(),e(m.target.result)}),a.addEventListener("error",c=>{this.closeConnection(),n(c)})})})}setItem(i,e){return _t(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((n,r)=>{if(!this.db)return r(Er(xw));let c=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e,i);c.addEventListener("success",()=>{this.closeConnection(),n()}),c.addEventListener("error",m=>{this.closeConnection(),r(m)})})})}removeItem(i){return _t(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,n)=>{if(!this.db)return n(Er(xw));let a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(i);a.addEventListener("success",()=>{this.closeConnection(),e()}),a.addEventListener("error",c=>{this.closeConnection(),n(c)})})})}getKeys(){return _t(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((i,e)=>{if(!this.db)return e(Er(xw));let o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();o.addEventListener("success",a=>{let c=a;this.closeConnection(),i(c.target.result)}),o.addEventListener("error",a=>{this.closeConnection(),e(a)})})})}containsKey(i){return _t(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,n)=>{if(!this.db)return n(Er(xw));let a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(i);a.addEventListener("success",c=>{let m=c;this.closeConnection(),e(m.target.result===1)}),a.addEventListener("error",c=>{this.closeConnection(),n(c)})})})}deleteDatabase(){return _t(this,null,function*(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((i,e)=>{let n=window.indexedDB.deleteDatabase(Hre),r=setTimeout(()=>e(!1),200);n.addEventListener("success",()=>(clearTimeout(r),i(!0))),n.addEventListener("blocked",()=>(clearTimeout(r),i(!0))),n.addEventListener("error",()=>(clearTimeout(r),e(!1)))})})}};var IE=class{constructor(){this.cache=new Map}initialize(){return _t(this,null,function*(){})}getItem(i){return this.cache.get(i)||null}getUserData(i){return this.getItem(i)}setItem(i,e){this.cache.set(i,e)}setUserData(i,e){return _t(this,null,function*(){this.setItem(i,e)})}removeItem(i){this.cache.delete(i)}getKeys(){let i=[];return this.cache.forEach((e,n)=>{i.push(n)}),i}containsKey(i){return this.cache.has(i)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}};var noe=class{constructor(i){this.inMemoryCache=new IE,this.indexedDBCache=new ioe,this.logger=i}handleDatabaseAccessError(i){if(i instanceof BN&&i.errorCode===CM)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 i}getItem(i){return _t(this,null,function*(){let e=this.inMemoryCache.getItem(i);if(!e)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.getItem(i)}catch(n){this.handleDatabaseAccessError(n)}return e})}setItem(i,e){return _t(this,null,function*(){this.inMemoryCache.setItem(i,e);try{yield this.indexedDBCache.setItem(i,e)}catch(n){this.handleDatabaseAccessError(n)}})}removeItem(i){return _t(this,null,function*(){this.inMemoryCache.removeItem(i);try{yield this.indexedDBCache.removeItem(i)}catch(e){this.handleDatabaseAccessError(e)}})}getKeys(){return _t(this,null,function*(){let i=this.inMemoryCache.getKeys();if(i.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 i})}containsKey(i){return _t(this,null,function*(){let e=this.inMemoryCache.containsKey(i);if(!e)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.containsKey(i)}catch(n){this.handleDatabaseAccessError(n)}return e})}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}clearPersistent(){return _t(this,null,function*(){try{this.logger.verbose("Deleting persistent keystore");let i=yield this.indexedDBCache.deleteDatabase();return i&&this.logger.verbose("Persistent keystore deleted"),i}catch(i){return this.handleDatabaseAccessError(i),!1}})}};var t5=(()=>{class t{constructor(e,n,r){this.logger=e,LGe(r??!1),this.cache=new noe(this.logger),this.performanceClient=n}createNewGuid(){return ph()}base64Encode(e){return SM(e)}base64Decode(e){return Gg(e)}base64UrlEncode(e){return C$(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}getPublicKeyThumbprint(e){return _t(this,null,function*(){let n=this.performanceClient?.startMeasurement(Ct.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=yield VGe(t.EXTRACTABLE,t.POP_KEY_USAGES),o=yield Gre(r.publicKey),a={e:o.e,kty:o.kty,n:o.n},c=rje(a),m=yield this.hashString(c),g=yield Gre(r.privateKey),C=yield zGe(g,!1,["sign"]);return yield this.cache.setItem(m,{privateKey:C,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),n&&n.end({success:!0}),m})}removeTokenBindingKey(e){return _t(this,null,function*(){if(yield this.cache.removeItem(e),yield this.cache.containsKey(e))throw jn(dh.bindingKeyNotRemoved)})}clearKeystore(){return _t(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,n,r,o){return _t(this,null,function*(){let a=this.performanceClient?.startMeasurement(Ct.CryptoOptsSignJwt,o),c=yield this.cache.getItem(n);if(!c)throw Er(bM);let m=yield Gre(c.publicKey),g=rje(m),C=C$(JSON.stringify({kid:n})),w=y$.getShrHeaderString($e(pe({},r?.header),{alg:m.alg,kid:C})),P=C$(w);e.cnf={jwk:JSON.parse(g)};let R=C$(JSON.stringify(e)),z=`${P}.${R}`,j=new TextEncoder().encode(z),K=yield UGe(c.privateKey,j),ne=eC(new Uint8Array(K)),me=`${z}.${ne}`;return a&&a.end({success:!0}),me})}hashString(e){return _t(this,null,function*(){return jre(e)})}}return t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t})();function rje(t){return JSON.stringify(t,Object.keys(t).sort())}var Gkt=1440*60*1e3,roe={Lax:"Lax",None:"None"},i5=class{initialize(){return Promise.resolve()}getItem(i){let e=`${encodeURIComponent(i)}`,n=document.cookie.split(";");for(let r=0;r{let r=decodeURIComponent(n).trim().split("=");e.push(r[0])}),e}containsKey(i){return this.getKeys().includes(i)}decryptData(){return Promise.resolve(null)}};function jkt(t){let i=new Date;return new Date(i.getTime()+t*Gkt).toUTCString()}function zN(t,i){let e=t.getItem(Av(i));return e?JSON.parse(e):[]}function UN(t,i,e){let n=i.getItem(Iw(t,e));if(n){let r=JSON.parse(n);if(r&&r.hasOwnProperty("idToken")&&r.hasOwnProperty("accessToken")&&r.hasOwnProperty("refreshToken"))return r}return{idToken:[],accessToken:[],refreshToken:[]}}function E$(t){return t.hasOwnProperty("id")&&t.hasOwnProperty("nonce")&&t.hasOwnProperty("data")}var oje="msal.cache.encryption",$kt="msal.broadcast.cache",ooe=class{constructor(i,e,n){if(!window.localStorage)throw e5(wM);this.memoryStorage=new IE,this.initialized=!1,this.clientId=i,this.logger=e,this.performanceClient=n,this.broadcast=new BroadcastChannel($kt)}initialize(i){return _t(this,null,function*(){let e=new i5,n=e.getItem(oje),r={key:"",id:""};if(n)try{r=JSON.parse(n)}catch{}if(r.key&&r.id){let o=tp(ww,Ct.Base64Decode,this.logger,this.performanceClient,i)(r.key);this.encryptionCookie={id:r.id,key:yield bn(Mxe,Ct.GenerateHKDF,this.logger,this.performanceClient,i)(o)}}else{let o=ph(),a=yield bn(kxe,Ct.GenerateBaseKey,this.logger,this.performanceClient,i)(),c=tp(eC,Ct.UrlEncodeArr,this.logger,this.performanceClient,i)(new Uint8Array(a));this.encryptionCookie={id:o,key:yield bn(Mxe,Ct.GenerateHKDF,this.logger,this.performanceClient,i)(a)};let m={id:o,key:c};e.setItem(oje,JSON.stringify(m),0,!0,roe.None)}yield bn(this.importExistingCache.bind(this),Ct.ImportExistingCache,this.logger,this.performanceClient,i)(i),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0})}getItem(i){return window.localStorage.getItem(i)}getUserData(i){if(!this.initialized)throw Er(Sw);return this.memoryStorage.getItem(i)}decryptData(i,e,n){return _t(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw Er(Sw);if(e.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},n),null;let r=yield bn(Oxe,Ct.Decrypt,this.logger,this.performanceClient,n)(this.encryptionCookie.key,e.nonce,this.getContext(i),e.data);if(!r)return null;try{return JSON.parse(r)}catch{return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},n),null}})}setItem(i,e){window.localStorage.setItem(i,e)}setUserData(i,e,n,r){return _t(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw Er(Sw);let{data:o,nonce:a}=yield bn(jGe,Ct.Encrypt,this.logger,this.performanceClient,n)(this.encryptionCookie.key,e,this.getContext(i)),c={id:this.encryptionCookie.id,nonce:a,data:o,lastUpdatedAt:r};this.memoryStorage.setItem(i,e),this.setItem(i,JSON.stringify(c)),this.broadcast.postMessage({key:i,value:e,context:this.getContext(i)})})}removeItem(i){this.memoryStorage.containsKey(i)&&(this.memoryStorage.removeItem(i),this.broadcast.postMessage({key:i,value:null,context:this.getContext(i)})),window.localStorage.removeItem(i)}getKeys(){return Object.keys(window.localStorage)}containsKey(i){return window.localStorage.hasOwnProperty(i)}clear(){this.memoryStorage.clear(),zN(this).forEach(n=>this.removeItem(n));let e=UN(this.clientId,this);e.idToken.forEach(n=>this.removeItem(n)),e.accessToken.forEach(n=>this.removeItem(n)),e.refreshToken.forEach(n=>this.removeItem(n)),this.getKeys().forEach(n=>{(n.startsWith(Jp)||n.indexOf(this.clientId)!==-1)&&this.removeItem(n)})}importExistingCache(i){return _t(this,null,function*(){if(!this.encryptionCookie)return;let e=zN(this);e=yield this.importArray(e,i),e.length?this.setItem(Av(),JSON.stringify(e)):this.removeItem(Av());let n=UN(this.clientId,this);n.idToken=yield this.importArray(n.idToken,i),n.accessToken=yield this.importArray(n.accessToken,i),n.refreshToken=yield this.importArray(n.refreshToken,i),n.idToken.length||n.accessToken.length||n.refreshToken.length?this.setItem(Iw(this.clientId),JSON.stringify(n)):this.removeItem(Iw(this.clientId))})}getItemFromEncryptedCache(i,e){return _t(this,null,function*(){if(!this.encryptionCookie)return null;let n=this.getItem(i);if(!n)return null;let r;try{r=JSON.parse(n)}catch{return null}return E$(r)?r.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},e),null):bn(Oxe,Ct.Decrypt,this.logger,this.performanceClient,e)(this.encryptionCookie.key,r.nonce,this.getContext(i),r.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},e),r)})}importArray(i,e){return _t(this,null,function*(){let n=[],r=[];return i.forEach(o=>{let a=this.getItemFromEncryptedCache(o,e).then(c=>{c?(this.memoryStorage.setItem(o,c),n.push(o)):this.removeItem(o)});r.push(a)}),yield Promise.all(r),n})}getContext(i){let e="";return i.includes(this.clientId)&&(e=this.clientId),e}updateCache(i){this.logger.trace("Updating internal cache from broadcast event");let e=this.performanceClient.startMeasurement(Ct.LocalStorageUpdated);e.add({isBackground:!0});let{key:n,value:r,context:o}=i.data;if(!n){this.logger.error("Broadcast event missing key"),e.end({success:!1,errorCode:"noKey"});return}if(o&&o!==this.clientId){this.logger.trace(`Ignoring broadcast event from clientId: ${o}`),e.end({success:!1,errorCode:"contextMismatch"});return}r?(this.memoryStorage.setItem(n,r),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(n),this.logger.verbose("Removed item from internal cache")),e.end({success:!0})}};var aoe=class{constructor(){if(!window.sessionStorage)throw e5(wM)}initialize(){return _t(this,null,function*(){})}getItem(i){return window.sessionStorage.getItem(i)}getUserData(i){return this.getItem(i)}setItem(i,e){window.sessionStorage.setItem(i,e)}setUserData(i,e){return _t(this,null,function*(){this.setItem(i,e)})}removeItem(i){window.sessionStorage.removeItem(i)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(i){return window.sessionStorage.hasOwnProperty(i)}decryptData(){return Promise.resolve(null)}};var ro={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 Bxe(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var n5=class t extends xN{constructor(i,e,n,r,o,a,c){super(i,n,r,o,c),this.cacheConfig=e,this.logger=r,this.internalStorage=new IE,this.browserStorage=sje(i,e.cacheLocation,r,o),this.temporaryCacheStorage=sje(i,e.temporaryCacheLocation,r,o),this.cookieStorage=new i5,this.eventHandler=a}initialize(i){return _t(this,null,function*(){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},i),yield this.browserStorage.initialize(i),yield this.migrateExistingCache(i),this.trackVersionChanges(i)})}migrateExistingCache(i){return _t(this,null,function*(){let e=zN(this.browserStorage,0),n=UN(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:e.length,oldAccessCount:n.accessToken.length,oldIdCount:n.idToken.length,oldRefreshCount:n.refreshToken.length},i);let r=zN(this.browserStorage,1),o=UN(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:r.length,currAccessCount:o.accessToken.length,currIdCount:o.idToken.length,currRefreshCount:o.refreshToken.length},i),yield Promise.all([this.updateV0ToCurrent(1,e,r,i),this.updateV0ToCurrent(1,n.idToken,o.idToken,i),this.updateV0ToCurrent(1,n.accessToken,o.accessToken,i),this.updateV0ToCurrent(1,n.refreshToken,o.refreshToken,i)]),e.length>0?this.browserStorage.setItem(Av(0),JSON.stringify(e)):this.browserStorage.removeItem(Av(0)),r.length>0?this.browserStorage.setItem(Av(1),JSON.stringify(r)):this.browserStorage.removeItem(Av(1)),this.setTokenKeys(n,i,0),this.setTokenKeys(o,i,1)})}updateV0ToCurrent(i,e,n,r){return _t(this,null,function*(){let o=[];for(let a of[...e]){let c=this.browserStorage.getItem(a),m=this.validateAndParseJson(c||"");if(!m){Bxe(e,a);continue}m.lastUpdatedAt||(m.lastUpdatedAt=Date.now().toString(),this.setItem(a,JSON.stringify(m),r));let g=E$(m)?yield this.browserStorage.decryptData(a,m,r):m,C;if(g&&(vp.isAccessTokenEntity(g)||vp.isRefreshTokenEntity(g))&&(C=g.expiresOn),!g||uh.isCacheExpired(m.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||C&&uh.isTokenExpired(C,y9)){this.browserStorage.removeItem(a),Bxe(e,a),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},r);continue}if(this.cacheConfig.cacheLocation!==au.LocalStorage||E$(m)){let w=`${Jp}.${i}${"-"}${a}`,P=this.browserStorage.getItem(w);if(P){let R=this.validateAndParseJson(P);if(Number(m.lastUpdatedAt)>Number(R.lastUpdatedAt)){o.push(this.setUserData(w,JSON.stringify(g),r,m.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},r)}));continue}}else{o.push(this.setUserData(w,JSON.stringify(g),r,m.lastUpdatedAt).then(()=>{n.push(w),this.performanceClient.incrementFields({upgradedCacheCount:1},r)}));continue}}}return Promise.all(o)})}trackVersionChanges(i){let e=this.browserStorage.getItem(Lxe);e&&(this.logger.info(`MSAL.js was last initialized by version: ${e}`),this.performanceClient.addFields({previousLibraryVersion:e},i)),e!==Ev&&this.setItem(Lxe,Ev,i)}validateAndParseJson(i){if(!i)return null;try{let e=JSON.parse(i);return e&&typeof e=="object"?e:null}catch{return null}}setItem(i,e,n){let r=0,o=[],a=20;for(let c=0;c<=a;c++)try{this.browserStorage.setItem(i,e),c>0&&(c<=r?this.removeAccessTokenKeys(o.slice(0,c),n,0):(this.removeAccessTokenKeys(o.slice(0,r),n,0),this.removeAccessTokenKeys(o.slice(r,c),n)));break}catch(m){let g=fz(m);if(g.errorCode===Z9.cacheQuotaExceeded&&c0&&(m<=o?this.removeAccessTokenKeys(a.slice(0,m),n,0):(this.removeAccessTokenKeys(a.slice(0,o),n,0),this.removeAccessTokenKeys(a.slice(o,m),n)));break}catch(g){let C=fz(g);if(C.errorCode===Z9.cacheQuotaExceeded&&m-1){if(n.splice(r,1),n.length===0){this.removeItem(Av());return}else this.setItem(Av(),JSON.stringify(n),e);this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(i,e){let n=this.getActiveAccount(e);n?.homeAccountId===i.homeAccountId&&n?.environment===i.environment&&this.setActiveAccount(null,e),super.removeAccount(i,e),this.removeAccountKeyFromMap(this.generateAccountKey(i),e),this.browserStorage.getKeys().forEach(r=>{r.includes(i.homeAccountId)&&r.includes(i.environment)&&this.browserStorage.removeItem(r)}),this.cacheConfig.cacheLocation===au.LocalStorage&&this.eventHandler.emitEvent(ro.ACCOUNT_REMOVED,void 0,i)}removeIdToken(i,e){super.removeIdToken(i,e);let n=this.getTokenKeys(),r=n.idToken.indexOf(i);r>-1&&(this.logger.info("idToken removed from tokenKeys map"),n.idToken.splice(r,1),this.setTokenKeys(n,e))}removeAccessToken(i,e,n=!0){super.removeAccessToken(i,e),n&&this.removeAccessTokenKeys([i],e)}removeAccessTokenKeys(i,e,n=1){this.logger.trace("removeAccessTokenKey called");let r=this.getTokenKeys(n),o=0;if(i.forEach(a=>{let c=r.accessToken.indexOf(a);c>-1&&(r.accessToken.splice(c,1),o++)}),o>0){this.logger.info(`removed ${o} accessToken keys from tokenKeys map`),this.setTokenKeys(r,e,n);return}}removeRefreshToken(i,e){super.removeRefreshToken(i,e);let n=this.getTokenKeys(),r=n.refreshToken.indexOf(i);r>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),n.refreshToken.splice(r,1),this.setTokenKeys(n,e))}getTokenKeys(i=1){return UN(this.clientId,this.browserStorage,i)}setTokenKeys(i,e,n=1){if(i.idToken.length===0&&i.accessToken.length===0&&i.refreshToken.length===0){this.removeItem(Iw(this.clientId,n));return}else this.setItem(Iw(this.clientId,n),JSON.stringify(i),e)}getIdTokenCredential(i,e){let n=this.browserStorage.getUserData(i);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(i,e),null;let r=this.validateAndParseJson(n);return!r||!vp.isIdTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),r)}setIdTokenCredential(i,e){return _t(this,null,function*(){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");let n=this.generateCredentialKey(i),r=Date.now().toString();i.lastUpdatedAt=r,yield this.setUserData(n,JSON.stringify(i),e,r);let o=this.getTokenKeys();o.idToken.indexOf(n)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),o.idToken.push(n),this.setTokenKeys(o,e))})}getAccessTokenCredential(i,e){let n=this.browserStorage.getUserData(i);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([i],e),null;let r=this.validateAndParseJson(n);return!r||!vp.isAccessTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),r)}setAccessTokenCredential(i,e){return _t(this,null,function*(){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");let n=this.generateCredentialKey(i),r=Date.now().toString();i.lastUpdatedAt=r,yield this.setUserData(n,JSON.stringify(i),e,r);let o=this.getTokenKeys(),a=o.accessToken.indexOf(n);a!==-1&&o.accessToken.splice(a,1),this.logger.trace(`access token ${a===-1?"added to":"updated in"} map`),o.accessToken.push(n),this.setTokenKeys(o,e)})}getRefreshTokenCredential(i,e){let n=this.browserStorage.getUserData(i);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(i,e),null;let r=this.validateAndParseJson(n);return!r||!vp.isRefreshTokenEntity(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),r)}setRefreshTokenCredential(i,e){return _t(this,null,function*(){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");let n=this.generateCredentialKey(i),r=Date.now().toString();i.lastUpdatedAt=r,yield this.setUserData(n,JSON.stringify(i),e,r);let o=this.getTokenKeys();o.refreshToken.indexOf(n)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),o.refreshToken.push(n),this.setTokenKeys(o,e))})}getAppMetadata(i){let e=this.browserStorage.getItem(i);if(!e)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;let n=this.validateAndParseJson(e);return!n||!vp.isAppMetadataEntity(i,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n)}setAppMetadata(i,e){this.logger.trace("BrowserCacheManager.setAppMetadata called");let n=vp.generateAppMetadataKey(i);this.setItem(n,JSON.stringify(i),e)}getServerTelemetry(i){let e=this.browserStorage.getItem(i);if(!e)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;let n=this.validateAndParseJson(e);return!n||!vp.isServerTelemetryEntity(i,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(i,e,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(i,JSON.stringify(e),n)}getAuthorityMetadata(i){let e=this.internalStorage.getItem(i);if(!e)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;let n=this.validateAndParseJson(e);return n&&vp.isAuthorityMetadataEntity(i,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(i,e){this.internalStorage.setItem(b$.WRAPPER_SKU,i),this.internalStorage.setItem(b$.WRAPPER_VER,e)}getWrapperMetadata(){let i=this.internalStorage.getItem(b$.WRAPPER_SKU)||Dn.EMPTY_STRING,e=this.internalStorage.getItem(b$.WRAPPER_VER)||Dn.EMPTY_STRING;return[i,e]}setAuthorityMetadata(i,e){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(i,JSON.stringify(e))}getActiveAccount(i){let e=this.generateCacheKey(rre.ACTIVE_ACCOUNT_FILTERS),n=this.browserStorage.getItem(e);if(!n)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;let r=this.validateAndParseJson(n);return r?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId},i)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(i,e){let n=this.generateCacheKey(rre.ACTIVE_ACCOUNT_FILTERS);if(i){this.logger.verbose("setActiveAccount: Active account set");let r={homeAccountId:i.homeAccountId,localAccountId:i.localAccountId,tenantId:i.tenantId,lastUpdatedAt:uh.nowSeconds().toString()};this.setItem(n,JSON.stringify(r),e)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n);this.eventHandler.emitEvent(ro.ACTIVE_ACCOUNT_CHANGED)}getThrottlingCache(i){let e=this.browserStorage.getItem(i);if(!e)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;let n=this.validateAndParseJson(e);return!n||!vp.isThrottlingEntity(i,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n)}setThrottlingCache(i,e,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(i,JSON.stringify(e),n)}getTemporaryCache(i,e){let n=e?this.generateCacheKey(i):i;if(this.cacheConfig.storeAuthStateInCookie){let o=this.cookieStorage.getItem(n);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}let r=this.temporaryCacheStorage.getItem(n);if(!r){if(this.cacheConfig.cacheLocation===au.LocalStorage){let o=this.browserStorage.getItem(n);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),o}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),r}setTemporaryCache(i,e,n){let r=n?this.generateCacheKey(i):i;this.temporaryCacheStorage.setItem(r,e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(r,e,void 0,this.cacheConfig.secureCookies))}removeItem(i){this.browserStorage.removeItem(i)}removeTemporaryItem(i){this.temporaryCacheStorage.removeItem(i),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(i))}getKeys(){return this.browserStorage.getKeys()}clear(i){this.removeAllAccounts(i),this.removeAppMetadata(i),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(Jp)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(Jp)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(i){this.performanceClient.addQueueMeasurement(Ct.ClearTokensAndKeysWithClaims,i);let e=this.getTokenKeys(),n=0;e.accessToken.forEach(r=>{let o=this.getAccessTokenCredential(r,i);o?.requestedClaimsHash&&r.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(r,i),n++)}),n>0&&this.logger.warning(`${n} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(i){return Bd.startsWith(i,Jp)?i:`${Jp}.${this.clientId}.${i}`}generateCredentialKey(i){let e=i.credentialType===Xp.REFRESH_TOKEN&&i.familyId||i.clientId,n=i.tokenType&&i.tokenType.toLowerCase()!==rl.BEARER.toLowerCase()?i.tokenType.toLowerCase():"";return[`${Jp}.${1}`,i.homeAccountId,i.environment,i.credentialType,e,i.realm||"",i.target||"",i.requestedClaimsHash||"",n].join("-").toLowerCase()}generateAccountKey(i){let e=i.homeAccountId.split(".")[1];return[`${Jp}.${1}`,i.homeAccountId,i.environment,e||i.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(np.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(np.VERIFIER)),this.removeTemporaryItem(this.generateCacheKey(np.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(np.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(np.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(i,e){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");let n=SM(JSON.stringify(i));if(this.setTemporaryCache(np.REQUEST_PARAMS,n,!0),e){let r=SM(e);this.setTemporaryCache(np.VERIFIER,r,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");let i=this.getTemporaryCache(np.REQUEST_PARAMS,!0);if(!i)throw Er(Nz);let e=this.getTemporaryCache(np.VERIFIER,!0),n,r="";try{n=JSON.parse(Gg(i)),e&&(r=Gg(e))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${i}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),Er(Fz)}return[n,r]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");let i=this.getTemporaryCache(np.NATIVE_REQUEST,!0);if(!i)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;let e=this.validateAndParseJson(i);return e||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(i){let e=this.getInteractionInProgress()?.clientId;return i?e===this.clientId:!!e}getInteractionInProgress(){let i=`${Jp}.${np.INTERACTION_STATUS_KEY}`,e=this.getTemporaryCache(i,!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(i),this.resetRequestCache(),x$(window),null}}setInteractionInProgress(i,e=e1.SIGNIN){let n=`${Jp}.${np.INTERACTION_STATUS_KEY}`;if(i){if(this.getInteractionInProgress())throw Er(Ez);this.setTemporaryCache(n,JSON.stringify({clientId:this.clientId,type:e}),!1)}else!i&&this.getInteractionInProgress()?.clientId===this.clientId&&this.removeTemporaryItem(n)}hydrateCache(i,e){return _t(this,null,function*(){let n=vp.createIdTokenEntity(i.account?.homeAccountId,i.account?.environment,i.idToken,this.clientId,i.tenantId),r;e.claims&&(r=yield this.cryptoImpl.hashString(e.claims));let o=vp.createAccessTokenEntity(i.account?.homeAccountId,i.account.environment,i.accessToken,this.clientId,i.tenantId,i.scopes.join(" "),i.expiresOn?uh.toSecondsFromDate(i.expiresOn):0,i.extExpiresOn?uh.toSecondsFromDate(i.extExpiresOn):0,Gg,void 0,i.tokenType,void 0,e.sshKid,e.claims,r),a={idToken:n,accessToken:o};return this.saveCacheRecord(a,i.correlationId)})}saveCacheRecord(i,e,n){return _t(this,null,function*(){try{yield xfe(t.prototype,this,"saveCacheRecord").call(this,i,e,n)}catch(r){if(r instanceof hM&&this.performanceClient&&e)try{let o=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:o.refreshToken.length,cacheIdCount:o.idToken.length,cacheAtCount:o.accessToken.length},e)}catch{}throw r}})}};function sje(t,i,e,n){try{switch(i){case au.LocalStorage:return new ooe(t,e,n);case au.SessionStorage:return new aoe;case au.MemoryStorage:default:break}}catch(r){e.error(r)}return new IE}var lje=(t,i,e,n)=>{let r={cacheLocation:au.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:au.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new n5(t,r,dM,i,e,n)};function cje(t,i,e,n,r){return t.verbose("getAllAccounts called"),e?i.getAllAccounts(r||{},n):[]}function dje(t,i,e,n){let r=e.getAccountInfoFilteredBy(t,n);return r?(i.verbose("getAccount: Account matching provided filter found, returning"),r):(i.verbose("getAccount: No matching account found, returning null"),null)}function uje(t,i,e,n){if(i.trace("getAccountByUsername called"),!t)return i.warning("getAccountByUsername: No username provided"),null;let r=e.getAccountInfoFilteredBy({username:t},n);return r?(i.verbose("getAccountByUsername: Account matching username found, returning"),i.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${t}`),r):(i.verbose("getAccountByUsername: No matching account found, returning null"),null)}function pje(t,i,e,n){if(i.trace("getAccountByHomeId called"),!t)return i.warning("getAccountByHomeId: No homeAccountId provided"),null;let r=e.getAccountInfoFilteredBy({homeAccountId:t},n);return r?(i.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),i.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${t}`),r):(i.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function mje(t,i,e,n){if(i.trace("getAccountByLocalId called"),!t)return i.warning("getAccountByLocalId: No localAccountId provided"),null;let r=e.getAccountInfoFilteredBy({localAccountId:t},n);return r?(i.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),i.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${t}`),r):(i.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function hje(t,i,e){i.setActiveAccount(t,e)}function fje(t,i){return t.getActiveAccount(i)}var qkt="msal.broadcast.event",soe=class{constructor(i){this.eventCallbacks=new Map,this.logger=i||new X_({}),typeof BroadcastChannel<"u"&&(this.broadcastChannel=new BroadcastChannel(qkt)),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(i,e,n){if(typeof window<"u"){let r=n||Nxe();return this.eventCallbacks.has(r)?(this.logger.error(`Event callback with id: ${r} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(r,[i,e||[]]),this.logger.verbose(`Event callback registered with id: ${r}`),r)}return null}removeEventCallback(i){this.eventCallbacks.delete(i),this.logger.verbose(`Event callback ${i} removed.`)}emitEvent(i,e,n,r){let o={eventType:i,interactionType:e||null,payload:n||null,error:r||null,timestamp:Date.now()};switch(i){case ro.ACCOUNT_ADDED:case ro.ACCOUNT_REMOVED:case ro.ACTIVE_ACCOUNT_CHANGED:this.broadcastChannel?.postMessage(o);break;default:this.invokeCallbacks(o);break}}invokeCallbacks(i){this.eventCallbacks.forEach(([e,n],r)=>{(n.length===0||n.includes(i.eventType))&&(this.logger.verbose(`Emitting event to callback ${r}: ${i.eventType}`),e.apply(null,[i]))})}invokeCrossTabCallbacks(i){let e=i.data;this.invokeCallbacks(e)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}};var r5=class{constructor(i,e,n,r,o,a,c,m,g){this.config=i,this.browserStorage=e,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.platformAuthProvider=m,this.correlationId=g||ph(),this.logger=r.clone(ip.MSAL_SKU,Ev,this.correlationId),this.performanceClient=c}clearCacheOnLogout(i,e){return _t(this,null,function*(){if(e)try{this.browserStorage.removeAccount(e,i),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(i),yield this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}})}getRedirectUri(i){this.logger.verbose("getRedirectUri called");let e=i||this.config.auth.redirectUri;return Gs.getAbsoluteUrl(e,i0())}initializeServerTelemetryManager(i,e){this.logger.verbose("initializeServerTelemetryManager called");let n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:i,forceRefresh:e||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new RN(n,this.browserStorage)}getDiscoveredAuthority(i){return _t(this,null,function*(){let{account:e}=i,n=i.requestExtraQueryParameters&&i.requestExtraQueryParameters.hasOwnProperty("instance_aware")?i.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Ct.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);let r={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},o=i.requestAuthority||this.config.auth.authority,a=n?.length?n==="true":this.config.auth.instanceAware,c=e&&a?this.config.auth.authority.replace(Gs.getDomainFromUrl(o),e.environment):o,m=Jb.generateAuthority(c,i.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=yield bn(Ire.createDiscoveredInstance,Ct.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(m,this.config.system.networkClient,this.browserStorage,r,this.logger,this.correlationId,this.performanceClient);if(e&&!g.isAlias(e.environment))throw Nl(J_.authorityMismatch);return g})}};function A$(t,i,e,n){return _t(this,null,function*(){e.addQueueMeasurement(Ct.InitializeBaseRequest,t.correlationId);let r=t.authority||i.auth.authority,o=[...t&&t.scopes||[]],a=$e(pe({},t),{correlationId:t.correlationId,authority:r,scopes:o});if(!a.authenticationScheme)a.authenticationScheme=rl.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(a.authenticationScheme===rl.SSH){if(!t.sshJwk)throw Nl(J_.missingSshJwk);if(!t.sshKid)throw Nl(J_.missingSshKid)}n.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}return i.cache.claimsBasedCachingEnabled&&t.claims&&!Bd.isEmptyObj(t.claims)&&(a.requestedClaimsHash=yield jre(t.claims)),a})}function gje(t,i,e,n,r){return _t(this,null,function*(){n.addQueueMeasurement(Ct.InitializeSilentRequest,t.correlationId);let o=yield bn(A$,Ct.InitializeBaseRequest,r,n,t.correlationId)(t,e,n,r);return $e(pe(pe({},t),o),{account:i,forceRefresh:t.forceRefresh||!1})})}function loe(t,i){let e,n=t.httpMethod;if(i===yu.EAR){if(e=n||Xb.POST,e!==Xb.POST)throw Nl(J_.invalidRequestMethodForEAR)}else e=n||Xb.GET;if(t.authorizePostBodyParameters&&e!==Xb.POST)throw Nl(J_.invalidAuthorizePostBodyParameters);return e}var ny=class extends r5{initializeLogoutRequest(i){this.logger.verbose("initializeLogoutRequest called",i?.correlationId);let e=pe({correlationId:this.correlationId||ph()},i);if(i)if(i.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(i.account){let n=this.getLogoutHintFromIdTokenClaims(i.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),e.logoutHint=n)}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!i||i.postLogoutRedirectUri!==null?i&&i.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",e.correlationId),e.postLogoutRedirectUri=Gs.getAbsoluteUrl(i.postLogoutRedirectUri,i0())):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=Gs.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,i0())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",e.correlationId),e.postLogoutRedirectUri=Gs.getAbsoluteUrl(i0(),i0())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",e.correlationId),e}getLogoutHintFromIdTokenClaims(i){let e=i.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(i){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.StandardInteractionClientCreateAuthCodeClient,this.correlationId);let e=yield bn(this.getClientConfiguration.bind(this),Ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(i);return new ON(e,this.performanceClient)})}getClientConfiguration(i){return _t(this,null,function*(){let{serverTelemetryManager:e,requestAuthority:n,requestAzureCloudOptions:r,requestExtraQueryParameters:o,account:a}=i;this.performanceClient.addQueueMeasurement(Ct.StandardInteractionClientGetClientConfiguration,this.correlationId);let c=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:r,requestExtraQueryParameters:o,account:a}),m=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:c,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:ip.MSAL_SKU,version:Ev,cpu:Dn.EMPTY_STRING,os:Dn.EMPTY_STRING},telemetry:this.config.telemetry}})}initializeAuthorizationRequest(i,e){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);let n=this.getRedirectUri(i.redirectUri),r={interactionType:e},o=Zx.setRequestState(this.browserCrypto,i&&i.state||Dn.EMPTY_STRING,r),a=yield bn(A$,Ct.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)($e(pe({},i),{correlationId:this.correlationId}),this.config,this.performanceClient,this.logger),c=$e(pe({},a),{redirectUri:n,state:o,nonce:i.nonce||ph(),responseMode:this.config.auth.OIDCOptions.serverResponseType}),m=$e(pe({},c),{httpMethod:loe(c,this.config.auth.protocolMode)});if(i.loginHint||i.sid)return m;let g=i.account||this.browserStorage.getActiveAccount(this.correlationId);return g&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${g.homeAccountId}`,this.correlationId),m.account=g),m})}};function _je(t,i){if(!i)return null;try{return Zx.parseRequestState(t,i).libraryState.meta}catch{throw jn(dh.invalidState)}}function GN(t,i,e){let n=hw.getDeserializedResponse(t);if(!n)throw hw.stripLeadingHashOrQuery(t)?(e.error(`A ${i} is present in the iframe but it does not contain known properties. It's likely that the ${i} has been replaced by code running on the redirectUri page.`),e.errorPii(`The ${i} detected is: ${t}`),Er(wz)):(e.error(`The request has returned to the redirectUri but a ${i} is not present. It's likely that the ${i} has been removed or the page has been redirected by code running on the redirectUri page.`),Er(Sz));return n}function yje(t,i,e){if(!t.state)throw Er(vM);let n=_je(i,t.state);if(!n)throw Er(Iz);if(n.interactionType!==e)throw Er(Tz)}var o5=class{constructor(i,e,n,r,o){this.authModule=i,this.browserStorage=e,this.authCodeRequest=n,this.logger=r,this.performanceClient=o}handleCodeResponse(i,e){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.HandleCodeResponse,e.correlationId);let n;try{n=yw.getAuthorizationCodePayload(i,e.state)}catch(r){throw r instanceof ty&&r.subError===Jx?Er(Jx):r}return bn(this.handleCodeResponseFromServer.bind(this),Ct.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)(n,e)})}handleCodeResponseFromServer(i,e,n=!0){return _t(this,null,function*(){if(this.performanceClient.addQueueMeasurement(Ct.HandleCodeResponseFromServer,e.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=i.code,i.cloud_instance_host_name&&(yield bn(this.authModule.updateAuthority.bind(this.authModule),Ct.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,e.correlationId)(i.cloud_instance_host_name,e.correlationId)),n&&(i.nonce=e.nonce||void 0),i.state=e.state,i.client_info)this.authCodeRequest.clientInfo=i.client_info;else{let o=this.createCcsCredentials(e);o&&(this.authCodeRequest.ccsCredential=o)}return yield bn(this.authModule.acquireToken.bind(this.authModule),Ct.AuthClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(this.authCodeRequest,i)})}createCcsCredentials(i){return i.account?{credential:i.account.homeAccountId,type:Hg.HOME_ACCOUNT_ID}:i.loginHint?{credential:i.loginHint,type:Hg.UPN}:null}};var vje="ContentError",coe="user_switch";var bje="USER_INTERACTION_REQUIRED",Cje="USER_CANCEL",xje="NO_NETWORK",Sje="DISABLED",wje="ACCOUNT_UNAVAILABLE",Ije="UX_NOT_ALLOWED";var Ykt=-2147186943,Kkt={[coe]:"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."},tC=class t extends ds{constructor(i,e,n){super(i,e),Object.setPrototypeOf(this,t.prototype),this.name="NativeAuthError",this.ext=n}};function IM(t){if(t.ext&&t.ext.status&&t.ext.status===Sje||t.ext&&t.ext.error&&t.ext.error===Ykt)return!0;switch(t.errorCode){case vje:return!0;default:return!1}}function jN(t,i,e){if(e&&e.status)switch(e.status){case wje:return MN(_w.nativeAccountUnavailable);case bje:return new tf(t,i);case Cje:return Er(Jx);case xje:return Er(SE);case Ije:return MN(_w.uxNotAllowed)}return new tC(t,Kkt[t]||i,e)}var a5=class extends ny{acquireToken(i){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.SilentCacheClientAcquireToken,i.correlationId);let e=this.initializeServerTelemetryManager(ic.acquireTokenSilent_silentFlow),n=yield bn(this.getClientConfiguration.bind(this),Ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,account:i.account}),r=new _$(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{let a=(yield bn(r.acquireCachedToken.bind(r),Ct.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,i.correlationId)(i))[0];return this.performanceClient.addFields({fromCache:!0},i.correlationId),a}catch(o){throw o instanceof BN&&o.errorCode===bM&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o}})}logout(i){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(i);return this.clearCacheOnLogout(e.correlationId,e?.account)}};var TM=class extends r5{constructor(i,e,n,r,o,a,c,m,g,C,w,P){super(i,e,n,r,o,a,m,g,P),this.apiId=c,this.accountId=C,this.platformAuthProvider=g,this.nativeStorageManager=w,this.silentCacheClient=new a5(i,this.nativeStorageManager,n,r,o,a,m,g,P);let R=this.platformAuthProvider.getExtensionName();this.skus=RN.makeExtraSkuString({libraryName:ip.MSAL_SKU,libraryVersion:Ev,extensionName:R,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(i){i.extraParameters=$e(pe({},i.extraParameters),{[_E.X_CLIENT_EXTRA_SKU]:this.skus})}acquireToken(i,e){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.NativeInteractionClientAcquireToken,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");let n=this.performanceClient.startMeasurement(Ct.NativeInteractionClientAcquireToken,this.correlationId),r=uh.nowSeconds(),o=this.initializeServerTelemetryManager(this.apiId);try{let a=yield this.initializeNativeRequest(i);try{let m=yield this.acquireTokensFromCache(this.accountId,a);return n.end({success:!0,isNativeBroker:!1,fromCache:!0}),m}catch(m){if(e===nf.AccessToken)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),n.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 c=yield this.platformAuthProvider.sendMessage(a);return yield this.handleNativeResponse(c,a,r).then(m=>(n.end({success:!0,isNativeBroker:!0,requestId:m.requestId}),o.clearNativeBrokerErrorCode(),m)).catch(m=>{throw n.end({success:!1,errorCode:m.errorCode,subErrorCode:m.subError}),m})}catch(a){throw a instanceof tC&&o.setNativeBrokerErrorCode(a.errorCode),n.end({success:!1}),a}})}createSilentCacheRequest(i,e){return{authority:i.authority,correlationId:this.correlationId,scopes:ep.fromString(i.scope).asArray(),account:e,forceRefresh:!1}}acquireTokensFromCache(i,e){return _t(this,null,function*(){if(!i)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),jn(dh.noAccountFound);let n=this.browserStorage.getBaseAccountInfo({nativeAccountId:i},this.correlationId);if(!n)throw jn(dh.noAccountFound);try{let r=this.createSilentCacheRequest(e,n),o=yield this.silentCacheClient.acquireToken(r),a=$e(pe({},n),{idTokenClaims:o?.idTokenClaims,idToken:o?.idToken});return $e(pe({},o),{account:a})}catch(r){throw r}})}acquireTokenRedirect(i,e){return _t(this,null,function*(){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");let n=O_(i,[]);delete n.onRedirectNavigate;let r=yield this.initializeNativeRequest(n);try{yield this.platformAuthProvider.sendMessage(r)}catch(c){if(c instanceof tC&&(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(c.errorCode),IM(c)))throw c}this.browserStorage.setTemporaryCache(np.NATIVE_REQUEST,JSON.stringify(r),!0);let o={apiId:ic.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(i.redirectUri);e.end({success:!0}),yield this.navigationClient.navigateExternal(a,o)})}handleRedirectPromise(i,e){return _t(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 n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),i&&e&&i?.addFields({errorCode:"no_cached_request"},e),null;let c=n,{prompt:r}=c,o=O_(c,["prompt"]);r&&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(np.NATIVE_REQUEST));let a=uh.nowSeconds();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");let m=yield this.platformAuthProvider.sendMessage(o),g=yield this.handleNativeResponse(m,o,a);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),i&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),g}catch(m){throw m}})}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}handleNativeResponse(i,e,n){return _t(this,null,function*(){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");let r=hz.extractTokenClaims(i.id_token,Gg),o=this.createHomeAccountIdentifier(i,r),a=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:e.accountId},this.correlationId)?.homeAccountId;if(e.extraParameters?.child_client_id&&i.account.id!==e.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(o!==a&&i.account.id!==e.accountId)throw jN(coe);let c=yield this.getDiscoveredAuthority({requestAuthority:e.authority}),m=xz(this.browserStorage,c,o,Gg,this.correlationId,r,i.client_info,void 0,r.tid,void 0,i.account.id,this.logger);i.expires_in=Number(i.expires_in);let g=yield this.generateAuthenticationResult(i,e,r,m,c.canonicalAuthority,n);return yield this.cacheAccount(m,this.correlationId),yield this.cacheNativeTokens(i,e,o,r,i.access_token,g.tenantId,n),g})}createHomeAccountIdentifier(i,e){return ig.generateHomeAccountId(i.client_info||Dn.EMPTY_STRING,e0.Default,this.logger,this.browserCrypto,e)}generateScopes(i,e){return e?ep.fromString(e):ep.fromString(i)}generatePopAccessToken(i,e){return _t(this,null,function*(){if(e.tokenType===rl.POP&&e.signPopToken){if(i.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),i.shr;let n=new iy(this.browserCrypto),r={resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,shrNonce:e.shrNonce};if(!e.keyId)throw jn(dh.keyIdMissing);return n.signPopToken(i.access_token,e.keyId,r)}else return i.access_token})}generateAuthenticationResult(i,e,n,r,o,a){return _t(this,null,function*(){let c=this.addTelemetryFromNativeResponse(i.properties.MATS),m=this.generateScopes(e.scope,i.scope),g=i.account.properties||{},C=g.UID||n.oid||n.sub||Dn.EMPTY_STRING,w=g.TenantId||n.tid||Dn.EMPTY_STRING,P=CN(r.getAccountInfo(),void 0,n,i.id_token);P.nativeAccountId!==i.account.id&&(P.nativeAccountId=i.account.id);let R=yield this.generatePopAccessToken(i,e),z=e.tokenType===rl.POP?rl.POP:rl.BEARER;return{authority:o,uniqueId:C,tenantId:w,scopes:m.asArray(),account:P,idToken:i.id_token,idTokenClaims:n,accessToken:R,fromCache:c?this.isResponseFromCache(c):!1,expiresOn:uh.toDateFromSeconds(a+i.expires_in),tokenType:z,correlationId:this.correlationId,state:i.state,fromNativeBroker:!0}})}cacheAccount(i,e){return _t(this,null,function*(){yield this.browserStorage.setAccount(i,this.correlationId),this.browserStorage.removeAccountContext(i.getAccountInfo(),e)})}cacheNativeTokens(i,e,n,r,o,a,c){let m=vp.createIdTokenEntity(n,e.authority,i.id_token||"",e.clientId,r.tid||""),g=e.tokenType===rl.POP?Dn.SHR_NONCE_VALIDITY:(typeof i.expires_in=="string"?parseInt(i.expires_in,10):i.expires_in)||0,C=c+g,w=this.generateScopes(i.scope,e.scope),P=vp.createAccessTokenEntity(n,e.authority,o,e.clientId,r.tid||a,w.printScopes(),C,0,Gg,void 0,e.tokenType,void 0,e.keyId),R={idToken:m,accessToken:P};return this.nativeStorageManager.saveCacheRecord(R,this.correlationId,e.storeInCache)}getExpiresInValue(i,e){return i===rl.POP?Dn.SHR_NONCE_VALIDITY:(typeof e=="string"?parseInt(e,10):e)||0}addTelemetryFromNativeResponse(i){let e=this.getMATSFromResponse(i);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(i){if(i)try{return JSON.parse(i)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(i){return typeof i.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!i.is_cached}initializeNativeRequest(i){return _t(this,null,function*(){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");let e=yield this.getCanonicalAuthority(i),c=i,{scopes:n}=c,r=O_(c,["scopes"]),o=new ep(n||[]);o.appendScopes(Iv);let a=$e(pe({},r),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:e.urlString,scope:o.printScopes(),redirectUri:this.getRedirectUri(i.redirectUri),prompt:this.getPrompt(i.prompt),correlationId:this.correlationId,tokenType:i.authenticationScheme,windowTitleSubstring:document.title,extraParameters:pe(pe({},i.extraQueryParameters),i.tokenQueryParameters),extendedExpiryToken:!1,keyId:i.popKid});if(a.signPopToken&&i.popKid)throw Er(Kz);if(this.handleExtraBrokerParams(a),a.extraParameters=a.extraParameters||{},a.extraParameters.telemetry=t0.MATS_TELEMETRY,i.authenticationScheme===rl.POP){let m={resourceRequestUri:i.resourceRequestUri,resourceRequestMethod:i.resourceRequestMethod,shrClaims:i.shrClaims,shrNonce:i.shrNonce},g=new iy(this.browserCrypto),C;if(a.keyId)C=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:a.keyId})),a.signPopToken=!1;else{let w=yield bn(g.generateCnf.bind(g),Ct.PopTokenGenerateCnf,this.logger,this.performanceClient,this.correlationId)(m,this.logger);C=w.reqCnfString,a.keyId=w.kid,a.signPopToken=!0}a.reqCnf=C}return this.addRequestSKUs(a),a})}getCanonicalAuthority(i){return _t(this,null,function*(){let e=i.authority||this.config.auth.authority;i.account&&(yield this.getDiscoveredAuthority({requestAuthority:e,requestAzureCloudOptions:i.azureCloudOptions,account:i.account}));let n=new Gs(e);return n.validateAsUri(),n})}getPrompt(i){switch(this.apiId){case ic.ssoSilent:case ic.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Zp.NONE}if(!i){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(i){case Zp.NONE:case Zp.CONSENT:case Zp.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),i;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${i} is not compatible with native flow`),Er(qz)}}handleExtraBrokerParams(i){let e=i.extraParameters&&i.extraParameters.hasOwnProperty(_E.BROKER_CLIENT_ID)&&i.extraParameters.hasOwnProperty(_E.BROKER_REDIRECT_URI)&&i.extraParameters.hasOwnProperty(_E.CLIENT_ID);if(!i.embeddedClientId&&!e)return;let n="",r=i.redirectUri;i.embeddedClientId?(i.redirectUri=this.config.auth.redirectUri,n=i.embeddedClientId):i.extraParameters&&(i.redirectUri=i.extraParameters[_E.BROKER_REDIRECT_URI],n=i.extraParameters[_E.CLIENT_ID]),i.extraParameters={child_client_id:n,child_redirect_uri:r},this.performanceClient?.addFields({embeddedClientId:n,embeddedRedirectUri:r},this.correlationId)}};function zxe(t,i,e,n,r){return _t(this,null,function*(){let o=yw.getStandardAuthorizeRequestParameters($e(pe({},t.auth),{authority:i}),e,n,r);if(Om.addLibraryInfo(o,{sku:ip.MSAL_SKU,version:Ev,os:"",cpu:""}),t.auth.protocolMode!==yu.OIDC&&Om.addApplicationTelemetry(o,t.telemetry.application),e.platformBroker&&(Om.addNativeBroker(o),r.addFields({isPlatformAuthorizeRequest:!0},e.correlationId),e.authenticationScheme===rl.POP)){let a=new t5(n,r),c=new iy(a),m;e.popKid?m=a.encodeKid(e.popKid):m=(yield bn(c.generateCnf.bind(c),Ct.PopTokenGenerateCnf,n,r,e.correlationId)(e,n)).reqCnfString,Om.addPopToken(o,m)}return Om.instrumentBrokerParams(o,e.correlationId,r),o})}function s5(t,i,e,n,r){return _t(this,null,function*(){if(!e.codeChallenge)throw Nl(J_.pkceParamsMissing);let o=yield bn(zxe,Ct.GetStandardParams,n,r,e.correlationId)(t,i,e,n,r);return Om.addResponseType(o,f9.CODE),Om.addCodeChallengeParams(o,e.codeChallenge,Dn.S256_CODE_CHALLENGE_METHOD),Om.addExtraQueryParameters(o,e.extraQueryParameters||{}),yw.getAuthorizeUrl(i,o,t.auth.encodeExtraQueryParams,e.extraQueryParameters)})}function l5(t,i,e,n,r,o){return _t(this,null,function*(){if(!n.earJwk)throw Er(v$);let a=yield zxe(i,e,n,r,o);Om.addResponseType(a,f9.IDTOKEN_TOKEN_REFRESHTOKEN),Om.addEARParameters(a,n.earJwk);let c=new Map;Om.addExtraQueryParameters(c,n.extraQueryParameters||{});let m=yw.getAuthorizeUrl(e,c,i.auth.encodeExtraQueryParams,n.extraQueryParameters);return Tje(t,m,a)})}function c5(t,i,e,n,r,o){return _t(this,null,function*(){let a=yield zxe(i,e,n,r,o);Om.addResponseType(a,f9.CODE),Om.addCodeChallengeParams(a,n.codeChallenge,n.codeChallengeMethod||Dn.S256_CODE_CHALLENGE_METHOD),Om.addPostBodyParameters(a,n.authorizePostBodyParameters||{});let c=new Map;Om.addExtraQueryParameters(c,n.extraQueryParameters||{});let m=yw.getAuthorizeUrl(e,c,i.auth.encodeExtraQueryParams,n.extraQueryParameters);return Tje(t,m,a)})}function Tje(t,i,e){let n=t.createElement("form");return n.method="post",n.action=i,e.forEach((r,o)=>{let a=t.createElement("input");a.hidden=!0,a.name=o,a.value=r,n.appendChild(a)}),t.body.appendChild(n),n}function Eje(t,i,e,n,r,o,a,c,m,g){return _t(this,null,function*(){if(c.verbose("Account id found, calling WAM for token"),!g)throw Er(xM);let C=new t5(c,m),w=new TM(n,r,C,c,a,n.system.navigationClient,e,m,g,i,o,t.correlationId),{userRequestState:P}=Zx.parseRequestState(C,t.state);return bn(w.acquireToken.bind(w),Ct.NativeInteractionClientAcquireToken,c,m,t.correlationId)($e(pe({},t),{state:P,prompt:void 0}))})}function $N(t,i,e,n,r,o,a,c,m,g,C,w){return _t(this,null,function*(){if(xE.removeThrottle(a,r.auth.clientId,t),i.accountId)return bn(Eje,Ct.HandleResponsePlatformBroker,g,C,t.correlationId)(t,i.accountId,n,r,a,c,m,g,C,w);let P=$e(pe({},t),{code:i.code||"",codeVerifier:e}),R=new o5(o,a,P,g,C);return yield bn(R.handleCodeResponse.bind(R),Ct.HandleCodeResponse,g,C,t.correlationId)(i,t)})}function d5(t,i,e,n,r,o,a,c,m,g,C){return _t(this,null,function*(){if(xE.removeThrottle(o,n.auth.clientId,t),yw.validateAuthorizationResponse(i,t.state),!i.ear_jwe)throw Er(Pre);if(!t.earJwk)throw Er(v$);let w=JSON.parse(yield bn(HGe,Ct.DecryptEarResponse,m,g,t.correlationId)(t.earJwk,i.ear_jwe));if(w.accountId)return bn(Eje,Ct.HandleResponsePlatformBroker,m,g,t.correlationId)(t,w.accountId,e,n,o,a,c,m,g,C);let P=new Xx(n.auth.clientId,o,new t5(m,g),m,null,null,g);P.validateTokenResponse(w);let R={code:"",state:t.state,nonce:t.nonce,client_info:w.client_info,cloud_graph_host_name:w.cloud_graph_host_name,cloud_instance_host_name:w.cloud_instance_host_name,cloud_instance_name:w.cloud_instance_name,msgraph_host:w.msgraph_host};return yield bn(P.handleServerTokenResponse.bind(P),Ct.HandleServerTokenResponse,m,g,t.correlationId)(w,r,uh.nowSeconds(),t,R,void 0,void 0,void 0,void 0)})}var Wkt=32;function EM(t,i,e){return _t(this,null,function*(){t.addQueueMeasurement(Ct.GeneratePkceCodes,e);let n=tp(Qkt,Ct.GenerateCodeVerifier,i,t,e)(t,i,e),r=yield bn(Zkt,Ct.GenerateCodeChallengeFromVerifier,i,t,e)(n,t,i,e);return{verifier:n,challenge:r}})}function Qkt(t,i,e){try{let n=new Uint8Array(Wkt);return tp(BGe,Ct.GetRandomValues,i,t,e)(n),eC(n)}catch{throw Er(PN)}}function Zkt(t,i,e,n){return _t(this,null,function*(){i.addQueueMeasurement(Ct.GenerateCodeChallengeFromVerifier,n);try{let r=yield bn(Dxe,Ct.Sha256Digest,e,i,n)(t,i,n);return eC(new Uint8Array(r))}catch{throw Er(PN)}})}var doe=class t{constructor(i,e,n,r){this.logger=i,this.handshakeTimeoutMs=e,this.extensionId=r,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(Ct.NativeMessageHandlerHandshake),this.platformAuthType=t0.PLATFORM_EXTENSION_PROVIDER}sendMessage(i){return _t(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendMessage called.");let e={method:Qz.GetToken,request:i},n={channel:t0.CHANNEL_ID,extensionId:this.extensionId,responseId:ph(),body:e};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(n)}`),this.messageChannel.port1.postMessage(n);let r=yield new Promise((a,c)=>{this.resolvers.set(n.responseId,{resolve:a,reject:c})});return this.validatePlatformBrokerResponse(r)})}static createProvider(i,e,n){return _t(this,null,function*(){i.trace("PlatformAuthExtensionHandler - createProvider called.");try{let r=new t(i,e,n,t0.PREFERRED_EXTENSION_ID);return yield r.sendHandshakeRequest(),r}catch{let o=new t(i,e,n);return yield o.sendHandshakeRequest(),o}})}sendHandshakeRequest(){return _t(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);let i={channel:t0.CHANNEL_ID,extensionId:this.extensionId,responseId:ph(),body:{method:Qz.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(i,window.origin,[this.messageChannel.port2]),new Promise((e,n)=>{this.handshakeResolvers.set(i.responseId,{resolve:e,reject:n}),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}),n(Er(jz)),this.handshakeResolvers.delete(i.responseId)},this.handshakeTimeoutMs)})})}onWindowMessage(i){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),i.source!==window)return;let e=i.data;if(!(!e.channel||e.channel!==t0.CHANNEL_ID)&&!(e.extensionId&&e.extensionId!==this.extensionId)&&e.body.method===Qz.HandshakeRequest){let n=this.handshakeResolvers.get(e.responseId);if(!n){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}),n.reject(Er($z))}}onChannelMessage(i){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");let e=i.data,n=this.resolvers.get(e.responseId),r=this.handshakeResolvers.get(e.responseId);try{let o=e.body.method;if(o===Qz.Response){if(!n)return;let a=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(a)}`),a.status!=="Success")n.reject(jN(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(jN(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw uz(rM.unexpectedError,"Event does not contain result.");this.resolvers.delete(e.responseId)}else if(o===Qz.HandshakeResponse){if(!r){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}),r.resolve(),this.handshakeResolvers.delete(e.responseId)}}catch(o){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${o}`),this.logger.errorPii(`Unable to parse ${i}`),n?n.reject(o):r&&r.reject(o)}}validatePlatformBrokerResponse(i){if(i.hasOwnProperty("access_token")&&i.hasOwnProperty("id_token")&&i.hasOwnProperty("client_info")&&i.hasOwnProperty("account")&&i.hasOwnProperty("scope")&&i.hasOwnProperty("expires_in"))return i;throw uz(rM.unexpectedError,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===t0.PREFERRED_EXTENSION_ID?"chrome":this.getExtensionId()?.length?"unknown":void 0}};var uoe=class t{constructor(i,e,n){this.logger=i,this.performanceClient=e,this.correlationId=n,this.platformAuthType=t0.PLATFORM_DOM_PROVIDER}static createProvider(i,e,n){return _t(this,null,function*(){if(i.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication&&(yield window.navigator.platformAuthentication.getSupportedContracts(t0.MICROSOFT_ENTRA_BROKERID))?.includes(t0.PLATFORM_DOM_APIS))return i.trace("Platform auth api available in DOM"),new t(i,e,n)})}getExtensionId(){return t0.MICROSOFT_ENTRA_BROKERID}getExtensionVersion(){return""}getExtensionName(){return t0.DOM_API_NAME}sendMessage(i){return _t(this,null,function*(){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{let e=this.initializePlatformDOMRequest(i),n=yield window.navigator.platformAuthentication.executeGetToken(e);return this.validatePlatformBrokerResponse(n)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}})}initializePlatformDOMRequest(i){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");let H=i,{accountId:e,clientId:n,authority:r,scope:o,redirectUri:a,correlationId:c,state:m,storeInCache:g,embeddedClientId:C,extraParameters:w}=H,P=O_(H,["accountId","clientId","authority","scope","redirectUri","correlationId","state","storeInCache","embeddedClientId","extraParameters"]),R=this.getDOMExtraParams(P);return{accountId:e,brokerId:this.getExtensionId(),authority:r,clientId:n,correlationId:c||this.correlationId,extraParameters:pe(pe({},w),R),isSecurityTokenService:!1,redirectUri:a,scope:o,state:m,storeInCache:g,embeddedClientId:C}}validatePlatformBrokerResponse(i){if(i.hasOwnProperty("isSuccess")){if(i.hasOwnProperty("accessToken")&&i.hasOwnProperty("idToken")&&i.hasOwnProperty("clientInfo")&&i.hasOwnProperty("account")&&i.hasOwnProperty("scopes")&&i.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(i);if(i.hasOwnProperty("error")){let e=i;if(e.isSuccess===!1&&e.error&&e.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),jN(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 uz(rM.unexpectedError,"Response missing expected properties.")}convertToPlatformBrokerResponse(i){return this.logger.trace(this.platformAuthType+" - convertToNativeResponse called"),{access_token:i.accessToken,id_token:i.idToken,client_info:i.clientInfo,account:i.account,expires_in:i.expiresIn,scope:i.scopes,state:i.state||"",properties:i.properties||{},extendedLifetimeToken:i.extendedLifetimeToken??!1,shr:i.proofOfPossessionPayload}}getDOMExtraParams(i){let e=Object.entries(i).reduce((r,[o,a])=>(r[o]=String(a),r),{});return pe({},e)}};function Aje(t,i,e,n){return _t(this,null,function*(){t.trace("getPlatformAuthProvider called",e);let r=Xkt();t.trace("Has client allowed platform auth via DOM API: "+r);let o;try{r&&(o=yield uoe.createProvider(t,i,e)),o||(t.trace("Platform auth via DOM API not available, checking for extension"),o=yield doe.createProvider(t,n||Fxe,i))}catch(a){t.trace("Platform auth not available",a)}return o})}function Xkt(){let t;try{return t=window[au.SessionStorage],t?.getItem(nje)==="true"}catch{return!1}}function TE(t,i,e,n){if(i.trace("isPlatformAuthAllowed called"),!t.system.allowPlatformBroker)return i.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!e)return i.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(n)switch(n){case rl.BEARER:case rl.POP:return i.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return i.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}var poe=class extends ny{constructor(i,e,n,r,o,a,c,m,g,C){super(i,e,n,r,o,a,c,g,C),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=m,this.eventHandler=o}acquireToken(i,e){let n;try{if(n={popupName:this.generatePopupName(i.scopes||Iv,i.authority||this.config.auth.authority),popupWindowAttributes:i.popupWindowAttributes||{},popupWindowParent:i.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(i,n,e);{let o=$e(pe({},i),{httpMethod:loe(i,this.config.auth.protocolMode)});return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(o,n,e)}}catch(r){return Promise.reject(r)}}logout(i){try{this.logger.verbose("logoutPopup called");let e=this.initializeLogoutRequest(i),n={popupName:this.generateLogoutPopupName(e),popupWindowAttributes:i?.popupWindowAttributes||{},popupWindowParent:i?.popupWindowParent??window},r=i&&i.authority,o=i&&i.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(e,n,r,o)):(this.logger.verbose("asyncPopup set to false, opening popup"),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(e,n,r,o))}catch(e){return Promise.reject(e)}}acquireTokenPopupAsync(i,e,n){return _t(this,null,function*(){this.logger.verbose("acquireTokenPopupAsync called");let r=yield bn(this.initializeAuthorizationRequest.bind(this),Ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(i,Mo.Popup);e.popup&&I$(r.authority);let o=TE(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme);return r.platformBroker=o,this.config.auth.protocolMode===yu.EAR?this.executeEarFlow(r,e):this.executeCodeFlow(r,e,n)})}executeCodeFlow(i,e,n){return _t(this,null,function*(){let r=i.correlationId,o=this.initializeServerTelemetryManager(ic.acquireTokenPopup),a=n||(yield bn(EM,Ct.GeneratePkceCodes,this.logger,this.performanceClient,r)(this.performanceClient,this.logger,r)),c=$e(pe({},i),{codeChallenge:a.challenge});try{let m=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,r)({serverTelemetryManager:o,requestAuthority:c.authority,requestAzureCloudOptions:c.azureCloudOptions,requestExtraQueryParameters:c.extraQueryParameters,account:c.account});if(c.httpMethod===Xb.POST)return yield this.executeCodeFlowWithPost(c,e,m,a.verifier);{let g=yield bn(s5,Ct.GetAuthCodeUrl,this.logger,this.performanceClient,r)(this.config,m.authority,c,this.logger,this.performanceClient),C=this.initiateAuthRequest(g,e);this.eventHandler.emitEvent(ro.POPUP_OPENED,Mo.Popup,{popupWindow:C},null);let w=yield this.monitorPopupForHash(C,e.popupWindowParent),P=tp(GN,Ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(w,this.config.auth.OIDCOptions.serverResponseType,this.logger);return yield bn($N,Ct.HandleResponseCode,this.logger,this.performanceClient,r)(i,P,a.verifier,ic.acquireTokenPopup,this.config,m,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(m){throw e.popup?.close(),m instanceof ds&&(m.setCorrelationId(this.correlationId),o.cacheFailedRequest(m)),m}})}executeEarFlow(i,e){return _t(this,null,function*(){let n=i.correlationId,r=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,n)({requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),o=yield bn(Xz,Ct.GenerateEarKey,this.logger,this.performanceClient,n)(),a=$e(pe({},i),{earJwk:o}),c=e.popup||this.openPopup("about:blank",e);(yield l5(c.document,this.config,r,a,this.logger,this.performanceClient)).submit();let g=yield bn(this.monitorPopupForHash.bind(this),Ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(c,e.popupWindowParent),C=tp(GN,Ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,this.config.auth.OIDCOptions.serverResponseType,this.logger);return bn(d5,Ct.HandleResponseEar,this.logger,this.performanceClient,n)(a,C,ic.acquireTokenPopup,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}executeCodeFlowWithPost(i,e,n,r){return _t(this,null,function*(){let o=i.correlationId,a=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,o)({requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),c=e.popup||this.openPopup("about:blank",e);(yield c5(c.document,this.config,a,i,this.logger,this.performanceClient)).submit();let g=yield bn(this.monitorPopupForHash.bind(this),Ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,o)(c,e.popupWindowParent),C=tp(GN,Ct.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,this.config.auth.OIDCOptions.serverResponseType,this.logger);return bn($N,Ct.HandleResponseCode,this.logger,this.performanceClient,o)(i,C,r,ic.acquireTokenPopup,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logoutPopupAsync(i,e,n,r){return _t(this,null,function*(){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ro.LOGOUT_START,Mo.Popup,i);let o=this.initializeServerTelemetryManager(ic.logoutPopup);try{yield this.clearCacheOnLogout(this.correlationId,i.account);let a=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:n,account:i.account||void 0});try{a.authority.endSessionEndpoint}catch{if(i.account?.homeAccountId&&i.postLogoutRedirectUri&&a.authority.protocolMode===yu.OIDC){if(this.eventHandler.emitEvent(ro.LOGOUT_SUCCESS,Mo.Popup,i),r){let g={apiId:ic.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=Gs.getAbsoluteUrl(r,i0());yield this.navigationClient.navigateInternal(C,g)}e.popup?.close();return}}let c=a.getLogoutUri(i);this.eventHandler.emitEvent(ro.LOGOUT_SUCCESS,Mo.Popup,i);let m=this.openPopup(c,e);if(this.eventHandler.emitEvent(ro.POPUP_OPENED,Mo.Popup,{popupWindow:m},null),yield this.monitorPopupForHash(m,e.popupWindowParent).catch(()=>{}),r){let g={apiId:ic.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=Gs.getAbsoluteUrl(r,i0());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),yield this.navigationClient.navigateInternal(C,g)}else this.logger.verbose("No main window navigation requested")}catch(a){throw e.popup?.close(),a instanceof ds&&(a.setCorrelationId(this.correlationId),o.cacheFailedRequest(a)),this.eventHandler.emitEvent(ro.LOGOUT_FAILURE,Mo.Popup,null,a),this.eventHandler.emitEvent(ro.LOGOUT_END,Mo.Popup),a}this.eventHandler.emitEvent(ro.LOGOUT_END,Mo.Popup)})}initiateAuthRequest(i,e){if(i)return this.logger.infoPii(`Navigate to: ${i}`),this.openPopup(i,e);throw this.logger.error("Navigate url is empty"),Er(vw)}monitorPopupForHash(i,e){return new Promise((n,r)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");let o=setInterval(()=>{if(i.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),r(Er(Jx));return}let a="";try{a=i.location.href}catch{}if(!a||a==="about:blank")return;clearInterval(o);let c="",m=this.config.auth.OIDCOptions.serverResponseType;i&&(m===dw.QUERY?c=i.location.search:c=i.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),n(c)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(i,e)})}openPopup(i,e){try{let n;if(e.popup?(n=e.popup,this.logger.verbosePii(`Navigating popup window to: ${i}`),n.location.assign(i)):typeof e.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${i}`),n=this.openSizedPopup(i,e)),!n)throw Er(Dz);return n.focus&&n.focus(),this.currentWindow=n,e.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),Er(Az)}}openSizedPopup(i,{popupName:e,popupWindowAttributes:n,popupWindowParent:r}){let o=r.screenLeft?r.screenLeft:r.screenX,a=r.screenTop?r.screenTop:r.screenY,c=r.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,m=r.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,g=n.popupSize?.width,C=n.popupSize?.height,w=n.popupPosition?.top,P=n.popupPosition?.left;return(!g||g<0||g>c)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=ip.POPUP_WIDTH),(!C||C<0||C>m)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),C=ip.POPUP_HEIGHT),(!w||w<0||w>m)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),w=Math.max(0,m/2-ip.POPUP_HEIGHT/2+a)),(!P||P<0||P>c)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),P=Math.max(0,c/2-ip.POPUP_WIDTH/2+o)),r.open(i,e,`width=${g}, height=${C}, top=${w}, left=${P}, scrollbars=yes`)}unloadWindow(i){this.currentWindow&&this.currentWindow.close(),i.preventDefault()}cleanPopup(i,e){i.close(),e.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(i,e){return`${ip.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${i.join("-")}.${e}.${this.correlationId}`}generateLogoutPopupName(i){let e=i.account&&i.account.homeAccountId;return`${ip.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e}.${this.correlationId}`}};function Jkt(){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 moe=class extends ny{constructor(i,e,n,r,o,a,c,m,g,C){super(i,e,n,r,o,a,c,g,C),this.nativeStorage=m}acquireToken(i){return _t(this,null,function*(){let e=yield bn(this.initializeAuthorizationRequest.bind(this),Ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(i,Mo.Redirect);e.platformBroker=TE(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme);let n=o=>{o.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(ro.RESTORE_FROM_BFCACHE,Mo.Redirect))},r=this.getRedirectStartPage(i.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${r}`),this.browserStorage.setTemporaryCache(np.ORIGIN_URI,r,!0),window.addEventListener("pageshow",n);try{this.config.auth.protocolMode===yu.EAR?yield this.executeEarFlow(e):yield this.executeCodeFlow(e,i.onRedirectNavigate)}catch(o){throw o instanceof ds&&o.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",n),o}})}executeCodeFlow(i,e){return _t(this,null,function*(){let n=i.correlationId,r=this.initializeServerTelemetryManager(ic.acquireTokenRedirect),o=yield bn(EM,Ct.GeneratePkceCodes,this.logger,this.performanceClient,n)(this.performanceClient,this.logger,n),a=$e(pe({},i),{codeChallenge:o.challenge});this.browserStorage.cacheAuthorizeRequest(a,o.verifier);try{if(a.httpMethod===Xb.POST)return yield this.executeCodeFlowWithPost(a);{let c=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account}),m=yield bn(s5,Ct.GetAuthCodeUrl,this.logger,this.performanceClient,i.correlationId)(this.config,c.authority,a,this.logger,this.performanceClient);return yield this.initiateAuthRequest(m,e)}}catch(c){throw c instanceof ds&&(c.setCorrelationId(this.correlationId),r.cacheFailedRequest(c)),c}})}executeEarFlow(i){return _t(this,null,function*(){let e=i.correlationId,n=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),r=yield bn(Xz,Ct.GenerateEarKey,this.logger,this.performanceClient,e)(),o=$e(pe({},i),{earJwk:r});return this.browserStorage.cacheAuthorizeRequest(o),(yield l5(document,this.config,n,o,this.logger,this.performanceClient)).submit(),new Promise((c,m)=>{setTimeout(()=>{m(Er(LN,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}executeCodeFlowWithPost(i){return _t(this,null,function*(){let e=i.correlationId,n=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account});return this.browserStorage.cacheAuthorizeRequest(i),(yield c5(document,this.config,n,i,this.logger,this.performanceClient)).submit(),new Promise((o,a)=>{setTimeout(()=>{a(Er(LN,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}handleRedirectPromise(i="",e,n,r){return _t(this,null,function*(){let o=this.initializeServerTelemetryManager(ic.handleRedirectPromise);try{let[a,c]=this.getRedirectResponse(i||"");if(!a)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),Jkt()!=="back_forward"?r.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;let m=this.browserStorage.getTemporaryCache(np.ORIGIN_URI,!0)||Dn.EMPTY_STRING,g=hw.normalizeUrlForComparison(m),C=hw.normalizeUrlForComparison(window.location.href);if(g===C&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),m.indexOf("#")>-1&&Rxe(m),yield this.handleResponse(a,e,n,o);if(this.config.auth.navigateToLoginRequestUrl){if(!S$()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(np.URL_HASH,c,!0);let w={apiId:ic.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},P=!0;if(!m||m==="null"){let R=Pxe();this.browserStorage.setTemporaryCache(np.ORIGIN_URI,R,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),P=yield this.navigationClient.navigateInternal(R,w)}else this.logger.verbose(`Navigating to loginRequestUrl: ${m}`),P=yield this.navigationClient.navigateInternal(m,w);if(!P)return yield this.handleResponse(a,e,n,o)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),yield this.handleResponse(a,e,n,o);return null}catch(a){throw a instanceof ds&&(a.setCorrelationId(this.correlationId),o.cacheFailedRequest(a)),a}})}getRedirectResponse(i){this.logger.verbose("getRedirectResponseHash called");let e=i;e||(this.config.auth.OIDCOptions.serverResponseType===dw.QUERY?e=window.location.search:e=window.location.hash);let n=hw.getDeserializedResponse(e);if(n){try{yje(n,this.browserCrypto,Mo.Redirect)}catch(o){return o instanceof ds&&this.logger.error(`Interaction type validation failed due to ${o.errorCode}: ${o.errorMessage}`),[null,""]}return x$(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,e]}let r=this.browserStorage.getTemporaryCache(np.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(np.URL_HASH)),r&&(n=hw.getDeserializedResponse(r),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,r]):[null,""]}handleResponse(i,e,n,r){return _t(this,null,function*(){if(!i.state)throw Er(vM);if(i.ear_jwe){let c=yield bn(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 bn(d5,Ct.HandleResponseEar,this.logger,this.performanceClient,e.correlationId)(e,i,ic.acquireTokenRedirect,this.config,c,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}let a=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e.authority});return bn($N,Ct.HandleResponseCode,this.logger,this.performanceClient,e.correlationId)(e,i,n,ic.acquireTokenRedirect,this.config,a,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}initiateAuthRequest(i,e){return _t(this,null,function*(){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),i){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${i}`);let n={apiId:ic.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=e||this.config.auth.onRedirectNavigate;if(typeof r=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),r(i)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),yield this.navigationClient.navigateExternal(i,n);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(i,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Er(vw)})}logout(i){return _t(this,null,function*(){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(i),n=this.initializeServerTelemetryManager(ic.logout);try{this.eventHandler.emitEvent(ro.LOGOUT_START,Mo.Redirect,i),yield this.clearCacheOnLogout(this.correlationId,e.account);let r={apiId:ic.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i&&i.authority,requestExtraQueryParameters:i?.extraQueryParameters,account:i&&i.account||void 0});if(o.authority.protocolMode===yu.OIDC)try{o.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId){this.eventHandler.emitEvent(ro.LOGOUT_SUCCESS,Mo.Redirect,e);return}}let a=o.getLogoutUri(e);if(this.eventHandler.emitEvent(ro.LOGOUT_SUCCESS,Mo.Redirect,e),i&&typeof i.onRedirectNavigate=="function")if(i.onRedirectNavigate(a)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,e1.SIGNOUT),yield this.navigationClient.navigateExternal(a,r);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,e1.SIGNOUT),yield this.navigationClient.navigateExternal(a,r);return}}catch(r){throw r instanceof ds&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),this.eventHandler.emitEvent(ro.LOGOUT_FAILURE,Mo.Redirect,null,r),this.eventHandler.emitEvent(ro.LOGOUT_END,Mo.Redirect),r}this.eventHandler.emitEvent(ro.LOGOUT_END,Mo.Redirect)})}getRedirectStartPage(i){let e=i||window.location.href;return Gs.getAbsoluteUrl(e,i0())}};function Dje(t,i,e,n,r){return _t(this,null,function*(){if(i.addQueueMeasurement(Ct.SilentHandlerInitiateAuthRequest,n),!t)throw e.info("Navigate url is empty"),Er(vw);return r?bn(eMt,Ct.SilentHandlerLoadFrame,e,i,n)(t,r,i,n):tp(tMt,Ct.SilentHandlerLoadFrameSync,e,i,n)(t)})}function kje(t,i,e,n,r){return _t(this,null,function*(){let o=hoe();if(!o.contentDocument)throw"No document associated with iframe!";return(yield c5(o.contentDocument,t,i,e,n,r)).submit(),o})}function Mje(t,i,e,n,r){return _t(this,null,function*(){let o=hoe();if(!o.contentDocument)throw"No document associated with iframe!";return(yield l5(o.contentDocument,t,i,e,n,r)).submit(),o})}function Uxe(t,i,e,n,r,o,a){return _t(this,null,function*(){return n.addQueueMeasurement(Ct.SilentHandlerMonitorIframeForHash,o),new Promise((c,m)=>{i{window.clearInterval(C),m(Er(kz))},i),C=window.setInterval(()=>{let w="",P=t.contentWindow;try{w=P?P.location.href:""}catch{}if(!w||w==="about:blank")return;let R="";P&&(a===dw.QUERY?R=P.location.search:R=P.location.hash),window.clearTimeout(g),window.clearInterval(C),c(R)},e)}).finally(()=>{tp(iMt,Ct.RemoveHiddenIframe,r,n,o)(t)})})}function eMt(t,i,e,n){return e.addQueueMeasurement(Ct.SilentHandlerLoadFrame,n),new Promise((r,o)=>{let a=hoe();window.setTimeout(()=>{if(!a){o("Unable to load iframe");return}a.src=t,r(a)},i)})}function tMt(t){let i=hoe();return i.src=t,i}function hoe(){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 iMt(t){document.body===t.parentNode&&document.body.removeChild(t)}var foe=class extends ny{constructor(i,e,n,r,o,a,c,m,g,C,w){super(i,e,n,r,o,a,m,C,w),this.apiId=c,this.nativeStorage=g}acquireToken(i){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.SilentIframeClientAcquireToken,i.correlationId),!i.loginHint&&!i.sid&&(!i.account||!i.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");let e=pe({},i);e.prompt?e.prompt!==Zp.NONE&&e.prompt!==Zp.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${e.prompt} with ${Zp.NONE}`),e.prompt=Zp.NONE):e.prompt=Zp.NONE;let n=yield bn(this.initializeAuthorizationRequest.bind(this),Ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,i.correlationId)(e,Mo.Silent);return n.platformBroker=TE(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme),I$(n.authority),this.config.auth.protocolMode===yu.EAR?this.executeEarFlow(n):this.executeCodeFlow(n)})}executeCodeFlow(i){return _t(this,null,function*(){let e,n=this.initializeServerTelemetryManager(this.apiId);try{return e=yield bn(this.createAuthCodeClient.bind(this),Ct.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,i.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),yield bn(this.silentTokenHelper.bind(this),Ct.SilentIframeClientTokenHelper,this.logger,this.performanceClient,i.correlationId)(e,i)}catch(r){if(r instanceof ds&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),!e||!(r instanceof ds)||r.errorCode!==ip.INVALID_GRANT_ERROR)throw r;return this.performanceClient.addFields({retryError:r.errorCode},this.correlationId),yield bn(this.silentTokenHelper.bind(this),Ct.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(e,i)}})}executeEarFlow(i){return _t(this,null,function*(){let e=i.correlationId,n=yield bn(this.getDiscoveredAuthority.bind(this),Ct.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),r=yield bn(Xz,Ct.GenerateEarKey,this.logger,this.performanceClient,e)(),o=$e(pe({},i),{earJwk:r}),a=yield bn(Mje,Ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,e)(this.config,n,o,this.logger,this.performanceClient),c=this.config.auth.OIDCOptions.serverResponseType,m=yield bn(Uxe,Ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,e)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,e,c),g=tp(GN,Ct.DeserializeResponse,this.logger,this.performanceClient,e)(m,c,this.logger);return bn(d5,Ct.HandleResponseEar,this.logger,this.performanceClient,e)(o,g,this.apiId,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logout(){return Promise.reject(Er(bw))}silentTokenHelper(i,e){return _t(this,null,function*(){let n=e.correlationId;this.performanceClient.addQueueMeasurement(Ct.SilentIframeClientTokenHelper,n);let r=yield bn(EM,Ct.GeneratePkceCodes,this.logger,this.performanceClient,n)(this.performanceClient,this.logger,n),o=$e(pe({},e),{codeChallenge:r.challenge}),a;if(e.httpMethod===Xb.POST)a=yield bn(kje,Ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(this.config,i.authority,o,this.logger,this.performanceClient);else{let C=yield bn(s5,Ct.GetAuthCodeUrl,this.logger,this.performanceClient,n)(this.config,i.authority,o,this.logger,this.performanceClient);a=yield bn(Dje,Ct.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(C,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait)}let c=this.config.auth.OIDCOptions.serverResponseType,m=yield bn(Uxe,Ct.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,c),g=tp(GN,Ct.DeserializeResponse,this.logger,this.performanceClient,n)(m,c,this.logger);return bn($N,Ct.HandleResponseCode,this.logger,this.performanceClient,n)(e,g,r.verifier,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}};var goe=class extends ny{acquireToken(i){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.SilentRefreshClientAcquireToken,i.correlationId);let e=yield bn(A$,Ct.InitializeBaseRequest,this.logger,this.performanceClient,i.correlationId)(i,this.config,this.performanceClient,this.logger),n=pe(pe({},i),e);i.redirectUri&&(n.redirectUri=this.getRedirectUri(i.redirectUri));let r=this.initializeServerTelemetryManager(ic.acquireTokenSilent_silentFlow),o=yield this.createRefreshTokenClient({serverTelemetryManager:r,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return bn(o.acquireTokenByRefreshToken.bind(o),Ct.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,i.correlationId)(n).catch(a=>{throw a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a),a})})}logout(){return Promise.reject(Er(bw))}createRefreshTokenClient(i){return _t(this,null,function*(){let e=yield bn(this.getClientConfiguration.bind(this),Ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i.serverTelemetryManager,requestAuthority:i.authorityUrl,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account});return new g$(e,this.performanceClient)})}};var _oe=class{constructor(i,e,n,r){this.isBrowserEnvironment=typeof window<"u",this.config=i,this.storage=e,this.logger=n,this.cryptoObj=r}loadExternalTokens(i,e,n){return _t(this,null,function*(){if(!this.isBrowserEnvironment)throw Er(Cw);let r=i.correlationId||ph(),o=e.id_token?hz.extractTokenClaims(e.id_token,Gg):void 0,a={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},c=i.authority?new Jb(Jb.generateAuthority(i.authority,i.azureCloudOptions),this.config.system.networkClient,this.storage,a,this.logger,i.correlationId||ph()):void 0,m=yield this.loadAccount(i,n.clientInfo||e.client_info||"",r,o,c),g=yield this.loadIdToken(e,m.homeAccountId,m.environment,m.realm,r),C=yield this.loadAccessToken(i,e,m.homeAccountId,m.environment,m.realm,n,r),w=yield this.loadRefreshToken(e,m.homeAccountId,m.environment,r);return this.generateAuthenticationResult(i,{account:m,idToken:g,accessToken:C,refreshToken:w},o,c)})}loadAccount(i,e,n,r,o){return _t(this,null,function*(){if(this.logger.verbose("TokenCache - loading account"),i.account){let g=ig.createFromAccountInfo(i.account);return yield this.storage.setAccount(g,n),g}else if(!o||!e&&!r)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Er(Vz);let a=ig.generateHomeAccountId(e,o.authorityType,this.logger,this.cryptoObj,r),c=r?.tid,m=xz(this.storage,o,a,Gg,n,r,e,o.hostnameAndPort,c,void 0,void 0,this.logger);return yield this.storage.setAccount(m,n),m})}loadIdToken(i,e,n,r,o){return _t(this,null,function*(){if(!i.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");let a=vp.createIdTokenEntity(e,n,i.id_token,this.config.auth.clientId,r);return yield this.storage.setIdTokenCredential(a,o),a})}loadAccessToken(i,e,n,r,o,a,c){return _t(this,null,function*(){if(e.access_token)if(e.expires_in){if(!e.scope&&(!i.scopes||!i.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?ep.fromString(e.scope):new ep(i.scopes),g=a.expiresOn||e.expires_in+uh.nowSeconds(),C=a.extendedExpiresOn||(e.ext_expires_in||e.expires_in)+uh.nowSeconds(),w=vp.createAccessTokenEntity(n,r,e.access_token,this.config.auth.clientId,o,m.printScopes(),g,C,Gg);return yield this.storage.setAccessTokenCredential(w,c),w})}loadRefreshToken(i,e,n,r){return _t(this,null,function*(){if(!i.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");let o=vp.createRefreshTokenEntity(e,n,i.refresh_token,this.config.auth.clientId,i.foci,void 0,i.refresh_token_expires_in);return yield this.storage.setRefreshTokenCredential(o,r),o})}generateAuthenticationResult(i,e,n,r){let o="",a=[],c=null,m;e?.accessToken&&(o=e.accessToken.secret,a=ep.fromString(e.accessToken.target).asArray(),c=uh.toDateFromSeconds(e.accessToken.expiresOn),m=uh.toDateFromSeconds(e.accessToken.extendedExpiresOn));let g=e.account;return{authority:r?r.canonicalAuthority:"",uniqueId:e.account.localAccountId,tenantId:e.account.realm,scopes:a,account:g.getAccountInfo(),idToken:e.idToken?.secret||"",idTokenClaims:n||{},accessToken:o,fromCache:!0,expiresOn:c,correlationId:i.correlationId||"",requestId:"",extExpiresOn:m,familyId:e.refreshToken?.familyId||"",tokenType:e?.accessToken?.tokenType||"",state:i.state||"",cloudGraphHostName:g.cloudGraphHostName||"",msGraphHost:g.msGraphHost||"",fromNativeBroker:!1}}};var yoe=class extends ON{constructor(i){super(i),this.includeRedirectUri=!1}};var voe=class extends ny{constructor(i,e,n,r,o,a,c,m,g,C){super(i,e,n,r,o,a,m,g,C),this.apiId=c}acquireToken(i){return _t(this,null,function*(){if(!i.code)throw Er(zz);let e=yield bn(this.initializeAuthorizationRequest.bind(this),Ct.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,i.correlationId)(i,Mo.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{let r=$e(pe({},e),{code:i.code}),o=yield bn(this.getClientConfiguration.bind(this),Ct.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,i.correlationId)({serverTelemetryManager:n,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=new yoe(o);this.logger.verbose("Auth code client created");let c=new o5(a,this.browserStorage,r,this.logger,this.performanceClient);return yield bn(c.handleCodeResponseFromServer.bind(c),Ct.HandleCodeResponseFromServer,this.logger,this.performanceClient,i.correlationId)({code:i.code,msgraph_host:i.msGraphHost,cloud_graph_host_name:i.cloudGraphHostName,cloud_instance_host_name:i.cloudInstanceHostName},e,!1)}catch(r){throw r instanceof ds&&(r.setCorrelationId(this.correlationId),n.cacheFailedRequest(r)),r}})}logout(){return Promise.reject(Er(bw))}};function Oje(t,i,e){let n=window.msal?.clientIds||[],r=n.length,o=n.filter(a=>a===t).length;o>1&&e.warning("There is already an instance of MSAL.js in the window with the same client id."),i.add({msalInstanceCount:r,sameClientIdInstanceCount:o})}function Tw(t){let i=t?.idTokenClaims;if(i?.tfp||i?.acr)return"B2C";if(i?.tid){if(i?.tid==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function boe(t,i){try{w$(t)}catch(e){throw i.end({success:!1},e),e}}var u5=class t{constructor(i){this.operatingContext=i,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=i.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 t5(this.logger,this.performanceClient):dM,this.eventHandler=new soe(this.logger),this.browserStorage=this.isBrowserEnvironment?new n5(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,pxe(this.config.auth)):lje(this.config.auth.clientId,this.logger,this.performanceClient,this.eventHandler);let e={cacheLocation:au.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:au.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new n5(this.config.auth.clientId,e,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new _oe(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(i,e){return _t(this,null,function*(){let n=new t(i);return yield n.initialize(e),n})}trackPageVisibility(i){i&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},i))}initialize(i,e){return _t(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(ro.INITIALIZE_END);return}let n=i?.correlationId||this.getRequestCorrelationId(),r=this.config.system.allowPlatformBroker,o=this.performanceClient.startMeasurement(Ct.InitializeClientApplication,n);if(this.eventHandler.emitEvent(ro.INITIALIZE_START),!e)try{this.logMultipleInstances(o)}catch{}if(yield bn(this.browserStorage.initialize.bind(this.browserStorage),Ct.InitializeCache,this.logger,this.performanceClient,n)(n),r)try{this.platformAuthProvider=yield Aje(this.logger,this.performanceClient,n,this.config.system.nativeBrokerHandshakeTimeout)}catch(a){this.logger.verbose(a)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),tp(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Ct.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,n)(n)),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(n)),this.initialized=!0,this.eventHandler.emitEvent(ro.INITIALIZE_END),o.end({allowPlatformBroker:r,success:!0})})}handleRedirectPromise(i){return _t(this,null,function*(){if(this.logger.verbose("handleRedirectPromise called"),Kre(this.initialized),this.isBrowserEnvironment){let e=i||"",n=this.redirectResponse.get(e);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(i),this.redirectResponse.set(e,n),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"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null})}handleRedirectPromiseInternal(i){return _t(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===e1.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 n=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),o=r&&this.platformAuthProvider&&!i,a;this.eventHandler.emitEvent(ro.HANDLE_REDIRECT_START,Mo.Redirect);let c;try{if(o&&this.platformAuthProvider){a=this.performanceClient.startMeasurement(Ct.AcquireTokenRedirect,r?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),a.add({isPlatformBrokerRequest:!0});let m=new TM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ic.handleRedirectPromise,this.performanceClient,this.platformAuthProvider,r.accountId,this.nativeInternalStorage,r.correlationId);c=bn(m.handleRedirectPromise.bind(m),Ct.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,a.event.correlationId)(this.performanceClient,a.event.correlationId)}else{let[m,g]=this.browserStorage.getCachedRequest(),C=m.correlationId;a=this.performanceClient.startMeasurement(Ct.AcquireTokenRedirect,C),this.logger.trace("handleRedirectPromise - acquiring token from web flow");let w=this.createRedirectClient(C);c=bn(w.handleRedirectPromise.bind(w),Ct.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,a.event.correlationId)(i,m,g,a)}}catch(m){throw this.browserStorage.resetRequestCache(),m}return c.then(m=>(m?(this.browserStorage.resetRequestCache(),n.length{this.browserStorage.resetRequestCache();let g=m;throw n.length>0?this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_FAILURE,Mo.Redirect,null,g):this.eventHandler.emitEvent(ro.LOGIN_FAILURE,Mo.Redirect,null,g),this.eventHandler.emitEvent(ro.HANDLE_REDIRECT_END,Mo.Redirect),a.end({success:!1},g),m})})}acquireTokenRedirect(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i);this.logger.verbose("acquireTokenRedirect called",e);let n=this.performanceClient.startMeasurement(Ct.AcquireTokenPreRedirect,e);n.add({accountType:Tw(i.account),scenarioId:i.scenarioId});let r=i.onRedirectNavigate;if(r)i.onRedirectNavigate=a=>{let c=typeof r=="function"?r(a):void 0;return n.add({navigateCallbackResult:c!==!1}),n.event=n.end({success:!0})||n.event,c};else{let a=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=c=>{let m=typeof a=="function"?a(c):void 0;return n.add({navigateCallbackResult:m!==!1}),n.event=n.end({success:!0})||n.event,m}}let o=this.getAllAccounts().length>0;try{Wre(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,e1.SIGNIN),o?this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_START,Mo.Redirect,i):this.eventHandler.emitEvent(ro.LOGIN_START,Mo.Redirect,i);let a;return this.platformAuthProvider&&this.canUsePlatformBroker(i)?a=new TM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ic.acquireTokenRedirect,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(i),this.nativeInternalStorage,e).acquireTokenRedirect(i,n).catch(m=>{if(n.add({brokerErrorName:m.name,brokerErrorCode:m.errorCode}),m instanceof tC&&IM(m))return this.platformAuthProvider=void 0,this.createRedirectClient(e).acquireToken(i);if(m instanceof tf)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(e).acquireToken(i);throw m}):a=this.createRedirectClient(e).acquireToken(i),yield a}catch(a){throw this.browserStorage.resetRequestCache(),n.event.status===2?this.performanceClient.startMeasurement(Ct.AcquireTokenRedirect,e).end({success:!1},a):n.end({success:!1},a),o?this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_FAILURE,Mo.Redirect,null,a):this.eventHandler.emitEvent(ro.LOGIN_FAILURE,Mo.Redirect,null,a),a}})}acquireTokenPopup(i){let e=this.getRequestCorrelationId(i),n=this.performanceClient.startMeasurement(Ct.AcquireTokenPopup,e);n.add({scenarioId:i.scenarioId,accountType:Tw(i.account)});try{this.logger.verbose("acquireTokenPopup called",e),boe(this.initialized,n),this.browserStorage.setInteractionInProgress(!0,e1.SIGNIN)}catch(c){return Promise.reject(c)}let r=this.getAllAccounts();r.length>0?this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_START,Mo.Popup,i):this.eventHandler.emitEvent(ro.LOGIN_START,Mo.Popup,i);let o,a=this.getPreGeneratedPkceCodes(e);return this.canUsePlatformBroker(i)?(n.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative($e(pe({},i),{correlationId:e}),ic.acquireTokenPopup).then(c=>(n.end({success:!0,accountType:Tw(c.account)}),c)).catch(c=>{if(n.add({brokerErrorName:c.name,brokerErrorCode:c.errorCode}),c instanceof tC&&IM(c))return this.platformAuthProvider=void 0,this.createPopupClient(e).acquireToken(i,a);if(c instanceof tf)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(e).acquireToken(i,a);throw c})):o=this.createPopupClient(e).acquireToken(i,a),o.then(c=>(r.length(r.length>0?this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_FAILURE,Mo.Popup,null,c):this.eventHandler.emitEvent(ro.LOGIN_FAILURE,Mo.Popup,null,c),n.end({success:!1},c),Promise.reject(c))).finally(()=>_t(this,null,function*(){this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(e))}))}trackPageVisibilityWithMeasurement(){let i=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;i&&(this.logger.info("Perf: Visibility change detected in ",i.event.name),i.increment({visibilityChangeCount:1}))}ssoSilent(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i),n=$e(pe({},i),{prompt:i.prompt,correlationId:e});this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Ct.SsoSilent,e),this.ssoSilentMeasurement?.add({scenarioId:i.scenarioId,accountType:Tw(i.account)}),boe(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",e),this.eventHandler.emitEvent(ro.SSO_SILENT_START,Mo.Silent,n);let r;return this.canUsePlatformBroker(n)?(this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative(n,ic.ssoSilent).catch(o=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof tC&&IM(o))return this.platformAuthProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw o})):r=this.createSilentIframeClient(n.correlationId).acquireToken(n),r.then(o=>(this.eventHandler.emitEvent(ro.SSO_SILENT_SUCCESS,Mo.Silent,o),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length,accountType:Tw(o.account)}),o)).catch(o=>{throw this.eventHandler.emitEvent(ro.SSO_SILENT_FAILURE,Mo.Silent,null,o),this.ssoSilentMeasurement?.end({success:!1},o),o}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenByCode(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i);this.logger.trace("acquireTokenByCode called",e);let n=this.performanceClient.startMeasurement(Ct.AcquireTokenByCode,e);boe(this.initialized,n),this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_BY_CODE_START,Mo.Silent,i),n.add({scenarioId:i.scenarioId});try{if(i.code&&i.nativeAccountId)throw Er(Hz);if(i.code){let r=i.code,o=this.hybridAuthCodeResponses.get(r);return o?(this.logger.verbose("Existing acquireTokenByCode request found",e),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",e),o=this.acquireTokenByCodeAsync($e(pe({},i),{correlationId:e})).then(a=>(this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_BY_CODE_SUCCESS,Mo.Silent,a),this.hybridAuthCodeResponses.delete(r),n.end({success:!0,accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length,accountType:Tw(a.account)}),a)).catch(a=>{throw this.hybridAuthCodeResponses.delete(r),this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_BY_CODE_FAILURE,Mo.Silent,null,a),n.end({success:!1},a),a}),this.hybridAuthCodeResponses.set(r,o)),yield o}else if(i.nativeAccountId)if(this.canUsePlatformBroker(i,i.nativeAccountId)){n.add({isPlatformBrokerRequest:!0});let r=yield this.acquireTokenNative($e(pe({},i),{correlationId:e}),ic.acquireTokenByCode,i.nativeAccountId).catch(o=>{throw o instanceof tC&&IM(o)&&(this.platformAuthProvider=void 0),n.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o});return n.end({accountType:Tw(r.account),success:!0}),r}else throw Er(Gz);else throw Er(Uz)}catch(r){throw this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_BY_CODE_FAILURE,Mo.Silent,null,r),n.end({success:!1},r),r}})}acquireTokenByCodeAsync(i){return _t(this,null,function*(){return this.logger.trace("acquireTokenByCodeAsync called",i.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Ct.AcquireTokenByCodeAsync,i.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),yield this.createSilentAuthCodeClient(i.correlationId).acquireToken(i).then(r=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:r.fromCache}),r)).catch(r=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},r),r}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenFromCache(i,e){return _t(this,null,function*(){switch(this.performanceClient.addQueueMeasurement(Ct.AcquireTokenFromCache,i.correlationId),e){case nf.Default:case nf.AccessToken:case nf.AccessTokenAndRefreshToken:let n=this.createSilentCacheClient(i.correlationId);return bn(n.acquireToken.bind(n),Ct.SilentCacheClientAcquireToken,this.logger,this.performanceClient,i.correlationId)(i);default:throw jn(dh.tokenRefreshRequired)}})}acquireTokenByRefreshToken(i,e){return _t(this,null,function*(){switch(this.performanceClient.addQueueMeasurement(Ct.AcquireTokenByRefreshToken,i.correlationId),e){case nf.Default:case nf.AccessTokenAndRefreshToken:case nf.RefreshToken:case nf.RefreshTokenAndNetwork:let n=this.createSilentRefreshClient(i.correlationId);return bn(n.acquireToken.bind(n),Ct.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,i.correlationId)(i);default:throw jn(dh.tokenRefreshRequired)}})}acquireTokenBySilentIframe(i){return _t(this,null,function*(){this.performanceClient.addQueueMeasurement(Ct.AcquireTokenBySilentIframe,i.correlationId);let e=this.createSilentIframeClient(i.correlationId);return bn(e.acquireToken.bind(e),Ct.SilentIframeClientAcquireToken,this.logger,this.performanceClient,i.correlationId)(i)})}logout(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",e),this.logoutRedirect(pe({correlationId:e},i))})}logoutRedirect(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i);return Wre(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,e1.SIGNOUT),this.createRedirectClient(e).logout(i)})}logoutPopup(i){try{let e=this.getRequestCorrelationId(i);return w$(this.initialized),this.browserStorage.setInteractionInProgress(!0,e1.SIGNOUT),this.createPopupClient(e).logout(i).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}clearCache(i){return _t(this,null,function*(){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}let e=this.getRequestCorrelationId(i);return this.createSilentCacheClient(e).logout(i)})}getAllAccounts(i){let e=this.getRequestCorrelationId();return cje(this.logger,this.browserStorage,this.isBrowserEnvironment,e,i)}getAccount(i){let e=this.getRequestCorrelationId();return dje(i,this.logger,this.browserStorage,e)}getAccountByUsername(i){let e=this.getRequestCorrelationId();return uje(i,this.logger,this.browserStorage,e)}getAccountByHomeId(i){let e=this.getRequestCorrelationId();return pje(i,this.logger,this.browserStorage,e)}getAccountByLocalId(i){let e=this.getRequestCorrelationId();return mje(i,this.logger,this.browserStorage,e)}setActiveAccount(i){let e=this.getRequestCorrelationId();hje(i,this.browserStorage,e)}getActiveAccount(){let i=this.getRequestCorrelationId();return fje(this.browserStorage,i)}hydrateCache(i,e){return _t(this,null,function*(){this.logger.verbose("hydrateCache called");let n=ig.createFromAccountInfo(i.account,i.cloudGraphHostName,i.msGraphHost);return yield this.browserStorage.setAccount(n,i.correlationId),i.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(i,e)):this.browserStorage.hydrateCache(i,e)})}acquireTokenNative(i,e,n,r){return _t(this,null,function*(){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Er(xM);return new TM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e,this.performanceClient,this.platformAuthProvider,n||this.getNativeAccountId(i),this.nativeInternalStorage,i.correlationId).acquireToken(i,r)})}canUsePlatformBroker(i,e){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!TE(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(i.prompt)switch(i.prompt){case Zp.NONE:case Zp.CONSENT:case Zp.LOGIN:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${i.prompt} is not compatible with platform broker flow, returning false`),!1}return!e&&!this.getNativeAccountId(i)?(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(i){let e=i.account||this.getAccount({loginHint:i.loginHint,sid:i.sid})||this.getActiveAccount();return e&&e.nativeAccountId||""}createPopupClient(i){return new poe(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,i)}createRedirectClient(i){return new moe(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,i)}createSilentIframeClient(i){return new foe(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ic.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,i)}createSilentCacheClient(i){return new a5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,i)}createSilentRefreshClient(i){return new goe(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,i)}createSilentAuthCodeClient(i){return new voe(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,ic.acquireTokenByCode,this.performanceClient,this.platformAuthProvider,i)}addEventCallback(i,e){return this.eventHandler.addEventCallback(i,e)}removeEventCallback(i){this.eventHandler.removeEventCallback(i)}addPerformanceCallback(i){return Yre(),this.performanceClient.addPerformanceCallback(i)}removePerformanceCallback(i){return this.performanceClient.removePerformanceCallback(i)}enableAccountStorageEvents(){if(this.config.cache.cacheLocation!==au.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!==au.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(i){this.logger=i}initializeWrapperLibrary(i,e){this.browserStorage.setWrapperMetadata(i,e)}setNavigationClient(i){this.navigationClient=i}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(i){return i?.correlationId?i.correlationId:this.isBrowserEnvironment?ph():Dn.EMPTY_STRING}loginRedirect(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i);return this.logger.verbose("loginRedirect called",e),this.acquireTokenRedirect(pe({correlationId:e},i||Cxe))})}loginPopup(i){let e=this.getRequestCorrelationId(i);return this.logger.verbose("loginPopup called",e),this.acquireTokenPopup(pe({correlationId:e},i||Cxe))}acquireTokenSilent(i){return _t(this,null,function*(){let e=this.getRequestCorrelationId(i),n=this.performanceClient.startMeasurement(Ct.AcquireTokenSilent,e);n.add({cacheLookupPolicy:i.cacheLookupPolicy,scenarioId:i.scenarioId}),boe(this.initialized,n),this.logger.verbose("acquireTokenSilent called",e);let r=i.account||this.getActiveAccount();if(!r)throw Er(Pz);return n.add({accountType:Tw(r)}),this.acquireTokenSilentDeduped(i,r,e).then(o=>(n.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),$e(pe({},o),{state:i.state,correlationId:e}))).catch(o=>{throw o instanceof ds&&o.setCorrelationId(e),n.end({success:!1},o),o})})}acquireTokenSilentDeduped(i,e,n){return _t(this,null,function*(){let r=CE(this.config.auth.clientId,$e(pe({},i),{authority:i.authority||this.config.auth.authority,correlationId:n}),e.homeAccountId),o=JSON.stringify(r),a=this.activeSilentTokenRequests.get(o);if(typeof a>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),this.performanceClient.addFields({deduped:!1},n);let c=bn(this.acquireTokenSilentAsync.bind(this),Ct.AcquireTokenSilentAsync,this.logger,this.performanceClient,n)($e(pe({},i),{correlationId:n}),e);return this.activeSilentTokenRequests.set(o,c),c.finally(()=>{this.activeSilentTokenRequests.delete(o)})}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),this.performanceClient.addFields({deduped:!0},n),a})}acquireTokenSilentAsync(i,e){return _t(this,null,function*(){let n=()=>this.trackPageVisibility(i.correlationId);this.performanceClient.addQueueMeasurement(Ct.AcquireTokenSilentAsync,i.correlationId),this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_START,Mo.Silent,i),i.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},i.correlationId),document.addEventListener("visibilitychange",n);let r=yield bn(gje,Ct.InitializeSilentRequest,this.logger,this.performanceClient,i.correlationId)(i,e,this.config,this.performanceClient,this.logger),o=i.cacheLookupPolicy||nf.Default;return this.acquireTokenSilentNoIframe(r,o).catch(c=>_t(this,null,function*(){if(nMt(c,o))if(this.activeIframeRequest)if(o!==nf.Skip){let[g,C]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${C}`,r.correlationId);let w=this.performanceClient.startMeasurement(Ct.AwaitConcurrentIframe,r.correlationId);w.add({awaitIframeCorrelationId:C});let P=yield g;if(w.end({success:P}),P)return this.logger.verbose(`Parallel iframe request with correlationId: ${C} succeeded. Retrying cache and/or RT redemption`,r.correlationId),this.acquireTokenSilentNoIframe(r,o);throw this.logger.info(`Iframe request with correlationId: ${C} failed. Interaction is required.`),c}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.",r.correlationId),bn(this.acquireTokenBySilentIframe.bind(this),Ct.AcquireTokenBySilentIframe,this.logger,this.performanceClient,r.correlationId)(r);else{let g;return this.activeIframeRequest=[new Promise(C=>{g=C}),r.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),bn(this.acquireTokenBySilentIframe.bind(this),Ct.AcquireTokenBySilentIframe,this.logger,this.performanceClient,r.correlationId)(r).then(C=>(g(!0),C)).catch(C=>{throw g(!1),C}).finally(()=>{this.activeIframeRequest=void 0})}else throw c})).then(c=>(this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_SUCCESS,Mo.Silent,c),i.correlationId&&this.performanceClient.addFields({fromCache:c.fromCache},i.correlationId),c)).catch(c=>{throw this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_FAILURE,Mo.Silent,null,c),c}).finally(()=>{document.removeEventListener("visibilitychange",n)})})}acquireTokenSilentNoIframe(i,e){return _t(this,null,function*(){return TE(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme)&&i.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},i.correlationId),this.acquireTokenNative(i,ic.acquireTokenSilent_silentFlow,i.account.nativeAccountId,e).catch(n=>_t(this,null,function*(){throw this.performanceClient.addFields({brokerErrorName:n.name,brokerErrorCode:n.errorCode},i.correlationId),n instanceof tC&&IM(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,jn(dh.tokenRefreshRequired)):n}))):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),e===nf.AccessToken&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),bn(this.acquireTokenFromCache.bind(this),Ct.AcquireTokenFromCache,this.logger,this.performanceClient,i.correlationId)(i,e).catch(n=>{if(e===nf.AccessToken)throw n;return this.eventHandler.emitEvent(ro.ACQUIRE_TOKEN_NETWORK_START,Mo.Silent,i),bn(this.acquireTokenByRefreshToken.bind(this),Ct.AcquireTokenByRefreshToken,this.logger,this.performanceClient,i.correlationId)(i,e)}))})}preGeneratePkceCodes(i){return _t(this,null,function*(){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=yield bn(EM,Ct.GeneratePkceCodes,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),Promise.resolve()})}getPreGeneratedPkceCodes(i){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");let e=this.pkceCode?pe({},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},i),e}logMultipleInstances(i){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),Oje(e,i,this.logger)}};function nMt(t,i){let e=!(t instanceof tf&&t.subError!==_w.badToken),n=t.errorCode===ip.INVALID_GRANT_ERROR||t.errorCode===dh.tokenRefreshRequired,r=e&&n||t.errorCode===_w.noTokensFound||t.errorCode===_w.refreshTokenExpired,o=MGe.includes(i);return r&&o}function Rje(t,i){return _t(this,null,function*(){let e=new toe(t);return yield e.initialize(),u5.createController(e,i)})}var D$=class t{static createPublicClientApplication(i){return _t(this,null,function*(){let e=yield Rje(i);return new t(i,e)})}constructor(i,e){this.isBroker=!1,this.controller=e||new u5(new toe(i))}initialize(i){return _t(this,null,function*(){return this.controller.initialize(i,this.isBroker)})}acquireTokenPopup(i){return _t(this,null,function*(){return this.controller.acquireTokenPopup(i)})}acquireTokenRedirect(i){return this.controller.acquireTokenRedirect(i)}acquireTokenSilent(i){return this.controller.acquireTokenSilent(i)}acquireTokenByCode(i){return this.controller.acquireTokenByCode(i)}addEventCallback(i,e){return this.controller.addEventCallback(i,e)}removeEventCallback(i){return this.controller.removeEventCallback(i)}addPerformanceCallback(i){return this.controller.addPerformanceCallback(i)}removePerformanceCallback(i){return this.controller.removePerformanceCallback(i)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(i){return this.controller.getAccount(i)}getAccountByHomeId(i){return this.controller.getAccountByHomeId(i)}getAccountByLocalId(i){return this.controller.getAccountByLocalId(i)}getAccountByUsername(i){return this.controller.getAccountByUsername(i)}getAllAccounts(i){return this.controller.getAllAccounts(i)}handleRedirectPromise(i){return this.controller.handleRedirectPromise(i)}loginPopup(i){return this.controller.loginPopup(i)}loginRedirect(i){return this.controller.loginRedirect(i)}logout(i){return this.controller.logout(i)}logoutRedirect(i){return this.controller.logoutRedirect(i)}logoutPopup(i){return this.controller.logoutPopup(i)}ssoSilent(i){return this.controller.ssoSilent(i)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(i){this.controller.setLogger(i)}setActiveAccount(i){this.controller.setActiveAccount(i)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(i,e){return this.controller.initializeWrapperLibrary(i,e)}setNavigationClient(i){this.controller.setNavigationClient(i)}getConfiguration(){return this.controller.getConfiguration()}hydrateCache(i,e){return _t(this,null,function*(){return this.controller.hydrateCache(i,e)})}clearCache(i){return this.controller.clearCache(i)}};var k$=class{static getInteractionStatusFromEvent(i,e){switch(i.eventType){case ro.LOGIN_START:return Vd.Login;case ro.SSO_SILENT_START:return Vd.SsoSilent;case ro.ACQUIRE_TOKEN_START:if(i.interactionType===Mo.Redirect||i.interactionType===Mo.Popup)return Vd.AcquireToken;break;case ro.HANDLE_REDIRECT_START:return Vd.HandleRedirect;case ro.LOGOUT_START:return Vd.Logout;case ro.SSO_SILENT_SUCCESS:case ro.SSO_SILENT_FAILURE:if(e&&e!==Vd.SsoSilent)break;return Vd.None;case ro.LOGOUT_END:if(e&&e!==Vd.Logout)break;return Vd.None;case ro.HANDLE_REDIRECT_END:if(e&&e!==Vd.HandleRedirect)break;return Vd.None;case ro.LOGIN_SUCCESS:case ro.LOGIN_FAILURE:case ro.ACQUIRE_TOKEN_SUCCESS:case ro.ACQUIRE_TOKEN_FAILURE:case ro.RESTORE_FROM_BFCACHE:if(i.interactionType===Mo.Redirect||i.interactionType===Mo.Popup){if(e&&e!==Vd.Login&&e!==Vd.AcquireToken)break;return Vd.None}break}return null}};var Coe="@azure/msal-angular",M$="4.0.19",p5=new Mi("MSAL_INSTANCE"),qN=new Mi("MSAL_GUARD_CONFIG"),Hxe=new Mi("MSAL_INTERCEPTOR_CONFIG"),rMt=new Mi("MSAL_BROADCAST_CONFIG"),EE=(()=>{class t{constructor(e,n){this.msalInstance=e,this.msalBroadcastConfig=n,this.msalBroadcastConfig&&this.msalBroadcastConfig.eventsToReplay>0?(this.msalInstance.getLogger().clone(Coe,M$).verbose(`BroadcastService - eventsToReplay set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`),this._msalSubject=new hi(this.msalBroadcastConfig.eventsToReplay)):this._msalSubject=new Ai,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new Sa(Vd.Startup),this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback(r=>{this._msalSubject.next(r);let o=k$.getInteractionStatusFromEvent(r,this._inProgress.value);o!==null&&(this.msalInstance.getLogger().clone(Coe,M$).verbose(`BroadcastService - ${r.eventType} results in setting inProgress from ${this._inProgress.value} to ${o}`),this._inProgress.next(o))})}resetInProgressEvent(){this._inProgress.value===Vd.Startup&&this._inProgress.next(Vd.None)}}return t.\u0275fac=function(e){return new(e||t)(ai(p5),ai(rMt,8))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),ry=(()=>{class t{constructor(e,n,r){this.instance=e,this.location=n,this.injector=r;let o=this.location.path(!0).split("#").pop();o&&(this.redirectHash=`#${o}`),this.instance.initializeWrapperLibrary(Sxe.Angular,M$)}initialize(){return Hr(this.instance.initialize())}acquireTokenPopup(e){return Hr(this.instance.acquireTokenPopup(e))}acquireTokenRedirect(e){return Hr(this.instance.acquireTokenRedirect(e))}acquireTokenSilent(e){return Hr(this.instance.acquireTokenSilent(e))}handleRedirectObservable(e){return Hr(this.instance.initialize().then(()=>this.instance.handleRedirectPromise(e||this.redirectHash)).finally(()=>{this.injector.get(EE).resetInProgressEvent()}))}loginPopup(e){return Hr(this.instance.loginPopup(e))}loginRedirect(e){return Hr(this.instance.loginRedirect(e))}logout(e){return Hr(this.instance.logout(e))}logoutRedirect(e){return Hr(this.instance.logoutRedirect(e))}logoutPopup(e){return Hr(this.instance.logoutPopup(e))}ssoSilent(e){return Hr(this.instance.ssoSilent(e))}getLogger(){return this.logger||(this.logger=this.instance.getLogger().clone(Coe,M$)),this.logger}setLogger(e){this.logger=e.clone(Coe,M$),this.instance.setLogger(e)}}return t.\u0275fac=function(e){return new(e||t)(ai(p5),ai(Lg),ai(Ir))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),Rc=(()=>{class t{constructor(e,n,r,o,a){this.msalGuardConfig=e,this.msalBroadcastService=n,this.authService=r,this.location=o,this.router=a,this.msalBroadcastService.inProgress$.subscribe()}parseUrl(e){return this.router.parseUrl(e)}getDestinationUrl(e){this.authService.getLogger().verbose("Guard - getting destination url");let n=document.getElementsByTagName("base"),r=this.location.normalize(n.length?n[0].href:window.location.origin),o=this.location.prepareExternalUrl(e);return o.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),`${r}/${o}`):`${r}${e}`}loginInteractively(e){let n=typeof this.msalGuardConfig.authRequest=="function"?this.msalGuardConfig.authRequest(this.authService,e):pe({},this.msalGuardConfig.authRequest);if(this.msalGuardConfig.interactionType===Mo.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(n).pipe(ot(o=>(this.authService.getLogger().verbose("Guard - login by popup successful, can activate, setting active account"),this.authService.instance.setActiveAccount(o.account),!0)));this.authService.getLogger().verbose("Guard - logging in by redirect");let r=this.getDestinationUrl(e.url);return this.authService.loginRedirect(pe({redirectStartPage:r},n)).pipe(ot(()=>!1))}activateHelper(e){if(this.msalGuardConfig.interactionType!==Mo.Popup&&this.msalGuardConfig.interactionType!==Mo.Redirect)throw new VN("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(Gs.hashContainsKnownProperties(window.location.hash)&&Qre.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."),$t(!1)}else return this.authService.getLogger().info("Guard - window is undefined, MSAL does not support server-side token acquisition"),$t(!0);this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute));let n=this.location.path(!0);return this.authService.initialize().pipe(Uh(()=>this.authService.handleRedirectObservable()),Uh(()=>{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"),$t(!1));if(this.authService.getLogger().verbose("Guard - at least 1 account exists, can activate or load"),e){let r=this.includesCode(e.url),o=!!e.root&&!!e.root.fragment&&this.includesCode(`#${e.root.fragment}`),a=this.location.prepareExternalUrl(e.url).indexOf("#")===0;if(r&&(o||a))return this.authService.getLogger().info("Guard - Hash contains known code response, stopping navigation."),n.indexOf("#")>-1?$t(this.parseUrl(this.location.path())):$t(this.parseUrl(""))}return $t(!0)}),Ac(r=>(this.authService.getLogger().error("Guard - error while logging in, unable to activate"),this.authService.getLogger().errorPii(`Guard - error: ${r.message}`),this.loginFailedRoute&&e?(this.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),$t(this.loginFailedRoute)):$t(!1))))}includesCode(e){return e.lastIndexOf("/code")>-1&&e.lastIndexOf("/code")===e.length-5||e.indexOf("#code=")>-1||e.indexOf("&code=")>-1}canActivate(e,n){return this.authService.getLogger().verbose("Guard - canActivate"),this.activateHelper(n)}canActivateChild(e,n){return this.authService.getLogger().verbose("Guard - canActivateChild"),this.activateHelper(n)}canMatch(){return this.authService.getLogger().verbose("Guard - canLoad"),this.activateHelper()}}return t.\u0275fac=function(e){return new(e||t)(ai(qN),ai(EE),ai(ry),ai(Lg),ai(Ws))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),Pje=(()=>{class t{constructor(e,n,r,o,a){this.msalInterceptorConfig=e,this.authService=n,this.location=r,this.msalBroadcastService=o,this._document=a}intercept(e,n){if(this.msalInterceptorConfig.interactionType!==Mo.Popup&&this.msalInterceptorConfig.interactionType!==Mo.Redirect)throw new VN("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 r=this.getScopesForEndpoint(e.url,e.method);if(!r||r.length===0)return this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),n.handle(e);let o;this.authService.instance.getActiveAccount()?(this.authService.getLogger().verbose("Interceptor - active account selected"),o=this.authService.instance.getActiveAccount()):(this.authService.getLogger().verbose("Interceptor - no active account, fallback to first account"),o=this.authService.instance.getAllAccounts()[0]);let a=typeof this.msalInterceptorConfig.authRequest=="function"?this.msalInterceptorConfig.authRequest(this.authService,e,{account:o}):$e(pe({},this.msalInterceptorConfig.authRequest),{account:o});return this.authService.getLogger().info(`Interceptor - ${r.length} scopes found for endpoint`),this.authService.getLogger().infoPii(`Interceptor - [${r}] scopes found for ${e.url}`),this.acquireToken(a,r,o).pipe(On(c=>{this.authService.getLogger().verbose("Interceptor - setting authorization headers");let m=e.headers.set("Authorization",`Bearer ${c.accessToken}`),g=e.clone({headers:m});return n.handle(g)}))}acquireToken(e,n,r){return this.authService.acquireTokenSilent($e(pe({},e),{scopes:n,account:r})).pipe(Ac(()=>(this.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(ar(1),On(o=>o===Vd.None?this.acquireTokenInteractively(e,n):this.msalBroadcastService.inProgress$.pipe(vn(a=>a===Vd.None),ar(1),On(()=>this.acquireToken(e,n,r))))))),On(o=>o.accessToken?$t(o):(this.authService.getLogger().error("Interceptor - acquireTokenSilent resolved with null access token. Known issue with B2C tenants, invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(vn(a=>a===Vd.None),ar(1),On(()=>this.acquireTokenInteractively(e,n))))))}acquireTokenInteractively(e,n){if(this.msalInterceptorConfig.interactionType===Mo.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup($e(pe({},e),{scopes:n}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");let r=window.location.href;return this.authService.acquireTokenRedirect($e(pe({},e),{scopes:n,redirectStartPage:r})),Xd}getScopesForEndpoint(e,n){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");let r=this.location.normalize(e),o=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()),a=this.matchResourcesToEndpoint(o,r);return a.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,a,n):null}matchResourcesToEndpoint(e,n){let r=[];return e.forEach(o=>{let a=this.location.normalize(o),c=this.getAbsoluteUrl(a),m=new URL(c),g=this.getAbsoluteUrl(n),C=new URL(g);this.checkUrlComponents(m,C)&&r.push(o)}),r}checkUrlComponents(e,n){let r=["protocol","host","pathname","search","hash"];for(let o of r)if(e[o]){let a=decodeURIComponent(e[o]);if(!Bd.matchPattern(a,n[o]))return!1}return!0}getAbsoluteUrl(e){let n=this._document.createElement("a");return n.href=e,n.href}matchScopesToEndpoint(e,n,r){let o=[];return n.forEach(a=>{let c=[],m=e.get(a);if(m===null){o.push(null);return}m.forEach(g=>{if(typeof g=="string")c.push(g);else{let C=r.toLowerCase();g.httpMethod.toLowerCase()===C&&(g.scopes===null?o.push(null):g.scopes.forEach(P=>{c.push(P)}))}}),c.length>0&&o.push(c)}),o.length>0?(o.length>1&&this.authService.getLogger().warning("Interceptor - More than 1 matching scopes for endpoint found."),o[0]):null}}return t.\u0275fac=function(e){return new(e||t)(ai(Hxe),ai(ry),ai(Lg),ai(EE),ai(Gr))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})();var em=(()=>{class t{_msalBroadcastService;_environmentService;_msalService;_destroying$=new Ai;_accountInfo=new hi(1);_authentication=new Sa(!1);msalInitialized=new Bf;authentication$=this._authentication.asObservable().pipe(vm());accountInfo$=this._accountInfo.asObservable();constructor(e,n,r){this._msalBroadcastService=e,this._environmentService=n,this._msalService=r,this._init()}static successEvent(e){return e.eventType===ro.LOGIN_SUCCESS||e.eventType===ro.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(vn(e=>e===Vd.None),ha(this._destroying$)).subscribe(()=>{this.msalInitialized.next(),this.msalInitialized.complete();try{let e=this._msalService.instance.getAllAccounts(),n=this._msalService.instance.getActiveAccount();this._authentication.next(e.length>0),this._accountInfo.next(n??null)}catch{}})}static \u0275fac=function(n){return new(n||t)(ai(EE),ai(xr),ai(ry))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function oMt(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"button",2),te("click",function(){se(e);let r=L();return le(r.action())}),ee(2),M()()}if(t&2){let e=L();E(2),gn(" ",e.data.action," ")}}var aMt=["label"];function sMt(t,i){}var lMt=Math.pow(2,31)-1,YN=class{_overlayRef;instance;containerInstance;_afterDismissed=new Ai;_afterOpened=new Ai;_onAction=new Ai;_durationTimeoutId;_dismissedByAction=!1;constructor(i,e){this._overlayRef=e,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,lMt))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},xoe=new Mi("MatSnackBarData"),AM=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},cMt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return t})(),dMt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return t})(),uMt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return t})(),pMt=(()=>{class t{snackBarRef=ae(YN);data=ae(xoe);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(n,r){n&1&&(O(0,"div",0),ee(1),M(),yt(2,oMt,3,1,"div",1)),n&2&&(E(),gn(" ",r.data.message,` `),E(),vt(r.hasAction?2:-1))},dependencies:[Kr,cMt,dMt,uMt],styles:[`.mat-mdc-simple-snack-bar{display:flex} `],encapsulation:2,changeDetection:0})}return t})(),Gxe="_mat-snack-bar-enter",jxe="_mat-snack-bar-exit",mMt=(()=>{class t extends Ok{_ngZone=ae(Pn);_elementRef=ae(qn);_changeDetectorRef=ae(dn);_platform=ae(_s);_animationsDisabled=tl();snackBarConfig=ae(AM);_document=ae(Gr);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=ae(Ir);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new Ai;_onExit=new Ai;_onEnter=new Ai;_animationState="void";_live;_label;_role;_liveElementId=ae(Tl).getId("mat-snack-bar-container-live-");constructor(){super();let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),n}attachTemplatePortal(e){this._assertNotAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),n}attachDomPortal=e=>{this._assertNotAttached();let n=this._portalOutlet.attachDomPortal(e);return this._afterPortalAttached(),n};onAnimationEnd(e){e===jxe?this._completeExit():e===Gxe&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?Rd(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Gxe)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(Gxe)},200)))}exit(){return this._destroyed?$t(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?Rd(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(jxe)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(jxe),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(a=>e.classList.add(a)):e.classList.add(n)),this._exposeToModals();let r=this._label.nativeElement,o="mdc-snackbar__label";r.classList.toggle(o,!r.querySelector(`.${o}`))}_exposeToModals(){let e=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{let n=e.getAttribute("aria-owns");if(n){let r=n.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let e=this._elementRef.nativeElement,n=e.querySelector("[aria-hidden]"),r=e.querySelector("[aria-live]");if(n&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(o=document.activeElement),n.removeAttribute("aria-hidden"),r.appendChild(n),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,r){if(n&1&&(Xi(Gp,7),Xi(aMt,7)),n&2){let o;ze(o=Ue())&&(r._portalOutlet=o.first),ze(o=Ue())&&(r._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(n,r){n&1&&te("animationend",function(a){return r.onAnimationEnd(a.animationName)})("animationcancel",function(a){return r.onAnimationEnd(a.animationName)}),n&2&&zn("mat-snack-bar-container-enter",r._animationState==="visible")("mat-snack-bar-container-exit",r._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!r._animationsDisabled)},features:[Tt],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,r){n&1&&(O(0,"div",1)(1,"div",2,0)(3,"div",3),ie(4,sMt,0,0,"ng-template",4),M(),be(5,"div"),M()()),n&2&&(E(5),lt("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[Gp],styles:[`@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-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);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1} `],encapsulation:2})}return t})();function hMt(){return new AM}var fMt=new Mi("mat-snack-bar-default-options",{providedIn:"root",factory:hMt}),Fje=(()=>{class t{_live=ae(x7);_injector=ae(Ir);_breakpointObserver=ae(yv);_parentSnackBar=ae(t,{optional:!0,skipSelf:!0});_defaultConfig=ae(fMt);_animationsDisabled=tl();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=pMt;snackBarContainerComponent=mMt;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(){}openFromComponent(e,n){return this._attach(e,n)}openFromTemplate(e,n){return this._attach(e,n)}open(e,n="",r){let o=pe(pe({},this._defaultConfig),r);return o.data={message:e,action:n},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,n){let r=n&&n.viewContainerRef&&n.viewContainerRef.injector,o=Ir.create({parent:r||this._injector,providers:[{provide:AM,useValue:n}]}),a=new qh(this.snackBarContainerComponent,n.viewContainerRef,o),c=e.attach(a);return c.instance.snackBarConfig=n,c.instance}_attach(e,n){let r=pe(pe(pe({},new AM),this._defaultConfig),n),o=this._createOverlay(r),a=this._attachSnackBarContainer(o,r),c=new YN(a,o);if(e instanceof Bl){let m=new Yh(e,null,{$implicit:r.data,snackBarRef:c});c.instance=a.attachTemplatePortal(m)}else{let m=this._createInjector(r,c),g=new qh(e,void 0,m),C=a.attachComponentPortal(g);c.instance=C.instance}return this._breakpointObserver.observe(j_.HandsetPortrait).pipe(ha(o.detachments())).subscribe(m=>{o.overlayElement.classList.toggle(this.handsetCssClass,m.matches)}),r.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(c,r),this._openedSnackBarRef=c,this._openedSnackBarRef}_animateSnackBar(e,n){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),n.duration&&n.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(n.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter()}_createOverlay(e){let n=new Lb;n.direction=e.direction;let r=zk(this._injector),o=e.direction==="rtl",a=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!o||e.horizontalPosition==="end"&&o,c=!a&&e.horizontalPosition!=="center";return a?r.left("0"):c?r.right("0"):r.centerHorizontally(),e.verticalPosition==="top"?r.top("0"):r.bottom("0"),n.positionStrategy=r,n.disableAnimations=this._animationsDisabled,Bb(this._injector,n)}_createInjector(e,n){let r=e&&e.viewContainerRef&&e.viewContainerRef.injector;return Ir.create({parent:r||this._injector,providers:[{provide:YN,useValue:n},{provide:xoe,useValue:e.data}]})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $xe=class{_document;_textarea;constructor(i,e){this._document=e;let n=this._textarea=this._document.createElement("textarea"),r=n.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,n.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(n)}copy(){let i=this._textarea,e=!1;try{if(i){let n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),e=this._document.execCommand("copy"),n&&n.focus()}}catch{}return e}destroy(){let i=this._textarea;i&&(i.remove(),this._textarea=void 0)}},qxe=(()=>{class t{_document=ae(Gr);constructor(){}copy(e){let n=this.beginCopy(e),r=n.copy();return n.destroy(),r}beginCopy(e){return new $xe(e,this._document)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gMt=new Mi("CDK_COPY_TO_CLIPBOARD_CONFIG"),m5=(()=>{class t{_clipboard=ae(qxe);_ngZone=ae(Pn);text="";attempts=1;copied=new ve;_pending=new Set;_destroyed;_currentTimeout;constructor(){let e=ae(gMt,{optional:!0});e&&e.attempts!=null&&(this.attempts=e.attempts)}copy(e=this.attempts){if(e>1){let n=e,r=this._clipboard.beginCopy(this.text);this._pending.add(r);let o=()=>{let a=r.copy();!a&&--n&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(o,1)):(this._currentTimeout=null,this._pending.delete(r),r.destroy(),this.copied.emit(a))};o()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(e=>e.destroy()),this._pending.clear(),this._destroyed=!0}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(n,r){n&1&&te("click",function(){return r.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}})}return t})();function yMt(t,i){if(t&1&&(O(0,"span",3),ee(1),M()),t&2){let e=L();E(),Pt(e.data.title)}}function vMt(t,i){if(t&1&&(O(0,"span",4),ee(1),M()),t&2){let e=L();E(),Pt(e.data.message)}}var Bje=(()=>{class t{data;_msalInstance;snackBarRef;_clipboard;_msalService;constructor(e,n,r,o,a){this.data=e,this._msalInstance=n,this.snackBarRef=r,this._clipboard=o,this._msalService=a}copyJwtToken(){this._msalService.instance.acquireTokenSilent({account:this._msalService.instance.getActiveAccount(),authority:this._msalInstance.getConfiguration().auth.authority,scopes:[this._msalInstance.getConfiguration().auth.clientId]}).then(e=>this._clipboard.copy(`Bearer ${e.accessToken}`))}static \u0275fac=function(n){return new(n||t)(xe(xoe),xe(p5),xe(YN),xe(qxe),xe(ry))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:11,vars:2,consts:[[1,"flex","flex-row","gap-0","items-center","justify-between"],[1,"flex-1"],[1,"flex","flex-col","xl:flex-row","gap-0","xl:gap-6"],[1,"mat-body-strong"],[1,"mat-body"],["mat-icon-button","","matTooltip","Generate JWT Token",3,"click"],["mat-icon-button","","matTooltip","Close",3,"click"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2),yt(3,yMt,2,1,"span",3),yt(4,vMt,2,1,"span",4),M()(),O(5,"button",5),te("click",function(){return r.copyJwtToken()}),O(6,"mat-icon"),ee(7,"generating_tokens"),M()(),O(8,"button",6),te("click",function(){return r.snackBarRef.dismiss()}),O(9,"mat-icon"),ee(10,"close"),M()()()),n&2&&(E(3),vt(r.data!=null&&r.data.title?3:-1),E(),vt(r.data!=null&&r.data.message?4:-1))},dependencies:[so,il,Xf,Ld,da,zr],encapsulation:2})}return t})();var Soe=class{_msalGuardConfig;_msalBroadcastService;_msalService;_authenticationService;isIframe=!1;loggedIn=!1;destroy$=new Ai;constructor(i,e,n,r){this._msalGuardConfig=i,this._msalBroadcastService=e,this._msalService=n,this._authenticationService=r}onDestroy(){this.destroy$.next(),this.destroy$.complete()}_initAuthenticationRoot(){this.isIframe=window!==window.parent&&!window.opener,this._msalService.handleRedirectObservable().subscribe(),this._msalBroadcastService.inProgress$.pipe(vn(i=>i===Vd.None),ha(this.destroy$)).subscribe(()=>{this._setLoginDisplay(),this._checkAndSetActiveAccount()}),this._msalBroadcastService.msalSubject$.pipe(vn(i=>i.eventType===ro.LOGIN_SUCCESS||i.eventType===ro.ACQUIRE_TOKEN_SUCCESS||i.eventType===ro.SSO_SILENT_SUCCESS),ha(this.destroy$)).subscribe(i=>{let e=i.payload,n=e.idTokenClaims;(n.acr==="B2C_1_2025_sign_in"||n.tfp==="B2C_1_2025_sign_in")&&this._msalService.instance.setActiveAccount(e.account)})}_setLoginDisplay(){this.loggedIn=this._msalService.instance.getAllAccounts().length>0}_checkAndSetActiveAccount(){let i=this._msalService.instance.getActiveAccount();!i&&this._msalService.instance.getAllAccounts().length>0&&(i=this._msalService.instance.getAllAccounts()[0],this._msalService.instance.setActiveAccount(i)),this._authenticationService.setAuthenticationState(!!i),this._authenticationService.setAccountInfoState(i)}_initBanner(i,e){if(e.load("BD_STAGING_BANNER",!0)==="true"){let r=new AM;r.horizontalPosition="center",r.verticalPosition="top",r.duration=0,r.politeness="polite",r.panelClass=["bd-app-container-banner"],r.data={title:"Testsystem",message:"Werte k\xF6nnen abweichen oder va\xADri\xADie\xADren"},i.openFromComponent(Bje,r)}}};var Vje=` .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 bMt=["sublist"],CMt=t=>({processedItem:t}),xMt=()=>({exact:!1}),SMt=(t,i)=>({$implicit:t,hasSubmenu:i}),wMt=t=>({display:t});function IMt(t,i){if(t&1&&be(0,"li",7),t&2){let e=L().$implicit,n=L();is(n.getItemProp(e,"style")),Pe(n.cn(n.cx("separator"),n.getItemProp(e,"class"),n.getItemProp(e,"styleClass"))),lt("id",n.getItemId(e))("data-pc-section","separator")}}function TMt(t,i){if(t&1&&be(0,"span",18),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("itemIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle")),lt("data-pc-section","icon")("tabindex",-1)}}function EMt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),lt("data-pc-section","label"),E(),gn(" ",n.getItemLabel(e)," ")}}function AMt(t,i){if(t&1&&be(0,"span",19),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),D("innerHTML",n.getItemLabel(e),Dx),lt("data-pc-section","label")}}function DMt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("itemBadge"),n.getItemProp(e,"badgeStyleClass"))),E(),Pt(n.getItemProp(e,"badge"))}}function kMt(t,i){if(t&1&&(Pi(),be(0,"svg",22)),t&2){let e=L(6);Pe(e.cx("submenuIcon")),lt("data-pc-section","submenuicon")("aria-hidden",!0)}}function MMt(t,i){}function OMt(t,i){t&1&&ie(0,MMt,0,0,"ng-template",23),t&2&&(D("data-pc-section","submenuicon"),uc("aria-hidden",!0))}function RMt(t,i){if(t&1&&(fi(0),ie(1,kMt,1,4,"svg",20)(2,OMt,1,2,null,21),gi()),t&2){let e=L(5);E(),D("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),E(),D("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function PMt(t,i){if(t&1&&(O(0,"a",14),ie(1,TMt,1,5,"span",15)(2,EMt,2,4,"span",16)(3,AMt,1,4,"ng-template",null,2,di)(5,DMt,2,3,"span",17)(6,RMt,3,2,"ng-container",10),M()),t&2){let e=Oi(4),n=L(3).$implicit,r=L();Pe(r.cx("itemLink")),D("target",r.getItemProp(n,"target")),lt("href",r.getItemProp(n,"url"),td)("data-automationid",r.getItemProp(n,"automationId"))("data-pc-section","action")("tabindex",-1),E(),D("ngIf",r.getItemProp(n,"icon")),E(),D("ngIf",r.getItemProp(n,"escape"))("ngIfElse",e),E(3),D("ngIf",r.getItemProp(n,"badge")),E(),D("ngIf",r.isItemGroup(n))}}function NMt(t,i){if(t&1&&be(0,"span",18),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("itemIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle")),lt("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function FMt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),lt("data-pc-section","label"),E(),gn(" ",n.getItemLabel(e)," ")}}function LMt(t,i){if(t&1&&be(0,"span",19),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),D("innerHTML",n.getItemLabel(e),Dx),lt("data-pc-section","label")}}function BMt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("itemBadge"),n.getItemProp(e,"badgeStyleClass"))),E(),Pt(n.getItemProp(e,"badge"))}}function VMt(t,i){if(t&1&&(Pi(),be(0,"svg",22)),t&2){let e=L(6);Pe(e.cx("submenuIcon")),lt("data-pc-section","submenuicon")("aria-hidden",!0)}}function zMt(t,i){}function UMt(t,i){t&1&&ie(0,zMt,0,0,"ng-template",23),t&2&&(D("data-pc-section","submenuicon"),uc("aria-hidden",!0))}function HMt(t,i){if(t&1&&(fi(0),ie(1,VMt,1,4,"svg",20)(2,UMt,1,2,null,21),gi()),t&2){let e=L(5);E(),D("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),E(),D("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function GMt(t,i){if(t&1&&(O(0,"a",24),ie(1,NMt,1,6,"span",15)(2,FMt,2,4,"span",16)(3,LMt,1,4,"ng-template",null,2,di)(5,BMt,2,3,"span",17)(6,HMt,3,2,"ng-container",10),M()),t&2){let e=Oi(4),n=L(3).$implicit,r=L();Pe(r.cx("itemLink")),D("routerLink",r.getItemProp(n,"routerLink"))("queryParams",r.getItemProp(n,"queryParams"))("routerLinkActive","p-tieredmenu-item-link-active")("routerLinkActiveOptions",r.getItemProp(n,"routerLinkActiveOptions")||Vr(21,xMt))("target",r.getItemProp(n,"target"))("fragment",r.getItemProp(n,"fragment"))("queryParamsHandling",r.getItemProp(n,"queryParamsHandling"))("preserveFragment",r.getItemProp(n,"preserveFragment"))("skipLocationChange",r.getItemProp(n,"skipLocationChange"))("replaceUrl",r.getItemProp(n,"replaceUrl"))("state",r.getItemProp(n,"state")),lt("data-automationid",r.getItemProp(n,"automationId"))("tabindex",-1)("data-pc-section","action"),E(),D("ngIf",r.getItemProp(n,"icon")),E(),D("ngIf",r.getItemProp(n,"escape"))("ngIfElse",e),E(3),D("ngIf",r.getItemProp(n,"badge")),E(),D("ngIf",r.isItemGroup(n))}}function jMt(t,i){if(t&1&&(fi(0),ie(1,PMt,7,12,"a",12)(2,GMt,7,22,"a",13),gi()),t&2){let e=L(2).$implicit,n=L();E(),D("ngIf",!n.getItemProp(e,"routerLink")),E(),D("ngIf",n.getItemProp(e,"routerLink"))}}function $Mt(t,i){}function qMt(t,i){t&1&&ie(0,$Mt,0,0,"ng-template")}function YMt(t,i){if(t&1&&(fi(0),ie(1,qMt,1,0,null,25),gi()),t&2){let e=L(2).$implicit,n=L();E(),D("ngTemplateOutlet",n.itemTemplate)("ngTemplateOutletContext",na(2,SMt,e.item,n.getItemProp(e,"items")))}}function KMt(t,i){if(t&1){let e=qe();O(0,"p-tieredmenusub",26),te("itemClick",function(r){se(e);let o=L(3);return le(o.itemClick.emit(r))})("itemMouseEnter",function(r){se(e);let o=L(3);return le(o.onItemMouseEnter(r))}),M()}if(t&2){let e=L(2).$implicit,n=L();D("items",e.items)("itemTemplate",n.itemTemplate)("autoDisplay",n.autoDisplay)("menuId",n.menuId)("activeItemPath",n.activeItemPath())("focusedItemId",n.focusedItemId),uc("ariaLabelledBy",n.getItemId(e)),D("level",n.level+1)("inlineStyles",Yi(9,wMt,n.isItemActive(e)?"flex":"none"))}}function WMt(t,i){if(t&1){let e=qe();O(0,"li",8,1)(2,"div",9),te("click",function(r){se(e);let o=L().$implicit,a=L();return le(a.onItemClick(r,o))})("mouseenter",function(r){se(e);let o=L().$implicit,a=L();return le(a.onItemMouseEnter({$event:r,processedItem:o}))}),ie(3,jMt,3,2,"ng-container",10)(4,YMt,2,5,"ng-container",10),M(),ie(5,KMt,1,11,"p-tieredmenusub",11),M()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L();Pe(o.cn(o.cx("item",Yi(21,CMt,n)),o.getItemProp(n,"styleClass"))),D("ngStyle",o.getItemProp(n,"style"))("tooltipOptions",o.getItemProp(n,"tooltipOptions")),lt("id",o.getItemId(n))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(n))("data-p-focused",o.isItemFocused(n))("data-p-disabled",o.isItemDisabled(n))("aria-label",o.getItemLabel(n))("aria-disabled",o.isItemDisabled(n)||void 0)("aria-haspopup",o.isItemGroup(n)&&!o.getItemProp(n,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(n)?o.isItemActive(n):void 0)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(r)),E(2),Pe(o.cx("itemContent")),lt("data-pc-section","content"),E(),D("ngIf",!o.itemTemplate),E(),D("ngIf",o.itemTemplate),E(),D("ngIf",o.isItemVisible(n)&&o.isItemGroup(n))}}function QMt(t,i){if(t&1&&ie(0,IMt,1,6,"li",5)(1,WMt,6,23,"li",6),t&2){let e=i.$implicit,n=L();D("ngIf",n.isItemVisible(e)&&n.getItemProp(e,"separator")),E(),D("ngIf",n.isItemVisible(e)&&!n.getItemProp(e,"separator"))}}var ZMt=["submenuicon"],XMt=["item"],JMt=["rootmenu"],e2t=["container"],t2t=(t,i)=>({showTransitionParams:t,hideTransitionParams:i}),i2t=t=>({value:"visible",params:t});function n2t(t,i){if(t&1){let e=qe();O(0,"div",3,0),te("click",function(r){se(e);let o=L();return le(o.onOverlayClick(r))})("@overlayAnimation.start",function(r){se(e);let o=L();return le(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){se(e);let o=L();return le(o.onOverlayAnimationEnd(r))}),O(2,"p-tieredMenuSub",4,1),te("itemClick",function(r){se(e);let o=L();return le(o.onItemClick(r))})("menuFocus",function(r){se(e);let o=L();return le(o.onMenuFocus(r))})("menuBlur",function(r){se(e);let o=L();return le(o.onMenuBlur(r))})("menuKeydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))})("itemMouseEnter",function(r){se(e);let o=L();return le(o.onItemMouseEnter(r))}),M()()}if(t&2){let e=L();Pe(e.cn(e.cx("root"),e.styleClass)),D("id",e.id)("ngStyle",e.style)("@overlayAnimation",Yi(24,i2t,na(21,t2t,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.popup!==!0),lt("data-pc-section","root")("data-pc-name","tieredmenu"),E(2),D("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex),uc("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy),D("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("autoDisplay",e.autoDisplay)("popup",e.popup)("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var r2t={submenu:({instance:t,processedItem:i})=>({display:t.isItemActive(i)?"flex":"none"})},o2t={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:i})=>["p-tieredmenu-item",{"p-tieredmenu-item-active":t.isItemActive(i),"p-focus":t.isItemFocused(i),"p-disabled":t.isItemDisabled(i)}],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"},Yxe=(()=>{class t extends br{name="tieredmenu";theme=Vje;classes=o2t;inlineStyles=r2t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var a2t=(()=>{class t extends ur{el;renderer;tieredMenu;items;itemTemplate;root=!1;autoDisplay;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath=kr([]);tabindex=0;inlineStyles;itemClick=new ve;itemMouseEnter=new ve;menuFocus=new ve;menuBlur=new ve;menuKeydown=new ve;sublistViewChild;_componentStyle=ae(Yxe);constructor(e,n,r){super(),this.el=e,this.renderer=n,this.tieredMenu=r}positionSubmenu(){if(Js(this.tieredMenu.platformId)){let e=this.sublistViewChild&&this.sublistViewChild.nativeElement;e&&jUe(e,this.level)}}getItemProp(e,n,r=null){return e&&e.item?Kp(e.item[n],r):void 0}getItemId(e){return e.item?.id??`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return $e(pe({},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 $e(pe({},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(n=>{let r=this.isItemVisible(n),o=r&&this.getItemProp(n,"separator");return!r||o}).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath())return this.positionSubmenu(),this.activeItemPath().some(n=>n.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return Ro(e.items)}onItemMouseEnter(e){if(this.autoDisplay){let{event:n,processedItem:r}=e;this.itemMouseEnter.emit({originalEvent:n,processedItem:r})}}onItemClick(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.itemClick.emit({originalEvent:e,processedItem:n,isFocus:!0})}static \u0275fac=function(n){return new(n||t)(xe(qn),xe(Ma),xe(No(()=>KN)))};static \u0275cmp=re({type:t,selectors:[["p-tieredMenuSub"],["p-tieredmenusub"]],viewQuery:function(n,r){if(n&1&&Xi(bMt,7),n&2){let o;ze(o=Ue())&&(r.sublistViewChild=o.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",En],popup:[2,"popup","popup",Je],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",En],focusedItemId:"focusedItemId",activeItemPath:[1,"activeItemPath"],tabindex:[2,"tabindex","tabindex",En],inlineStyles:"inlineStyles"},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Tt],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(n,r){if(n&1){let o=qe();O(0,"ul",3,0),te("keydown",function(c){return se(o),le(r.menuKeydown.emit(c))})("focus",function(c){return se(o),le(r.menuFocus.emit(c))})("blur",function(c){return se(o),le(r.menuBlur.emit(c))}),ie(2,QMt,2,2,"ng-template",4),M()}n&2&&(is(r.inlineStyles),Pe(r.root?r.cx("rootList"):r.cx("submenu")),D("id",r.menuId+"_list")("tabindex",r.tabindex),lt("aria-label",r.ariaLabel)("aria-labelledBy",r.ariaLabelledBy)("aria-activedescendant",r.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),E(2),D("ngForOf",r.items))},dependencies:[t,rr,Vl,Xr,Jr,Xs,Yf,Ms,f4,Qc,sE,tg,kie,Un],encapsulation:2})}return t})(),KN=(()=>{class t extends ur{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=kr(void 0);onShow=new ve;onHide=new ve;rootmenu;containerViewChild;submenuIconTemplate;itemTemplate;templates;$appendTo=Or(()=>this.appendTo()||this.config.overlayAppendTo());container;outsideClickListener;resizeListener;scrollHandler;target;relatedTarget;visible;relativeAlign;dirty=!1;focused=!1;activeItemPath=hr([]);number=hr(0);focusedItemInfo=hr({index:-1,level:0,parentKey:"",item:null});searchValue="";searchTimeout;_processedItems;_model;_componentStyle=ae(Yxe);matchMediaListener;query;queryMatches;_submenuIconTemplate;_itemTemplate;get visibleItems(){let e=this.activeItemPath().find(n=>n.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}${Ro(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,tu(()=>{let n=this.activeItemPath();Ro(n)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())})}ngOnInit(){super.ngOnInit(),this.bindMatchMediaListener(),this.id=this.id||fa("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(Js(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,n=0,r={},o=""){let a=[];return e&&e.forEach((c,m)=>{let g=(o!==""?o+"_":"")+m,C={item:c,index:m,level:n,key:g,parent:r,parentKey:o};C.items=this.createProcessedItems(c.items,n+1,C,g),a.push(C)}),a}getItemProp(e,n){return e?Kp(e[n]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&Ro(e.items)}isSelected(e){return this.activeItemPath().some(n=>n.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&&Ro(e.items)}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}onItemClick(e){let{originalEvent:n,processedItem:r}=e,o=this.isProcessedItemGroup(r),a=ru(r.parent);if(this.isSelected(r)){let{index:m,key:g,level:C,parentKey:w,item:P}=r;this.activeItemPath.set(this.activeItemPath().filter(R=>g!==R.key&&g.startsWith(R.key))),this.focusedItemInfo.set({index:m,level:C,parentKey:w,item:P}),this.dirty=!0,Ba(this.rootmenu.sublistViewChild.nativeElement)}else if(o)this.onItemChange(e);else{let m=a?r:this.activeItemPath().find(g=>g.parentKey==="");this.hide(n),this.changeFocusedItemIndex(n,m?m.index:-1),Ba(this.rootmenu.sublistViewChild.nativeElement)}}onItemMouseEnter(e){zb()?this.onItemChange({event:e,processedItem:e.processedItem,focus:this.autoDisplay},"hover"):this.dirty&&this.onItemChange(e,"hover")}onKeyDown(e){let n=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:!n&&Yk(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let n=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()}onArrowRightKey(e){let n=this.visibleItems[this.focusedItemInfo().index],r=this.isProccessedItemGroup(n),o=n?.item;r&&(this.onItemChange({originalEvent:e,processedItem:n}),this.focusedItemInfo.set({index:-1,parentKey:n.key,item:o}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let n=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(n)&&this.onItemChange({originalEvent:e,processedItem:n})}this.popup&&this.hide(e,!0),e.preventDefault()}else{let n=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()}}onArrowLeftKey(e){let n=this.visibleItems[this.focusedItemInfo().index];if(!n){e.preventDefault();return}let r=this.activeItemPath().find(c=>c.key===n.parentKey);ru(n.parent)||(this.focusedItemInfo.set({index:-1,parentKey:r?r.parentKey:"",item:n.item}),this.searchValue="",this.onArrowDownKey(e));let a=this.activeItemPath().filter(c=>c.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(a),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 n=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(n)&&this.onItemChange({originalEvent:e,processedItem:n})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let n=$r(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),r=n&&$r(n,'a[data-pc-section="action"]');if(r?r.click():n&&n.click(),!this.popup){let o=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(o)&&(this.focusedItemInfo().index=this.findFirstFocusedItemIndex())}}e.preventDefault()}onItemChange(e,n){let{processedItem:r,isFocus:o}=e;if(ru(r))return;let{index:a,key:c,level:m,parentKey:g,items:C,item:w}=r,P=Ro(C),R=this.activeItemPath().filter(z=>z.parentKey!==g&&z.parentKey!==c);P&&R.push(r),this.focusedItemInfo.set({index:a,level:m,parentKey:g,item:w}),P&&(this.dirty=!0),o&&Ba(this.rootmenu.sublistViewChild.nativeElement),!(n==="hover"&&this.queryMatches)&&this.activeItemPath.set(R)}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({}),A4(this.containerViewChild.nativeElement,{position:"absolute",top:0}),this.attrSelector&&this.container.setAttribute(this.attrSelector,""),this.appendOverlay(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),Ba(this.rootmenu.sublistViewChild.nativeElement),this.scrollInView());break;case"void":this.onOverlayHide(),this.onHide.emit({});break}}alignOverlay(){this.relativeAlign?xie(this.container,this.target):Cie(this.container,this.target),Nd(this.target)>Nd(this.container)&&(this.container.style.minWidth=Nd(this.target)+"px")}onOverlayAnimationEnd(e){switch(e.toState){case"void":Fd.clear(e.element);break}}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?this.renderer.appendChild(this.document.body,this.container):KT(this.$appendTo(),this.container))}restoreOverlayAppend(){this.container&&this.$appendTo()!=="self"&&this.renderer.appendChild(this.el.nativeElement,this.container)}moveOnTop(){this.autoZIndex&&Fd.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(e,n){this.popup&&(this.onHide.emit({}),this.visible=!1),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:""}),n&&Ba(this.relatedTarget||this.target||this.rootmenu.sublistViewChild.nativeElement),this.dirty=!1}toggle(e){this.visible?this.hide(e,!0):this.show(e)}show(e,n){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:""}),n&&Ba(this.rootmenu.sublistViewChild.nativeElement),this.cd.markForCheck()}searchItems(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedItemInfo().index!==-1?(r=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(a=>this.isItemMatched(a)),r=r===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(a=>this.isItemMatched(a)):r+this.focusedItemInfo().index):r=this.visibleItems.findIndex(a=>this.isItemMatched(a)),r!==-1&&(o=!0),r===-1&&this.focusedItemInfo().index===-1&&(r=this.findFirstFocusedItemIndex()),r!==-1&&this.changeFocusedItemIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return X0(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let n=e>0?X0(this.visibleItems.slice(0,e),r=>this.isValidItem(r)):-1;return n>-1?n:e}findNextItemIndex(e){let n=ethis.isValidItem(r)):-1;return n>-1?n+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,n){if(this.focusedItemInfo().index!==n){let r=this.focusedItemInfo();this.focusedItemInfo.set($e(pe({},r),{item:this.visibleItems[n].item,index:n})),this.scrollInView()}}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedItemId,r=$r(this.rootmenu.el.nativeElement,`li[id="${n}"]`);r&&r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"})}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ub(this.target,e=>{this.visible&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&(this.scrollHandler.unbindScrollListener(),this.scrollHandler=null)}bindResizeListener(){Js(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{zb()||this.hide(e,!0)})))}bindOutsideClickListener(){Js(this.platformId)&&(this.outsideClickListener||(this.outsideClickListener=this.renderer.listen(this.document,"click",e=>{let n=this.containerViewChild&&!this.containerViewChild.nativeElement.contains(e.target),r=this.popup?!(this.target&&(this.target===e.target||this.target.contains(e.target))):!0;n&&r&&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&&Fd.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide()),this.unbindMatchMediaListener(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Cv))};static \u0275cmp=re({type:t,selectors:[["p-tieredMenu"],["p-tieredmenu"],["p-tiered-menu"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,ZMt,4),Vt(o,XMt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.submenuIconTemplate=a.first),ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(JMt,5),Xi(e2t,5)),n&2){let o;ze(o=Ue())&&(r.rootmenu=o.first),ze(o=Ue())&&(r.containerViewChild=o.first)}},inputs:{model:"model",popup:[2,"popup","popup",Je],style:"style",styleClass:"styleClass",breakpoint:"breakpoint",autoZIndex:[2,"autoZIndex","autoZIndex",Je],baseZIndex:[2,"baseZIndex","baseZIndex",En],autoDisplay:[2,"autoDisplay","autoDisplay",Je],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",id:"id",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",disabled:[2,"disabled","disabled",Je],tabindex:[2,"tabindex","tabindex",En],appendTo:[1,"appendTo"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[Ii([Yxe]),Tt],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(n,r){n&1&&ie(0,n2t,4,26,"div",2),n&2&&D("ngIf",!r.popup||r.visible)},dependencies:[rr,Xr,Xs,a2t,Yf,sE,Un],encapsulation:2,data:{animation:[Wp("overlayAnimation",[Oc(":enter",[ul({opacity:0,transform:"scaleY(0.8)"}),Jl("{{showTransitionParams}}")]),Oc(":leave",[Jl("{{hideTransitionParams}}",ul({opacity:0}))])])]},changeDetection:0})}return t})();var zje=(()=>{class t{_authenticationService;_msalService;_msalGuardConfig;menuItems=[];constructor(e,n,r){this._authenticationService=e,this._msalService=n,this._msalGuardConfig=r,this._authenticationService.authentication$.subscribe(o=>{o?this.menuItems=[{label:"Passwort \xE4ndern",command:()=>this.passwordReset()},{label:"Abmelden",command:()=>this.logout()}]:this.menuItems=[{label:"Anmelden",command:()=>this.login()}]})}login(){this._loginRedirect()}logout(){this._msalService.logoutRedirect()}passwordReset(){this._msalService.loginRedirect($e(pe({},this._authenticationService.getPasswordResetPolicy()),{scopes:[]}))}_loginRedirect(){this._msalGuardConfig.authRequest?this._msalService.loginRedirect(pe({},this._msalGuardConfig.authRequest)):this._msalService.loginRedirect()}static \u0275fac=function(n){return new(n||t)(xe(em),xe(ry),xe(qN))};static \u0275cmp=re({type:t,selectors:[["bd-authentication-menu"]],decls:4,vars:2,consts:[["menu",""],["pButton","",1,"text-2xl","bg-(--app-shell-color)!","border-(--app-shell-color)!","text-(--app-shell-contrast-color)!",3,"click"],["pButtonIcon","",1,"pi","pi-cog"],[3,"model","popup"]],template:function(n,r){if(n&1){let o=qe();O(0,"button",1),te("click",function(c){se(o);let m=Oi(3);return le(m.toggle(c))}),be(1,"i",2),M(),be(2,"p-tieredMenu",3,0)}n&2&&(E(2),D("model",r.menuItems)("popup",!0))},dependencies:[KN,aw,G4],encapsulation:2})}return t})();var h5=class{static msalInstance(i){return new D$(i.msalConfig.publicClientApplication)}static msalInterceptorConfig(i){let e=new Map;return i.msalConfig.protectedResources.forEach(n=>e.set(n.uri,n.scopes)),{interactionType:Mo.Redirect,protectedResourceMap:e}}static msalGuardConfig(i){return{interactionType:i.msalConfig.guardConfig.interactionType==="redirect"?Mo.Redirect:Mo.Popup,authRequest:i.msalConfig.guardConfig.authRequest,loginFailedRoute:i.msalConfig.guardConfig?.loginFailedRoute??"sys-login-failed"}}};function s2t(t){let i=h5.msalInstance(t),e=h5.msalGuardConfig(t),n=h5.msalInterceptorConfig(t);return[{provide:p5,useValue:i},{provide:qN,useValue:e},{provide:Hxe,useValue:n},{provide:rte,useClass:Pje,multi:!0},ry,Rc,EE]}function Uje(t){return[...s2t(t),qye(Yye())]}var _i=class{fabKey;name;constructor(i,e){this.fabKey=i,this.name=e}};new _i("1500","Allgemeinchirurgie");new _i("2900","Allgemeine Psychiatrie");new _i("2700","Augenheilkunde");new _i("0600","Endokrinologie");new _i("2400","Frauenheilkunde und Geburtshilfe");new _i("0700","Gastroenterologie");new _i("1800","Gef\xE4\xDFchirurgie");new _i("0200","Geriatrie");new _i("2600","Hals-, Nasen-, Ohrenheilkunde");new _i("1551","Handchirurgie");new _i("2100","Herzchirurgie");new _i("0500","H\xE4matologie und internistische Onkologie");new _i("0100","Innere Medizin");new _i("3600","Intensivmedizin");new _i("0300","Kardiologie");new _i("1700","Neurochirurgie");new _i("2800","Neurologie");new _i("2316","Orthop\xE4die und Unfallchirurgie");new _i("1900","Plastische Chirurgie");new _i("0800","Pneumologie");new _i("3100","Psychosomatik/Psychotherapie");new _i("1000","P\xE4diatrie");new _i("3300","Strahlenheilkunde");new _i("2000","Thoraxchirurgie");new _i("2200","Urologie");new _i("2500","Geburtshilfe");var l2t=[new _i("1500","Allgemeinchirurgie"),new _i("2900","Allgemeine Psychiatrie"),new _i("2700","Augenheilkunde"),new _i("3400","Dermatologie"),new _i("0600","Endokrinologie"),new _i("2400","Frauenheilkunde und Geburtshilfe"),new _i("0700","Gastroenterologie"),new _i("1800","Gef\xE4\xDFchirurgie"),new _i("0200","Geriatrie"),new _i("2600","Hals-, Nasen-, Ohrenheilkunde"),new _i("1551","Handchirurgie"),new _i("2100","Herzchirurgie"),new _i("0500","H\xE4matologie und internistische Onkologie"),new _i("0100","Innere Medizin"),new _i("3600","Intensivmedizin"),new _i("0300","Kardiologie"),new _i("3000","Kinder- und Jugendpsychiatrie"),new _i("1300","Kinderchirurgie"),new _i("1100","Kinderkardiologie"),new _i("1400","Lungen- und Bronchialheilkunde"),new _i("1200","Neonatologie"),new _i("0400","Nephrologie"),new _i("1700","Neurochirurgie"),new _i("2800","Neurologie"),new _i("3200","Nuklearmedizin"),new _i("2300","Orthop\xE4die"),new _i("2316","Orthop\xE4die und Unfallchirurgie"),new _i("1900","Plastische Chirurgie"),new _i("0800","Pneumologie"),new _i("3100","Psychosomatik/Psychotherapie"),new _i("1000","P\xE4diatrie"),new _i("0900","Rheumatologie"),new _i("3753","Schmerztherapie"),new _i("0000","Sonstige"),new _i("3700","Sonstige Fachabteilung"),new _i("3300","Strahlenheilkunde"),new _i("2000","Thoraxchirurgie"),new _i("1600","Unfallchirurgie"),new _i("2200","Urologie"),new _i("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new _i("2500","davon Geburtshilfe")],c2t=[new _i("0000","Unbekannt"),new _i("0100","Innere Medizin"),new _i("2400","Frauenheilkunde"),new _i("2500","Geburtshilfe"),new _i("0200","Geriatrie"),new _i("0300","Kardiologie"),new _i("0400","Nephrologie"),new _i("0500","H\xE4matologie und internistische Onkologie"),new _i("0600","Endokrinologie"),new _i("0700","Gastroenterologie"),new _i("0800","Pneumologie"),new _i("0900","Rheumatologie"),new _i("1000","P\xE4diatrie"),new _i("1100","Kinderkardiologie"),new _i("1200","Neonatologie"),new _i("1300","Kinderchirurgie"),new _i("1400","Lungen- und Bronchialheilkunde"),new _i("1500","Allgemeinchirurgie"),new _i("1600","Unfallchirurgie"),new _i("1700","Neurochirurgie"),new _i("1800","Gef\xE4\xDFchirurgie"),new _i("1900","Plastische Chirurgie"),new _i("2000","Thoraxchirurgie"),new _i("2100","Herzchirurgie"),new _i("2200","Urologie"),new _i("2300","Orthop\xE4die"),new _i("2600","Hals-, Nasen-, Ohrenheilkunde"),new _i("2700","Augenheilkunde"),new _i("2800","Neurologie"),new _i("2900","Allgemeine Psychiatrie"),new _i("3000","Kinder- und Jugendpsychiatrie"),new _i("3100","Psychosomatik/Psychotherapie"),new _i("3200","Nuklearmedizin"),new _i("3300","Strahlenheilkunde"),new _i("3400","Dermatologie"),new _i("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new _i("3600","Intensivmedizin"),new _i("3700","Sonstige Fachabteilung"),new _i("2316","Orthop\xE4die und Unfallchirurgie"),new _i("0104","Innere Medizin/Schwerpunkt Nephrologie"),new _i("0105","Innere Medizin/Schwerpunkt H\xE4matologie und internistische Onkologie"),new _i("0106","Innere Medizin/Schwerpunkt Endokrinologie"),new _i("0107","Innere Medizin/Schwerpunkt Gastroenterologie"),new _i("0108","Innere Medizin/Schwerpunkt Pneumologie"),new _i("0109","Innere Medizin/Schwerpunkt Rheumatologie"),new _i("0114","Innere Medizin/Schwerpunkt Lungen- und Bronchialheilkunde"),new _i("0150","Innere Medizin/Tumorforschung"),new _i("0151","Innere Medizin/Schwerpunkt Coloproktologie"),new _i("0152","Innere Medizin/Schwerpunkt Infektionskrankheiten"),new _i("0153","Innere Medizin/Schwerpunkt Diabetes"),new _i("0154","Innere Medizin/Schwerpunkt Naturheilkunde"),new _i("0224","Geriatrie/Schwerpunkt Frauenheilkunde"),new _i("0260","Geriatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("0261","Geriatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("0410","Nephrologie/Schwerpunkt P\xE4diatrie"),new _i("0436","Nephrologie/Intensivmedizin"),new _i("0510","H\xE4matologie und internistische Onkologie/Schwerpunkt P\xE4diatrie"),new _i("0524","H\xE4matologie und internistische Onkologie/Schwerpunkt Frauenheilkunde"),new _i("0533","H\xE4matologie und internistische Onkologie/Schwerpunkt Strahlenheilkunde"),new _i("0607","Endokrinologie/Schwerpunkt Gastroenterologie"),new _i("0610","Endokrinologie/Schwerpunkt P\xE4diatrie"),new _i("0706","Gastroenterologie/Schwerpunkt Endokrinologie"),new _i("0710","Gastroenterologie/Schwerpunkt P\xE4diatrie"),new _i("0910","Rheumatologie/Schwerpunkt P\xE4diatrie"),new _i("1004","P\xE4diatrie/Schwerpunkt Nephrologie"),new _i("1005","P\xE4diatrie/Schwerpunkt H\xE4matologie und internistische Onkologie"),new _i("1006","P\xE4diatrie/Schwerpunkt Endokrinologie "),new _i("3750","Angiologie"),new _i("0156","Innere Medizin/Schwerpunkt Schlaganfallpatienten"),new _i("1007","P\xE4diatrie/Schwerpunkt Gastroenterologie"),new _i("1009","P\xE4diatrie/Schwerpunkt Rheumatologie"),new _i("1011","P\xE4diatrie/Schwerpunkt Kinderkardiologie"),new _i("1012","P\xE4diatrie/Schwerpunkt Neonatologie"),new _i("1014","P\xE4diatrie/Schwerpunkt Lungen- und Bronchialheilkunde"),new _i("1028","P\xE4diatrie/Schwerpunkt Kinderneurologie"),new _i("1050","P\xE4diatrie/Schwerpunkt Perinatalmedizin"),new _i("1051","Langzeitbereich Kinder"),new _i("1136","Kinderkardiologie/Schwerpunkt Intensivmedizin"),new _i("1410","Lungen- und Bronchialheilkunde/Schwerpunkt P\xE4diatrie"),new _i("1513","Allgemeine Chirurgie/Schwerpunkt Kinderchirurgie"),new _i("1516","Allgemeine Chirurgie/Schwerpunkt Unfallchirurgie"),new _i("1518","Allgemeine Chirurgie/Schwerpunkt Gef\xE4\xDFchirurgie"),new _i("1519","Allgemeine Chirurgie/Schwerpunkt Plastische Chirurgie"),new _i("1520","Allgemeine Chirurgie/Schwerpunkt Thoraxchirurgie"),new _i("1523","Chirurgie/Schwerpunkt Orthop\xE4die"),new _i("1550","Allgemeine Chirurgie/Schwerpunkt Abdominal- und Gef\xE4\xDFchirurgie"),new _i("1551","Allgemeine Chirurgie/Schwerpunkt Handchirurgie"),new _i("2021","Thoraxchirurgie/Schwerpunkt Herzchirurgie"),new _i("2036","Thoraxchirurgie/Intensivmedizin"),new _i("2050","Thoraxchirurgie/Schwerpunkt Herzchirurgie Intensivmedizin"),new _i("2120","Herzchirurgie/Schwerpunkt Thoraxchirurgie"),new _i("2150","Herzchirurgie/Schwerpunkt Thoraxchirurgie Intensivmedizin"),new _i("2309","Orthop\xE4die/Schwerpunkt Rheumatologie"),new _i("2315","Orthop\xE4die/Schwerpunkt Chirurgie"),new _i("2402","Frauenheilkunde/Schwerpunkt Geriatrie"),new _i("2405","Frauenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new _i("2406","Frauenheilkunde/Schwerpunkt Endokrinologie"),new _i("2810","Neurologie/Schwerpunkt P\xE4diatrie"),new _i("2928","Allgemeine Psychiatrie/Schwerpunkt Neurologie"),new _i("2930","Allgemeine Psychiatrie/Schwerpunkt Kinder- und Jugendpsychiatrie"),new _i("0103","Innere Medizin/Schwerpunkt Kardiologie"),new _i("2931","Allgemeine Psychiatrie/Schwerpunkt Psychosomatik/Psychotherapie"),new _i("2950","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung"),new _i("2951","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie"),new _i("2952","Allgemeine Psychiatrie/Schwerpunkt Forensische Behandlung"),new _i("2953","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Tagesklinik"),new _i("2954","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Nachtklinik"),new _i("2955","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Tagesklinik"),new _i("2956","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Nachtklinik"),new _i("2960","Allgemeine Psychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("2961","Allgemeine Psychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3060","Kinder- und Jugendpsychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3061","Kinder- und Jugendpsychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3160","Psychosomatik/Psychotherapie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3161","Psychosomatik/Psychotherapie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3233","Nuklearmedizin/Schwerpunkt Strahlenheilkunde"),new _i("3305","Strahlenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new _i("3350","Strahlenheilkunde/Schwerpunkt Radiologie"),new _i("3460","Dermatologie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new _i("3601","Intensivmedizin/Schwerpunkt Innere Medizin"),new _i("3603","Intensivmedizin/Schwerpunkt Kardiologie"),new _i("3610","Intensivmedizin/Schwerpunkt P\xE4diatrie"),new _i("3617","Intensivmedizin/Schwerpunkt Neurochirurgie"),new _i("3618","Intensivmedizin/Schwerpunkt Chirurgie"),new _i("3621","Intensivmedizin/Schwerpunkt Herzchirurgie"),new _i("3622","Intensivmedizin/Schwerpunkt Urologie"),new _i("3624","Intensivmedizin/Schwerpunkt Frauenheilkunde und Geburtshilfe"),new _i("3626","Intensivmedizin/Schwerpunkt Hals-, Nasen-, Ohrenheilkunde"),new _i("3628","Intensivmedizin/Schwerpunkt Neurologie"),new _i("3650","Operative Intensivmedizin/Schwerpunkt Chirurgie"),new _i("3651","Intensivmedizin/Thorax-Herzchirurgie"),new _i("3652","Intensivmedizin/Herz-Thoraxchirurgie"),new _i("3751","Radiologie"),new _i("3752","Palliativmedizin"),new _i("3753","Schmerztherapie"),new _i("3754","Heiltherapeutische Abteilung"),new _i("3755","Wirbels\xE4ulenchirurgie"),new _i("3756","Suchtmedizin"),new _i("3757","Visceralchirurgie"),new _i("1536","Allgemeine Chirurgie/Intensivmedizin"),new _i("2136","Herzchirurgie/Intensivmedizin"),new _i("2856","Neurologie/Schwerpunkt Schlaganfallpatienten")];var d2t={id:"USER",displayName:"File-Center",type:"other",navigation:{path:["/user","files"]},permissions:null},u2t={id:"HELP_PAGES",displayName:"Dokumentation",type:"other",permissions:null,navigation:{externalLink:"https://bindoc.atlassian.net/wiki/spaces/HP/overview"}},Hje=[d2t,u2t];var vu="https://www.bindoc.de/online-meeting";var p2t={id:"HOME",displayName:"Home",type:"tool",permissions:null,navigation:{path:["/home"]}},m2t={id:"OPERATING_NUMBERS",displayName:"Kennzahlen-Benchmarking",type:"tool",permissions:["OPERATING_NUMBERS:BASE"],navigation:{path:["/operating-numbers","clinics"],disabledLink:vu}},h2t={id:"CLINIC_BROWSER",displayName:"Klinik-Browser",type:"tool",permissions:null,navigation:{path:["/clinics"]}},f2t={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"]}]}},g2t={id:"PROJECTION",displayName:"Marktprognosen",type:"tool",permissions:["PROJECTION:BASE"],navigation:{path:["/projection"],disabledLink:vu}},_2t={id:"GEOGRAPHIC",displayName:"Geo-Analyse",type:"tool",permissions:null,navigation:{path:["/geographic"],disabledLink:vu}},y2t={id:"POTENTIAL",displayName:"Potenzialanalyse",type:"tool",permissions:["POTENTIAL:BASE"],navigation:{path:["/potential"],disabledLink:vu}},v2t={id:"DRG_PROFIT_LOSS_ANALYSIS",displayName:"DRG Benchmarking",type:"tool",permissions:["DRG_PROFIT_LOSS_ANALYSIS:BASE"],navigation:{path:["/drg-profit-loss-analysis"],disabledLink:vu}},b2t={id:"COMPETITOR_ANALYSIS",displayName:"Wettbewerbsanalyse",type:"tool",permissions:["COMPETITOR_ANALYSIS:BASE"],navigation:{path:["/competitors-analysis"],disabledLink:vu}},C2t={id:"VIRTUAL_CLINIC_REFERRAL",displayName:"Einweiseranalyse",type:"tool",permissions:["VIRTUAL_CLINIC_REFERRAL:BASE","VIRTUAL_CLINIC_REFERRAL:MAIL"],navigation:{path:null,disabledLink:vu,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"]}]}},x2t={id:"CUBE",displayName:"Cube",type:"tool",permissions:["CUBE:BASE","CUBE:CREATE_DASHBOARD"],navigation:{path:["/cube"],disabledLink:vu}},S2t={id:"BUSINESS_CASE",displayName:"Business Case",type:"tool",permissions:["BUSINESS_CASE:BASE"],navigation:{path:["/business-case"],disabledLink:vu}},w2t={id:"SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING",displayName:"Szenarioanalyse",type:"tool",permissions:["SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING:BASE"],navigation:{path:["/scenario-analysis"],disabledLink:vu}},I2t={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","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:CUSTOM_RLP_MWG_DATASOURCE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:CLINIC_ACCESSIBILITY_ANALYSIS"],navigation:{path:null,disabledLink:vu,children:[{title:"Simulation",path:["/demand-analysis"]},{title:"Kalkulation",path:["/demand-analysis/vv"]},{title:"Erreichbarkeit",path:["/demand-analysis/clinic-accessibility-analysis"]}]}},Gje=[p2t,m2t,h2t,f2t,g2t,_2t,y2t,v2t,b2t,C2t,x2t,S2t,w2t,I2t];var T2t={id:"CUBE_AT",displayName:"Cube",type:"tool",permissions:["CUBE_AT:BASE","CUBE_AT:CREATE_DASHBOARD"],navigation:{path:["/cube"],disabledLink:vu}},jje=[T2t];var E2t={id:"CUBE_UK",displayName:"Cube",type:"tool",permissions:["CUBE_UK:BASE","CUBE_UK:CREATE_DASHBOARD"],navigation:{path:["/cube"],disabledLink:vu}},$je=[E2t];var qje={id:"HARTMANN_OPPORTUNITY_COSTS",displayName:"M:IP Public Analysis",type:"tool",permissions:["HARTMANN_OPPORTUNITY_COSTS:BASE"],navigation:{path:["/opportunity-costs"],disabledLink:vu}},Yje={id:"HARTMANN_OPPORTUNITY_COSTS_CH",displayName:"M:IP Public Analysis Schweiz",type:"tool",permissions:["HARTMANN_OPPORTUNITY_COSTS_CH:BASE"],navigation:{path:["/opportunity-costs/ch"],disabledLink:vu}},Kje={id:"HARTMANN_VIRTUAL_CLINIC_ANALYSIS",displayName:"M:IP \xA721 Analysis",type:"tool",permissions:["HARTMANN_VIRTUAL_CLINIC_ANALYSIS:BASE"],navigation:{path:["/virtual-clinic-analysis"],disabledLink:vu}};var Wje={id:"INTUITIVE_PROFITABILITY_ANALYSIS",displayName:"Wirtschaftlichkeitsanalyse",type:"tool",permissions:["INTUITIVE_PROFITABILITY_ANALYSIS:BASE"],navigation:{path:["profitability-analysis"],disabledLink:vu,children:[{title:"Geographische Auswahl",path:["profitability-analysis","map"]},{title:"Formular",path:["profitability-analysis","forms","advanced"]}]}},Qje={id:"INTUITIVE_COMPETITOR_ANALYSIS",displayName:"Wettbewerbsanalyse",type:"tool",permissions:["INTUITIVE_COMPETITOR_ANALYSIS:BASE","INTUITIVE_COMPETITOR_ANALYSIS:EXPORT"],navigation:{}},Zje={id:"INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS",displayName:"Meta Analyse",type:"tool",permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"],navigation:{path:["meta-virtual-clinic-analysis"],disabledLink:vu,children:[{title:"\xDCbersicht",path:["meta-virtual-clinic-analysis"]},{title:"Dashboard",path:["meta-virtual-clinic-analysis","dashboard"]}]}},Xje={id:"INTUITIVE_VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS",displayName:"\xA721 Analyse",type:"tool",permissions:["INTUITIVE_VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS:BASE","INTUITIVE_VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS:ADVANCED"],navigation:{title:"\xA721 Analyse",path:["/virtual-clinic-drg-accounting-analysis"],disabledLink:vu,children:[{title:"Dashboard",path:["/virtual-clinic-drg-accounting-analysis"]},{title:"Potenziale",path:["/virtual-clinic-drg-accounting-analysis","potentials"]},{title:"Patientenherkunft",path:["/virtual-clinic-drg-accounting-analysis","patient-distribution"]},{title:"Break Even Point",path:["/virtual-clinic-drg-accounting-analysis","break-even-point"]},{title:"Kennzahlen",path:["/virtual-clinic-drg-accounting-analysis","groups"]}]}},Jje={id:"INTUITIVE_VIRTUAL_CLINIC_DETAILS",displayName:"Intuitive Details der virtuellen Kliniken",type:"tool",permissions:["INTUITIVE_VIRTUAL_CLINIC_DETAILS:BASE","INTUITIVE_VIRTUAL_CLINIC_DETAILS:CHANGE"],navigation:{title:"Virtuelle Kliniken",disabledLink:vu,path:["intuitive-details"]}};var A2t={id:"MARKET",displayName:"M\xE4rkte",type:"resource",navigation:{path:["/markets"]},permissions:null},D2t={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"]},k2t={id:"VIRTUAL_BENCHMARKING_GROUP",displayName:"Virtuelle Benchmarking-Gruppen",type:"resource",navigation:{path:["/virtual-benchmarking-groups"]},permissions:null},M2t={id:"CLINICS_FILTER",displayName:"Klinik-Filter",type:"resource",navigation:{path:["/clinics-filters"]},permissions:null},O2t={id:"CODE_SPECTRUM",displayName:"Ziffer-Spektra",type:"resource",navigation:{path:["/code-spectra"]},permissions:null},e7e=[A2t,D2t,M2t,O2t,k2t],t7e={id:"VIRTUAL_CLINIC_P21",displayName:"Virtuelle Kliniken \xA721 Import",type:"resource",navigation:{path:["/p21"]},permissions:["VIRTUAL_CLINIC_P21:BASE","VIRTUAL_CLINIC_P21:RANDOMIZE_INTERN_MARK"]};var woe=[...Gje,...e7e,...Hje];var R2t={id:"VIRTUAL_CLINIC_AT",displayName:"Virtuelle Kliniken",type:"resource",navigation:{path:["/virtual-clinics"]},permissions:["VIRTUAL_CLINIC_AT:CREATE"]},P2t={id:"CODE_SPECTRUM_AT",displayName:"Ziffer-Spektra",type:"resource",navigation:{path:["/code-spectra"]},permissions:null},i7e=[R2t,P2t];var N2t={id:"VIRTUAL_CLINIC_CH",displayName:"Virtuelle Kliniken",type:"resource",navigation:{path:["/virtual-clinics"]},permissions:["VIRTUAL_CLINIC_CH:CREATE"]},n7e=[N2t];var F2t={id:"VIRTUAL_CLINIC_UK",displayName:"Virtual Clinics",type:"resource",navigation:{path:["/virtual-clinics"]},permissions:["VIRTUAL_CLINIC_UK:CREATE"]},L2t={id:"CODE_SPECTRUM_UK",displayName:"Code Spectrum",type:"resource",navigation:{path:["/code-spectra"]},permissions:null},r7e=[F2t,L2t];var o7e={id:"HTM_CZ_VIRTUAL_CLINIC",displayName:"Virtual Clinic",type:"resource",permissions:["HTM_CZ_VIRTUAL_CLINIC:BASE"],navigation:{path:["/virtual-clinics"],title:"Virtual Clinic"}},a7e={id:"HTM_CZ_IMPORT",displayName:"Import",type:"resource",permissions:["HTM_CZ_IMPORT:BASE"],navigation:{path:["/imports"],title:"Import"}};var Ioe=(()=>{class t extends Xo{_httpClient;_envService;_cache;constructor(e,n){super(),this._httpClient=e,this._envService=n,this._cache=cv(0,60*1e3).pipe(On(()=>this._fetchFeatureStates()),qc(1))}ngOnDestroy(){this.unsubscribeAll()}getFeatureStatus(e){return this._cache.pipe(ot(n=>{let r=Object.keys(n);return e.forEach(o=>{r.includes(o)||(n[o]=!0)}),n}))}_fetchFeatureStates(){let e=`${this._envService.load("BD_FRONTEND_CONFIG_RESOURCE_URL")}/config/feature/status`;return this._httpClient.post(e,woe.map(n=>n.id))}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Kxe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(be(0,"mat-toolbar"),O(1,"div",0)(2,"div",1)(3,"div")(4,"mat-icon",2),ee(5,"engineering"),M()()()(),O(6,"div",3)(7,"h1",4),ee(8,"Wir \xFCberarbeiten diesen Bereich gerade f\xFCr Sie"),M(),O(9,"p"),ee(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. "),M()()),n&2&&(E(4),D("inline",!0))},dependencies:[nre,nM,da,zr],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 s7e=(()=>{class t{_featureStateService;_router;constructor(e,n){this._featureStateService=e,this._router=n}canActivate(e){let n=e.data.featureId;return n?this._featureStateService.getFeatureStatus([n]).pipe(ot(r=>r[n]),ot(r=>r||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}canActivateChild(e){let n=e.data.featureId;return n?this._featureStateService.getFeatureStatus([n]).pipe(ot(r=>r[n]),ot(r=>r||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}static \u0275fac=function(n){return new(n||t)(ai(Ioe),ai(Ws))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var V2t="sys-feature-maintenance",z2t={path:V2t,component:Kxe},Toe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[s7e],imports:[Yf.forChild([z2t]),nre,da,Kxe,Yf]})}return t})();var Eoe=(()=>{class t{title$=new Ai;title="";setTitle(e){this.title=e,this.title$.next(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Aoe={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 l7e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-user-cookie-reset-link"]],decls:3,vars:0,consts:[["href","#CCM.openWidget"],[1,"mat-caption"]],template:function(n,r){n&1&&(vo(0,"a",0)(1,"span",1),ee(2,"Cookie Einstellungen"),So()())},styles:["a[_ngcontent-%COMP%]{vertical-align:middle;text-decoration:none;color:#0000008a;cursor:pointer}a[_ngcontent-%COMP%]:hover{color:#000}"]})}return t})();function H2t(t,i){if(t&1&&(O(0,"li",6)(1,"a",8)(2,"span",5),ee(3,"Datenschutz"),M()()()),t&2){let e=L();E(),D("href",e.options.privacy.link,td)}}function G2t(t,i){if(t&1&&(O(0,"li",6)(1,"a",8)(2,"span",5),ee(3,"Dokumentation"),M()()()),t&2){let e=L();E(),D("href",e.options.documentation.link,td)}}function j2t(t,i){if(t&1&&(O(0,"li")(1,"a",8)(2,"span",5),ee(3,"Impressum"),M()()()),t&2){let e=L();E(),D("href",e.options.siteNotice.link,td)}}function $2t(t,i){if(t&1&&(O(0,"li",6)(1,"a",8)(2,"span",5),ee(3,"Status"),M()()()),t&2){let e=L();E(),D("href",e.options.status.link,td)}}var c7e=(()=>{class t{options=Aoe;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"ul",2)(3,"li")(4,"a",3),be(5,"img",4),M()(),O(6,"li")(7,"a",3)(8,"span",5),ee(9,"BinDoc GmbH"),M()()(),yt(10,H2t,4,1,"li",6),yt(11,G2t,4,1,"li",6),yt(12,j2t,4,1,"li"),yt(13,$2t,4,1,"li",6),O(14,"li")(15,"a",7)(16,"span",5),ee(17,"Drittanbieter Lizenzen"),M()()(),O(18,"li"),be(19,"bd-user-cookie-reset-link"),M()()()()),n&2&&(E(10),vt(r.options.privacy.enabled?10:-1),E(),vt(r.options.documentation.enabled?11:-1),E(),vt(r.options.siteNotice.enabled?12:-1),E(),vt(r.options.status.enabled?13:-1))},dependencies:[l7e],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 Doe=class{_environmentService;constructor(i){this._environmentService=i}getAll(){return`${this.base()}/admin/companies/`}getById(i){return`${this.base()}/admin/companies/${i}`}getGroupsByCompanyId(i){return`${this.base()}/admin/companies/${i}/groups`}getUsersByCompanyId(i){return`${this.base()}/admin/companies/${i}/users`}getAllModulePermissionsByCompanyId(i){return`${this.base()}/admin/companies/${i}/permissions`}getModulePermissionByCompanyId(i,e){return`${this.base()}/admin/companies/${i}/permissions/${e}`}getAllFeaturePermissionsByCompanyId(i){return`${this.base()}/admin/companies/${i}/feature-permissions`}getFeaturePermissionByCompanyId(i,e){return`${this.base()}/admin/companies/${i}/feature-permissions/${e}`}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}};var Wxe=class{userId;constructor(i){this.userId=i}},bp=(()=>{class t{_httpClient;_environmentService;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new Doe(this._environmentService)}getAll(){let e=this._store.getAll();return this._httpClient.get(e)}getById(e){let n=this._store.getById(e);return this._httpClient.get(n)}getAllGroupsByCompanyId(e){let n=this._store.getGroupsByCompanyId(e);return this._httpClient.get(n)}getAllUsersByCompanyId(e){let n=this._store.getUsersByCompanyId(e);return this._httpClient.get(n)}getAllPermissionsByCompanyId(e){let n=this._store.getAllModulePermissionsByCompanyId(e);return this._httpClient.get(n)}addPermissionsToCompany(e,n){let r=this._store.getModulePermissionByCompanyId(e,n);return this._httpClient.post(r,{})}removePermissionsFromCompany(e,n){let r=this._store.getModulePermissionByCompanyId(e,n);return this._httpClient.delete(r,{})}getAllFeaturePermissionsByCompanyId(e){let n=this._store.getAllFeaturePermissionsByCompanyId(e);return this._httpClient.get(n)}addFeaturePermissionsToCompany(e,n){let r=this._store.getFeaturePermissionByCompanyId(e,n);return this._httpClient.post(r,{})}removeFeaturePermissionsFromCompany(e,n){let r=this._store.getFeaturePermissionByCompanyId(e,n);return this._httpClient.delete(r,{})}createGroup(e,n){let r=this._store.getGroupsByCompanyId(e),o={companyId:e,name:n};return this._httpClient.post(r,o)}addUserToCompany(e,n){let r=this._store.getUsersByCompanyId(n),o=new Wxe(e);return this._httpClient.post(r,o)}removeUserFromCompany(e,n){let r=`${this._store.getUsersByCompanyId(n)}/${e}`;return this._httpClient.delete(r)}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var koe=class{_environmentService;constructor(i){this._environmentService=i}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}findAllPermissions(i){return`${this.base()}/admin/${i}/features`}};var f5=(()=>{class t{_httpClient;_environmentService;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new koe(this._environmentService)}getAllPermissions(e){let n=this._store.findAllPermissions(e);return ym(this._httpClient.get(n))}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Moe=class{_environmentService;constructor(i){this._environmentService=i}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}findAllPermissions(){return`${this.base()}/features/`}};var WN=(()=>{class t{_httpClient;_environmentService;_authService;_store;_currentlyFetching;_featurePermissionSessionStorageKey="bd.config.BD_FEATURE_PERMISSIONS";constructor(e,n,r){this._httpClient=e,this._environmentService=n,this._authService=r,this._store=new Moe(this._environmentService),this._authService.accountInfo$.subscribe(()=>this._clearPermissions())}getPermissions(e=!1){let n=sessionStorage.getItem(this._featurePermissionSessionStorageKey);return n&&!e?$t(JSON.parse(n)):(this._currentlyFetching||(this._clearPermissions(),this._currentlyFetching=this._fetchAllPermissions().pipe(yo(r=>this._storePermissions(r)),qc(1))),this._currentlyFetching)}containsPermission(e){return this._fetchAllPermissionsAndCheck(e)}_fetchAllPermissionsAndCheck(e){return this.getPermissions().pipe(ot(n=>e.every(r=>n.indexOf(r)!==-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 \u0275fac=function(n){return new(n||t)(ai(no),ai(xr),ai(em))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ooe="https://www.bindoc.de/details",mh=(function(t){return t.REDIRECT="REDIRECT",t.DIALOG="DIALOG",t})(mh||{});var Id=(()=>{class t{get vertical(){return this._vertical}set vertical(e){this._vertical=Kh(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=Kh(e)}_inset=!1;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(n,r){n&2&&(lt("aria-orientation",r.vertical?"vertical":"horizontal"),zn("mat-divider-vertical",r.vertical)("mat-divider-horizontal",!r.vertical)("mat-divider-inset",r.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(n,r){},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})(),Cp=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_a]})}return t})();var u7e=(()=>{class t{hrefPath=Ooe;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:21,vars:4,consts:[[1,"flex","flex-row","gap-6"],[1,"icon"],[3,"inline"],[3,"vertical"],[1,"flex-1"],[1,"flex","flex-col"],[1,"flex-1","mat-subheading-2"],[1,"flex-1","mat-title"],[1,"flex-1","mat-body"],[3,"href"],[3,"align"],["mat-button","",3,"mat-dialog-close"]],template:function(n,r){n&1&&(O(0,"mat-dialog-content")(1,"div",0)(2,"div")(3,"div",1)(4,"mat-icon",2),ee(5,"lock"),M()()(),be(6,"mat-divider",3),O(7,"div",4)(8,"div",5)(9,"span",6),ee(10,"Zugang gesperrt"),M(),O(11,"span",7),ee(12,"Sie haben nicht die erforderten Berechtigungen !"),M(),O(13,"span",8),ee(14,"Wenden Sie sich bitte an useren "),O(15,"a",9),ee(16,"Support"),M(),ee(17," f\xFCr weitere Hilfe"),M()()()()(),O(18,"mat-dialog-actions",10)(19,"button",11),ee(20,"Schlie\xDFen"),M()()),n&2&&(E(4),D("inline",!0),E(2),D("vertical",!0),E(9),D("href",r.hrefPath,td),E(3),D("align","end"))},dependencies:[lh,da,zr,Cp,Id,bv,so,Kr,Kf],styles:[".icon[_ngcontent-%COMP%]{font-size:60px}"]})}return t})();var hh=(()=>{class t{_dialog;_responsiveDialogService;_permissionService;_authService;constructor(e,n,r,o){this._dialog=e,this._responsiveDialogService=n,this._permissionService=r,this._authService=o}canActivate(e,n){let r=e.data.featurePermissionsData;return r?this._authService.msalInitialized.pipe(ar(1),On(()=>this._permissionService.containsPermission(r.permissions)),ot(o=>o?!0:(this._missingPermissionsNotificationToUser(r),!1))):!0}_missingPermissionsNotificationToUser(e){if(e.failStrategy===mh.DIALOG){let n=this._responsiveDialogService.config();n.data={modulePermissionsToCheck:e.permissions},this._dialog.open(u7e,n)}else window.location.href=Ooe}static \u0275fac=function(n){return new(n||t)(ai(ku),ai(Tm),ai(WN),ai(em))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Roe=class{_environmentService;constructor(i){this._environmentService=i}getById(i){return`${this.base()}/admin/groups/${i}`}usersById(i){return`${this.base()}/admin/groups/${i}/users`}userById(i,e){return`${this.base()}/admin/groups/${i}/users/${e}`}modulePermissionsById(i){return`${this.base()}/admin/groups/${i}/permissions`}modulePermissionById(i,e){return`${this.base()}/admin/groups/${i}/permissions/${e}`}featurePermissionsById(i){return`${this.base()}/admin/groups/${i}/feature-permissions`}featurePermissionById(i,e){return`${this.base()}/admin/groups/${i}/feature-permissions/${e}`}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}};var R$=class{key;value;prev;next;constructor(i,e){this.key=i,this.value=e}};var kM=class{limit;size=0;map={};head=null;tail=null;constructor(i=10){this.limit=i}setHead(i){i.next=this.head,i.prev=null,this.head!==null&&(this.head.prev=i),this.head=i,this.tail===null&&(this.tail=i),this.size++,this.map[i.key]=i}set(i,e){let n=new R$(i,e);this.map[i]?(this.map[i].value=n.value,this.remove(n.key)):this.size>=this.limit&&(delete this.map[this.tail.key],this.size--,this.tail=this.tail.prev,this.tail.next=null),this.setHead(n)}get(i){let e=null;if(this.map[i]){e=this.map[i].value;let n=new R$(i,e);this.remove(i),this.setHead(n)}return e}remove(i){let e=this.map[i];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[i],this.size--}};var Qxe=(()=>{class t{transform(e,n){let r=n.length>0?parseInt(n[0],10):20,o=n.length>1?n[1]:"...";return e.length>r?e.substring(0,r)+o:e}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Tu({name:"truncate",type:t,pure:!0})}return t})();var fh=(()=>{class t{el;renderer;testId;constructor(e,n){this.el=e,this.renderer=n}ngOnChanges(){for(;this.testId.includes(" ");)this.testId=this.testId.replace(" ","_");this.renderer.setAttribute(this.el.nativeElement,"data-test",this.testId)}static \u0275fac=function(n){return new(n||t)(xe(qn),xe(Ma))};static \u0275dir=hn({type:t,selectors:[["","data-test",""]],inputs:{testId:[0,"data-test","testId"]},features:[Yt]})}return t})();var g5=(()=>{class t{document;rendererFactory;_scriptsLoaded={};constructor(e,n){this.document=e,this.rendererFactory=n}removeJsScript(e){this._scriptsLoaded[e]&&(delete this._scriptsLoaded[e],this.document.getElementById(e).remove())}loadJsScript(e,n=[],r=this.document.body){let o=new Ai;if(this._scriptsLoaded[e.id])return $t(this.document.getElementById(e.id));let a=this._renderer().createElement("script");return a.id=e.id,a.type="text/javascript",a.src=e.src,n.forEach(c=>a.setAttribute(c[0],c[1])),a.onload=()=>{o.next(a)},a.onerror=()=>{console.error(`Error loading script url: ${e.src}`),o.error(a)},this._scriptsLoaded[e.id]=!0,this._renderer().appendChild(r,a),o}_renderer(){return this.rendererFactory.createRenderer(null,null)}static \u0275fac=function(n){return new(n||t)(ai(Gr),ai(Jd))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var bu=(()=>{class t{_router;_titleService;_brand;_maxTitleLength=60;static title(e){return{primaryKeyword:`${e}`}}constructor(e,n,r){this._router=e,this._titleService=n,this._brand=r,this._brand=this._brand?this._brand:"BinDoc"}init(){this._router.events.pipe(vn(e=>e instanceof l4),vn(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 n=e.snapshot.data.pageTitle.primaryKeyword;return this.pageTitleText(n)}else return this._brand}static \u0275fac=function(n){return new(n||t)(ai(Ws),ai(ote),ai("BD_PAGE_TITLE_BRAND",8))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ul={position:"center",modal:!0,width:"75%",closable:!0,closeOnEscape:!0,maximizable:!0,breakpoints:{"640px":"100%","768px":"90%","1024px":"85%","1280px":"80%"}};var Zxe=(()=>{class t{_cache=new kM(100);get(e){return this._cache.get(e)}set(e){this._cache.set(e.id,e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var iC=(()=>{class t{_httpClient;_environmentService;_groupsCache;_store;constructor(e,n,r){this._httpClient=e,this._environmentService=n,this._groupsCache=r,this._store=new Roe(this._environmentService)}getById(e){let n=this._groupsCache.get(e),r;if(n)r=$t(n);else{let o=this._store.getById(e);r=this._httpClient.get(o).pipe(yo(a=>this._groupsCache.set(a)))}return r}update(e){let n=this._store.getById(e.id);return this._httpClient.put(n,e)}delete(e){let n=this._store.getById(e);return this._httpClient.delete(n)}getAllUsersByGroupId(e){let n=this._store.usersById(e);return this._httpClient.get(n)}addUserToGroup(e,n,r){let o=this._store.userById(e,n);return this._httpClient.post(o,{permission:r})}getUserPermissionByGroupId(e,n){let r=this._store.userById(e,n);return this._httpClient.get(r)}removeUserFromGroup(e,n){let r=this._store.userById(e,n);return this._httpClient.delete(r)}getAllPermissionsByGroupId(e){let n=this._store.modulePermissionsById(e);return this._httpClient.get(n)}addPermissionsToGroup(e,n){let r=this._store.modulePermissionById(e,n);return this._httpClient.post(r,{})}removePermissionsFromGroup(e,n){let r=this._store.modulePermissionById(e,n);return this._httpClient.delete(r,{})}getAllFeaturePermissionsByGroupId(e){let n=this._store.featurePermissionsById(e);return this._httpClient.get(n)}addFeaturePermissionsToGroup(e,n){let r=this._store.featurePermissionById(e,n);return this._httpClient.post(r,{})}removeFeaturePermissionsFromGroup(e,n){let r=this._store.featurePermissionById(e,n);return this._httpClient.delete(r,{})}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr),ai(Zxe))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var m7e=(()=>{class t{_permissionService;constructor(e){this._permissionService=e}transform(e,n){return this._permissionService.getById(e).toPromise()}static \u0275fac=function(n){return new(n||t)(xe(iC,16))};static \u0275pipe=Tu({name:"groupAdmin",type:t,pure:!0})}return t})();var Poe=class{_environmentService;constructor(i){this._environmentService=i}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}archive(i,e){return`${this.base()}/archive/${i}/${e}`}sharedResourceWithPermission(i,e,n){return`${this.base()}/shared/${i}/${e}/${n}`}sharedResources(i){return`${this.base()}/shared/${i}`}};var Rm=(()=>{class t{_httpClient;_environmentService;_store;_cache={};constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new Poe(this._environmentService)}hasPermission(e,n,r){let o=this._getKey(n,e,r),a=this._cache[o];if(!a){let c=this._store.sharedResourceWithPermission(e,n,r);a=this._httpClient.get(c).toPromise().then(()=>!0).catch(()=>!1),this._cache[o]=a}return a}archive(e,n){let r=this._store.archive(e,n);return this._httpClient.delete(r)}sharedResources(e,n="READ",r="CREATOR"){let o=this._store.sharedResources(e),a=new Vo;return a=a.set("minPermission",n),a=a.set("maxPermission",r),this._httpClient.get(o,{params:a})}_getKey(e,n,r){return`${e}_${n}_${r}`}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Noe=class{_environmentService;constructor(i){this._environmentService=i}base(){return`${this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}/admin/resources`}archive(i,e,n){return`${this.base()}/archive/${i}/${e}/${n}`}share(i){return`${this.base()}/share/${i}`}sharedRecordsByUserId(i){return`${this.base()}/shared/user/${i}`}sharedRecordsByGroupId(i){return`${this.base()}/shared/group/${i}`}sharedRecordsByResourceName(i){return`${this.base()}/shared/${i}`}sharedRecordsByResourceNameAndUserId(i,e){return`${this.base()}/shared/${e}/user/${i}`}sharedResourceCreator(i,e){return`${this.base()}/shared/${i}/${e}/creator`}};var rf=(()=>{class t{_httpClient;_environmentService;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new Noe(this._environmentService)}share(e){let n=this._store.share(e.resource_name);return this._httpClient.post(n,e)}archive(e,n,r){let o=this._store.archive(e,n,r);return this._httpClient.delete(o)}sharedResourceCreator(e,n){let r=this._store.sharedResourceCreator(e,n);return this._httpClient.get(r)}sharedRecordsByUserId(e){let n=this._store.sharedRecordsByUserId(e);return this._httpClient.get(n)}sharedRecordsByGroupId(e){let n=this._store.sharedRecordsByGroupId(e);return this._httpClient.get(n)}sharedRecordsByResourceName(e){let n=this._store.sharedRecordsByResourceName(e);return this._httpClient.get(n)}sharedRecordsByResourceNameAndUserId(e,n){let r=this._store.sharedRecordsByResourceNameAndUserId(n,e);return this._httpClient.get(r)}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xp=(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})(xp||{}),FEn=[xp.ADMIN,xp.BUSINESS_CASE,xp.CLINIC_BROWSER,xp.CLINIC_OPERATING_NUMBERS,xp.CODE_BROWSER,xp.COMPETITOR_ANALYSIS,xp.CUBE,xp.CUBE_BASE,xp.CUBE_PREVIEW,xp.DRG_BENCHMARKING,xp.HARTMANN_OPPORTUNITY_COSTS,xp.HARTMANN_OPPORTUNITY_COSTS_CH,xp.HARTMANN_VIRTUAL_CLINIC_ANALYSIS,xp.INTUITIVE_PROFITABILITY_ANALYSIS,xp.INTUITIVE_VIRTUAL_CLINIC_DETAILS_CHANGE,xp.OP_LIVE,xp.POTENTIAL_ANALYSIS,xp.PROJECTION,xp.REFERRAL_ANALYSIS,xp.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS,xp.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS_ADVANCED];var P$=class t{static includedLower(i){let e=["CREATOR","DELETE","UPDATE","READ"],n=e.indexOf(i);if(n===-1)throw new Error(`Invalid permission type: ${i}`);return e.slice(n)}static includedBetween(i="READ",e="CREATOR"){let n=["READ","UPDATE","DELETE","CREATOR"],r=c=>{let m=n.indexOf(c);return m>-1?m:null},o=r(i)||0,a=r(e)+1||4;return n.slice(o,a)}static includes(i,e){return t.includedLower(i).indexOf(e)>-1}};var N$={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 yl=class{static merge(i,e){return Object.keys(e).forEach(r=>{if(!i[r])i[r]=e[r];else{let o=e[r].filter(a=>i[r].indexOf(a)===-1);i[r]=i[r].concat(o)}}),i}static flatten(i){let e=Object.keys(i),n=[];return e.forEach(r=>{i[r].forEach(o=>{n.push({resourceName:r,resourceId:o})})}),n}};var tn=(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})(tn||{}),F$={[tn.CH_VIRTUAL_CLINIC]:"Virtuelle Klinik CH",[tn.AT_CUBE_DASHBOARD]:"Cube Dashboard AT",[tn.AT_CODE_SPECTRUM]:"Ziffer-Spektra AT",[tn.AT_VIRTUAL_CLINIC]:"Virtuelle Klinik AT",[tn.APP_CONTENT_SNIPPET]:"Content Snippet",[tn.CASE_EXPORT_TEMPLATE]:"Fall Export Vorlage",[tn.CLINIC_OPERATING_NUMBER_GROUP]:"Kennzahlengruppe",[tn.CODE_SPECTRUM]:"Ziffer-Spektra",[tn.CLINICS_FILTER]:"Klinik-Filter",[tn.MARKET]:"M\xE4rkte",[tn.VIRTUAL_CLINIC]:"Virtuelle Klinik",[tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:"Cube Dashboard",[tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP]:"Virtuelle Benchmarking-Gruppe",[tn.VIRTUAL_CLINIC_REFERRAL_IMPORT]:"Einweiser Import",[tn.SCENARIO_ANALYSIS]:"Szenario-Analyse",[tn.SCENARIO_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Simulation",[tn.SCENARIO_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Simulation",[tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Kalkulation",[tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Kalkulation",[tn.UK_CODE_SPECTRUM]:"Code-Spectra UK",[tn.VIRTUAL_CLINIC_CZ]:"Virtuelle Klinik",[tn.FILE]:"Datei"};var Foe={[tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:{children:[tn.CODE_SPECTRUM,tn.VIRTUAL_CLINIC]},[tn.CODE_SPECTRUM]:{parents:[tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[tn.VIRTUAL_CLINIC]:{parents:[tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[tn.APP_CONTENT_SNIPPET]:{children:[tn.CODE_SPECTRUM,tn.MARKET,tn.CLINICS_FILTER,tn.VIRTUAL_CLINIC]}};var t1=class{static filter(i,e){e=e.toLowerCase();let n,r=!1;return i.id&&(r=i.id.toLowerCase().indexOf(e)!==-1),i.name&&(n=i.name.toLowerCase().indexOf(e)!==-1),i.labels&&(n=i.labels.some(o=>o.toLowerCase().indexOf(e)!==-1)),n||r}static sort(i,e,n){let r=n.field,o=i[r],a=e[r];return typeof o=="string"?this.sortString(o.toString(),a.toString(),n):o instanceof Date?this.sortDate(new Date(o),new Date(a),n):a?o?o.toString().localeCompare(a.toString()):1:-1}static sortString(i,e,n){return e?i?n.desc?e.localeCompare(i):i.localeCompare(e):1:-1}static sortDate(i,e,n){return e?i?n.desc?e.getTime()-i.getTime():i.getTime()-e.getTime():1:-1}};var Loe=class{_environmentService;constructor(i){this._environmentService=i}users(){return`${this._base()}/admin/users`}byId(i){return`${this._base()}/admin/users/${i}`}userCompanies(i){return`${this._base()}/admin/users/${i}/companies`}disableById(i){return`${this._base()}/admin/users/${i}/disable`}enableById(i){return`${this._base()}/admin/users/${i}/enable`}_base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}};var Xxe=(()=>{class t{_cache=new kM(50);get(e){return this._cache.get(e)}set(e){this._cache.set(e.oid,e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var gr=class{static equals(i,e,n=(r,o)=>r===o){return i===void 0&&e===void 0||i===null&&e===null?!0:typeof i=="boolean"?i===e:i&&e?n(i,e):!1}};var su=class t{tileId;propertyKey;value;overrideValue;deleteState;dependencyVirtualClinicId;equalsFn;_cloneFn;constructor(i,e,n,r,o,a=void 0,c=(g,C)=>g===C,m=g=>JSON.parse(JSON.stringify(g))){this.tileId=i,this.propertyKey=e,this.value=n,this.overrideValue=r,this.deleteState=o,this.dependencyVirtualClinicId=a,this.equalsFn=c,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(i){return gr.equals(this.tileId,i.tileId)&&gr.equals(this.propertyKey,i.propertyKey)&&gr.equals(this.value,i.value,(e,n)=>this.equalsFn(e,n))}},lu=class{static overrideProperty(i,e,n,r){if(!n)return r(i)??null;let o=n.find(a=>gr.equals(e,a.propertyKey)&&gr.equals(i,a.value,(c,m)=>a.equalsFn(c,m)));return o?o.deleteState==="should-be-deleted"?null:r(o.overrideValue):r(i)??null}static overrideProperties(i,e,n,r){return i.map(o=>this.overrideProperty(o,e,n,r)).filter(o=>!!o)}};var MM=["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"];var Ew=class{percentage(i,e,n){return(i-e)/(n-e)}},f7e={custom:"Eigene Farben",scheme:"Farbverlauf",lightness:"Helligkeitsverlauf",judgement:"Bewertung"};function gh(t,i){Q2t(t)&&(t="100%");let e=Z2t(t);return t=i===360?t:Math.min(i,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*i),10)/100),Math.abs(t-i)<1e-6?1:(i===360?t=(t<0?t%i+i:t%i)/parseFloat(String(i)):t=t%i/parseFloat(String(i)),t)}function L$(t){return Math.min(1,Math.max(0,t))}function Q2t(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Z2t(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Boe(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function B$(t){return Number(t)<=1?`${Number(t)*100}%`:t}function OM(t){return t.length===1?"0"+t:String(t)}function g7e(t,i,e){return{r:gh(t,255)*255,g:gh(i,255)*255,b:gh(e,255)*255}}function e1e(t,i,e){t=gh(t,255),i=gh(i,255),e=gh(e,255);let n=Math.max(t,i,e),r=Math.min(t,i,e),o=0,a=0,c=(n+r)/2;if(n===r)a=0,o=0;else{let m=n-r;switch(a=c>.5?m/(2-n-r):m/(n+r),n){case t:o=(i-e)/m+(i1&&(e-=1),e<1/6?t+(i-t)*(6*e):e<1/2?i:e<2/3?t+(i-t)*(2/3-e)*6:t}function _7e(t,i,e){let n,r,o;if(t=gh(t,360),i=gh(i,100),e=gh(e,100),i===0)r=e,o=e,n=e;else{let a=e<.5?e*(1+i):e+i-e*i,c=2*e-a;n=Jxe(c,a,t+1/3),r=Jxe(c,a,t),o=Jxe(c,a,t-1/3)}return{r:n*255,g:r*255,b:o*255}}function t1e(t,i,e){t=gh(t,255),i=gh(i,255),e=gh(e,255);let n=Math.max(t,i,e),r=Math.min(t,i,e),o=0,a=n,c=n-r,m=n===0?0:c/n;if(n===r)o=0;else{switch(n){case t:o=(i-e)/c+(i>16,g:(t&65280)>>8,b:t&255}}var V$={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 x7e(t){let i={r:0,g:0,b:0},e=1,n=null,r=null,o=null,a=!1,c=!1;return typeof t=="string"&&(t=tOt(t)),typeof t=="object"&&(n0(t.r)&&n0(t.g)&&n0(t.b)?(i=g7e(t.r,t.g,t.b),a=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):n0(t.h)&&n0(t.s)&&n0(t.v)?(n=B$(t.s),r=B$(t.v),i=y7e(t.h,n,r),a=!0,c="hsv"):n0(t.h)&&n0(t.s)&&n0(t.l)?(n=B$(t.s),o=B$(t.l),i=_7e(t.h,n,o),a=!0,c="hsl"):n0(t.c)&&n0(t.m)&&n0(t.y)&&n0(t.k)&&(i=b7e(t.c,t.m,t.y,t.k),a=!0,c="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=Boe(e),{ok:a,format:t.format||c,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:e}}var J2t="[-\\+]?\\d+%?",eOt="[-\\+]?\\d*\\.\\d+%?",RM="(?:"+eOt+")|(?:"+J2t+")",o1e="[\\s|\\(]+("+RM+")[,|\\s]+("+RM+")[,|\\s]+("+RM+")\\s*\\)?",Voe="[\\s|\\(]+("+RM+")[,|\\s]+("+RM+")[,|\\s]+("+RM+")[,|\\s]+("+RM+")\\s*\\)?",nC={CSS_UNIT:new RegExp(RM),rgb:new RegExp("rgb"+o1e),rgba:new RegExp("rgba"+Voe),hsl:new RegExp("hsl"+o1e),hsla:new RegExp("hsla"+Voe),hsv:new RegExp("hsv"+o1e),hsva:new RegExp("hsva"+Voe),cmyk:new RegExp("cmyk"+Voe),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 tOt(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let i=!1;if(V$[t])t=V$[t],i=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=nC.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=nC.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=nC.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=nC.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=nC.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=nC.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=nC.cmyk.exec(t),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=nC.hex8.exec(t),e?{r:oy(e[1]),g:oy(e[2]),b:oy(e[3]),a:r1e(e[4]),format:i?"name":"hex8"}:(e=nC.hex6.exec(t),e?{r:oy(e[1]),g:oy(e[2]),b:oy(e[3]),format:i?"name":"hex"}:(e=nC.hex4.exec(t),e?{r:oy(e[1]+e[1]),g:oy(e[2]+e[2]),b:oy(e[3]+e[3]),a:r1e(e[4]+e[4]),format:i?"name":"hex8"}:(e=nC.hex3.exec(t),e?{r:oy(e[1]+e[1]),g:oy(e[2]+e[2]),b:oy(e[3]+e[3]),format:i?"name":"hex"}:!1))))))))))}function n0(t){return typeof t=="number"?!Number.isNaN(t):nC.CSS_UNIT.test(t)}var ua=class t{constructor(i="",e={}){if(i instanceof t)return i;typeof i=="number"&&(i=C7e(i)),this.originalInput=i;let n=x7e(i);this.originalInput=i,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??n.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=n.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let i=this.toRgb();return(i.r*299+i.g*587+i.b*114)/1e3}getLuminance(){let i=this.toRgb(),e,n,r,o=i.r/255,a=i.g/255,c=i.b/255;return o<=.03928?e=o/12.92:e=Math.pow((o+.055)/1.055,2.4),a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),c<=.03928?r=c/12.92:r=Math.pow((c+.055)/1.055,2.4),.2126*e+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(i){return this.a=Boe(i),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:i}=this.toHsl();return i===0}toHsv(){let i=t1e(this.r,this.g,this.b);return{h:i.h*360,s:i.s,v:i.v,a:this.a}}toHsvString(){let i=t1e(this.r,this.g,this.b),e=Math.round(i.h*360),n=Math.round(i.s*100),r=Math.round(i.v*100);return this.a===1?`hsv(${e}, ${n}%, ${r}%)`:`hsva(${e}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let i=e1e(this.r,this.g,this.b);return{h:i.h*360,s:i.s,l:i.l,a:this.a}}toHslString(){let i=e1e(this.r,this.g,this.b),e=Math.round(i.h*360),n=Math.round(i.s*100),r=Math.round(i.l*100);return this.a===1?`hsl(${e}, ${n}%, ${r}%)`:`hsla(${e}, ${n}%, ${r}%, ${this.roundA})`}toHex(i=!1){return i1e(this.r,this.g,this.b,i)}toHexString(i=!1){return"#"+this.toHex(i)}toHex8(i=!1){return v7e(this.r,this.g,this.b,this.a,i)}toHex8String(i=!1){return"#"+this.toHex8(i)}toHexShortString(i=!1){return this.a===1?this.toHexString(i):this.toHex8String(i)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let i=Math.round(this.r),e=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${i}, ${e}, ${n})`:`rgba(${i}, ${e}, ${n}, ${this.roundA})`}toPercentageRgb(){let i=e=>`${Math.round(gh(e,255)*100)}%`;return{r:i(this.r),g:i(this.g),b:i(this.b),a:this.a}}toPercentageRgbString(){let i=e=>Math.round(gh(e,255)*100);return this.a===1?`rgb(${i(this.r)}%, ${i(this.g)}%, ${i(this.b)}%)`:`rgba(${i(this.r)}%, ${i(this.g)}%, ${i(this.b)}%, ${this.roundA})`}toCmyk(){return pe({},n1e(this.r,this.g,this.b))}toCmykString(){let{c:i,m:e,y:n,k:r}=n1e(this.r,this.g,this.b);return`cmyk(${i}, ${e}, ${n}, ${r})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;let i="#"+i1e(this.r,this.g,this.b,!1);for(let[e,n]of Object.entries(V$))if(i===n)return e;return!1}toString(i){let e=!!i;i=i??this.format;let n=!1,r=this.a<1&&this.a>=0;return!e&&r&&(i.startsWith("hex")||i==="name")?i==="name"&&this.a===0?this.toName():this.toRgbString():(i==="rgb"&&(n=this.toRgbString()),i==="prgb"&&(n=this.toPercentageRgbString()),(i==="hex"||i==="hex6")&&(n=this.toHexString()),i==="hex3"&&(n=this.toHexString(!0)),i==="hex4"&&(n=this.toHex8String(!0)),i==="hex8"&&(n=this.toHex8String()),i==="name"&&(n=this.toName()),i==="hsl"&&(n=this.toHslString()),i==="hsv"&&(n=this.toHsvString()),i==="cmyk"&&(n=this.toCmykString()),n||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(i=10){let e=this.toHsl();return e.l+=i/100,e.l=L$(e.l),new t(e)}brighten(i=10){let e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(i/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(i/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(i/100)))),new t(e)}darken(i=10){let e=this.toHsl();return e.l-=i/100,e.l=L$(e.l),new t(e)}tint(i=10){return this.mix("white",i)}shade(i=10){return this.mix("black",i)}desaturate(i=10){let e=this.toHsl();return e.s-=i/100,e.s=L$(e.s),new t(e)}saturate(i=10){let e=this.toHsl();return e.s+=i/100,e.s=L$(e.s),new t(e)}greyscale(){return this.desaturate(100)}spin(i){let e=this.toHsl(),n=(e.h+i)%360;return e.h=n<0?360+n:n,new t(e)}mix(i,e=50){let n=this.toRgb(),r=new t(i).toRgb(),o=e/100,a={r:(r.r-n.r)*o+n.r,g:(r.g-n.g)*o+n.g,b:(r.b-n.b)*o+n.b,a:(r.a-n.a)*o+n.a};return new t(a)}analogous(i=6,e=30){let n=this.toHsl(),r=360/e,o=[this];for(n.h=(n.h-(r*i>>1)+720)%360;--i;)n.h=(n.h+r)%360,o.push(new t(n));return o}complement(){let i=this.toHsl();return i.h=(i.h+180)%360,new t(i)}monochromatic(i=6){let e=this.toHsv(),{h:n}=e,{s:r}=e,{v:o}=e,a=[],c=1/i;for(;i--;)a.push(new t({h:n,s:r,v:o})),o=(o+c)%1;return a}splitcomplement(){let i=this.toHsl(),{h:e}=i;return[this,new t({h:(e+72)%360,s:i.s,l:i.l}),new t({h:(e+216)%360,s:i.s,l:i.l})]}onBackground(i){let e=this.toRgb(),n=new t(i).toRgb(),r=e.a+n.a*(1-e.a);return new t({r:(e.r*e.a+n.r*n.a*(1-e.a))/r,g:(e.g*e.a+n.g*n.a*(1-e.a))/r,b:(e.b*e.a+n.b*n.a*(1-e.a))/r,a:r})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(i){let e=this.toHsl(),{h:n}=e,r=[this],o=360/i;for(let a=1;a0){let o=this.good.toHsl(),a=1-this.good.toHsl().l,c=1-i/n;o.l=o.l+a*c,r=new ua(o)}else{let o=this.bad.toHsl(),a=this.bad.toHsl().l,c=1-i/e;o.l=o.l+a*c,r=new ua(o)}return r}equals(i){switch(i.type){case"judgement":return this.good.equals(i.good)&&this.bad.equals(i.bad);default:return!1}}};var rC=class t extends Ew{color;type="lightness";static fromObject(i){let e=i&&i.color?new ua(i.color):new ua("hsl(0, 100%, 50%)");return new t(e)}constructor(i){super(),this.color=i}clone(){return new t(this.color.clone())}toJSON(){return{type:this.type,color:this.color.toHslString()}}getColorForValue(i,e,n){let r;if(i===e)r=new ua("#ffffff");else if(i===n)r=this.color;else{let o=this.color.toHsl(),a=1-this.color.toHsl().l,c=1-this.percentage(i,e,n);o.l=o.l+a*c,r=new ua(o)}return r}equals(i){switch(i.type){case"lightness":return this.color.equals(i.color);default:return!1}}};var a1e={low:new ua("hsl(0, 100%, 50%)"),high:new ua("hsl(180, 100%, 50%)")},r0=class t extends Ew{colorScheme;static fromObject(i){let e;return i.colorScheme&&(e={low:i.colorScheme.low?new ua(i.colorScheme.low):a1e.low,high:i.colorScheme.high?new ua(i.colorScheme.high):a1e.high}),new t(e)}type="scheme";constructor(i=a1e){super(),this.colorScheme=i}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()}}}equals(i){switch(i.type){case"scheme":return this.colorScheme.high.equals(i.colorScheme.high)&&this.colorScheme.low.equals(i.colorScheme.low);default:return!1}}getColorForValue(i,e,n){let r;if(i===e)r=this.colorScheme.low;else if(i===n)r=this.colorScheme.high;else{let o=Math.round(this.percentage(i,e,n)*100);r=this.colorScheme.low.clone().mix(this.colorScheme.high.clone(),o)}return r}};var Ni=class t{static move(i,e,n){if(n>=i.length){let r=n-i.length+1;for(;r--;)i.push(void 0)}return i.splice(n,0,i.splice(e,1)[0]),i}static unique(i,e){return[...new Map(i.map(n=>[e(n),n])).values()]}static equals(i,e,n,r){let o;if(!i&&!e)o=!0;else if(!i||!e)o=!1;else{let a=r?i.slice().sort(r):i.slice().sort(),c=r?e.slice().sort(r):e.slice().sort();o=a.length===c.length&&a.every((m,g)=>{let C;return n?C=n(m,c[g]):C=m===c[g],C})}return o}static average(i){let e=null;return i&&i.length>0&&(e=i.reduce((n,r)=>n+r,0)/i.length),e}static sum(i){let e=null;return i&&i.length>0&&(e=i.reduce((n,r)=>n+r,0)),e}static median(i){return t.quartile(i,.5)}static quartile(i,e){if(i&&i.length>0){i.sort((c,m)=>c-m);let r=(i.length-1)*e,o=Math.floor(r),a=r-o;return i[o+1]!==void 0?i[o]+a*(i[o+1]-i[o]):i[o]}return null}static chunking(i,e){let n=0,r=i.length,o=[];for(n=0;n$e(pe({},n),{color:new ua(n.color)}))),new t(e)}constructor(i=[]){super(),this.ranges=i}getColorForValue(i){return this.ranges.find(e=>e.from<=i&&i$e(pe({},i),{color:i.color.clone()})))}equals(i){switch(i.type){case"custom":return Ni.equals(this.ranges,i.ranges,(e,n)=>e.from===n.from&&e.to===n.to&&e.color.equals(n.color));default:return!1}}toJSON(){return{type:this.type,ranges:this.ranges.map(i=>$e(pe({},i),{color:i.color.toString()}))}}};var v5=class{static fromObject(i){let e=null;if(!i.type)return e;switch(i.type){case"lightness":{e=rC.fromObject(i);break}case"scheme":{e=r0.fromObject(i);break}case"judgement":{e=y5.fromObject(i);break}default:e=zoe.fromObject(i)}return e}};var jg=class{};var Uoe=class{static process(i,e,n="..."){return i.length{class t{static ILLEGAL_CHARACTERS_IN_SHEET_NAME=["[","]","/","\\","<",">","&",":","*"];static MAX_SHEET_NAME_LENGTH=31;static DEFAULT_SHEET_NAME="Export";static sanitizeSheetName(e,n=this.MAX_SHEET_NAME_LENGTH){return(!e||e.length===0)&&(e=this.DEFAULT_SHEET_NAME),e=Uoe.process(e,n),this.ILLEGAL_CHARACTERS_IN_SHEET_NAME.forEach(r=>{e=e.replace(r," ")}),e}}return t})();var z$={minimumFractionDigits:0,maximumFractionDigits:2},Ru=class{static convertAngularFormatString(i){if(!i.match(/[0-9].[0-9]-[0-9]/))throw new Error("Invalid format string.");let e=i.split(".")[1].split("-"),n=parseInt(e[0]),r=parseInt(e[1]);return{minimumFractionDigits:n,maximumFractionDigits:r}}static format(i,e=z$,n=navigator.languages){let r="";return!isNaN(i)&&i!=null&&(r=new Intl.NumberFormat(n,e).format(i)),r}};var S7e=(()=>{class t{static 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(n=>n.trim())}}return t})();var b5=class{isEnabled;_subs=[];_unsubscribe(){this._subs.forEach(i=>i.unsubscribe()),this._subs=[]}};var PM=class{};var Hoe=class t{firstName;lastName;emailAddress;password;hubspotOwnerId;static fromObject(i){return new t(i.firstName,i.lastName,i.emailAddress,i.password,i.hubspotOwnerId)}constructor(i,e,n,r,o){this.firstName=i,this.lastName=e,this.emailAddress=n,this.password=r,this.hubspotOwnerId=o}isValid(){return!!this.firstName||!!this.lastName||!!this.emailAddress||!!this.hubspotOwnerId}assertValid(){if(!this.isValid())throw new Error('user requires "firstName", "lastName", "hubspotOwnerId" and "emailAddress"')}};var $g=(()=>{class t{_cacheService;_httpClient;_environmentService;_store;constructor(e,n,r){this._cacheService=e,this._httpClient=n,this._environmentService=r,this._store=new Loe(this._environmentService)}create(e,n,r,o,a){let c=this._store.users(),m=new Hoe(e,n,r,o,a);return m.assertValid(),this._httpClient.post(c,m)}getAll(){let e=this._store.users();return this._httpClient.get(e)}getById(e,n=!0){let r,o=this._cacheService.get(e);if(o&&n)r=$t(o);else{let a=this._store.byId(e);r=this._httpClient.get(a).pipe(ot(c=>c&&c.oid?(this._cacheService.set(c),c):null))}return r}userCompanies(e){let n=this._store.userCompanies(e);return this._httpClient.get(n)}disable(e){let n=this._store.disableById(e);return this._httpClient.put(n,{})}enable(e){let n=this._store.enableById(e);return this._httpClient.put(n,{})}static \u0275fac=function(n){return new(n||t)(ai(Xxe),ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var w7e=(()=>{class t{_usersService;constructor(e){this._usersService=e}transform(e,n){return this._usersService.getById(e).toPromise()}static \u0275fac=function(n){return new(n||t)(xe($g,16))};static \u0275pipe=Tu({name:"userAdmin",type:t,pure:!0})}return t})();var I7e=mp(s1e()),Goe=class extends Xo{_availableFeatures;_authentication$;_msalInitialized;_featureStatusService;_featurePermissionService;menu$=new hi(1);constructor(i,e,n,r,o){super(),this._availableFeatures=i,this._authentication$=e,this._msalInitialized=n,this._featureStatusService=r,this._featurePermissionService=o,this._init()}_init(){let i=cv(0,6e4).pipe(On(()=>this._msalInitialized),On(()=>this._featureStatusService.getFeatureStatus(this._availableFeatures.map(r=>r.id))),vm((r,o)=>JSON.stringify(r)===JSON.stringify(o))),e=this._msalInitialized.pipe(On(()=>this._authentication$),vm(),On(r=>r?this._featurePermissionService.getPermissions(!0):$t(new Array))),n=Ec([i,e]).subscribe(r=>{this._update(r[0],r[1])});this._subs.push(n)}_update(i,e){let n=(0,I7e.groupBy)(this._availableFeatures,o=>o.type),r=Object.keys(n).map(o=>{let a;switch(o){case"tool":a=[{label:"Tools",expanded:!0,items:n[o].map(c=>this._getMenuItem(c,i,e))}];break;case"resource":a=[{label:"Ressourcen",expanded:!1,items:n[o].map(c=>this._getMenuItem(c,i,e))}];break;case"users":a=[{label:"Nutzer",expanded:!1,items:n[o].map(c=>this._getMenuItem(c,i,e))}];break;case"companies":a=[{label:"Kunden",expanded:!0,items:n[o].map(c=>this._getMenuItem(c,i,e))}];break;default:a=[{label:"Sonstige",expanded:!1,items:n[o].map(c=>this._getMenuItem(c,i,e))}];break}return a}).flat();this.menu$.next(r)}_getMenuItem(i,e,n){let r={id:i.id,label:i.displayName,disabled:!1};return i?.navigation?.externalLink?r.url=i.navigation.externalLink:r.routerLink=i?.navigation?.path,e[i.id]===!1?(r.icon="pi pi-exclamation-triangle",r.disabled=!0):this._needsPermission(i)&&n.indexOf(`${i.id}:BASE`)===-1&&(r.icon="pi pi-lock",r.disabled=!0),i?.navigation?.children&&i.navigation.children.length>0&&(r.items=i.navigation.children.filter(o=>o.path.join().includes("clinic-accessibility-analysis")?n.some(a=>a==="DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:CLINIC_ACCESSIBILITY_ANALYSIS"):!0).map(o=>({label:o.title,routerLink:o.path,disabled:r.disabled}))),r}_needsPermission(i){let e=!0;return(i.permissions===null||i.permissions.length>0&&i.permissions?.indexOf(`${i.id}:BASE`)===-1)&&(e=!1),e}};var T7e=` .p-panelmenu { display: flex; flex-direction: column; gap: dt('panelmenu.gap'); } .p-panelmenu-panel { background: dt('panelmenu.panel.background'); border-width: dt('panelmenu.panel.border.width'); border-style: solid; border-color: dt('panelmenu.panel.border.color'); color: dt('panelmenu.panel.color'); border-radius: dt('panelmenu.panel.border.radius'); padding: dt('panelmenu.panel.padding'); } .p-panelmenu-panel:first-child { border-width: dt('panelmenu.panel.first.border.width'); border-start-start-radius: dt('panelmenu.panel.first.top.border.radius'); border-start-end-radius: dt('panelmenu.panel.first.top.border.radius'); } .p-panelmenu-panel:last-child { border-width: dt('panelmenu.panel.last.border.width'); border-end-start-radius: dt('panelmenu.panel.last.bottom.border.radius'); border-end-end-radius: dt('panelmenu.panel.last.bottom.border.radius'); } .p-panelmenu-header { outline: 0 none; } .p-panelmenu-header-content { border-radius: dt('panelmenu.item.border.radius'); transition: background dt('panelmenu.transition.duration'), color dt('panelmenu.transition.duration'), outline-color dt('panelmenu.transition.duration'), box-shadow dt('panelmenu.transition.duration'); outline-color: transparent; color: dt('panelmenu.item.color'); } .p-panelmenu-header-link { display: flex; gap: dt('panelmenu.item.gap'); padding: dt('panelmenu.item.padding'); align-items: center; user-select: none; cursor: pointer; position: relative; text-decoration: none; color: inherit; } .p-panelmenu-header-icon, .p-panelmenu-item-icon { color: dt('panelmenu.item.icon.color'); } .p-panelmenu-submenu-icon { color: dt('panelmenu.submenu.icon.color'); } .p-panelmenu-submenu-icon:dir(rtl) { transform: rotate(180deg); } .p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content { background: dt('panelmenu.item.focus.background'); color: dt('panelmenu.item.focus.color'); } .p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-header-icon { color: dt('panelmenu.item.icon.focus.color'); } .p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-submenu-icon { color: dt('panelmenu.submenu.icon.focus.color'); } .p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover { background: dt('panelmenu.item.focus.background'); color: dt('panelmenu.item.focus.color'); } .p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-header-icon { color: dt('panelmenu.item.icon.focus.color'); } .p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-submenu-icon { color: dt('panelmenu.submenu.icon.focus.color'); } .p-panelmenu-submenu { margin: 0; padding: 0 0 0 dt('panelmenu.submenu.indent'); outline: 0; list-style: none; } .p-panelmenu-submenu:dir(rtl) { padding: 0 dt('panelmenu.submenu.indent') 0 0; } .p-panelmenu-item-link { display: flex; gap: dt('panelmenu.item.gap'); padding: dt('panelmenu.item.padding'); align-items: center; user-select: none; cursor: pointer; text-decoration: none; color: inherit; position: relative; overflow: hidden; } .p-panelmenu-item-label { line-height: 1; } .p-panelmenu-item-content { border-radius: dt('panelmenu.item.border.radius'); transition: background dt('panelmenu.transition.duration'), color dt('panelmenu.transition.duration'), outline-color dt('panelmenu.transition.duration'), box-shadow dt('panelmenu.transition.duration'); color: dt('panelmenu.item.color'); outline-color: transparent; } .p-panelmenu-item.p-focus > .p-panelmenu-item-content { background: dt('panelmenu.item.focus.background'); color: dt('panelmenu.item.focus.color'); } .p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-item-icon { color: dt('panelmenu.item.focus.color'); } .p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-submenu-icon { color: dt('panelmenu.submenu.icon.focus.color'); } .p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover { background: dt('panelmenu.item.focus.background'); color: dt('panelmenu.item.focus.color'); } .p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-item-icon { color: dt('panelmenu.item.icon.focus.color'); } .p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-submenu-icon { color: dt('panelmenu.submenu.icon.focus.color'); } `;var rOt=["list"],l1e=t=>({processedItem:t}),E7e=()=>({exact:!1}),A7e=t=>({$implicit:t});function oOt(t,i){if(t&1&&be(0,"li",6),t&2){let e=L().$implicit,n=L();Pe(n.cn(n.cx("separator"),n.getItemProp(e,"styleClass")))}}function aOt(t,i){if(t&1&&(Pi(),be(0,"svg",19)),t&2){let e=L(6).$implicit,n=L();Pe(n.cn(n.cx("submenuIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function sOt(t,i){if(t&1&&(Pi(),be(0,"svg",20)),t&2){let e=L(6).$implicit,n=L();Pe(n.cn(n.cx("submenuIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function lOt(t,i){if(t&1&&(fi(0),ie(1,aOt,1,3,"svg",17)(2,sOt,1,3,"svg",18),gi()),t&2){let e=L(5).$implicit,n=L();E(),D("ngIf",n.isItemActive(e)),E(),D("ngIf",!n.isItemActive(e))}}function cOt(t,i){}function dOt(t,i){t&1&&ie(0,cOt,0,0,"ng-template")}function uOt(t,i){if(t&1&&(fi(0),ie(1,lOt,3,2,"ng-container",9)(2,dOt,1,0,null,16),gi()),t&2){let e=L(5);E(),D("ngIf",!e.panelMenu.submenuIconTemplate&&!e.panelMenu._submenuIconTemplate),E(),D("ngTemplateOutlet",e.panelMenu.submenuIconTemplate||e.panelMenu._submenuIconTemplate)}}function pOt(t,i){if(t&1&&be(0,"span",21),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemIcon",Yi(3,l1e,e))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function mOt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),E(),Pt(n.getItemProp(e,"label"))}}function hOt(t,i){if(t&1&&be(0,"span",22),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),D("innerHTML",n.getItemProp(e,"label"),Dx)}}function fOt(t,i){if(t&1&&(O(0,"a",13),ie(1,uOt,3,2,"ng-container",9)(2,pOt,1,5,"span",14)(3,mOt,2,3,"span",15)(4,hOt,1,3,"ng-template",null,1,di),M()),t&2){let e=Oi(5),n=L(3).$implicit,r=L();Pe(r.cx("itemLink")),D("target",r.getItemProp(n,"target")),lt("href",r.getItemProp(n,"url"),td)("data-pc-section","action")("tabindex",r.parentExpanded?"0":"-1"),E(),D("ngIf",r.isItemGroup(n)),E(),D("ngIf",n.icon),E(),D("ngIf",(n.item==null?null:n.item.escape)!==!1)("ngIfElse",e)}}function gOt(t,i){if(t&1&&(Pi(),be(0,"svg",19)),t&2){let e=L(6).$implicit,n=L();Pe(n.cn(n.cx("submenuIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function _Ot(t,i){if(t&1&&(Pi(),be(0,"svg",20)),t&2){let e=L(6).$implicit,n=L();Pe(n.cn(n.cx("submenuIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function yOt(t,i){if(t&1&&(fi(0),ie(1,gOt,1,3,"svg",17)(2,_Ot,1,3,"svg",18),gi()),t&2){let e=L(5).$implicit,n=L();E(),D("ngIf",n.isItemActive(e)),E(),D("ngIf",!n.isItemActive(e))}}function vOt(t,i){}function bOt(t,i){t&1&&ie(0,vOt,0,0,"ng-template")}function COt(t,i){if(t&1&&(fi(0),ie(1,yOt,3,2,"ng-container",9)(2,bOt,1,0,null,16),gi()),t&2){let e=L(5);E(),D("ngIf",!e.panelMenu.submenuIconTemplate&&!e.panelMenu._submenuIconTemplate),E(),D("ngTemplateOutlet",e.panelMenu.submenuIconTemplate&&e.panelMenu._submenuIconTemplate)}}function xOt(t,i){if(t&1&&be(0,"span",21),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("itemIcon"),n.getItemProp(e,"icon"))),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function SOt(t,i){if(t&1&&be(0,"span",22),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("itemLabel")),D("innerHTML",n.getItemProp(e,"label"),Dx)}}function wOt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("badge"),n.getItemProp(e,"badgeStyleClass"))),E(),Pt(e.badge)}}function IOt(t,i){if(t&1&&(O(0,"a",23),ie(1,COt,3,2,"ng-container",9)(2,xOt,1,3,"span",14)(3,SOt,1,3,"span",24)(4,wOt,2,3,"span",25),M()),t&2){let e=L(3).$implicit,n=L();Pe(n.cx("itemLink")),D("routerLink",n.getItemProp(e,"routerLink"))("queryParams",n.getItemProp(e,"queryParams"))("routerLinkActive","p-panelmenu-item-link-active")("routerLinkActiveOptions",n.getItemProp(e,"routerLinkActiveOptions")||Vr(20,E7e))("target",n.getItemProp(e,"target"))("fragment",n.getItemProp(e,"fragment"))("queryParamsHandling",n.getItemProp(e,"queryParamsHandling"))("preserveFragment",n.getItemProp(e,"preserveFragment"))("skipLocationChange",n.getItemProp(e,"skipLocationChange"))("replaceUrl",n.getItemProp(e,"replaceUrl"))("state",n.getItemProp(e,"state")),lt("title",n.getItemProp(e,"title"))("data-pc-section","action")("tabindex",n.parentExpanded?"0":"-1"),E(),D("ngIf",n.isItemGroup(e)),E(),D("ngIf",e.icon),E(),D("ngIf",n.getItemProp(e,"label")),E(),D("ngIf",e.badge)}}function TOt(t,i){if(t&1&&(fi(0),ie(1,fOt,6,10,"a",11)(2,IOt,5,21,"a",12),gi()),t&2){let e=L(2).$implicit,n=L();E(),D("ngIf",!n.getItemProp(e,"routerLink")),E(),D("ngIf",n.getItemProp(e,"routerLink"))}}function EOt(t,i){}function AOt(t,i){t&1&&ie(0,EOt,0,0,"ng-template")}function DOt(t,i){if(t&1&&(fi(0),ie(1,AOt,1,0,null,26),gi()),t&2){let e=L(2).$implicit,n=L();E(),D("ngTemplateOutlet",n.itemTemplate)("ngTemplateOutletContext",Yi(2,A7e,e.item))}}function kOt(t,i){if(t&1){let e=qe();O(0,"p-panelmenu-sub",27),te("itemToggle",function(r){se(e);let o=L(3);return le(o.onItemToggle(r))}),M()}if(t&2){let e=L(2).$implicit,n=L();D("id",n.getItemId(e)+"_list")("panelId",n.panelId)("items",e==null?null:e.items)("itemTemplate",n.itemTemplate)("transitionOptions",n.transitionOptions)("focusedItemId",n.focusedItemId)("activeItemPath",n.activeItemPath)("level",n.level+1)("parentExpanded",!!n.parentExpanded&&n.isItemExpanded(e))}}function MOt(t,i){if(t&1){let e=qe();O(0,"li",7)(1,"div",8),te("click",function(r){se(e);let o=L().$implicit,a=L();return le(a.onItemClick(r,o))}),ie(2,TOt,3,2,"ng-container",9)(3,DOt,2,4,"ng-container",9),M(),O(4,"div"),ie(5,kOt,1,9,"p-panelmenu-sub",10),M()()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L();Pe(o.cn(o.cx("item",Yi(18,l1e,n)),o.getItemProp(n,"styleClass"))),D("ngStyle",o.getItemProp(n,"style"))("pTooltip",o.getItemProp(n,"tooltip"))("tooltipOptions",o.getItemProp(n,"tooltipOptions")),lt("id",o.getItemId(n))("aria-label",o.getItemProp(n,"label"))("aria-expanded",o.isItemGroup(n)?o.isItemActive(n):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(r))("data-p-disabled",o.isItemDisabled(n)),E(),Pe(o.cx("itemContent")),E(),D("ngIf",!o.itemTemplate),E(),D("ngIf",o.itemTemplate),E(),D("@submenu",o.getAnimation(n)),E(),D("ngIf",o.isItemVisible(n)&&o.isItemGroup(n)&&o.isItemExpanded(n))}}function OOt(t,i){if(t&1&&ie(0,oOt,1,2,"li",4)(1,MOt,6,20,"li",5),t&2){let e=i.$implicit,n=L();D("ngIf",e.separator),E(),D("ngIf",!e.separator&&n.isItemVisible(e))}}var ROt=["submenu"],POt=["submenuicon"],NOt=["headericon"],FOt=["item"],LOt=["container"],BOt=t=>({item:t});function VOt(t,i){if(t&1&&(Pi(),be(0,"svg",17)),t&2){let e=L(7);Pe(e.cx("headerIcon"))}}function zOt(t,i){if(t&1&&(Pi(),be(0,"svg",18)),t&2){let e=L(7);Pe(e.cx("headerIcon"))}}function UOt(t,i){if(t&1&&(fi(0),ie(1,VOt,1,2,"svg",15)(2,zOt,1,2,"svg",16),gi()),t&2){let e=L(5).$implicit,n=L();E(),D("ngIf",n.isItemActive(e)),E(),D("ngIf",!n.isItemActive(e))}}function HOt(t,i){}function GOt(t,i){t&1&&ie(0,HOt,0,0,"ng-template")}function jOt(t,i){if(t&1&&(fi(0),ie(1,UOt,3,2,"ng-container",6)(2,GOt,1,0,null,14),gi()),t&2){let e=L(5);E(),D("ngIf",!e.headerIconTemplate&&!e._headerIconTemplate),E(),D("ngTemplateOutlet",e.headerIconTemplate||e._headerIconTemplate)}}function $Ot(t,i){if(t&1&&be(0,"span",4),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("headerIcon"),e.icon)),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function qOt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("headerLabel")),E(),Pt(n.getItemProp(e,"label"))}}function YOt(t,i){if(t&1&&be(0,"span",19),t&2){let e=L(4).$implicit,n=L();Pe(n.cx("headerLabel")),D("innerHTML",n.getItemProp(e,"label"),Dx)}}function KOt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(4).$implicit,n=L();Pe(n.cn(n.cx("badge"),n.getItemProp(e,"badgeStyleClass"))),E(),Pt(n.getItemProp(e,"badge"))}}function WOt(t,i){if(t&1&&(O(0,"a",11),ie(1,jOt,3,2,"ng-container",6)(2,$Ot,1,3,"span",3)(3,qOt,2,3,"span",12)(4,YOt,1,3,"ng-template",null,0,di)(6,KOt,2,3,"span",13),M()),t&2){let e=Oi(5),n=L(3).$implicit,r=L();Pe(r.cx("headerLink")),D("target",r.getItemProp(n,"target")),lt("href",r.getItemProp(n,"url"),td)("tabindex",-1)("title",r.getItemProp(n,"title"))("data-pc-section","headeraction"),E(),D("ngIf",r.isItemGroup(n)),E(),D("ngIf",n.icon),E(),D("ngIf",r.getItemProp(n,"escape")!==!1)("ngIfElse",e),E(3),D("ngIf",r.getItemProp(n,"badge"))}}function QOt(t,i){if(t&1&&(fi(0),ie(1,WOt,7,12,"a",10),gi()),t&2){let e=L(2).$implicit,n=L();E(),D("ngIf",!n.getItemProp(e,"routerLink"))}}function ZOt(t,i){t&1&&Li(0)}function XOt(t,i){if(t&1&&(Pi(),be(0,"svg",17)),t&2){let e=L(6);Pe(e.cx("headerIcon"))}}function JOt(t,i){if(t&1&&(Pi(),be(0,"svg",18)),t&2){let e=L(6);Pe(e.cx("headerIcon"))}}function eRt(t,i){if(t&1&&(fi(0),ie(1,XOt,1,2,"svg",15)(2,JOt,1,2,"svg",16),gi()),t&2){let e=L(4).$implicit,n=L();E(),D("ngIf",n.isItemActive(e)),E(),D("ngIf",!n.isItemActive(e))}}function tRt(t,i){}function iRt(t,i){t&1&&ie(0,tRt,0,0,"ng-template")}function nRt(t,i){if(t&1&&(fi(0),ie(1,eRt,3,2,"ng-container",6)(2,iRt,1,0,null,14),gi()),t&2){let e=L(4);E(),D("ngIf",!e.headerIconTemplate&&!e._headerIconTemplate),E(),D("ngTemplateOutlet",e.headerIconTemplate||e._headerIconTemplate)}}function rRt(t,i){if(t&1&&be(0,"span",4),t&2){let e=L(3).$implicit,n=L();Pe(n.cn(n.cx("headerIcon"),e.icon)),D("ngStyle",n.getItemProp(e,"iconStyle"))}}function oRt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(3).$implicit,n=L();Pe(n.cx("headerLabel")),E(),Pt(n.getItemProp(e,"label"))}}function aRt(t,i){if(t&1&&be(0,"span",19),t&2){let e=L(3).$implicit,n=L();Pe(n.cx("headerLabel")),D("innerHTML",n.getItemProp(e,"label"),Dx)}}function sRt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(3).$implicit,n=L();Pe(n.cn(n.cx("badge"),n.getItemProp(e,"badgeStyleClass"))),E(),Pt(n.getItemProp(e,"badge"))}}function lRt(t,i){if(t&1&&(O(0,"a",20),ie(1,nRt,3,2,"ng-container",6)(2,rRt,1,3,"span",3)(3,oRt,2,3,"span",12)(4,aRt,1,3,"ng-template",null,1,di)(6,sRt,2,3,"span",13),M()),t&2){let e=Oi(5),n=L(2).$implicit,r=L();Pe(r.cx("headerLink")),D("routerLink",r.getItemProp(n,"routerLink"))("queryParams",r.getItemProp(n,"queryParams"))("routerLinkActive","p-panelmenu-item-link-active")("routerLinkActiveOptions",r.getItemProp(n,"routerLinkActiveOptions")||Vr(20,E7e))("target",r.getItemProp(n,"target"))("fragment",r.getItemProp(n,"fragment"))("queryParamsHandling",r.getItemProp(n,"queryParamsHandling"))("preserveFragment",r.getItemProp(n,"preserveFragment"))("skipLocationChange",r.getItemProp(n,"skipLocationChange"))("replaceUrl",r.getItemProp(n,"replaceUrl"))("state",r.getItemProp(n,"state")),lt("tabindex",-1)("data-pc-section","headeraction"),E(),D("ngIf",r.isItemGroup(n)),E(),D("ngIf",n.icon),E(),D("ngIf",r.getItemProp(n,"escape")!==!1)("ngIfElse",e),E(3),D("ngIf",r.getItemProp(n,"badge"))}}function cRt(t,i){if(t&1){let e=qe();O(0,"div",21),te("@rootItem.done",function(){se(e);let r=L(3);return le(r.onToggleDone())}),O(1,"div")(2,"p-panelMenuList",22),te("headerFocus",function(r){se(e);let o=L(3);return le(o.updateFocusedHeader(r))}),M()()()}if(t&2){let e=L(2),n=e.$implicit,r=e.index,o=L();Pe(o.cx("contentContainer",Yi(17,l1e,n))),D("@rootItem",o.getAnimation(n)),lt("id",o.getContentId(n,r))("aria-labelledby",o.getHeaderId(n,r))("data-pc-section","toggleablecontent"),E(),Pe(o.cx("content")),lt("data-pc-section","menucontent"),E(),D("panelId",o.getPanelId(r,n))("items",o.getItemProp(n,"items"))("itemTemplate",o.itemTemplate||o._itemTemplate)("transitionOptions",o.transitionOptions)("root",!0)("activeItem",o.activeItem())("tabindex",o.tabindex)("parentExpanded",o.isItemActive(n))}}function dRt(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"div",5),te("click",function(r){se(e);let o=L(),a=o.$implicit,c=o.index,m=L();return le(m.onHeaderClick(r,a,c))})("keydown",function(r){se(e);let o=L(),a=o.$implicit,c=o.index,m=L();return le(m.onHeaderKeyDown(r,a,c))}),O(2,"div"),ie(3,QOt,2,1,"ng-container",6)(4,ZOt,1,0,"ng-container",7)(5,lRt,7,21,"a",8),M()(),ie(6,cRt,3,19,"div",9),M()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L();Pe(o.cn(o.cx("panel"),o.getItemProp(n,"headerClass"))),D("ngStyle",o.getItemProp(n,"style")),lt("data-pc-section","panel"),E(),Pe(o.cn(o.cx("header",Yi(25,BOt,n)),o.getItemProp(n,"styleClass"))),D("ngStyle",o.getItemProp(n,"style"))("pTooltip",o.getItemProp(n,"tooltip"))("tabindex",0)("tooltipOptions",o.getItemProp(n,"tooltipOptions")),lt("id",o.getHeaderId(n,r))("aria-expanded",o.isItemActive(n))("aria-label",o.getItemProp(n,"label"))("aria-controls",o.getContentId(n,r))("aria-disabled",o.isItemDisabled(n))("data-p-highlight",o.isItemActive(n))("data-p-disabled",o.isItemDisabled(n))("data-pc-section","header"),E(),Pe(o.cx("headerContent")),E(),D("ngIf",!o.itemTemplate&&!o._itemTemplate),E(),D("ngTemplateOutlet",o.itemTemplate)("ngTemplateOutletContext",Yi(27,A7e,n)),E(),D("ngIf",o.getItemProp(n,"routerLink")),E(),D("ngIf",o.isItemGroup(n))}}function uRt(t,i){if(t&1&&(fi(0),ie(1,dRt,7,29,"div",3),gi()),t&2){let e=i.$implicit,n=L();E(),D("ngIf",n.isItemVisible(e))}}var pRt=` ${T7e} /*For PrimeNG*/ .p-panelmenu-item:not(.ng-animating) { overflow: hidden; } .p-panelmenu-panel { overflow: hidden; } .p-panelmenu-root-list, .p-panelmenu-submenu, .p-panelmenu-item-link { outline: 0 none; } `,mRt={root:()=>["p-panelmenu p-component"],panel:"p-panelmenu-panel",header:({instance:t,item:i})=>["p-panelmenu-header",{"p-panelmenu-header-active":t.isItemActive(i)&&!!i.items,"p-disabled":t.isItemDisabled(i)}],headerContent:"p-panelmenu-header-content",headerLink:"p-panelmenu-header-link",headerIcon:"p-panelmenu-header-icon",headerLabel:"p-panelmenu-header-label",contentContainer:({instance:t,processedItem:i})=>["p-panelmenu-content-container",{"p-panelmenu-expanded":t.isItemActive(i)}],content:"p-panelmenu-content",rootList:"p-panelmenu-root-list",item:({instance:t,processedItem:i})=>["p-panelmenu-item",{"p-focus":t.isItemFocused(i)&&!t.isItemDisabled(i),"p-disabled":t.isItemDisabled(i)}],itemContent:"p-panelmenu-item-content",itemLink:"p-panelmenu-item-link",itemIcon:"p-panelmenu-item-icon",itemLabel:"p-panelmenu-item-label",submenuIcon:"p-panelmenu-submenu-icon",submenu:"p-panelmenu-submenu",separator:"p-menuitem-separator",badge:"p-menuitem-badge"},joe=(()=>{class t extends br{name="panelmenu";theme=pRt;classes=mRt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var hRt=(()=>{class t extends ur{panelId;focusedItemId;items;itemTemplate;level=0;activeItemPath;root;tabindex;transitionOptions;parentExpanded;itemToggle=new ve;menuFocus=new ve;menuBlur=new ve;menuKeyDown=new ve;listViewChild;panelMenu=ae(No(()=>$oe));_componentStyle=ae(joe);getItemId(e){return e.item?.id??`${this.panelId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return{"p-panelmenu-item":!0,"p-disabled":this.isItemDisabled(e),"p-focus":this.isItemFocused(e)}}getItemProp(e,n,r){return e&&e.item?Kp(e.item[n],r):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isItemExpanded(e){return e.expanded}isItemActive(e){return this.isItemExpanded(e)||this.activeItemPath.some(n=>n&&n.key===e.key)}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return Ro(e.items)}getAnimation(e){return this.isItemActive(e)?{value:"visible",params:{transitionParams:this.transitionOptions,height:"*"}}:{value:"hidden",params:{transitionParams:this.transitionOptions,height:"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(n=>this.isItemVisible(n)&&this.getItemProp(n,"separator")).length+1}onItemClick(e,n){this.isItemDisabled(n)||(this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.itemToggle.emit({processedItem:n,expanded:!this.isItemActive(n)}))}onItemToggle(e){this.itemToggle.emit(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-panelMenuSub"],["p-panelmenu-sub"]],viewQuery:function(n,r){if(n&1&&Xi(rOt,5),n&2){let o;ze(o=Ue())&&(r.listViewChild=o.first)}},inputs:{panelId:"panelId",focusedItemId:"focusedItemId",items:"items",itemTemplate:"itemTemplate",level:[2,"level","level",En],activeItemPath:"activeItemPath",root:[2,"root","root",Je],tabindex:[2,"tabindex","tabindex",En],transitionOptions:"transitionOptions",parentExpanded:[2,"parentExpanded","parentExpanded",Je]},outputs:{itemToggle:"itemToggle",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeyDown:"menuKeyDown"},features:[Ii([joe]),Tt],decls:3,vars:7,consts:[["list",""],["htmlLabel",""],["role","tree",3,"focusin","focusout","keydown","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"class",4,"ngIf"],["role","treeitem",3,"class","ngStyle","pTooltip","tooltipOptions",4,"ngIf"],["role","separator"],["role","treeitem",3,"ngStyle","pTooltip","tooltipOptions"],[3,"click"],[4,"ngIf"],[3,"id","panelId","items","itemTemplate","transitionOptions","focusedItemId","activeItemPath","level","parentExpanded","itemToggle",4,"ngIf"],[3,"class","target",4,"ngIf"],[3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","class","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],[3,"target"],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["data-p-icon","chevron-down",3,"class","ngStyle",4,"ngIf"],["data-p-icon","chevron-right",3,"class","ngStyle",4,"ngIf"],["data-p-icon","chevron-down",3,"ngStyle"],["data-p-icon","chevron-right",3,"ngStyle"],[3,"ngStyle"],[3,"innerHTML"],[3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"class","innerHTML",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"itemToggle","id","panelId","items","itemTemplate","transitionOptions","focusedItemId","activeItemPath","level","parentExpanded"]],template:function(n,r){if(n&1){let o=qe();O(0,"ul",2,0),te("focusin",function(c){return se(o),le(r.menuFocus.emit(c))})("focusout",function(c){return se(o),le(r.menuBlur.emit(c))})("keydown",function(c){return se(o),le(r.menuKeyDown.emit(c))}),ie(2,OOt,2,2,"ng-template",3),M()}n&2&&(Pe(r.root?r.cn(r.cx("rootList"),r.cx("submenu")):r.cx("submenu")),D("tabindex",-1),lt("aria-activedescendant",r.focusedItemId)("data-pc-section","menu")("aria-hidden",!r.parentExpanded),E(2),D("ngForOf",r.items))},dependencies:[t,rr,Vl,Xr,Jr,Xs,Yf,Ms,f4,sE,tg,Dm,Gb,Un],encapsulation:2,data:{animation:[Wp("submenu",[J0("hidden",ul({height:"0"})),J0("visible",ul({height:"*"})),Oc("visible <=> hidden",[Jl("{{transitionParams}}")]),Oc("void => *",Jl(0))])]}})}return t})(),fRt=(()=>{class t extends ur{panelId;id;items;itemTemplate;parentExpanded;expanded;transitionOptions;root;tabindex;activeItem;itemToggle=new ve;headerFocus=new ve;subMenuViewChild;searchTimeout;searchValue;focused;focusedItem=hr(null);activeItemPath=hr([]);processedItems=hr([]);visibleItems=Or(()=>{let e=this.processedItems();return this.flatItems(e)});get focusedItemId(){let e=this.focusedItem();return e&&e.item?.id?e.item.id:Ro(this.focusedItem())?`${this.panelId}_${this.focusedItem().key}`:void 0}ngOnChanges(e){this.processedItems.set(this.createProcessedItems(e?.items?.currentValue||this.items||[]))}getItemProp(e,n){return e&&e.item?Kp(e.item[n]):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemActive(e){return this.activeItemPath().some(n=>n.key===e.parentKey)}isItemGroup(e){return Ro(e.items)}isElementInPanel(e,n){let r=e.currentTarget.closest('[data-pc-section="panel"]');return r&&r.contains(n)}isItemMatched(e){return this.isValidItem(e)&&this.getItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isVisibleItem(e){return!!e&&(e.level===0||this.isItemActive(e))&&this.isItemVisible(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e)&&!e.separator}findFirstItem(){return this.visibleItems().find(e=>this.isValidItem(e))}findLastItem(){return wbe(this.visibleItems(),e=>this.isValidItem(e))}findItemByEventTarget(e){let n=e;for(;n&&n.tagName?.toLowerCase()!=="li";)n=n?.parentNode;return n?.id&&this.visibleItems().find(r=>this.isValidItem(r)&&`${this.panelId}_${r.key}`===n.id)}createProcessedItems(e,n=0,r={},o=""){let a=[];return e&&e.forEach((c,m)=>{let g=(o!==""?o+"_":"")+m,C={icon:c.icon,expanded:c.expanded,separator:c.separator,item:c,index:m,level:n,key:g,parent:r,parentKey:o};C.items=this.createProcessedItems(c.items,n+1,C,g),a.push(C)}),a}findProcessedItemByItemKey(e,n,r=0){if(n=n||this.processedItems(),n&&n.length)for(let o=0;o{this.isVisibleItem(r)&&(n.push(r),this.flatItems(r.items,n))}),n}changeFocusedItem(e){let{originalEvent:n,processedItem:r,focusOnNext:o,selfCheck:a,allowHeaderFocus:c=!0}=e;Ro(this.focusedItem())&&this.focusedItem().key!==r.key?(this.focusedItem.set(r),this.scrollInView()):c&&this.headerFocus.emit({originalEvent:n,focusOnNext:o,selfCheck:a})}scrollInView(){let e=$r(this.subMenuViewChild.listViewChild.nativeElement,`li[id="${`${this.focusedItemId}`}"]`);e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"nearest"})}onFocus(e){if(!this.focused){this.focused=!0;let n=this.focusedItem()||(this.isElementInPanel(e,e.relatedTarget)?this.findItemByEventTarget(e.target)||this.findFirstItem():this.findLastItem());e.relatedTarget!==null&&this.focusedItem.set(n)}}onBlur(e){let n=e.relatedTarget;this.focused&&!this.el.nativeElement.contains(n)&&(this.focused=!1,this.focusedItem.set(null),this.searchValue="")}onItemToggle(e){let{processedItem:n,expanded:r}=e;n.item&&(n.item.expanded=!n.item.expanded),this.processedItems.set(this.createProcessedItems(this.items||[],0,{},""));let o=this.activeItemPath().filter(a=>a.parentKey!==n.parentKey);r&&o.push(n),this.activeItemPath.set(o),this.focusedItem.set(n)}onKeyDown(e){let n=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":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&Yk(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let n=Ro(this.focusedItem())?this.findNextItem(this.focusedItem()):this.findFirstItem();this.changeFocusedItem({originalEvent:e,processedItem:n,focusOnNext:!0}),e.preventDefault()}onArrowUpKey(e){let n=Ro(this.focusedItem())?this.findPrevItem(this.focusedItem()):this.findLastItem();this.changeFocusedItem({originalEvent:e,processedItem:n,selfCheck:!0}),e.preventDefault()}onArrowLeftKey(e){if(Ro(this.focusedItem())){if(this.activeItemPath().some(r=>r.key===this.focusedItem().key)){let r=this.activeItemPath().filter(o=>o.key!==this.focusedItem().key);this.activeItemPath.set(r)}else{let r=Ro(this.focusedItem().parent)?this.focusedItem().parent:this.focusedItem();this.focusedItem.set(r)}e.preventDefault()}}onArrowRightKey(e){if(Ro(this.focusedItem())){if(this.isItemGroup(this.focusedItem()))if(this.activeItemPath().some(o=>o.key===this.focusedItem().key))this.onArrowDownKey(e);else{let o=this.activeItemPath().filter(a=>a.parentKey!==this.focusedItem().parentKey);o.push(this.focusedItem()),this.activeItemPath.set(o)}e.preventDefault()}}onHomeKey(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),e.preventDefault()}onEndKey(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),e.preventDefault()}onEnterKey(e){if(Ro(this.focusedItem())){let n=$r(this.subMenuViewChild.listViewChild.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),r=n&&($r(n,'[data-pc-section="action"]')||$r(n,"a,button"));r?r.click():n&&n.click()}e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}findNextItem(e){let n=this.visibleItems().findIndex(o=>o.key===e.key);return(nthis.isValidItem(o)):void 0)||e}findPrevItem(e){let n=this.visibleItems().findIndex(o=>o.key===e.key);return(n>0?wbe(this.visibleItems().slice(0,n),o=>this.isValidItem(o)):void 0)||e}searchItems(e,n){this.searchValue=(this.searchValue||"")+n;let r=null,o=!1;if(Ro(this.focusedItem())){let a=this.visibleItems().findIndex(c=>c.key===this.focusedItem().key);r=this.visibleItems().slice(a).find(c=>this.isItemMatched(c)),r=ru(r)?this.visibleItems().slice(0,a).find(c=>this.isItemMatched(c)):r}else r=this.visibleItems().find(a=>this.isItemMatched(a));return Ro(r)&&(o=!0),ru(r)&&ru(this.focusedItem())&&(r=this.findFirstItem()),Ro(r)&&this.changeFocusedItem({originalEvent:e,processedItem:r,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-panelMenuList"],["p-panel-menu-list"]],viewQuery:function(n,r){if(n&1&&Xi(ROt,5),n&2){let o;ze(o=Ue())&&(r.subMenuViewChild=o.first)}},inputs:{panelId:"panelId",id:"id",items:"items",itemTemplate:"itemTemplate",parentExpanded:[2,"parentExpanded","parentExpanded",Je],expanded:[2,"expanded","expanded",Je],transitionOptions:"transitionOptions",root:[2,"root","root",Je],tabindex:[2,"tabindex","tabindex",En],activeItem:"activeItem"},outputs:{itemToggle:"itemToggle",headerFocus:"headerFocus"},features:[Tt,Yt],decls:2,vars:10,consts:[["submenu",""],[3,"itemToggle","keydown","menuFocus","menuBlur","root","id","panelId","tabindex","itemTemplate","focusedItemId","activeItemPath","transitionOptions","items","parentExpanded"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-panelmenu-sub",1,0),te("itemToggle",function(c){return se(o),le(r.onItemToggle(c))})("keydown",function(c){return se(o),le(r.onKeyDown(c))})("menuFocus",function(c){return se(o),le(r.onFocus(c))})("menuBlur",function(c){return se(o),le(r.onBlur(c))}),M()}n&2&&D("root",!0)("id",r.panelId+"_list")("panelId",r.panelId)("tabindex",r.tabindex)("itemTemplate",r.itemTemplate)("focusedItemId",r.focused?r.focusedItemId:void 0)("activeItemPath",r.activeItemPath())("transitionOptions",r.transitionOptions)("items",r.processedItems())("parentExpanded",r.parentExpanded)},dependencies:[rr,hRt,Yf,sE,Un],encapsulation:2,changeDetection:0})}return t})(),$oe=(()=>{class t extends ur{model;styleClass;multiple=!1;transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";id;tabindex=0;containerViewChild;submenuIconTemplate;headerIconTemplate;itemTemplate;templates;_submenuIconTemplate;_headerIconTemplate;_itemTemplate;animating;activeItem=hr(null);_componentStyle=ae(joe);ngOnInit(){super.ngOnInit(),this.id=this.id||fa("pn_id_")}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"headericon":this._headerIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}collapseAll(){for(let e of this.model)e.expanded&&(e.expanded=!1);this.cd.detectChanges()}onToggleDone(){this.animating=!1,this.cd.markForCheck()}changeActiveItem(e,n,r,o=!1){if(!this.isItemDisabled(n)){let a=o?n:this.activeItem&&xd(n,this.activeItem)?null:n;this.activeItem.set(a)}}getAnimation(e){return e.expanded?{value:"visible",params:{transitionParams:this.animating?this.transitionOptions:"0ms",height:"*"}}:{value:"hidden",params:{transitionParams:this.transitionOptions,height:"0"}}}getItemProp(e,n){return e?Kp(e[n]):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isItemActive(e){return e.expanded}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemGroup(e){return Ro(e.items)}getPanelId(e,n){return n&&n.id?n.id:`${this.id}_${e}`}getHeaderId(e,n){return e.id?e.id+"_header":`${this.getPanelId(n)}_header`}getContentId(e,n){return e.id?e.id+"_content":`${this.getPanelId(n)}_content`}updateFocusedHeader(e){let{originalEvent:n,focusOnNext:r,selfCheck:o}=e,a=n.currentTarget.closest('[data-pc-section="panel"]'),c=o?$r(a,'[data-pc-section="header"]'):r?this.findNextHeader(a):this.findPrevHeader(a);c?this.changeFocusedHeader(n,c):r?this.onHeaderHomeKey(n):this.onHeaderEndKey(n)}changeFocusedHeader(e,n){n&&Ba(n)}findNextHeader(e,n=!1){let r=n?e:e.nextElementSibling,o=$r(r,'[data-pc-section="header"]');return o?Qh(o,"data-p-disabled")?this.findNextHeader(o.parentElement):o:null}findPrevHeader(e,n=!1){let r=n?e:e.previousElementSibling,o=$r(r,'[data-pc-section="header"]');return o?Qh(o,"data-p-disabled")?this.findPrevHeader(o.parentElement):o:null}findFirstHeader(){return this.findNextHeader(this.containerViewChild.nativeElement.firstElementChild,!0)}findLastHeader(){return this.findPrevHeader(this.containerViewChild.nativeElement.lastElementChild,!0)}onHeaderClick(e,n,r){if(this.isItemDisabled(n)){e.preventDefault();return}if(n.command&&n.command({originalEvent:e,item:n}),!this.multiple)for(let o of this.model)n!==o&&o.expanded&&(o.expanded=!1);n.expanded=!n.expanded,this.changeActiveItem(e,n,r),this.animating=!0,Ba(e.currentTarget)}onHeaderKeyDown(e,n,r){switch(e.code){case"ArrowDown":this.onHeaderArrowDownKey(e);break;case"ArrowUp":this.onHeaderArrowUpKey(e);break;case"Home":this.onHeaderHomeKey(e);break;case"End":this.onHeaderEndKey(e);break;case"Enter":case"Space":this.onHeaderEnterKey(e,n,r);break;default:break}}onHeaderArrowDownKey(e){let n=Qh(e.currentTarget,"data-p-highlight")===!0?$r(e.currentTarget.nextElementSibling,'[data-pc-section="menu"]'):null;n?Ba(n):this.updateFocusedHeader({originalEvent:e,focusOnNext:!0}),e.preventDefault()}onHeaderArrowUpKey(e){let n=this.findPrevHeader(e.currentTarget.parentElement)||this.findLastHeader(),r=Qh(n,"data-p-highlight")===!0?$r(n.nextElementSibling,'[data-pc-section="menu"]'):null;r?Ba(r):this.updateFocusedHeader({originalEvent:e,focusOnNext:!1}),e.preventDefault()}onHeaderHomeKey(e){this.changeFocusedHeader(e,this.findFirstHeader()),e.preventDefault()}onHeaderEndKey(e){this.changeFocusedHeader(e,this.findLastHeader()),e.preventDefault()}onHeaderEnterKey(e,n,r){let o=$r(e.currentTarget,'[data-pc-section="headeraction"]');o?o.click():this.onHeaderClick(e,n,r),e.preventDefault()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-panelMenu"],["p-panelmenu"],["p-panel-menu"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,POt,4),Vt(o,NOt,4),Vt(o,FOt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.submenuIconTemplate=a.first),ze(a=Ue())&&(r.headerIconTemplate=a.first),ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&Xi(LOt,5),n&2){let o;ze(o=Ue())&&(r.containerViewChild=o.first)}},hostAttrs:["data-pc-section","root","data-pc-name","panelmenu"],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.styleClass))},inputs:{model:"model",styleClass:"styleClass",multiple:[2,"multiple","multiple",Je],transitionOptions:"transitionOptions",id:"id",tabindex:[2,"tabindex","tabindex",En]},features:[Ii([joe]),Tt],decls:1,vars:1,consts:[["htmlLabel",""],["htmlRouteLabel",""],[4,"ngFor","ngForOf"],[3,"class","ngStyle",4,"ngIf"],[3,"ngStyle"],["role","button",3,"click","keydown","ngStyle","pTooltip","tabindex","tooltipOptions"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","class","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["role","region",3,"class",4,"ngIf"],[3,"target","class",4,"ngIf"],[3,"target"],[3,"class",4,"ngIf","ngIfElse"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],["data-p-icon","chevron-right",3,"class",4,"ngIf"],["data-p-icon","chevron-down"],["data-p-icon","chevron-right"],[3,"innerHTML"],[3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],["role","region"],[3,"headerFocus","panelId","items","itemTemplate","transitionOptions","root","activeItem","tabindex","parentExpanded"]],template:function(n,r){n&1&&ie(0,uRt,2,1,"ng-container",2),n&2&&D("ngForOf",r.model)},dependencies:[rr,Vl,Xr,Jr,Xs,fRt,Yf,Ms,f4,sE,tg,Dm,Gb,Un],encapsulation:2,data:{animation:[Wp("rootItem",[J0("hidden",ul({height:"0",visibility:"hidden"})),J0("visible",ul({height:"*",visibility:"*"})),Oc("visible <=> hidden",[Jl("{{transitionParams}}")]),Oc("void => *",Jl(0))])]},changeDetection:0})}return t})(),D7e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[$oe,Un,Un]})}return t})();var _Rt=()=>({border:"none"});function yRt(t,i){if(t&1&&be(0,"p-badge",6),t&2){let e=L(2).$implicit;D("value",e.badge)}}function vRt(t,i){if(t&1&&(O(0,"span",7),ee(1),M()),t&2){let e=L(2).$implicit;E(),Pt(e.shortcut)}}function bRt(t,i){t&1&&be(0,"i",8)}function CRt(t,i){if(t&1&&(O(0,"a",2)(1,"span",5),ee(2),M(),be(3,"span"),yt(4,yRt,1,1,"p-badge",6),yt(5,vRt,2,1,"span",7),yt(6,bRt,1,0,"i",8),M()),t&2){let e=L().$implicit;D("routerLink",e.routerLink),E(2),Pt(e.label),E(),Pe(e.icon),E(),vt(e.badge?4:-1),E(),vt(e.shortcut?5:-1),E(),vt(e.items?6:-1)}}function xRt(t,i){if(t&1&&(O(0,"a",3)(1,"span",9),ee(2),M(),be(3,"span"),M()),t&2){let e=L().$implicit;D("href",e.url,td),E(2),Pt(e.label),E(),Pe(e.icon)}}function SRt(t,i){if(t&1&&be(0,"p-badge",6),t&2){let e=L(2).$implicit;D("value",e.badge)}}function wRt(t,i){if(t&1&&(O(0,"span",7),ee(1),M()),t&2){let e=L(2).$implicit;E(),Pt(e.shortcut)}}function IRt(t,i){t&1&&be(0,"i",8)}function TRt(t,i){if(t&1&&(O(0,"a",4)(1,"span",9),ee(2),M(),be(3,"span"),yt(4,SRt,1,1,"p-badge",6),yt(5,wRt,2,1,"span",7),yt(6,IRt,1,0,"i",8),M()),t&2){let e=L().$implicit;E(2),Pt(e.label),E(),Pe(e.icon),E(),vt(e.badge?4:-1),E(),vt(e.shortcut?5:-1),E(),vt(e.items?6:-1)}}function ERt(t,i){if(t&1&&yt(0,CRt,7,7,"a",2)(1,xRt,4,4,"a",3)(2,TRt,7,6,"a",4),t&2){let e=i.$implicit;vt(e.routerLink?0:e.url?1:2)}}var k7e=(()=>{class t extends Xo{_authenticationService;_featurePermissionService;_featureStatusService;features;items;menuHandler;constructor(e,n,r){super(),this._authenticationService=e,this._featurePermissionService=n,this._featureStatusService=r}ngOnChanges(e){e.features&&this.initMenuHandler()}ngOnDestroy(){this.unsubscribeAll()}initMenuHandler(){this.menuHandler=new Goe(this.features,this._authenticationService.authentication$,this._authenticationService.msalInitialized,this._featureStatusService,this._featurePermissionService),this.menuHandler.menu$.subscribe(e=>{this.items=e})}static \u0275fac=function(n){return new(n||t)(xe(em),xe(WN),xe(Ioe))};static \u0275cmp=re({type:t,selectors:[["ays-menu"]],inputs:{features:"features"},features:[Tt,Yt],decls:3,vars:5,consts:[["item",""],[3,"model","multiple"],["pRipple","",1,"flex","items-center","px-4","py-2","app-menu-router-link",3,"routerLink"],["pRipple","",1,"flex","items-center","px-4","py-2","app-menu-url",3,"href"],["pRipple","",1,"flex","items-center","px-4","py-2","app-menu-empty"],[1,"ml-2","flex-1"],[1,"ml-auto",3,"value"],[1,"ml-auto","border","border-surface","rounded","bg-emphasis","text-muted-color","text-xs","p-1"],[1,"pi","pi-angle-down","text-primary","ml-auto"],[1,"flex-1","ml-2"]],template:function(n,r){n&1&&(O(0,"p-panelMenu",1),ie(1,ERt,3,1,"ng-template",null,0,di),M()),n&2&&(is(Vr(4,_Rt)),D("model",r.items)("multiple",!0))},dependencies:[JT,Qc,Ms,D7e,$oe],encapsulation:2})}return t})();var ARt=[[["","bd-app-top-right-action",""]],[["","bd-app-content",""]]],DRt=["[bd-app-top-right-action]","[bd-app-content]"],kRt=t=>({"lg:pl-64":t}),MRt=(t,i)=>({"-translate-x-full":t,"translate-x-0":i});function ORt(t,i){if(t&1){let e=qe();O(0,"button",10),te("click",function(){se(e);let r=L();return le(r.toggleSidebar())}),be(1,"i",11),M()}}function RRt(t,i){if(t&1){let e=qe();O(0,"div",12),te("click",function(){se(e);let r=L();return le(r.closeSidebar())}),M()}}function PRt(t,i){if(t&1&&(O(0,"aside",6),be(1,"ays-menu",13),M()),t&2){let e=L();D("ngClass",na(2,MRt,!e.sidebarOpen,e.sidebarOpen)),E(),D("features",e.features)}}var M7e=(()=>{class t extends Xo{_appService;footerOptions=Aoe;features;config={menu:!0};title="";sidebarOpen=!1;isLargeScreen=window.innerWidth>=1024;onResize(){this.isLargeScreen=window.innerWidth>=1024,!this.isLargeScreen&&!this.sidebarOpen&&(this.sidebarOpen=!1,this._updateDocumentStyles())}constructor(e){super(),this._appService=e,this._subs.push(this._appService.title$.pipe(ks(this._appService.title)).subscribe(n=>this.title=n))}ngOnInit(){this.isLargeScreen=window.innerWidth>=1024,this.sidebarOpen=this.isLargeScreen,this._updateDocumentStyles()}ngOnDestroy(){this.unsubscribeAll()}toggleSidebar(){this.sidebarOpen=!this.sidebarOpen,this._updateDocumentStyles()}closeSidebar(){this.sidebarOpen=!1,this._updateDocumentStyles()}_updateDocumentStyles(){this.sidebarOpen?document.documentElement.style.setProperty("--bd-app-container-width","calc(100vw - 256px)"):document.documentElement.style.removeProperty("--bd-app-container-width")}static \u0275fac=function(n){return new(n||t)(xe(Eoe))};static \u0275cmp=re({type:t,selectors:[["bd-app-container"]],hostBindings:function(n,r){n&1&&te("resize",function(){return r.onResize()},uee)},inputs:{footerOptions:"footerOptions",features:"features",config:"config"},features:[Tt],ngContentSelectors:DRt,decls:14,vars:8,consts:[[1,"flex","flex-col","h-screen"],[1,"fixed","top-0","left-0","right-0","h-12","bg-(--app-shell-color)","text-(--app-shell-contrast-color)","flex","items-center","px-4","z-50","shadow-xl"],["pButton","",1,"mr-4","text-2xl","bg-(--app-shell-color)!","border-(--app-shell-color)!","text-(--app-shell-contrast-color)!"],[1,"text-lg","font-semibold","flex-1"],[1,"action"],[1,"fixed","inset-0","bg-black/50","z-40","transition-opacity","duration-300"],[1,"fixed","top-12","left-0","w-64","h-sidebar","bg-(--app-shell-contrast-color)","transform","transition-transform","duration-300","ease-in-out","z-50","shadow-lg","overflow-y-auto",3,"ngClass"],[1,"flex-1","pt-12","pb-12","bg-(--p-content-background)","min-h-screen","pb-8","transition-all","duration-300","w-full",3,"ngClass"],[1,"fixed","bottom-0","left-0","right-0","h-12","bg-(--app-shell-contrast-color)","text-(--p-primary-surface-color)","flex","items-center","justify-center","z-50"],[3,"options"],["pButton","",1,"mr-4","text-2xl","bg-(--app-shell-color)!","border-(--app-shell-color)!","text-(--app-shell-contrast-color)!",3,"click"],["pButtonIcon","",1,"pi","pi-bars"],[1,"fixed","inset-0","bg-black/50","z-40","transition-opacity","duration-300",3,"click"],[3,"features"]],template:function(n,r){n&1&&(Kn(ARt),O(0,"div",0)(1,"header",1),yt(2,ORt,2,0,"button",2),O(3,"h1",3),ee(4),M(),O(5,"div",4),Sn(6),M()(),O(7,"div"),yt(8,RRt,1,0,"div",5),yt(9,PRt,2,5,"aside",6),O(10,"main",7),Sn(11,1),M()(),O(12,"footer",8),be(13,"bd-footer",9),M()()),n&2&&(E(2),vt(r.config.menu?2:-1),E(2),Pt(r.title),E(4),vt(r.sidebarOpen&&!r.isLargeScreen?8:-1),E(),vt(r.config.menu?9:-1),E(),D("ngClass",Yi(6,kRt,r.sidebarOpen&&r.isLargeScreen&&r.config.menu)),E(3),D("options",r.footerOptions))},dependencies:[aw,G4,c7e,k7e,qa],styles:[".h-sidebar[_ngcontent-%COMP%]{height:calc(100vh - 96px)}"]})}return t})();var c9e=mp(l9e()),zd=class t{oid;displayName;enabled;mail;valid;createdDateTime;type;static unsafe(i,e){return e&&e.oid?t.of(e):t.ofUnknown(i)}static of(i){let e=new t;return e.oid=i.oid,e.displayName=i.displayName,e.mail=i.mail,e.enabled=i.enabled,e.valid=!0,e.type=i.type,e.createdDateTime=i.createdDateTime?new Date(i.createdDateTime):null,e}static ofUnknown(i){let e=new t;return e.oid=i,e.displayName=`Unbekannter oder gel\xF6schter Nutzer (${i})`,e.valid=!1,e}static filterUserBySearchTerm(i,e){let n=e.oid.indexOf(i)!==-1,r=e.displayName.toLowerCase().indexOf(i.toLowerCase())!==-1,o=!1;return e.mail&&(o=e.mail.toLowerCase().indexOf(i.toLowerCase())!==-1),r||n||o}static createRandomPassword(i=10){return(0,c9e.generate)({length:i,numbers:!0,symbols:!0,lowercase:!0,uppercase:!0,strict:!0})}};var EPt=["*"];function APt(t,i){t&1&&(fi(0),Sn(1),gi())}function DPt(t,i){if(t&1&&(fi(0),O(1,"div",1)(2,"div",2)(3,"div"),be(4,"mat-progress-spinner",3),M(),O(5,"div",4)(6,"span",5),ee(7),M()()()(),gi()),t&2){let e=L();E(4),D("value",e.counter/e.total*100),E(3),Pd("Vorgang ",e.counter," / ",e.total)}}function kPt(t,i){if(t&1){let e=qe();fi(0),O(1,"div",1)(2,"div",2)(3,"div",6)(4,"mat-icon",7),ee(5,"check_circle_outline"),M()(),O(6,"div",4)(7,"span",5),ee(8,"Vorgang erfolgreich abgeschlossen"),M()()()(),O(9,"div",8)(10,"button",9),te("click",function(){se(e);let r=L();return le(r.cancel.emit())}),ee(11,"Schlie\xDFen"),M()(),gi()}t&2&&(E(4),D("inline",!0))}function MPt(t,i){t&1&&(fi(0),O(1,"div",10),be(2,"bd-message-empty",11),M(),gi())}var T5=(()=>{class t extends Xo{jobExecutor=new Ai;cancel=new ve;state=ni.INIT;counter=0;total=0;constructor(){super()}ngOnInit(){this._subs.push(this.jobExecutor.subscribe(e=>{if(e.items.length===0){this.state=ni.SUCCESS;return}e&&(this.state=ni.LOADING,this.total=e.items.length,Hr(e.items).pipe(Uh(n=>e.fn(n))).subscribe(()=>{this.counter++,this.counter===this.total&&(this.state=ni.SUCCESS)},n=>{this.state=ni.ERROR,console.error(n)}))}))}ngOnDestroy(){this.unsubscribeAll()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-in-progress-indicator"]],inputs:{jobExecutor:"jobExecutor"},outputs:{cancel:"cancel"},features:[Tt],ngContentSelectors:EPt,decls:4,vars:4,consts:[[4,"ngIf"],[1,"bd-container"],[1,"flex","flex-row","gap-6"],["mode","determinate",3,"value"],[1,"flex-1"],[1,"mat-subheading-2"],[1,"basis-10"],[3,"inline"],[1,"flex","flex-row-reverse"],["mat-button","",3,"click"],[1,"bd-container-inner"],["icon","error","message","Ein Fehler ist aufgetreten, der Vorgang wurde abgebrochen"]],template:function(n,r){n&1&&(Kn(),ie(0,APt,2,0,"ng-container",0)(1,DPt,8,3,"ng-container",0)(2,kPt,12,1,"ng-container",0)(3,MPt,3,0,"ng-container",0)),n&2&&(D("ngIf",r.state===0),E(),D("ngIf",r.state===1),E(),D("ngIf",r.state===2),E(),D("ngIf",r.state===3))},dependencies:[ec,zr,Kie,Xr,Kr],styles:["mat-icon.mat-icon-inline[_ngcontent-%COMP%]{font-size:40px}"]})}return t})();var d9e=(()=>{class t{_companyService;company;groupSelect=new ve;overlayOptions={mode:"overlay",appendTo:"body"};groupsOfCurrentCompany=[];constructor(e){this._companyService=e}ngOnChanges(e){e.company&&this._onCompanyChange()}_onCompanyChange(){this.company&&this._companyService.getAllGroupsByCompanyId(this.company.id).pipe(ar(1)).subscribe(e=>this.groupsOfCurrentCompany=e)}static \u0275fac=function(n){return new(n||t)(xe(bp))};static \u0275cmp=re({type:t,selectors:[["bd-administration-group-select"]],inputs:{company:"company"},outputs:{groupSelect:"groupSelect"},features:[Yt],decls:4,vars:4,consts:[["inputId","group-select","optionLabel","name","dataKey","id","fluid","","variant","filled","filterBy","name","placeholder","Suche Gruppe..",3,"onChange","options","filter","showClear","overlayOptions"],["for","group-select"]],template:function(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.groupSelect.emit(a.value)}),M(),O(2,"label",1),ee(3,"Gruppe"),M()()),n&2&&(E(),D("options",r.groupsOfCurrentCompany)("filter",!0)("showClear",!0)("overlayOptions",r.overlayOptions))},dependencies:[Ho,Us],encapsulation:2})}return t})();var u9e=` .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 OPt=["removeicon"],RPt=["*"];function PPt(t,i){if(t&1){let e=qe();O(0,"img",4),te("error",function(r){se(e);let o=L();return le(o.imageError(r))}),M()}if(t&2){let e=L();Pe(e.cx("image")),D("src",e.image,td)("alt",e.alt)}}function NPt(t,i){if(t&1&&be(0,"span",6),t&2){let e=L(2);Pe(e.icon),D("ngClass",e.cx("icon")),lt("data-pc-section","icon")}}function FPt(t,i){if(t&1&&ie(0,NPt,1,4,"span",5),t&2){let e=L();D("ngIf",e.icon)}}function LPt(t,i){if(t&1&&(O(0,"div"),ee(1),M()),t&2){let e=L();Pe(e.cx("label")),lt("data-pc-section","label"),E(),Pt(e.label)}}function BPt(t,i){if(t&1){let e=qe();O(0,"span",10),te("click",function(r){se(e);let o=L(3);return le(o.close(r))})("keydown",function(r){se(e);let o=L(3);return le(o.onKeydown(r))}),M()}if(t&2){let e=L(3);Pe(e.removeIcon),D("ngClass",e.cx("removeIcon")),lt("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function VPt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",11),te("click",function(r){se(e);let o=L(3);return le(o.close(r))})("keydown",function(r){se(e);let o=L(3);return le(o.onKeydown(r))}),M()}if(t&2){let e=L(3);Pe(e.cx("removeIcon")),lt("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function zPt(t,i){if(t&1&&(fi(0),ie(1,BPt,1,5,"span",8)(2,VPt,1,4,"svg",9),gi()),t&2){let e=L(2);E(),D("ngIf",e.removeIcon),E(),D("ngIf",!e.removeIcon)}}function UPt(t,i){}function HPt(t,i){t&1&&ie(0,UPt,0,0,"ng-template")}function GPt(t,i){if(t&1){let e=qe();O(0,"span",12),te("click",function(r){se(e);let o=L(2);return le(o.close(r))})("keydown",function(r){se(e);let o=L(2);return le(o.onKeydown(r))}),ie(1,HPt,1,0,null,13),M()}if(t&2){let e=L(2);Pe(e.cx("removeIcon")),lt("data-pc-section","removeicon")("aria-label",e.removeAriaLabel),E(),D("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function jPt(t,i){if(t&1&&(fi(0),ie(1,zPt,3,2,"ng-container",3)(2,GPt,2,5,"span",7),gi()),t&2){let e=L();E(),D("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),E(),D("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var $Pt={root:()=>["p-chip p-component"],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},p9e=(()=>{class t extends br{name="chip";theme=u9e;classes=$Pt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var E5=(()=>{class t extends ur{label;icon;image;alt;styleClass;removable=!1;removeIcon;onRemove=new ve;onImageError=new ve;visible=!0;get removeAriaLabel(){return this.config.getTranslation(xs.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,r])=>this[`_${n}`]!==r&&(this[`_${n}`]=r))}_chipProps;_componentStyle=ae(p9e);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:n}=e.chipProps;n.label!==void 0&&(this.label=n.label),n.icon!==void 0&&(this.icon=n.icon),n.image!==void 0&&(this.image=n.image),n.alt!==void 0&&(this.alt=n.alt),n.styleClass!==void 0&&(this.styleClass=n.styleClass),n.removable!==void 0&&(this.removable=n.removable),n.removeIcon!==void 0&&(this.removeIcon=n.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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-chip"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,OPt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.removeIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:7,hostBindings:function(n,r){n&2&&(lt("data-pc-name","chip")("aria-label",r.label)("data-pc-section","root"),Pe(r.cn(r.cx("root"),r.styleClass)),la("display",!r.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:[Ii([p9e]),Tt,Yt],ngContentSelectors:RPt,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(n,r){if(n&1&&(Kn(),Sn(0),ie(1,PPt,1,4,"img",1)(2,FPt,1,1,"ng-template",null,0,di)(4,LPt,2,4,"div",2)(5,jPt,3,2,"ng-container",3)),n&2){let o=Oi(3);E(),D("ngIf",r.image)("ngIfElse",o),E(3),D("ngIf",r.label),E(),D("ngIf",r.removable)}},dependencies:[rr,qa,Xr,Jr,Rie,Un],encapsulation:2,changeDetection:0})}return t})();var m9e=` .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 qPt=["item"],YPt=["empty"],KPt=["header"],WPt=["footer"],QPt=["selecteditem"],ZPt=["group"],XPt=["loader"],JPt=["removeicon"],eNt=["loadingicon"],tNt=["clearicon"],iNt=["dropdownicon"],nNt=["focusInput"],rNt=["multiIn"],oNt=["multiContainer"],aNt=["ddBtn"],sNt=["items"],lNt=["scroller"],cNt=["overlay"],dNt=t=>({i:t}),f9e=t=>({$implicit:t}),uNt=(t,i,e)=>({removeCallback:t,index:i,class:e}),Zoe=t=>({height:t}),g9e=(t,i)=>({$implicit:t,options:i}),pNt=t=>({options:t}),mNt=()=>({}),hNt=(t,i,e)=>({option:t,i,scrollerOptions:e}),fNt=(t,i)=>({$implicit:t,index:i});function gNt(t,i){if(t&1){let e=qe();O(0,"input",17,2),te("input",function(r){se(e);let o=L();return le(o.onInput(r))})("keydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))})("change",function(r){se(e);let o=L();return le(o.onInputChange(r))})("focus",function(r){se(e);let o=L();return le(o.onInputFocus(r))})("blur",function(r){se(e);let o=L();return le(o.onInputBlur(r))})("paste",function(r){se(e);let o=L();return le(o.onInputPaste(r))})("keyup",function(r){se(e);let o=L();return le(o.onInputKeyUp(r))}),M()}if(t&2){let e=L();Pe(e.cn(e.cx("pcInputText"),e.inputStyleClass)),D("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle)("variant",e.$variant())("invalid",e.invalid())("pSize",e.size())("fluid",e.hasFluid),lt("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 _Nt(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",20),te("click",function(){se(e);let r=L(2);return le(r.clear())}),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("aria-hidden",!0)}}function yNt(t,i){}function vNt(t,i){t&1&&ie(0,yNt,0,0,"ng-template")}function bNt(t,i){if(t&1){let e=qe();O(0,"span",21),te("click",function(){se(e);let r=L(2);return le(r.clear())}),ie(1,vNt,1,0,null,22),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("aria-hidden",!0),E(),D("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function CNt(t,i){if(t&1&&(fi(0),ie(1,_Nt,1,3,"svg",18)(2,bNt,2,4,"span",19),gi()),t&2){let e=L();E(),D("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),E(),D("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function xNt(t,i){t&1&&Li(0)}function SNt(t,i){if(t&1){let e=qe();O(0,"span",21),te("click",function(r){se(e);let o=L(2).index,a=L(2);return le(a.readonly?"":a.removeOption(r,o))}),Pi(),be(1,"svg",29),M()}if(t&2){let e=L(4);Pe(e.cx("chipIcon")),E(),Pe(e.cx("chipIcon")),lt("aria-hidden",!0)}}function wNt(t,i){}function INt(t,i){t&1&&ie(0,wNt,0,0,"ng-template")}function TNt(t,i){if(t&1&&(O(0,"span"),ie(1,INt,1,0,null,28),M()),t&2){let e=L(2).index,n=L(2);lt("aria-hidden",!0),E(),D("ngTemplateOutlet",n.removeIconTemplate||n._removeIconTemplate)("ngTemplateOutletContext",Qu(3,uNt,n.removeOption.bind(n),e,n.cx("chipIcon")))}}function ENt(t,i){if(t&1&&ie(0,SNt,2,5,"span",19)(1,TNt,2,7,"span",13),t&2){let e=L(3);D("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),E(),D("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}function ANt(t,i){if(t&1){let e=qe();O(0,"li",25,4)(2,"p-chip",27),te("onRemove",function(r){let o=se(e).index,a=L(2);return le(a.readonly?"":a.removeOption(r,o))}),ie(3,xNt,1,0,"ng-container",28)(4,ENt,2,2,"ng-template",null,5,di),M()()}if(t&2){let e=i.$implicit,n=i.index,r=L(2);Pe(r.cx("chipItem",Yi(13,dNt,n))),lt("id",r.id+"_multiple_option_"+n)("aria-label",r.getOptionLabel(e))("aria-setsize",r.modelValue().length)("aria-posinset",n+1)("aria-selected",!0),E(2),Pe(r.cx("pcChip")),D("label",!r.selectedItemTemplate&&!r._selectedItemTemplate&&r.getOptionLabel(e))("removable",!0),E(),D("ngTemplateOutlet",r.selectedItemTemplate||r._selectedItemTemplate)("ngTemplateOutletContext",Yi(15,f9e,e))}}function DNt(t,i){if(t&1){let e=qe();O(0,"ul",23,3),te("focus",function(r){se(e);let o=L();return le(o.onMultipleContainerFocus(r))})("blur",function(r){se(e);let o=L();return le(o.onMultipleContainerBlur(r))})("keydown",function(r){se(e);let o=L();return le(o.onMultipleContainerKeyDown(r))}),ie(2,ANt,6,17,"li",24),O(3,"li",25)(4,"input",26,2),te("input",function(r){se(e);let o=L();return le(o.onInput(r))})("keydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))})("change",function(r){se(e);let o=L();return le(o.onInputChange(r))})("focus",function(r){se(e);let o=L();return le(o.onInputFocus(r))})("blur",function(r){se(e);let o=L();return le(o.onInputBlur(r))})("paste",function(r){se(e);let o=L();return le(o.onInputPaste(r))})("keyup",function(r){se(e);let o=L();return le(o.onInputKeyUp(r))}),M()()()}if(t&2){let e=L();Pe(e.cx("inputMultiple")),D("tabindex",-1),lt("aria-orientation","horizontal")("aria-activedescendant",e.focused?e.focusedMultipleOptionId:void 0),E(2),D("ngForOf",e.modelValue()),E(),Pe(e.cx("inputChip")),E(),Pe(e.cx("pcInputText")),D("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle),lt("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 kNt(t,i){if(t&1&&(Pi(),be(0,"svg",32)),t&2){let e=L(2);Pe(e.cx("loader")),D("spin",!0),lt("aria-hidden",!0)}}function MNt(t,i){}function ONt(t,i){t&1&&ie(0,MNt,0,0,"ng-template")}function RNt(t,i){if(t&1&&(O(0,"span"),ie(1,ONt,1,0,null,22),M()),t&2){let e=L(2);Pe(e.cx("loader")),lt("aria-hidden",!0),E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function PNt(t,i){if(t&1&&(fi(0),ie(1,kNt,1,4,"svg",30)(2,RNt,2,4,"span",31),gi()),t&2){let e=L();E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function NNt(t,i){if(t&1&&be(0,"span",35),t&2){let e=L(2);D("ngClass",e.dropdownIcon),lt("aria-hidden",!0)}}function FNt(t,i){t&1&&(Pi(),be(0,"svg",37))}function LNt(t,i){}function BNt(t,i){t&1&&ie(0,LNt,0,0,"ng-template")}function VNt(t,i){if(t&1&&(fi(0),ie(1,FNt,1,0,"svg",36)(2,BNt,1,0,null,22),gi()),t&2){let e=L(2);E(),D("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),E(),D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function zNt(t,i){if(t&1){let e=qe();O(0,"button",33,6),te("click",function(r){se(e);let o=L();return le(o.handleDropdownClick(r))}),ie(2,NNt,1,2,"span",34)(3,VNt,3,2,"ng-container",13),M()}if(t&2){let e=L();Pe(e.cx("dropdown")),D("disabled",e.$disabled()),lt("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),E(2),D("ngIf",e.dropdownIcon),E(),D("ngIf",!e.dropdownIcon)}}function UNt(t,i){t&1&&Li(0)}function HNt(t,i){t&1&&Li(0)}function GNt(t,i){if(t&1&&ie(0,HNt,1,0,"ng-container",28),t&2){let e=i.$implicit,n=i.options;L(2);let r=Oi(6);D("ngTemplateOutlet",r)("ngTemplateOutletContext",na(2,g9e,e,n))}}function jNt(t,i){t&1&&Li(0)}function $Nt(t,i){if(t&1&&ie(0,jNt,1,0,"ng-container",28),t&2){let e=i.options,n=L(4);D("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",Yi(2,pNt,e))}}function qNt(t,i){t&1&&(fi(0),ie(1,$Nt,1,4,"ng-template",null,9,di),gi())}function YNt(t,i){if(t&1){let e=qe();O(0,"p-scroller",41,8),te("onLazyLoad",function(r){se(e);let o=L(2);return le(o.onLazyLoad.emit(r))}),ie(2,GNt,1,5,"ng-template",null,1,di)(4,qNt,3,0,"ng-container",13),M()}if(t&2){let e=L(2);is(Yi(8,Zoe,e.scrollHeight)),D("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),E(4),D("ngIf",e.loaderTemplate||e._loaderTemplate)}}function KNt(t,i){t&1&&Li(0)}function WNt(t,i){if(t&1&&(fi(0),ie(1,KNt,1,0,"ng-container",28),gi()),t&2){L();let e=Oi(6),n=L();E(),D("ngTemplateOutlet",e)("ngTemplateOutletContext",na(3,g9e,n.visibleOptions(),Vr(2,mNt)))}}function QNt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2).$implicit,n=L(3);E(),Pt(n.getOptionGroupLabel(e.optionGroup))}}function ZNt(t,i){t&1&&Li(0)}function XNt(t,i){if(t&1&&(fi(0),O(1,"li",45),ie(2,QNt,2,1,"span",13)(3,ZNt,1,0,"ng-container",28),M(),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),Pe(a.cx("optionGroup")),D("ngStyle",Yi(7,Zoe,o.itemSize+"px")),lt("id",a.id+"_"+a.getOptionIndex(r,o)),E(),D("ngIf",!a.groupTemplate),E(),D("ngTemplateOutlet",a.groupTemplate)("ngTemplateOutletContext",Yi(9,f9e,n.optionGroup))}}function JNt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2).$implicit,n=L(3);E(),Pt(n.getOptionLabel(e))}}function eFt(t,i){t&1&&Li(0)}function tFt(t,i){if(t&1){let e=qe();fi(0),O(1,"li",46),te("click",function(r){se(e);let o=L().$implicit,a=L(3);return le(a.onOptionSelect(r,o))})("mouseenter",function(r){se(e);let o=L().index,a=L().options,c=L(2);return le(c.onOptionMouseEnter(r,c.getOptionIndex(o,a)))}),ie(2,JNt,2,1,"span",13)(3,eFt,1,0,"ng-container",28),M(),gi()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),Pe(a.cx("option",Qu(13,hNt,n,r,o))),D("ngStyle",Yi(17,Zoe,o.itemSize+"px")),lt("id",a.id+"_"+a.getOptionIndex(r,o))("aria-label",a.getOptionLabel(n))("aria-selected",a.isSelected(n))("aria-disabled",a.isOptionDisabled(n))("data-p-focused",a.focusedOptionIndex()===a.getOptionIndex(r,o))("aria-setsize",a.ariaSetSize)("aria-posinset",a.getAriaPosInset(a.getOptionIndex(r,o))),E(),D("ngIf",!a.itemTemplate&&!a._itemTemplate),E(),D("ngTemplateOutlet",a.itemTemplate||a._itemTemplate)("ngTemplateOutletContext",na(19,fNt,n,o.getOptions?o.getOptions(r):r))}}function iFt(t,i){if(t&1&&ie(0,XNt,4,11,"ng-container",13)(1,tFt,4,22,"ng-container",13),t&2){let e=i.$implicit,n=L(3);D("ngIf",n.isOptionGroup(e)),E(),D("ngIf",!n.isOptionGroup(e))}}function nFt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(4);E(),gn(" ",e.searchResultMessageText," ")}}function rFt(t,i){t&1&&Li(0,null,11)}function oFt(t,i){if(t&1&&(O(0,"li",45),ie(1,nFt,2,1,"ng-container",47)(2,rFt,2,0,"ng-container",22),M()),t&2){let e=L().options,n=L(2);Pe(n.cx("emptyMessage")),D("ngStyle",Yi(6,Zoe,e.itemSize+"px")),E(),D("ngIf",!n.emptyTemplate&&!n._emptyTemplate)("ngIfElse",n.empty),E(),D("ngTemplateOutlet",n.emptyTemplate||n._emptyTemplate)}}function aFt(t,i){if(t&1&&(O(0,"ul",42,10),ie(2,iFt,2,2,"ng-template",43)(3,oFt,3,8,"li",44),M()),t&2){let e=i.$implicit,n=i.options,r=L(2);is(n.contentStyle),Pe(r.cn(r.cx("list"),n.contentStyleClass)),lt("id",r.id+"_list")("aria-label",r.listLabel),E(2),D("ngForOf",e),E(),D("ngIf",!e||e&&e.length===0&&r.showEmptyMessage)}}function sFt(t,i){t&1&&Li(0)}function lFt(t,i){if(t&1&&(O(0,"div",38),ie(1,UNt,1,0,"ng-container",22),O(2,"div"),ie(3,YNt,5,10,"p-scroller",39)(4,WNt,2,6,"ng-container",13),M(),ie(5,aFt,4,8,"ng-template",null,7,di)(7,sFt,1,0,"ng-container",22),M(),O(8,"span",40),ee(9),M()),t&2){let e=L();Pe(e.cn(e.cx("overlay"),e.panelStyleClass)),D("ngStyle",e.panelStyle),E(),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),E(),Pe(e.cx("listContainer")),la("max-height",e.virtualScroll?"auto":e.scrollHeight),E(),D("ngIf",e.virtualScroll),E(),D("ngIf",!e.virtualScroll),E(3),D("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),E(2),gn(" ",e.selectedMessageText," ")}}var cFt=` ${m9e} /* 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'); } `,dFt={root:{position:"relative"}},uFt={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})=>["p-autocomplete-chip-item",{"p-focus":t.focusedMultipleOptionIndex()===i}],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:i,i:e,scrollerOptions:n})=>({"p-autocomplete-option":!0,"p-autocomplete-option-selected":t.isSelected(i),"p-focus":t.focusedOptionIndex()===t.getOptionIndex(e,n),"p-disabled":t.isOptionDisabled(i)}),emptyMessage:"p-autocomplete-empty-message",clearIcon:"p-autocomplete-clear-icon"},h9e=(()=>{class t extends br{name="autocomplete";theme=cFt;classes=uFt;inlineStyles=dFt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var pFt={provide:Wc,useExisting:No(()=>Pu),multi:!0},Pu=(()=>{class t extends Wk{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=kr(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=ae(Q7);value;_suggestions=hr(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=hr(-1);focusedOptionIndex=hr(-1);_componentStyle=ae(h9e);$appendTo=Or(()=>this.appendTo()||this.config.overlayAppendTo());visibleOptions=Or(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=Or(()=>{let e=this.modelValue(),n=this.optionValueSelected?(this.suggestions||[]).find(r=>Os(r,this.optionValue)===e):e;if(Ro(e))if(typeof e=="object"||this.optionValueSelected){let r=this.getOptionLabel(n);return r??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 Ro(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(xs.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,n){super(),this.overlayService=e,this.zone=n}ngOnInit(){super.ngOnInit(),this.id=this.id||fa("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((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let a=this.getOptionGroupChildren(r);return a&&a.forEach(c=>n.push(c)),n},[])}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return X0(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 n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?X0(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n: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?Os(e,this.optionDisabled):!1}isSelected(e){return this.multiple?this.unique?this.modelValue()?.find(n=>xd(n,this.getOptionValue(e),this.equalityKey())):!1:xd(this.modelValue(),this.getOptionValue(e),this.equalityKey())}isOptionMatched(e,n){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===n.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))&&Ba(this.inputEL.nativeElement)}handleDropdownClick(e){let n;this.overlayVisible?this.hide(!0):(Ba(this.inputEL.nativeElement),n=this.inputEL.nativeElement.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,n,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:n})}onInput(e){if(this.typeahead){let n=this.minQueryLength||this.minLength;this.searchTimeout&&clearTimeout(this.searchTimeout);let r=e.target.value;this.maxlength()!==null&&(r=r.split("").slice(0,this.maxlength()).join("")),!this.multiple&&!this.forceSelection&&this.updateModel(r),r.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide()},this.delay/2)):r.length>=n?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,r,"input")},this.delay)):this.hide()}}onInputChange(e){if(this.forceSelection){let n=!1;if(this.visibleOptions()){let r=this.visibleOptions().find(o=>this.isOptionMatched(o,this.inputEL.nativeElement.value||""));r!==void 0&&(n=!0,!this.isSelected(r)&&this.onOptionSelect(e,r))}n||(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 n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),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 n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),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 n=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,n),e.preventDefault(),e.stopPropagation()}}onArrowLeftKey(e){let n=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(ru(n.value)&&this.hasSelectedOption()?(Ba(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:n}=e,r=n.value.length;n.setSelectionRange(0,e.shiftKey?r:0),this.focusedOptionIndex.set(-1),e.preventDefault()}onEndKey(e){let{currentTarget:n}=e,r=n.value.length;n.setSelectionRange(e.shiftKey?0:r,r),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(Ro(this.modelValue())&&!this.inputEL.nativeElement.value){let n=this.modelValue()[this.modelValue().length-1],r=this.modelValue().slice(0,-1);this.updateModel(r),this.onUnselect.emit({originalEvent:e,value:n})}e.stopPropagation()}!this.multiple&&this.showClear&&this.findSelectedOptionIndex()!=-1&&this.clear()}onArrowLeftKeyOnMultiple(e){let n=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(n)}onArrowRightKeyOnMultiple(e){let n=this.focusedMultipleOptionIndex();n++,this.focusedMultipleOptionIndex.set(n),n>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),Ba(this.inputEL.nativeElement))}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex())}onOptionSelect(e,n,r=!0){let o=this.getOptionValue(n);this.multiple?(this.inputEL.nativeElement.value="",this.isSelected(n)||this.updateModel([...this.modelValue()||[],o])):this.updateModel(o),this.onSelect.emit({originalEvent:e,value:n}),r&&this.hide(!0)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}search(e,n,r){n!=null&&(r==="input"&&n.trim().length===0||(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:n})))}removeOption(e,n){e.stopPropagation();let r=this.modelValue()[n],o=this.modelValue().filter((a,c)=>c!==n);this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:r}),Ba(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 n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=$r(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions()[n],!1))}show(e=!1){this.dirty=!0,this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),e&&Ba(this.inputEL.nativeElement),e&&Ba(this.inputEL.nativeElement),this.onShow.emit(),this.cd.markForCheck()}hide(e=!1){let n=()=>{this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex.set(-1),e&&Ba(this.inputEL.nativeElement),this.onHide.emit(),this.cd.markForCheck()};setTimeout(()=>{n()},0)}clear(){this.updateModel(null),this.inputEL.nativeElement.value="",this.onClear.emit()}hasSelectedOption(){return Ro(this.modelValue())}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}getOptionLabel(e){return this.optionLabel?Os(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?Os(e,this.optionValue):e&&e.value!=null?e.value:e}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionGroupLabel(e){return this.optionGroupLabel?Os(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Os(e,this.optionGroupChildren):e.items}onOverlayAnimationStart(e){if(e.toState==="visible"&&(this.itemsWrapper=$r(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 n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=$r(this.itemsWrapper,".p-autocomplete-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"center"})}}writeControlValue(e,n){this.value=e,n(e),this.updateInputValue(),this.cd.markForCheck()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Cv),xe(Pn))};static \u0275cmp=re({type:t,selectors:[["p-autoComplete"],["p-autocomplete"],["p-auto-complete"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,qPt,5),Vt(o,YPt,5),Vt(o,KPt,5),Vt(o,WPt,5),Vt(o,QPt,5),Vt(o,ZPt,5),Vt(o,XPt,5),Vt(o,JPt,5),Vt(o,eNt,5),Vt(o,tNt,5),Vt(o,iNt,5),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.emptyTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.selectedItemTemplate=a.first),ze(a=Ue())&&(r.groupTemplate=a.first),ze(a=Ue())&&(r.loaderTemplate=a.first),ze(a=Ue())&&(r.removeIconTemplate=a.first),ze(a=Ue())&&(r.loadingIconTemplate=a.first),ze(a=Ue())&&(r.clearIconTemplate=a.first),ze(a=Ue())&&(r.dropdownIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(nNt,5),Xi(rNt,5),Xi(oNt,5),Xi(aNt,5),Xi(sNt,5),Xi(lNt,5),Xi(cNt,5)),n&2){let o;ze(o=Ue())&&(r.inputEL=o.first),ze(o=Ue())&&(r.multiInputEl=o.first),ze(o=Ue())&&(r.multiContainerEL=o.first),ze(o=Ue())&&(r.dropdownButton=o.first),ze(o=Ue())&&(r.itemsViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first),ze(o=Ue())&&(r.overlayViewChild=o.first)}},hostVars:4,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onHostClick(a)}),n&2&&(is(r.sx("root")),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{minLength:[2,"minLength","minLength",En],minQueryLength:[2,"minQueryLength","minQueryLength",En],delay:[2,"delay","delay",En],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",En],virtualScrollOptions:"virtualScrollOptions",autoHighlight:[2,"autoHighlight","autoHighlight",Je],forceSelection:[2,"forceSelection","forceSelection",Je],type:"type",autoZIndex:[2,"autoZIndex","autoZIndex",Je],baseZIndex:[2,"baseZIndex","baseZIndex",En],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",En],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:[Ii([pFt,h9e]),Tt],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(n,r){if(n&1){let o=qe();ie(0,gNt,2,30,"input",12)(1,CNt,3,2,"ng-container",13)(2,DNt,6,33,"ul",14)(3,PNt,3,2,"ng-container",13)(4,zNt,4,7,"button",15),O(5,"p-overlay",16,0),jf("visibleChange",function(c){return se(o),Fg(r.overlayVisible,c)||(r.overlayVisible=c),le(c)}),te("onAnimationStart",function(c){return se(o),le(r.onOverlayAnimationStart(c))})("onHide",function(){return se(o),le(r.hide())}),ie(7,lFt,10,12,"ng-template",null,1,di),M()}n&2&&(D("ngIf",!r.multiple),E(),D("ngIf",r.$filled()&&!r.$disabled()&&r.showClear&&!r.loading),E(),D("ngIf",r.multiple),E(),D("ngIf",r.loading),E(),D("ngIf",r.dropdown),E(),D("hostAttrSelector",r.attrSelector),Gf("visible",r.overlayVisible),D("options",r.overlayOptions)("target","@parent")("appendTo",r.$appendTo())("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions))},dependencies:[rr,qa,Vl,Xr,Jr,Xs,sz,_p,Qc,ey,Zh,Rie,W_,Dm,E5,Un,Qf],encapsulation:2,changeDetection:0})}return t})(),Xoe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Pu,Un]})}return t})();var y9e=(()=>{class t{_companiesService;_currentRequest;constructor(e){this._companiesService=e}findAll(){return this._currentRequest?this._currentRequest:(this._currentRequest=this._companiesService.getAll().pipe(qc(1)),this._currentRequest)}reload(){this._currentRequest=this._companiesService.getAll().pipe(qc(1))}static \u0275fac=function(n){return new(n||t)(ai(bp))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var v9e=(()=>{class t{_cdf;_companyService;companySelect=new ve;companies=[];constructor(e,n){this._cdf=e,this._companyService=n,this._companyService.reload()}ngOnInit(){this._companyService.findAll().subscribe(e=>this.companies=e)}onSearch(e){this._companyService.findAll().pipe(ot(n=>n.filter(r=>r.name.toLowerCase().includes(e.query.toLowerCase())))).subscribe(n=>{this.companies=n,this._cdf.markForCheck()})}onCompanyChange(e){this.companySelect.emit(e.value)}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(y9e))};static \u0275cmp=re({type:t,selectors:[["bd-administration-company-select"]],outputs:{companySelect:"companySelect"},decls:4,vars:4,consts:[["optionLabel","name","dataKey","id","fluid","","variant","filled","inputId","company-search",3,"completeMethod","onSelect","virtualScroll","suggestions","virtualScrollItemSize","dropdown"],["for","company-search"]],template:function(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-autoComplete",0),te("completeMethod",function(a){return r.onSearch(a)})("onSelect",function(a){return r.onCompanyChange(a)}),M(),O(2,"label",1),ee(3,"Kunde"),M()()),n&2&&(E(),D("virtualScroll",!0)("suggestions",r.companies)("virtualScrollItemSize",34)("dropdown",!0))},dependencies:[Ho,Pu],encapsulation:2})}return t})();var Joe=(()=>{class t{groupSelect=new ve;company;onCompanySelect(e){this.company=e}onGroupSelect(e){this.groupSelect.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-combined-group-select"]],outputs:{groupSelect:"groupSelect"},decls:5,vars:1,consts:[[1,"flex","flex-col","gap-6"],[3,"companySelect"],[3,"groupSelect","company"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div")(2,"bd-administration-company-select",1),te("companySelect",function(a){return r.onCompanySelect(a)}),M()(),O(3,"div")(4,"bd-administration-group-select",2),te("groupSelect",function(a){return r.onGroupSelect(a)}),M()()()),n&2&&(E(4),D("company",r.company))},dependencies:[v9e,d9e],encapsulation:2})}return t})();function hFt(t,i){if(t&1&&(fi(0),O(1,"div")(2,"div",10)(3,"mat-icon"),ee(4,"warning"),M(),O(5,"span",11),ee(6),M()()(),gi()),t&2){let e=L(2);E(6),gn("",e.duplicateUsers.length," Nutzer sind schon in der Gruppe (werden \xFCbersprungen) !")}}function fFt(t,i){if(t&1&&(O(0,"div",3),be(1,"mat-divider"),ie(2,hFt,7,1,"ng-container",9),M()),t&2){let e=L();E(2),D("ngIf",(e.duplicateUsers==null?null:e.duplicateUsers.length)>0)}}var b9e=(()=>{class t{_groupService;_dialogRef;_data;loading$=new hi(1);jobExecutor=new Ai;group;duplicateUsers=[];validUsers=[];constructor(e,n,r){this._groupService=e,this._dialogRef=n,this._data=r}onGroupSelect(e){this.group=e,this.loading$.next(ni.LOADING),this._groupService.getAllUsersByGroupId(this.group.id).subscribe(n=>{this.duplicateUsers=this._data.users.filter(r=>n.includes(r.oid)),this.validUsers=this._data.users.filter(r=>!n.includes(r.oid)),this.loading$.next(ni.SUCCESS)})}addUsers(){let e={items:this.validUsers,fn:n=>this._groupService.addUserToGroup(this.group.id,n.oid)};this.jobExecutor.next(e)}onClose(){this._dialogRef.close()}static \u0275fac=function(n){return new(n||t)(xe(iC),xe(Im),xe(Z0))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:16,vars:5,consts:[["successTpl",""],["matDialogTitle",""],[3,"cancel","jobExecutor"],[1,"flex","flex-col","gap-6"],[3,"groupSelect"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse","gap-6"],["mat-button","","mat-dialog-close","null"],["mat-raised-button","","color","accent","type","submit",3,"click","disabled"],[4,"ngIf"],[1,"flex","flex-row","gap-6"],[1,"mat-subheading-2"]],template:function(n,r){if(n&1){let o=qe();O(0,"h1",1),ee(1,"Nutzer zu Gruppe hinzuf\xFCgen"),M(),O(2,"mat-dialog-content")(3,"bd-in-progress-indicator",2),te("cancel",function(){return se(o),le(r.onClose())}),O(4,"div",3)(5,"div")(6,"bd-administration-combined-group-select",4),te("groupSelect",function(c){return se(o),le(r.onGroupSelect(c))}),M()(),O(7,"div"),be(8,"bd-loader",5),M()(),O(9,"div",6)(10,"button",7),ee(11,"Abbrechen"),M(),O(12,"button",8),te("click",function(){return se(o),le(r.addUsers())}),ee(13),M()()()(),ie(14,fFt,3,1,"ng-template",null,0,di)}if(n&2){let o=Oi(15);E(3),D("jobExecutor",r.jobExecutor),E(5),D("loadItem",r.loading$)("successTemplate",o),E(4),D("disabled",(r.validUsers==null?null:r.validUsers.length)===0),E(),gn(" ",r.validUsers==null?null:r.validUsers.length," Nutzer hinzuf\xFCgen ")}},dependencies:[$_,lh,T5,Joe,fr,Kr,Kf,Id,Xr,zr],encapsulation:2})}return t})();var FM=class{selection=new Jf(!0,[]);updateSelection(i){this.selection.setSelection(...i)}};var A5=(()=>{class t{searchChange=new ve;onKeyUp(e){this.searchChange.emit(e.target.value)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-search-box"]],outputs:{searchChange:"searchChange"},decls:2,vars:0,consts:[["matInput","","placeholder","Suche ...",3,"keyup"]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("keyup",function(a){return r.onKeyUp(a)}),M()())},dependencies:[Oa,zs],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%]{width:100%}"]})}return t})();var C9e=` .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 gFt=["icon"],_Ft=["input"],yFt=(t,i)=>({checked:t,class:i});function vFt(t,i){if(t&1&&be(0,"span",7),t&2){let e=L(3);Pe(e.cx("icon")),D("ngClass",e.checkboxIcon),lt("data-pc-section","icon")}}function bFt(t,i){if(t&1&&(Pi(),be(0,"svg",8)),t&2){let e=L(3);Pe(e.cx("icon")),lt("data-pc-section","icon")}}function CFt(t,i){if(t&1&&(fi(0),ie(1,vFt,1,4,"span",5)(2,bFt,1,3,"svg",6),gi()),t&2){let e=L(2);E(),D("ngIf",e.checkboxIcon),E(),D("ngIf",!e.checkboxIcon)}}function xFt(t,i){if(t&1&&(Pi(),be(0,"svg",9)),t&2){let e=L(2);Pe(e.cx("icon")),lt("data-pc-section","icon")}}function SFt(t,i){if(t&1&&(fi(0),ie(1,CFt,3,2,"ng-container",2)(2,xFt,1,3,"svg",4),gi()),t&2){let e=L();E(),D("ngIf",e.checked),E(),D("ngIf",e._indeterminate())}}function wFt(t,i){}function IFt(t,i){t&1&&ie(0,wFt,0,0,"ng-template")}var TFt=` ${C9e} /* 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'); } `,EFt={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"},x9e=(()=>{class t extends br{name="checkbox";theme=TFt;classes=EFt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var AFt={provide:Wc,useExisting:No(()=>qg),multi:!0},qg=(()=>{class t extends Hb{value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=kr();size=kr();onChange=new ve;onFocus=new ve;onBlur=new ve;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:JUe(this.value,this.modelValue())}_indeterminate=hr(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=ae(x9e);$variant=Or(()=>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 n,r=this.injector.get($p,null,{optional:!0,self:!0}),o=r&&!this.formControl?r.value:this.modelValue();this.binary?(n=this._indeterminate()?this.trueValue:this.checked?this.falseValue:this.trueValue,this.writeModelValue(n),this.onModelChange(n)):(this.checked||this._indeterminate()?n=o.filter(a=>!xd(a,this.value)):n=o?[...o,this.value]:[this.value],this.onModelChange(n),this.writeModelValue(n),this.formControl&&this.formControl.setValue(n)),this._indeterminate()&&this._indeterminate.set(!1),this.onChange.emit({checked:n,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,n){n(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,gFt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.checkboxIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&Xi(_Ft,5),n&2){let o;ze(o=Ue())&&(r.inputViewChild=o.first)}},hostVars:5,hostBindings:function(n,r){n&2&&(lt("data-p-highlight",r.checked)("data-p-checked",r.checked)("data-p-disabled",r.$disabled()),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{value:"value",binary:[2,"binary","binary",Je],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",En],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:[Ii([AFt,x9e]),Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"input",1,0),te("focus",function(c){return se(o),le(r.onInputFocus(c))})("blur",function(c){return se(o),le(r.onInputBlur(c))})("change",function(c){return se(o),le(r.handleChange(c))}),M(),O(2,"div"),ie(3,SFt,3,2,"ng-container",2)(4,IFt,1,0,null,3),M()}n&2&&(is(r.inputStyle),Pe(r.cn(r.cx("input"),r.inputClass)),D("checked",r.checked),lt("id",r.inputId)("value",r.value)("name",r.name())("tabindex",r.tabindex)("required",r.required()?"":void 0)("readonly",r.readonly?"":void 0)("disabled",r.$disabled()?"":void 0)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel),E(2),Pe(r.cx("box")),E(),D("ngIf",!r.checkboxIconTemplate&&!r._checkboxIconTemplate),E(),D("ngTemplateOutlet",r.checkboxIconTemplate||r._checkboxIconTemplate)("ngTemplateOutletContext",na(19,yFt,r.checked,r.cx("icon"))))},dependencies:[rr,qa,Xr,Jr,Un,Qk,P6e],encapsulation:2,changeDetection:0})}return t})(),S9e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[qg,Un,Un]})}return t})();var kFt=["data-p-icon","filter-fill"],w1e=(()=>{class t extends aa{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Tt],attrs:kFt,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(n,r){n&1&&(Pi(),Cr(0,"path",0))},encapsulation:2})}return t})();var w9e=` .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 MFt=["dropdownicon"],OFt=["firstpagelinkicon"],RFt=["previouspagelinkicon"],PFt=["lastpagelinkicon"],NFt=["nextpagelinkicon"],eae=t=>({$implicit:t}),FFt=t=>({pageLink:t});function LFt(t,i){t&1&&Li(0)}function BFt(t,i){if(t&1&&(O(0,"div"),ie(1,LFt,1,0,"ng-container",9),M()),t&2){let e=L();Pe(e.cx("contentStart")),lt("data-pc-section","start"),E(),D("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Yi(5,eae,e.paginatorState))}}function VFt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L();Pe(e.cx("current")),E(),Pt(e.currentPageReport)}}function zFt(t,i){if(t&1&&(Pi(),be(0,"svg",12)),t&2){let e=L(2);Pe(e.cx("firstIcon"))}}function UFt(t,i){}function HFt(t,i){t&1&&ie(0,UFt,0,0,"ng-template")}function GFt(t,i){if(t&1&&(O(0,"span"),ie(1,HFt,1,0,null,13),M()),t&2){let e=L(2);Pe(e.cx("firstIcon")),E(),D("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function jFt(t,i){if(t&1){let e=qe();O(0,"button",10),te("click",function(r){se(e);let o=L();return le(o.changePageToFirst(r))}),ie(1,zFt,1,2,"svg",11)(2,GFt,2,3,"span",0),M()}if(t&2){let e=L();Pe(e.cx("first")),lt("aria-label",e.getAriaLabel("firstPageLabel")),E(),D("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),E(),D("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function $Ft(t,i){if(t&1&&(Pi(),be(0,"svg",14)),t&2){let e=L();Pe(e.cx("prevIcon"))}}function qFt(t,i){}function YFt(t,i){t&1&&ie(0,qFt,0,0,"ng-template")}function KFt(t,i){if(t&1&&(O(0,"span"),ie(1,YFt,1,0,null,13),M()),t&2){let e=L();Pe(e.cx("prevIcon")),E(),D("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function WFt(t,i){if(t&1){let e=qe();O(0,"button",10),te("click",function(r){let o=se(e).$implicit,a=L(2);return le(a.onPageLinkClick(r,o-1))}),ee(1),M()}if(t&2){let e=i.$implicit,n=L(2);Pe(n.cx("page",Yi(5,FFt,e))),lt("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),E(),gn(" ",n.getLocalization(e)," ")}}function QFt(t,i){if(t&1&&(O(0,"span"),ie(1,WFt,2,7,"button",15),M()),t&2){let e=L();Pe(e.cx("pages")),E(),D("ngForOf",e.pageLinks)}}function ZFt(t,i){if(t&1&&ee(0),t&2){let e=L(2);Pt(e.currentPageReport)}}function XFt(t,i){t&1&&Li(0)}function JFt(t,i){if(t&1&&ie(0,XFt,1,0,"ng-container",9),t&2){let e=i.$implicit,n=L(3);D("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Yi(2,eae,e))}}function eLt(t,i){t&1&&(fi(0),ie(1,JFt,1,4,"ng-template",19),gi())}function tLt(t,i){t&1&&Li(0)}function iLt(t,i){if(t&1&&ie(0,tLt,1,0,"ng-container",13),t&2){let e=L(3);D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function nLt(t,i){t&1&&ie(0,iLt,1,1,"ng-template",20)}function rLt(t,i){if(t&1){let e=qe();O(0,"p-select",16),te("onChange",function(r){se(e);let o=L();return le(o.onPageDropdownChange(r))}),ie(1,ZFt,1,1,"ng-template",17)(2,eLt,2,0,"ng-container",18)(3,nLt,1,0,null,18),M()}if(t&2){let e=L();D("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("styleClass",e.cx("pcJumpToPageDropdown"))("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),lt("aria-label",e.getAriaLabel("jumpToPageDropdownLabel")),E(2),D("ngIf",e.jumpToPageItemTemplate),E(),D("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function oLt(t,i){if(t&1&&(Pi(),be(0,"svg",21)),t&2){let e=L();Pe(e.cx("nextIcon"))}}function aLt(t,i){}function sLt(t,i){t&1&&ie(0,aLt,0,0,"ng-template")}function lLt(t,i){if(t&1&&(O(0,"span"),ie(1,sLt,1,0,null,13),M()),t&2){let e=L();Pe(e.cx("nextIcon")),E(),D("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function cLt(t,i){if(t&1&&(Pi(),be(0,"svg",23)),t&2){let e=L(2);Pe(e.cx("lastIcon"))}}function dLt(t,i){}function uLt(t,i){t&1&&ie(0,dLt,0,0,"ng-template")}function pLt(t,i){if(t&1&&(O(0,"span"),ie(1,uLt,1,0,null,13),M()),t&2){let e=L(2);Pe(e.cx("lastIcon")),E(),D("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function mLt(t,i){if(t&1){let e=qe();O(0,"button",2),te("click",function(r){se(e);let o=L();return le(o.changePageToLast(r))}),ie(1,cLt,1,2,"svg",22)(2,pLt,2,3,"span",0),M()}if(t&2){let e=L();Pe(e.cx("last")),D("disabled",e.isLastPage()||e.empty()),lt("aria-label",e.getAriaLabel("lastPageLabel")),E(),D("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),E(),D("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function hLt(t,i){if(t&1){let e=qe();O(0,"p-inputnumber",24),te("ngModelChange",function(r){se(e);let o=L();return le(o.changePage(r-1))}),M()}if(t&2){let e=L();Pe(e.cx("pcJumpToPageInput")),D("ngModel",e.currentPage())("disabled",e.empty())}}function fLt(t,i){t&1&&Li(0)}function gLt(t,i){if(t&1&&ie(0,fLt,1,0,"ng-container",9),t&2){let e=i.$implicit,n=L(3);D("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Yi(2,eae,e))}}function _Lt(t,i){t&1&&(fi(0),ie(1,gLt,1,4,"ng-template",19),gi())}function yLt(t,i){t&1&&Li(0)}function vLt(t,i){if(t&1&&ie(0,yLt,1,0,"ng-container",13),t&2){let e=L(3);D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function bLt(t,i){t&1&&ie(0,vLt,1,1,"ng-template",20)}function CLt(t,i){if(t&1){let e=qe();O(0,"p-select",25),jf("ngModelChange",function(r){se(e);let o=L();return Fg(o.rows,r)||(o.rows=r),le(r)}),te("onChange",function(r){se(e);let o=L();return le(o.onRppChange(r))}),ie(1,_Lt,2,0,"ng-container",18)(2,bLt,1,0,null,18),M()}if(t&2){let e=L();D("options",e.rowsPerPageItems),Gf("ngModel",e.rows),D("styleClass",e.cx("pcRowPerPageDropdown"))("disabled",e.empty())("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),uc("ariaLabel",e.getAriaLabel("rowsPerPageLabel")),E(),D("ngIf",e.dropdownItemTemplate),E(),D("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function xLt(t,i){t&1&&Li(0)}function SLt(t,i){if(t&1&&(O(0,"div"),ie(1,xLt,1,0,"ng-container",9),M()),t&2){let e=L();Pe(e.cx("contentEnd")),lt("data-pc-section","end"),E(),D("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Yi(5,eae,e.paginatorState))}}var wLt={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:i})=>["p-paginator-page",{"p-paginator-page-selected":i-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},I9e=(()=>{class t extends br{name="paginator";theme=w9e;classes=wLt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var j$=(()=>{class t extends ur{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=kr(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=ae(I9e);$appendTo=Or(()=>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 n=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),r=new Map(n.map((o,a)=>[a,o]));return e>9?String(e).split("").map(a=>r.get(Number(a))).join(""):r.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 n of this.rowsPerPageOptions)typeof n=="object"&&n.showAll?e={label:n.showAll,value:this.totalRecords}:this.rowsPerPageItems.push({label:String(this.getLocalization(n)),value:n});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(),n=Math.min(this.pageLinkSize,e),r=Math.max(0,Math.ceil(this.getPage()-n/2)),o=Math.min(e-1,r+n-1);var a=this.pageLinkSize-(o-r+1);return r=Math.max(0,r-a),[r,o]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),n=e[0],r=e[1];for(let o=n;o<=r;o++)this.pageLinks.push(o+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let o=0;o=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,n){this.changePage(n),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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["p-paginator"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,MFt,4),Vt(o,OFt,4),Vt(o,RFt,4),Vt(o,PFt,4),Vt(o,NFt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.dropdownIconTemplate=a.first),ze(a=Ue())&&(r.firstPageLinkIconTemplate=a.first),ze(a=Ue())&&(r.previousPageLinkIconTemplate=a.first),ze(a=Ue())&&(r.lastPageLinkIconTemplate=a.first),ze(a=Ue())&&(r.nextPageLinkIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:6,hostBindings:function(n,r){n&2&&(lt("data-pc-name","paginator")("data-pc-section","root"),Pe(r.cn(r.cx("paginator"),r.styleClass)),la("display",r.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",En],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",En],rows:[2,"rows","rows",En],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:[Ii([I9e]),Tt,Yt],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(n,r){n&1&&(ie(0,BFt,2,7,"div",0)(1,VFt,2,3,"span",0)(2,jFt,3,5,"button",1),O(3,"button",2),te("click",function(a){return r.changePageToPrev(a)}),ie(4,$Ft,1,2,"svg",3)(5,KFt,2,3,"span",0),M(),ie(6,QFt,2,3,"span",0)(7,rLt,4,9,"p-select",4),O(8,"button",2),te("click",function(a){return r.changePageToNext(a)}),ie(9,oLt,1,2,"svg",5)(10,lLt,2,3,"span",0),M(),ie(11,mLt,3,6,"button",6)(12,hLt,1,4,"p-inputnumber",7)(13,CLt,3,9,"p-select",8)(14,SLt,2,7,"div",0)),n&2&&(D("ngIf",r.templateLeft),E(),D("ngIf",r.showCurrentPageReport),E(),D("ngIf",r.showFirstLastIcon),E(),Pe(r.cx("prev")),D("disabled",r.isFirstPage()||r.empty()),lt("aria-label",r.getAriaLabel("prevPageLabel")),E(),D("ngIf",!r.previousPageLinkIconTemplate&&!r._previousPageLinkIconTemplate),E(),D("ngIf",r.previousPageLinkIconTemplate||r._previousPageLinkIconTemplate),E(),D("ngIf",r.showPageLinks),E(),D("ngIf",r.showJumpToPageDropdown),E(),Pe(r.cx("next")),D("disabled",r.isLastPage()||r.empty()),lt("aria-label",r.getAriaLabel("nextPageLabel")),E(),D("ngIf",!r.nextPageLinkIconTemplate&&!r._nextPageLinkIconTemplate),E(),D("ngIf",r.nextPageLinkIconTemplate||r._nextPageLinkIconTemplate),E(),D("ngIf",r.showFirstLastIcon),E(),D("ngIf",r.showJumpToPageInput),E(),D("ngIf",r.rowsPerPageOptions),E(),D("ngIf",r.templateRight))},dependencies:[rr,Vl,Xr,Jr,Us,U4,ra,yr,ya,Qc,T6e,E6e,D6e,kie,Un,Tr],encapsulation:2,changeDetection:0})}return t})(),tae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[j$,Un,Un]})}return t})();var E9e=` .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 ILt=["input"],TLt=` ${E9e} /* 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'); } `,ELt={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"},A9e=(()=>{class t extends br{name="radiobutton";theme=TLt;classes=ELt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var ALt={provide:Wc,useExisting:No(()=>D9e),multi:!0},DLt=(()=>{class t{accessors=[];add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return e[0].control?e[0].control.root===n.control.control.root&&e[1].name()===n.name():!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),D9e=(()=>{class t extends Hb{value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=kr();size=kr();onClick=new ve;onFocus=new ve;onBlur=new ve;inputViewChild;$variant=Or(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=ae(A9e);injector=ae(Ir);registry=ae(DLt);ngOnInit(){super.ngOnInit(),this.control=this.injector.get($p),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,n){this.checked=this.binary?!!e:e==this.value,n(this.checked),this.cd.markForCheck()}ngOnDestroy(){this.registry.remove(this),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,r){if(n&1&&Xi(ILt,5),n&2){let o;ze(o=Ue())&&(r.inputViewChild=o.first)}},hostVars:4,hostBindings:function(n,r){n&2&&(lt("data-pc-name","radiobutton")("data-pc-section","root"),Pe(r.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",En],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:[Ii([ALt,A9e]),Tt],decls:4,vars:19,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus"]],template:function(n,r){if(n&1){let o=qe();O(0,"input",1,0),te("focus",function(c){return se(o),le(r.onInputFocus(c))})("blur",function(c){return se(o),le(r.onInputBlur(c))})("change",function(c){return se(o),le(r.onChange(c))}),M(),O(2,"div"),be(3,"div"),M()}n&2&&(Pe(r.cx("input")),D("checked",r.checked)("pAutoFocus",r.autofocus),lt("id",r.inputId)("name",r.name())("required",r.required()?"":void 0)("disabled",r.$disabled()?"":void 0)("value",r.modelValue())("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("tabindex",r.tabindex)("aria-checked",r.checked),E(2),Pe(r.cx("box")),lt("data-pc-section","input"),E(),Pe(r.cx("icon")),lt("data-pc-section","icon"))},dependencies:[rr,Zh,Un],encapsulation:2,changeDetection:0})}return t})(),k9e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[D9e,Un,Un]})}return t})();var M9e=` .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 kLt=["icon"],MLt=["content"],R9e=t=>({$implicit:t});function OLt(t,i){t&1&&Li(0)}function RLt(t,i){if(t&1&&be(0,"span"),t&2){let e=L(3);Pe(e.cn(e.cx("icon"),e.checked?e.onIcon:e.offIcon,e.iconPos==="left"?e.cx("iconLeft"):e.cx("iconRight"))),lt("data-pc-section","icon")}}function PLt(t,i){if(t&1&&yt(0,RLt,1,3,"span",1),t&2){let e=L(2);vt(e.onIcon||e.offIcon?0:-1)}}function NLt(t,i){t&1&&Li(0)}function FLt(t,i){if(t&1&&ie(0,NLt,1,0,"ng-container",0),t&2){let e=L(2);D("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",Yi(2,R9e,e.checked))}}function LLt(t,i){if(t&1&&(yt(0,PLt,1,1)(1,FLt,1,4,"ng-container"),O(2,"span"),ee(3),M()),t&2){let e=L();vt(e.iconTemplate?1:0),E(2),Pe(e.cx("label")),lt("data-pc-section","label"),E(),Pt(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var BLt=` ${M9e} /* For PrimeNG (iconPos) */ .p-togglebutton-icon-right { order: 1; } .p-togglebutton.ng-invalid.ng-dirty { border-color: dt('togglebutton.invalid.border.color'); } `,VLt={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"},O9e=(()=>{class t extends br{name="togglebutton";theme=BLt;classes=VLt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var zLt={provide:Wc,useExisting:No(()=>I1e),multi:!0},I1e=(()=>{class t extends Hb{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=kr(void 0,{transform:Je});onChange=new ve;iconTemplate;contentTemplate;templates;checked=!1;_componentStyle=ae(O9e);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,n){this.checked=e,n(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,kLt,4),Vt(o,MLt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.iconTemplate=a.first),ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:6,hostBindings:function(n,r){n&1&&te("keydown",function(a){return r.onKeyDown(a)})("click",function(a){return r.toggle(a)}),n&2&&(lt("aria-labelledby",r.ariaLabelledBy)("aria-pressed",r.checked)("role","button")("tabindex",r.$disabled()?-1:0),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",En],iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",Je],size:"size",allowEmpty:"allowEmpty",fluid:[1,"fluid"]},outputs:{onChange:"onChange"},features:[Ii([zLt,O9e]),BT([Qc]),Tt],decls:3,vars:7,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class"]],template:function(n,r){n&1&&(O(0,"span"),ie(1,OLt,1,0,"ng-container",0),yt(2,LLt,4,5),M()),n&2&&(Pe(r.cx("content")),E(),D("ngTemplateOutlet",r.contentTemplate||r._contentTemplate)("ngTemplateOutletContext",Yi(5,R9e,r.checked)),E(),vt(r.contentTemplate?-1:2))},dependencies:[rr,Jr,Un],encapsulation:2,changeDetection:0})}return t})();var P9e=` .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 ULt=["item"],HLt=(t,i)=>({$implicit:t,index:i});function GLt(t,i){return this.getOptionLabel(i)}function jLt(t,i){t&1&&Li(0)}function $Lt(t,i){if(t&1&&ie(0,jLt,1,0,"ng-container",3),t&2){let e=L(2),n=e.$implicit,r=e.$index,o=L();D("ngTemplateOutlet",o.itemTemplate||o._itemTemplate)("ngTemplateOutletContext",na(2,HLt,n,r))}}function qLt(t,i){t&1&&ie(0,$Lt,1,5,"ng-template",null,0,di)}function YLt(t,i){if(t&1){let e=qe();O(0,"p-togglebutton",2),te("onChange",function(r){let o=se(e),a=o.$implicit,c=o.$index,m=L();return le(m.onOptionSelect(r,a,c))}),yt(1,qLt,2,0),M()}if(t&2){let e=i.$implicit,n=L();D("autofocus",n.autofocus)("styleClass",n.styleClass)("ngModel",n.isSelected(e))("onLabel",n.getOptionLabel(e))("offLabel",n.getOptionLabel(e))("disabled",n.$disabled()||n.isOptionDisabled(e))("allowEmpty",n.getAllowEmpty())("size",n.size())("fluid",n.fluid()),E(),vt(n.itemTemplate||n._itemTemplate?1:-1)}}var KLt=` ${P9e} /* For PrimeNG */ .p-selectbutton.ng-invalid.ng-dirty { outline: 1px solid dt('selectbutton.invalid.border.color'); outline-offset: 0; } `,WLt={root:({instance:t})=>["p-selectbutton p-component",{"p-invalid":t.invalid(),"p-selectbutton-fluid":t.fluid()}]},N9e=(()=>{class t extends br{name="selectbutton";theme=KLt;classes=WLt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var QLt={provide:Wc,useExisting:No(()=>F9e),multi:!0},F9e=(()=>{class t extends Hb{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=kr();fluid=kr(void 0,{transform:Je});onOptionClick=new ve;onChange=new ve;itemTemplate;_itemTemplate;get equalityKey(){return this.optionValue?null:this.dataKey}value;focusedIndex=0;_componentStyle=ae(N9e);getAllowEmpty(){return this.multiple?this.allowEmpty||this.value?.length!==1:this.allowEmpty}getOptionLabel(e){return this.optionLabel?Os(e,this.optionLabel):e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?Os(e,this.optionValue):this.optionLabel||e.value===void 0?e:e.value}isOptionDisabled(e){return this.optionDisabled?Os(e,this.optionDisabled):e.disabled!==void 0?e.disabled:!1}onOptionSelect(e,n,r){if(this.$disabled()||this.isOptionDisabled(n))return;let o=this.isSelected(n);if(o&&this.unselectable)return;let a=this.getOptionValue(n),c;if(this.multiple)o?c=this.value.filter(m=>!xd(m,a,this.equalityKey)):c=this.value?[...this.value,a]:[a];else{if(o&&!this.allowEmpty)return;c=o?null:a}this.focusedIndex=r,this.value=c,this.writeModelValue(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.onOptionClick.emit({originalEvent:e,option:n,index:r})}changeTabIndexes(e,n){let r,o;for(let a=0;a<=this.el.nativeElement.children.length-1;a++)this.el.nativeElement.children[a].getAttribute("tabindex")==="0"&&(r={elem:this.el.nativeElement.children[a],index:a});n==="prev"?r.index===0?o=this.el.nativeElement.children.length-1:o=r.index-1:r.index===this.el.nativeElement.children.length-1?o=0:o=r.index+1,this.focusedIndex=o,this.el.nativeElement.children[o].focus()}onFocus(e,n){this.focusedIndex=n}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(n=>!xd(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value&&Array.isArray(this.value)){for(let o of this.value)if(xd(o,r,this.dataKey)){n=!0;break}}}else n=xd(this.getOptionValue(e),this.value,this.equalityKey);return n}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break}})}writeControlValue(e,n){this.value=e,n(this.value),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-selectButton"],["p-selectbutton"],["p-select-button"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,ULt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:6,hostBindings:function(n,r){n&2&&(lt("role","group")("aria-labelledby",r.ariaLabelledBy)("data-pc-section","root")("data-pc-name","selectbutton"),Pe(r.cx("root")))},inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",unselectable:[2,"unselectable","unselectable",Je],tabindex:[2,"tabindex","tabindex",En],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:[Ii([QLt,N9e]),Tt],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(n,r){n&1&&Qo(0,YLt,2,10,"p-togglebutton",1,GLt,!0),n&2&&Zo(r.options)},dependencies:[I1e,ra,yr,ya,rr,Jr,Un],encapsulation:2,changeDetection:0})}return t})(),L9e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[F9e,Un,Un]})}return t})();var B9e=` .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 V9e=["header"],ZLt=["headergrouped"],XLt=["body"],JLt=["loadingbody"],eBt=["caption"],z9e=["footer"],tBt=["footergrouped"],iBt=["summary"],nBt=["colgroup"],rBt=["expandedrow"],oBt=["groupheader"],aBt=["groupfooter"],sBt=["frozenexpandedrow"],lBt=["frozenheader"],cBt=["frozenbody"],dBt=["frozenfooter"],uBt=["frozencolgroup"],pBt=["emptymessage"],mBt=["paginatorleft"],hBt=["paginatorright"],fBt=["paginatordropdownitem"],gBt=["loadingicon"],_Bt=["reorderindicatorupicon"],yBt=["reorderindicatordownicon"],vBt=["sorticon"],bBt=["checkboxicon"],CBt=["headercheckboxicon"],xBt=["paginatordropdownicon"],SBt=["paginatorfirstpagelinkicon"],wBt=["paginatorlastpagelinkicon"],IBt=["paginatorpreviouspagelinkicon"],TBt=["paginatornextpagelinkicon"],EBt=["resizeHelper"],ABt=["reorderIndicatorUp"],DBt=["reorderIndicatorDown"],kBt=["wrapper"],MBt=["table"],OBt=["thead"],RBt=["tfoot"],PBt=["scroller"],NBt=t=>({height:t}),U9e=(t,i)=>({$implicit:t,options:i}),FBt=t=>({columns:t}),LM=t=>({$implicit:t});function LBt(t,i){if(t&1&&be(0,"i"),t&2){let e=L(2);Pe(e.cn(e.cx("loadingIcon"),e.loadingIcon))}}function BBt(t,i){if(t&1&&(Pi(),be(0,"svg",18)),t&2){let e=L(3);Pe(e.cx("loadingIcon")),D("spin",!0)}}function VBt(t,i){}function zBt(t,i){t&1&&ie(0,VBt,0,0,"ng-template")}function UBt(t,i){if(t&1&&(O(0,"span"),ie(1,zBt,1,0,null,19),M()),t&2){let e=L(3);Pe(e.cx("loadingIcon")),E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function HBt(t,i){if(t&1&&(fi(0),ie(1,BBt,1,3,"svg",17)(2,UBt,2,3,"span",10),gi()),t&2){let e=L(2);E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function GBt(t,i){if(t&1&&(O(0,"div"),ie(1,LBt,1,2,"i",10)(2,HBt,3,2,"ng-container",14),M()),t&2){let e=L();Pe(e.cx("mask")),E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function jBt(t,i){t&1&&Li(0)}function $Bt(t,i){if(t&1&&(O(0,"div"),ie(1,jBt,1,0,"ng-container",19),M()),t&2){let e=L();Pe(e.cx("header")),E(),D("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function qBt(t,i){t&1&&Li(0)}function YBt(t,i){if(t&1&&ie(0,qBt,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function KBt(t,i){t&1&&ie(0,YBt,1,1,"ng-template",21)}function WBt(t,i){t&1&&Li(0)}function QBt(t,i){if(t&1&&ie(0,WBt,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function ZBt(t,i){t&1&&ie(0,QBt,1,1,"ng-template",22)}function XBt(t,i){t&1&&Li(0)}function JBt(t,i){if(t&1&&ie(0,XBt,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function e3t(t,i){t&1&&ie(0,JBt,1,1,"ng-template",23)}function t3t(t,i){t&1&&Li(0)}function i3t(t,i){if(t&1&&ie(0,t3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function n3t(t,i){t&1&&ie(0,i3t,1,1,"ng-template",24)}function r3t(t,i){t&1&&Li(0)}function o3t(t,i){if(t&1&&ie(0,r3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function a3t(t,i){t&1&&ie(0,o3t,1,1,"ng-template",25)}function s3t(t,i){if(t&1){let e=qe();O(0,"p-paginator",20),te("onPageChange",function(r){se(e);let o=L();return le(o.onPageChange(r))}),ie(1,KBt,1,0,null,14)(2,ZBt,1,0,null,14)(3,e3t,1,0,null,14)(4,n3t,1,0,null,14)(5,a3t,1,0,null,14),M()}if(t&2){let e=L();D("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),E(),D("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),E(),D("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),E(),D("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),E(),D("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),E(),D("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function l3t(t,i){t&1&&Li(0)}function c3t(t,i){if(t&1&&ie(0,l3t,1,0,"ng-container",27),t&2){let e=i.$implicit,n=i.options;L(2);let r=Oi(8);D("ngTemplateOutlet",r)("ngTemplateOutletContext",na(2,U9e,e,n))}}function d3t(t,i){if(t&1){let e=qe();O(0,"p-scroller",26,2),te("onLazyLoad",function(r){se(e);let o=L();return le(o.onLazyItemLoad(r))}),ie(2,c3t,1,5,"ng-template",null,3,di),M()}if(t&2){let e=L();is(Yi(15,NBt,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),D("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 u3t(t,i){t&1&&Li(0)}function p3t(t,i){if(t&1&&(fi(0),ie(1,u3t,1,0,"ng-container",27),gi()),t&2){let e=L(),n=Oi(8);E(),D("ngTemplateOutlet",n)("ngTemplateOutletContext",na(4,U9e,e.processedData,Yi(2,FBt,e.columns)))}}function m3t(t,i){t&1&&Li(0)}function h3t(t,i){t&1&&Li(0)}function f3t(t,i){if(t&1&&be(0,"tbody",34),t&2){let e=L().options,n=L();Pe(n.cx("tbody")),D("value",n.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",n.frozenBodyTemplate||n._frozenBodyTemplate)("frozen",!0)}}function g3t(t,i){if(t&1&&be(0,"tbody",35),t&2){let e=L().options,n=L();is("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),Pe(n.cx("virtualScrollerSpacer"))}}function _3t(t,i){t&1&&Li(0)}function y3t(t,i){if(t&1&&(O(0,"tfoot",36,6),ie(2,_3t,1,0,"ng-container",27),M()),t&2){let e=L().options,n=L();D("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot")),E(2),D("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Yi(4,LM,e.columns))}}function v3t(t,i){if(t&1&&(O(0,"table",28,4),ie(2,m3t,1,0,"ng-container",27),O(3,"thead",29,5),ie(5,h3t,1,0,"ng-container",27),M(),ie(6,f3t,1,7,"tbody",30),be(7,"tbody",31),ie(8,g3t,1,4,"tbody",32)(9,y3t,3,6,"tfoot",33),M()),t&2){let e=i.options,n=L();is(n.tableStyle),Pe(n.cn(n.cx("table"),n.tableStyleClass)),lt("id",n.id+"-table"),E(2),D("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Yi(23,LM,e.columns)),E(),Pe(n.cx("thead")),D("ngStyle",n.sx("thead")),E(2),D("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Yi(25,LM,e.columns)),E(),D("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),E(),is(e.contentStyle),Pe(n.cx("tbody",e.contentStyleClass)),D("value",n.dataToRender(e.rows))("pTableBody",e.columns)("pTableBodyTemplate",n.bodyTemplate||n._bodyTemplate)("scrollerOptions",e),E(),D("ngIf",e.spacerStyle),E(),D("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function b3t(t,i){t&1&&Li(0)}function C3t(t,i){if(t&1&&ie(0,b3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function x3t(t,i){t&1&&ie(0,C3t,1,1,"ng-template",21)}function S3t(t,i){t&1&&Li(0)}function w3t(t,i){if(t&1&&ie(0,S3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function I3t(t,i){t&1&&ie(0,w3t,1,1,"ng-template",22)}function T3t(t,i){t&1&&Li(0)}function E3t(t,i){if(t&1&&ie(0,T3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function A3t(t,i){t&1&&ie(0,E3t,1,1,"ng-template",23)}function D3t(t,i){t&1&&Li(0)}function k3t(t,i){if(t&1&&ie(0,D3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function M3t(t,i){t&1&&ie(0,k3t,1,1,"ng-template",24)}function O3t(t,i){t&1&&Li(0)}function R3t(t,i){if(t&1&&ie(0,O3t,1,0,"ng-container",19),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function P3t(t,i){t&1&&ie(0,R3t,1,1,"ng-template",25)}function N3t(t,i){if(t&1){let e=qe();O(0,"p-paginator",20),te("onPageChange",function(r){se(e);let o=L();return le(o.onPageChange(r))}),ie(1,x3t,1,0,null,14)(2,I3t,1,0,null,14)(3,A3t,1,0,null,14)(4,M3t,1,0,null,14)(5,P3t,1,0,null,14),M()}if(t&2){let e=L();D("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),E(),D("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),E(),D("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),E(),D("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),E(),D("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),E(),D("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function F3t(t,i){t&1&&Li(0)}function L3t(t,i){if(t&1&&(O(0,"div",37),ie(1,F3t,1,0,"ng-container",19),M()),t&2){let e=L();D("ngClass",e.cx("footer")),E(),D("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function B3t(t,i){if(t&1&&be(0,"div",37,7),t&2){let e=L();la("display","none"),D("ngClass",e.cx("columnResizeIndicator"))}}function V3t(t,i){t&1&&(Pi(),be(0,"svg",39))}function z3t(t,i){}function U3t(t,i){t&1&&ie(0,z3t,0,0,"ng-template")}function H3t(t,i){if(t&1&&(O(0,"span",37,8),ie(2,V3t,1,0,"svg",38)(3,U3t,1,0,null,19),M()),t&2){let e=L();la("display","none"),D("ngClass",e.cx("rowReorderIndicatorUp")),E(2),D("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),E(),D("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function G3t(t,i){t&1&&(Pi(),be(0,"svg",41))}function j3t(t,i){}function $3t(t,i){t&1&&ie(0,j3t,0,0,"ng-template")}function q3t(t,i){if(t&1&&(O(0,"span",37,9),ie(2,G3t,1,0,"svg",40)(3,$3t,1,0,null,19),M()),t&2){let e=L();la("display","none"),D("ngClass",e.cx("rowReorderIndicatorDown")),E(2),D("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),E(),D("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var Y3t=["pTableBody",""],T1e=(t,i,e,n,r)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:r}),K3t=(t,i,e,n,r,o,a)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:r,rowgroup:o,rowspan:a}),iae=(t,i,e,n,r,o)=>({$implicit:t,rowIndex:i,columns:e,expanded:n,editing:r,frozen:o}),H9e=(t,i,e,n)=>({$implicit:t,rowIndex:i,columns:e,frozen:n}),G9e=(t,i)=>({$implicit:t,frozen:i});function W3t(t,i){t&1&&Li(0)}function Q3t(t,i){if(t&1&&(fi(0,3),ie(1,W3t,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)("ngTemplateOutletContext",hP(2,T1e,n,o.getRowIndex(r),o.columns,o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function Z3t(t,i){t&1&&Li(0)}function X3t(t,i){if(t&1&&(fi(0),ie(1,Z3t,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",n?o.template:o.dt.loadingBodyTemplate||o.dt._loadingBodyTemplate)("ngTemplateOutletContext",hP(2,T1e,n,o.getRowIndex(r),o.columns,o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function J3t(t,i){t&1&&Li(0)}function eVt(t,i){if(t&1&&(fi(0),ie(1,J3t,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",n?o.template:o.dt.loadingBodyTemplate||o.dt._loadingBodyTemplate)("ngTemplateOutletContext",q0e(2,K3t,n,o.getRowIndex(r),o.columns,o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen,o.shouldRenderRowspan(o.value,n,r),o.calculateRowGroupSize(o.value,n,r)))}}function tVt(t,i){t&1&&Li(0)}function iVt(t,i){if(t&1&&(fi(0,3),ie(1,tVt,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.groupFooterTemplate||o.dt._groupFooterTemplate)("ngTemplateOutletContext",hP(2,T1e,n,o.getRowIndex(r),o.columns,o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function nVt(t,i){if(t&1&&ie(0,Q3t,2,8,"ng-container",2)(1,X3t,2,8,"ng-container",0)(2,eVt,2,10,"ng-container",0)(3,iVt,2,8,"ng-container",2),t&2){let e=i.$implicit,n=i.index,r=L(2);D("ngIf",(r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)&&!r.dt.virtualScroll&&r.dt.rowGroupMode==="subheader"&&r.shouldRenderRowGroupHeader(r.value,e,r.getRowIndex(n))),E(),D("ngIf",r.dt.rowGroupMode!=="rowspan"),E(),D("ngIf",r.dt.rowGroupMode==="rowspan"),E(),D("ngIf",(r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)&&!r.dt.virtualScroll&&r.dt.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,e,r.getRowIndex(n)))}}function rVt(t,i){if(t&1&&(fi(0),ie(1,nVt,4,4,"ng-template",1),gi()),t&2){let e=L();E(),D("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function oVt(t,i){t&1&&Li(0)}function aVt(t,i){if(t&1&&(fi(0),ie(1,oVt,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.template)("ngTemplateOutletContext",KV(2,iae,n,o.getRowIndex(r),o.columns,o.dt.isRowExpanded(n),o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function sVt(t,i){t&1&&Li(0)}function lVt(t,i){if(t&1&&(fi(0,3),ie(1,sVt,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)("ngTemplateOutletContext",KV(2,iae,n,o.getRowIndex(r),o.columns,o.dt.isRowExpanded(n),o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function cVt(t,i){t&1&&Li(0)}function dVt(t,i){t&1&&Li(0)}function uVt(t,i){if(t&1&&(fi(0,3),ie(1,dVt,1,0,"ng-container",4),gi()),t&2){let e=L(2),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.groupFooterTemplate||o.dt._groupFooterTemplate)("ngTemplateOutletContext",KV(2,iae,n,o.getRowIndex(r),o.columns,o.dt.isRowExpanded(n),o.dt.editMode==="row"&&o.dt.isRowEditing(n),o.frozen))}}function pVt(t,i){if(t&1&&(fi(0),ie(1,cVt,1,0,"ng-container",4)(2,uVt,2,9,"ng-container",2),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.expandedRowTemplate||o.dt._expandedRowTemplate)("ngTemplateOutletContext",YV(3,H9e,n,o.getRowIndex(r),o.columns,o.frozen)),E(),D("ngIf",(o.dt.groupFooterTemplate||o.dt._groupFooterTemplate)&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupFooter(o.value,n,o.getRowIndex(r)))}}function mVt(t,i){if(t&1&&ie(0,aVt,2,9,"ng-container",0)(1,lVt,2,9,"ng-container",2)(2,pVt,3,8,"ng-container",0),t&2){let e=i.$implicit,n=i.index,r=L(2);D("ngIf",!(r.dt.groupHeaderTemplate&&r.dt._groupHeaderTemplate)),E(),D("ngIf",(r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)&&r.dt.rowGroupMode==="subheader"&&r.shouldRenderRowGroupHeader(r.value,e,r.getRowIndex(n))),E(),D("ngIf",r.dt.isRowExpanded(e))}}function hVt(t,i){if(t&1&&(fi(0),ie(1,mVt,3,3,"ng-template",1),gi()),t&2){let e=L();E(),D("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function fVt(t,i){t&1&&Li(0)}function gVt(t,i){t&1&&Li(0)}function _Vt(t,i){if(t&1&&(fi(0),ie(1,gVt,1,0,"ng-container",4),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L(2);E(),D("ngTemplateOutlet",o.dt.frozenExpandedRowTemplate||o.dt._frozenExpandedRowTemplate)("ngTemplateOutletContext",YV(2,H9e,n,o.getRowIndex(r),o.columns,o.frozen))}}function yVt(t,i){if(t&1&&ie(0,fVt,1,0,"ng-container",4)(1,_Vt,2,7,"ng-container",0),t&2){let e=i.$implicit,n=i.index,r=L(2);D("ngTemplateOutlet",r.template)("ngTemplateOutletContext",KV(3,iae,e,r.getRowIndex(n),r.columns,r.dt.isRowExpanded(e),r.dt.editMode==="row"&&r.dt.isRowEditing(e),r.frozen)),E(),D("ngIf",r.dt.isRowExpanded(e))}}function vVt(t,i){if(t&1&&(fi(0),ie(1,yVt,2,10,"ng-template",1),gi()),t&2){let e=L();E(),D("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function bVt(t,i){t&1&&Li(0)}function CVt(t,i){if(t&1&&(fi(0),ie(1,bVt,1,0,"ng-container",4),gi()),t&2){let e=L();E(),D("ngTemplateOutlet",e.dt.loadingBodyTemplate||e.dt._loadingBodyTemplate)("ngTemplateOutletContext",na(2,G9e,e.columns,e.frozen))}}function xVt(t,i){t&1&&Li(0)}function SVt(t,i){if(t&1&&(fi(0),ie(1,xVt,1,0,"ng-container",4),gi()),t&2){let e=L();E(),D("ngTemplateOutlet",e.dt.emptyMessageTemplate||e.dt._emptyMessageTemplate)("ngTemplateOutletContext",na(2,G9e,e.columns,e.frozen))}}function wVt(t,i){if(t&1&&(Pi(),be(0,"svg",6)),t&2){let e=L(2);Pe(e.cx("sortableColumnIcon"))}}function IVt(t,i){if(t&1&&(Pi(),be(0,"svg",7)),t&2){let e=L(2);Pe(e.cx("sortableColumnIcon"))}}function TVt(t,i){if(t&1&&(Pi(),be(0,"svg",8)),t&2){let e=L(2);Pe(e.cx("sortableColumnIcon"))}}function EVt(t,i){if(t&1&&(fi(0),ie(1,wVt,1,2,"svg",3)(2,IVt,1,2,"svg",4)(3,TVt,1,2,"svg",5),gi()),t&2){let e=L();E(),D("ngIf",e.sortOrder===0),E(),D("ngIf",e.sortOrder===1),E(),D("ngIf",e.sortOrder===-1)}}function AVt(t,i){}function DVt(t,i){t&1&&ie(0,AVt,0,0,"ng-template")}function kVt(t,i){if(t&1&&(O(0,"span"),ie(1,DVt,1,0,null,9),M()),t&2){let e=L();Pe(e.cx("sortableColumnIcon")),E(),D("ngTemplateOutlet",e.dt.sortIconTemplate||e.dt._sortIconTemplate)("ngTemplateOutletContext",Yi(4,LM,e.sortOrder))}}function MVt(t,i){if(t&1&&be(0,"p-badge",10),t&2){let e=L();Pe(e.cx("sortableColumnBadge")),D("value",e.getBadgeValue())}}function OVt(t,i){}function RVt(t,i){t&1&&ie(0,OVt,0,0,"ng-template")}function PVt(t,i){if(t&1&&ie(0,RVt,1,0,null,2),t&2){let e=L(),n=L();D("ngTemplateOutlet",e)("ngTemplateOutletContext",Yi(2,LM,n.checked))}}function NVt(t,i){t&1&&ie(0,PVt,1,4,"ng-template",1)}function FVt(t,i){}function LVt(t,i){t&1&&ie(0,FVt,0,0,"ng-template")}function BVt(t,i){if(t&1&&ie(0,LVt,1,0,null,2),t&2){let e=L(),n=L();D("ngTemplateOutlet",e)("ngTemplateOutletContext",Yi(2,LM,n.checked))}}function VVt(t,i){t&1&&ie(0,BVt,1,4,"ng-template",1)}var zVt=["filter"],UVt=["filtericon"],HVt=["removeruleicon"],GVt=["addruleicon"],jVt=["clearfiltericon"],$Vt=["clearBtn"],qVt=t=>({hasFilter:t});function YVt(t,i){if(t&1&&be(0,"p-columnFilterFormElement",6),t&2){let e=L();D("type",e.type)("field",e.field),uc("ariaLabel",e.ariaLabel),D("filterConstraint",e.dt.filters[e.field])("filterTemplate",e.filterTemplate||e._filterTemplate)("placeholder",e.placeholder)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits)("prefix",e.prefix)("suffix",e.suffix)("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)("showButtons",e.showButtons)("filterOn",e.filterOn)}}function KVt(t,i){t&1&&(Pi(),be(0,"svg",11))}function WVt(t,i){t&1&&(Pi(),be(0,"svg",12))}function QVt(t,i){}function ZVt(t,i){t&1&&ie(0,QVt,0,0,"ng-template")}function XVt(t,i){if(t&1&&(O(0,"span",13),ie(1,ZVt,1,0,null,14),M()),t&2){let e=L(3);E(),D("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)("ngTemplateOutletContext",Yi(2,qVt,e.hasFilter))}}function JVt(t,i){if(t&1&&(fi(0),ie(1,KVt,1,0,"svg",8)(2,WVt,1,0,"svg",9)(3,XVt,2,4,"span",10),gi()),t&2){let e=L(2);E(),D("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate&&!e.hasFilter),E(),D("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate&&e.hasFilter),E(),D("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function e4t(t,i){if(t&1){let e=qe();O(0,"p-button",7),te("click",function(r){se(e);let o=L();return le(o.toggleMenu(r))})("keydown",function(r){se(e);let o=L();return le(o.onToggleButtonKeyDown(r))}),ie(1,JVt,4,3,"ng-template",null,0,di),M()}if(t&2){let e=L();D("styleClass",e.cx("pcColumnFilterButton")),uc("ariaLabel",e.filterMenuButtonAriaLabel),D("buttonProps",e.filterButtonProps==null?null:e.filterButtonProps.filter),lt("aria-haspopup",!0)("aria-controls",e.overlayVisible?e.overlayId:null)("aria-expanded",e.overlayVisible??!1)}}function t4t(t,i){t&1&&Li(0)}function i4t(t,i){if(t&1){let e=qe();O(0,"li",18),te("click",function(){let r=se(e).$implicit,o=L(3);return le(o.onRowMatchModeChange(r.value))})("keydown",function(r){se(e);let o=L(3);return le(o.onRowMatchModeKeyDown(r))})("keydown.enter",function(){let r=se(e).$implicit,o=L(3);return le(o.onRowMatchModeChange(r.value))}),ee(1),M()}if(t&2){let e=i.$implicit,n=i.index,r=L(3);Pe(r.cx("filterConstraint")),zn("p-datatable-filter-constraint-selected",r.isRowMatchModeSelected(e.value)),lt("tabindex",n===0?"0":null),E(),gn(" ",e.label," ")}}function n4t(t,i){if(t&1){let e=qe();O(0,"ul"),ie(1,i4t,2,6,"li",17),be(2,"li"),O(3,"li",18),te("click",function(){se(e);let r=L(2);return le(r.onRowClearItemClick())})("keydown",function(r){se(e);let o=L(2);return le(o.onRowMatchModeKeyDown(r))})("keydown.enter",function(){se(e);let r=L(2);return le(r.onRowClearItemClick())}),ee(4),M()()}if(t&2){let e=L(2);Pe(e.cx("filterConstraintList")),E(),D("ngForOf",e.matchModes),E(),Pe(e.cx("filterConstraintSeparator")),E(),Pe(e.cx("filterConstraint")),E(),gn(" ",e.noFilterLabel," ")}}function r4t(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-select",24),te("ngModelChange",function(r){se(e);let o=L(3);return le(o.onOperatorChange(r))}),M()()}if(t&2){let e=L(3);Pe(e.cx("filterOperator")),E(),D("options",e.operatorOptions)("ngModel",e.operator)("styleClass",e.cx("pcFilterOperatorDropdown"))}}function o4t(t,i){if(t&1){let e=qe();O(0,"p-select",24),te("ngModelChange",function(r){se(e);let o=L().$implicit,a=L(3);return le(a.onMenuMatchModeChange(r,o))}),M()}if(t&2){let e=L().$implicit,n=L(3);D("options",n.matchModes)("ngModel",e.matchMode)("styleClass",n.cx("pcFilterConstraintDropdown"))}}function a4t(t,i){t&1&&(Pi(),be(0,"svg",32))}function s4t(t,i){}function l4t(t,i){t&1&&ie(0,s4t,0,0,"ng-template")}function c4t(t,i){if(t&1&&ie(0,a4t,1,0,"svg",30)(1,l4t,1,0,null,31),t&2){let e=L(5);D("ngIf",!e.removeRuleIconTemplate&&!e._removeRuleIconTemplate),E(),D("ngTemplateOutlet",e.removeRuleIconTemplate||e._removeRuleIconTemplate)}}function d4t(t,i){if(t&1){let e=qe();O(0,"p-button",29),te("onClick",function(){se(e);let r=L().$implicit,o=L(3);return le(o.removeConstraint(r))}),ie(1,c4t,2,2,"ng-template",null,0,di),M()}if(t&2){let e=L(4);D("styleClass",e.cx("pcFilterRemoveRuleButton"))("text",!0),uc("ariaLabel",e.removeRuleButtonLabel),D("label",e.removeRuleButtonLabel)("buttonProps",e.filterButtonProps==null||e.filterButtonProps.popover==null?null:e.filterButtonProps.popover.removeRule)}}function u4t(t,i){if(t&1&&(O(0,"div",25),ie(1,o4t,1,3,"p-select",26),be(2,"p-columnFilterFormElement",27),O(3,"div"),ie(4,d4t,3,5,"p-button",28),M()()),t&2){let e=i.$implicit,n=L(3);D("ngClass",n.cx("filterRule")),E(),D("ngIf",n.showMatchModes&&n.matchModes),E(),D("type",n.type)("field",n.field)("filterConstraint",e)("filterTemplate",n.filterTemplate||n._filterTemplate)("placeholder",n.placeholder)("minFractionDigits",n.minFractionDigits)("maxFractionDigits",n.maxFractionDigits)("prefix",n.prefix)("suffix",n.suffix)("locale",n.locale)("localeMatcher",n.localeMatcher)("currency",n.currency)("currencyDisplay",n.currencyDisplay)("useGrouping",n.useGrouping)("filterOn",n.filterOn),E(2),D("ngIf",n.showRemoveIcon)}}function p4t(t,i){t&1&&(Pi(),be(0,"svg",35))}function m4t(t,i){}function h4t(t,i){t&1&&ie(0,m4t,0,0,"ng-template")}function f4t(t,i){if(t&1&&ie(0,p4t,1,0,"svg",34)(1,h4t,1,0,null,31),t&2){let e=L(4);D("ngIf",!e.addRuleIconTemplate&&!e._addRuleIconTemplate),E(),D("ngTemplateOutlet",e.addRuleIconTemplate||e._addRuleIconTemplate)}}function g4t(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-button",33),te("onClick",function(){se(e);let r=L(3);return le(r.addConstraint())}),ie(2,f4t,2,2,"ng-template",null,0,di),M()()}if(t&2){let e=L(3);E(),D("label",e.addRuleButtonLabel)("styleClass",e.cx("pcFilterAddRuleButton"))("text",!0)("buttonProps",e.filterButtonProps==null||e.filterButtonProps.popover==null?null:e.filterButtonProps.popover.addRule),lt("aria-label",e.addRuleButtonLabel)}}function _4t(t,i){if(t&1){let e=qe();O(0,"p-button",36,2),te("onClick",function(){se(e);let r=L(3);return le(r.clearFilter())}),M()}if(t&2){let e=L(3);D("outlined",!0)("label",e.clearButtonLabel)("buttonProps",e.filterButtonProps==null||e.filterButtonProps.popover==null?null:e.filterButtonProps.popover.clear),lt("aria-label",e.clearButtonLabel)}}function y4t(t,i){if(t&1){let e=qe();O(0,"p-button",37),te("onClick",function(){se(e);let r=L(3);return le(r.applyFilter())}),M()}if(t&2){let e=L(3);D("label",e.applyButtonLabel)("buttonProps",e.filterButtonProps==null||e.filterButtonProps.popover==null?null:e.filterButtonProps.popover.apply),lt("aria-label",e.applyButtonLabel)}}function v4t(t,i){if(t&1&&(ie(0,r4t,2,5,"div",19),O(1,"div"),ie(2,u4t,5,18,"div",20),M(),ie(3,g4t,4,5,"div",21),O(4,"div"),ie(5,_4t,2,4,"p-button",22)(6,y4t,1,3,"p-button",23),M()),t&2){let e=L(2);D("ngIf",e.isShowOperator),E(),Pe(e.cx("filterRuleList")),E(),D("ngForOf",e.fieldConstraints),E(),D("ngIf",e.isShowAddConstraint),E(),Pe(e.cx("filterButtonbar")),E(),D("ngIf",e.showClearButton),E(),D("ngIf",e.showApplyButton)}}function b4t(t,i){t&1&&Li(0)}function C4t(t,i){if(t&1){let e=qe();O(0,"div",15),te("click",function(){se(e);let r=L();return le(r.onContentClick())})("@overlayAnimation.start",function(r){se(e);let o=L();return le(o.onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){se(e);let o=L();return le(o.onOverlayAnimationEnd(r))})("keydown.escape",function(){se(e);let r=L();return le(r.onEscape())}),ie(1,t4t,1,0,"ng-container",14)(2,n4t,5,8,"ul",16)(3,v4t,7,9,"ng-template",null,1,di)(5,b4t,1,0,"ng-container",14),M()}if(t&2){let e=Oi(4),n=L();Pe(n.cx("filterOverlay")),D("id",n.overlayId)("@overlayAnimation","visible"),lt("aria-modal",!0),E(),D("ngTemplateOutlet",n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Yi(11,LM,n.field)),E(),D("ngIf",n.display==="row")("ngIfElse",e),E(3),D("ngTemplateOutlet",n.footerTemplate||n._footerTemplate)("ngTemplateOutletContext",Yi(13,LM,n.field))}}var x4t=(t,i,e,n,r,o,a,c,m,g,C,w,P,R,z,H)=>({$implicit:t,filterCallback:i,type:e,field:n,filterConstraint:r,placeholder:o,minFractionDigits:a,maxFractionDigits:c,prefix:m,suffix:g,locale:C,localeMatcher:w,currency:P,currencyDisplay:R,useGrouping:z,showButtons:H});function S4t(t,i){t&1&&Li(0)}function w4t(t,i){if(t&1&&(fi(0),ie(1,S4t,1,0,"ng-container",2),gi()),t&2){let e=L();E(),D("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",Rj(2,x4t,[e.filterConstraint.value,e.filterCallback,e.type,e.field,e.filterConstraint,e.placeholder,e.minFractionDigits,e.maxFractionDigits,e.prefix,e.suffix,e.locale,e.localeMatcher,e.currency,e.currencyDisplay,e.useGrouping,e.showButtons]))}}function I4t(t,i){if(t&1){let e=qe();O(0,"input",8),te("input",function(r){se(e);let o=L(2);return le(o.onModelChange(r.target.value))})("keydown.enter",function(r){se(e);let o=L(2);return le(o.onTextInputEnterKeyDown(r))}),M()}if(t&2){let e=L(2);uc("ariaLabel",e.ariaLabel),D("value",e.filterConstraint==null?null:e.filterConstraint.value),lt("placeholder",e.placeholder)}}function T4t(t,i){if(t&1){let e=qe();O(0,"p-inputNumber",9),te("ngModelChange",function(r){se(e);let o=L(2);return le(o.onModelChange(r))})("onKeyDown",function(r){se(e);let o=L(2);return le(o.onNumericInputKeyDown(r))}),M()}if(t&2){let e=L(2);D("ngModel",e.filterConstraint==null?null:e.filterConstraint.value)("showButtons",e.showButtons)("minFractionDigits",e.minFractionDigits)("maxFractionDigits",e.maxFractionDigits),uc("ariaLabel",e.ariaLabel),D("prefix",e.prefix)("suffix",e.suffix)("placeholder",e.placeholder)("mode",e.currency?"currency":"decimal")("locale",e.locale)("localeMatcher",e.localeMatcher)("currency",e.currency)("currencyDisplay",e.currencyDisplay)("useGrouping",e.useGrouping)}}function E4t(t,i){if(t&1){let e=qe();O(0,"p-checkbox",10),te("ngModelChange",function(r){se(e);let o=L(2);return le(o.onModelChange(r))}),M()}if(t&2){let e=L(2);D("indeterminate",(e.filterConstraint==null?null:e.filterConstraint.value)===null)("binary",!0)("ngModel",e.filterConstraint==null?null:e.filterConstraint.value)}}function A4t(t,i){if(t&1){let e=qe();O(0,"p-datepicker",11),te("ngModelChange",function(r){se(e);let o=L(2);return le(o.onModelChange(r))}),M()}if(t&2){let e=L(2);uc("ariaLabel",e.ariaLabel),D("placeholder",e.placeholder)("ngModel",e.filterConstraint==null?null:e.filterConstraint.value)}}function D4t(t,i){if(t&1&&(fi(0,3),ie(1,I4t,1,3,"input",4)(2,T4t,1,14,"p-inputNumber",5)(3,E4t,1,3,"p-checkbox",6)(4,A4t,1,3,"p-datepicker",7),gi()),t&2){let e=L();D("ngSwitch",e.type),E(),D("ngSwitchCase","text"),E(),D("ngSwitchCase","numeric"),E(),D("ngSwitchCase","boolean"),E(),D("ngSwitchCase","date")}}var k4t=` ${B9e} /* 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%; } `,M4t={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"},O4t={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"}},kE=(()=>{class t extends br{name="datatable";theme=k4t;classes=M4t;inlineStyles=O4t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var D5=(()=>{class t{sortSource=new Ai;selectionSource=new Ai;contextMenuSource=new Ai;valueSource=new Ai;columnsSource=new Ai;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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),rc=(()=>{class t extends ur{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,n)=>n;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=Pbe();styleElement;responsiveStyleElement;overlayService=ae(Cv);filterService=ae(Kk);tableService=ae(D5);zone=ae(Pn);_componentStyle=ae(kE);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(),Js(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&&Js(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 n=e||this.processedData;if(n&&this.paginator){let r=this.lazy?0:this.first;return n.slice(r,r+this.rows)}return n}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Ta.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Ta.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 n=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 r=n.metaKey||n.ctrlKey,o=this.getSortMeta(e.field);o?r?o.order=o.order*-1:(this._multiSortMeta=[{field:e.field,order:o.order*-1}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!r||!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,n=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&&n){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:n}):(this.value.sort((o,a)=>{let c=Ta.resolveFieldData(o,e),m=Ta.resolveFieldData(a,e),g=null;return c==null&&m!=null?g=-1:c!=null&&m==null?g=1:c==null&&m==null?g=0:typeof c=="string"&&typeof m=="string"?g=c.localeCompare(m):g=cm?1:0,n*g}),this._value=[...this.value]),this.hasFilter()&&this._filter());let r={field:e,order:n};this.onSort.emit(r),this.tableService.onSort(r)}}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,n)=>this.multisortField(e,n,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,n,r,o){let a=Ta.resolveFieldData(e,r[o].field),c=Ta.resolveFieldData(n,r[o].field);return Ta.compare(a,c,this.filterLocale)===0?r.length-1>o?this.multisortField(e,n,r,o+1):0:this.compareValuesOnSort(a,c,r[o].order)}compareValuesOnSort(e,n,r){return Ta.sort(e,n,r,this.filterLocale,this.sortOrder)}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let n=0;nz!=P),this.selectionChange.emit(this.selection),C&&delete this.selectionKeys[C]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),C&&(this.selectionKeys={},this.selectionKeys[C]=1)):this.isMultipleSelectionMode()&&(w?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),C&&(this.selectionKeys[C]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:c})}else if(this.selectionMode==="single")m?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:c})):(this._selection=a,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:c}),C&&(this.selectionKeys={},this.selectionKeys[C]=1));else if(this.selectionMode==="multiple")if(m){let w=this.findIndexInSelection(a);this._selection=this.selection.filter((P,R)=>R!=w),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:c}),C&&delete this.selectionKeys[C]}else this._selection=this.selection?[...this.selection,a]:[a],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:c}),C&&(this.selectionKeys[C]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let n=e.rowData,r=e.rowIndex;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:n,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(n);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let o=this.isSelected(n),a=this.dataKey?String(Ta.resolveFieldData(n,this.dataKey)):null;if(!o){if(!this.isRowSelectable(n,r))return;this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n),a&&(this.selectionKeys={},this.selectionKeys[a]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),a&&(this.selectionKeys[a]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:n,index:e.rowIndex})}}}selectRange(e,n,r){let o,a;this.anchorRowIndex>n?(o=n,a=this.anchorRowIndex):this.anchorRowIndexa?(n=this.anchorRowIndex,r=this.rangeRowIndex):oP!=g);let C=this.dataKey?String(Ta.resolveFieldData(m,this.dataKey)):null;C&&delete this.selectionKeys[C],this.onRowUnselect.emit({originalEvent:e,data:m,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Ta.resolveFieldData(e,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length){for(let r=0;rm!=a),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),o&&delete this.selectionKeys[o]}else{if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),o&&(this.selectionKeys[o]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox({originalEvent:e},n){if(this._selectAll!==null)this.selectAllChange.emit({originalEvent:e,checked:n});else{let r=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,o=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!r.some(c=>this.equals(a,c))):[];n&&(o=this.frozenValue?[...o,...this.frozenValue,...r]:[...o,...r],o=this.rowSelectable?o.filter((a,c)=>this.rowSelectable({data:a,index:c})):o),this._selection=o,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n}),this.isStateful()&&this.saveState()}}equals(e,n){return this.compareSelectionBy==="equals"?e===n:Ta.equals(e,n,this.dataKey)}filter(e,n,r){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:r},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,n){this.filter(e,"global",n)}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 n=0;nthis.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 n of e)n.value=null;else e&&(e.value=null)}reset(){this.clear()}getExportHeader(e){return e[this.exportHeader]||e.header||e.field}exportCSV(e){let n,r="",o=this.columns;e&&e.selectionOnly?n=this.selection||[]:e&&e.allValues?n=this.value||[]:(n=this.filteredValue||this.value,this.frozenValue&&(n=n?[...this.frozenValue,...n]:this.frozenValue));let a=o.filter(C=>C.exportable!==!1&&C.field);r+=a.map(C=>'"'+this.getExportHeader(C)+'"').join(this.csvSeparator);let c=n.map(C=>a.map(w=>{let P=Ta.resolveFieldData(C,w.field);return P!=null?this.exportFunction?P=this.exportFunction({data:P,field:w.field}):P=String(P).replace(/"/g,'""'):P="",'"'+P+'"'}).join(this.csvSeparator)).join(` `);c.length&&(r+=` `+c);let m=new Blob([new Uint8Array([239,187,191]),r],{type:"text/csv;charset=utf-8;"}),g=this.renderer.createElement("a");g.style.display="none",this.renderer.appendChild(this.document.body,g),g.download!==void 0?(g.setAttribute("href",URL.createObjectURL(m)),g.setAttribute("download",this.exportFilename+".csv"),g.click()):(r="data:text/csv;charset=utf-8,"+r,this.document.defaultView.open(encodeURI(r))),this.renderer.removeChild(this.document.body,g)}onLazyItemLoad(e){this.onLazyLoad.emit($e(pe(pe({},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,n,r,o){this.editingCell=e,this.editingCellData=n,this.editingCellField=r,this.editingCellRowIndex=o,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&eo.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()&&(eo.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 n=String(Ta.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(eo.find(n,".ng-invalid.ng-dirty").length===0){let r=String(Ta.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[r]}}cancelRowEdit(e){let n=String(Ta.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[n]}toggleRow(e,n){if(!this.dataKey&&!this.groupRowsBy)throw new Error("dataKey or groupRowsBy must be defined to use row expansion");let r=this.groupRowsBy?String(Ta.resolveFieldData(e,this.groupRowsBy)):String(Ta.resolveFieldData(e,this.dataKey));this.expandedRowKeys[r]!=null?(delete this.expandedRowKeys[r],this.onRowCollapse.emit({originalEvent:n,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[r]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Ta.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Ta.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Ta.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let n=eo.getOffset(this.el?.nativeElement).left;this.resizeColumnElement=e.target.closest("th"),this.columnResizing=!0,e.type=="touchstart"?this.lastResizerHelperX=e.changedTouches[0].clientX-n+this.el?.nativeElement.scrollLeft:this.lastResizerHelperX=e.pageX-n+this.el?.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let n=eo.getOffset(this.el?.nativeElement).left;eo.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-n+this.el?.nativeElement.scrollLeft+"px":this.resizeHelperViewChild.nativeElement.style.left=e.pageX-n+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild?.nativeElement.offsetLeft-this.lastResizerHelperX,r=this.resizeColumnElement.offsetWidth+e,o=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),a=o?parseFloat(o):15;if(r>=a){if(this.columnResizeMode==="fit"){let m=this.resizeColumnElement.nextElementSibling.offsetWidth-e;r>15&&m>15&&this.resizeTableCells(r,m)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let c=this.tableViewChild?.nativeElement.offsetWidth+e;this.setResizeTableWidth(c+"px"),this.resizeTableCells(r,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",eo.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=eo.findSingle(this.el.nativeElement,".p-datatable-thead");return eo.find(n,"tr > th").forEach(o=>e.push(eo.getOuterWidth(o))),e}onColumnDragStart(e,n){this.reorderIconWidth=eo.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=eo.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let r=eo.getOffset(this.el?.nativeElement),o=eo.getOffset(n);if(this.draggedColumn!=n){let a=eo.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),c=eo.indexWithinGroup(n,"preorderablecolumn"),m=o.left-r.left,g=r.top-o.top,C=o.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=o.top-r.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=o.top-r.top+n.offsetHeight+"px",e.pageX>C?(this.reorderIndicatorUpViewChild.nativeElement.style.left=m+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=m+n.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,n){if(e.preventDefault(),this.draggedColumn){let r=eo.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),o=eo.indexWithinGroup(n,"preorderablecolumn"),a=r!=o;if(a&&(o-r==1&&this.dropPosition===-1||r-o==1&&this.dropPosition===1)&&(a=!1),a&&or&&this.dropPosition===-1&&(o=o-1),a&&(Ta.reorderArray(this.columns,r,o),this.onColReorder.emit({dragIndex:r,dropIndex:o,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.resizableColumns&&this.resizeColumnElement){let c=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();Ta.reorderArray(c,r+1,o+1),this.updateStyleElement(c,r,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,n){let r=eo.index(this.resizeColumnElement),o=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(o,r,e,n)}updateStyleElement(e,n,r,o){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((c,m)=>{let g=m===n?r:o&&m===n+1?o:c,C=`width: ${g}px !important; max-width: ${g}px !important;`;a+=` #${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}) { ${C} } `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,r){if(this.rowDragging&&this.draggedRowIndex!==n){let o=eo.getOffset(r).top,a=e.pageY,c=o+eo.getOuterHeight(r)/2,m=r.previousElementSibling;athis.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Ta.reorderArray(this.value,this.draggedRowIndex,r),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:r})}this.onRowDragLeave(e,n),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(Js(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(),n={};this.paginator&&(n.first=this.first,n.rows=this.rows),this.sortField&&(n.sortField=this.sortField,n.sortOrder=this.sortOrder),this.multiSortMeta&&(n.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(n.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(n),this.reorderableColumns&&this.saveColumnOrder(n),this.selection&&(n.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(n.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(n)),this.onStateSave.emit(n)}clearState(){let e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){let n=this.getStorage().getItem(this.stateKey),r=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,o=function(a,c){return typeof c=="string"&&r.test(c)?new Date(c):c};if(n){let a=JSON.parse(n,o);this.paginator&&(this.first!==void 0&&(this.first=a.first,this.firstChange.emit(this.first)),this.rows!==void 0&&(this.rows=a.rows,this.rowsChange.emit(this.rows))),a.sortField&&(this.restoringSort=!0,this._sortField=a.sortField,this._sortOrder=a.sortOrder),a.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=a.multiSortMeta),a.filters&&(this.restoringFilter=!0,this.filters=a.filters),this.resizableColumns&&(this.columnWidthsState=a.columnWidths,this.tableWidthState=a.tableWidth),a.expandedRowKeys&&(this.expandedRowKeys=a.expandedRowKeys),a.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(a.selection)),this.stateRestored=!0,this.onStateRestore.emit(a)}}saveColumnWidths(e){let n=[],r=[],o=this.el?.nativeElement;o&&(r=eo.find(o,".p-datatable-thead > tr > th")),r.forEach(a=>n.push(eo.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=eo.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"),Ta.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((r,o)=>{let a=`width: ${r}px !important; max-width: ${r}px !important`;n+=` #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${o+1}), #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${o+1}), #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${o+1}) { ${a} } `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(r=>{n.push(r.field||r.key)}),e.columnOrder=n}}restoreColumnOrder(){let n=this.getStorage().getItem(this.stateKey);if(n){let o=JSON.parse(n).columnOrder;if(o){let a=[];o.map(c=>{let m=this.findColumnByKey(c);m&&a.push(m)}),this.columnOrderStateRestored=!0,this.columns=a}}}findColumnByKey(e){if(this.columns){for(let n of this.columns)if(n.key===e||n.field===e)return n}else return null}createStyleElement(){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",eo.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),eo.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(Js(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",eo.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),eo.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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-table"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,V9e,4),Vt(o,ZLt,4),Vt(o,XLt,4),Vt(o,JLt,4),Vt(o,eBt,4),Vt(o,z9e,4),Vt(o,tBt,4),Vt(o,iBt,4),Vt(o,nBt,4),Vt(o,rBt,4),Vt(o,oBt,4),Vt(o,aBt,4),Vt(o,sBt,4),Vt(o,lBt,4),Vt(o,cBt,4),Vt(o,dBt,4),Vt(o,uBt,4),Vt(o,pBt,4),Vt(o,mBt,4),Vt(o,hBt,4),Vt(o,fBt,4),Vt(o,gBt,4),Vt(o,_Bt,4),Vt(o,yBt,4),Vt(o,vBt,4),Vt(o,bBt,4),Vt(o,CBt,4),Vt(o,xBt,4),Vt(o,SBt,4),Vt(o,wBt,4),Vt(o,IBt,4),Vt(o,TBt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r._headerTemplate=a.first),ze(a=Ue())&&(r._headerGroupedTemplate=a.first),ze(a=Ue())&&(r._bodyTemplate=a.first),ze(a=Ue())&&(r._loadingBodyTemplate=a.first),ze(a=Ue())&&(r._captionTemplate=a.first),ze(a=Ue())&&(r._footerTemplate=a.first),ze(a=Ue())&&(r._footerGroupedTemplate=a.first),ze(a=Ue())&&(r._summaryTemplate=a.first),ze(a=Ue())&&(r._colGroupTemplate=a.first),ze(a=Ue())&&(r._expandedRowTemplate=a.first),ze(a=Ue())&&(r._groupHeaderTemplate=a.first),ze(a=Ue())&&(r._groupFooterTemplate=a.first),ze(a=Ue())&&(r._frozenExpandedRowTemplate=a.first),ze(a=Ue())&&(r._frozenHeaderTemplate=a.first),ze(a=Ue())&&(r._frozenBodyTemplate=a.first),ze(a=Ue())&&(r._frozenFooterTemplate=a.first),ze(a=Ue())&&(r._frozenColGroupTemplate=a.first),ze(a=Ue())&&(r._emptyMessageTemplate=a.first),ze(a=Ue())&&(r._paginatorLeftTemplate=a.first),ze(a=Ue())&&(r._paginatorRightTemplate=a.first),ze(a=Ue())&&(r._paginatorDropdownItemTemplate=a.first),ze(a=Ue())&&(r._loadingIconTemplate=a.first),ze(a=Ue())&&(r._reorderIndicatorUpIconTemplate=a.first),ze(a=Ue())&&(r._reorderIndicatorDownIconTemplate=a.first),ze(a=Ue())&&(r._sortIconTemplate=a.first),ze(a=Ue())&&(r._checkboxIconTemplate=a.first),ze(a=Ue())&&(r._headerCheckboxIconTemplate=a.first),ze(a=Ue())&&(r._paginatorDropdownIconTemplate=a.first),ze(a=Ue())&&(r._paginatorFirstPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorLastPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorPreviousPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorNextPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(EBt,5),Xi(ABt,5),Xi(DBt,5),Xi(kBt,5),Xi(MBt,5),Xi(OBt,5),Xi(RBt,5),Xi(PBt,5)),n&2){let o;ze(o=Ue())&&(r.resizeHelperViewChild=o.first),ze(o=Ue())&&(r.reorderIndicatorUpViewChild=o.first),ze(o=Ue())&&(r.reorderIndicatorDownViewChild=o.first),ze(o=Ue())&&(r.wrapperViewChild=o.first),ze(o=Ue())&&(r.tableViewChild=o.first),ze(o=Ue())&&(r.tableHeaderViewChild=o.first),ze(o=Ue())&&(r.tableFooterViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.styleClass))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",Je],pageLinks:[2,"pageLinks","pageLinks",En],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",En],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",En],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",En],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",En],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",En],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:[Ii([D5,kE]),Tt,Yt],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(n,r){n&1&&(ie(0,GBt,3,4,"div",10)(1,$Bt,2,3,"div",10)(2,s3t,6,24,"p-paginator",11),O(3,"div",12,0),ie(5,d3t,4,17,"p-scroller",13)(6,p3t,2,7,"ng-container",14)(7,v3t,10,27,"ng-template",null,1,di),M(),ie(9,N3t,6,24,"p-paginator",11)(10,L3t,2,2,"div",15)(11,B3t,2,3,"div",16)(12,H3t,4,5,"span",16)(13,q3t,4,5,"span",16)),n&2&&(D("ngIf",r.loading&&r.showLoader),E(),D("ngIf",r.captionTemplate||r._captionTemplate),E(),D("ngIf",r.paginator&&(r.paginatorPosition==="top"||r.paginatorPosition=="both")),E(),Pe(r.cx("tableContainer")),D("ngStyle",r.sx("tableContainer")),E(2),D("ngIf",r.virtualScroll),E(),D("ngIf",!r.virtualScroll),E(3),D("ngIf",r.paginator&&(r.paginatorPosition==="bottom"||r.paginatorPosition=="both")),E(),D("ngIf",r.summaryTemplate||r._summaryTemplate),E(),D("ngIf",r.resizableColumns),E(),D("ngIf",r.reorderableColumns),E(),D("ngIf",r.reorderableColumns))},dependencies:()=>[qa,Xr,Jr,Xs,j$,Tr,ey,B4,V4,W_,R4t],encapsulation:2})}return t})(),R4t=(()=>{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,n,r,o){this.dt=e,this.tableService=n,this.cd=r,this.el=o,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}shouldRenderRowGroupHeader(e,n,r){let o=Ta.resolveFieldData(n,this.dt.groupRowsBy),a=e[r-this.dt._first-1];if(a){let c=Ta.resolveFieldData(a,this.dt.groupRowsBy);return o!==c}else return!0}shouldRenderRowGroupFooter(e,n,r){let o=Ta.resolveFieldData(n,this.dt.groupRowsBy),a=e[r-this.dt._first+1];if(a){let c=Ta.resolveFieldData(a,this.dt.groupRowsBy);return o!==c}else return!0}shouldRenderRowspan(e,n,r){let o=Ta.resolveFieldData(n,this.dt.groupRowsBy),a=e[r-1];if(a){let c=Ta.resolveFieldData(a,this.dt.groupRowsBy);return o!==c}else return!0}calculateRowGroupSize(e,n,r){let o=Ta.resolveFieldData(n,this.dt.groupRowsBy),a=o,c=0;for(;o===a;){c++;let m=e[++r];if(m)a=Ta.resolveFieldData(m,this.dt.groupRowsBy);else break}return c===1?null:c}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=eo.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=eo.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}getScrollerOption(e,n){return this.dt.virtualScroll?(n=n||this.scrollerOptions,n?n[e]:null):null}getRowIndex(e){let n=this.dt.paginator?this.dt.first+e:e,r=this.getScrollerOption("getItemOptions");return r?r(n).index:n}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(D5),xe(dn),xe(qn))};static \u0275cmp=re({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:Y3t,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&ie(0,rVt,2,2,"ng-container",0)(1,hVt,2,2,"ng-container",0)(2,vVt,2,2,"ng-container",0)(3,CVt,2,5,"ng-container",0)(4,SVt,2,5,"ng-container",0),n&2&&(D("ngIf",!r.dt.expandedRowTemplate&&!r.dt._expandedRowTemplate),E(),D("ngIf",(r.dt.expandedRowTemplate||r.dt._expandedRowTemplate)&&!(r.frozen&&(r.dt.frozenExpandedRowTemplate||r.dt._frozenExpandedRowTemplate))),E(),D("ngIf",(r.dt.frozenExpandedRowTemplate||r.dt._frozenExpandedRowTemplate)&&r.frozen),E(),D("ngIf",r.dt.loading),E(),D("ngIf",r.dt.isEmpty()&&!r.dt.loading))},dependencies:[Vl,Xr,Jr],encapsulation:2})}return t})();var aC=(()=>{class t extends ur{dt;#e=ae(qn);field;pSortableColumnDisabled;role=this.#e.nativeElement?.tagName!=="TH"?"columnheader":null;sorted;sortOrder;subscription;_componentStyle=ae(kE);constructor(e){super(),this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(n=>{this.updateSortState()}))}ngOnInit(){super.ngOnInit(),this.isEnabled()&&this.updateSortState()}updateSortState(){let e=!1,n=0;if(this.dt.sortMode==="single")e=this.dt.isSorted(this.field),n=this.dt.sortOrder;else if(this.dt.sortMode==="multiple"){let r=this.dt.getSortMeta(this.field);e=!!r,n=r?r.order:0}this.sorted=e,this.sortOrder=e?n===1?"ascending":"descending":"none"}onClick(e){this.isEnabled()&&!this.isFilterElement(e.target)&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),eo.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 eo.hasClass(e,"pi-filter-icon")||eo.hasClass(e,"p-column-filter-menu-button")}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(rc))};static \u0275dir=hn({type:t,selectors:[["","pSortableColumn",""]],hostVars:5,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onClick(a)})("keydown.space",function(a){return r.onEnterKey(a)})("keydown.enter",function(a){return r.onEnterKey(a)}),n&2&&(sa("tabIndex",r.isEnabled()?"0":null)("role","columnheader"),lt("aria-sort",r.sortOrder),Pe(r.cx("sortableColumn")))},inputs:{field:[0,"pSortableColumn","field"],pSortableColumnDisabled:[2,"pSortableColumnDisabled","pSortableColumnDisabled",Je]},standalone:!1,features:[Ii([kE]),Tt]})}return t})(),sC=(()=>{class t extends ur{dt;cd;field;subscription;sortOrder;_componentStyle=ae(kE);constructor(e,n){super(),this.dt=e,this.cd=n,this.subscription=this.dt.tableService.sortSource$.subscribe(r=>{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,n=-1;if(e&&this.dt.sortMode==="multiple"&&this.dt.showInitialSortBadge&&e.length>1)for(let r=0;r-1?e:e+1}isMultiSorted(){return this.dt.sortMode==="multiple"&&this.getMultiSortMetaIndex()>-1}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(dn))};static \u0275cmp=re({type:t,selectors:[["p-sortIcon"]],inputs:{field:"field"},standalone:!1,features:[Ii([kE]),Tt],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(n,r){n&1&&ie(0,EVt,4,3,"ng-container",0)(1,kVt,2,6,"span",1)(2,MVt,1,3,"p-badge",2),n&2&&(D("ngIf",!(r.dt.sortIconTemplate||r.dt._sortIconTemplate)),E(),D("ngIf",r.dt.sortIconTemplate||r.dt._sortIconTemplate),E(),D("ngIf",r.isMultiSorted()))},dependencies:()=>[Xr,Jr,JT,X7,e9,J7],encapsulation:2,changeDetection:0})}return t})(),nae=(()=>{class t extends ur{dt;tableService;data;index;pSelectableRowDisabled;selected;subscription;_componentStyle=ae(kE);constructor(e,n){super(),this.dt=e,this.tableService=n,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 n=this.dt.dataToRender(this.dt.processedData);this.dt.selection=[...n],this.dt.selectRange(e,n.length-1,!0),e.preventDefault()}break}}onArrowDownKey(e){if(!this.isEnabled())return;let n=e.currentTarget,r=this.findNextSelectableRow(n);r&&r.focus(),e.preventDefault()}onArrowUpKey(e){if(!this.isEnabled())return;let n=e.currentTarget,r=this.findPrevSelectableRow(n);r&&r.focus(),e.preventDefault()}onEnterKey(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onEndKey(e){let n=this.findLastSelectableRow();if(n&&this.focusRowChange(this.el.nativeElement,n),e.ctrlKey&&e.shiftKey){let r=this.dt.dataToRender(this.dt.rows),o=eo.getAttribute(n,"index");this.dt.anchorRowIndex=o,this.dt.selection=r.slice(this.index,r.length),this.dt.selectRange(e,this.index)}e.preventDefault()}onHomeKey(e){let n=this.findFirstSelectableRow();if(n&&this.focusRowChange(this.el.nativeElement,n),e.ctrlKey&&e.shiftKey){let r=this.dt.dataToRender(this.dt.rows),o=eo.getAttribute(n,"index");this.dt.anchorRowIndex=this.dt.anchorRowIndex||o,this.dt.selection=r.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 r=this.dt.dataToRender(this.dt.rows),o;if(Ta.isNotEmpty(this.dt.selection)&&this.dt.selection.length>0){let a,c;a=Ta.findIndexInList(this.dt.selection[0],r),c=Ta.findIndexInList(this.dt.selection[this.dt.selection.length-1],r),o=this.index<=a?c:a}else o=Ta.findIndexInList(this.dt.selection,r);this.dt.anchorRowIndex=o,this.dt.selection=o!==this.index?r.slice(Math.min(o,this.index),Math.max(o,this.index)+1):[this.data],this.dt.selectRange(e,this.index)}e.preventDefault()}}focusRowChange(e,n){e.tabIndex="-1",n.tabIndex="0",eo.focus(n)}findLastSelectableRow(){let e=eo.find(this.dt.el.nativeElement,".p-datatable-selectable-row");return e?e[e.length-1]:null}findFirstSelectableRow(){return eo.findSingle(this.dt.el.nativeElement,".p-datatable-selectable-row")}findNextSelectableRow(e){let n=e.nextElementSibling;return n?eo.hasClass(n,"p-datatable-selectable-row")?n:this.findNextSelectableRow(n):null}findPrevSelectableRow(e){let n=e.previousElementSibling;return n?eo.hasClass(n,"p-datatable-selectable-row")?n:this.findPrevSelectableRow(n):null}isEnabled(){return this.pSelectableRowDisabled!==!0}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(D5))};static \u0275dir=hn({type:t,selectors:[["","pSelectableRow",""]],hostVars:4,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onClick(a)})("touchend",function(a){return r.onTouchEnd(a)})("keydown",function(a){return r.onKeyDown(a)}),n&2&&(sa("tabIndex",r.setRowTabIndex()),lt("data-p-selectable-row",!0),Pe(r.cx("selectableRow")))},inputs:{data:[0,"pSelectableRow","data"],index:[0,"pSelectableRowIndex","index"],pSelectableRowDisabled:[2,"pSelectableRowDisabled","pSelectableRowDisabled",Je]},standalone:!1,features:[Ii([kE]),Tt]})}return t})();var Mw=(()=>{class t{dt;tableService;cd;value;disabled=kr(void 0,{transform:Je});required=kr(void 0,{transform:Je});index=kr(void 0,{transform:En});inputId=kr();name=kr();ariaLabel;checked;subscription;constructor(e,n,r){this.dt=e,this.tableService=n,this.cd=r,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),eo.clearSelection()}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(D5),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"p-checkbox",0),jf("ngModelChange",function(a){return Fg(r.checked,a)||(r.checked=a),a}),te("onChange",function(a){return r.onClick(a)}),yt(1,NVt,1,0,null,1),M()),n&2){let o;Gf("ngModel",r.checked),D("binary",!0)("required",r.required())("disabled",r.disabled())("inputId",r.inputId())("name",r.name()),uc("ariaLabel",r.ariaLabel),E(),vt((o=r.dt.checkboxIconTemplate||r.dt._checkboxIconTemplate)?1:-1,o)}},dependencies:[Jr,Tr,yr,Bx,ya,qg],encapsulation:2,changeDetection:0})}return t})(),Ow=(()=>{class t{dt;tableService;cd;disabled=kr(void 0,{transform:Je});inputId=kr();name=kr();ariaLabel;checked;selectionChangeSubscription;valueChangeSubscription;constructor(e,n,r){this.dt=e,this.tableService=n,this.cd=r,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),eo.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,n=this.dt.frozenValue?[...this.dt.frozenValue,...e]:e,r=this.dt.rowSelectable?n.filter((o,a)=>this.dt.rowSelectable({data:o,index:a})):n;return Ta.isNotEmpty(r)&&Ta.isNotEmpty(this.dt.selection)&&r.every(o=>this.dt.selection.some(a=>this.dt.equals(o,a)))}}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(D5),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"p-checkbox",0),jf("ngModelChange",function(a){return Fg(r.checked,a)||(r.checked=a),a}),te("onChange",function(a){return r.onClick(a)}),yt(1,VVt,1,0,null,1),M()),n&2){let o;Gf("ngModel",r.checked),D("binary",!0)("disabled",r.isDisabled())("inputId",r.inputId())("name",r.name()),uc("ariaLabel",r.ariaLabel),E(),vt((o=r.dt.headerCheckboxIconTemplate||r.dt._headerCheckboxIconTemplate)?1:-1,o)}},dependencies:[Jr,Tr,yr,ya,qg],encapsulation:2,changeDetection:0})}return t})();var E1e=(()=>{class t extends ur{field;type="text";display="row";showMenu=!0;matchMode;operator=O4.AND;showOperator=!0;showClearButton=!0;showApplyButton=!0;showMatchModes=!0;showAddButton=!0;hideOnClear=!0;placeholder;matchModeOptions;maxConstraints=2;minFractionDigits;maxFractionDigits;prefix;suffix;locale;localeMatcher;currency;currencyDisplay;filterOn="enter";useGrouping=!0;showButtons=!0;ariaLabel;filterButtonProps={filter:{severity:"secondary",text:!0,rounded:!0},inline:{clear:{severity:"secondary",text:!0,rounded:!0}},popover:{addRule:{severity:"info",text:!0,size:"small"},removeRule:{severity:"danger",text:!0,size:"small"},apply:{size:"small"},clear:{outlined:!0,size:"small"}}};onShow=new ve;onHide=new ve;icon;clearButtonViewChild;_templates;overlaySubscription;headerTemplate;_headerTemplate;filterTemplate;_filterTemplate;footerTemplate;_footerTemplate;filterIconTemplate;_filterIconTemplate;removeRuleIconTemplate;_removeRuleIconTemplate;addRuleIconTemplate;_addRuleIconTemplate;clearFilterIconTemplate;_clearFilterIconTemplate;operatorOptions;overlayVisible;overlay;scrollHandler;documentClickListener;documentResizeListener;matchModes;translationSubscription;resetSubscription;selfClick;overlayEventListener;overlayId;get fieldConstraints(){return this.dt.filters?this.dt.filters[this.field]:null}get showRemoveIcon(){return this.fieldConstraints?this.fieldConstraints.length>1:!1}get showMenuButton(){return this.showMenu&&(this.display==="row"?this.type!=="boolean":!0)}get isShowOperator(){return this.showOperator&&this.type!=="boolean"}get isShowAddConstraint(){return this.showAddButton&&this.type!=="boolean"&&this.fieldConstraints&&this.fieldConstraints.lengthrc));ngOnInit(){super.ngOnInit(),this.overlayId=Pbe(),this.dt.filters[this.field]||this.initFieldFilterConstraint(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.generateMatchModeOptions(),this.generateOperatorOptions()}),this.generateMatchModeOptions(),this.generateOperatorOptions()}generateMatchModeOptions(){this.matchModes=this.matchModeOptions||this.config.filterMatchModeOptions[this.type]?.map(e=>({label:this.config.getTranslation(e),value:e}))}generateOperatorOptions(){this.operatorOptions=[{label:this.config.getTranslation(xs.MATCH_ALL),value:O4.AND},{label:this.config.getTranslation(xs.MATCH_ANY),value:O4.OR}]}ngAfterContentInit(){this._templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"clearfiltericon":this._clearFilterIconTemplate=e.template;break;case"removeruleicon":this._removeRuleIconTemplate=e.template;break;case"addruleicon":this._addRuleIconTemplate=e.template;break;default:this._filterTemplate=e.template;break}})}initFieldFilterConstraint(){let e=this.getDefaultMatchMode();this.dt.filters[this.field]=this.display=="row"?{value:null,matchMode:e}:[{value:null,matchMode:e,operator:this.operator}]}onMenuMatchModeChange(e,n){n.matchMode=e,this.showApplyButton||this.dt._filter()}onRowMatchModeChange(e){let n=this.dt.filters[this.field];n.matchMode=e,n.value&&this.dt._filter(),this.hide()}onRowMatchModeKeyDown(e){let n=e.target;switch(e.key){case"ArrowDown":var r=this.findNextItem(n);r&&(n.removeAttribute("tabindex"),r.tabIndex="0",r.focus()),e.preventDefault();break;case"ArrowUp":var o=this.findPrevItem(n);o&&(n.removeAttribute("tabindex"),o.tabIndex="0",o.focus()),e.preventDefault();break}}onRowClearItemClick(){this.clearFilter(),this.hide()}isRowMatchModeSelected(e){return this.dt.filters[this.field].matchMode===e}addConstraint(){this.dt.filters[this.field].push({value:null,matchMode:this.getDefaultMatchMode(),operator:this.getDefaultOperator()}),eo.focus(this.clearButtonViewChild.nativeElement)}removeConstraint(e){this.dt.filters[this.field]=this.dt.filters[this.field].filter(n=>n!==e),this.showApplyButton||this.dt._filter(),eo.focus(this.clearButtonViewChild.nativeElement)}onOperatorChange(e){this.dt.filters[this.field].forEach(n=>{n.operator=e,this.operator=e}),this.showApplyButton||this.dt._filter()}toggleMenu(e){this.overlayVisible=!this.overlayVisible,e.stopPropagation()}onToggleButtonKeyDown(e){switch(e.key){case"Escape":case"Tab":this.overlayVisible=!1;break;case"ArrowDown":if(this.overlayVisible){let n=eo.getFocusableElements(this.overlay);n&&n[0].focus(),e.preventDefault()}else e.altKey&&(this.overlayVisible=!0,e.preventDefault());break;case"Enter":this.toggleMenu(e),e.preventDefault();break}}onEscape(){this.overlayVisible=!1,this.icon?.nativeElement.focus()}findNextItem(e){let n=e.nextElementSibling;return n?eo.hasClass(n,"p-datatable-filter-constraint-separator")?this.findNextItem(n):n:e.parentElement?.firstElementChild}findPrevItem(e){let n=e.previousElementSibling;return n?eo.hasClass(n,"p-datatable-filter-constraint-separator")?this.findPrevItem(n):n:e.parentElement?.lastElementChild}onContentClick(){this.selfClick=!0}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.overlay=e.element,this.renderer.appendChild(this.document.body,this.overlay),Fd.set("overlay",this.overlay,this.config.zIndex.overlay),eo.absolutePosition(this.overlay,this.icon?.nativeElement),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.overlayEventListener=n=>{this.overlay&&this.overlay.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit({originalEvent:e});break;case"void":this.onOverlayHide(),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break}}onOverlayAnimationEnd(e){switch(e.toState){case"visible":this.focusOnFirstElement();break;case"void":Fd.clear(e.element),this.onHide.emit({originalEvent:e});break}}focusOnFirstElement(){this.overlay&&eo.focus(eo.getFirstFocusableElement(this.overlay,""))}getDefaultMatchMode(){return this.matchMode?this.matchMode:this.type==="text"?Ju.STARTS_WITH:this.type==="numeric"?Ju.EQUALS:this.type==="date"?Ju.DATE_IS:Ju.CONTAINS}getDefaultOperator(){return this.dt.filters?this.dt.filters[this.field][0].operator:this.operator}hasRowFilter(){return this.dt.filters[this.field]&&!this.dt.isFilterBlank(this.dt.filters[this.field].value)}get hasFilter(){let e=this.dt.filters[this.field];return e?Array.isArray(e)?!this.dt.isFilterBlank(e[0].value):!this.dt.isFilterBlank(e.value):!1}isOutsideClicked(e){return!(eo.hasClass(this.overlay?.nextElementSibling,"p-overlay")||eo.hasClass(this.overlay?.nextElementSibling,"p-popover")||this.overlay?.isSameNode(e.target)||this.overlay?.contains(e.target)||this.icon?.nativeElement.isSameNode(e.target)||this.icon?.nativeElement.contains(e.target)||eo.hasClass(e.target,"p-datatable-filter-add-rule-button")||eo.hasClass(e.target.parentElement,"p-datatable-filter-add-rule-button")||eo.hasClass(e.target,"p-datatable-filter-remove-rule-button")||eo.hasClass(e.target.parentElement,"p-datatable-filter-remove-rule-button"))}bindDocumentClickListener(){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{let r=document.querySelectorAll('[role="dialog"]'),o=n.target.closest(".p-datatable-column-filter-button");this.overlayVisible&&this.isOutsideClicked(n)&&(o||r?.length<=1)&&this.hide(),this.selfClick=!1})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.overlayVisible&&!eo.isTouchDevice()&&this.hide()}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ub(this.icon?.nativeElement,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onOverlayHide(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}clearFilter(){this.initFieldFilterConstraint(),this.dt._filter(),this.hideOnClear&&this.hide()}applyFilter(){this.dt._filter(),this.hide()}ngOnDestroy(){this.overlay&&(this.renderer.appendChild(this.el.nativeElement,this.overlay),Fd.clear(this.overlay),this.onOverlayHide()),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.resetSubscription&&this.resetSubscription.unsubscribe(),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-columnFilter"],["p-column-filter"],["p-columnfilter"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,V9e,4),Vt(o,zVt,4),Vt(o,z9e,4),Vt(o,UVt,4),Vt(o,HVt,4),Vt(o,GVt,4),Vt(o,jVt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.filterTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.filterIconTemplate=a.first),ze(a=Ue())&&(r.removeRuleIconTemplate=a.first),ze(a=Ue())&&(r.addRuleIconTemplate=a.first),ze(a=Ue())&&(r.clearFilterIconTemplate=a.first),ze(a=Ue())&&(r._templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(Yl,5,qn),Xi($Vt,5)),n&2){let o;ze(o=Ue())&&(r.icon=o.first),ze(o=Ue())&&(r.clearButtonViewChild=o.first)}},inputs:{field:"field",type:"type",display:"display",showMenu:[2,"showMenu","showMenu",Je],matchMode:"matchMode",operator:"operator",showOperator:[2,"showOperator","showOperator",Je],showClearButton:[2,"showClearButton","showClearButton",Je],showApplyButton:[2,"showApplyButton","showApplyButton",Je],showMatchModes:[2,"showMatchModes","showMatchModes",Je],showAddButton:[2,"showAddButton","showAddButton",Je],hideOnClear:[2,"hideOnClear","hideOnClear",Je],placeholder:"placeholder",matchModeOptions:"matchModeOptions",maxConstraints:[2,"maxConstraints","maxConstraints",En],minFractionDigits:[2,"minFractionDigits","minFractionDigits",e=>En(e,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>En(e,null)],prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",filterOn:"filterOn",useGrouping:[2,"useGrouping","useGrouping",Je],showButtons:[2,"showButtons","showButtons",Je],ariaLabel:"ariaLabel",filterButtonProps:"filterButtonProps"},outputs:{onShow:"onShow",onHide:"onHide"},standalone:!1,features:[Tt],decls:4,vars:5,consts:[["icon",""],["menu",""],["clearBtn",""],["class","p-fluid",3,"type","field","ariaLabel","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping","showButtons","filterOn",4,"ngIf"],[3,"styleClass","ariaLabel","buttonProps","click","keydown",4,"ngIf"],["role","dialog",3,"class","id","click","keydown.escape",4,"ngIf"],[1,"p-fluid",3,"type","field","ariaLabel","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping","showButtons","filterOn"],[3,"click","keydown","styleClass","ariaLabel","buttonProps"],["data-p-icon","filter",4,"ngIf"],["data-p-icon","filter-fill",4,"ngIf"],["class","pi-filter-icon",4,"ngIf"],["data-p-icon","filter"],["data-p-icon","filter-fill"],[1,"pi-filter-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","dialog",3,"click","keydown.escape","id"],[3,"class",4,"ngIf","ngIfElse"],[3,"class","p-datatable-filter-constraint-selected","click","keydown","keydown.enter",4,"ngFor","ngForOf"],[3,"click","keydown","keydown.enter"],[3,"class",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[4,"ngIf"],[3,"outlined","label","buttonProps","onClick",4,"ngIf"],["size","small",3,"label","buttonProps","onClick",4,"ngIf"],[3,"ngModelChange","options","ngModel","styleClass"],[3,"ngClass"],[3,"options","ngModel","styleClass","ngModelChange",4,"ngIf"],[3,"type","field","filterConstraint","filterTemplate","placeholder","minFractionDigits","maxFractionDigits","prefix","suffix","locale","localeMatcher","currency","currencyDisplay","useGrouping","filterOn"],["severity","danger","size","small",3,"styleClass","text","ariaLabel","label","buttonProps","onClick",4,"ngIf"],["severity","danger","size","small",3,"onClick","styleClass","text","ariaLabel","label","buttonProps"],["data-p-icon","trash",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","trash"],["type","button","size","small",3,"onClick","label","styleClass","text","buttonProps"],["data-p-icon","plus",4,"ngIf"],["data-p-icon","plus"],[3,"onClick","outlined","label","buttonProps"],["size","small",3,"onClick","label","buttonProps"]],template:function(n,r){n&1&&(O(0,"div"),ie(1,YVt,1,17,"p-columnFilterFormElement",3)(2,e4t,3,6,"p-button",4)(3,C4t,6,15,"div",5),M()),n&2&&(Pe(r.cx("filter")),E(),D("ngIf",r.display==="row"),E(),D("ngIf",r.showMenuButton),E(),D("ngIf",r.showMenu&&r.overlayVisible))},dependencies:()=>[qa,Vl,Xr,Jr,Us,yr,ya,Yl,kbe,w1e,Z7,Mbe,P4t],encapsulation:2,data:{animation:[Wp("overlayAnimation",[Oc(":enter",[ul({opacity:0,transform:"scaleY(0.8)"}),Jl(".12s cubic-bezier(0, 0, 0.2, 1)")]),Oc(":leave",[Jl(".1s linear",ul({opacity:0}))])])]}})}return t})(),P4t=(()=>{class t{dt;colFilter;field;type;filterConstraint;filterTemplate;placeholder;minFractionDigits;maxFractionDigits;prefix;suffix;locale;localeMatcher;currency;currencyDisplay;useGrouping=!0;ariaLabel;filterOn;get showButtons(){return this.colFilter.showButtons}filterCallback;constructor(e,n){this.dt=e,this.colFilter=n}ngOnInit(){this.filterCallback=e=>{this.filterConstraint.value=e,this.dt._filter()}}onModelChange(e){this.filterConstraint.value=e,(this.type==="date"||this.type==="boolean"||(this.type==="text"||this.type==="numeric")&&this.filterOn==="input"||!e)&&this.dt._filter()}onTextInputEnterKeyDown(e){this.dt._filter(),e.preventDefault()}onNumericInputKeyDown(e){e.key==="Enter"&&(this.dt._filter(),e.preventDefault())}static \u0275fac=function(n){return new(n||t)(xe(rc),xe(E1e))};static \u0275cmp=re({type:t,selectors:[["p-columnFilterFormElement"]],inputs:{field:"field",type:"type",filterConstraint:"filterConstraint",filterTemplate:"filterTemplate",placeholder:"placeholder",minFractionDigits:[2,"minFractionDigits","minFractionDigits",e=>En(e,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>En(e,null)],prefix:"prefix",suffix:"suffix",locale:"locale",localeMatcher:"localeMatcher",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:[2,"useGrouping","useGrouping",Je],ariaLabel:"ariaLabel",filterOn:"filterOn"},standalone:!1,decls:3,vars:2,consts:[["builtInElement",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["type","text","pInputText","",3,"ariaLabel","value","input","keydown.enter",4,"ngSwitchCase"],[3,"ngModel","showButtons","minFractionDigits","maxFractionDigits","ariaLabel","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping","ngModelChange","onKeyDown",4,"ngSwitchCase"],[3,"indeterminate","binary","ngModel","ngModelChange",4,"ngSwitchCase"],["appendTo","body",3,"ariaLabel","placeholder","ngModel","ngModelChange",4,"ngSwitchCase"],["type","text","pInputText","",3,"input","keydown.enter","ariaLabel","value"],[3,"ngModelChange","onKeyDown","ngModel","showButtons","minFractionDigits","maxFractionDigits","ariaLabel","prefix","suffix","placeholder","mode","locale","localeMatcher","currency","currencyDisplay","useGrouping"],[3,"ngModelChange","indeterminate","binary","ngModel"],["appendTo","body",3,"ngModelChange","ariaLabel","placeholder","ngModel"]],template:function(n,r){if(n&1&&ie(0,w4t,2,19,"ng-container",1)(1,D4t,5,5,"ng-template",null,0,di),n&2){let o=Oi(2);D("ngIf",r.filterTemplate)("ngIfElse",o)}},dependencies:[Xr,Jr,Kee,Eye,_p,yr,ya,az,U4,qg],encapsulation:2})}return t})(),Td=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[kE],imports:[rr,tae,ow,ere,ra,n8e,L9e,NHe,H6e,H4,S9e,tCe,B4,V4,W_,X7,e9,J7,kbe,w1e,R6e,Z7,Mbe,k9e,Un,tCe]})}return t})();var N4t=()=>[5,10,25,50],F4t=()=>["oid","displayName","mail"],j9e=t=>["/users",t];function L4t(t,i){if(t&1){let e=qe();O(0,"div",5)(1,"div",6)(2,"bd-search-box",7),te("searchChange",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.trim(),"contains"))}),M()(),O(3,"div",6)(4,"p-button",8),te("click",function(){se(e);let r=L();return le(r.addUserToGroup(r.selection.selected))}),M()()()}if(t&2){let e=L();E(4),D("disabled",e.selection.isEmpty())("label",e.selection.selected.length+" Nutzer hinzuf\xFCgen")}}function B4t(t,i){t&1&&(O(0,"tr")(1,"th",9),be(2,"p-tableHeaderCheckbox"),M(),O(3,"th",10),ee(4," Name "),be(5,"p-sortIcon",11),M(),O(6,"th",12),ee(7," Id "),be(8,"p-sortIcon",13),M(),O(9,"th",14),ee(10," Email "),be(11,"p-sortIcon",15),M(),O(12,"th",16),ee(13," Type "),be(14,"p-sortIcon",17),M(),O(15,"th",18),ee(16," Sperrung "),be(17,"p-sortIcon",19),M(),O(18,"th",20),ee(19," Erstelldatum "),be(20,"p-sortIcon",21),M(),be(21,"th"),M())}function V4t(t,i){t&1&&(fi(0),O(1,"div",28)(2,"mat-icon"),ee(3,"card_membership"),M(),O(4,"span",29),ee(5,"Externer Account"),M()(),gi())}function z4t(t,i){t&1&&(fi(0),O(1,"div",28)(2,"mat-icon",30),ee(3,"block"),M(),O(4,"span",31),ee(5,"Nuzter ist gesperrt"),M()(),gi())}function U4t(t,i){if(t&1){let e=qe();fi(0),O(1,"button",32),te("click",function(){se(e);let r=L().$implicit,o=L();return le(o.onRemoveUserFromGroup(r.oid))}),O(2,"mat-icon"),ee(3,"person_remove"),M()(),gi()}if(t&2){let e=L(2);E(),D("matTooltip",e.options.tooltipRemoveAction)}}function H4t(t,i){if(t&1&&(O(0,"tr")(1,"td"),be(2,"p-tableCheckbox",22),M(),O(3,"td")(4,"a",23)(5,"button",24),ee(6),M()()(),O(7,"td"),ee(8),M(),O(9,"td"),ee(10),M(),O(11,"td"),ie(12,V4t,6,0,"ng-container",25),M(),O(13,"td"),ie(14,z4t,6,0,"ng-container",25),M(),O(15,"td"),ee(16),Dr(17,"date"),M(),O(18,"td")(19,"div",26),ie(20,U4t,4,1,"ng-container",25),O(21,"a",23)(22,"button",27)(23,"mat-icon"),ee(24,"open_in_new"),M()()()()()()),t&2){let e=i.$implicit,n=L();E(2),D("value",e),E(2),D("routerLink",Yi(13,j9e,e.oid)),E(2),gn(" ",e==null?null:e.displayName," "),E(2),Pt(e.oid),E(2),Pt(e.mail),E(2),D("ngIf",e.type==="external"),E(2),D("ngIf",!e.enabled),E(2),gn(" ",ca(17,11,e==null?null:e.createdDateTime)," "),E(4),D("ngIf",n.options==null?null:n.options.enableRemoveAction),E(),D("routerLink",Yi(15,j9e,e.oid)),E(),D("disabled",!e.valid)}}var G4t={enableRemoveAction:!0,tooltipRemoveAction:"Nutzer entfernen"},k5=(()=>{class t extends FM{_dialog;_responsiveDialogService;_confirmDialog;users=[];options=G4t;removeUser=new ve;constructor(e,n,r){super(),this._dialog=e,this._responsiveDialogService=n,this._confirmDialog=r}onRemoveUserFromGroup(e){this._confirmDialog.get(`${this.options.tooltipRemoveAction}`,`M\xF6chten Sie wirklich den ${this.options.tooltipRemoveAction} ?`).then(n=>{n&&this.removeUser.emit(e)})}addUserToGroup(e){let n=this._responsiveDialogService.config();n.data={users:e},this._dialog.open(b9e,n).afterClosed().subscribe(()=>this.selection.clear())}onSortChange(e){switch(e.field){case"oid":case"displayName":case"mail":case"type":{e.order===1?this.users.sort((n,r)=>{if(!n[e.field]||!r[e.field])return-1;{let o=n[e.field],a=r[e.field];return o.localeCompare(a)}}):this.users.sort((n,r)=>{if(!n[e.field]||!r[e.field])return-1;{let o=n[e.field];return r[e.field].localeCompare(o)}});break}case"createdDateTime":{e.order===1?this.users.sort((n,r)=>n.createdDateTime.getTime()-r.createdDateTime.getTime()):this.users.sort((n,r)=>r.createdDateTime.getTime()-n.createdDateTime.getTime());break}case"enabled":{e.order===1?this.users.sort((n,r)=>n.enabled===r.enabled?0:n.enabled>r.enabled?1:-1):this.users.sort((n,r)=>r.enabled===n.enabled?0:r.enabled>n.enabled?1:-1);break}}}_createFilter(e,n){return!e||!n?!1:zd.filterUserBySearchTerm(n,e)}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm),xe(Vb))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-users-list-items"]],inputs:{users:"users",options:"options"},outputs:{removeUser:"removeUser"},features:[Tt],decls:5,vars:10,consts:[["dataTable",""],["currentPageReportTemplate","{first} - {last} von {totalRecords}","selectionMode","multiple","dataKey","oid","sortField","displayName",3,"sortFunction","selectionChange","value","paginator","rows","rowsPerPageOptions","showCurrentPageReport","sortOrder","globalFilterFields","customSort"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[1,"flex","flex-row-reverse","justify-between","items-center"],[1,"basis-1/4"],[3,"searchChange"],["raised","true",3,"click","disabled","label"],[2,"width","4rem"],["pSortableColumn","displayName"],["field","displayName"],["pSortableColumn","oid"],["field","oid"],["pSortableColumn","mail"],["field","mail"],["pSortableColumn","type"],["field","type"],["pSortableColumn","enabled"],["field","enabled"],["pSortableColumn","createdDateTime"],["field","createdDateTime"],[3,"value"],[3,"routerLink"],["mat-button","","color","accent"],[4,"ngIf"],[1,"flex","flex-row"],["mat-icon-button","","color","accent",3,"disabled"],[1,"flex","flex-row","items-center"],[1,"flex-1","mat-body","invisible","xl:visible"],["color","warn"],[1,"flex-1","mat-body","bd-warn-text","invisible","xl:visible"],["mat-icon-button","","color","accent",3,"click","matTooltip"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-table",1,0),te("sortFunction",function(c){return se(o),le(r.onSortChange(c))})("selectionChange",function(c){return se(o),le(r.updateSelection(c))}),ie(2,L4t,5,2,"ng-template",2)(3,B4t,22,0,"ng-template",3)(4,H4t,25,17,"ng-template",4),M()}n&2&&D("value",r.users)("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(8,N4t))("showCurrentPageReport",!0)("sortOrder",1)("globalFilterFields",Vr(9,F4t))("customSort",!0)},dependencies:[Td,rc,Tr,aC,sC,Mw,Ow,A5,Kr,Ms,Xr,zr,il,Ld,Yl,Hp],encapsulation:2})}return t})();var M5=(()=>{class t{_permissionUserService;_currentRequest;constructor(e){this._permissionUserService=e}findAll(){return this._currentRequest?this._currentRequest:(this._currentRequest=this._permissionUserService.getAll().pipe(ot(e=>e.map(n=>zd.of(n)))).toPromise(),this._currentRequest)}reload(){this._currentRequest=this._permissionUserService.getAll().pipe(ot(e=>e.map(n=>zd.of(n)))).toPromise()}static \u0275fac=function(n){return new(n||t)(ai($g))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rae=class extends jg{_users;constructor(i){super(),this._users=i}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getData(){return this._users.map(i=>[{value:i.displayName,type:"string"},{value:i.mail,type:"string"},{value:i.oid,type:"string"}])}_getFields(){return["Name","Email","Id"]}};var i1={authenticationStrategy:"always",trigger:{color:"accent",tooltipText:"Export",dataTestKey:"export-trigger"},form:{availableExportTypes:["csv","xlsx"]}};var $$=class{consent;constructor(i){this.consent=i}consentForMarketing(){return this.consent.linkedIn&&this.consent.youtube}equals(i){return this.consent.zendesk===i.consent.zendesk&&this.consent.tracking===i.consent.tracking&&this.consent.linkedIn===i.consent.linkedIn&&this.consent.youtube===i.consent.youtube}},$9e=new $$({linkedIn:!1,youtube:!1,tracking:!1,zendesk:!0});var oae=new Mi("Cookie Manager CCM19 DomainId"),q9e="YouTube Video",Y9e="LinkedIn",K9e="Microsoft Azure App Insights",W9e="Zendesk";function Q9e(t){return t.variables.COOKIE_MANAGER_DOMAIN_ID?{provide:oae,useValue:t.variables.COOKIE_MANAGER_DOMAIN_ID}:(console.error("No 'COOKIE_MANAGER_DOMAIN_ID' found in app config response"),{provide:oae,useValue:""})}function Z9e(){return window}var X9e=(()=>{class t{_rendererFactory2;userConsent$;renderer;constructor(e){this._rendererFactory2=e,this.renderer=this._rendererFactory2.createRenderer(null,null),this.userConsent$=new Sa($9e),this.renderer.listen("window","ccm19EmbeddingAccepted",n=>this.handleEmbeddingAccepted(n)),this.renderer.listen("window","ccm19WidgetClosed",()=>this.handleWidgetClosed())}ngOnDestroy(){this.renderer.destroy()}handleEmbeddingAccepted(e){this._updateUserConsent(Z9e().CCM.acceptedEmbeddings)}handleWidgetClosed(){this._updateUserConsent(Z9e().CCM.acceptedEmbeddings)}_updateUserConsent(e){let n=new $$({youtube:!!e.find(r=>r.name===q9e),linkedIn:!!e.find(r=>r.name===Y9e),tracking:!!e.find(r=>r.name===K9e),zendesk:!!e.find(r=>r.name===W9e)});this.userConsent$.next(n)}static \u0275fac=function(n){return new(n||t)(ai(Jd))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var D1e=(()=>{class t{document;_scriptService;constructor(e,n){this.document=e,this._scriptService=n}init(e){this._scriptService.loadJsScript({id:"CCM19",src:`https://cloud.ccm19.de/app.js?apiKey=5894089525888ce5c262843cf003c6e18a6655024bc18588&domain=${e}`},[["referrerpolicy","origin"]],this.document.head)}static \u0275fac=function(n){return new(n||t)(ai(Gr),ai(g5))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var k1e=(()=>{class t{static forRoot(){return{ngModule:t,providers:[wk(()=>((n,r)=>(n.init(r),()=>$t()))(ae(D1e),ae(oae))())]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[D1e]})}return t})();var q$=new Mi("tracking.service"),aae=(()=>{class t{_trackers=[];constructor(e){if(this._trackers=[],e&&e.length>0)for(let n of e)this._trackers.push(n);else console.log("no tracker loaded")}addAuthenticatedUserContext(e){this._trackers.forEach(n=>n.addAuthenticatedUserContext(e))}removeAuthenticatedUserContext(){this._trackers.forEach(e=>e.removeAuthenticatedUserContext())}trackException(e){this._trackers.forEach(n=>n.trackException(e))}trackEvent(e,n){this._trackers.forEach(r=>r.trackEvent(e,n))}init(e){this._trackers.forEach(n=>n.init(e))}destroy(){this._trackers.forEach(e=>e.destroy())}static \u0275fac=function(n){return new(n||t)(ai(q$,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Yg=(()=>{class t extends Xo{_authenticationService;_userConsentService;_userTrackingService;consent$=new hi;authenticated$=new Sa(!1);currentUser=new hi;accountInfo=null;constructor(e,n,r){super(),this._authenticationService=e,this._userConsentService=n,this._userTrackingService=r}init(){let e=this._authenticationService.authentication$.pipe(yo(o=>{o||(this.accountInfo=null),this._onAuthenticatedChange(o)})).subscribe(o=>{this.authenticated$.next(o)}),n=this._userConsentService.userConsent$.pipe(vm((o,a)=>o.equals(a)),yo(o=>{console.debug("onConsentChange",o),this._onConsentChange(o)})).subscribe(o=>{this.consent$.next(o)}),r=this._authenticationService.accountInfo$.subscribe(o=>{this.currentUser.next(o),this.accountInfo=o});this._subs.push(e,n,r)}_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 \u0275fac=function(n){return new(n||t)(ai(em),ai(X9e),ai(aae))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var J9e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[k1e.forRoot()]})}return t})();function q4t(t,i){if(t&1&&(O(0,"span",1),ee(1),M()),t&2){let e=L();E(),Pt(e.accountInfo.name)}}function Y4t(t,i){if(t&1){let e=qe();O(0,"button",3),te("click",function(){se(e);let r=L();return le(r.login())}),ee(1," Login "),M()}}var t$e=(()=>{class t{_currentUserService;_msalService;accountInfo=null;constructor(e,n){this._currentUserService=e,this._msalService=n,this._currentUserService.currentUser.subscribe(r=>this.accountInfo=r)}login(){this._msalService.loginRedirect()}static \u0275fac=function(n){return new(n||t)(xe(Yg),xe(ry))};static \u0275cmp=re({type:t,selectors:[["bd-user-authentication-state"]],decls:3,vars:1,consts:[[1,"max-md:invisible"],[1,"bg-(--app-shell-color)!","border-(--app-shell-color)!","text-(--app-shell-contrast-color)!"],["pButton","","severity","primary","size","small"],["pButton","","severity","primary","size","small",3,"click"]],template:function(n,r){n&1&&(O(0,"div",0),yt(1,q4t,2,1,"span",1)(2,Y4t,2,0,"button",2),M()),n&2&&(E(),vt(r.accountInfo?1:2))},dependencies:[aw],encapsulation:2})}return t})();var ME={field:"modifiedDate",desc:!0};var Bc=(()=>{class t{cache=new Map;get(e){let n=this.cache.get(e);if(!n)return;if(new Date().getTime()>n.expiry){this.cache.delete(e);return}return $t(n.value)}set(e,n,r=6e4*3600){let o=new Date().getTime()+r;return this.cache.set(e,{expiry:o,value:n}),$t(n)}cacheObservable(e,n,r){let o=this.get(e);return o||n.pipe(yo(a=>{this.set(e,a,r)}))}deleteCacheForKey(e){this.cache.delete(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var i$e={showDeleteButton:!0,showEditButton:!0};var eF=(function(t){return t.NOOP="NOOP",t.EDIT_RESOURCE="EDIT_RESOURCE",t.DELETE_RESOURCE="DELETE_RESOURCE",t})(eF||{});var sae=class{_environmentService;constructor(i){this._environmentService=i}linkAssets(){return this._environmentService.load("BD_HELP_RESOURCE_URLS")}};var lae=(()=>{class t{_httpClient;_environmentService;_store;_helpLinks;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new sae(this._environmentService);let r=this._store.linkAssets().map(o=>this._httpClient.get(o));this._helpLinks=ym(Ys(r).pipe(ot(o=>o.reduce((a,c)=>a.concat(c))))).then(o=>o.reduce((a,c)=>(a[c.key]=c,a),{}))}findByKey(e){return this._helpLinks.then(n=>n[e])}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var n$e={mode:"button",color:"accent"},cae={mode:"toolbar"};function W4t(t,i){if(t&1&&(O(0,"a",0)(1,"mat-icon"),ee(2,"help_outline"),M()()),t&2){let e=L();D("href",e.link.link,td)("color",e.color)("ngClass",e.class)("ngStyle",e.styles)("matTooltip",e.link==null?null:e.link.displayName)}}var tF=(()=>{class t{_helpService;_changeDetection;_breakpointObserver;key;options=n$e;link;color;styles;class={"bd-primary":!1,"bd-primary-text":!1};_destroyed=new Ai;constructor(e,n,r){this._helpService=e,this._changeDetection=n,this._breakpointObserver=r}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([j_.XSmall,j_.Small]).pipe(ha(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 \u0275fac=function(n){return new(n||t)(xe(lae),xe(dn),xe(yv))};static \u0275cmp=re({type:t,selectors:[["bd-help-button"]],inputs:{key:"key",options:"options"},features:[Yt],decls:1,vars:1,consts:[["target","_blank","rel","noopener","mat-icon-button","",3,"href","color","ngClass","ngStyle","matTooltip"]],template:function(n,r){n&1&&yt(0,W4t,3,5,"a",0),n&2&&vt(r.link?0:-1)},dependencies:[so,il,qa,Xs,Xf,Ld,da,zr],encapsulation:2,changeDetection:0})}return t})();var Z4t=["*"],X4t=`.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))} `,J4t=["unscopedContent"],ezt=["text"],tzt=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],izt=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var nzt=new Mi("ListOption"),Y$=(()=>{class t{_elementRef=ae(qn);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return t})(),K$=(()=>{class t{_elementRef=ae(qn);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return t})(),rzt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return t})(),r$e=(()=>{class t{_listOption=ae(nzt,{optional:!0});constructor(){}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,hostVars:4,hostBindings:function(n,r){n&2&&zn("mdc-list-item__start",r._isAlignedAtStart())("mdc-list-item__end",!r._isAlignedAtStart())}})}return t})(),ozt=(()=>{class t extends r$e{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[Tt]})}return t})(),W$=(()=>{class t extends r$e{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[Tt]})}return t})(),azt=new Mi("MAT_LIST_CONFIG"),M1e=(()=>{class t{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Kh(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(Kh(e))}_disabled=hr(!1);_defaultOptions=ae(azt,{optional:!0});static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,hostVars:1,hostBindings:function(n,r){n&2&<("aria-disabled",r.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return t})(),szt=(()=>{class t{_elementRef=ae(qn);_ngZone=ae(Pn);_listBase=ae(M1e,{optional:!0});_platform=ae(_s);_hostElement;_isButtonElement;_noopAnimations=tl();_avatars;_icons;set lines(e){this._explicitLines=_v(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=Kh(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(Kh(e))}_disabled=hr(!1);_subscriptions=new Ia;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){ae(pc).load(gp);let e=ae(Hk,{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 OP(this,this._ngZone,this._hostElement,this._platform,ae(Ir)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(Vp(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let n=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",n===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",n===3),this._hasUnscopedTextContent){let o=this._titles.length===0&&n===1;r.classList.toggle("mdc-list-item__primary-text",o),r.classList.toggle("mdc-list-item__secondary-text",!o)}else r.classList.remove("mdc-list-item__primary-text"),r.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(n){return new(n||t)};static \u0275dir=hn({type:t,contentQueries:function(n,r,o){if(n&1&&(Vt(o,ozt,4),Vt(o,W$,4)),n&2){let a;ze(a=Ue())&&(r._avatars=a),ze(a=Ue())&&(r._icons=a)}},hostVars:4,hostBindings:function(n,r){n&2&&(lt("aria-disabled",r.disabled)("disabled",r._isButtonElement&&r.disabled||null),zn("mdc-list-item--disabled",r.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return t})();var dae=(()=>{class t extends M1e{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[Ii([{provide:M1e,useExisting:t}]),Tt],ngContentSelectors:Z4t,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},styles:[X4t],encapsulation:2,changeDetection:0})}return t})(),uae=(()=>{class t extends szt{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=Kh(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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,K$,5),Vt(o,Y$,5),Vt(o,rzt,5)),n&2){let a;ze(a=Ue())&&(r._lines=a),ze(a=Ue())&&(r._titles=a),ze(a=Ue())&&(r._meta=a)}},viewQuery:function(n,r){if(n&1&&(Xi(J4t,5),Xi(ezt,5)),n&2){let o;ze(o=Ue())&&(r._unscopedContent=o.first),ze(o=Ue())&&(r._itemText=o.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(n,r){n&2&&(lt("aria-current",r._getAriaCurrent()),zn("mdc-list-item--activated",r.activated)("mdc-list-item--with-leading-avatar",r._avatars.length!==0)("mdc-list-item--with-leading-icon",r._icons.length!==0)("mdc-list-item--with-trailing-meta",r._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",r._hasBothLeadingAndTrailing())("_mat-animation-noopable",r._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[Tt],ngContentSelectors:izt,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(n,r){if(n&1){let o=qe();Kn(tzt),Sn(0),O(1,"span",1),Sn(2,1),Sn(3,2),O(4,"span",2,0),te("cdkObserveContent",function(){return se(o),le(r._updateItemLines(!0))}),Sn(6,3),M()(),Sn(7,4),Sn(8,5),be(9,"div",3)}},dependencies:[Vte],encapsulation:2,changeDetection:0})}return t})();var o$e=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_4,_a,tw,Hie,Cp]})}return t})();function czt(t,i){if(t&1&&(O(0,"mat-list-item")(1,"mat-icon",0),ee(2,"calendar_today"),M(),O(3,"div",1),ee(4),Dr(5,"date"),M(),O(6,"div",2),ee(7,"Zeitpunkt der Erstellung"),M()()),t&2){let e=L();E(4),gn(" ",gl(5,1,e.data.resource.createdDate,"medium")," ")}}function dzt(t,i){if(t&1&&(O(0,"mat-list-item")(1,"mat-icon",0),ee(2,"help"),M(),O(3,"a",5),ee(4),M()()),t&2){let e=L();E(3),D("href",e.helpLink.link,td),E(),gn("Dokumentation ",e.helpLink.displayName)}}function uzt(t,i){if(t&1){let e=qe();O(0,"button",6),te("click",function(){se(e);let r=L();return le(r.editResource())}),O(1,"span"),ee(2,"Bearbeiten"),M()()}}function pzt(t,i){if(t&1){let e=qe();O(0,"button",7),te("click",function(){se(e);let r=L();return le(r.deleteResource())}),O(1,"span"),ee(2,"L\xF6schen"),M()()}}var a$e=(()=>{class t{locale;data;_dialogRef;_helpService;permissionDisplayText="";showEditButton=!1;showDeleteButton=!1;helpLink;constructor(e,n,r,o){this.locale=e,this.data=n,this._dialogRef=r,this._helpService=o,this.permissionDisplayText=N$[e][this.data.resource.highestPermission],this.showDeleteButton=n.config.showDeleteButton&&P$.includes(n.resource.highestPermission,"DELETE"),this.showEditButton=n.config.showEditButton&&P$.includes(n.resource.highestPermission,"UPDATE"),this._helpService.findByKey(n.helpKey).then(a=>this.helpLink=a)}editResource(){this._dialogRef.close(eF.EDIT_RESOURCE)}deleteResource(){this._dialogRef.close(eF.DELETE_RESOURCE)}static \u0275fac=function(n){return new(n||t)(xe(xm),xe(Z0),xe(Im),xe(lae))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"mat-dialog-content")(1,"mat-list")(2,"mat-list-item")(3,"mat-icon",0),ee(4,"visibility"),M(),O(5,"div",1),ee(6),M()(),yt(7,czt,8,4,"mat-list-item"),O(8,"mat-list-item")(9,"mat-icon",0),ee(10,"edit_calendar"),M(),O(11,"div",1),ee(12),Dr(13,"date"),M(),O(14,"div",2),ee(15,"Zeitpunkt der letzten \xC4nderung"),M()(),yt(16,dzt,5,2,"mat-list-item"),M()(),O(17,"mat-dialog-actions"),yt(18,uzt,3,0,"button",3),yt(19,pzt,3,0,"button",4),M()),n&2&&(E(6),Pt(r.permissionDisplayText),E(),vt(r.data.resource!=null&&r.data.resource.createdDate?7:-1),E(5),gn(" ",gl(13,6,r.data.resource.modifiedDate,"medium")," "),E(4),vt(r.helpLink?16:-1),E(2),vt(r.showEditButton?18:-1),E(),vt(r.showDeleteButton?19:-1))},dependencies:[lh,o$e,dae,uae,W$,K$,Y$,da,zr,bv,so,Kr,Hp],styles:["a[_ngcontent-%COMP%]{text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();var mzt=["menuButton"],O5=(()=>{class t extends Xo{_dialog;_confirmService;resource;helpKey;config=i$e;editResource=new ve;deleteResource=new ve;menuButtonRef;constructor(e,n){super(),this._dialog=e,this._confirmService=n}openMenu(e){let n=this.menuButtonRef.nativeElement.getBoundingClientRect();this._subs.push(this._dialog.open(a$e,{position:{right:`calc(100vw - ${e.x}px)`,top:`${n.bottom}px`},hasBackdrop:!0,data:{resource:this.resource,config:this.config,helpKey:this.helpKey}}).afterClosed().pipe(vn(r=>!!r)).subscribe(r=>{switch(r){case eF.DELETE_RESOURCE:{this._confirmService.get(F$[this.resource.resourceName],`${F$[this.resource.resourceName]} entg\xFCltig l\xF6schen ?`).then(o=>{o&&this.deleteResource.emit()});break}case eF.EDIT_RESOURCE:{this.editResource.emit();break}}}))}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Vb))};static \u0275cmp=re({type:t,selectors:[["bd-resources-info-menu"]],viewQuery:function(n,r){if(n&1&&Xi(mzt,5,qn),n&2){let o;ze(o=Ue())&&(r.menuButtonRef=o.first)}},inputs:{resource:"resource",helpKey:"helpKey",config:"config"},outputs:{editResource:"editResource",deleteResource:"deleteResource"},features:[Tt],decls:4,vars:1,consts:[["menuButton",""],["mat-icon-button","","matTooltip","Info","aria-label","resource info menu",3,"click","data-test"]],template:function(n,r){if(n&1){let o=qe();O(0,"button",1,0),te("click",function(c){return se(o),le(r.openMenu(c))}),O(2,"mat-icon"),ee(3,"more_vert"),M()()}n&2&&D("data-test","resource-info-"+(r.resource==null?null:r.resource.resourceName))},dependencies:[so,il,Xf,Ld,fh,da,zr],encapsulation:2,changeDetection:0})}return t})();var OE=()=>!1,lC=()=>!0,RE=t=>[`/${t.resourceName}`,t.id],R5={disableFnc:OE,detailLinkFnc:RE,filterFnc:lC,emptyResourcesText:"Keine Elemente gespeichert"};var hzt=()=>[25,50,100],fzt=()=>["name","labels","modifiedDate"];function gzt(t,i){if(t&1){let e=qe();O(0,"div")(1,"mat-form-field")(2,"input",8),te("input",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.target.value,"contains"))}),M()()()}}function _zt(t,i){t&1&&(O(0,"th",11),ee(1,"Labels"),M())}function yzt(t,i){if(t&1&&(O(0,"tr")(1,"th",9),ee(2," Name "),be(3,"p-sortIcon",10),M(),yt(4,_zt,2,0,"th",11),O(5,"th"),Eee(6,1),M(),O(7,"th",12)(8,"span"),Eee(9,2),M(),be(10,"p-sortIcon",13),M(),O(11,"th"),ee(12,"Link"),M()()),t&2){let e=L();E(4),vt(e.options.showLabelsColumn?4:-1)}}function vzt(t,i){if(t&1&&(O(0,"td"),ee(1),M()),t&2){let e=L().$implicit;E(),gn(" ",e.labels&&e.labels.length>0?e.labels.join(", "):""," ")}}function bzt(t,i){if(t&1&&(O(0,"tr",14)(1,"td"),ee(2),M(),yt(3,vzt,2,1,"td"),O(4,"td"),ee(5),M(),O(6,"td"),ee(7),Dr(8,"date"),M(),O(9,"td")(10,"a",15)(11,"mat-icon"),ee(12,"open_in_new"),M()()()()),t&2){let e=i.$implicit,n=L();D("pSelectableRow",e)("pSelectableRowDisabled",n.options.disableFnc(e)),E(2),Pt(e.name),E(),vt(n.options.showLabelsColumn?3:-1),E(2),gn(" ",n.localizedPermissionDisplayNames[e.highestPermission]," "),E(2),Pt(gl(8,8,e.modifiedDate,"short")),E(3),D("routerLink",n.options.detailLinkFnc(e))("disabled",n.options.disableFnc(e))}}function Czt(t,i){if(t&1&&(O(0,"tr")(1,"td",16),ee(2),M()()),t&2){let e=L();E(2),Pt(e.options.emptyResourcesText)}}var Q$=(()=>{class t{locale;_router;options=R5;resources=[];localizedPermissionDisplayNames;constructor(e,n){this.locale=e,this._router=n,this.localizedPermissionDisplayNames=N$[e]}onRowSelect(e){let n=this.options.detailLinkFnc(e);this._router.navigate(n)}static \u0275fac=function(n){return new(n||t)(xe(xm),xe(Ws))};static \u0275cmp=re({type:t,selectors:[["bd-resources-list"]],inputs:{options:"options",resources:"resources"},decls:6,vars:9,consts:()=>{let e;e=$localize`Suchen`;let n;n=$localize`Berechtigung`;let r;return r=$localize`Letzte Änderung`,[["resourcesTable",""],n,r,["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(n,r){if(n&1){let o=qe();O(0,"p-table",3,0),te("selectionChange",function(c){return se(o),le(r.onRowSelect(c))}),ie(2,gzt,3,0,"ng-template",4)(3,yzt,13,1,"ng-template",5)(4,bzt,13,11,"ng-template",6)(5,Czt,3,1,"ng-template",7),M()}n&2&&D("value",r.resources)("paginator",!0)("rows",25)("sortField","modifiedDate")("sortOrder",-1)("rowsPerPageOptions",Vr(7,hzt))("globalFilterFields",Vr(8,fzt))},dependencies:[Cp,Z4,Td,rc,Tr,aC,nae,sC,so,il,da,zr,ow,hc,zs,Oa,Ms,Hp],encapsulation:2})}return t})();var s$e=` .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 xzt={root:{position:"relative"}},Szt={root:({instance:t})=>["p-skeleton p-component",{"p-skeleton-circle":t.shape==="circle","p-skeleton-animation-none":t.animation==="none"}]},l$e=(()=>{class t extends br{name="skeleton";theme=s$e;classes=Szt;inlineStyles=xzt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var kv=(()=>{class t extends ur{styleClass;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";_componentStyle=ae(l$e);get containerStyle(){let e=this._componentStyle?.inlineStyles.root,n;return this.size?n=$e(pe({},e),{width:this.size,height:this.size,borderRadius:this.borderRadius}):n=$e(pe({},e),{width:this.width,height:this.height,borderRadius:this.borderRadius}),n}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-skeleton"]],hostVars:7,hostBindings:function(n,r){n&2&&(lt("aria-hidden",!0)("data-pc-name","skeleton")("data-pc-section","root"),is(r.containerStyle),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{styleClass:"styleClass",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},features:[Ii([l$e]),Tt],decls:0,vars:0,template:function(n,r){},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),cC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[kv,Un,Un]})}return t})();function wzt(t,i){t&1&&(O(0,"div",5)(1,"div",6)(2,"div",1),be(3,"p-skeleton",7),M(),O(4,"div",8)(5,"div"),be(6,"p-skeleton",2),M(),O(7,"div"),be(8,"p-skeleton",3),M()()()())}var pae=(()=>{class t{repetition=[1,2,3,4,5];static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"div",1)(3,"div"),be(4,"p-skeleton",2),M(),O(5,"div"),be(6,"p-skeleton",3),M()(),O(7,"div",4)(8,"div"),be(9,"p-skeleton",2),M(),O(10,"div"),be(11,"p-skeleton",3),M()()(),Qo(12,wzt,9,0,"div",5,ms),M()),n&2&&(E(12),Zo(r.repetition))},dependencies:[cC,kv],styles:[".resources-list-item[_ngcontent-%COMP%]{padding:12px 24px}"]})}return t})();var Ud=class{_resourceConfigItem;_environmentService;_cache;constructor(i,e,n){this._resourceConfigItem=i,this._environmentService=e,this._cache=n}getBaseUrl(){return this._environmentService.load(this._resourceConfigItem.API_TOKENS.BASE)}deleteCacheForKey(i){this._cache.deleteCacheForKey(this.key(i))}key(i){return`${this._resourceConfigItem.API_TOKENS.BASE}__${i}`}};var gc=new Mi("RESOURCE_REGISTRATION");var Rw=(()=>{class t{_resourceRegistration;injector;constructor(e,n){this._resourceRegistration=e,this.injector=n}of(e){let n=this._resourceRegistration.find(r=>r.resourceName===e);if(n){let r=n.resourceService;return this.injector.get(r)}else throw new Error(`Resource ${e} has no service implemented`)}static \u0275fac=function(n){return new(n||t)(ai(gc),ai(Ir))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var BM=(()=>{class t{_resourcesService;constructor(e){this._resourcesService=e}transform(e,...n){if(n.length===0)return console.warn('Pipe [resourceDisplayName] needs BdResourceName as parameter, example: resourceDisplayName:"market"'),$t("");if(!Object.values(tn).some(o=>o===n[0]))return console.warn(`Pipe [resourceDisplayName] needs a valid BdResourceName (${Object.values(tn)}) as parameter, given value is`,n[0]),$t("");let r=n[0];return this._resourcesService.of(r).findById(e).pipe(ks({name:"Name wird geladen.."}),ot(o=>o.name),Ac(o=>(console.error(`Error loading resource id=${e} & resourceName=${r}`,o),$t("Resource nicht gefunden"))))}static \u0275fac=function(n){return new(n||t)(xe(Rw,16))};static \u0275pipe=Tu({name:"resourceDisplayName",type:t,pure:!0})}return t})();var N5={disableFnc:OE,detailLinkFnc:RE,filterFnc:lC,emptyResourcesText:"Keine Elemente gefunden",resourceNameTitle:"Element",selectOnInit:"none",resetOption:!0};var F5=class extends Xo{_resourceServices;formLoading=!1;resourceCtrl=new ho(null);resourceOptions;config;_resourceService;_resourceOptionsLoaded$=new hi(1);_resourceNameInProgress=!1;_resourceSelectResolvingInProgress=!1;constructor(i){super(),this._resourceServices=i}_onResourceNameChange(i){this.updateResourceNameInProgress(!0),this._resourceService=this._resourceServices.of(i),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(i){return i.tagName==="td-side-sheet-container".toUpperCase()?!0:i.parentElement?this._isHtmlElementInSideSheetContainer(i.parentElement):!1}updateResourceOptions(i){this.resourceOptions=i.filter(e=>this.config.filterFnc(e)).map(e=>this.resourceAsInlineOption(e)).sort((e,n)=>t1.sort(e.resource,n.resource,ME))}addOption(i){let e=[...this.resourceOptions.map(n=>$e(pe({},n),{resource:n.resource?n.resource?.clone():void 0}))];e.push(i),this.resourceOptions=Ni.unique(e,n=>n.id).sort((n,r)=>t1.sort(n.resource,r.resource,ME))}resourceAsAdminInlineOption(i){return this.resourceAsInlineOption(i,["italic"])}resourceAsInlineOption(i,e=void 0){return{id:i.id,disabled:this.config?i.hasError||this.config.disableFnc(i):i.hasError,resource:i,styleClass:e}}updateResourceNameInProgress(i){this._resourceNameInProgress=i,this.formLoading=this._resourceNameInProgress||this._resourceSelectResolvingInProgress}updateResourceSelectResolvingInProgress(i){this._resourceSelectResolvingInProgress=i,this.formLoading=this._resourceNameInProgress||this._resourceSelectResolvingInProgress}};var d$e=` .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 Z$=t=>({height:t}),u$e=t=>({$implicit:t}),Tzt=(t,i)=>({checked:t,class:i});function Ezt(t,i){}function Azt(t,i){t&1&&ie(0,Ezt,0,0,"ng-template")}function Dzt(t,i){if(t&1&&ie(0,Azt,1,0,null,4),t&2){let e=i.class,n=L(2);D("ngTemplateOutlet",n.itemCheckboxIconTemplate)("ngTemplateOutletContext",na(2,Tzt,n.selected,e))}}function kzt(t,i){t&1&&(fi(0),ie(1,Dzt,1,5,"ng-template",null,0,di),gi())}function Mzt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L();E(),Pt(e.label??"empty")}}function Ozt(t,i){t&1&&Li(0)}var Rzt=["item"],Pzt=["group"],Nzt=["loader"],Fzt=["header"],Lzt=["filter"],Bzt=["footer"],Vzt=["emptyfilter"],zzt=["empty"],Uzt=["selecteditems"],Hzt=["loadingicon"],Gzt=["filtericon"],jzt=["removetokenicon"],$zt=["chipicon"],qzt=["clearicon"],Yzt=["dropdownicon"],Kzt=["itemcheckboxicon"],Wzt=["headercheckboxicon"],Qzt=["overlay"],Zzt=["filterInput"],Xzt=["focusInput"],Jzt=["items"],e5t=["scroller"],t5t=["lastHiddenFocusableEl"],i5t=["firstHiddenFocusableEl"],n5t=["headerCheckbox"],r5t=[[["p-header"]],[["p-footer"]]],o5t=["p-header","p-footer"],a5t=()=>({class:"p-multiselect-chip-icon"}),s5t=(t,i)=>({$implicit:t,removeChip:i}),p$e=t=>({options:t}),l5t=(t,i,e)=>({checked:t,partialSelected:i,class:e}),m$e=(t,i)=>({$implicit:t,options:i}),c5t=()=>({});function d5t(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(2);E(),Pt(e.label()||"empty")}}function u5t(t,i){if(t&1&&ee(0),t&2){let e=L(3);gn(" ",e.getSelectedItemsLabel()," ")}}function p5t(t,i){t&1&&Li(0)}function m5t(t,i){if(t&1){let e=qe();O(0,"span",26),te("click",function(r){se(e);let o=L(4).$implicit,a=L(4);return le(a.removeOption(o,r))}),ie(1,p5t,1,0,"ng-container",27),M()}if(t&2){let e=L(8);Pe(e.cx("chipIcon")),lt("data-pc-section","clearicon")("aria-hidden",!0),E(),D("ngTemplateOutlet",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)("ngTemplateOutletContext",Vr(6,a5t))}}function h5t(t,i){if(t&1&&(fi(0),ie(1,m5t,2,7,"span",25),gi()),t&2){let e=L(7);E(),D("ngIf",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)}}function f5t(t,i){if(t&1&&ie(0,h5t,2,1,"ng-container",19),t&2){let e=L(6);D("ngIf",!e.$disabled()&&!e.readonly)}}function g5t(t,i){t&1&&(fi(0),ie(1,f5t,1,1,"ng-template",null,5,di),gi())}function _5t(t,i){if(t&1){let e=qe();O(0,"div",null,4)(2,"p-chip",24),te("onRemove",function(r){let o=se(e).$implicit,a=L(4);return le(a.removeOption(o,r))}),ie(3,g5t,3,0,"ng-container",19),M()()}if(t&2){let e=i.$implicit,n=L(4);Pe(n.cx("chipItem")),E(2),Pe(n.cx("pcChip")),D("label",n.getLabelByValue(e))("removable",!n.$disabled()&&!n.readonly)("removeIcon",n.chipIcon),E(),D("ngIf",n.chipIconTemplate||n._chipIconTemplate||n.removeTokenIconTemplate||n._removeTokenIconTemplate)}}function y5t(t,i){if(t&1&&ie(0,_5t,4,8,"div",23),t&2){let e=L(3);D("ngForOf",e.chipSelectedItems())}}function v5t(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(3);E(),Pt(e.placeholder()||"empty")}}function b5t(t,i){if(t&1&&(fi(0),yt(1,u5t,1,1)(2,y5t,1,1,"div",22),ie(3,v5t,2,1,"ng-container",19),gi()),t&2){let e=L(2);E(),vt(e.chipSelectedItems()&&e.chipSelectedItems().length===e.maxSelectedLabels?1:2),E(2),D("ngIf",!e.modelValue()||e.modelValue().length===0)}}function C5t(t,i){if(t&1&&(fi(0),ie(1,d5t,2,1,"ng-container",19)(2,b5t,4,2,"ng-container",19),gi()),t&2){let e=L();E(),D("ngIf",e.display==="comma"),E(),D("ngIf",e.display==="chip")}}function x5t(t,i){t&1&&Li(0)}function S5t(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(2);E(),Pt(e.placeholder()||"empty")}}function w5t(t,i){if(t&1&&(fi(0),ie(1,x5t,1,0,"ng-container",27)(2,S5t,2,1,"ng-container",19),gi()),t&2){let e=L();E(),D("ngTemplateOutlet",e.selectedItemsTemplate||e._selectedItemsTemplate)("ngTemplateOutletContext",na(3,s5t,e.selectedOptions,e.removeOption.bind(e))),E(),D("ngIf",!e.modelValue()||e.modelValue().length===0)}}function I5t(t,i){if(t&1){let e=qe();Pi(),O(0,"svg",29),te("click",function(r){se(e);let o=L(2);return le(o.clear(r))}),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearicon")("aria-hidden",!0)}}function T5t(t,i){}function E5t(t,i){t&1&&ie(0,T5t,0,0,"ng-template")}function A5t(t,i){if(t&1){let e=qe();O(0,"span",26),te("click",function(r){se(e);let o=L(2);return le(o.clear(r))}),ie(1,E5t,1,0,null,30),M()}if(t&2){let e=L(2);Pe(e.cx("clearIcon")),lt("data-pc-section","clearicon")("aria-hidden",!0),E(),D("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function D5t(t,i){if(t&1&&(fi(0),ie(1,I5t,1,4,"svg",28)(2,A5t,2,5,"span",25),gi()),t&2){let e=L();E(),D("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),E(),D("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function k5t(t,i){t&1&&Li(0)}function M5t(t,i){if(t&1&&(fi(0),ie(1,k5t,1,0,"ng-container",30),gi()),t&2){let e=L(2);E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function O5t(t,i){if(t&1&&be(0,"span"),t&2){let e=L(3);Pe(e.cn(e.cx("loadingIcon"),"pi-spin "+e.loadingIcon)),lt("aria-hidden",!0)}}function R5t(t,i){if(t&1&&be(0,"span"),t&2){let e=L(3);Pe(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin")),lt("aria-hidden",!0)}}function P5t(t,i){if(t&1&&(fi(0),ie(1,O5t,1,3,"span",31)(2,R5t,1,3,"span",31),gi()),t&2){let e=L(2);E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function N5t(t,i){if(t&1&&(fi(0),ie(1,M5t,2,1,"ng-container",19)(2,P5t,3,2,"ng-container",19),gi()),t&2){let e=L();E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function F5t(t,i){if(t&1&&be(0,"span",34),t&2){let e=L(3);Pe(e.cx("dropdownIcon")),D("ngClass",e.dropdownIcon),lt("data-pc-section","triggericon")("aria-hidden",!0)}}function L5t(t,i){if(t&1&&(Pi(),be(0,"svg",35)),t&2){let e=L(3);Pe(e.cx("dropdownIcon")),lt("data-pc-section","triggericon")("aria-hidden",!0)}}function B5t(t,i){if(t&1&&(fi(0),ie(1,F5t,1,5,"span",32)(2,L5t,1,4,"svg",33),gi()),t&2){let e=L(2);E(),D("ngIf",e.dropdownIcon),E(),D("ngIf",!e.dropdownIcon)}}function V5t(t,i){}function z5t(t,i){t&1&&ie(0,V5t,0,0,"ng-template")}function U5t(t,i){if(t&1&&(O(0,"span"),ie(1,z5t,1,0,null,30),M()),t&2){let e=L(2);Pe(e.cx("dropdownIcon")),lt("data-pc-section","triggericon")("aria-hidden",!0),E(),D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function H5t(t,i){if(t&1&&ie(0,B5t,3,2,"ng-container",19)(1,U5t,2,5,"span",31),t&2){let e=L();D("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),E(),D("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function G5t(t,i){t&1&&Li(0)}function j5t(t,i){t&1&&Li(0)}function $5t(t,i){if(t&1&&(fi(0),ie(1,j5t,1,0,"ng-container",27),gi()),t&2){let e=L(3);E(),D("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",Yi(2,p$e,e.filterOptions))}}function q5t(t,i){if(t&1&&(Pi(),be(0,"svg",42)),t&2){let e=L().class;Pe(e),lt("data-pc-section","icon")}}function Y5t(t,i){}function K5t(t,i){t&1&&ie(0,Y5t,0,0,"ng-template")}function W5t(t,i){if(t&1&&ie(0,q5t,1,3,"svg",41)(1,K5t,1,0,null,27),t&2){let e=i.class,n=L(5);D("ngIf",!n.headerCheckboxIconTemplate&&!n._headerCheckboxIconTemplate&&n.allSelected()),E(),D("ngTemplateOutlet",n.headerCheckboxIconTemplate||n._headerCheckboxIconTemplate)("ngTemplateOutletContext",Qu(3,l5t,n.allSelected(),n.partialSelected(),e))}}function Q5t(t,i){if(t&1){let e=qe();O(0,"p-checkbox",40,10),te("onChange",function(r){se(e);let o=L(4);return le(o.onToggleAll(r))}),ie(2,W5t,2,7,"ng-template",null,11,di),M()}if(t&2){let e=L(4);D("ngModel",e.allSelected()),uc("ariaLabel",e.toggleAllAriaLabel),D("binary",!0)("variant",e.$variant())("disabled",e.$disabled())}}function Z5t(t,i){t&1&&(Pi(),be(0,"svg",46))}function X5t(t,i){}function J5t(t,i){t&1&&ie(0,X5t,0,0,"ng-template")}function eUt(t,i){if(t&1&&(O(0,"span",47),ie(1,J5t,1,0,null,30),M()),t&2){let e=L(5);E(),D("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function tUt(t,i){if(t&1){let e=qe();O(0,"p-iconfield")(1,"input",43,12),te("input",function(r){se(e);let o=L(4);return le(o.onFilterInputChange(r))})("keydown",function(r){se(e);let o=L(4);return le(o.onFilterKeyDown(r))})("click",function(r){se(e);let o=L(4);return le(o.onInputClick(r))})("blur",function(r){se(e);let o=L(4);return le(o.onFilterBlur(r))}),M(),O(3,"p-inputicon"),ie(4,Z5t,1,0,"svg",44)(5,eUt,2,1,"span",45),M()()}if(t&2){let e=L(4);Pe(e.cx("pcFilterContainer")),E(),Pe(e.cx("pcFilter")),D("variant",e.$variant())("value",e._filterValue()||""),lt("autocomplete",e.autocomplete)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("disabled",e.$disabled()?"":void 0)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),E(3),D("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),E(),D("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function iUt(t,i){if(t&1&&ie(0,Q5t,4,5,"p-checkbox",39)(1,tUt,6,14,"p-iconfield",31),t&2){let e=L(3);D("ngIf",e.showToggleAll&&!e.selectionLimit),E(),D("ngIf",e.filter)}}function nUt(t,i){if(t&1&&(O(0,"div"),Sn(1),ie(2,$5t,2,4,"ng-container",20)(3,iUt,2,2,"ng-template",null,9,di),M()),t&2){let e=Oi(4),n=L(2);Pe(n.cx("header")),E(2),D("ngIf",n.filterTemplate||n._filterTemplate)("ngIfElse",e)}}function rUt(t,i){t&1&&Li(0)}function oUt(t,i){if(t&1&&ie(0,rUt,1,0,"ng-container",27),t&2){let e=i.$implicit,n=i.options;L(2);let r=Oi(9);D("ngTemplateOutlet",r)("ngTemplateOutletContext",na(2,m$e,e,n))}}function aUt(t,i){t&1&&Li(0)}function sUt(t,i){if(t&1&&ie(0,aUt,1,0,"ng-container",27),t&2){let e=i.options,n=L(4);D("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",Yi(2,p$e,e))}}function lUt(t,i){t&1&&(fi(0),ie(1,sUt,1,4,"ng-template",null,14,di),gi())}function cUt(t,i){if(t&1){let e=qe();O(0,"p-scroller",48,13),te("onLazyLoad",function(r){se(e);let o=L(2);return le(o.onLazyLoad.emit(r))}),ie(2,oUt,1,5,"ng-template",null,3,di)(4,lUt,3,0,"ng-container",19),M()}if(t&2){let e=L(2);is(Yi(9,Z$,e.scrollHeight)),D("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),E(4),D("ngIf",e.loaderTemplate||e._loaderTemplate)}}function dUt(t,i){t&1&&Li(0)}function uUt(t,i){if(t&1&&(fi(0),ie(1,dUt,1,0,"ng-container",27),gi()),t&2){L();let e=Oi(9),n=L();E(),D("ngTemplateOutlet",e)("ngTemplateOutletContext",na(3,m$e,n.visibleOptions(),Vr(2,c5t)))}}function pUt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2).$implicit,n=L(3);E(),Pt(n.getOptionGroupLabel(e.optionGroup))}}function mUt(t,i){t&1&&Li(0)}function hUt(t,i){if(t&1&&(fi(0),O(1,"li",52),ie(2,pUt,2,1,"span",19)(3,mUt,1,0,"ng-container",27),M(),gi()),t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),Pe(a.cx("optionGroup")),D("ngStyle",Yi(7,Z$,o.itemSize+"px")),lt("id",a.id+"_"+a.getOptionIndex(r,o)),E(),D("ngIf",!a.groupTemplate),E(),D("ngTemplateOutlet",a.groupTemplate)("ngTemplateOutletContext",Yi(9,u$e,n.optionGroup))}}function fUt(t,i){if(t&1){let e=qe();fi(0),O(1,"p-multiselect-item",53),te("onClick",function(r){se(e);let o=L().index,a=L().options,c=L(2);return le(c.onOptionSelect(r,!1,c.getOptionIndex(o,a)))})("onMouseEnter",function(r){se(e);let o=L().index,a=L().options,c=L(2);return le(c.onOptionMouseEnter(r,c.getOptionIndex(o,a)))}),M(),gi()}if(t&2){let e=L(),n=e.$implicit,r=e.index,o=L().options,a=L(2);E(),D("id",a.id+"_"+a.getOptionIndex(r,o))("option",n)("selected",a.isSelected(n))("label",a.getOptionLabel(n))("disabled",a.isOptionDisabled(n))("template",a.itemTemplate||a._itemTemplate)("itemCheckboxIconTemplate",a.itemCheckboxIconTemplate||a._itemCheckboxIconTemplate)("itemSize",o.itemSize)("focused",a.focusedOptionIndex()===a.getOptionIndex(r,o)),uc("ariaPosInset",a.getAriaPosInset(a.getOptionIndex(r,o)))("ariaSetSize",a.ariaSetSize),D("variant",a.$variant())("highlightOnSelect",a.highlightOnSelect)}}function gUt(t,i){if(t&1&&ie(0,hUt,4,11,"ng-container",19)(1,fUt,2,13,"ng-container",19),t&2){let e=i.$implicit,n=L(3);D("ngIf",n.isOptionGroup(e)),E(),D("ngIf",!n.isOptionGroup(e))}}function _Ut(t,i){if(t&1&&ee(0),t&2){let e=L(4);gn(" ",e.emptyFilterMessageLabel," ")}}function yUt(t,i){t&1&&Li(0)}function vUt(t,i){if(t&1&&ie(0,yUt,1,0,"ng-container",30),t&2){let e=L(4);D("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyFilterTemplate)}}function bUt(t,i){if(t&1&&(O(0,"li",52),yt(1,_Ut,1,1)(2,vUt,1,1,"ng-container"),M()),t&2){let e=L().options,n=L(2);Pe(n.cx("emptyMessage")),D("ngStyle",Yi(4,Z$,e.itemSize+"px")),E(),vt(!n.emptyFilterTemplate&&!n._emptyFilterTemplate&&!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function CUt(t,i){if(t&1&&ee(0),t&2){let e=L(4);gn(" ",e.emptyMessageLabel," ")}}function xUt(t,i){t&1&&Li(0)}function SUt(t,i){if(t&1&&ie(0,xUt,1,0,"ng-container",30),t&2){let e=L(4);D("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function wUt(t,i){if(t&1&&(O(0,"li",52),yt(1,CUt,1,1)(2,SUt,1,1,"ng-container"),M()),t&2){let e=L().options,n=L(2);Pe(n.cx("emptyMessage")),D("ngStyle",Yi(4,Z$,e.itemSize+"px")),E(),vt(!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function IUt(t,i){if(t&1&&(O(0,"ul",49,15),ie(2,gUt,2,2,"ng-template",50)(3,bUt,3,6,"li",51)(4,wUt,3,6,"li",51),M()),t&2){let e=i.$implicit,n=i.options,r=L(2);is(n.contentStyle),Pe(r.cn(r.cx("list"),n.contentStyleClass)),lt("aria-label",r.listLabel),E(2),D("ngForOf",e),E(),D("ngIf",r.hasFilter()&&r.isEmpty()),E(),D("ngIf",!r.hasFilter()&&r.isEmpty())}}function TUt(t,i){t&1&&Li(0)}function EUt(t,i){if(t&1&&(O(0,"div"),Sn(1,1),ie(2,TUt,1,0,"ng-container",30),M()),t&2){let e=L(2);E(2),D("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function AUt(t,i){if(t&1){let e=qe();O(0,"div",36)(1,"span",37,6),te("focus",function(r){se(e);let o=L();return le(o.onFirstHiddenFocus(r))}),M(),ie(3,G5t,1,0,"ng-container",30)(4,nUt,5,4,"div",31),O(5,"div"),ie(6,cUt,5,11,"p-scroller",38)(7,uUt,2,6,"ng-container",19)(8,IUt,5,8,"ng-template",null,7,di),M(),ie(10,EUt,3,1,"div",19),O(11,"span",37,8),te("focus",function(r){se(e);let o=L();return le(o.onLastHiddenFocus(r))}),M()()}if(t&2){let e=L();Pe(e.cn(e.cx("overlay"),e.panelStyleClass)),D("ngStyle",e.panelStyle),lt("id",e.id+"_list"),E(),lt("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),E(2),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),E(),D("ngIf",e.showHeader),E(),Pe(e.cx("listContainer")),la("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),E(),D("ngIf",e.virtualScroll),E(),D("ngIf",!e.virtualScroll),E(3),D("ngIf",e.footerFacet||e.footerTemplate||e._footerTemplate),E(),lt("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var DUt=` ${d$e} /* 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'); } `,kUt={root:({instance:t})=>({position:t.$appendTo()==="self"?"relative":void 0})},MUt={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"},mae=(()=>{class t extends br{name="multiselect";theme=DUt;classes=MUt;inlineStyles=kUt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var OUt={provide:Wc,useExisting:No(()=>sy),multi:!0},RUt=(()=>{class t extends ur{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;variant;template;checkIconTemplate;itemCheckboxIconTemplate;highlightOnSelect;onClick=new ve;onMouseEnter=new ve;_componentStyle=ae(mae);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({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",En],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:[Ii([mae]),Tt],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(n,r){n&1&&(O(0,"li",1),te("click",function(a){return r.onOptionClick(a)})("mouseenter",function(a){return r.onOptionMouseEnter(a)}),O(1,"p-checkbox",2),ie(2,kzt,3,0,"ng-container",3),M(),ie(3,Mzt,2,1,"span",3)(4,Ozt,1,0,"ng-container",4),M()),n&2&&(Pe(r.cx("option")),D("ngStyle",Yi(21,Z$,r.itemSize+"px"))("id",r.id),lt("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled)("aria-checked",r.selected),E(),D("ngModel",r.selected)("binary",!0)("tabindex",-1)("variant",r.variant),uc("ariaLabel",r.label),E(),D("ngIf",r.itemCheckboxIconTemplate),E(),D("ngIf",!r.template),E(),D("ngTemplateOutlet",r.template)("ngTemplateOutletContext",Yi(23,u$e,r.option)))},dependencies:[rr,Xr,Jr,Xs,qg,ra,yr,ya,Qc,Un],encapsulation:2})}return t})(),sy=(()=>{class t extends Hb{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){Y7(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=kr();variant=kr();fluid=kr(void 0,{transform:Je});appendTo=kr(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=ae(mae);searchValue;searchTimeout;_selectAll=null;_placeholder=hr(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=Or(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());$appendTo=Or(()=>this.appendTo()||this.config.overlayAppendTo());pcFluid=ae(XT,{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=hr(null);_filterValue=hr(null);_options=hr(null);startRangeIndex=hr(-1);focusedOptionIndex=hr(-1);selectedOptions;clickInProgress=!1;get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(xs.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(xs.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&Ro(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(xs.ARIA).listLabel}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}visibleOptions=Or(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),n=Ibe(e)&&Ta.isObject(e[0]);if(this._filterValue()){let r;if(n?r=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale):r=e.filter(o=>o.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase())),this.group){let o=this.options||[],a=[];return o.forEach(c=>{let g=this.getOptionGroupChildren(c).filter(C=>r.includes(C));g.length>0&&a.push($e(pe({},c),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...g]}))}),this.flatOptions(a)}return r}return e});label=Or(()=>{let e,n=this.modelValue();if(n&&n.length&&this.displaySelectedLabel){if(Ro(this.maxSelectedLabels)&&n.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let r=0;rRo(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,n,r){super(),this.zone=e,this.filterService=n,this.overlayService=r,tu(()=>{let o=this.modelValue(),a=this.getAllVisibleAndNonVisibleOptions();a&&Ro(a)&&(this.optionValue&&this.optionLabel&&o?this.selectedOptions=a.filter(c=>o.includes(c[this.optionLabel])||o.includes(c[this.optionValue])):this.selectedOptions=o,this.cd.markForCheck())})}ngOnInit(){super.ngOnInit(),this.id=this.id||fa("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((n,r,o)=>{n.push({optionGroup:r,group:!0,index:o});let a=this.getOptionGroupChildren(r);return a&&a.forEach(c=>n.push(c)),n},[])}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,n){this.value=e,this.onModelChange(e),this.writeValue(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,n=!1,r=-1){let{originalEvent:o,option:a}=e;if(this.$disabled()||this.isOptionDisabled(a))return;let c=this.isSelected(a),m=null;c?m=this.modelValue().filter(g=>!xd(g,this.getOptionValue(a),this.equalityKey())):m=[...this.modelValue()||[],this.getOptionValue(a)],this.updateModel(m,o),r!==-1&&this.focusedOptionIndex.set(r),n&&Ba(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:m,itemValue:a})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,n=-1,r=-1){if(n===-1&&(n=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(n)),n!==-1&&r!==-1){let o=Math.min(n,r),a=Math.max(n,r),c=this.visibleOptions().slice(o,a+1).filter(m=>this.isValidOption(m)).map(m=>this.getOptionValue(m));this.updateModel(c,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,n=!1){let r=-1;return this.hasSelectedOption()&&(n?(r=this.findPrevSelectedOptionIndex(e),r=r===-1?this.findNextSelectedOptionIndex(e):r):(r=this.findNextSelectedOptionIndex(e),r=r===-1?this.findPrevSelectedOptionIndex(e):r)),r>-1?r:e}findPrevSelectedOptionIndex(e){let n=this.hasSelectedOption()&&e>0?X0(this.visibleOptions().slice(0,e),r=>this.isValidSelectedOption(r)):-1;return n>-1?n:-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 n=this.hasSelectedOption()&&ethis.isValidSelectedOption(r)):-1;return n>-1?n+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return Ro(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?Os(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let n=this.getOptionValue(e);return(this.modelValue()||[]).some(r=>xd(r,n,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,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let r=(this.group?this.flatOptions(this._options()):this._options()||[]).find(o=>!this.isOptionGroup(o)&&xd(this.getOptionValue(o),e,this.equalityKey()));return r?this.getOptionLabel(r):null}getSelectedItemsLabel(){let e=/{(.*?)}/,n=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(xs.SELECTION_MESSAGE);return e.test(n)?n.replace(n.match(e)[0],this.modelValue().length+""):n}getOptionLabel(e){return this.optionLabel?Os(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?Os(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?Os(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Os(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.$disabled()){e.preventDefault();return}let n=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"&&n){let r=this.visibleOptions().filter(o=>this.isValidOption(o)).map(o=>this.getOptionValue(o));this.updateModel(r,e),e.preventDefault();break}!n&&Yk(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,n=!1){n&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),n),this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,n=!1){if(e.altKey&&!n)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,r,this.startRangeIndex()),this.changeFocusedOptionIndex(e,r),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,a=this.findFirstOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,a,this.startRangeIndex()),this.changeFocusedOptionIndex(e,a),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,n=!1){let{currentTarget:r}=e;if(n){let o=r.value.length;r.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1)}else{let o=e.metaKey||e.ctrlKey,a=this.findLastFocusedOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,this.startRangeIndex(),a),this.changeFocusedOptionIndex(e,a),!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,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())Ba(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];!this.isSelected(r)&&this.onOptionSelect({originalEvent:e,option:r})}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 n=e.relatedTarget===this.focusInputViewChild?.nativeElement?k4(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;Ba(n)}onInputFocus(e){this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),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 n=e.target.value;this._filterValue.set(n),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 n=e.relatedTarget===this.focusInputViewChild?.nativeElement?M4(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;Ba(n)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}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 n=this.getAllVisibleAndNonVisibleOptions().filter(m=>this.isSelected(m)&&(this.optionDisabled?Os(m,this.optionDisabled):m&&m.disabled!==void 0?m.disabled:!1)),r=this.allSelected()?this.visibleOptions().filter(m=>!this.isValidOption(m)&&this.isSelected(m)):this.visibleOptions().filter(m=>this.isSelected(m)||this.isValidOption(m)),a=[...this.filter&&!this.allSelected()?this.getAllVisibleAndNonVisibleOptions().filter(m=>this.isSelected(m)&&this.isValidOption(m)):[],...n,...r].map(m=>this.getOptionValue(m)),c=[...new Set(a)];this.updateModel(c,e),(!c.length||c.length===this.getAllVisibleAndNonVisibleOptions().length)&&this.onSelectAllChange.emit({originalEvent:e,checked:!!c.length})}this.partialSelected()&&(this.selectedOptions=null,this.cd.markForCheck()),this.onChange.emit({originalEvent:e,value:this.value}),eo.focus(this.headerCheckboxViewChild?.inputViewChild?.nativeElement),this.headerCheckboxFocus=!0,e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=$r(this.itemsViewChild.nativeElement,`li[id="${n}"]`);r?r.scrollIntoView&&r.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:Ro(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!xd(o,e,this.equalityKey()));this.updateModel(r,n),this.onChange.emit({originalEvent:n,value:r,itemValue:e}),this.onRemove.emit({newValue:r,removed:e}),n&&n.stopPropagation()}findNextOptionIndex(e){let n=ethis.isValidOption(r)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?X0(this.visibleOptions().slice(0,e),r=>this.isValidOption(r)):-1;return n>-1?n:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?X0(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return X0(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(a=>this.isOptionMatched(a)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(a=>this.isOptionMatched(a)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(a=>this.isOptionMatched(a)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}hasFocusableElements(){return WT(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}writeControlValue(e,n){this.value=e,n(e),this.cd.markForCheck()}static \u0275fac=function(n){return new(n||t)(xe(Pn),xe(Kk),xe(Cv))};static \u0275cmp=re({type:t,selectors:[["p-multiSelect"],["p-multiselect"],["p-multi-select"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,s6e,5),Vt(o,a6e,5),Vt(o,Rzt,4),Vt(o,Pzt,4),Vt(o,Nzt,4),Vt(o,Fzt,4),Vt(o,Lzt,4),Vt(o,Bzt,4),Vt(o,Vzt,4),Vt(o,zzt,4),Vt(o,Uzt,4),Vt(o,Hzt,4),Vt(o,Gzt,4),Vt(o,jzt,4),Vt(o,$zt,4),Vt(o,qzt,4),Vt(o,Yzt,4),Vt(o,Kzt,4),Vt(o,Wzt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.footerFacet=a.first),ze(a=Ue())&&(r.headerFacet=a.first),ze(a=Ue())&&(r.itemTemplate=a.first),ze(a=Ue())&&(r.groupTemplate=a.first),ze(a=Ue())&&(r.loaderTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.filterTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.emptyFilterTemplate=a.first),ze(a=Ue())&&(r.emptyTemplate=a.first),ze(a=Ue())&&(r.selectedItemsTemplate=a.first),ze(a=Ue())&&(r.loadingIconTemplate=a.first),ze(a=Ue())&&(r.filterIconTemplate=a.first),ze(a=Ue())&&(r.removeTokenIconTemplate=a.first),ze(a=Ue())&&(r.chipIconTemplate=a.first),ze(a=Ue())&&(r.clearIconTemplate=a.first),ze(a=Ue())&&(r.dropdownIconTemplate=a.first),ze(a=Ue())&&(r.itemCheckboxIconTemplate=a.first),ze(a=Ue())&&(r.headerCheckboxIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(Qzt,5),Xi(Zzt,5),Xi(Xzt,5),Xi(Jzt,5),Xi(e5t,5),Xi(t5t,5),Xi(i5t,5),Xi(n5t,5)),n&2){let o;ze(o=Ue())&&(r.overlayViewChild=o.first),ze(o=Ue())&&(r.filterInputChild=o.first),ze(o=Ue())&&(r.focusInputViewChild=o.first),ze(o=Ue())&&(r.itemsViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first),ze(o=Ue())&&(r.lastHiddenFocusableElementOnOverlay=o.first),ze(o=Ue())&&(r.firstHiddenFocusableElementOnOverlay=o.first),ze(o=Ue())&&(r.headerCheckboxViewChild=o.first)}},hostVars:5,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onContainerClick(a)}),n&2&&(lt("id",r.id),is(r.sx("root")),Pe(r.cn(r.cx("root"),r.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",En],dataKey:"dataKey",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:[2,"selectionLimit","selectionLimit",En],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",En],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:[Ii([OUt,mae]),Tt],ngContentSelectors:o5t,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(n,r){if(n&1){let o=qe();Kn(r5t),O(0,"div",16)(1,"input",17,0),te("focus",function(c){return se(o),le(r.onInputFocus(c))})("blur",function(c){return se(o),le(r.onInputBlur(c))})("keydown",function(c){return se(o),le(r.onKeyDown(c))}),M()(),O(3,"div",18),te("mouseleave",function(){return se(o),le(r.labelContainerMouseLeave())}),O(4,"div"),ie(5,C5t,3,2,"ng-container",19)(6,w5t,3,6,"ng-container",19),M()(),ie(7,D5t,3,2,"ng-container",19),O(8,"div"),ie(9,N5t,3,2,"ng-container",20)(10,H5t,2,2,"ng-template",null,1,di),M(),O(12,"p-overlay",21,2),jf("visibleChange",function(c){return se(o),Fg(r.overlayVisible,c)||(r.overlayVisible=c),le(c)}),te("onAnimationStart",function(c){return se(o),le(r.onOverlayAnimationStart(c))})("onHide",function(){return se(o),le(r.hide())}),ie(14,AUt,13,19,"ng-template",null,3,di),M()}if(n&2){let o=Oi(11);lt("data-p-hidden-accessible",!0),E(),D("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass)("pAutoFocus",r.autofocus),lt("aria-disabled",r.$disabled())("id",r.inputId)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",r.overlayVisible??!1)("aria-controls",r.overlayVisible?r.id+"_list":null)("tabindex",r.$disabled()?-1:r.tabindex)("aria-activedescendant",r.focused?r.focusedOptionId:void 0)("value",r.modelValue())("name",r.name())("required",r.required()?"":void 0)("disabled",r.$disabled()?"":void 0),E(2),Pe(r.cx("labelContainer")),D("pTooltip",r.tooltip)("tooltipDisabled",r._disableTooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass),E(),Pe(r.cx("label")),E(),D("ngIf",!r.selectedItemsTemplate&&!r._selectedItemsTemplate),E(),D("ngIf",r.selectedItemsTemplate||r._selectedItemsTemplate),E(),D("ngIf",r.isVisibleClearIcon),E(),Pe(r.cx("dropdown")),E(),D("ngIf",r.loading)("ngIfElse",o),E(3),D("hostAttrSelector",r.attrSelector),Gf("visible",r.overlayVisible),D("options",r.overlayOptions)("target","@parent")("appendTo",r.$appendTo())}},dependencies:[rr,qa,Vl,Xr,Jr,Xs,RUt,sz,Un,tg,ey,Zh,Qk,z4,Qf,Dm,tM,iM,_p,E5,qg,ra,yr,ya],encapsulation:2,changeDetection:0})}return t})(),VM=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[sy,Un,Un]})}return t})();function PUt(t,i){if(t&1&&(O(0,"div",3)(1,"span"),ee(2),M()()),t&2){let e=i.$implicit;E(),Pe(e.styleClass),E(),Pt(e.resource.name)}}var Pw=(()=>{class t extends F5{_cdr;resourceSelects=[];resourceOptions=void 0;config=N5;resourceName;resourceSelectChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};selectedItemsLabel="{0} ausgew\xE4hlt";constructor(e,n){super(e),this._cdr=n,this._subs.push(this.resourceCtrl.valueChanges.subscribe(r=>{this._onSelect(r)})),this._subs.push(this._resourceOptionsLoaded$.asObservable().subscribe(()=>this._cdr.markForCheck()))}ngOnChanges(e){e.resourceName&&(this._onResourceNameChange(this.resourceName),this.selectedItemsLabel=`{0} ${F$[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 n=[];for(let r of e)if(r.resource)n.push(Promise.resolve(r));else{let o=this._resourceOptionsLoaded$.pipe(On(a=>a.some(c=>c.id===r.id)?$t(a.find(c=>c.id===r.id)):this._resourceService.findById(r.id).pipe(ar(1),ot(c=>this.resourceAsAdminInlineOption(c)),yo(c=>this.addOption(c)))));n.push(ym(o))}Promise.all(n).then(r=>{this.resourceSelects=r.sort((o,a)=>t1.sort(o.resource,a.resource,ME)),this.updateResourceSelectResolvingInProgress(!1),this.resourceCtrl.setValue(this.resourceSelects,{emitEvent:!1})})}static \u0275fac=function(n){return new(n||t)(xe(Rw),xe(dn))};static \u0275cmp=re({type:t,selectors:[["bd-resources-select-inline-multiple"]],inputs:{resourceSelects:"resourceSelects",resourceOptions:"resourceOptions",config:"config",resourceName:"resourceName"},outputs:{resourceSelectChange:"resourceSelectChange"},features:[Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-multiSelect",1),te("onChange",function(c){return se(o),le(r.onChange(c))})("onSelectAllChange",function(c){return se(o),le(r.onSelectAllChange(c))})("onClear",function(){return se(o),le(r.onClearChange())}),ie(2,PUt,3,3,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),D("id","bd-resource-select-inline-multiple-"+r.config.resourceNameTitle)("data-test","bd-resource-select-inline-multiple-"+r.config.resourceNameTitle)("options",r.resourceOptions)("inputId","bd-resource-select-inline-multiple-"+r.config.resourceNameTitle)("formControl",r.resourceCtrl)("showToggleAll",!0)("showClear",!0)("dropdownIcon",r.formLoading?"pi pi-spinner pi-spin":"pi pi-chevron-down")("placeholder",r.config.resourceNameTitle)("filterPlaceHolder",r.config.resourceNameTitle)("emptyFilterMessage",r.config.emptyResourcesText)("maxSelectedLabels",3)("selectedItemsLabel",r.selectedItemsLabel)("overlayOptions",r.overlayOptions),E(3),D("for","bd-resource-select-inline-multiple-"+r.config.resourceNameTitle),E(),Pt(r.config.resourceNameTitle))},dependencies:[VM,sy,ra,yr,oa,Mc,fh,Ho],encapsulation:2})}return t})();function NUt(t,i){if(t&1&&(O(0,"div",4)(1,"span"),ee(2),M()()),t&2){let e=L(2);E(),Pe(e.resourceSelect.styleClass),E(),Pt(e.resourceSelect.resource.name)}}function FUt(t,i){if(t&1&&yt(0,NUt,3,3,"div",4),t&2){let e=L();vt(e.resourceSelect&&e.resourceSelect.resource?0:-1)}}function LUt(t,i){if(t&1&&(O(0,"div",4)(1,"span"),ee(2),M()()),t&2){let e=i.$implicit;E(),Pe(e.styleClass),E(),Pt(e.resource.name)}}var O1e=(()=>{class t extends F5{resourceSelect;resourceOptions=void 0;config=N5;resourceName;resourceSelectChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};constructor(e){super(e),this.resourceCtrl.valueChanges.subscribe(n=>{this._onSelect(n)})}ngOnChanges(e){e.resourceSelect&&e.resourceSelect.currentValue&&this._onResourceSelectChange(this.resourceSelect),e.resourceName&&this._onResourceNameChange(this.resourceName),e.resourceOptions&&(this.resourceOptions=this.resourceOptions.filter(n=>this.config.filterFnc(n.resource)).sort((n,r)=>t1.sort(n.resource,r.resource,ME)))}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 n=null;e.resource?n=Promise.resolve(e):n=ym(this._resourceOptionsLoaded$.asObservable().pipe(On(r=>r.some(o=>o.id===e.id)?$t(r.find(o=>o.id===e.id)):this._resourceService.findById(e.id).pipe(ar(1),ot(o=>this.resourceAsAdminInlineOption(o)),yo(o=>this.addOption(o)))))),n.then(r=>{this.updateResourceSelectResolvingInProgress(!1),this.resourceSelect=r,this.resourceCtrl.setValue(r)})}static \u0275fac=function(n){return new(n||t)(xe(Rw))};static \u0275cmp=re({type:t,selectors:[["bd-resources-select-inline-single"]],inputs:{resourceSelect:"resourceSelect",resourceOptions:"resourceOptions",config:"config",resourceName:"resourceName"},outputs:{resourceSelectChange:"resourceSelectChange"},features:[Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-select",2),te("onChange",function(c){return se(o),le(r.onChange(c))})("onClear",function(){return se(o),le(r.onClearChange())}),ie(2,FUt,1,1,"ng-template",null,0,di)(4,LUt,3,3,"ng-template",null,1,di),M(),O(6,"label",3),ee(7),M()()}n&2&&(E(),D("id","bd-resource-select-inline-single-"+r.config.resourceNameTitle)("options",r.resourceOptions)("overlayOptions",r.overlayOptions)("inputId","bd-resource-select-inline-single-"+r.config.resourceNameTitle)("formControl",r.resourceCtrl)("showClear",(r.config==null?null:r.config.resetOption)===!0||!1)("dropdownIcon",r.formLoading?"pi pi-spinner pi-spin":"pi pi-chevron-down")("filter",!0)("filterPlaceholder",r.config.resourceNameTitle)("placeholder",r.config.resourceNameTitle)("emptyMessage",r.config.emptyResourcesText)("emptyFilterMessage",r.config.emptyResourcesText),E(5),D("for","bd-resource-select-inline-single-"+r.config.resourceNameTitle),E(),Pt(r.config.resourceNameTitle))},dependencies:[ra,yr,oa,Mc,Ho,Us],encapsulation:2})}return t})();var h$e={accept:"*"};var f$e=` .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 BUt=["container"],VUt=["icon"],zUt=["closeicon"],UUt=["*"],HUt=(t,i)=>({showTransitionParams:t,hideTransitionParams:i}),GUt=t=>({value:"visible()",params:t}),jUt=t=>({closeCallback:t});function $Ut(t,i){t&1&&Li(0)}function qUt(t,i){if(t&1&&ie(0,$Ut,1,0,"ng-container",7),t&2){let e=L(2);D("ngTemplateOutlet",e.iconTemplate||e.iconTemplate)}}function YUt(t,i){if(t&1&&be(0,"i"),t&2){let e=L(2);Pe(e.cn(e.cx("icon"),e.icon))}}function KUt(t,i){if(t&1&&be(0,"span",9),t&2){let e=L(3);D("ngClass",e.cx("text"))("innerHTML",e.text,Dx)}}function WUt(t,i){if(t&1&&(O(0,"div"),ie(1,KUt,1,2,"span",8),M()),t&2){let e=L(2);E(),D("ngIf",!e.escape)}}function QUt(t,i){if(t&1&&(O(0,"span",5),ee(1),M()),t&2){let e=L(3);D("ngClass",e.cx("text")),E(),Pt(e.text)}}function ZUt(t,i){if(t&1&&ie(0,QUt,2,2,"span",10),t&2){let e=L(2);D("ngIf",e.escape&&e.text)}}function XUt(t,i){t&1&&Li(0)}function JUt(t,i){if(t&1&&ie(0,XUt,1,0,"ng-container",11),t&2){let e=L(2);D("ngTemplateOutlet",e.containerTemplate||e.containerTemplate)("ngTemplateOutletContext",Yi(2,jUt,e.close.bind(e)))}}function e6t(t,i){if(t&1&&(O(0,"span",5),Sn(1),M()),t&2){let e=L(2);D("ngClass",e.cx("text"))}}function t6t(t,i){if(t&1&&be(0,"i",5),t&2){let e=L(3);Pe(e.cn(e.cx("closeIcon"),e.closeIcon)),D("ngClass",e.closeIcon)}}function i6t(t,i){t&1&&Li(0)}function n6t(t,i){if(t&1&&ie(0,i6t,1,0,"ng-container",7),t&2){let e=L(3);D("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function r6t(t,i){if(t&1&&(Pi(),be(0,"svg",15)),t&2){let e=L(3);Pe(e.cx("closeIcon"))}}function o6t(t,i){if(t&1){let e=qe();O(0,"button",12),te("click",function(r){se(e);let o=L(2);return le(o.close(r))}),yt(1,t6t,1,3,"i",13),yt(2,n6t,1,1,"ng-container"),yt(3,r6t,1,2,":svg:svg",14),M()}if(t&2){let e=L(2);Pe(e.cx("closeButton")),lt("aria-label",e.closeAriaLabel),E(),vt(e.closeIcon?1:-1),E(),vt(e.closeIconTemplate||e._closeIconTemplate?2:-1),E(),vt(!e.closeIconTemplate&&!e._closeIconTemplate&&!e.closeIcon?3:-1)}}function a6t(t,i){if(t&1&&(O(0,"div",2)(1,"div"),yt(2,qUt,1,1,"ng-container"),yt(3,YUt,1,2,"i",3),ie(4,WUt,2,1,"div",4)(5,ZUt,1,1,"ng-template",null,0,di),yt(7,JUt,1,4,"ng-container")(8,e6t,2,1,"span",5),yt(9,o6t,4,6,"button",6),M()()),t&2){let e=Oi(6),n=L();Pe(n.cn(n.cx("root"),n.styleClass)),D("@messageAnimation",Yi(16,GUt,na(13,HUt,n.showTransitionOptions,n.hideTransitionOptions))),lt("aria-live","polite")("role","alert"),E(),Pe(n.cx("content")),E(),vt(n.iconTemplate||n._iconTemplate?2:-1),E(),vt(n.icon?3:-1),E(),D("ngIf",!n.escape)("ngIfElse",e),E(3),vt(n.containerTemplate||n._containerTemplate?7:8),E(2),vt(n.closable?9:-1)}}var s6t={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"},g$e=(()=>{class t extends br{name="message";theme=f$e;classes=s6t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var iF=(()=>{class t extends ur{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=hr(!0);_componentStyle=ae(g$e);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-message"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,BUt,4),Vt(o,VUt,4),Vt(o,zUt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.containerTemplate=a.first),ze(a=Ue())&&(r.iconTemplate=a.first),ze(a=Ue())&&(r.closeIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},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:[Ii([g$e]),Tt],ngContentSelectors:UUt,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(n,r){n&1&&(Kn(),yt(0,a6t,10,18,"div",1)),n&2&&vt(r.visible()?0:-1)},dependencies:[rr,qa,Xr,Jr,Qf,Qc,Un],encapsulation:2,data:{animation:[Wp("messageAnimation",[Oc(":enter",[ul({opacity:0,transform:"translateY(-25%)"}),Jl("{{showTransitionParams}}")]),Oc(":leave",[Jl("{{hideTransitionParams}}",ul({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return t})(),fae=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[iF,Un,Un]})}return t})();var l6t=["content"],c6t=t=>({$implicit:t});function d6t(t,i){if(t&1&&(O(0,"div"),ee(1),M()),t&2){let e=L(2);la("display",e.value!=null&&e.value!==0?"flex":"none"),lt("data-pc-section","label"),E(),Pd("",e.value,"",e.unit)}}function u6t(t,i){t&1&&Li(0)}function p6t(t,i){if(t&1&&(O(0,"div")(1,"div"),ie(2,d6t,2,5,"div",2)(3,u6t,1,0,"ng-container",3),M()()),t&2){let e=L();Pe(e.cn(e.cx("value"),e.valueStyleClass)),la("width",e.value+"%")("display","flex")("background",e.color),lt("data-pc-section","value"),E(),Pe(e.cx("label")),E(),D("ngIf",e.showValue&&!e.contentTemplate&&!e._contentTemplate),E(),D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Yi(14,c6t,e.value))}}function m6t(t,i){if(t&1&&be(0,"div"),t&2){let e=L();Pe(e.cn(e.cx("value"),e.valueStyleClass)),la("background",e.color),lt("data-pc-section","value")}}var h6t={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"},y$e=(()=>{class t extends br{name="progressbar";theme=Die;classes=h6t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var v$e=(()=>{class t extends ur{value;showValue=!0;styleClass;valueStyleClass;unit="%";mode="determinate";color;contentTemplate;_componentStyle=ae(y$e);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-progressBar"],["p-progressbar"],["p-progress-bar"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,l6t,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:8,hostBindings:function(n,r){n&2&&(lt("aria-valuemin",0)("aria-valuenow",r.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root")("aria-level",r.value+r.unit),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{value:[2,"value","value",En],showValue:[2,"showValue","showValue",Je],styleClass:"styleClass",valueStyleClass:"valueStyleClass",unit:"unit",mode:"mode",color:"color"},features:[Ii([y$e]),Tt],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(n,r){n&1&&ie(0,p6t,4,16,"div",0)(1,m6t,1,5,"div",1),n&2&&(D("ngIf",r.mode==="determinate"),E(),D("ngIf",r.mode==="indeterminate"))},dependencies:[rr,Xr,Jr,Un],encapsulation:2,changeDetection:0})}return t})();var b$e=` .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 f6t=["pFileContent",""],g6t=(t,i,e)=>({class:t,file:i,index:e}),_6t=(t,i)=>(i==null?null:i.name)+"-"+t;function y6t(t,i){}function v6t(t,i){t&1&&ie(0,y6t,0,0,"ng-template")}function b6t(t,i){if(t&1&&ie(0,v6t,1,0,null,6),t&2){let e=L().class,n=L(),r=n.$implicit,o=n.$index,a=L();D("ngTemplateOutlet",a.fileRemoveIconTemplate())("ngTemplateOutletContext",Qu(2,g6t,e,r,o))}}function C6t(t,i){if(t&1&&(Pi(),be(0,"svg",7)),t&2){let e=L().class;Pe(e),lt("aria-hidden",!0)}}function x6t(t,i){if(t&1&&yt(0,b6t,1,6)(1,C6t,1,3,":svg:svg",5),t&2){let e=L(2);vt(e.fileRemoveIconTemplate()?0:1)}}function S6t(t,i){if(t&1){let e=qe();O(0,"div"),be(1,"img",2),O(2,"div")(3,"div"),ee(4),M(),O(5,"span"),ee(6),M()(),be(7,"p-badge",3),O(8,"div")(9,"p-button",4),te("onClick",function(r){let o=se(e).$index,a=L();return le(a.onRemoveClick(r,o))}),ie(10,x6t,2,1,"ng-template",null,0,di),M()()()}if(t&2){let e=i.$implicit,n=L();Pe(n.cx("file")),E(),Pe(n.cx("fileThumbnail")),D("src",e.objectURL,td)("width",n.previewWidth()),lt("alt",e.name),E(),Pe(n.cx("fileInfo")),E(),Pe(n.cx("fileName")),E(),Pt(e.name),E(),Pe(n.cx("fileSize")),E(),Pt(n.formatSize(e.size)),E(),Pe(n.cx("pcFileBadge")),D("value",n.badgeValue())("severity",n.badgeSeverity()),E(),Pe(n.cx("fileActions")),E(),D("styleClass",n.cx("pcFileRemoveButton"))}}var w6t=["file"],I6t=["header"],C$e=["content"],T6t=["toolbar"],E6t=["chooseicon"],A6t=["filelabel"],D6t=["uploadicon"],k6t=["cancelicon"],M6t=["empty"],O6t=["advancedfileinput"],R6t=["basicfileinput"],P6t=(t,i,e,n,r)=>({$implicit:t,uploadedFiles:i,chooseCallback:e,clearCallback:n,uploadCallback:r}),N6t=(t,i,e,n,r,o,a,c)=>({$implicit:t,uploadedFiles:i,chooseCallback:e,clearCallback:n,removeUploadedFileCallback:r,removeFileCallback:o,progress:a,messages:c}),F6t=t=>({$implicit:t});function L6t(t,i){if(t&1&&be(0,"span"),t&2){let e=L(4);Pe(e.chooseIcon),lt("aria-label",!0)("data-pc-section","chooseicon")}}function B6t(t,i){t&1&&(Pi(),be(0,"svg",15)),t&2&<("aria-label",!0)("data-pc-section","chooseicon")}function V6t(t,i){}function z6t(t,i){t&1&&ie(0,V6t,0,0,"ng-template")}function U6t(t,i){if(t&1&&(O(0,"span"),ie(1,z6t,1,0,null,10),M()),t&2){let e=L(5);lt("aria-label",!0)("data-pc-section","chooseicon"),E(),D("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function H6t(t,i){if(t&1&&(fi(0),ie(1,B6t,1,2,"svg",14)(2,U6t,2,3,"span",8),gi()),t&2){let e=L(4);E(),D("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),E(),D("ngIf",e.chooseIconTemplate||e._chooseIconTemplate)}}function G6t(t,i){if(t&1&&ie(0,L6t,1,4,"span",5)(1,H6t,3,2,"ng-container",8),t&2){let e=L(3);D("ngIf",e.chooseIcon),E(),D("ngIf",!e.chooseIcon)}}function j6t(t,i){if(t&1&&be(0,"span",18),t&2){let e=L(5);D("ngClass",e.uploadIcon),lt("aria-hidden",!0)}}function $6t(t,i){t&1&&(Pi(),be(0,"svg",20))}function q6t(t,i){}function Y6t(t,i){t&1&&ie(0,q6t,0,0,"ng-template")}function K6t(t,i){if(t&1&&(O(0,"span"),ie(1,Y6t,1,0,null,10),M()),t&2){let e=L(6);lt("aria-hidden",!0),E(),D("ngTemplateOutlet",e.uploadIconTemplate||e._uploadIconTemplate)}}function W6t(t,i){if(t&1&&(fi(0),ie(1,$6t,1,0,"svg",19)(2,K6t,2,2,"span",8),gi()),t&2){let e=L(5);E(),D("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),E(),D("ngIf",e.uploadIconTemplate||e._uploadIconTemplate)}}function Q6t(t,i){if(t&1&&ie(0,j6t,1,2,"span",17)(1,W6t,3,2,"ng-container",8),t&2){let e=L(4);D("ngIf",e.uploadIcon),E(),D("ngIf",!e.uploadIcon)}}function Z6t(t,i){if(t&1){let e=qe();O(0,"p-button",16),te("onClick",function(){se(e);let r=L(3);return le(r.upload())}),ie(1,Q6t,2,2,"ng-template",null,2,di),M()}if(t&2){let e=L(3);D("label",e.uploadButtonLabel)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.cn(e.cx("pcUploadButton"),e.uploadStyleClass))("buttonProps",e.uploadButtonProps)}}function X6t(t,i){if(t&1&&be(0,"span",18),t&2){let e=L(5);D("ngClass",e.cancelIcon)}}function J6t(t,i){t&1&&(Pi(),be(0,"svg",22)),t&2&<("aria-hidden",!0)}function e8t(t,i){}function t8t(t,i){t&1&&ie(0,e8t,0,0,"ng-template")}function i8t(t,i){if(t&1&&(O(0,"span"),ie(1,t8t,1,0,null,10),M()),t&2){let e=L(6);lt("aria-hidden",!0),E(),D("ngTemplateOutlet",e.cancelIconTemplate||e._cancelIconTemplate)}}function n8t(t,i){if(t&1&&(fi(0),ie(1,J6t,1,1,"svg",21)(2,i8t,2,2,"span",8),gi()),t&2){let e=L(5);E(),D("ngIf",!e.cancelIconTemplate&&!e._cancelIconTemplate),E(),D("ngIf",e.cancelIconTemplate||e._cancelIconTemplate)}}function r8t(t,i){if(t&1&&ie(0,X6t,1,1,"span",17)(1,n8t,3,2,"ng-container",8),t&2){let e=L(4);D("ngIf",e.cancelIcon),E(),D("ngIf",!e.cancelIcon)}}function o8t(t,i){if(t&1){let e=qe();O(0,"p-button",16),te("onClick",function(){se(e);let r=L(3);return le(r.clear())}),ie(1,r8t,2,2,"ng-template",null,2,di),M()}if(t&2){let e=L(3);D("label",e.cancelButtonLabel)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cn(e.cx("pcCancelButton"),e.cancelStyleClass))("buttonProps",e.cancelButtonProps)}}function a8t(t,i){if(t&1){let e=qe();fi(0),O(1,"p-button",12),te("focus",function(){se(e);let r=L(2);return le(r.onFocus())})("blur",function(){se(e);let r=L(2);return le(r.onBlur())})("onClick",function(){se(e);let r=L(2);return le(r.choose())})("keydown.enter",function(){se(e);let r=L(2);return le(r.choose())}),O(2,"input",7,0),te("change",function(r){se(e);let o=L(2);return le(o.onFileSelect(r))}),M(),ie(4,G6t,2,2,"ng-template",null,2,di),M(),ie(6,Z6t,3,4,"p-button",13)(7,o8t,3,4,"p-button",13),gi()}if(t&2){let e=L(2);E(),D("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled||e.isChooseDisabled())("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),lt("data-pc-section","choosebutton"),E(),D("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),lt("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),E(4),D("ngIf",!e.auto&&e.showUploadButton),E(),D("ngIf",!e.auto&&e.showCancelButton)}}function s8t(t,i){t&1&&Li(0)}function l8t(t,i){t&1&&Li(0)}function c8t(t,i){t&1&&Li(0)}function d8t(t,i){if(t&1&&ie(0,c8t,1,0,"ng-container",9),t&2){let e=L(2);D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Y0e(2,N6t,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 u8t(t,i){if(t&1&&be(0,"p-progressbar",26),t&2){let e=L(3);D("value",e.progress)("showValue",!1)}}function p8t(t,i){if(t&1&&be(0,"p-message",24),t&2){let e=i.$implicit;D("severity",e.severity)("text",e.text)}}function m8t(t,i){}function h8t(t,i){if(t&1){let e=qe();O(0,"div",29),te("onRemove",function(r){se(e);let o=L(4);return le(o.onRemoveClick(r))}),M()}if(t&2){let e=L(4);D("files",e.files)("badgeValue",e.pendingLabel)("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function f8t(t,i){if(t&1&&(O(0,"div"),ie(1,m8t,0,0,"ng-template",27),yt(2,h8t,1,4,"div",28),M()),t&2){let e=L(3);Pe(e.cx("fileList")),E(),D("ngForOf",e.files)("ngForTemplate",e.fileTemplate||e._fileTemplate),E(),vt(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function g8t(t,i){}function _8t(t,i){if(t&1){let e=qe();O(0,"div",31),te("onRemove",function(r){se(e);let o=L(4);return le(o.onRemoveUploadedFileClick(r))}),M()}if(t&2){let e=L(4);D("files",e.uploadedFiles)("badgeValue",e.completedLabel())("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function y8t(t,i){if(t&1&&(O(0,"div"),ie(1,g8t,0,0,"ng-template",27),yt(2,_8t,1,4,"div",30),M()),t&2){let e=L(3);Pe(e.cx("fileList")),E(),D("ngForOf",e.uploadedFiles)("ngForTemplate",e.fileTemplate||e._fileTemplate),E(),vt(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function v8t(t,i){if(t&1&&(ie(0,u8t,1,2,"p-progressbar",23),Qo(1,p8t,1,2,"p-message",24,ms),yt(3,f8t,3,5,"div",25),yt(4,y8t,3,5,"div",25)),t&2){let e=L(2);D("ngIf",e.hasFiles()),E(),Zo(e.msgs),E(2),vt(e.hasFiles()?3:-1),E(),vt(e.hasUploadedFiles()?4:-1)}}function b8t(t,i){t&1&&Li(0)}function C8t(t,i){if(t&1&&ie(0,b8t,1,0,"ng-container",10),t&2){let e=L(2);D("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function x8t(t,i){if(t&1){let e=qe();O(0,"div",6)(1,"input",7,0),te("change",function(r){se(e);let o=L();return le(o.onFileSelect(r))}),M(),O(3,"div"),ie(4,a8t,8,13,"ng-container",8)(5,s8t,1,0,"ng-container",9)(6,l8t,1,0,"ng-container",10),M(),O(7,"div",11,1),te("dragenter",function(r){se(e);let o=L();return le(o.onDragEnter(r))})("dragleave",function(r){se(e);let o=L();return le(o.onDragLeave(r))})("drop",function(r){se(e);let o=L();return le(o.onDrop(r))}),yt(9,d8t,1,11,"ng-container")(10,v8t,5,3),yt(11,C8t,1,1,"ng-container"),M()()}if(t&2){let e=L();Pe(e.cn(e.cx("root"),e.styleClass)),D("ngStyle",e.style),lt("data-pc-name","fileupload")("data-pc-section","root"),E(),la("display","none"),D("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),lt("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),E(2),Pe(e.cx("header")),E(),D("ngIf",!e.headerTemplate&&!e._headerTemplate),E(),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",hP(24,P6t,e.files,e.uploadedFiles,e.choose.bind(e),e.clear.bind(e),e.upload.bind(e))),E(),D("ngTemplateOutlet",e.toolbarTemplate||e._toolbarTemplate),E(),Pe(e.cx("content")),lt("data-pc-section","content"),E(2),vt(e.contentTemplate||e._contentTemplate?9:10),E(2),vt((e.emptyTemplate||e._emptyTemplate)&&!e.hasFiles()&&!e.hasUploadedFiles()?11:-1)}}function S8t(t,i){if(t&1&&be(0,"p-message",24),t&2){let e=i.$implicit;D("severity",e.severity)("text",e.text)}}function w8t(t,i){if(t&1&&be(0,"span",35),t&2){let e=L(4);D("ngClass",e.uploadIcon)}}function I8t(t,i){t&1&&(Pi(),be(0,"svg",20)),t&2&&Pe("p-button-icon p-button-icon-left")}function T8t(t,i){}function E8t(t,i){t&1&&ie(0,T8t,0,0,"ng-template")}function A8t(t,i){if(t&1&&(O(0,"span",38),ie(1,E8t,1,0,null,10),M()),t&2){let e=L(5);E(),D("ngTemplateOutlet",e._uploadIconTemplate||e.uploadIconTemplate)}}function D8t(t,i){if(t&1&&(fi(0),ie(1,I8t,1,2,"svg",36)(2,A8t,2,1,"span",37),gi()),t&2){let e=L(4);E(),D("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),E(),D("ngIf",e._uploadIconTemplate||e.uploadIconTemplate)}}function k8t(t,i){if(t&1&&ie(0,w8t,1,1,"span",34)(1,D8t,3,2,"ng-container",8),t&2){let e=L(3);D("ngIf",e.uploadIcon),E(),D("ngIf",!e.uploadIcon)}}function M8t(t,i){if(t&1&&be(0,"span",40),t&2){let e=L(4);D("ngClass",e.chooseIcon)}}function O8t(t,i){t&1&&(Pi(),be(0,"svg",15)),t&2&<("data-pc-section","uploadicon")}function R8t(t,i){}function P8t(t,i){t&1&&ie(0,R8t,0,0,"ng-template")}function N8t(t,i){if(t&1&&(fi(0),ie(1,O8t,1,1,"svg",14)(2,P8t,1,0,null,10),gi()),t&2){let e=L(4);E(),D("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),E(),D("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function F8t(t,i){if(t&1&&ie(0,M8t,1,1,"span",39)(1,N8t,3,2,"ng-container",8),t&2){let e=L(3);D("ngIf",e.chooseIcon),E(),D("ngIf",!e.chooseIcon)}}function L8t(t,i){if(t&1&&yt(0,k8t,2,2)(1,F8t,2,2),t&2){let e=L(2);vt(e.hasFiles()&&!e.auto?0:1)}}function B8t(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(3);E(),gn(" ",e.basicFileChosenLabel()," ")}}function V8t(t,i){t&1&&Li(0)}function z8t(t,i){if(t&1&&ie(0,V8t,1,0,"ng-container",9),t&2){let e=L(3);D("ngTemplateOutlet",e.fileLabelTemplate||e._fileLabelTemplate)("ngTemplateOutletContext",Yi(2,F6t,e.files))}}function U8t(t,i){if(t&1&&yt(0,B8t,2,1,"span")(1,z8t,1,4,"ng-container"),t&2){let e=L(2);vt(!e.fileLabelTemplate&&!e._fileLabelTemplate?0:1)}}function H8t(t,i){if(t&1){let e=qe();O(0,"div"),Qo(1,S8t,1,2,"p-message",24,ms),O(3,"div")(4,"p-button",32),te("onClick",function(){se(e);let r=L();return le(r.onBasicUploaderClick())})("keydown",function(r){se(e);let o=L();return le(o.onBasicKeydown(r))}),ie(5,L8t,2,1,"ng-template",null,2,di),O(7,"input",33,3),te("change",function(r){se(e);let o=L();return le(o.onFileSelect(r))})("focus",function(){se(e);let r=L();return le(r.onFocus())})("blur",function(){se(e);let r=L();return le(r.onBlur())}),M()(),yt(9,U8t,2,1),M()()}if(t&2){let e=L();Pe(e.cn(e.cx("root"),e.styleClass)),lt("data-pc-name","fileupload"),E(),Zo(e.msgs),E(2),Pe(e.cx("basicContent")),E(),is(e.style),D("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled)("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),E(3),D("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled),lt("aria-label",e.browseFilesLabel)("data-pc-section","input"),E(2),vt(e.auto?-1:9)}}var G8t={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"},gae=(()=>{class t extends br{name="fileupload";theme=b$e;classes=G8t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var j8t=(()=>{class t extends ur{_componentStyle=ae(gae);onRemove=LVe();files=kr();badgeSeverity=kr("warn");badgeValue=kr();previewWidth=kr(50);fileRemoveIconTemplate=kr();onRemoveClick(e,n){this.onRemove.emit({event:e,index:n})}formatSize(e){let o=this.config.getTranslation(xs.FILE_SIZE_TYPES);if(e===0)return`0 ${o[0]}`;let a=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,a)).toFixed(3)} ${o[a]}`}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["","pFileContent",""]],inputs:{files:[1,"files"],badgeSeverity:[1,"badgeSeverity"],badgeValue:[1,"badgeValue"],previewWidth:[1,"previewWidth"],fileRemoveIconTemplate:[1,"fileRemoveIconTemplate"]},outputs:{onRemove:"onRemove"},features:[Ii([gae]),Tt],attrs:f6t,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(n,r){n&1&&Qo(0,S6t,12,22,"div",1,_6t),n&2&&Zo(r.files())},dependencies:[rr,Jr,JT,Yl,Qf],encapsulation:2,changeDetection:0})}return t})(),_ae=(()=>{class t extends ur{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 n=0;n{this.cd.markForCheck()})}ngAfterViewInit(){super.ngAfterViewInit(),Js(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 n=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let r=0;rthis.maxFileSize){let n=`${this.invalidFileSizeMessageSummary.replace("{0}",e.name)} ${this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}`;return this.msgs.push({severity:"error",text:n}),!1}return!0}isFileTypeValid(e){let n=this.accept?.split(",").map(r=>r.trim());for(let r of n)if(this.isWildcard(r)?this.getTypeClass(e.type)===this.getTypeClass(r):e.type==r||this.getFileExtension(e).toLowerCase()===r.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 n=0;n{switch(n.type){case Rx.Sent:this.onSend.emit({originalEvent:n,formData:e});break;case Rx.Response:this.uploading=!1,this.progress=0,n.status>=200&&n.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:n,files:this.files})):this.onError.emit({files:this.files}),this.uploadedFiles=[...this.uploadedFiles,...this.files],this.clear();break;case Rx.UploadProgress:{n.loaded&&(this.progress=Math.round(n.loaded*100/n.total)),this.onProgress.emit({originalEvent:n,progress:this.progress});break}}this.cd.markForCheck()},n=>{this.uploading=!1,this.onError.emit({files:this.files,error:n})})}}onRemoveClick(e){let{event:n,index:r}=e;this.hasFiles()&&this.remove(n,r)}onRemoveUploadedFileClick(e){let{event:n,index:r}=e;this.hasUploadedFiles()&&this.removeUploadedFile(r)}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.msgs=[],this.cd.markForCheck()}remove(e,n){this.clearInputElement(),this.onRemove.emit({originalEvent:e,file:this.files[n]}),this.files.splice(n,1),this.checkFileLimit(this.files)}removeUploadedFile(e){let n=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.onRemoveUploadedFile.emit({file:n,files:this.uploadedFiles})}isFileLimitExceeded(){let n=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=n&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0&&this.fileLimit&&this.fileLimit!r.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||(nu(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||qp(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){qp(this.content?.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let n=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||n&&n.length===1)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){let o=this.getTranslation(xs.FILE_SIZE_TYPES);if(e===0)return`0 ${o[0]}`;let a=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,a)).toFixed(3)} ${o[a]}`}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(xs.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(xs.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(xs.CANCEL)}get browseFilesLabel(){return this.config.getTranslation(xs.ARIA)[xs.BROWSE_FILES]}get pendingLabel(){return this.config.getTranslation(xs.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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-fileupload"],["p-fileUpload"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,w6t,4),Vt(o,I6t,4),Vt(o,C$e,4),Vt(o,T6t,4),Vt(o,E6t,4),Vt(o,A6t,4),Vt(o,D6t,4),Vt(o,k6t,4),Vt(o,M6t,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.fileTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.toolbarTemplate=a.first),ze(a=Ue())&&(r.chooseIconTemplate=a.first),ze(a=Ue())&&(r.fileLabelTemplate=a.first),ze(a=Ue())&&(r.uploadIconTemplate=a.first),ze(a=Ue())&&(r.cancelIconTemplate=a.first),ze(a=Ue())&&(r.emptyTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(O6t,5),Xi(R6t,5),Xi(C$e,5)),n&2){let o;ze(o=Ue())&&(r.advancedFileInput=o.first),ze(o=Ue())&&(r.basicFileInput=o.first),ze(o=Ue())&&(r.content=o.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",En],invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:[2,"previewWidth","previewWidth",En],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=>En(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:[Ii([gae]),Tt],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(n,r){n&1&&ie(0,x8t,12,30,"div",4)(1,H8t,10,17,"div",5),n&2&&(D("ngIf",r.mode==="advanced"),E(),D("ngIf",r.mode==="basic"))},dependencies:[rr,qa,Vl,Xr,Jr,Xs,Yl,v$e,iF,Z7,N6e,Qf,Un,j8t],encapsulation:2,changeDetection:0})}return t})();function $8t(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-fileupload",1),te("onSelect",function(r){se(e);let o=L();return le(o.onFileSelect(r))}),M()()}if(t&2){let e=L();E(),D("accept",e.config.accept)("auto",!0)}}function q8t(t,i){if(t&1){let e=qe();O(0,"div",0)(1,"div",2)(2,"span",3),ee(3),M()(),O(4,"div",4)(5,"button",5),te("click",function(){se(e);let r=L();return le(r.onFileRemove())}),O(6,"mat-icon"),ee(7,"delete"),M()()()()}if(t&2){let e=L();E(3),Pt(e.file.name)}}var x$e=(()=>{class t{file;config=h$e;disabled=!1;fileChange=new ve;onFileSelect(e){let n=e.files;n.length>0&&this._setFile(n[0])}onFileRemove(){this._setFile(null)}_setFile(e){this.file=e,this.fileChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&yt(0,$8t,2,2,"div")(1,q8t,8,1,"div",0),n&2&&vt(r.file?1:0)},dependencies:[so,il,da,zr,_ae],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 X$=(()=>{class t{labels=[];labelOptions;labelsChange=new ve;inputControl=new ho([]);suggestions=[];constructor(){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 n=[...this.labelOptions??[]];e.query.length===0?this.suggestions=[...n]:this.suggestions=[e.query,...n.filter(r=>r.toLowerCase().includes(e.query.toLowerCase()))]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-ui-labels-input"]],inputs:{labels:"labels",labelOptions:"labelOptions"},outputs:{labelsChange:"labelsChange"},features:[Yt],decls:4,vars:3,consts:[["multiple","","fluid","","variant","filled","inputId","labels-input",3,"completeMethod","formControl","suggestions","typeahead"],["for","labels-input"]],template:function(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-autoComplete",0),te("completeMethod",function(a){return r.onCompleteMethod(a)}),M(),O(2,"label",1),ee(3,"Labels"),M()()),n&2&&(E(),D("formControl",r.inputControl)("suggestions",r.suggestions)("typeahead",!0))},dependencies:[oa,yr,Mc,Pu,Ho],encapsulation:2})}return t})();var S$e=(()=>{class t{form;formChange=new ve;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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div")(2,"span",1),ee(3,"Datei Auswahl"),M()(),O(4,"div")(5,"bd-ui-file-input",2),te("fileChange",function(a){return r.onFileSelect(a)}),M()()(),O(6,"div",0)(7,"div")(8,"span",1),ee(9,"Datei Labels"),M()(),O(10,"div")(11,"bd-ui-labels-input",3),te("labelsChange",function(a){return r.onLabelsChange(a)}),M()()()),n&2&&(E(5),D("config",r.fileInputConfig),E(6),D("labels",r.form.labels))},dependencies:[x$e,X$],styles:[".form-part[_ngcontent-%COMP%]{margin:24px 0}"]})}return t})();var Is=class{id;constructor(i){this.id=i}},dC=(function(t){return t.LESS_OR_EQUAL="LESS_OR_EQUAL",t.GREATER_OR_EQUAL="GREATER_OR_EQUAL",t})(dC||{}),nF=(function(t){return t[t.LEGACY=0]="LEGACY",t[t.AS_NULL=1]="AS_NULL",t})(nF||{}),Zn=class extends Is{includes;excludes;_emptyArrayStrategy;constructor(i,e=[],n=[],r=nF.AS_NULL){super(i),this.includes=e,this.excludes=n,this._emptyArrayStrategy=r}toJSON(){return{[this.id]:{includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}_arrayToJson(i,e=nF.AS_NULL){return e===nF.LEGACY||i?.length>0?i:null}};var ly=class extends Zn{codeSpectrumIds;codingSystem;matching;codeTypeSpecification;codeTypeClassification;grouperVersionYear;constructor(i,e,n,r,o,a,c,m=[],g=[]){super(i,m,g,nF.LEGACY),this.codeSpectrumIds=e,this.codingSystem=n,this.matching=r,this.codeTypeSpecification=o,this.codeTypeClassification=a,this.grouperVersionYear=c}toJSON(){let i={includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)};return this.codeSpectrumIds&&(i.codeSpectrumIds=this.codeSpectrumIds),this.codingSystem&&(i.codingSystem=this.codingSystem),this.matching&&(i.matching=this.matching),this.codeTypeSpecification&&(i.codeTypeSpecification=this.codeTypeSpecification),this.codeTypeClassification&&(i.codeTypeClassification=this.codeTypeClassification),this.grouperVersionYear&&(i.grouperVersionYear=this.grouperVersionYear),{[this.id]:i}}};var cy=class extends ly{numberOfDigits;constructor(i,e=[],n=[],r,o,a,c,m,g,C){super(i,r,o,a,c,m,g,e,n),this.numberOfDigits=C}toJSON(){let i=super.toJSON();return this.numberOfDigits&&(i[this.id]=Object.assign(i[this.id],{numberOfDigits:this.numberOfDigits})),i}};var Y8t="procedureAT",K8t="procedureATLeftAnchored",yae=class extends Zn{constructor(i,e){super(Y8t,i,e)}},vae=class extends cy{constructor(i,e,n){super(K8t,i,e,void 0,void 0,void 0,void 0,void 0,void 0,n)}};var bae=class extends Is{bool;constructor(i,e){super(i),this.bool=e}toJSON(){return{[this.id]:{flag:this.bool}}}};var Cae="clinicId",zM=class extends Zn{constructor(i,e){super(Cae,i,e)}};var W8t="additionalGrouperVersionDrgCode",J$=class extends Zn{grouperVersionYear;constructor(i,e,n){super(W8t,e,n),this.grouperVersionYear=i}toJSON(){return{[this.id]:{grouperVersionYear:this.grouperVersionYear,includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}};var Q8t="drivingTime",rF=class extends Is{value;comparison;constructor(i,e){super(Q8t),this.value=i,this.comparison=e}toJSON(){return{[this.id]:{value:this.value,comparison:this.comparison}}}};var L5=class extends Is{equals;constructor(i,e=null){super(i),this.equals=e}toJSON(){return{[this.id]:{equals:this.equals}}}};var B5=class extends Is{conditions;constructor(i,e){super(i),this.conditions=e}toJSON(){let i=[];return this.conditions.forEach(e=>{i.push(e.toJSON())}),{[this.id]:{conditions:i}}}};var eq="or",UM=class extends B5{constructor(i=[]){super(eq,i)}};var tq="and",Nu=class extends B5{constructor(i=[]){super(tq,i)}};var io=class t{value;static create(i){let e=typeof i,n=null;if(e==="string")n=t.createFromString(i);else if(e==="number")n=t.createFromNumber(i);else if(!i)n=null;else throw new Error("Invalid administrative district id type.");return n}static createFromNumber(i){let e=i.toString(10);return t.createFromString(e)}static createFromString(i){return i.length===4&&(i=`0${i}`),new t(i)}constructor(i){this.value=i}getNumericValue(){return parseInt(this.value,10)}getStateId(){return parseInt(this.value.substring(0,2),10)}clone(){return new t(this.value)}};var Nw=class t{id;name;otherName;static fromObjectArray(i=[]){let e=n=>t.fromObject(n);return i.map(e)}static fromObject(i={}){return new t(io.create(i.id),i.name,i.otherName)}constructor(i,e,n){this.id=i,this.name=e,this.otherName=n}displayName(){return this.otherName??this.name}};var n1="administrative-districts",Z8t="administrative-districts",X8t="administrative-districts-highlighted",uC={id:Z8t,type:"fill",source:n1,"source-layer":"administrative_districts_2020.1",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},V5={id:X8t,type:"fill",source:n1,"source-layer":"administrative_districts_2020.1",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75},filter:["in","AGS",""]},oF={type:"vector",url:"mapbox://sseemann.ckgge66kg010g29qvmxl5r90a-8j8hs"};var Mv="postal-codes",xae="postal-codes",J8t="postal-codes-highlighted",ng={id:xae,type:"fill",source:Mv,"source-layer":"postal_codes-2q9j3t",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},r1={id:J8t,type:"fill",source:Mv,"source-layer":"postal_codes-2q9j3t",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75},filter:["in","plz",""]},aF={type:"vector",url:"mapbox://sseemann.d2edzmbo"};var Fw=class t{postalCode;name;otlName;type;administrativeDistrictId;static fromObjectArray(i=[]){let e=n=>t.fromObject(n);return i.map(e)}static fromObject(i={}){return new t(i.postalCode,i.name,i.otlName,i.type,i.administrativeDistrictId)}constructor(i,e,n,r,o){this.postalCode=i,this.name=e,this.otlName=n,this.type=r,this.administrativeDistrictId=o}getDisplayName(){return`${this.postalCode} - ${this.name} ${this.otlName}`}};var o1=class{static byId(i){let e=z5.filter(n=>n.id===i);return e[0]?e[0]:null}},PE=[{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"}],z5=[{id:-1,name:"Bund"},...PE];var P1e="states",eHt="states",w$e={id:eHt,type:"fill",source:P1e,"source-layer":"states",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},I$e={type:"vector",url:"mapbox://sseemann.at-states-dev"};var N1e="municipalities",tHt="municipalities",T$e={id:tHt,type:"fill",source:N1e,"source-layer":"gemeinden",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},E$e={type:"vector",url:"mapbox://sseemann.at-gemeinden-dev"};var F1e="bezirk",iHt="bezirk",A$e={id:iHt,type:"fill",source:F1e,"source-layer":"municipalities",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}},D$e={type:"vector",url:"mapbox://sseemann.at-municipalities-dev"};var k$e=[[9.49,46.41],[17.18,49.04]];var a1=[[15.0169958839,47.3024876979],[5.98865807458,54.983104153]];var o0=63710088e-1,nHt={centimeters:o0*100,centimetres:o0*100,degrees:o0/111325,feet:o0*3.28084,inches:o0*39.37,kilometers:o0/1e3,kilometres:o0/1e3,meters:o0,metres:o0,miles:o0/1609.344,millimeters:o0*1e3,millimetres:o0*1e3,nauticalmiles:o0/1852,radians:1,yards:o0*1.0936},B6n={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/o0,yards:1.0936133};function _h(t,i,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=i||{},n.geometry=t,n}function yh(t,i,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(!L1e(t[0])||!L1e(t[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:t};return _h(n,i,e)}function Sae(t,i,e){e===void 0&&(e={});for(var n=0,r=t;n{if(o){let m=c._z;return o.maxZoom?o.minZoom?o.minZoom<=m&&m_h(c.geometry,c.properties,{bbox:c.bbox,id:c.id}))}};var Iae=mp(Lw()),dy=class t{bounds;origin;static fromBbox(i,e){if(!Array.isArray(i))throw new Error("bbox is not an array");return i.length===6?new t(new Iae.LngLatBounds(i.slice(0,4)),e):new t(new Iae.LngLatBounds(i),e)}static fromBoundsLike(i,e){return new t(Iae.LngLatBounds.convert(i),e)}constructor(i,e){this.bounds=i,this.origin=e}toPointLikeArray(i){return[i.project(this.bounds._sw),i.project(this.bounds._ne)]}};var N$e={container:"map-container",style:"mapbox://styles/mapbox/streets-v12",bounds:k$e,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"}};var Tae=class{static getDataMaxValue(i,e){let n=0;return i.forEach(r=>{n=n>=e[r]?n:e[r]}),console.log(n),n}static getDataExtremeValues(i,e){let n=null,r=null;return i.forEach(o=>{n!==null?n=n>=e[o]?n:e[o]:n=e[o],r!==null?r=r<=e[o]?r:e[o]:r=e[o]}),{min:r,max:n}}};var F$e=mp(Lw()),U5=class{_mbxMap;_layerName;_popup=new F$e.Popup({closeButton:!0,closeOnClick:!1});constructor(i,e){this._mbxMap=i,this._layerName=e}_removePopup(){this._popup.remove()}};var nq=mp(Lw());var Eae=class{_mpxMap;_options;_popupClick;_popupMove;_listener=[];_subs=[];constructor(i,e={closeButton:!1,closeOnClick:!0,mode:"MERGE",contentDivider:'
'}){this._mpxMap=i,this._options=e,this._popupClick=new nq.Popup($e(pe({},e),{closeButton:!0,closeOnClick:!0})),this._popupMove=new nq.Popup(e),this._subs.push(Eb(this._mpxMap,"click").pipe(vn(n=>n.target.idle())).subscribe(n=>this._onMouseClick(n))),this._subs.push(Eb(this._mpxMap,"mousemove").pipe(vn(n=>n.target.idle())).subscribe(n=>this._onMousemove(n))),this._subs.push(Eb(this._mpxMap,"mouseleave").subscribe(n=>this._onMouseleave(n))),this._subs.push(Eb(this._mpxMap,"mouseout").subscribe(n=>this._onMouseleave(n)))}registerHandler(i,e,n){let r=pe({type:"mousemove",bboxSize:0,popupSortingIndex:1,layerGroupStrategy:"NOOP"},n);this.deregisterHandler(e),n?.layerGroupId&&n?.layerGroupStrategy&&n.layerGroupStrategy==="ONLY_ONE_OF_GROUP"&&(this._listener=this._listener.filter(o=>o.layerGroupId!==n.layerGroupId)),this._listener.push($e(pe({layerGroupId:""},r),{popupHandler:i,layerId:e}))}deregisterHandler(i){this._listener=this._listener.filter(e=>e.layerId!==i)}onDestroy(){this._popupClick.remove(),this._popupMove.remove(),this._subs.forEach(i=>i.unsubscribe())}_showContent(i,e){if(i.some(n=>n.type==="click")){this._popupClick.remove();let n=this._createPopupContent(i.filter(r=>r.type==="click").filter(r=>r.features&&r.features.length>0).sort((r,o)=>o.popupSortingIndex-r.popupSortingIndex).map(r=>r.features.map(o=>r.popupHandler.content(o))));this._popupClick=new nq.Popup($e(pe({},this._options),{closeButton:!0,closeOnClick:!0})).setHTML(n).setLngLat(e).addTo(this._mpxMap)}if(i.some(n=>n.type!=="click")){this._popupMove.remove();let n=this._createPopupContent(i.filter(r=>r.type!=="click").filter(r=>r.features&&r.features.length>0).sort((r,o)=>o.popupSortingIndex-r.popupSortingIndex).map(r=>r.features.map(o=>r.popupHandler.content(o))));this._popupMove=new nq.Popup(this._options).setHTML(n).setLngLat(e).addTo(this._mpxMap)}}_createPopupContent(i){return i.flat().filter((e,n,r)=>r.findIndex(o=>o===e)===n).join(` ${this._options.contentDivider}`)}_onMouseClick=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let e=this._listener.filter(n=>n.type==="click").map(n=>$e(pe({},n),{features:sF.getFeaturesOnPosition(this._mpxMap,i.point,n.layerId,n.bboxSize,n.zoom)})).filter(n=>n.features&&n.features.length>0);this._showContent(e,i.lngLat)};_onMousemove=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let e=this._listener.filter(n=>n.type==="mousemove").map(n=>$e(pe({},n),{features:sF.getFeaturesOnPosition(this._mpxMap,i.point,n.layerId,n.bboxSize,n.zoom)})).filter(n=>n.features&&n.features.length>0);this._showContent(e,i.lngLat)};_onMouseleave=i=>{this._mpxMap.getCanvas().style.cursor="",this._popupMove.remove()}};var rq=class{static addSaveLayer(i,e,n){return this.hasResource(i,e.id,"layer")?$t(e):(i=i.addLayer(e,n),hV(500).pipe(ar(10),ot(r=>{let o=i.isStyleLoaded();return console.debug(`checking layer loaded ${r}/10`,e.id,o),o}),q0(r=>r),ot(()=>e)))}static addSaveSource(i,e,n){return this.hasResource(i,e,"source")?$t(n):(i=i.addSource(e,n),hV(500).pipe(ar(10),ot(r=>{let o=i.isSourceLoaded(e);return console.debug(`checking source loaded ${r}/10`,e,o),o}),q0(r=>r),ot(()=>n)))}static hasResource(i,e,n){return n==="layer"?!!i.getLayer(e):!!i.getSource(e)}};var NE=class{layerControlId;config;displayName;zIndex;visible="visible";active=!0;legend={showInLegend:!0};initDone=!1;mapRef;popupControlRef;popupImpl=void 0;_bounds=new Sa(a1);_legendRef=new hi(1);_popupSubscription;legendRef=this._legendRef.asObservable();bounds;constructor(i,e){this.layerControlId=i,this.config=e,this.visible=e.visible??this.visible,this.active=e.active??this.active,this.zIndex=e.zIndex,this.displayName=e.displayName,this.legend=pe(pe({},this.legend),e.legend)}initBounds(){this.bounds=this._bounds.asObservable()}initImage(i){let e=this.image();if(e&&!i.hasImage(e.imageName)){console.debug("loading image",e.imageName);let n=Hfe(i.loadImage).bind(i);if("url"in e)return n(e.url).pipe(ot(r=>{if(r[0])throw r[0];return i.addImage(e.imageName,r[1],{sdf:e.url}),i}));if("svg"in e){let r=new Image(20,20),o=e.svg;return r.onload=()=>i.addImage(e.imageName,r),r.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(o)}`,$t(i)}else return $t(i)}else return $t(i)}initSource(i){if(console.debug("init source",this.source()),this.source()){if(!this.source().sourceId)throw new Error("missing source id");return rq.addSaveSource(i,this.source().sourceId,this.source().sourceData)}else return $t(null)}initLayer(i,e){this.mapRef=i,this.popupControlRef=e;let n=$t();return this.layer()&&(console.debug("init layer",this.layer().id),n=$t(this.layer()).pipe(ot(r=>(r?.layout?r.layout.visibility="none":r.layout={visibility:"none"},r)),On(r=>rq.addSaveLayer(i,r)))),n.pipe(yo(()=>this.initDone=!0),yo(()=>this.afterInit(i,e)))}onRedraw(i){switch(i.action){case"SHOW":{this._show();break}case"UPDATE-DATA":{this._update(i.data);break}case"UPDATE-BY-COMMAND":{let e=i.data;this.updateByCommand(e);break}case"HIDE":{this._hide();break}}}destroyLayer(i){this.popupControlRef.onDestroy(),this.layer()&&(this.hidePopup(this.layer()?.id),console.debug(`removeLayer [${this.layer().id}]`),i.removeLayer(this.layer().id))}destroySource(i){this.source()&&(console.debug(`removeSource [${this.source()?.sourceId}]`),i.removeSource(this.source()?.sourceId)),this.image()&&(console.debug(`removeImage [${this.image()?.imageName}]`),i.removeImage(this.image()?.imageName))}afterInit(i,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(i){console.debug("no update method impl!")}updateByCommand(i){let e=i.options.find(n=>n.key===i.currentOption.key);i.commandFn(this.mapRef,e)}hidePopup(i){this.popupControlRef.deregisterHandler(i),this.popupImpl=void 0,this._popupSubscription&&this._popupSubscription.unsubscribe()}showPopup(i){this.popupImpl=new U1e(this.mapRef,i,e=>this.popupContent(e,{})),this.popupControlRef.registerHandler(this.popupImpl,i,this.config.popup)}image(){}popupContent(i,e){if(this.config.popup?.popupType==="customPopupContent")return null;let n=this.config.popup.titleFnc(i,e),r=`
${n}
`;if(this.config.popup.messageFnc){let o=this.config.popup.messageFnc(i,e);o&&(r=`
${n}
${this.config.popup.messagePrefix} ${o}
`)}return r}_show(){this.initDone&&this.layer()&&(this.show(),this.config.popup&&this.showPopup(this.layer().id))}_update(i){this.initDone&&this.layer()&&this.update(i)}_hide(){this.initDone&&this.layer()&&(this.hidePopup(this.layer().id),this.hide())}},U1e=class extends U5{contentFn;constructor(i,e,n){super(i,e),this.contentFn=n}content(i){return this.contentFn({id:i.id,properties:i.properties,geometry:i.geometry?{type:i.geometry.type,bbox:i.geometry.bbox,coordinates:void 0}:void 0,bbox:i.bbox,type:i.type})}};function FE(t,i,e){if(t!==null)for(var n,r,o,a,c,m,g,C=0,w=0,P,R=t.type,z=R==="FeatureCollection",H=R==="Feature",j=z?t.features.length:1,K=0;Ke[0]&&(i[0]=e[0]),i[1]>e[1]&&(i[1]=e[1]),i[2]this._legendRef.next(this.updateLegendRef(n,{min:null,max:null}))),Ec([this.data$,this.colorFactory$]).subscribe(n=>this.updateSource(n[0],void 0,n[1]))}showPopup(i){this._popupSubscription=this.data$.subscribe(e=>{this.popupImpl=new j1e(this.mapRef,i,(n,r)=>this.popupContent(n,r),e),this.popupControlRef.registerHandler(this.popupImpl,i)})}updateSource(i,e=Tae.getDataExtremeValues(Object.keys(i),i),n){console.debug(this.layerControlId,"updateSource",i),this._legendRef.next(this.updateLegendRef(n,e));let r=Object.keys(i),o,a;r.length>0?(o=this.getFillColorExpression(r,i,e,n),a=this.getFillOpacityExpression(i),this.popupImpl&&(this.popupImpl.data=i)):(o=this.getFillColorFallback(),a=.7),this.mapRef.setPaintProperty(this.layer().id,"fill-color",o),this.mapRef.setPaintProperty(this.layer().id,"fill-opacity",a)}getFillColorExpression(i,e,n,r){let o=this.getFillColorFallback(),a=JSON.parse(JSON.stringify(this.baseFilterExpression()));return i.forEach(function(c){let m=r.getColorForValue(e[c],n.min,n.max)??new ua(o);a.push(c,m.toHslString())}),a.push(o),a}baseFilterExpression(i){return["match",["get",this.config.geoJsonPropertiesKey]]}getFillColorFallback(){return"rgba(0,0,0,0)"}getFillOpacityExpression(i){let e=JSON.parse(JSON.stringify(this.baseFilterExpression()));return Object.keys(i).forEach(n=>{e.push(n,.7)}),e.push(0),e}updateLegendRef(i,e){return console.debug(this.config.layerId,"updateLegendRef"),new GM(this.layerControlId,this.displayName,i,e.min,e.max)}initBounds(){this.bounds=this.data$.pipe(yo(()=>this.mapRef.fitBounds(this.defaultBounds)),On(i=>Eb(this.mapRef,"idle").pipe(ar(1),ot(()=>i))),ot(i=>{let e=[];if(Object.keys(i).length>250)return this.defaultBounds;if(Object.keys(i).forEach(n=>{let r=["in",n,["get",this.config.geoJsonPropertiesKey]],o=this.mapRef.querySourceFeatures(this.config.sourceId,{filter:r,sourceLayer:this.layer()["source-layer"]});o.length>0&&o.forEach(a=>{e.push(_h({type:a.geometry.type,bbox:a.geometry.bbox,coordinates:a.geometry.coordinates},a.properties))})}),e.length>0){let n=od(e);return dy.fromBbox(Ov(n),n).bounds}else return this.defaultBounds}),yo(i=>console.debug(this.config.sourceId,"updateBounds",i)))}},j1e=class extends U5{contentFn;data;constructor(i,e,n,r={}){super(i,e),this.contentFn=n,this.data=r}content(i){return this.contentFn({type:i.type,bbox:i.bbox,id:i.id,properties:i.properties,geometry:i.geometry?{type:i.geometry?.type,bbox:i.geometry?.bbox,coordinates:void 0}:void 0},this.data)}};var uy=class extends NE{config;data$=new hi(1);constructor(i,e){super(i,e),this.config=e}initBounds(){this.bounds=this.data$.asObservable().pipe(yo(()=>console.debug(this.config.sourceId,"updateBounds")),ot(i=>i.features.length>0?dy.fromBbox(Ov(i),i).bounds:a1))}updateData(i){this.data$.next(i)}afterInit(i,e){super.afterInit(i,e),this._legendRef.next(this.updateLegendRef(null)),this.data$.subscribe(n=>this.updateSource(n))}update(i){this.data$.next(i)}updateByCommand(i){super.updateByCommand(i),this.data$.subscribe(n=>this._legendRef.next(this.updateLegendRef(n))).unsubscribe()}updateSource(i){if(console.debug(this.source()?.sourceId,"updateSource"),this.mapRef&&this.source()){let e={type:"FeatureCollection",features:i.features.map(n=>({type:"Feature",id:n.id,properties:n.properties,geometry:n.geometry,bbox:n.bbox}))};this._legendRef.next(this.updateLegendRef(i)),this.mapRef.getSource(this.source().sourceId).setData(e)}}updateLegendRef(i){return new Pm(this.layerControlId,this.config.displayName,"public")}};var vh=class{_popupControl;_layers={};_mapRef$=new Bf;_startup=new Ai;_boundsByLayerId$=new hi(1);_skipBoundChanges=!1;config;mapRef$=this._mapRef$.asObservable();layerControls$=new hi;constructor(i){this.config=pe({interactive:!0,global:{exportMenu:!0,styleMenu:!0}},i),Ec([this._startup,this._boundsByLayerId$]).pipe(On(e=>this._layers[e[1]].primary.bounds.pipe(ot(n=>({bounds:n,mapRef:e[0],boundsByLayerId:e[1]}))))).subscribe(e=>{this._skipBoundChanges||(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 Eae(e),e.on("style.load",()=>{hV(500).pipe(ot(()=>e.isStyleLoaded()),q0(n=>n)).subscribe(()=>this._initLayers(e))}),this._initLayers(e)})}followBoundsOf(i){console.debug("followBoundsOf",i),this._skipBoundChanges=!1,this._boundsByLayerId$.next(i)}unfollowBounds(){console.debug("unfollowBounds"),this._skipBoundChanges=!0}addMapRef(i){this._mapRef$.next(i),this._mapRef$.complete()}registerLayer(i){this._layers[i.layerControlId]={primary:i,other:[]},this._layers[i.layerControlId].primary.zIndex=i.zIndex??Object.keys(this._layers).length,i.active&&this.layerControls$.next({layerControl:i,action:"ACTIVE"})}registerWithinLayer(i,e){e.legend.showInLegend=!1,e.zIndex=e.zIndex??this._layers[i].other.length,this._layers[i].other.push(e),e.active&&this.layerControls$.next({layerControl:e,action:"ACTIVE"})}setActive(i,e,n=e?"visible":"none"){this._layers[i]&&this._layers[i].primary.active!==e&&(this._layers[i].primary.active=e,this._toggleLayer(this._layers[i].primary,n),this.layerControls$.next({layerControl:this._layers[i].primary,action:e?"ACTIVE":"NOT_ACTIVE"}),this._layers[i].other.forEach(r=>{r.active=e,this._toggleLayer(r,n),this.layerControls$.next({layerControl:r,action:e?"ACTIVE":"NOT_ACTIVE"})}))}setVisibility(i,e){this._layers[i]&&this._layers[i].primary.visible!==e&&(this._toggleLayer(this._layers[i].primary,e),this._layers[i].other.forEach(n=>this._toggleLayer(n,e)))}setActionChange(i,e){if(this._layers[i]&&this._layers[i].primary.visible){let n={action:"UPDATE-DATA",layerControl:this._layers[i].primary,data:e.data},r=this._layers[i].primary;r&&r.onRedraw(n),this.layerControls$.next(n),e.commands?.forEach(o=>{let a={action:"UPDATE-BY-COMMAND",data:o,layerControl:this._layers[i].primary},c=this._layers[i].primary;c&&c.onRedraw(a),this.layerControls$.next(a)})}}onDestroy(){return this._mapRef$.asObservable().pipe(ot(i=>{Object.values(this._layers).forEach(e=>{e.other.forEach(n=>n.destroyLayer(i,this._popupControl)),e.primary.destroyLayer(i,this._popupControl)}),Object.values(this._layers).forEach(e=>{e.other.forEach(n=>n.destroySource(i)),e.primary.destroySource(i)})}))}_toggleLayer(i,e){let n;e==="none"?(i.visible="none",n={action:"HIDE",layerControl:i},console.debug(`[${i.layerControlId}] toggle layer to ${i.visible}`,n)):(i.visible="visible",n={action:"SHOW",layerControl:i},console.debug(`[${i.layerControlId}] toggle layer to ${i.visible}`,n)),i.onRedraw(n),this.layerControls$.next(n)}_initLayers(i){console.debug("### init layers ###");let e=Object.values(this._layers).map(o=>[o.primary,...o.other]).flat().sort((o,a)=>o.zIndex-a.zIndex),n=e.map(o=>o.initImage(i)),r=e.map(o=>o.initSource(i));Ys([...n,...r]).subscribe(()=>{Hr(e).pipe(Uh(o=>(console.debug(`start init of [${o.layerControlId}]: ${o.displayName}`),o.initLayer(i,this._popupControl))),jfe(e.length)).subscribe(()=>{console.debug("### finished with init ###"),this._startup.next(i),e.filter(o=>o.active).filter(o=>o.visible==="visible").forEach(o=>{o.onRedraw({layerControl:o,action:"SHOW"})})})})}};var aq=class extends uy{config;constructor(i,e){super(i,e),this.config=e}updateLegendRef(i){let e,n=this.image();return"url"in n?e=new oq(this.layerControlId,this.config.displayName,n.url):e=new oq(this.layerControlId,this.config.displayName,`data:image/svg+xml;base64,${btoa(n?.svg)}`),this.applyLegendConfig(e,i),e}layer(){return{id:this._layerId(),type:"symbol",source:this.config.sourceId,layout:pe({"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:pe({"icon-color":["get","colorAsHex"],"icon-halo-blur":5},this.config.paint)}}source(){return{sourceId:this.config.sourceId,sourceData:{type:"geojson",data:od([])}}}image(){return{imageName:"geo",sdfMode:!0,url:"https://bindocwebassets.z1.web.core.windows.net/img/geo-alt-fill.png"}}applyLegendConfig(i,e){this.config.legend?.action&&(i.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(i){return{commandId:"text-field",displayName:"Anzeige",currentOption:{key:i.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,n)=>e.setLayoutProperty(this._layerId(),"text-field",n.value)}}_textSizeCommand(i){return{commandId:"text-size",displayName:"Text Gr\xF6\xDFe",currentOption:{key:i.getLayoutProperty(this.layer().id,"text-size")?i.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,n)=>e.setLayoutProperty(this._layerId(),"text-size",n.value)}}_textAnchorCommand(i){return{commandId:"text-anchor",displayName:"Text Position",currentOption:{key:i.getLayoutProperty(this.layer().id,"text-anchor")&&typeof i.getLayoutProperty(this.layer().id,"text-anchor")=="string"?i.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,n)=>e.setLayoutProperty(this._layerId(),"text-anchor",n.value)}}};var Aae=class{mapEvent;map;controls;propagate;constructor(i,e,n,r=!0){this.mapEvent=i,this.map=e,this.controls=n,this.propagate=r}};var rg={container:"map-container",style:"mapbox://styles/mapbox/streets-v12",bounds:a1,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"}},oHt=$e(pe({},rg),{center:[8.689091,50.108202],zoom:8}),aHt=$e(pe({},rg),{center:[8.689091,50.108202],zoom:9,interactive:!1});var $1e={streets:"Stra\xDFen",outdoors:"Outdoor",light:"Hell",dark:"Dunkel",satellite:"Satellit","satellite-streets":"Satellit & Stra\xDFen","navigation-day":"Navigation Hell","navigation-night":"Navigation Dunkel"},jM=class{static fromStyleUrl(i){return i.includes("streets")?"streets":i.includes("outdoors")?"outdoors":i.includes("light")?"light":i.includes("dark")?"dark":i.includes("satellite-streets")?"satellite-streets":i.includes("navigation-day")?"navigation-day":i.includes("navigation-night")?"navigation-night":"satellite"}static fromStyleKey(i){switch(i){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 L$e="dismissalDateTime",sq=class extends Is{value;comparison;dateTransformFn;constructor(i,e,n){super(L$e),this.value=i,this.comparison=e,this.dateTransformFn=n}toJSON(){return{[L$e]:{value:this.dateTransformFn(this.value),comparison:this.comparison}}}};var qGn=Symbol.for("constructDateFrom");function B$e(t,i,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:e}).format(i).split(/\s/g).slice(2).join(" ")}var sHt={},lq={};function LE(t,i){try{let n=(sHt[t]||=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format)(i).split("GMT")[1];return n in lq?lq[n]:V$e(n,n.split(":"))}catch{if(t in lq)return lq[t];let e=t?.match(lHt);return e?V$e(t,e.slice(1)):NaN}}var lHt=/([+-]\d\d):?(\d\d)?/;function V$e(t,i){let e=+(i[0]||0),n=+(i[1]||0),r=+(i[2]||0)/60;return lq[t]=e*60+n>0?e*60+n+r:e*60-n-r}var $M=class t extends Date{constructor(...i){super(),i.length>1&&typeof i[i.length-1]=="string"&&(this.timeZone=i.pop()),this.internal=new Date,isNaN(LE(this.timeZone,this))?this.setTime(NaN):i.length?typeof i[0]=="number"&&(i.length===1||i.length===2&&typeof i[1]!="number")?this.setTime(i[0]):typeof i[0]=="string"?this.setTime(+new Date(i[0])):i[0]instanceof Date?this.setTime(+i[0]):(this.setTime(+new Date(...i)),U$e(this,NaN),q1e(this)):this.setTime(Date.now())}static tz(i,...e){return e.length?new t(...e,i):new t(Date.now(),i)}withTimeZone(i){return new t(+this,i)}getTimezoneOffset(){let i=-LE(this.timeZone,this);return i>0?Math.floor(i):Math.ceil(i)}setTime(i){return Date.prototype.setTime.apply(this,arguments),q1e(this),+this}[Symbol.for("constructDateFrom")](i){return new t(+new Date(i),this.timeZone)}},z$e=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!z$e.test(t))return;let i=t.replace(z$e,"$1UTC");$M.prototype[i]&&(t.startsWith("get")?$M.prototype[t]=function(){return this.internal[i]()}:($M.prototype[t]=function(){return Date.prototype[i].apply(this.internal,arguments),cHt(this),+this},$M.prototype[i]=function(){return Date.prototype[i].apply(this,arguments),q1e(this),+this}))});function q1e(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-LE(t.timeZone,t)*60))}function cHt(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()),U$e(t)}function U$e(t){let i=LE(t.timeZone,t),e=i>0?Math.floor(i):Math.ceil(i),n=new Date(+t);n.setUTCHours(n.getUTCHours()-1);let r=-new Date(+t).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,c=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();a&&c&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+a);let m=r-e;m&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+m);let g=new Date(+t);g.setUTCSeconds(0);let C=r>0?g.getSeconds():(g.getSeconds()-60)%60,w=Math.round(-(LE(t.timeZone,t)*60))%60;(w||C)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+w),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+w+C));let P=LE(t.timeZone,t),R=P>0?Math.floor(P):Math.ceil(P),H=-new Date(+t).getTimezoneOffset()-R,j=R!==e,K=H-m;if(j&&K){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+K);let ne=LE(t.timeZone,t),me=ne>0?Math.floor(ne):Math.ceil(ne),Te=R-me;Te&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+Te),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+Te))}}var cq=class t extends $M{static tz(i,...e){return e.length?new t(...e,i):new t(Date.now(),i)}toISOString(){let[i,e,n]=this.tzComponents(),r=`${i}${e}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[i,e,n,r]=this.internal.toUTCString().split(" ");return`${i?.slice(0,-1)} ${n} ${e} ${r}`}toTimeString(){let i=this.internal.toUTCString().split(" ")[4],[e,n,r]=this.tzComponents();return`${i} GMT${e}${n}${r} (${B$e(this.timeZone,this)})`}toLocaleString(i,e){return Date.prototype.toLocaleString.call(this,i,$e(pe({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleDateString(i,e){return Date.prototype.toLocaleDateString.call(this,i,$e(pe({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleTimeString(i,e){return Date.prototype.toLocaleTimeString.call(this,i,$e(pe({},e),{timeZone:e?.timeZone||this.timeZone}))}tzComponents(){let i=this.getTimezoneOffset(),e=i>0?"-":"+",n=String(Math.floor(Math.abs(i)/60)).padStart(2,"0"),r=String(Math.abs(i)%60).padStart(2,"0");return[e,n,r]}withTimeZone(i){return new t(+this,i)}[Symbol.for("constructDateFrom")](i){return new t(+new Date(i),this.timeZone)}};var dHt="dateInterval",BE=class extends Is{interval;constructor(i){super(dHt),this.interval=i}toJSON(){return this._transform().toJSON()}_transform(){return new Nu([new sq(this.interval.start,dC.GREATER_OR_EQUAL,i=>u9(Yb(this._createTimeZoneDate(i)).withTimeZone("Etc/UTC"))),new sq(this.interval.end,dC.LESS_OR_EQUAL,i=>u9(X8e(this._createTimeZoneDate(i)).withTimeZone("Etc/UTC")))])}_createTimeZoneDate(i){return new cq(i.toISOString(),"Etc/UTC").withTimeZone("Europe/Berlin")}};var Y1e="mainDiagnosis",K1e="mainDiagnosisLeftAnchored",H5=class extends ly{constructor(i,e,n,r,o,a,c,m){super(Y1e,n,r,o,a,c,m,i,e)}},G5=class extends cy{constructor(i,e,n,r,o,a,c,m,g){super(K1e,i,e,n,r,o,a,c,m,g)}};var W1e="mainProcedure",Q1e="mainProcedureLeftAnchored",Dae=class extends ly{constructor(i,e,n,r,o,a,c,m){super(W1e,n,r,o,a,c,m,i,e)}},kae=class extends cy{constructor(i,e,n,r,o,a,c,m,g){super(Q1e,i,e,n,r,o,a,c,m,g)}};var Z1e="opsCode",X1e="opsCodeLeftAnchored",qM=class extends ly{constructor(i,e,n,r,o,a,c,m){super(Z1e,n,r,o,a,c,m,i,e)}},Mae=class extends cy{constructor(i,e,n,r,o,a,c,m,g){super(X1e,i,e,n,r,o,a,c,m,g)}};var j5=class extends Is{from;to;constructor(i,e=null,n=null){super(i),this.from=e,this.to=n}toJSON(){return{[this.id]:{from:this.from,to:this.to}}}};var uHt="relativeInterval",$5=class extends Is{intervalRelative;constructor(i){super(uHt),this.intervalRelative=i}toJSON(){return this._unitToCondition().toJSON()}isValid(){return!!this.intervalRelative}_unitToCondition(){let i=new Mm(this.intervalRelative.startDate,this.intervalRelative.endDate);return new BE(i)}};var J1e="skCode",eSe="skCodeLeftAnchored",Oae=class extends ly{constructor(i,e,n,r,o,a,c,m){super(J1e,n,r,o,a,c,m,i,e)}},Rae=class extends cy{constructor(i,e,n,r,o,a,c,m,g){super(eSe,i,e,n,r,o,a,c,m,g)}};var tSe="secondaryDiagnosis",iSe="secondaryDiagnosisLeftAnchored",q5=class extends ly{constructor(i,e,n,r,o,a,c,m){super(tSe,n,r,o,a,c,m,i,e)}},Y5=class extends cy{constructor(i,e,n,r,o,a,c,m,g){super(iSe,i,e,n,r,o,a,c,m,g)}};var H$e="true",VE=class extends Is{constructor(){super(H$e)}toJSON(){return{[H$e]:{}}}};var nSe="year",py=class extends Zn{constructor(i,e){super(nSe,i,e)}};var Pae=class{_baseUrl;constructor(i){this._baseUrl=i}crud(){return`${this._baseUrl}/`}};var my=class extends Ud{_httpClient;_api;constructor(i,e,n,r){super(i,e,n),this._httpClient=r,this._api=new Pae(this.getBaseUrl())}availableLabels(){let i=`${this._api.crud()}files/labels/available`;return this._httpClient.get(i)}create(i,e){throw new Error("Method not implemented.")}upload(i,e){let n=`${this._api.crud()}files/create`,r=new FormData;if(e){let o=new Vo({fromObject:{labels:e}});n=n.concat("?").concat(o.toString())}return r.append("file",i),this._httpClient.post(n,r)}downloadFile(i){let e=`${this._api.crud()}files/${i}/download`;return this._httpClient.get(e,{responseType:"blob"})}findAll(i,e,n=new VE){let r=`${this._api.crud()}files/`;return this._httpClient.post(r,{condition:n})}findById(i){let e=`${this._api.crud()}files/${i}`;return this._httpClient.get(e)}update(i,e,n=null){let r=`${this._api.crud()}files/${i.id}/update`;return this._httpClient.put(r,{labels:n}).pipe(On(()=>Xd))}};function pHt(t,i){if(t&1){let e=qe();O(0,"bd-user-files-new-dialog-form",7),te("formChange",function(r){se(e);let o=L();return le(o.onFormChange(r))}),M()}if(t&2){let e=L();D("form",e.form)}}var G$e=(()=>{class t{_dialogRef;_fileService;upload$=new Ai;form={file:null,labels:[]};isValid=!1;constructor(e,n){this._dialogRef=e,this._fileService=n}onFormChange(e){this.form=e,this.isValid=!!this.form&&!!this.form.file}upload(){this.upload$.next(ni.LOADING),this._fileService.upload(this.form.file,this.form.labels).subscribe(e=>{this.upload$.next(ni.SUCCESS),this._dialogRef.close(e)})}static \u0275fac=function(n){return new(n||t)(xe(Im),xe(my))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div")(1,"span",1),ee(2,"Datei hochladen"),M()(),O(3,"div",2),be(4,"bd-loader",3),M(),O(5,"div",4)(6,"button",5),ee(7,"Abbrechen"),M(),fi(8),O(9,"button",6),te("click",function(){return se(o),le(r.upload())}),ee(10," Hochladen "),M(),gi(),M(),ie(11,pHt,1,1,"ng-template",null,0,di)}if(n&2){let o=Oi(12);E(4),D("initTemplate",o)("loadItem",r.upload$),E(),D("align","end"),E(),D("mat-dialog-close",null),E(3),D("disabled",!r.isValid)}},dependencies:[$_,lh,fr,bv,so,Kr,Kf,S$e],encapsulation:2})}return t})();var j$e=(()=>{class t{_dialog;_responsiveDialogService;created=new ve;constructor(e,n){this._dialog=e,this._responsiveDialogService=n}openNewDialog(){let e=this._responsiveDialogService.config();this._dialog.open(G$e,e).afterClosed().pipe(ar(1),vn(n=>!!n)).subscribe(n=>{this.created.emit(n)})}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm))};static \u0275cmp=re({type:t,selectors:[["bd-user-downloads-new"]],outputs:{created:"created"},decls:2,vars:0,consts:[["mat-raised-button","","color","accent",3,"click"]],template:function(n,r){n&1&&(O(0,"button",0),te("click",function(){return r.openNewDialog()}),ee(1," Neue Datei hochladen "),M())},dependencies:[so,Kr],encapsulation:2})}return t})();function mHt(t,i){if(t&1&&be(0,"bd-resources-list",6),t&2){let e=L(2);D("resources",e.files)("options",e.listOptions)}}function hHt(t,i){t&1&&be(0,"bd-message-empty",7)}function fHt(t,i){if(t&1&&(O(0,"div",2),yt(1,mHt,1,2,"bd-resources-list",6),yt(2,hHt,1,0,"bd-message-empty",7),M()),t&2){let e=L();E(),vt((e.files==null?null:e.files.length)>0?1:-1),E(),vt((e.files==null?null:e.files.length)===0?2:-1)}}var $$e=(()=>{class t{_userFilesService;_environmentService;p21ImportUrl;loading$=new hi(1);listOptions=$e(pe({},R5),{detailLinkFnc:e=>["/user","files",e.id],showLabelsColumn:!0});files;constructor(e,n){this._userFilesService=e,this._environmentService=n,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(ni.LOADING),this._userFilesService.findAll(null,null).subscribe(e=>{this.files=e,this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(my),xe(xr))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"bd-toolbar")(1,"span"),ee(2,"File-Center"),M()(),be(3,"bd-loader",1),O(4,"div",2)(5,"div",3)(6,"bd-user-downloads-new",4),te("created",function(c){return se(o),le(r.onFileCreated(c))}),M(),O(7,"a",5),ee(8," Struktur- und Leistungsdaten hochladen "),M()()(),ie(9,fHt,3,2,"ng-template",null,0,di)}if(n&2){let o=Oi(10);E(3),D("loadItem",r.loading$)("successTemplate",o),E(4),D("href",r.p21ImportUrl,td)}},dependencies:[zl,fr,j$e,Q$,ec,so,Kr],encapsulation:2})}return t})();var q$e=mp(dq());var gHt=()=>["/user","files"];function _Ht(t,i){if(t&1&&(O(0,"span",5),ee(1),Dr(2,"date"),M()),t&2){let e=L();E(),Pt(gl(2,1,e.userFile.createdDate,"short"))}}function yHt(t,i){if(t&1&&be(0,"p-chip",10),t&2){let e=i.$implicit;D("label",e)}}function vHt(t,i){if(t&1&&(O(0,"div",9),Qo(1,yHt,1,1,"p-chip",10,ms),M()),t&2){let e=L(2);E(),Zo(e.userFile.labels)}}function bHt(t,i){if(t&1&&(O(0,"div",3)(1,"div",4)(2,"span",5),ee(3,"Labels:"),M()(),O(4,"div",0),yt(5,vHt,3,0,"div",9),M()()),t&2){let e=L();E(5),vt(e.userFile.labels?5:-1)}}var Y$e=(()=>{class t{_activatedRoute;_fileService;_permissionService;_router;resourceInfoMenuConfig={showDeleteButton:!0,showEditButton:!1};userFile;constructor(e,n,r,o){this._activatedRoute=e,this._fileService=n,this._permissionService=r,this._router=o,this._activatedRoute.params.pipe(vn(a=>!!a.fileId),On(a=>this._fileService.findById(a.fileId))).subscribe(a=>{this.userFile=a})}delete(){this._permissionService.archive(tn.FILE,this.userFile.id).pipe(ar(1)).subscribe(()=>{this._router.navigate(["/user","files"])})}downloadFile(){this._fileService.downloadFile(this.userFile.id).subscribe(e=>{q$e.saveAs(e,this.userFile.name)})}static \u0275fac=function(n){return new(n||t)(xe(id),xe(my),xe(Rm),xe(Ws))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-toolbar")(1,"span",0),ee(2),M(),O(3,"bd-resources-info-menu",1),te("deleteResource",function(){return r.delete()}),M()(),O(4,"div",2)(5,"div",3)(6,"div",4)(7,"span",5),ee(8,"Erstellt:"),M()(),O(9,"div",0),yt(10,_Ht,3,4,"span",5),M()(),yt(11,bHt,6,1,"div",3),be(12,"mat-divider"),O(13,"div",6)(14,"button",7),te("click",function(){return r.downloadFile()}),ee(15," Herunterladen "),M(),O(16,"a",8),ee(17,"Zur \xDCbersicht"),M()()()),n&2&&(E(2),Pt(r.userFile==null?null:r.userFile.name),E(),D("resource",r.userFile)("config",r.resourceInfoMenuConfig),E(7),vt(r.userFile?10:-1),E(),vt(r.userFile!=null&&r.userFile.labels?11:-1),E(3),D("disabled",!r.userFile),E(2),D("routerLink",Vr(7,gHt)))},dependencies:[zl,O5,Cp,Id,so,Kr,Ms,E5,Hp],styles:["mat-divider[_ngcontent-%COMP%]{margin:24px 0}"]})}return t})();var CHt=[{path:"downloads",redirectTo:"files"},{path:"files",children:[{path:"",pathMatch:"full",component:$$e,canActivate:[Rc],data:{pageTitle:bu.title("File-Center")}},{path:":fileId",component:Y$e,canActivate:[Rc],data:{pageTitle:bu.title("File-Center")}}]}],J9n=Yf.forChild(CHt);var Nae=(()=>{class t{_scriptService;_windowService;_currentUserService;_window;_currentUser=null;constructor(e,n,r){this._scriptService=e,this._windowService=n,this._currentUserService=r,this._window=this._windowService.get(),this._currentUserService.currentUser.subscribe(o=>{this._currentUser=o})}init(){return this._scriptService.loadJsScript({id:"ze-snippet",async:!0,src:"https://static.zdassets.com/ekr/snippet.js?key=ae01a2ee-3f76-4271-ba66-9e6b7e7b51f0",defer:!0}).pipe(BG(2500),ot(()=>this._window.zE("webWidget","hide")))}open(){this._window.zE("webWidget","show"),this._window.zE("webWidget","open");function e(n){return/^[^@]+\.[^@]+@bindoc\.de$/.test(n)}this._currentUser&&this._currentUser.idTokenClaims.emails.some(n=>e(n))&&this._window.zE("webWidget","prefill",{name:{value:this._currentUser.name},email:{value:this._currentUser.idTokenClaims.emails.at(0)}}),this._window.zE("webWidget:on","close",()=>{this._window.zE("webWidget","hide")})}static \u0275fac=function(n){return new(n||t)(ai(g5),ai(Pte),ai(Yg))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var K$e=(()=>{class t{_zendeskService;disabled=!0;tooltip="Loading...";constructor(e){this._zendeskService=e,this._zendeskService.init().subscribe({next:()=>{this.disabled=!1,this.tooltip="Support Ticket erstellen"},error:n=>{this.disabled=!0,this.tooltip="Browser blockiert das Laden der Support Ticket Integration",console.error("Zendesk initialization failed",n)}})}open(){this._zendeskService.open()}static \u0275fac=function(n){return new(n||t)(xe(Nae))};static \u0275cmp=re({type:t,selectors:[["bd-user-zendesk-button"]],decls:2,vars:2,consts:[["pButton","",1,"text-2xl","bg-(--app-shell-color)!","border-(--app-shell-color)!","text-(--app-shell-contrast-color)!",3,"click","disabled","pTooltip"],[1,"pi","pi-question-circle"]],template:function(n,r){n&1&&(O(0,"button",0),te("click",function(){return r.open()}),be(1,"i",1),M()),n&2&&D("disabled",r.disabled)("pTooltip",r.tooltip)},dependencies:[aw,tg],encapsulation:2})}return t})();var sSe=(()=>{class t extends hp{_injector;constructor(e){super(),this._injector=e}handleError(e){super.handleError(e),this._injector.get(aae).trackException(e)}static \u0275fac=function(n){return new(n||t)(ai(Ir))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var lSe=(()=>{class t extends b5{_windowRefService;_scriptService;_router;_authenticationService;name="BdHubspotTrackingService";_id="hs-script-loader";isAuthenticatedUser=!1;constructor(e,n,r,o){super(),this._windowRefService=e,this._scriptService=n,this._router=r,this._authenticationService=o,this._authenticationService.authentication$.subscribe(a=>{this.isAuthenticatedUser=a})}init(){this._scriptService.loadJsScript({id:this._id,async:!0,src:"//js.hs-scripts.com/5251653.js",defer:!0});let e=this._router.events.pipe(vn(n=>this.isAuthenticatedUser),vn(n=>this.isEnabled),vn(n=>n instanceof qf)).subscribe(n=>{this.trackRoute(n)});this._subs.push(e),this.isEnabled=!0}destroy(){this._scriptService.removeJsScript(this._id),this.isEnabled=!1,this._unsubscribe()}addAuthenticatedUserContext(e){let n=this._windowRefService.get(),r=n._hsq=n._hsq||[];e&&r.push(["identify",{email:e.username}])}removeAuthenticatedUserContext(){let e=this._windowRefService.get();e._hsq=[]}trackException(e){}trackEvent(e){}trackRoute(e){let n=this._windowRefService.get(),r=n._hsq=n._hsq||[];r.push(["setPath",e.url]),r.push(["trackPageView"])}static \u0275fac=function(n){return new(n||t)(ai(Pte),ai(g5),ai(Ws),ai(em))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hy(t,i){return t||i}function rp(t,i){return t[i]}var Kg=void 0,Nm=null,SSe="",jae="function",pq="object",zE="prototype",Vae="__proto__",lF="undefined",zae="constructor",wSe="Symbol",K5="length",Uae="name",og="call",mq="toString",ISe="getOwnPropertyDescriptor";var a0=hy(Object),TSe=rp(a0,zE),iqe=hy(String),dF=rp(iqe,zE),hq=hy(Math),nqe=hy(Array),$ae=rp(nqe,zE),UE=rp($ae,"slice");var W$e="_polyfill",Q$e="__nw21$polytype__";function Cu(t,i){try{return{v:t.apply(this,i)}}catch(e){return{e}}}function SHt(t,i,e){var n=Cu(t,e);return n.e?i:n.v}var cSe;function qae(t){return function(i){return typeof i===t}}function rqe(t){var i="[object "+t+"]";return function(e){return!!(e&&Yae(e)===i)}}function Yae(t){return TSe[mq].call(t)}function Hl(t){return typeof t===lF||t===lF}function wHt(t){return t===Kg}function Gn(t){return t===Nm||Hl(t)}function ESe(t){return t===Nm||t===Kg}function oqe(t){return!!t||t!==Kg}function IHt(t){return!cSe&&(cSe=["string","number","boolean",lF,"symbol","bigint"]),t!==pq&&cSe.indexOf(t)!==-1}var wo=qae("string"),oo=qae(jae);function im(t){return!t&&Gn(t)?!1:!!t&&typeof t===pq}var ea=rp(nqe,"isArray"),aqe=rqe("Date"),s1=qae("number"),fq=qae("boolean");var uF=rqe("Error");function Pv(t){return!!(t&&t.then&&oo(t.then))}function YM(t){return!(!t||SHt(function(){return!(t&&0+t)},!t))}function ASe(){}function THt(){return!1}var tm=hy(iqe),EHt="[object Error]";function Fr(t,i){var e=SSe,n=TSe[mq][og](t);n===EHt&&(t={stack:tm(t.stack),message:tm(t.message),name:tm(t.name)});try{e=JSON.stringify(t,Nm,i?typeof i=="number"?i:4:Kg),e=(e?e.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):Nm)||tm(t)}catch(r){e=" - "+Fr(r,i)}return n+": "+e}function af(t){throw new Error(t)}function s0(t){throw new TypeError(t)}function Kae(t){ESe(t)&&s0("Cannot convert undefined or null to object")}function AHt(t){wo(t)||s0("'"+Fr(t)+"' is not a string")}function Wg(t,i){return!!t&&TSe.hasOwnProperty[og](t,i)}var DHt=hy(rp(a0,ISe),ASe),l1=hy(rp(a0,"hasOwn"),kHt);function kHt(t,i){return Kae(t),Wg(t,i)||!!DHt(t,i)}function ba(t,i,e){if(t&&(im(t)||oo(t))){for(var n in t)if(l1(t,n)&&i[og](e||t,n,t[n])===-1)break}}function _r(t,i,e){if(t)for(var n=t[K5]>>>0,r=0;r0&&oo(e[0])&&(i=e[0])}return i||setTimeout}function fGt(t){var i=oo(t)?t:mGt;if(!i){var e=Qae().tmOut||[];ea(e)&&e.length>1&&oo(e[1])&&(i=e[1])}return i||clearTimeout}function wqe(t,i,e){var n=ea(i),r=n?i.length:0,o=hGt(r>0?i[0]:n?Kg:i),a=fGt(r>1?i[1]:Kg),c=e[0];e[0]=function(){m.dn(),cF(c,Kg,UE[og](arguments))};var m=uGt(t,function(g){if(g){if(g.refresh)return g.refresh(),g;cF(a,Kg,[g])}return cF(o,Kg,e)},function(g){cF(a,Kg,[g])});return m.h}function rm(t,i){return wqe(!0,Kg,UE[og](arguments))}function Iqe(t,i){return wqe(!1,Kg,UE[og](arguments))}var fF=dqe,USe=uqe;var u1=fF({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2});var p1="toLowerCase",Io="length",eU="warnToConsole",GE="throwInternal",Vw="watch",pC="apply",ys="push",mC="splice",cu="logger",zw="cancel",jE="initialize",Uw="identifier",tU="removeNotificationListener",iU="addNotificationListener",gy="isInitialized",bq="getNotifyMgr",QM="getPlugin",Lv="name",bh="processNext",ose="getProcessTelContext",$E="value",ZM="enabled",HSe="stopPollingInternalLogs",hC="unload",Cq="onComplete",xq="version",ase="loggingLevelConsole",Hw="createNew",Bv="teardown",nU="messageId",Gw="message",_y="diagLog",XM="_doTeardown",gF="update",Vv="getNext",JM="setNextPlugin",Sq="userAgent",m1="split",h1="replace",qE="type",GSe="evtName",f1="status",jSe="indexOf",$Se="getAllResponseHeaders",wq="isChildEvt",zv="data",_F="getCtx",g1="setCtx",qSe="itemsReceived",Iq="headers",rU="urlString",yF="timeout";var Tq="traceFlags",sse="getAttribute";var YSe;function Tqe(t,i){YSe||(YSe=nse("AggregationError",function(n,r){r[Io]>1&&(n.errors=r[1])}));var e=t||"One or more errors occurred.";throw _r(i,function(n,r){e+=` `.concat(r," > ").concat(Fr(n))}),new YSe(e,i||[])}var oU="function",Eq="object",vF="undefined",Xg="prototype";var aU=Object,KSe=aU[Xg];var q$n=(nm()||{}).Symbol,Y$n=(nm()||{}).Reflect;var Eqe="hasOwnProperty",_Gt=function(t){for(var i,e=1,n=arguments.length;e0)for(var r=0;r=0;e--)if(t[e]===i)return!0;return!1}function bGt(t,i,e,n){function r(m,g,C){var w=g[C];if(w[XSe]&&n){var P=m[fse]||{};P[Aq]!==!1&&(w=(P[g[sU]]||{})[C]||w)}return function(){return w.apply(m,arguments)}}var o=d1(null);gse(e,function(m){o[m]=r(i,e,m)});for(var a=bF(t),c=[];a&&!rwe(a)&&!awe(c,a);)gse(a,function(m){!o[m]&&owe(a,m,!Dq)&&(o[m]=r(i,a,m))}),c.push(a),a=bF(a);return o}function CGt(t,i,e,n){var r=null;if(t&&Wg(e,sU)){var o=t[fse]||d1(null);if(r=(o[e[sU]]||d1(null))[i],r||_se("Missing ["+i+"] "+hse),!r[JSe]&&o[Aq]!==!1){for(var a=!Wg(t,i),c=bF(t),m=[];a&&c&&!rwe(c)&&!awe(m,c);){var g=c[i];if(g){a=g===n;break}m.push(c),c=bF(c)}try{a&&(t[i]=r),r[JSe]=1}catch{o[Aq]=!1}}}return r}function xGt(t,i,e){var n=i[t];return n===e&&(n=bF(i)[t]),typeof n!==hse&&_se("["+t+"] is not a "+hse),n}function SGt(t,i,e,n,r){function o(m,g){var C=function(){var w=CGt(this,g,m,C)||xGt(g,m,C);return w.apply(this,arguments)};return C[XSe]=1,C}if(!pse(t)){var a=e[fse]=e[fse]||d1(null);if(!pse(a)){var c=a[i]=a[i]||d1(null);a[Aq]!==!1&&(a[Aq]=!!r),pse(c)||gse(e,function(m){owe(e,m,!1)&&e[m]!==n[m]&&(c[m]=e[m],delete e[m],(!Wg(t,m)||t[m]&&!t[m][XSe])&&(t[m]=o(t,m)))})}}}function wGt(t,i){if(Dq){for(var e=[],n=bF(i);n&&!rwe(n)&&!awe(e,n);){if(n===t)return!0;e.push(n),n=bF(n)}return!1}return!0}function ZSe(t,i){return Wg(t,YE)?t.name||i||Aqe:((t||{})[mse]||{}).name||i||Aqe}function Ka(t,i,e,n){Wg(t,YE)||_se("theClass is an invalid class definition.");var r=t[YE];wGt(r,i)||_se("["+ZSe(t)+"] not in hierarchy of ["+ZSe(i)+"]");var o=null;Wg(r,sU)?o=r[sU]:(o=yGt+ZSe(t,"_")+"$"+twe.n,twe.n++,r[sU]=o);var a=Ka[Oqe],c=!!a[use];c&&n&&n[use]!==void 0&&(c=!!n[use]);var m=vGt(i),g=bGt(r,i,m,c);e(i,g);var C=!!Dq&&!!a[ewe];C&&n&&(C=!!n[ewe]),SGt(r,o,i,m,C!==!1)}Ka[Oqe]=twe.o;var vse="Promise";var hwe="rejected";function Ch(t,i){return Fqe(t,function(e){return i?i({status:"fulfilled",rejected:!1,value:e}):e},function(e){return i?i({status:hwe,rejected:!0,reason:e}):e})}function Fqe(t,i,e,n){var r=t;try{if(Pv(t))(i||e)&&(r=t.then(i,e));else try{i&&(r=i(t))}catch(o){if(e)r=e(o);else throw o}}finally{n&&IGt(r,n)}return r}function IGt(t,i){var e=t;return i&&(Pv(t)?t.finally?e=t.finally(i):e=t.then(function(n){return i(),n},function(n){throw i(),n}):i()),e}var swe,lwe,cwe,Rqe=!1;function TGt(t,i,e,n){swe=swe||{toString:function(){return"[[PromiseState]]"}},lwe=lwe||{toString:function(){return"[[PromiseResult]]"}},cwe=cwe||{toString:function(){return"[[PromiseIsHandled]]"}};var r={};r[swe]={get:i},r[lwe]={get:e},r[cwe]={get:n},DSe(t,r)}var Lqe=["pending","resolving","resolved",hwe],Pqe="dispatchEvent",yse;function EGt(t){var i;return t&&t.createEvent&&(i=t.createEvent("Event")),!!i&&i.initEvent}function AGt(t,i,e,n){var r=Hd();!yse&&(yse=Fv(!!Cu(EGt,[r]).v));var o=yse.v?r.createEvent("Event"):n?new Event(i):{};if(e&&e(o),yse.v&&o.initEvent(i,!1,!0),o&&t[Pqe])t[Pqe](o);else{var a=t["on"+i];if(a)a(o);else{var c=Pc("console");c&&(c.error||c.log)(i,Fr(o))}}}var Bqe="unhandledRejection",DGt=Bqe.toLowerCase(),kq=[],kGt=0,MGt=10;var dwe;function Nqe(t){return oo(t)?t.toString():Fr(t)}function Vqe(t,i,e){var n=J5(arguments,3),r=0,o=!1,a,c=[],m=kGt++,g=kq.length>0?kq[kq.length-1]:void 0,C=!1,w=null,P;function R(Ie,ye){try{kq.push(m),C=!0,w&&w.cancel(),w=null;var fe=t(function(Re,Ae){c.push(function(){try{var ke=r===2?Ie:ye,Qe=Hl(ke)?a:oo(ke)?ke(a):ke;Pv(Qe)?Qe.then(Re,Ae):ke?Re(Qe):r===3?Ae(Qe):Re(Qe)}catch(we){Ae(we)}}),o&&K()},n);return fe}finally{kq.pop()}}function z(Ie){return R(void 0,Ie)}function H(Ie){var ye=Ie,fe=Ie;return oo(Ie)&&(ye=function(Re){return Ie&&Ie(),Re},fe=function(Re){throw Ie&&Ie(),Re}),R(ye,fe)}function j(){return Lqe[r]}function K(){if(c.length>0){var Ie=c.slice();c=[],C=!0,w&&w.cancel(),w=null,i(Ie)}}function ne(Ie,ye){return function(fe){if(r===ye){if(Ie===2&&Pv(fe)){r=1,fe.then(ne(2,1),ne(3,1));return}r=Ie,o=!0,a=fe,K(),!C&&Ie===3&&!w&&(w=rm(me,MGt))}}}function me(){if(!C)if(C=!0,fqe())process.emit(Bqe,a,P);else{var Ie=Bm()||nm();!dwe&&(dwe=Fv(Cu(Pc,[vse+"RejectionEvent"]).v)),AGt(Ie,DGt,function(ye){return Ya(ye,"promise",{g:function(){return P}}),ye.reason=a,ye},!!dwe.v)}}P={then:R,catch:z,finally:H},Rv(P,"state",{get:j}),Rqe&&TGt(P,j,function(){return Yae(a)},function(){return C}),gqe()&&(P[yq(11)]="IPromise");function Te(){return"IPromise"+(Rqe?"["+m+(Hl(g)?"":":"+g)+"]":"")+" "+j()+(o?" - "+Nqe(a):"")}return P.toString=Te,(function(){oo(e)||s0(vse+": executor is not a function - "+Nqe(e));var ye=ne(3,0);try{e.call(P,ne(2,0),ye)}catch(fe){ye(fe)}})(),P}function OGt(t){return function(i){var e=J5(arguments,1);return t(function(n,r){try{var o=[],a=1;ise(i,function(c,m){c&&(a++,Fqe(c,function(g){o[m]=g,--a===0&&n(o)},r))}),a--,a===0&&n(o)}catch(c){r(c)}},e)}}function RGt(t){return Fv(function(i){var e=J5(arguments,1);return t(function(n,r){var o=[],a=1;function c(m,g){a++,Ch(m,function(C){C.rejected?o[g]={status:hwe,reason:C.reason}:o[g]={status:"fulfilled",value:C.value},--a===0&&n(o)})}try{ea(i)?_r(i,c):PSe(i)?ise(i,c):s0("Input is not an iterable"),a--,a===0&&n(o)}catch(m){r(m)}},e)})}function zqe(t){_r(t,function(i){try{i()}catch{}})}function PGt(t){var i=s1(t)?t:0;return function(e){rm(function(){zqe(e)},i)}}function Uqe(t,i){return Vqe(Uqe,PGt(i),t,i)}var uwe;function NGt(t,i){!uwe&&(uwe=Fv(Cu(Pc,[vse]).v||null));var e=uwe.v;if(!e)return Uqe(t);oo(t)||s0(vse+": executor is not a function - "+Fr(t));var n=0;function r(){return Lqe[n]}var o=new e(function(a,c){function m(C){n=2,a(C)}function g(C){n=3,c(C)}t(m,g)});return Rv(o,"state",{get:r}),o}var pwe;function lU(t){return Vqe(lU,zqe,t)}function Hqe(t,i){return!pwe&&(pwe=RGt(lU)),pwe.v(t,i)}var mwe;function Uv(t,i){return!mwe&&(mwe=Fv(NGt)),mwe.v.call(this,t,i)}var Gqe=OGt(Uv);var vqn=yq(11);var Hv=void 0,Ts="",CF="channels",Sp="core",bse="createPerfMgr",Mq="disabled",KE="extensionConfig",xF="extensions",yy="processTelemetry",SF="priority",cU="eventsSent",e2="eventsDiscarded",dU="eventsSendRequest",jw="perfEvent",Cse="offlineEventsStored",xse="offlineBatchSent",Sse="offlineBatchDrop",uU="getPerfMgr",wse="domain",Ise="path",jqe="Not dynamic - ";var FGt="getPrototypeOf",LGt=/-([a-z])/g,BGt=/([^\w\d_$])/g,VGt=/^(\d+[\w\d_$])/,qqe=Object[FGt];function fC(t){return!Gn(t)}function wF(t){var i=t;return i&&wo(i)&&(i=i[h1](LGt,function(e,n){return n.toUpperCase()}),i=i[h1](BGt,"_"),i=i[h1](VGt,function(e,n){return"_"+n})),i}function xh(t,i){return t&&i?Fu(t,i)!==-1:!1}function gC(t){return t&&t.toISOString()||""}function ol(t){return uF(t)?t[Lv]:Ts}function Zc(t,i,e,n,r){var o=e;return t&&(o=t[i],o!==e&&(!r||r(o))&&(!n||n(e))&&(o=e,t[i]=o)),o}function Sh(t,i,e){var n;return t?(n=t[i],!n&&Gn(n)&&(n=Hl(e)?{}:e,t[i]=n)):n=Hl(e)?{}:e,n}function Yqe(t,i){var e=null,n=null;return oo(t)?e=t:n=t,function(){var r=arguments;if(e&&(n=e()),n)return n[i][pC](n,r)}}function fwe(t,i,e){if(t&&i&&im(t)&&im(i)){var n=function(o){if(wo(o)){var a=i[o];oo(a)?(!e||e(o,!0,i,t))&&(t[o]=Yqe(i,o)):(!e||e(o,!1,i,t))&&(l1(t,o)&&delete t[o],Ya(t,o,{g:function(){return i[o]},s:function(c){i[o]=c}}))}};for(var r in i)n(r)}return t}function IF(t,i,e,n,r){t&&i&&e&&(r!==!1||Hl(t[i]))&&(t[i]=Yqe(e,n))}function t2(t,i,e,n){return t&&i&&im(t)&&ea(e)&&_r(e,function(r){wo(r)&&IF(t,r,i,r,n)}),t}function gwe(t){return(function(){function i(){var e=this;t&&ba(t,function(n,r){e[n]=r})}return i})()}function Ese(t){return t&&Q5&&(t=aU(Q5({},t))),t}function Ase(t,i,e,n,r,o){var a=arguments,c=a[0]||{},m=a[Io],g=!1,C=1;for(m>0&&fq(c)&&(g=c,c=a[C]||{},C++),im(c)||(c={});C>>=0),Nq=tYe+t&n2,Fq=iYe-t&n2,nYe=!0}function JGt(){try{var t=Lm()&2147483647;XGt((Math.random()*eYe^t)+t)}catch{}}function Dwe(t){return t>0?sf(DF()/n2*(t+1))>>>0:0}function DF(t){var i=0,e=wwe()||Iwe();return e&&e.getRandomValues&&(i=e.getRandomValues(new Uint32Array(1))[0]&n2),i===0&&hU()&&(nYe||JGt(),i=rYe()&n2),i===0&&(i=sf(eYe*Math.random()|0)),t||(i>>>=0),i}function rYe(t){Fq=36969*(Fq&65535)+(Fq>>16)&n2,Nq=18e3*(Nq&65535)+(Nq>>16)&n2;var i=(Fq<<16)+(Nq&65535)>>>0&n2|0;return t||(i>>>=0),i}function kF(t){t===void 0&&(t=22);for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=DF()>>>0,n=0,r=Ts;r[Io]>>=6,n===5&&(e=(DF()<<2&4294967295|e&3)>>>0,n=0);return r}var oYe="3.3.9",ejt="."+kF(6),tjt=0;function aYe(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function ijt(t,i){var e=i[t.id];if(!e){e={};try{aYe(i)&&Ya(i,t.id,{e:!1,v:e})}catch{}}return e}function wp(t,i){return i===void 0&&(i=!1),wF(t+tjt+++(i?"."+oYe:Ts)+ejt)}function kse(t){var i={id:wp("_aiData-"+(t||Ts)+"."+oYe),accept:function(e){return aYe(e)},get:function(e,n,r,o){var a=e[i.id];return a?a[wF(n)]:(o&&(a=ijt(i,e),a[wF(n)]=r),r)},kill:function(e,n){if(e&&e[n])try{delete e[n]}catch{}}};return i}function Mse(t){return t&&im(t)&&!ea(t)&&(t.isVal||t.fb||l1(t,"v")||l1(t,"mrg")||l1(t,"ref")||t.set)}function sYe(t,i,e){var n,r=e.dfVal||oqe;if(i&&e.fb){var o=e.fb;ea(o)||(o=[o]);for(var a=0;a0&&Tqe("Watcher error(s): ",z)}}function w(R){if(R&&R.h[Io]>0){a||(a=[]),c||(c=rm(function(){c=null,C()},0));for(var z=0;z0?Ch(QE(t[0],i),function(){Fse(J5(t,1),i,e)}):e(),n}var pYe=500,Owe="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function djt(t,i,e){return!t&&Gn(t)?i:fq(t)?t:tm(t)[p1]()==="true"}function c0(t){return{mrg:!0,v:t}}function Lse(t,i){return{set:t,v:i}}function r2(t,i,e){return{fb:e,isVal:t,v:i}}function op(t,i){return{fb:i,set:djt,v:!!t}}function Rwe(t){return{isVal:wo,v:tm(t||Ts)}}var Pwe=[cU,e2,dU,jw],Vse=null,Bse;function ujt(t,i){return function(){var e=arguments,n=Nwe(i);if(n){var r=n.listener;r&&r[t]&&r[t][pC](r,e)}}}function pjt(){var t=Pc("Microsoft");return t&&(Vse=t.ApplicationInsights),Vse}function Nwe(t){var i=Vse;return!i&&t.disableDbgExt!==!0&&(i=Vse||pjt()),i?i.ChromeDbgExt:null}function mYe(t){if(!Bse){Bse={};for(var i=0;i=z&&(g[Te](me[Gw]),n[Ie]=!0)}else r>=z&&g[Te](me[Gw]);C(z,me)}},g.debugToConsole=function(z){Fwe("debug",z),R("warning",z)},g[eU]=function(z){Fwe("warn",z),R("warning",z)},g.errorToConsole=function(z){Fwe("error",z),R("error",z)},g.resetInternalMessageCount=function(){e=0,n={}},g.logInternalMessage=C,g[hC]=function(z){m&&m.rm(),m=null};function C(z,H){if(!P()){var j=!0,K=fjt+H[nU];if(n[K]?j=!1:n[K]=!0,j&&(z<=o&&(g.queue[ys](H),e++,R(z===1?"error":"warn",H)),e===a)){var ne="Internal events throttle limit per PageView reached for this app.",me=new ZE(23,ne,!1);g.queue[ys](me),z===1?g.errorToConsole(ne):g[eU](ne)}}}function w(z){return Gl(Um(z,gjt,g).cfg,function(H){var j=H.cfg;r=j[ase],o=j.loggingLevelTelemetry,a=j.maxMessageLimit,c=j.enableDebug})}function P(){return e>=a}function R(z,H){var j=Nwe(i||{});j&&j[_y]&&j[_y](z,H)}})}return t.__ieDyn=1,t})();function Lwe(t){return t||new _U}function sr(t,i,e,n,r,o){o===void 0&&(o=!1),Lwe(t)[GE](i,e,n,r,o)}function Gv(t,i){Lwe(t)[eU](i)}function Bwe(t,i,e){Lwe(t).logInternalMessage(i,e)}var Vwe,MF,gYe="toGMTString",_Ye="toUTCString",jwe="cookie",zwe="expires",yYe="isCookieUseDisabled",Hwe="disableCookiesUsage",o2="_ckMgr",zse=null,Uwe=null,vYe=null,Yw,bYe={},Hse={},yjt=(Vwe={cookieCfg:c0((MF={},MF[wse]={fb:"cookieDomain",dfVal:fC},MF.path={fb:"cookiePath",dfVal:fC},MF.enabled=Hv,MF.ignoreCookies=Hv,MF.blockedCookies=Hv,MF)),cookieDomain:Hv,cookiePath:Hv},Vwe[Hwe]=Hv,Vwe);function $we(){!Yw&&(Yw=kSe(function(){return Hd()}))}function vjt(t,i){var e=OF[o2]||Hse[o2];return e||(e=OF[o2]=OF(t,i),Hse[o2]=e),e}function Use(t){return t?t.isEnabled():!0}function IYe(t,i){return i&&t&&ea(t.ignoreCookies)?Ed(t.ignoreCookies,i)!==-1:!1}function bjt(t,i){return i&&t&&ea(t.blockedCookies)&&Ed(t.blockedCookies,i)!==-1?!0:IYe(t,i)}function CYe(t,i){var e=i[ZM];if(Gn(e)){var n=void 0;Hl(t[yYe])||(n=!t[yYe]),Hl(t[Hwe])||(n=!t[Hwe]),e=n}return e}function RF(t,i){var e;if(t)e=t.getCookieMgr();else if(i){var n=i.cookieCfg;n&&n[o2]?e=n[o2]:e=OF(i)}return e||(e=vjt(i,(t||{})[cu])),e}function OF(t,i){var e,n,r,o,a,c,m,g;t=Um(t||Hse,null,i).cfg,o=Gl(t,function(w){w.setDf(w.cfg,yjt),e=w.ref(w.cfg,"cookieCfg"),n=e[Ise]||"/",r=e[wse],a=CYe(t,e)!==!1,c=e.getCookie||Cjt,m=e.setCookie||wYe,g=e.delCookie||wYe},i);var C={isEnabled:function(){var w=CYe(t,e)!==!1&&a&&Gwe(i),P=Hse[o2];return w&&P&&C!==P&&(w=Use(P)),w},setEnabled:function(w){a=w!==!1,e[ZM]=w},set:function(w,P,R,z,H){var j=!1;if(Use(C)&&!bjt(e,w)){var K={},ne=_c(P||Ts),me=Fu(ne,";");if(me!==-1&&(ne=_c(gq(P,me)),K=TYe(Nv(P,me+1))),Zc(K,wse,z||r,YM,Hl),!Gn(R)){var Te=hU();if(Hl(K[zwe])){var Ie=Lm(),ye=Ie+R*1e3;if(ye>0){var fe=new Date;fe.setTime(ye),Zc(K,zwe,xYe(fe,Te?gYe:_Ye)||xYe(fe,Te?gYe:_Ye)||Ts,YM)}}Te||Zc(K,"max-age",Ts+R,null,Hl)}var Re=wh();Re&&Re.protocol==="https:"&&(Zc(K,"secure",null,null,Hl),Uwe===null&&(Uwe=!EYe((ag()||{})[Sq])),Uwe&&Zc(K,"SameSite","None",null,Hl)),Zc(K,Ise,H||n,null,Hl),m(w,SYe(ne,K)),j=!0}return j},get:function(w){var P=Ts;return Use(C)&&!IYe(e,w)&&(P=c(w)),P},del:function(w,P){var R=!1;return Use(C)&&(R=C.purge(w,P)),R},purge:function(w,P){var R,z=!1;if(Gwe(i)){var H=(R={},R[Ise]=P||"/",R[zwe]="Thu, 01 Jan 1970 00:00:01 GMT",R);hU()||(H["max-age"]="0"),g(w,SYe(Ts,H)),z=!0}return z},unload:function(w){o&&o.rm(),o=null}};return C[o2]=C,C}function Gwe(t){if(zse===null){zse=!1,!Yw&&$we();try{var i=Yw.v||{};zse=i[jwe]!==void 0}catch(e){sr(t,2,68,"Cannot access document.cookie - "+ol(e),{exception:Fr(e)})}}return zse}function TYe(t){var i={};if(t&&t[Io]){var e=_c(t)[m1](";");_r(e,function(n){if(n=_c(n||Ts),n){var r=Fu(n,"=");r===-1?i[n]=null:i[_c(gq(n,r))]=_c(Nv(n,r+1))}})}return i}function xYe(t,i){return oo(t[i])?t[i]():null}function SYe(t,i){var e=t||Ts;return ba(i,function(n,r){e+="; "+n+(Gn(r)?Ts:"="+r)}),e}function Cjt(t){var i=Ts;if(!Yw&&$we(),Yw.v){var e=Yw.v[jwe]||Ts;vYe!==e&&(bYe=TYe(e),vYe=e),i=_c(bYe[t]||Ts)}return i}function wYe(t,i){!Yw&&$we(),Yw.v&&(Yw.v[jwe]=t+"="+i)}function EYe(t){return wo(t)?!!(xh(t,"CPU iPhone OS 12")||xh(t,"iPad; CPU OS 12")||xh(t,"Macintosh; Intel Mac OS X 10_14")&&xh(t,"Version/")&&xh(t,"Safari")||xh(t,"Macintosh; Intel Mac OS X 10_14")&&vq(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||xh(t,"Chrome/5")||xh(t,"Chrome/6")||xh(t,"UnrealEngine")&&!xh(t,"Chrome")||xh(t,"UCBrowser/12")||xh(t,"UCBrowser/11")):!1}var xjt={perfEvtsSendAll:!1};function Sjt(t){t.h=null;var i=t.cb;t.cb=[],_r(i,function(e){Cu(e.fn,[e.arg])})}function a2(t,i,e,n){_r(t,function(r){r&&r[i]&&(e?(e.cb[ys]({fn:n,arg:r}),e.h=e.h||rm(Sjt,0,e)):Cu(n,[r]))})}var AYe=(function(){function t(i){this.listeners=[];var e,n,r=[],o={h:null,cb:[]},a=Um(i,xjt);n=a[Vw](function(c){e=!!c.cfg.perfEvtsSendAll}),Ka(t,this,function(c){Ya(c,"listeners",{g:function(){return r}}),c[iU]=function(m){r[ys](m)},c[tU]=function(m){for(var g=Ed(r,m);g>-1;)r[mC](g,1),g=Ed(r,m)},c[cU]=function(m){a2(r,cU,o,function(g){g[cU](m)})},c[e2]=function(m,g){a2(r,e2,o,function(C){C[e2](m,g)})},c[dU]=function(m,g){a2(r,dU,g?o:null,function(C){C[dU](m,g)})},c[jw]=function(m){m&&(e||!m[wq]())&&a2(r,jw,null,function(g){m.isAsync?rm(function(){return g[jw](m)},0):g[jw](m)})},c[Cse]=function(m){m&&m[Io]&&a2(r,Cse,o,function(g){g[Cse](m)})},c[xse]=function(m){m&&m[zv]&&a2(r,xse,o,function(g){g[xse](m)})},c[Sse]=function(m,g){if(m>0){var C=g||0;a2(r,Sse,o,function(w){w[Sse](m,C)})}},c[hC]=function(m){var g=function(){n&&n.rm(),n=null,r=[],o.h&&o.h[zw](),o.h=null,o.cb=[]},C;if(a2(r,"unload",null,function(w){var P=w[hC](m);P&&(C||(C=[]),C[ys](P))}),C)return Uv(function(w){return Ch(Gqe(C),function(){g(),w()})});g()}})}return t.__ieDyn=1,t})();var yU="ctx",Ywe="ParentContextKey",Hq="ChildrenContextKey",wjt=null,Gq=(function(){function t(i,e,n){var r=this;if(r.start=Lm(),r[Lv]=i,r.isAsync=n,r[wq]=function(){return!1},oo(e)){var o;Ya(r,"payload",{g:function(){return!o&&oo(e)&&(o=e(),e=null),o}})}r[_F]=function(a){return a?a===t[Ywe]||a===t[Hq]?r[a]:(r[yU]||{})[a]:null},r[g1]=function(a,c){if(a)if(a===t[Ywe])r[a]||(r[wq]=function(){return!0}),r[a]=c;else if(a===t[Hq])r[a]=c;else{var m=r[yU]=r[yU]||{};m[a]=c}},r.complete=function(){var a=0,c=r[_F](t[Hq]);if(ea(c))for(var m=0;m>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var r=t[8+(DF()&3)|0];return c1(i,0,8)+c1(i,9,4)+"4"+c1(i,13,3)+r+c1(i,16,3)+c1(i,19,12)}var Qwe="00",Ijt="ff",kYe="00000000000000000000000000000000",MYe="0000000000000000";function jq(t,i,e){return t&&t[Io]===i&&t!==e?!!t.match(/^[\da-f]*$/i):!1}function DYe(t,i,e){return jq(t,i)?t:e}function Tjt(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var i=t.toString(16);i[Io]<2;)i="0"+i;return i}function $q(t,i,e,n){return{version:jq(n,2,Ijt)?n:Qwe,traceId:PF(t)?t:u0(),spanId:NF(i)?i:gq(u0(),16),traceFlags:e>=0&&e<=255?e:1}}function PF(t){return jq(t,32,kYe)}function NF(t){return jq(t,16,MYe)}function qq(t){if(t){var i=Tjt(t[Tq]);jq(i,2)||(i="01");var e=t[xq]||Qwe;return e!=="00"&&e!=="ff"&&(e=Qwe),"".concat(e.toLowerCase(),"-").concat(DYe(t.traceId,32,kYe).toLowerCase(),"-").concat(DYe(t.spanId,16,MYe).toLowerCase(),"-").concat(i.toLowerCase())}return""}function Gse(t){var i=t.getElementsByTagName("script"),e=[];return _r(i,function(n){var r=n[sse]("src");if(r){var o=n[sse]("crossorigin"),a=n.hasAttribute("async")===!0,c=n.hasAttribute("defer")===!0,m=n[sse]("referrerpolicy"),g={url:r};o&&(g.crossOrigin=o),a&&(g.async=a),c&&(g.defer=c),m&&(g.referrerPolicy=m),e[ys](g)}}),e}var Ejt=kse("plugin");function XE(t){return Ejt.get(t,"state",{},!0)}function Zwe(t,i){for(var e=[],n=null,r=t[Vv](),o;r;){var a=r[QM]();if(a){n&&n[JM]&&a[yy]&&n[JM](a),o=XE(a);var c=!!o[gy];a[gy]&&(c=a[gy]()),c||e[ys](a),n=a,r=r[Vv]()}}_r(e,function(m){var g=t[Sp]();m[jE](t.getCfg(),g,i,t[Vv]()),o=XE(m),!m[Sp]&&!o[Sp]&&(o[Sp]=g),o[gy]=!0,delete o[Bv]})}function jse(t){return t.sort(function(i,e){var n=0;if(e){var r=e[yy];i[yy]?n=r?i[SF]-e[SF]:1:r&&(n=-1)}else n=i?1:-1;return n})}function OYe(t){var i={};return{getName:function(){return i[Lv]},setName:function(e){t&&t.setName(e),i[Lv]=e},getTraceId:function(){return i.traceId},setTraceId:function(e){t&&t.setTraceId(e),PF(e)&&(i.traceId=e)},getSpanId:function(){return i.spanId},setSpanId:function(e){t&&t.setSpanId(e),NF(e)&&(i.spanId=e)},getTraceFlags:function(){return i[Tq]},setTraceFlags:function(e){t&&t.setTraceFlags(e),i[Tq]=e}}}var Ajt="TelemetryPluginChain",RYe="_hasRun",PYe="_getTelCtx",NYe=0;function Djt(t,i,e){for(;t;){if(t[QM]()===e)return t;t=t[Vv]()}return l2([e],i.config||{},i)}function Xwe(t,i,e,n){var r=null,o=[];i||(i=Um({},null,e[cu])),n!==null&&(r=n?Djt(t,e,n):t);var a={_next:m,ctx:{core:function(){return e},diagLog:function(){return d0(e,i.cfg)},getCfg:function(){return i.cfg},getExtCfg:C,getConfig:w,hasNext:function(){return!!r},getNext:function(){return r},setNext:function(R){r=R},iterate:P,onComplete:c}};function c(R,z){for(var H=[],j=2;j0&&(_r(z,function(H){try{H.func.call(H.self,H.args)}catch(j){sr(e[cu],2,73,"Unexpected Exception during onComplete - "+Fr(j))}}),o=[])}return R}function g(R,z){var H=null,j=i.cfg;if(j&&R){var K=j[KE];!K&&z&&(K={}),j[KE]=K,K=i.ref(j,KE),K&&(H=K[R],!H&&z&&(H={}),K[R]=H,H=i.ref(K,R))}return H}function C(R,z){var H=g(R,!0);return z&&ba(z,function(j,K){if(Gn(H[j])){var ne=i.cfg[j];(ne||!Gn(ne))&&(H[j]=ne)}Lq(i,H,j,K)}),i.setDf(H,z)}function w(R,z,H){H===void 0&&(H=!1);var j,K=g(R,!1),ne=i.cfg;return K&&(K[z]||!Gn(K[z]))?j=K[z]:(ne[z]||!Gn(ne[z]))&&(j=ne[z]),j||!Gn(j)?j:H}function P(R){for(var z;z=a._next();){var H=z[QM]();H&&R(H)}}return a}function Hm(t,i,e,n){var r=Um(i),o=Xwe(t,r,e,n),a=o.ctx;function c(g){var C=o._next();return C&&C[yy](g,a),!C}function m(g,C){return g===void 0&&(g=null),ea(g)&&(g=l2(g,r.cfg,e,C)),Hm(g||a[Vv](),r.cfg,e,C)}return a[bh]=c,a[Hw]=m,a}function vU(t,i,e){var n=Um(i.config),r=Xwe(t,n,i,e),o=r.ctx;function a(m){var g=r._next();return g&&g[hC](o,m),!g}function c(m,g){return m===void 0&&(m=null),ea(m)&&(m=l2(m,n.cfg,i,g)),vU(m||o[Vv](),i,g)}return o[bh]=a,o[Hw]=c,o}function Yq(t,i,e){var n=Um(i.config),r=Xwe(t,n,i,e),o=r.ctx;function a(m){return o.iterate(function(g){oo(g[gF])&&g[gF](o,m)})}function c(m,g){return m===void 0&&(m=null),ea(m)&&(m=l2(m,n.cfg,i,g)),Yq(m||o[Vv](),i,g)}return o[bh]=a,o[Hw]=c,o}function l2(t,i,e,n){var r=null,o=!n;if(ea(t)&&t[Io]>0){var a=null;_r(t,function(c){if(!o&&n===c&&(o=!0),o&&c&&oo(c[yy])){var m=kjt(c,i,e);r||(r=m),a&&a._setNext(m),a=m}})}return n&&!r?l2([n],i,e):r}function kjt(t,i,e){var n=null,r=oo(t[yy]),o=oo(t[JM]),a;t?a=t[Uw]+"-"+t[SF]+"-"+NYe++:a="Unknown-0-"+NYe++;var c={getPlugin:function(){return t},getNext:function(){return n},processTelemetry:C,unload:w,update:P,_id:a,_setNext:function(R){n=R}};function m(){var R;return t&&oo(t[PYe])&&(R=t[PYe]()),R||(R=Hm(c,i,e)),R}function g(R,z,H,j,K){var ne=!1,me=t?t[Uw]:Ajt,Te=R[RYe];return Te||(Te=R[RYe]={}),R.setNext(n),t&&s2(R[Sp](),function(){return me+":"+H},function(){Te[a]=!0;try{var Ie=n?n._id:Ts;Ie&&(Te[Ie]=!1),ne=z(R)}catch(fe){var ye=n?Te[n._id]:!0;ye&&(ne=!0),(!n||!ye)&&sr(R[_y](),1,73,"Plugin ["+me+"] failed during "+H+" - "+Fr(fe)+", run flags: "+Fr(Te))}},j,K),ne}function C(R,z){z=z||m();function H(j){if(!t||!r)return!1;var K=XE(t);return K[Bv]||K[Mq]?!1:(o&&t[JM](n),t[yy](R,j),!0)}g(z,H,"processTelemetry",function(){return{item:R}},!R.sync)||z[bh](R)}function w(R,z){function H(){var j=!1;if(t){var K=XE(t),ne=t[Sp]||K[Sp];t&&(!ne||ne===R.core())&&!K[Bv]&&(K[Sp]=null,K[Bv]=!0,K[gy]=!1,t[Bv]&&t[Bv](R,z)===!0&&(j=!0))}return j}g(R,H,"unload",function(){},z.isAsync)||R[bh](z)}function P(R,z){function H(){var j=!1;if(t){var K=XE(t),ne=t[Sp]||K[Sp];t&&(!ne||ne===R.core())&&!K[Bv]&&t[gF]&&t[gF](R,z)===!0&&(j=!0)}return j}g(R,H,"update",function(){},!1)||R[bh](z)}return Zg(c)}function $se(){var t=[];function i(n){n&&t[ys](n)}function e(n,r){_r(t,function(o){try{o(n,r)}catch(a){sr(n[_y](),2,73,"Unexpected error calling unload handler - "+Fr(a))}}),t=[]}return{add:i,run:e}}var qse,Yse;function Kse(){var t=[];function i(n){var r=t;t=[],_r(r,function(o){try{(o.rm||o.remove).call(o)}catch(a){sr(n,2,73,"Unloading:"+Fr(a))}}),qse&&r[Io]>qse&&(Yse?Yse("doUnload",r):sr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))}function e(n){n&&(HE(t,n),qse&&t[Io]>qse&&(Yse?Yse("Add",t):sr(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}return{run:i,add:e}}var Jwe,c2="getPlugin",Mjt=(Jwe={},Jwe[KE]={isVal:fC,v:{}},Jwe),p0=(function(){function t(){var i=this,e,n,r,o,a;g(),Ka(t,i,function(C){C[jE]=function(w,P,R,z){m(w,P,z),e=!0},C[Bv]=function(w,P){var R=C[Sp];if(!R||w&&R!==w[Sp]())return;var z,H=!1,j=w||vU(null,R,r&&r[c2]?r[c2]():r),K=P||{reason:0,isAsync:!1};function ne(){H||(H=!0,o.run(j,P),a.run(j[_y]()),z===!0&&j[bh](K),g())}return!C[XM]||C[XM](j,K,ne)!==!0?ne():z=!0,z},C[gF]=function(w,P){var R=C[Sp];if(!R||w&&R!==w[Sp]())return;var z,H=!1,j=w||Yq(null,R,r&&r[c2]?r[c2]():r),K=P||{reason:0};function ne(){H||(H=!0,m(j.getCfg(),j.core(),j[Vv]()))}return!C._doUpdate||C._doUpdate(j,K,ne)!==!0?ne():z=!0,z},IF(C,"_addUnloadCb",function(){return o},"add"),IF(C,"_addHook",function(){return a},"add"),Ya(C,"_unloadHooks",{g:function(){return a}})}),i[_y]=function(C){return c(C)[_y]()},i[gy]=function(){return e},i.setInitialized=function(C){e=C},i[JM]=function(C){r=C},i[bh]=function(C,w){w?w[bh](C):r&&oo(r[yy])&&r[yy](C,null)},i._getTelCtx=c;function c(C){C===void 0&&(C=null);var w=C;if(!w){var P=n||Hm(null,{},i[Sp]);r&&r[c2]?w=P[Hw](null,r[c2]):w=P[Hw](null,r)}return w}function m(C,w,P){Um(C,Mjt,d0(w)),!P&&w&&(P=w[ose]()[Vv]());var R=r;r&&r[c2]&&(R=r[c2]()),i[Sp]=w,n=Hm(P,C,w,R)}function g(){e=!1,i[Sp]=null,n=null,r=null,a=Kse(),o=$se()}}return t.__ieDyn=1,t})();function Ojt(t,i,e){var n={id:i,fn:e};HE(t,n);var r={remove:function(){_r(t,function(o,a){if(o.id===n.id)return t[mC](a,1),-1})}};return r}function Rjt(t,i,e){for(var n=!1,r=t[Io],o=0;o"}})}var iIe=(function(){function t(){var i,e,n,r,o,a,c,m,g,C,w,P,R,z,H,j,K,ne,me,Te,Ie,ye,fe,Re,Ae,ke,Qe,we,Rt,rt,Ze,Et,We;Ka(t,this,function(bt){li(),bt._getDbgPlgTargets=function(){return[fe,r]},bt[gy]=function(){return e},bt.activeStatus=function(){return ke},bt._setPendingStatus=function(){ke=3},bt[jE]=function(Ut,vi,Xt,$i){R&&af(LYe),bt[gy]()&&af("Core cannot be initialized more than once"),i=Um(Ut,eIe,Xt||bt[cu],!1),Ut=i.cfg,ti(i[Vw](function(Ti){var Ki=Ti.cfg;we=Ki.initInMemoMaxSize||Fjt,st(Ki);var un=Ti.ref(Ti.cfg,KE);ba(un,function(Sr){Ti.ref(un,Sr)})})),o=$i,me=Hjt(i,ne,o&&bt[bq](),me),bi(),bt[cu]=Xt;var Bt=Ut[xF];if(C=[],C[ys].apply(C,lse(lse([],vi,!1),Bt,!1)),w=Ut[CF],Bi(null),(!P||P[Io]===0)&&af("No "+CF+" available"),w&&w[Io]>1){var Qt=bt[QM]("TeeChannelController");(!Qt||!Qt.plugin)&&sr(n,1,28,"TeeChannel required")}Ujt(Ut,ye,n),ye=null,e=!0,ke===u1.ACTIVE&&Kt()},bt.getChannels=function(){var Ut=[];return P&&_r(P,function(vi){Ut[ys](vi)}),Zg(Ut)},bt.track=function(Ut){s2(bt[uU](),function(){return"AppInsightsCore:track"},function(){Ut===null&&(wt(Ut),af("Invalid telemetry item")),!Ut[Lv]&&Gn(Ut[Lv])&&(wt(Ut),af("telemetry name required")),Ut.iKey=Ut.iKey||Ie,Ut.time=Ut.time||gC(new Date),Ut.ver=Ut.ver||"4.0",!R&&bt[gy]()&&ke===u1.ACTIVE?ui()[bh](Ut):ke!==u1.INACTIVE&&r[Io]<=we&&r[ys](Ut)},function(){return{item:Ut}},!Ut.sync)},bt[ose]=ui,bt[bq]=function(){return o||(o=new AYe(i.cfg),bt[Pjt]=o),o},bt[iU]=function(Ut){bt.getNotifyMgr()[iU](Ut)},bt[tU]=function(Ut){o&&o[tU](Ut)},bt.getCookieMgr=function(){return m||(m=OF(i.cfg,bt[cu])),m},bt.setCookieMgr=function(Ut){m!==Ut&&(QE(m,!1),m=Ut)},bt[uU]=function(){return a||c||Wwe()},bt.setPerfMgr=function(Ut){a=Ut},bt.eventCnt=function(){return r[Io]},bt.releaseQueue=function(){if(e&&r[Io]>0){var Ut=r;r=[],ke===2?_r(Ut,function(vi){vi.iKey=vi.iKey||Ie,ui()[bh](vi)}):sr(n,2,20,"core init status is not active")}},bt.pollInternalLogs=function(Ut){return H=Ut||null,We=!1,Ze&&Ze[zw](),gt(!0)};function st(Ut){var vi=Ut.instrumentationKey,Xt=Ut.endpointUrl;if(ke!==3){if(Gn(vi)){Ie=null,ke=u1.INACTIVE;var $i="Please provide instrumentation key";e?(sr(n,1,100,$i),Kt()):af($i);return}var Bt=[];Pv(vi)?(Bt[ys](vi),Ie=null):Ie=vi,Pv(Xt)?(Bt[ys](Xt),Qe=null):Qe=Xt,Bt[Io]?kt(Ut,Bt):pi()}}function kt(Ut,vi){Rt=!1,ke=3;var Xt=fC(Ut.initTimeOut)?Ut.initTimeOut:Ljt,$i=Hqe(vi);rt&&rt[zw](),rt=rm(function(){rt=null,Rt||pi()},Xt),Ch($i,function(Bt){try{if(Rt)return;if(!Bt.rejected){var Qt=Bt[$E];if(Qt&&Qt[Io]){var Ti=Qt[0];if(Ie=Ti&&Ti[$E],Qt[Io]>1){var Ki=Qt[1];Qe=Ki&&Ki[$E]}}Ie&&(Ut.instrumentationKey=Ie,Ut.endpointUrl=Qe)}pi()}catch{Rt||pi()}})}function pi(){Rt=!0,Gn(Ie)?(ke=u1.INACTIVE,sr(n,1,112,"ikey can't be resolved from promises")):ke=u1.ACTIVE,Kt()}function Kt(){e&&(bt.releaseQueue(),bt.pollInternalLogs())}function gt(Ut){if((!Ze||!Ze[ZM])&&!We){var vi=Ut||n&&n.queue[Io]>0;vi&&(Et||(Et=!0,ti(i[Vw](function(Xt){var $i=Xt.cfg.diagnosticLogInterval;(!$i||!($i>0))&&($i=1e4);var Bt=!1;Ze&&(Bt=Ze[ZM],Ze[zw]()),Ze=Iqe(Rr,$i),Ze.unref(),Ze[ZM]=Bt}))),Ze[ZM]=!0)}return Ze}bt[HSe]=function(){We=!0,Ze&&Ze[zw](),Rr()},t2(bt,function(){return z},["addTelemetryInitializer"]),bt[hC]=function(Ut,vi,Xt){Ut===void 0&&(Ut=!0),e||af(Njt),R&&af(LYe);var $i={reason:50,isAsync:Ut,flushComplete:!1},Bt;Ut&&!vi&&(Bt=Uv(function(Ki){vi=Ki}));var Qt=vU(yn(),bt);Qt[Cq](function(){ne.run(bt[cu]),Fse([m,o,n],Ut,function(){li(),vi&&vi($i)})},bt);function Ti(Ki){$i.flushComplete=Ki,R=!0,K.run(Qt,$i),bt[HSe](),Qt[bh]($i)}return Rr(),De(Ut,Ti,6,Xt)||Ti(!1),Bt},bt[QM]=wn,bt.addPlugin=function(Ut,vi,Xt,$i){if(!Ut){$i&&$i(!1),Mt(zYe);return}var Bt=wn(Ut[Uw]);if(Bt&&!vi){$i&&$i(!1),Mt("Plugin ["+Ut[Uw]+"] is already loaded!");return}var Qt={reason:16};function Ti(Sr){C[ys](Ut),Qt.added=[Ut],Bi(Qt),$i&&$i(!0)}if(Bt){var Ki=[Bt.plugin],un={reason:2,isAsync:!!Xt};Xn(Ki,un,function(Sr){Sr?(Qt.removed=Ki,Qt.reason|=32,Ti(!0)):$i&&$i(!1)})}else Ti(!1)},bt.updateCfg=function(Ut,vi){vi===void 0&&(vi=!0);var Xt;if(bt[gy]()){Xt={reason:1,cfg:i.cfg,oldCfg:LSe({},i.cfg),newConfig:LSe({},Ut),merge:vi},Ut=Xt.newConfig;var $i=i.cfg;Ut[xF]=$i[xF],Ut[CF]=$i[CF]}i._block(function(Bt){var Qt=Bt.cfg;tIe(Bt,Qt,Ut,vi),vi||ba(Qt,function(Ti){l1(Ut,Ti)||Bt.set(Qt,Ti,Hv)}),Bt.setDf(Qt,eIe)},!0),i.notify(),Xt&&Ci(Xt)},bt.evtNamespace=function(){return j},bt.flush=De,bt.getTraceCtx=function(Ut){return Te||(Te=OYe()),Te},bt.setTraceCtx=function(Ut){Te=Ut||null},bt.addUnloadHook=ti,IF(bt,"addUnloadCb",function(){return K},"add"),bt.onCfgChange=function(Ut){var vi;return e?vi=Gl(i.cfg,Ut,bt[cu]):vi=zjt(ye,Ut),Gjt(vi)},bt.getWParam=function(){return _q()||i.cfg.enableWParam?0:-1};function ht(){var Ut={};Re=[];var vi=function(Xt){Xt&&_r(Xt,function($i){if($i[Uw]&&$i[xq]&&!Ut[$i.identifier]){var Bt=$i[Uw]+"="+$i[xq];Re[ys](Bt),Ut[$i.identifier]=$i}})};vi(P),w&&_r(w,function(Xt){vi(Xt)}),vi(C)}function li(){e=!1,i=Um({},eIe,bt[cu]),i.cfg[ase]=1,Ya(bt,"config",{g:function(){return i.cfg},s:function(vi){bt.updateCfg(vi,!1)}}),Ya(bt,"pluginVersionStringArr",{g:function(){return Re||ht(),Re}}),Ya(bt,"pluginVersionString",{g:function(){return Ae||(Re||ht(),Ae=Re.join(";")),Ae||Ts}}),Ya(bt,"logger",{g:function(){return n||(n=new _U(i.cfg),i[cu]=n),n},s:function(vi){i[cu]=vi,n!==vi&&(QE(n,!1),n=vi)}}),bt[cu]=new _U(i.cfg),fe=[];var Ut=bt.config[xF]||[];Ut.splice(0,Ut[Io]),HE(Ut,fe),z=new FYe,r=[],QE(o,!1),o=null,a=null,c=null,QE(m,!1),m=null,g=null,C=[],w=null,P=null,R=!1,H=null,j=wp("AIBaseCore",!0),K=$se(),Te=null,Ie=null,ne=Kse(),ye=[],Ae=null,Re=null,We=!1,Ze=null,Et=!1,ke=0,Qe=null,we=null,Rt=!1,rt=null}function ui(){var Ut=Hm(yn(),i.cfg,bt);return Ut[Cq](gt),Ut}function Bi(Ut){var vi=Vjt(bt[cu],pYe,C);g=null,Ae=null,Re=null,P=(w||[])[0]||[],P=jse(HE(P,vi[CF]));var Xt=HE(jse(vi[Sp]),P);fe=Zg(Xt);var $i=bt.config[xF]||[];$i.splice(0,$i[Io]),HE($i,fe);var Bt=ui();P&&P[Io]>0&&Zwe(Bt[Hw](P),Xt),Zwe(Bt,Xt),Ut&&Ci(Ut)}function wn(Ut){var vi=null,Xt=null,$i=[];return _r(fe,function(Bt){if(Bt[Uw]===Ut&&Bt!==z)return Xt=Bt,-1;Bt.getChannel&&$i[ys](Bt)}),!Xt&&$i[Io]>0&&_r($i,function(Bt){if(Xt=Bt.getChannel(Ut),!Xt)return-1}),Xt&&(vi={plugin:Xt,setEnabled:function(Bt){XE(Xt)[Mq]=!Bt},isEnabled:function(){var Bt=XE(Xt);return!Bt[Bv]&&!Bt[Mq]},remove:function(Bt,Qt){Bt===void 0&&(Bt=!0);var Ti=[Xt],Ki={reason:1,isAsync:Bt};Xn(Ti,Ki,function(un){un&&Bi({reason:32,removed:Ti}),Qt&&Qt(un)})}}),vi}function yn(){if(!g){var Ut=(fe||[]).slice();Ed(Ut,z)===-1&&Ut[ys](z),g=l2(jse(Ut),i.cfg,bt)}return g}function Xn(Ut,vi,Xt){if(Ut&&Ut[Io]>0){var $i=l2(Ut,i.cfg,bt),Bt=vU($i,bt);Bt[Cq](function(){var Qt=!1,Ti=[];_r(C,function(un,Sr){BYe(un,Ut)?Qt=!0:Ti[ys](un)}),C=Ti,Ae=null,Re=null;var Ki=[];w&&(_r(w,function(un,Sr){var lo=[];_r(un,function(Wr){BYe(Wr,Ut)?Qt=!0:lo[ys](Wr)}),Ki[ys](lo)}),w=Ki),Xt&&Xt(Qt),gt()}),Bt[bh](vi)}else Xt(!1)}function Rr(){if(n&&n.queue){var Ut=n.queue.slice(0);n.queue[Io]=0,_r(Ut,function(vi){var Xt={name:H||"InternalMessageId: "+vi[nU],iKey:Ie,time:gC(new Date),baseType:ZE.dataType,baseData:{message:vi[Gw]}};bt.track(Xt)})}}function De(Ut,vi,Xt,$i){var Bt=1,Qt=!1,Ti=null;$i=$i||5e3;function Ki(){Bt--,Qt&&Bt===0&&(Ti&&Ti[zw](),Ti=null,vi&&vi(Qt),vi=null)}if(P&&P[Io]>0){var un=ui()[Hw](P);un.iterate(function(Sr){if(Sr.flush){Bt++;var lo=!1;Sr.flush(Ut,function(){lo=!0,Ki()},Xt)||lo||(Ut&&Ti==null?Ti=rm(function(){Ti=null,Ki()},$i):Ki())}})}return Qt=!0,Ki(),!0}function bi(){var Ut;ti(i[Vw](function(vi){var Xt=vi.cfg.enablePerfMgr;if(Xt){var $i=vi.cfg[bse];(Ut!==$i||!Ut)&&($i||($i=Bjt),Sh(vi.cfg,bse,$i),Ut=$i,c=null),!a&&!c&&oo($i)&&(c=$i(bt,bt[bq]()))}else c=null,Ut=null}))}function Ci(Ut){var vi=Yq(yn(),bt);vi[Cq](gt),(!bt._updateHook||bt._updateHook(vi,Ut)!==!0)&&vi[bh](Ut)}function Mt(Ut){var vi=bt[cu];vi?(sr(vi,2,73,Ut),gt()):af(Ut)}function wt(Ut){var vi=bt[bq]();vi&&vi[e2]([Ut],2)}function ti(Ut){ne.add(Ut)}})}return t.__ieDyn=1,t})();function Kq(t,i){try{if(t&&t!==""){var e=zm().parse(t);if(e&&e[qSe]&&e[qSe]>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted===e.errors[Io])return e}}catch(n){sr(i,1,43,"Cannot parse the response. "+(n[Lv]||Fr(n)),{response:t})}return null}var _1="",jjt="NoResponseBody",UYe="&"+jjt+"=true",nIe="POST",rIe=(function(){function t(){var i=0,e,n,r,o,a,c,m,g,C,w,P,R,z,H;Ka(t,this,function(j,K){var ne=!0;Rt(),j[jE]=function(rt,Ze){r=Ze,n&&sr(r,1,28,"Sender is already initialized"),j.SetConfig(rt),n=!0},j._getDbgPlgTargets=function(){return[n,o,c,e]},j.SetConfig=function(rt){try{if(a=rt.senderOnCompleteCallBack||{},c=!!rt.disableCredentials,m=rt.fetchCredentials,o=!!rt.isOneDs,e=!!rt.enableSendPromise,C=!!rt.disableXhr,w=!!rt.disableBeacon,P=!!rt.disableBeaconSync,H=rt.timeWrapper,z=!!rt.addNoResponse,R=!!rt.disableFetchKeepAlive,g={sendPOST:ke},o||(ne=!1),c){var Ze=wh();Ze&&Ze.protocol&&Ze.protocol[p1]()==="file:"&&(ne=!1)}return!0}catch{}return!1},j.getSyncFetchPayload=function(){return i},j.getSenderInst=function(rt,Ze){return rt&&rt[Io]?ye(rt,Ze):null},j.getFallbackInst=function(){return g},j[XM]=function(rt,Ze){Rt()},j.preparePayload=function(rt,Ze,Et,We){if(!Ze||We||!Et[zv]){rt(Et);return}try{var bt=Pc("CompressionStream");if(!oo(bt)){rt(Et);return}var st=new ReadableStream({start:function(li){li.enqueue(wo(Et[zv])?new TextEncoder().encode(Et[zv]):Et[zv]),li.close()}}),kt=st.pipeThrough(new bt("gzip")),pi=kt.getReader(),Kt=[],gt=0,ht=!1;return Ch(pi.read(),function li(ui){if(!ht&&!ui.rejected){var Bi=ui[$E];if(!Bi.done)return Kt[ys](Bi[$E]),gt+=Bi.value[Io],Ch(pi.read(),li);for(var wn=new Uint8Array(gt),yn=0,Xn=0,Rr=Kt;Xn0&&(_r(Qg(wn),function(bi){ht.append(bi,wn[bi])}),yn[Iq]=ht),m?yn.credentials=m:ne&&o&&(yn.credentials="include"),Et&&(yn.keepalive=!0,i+=li,o?rt._sendReason===2&&(ui=!0,z&&(bt+=UYe)):ui=!0);var Xn=new Request(bt,yn);try{Xn[Owe]=!0}catch{}if(!Et&&e&&(pi=Uv(function(bi,Ci){Kt=bi,gt=Ci})),!bt){Ie(Ze),Kt&&Kt(!1);return}function Rr(bi,Ci){Ci?fe(Ze,o?0:Ci,{},o?_1:bi):fe(Ze,o?0:400,{},o?_1:bi)}function De(bi,Ci,Mt){var wt=bi[f1],ti=a.fetchOnComplete;ti&&oo(ti)?ti(bi,Ze,Mt||_1,Ci):fe(Ze,wt,{},Mt||_1)}try{Ch(fetch(o?bt:Xn,o?yn:null),function(bi){if(Et&&(i-=li,li=0),!Bi)if(Bi=!0,bi.rejected)Rr(bi.reason&&bi.reason[Gw],499),gt&>(bi.reason);else{var Ci=bi[$E];try{!o&&!Ci.ok?(Ci[f1]?Rr(Ci.statusText,Ci[f1]):Rr(Ci.statusText,499),Kt&&Kt(!1)):o&&!Ci.body?(De(Ci,null,_1),Kt&&Kt(!0)):Ch(Ci.text(),function(Mt){De(Ci,rt,Mt[$E]),Kt&&Kt(!0)})}catch(Mt){Ci&&Ci[f1]?Rr(Fr(Mt),Ci[f1]):Rr(Fr(Mt),499),gt&>(Mt)}}})}catch(bi){Bi||(Rr(Fr(bi),499),gt&>(bi))}return ui&&!Bi&&(Bi=!0,fe(Ze,200,{}),Kt&&Kt(!0)),o&&!Bi&&rt[yF]>0&&H&&H.set(function(){Bi||(Bi=!0,fe(Ze,500,{}),Kt&&Kt(!0))},rt[yF]),pi}function we(rt,Ze,Et){var We=Bm(),bt=new XDomainRequest,st=rt[zv];bt.onload=function(){var ht=pU(bt),li=a&&a.xdrOnComplete;li&&oo(li)?li(bt,Ze,rt):fe(Ze,200,{},ht)},bt.onerror=function(){fe(Ze,400,{},o?_1:Oq(bt))},bt.ontimeout=function(){fe(Ze,500,{})},bt.onprogress=function(){};var kt=We&&We.location&&We.location.protocol||"",pi=rt[rU];if(!pi){Ie(Ze);return}if(!o&&pi.lastIndexOf(kt,0)!==0){var Kt="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";sr(r,2,40,". "+Kt),Te(Kt,Ze);return}var gt=o?pi:pi[h1](/^(https?:)/,"");bt.open(nIe,gt),rt[yF]&&(bt[yF]=rt[yF]),bt.send(st),o&&Et?H&&H.set(function(){bt.send(st)},0):bt.send(st)}function Rt(){i=0,n=!1,e=!1,r=null,o=null,a=null,c=null,m=null,g=null,C=!1,w=!1,P=!1,R=!1,z=!1,H=null}})}return t.__ieDyn=1,t})();var KYe="on",HYe="attachEvent",GYe="addEventListener",jYe="detachEvent",$Ye="removeEventListener",oIe="events",aIe="visibilitychange",Xse="pagehide";var WYe="unload",QYe="beforeunload",ZYe=wp("aiEvtPageHide"),VWn=wp("aiEvtPageShow"),$jt=/\.[\.]+/g,qjt=/[\.]+$/,Yjt=1,Wse=kse("events"),Kjt=/^([^.]*)(?:\.(.+)|)/;function qYe(t){return t&&t[h1]?t[h1](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,Ts):t}function sIe(t,i){if(i){var e=Ts;ea(i)?(e=Ts,_r(i,function(r){r=qYe(r),r&&(r[0]!=="."&&(r="."+r),e+=r)})):e=qYe(i),e&&(e[0]!=="."&&(e="."+e),t=(t||Ts)+e)}var n=Kjt.exec(t||Ts)||[];return{type:n[1],ns:(n[2]||Ts).replace($jt,".").replace(qjt,Ts)[m1](".").sort().join(".")}}function XYe(t,i,e){e===void 0&&(e=!0);var n=Wse.get(t,oIe,{},e),r=n[i];return r||(r=n[i]=[]),r}function JYe(t,i,e,n){t&&i&&i[qE]&&(t[$Ye]?t[$Ye](i[qE],e,n):t[jYe]&&t[jYe](KYe+i[qE],e))}function Wjt(t,i,e,n){var r=!1;return t&&i&&i[qE]&&e&&(t[GYe]?(t[GYe](i[qE],e,n),r=!0):t[HYe]&&(t[HYe](KYe+i[qE],e),r=!0)),r}function YYe(t,i,e,n){for(var r=i[Io];r--;){var o=i[r];o&&(!e.ns||e.ns===o[GSe].ns)&&(!n||n(o))&&(JYe(t,o[GSe],o.handler,o.capture),i[mC](r,1))}}function Qjt(t,i,e){if(i[qE])YYe(t,XYe(t,i[qE]),i,e);else{var n=Wse.get(t,oIe,{});ba(n,function(r,o){YYe(t,o,i,e)}),Qg(n)[Io]===0&&Wse.kill(t,oIe)}}function m0(t,i){var e;return i?(ea(i)?e=[t].concat(i):e=[t,i],e=sIe("xx",e).ns[m1](".")):e=t,e}function vy(t,i,e,n,r){r===void 0&&(r=!1);var o=!1;if(t)try{var a=sIe(i,n);if(o=Wjt(t,a,e,r),o&&Wse.accept(t)){var c={guid:Yjt++,evtName:a,handler:e,capture:r};XYe(t,a.type)[ys](c)}}catch{}return o}function Kw(t,i,e,n,r){if(r===void 0&&(r=!1),t)try{var o=sIe(i,n),a=!1;Qjt(t,o,function(c){return o.ns&&!e||c.handler===e?(a=!0,!0):!1}),a||JYe(t,o,e,r)}catch{}}function eKe(t,i,e){var n=!1,r=Bm();r&&(n=vy(r,t,i,e),n=vy(r.body,t,i,e)||n);var o=Hd();return o&&(n=vy(o,t,i,e)||n),n}function tKe(t,i,e){var n=Bm();n&&(Kw(n,t,i,e),Kw(n.body,t,i,e));var r=Hd();r&&Kw(r,t,i,e)}function Qse(t,i,e,n){var r=!1;return i&&t&&t[Io]>0&&_r(t,function(o){o&&(!e||Ed(e,o)===-1)&&(r=eKe(o,i,n)||r)}),r}function iKe(t,i,e,n){var r=!1;return i&&t&&ea(t)&&(r=Qse(t,i,e,n),!r&&e&&e[Io]>0&&(r=Qse(t,i,null,n))),r}function Zse(t,i,e){t&&ea(t)&&_r(t,function(n){n&&tKe(n,i,e)})}function lIe(t,i,e){return iKe([QYe,WYe,Xse],t,i,e)}function cIe(t,i){Zse([QYe,WYe,Xse],t,i)}function Wq(t,i,e){function n(a){var c=Hd();t&&c&&c.visibilityState==="hidden"&&t(a)}var r=m0(ZYe,e),o=Qse([Xse],t,i,r);return(!i||Ed(i,aIe)===-1)&&(o=Qse([aIe],n,i,r)||o),!o&&i&&(o=Wq(t,null,e)),o}function dIe(t,i){var e=m0(ZYe,i);Zse([Xse],t,e),Zse([aIe],null,e)}var nKe="_aiHooks",rKe=["req","rsp","hkErr","fnErr"];function pIe(t,i){if(t)for(var e=0;e=0&&r<=2&&pIe(t,function(o,a){var c=o.cbks,m=c[rKe[r]];if(m){i.ctx=function(){var w=n[a]=n[a]||{};return w};try{m[pC](i.inst,e)}catch(w){var g=i.err;try{var C=c[rKe[2]];C&&(i.err=w,C[pC](i.inst,e))}catch{}finally{i.err=g}}}})}function Zjt(t){return function(){var i=this,e=arguments,n=t.h,r={name:t.n,inst:i,ctx:null,set:m},o=[],a=c([r],e);r.evt=Pc("event");function c(C,w){return pIe(w,function(P){C[ys](P)}),C}function m(C,w){e=c([],e),e[C]=w,a=c([r],e)}uIe(n,r,a,o,0);var g=t.f;if(g)try{r.rslt=g[pC](i,e)}catch(C){throw r.err=C,uIe(n,r,a,o,3),C}return uIe(n,r,a,o,1),r.rslt}}function mIe(t,i,e,n){var r=null;return t&&(Wg(t,i)?r=t:e&&(r=mIe(qqe(t),i,n,!1))),r}function hIe(t,i,e){return t?Qq(t[Xg],i,e,!1):null}function oKe(t,i,e,n){var r=e&&e[nKe];if(!r){r={i:0,n:i,f:e,h:[]};var o=Zjt(r);o[nKe]=r,t[i]=o}var a={id:r.i,cbks:n,rm:function(){var c=this.id;pIe(r.h,function(m,g){if(m.id===c)return r.h[mC](g,1),1})}};return r.i++,r.h[ys](a),a}function Qq(t,i,e,n,r){if(n===void 0&&(n=!0),t&&i&&e){var o=mIe(t,i,n,r);if(o){var a=o[i];if(typeof a===oU)return oKe(o,i,a,e)}}return null}function bU(t,i,e,n,r){if(t&&i&&e){var o=mIe(t,i,n,r)||t;if(o)return oKe(o,i,o[i],e)}return null}var Ww="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Zq="sampleRate",Xq="ProcessLegacy",Jse="http.method",FF="https://dc.services.visualstudio.com",Qw="/v2/track",Gm="not_specified",ele="iKey";var Vc=USe({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]});var JE="split",Ra="length",eA="toLowerCase",u2="ingestionendpoint",p2="toString",tle="removeItem",m2="message",h2="count",ile="preTriggerDate",nle="getUTCDate",LF="stringify",Jq="pathname",BF="match",fIe="correlationHeaderExcludePatterns",cf="name";var sg="properties",Jg="measurements",eY="sizeInBytes",tY="typeName",CU="exceptions",VF="severityLevel",rle="problemGroup",zF="parsedStack",iY="hasFullStack",nY="assembly",Zw="fileName",UF="line",xU="aiDataContract",HF="duration";function gIe(t,i,e){var n=i[Ra],r=aKe(t,i);if(r[Ra]!==n){for(var o=0,a=r;e[a]!==void 0;)o++,a=Nv(r,0,147)+sKe(o);r=a}return r}function aKe(t,i){var e;return i&&(i=_c(tm(i)),i[Ra]>150&&(e=Nv(i,0,150),sr(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:i},!0))),e||i}function yc(t,i,e){e===void 0&&(e=1024);var n;return i&&(e=e||1024,i=_c(tm(i)),i[Ra]>e&&(n=Nv(i,0,e),sr(t,2,61,"string value is too long. It has been truncated to "+e+" characters.",{value:i},!0))),n||i}function tA(t,i){return vIe(t,i,2048,66)}function rY(t,i){var e;return i&&i[Ra]>32768&&(e=Nv(i,0,32768),sr(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:i},!0)),e||i}function _Ie(t,i){var e;if(i){var n=""+i;n[Ra]>32768&&(e=Nv(n,0,32768),sr(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:i},!0))}return e||i}function h0(t,i){if(i){var e={};ba(i,function(n,r){if(im(r)&&$w())try{r=zm()[LF](r)}catch(o){sr(t,2,49,"custom property is not valid",{exception:o},!0)}r=yc(t,r,8192),n=gIe(t,n,e),e[n]=r}),i=e}return i}function f0(t,i){if(i){var e={};ba(i,function(n,r){n=gIe(t,n,e),e[n]=r}),i=e}return i}function yIe(t,i){return i&&vIe(t,i,128,69)[p2]()}function vIe(t,i,e,n){var r;return i&&(i=_c(tm(i)),i[Ra]>e&&(r=Nv(i,0,e),sr(t,2,n,"input is too long, it has been truncated to "+e+" characters.",{data:i},!0))),r||i}function sKe(t){var i="00"+t;return c1(i,i[Ra]-3)}var lKe=Hd()||{},cKe=0,i7t=[null,null,null,null,null];function oY(t){var i=cKe,e=i7t,n=e[i];return lKe.createElement?e[i]||(n=e[i]=lKe.createElement("a")):n={host:dKe(t,!0)},n.href=t,i++,i>=e[Ra]&&(i=0),cKe=i,n}function bIe(t){var i,e=oY(t);return e&&(i=e.href),i}function CIe(t,i){return t?t.toUpperCase()+" "+i:i}function dKe(t,i){var e=ole(t,i)||"";if(e){var n=e[BF](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[Ra]>3&&wo(n[2])&&n[2][Ra]>0)return n[2]+(n[3]||"")}return e}function ole(t,i){var e=null;if(t){var n=t[BF](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(n!=null&&n[Ra]>2&&wo(n[2])&&n[2][Ra]>0&&(e=n[2]||"",i&&n[Ra]>2)){var r=(n[1]||"")[eA](),o=n[3]||"";(r==="http"&&o===":80"||r==="https"&&o===":443")&&(o=""),e+=o}}return e}var n7t=[FF+Qw,"https://breeze.aimon.applicationinsights.io"+Qw,"https://dc-int.services.visualstudio.com"+Qw],r7t="cid-v1:";function SU(t){return Ed(n7t,t[eA]())!==-1}function ale(t,i,e){if(!i||t&&t.disableCorrelationHeaders)return!1;if(t&&t[fIe]){for(var n=0;n0}function sle(t){if(t){var i=uKe(t,Vc[1]);if(i&&i!==r7t)return i}}function uKe(t,i){if(t)for(var e=t[JE](","),n=0;n0){var c=oY(i);if(r=c.host,!o)if(c[Jq]!=null){var m=c.pathname[Ra]===0?"/":c[Jq];m.charAt(0)!=="/"&&(m="/"+m),a=c[Jq],o=yc(t,e?e+" "+m:m)}else o=yc(t,i)}else r=n,o=n;return{target:r,name:o,data:a}}function wU(){var t=l0();if(t&&t.now&&t.timing){var i=t.now()+t.timing.navigationStart;if(i>0)return i}return Lm()}function Ih(t,i){var e=null;return t!==0&&i!==0&&!Gn(t)&&!Gn(i)&&(e=i-t),e}function GF(t,i){var e=t||{};return{getName:function(){return e[cf]},setName:function(n){i&&i.setName(n),e[cf]=n},getTraceId:function(){return e.traceID},setTraceId:function(n){i&&i.setTraceId(n),PF(n)&&(e.traceID=n)},getSpanId:function(){return e.parentID},setSpanId:function(n){i&&i.setSpanId(n),NF(n)&&(e.parentID=n)},getTraceFlags:function(){return e.traceFlags},setTraceFlags:function(n){i&&i.setTraceFlags(n),e.traceFlags=n}}}var IU=fF({LocalStorage:0,SessionStorage:1}),lZn=fF({AI:0,AI_AND_W3C:1,W3C:2}),cZn=fF({Normal:1,Critical:2});var f2=void 0,g2=void 0,mKe="";function xIe(){return $F()?lle(IU.LocalStorage):null}function lle(t){try{if(Gn(nm()))return null;var i=new Date()[p2](),e=Pc(t===IU.LocalStorage?"localStorage":"sessionStorage"),n=mKe+i;e.setItem(n,i);var r=e.getItem(n)!==i;if(e[tle](n),!r)return e}catch{}return null}function SIe(){return _2()?lle(IU.SessionStorage):null}function wIe(){f2=!1,g2=!1}function jF(t){mKe=t||""}function IIe(){f2=$F(!0),g2=_2(!0)}function $F(t){return(t||f2===void 0)&&(f2=!!lle(IU.LocalStorage)),f2}function aY(t,i){var e=xIe();if(e!==null)try{return e.getItem(i)}catch(n){f2=!1,sr(t,2,1,"Browser failed read of local storage. "+ol(n),{exception:Fr(n)})}return null}function sY(t,i,e){var n=xIe();if(n!==null)try{return n.setItem(i,e),!0}catch(r){f2=!1,sr(t,2,3,"Browser failed write to local storage. "+ol(r),{exception:Fr(r)})}return!1}function TIe(t,i){var e=xIe();if(e!==null)try{return e[tle](i),!0}catch(n){f2=!1,sr(t,2,5,"Browser failed removal of local storage item. "+ol(n),{exception:Fr(n)})}return!1}function _2(t){return(t||g2===void 0)&&(g2=!!lle(IU.SessionStorage)),g2}function TU(t,i){var e=SIe();if(e!==null)try{return e.getItem(i)}catch(n){g2=!1,sr(t,2,2,"Browser failed read of session storage. "+ol(n),{exception:Fr(n)})}return null}function lY(t,i,e){var n=SIe();if(n!==null)try{return n.setItem(i,e),!0}catch(r){g2=!1,sr(t,2,4,"Browser failed write to session storage. "+ol(r),{exception:Fr(r)})}return!1}function cY(t,i){var e=SIe();if(e!==null)try{return e[tle](i),!0}catch(n){g2=!1,sr(t,2,6,"Browser failed removal of session storage item. "+ol(n),{exception:Fr(n)})}return!1}var o7t="appInsightsThrottle",EIe=(function(){function t(i,e){var n=this,r,o,a,c,m,g,C,w=!1,P=!1;z(),n._getDbgPlgTargets=function(){return[C]},n.getConfig=function(){return a},n.canThrottle=function(rt){var Ze=Qe(rt),Et=H(rt);return ne(Et,r,Ze)},n.isTriggered=function(rt){return we(rt)},n.isReady=function(){return w},n.flush=function(rt){try{var Ze=Rt(rt);if(Ze&&Ze[Ra]>0){var Et=Ze.slice(0);return C[rt]=[],_r(Et,function(We){R(We.msgID,We[m2],We.severity,!1)}),!0}}catch{}return!1},n.flushAll=function(){try{if(C){var rt=!0;return ba(C,function(Ze){var Et=n.flush(parseInt(Ze));rt=rt&&Et}),rt}}catch{}return!1},n.onReadyState=function(rt,Ze){return Ze===void 0&&(Ze=!0),w=Gn(rt)?!0:rt,w&&Ze?n.flushAll():null},n.sendMessage=function(rt,Ze,Et){return R(rt,Ze,Et,!0)};function R(rt,Ze,Et,We){if(w){var bt=ke(rt);if(!bt)return;var st=H(rt),kt=Qe(rt),pi=ne(st,r,kt),Kt=!1,gt=0,ht=we(rt);try{pi&&!ht?(gt=Zae(st.limit.maxSendNumber,kt[h2]+1),kt[h2]=0,Kt=!0,m[rt]=!0,kt[ile]=new Date):(m[rt]=pi,kt[h2]+=1);var li=me(rt);fe(o,li,kt);for(var ui=0;ui0,st.interval=K(kt);var pi={samplingRate:((Et=bt.limit)===null||Et===void 0?void 0:Et.samplingRate)||100,maxSendNumber:((We=bt.limit)===null||We===void 0?void 0:We.maxSendNumber)||1};st.limit=pi,a[rt]=st}catch{}}function K(rt){rt=rt||{};var Ze=rt?.monthInterval,Et=rt?.dayInterval;return Gn(Ze)&&Gn(Et)&&(rt.monthInterval=3,P||(rt.daysOfMonth=[28],P=!0)),rt={monthInterval:rt?.monthInterval,dayInterval:rt?.dayInterval,daysOfMonth:rt?.daysOfMonth},rt}function ne(rt,Ze,Et){if(rt&&!rt.disabled&&Ze&&fC(Et)){var We=ye(),bt=Et.date,st=rt.interval,kt=1;if(st?.monthInterval){var pi=(We.getUTCFullYear()-bt.getUTCFullYear())*12+We.getUTCMonth()-bt.getUTCMonth();kt=Re(st.monthInterval,0,pi)}var Kt=1;if(P)Kt=Ed(st.daysOfMonth,We[nle]());else if(st?.dayInterval){var gt=sf((We.getTime()-bt.getTime())/864e5);Kt=Re(st.dayInterval,0,gt)}return kt>=0&&Kt>=0}return!1}function me(rt,Ze){var Et=fC(Ze)?Ze:"";return rt?o7t+Et+"-"+rt:null}function Te(rt){try{if(rt){var Ze=new Date;return rt.getUTCFullYear()===Ze.getUTCFullYear()&&rt.getUTCMonth()===Ze.getUTCMonth()&&rt[nle]()===Ze[nle]()}}catch{}return!1}function Ie(rt,Ze,Et){try{var We={date:ye(),count:0};if(rt){var bt=JSON.parse(rt),st={date:ye(bt.date)||We.date,count:bt[h2]||We[h2],preTriggerDate:bt.preTriggerDate?ye(bt[ile]):void 0};return st}else return fe(Ze,Et,We),We}catch{}return null}function ye(rt){try{if(rt){var Ze=new Date(rt);if(!isNaN(Ze.getDate()))return Ze}else return new Date}catch{}return null}function fe(rt,Ze,Et){try{return sY(rt,Ze,_c(JSON[LF](Et)))}catch{}return!1}function Re(rt,Ze,Et){return rt<=0?1:Et>=Ze&&(Et-Ze)%rt==0?sf((Et-Ze)/rt)+1:-1}function Ae(rt,Ze,Et,We){sr(Ze,We||1,rt,Et)}function ke(rt){try{var Ze=H(rt);return Dwe(1e6)<=Ze.limit.samplingRate}catch{}return!1}function Qe(rt){try{var Ze=c[rt];if(!Ze){var Et=me(rt,g);Ze=Ie(aY(o,Et),o,Et),c[rt]=Ze}return c[rt]}catch{}return null}function we(rt){var Ze=m[rt];if(Gn(Ze)){Ze=!1;var Et=Qe(rt);Et&&(Ze=Te(Et[ile])),m[rt]=Ze}return m[rt]}function Rt(rt){return C=C||{},Gn(C[rt])&&(C[rt]=[]),C[rt]}}return t})();var a7t=";",s7t="=";function cle(t){if(!t)return{};var i=t[JE](a7t),e=NSe(i,function(r,o){var a=o[JE](s7t);if(a[Ra]===2){var c=a[0][eA](),m=a[1];r[c]=m}return r},{});if(Qg(e)[Ra]>0){if(e.endpointsuffix){var n=e.location?e.location+".":"";e[u2]=e[u2]||"https://"+n+"dc."+e.endpointsuffix}e[u2]=e[u2]||FF,vq(e[u2],"/")&&(e[u2]=e[u2].slice(0,-1))}return e}var AIe=(function(){function t(i,e,n){var r=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[cf]=yc(i,n)||Gm,o.data=e,o.time=gC(new Date),o[xU]={time:1,iKey:1,name:1,sampleRate:function(){return r.sampleRate===100?4:1},tags:1,data:1}}return t})();var _C=(function(){function t(i,e,n,r){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[cf]=yc(i,e)||Gm,o[sg]=h0(i,n),o[Jg]=f0(i,r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})();var l7t=58,c7t=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,d7t=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,u7t=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,p7t=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,m7t=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,h7t=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,f7t=/([^\(\s\n]+):([0-9]+)$/,hKe="",EU="error",yC="stack",kIe="stackDetails",fKe="errorSrc",MIe="message",vKe="description",gKe=[{re:d7t,len:5,m:1,fn:2,ln:3,col:4},{chk:_7t,pre:g7t,re:u7t,len:4,m:1,fn:2,ln:3},{re:p7t,len:3,m:1,fn:2,hdl:yKe},{re:m7t,len:2,fn:1,hdl:yKe}];function g7t(t){return t.replace(/(\(anonymous\))/,"")}function _7t(t){return Fu(t,"[native")<0}function OIe(t,i){var e=t;return e&&!wo(e)&&(JSON&&JSON[LF]?(e=JSON[LF](t),i&&(!e||e==="{}")&&(oo(t[p2])?e=t[p2]():e=""+t)):e=""+t+" - (Missing JSON.stringify)"),e||""}function bKe(t,i){var e=t;return t&&(e&&!wo(e)&&(e=t[MIe]||t[vKe]||e),e&&!wo(e)&&(e=OIe(e,!0)),t.filename&&(e=e+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),i&&i!=="String"&&i!=="Object"&&i!=="Error"&&Fu(e||"",i)===-1&&(e=i+": "+e),e||""}function y7t(t){try{if(im(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function v7t(t){try{if(im(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function _Ke(t){return t&&t.src&&wo(t.src)&&t.obj&&ea(t.obj)}function qF(t){var i=t||"";wo(i)||(wo(i[yC])?i=i[yC]:i=""+i);var e=i[JE](` `);return{src:i,obj:e}}function b7t(t){for(var i=[],e=t[JE](` `),n=0;n0){i=[];var n=0,r=!1,o=0;_r(e,function(H){if(r||T7t(H)){var j=tm(H);r=!0;var K=E7t(j,n);K&&(o+=K[eY],i.push(K),n++)}});var a=32*1024;if(o>a)for(var c=0,m=i[Ra]-1,g=0,C=c,w=m;ca){var z=w-C+1;i.splice(C,z);break}C=c,w=m,c++,m--}}return i}function dle(t){var i="";if(t&&(i=t.typeName||t[cf]||"",!i))try{var e=/function (.{1,200})\(/,n=e.exec(t.constructor[p2]());i=n&&n[Ra]>1?n[1]:""}catch{}return i}function DIe(t){if(t)try{if(!wo(t)){var i=dle(t),e=OIe(t,!1);return(!e||e==="{}")&&(t[EU]&&(t=t[EU],i=dle(t)),e=OIe(t,!0)),Fu(e,i)!==0&&i!=="String"?i+":"+e:e}}catch{}return""+(t||"")}var e_=(function(){function t(i,e,n,r,o,a){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var c=this;c.ver=2,v7t(e)?(c[CU]=e[CU]||[],c[sg]=e[sg],c[Jg]=e[Jg],e[VF]&&(c[VF]=e[VF]),e.id&&(c.id=e.id,e[sg].id=e.id),e[rle]&&(c[rle]=e[rle]),Gn(e.isManual)||(c.isManual=e.isManual)):(n||(n={}),a&&(n.id=a),c[CU]=[xKe(i,e,n)],c[sg]=h0(i,n),c[Jg]=f0(i,r),o&&(c[VF]=o),a&&(c.id=a))}return t.CreateAutoException=function(i,e,n,r,o,a,c,m){var g=dle(o||a||i);return{message:bKe(i,g),url:e,lineNumber:n,columnNumber:r,error:DIe(o||a||i),evt:DIe(a||i),typeName:g,stackDetails:CKe(c||o||a),errorSrc:m}},t.CreateFromInterface=function(i,e,n,r){var o=e[CU]&&hF(e[CU],function(c){return I7t(i,c)}),a=new t(i,om(om({},e),{exceptions:o}),n,r);return a},t.prototype.toInterface=function(){var i=this,e=i.exceptions,n=i.properties,r=i.measurements,o=i.severityLevel,a=i.problemGroup,c=i.id,m=i.isManual,g=e instanceof Array&&hF(e,function(C){return C.toInterface()})||void 0;return{ver:"4.0",exceptions:g,severityLevel:o,properties:n,measurements:r,problemGroup:a,id:c,isManual:m}},t.CreateSimpleException=function(i,e,n,r,o,a){var c;return{exceptions:[(c={},c[iY]=!0,c.message=i,c.stack=o,c.typeName=e,c)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=DIe,t})();var S7t=Zg({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function w7t(){var t=this,i=ea(t[zF])&&hF(t[zF],function(n){return D7t(n)}),e={id:t.id,outerId:t.outerId,typeName:t[tY],message:t[m2],hasFullStack:t[iY],stack:t[yC],parsedStack:i||void 0};return e}function xKe(t,i,e){var n,r,o,a,c,m,g,C;if(y7t(i))a=i[tY],c=i[m2],g=i[yC],C=i[zF]||[],m=i[iY];else{var w=i,P=w&&w.evt;uF(w)||(w=w[EU]||P||w),a=yc(t,dle(w))||Gm,c=rY(t,bKe(i||w,a))||Gm;var R=i[kIe]||CKe(i);C=x7t(R),ea(C)&&hF(C,function(z){z[nY]=yc(t,z[nY]),z[Zw]=yc(t,z[Zw])}),g=_Ie(t,C7t(R)),m=ea(C)&&C[Ra]>0,e&&(e[tY]=e[tY]||a)}return n={},n[xU]=S7t,n.id=r,n.outerId=o,n.typeName=a,n.message=c,n[iY]=m,n.stack=g,n.parsedStack=C,n.toInterface=w7t,n}function I7t(t,i){var e=ea(i[zF])&&hF(i[zF],function(r){return A7t(r)})||i[zF],n=xKe(t,om(om({},i),{parsedStack:e}));return n}function SKe(t,i){var e=i[BF](h7t);if(e&&e[Ra]>=4)t[Zw]=e[1],t[UF]=parseInt(e[2]);else{var n=i[BF](f7t);n&&n[Ra]>=3?(t[Zw]=n[1],t[UF]=parseInt(n[2])):t[Zw]=i}}function yKe(t,i,e){var n=t[Zw];i.fn&&e&&e[Ra]>i.fn&&(i.ln&&e[Ra]>i.ln?(n=_c(e[i.fn]||""),t[UF]=parseInt(_c(e[i.ln]||""))||0):n=_c(e[i.fn]||"")),n&&SKe(t,n)}function T7t(t){var i=!1;if(t&&wo(t)){var e=_c(t);e&&(i=c7t.test(e))}return i}var wKe=Zg({level:1,method:1,assembly:0,fileName:0,line:0});function E7t(t,i){var e,n;if(t&&wo(t)&&_c(t)){n=(e={},e[xU]=wKe,e.level=i,e.assembly=_c(t),e.method=hKe,e.fileName="",e.line=0,e.sizeInBytes=0,e);for(var r=0;r=o.len){o.m&&(n.method=_c(a[o.m]||hKe)),o.hdl?o.hdl(n,o,a):o.fn&&(o.ln?(n[Zw]=_c(a[o.fn]||""),n[UF]=parseInt(_c(a[o.ln]||""))||0):SKe(n,a[o.fn]||""));break}r++}}return IKe(n)}function A7t(t){var i,e=(i={},i[xU]=wKe,i.level=t.level,i.method=t.method,i.assembly=t[nY],i.fileName=t[Zw],i.line=t[UF],i.sizeInBytes=0,i);return IKe(e)}function IKe(t){var i=l7t;return t&&(i+=t.method[Ra],i+=t.assembly[Ra],i+=t.fileName[Ra],i+=t.level.toString()[Ra],i+=t.line.toString()[Ra],t[eY]=i),t}function D7t(t){return{level:t.level,method:t.method,assembly:t[nY],fileName:t[Zw],line:t[UF]}}var TKe=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})();var vC=(function(){function t(i,e,n,r,o,a,c,m,g){this.aiDataContract={ver:1,metrics:1,properties:0};var C=this;C.ver=2;var w=new TKe;w[h2]=r>0?r:void 0,w.max=isNaN(a)||a===null?void 0:a,w.min=isNaN(o)||o===null?void 0:o,w[cf]=yc(i,e)||Gm,w.value=n,w.stdDev=isNaN(c)||c===null?void 0:c,C.metrics=[w],C[sg]=h0(i,m),C[Jg]=f0(i,g)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})();var dY="";function jv(t){(isNaN(t)||t<0)&&(t=0),t=rse(t);var i=dY+t%1e3,e=dY+sf(t/1e3)%60,n=dY+sf(t/(1e3*60))%60,r=dY+sf(t/(1e3*60*60))%24,o=sf(t/(1e3*60*60*24));return i=i[Ra]===1?"00"+i:i[Ra]===2?"0"+i:i,e=e[Ra]<2?"0"+e:e,n=n[Ra]<2?"0"+n:n,r=r[Ra]<2?"0"+r:r,(o>0?o+".":dY)+r+":"+n+":"+e+"."+i}function RIe(t,i,e,n,r){return!r&&wo(t)&&(t==="Script error."||t==="Script error")}var by=(function(){function t(i,e,n,r,o,a,c){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var m=this;m.ver=2,m.id=yIe(i,c),m.url=tA(i,n),m[cf]=yc(i,e)||Gm,isNaN(r)||(m[HF]=jv(r)),m[sg]=h0(i,o),m[Jg]=f0(i,a)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})();var bC=(function(){function t(i,e,n,r,o,a,c,m,g,C,w,P){g===void 0&&(g="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var R=this;R.ver=2,R.id=e,R[HF]=jv(o),R.success=a,R.resultCode=c+"",R.type=yc(i,g);var z=pKe(i,n,m,r);R.data=tA(i,r)||z.data,R.target=yc(i,z.target),C&&(R.target="".concat(R.target," | ").concat(C)),R[cf]=yc(i,z[cf]),R[sg]=h0(i,w),R[Jg]=f0(i,P)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})();var Xw=(function(){function t(i,e,n,r,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var a=this;a.ver=2,e=e||Gm,a[m2]=rY(i,e),a[sg]=h0(i,r),a[Jg]=f0(i,o),n&&(a[VF]=n)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})();var Jw=(function(){function t(i,e,n,r,o,a,c){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var m=this;m.ver=2,m.url=tA(i,n),m[cf]=yc(i,e)||Gm,m[sg]=h0(i,o),m[Jg]=f0(i,a),c&&(m.domProcessing=c.domProcessing,m[HF]=c[HF],m.networkConnect=c.networkConnect,m.perfTotal=c.perfTotal,m.receivedResponse=c.receivedResponse,m.sentRequest=c.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})();var iA=(function(){function t(i,e){this.aiDataContract={baseType:1,baseData:1},this.baseType=i,this.baseData=e}return t})();function v2(t){var i="ai."+t+".";return function(e){return i+e}}var uY=v2("application"),Th=v2("device"),ule=v2("location"),AU=v2("operation"),PIe=v2("session"),y2=v2("user"),YF=v2("cloud"),pY=v2("internal"),mY=(function(t){lf(i,t);function i(){return t.call(this)||this}return i})(gwe({applicationVersion:uY("ver"),applicationBuild:uY("build"),applicationTypeId:uY("typeId"),applicationId:uY("applicationId"),applicationLayer:uY("layer"),deviceId:Th("id"),deviceIp:Th("ip"),deviceLanguage:Th("language"),deviceLocale:Th("locale"),deviceModel:Th("model"),deviceFriendlyName:Th("friendlyName"),deviceNetwork:Th("network"),deviceNetworkName:Th("networkName"),deviceOEMName:Th("oemName"),deviceOS:Th("os"),deviceOSVersion:Th("osVersion"),deviceRoleInstance:Th("roleInstance"),deviceRoleName:Th("roleName"),deviceScreenResolution:Th("screenResolution"),deviceType:Th("type"),deviceMachineName:Th("machineName"),deviceVMName:Th("vmName"),deviceBrowser:Th("browser"),deviceBrowserVersion:Th("browserVersion"),locationIp:ule("ip"),locationCountry:ule("country"),locationProvince:ule("province"),locationCity:ule("city"),operationId:AU("id"),operationName:AU("name"),operationParentId:AU("parentId"),operationRootId:AU("rootId"),operationSyntheticSource:AU("syntheticSource"),operationCorrelationVector:AU("correlationVector"),sessionId:PIe("id"),sessionIsFirst:PIe("isFirst"),sessionIsNew:PIe("isNew"),userAccountAcquisitionDate:y2("accountAcquisitionDate"),userAccountId:y2("accountId"),userAgent:y2("userAgent"),userId:y2("id"),userStoreRegion:y2("storeRegion"),userAuthUserId:y2("authUserId"),userAnonymousUserAcquisitionDate:y2("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:y2("authUserAcquisitionDate"),cloudName:YF("name"),cloudRole:YF("role"),cloudRoleVer:YF("roleVer"),cloudRoleInstance:YF("roleInstance"),cloudEnvironment:YF("environment"),cloudLocation:YF("location"),cloudDeploymentUnit:YF("deploymentUnit"),internalNodeName:pY("nodeName"),internalSdkVersion:pY("sdkVersion"),internalAgentVersion:pY("agentVersion"),internalSnippet:pY("snippet"),internalSdkSrc:pY("sdkSrc")}));function CC(t,i,e,n,r,o){e=yc(n,e)||Gm,(Gn(t)||Gn(i)||Gn(e))&&af("Input doesn't contain all required fields");var a="";t[ele]&&(a=t[ele],delete t[ele]);var c={name:e,time:gC(new Date),iKey:a,ext:o||{},tags:[],data:{},baseType:i,baseData:t};return Gn(r)||ba(r,function(m,g){c.data[m]=g}),c}var k7t=(function(){function t(){}return t.create=CC,t})();var t_={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},pd=new mY;function KF(t){var i=null;if(oo(Event))i=new Event(t);else{var e=Hd();e&&e.createEvent&&(i=e.createEvent("Event"),i.initEvent(t,!0,!0))}return i}function EKe(t,i){Kw(t,null,null,i)}function NIe(t){var i=Hd(),e=ag(),n=!1,r=[],o=1;e&&!Gn(e.onLine)&&!e.onLine&&(o=2);var a=0,c=P(),m=m0(wp("OfflineListener"),t);try{if(C(Bm())&&(n=!0),i){var g=i.body||i;g.ononline&&C(g)&&(n=!0)}}catch{n=!1}function C(me){var Te=!1;return me&&(Te=vy(me,"online",H,m),Te&&vy(me,"offline",j,m)),Te}function w(){return c}function P(){return!(a===2||o===2)}function R(){var me=P();c!==me&&(c=me,_r(r,function(Te){var Ie={isOnline:c,rState:o,uState:a};try{Te(Ie)}catch{}}))}function z(me){a=me,R()}function H(){o=1,R()}function j(){o=2,R()}function K(){var me=Bm();if(me&&n){if(EKe(me,m),i){var Te=i.body||i;Hl(Te.ononline)||EKe(Te,m)}n=!1}}function ne(me){return r.push(me),{rm:function(){var Te=r.indexOf(me);if(Te>-1)return r.splice(Te,1)}}}return{isOnline:w,isListening:function(){return n},unload:K,addListener:ne,setOnlineState:z}}var eI="AppInsightsPropertiesPlugin",ple="AppInsightsChannelPlugin",DU="ApplicationInsightsAnalytics";var AKe=(()=>{class t{constructor(){this.errorServices=[],t.instance===null&&(t.instance=this)}set plugin(e){this.analyticsPlugin=e}clearErrorHandlers(){this.errorServices=[]}addErrorHandler(e){e&&oo(e.handleError)&&this.errorServices.push(e)}removeErrorHandler(e){if(e&&oo(e.handleError)){let n=this.errorServices.indexOf(e);n!==-1&&this.errorServices.splice(n,1)}}handleError(e){this.analyticsPlugin&&this.analyticsPlugin.trackException({exception:e}),this.errorServices&&this.errorServices.length>0&&_r(this.errorServices,n=>{oo(n.handleError)&&n.handleError(e)})}}return t.instance=null,t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FIe,M7t=fy({router:{blkVal:!0,v:FIe},errorServices:{blkVal:!0,v:FIe}}),DKe=(()=>{class t extends p0{constructor(e){super(),this._injector=e,this.priority=186,this.identifier="AngularPlugin";let n,r,o,a,c,m,g;Ka(t,this,(C,w)=>{let P=()=>{n=null,r=null,o=null,a=null,c=!0,m=FIe};P(),C.initialize=(R,z,H,j)=>{super.initialize(R,z,H,j),C._addHook(Gl(R,K=>{if(o=C._getTelCtx().getExtCfg(C.identifier,M7t),r=z.getPlugin(eI)?.plugin,n=z.getPlugin(DU)?.plugin,o.useInjector&&e&&(g=this._injector.get(AKe)),g=g||AKe.instance,n&&g!==null&&(g.plugin=n,o.errorServices&&ea(o.errorServices)&&(g.clearErrorHandlers(),_r(o.errorServices,me=>{g.addErrorHandler(me)}))),o.router!==m){if(a&&a.unsubscribe(),o.router){if(c){let me={uri:o.router.url};C.trackPageView(me)}a=o.router.events.subscribe(me=>{if(C.isInitialized()&&me instanceof qf){if(c){c=!1;return}let Te={uri:o.router.url,properties:{duration:0}};C.trackPageView(Te)}})}m=o.router}})),C._getDbgPlgTargets=()=>o,C._getErrorService=()=>g},C.trackPageView=R=>{if(n){let z=wh();r&&r.context&&r.context.telemetryTrace&&(r.context.telemetryTrace.traceID=u0(),r.context.telemetryTrace.name=z&&z.pathname||"_unknown_"),n.trackPageView(R)}else sr(C.diagLog(),1,64,"Analytics plugin is not available, Angular plugin telemetry will not be sent: ")},C._doTeardown=(R,z,H)=>{n&&g!==null&&(g.plugin=null,o&&o.errorServices&&Array.isArray(o.errorServices)&&g.clearErrorHandlers()),a&&(a.unsubscribe(),a=null),P()}})}processTelemetry(e,n){this.processNext(e,n)}initialize(e,n,r,o){}trackPageView(e){}}return t.\u0275fac=function(e){return new(e||t)(xe(Ir))},t.\u0275cmp=re({type:t,selectors:[["lib-applicationinsights-angularplugin-js"]],standalone:!1,features:[Tt],decls:0,vars:0,template:function(e,n){},encapsulation:2}),t})();var hY="toString",mle="isStorageUseDisabled",WF="_addHook",df="core",nA="dataType",b2="envelopeType",Cy="diagLog",C2="track",kU="trackPageView",fY="trackPreviousPageVisit",rA="sendPageViewInternal",oA="startTime",QF="properties",$v="duration",gY="sendPageViewPerformanceInternal",MU="populatePageViewPerformanceEvent",x2="href",LIe="sendExceptionInternal",OU="error",hle="lineNumber",fle="columnNumber",gle="CreateAutoException",_Y="addTelemetryInitializer",kKe="overridePageViewDuration",_le="autoExceptionInstrumented",BIe="autoTrackPageVisitTime",VIe="isBrowserLinkTrackingEnabled",S2="length",zIe="enableAutoRouteTracking",UIe="enableUnhandledPromiseRejectionTracking",yle="autoUnhandledPromiseInstrumented",yY="getEntriesByType",vle="isPerformanceTimingSupported",ble="getPerformanceTiming",RU="navigationStart",vY="shouldCollectDuration",Cle="isPerformanceTimingDataReady",PU="responseStart",MKe="requestStart",bY="loadEventEnd",xle="responseEnd",CY="connectEnd";var OKe=(function(){function t(i,e,n,r){Ka(t,this,function(o){var a=null,c=[],m=!1,g=!1,C;n&&(C=n.logger);function w(z){n&&n.flush(z,function(){})}function P(){a||(a=rm(function(){a=null;var z=c.slice(0),H=!1;c=[],_r(z,function(j){j()?H=!0:c.push(j)}),c[S2]>0&&P(),H&&w(!0)},100))}function R(z){c.push(z),P()}o[kU]=function(z,H){var j=z.name;if(Gn(j)||typeof j!="string"){var K=Hd();j=z.name=K&&K.title||""}var ne=z.uri;if(Gn(ne)||typeof ne!="string"){var me=wh();ne=z.uri=me&&me[x2]||""}if(!g){var Te=l0(),Ie=Te&&Te[yY]&&Te[yY]("navigation");if(Ie&&Ie[0]&&!Hl(Te.timeOrigin)){var ye=Ie[0].loadEventStart;z[oA]=new Date(Te.timeOrigin+ye)}else{var fe=(H||z[QF]||{})[$v]||0;z[oA]=new Date(new Date().getTime()-fe)}g=!0}if(!r[vle]()){i[rA](z,H),w(!0),Jae()||sr(C,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var Re=!1,Ae,ke=r[ble]()[RU];ke>0&&(Ae=Ih(ke,+new Date),r[vY](Ae)||(Ae=void 0));var Qe;!Gn(H)&&!Gn(H[$v])&&(Qe=H[$v]),(e||!isNaN(Qe))&&(isNaN(Qe)&&(H||(H={}),H[$v]=Ae),i[rA](z,H),w(!0),Re=!0);var we=6e4;H||(H={}),R(function(){var Rt=!1;try{if(r[Cle]()){Rt=!0;var rt={name:j,uri:ne};r[MU](rt),!rt.isValid&&!Re?(H[$v]=Ae,i[rA](z,H)):(Re||(H[$v]=rt.durationMs,i[rA](z,H)),m||(i[gY](rt,H),m=!0))}else ke>0&&Ih(ke,+new Date)>we&&(Rt=!0,Re||(H[$v]=we,i[rA](z,H)))}catch(Ze){sr(C,1,38,"trackPageView failed on page load calculation: "+ol(Ze),{exception:Fr(Ze)})}return Rt})},o.teardown=function(z,H){if(a){a.cancel(),a=null;var j=c.slice(0),K=!1;c=[],_r(j,function(ne){ne()&&(K=!0)})}}})}return t.__ieDyn=1,t})();var O7t=36e5,RKe=["googlebot","adsbot-google","apis-google","mediapartners-google"];function NKe(){var t=l0();return t&&!!t.timing}function R7t(){var t=l0();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[S2]>0}function P7t(){var t=l0(),i=t?t.timing:0;return i&&i.domainLookupStart>0&&i[RU]>0&&i[PU]>0&&i[MKe]>0&&i[bY]>0&&i[xle]>0&&i[CY]>0&&i.domLoading>0}function PKe(){return NKe()?l0().timing:null}function N7t(){return R7t()?l0()[yY]("navigation")[0]:null}function F7t(){for(var t=[],i=0;i=O7t)return!1;return!0}var FKe=(function(){function t(i){var e=d0(i);Ka(t,this,function(n){n[MU]=function(r){r.isValid=!1;var o=N7t(),a=PKe(),c=0,m=0,g=0,C=0,w=0;(o||a)&&(o?(c=o[$v],m=o[oA]===0?o[CY]:Ih(o[oA],o[CY]),g=Ih(o.requestStart,o[PU]),C=Ih(o[PU],o[xle]),w=Ih(o.responseEnd,o[bY])):(c=Ih(a[RU],a[bY]),m=Ih(a[RU],a[CY]),g=Ih(a.requestStart,a[PU]),C=Ih(a[PU],a[xle]),w=Ih(a.responseEnd,a[bY])),c===0?sr(e,2,10,"error calculating page view performance.",{total:c,network:m,request:g,response:C,dom:w}):n[vY](c,m,g,C,w)?c0&&t<=100}function H7t(t){Hl(t[mle])||(t[mle]?wIe():IIe())}var Sle=(function(t){lf(i,t);function i(){var e=t.call(this)||this;e.identifier=DU,e.priority=180,e.autoRoutePVDelay=500;var n,r,o,a,c,m,g,C,w,P,R,z,H,j,K,ne,me,Te=0,Ie,ye,fe,Re;return Ka(i,e,function(Ae,ke){var Qe=ke[WF];Kt(),Ae.getCookieMgr=function(){return RF(Ae[df])},Ae.processTelemetry=function(gt,ht){Ae.processNext(gt,ht)},Ae.trackEvent=function(gt,ht){try{var li=CC(gt,_C[nA],_C[b2],Ae[Cy](),ht);Ae[df][C2](li)}catch(ui){pi(2,39,"trackTrace failed, trace will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae.startTrackEvent=function(gt){try{n.start(gt)}catch(ht){pi(1,29,"startTrackEvent failed, event will not be collected: "+ol(ht),{exception:Fr(ht)})}},Ae.stopTrackEvent=function(gt,ht,li){try{n.stop(gt,void 0,ht,li)}catch(ui){pi(1,30,"stopTrackEvent failed, event will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae.trackTrace=function(gt,ht){try{var li=CC(gt,Xw[nA],Xw[b2],Ae[Cy](),ht);Ae[df][C2](li)}catch(ui){pi(2,39,"trackTrace failed, trace will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae.trackMetric=function(gt,ht){try{var li=CC(gt,vC[nA],vC[b2],Ae[Cy](),ht);Ae[df][C2](li)}catch(ui){pi(1,36,"trackMetric failed, metric will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae[kU]=function(gt,ht){try{var li=gt||{};o[kU](li,om(om(om({},li.properties),li.measurements),ht)),ne&&c[fY](li.name,li.uri)}catch(ui){pi(1,37,"trackPageView failed, page view will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae[rA]=function(gt,ht,li){var ui=Hd();if(ui&&(gt.refUri=gt.refUri===void 0?ui.referrer:gt.refUri),Gn(gt[oA])){var Bi=(ht||gt[QF]||{})[$v]||0;gt[oA]=new Date(new Date().getTime()-Bi)}var wn=CC(gt,by[nA],by[b2],Ae[Cy](),ht,li);Ae[df][C2](wn),Te=0},Ae[gY]=function(gt,ht,li){var ui=CC(gt,Jw[nA],Jw[b2],Ae[Cy](),ht,li);Ae[df][C2](ui)},Ae.trackPageViewPerformance=function(gt,ht){var li=gt||{};try{a[MU](li),Ae[gY](li,ht)}catch(ui){pi(1,37,"trackPageViewPerformance failed, page view will not be collected: "+ol(ui),{exception:Fr(ui)})}},Ae.startTrackPage=function(gt){try{if(typeof gt!="string"){var ht=Hd();gt=ht&&ht.title||""}r.start(gt)}catch(li){pi(1,31,"startTrackPage failed, page view may not be collected: "+ol(li),{exception:Fr(li)})}},Ae.stopTrackPage=function(gt,ht,li,ui){try{if(typeof gt!="string"){var Bi=Hd();gt=Bi&&Bi.title||""}if(typeof ht!="string"){var wn=wh();ht=wn&&wn[x2]||""}r.stop(gt,ht,li,ui),ne&&c[fY](gt,ht)}catch(yn){pi(1,32,"stopTrackPage failed, page view will not be collected: "+ol(yn),{exception:Fr(yn)})}},Ae[LIe]=function(gt,ht,li){var ui=gt&&(gt.exception||gt[OU])||uF(gt)&>||{name:gt&&typeof gt,message:gt||Gm};gt=gt||{};var Bi=new e_(Ae[Cy](),ui,gt[QF]||ht,gt.measurements,gt.severityLevel,gt.id).toInterface(),wn=Hd();if(wn&&me?.inclScripts){var yn=Gse(wn);Bi[QF].exceptionScripts=JSON.stringify(yn)}if(me?.expLog){var Xn=me.expLog();Xn&&Xn.logs&&ea(Xn.logs)&&(Bi[QF].exceptionLog=Xn.logs.slice(0,me.maxLogs).join(` `))}var Rr=CC(Bi,e_[nA],e_[b2],Ae[Cy](),ht,li);Ae[df][C2](Rr)},Ae.trackException=function(gt,ht){gt&&!gt.exception&>[OU]&&(gt.exception=gt[OU]);try{Ae[LIe](gt,ht)}catch(li){pi(1,35,"trackException failed, exception will not be collected: "+ol(li),{exception:Fr(li)})}},Ae._onerror=function(gt){var ht=gt&>[OU],li=gt&>.evt;try{if(!li){var ui=Bm();ui&&(li=ui[B7t])}var Bi=gt&>.url||(Hd()||{}).URL,wn=gt.errorSrc||"window.onerror@"+Bi+":"+(gt[hle]||0)+":"+(gt[fle]||0),yn={errorSrc:wn,url:Bi,lineNumber:gt[hle]||0,columnNumber:gt[fle]||0,message:gt.message};RIe(gt.message,gt.url,gt.lineNumber,gt.columnNumber,gt[OU])?Ze(e_[gle]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Bi,gt[hle]||0,gt[fle]||0,ht,li,null,wn),yn):(gt.errorSrc||(gt.errorSrc=wn),Ae.trackException({exception:gt,severityLevel:3},yn))}catch(Rr){var Xn=ht?ht.name+", "+ht.message:"null";pi(1,11,"_onError threw exception while logging error, error will not be collected: "+ol(Rr),{exception:Fr(Rr),errorString:Xn})}},Ae[_Y]=function(gt){if(Ae[df])return Ae[df][_Y](gt);m||(m=[]),m.push(gt)},Ae.initialize=function(gt,ht,li,ui){if(!Ae.isInitialized()){Gn(ht)&&af("Error initializing"),ke.initialize(gt,ht,li,ui);try{fe=m0(wp(Ae.identifier),ht.evtNamespace&&ht.evtNamespace()),m&&(_r(m,function(Bi){ht[_Y](Bi)}),m=null),we(gt),a=new FKe(Ae[df]),o=new OKe(Ae,K.overridePageViewDuration,Ae[df],a),c=new LKe(Ae[Cy](),function(Bi,wn,yn){return Rt(Bi,wn,yn)}),n=new HIe(Ae[Cy](),"trackEvent"),n.action=function(Bi,wn,yn,Xn,Rr){Xn||(Xn={}),Rr||(Rr={}),Xn.duration=yn[hY](),Ae.trackEvent({name:Bi,properties:Xn,measurements:Rr})},r=new HIe(Ae[Cy](),"trackPageView"),r.action=function(Bi,wn,yn,Xn,Rr){Gn(Xn)&&(Xn={}),Xn.duration=yn[hY]();var De={name:Bi,uri:wn,properties:Xn,measurements:Rr};Ae[rA](De,Xn)},WM()&&(Et(),We())}catch(Bi){throw Ae.setInitialized(!1),Bi}}},Ae._doTeardown=function(gt,ht){o&&o.teardown(gt,ht),Kw(window,null,null,fe),Kt()},Ae._getDbgPlgTargets=function(){return[Re,z]};function we(gt){var ht=Ae.identifier,li=Ae[df];Ae[WF](Gl(gt,function(){var ui=Hm(null,gt,li);K=ui.getExtCfg(ht,z7t),z=z||gt[_le]||K[_le],me=K.expCfg,ne=K[BIe],gt.storagePrefix&&jF(gt.storagePrefix),H7t(K),g=K[VIe],rt()}))}function Rt(gt,ht,li){var ui={PageName:gt,PageUrl:ht};Ae.trackMetric({name:"PageVisitTime",average:li,max:li,min:li,sampleCount:1},ui)}function rt(){if(!C&&g){var gt=["/browserLinkSignalR/","/__browserLink/"],ht=function(li){if(g&&li.baseType===bC[nA]){var ui=li.baseData;if(ui){for(var Bi=0;Bi=0)return!1}}return!0};Ae[WF](Ae[_Y](ht)),C=!0}}function Ze(gt,ht){var li=CC(gt,e_[nA],e_[b2],Ae[Cy](),ht);Ae[df][C2](li)}function Et(){var gt=Bm(),ht=wh(!0);Ae[WF](Gl(K,function(){R=K.disableExceptionTracking,!R&&!z&&!K[_le]&&(Qe(bU(gt,"onerror",{ns:fe,rsp:function(li,ui,Bi,wn,yn,Xn){!R&&li.rslt!==!0&&Ae._onerror(e_[gle](ui,Bi,wn,yn,Xn,li.evt))}},!1)),Re++,z=!0)})),kt(gt,ht)}function We(){var gt=Bm(),ht=wh(!0);Ae[WF](Gl(K,function(){if(w=K[zIe]===!0,gt&&w&&!P&&RSe()){var li=Xae();oo(li.pushState)&&oo(li.replaceState)&&typeof Event!==vF&&st(gt,li,ht)}}))}function bt(){var gt=null;if(Ae[df]&&Ae[df].getTraceCtx&&(gt=Ae[df].getTraceCtx(!1)),!gt){var ht=Ae[df].getPlugin(eI);if(ht){var li=ht.plugin.context;li&&(gt=GF(li.telemetryTrace))}}return gt}function st(gt,ht,li){if(P)return;var ui=K.namePrefix||"";function Bi(){w&&xY(gt,KF(ui+"locationchange"))}function wn(){if(ye?(Ie=ye,ye=li&&li[x2]||""):ye=li&&li[x2]||"",w){var yn=bt();if(yn){yn.setTraceId(u0());var Xn="_unknown_";li&&li.pathname&&(Xn=li.pathname+(li.hash||"")),yn.setName(yc(Ae[Cy](),Xn))}rm(function(Rr){Ae[kU]({refUri:Rr,properties:{duration:0}})}.bind(Ae,Ie),Ae.autoRoutePVDelay)}}Qe(bU(ht,"pushState",{ns:fe,rsp:function(){w&&(xY(gt,KF(ui+"pushState")),xY(gt,KF(ui+"locationchange")))}},!0)),Qe(bU(ht,"replaceState",{ns:fe,rsp:function(){w&&(xY(gt,KF(ui+"replaceState")),xY(gt,KF(ui+"locationchange")))}},!0)),vy(gt,ui+"popstate",Bi,fe),vy(gt,ui+"locationchange",wn,fe),P=!0}function kt(gt,ht){Ae[WF](Gl(K,function(){H=K[UIe]===!0,z=z||K[yle],H&&!j&&(Qe(bU(gt,"onunhandledrejection",{ns:fe,rsp:function(li,ui){H&&li.rslt!==!0&&Ae._onerror(e_[gle](V7t(ui),ht?ht[x2]:"",0,0,ui,li.evt))}},!1)),Re++,K[yle]=j=!0)}))}function pi(gt,ht,li,ui,Bi){Ae[Cy]().throwInternal(gt,ht,li,ui,Bi)}function Kt(){n=null,r=null,o=null,a=null,c=null,m=null,g=!1,C=!1,w=!1,P=!1,R=!1,z=!1,H=!1,j=!1,ne=!1,Te=0;var gt=wh(!0);Ie=gt&>[x2]||"",ye=null,fe=null,K=null,Re=0,Ya(Ae,"config",{g:function(){return K}})}Ya(Ae,"_pageViewManager",{g:function(){return o}}),Ya(Ae,"_pageViewPerformanceManager",{g:function(){return a}}),Ya(Ae,"_pageVisitTimeManager",{g:function(){return c}}),Ya(Ae,"_evtNamespace",{g:function(){return"."+fe}})}),e}return i.Version="3.3.9",i})(p0);var SY="featureOptIn",GIe="scheduleFetchTimeout";function jIe(t,i,e,n){try{var r=e>n;r&&(t=null);var o=e==0?xqe({},t):t;return o&&i&&!r&&ba(o,function(a){var c=i[a];c&&(im(o[a])&&im(c)?o[a]=jIe(o[a],c,++e,n):delete o[a])}),o}catch{}return t}var NU="featureOptIn.",zKe=".mode",UKe=".onCfg",HKe=".offCfg";function G7t(t,i,e){var n;if(!i||!i.enabled)return null;var r=(i[SY]||{})[t]||{mode:1},o=r.mode,a=r.onCfg,c=r.offCfg,m=(e||{})[t]||{mode:2},g=m.mode,C=m.onCfg,w=m.offCfg,P=!!m.blockCdnCfg,R=NU+t+zKe,z=NU+t+UKe,H=NU+t+HKe,j=g,K=C,ne=w;return P||(o===4||o===5?(j=o==4?3:2,K=a||C,ne=c||w):o===2||g===2?(j=2,K=C||a,ne=w||c):o===3?(j=3,K=C||a,ne=w||c):o===1&&g===1&&(j=1)),n={},n[R]=j,n[z]=K,n[H]=ne,n}function GKe(t,i){try{if(!t||!t.enabled)return null;if(!t[SY])return t.config;var e=t[SY],n=t.config||{};return ba(e,function(r){var o=G7t(r,t,i.config[SY]);Gn(o)||(ba(o,function(a,c){VSe(n,a,c)}),j7t(r,o,n))}),n}catch{}return null}function j7t(t,i,e){var n=i[NU+t+zKe],r=i[NU+t+UKe],o=i[NU+t+HKe],a=null;n===3&&(a=r),n===2&&(a=o),a&&ba(a,function(c,m){VSe(e,c,m)})}var wY,$7t="ai_cfgsync",jKe="GET",q7t=18e5,FU=void 0,Y7t={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},K7t=fy((wY={syncMode:1,blkCdnCfg:FU,customEvtName:FU,cfgUrl:FU,overrideSyncFn:FU,overrideFetchFn:FU,onCfgChangeReceive:FU},wY[GIe]=q7t,wY.nonOverrideConfigs=Y7t,wY.enableAjax=!1,wY)),$Ie=(function(t){lf(i,t);function i(){var e=t.call(this)||this;e.priority=198,e.identifier="AppInsightsCfgSyncPlugin";var n,r,o,a,c,m,g,C,w,P,R,z,H,j,K,ne,me=!1,Te;return Ka(i,e,function(Ie,ye){fe(),Ie.initialize=function(Kt,gt,ht,li){ye.initialize(Kt,gt,ht,li),a=m0(wp(Ie.identifier),gt.evtNamespace&>.evtNamespace()),Re(Kt)},Ie.getCfg=function(){return r},Ie.pause=function(){me=!0,pi()},Ie.resume=function(){me=!1,kt()},Ie.setCfg=function(Kt){return Ae(Kt)},Ie.sync=function(Kt){return Qe(Kt)},Ie.updateEventListenerName=function(Kt){return we(Kt)},Ie._doTeardown=function(Kt,gt){ke(),pi(),fe()},Ie._getDbgPlgTargets=function(){return[C,g,o,w,H]};function fe(){r=null,o=null,a=null,c=null,g=null,C=null,H=null,m=null,P=null,R=null,w=null,Te=!1,K=null,ne=null,z=null}function Re(Kt){var gt=Ie.identifier,ht=Ie.core;Ie._addHook(Gl(Kt,function(){var li=Hm(null,Kt,ht);n=li.getExtCfg(gt,K7t);var ui=w;w=!!n.blkCdnCfg,Te=!!n.enableAjax,!Gn(ui)&&ui!==w&&(!w&&c?j&&j(c,Et,C):pi()),Gn(g)&&(g=n.syncMode===2),Gn(C)&&(C=n.syncMode===1);var Bi=n.customEvtName||$7t;o!==Bi&&(g?we(Bi):(ke(),o=Bi)),Gn(c)&&(c=n.cfgUrl),c||(r=Kt,C&&Qe())})),ne=n.overrideSyncFn,K=n.overrideFetchFn,z=n.onCfgChangeReceive,H=n.nonOverrideConfigs,P=n[GIe],j=Rt(),R=0,c&&!w&&j&&j(c,Et,C)}function Ae(Kt,gt){if(Kt){if(r=Kt,gt&&!me)return Qe();if(g&&!me)return Ie.core.updateCfg(Kt),!0}return!1}function ke(){try{var Kt=nm();Kt&&Kw(Kt,null,null,a)}catch{}}function Qe(Kt){try{return ne&&oo(ne)?ne(r,Kt):Awe(o,r,Kt)}catch{}return!1}function we(Kt){try{return ke(),Kt&&(o=Kt,bt()),!0}catch{}return!1}function Rt(){var Kt=K;return Gn(Kt)&&(AF()?Kt=rt:i2()&&(Kt=Ze)),Kt}function rt(Kt,gt,ht){var li=nm(),ui=li&&li.fetch||null;if(Kt&&ui&&oo(ui))try{var Bi={method:jKe};Te||(Bi[Ww]=!0);var wn=new Request(Kt,Bi);if(!Te)try{wn[Ww]=!0}catch{}Ch(fetch(wn),function(yn){var Xn=yn.value;yn.rejected?We(gt,400):Xn.ok?Ch(Xn.text(),function(Rr){We(gt,Xn.status,Rr.value,ht)}):We(gt,Xn.status,null,ht)})}catch{}}function Ze(Kt,gt,ht){try{var li=new XMLHttpRequest;Te||(li[Ww]=!0),li.open(jKe,Kt),li.onreadystatechange=function(){li.readyState===XMLHttpRequest.DONE&&We(gt,li.status,li.responseText,ht)},li.onerror=function(){We(gt,400)},li.ontimeout=function(){We(gt,400)},li.send()}catch{}}function Et(Kt,gt,ht){try{if(Kt>=200&&Kt<400&>){R=0;var li=zm();if(li){var ui=li.parse(gt),Bi=GKe(ui,Ie.core),wn=Bi&&Vm(Bi)&&st(Bi);wn&&Ae(wn,ht)}}else R++;R<3&&kt()}catch{}}function We(Kt,gt,ht,li){try{Kt(gt,ht,li)}catch{}}function bt(){if(g){var Kt=nm();if(Kt)try{vy(Kt,o,function(gt){var ht=gt&>.detail;if(z&&ht)z(ht);else{var li=ht&&ht.cfg,ui=li&&Vm(li)&&st(li);ui&&Ae(ui)}},a,!0)}catch{}}}function st(Kt,gt){var ht=null;try{Kt&&(ht=jIe(Kt,H,0,5))}catch{}return ht}function kt(){!m&&P&&(m=rm(function(){m=null,j(c,Et,C)},P),m.unref())}function pi(){m&&m.cancel(),m=null,R=0}Ie.processTelemetry=function(Kt,gt){Ie.processNext(Kt,gt)}}),e}return i.__ieDyn=1,i})(p0);var w2="duration";var jm="tags",wle="deviceType",xy="data",tI="name",ZF="traceID",Qs="length",I2="stringify",T2="measurements",xC="dataType",E2="envelopeType",aA="toString",sA="enqueue",lA="count",SC="push",IY="emitLineDelimitedJson",A2="clear",LU="markAsSent",XF="clearSent",TY="bufferOverride",BU="BUFFER_KEY",cA="SENT_BUFFER_KEY",D2="concat",VU="MAX_BUFFER_SIZE",zU="triggerSend",lg="diagLog",Ile="initialize",UU="_sender",HU="endpointUrl",GU="instrumentationKey",Tle="customHeaders",qIe="maxBatchSizeInBytes",Ele="onunloadDisableBeacon",Ale="isBeaconApiDisabled",YIe="alwaysUseXhrOverride",KIe="enableSessionStorageBuffer",y1="_buffer",WIe="onunloadDisableFetch",QIe="disableSendBeaconSplit",EY="getSenderInst",k2="_onError",Dle="_onPartialSuccess",AY="_onSuccess",kle="itemsReceived",Mle="itemsAccepted",Ole="baseType",jU="sampleRate",$Ke="getHashCodeScore";var ZIe="baseType",Lu="baseData",uf="properties",qKe="true";function am(t,i,e){return Zc(t,i,e,YM)}function W7t(t,i,e){var n=e[jm]=e[jm]||{},r=i.ext=i.ext||{},o=i[jm]=i[jm]||[],a=r.user;a&&(am(n,pd.userAuthUserId,a.authId),am(n,pd.userId,a.id||a.localId));var c=r.app;c&&am(n,pd.sessionId,c.sesId);var m=r.device;m&&(am(n,pd.deviceId,m.id||m.localId),am(n,pd[wle],m.deviceClass),am(n,pd.deviceIp,m.ip),am(n,pd.deviceModel,m.model),am(n,pd[wle],m[wle]));var g=i.ext.web;if(g){am(n,pd.deviceLanguage,g.browserLang),am(n,pd.deviceBrowserVersion,g.browserVer),am(n,pd.deviceBrowser,g.browser);var C=e[xy]=e[xy]||{},w=C[Lu]=C[Lu]||{},P=w[uf]=w[uf]||{};am(P,"domain",g.domain),am(P,"isManual",g.isManual?qKe:null),am(P,"screenRes",g.screenRes),am(P,"userConsent",g.userConsent?qKe:null)}var R=r.os;R&&(am(n,pd.deviceOS,R[tI]),am(n,pd.deviceOSVersion,R.osVer));var z=r.trace;z&&(am(n,pd.operationParentId,z.parentID),am(n,pd.operationName,yc(t,z[tI])),am(n,pd.operationId,z[ZF]));for(var H={},j=o[Qs]-1;j>=0;j--){var K=o[j];ba(K,function(me,Te){H[me]=Te}),o.splice(j,1)}ba(o,function(me,Te){H[me]=Te});var ne=om(om({},n),H);ne[pd.internalSdkVersion]||(ne[pd.internalSdkVersion]=yc(t,"javascript:".concat(Q7t.Version),64)),e[jm]=Ese(ne)}function M2(t,i,e){Gn(t)||ba(t,function(n,r){s1(r)?e[n]=r:wo(r)?i[n]=r:$w()&&(i[n]=zm()[I2](r))})}function JF(t,i){Gn(t)||ba(t,function(e,n){t[e]=n||i})}function eL(t,i,e,n){var r=new AIe(t,n,i);am(r,"sampleRate",e[Zq]),(e[Lu]||{}).startTime&&(r.time=gC(e[Lu].startTime)),r.iKey=e.iKey;var o=e.iKey.replace(/-/g,"");return r[tI]=r[tI].replace("{0}",o),W7t(t,e,r),e[jm]=e[jm]||[],Ese(r)}function tL(t,i){Gn(i[Lu])&&sr(t,1,46,"telemetryItem.baseData cannot be null.")}var Q7t={Version:"3.3.9"};function YKe(t,i,e){tL(t,i);var n=i[Lu][T2]||{},r=i[Lu][uf]||{};M2(i[xy],r,n),Gn(e)||JF(r,e);var o=i[Lu];if(Gn(o))return Gv(t,"Invalid input for dependency data"),null;var a=o[uf]&&o[uf][Jse]?o[uf][Jse]:"GET",c=new bC(t,o.id,o.target,o[tI],o[w2],o.success,o.responseCode,a,o.type,o.correlationContext,r,n),m=new iA(bC[xC],c);return eL(t,bC[E2],i,m)}function XIe(t,i,e){tL(t,i);var n={},r={};i[ZIe]!==_C[xC]&&(n.baseTypeSource=i[ZIe]),i[ZIe]===_C[xC]?(n=i[Lu][uf]||{},r=i[Lu][T2]||{}):i[Lu]&&M2(i[Lu],n,r),M2(i[xy],n,r),Gn(e)||JF(n,e);var o=i[Lu][tI],a=new _C(t,o,n,r),c=new iA(_C[xC],a);return eL(t,_C[E2],i,c)}function KKe(t,i,e){tL(t,i);var n=i[Lu][T2]||{},r=i[Lu][uf]||{};M2(i[xy],r,n),Gn(e)||JF(r,e);var o=i[Lu],a=e_.CreateFromInterface(t,o,r,n),c=new iA(e_[xC],a);return eL(t,e_[E2],i,c)}function WKe(t,i,e){tL(t,i);var n=i[Lu],r=n[uf]||{},o=n[T2]||{};M2(i[xy],r,o),Gn(e)||JF(r,e);var a=new vC(t,n[tI],n.average,n.sampleCount,n.min,n.max,n.stdDev,r,o),c=new iA(vC[xC],a);return eL(t,vC[E2],i,c)}function QKe(t,i,e){tL(t,i);var n,r=i[Lu];!Gn(r)&&!Gn(r[uf])&&!Gn(r[uf][w2])?(n=r[uf][w2],delete r[uf][w2]):!Gn(i[xy])&&!Gn(i[xy][w2])&&(n=i[xy][w2],delete i[xy][w2]);var o=i[Lu],a;((i.ext||{}).trace||{})[ZF]&&(a=i.ext.trace[ZF]);var c=o.id||a,m=o[tI],g=o.uri,C=o[uf]||{},w=o[T2]||{};if(Gn(o.refUri)||(C.refUri=o.refUri),Gn(o.pageType)||(C.pageType=o.pageType),Gn(o.isLoggedIn)||(C.isLoggedIn=o.isLoggedIn[aA]()),!Gn(o[uf])){var P=o[uf];ba(P,function(H,j){C[H]=j})}M2(i[xy],C,w),Gn(e)||JF(C,e);var R=new by(t,m,g,n,C,w,c),z=new iA(by[xC],R);return eL(t,by[E2],i,z)}function ZKe(t,i,e){tL(t,i);var n=i[Lu],r=n[tI],o=n.uri||n.url,a=n[uf]||{},c=n[T2]||{};M2(i[xy],a,c),Gn(e)||JF(a,e);var m=new Jw(t,r,o,void 0,a,c,n),g=new iA(Jw[xC],m);return eL(t,Jw[E2],i,g)}function XKe(t,i,e){tL(t,i);var n=i[Lu].message,r=i[Lu].severityLevel,o=i[Lu][uf]||{},a=i[Lu][T2]||{};M2(i[xy],o,a),Gn(e)||JF(o,e);var c=new Xw(t,n,r,o,a),m=new iA(Xw[xC],c);return eL(t,Xw[E2],i,m)}var JKe=(function(){function t(i,e){var n=[],r=!1,o=e.maxRetryCnt;this._get=function(){return n},this._set=function(a){return n=a,n},Ka(t,this,function(a){a[sA]=function(c){if(a[lA]()>=e.eventsLimitInMem){r||(sr(i,2,105,"Maximum in-memory buffer size reached: "+a[lA](),!0),r=!0);return}c.cnt=c.cnt||0,!(!Gn(o)&&c.cnt>o)&&n[SC](c)},a[lA]=function(){return n[Qs]},a.size=function(){for(var c=n[Qs],m=0;m0){var m=[];_r(c,function(C){m[SC](C.item)});var g=e[IY]?m.join(` `):"["+m.join(",")+"]";return g}return null},a.createNew=function(c,m,g){var C=n.slice(0);c=c||i,m=m||{};var w=g?new JIe(c,m):new Rle(c,m);return _r(C,function(P){w[sA](P)}),w}})}return t.__ieDyn=1,t})(),Rle=(function(t){lf(i,t);function i(e,n){var r=t.call(this,e,n)||this;return Ka(i,r,function(o,a){o[LU]=function(c){a[A2]()},o[XF]=function(c){}}),r}return i.__ieDyn=1,i})(JKe);var Z7t=["AI_buffer","AI_sentBuffer"],JIe=(function(t){lf(i,t);function i(n,r){var o=t.call(this,n,r)||this,a=!1,c=r?.namePrefix,m=r[TY]||{getItem:TU,setItem:lY},g=m.getItem,C=m.setItem,w=r.maxRetryCnt;return Ka(i,o,function(P,R){var z=Te(i[BU]),H=Te(i[cA]),j=fe(),K=H[D2](j),ne=P._set(z[D2](K));ne[Qs]>i[VU]&&(ne[Qs]=i[VU]),ye(i[cA],[]),ye(i[BU],ne),P[sA]=function(Ae){if(P[lA]()>=i[VU]){a||(sr(n,2,67,"Maximum buffer size reached: "+P[lA](),!0),a=!0);return}Ae.cnt=Ae.cnt||0,!(!Gn(w)&&Ae.cnt>w)&&(R[sA](Ae),ye(i[BU],P._get()))},P[A2]=function(){R[A2](),ye(i[BU],P._get()),ye(i[cA],[]),a=!1},P[LU]=function(Ae){ye(i[BU],P._set(me(Ae,P._get())));var ke=Te(i[cA]);ke instanceof Array&&Ae instanceof Array&&(ke=ke[D2](Ae),ke[Qs]>i[VU]&&(sr(n,1,67,"Sent buffer reached its maximum size: "+ke[Qs],!0),ke[Qs]=i[VU]),ye(i[cA],ke))},P[XF]=function(Ae){var ke=Te(i[cA]);ke=me(Ae,ke),ye(i[cA],ke)},P.createNew=function(Ae,ke,Qe){Qe=!!Qe;var we=P._get().slice(0),Rt=Te(i[cA]).slice(0);Ae=Ae||n,ke=ke||{},P[A2]();var rt=Qe?new i(Ae,ke):new Rle(Ae,ke);return _r(we,function(Ze){rt[sA](Ze)}),Qe&&rt[LU](Rt),rt};function me(Ae,ke){var Qe=[],we=[];return _r(Ae,function(Rt){we[SC](Rt.item)}),_r(ke,function(Rt){!oo(Rt)&&Ed(we,Rt.item)===-1&&Qe[SC](Rt)}),Qe}function Te(Ae){var ke=Ae;return ke=c?c+"_"+ke:ke,Ie(ke)}function Ie(Ae){try{var ke=g(n,Ae);if(ke){var Qe=zm().parse(ke);if(wo(Qe)&&(Qe=zm().parse(Qe)),Qe&&ea(Qe))return Qe}}catch(we){sr(n,1,42," storage key: "+Ae+", "+ol(we),{exception:Fr(we)})}return[]}function ye(Ae,ke){var Qe=Ae;try{Qe=c?c+"_"+Qe:Qe;var we=JSON[I2](ke);C(n,Qe,we)}catch(Rt){C(n,Qe,JSON[I2]([])),sr(n,2,41," storage key: "+Qe+", "+ol(Rt)+". Buffer cleared",{exception:Fr(Rt)})}}function fe(){var Ae=[];try{return _r(Z7t,function(ke){var Qe=Re(ke);if(Ae=Ae[D2](Qe),c){var we=c+"_"+ke,Rt=Re(we);Ae=Ae[D2](Rt)}}),Ae}catch(ke){sr(n,2,41,"Transfer events from previous buffers: "+ol(ke)+". previous Buffer items can not be removed",{exception:Fr(ke)})}return[]}function Re(Ae){try{var ke=Ie(Ae),Qe=[];return _r(ke,function(we){var Rt={item:we,cnt:0};Qe[SC](Rt)}),cY(n,Ae),Qe}catch{}return[]}}),o}var e;return e=i,i.VERSION="_1",i.BUFFER_KEY="AI_buffer"+e.VERSION,i.SENT_BUFFER_KEY="AI_sentBuffer"+e.VERSION,i.MAX_BUFFER_SIZE=2e3,i})(JKe);var eWe=(function(){function t(i){Ka(t,this,function(e){e.serialize=function(a){var c=n(a,"root");try{return zm()[I2](c)}catch(m){sr(i,1,48,m&&oo(m[aA])?m[aA]():"Error serializing object",null,!0)}};function n(a,c){var m="__aiCircularRefCheck",g={};if(!a)return sr(i,1,48,"cannot serialize object because it is null or undefined",{name:c},!0),g;if(a[m])return sr(i,2,50,"Circular reference detected while serializing object",{name:c},!0),g;if(!a.aiDataContract){if(c==="measurements")g=o(a,"number",c);else if(c==="properties")g=o(a,"string",c);else if(c==="tags")g=o(a,"string",c);else if(ea(a))g=r(a,c);else{sr(i,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:c},!0);try{zm()[I2](a),g=a}catch(C){sr(i,1,48,C&&oo(C[aA])?C[aA]():"Error serializing object",null,!0)}}return g}return a[m]=!0,ba(a.aiDataContract,function(C,w){var P=oo(w)?w()&1:w&1,R=oo(w)?w()&4:w&4,z=w&2,H=a[C]!==void 0,j=im(a[C])&&a[C]!==null;if(P&&!H&&!z)sr(i,1,24,"Missing required field specification. The field is required but not present on source",{field:C,name:c});else if(!R){var K=void 0;j?z?K=r(a[C],C):K=n(a[C],C):K=a[C],K!==void 0&&(g[C]=K)}}),delete a[m],g}function r(a,c){var m;if(a)if(!ea(a))sr(i,1,54,`This field was specified as an array in the contract but the item is not an array.\r `,{name:c},!0);else{m=[];for(var g=0;g100||i<0)&&(n.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:i},!0),i=100),this[jU]=i,this.samplingScoreGenerator=new iWe}return t.prototype.isSampledIn=function(i){var e=this[jU],n=!1;return e==null||e>=100||i.baseType===vC[xC]?!0:(n=this.samplingScoreGenerator.getSamplingScore(i)0&&t<=100}var i9t=(dA={},dA[_C.dataType]=XIe,dA[Xw.dataType]=XKe,dA[by.dataType]=QKe,dA[Jw.dataType]=ZKe,dA[e_.dataType]=KKe,dA[vC.dataType]=WKe,dA[bC.dataType]=YKe,dA),eTe=(function(t){lf(i,t);function i(){var e=t.call(this)||this;e.priority=1001,e.identifier=ple;var n,r,o,a,c,m,g,C,w=0,P,R,z,H,j,K,ne,me,Te,Ie,ye,fe,Re,Ae,ke,Qe,we,Rt,rt,Ze,Et,We,bt,st,kt,pi,Kt,gt;return Ka(i,e,function(ht,li){gg(),ht.pause=function(){vl(),a=!0},ht.resume=function(){a&&(a=!1,r=null,Qt(),os())},ht.flush=function(Hi,Cn,wr){if(Hi===void 0&&(Hi=!0),!a){vl();try{return ht[zU](Hi,null,wr||1)}catch(Ao){sr(ht[lg](),1,22,"flush failed, telemetry will not be collected: "+ol(Ao),{exception:Fr(Ao)})}}},ht.onunloadFlush=function(){if(!a)if(ne||Ze)try{return ht[zU](!0,un,2)}catch(Hi){sr(ht[lg](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+ol(Hi),{exception:Fr(Hi)})}else ht.flush(!1)},ht.addHeader=function(Hi,Cn){C[Hi]=Cn},ht[Ile]=function(Hi,Cn,wr,Ao){ht.isInitialized()&&sr(ht[lg](),1,28,"Sender is already initialized"),li[Ile](Hi,Cn,wr,Ao);var ga=ht.identifier;m=new eWe(Cn.logger),n=0,r=null,o=0,ht[UU]=null,g=0;var yi=ht[lg]();z=m0(wp("Sender"),Cn.evtNamespace&&Cn.evtNamespace()),R=NIe(z),ht._addHook(Gl(Hi,function(as){var Nc=as.cfg;Nc.storagePrefix&&jF(Nc.storagePrefix);var xu=Hm(null,Nc,Cn),At=xu.getExtCfg(ga,aWe),Ce=At[HU];if(H&&Ce===H){var Me=Nc[HU];Me&&Me!==Ce&&(At[HU]=Me)}var Ke=Pc("CompressionStream");gt=TF("zipPayload",Nc,!1),oo(Ke)||(gt=!1);var xt=At.corsPolicy;xt?(xt==="same-origin"||xt==="same-site"||xt==="cross-origin")&&e.addHeader(sWe,xt):delete C[sWe],Pv(At[GU])&&(At[GU]=Nc[GU]),Ya(ht,"_senderConfig",{g:function(){return At}}),j!==At[HU]&&(H=j=At[HU]),Cn.activeStatus()===u1.PENDING?ht.pause():Cn.activeStatus()===u1.ACTIVE&&ht.resume(),Ie&&Ie!==At[Tle]&&_r(Ie,function(Yr){delete C[Yr.header]}),K=At[qIe],ne=(At[Ele]===!1||At[Ale]===!1)&&WE(),me=At[Ele]===!1&&WE(),Te=At[Ale]===!1&&WE(),Ze=At[YIe],Et=!!At.disableXhr,Kt=At.retryCodes;var mt=At[TY],pt=!!At[KIe]&&(!!mt||_2()),ii=At.namePrefix,Ft=pt!==Qe||pt&&Rt!==ii||pt&&we!==mt;if(ht[y1]){if(Ft)try{ht[y1]=ht[y1].createNew(yi,At,pt)}catch(Yr){sr(ht[lg](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+ol(Yr),{exception:Fr(Yr)})}Qt()}else ht[y1]=pt?new JIe(yi,At):new Rle(yi,At);Rt=ii,Qe=pt,we=mt,We=!At[WIe]&&AF(!0),kt=!!At[QIe],ht._sample=new nWe(At.samplingPercentage,yi),fe=At[GU],!Pv(fe)&&!xc(fe,Nc)&&sr(yi,1,100,"Invalid Instrumentation key "+fe),Ie=At[Tle],wo(H)&&!SU(H)&&Ie&&Ie[Qs]>0?_r(Ie,function(Yr){e.addHeader(Yr.header,Yr.value)}):Ie=null,rt=At.enableSendPromise;var oi=Bi();pi?pi.SetConfig(oi):(pi=new rIe,pi[Ile](oi,yi));var ln=At.httpXHROverride,zi=null,Jn=null,Pr=Dse([3,1,2],At.transports);zi=pi&&pi[EY](Pr,!1);var Qr=pi&&pi.getFallbackInst();bt=function(Yr,Fo){return Xt(Qr,Yr,Fo)},st=function(Yr,Fo){return Xt(Qr,Yr,Fo,!1)},zi=Ze?ln:zi||ln||Qr,ht[UU]=function(Yr,Fo){return Xt(zi,Yr,Fo)},We&&(P=Wr);var jo=Dse([3,1],At.unloadTransports);We||(jo=jo.filter(function(Yr){return Yr!==2})),Jn=pi&&pi[EY](jo,!0),Jn=Ze?ln:Jn||ln,(Ze||At.unloadTransports||!P)&&Jn&&(P=function(Yr,Fo){return Xt(Jn,Yr,Fo)}),P||(P=bt),ye=At.disableTelemetry,Re=At.convertUndefined||v1,Ae=At.isRetryDisabled,ke=At.maxBatchInterval}))},ht.processTelemetry=function(Hi,Cn){Cn=ht._getTelCtx(Cn);var wr=Cn[lg]();try{var Ao=bi(Hi,wr);if(!Ao)return;var ga=Ci(Hi,wr);if(!ga)return;var yi=m.serialize(ga),as=ht[y1];Qt(yi);var Nc={item:yi,cnt:0};as[sA](Nc),os()}catch(xu){sr(wr,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+ol(xu),{exception:Fr(xu)})}ht.processNext(Hi,Cn)},ht.isCompletelyIdle=function(){return!a&&w===0&&ht._buffer[lA]()===0},ht.getOfflineListener=function(){return R},ht._xhrReadyStateChange=function(Hi,Cn,wr){if(!lo(Cn))return wn(Hi,Cn,wr)},ht[zU]=function(Hi,Cn,wr){Hi===void 0&&(Hi=!0);var Ao;if(!a)try{var ga=ht[y1];if(ye)ga[A2]();else{if(ga[lA]()>0){var yi=ga.getItems();Na(wr||0,Hi),Cn?Ao=Cn.call(ht,yi,Hi):Ao=ht[UU](yi,Hi)}o=+new Date}vl()}catch(Nc){var as=Pq();(!as||as>9)&&sr(ht[lg](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+ol(Nc),{exception:Fr(Nc)})}return Ao},ht.getOfflineSupport=function(){return{getUrl:function(){return H},createPayload:ti,serialize:Mt,batch:wt,shouldProcess:function(Hi){return!!bi(Hi)}}},ht._doTeardown=function(Hi,Cn){ht.onunloadFlush(),QE(R,!1),gg()},ht[k2]=function(Hi,Cn,wr){if(!lo(Hi))return yn(Hi,Cn,wr)},ht[Dle]=function(Hi,Cn){if(!lo(Hi))return Xn(Hi,Cn)},ht[AY]=function(Hi,Cn){if(!lo(Hi))return Rr(Hi,Cn)},ht._xdrOnLoad=function(Hi,Cn){if(!lo(Cn))return ui(Hi,Cn)};function ui(Hi,Cn){var wr=oWe(Hi);if(Hi&&(wr+""=="200"||wr===""))n=0,ht[AY](Cn,0);else{var Ao=Kq(wr);Ao&&Ao[kle]&&Ao[kle]>Ao[Mle]&&!Ae?ht[Dle](Cn,Ao):ht[k2](Cn,Oq(Hi))}}function Bi(){try{var Hi={xdrOnComplete:function(wr,Ao,ga){var yi=De(ga);if(yi)return ui(wr,yi)},fetchOnComplete:function(wr,Ao,ga,yi){var as=De(yi);if(as)return Ti(wr.status,as,wr.url,as[Qs],wr.statusText,ga||"")},xhrOnComplete:function(wr,Ao,ga){var yi=De(ga);if(yi)return wn(wr,yi,yi[Qs])},beaconOnRetry:function(wr,Ao,ga){return Sr(wr,Ao,ga)}},Cn={enableSendPromise:rt,isOneDs:!1,disableCredentials:!1,disableXhr:Et,disableBeacon:!Te,disableBeaconSync:!me,senderOnCompleteCallBack:Hi};return Cn}catch{}return null}function wn(Hi,Cn,wr){Hi.readyState===4&&Ti(Hi.status,Cn,Hi.responseURL,wr,EF(Hi),oWe(Hi)||Hi.response)}function yn(Hi,Cn,wr){sr(ht[lg](),2,26,"Failed to send telemetry.",{message:Cn}),ht._buffer&&ht._buffer[XF](Hi)}function Xn(Hi,Cn){for(var wr=[],Ao=[],ga=Cn.errors.reverse(),yi=0,as=ga;yi0&&ht[AY](Hi,Cn[Mle]),wr[Qs]>0&&ht[k2](wr,EF(null,["partial success",Cn[Mle],"of",Cn.itemsReceived].join(" "))),Ao[Qs]>0&&(qr(Ao),sr(ht[lg](),2,40,"Partial success. Delivered: "+Hi[Qs]+", Failed: "+wr[Qs]+". Will retry to send "+Ao[Qs]+" our of "+Cn[kle]+" items"))}function Rr(Hi,Cn){ht._buffer&&ht._buffer[XF](Hi)}function De(Hi){try{if(Hi){var Cn=Hi,wr=Cn.oriPayload;return wr&&wr[Qs]?wr:null}}catch{}return null}function bi(Hi,Cn){if(ye)return!1;if(!Hi)return Cn&&sr(Cn,1,7,"Cannot send empty telemetry"),!1;if(Hi.baseData&&!Hi[Ole])return Cn&&sr(Cn,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(Hi[Ole]||(Hi[Ole]="EventData"),!ht[UU])return Cn&&sr(Cn,1,28,"Sender was not initialized"),!1;if(Ut(Hi))Hi[Zq]=ht._sample[jU];else return Cn&&sr(Cn,2,33,"Telemetry item was sampled out and not sent",{SampleRate:ht._sample[jU]}),!1;return!0}function Ci(Hi,Cn){var wr=Hi.iKey||fe,Ao=i.constructEnvelope(Hi,wr,Cn,Re);if(!Ao){sr(Cn,1,47,"Unable to create an AppInsights envelope");return}var ga=!1;if(Hi[jm]&&Hi[jm][Xq]&&(_r(Hi[jm][Xq],function(yi){try{yi&&yi(Ao)===!1&&(ga=!0,Gv(Cn,"Telemetry processor check returns false"))}catch(as){sr(Cn,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+ol(as),{exception:Fr(as)},!0)}}),delete Hi[jm][Xq]),!ga)return Ao}function Mt(Hi){var Cn=rWe,wr=ht[lg]();try{var Ao=bi(Hi,wr),ga=null;Ao&&(ga=Ci(Hi,wr)),ga&&(Cn=m.serialize(ga))}catch{}return Cn}function wt(Hi){var Cn=rWe;return Hi&&Hi[Qs]&&(Cn="["+Hi.join(",")+"]"),Cn}function ti(Hi){var Cn=Bt();return{urlString:H,data:Hi,headers:Cn}}function Ut(Hi){return ht._sample.isSampledIn(Hi)}function vi(Hi,Cn,wr,Ao){Cn===200&&Hi?ht._onSuccess(Hi,Hi[Qs]):Ao&&ht[k2](Hi,Ao)}function Xt(Hi,Cn,wr,Ao){Ao===void 0&&(Ao=!0);var ga=function(Nc,xu,At){return vi(Cn,Nc,xu,At)},yi=$i(Cn),as=Hi&&Hi.sendPOST;return as&&yi&&(Ao&&ht._buffer[LU](Cn),pi.preparePayload(function(Nc){return as(Nc,ga,!wr)},gt,yi,!wr)),null}function $i(Hi){if(ea(Hi)&&Hi[Qs]>0){var Cn=ht[y1].batchPayloads(Hi),wr=Bt(),Ao={data:Cn,urlString:H,headers:wr,disableXhrSync:Et,disableFetchKeepAlive:!We,oriPayload:Hi};return Ao}return null}function Bt(){try{var Hi=C||{};return SU(H)&&(Hi[Vc[6]]=Vc[7]),Hi}catch{}return null}function Qt(Hi){var Cn=Hi?Hi[Qs]:0;return ht[y1].size()+Cn>K?((!R||R.isOnline())&&ht[zU](!0,null,10),!0):!1}function Ti(Hi,Cn,wr,Ao,ga,yi){var as=null;if(ht._appId||(as=Kq(yi),as&&as.appId&&(ht._appId=as.appId)),(Hi<200||Hi>=300)&&Hi!==0){if((Hi===301||Hi===307||Hi===308)&&!Ki(wr)){ht[k2](Cn,ga);return}if(R&&!R.isOnline()){if(!Ae){var Nc=10;qr(Cn,Nc),sr(ht[lg](),2,40,". Offline - Response Code: ".concat(Hi,". Offline status: ").concat(!R.isOnline(),". Will retry to send ").concat(Cn.length," items."))}return}!Ae&&jl(Hi)?(qr(Cn),sr(ht[lg](),2,40,". Response code "+Hi+". Will retry to send "+Cn[Qs]+" items.")):ht[k2](Cn,ga)}else Ki(wr),Hi===206?(as||(as=Kq(yi)),as&&!Ae?ht[Dle](Cn,as):ht[k2](Cn,ga)):(n=0,ht[AY](Cn,Ao))}function Ki(Hi){return g>=10?!1:!Gn(Hi)&&Hi!==""&&Hi!==H?(H=Hi,++g,!0):!1}function un(Hi,Cn){if(P)P(Hi,!1);else{var wr=pi&&pi[EY]([3],!0);return Xt(wr,Hi,Cn)}}function Sr(Hi,Cn,wr){var Ao=Hi,ga=Ao&&Ao.oriPayload;if(kt)st&&st(ga,!0),sr(ht[lg](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var yi=[],as=0;as0&&(st&&st(yi,!0),sr(ht[lg](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function lo(Hi){try{if(Hi&&Hi[Qs])return wo(Hi[0])}catch{}return null}function Wr(Hi,Cn){var wr=null;if(ea(Hi)){for(var Ao=Hi[Qs],ga=0;ga-1}function Dd(){var Hi="getNotifyMgr",Cn,wr=ht.core;return wr&&(wr[Hi]?Cn=wr[Hi]():Cn=wr._notificationManager),Cn}function Na(Hi,Cn){var wr=Dd();if(wr&&wr.eventsSendRequest)try{wr.eventsSendRequest(Hi,Cn)}catch(Ao){sr(ht[lg](),1,74,"send request notification failed: "+ol(Ao),{exception:Fr(Ao)})}}function xc(Hi,Cn){var wr=Cn.disableInstrumentationKeyValidation,Ao=Gn(wr)?!1:wr;if(Ao)return!0;var ga="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",yi=new RegExp(ga);return yi.test(Hi)}function gg(){ht[UU]=null,ht[y1]=null,ht._appId=null,ht._sample=null,C={},R=null,n=0,r=null,o=null,a=!1,c=null,m=null,g=0,w=0,P=null,z=null,H=null,j=null,K=0,ne=!1,Ie=null,ye=!1,fe=null,Re=v1,Ae=!1,Qe=null,Rt=v1,Et=!1,We=!1,kt=!1,bt=null,st=null,pi=null,Ya(ht,"_senderConfig",{g:function(){return Ase({},aWe)}})}}),e}return i.constructEnvelope=function(e,n,r,o){var a;n!==e.iKey&&!Gn(n)?a=om(om({},e),{iKey:n}):a=e;var c=i9t[a.baseType]||XIe;return c(r,a,o)},i})(p0);var tTe="duration",O2="properties";var qv="requestUrl",uA="length",iI="traceID",nI="spanID",Yv="traceFlags",$U="context",R2="aborted",DY="_addHook",b1="core",Ple="includeCorrelationHeaders",kY="getAbsoluteUrl",P2="headers",Sy="requestHeaders",Nle="setRequestHeader",iTe="trackDependencyDataInternal",N2="startTime",iL="toLowerCase",Fle="enableRequestHeaderTracking",nTe="enableAjaxErrorStatusText",rTe="enableAjaxPerfTracking",oTe="maxAjaxCallsPerView",aTe="excludeRequestFromAutoTrackingPatterns",Lle="disableAjaxTracking",sTe="ajaxPerfLookupDelay",lTe="disableFetchTracking",cTe="enableResponseHeaderTracking",Kv="status",pA="statusText",qU="headerMap",mA="requestSentTime",MY="getTraceId",OY="getTraceFlags",rI="method",RY="errorStatusText",Ble="stateChangeAttached",dTe="responseText",nL="responseFinishedTime",PY="CreateTrackItem",uTe="getAllResponseHeaders",NY="getPartAProps",YU="perfMark",FY="perfTiming",Vle="ajaxDiagnosticsMessage",LY="correlationContext",zle="ajaxTotalDuration",Ule="eventTraceCtx";function lWe(t,i,e){var n=0,r=t[i],o=t[e];return r&&o&&(n=Ih(r,o)),n}function rL(t,i,e,n,r){var o=0,a=lWe(e,n,r);return a&&(o=F2(t,i,jv(a))),o}function F2(t,i,e){var n="ajaxPerf",r=0;if(t&&i&&e){var o=t[n]=t[n]||{};o[i]=e,r=1}return r}function n9t(t,i){var e=t[FY],n=i[O2]||{},r=0,o="name",a="Start",c="End",m="domainLookup",g="connect",C="redirect",w="request",P="response",R="startTime",z=m+a,H=m+c,j=g+a,K=g+c,ne=w+a,me=w+c,Te=P+a,Ie=P+c,ye=C+a,fe=C=c,Re="transferSize",Ae="encodedBodySize",ke="decodedBodySize",Qe="serverTiming";if(e){r|=rL(n,C,e,ye,fe),r|=rL(n,m,e,z,H),r|=rL(n,g,e,j,K),r|=rL(n,w,e,ne,me),r|=rL(n,P,e,Te,Ie),r|=rL(n,"networkConnect",e,R,K),r|=rL(n,"sentRequest",e,ne,Ie);var we=e[tTe];we||(we=lWe(e,R,Ie)||0),r|=F2(n,tTe,we),r|=F2(n,"perfTotal",we);var Rt=e[Qe];if(Rt){var rt={};_r(Rt,function(Ze,Et){var We=wF(Ze[o]||""+Et),bt=rt[We]||{};ba(Ze,function(st,kt){(st!==o&&wo(kt)||s1(kt))&&(bt[st]&&(kt=bt[st]+";"+kt),(kt||!wo(kt))&&(bt[st]=kt))}),rt[We]=bt}),r|=F2(n,Qe,rt)}r|=F2(n,Re,e[Re]),r|=F2(n,Ae,e[Ae]),r|=F2(n,ke,e[ke])}else t[YU]&&(r|=F2(n,"missing",t.perfAttempts));r&&(i[O2]=n)}var r9t=(function(){function t(){var i=this;i.openDone=!1,i.setRequestHeaderDone=!1,i.sendDone=!1,i.abortDone=!1,i[Ble]=!1}return t})();var pTe=(function(){function t(i,e,n,r){var o=this,a=n,c="responseText";o[YU]=null,o.completed=!1,o.requestHeadersSize=null,o[Sy]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[zle]=null,o[R2]=0,o.pageUrl=null,o[qv]=null,o.requestSize=0,o[rI]=null,o[Kv]=null,o[mA]=null,o.responseStartedTime=null,o[nL]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new r9t,o.clientFailure=0,o[iI]=i,o[nI]=e,o[Yv]=r?.getTraceFlags(),r?o[Ule]={traceId:r[MY](),spanId:r.getSpanId(),traceFlags:r[OY]()}:o[Ule]=null,Ka(t,o,function(m){m.getAbsoluteUrl=function(){return m[qv]?bIe(m[qv]):null},m.getPathName=function(){return m[qv]?tA(a,CIe(m[rI],m[qv])):null},m[PY]=function(g,C,w){var P;if(m.ajaxTotalDuration=rse(Ih(m.requestSentTime,m.responseFinishedTime)*1e3)/1e3,m[zle]<0)return null;var R=(P={id:"|"+m[iI]+"."+m[nI],target:m[kY](),name:m.getPathName(),type:g,startTime:null,duration:m[zle],success:+m[Kv]>=200&&+m[Kv]<400,responseCode:+m[Kv]},P[O2]={HttpMethod:m[rI]},P),z=R[O2];if(m[R2]&&(z[R2]=!0),m[mA]&&(R[N2]=new Date,R[N2].setTime(m[mA])),n9t(m,R),C&&Qg(m.requestHeaders)[uA]>0&&(z[Sy]=m[Sy]),w){var H=w();if(H){var j=H[LY];if(j&&(R.correlationContext=j),H[qU]&&Qg(H.headerMap)[uA]>0&&(z.responseHeaders=H[qU]),m[RY])if(m[Kv]>=400){var K=H.type;(K===""||K==="text")&&(z.responseText=H.responseText?H[pA]+" - "+H[c]:H[pA]),K==="json"&&(z.responseText=H.response?H[pA]+" - "+JSON.stringify(H.response):H[pA])}else m[Kv]===0&&(z.responseText=H[pA]||"")}}return R},m[NY]=function(){var g=null,C=m[Ule];if(C&&(C.traceId||C.spanId)){g={};var w=g[t_.TraceExt]={traceID:C.traceId,parentID:C.spanId};Gn(C[Yv])||(w[Yv]=C[Yv])}return g}})}return t.__ieDyn=1,t})();var Ip,zY="diagLog",L2="_ajaxData",oL="fetch",BY="Failed to monitor XMLHttpRequest",fWe=", monitoring data for this ajax call ",KU=fWe+"may be incorrect.",cWe=fWe+"won't be sent.",dWe="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",uWe="Failed to add custom defined request context as configured call back may missing a null check.",pWe="Failed to calculate the duration of the ",mWe=0;function o9t(){var t=nm();return!t||Gn(t.Request)||Gn(t.Request[Xg])||Gn(t[oL])?null:t[oL]}function a9t(t,i){var e,n=!1;if(i2()){var r=XMLHttpRequest[Xg];n=!Gn(r)&&!Gn(r.open)&&!Gn(r.send)&&!Gn(r.abort)}var o=Pq();if(o&&o<9&&(n=!1),n)try{var a=new XMLHttpRequest,c={xh:[],i:(e={},e[i]={},e)};a[L2]=c;var m=XMLHttpRequest[Xg].open;XMLHttpRequest[Xg].open=m}catch(g){n=!1,UY(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Fr(g)})}return n}var QU=function(t,i){return t&&i&&t[L2]?(t[L2].i||{})[i]:null},s9t=function(t,i,e){if(t){var n=(t[L2]||{}).xh;n&&n.push({n:i,v:e})}},mTe=function(t,i){var e=!1;if(t){var n=(t[L2]||{}).xh;n&&_r(n,function(r){if(r.n===i)return e=!0,-1})}return e};function Gle(t,i){var e="";try{var n=QU(t,i);n&&n[qv]&&(e+="(url: '"+n[qv]+"')")}catch{}return e}function UY(t,i,e,n,r){sr(t[zY](),1,i,e,n,r)}function hA(t,i,e,n,r){sr(t[zY](),2,i,e,n,r)}function VY(t,i,e){return function(n){var r;UY(t,i,e,(r={},r[Vle]=Gle(n.inst,t._ajaxDataId),r.exception=Fr(n.err),r))}}function WU(t,i){return t&&i?Fu(t,i):-1}function hWe(t,i,e){var n={id:i,fn:e};return t.push(n),{remove:function(){_r(t,function(r,o){if(r.id===n.id)return t.splice(o,1),-1})}}}function gWe(t,i,e,n){var r=!0;return _r(i,function(o,a){try{o.fn.call(null,e)===!1&&(r=!1)}catch(c){sr(t&&t.logger,1,64,"Dependency "+n+" [#"+a+"] failed: "+ol(c),{exception:Fr(c)},!0)}}),r}function l9t(t,i,e,n,r,o){var a=t[uA],c=!0;if(a>0){var m={core:i,xhr:n,input:r,init:o,traceId:e[iI],spanId:e[nI],traceFlags:e[Yv],context:e[$U]||{},aborted:!!e[R2]};c=gWe(i,t,m,"listener"),e[iI]=m.traceId,e[nI]=m.spanId,e[Yv]=m[Yv],e[$U]=m[$U]}return c}var Hle="*.blob.core.",_We=Zg([Hle+"windows.net",Hle+"chinacloudapi.cn",Hle+"cloudapi.de",Hle+"usgovcloudapi.net"]),c9t=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],d9t=Zg((Ip={},Ip[oTe]=500,Ip[Lle]=!1,Ip[lTe]=!1,Ip[aTe]=void 0,Ip.disableCorrelationHeaders=!1,Ip.distributedTracingMode=1,Ip.correlationHeaderExcludedDomains=_We,Ip.correlationHeaderDomains=void 0,Ip.correlationHeaderExcludePatterns=void 0,Ip.appId=void 0,Ip.enableCorsCorrelation=!1,Ip[Fle]=!1,Ip[cTe]=!1,Ip[nTe]=!1,Ip[rTe]=!1,Ip.maxAjaxPerfLookupAttempts=3,Ip[sTe]=25,Ip.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],Ip.addRequestContext=void 0,Ip.addIntEndpoints=!0,Ip)),hTe=(function(t){lf(i,t);function i(){var e=t.call(this)||this;e.identifier=i.identifier,e.priority=120;var n,r,o,a,c,m,g,C,w,P,R,z,H,j,K,ne,me,Te,Ie,ye,fe,Re,Ae,ke,Qe,we,Rt,rt,Ze,Et;return Ka(i,e,function(We,bt){var st=bt[DY];kt(),We.initialize=function(Bt,Qt,Ti,Ki){We.isInitialized()||(bt.initialize(Bt,Qt,Ti,Ki),ye=m0(wp("ajax"),Qt&&Qt.evtNamespace&&Qt.evtNamespace()),pi(Bt),ui(),ht(),Kt())},We._doTeardown=function(){kt()},We.trackDependencyData=function(Bt,Qt){$i(ke,We[b1],null,Bt,Qt)},We[Ple]=function(Bt,Qt,Ti,Ki){var un=We._currentWindowHost||o;if(l9t(Ae,We[b1],Bt,Ki,Qt,Ti)){if(Qt||Qt===""){if(ale(a,Bt[kY](),un)){Ti||(Ti={});var Sr=new Headers(Ti[P2]||(Qt instanceof Request?Qt[P2]||{}:{}));if(P){var lo="|"+Bt[iI]+"."+Bt[nI];Sr.set(Vc[3],lo),c&&(Bt[Sy][Vc[3]]=lo)}var Wr=Ze||C&&C.appId();if(Wr&&(Sr.set(Vc[0],Vc[2]+Wr),c&&(Bt[Sy][Vc[0]]=Vc[2]+Wr)),w){var qr=Bt[Yv];Gn(qr)&&(qr=1);var Eo=qq($q(Bt[iI],Bt[nI],qr));Sr.set(Vc[4],Eo),c&&(Bt[Sy][Vc[4]]=Eo)}Ti[P2]=Sr}return Ti}else if(Ki){if(ale(a,Bt[kY](),un)){if(P)if(mTe(Ki,Vc[3]))hA(We,71,"Unable to set ["+Vc[3]+"] as it has already been set by another instance");else{var lo="|"+Bt[iI]+"."+Bt[nI];Ki[Nle](Vc[3],lo),c&&(Bt[Sy][Vc[3]]=lo)}var Wr=Ze||C&&C.appId();if(Wr&&(mTe(Ki,Vc[0])?hA(We,71,"Unable to set ["+Vc[0]+"] as it has already been set by another instance"):(Ki[Nle](Vc[0],Vc[2]+Wr),c&&(Bt[Sy][Vc[0]]=Vc[2]+Wr))),w){var qr=Bt[Yv];if(Gn(qr)&&(qr=1),mTe(Ki,Vc[4]))hA(We,71,"Unable to set ["+Vc[4]+"] as it has already been set by another instance");else{var Eo=qq($q(Bt[iI],Bt[nI],qr));Ki[Nle](Vc[4],Eo),c&&(Bt[Sy][Vc[4]]=Eo)}}}return Ki}}},We[iTe]=function(Bt,Qt,Ti){if(H===-1||g=0;Dd--){var Na=jl[Dd];if(Na){if(Na.entryType==="resource")Na.initiatorType===Bt&&(WU(Na.name,qr)!==-1||WU(qr,Na.name)!==-1)&&(vl=Na);else if(Na.entryType==="mark"&&Na.name===un.name){Qt[FY]=vl;break}if(Na[N2]=lo||Qt.async===!1?(un&&oo(Sr.clearMarks)&&Sr.clearMarks(un.name),Qt.perfAttempts=Eo,Ti()):rm(os,Wr)}catch(xc){Ki(xc)}})()}function ti(Bt,Qt){var Ti,Ki=yn(),un=Ki&&Ki[MY]()||u0(),Sr=c1(u0(),0,16),lo=new pTe(un,Sr,We[zY](),(Ti=We.core)===null||Ti===void 0?void 0:Ti.getTraceCtx());lo[Yv]=Ki&&Ki[OY](),lo[mA]=wU(),lo[RY]=m;var Wr;if(Bt instanceof Request?Wr=(Bt||{}).url||"":Wr=Bt,Wr===""){var qr=wh();qr&&qr.href&&(Wr=BSe(qr.href,"#")[0])}lo[qv]=Wr;var Eo="GET";Qt&&Qt[rI]?Eo=Qt[rI]:Bt&&Bt instanceof Request&&(Eo=Bt[rI]),lo[rI]=Eo;var os={};if(c){var vl=new Headers((Qt?Qt[P2]:0)||(Bt instanceof Request?Bt[P2]||{}:{}));vl.forEach(function(jl,Dd){gt(Dd)&&(os[Dd]=jl)})}return lo[Sy]=os,Mt(oL,lo),lo}function Ut(Bt){var Qt="";try{Gn(Bt)||(typeof Bt=="string"?Qt+="(url: '".concat(Bt,"')"):Qt+="(url: '".concat(Bt.url,"')"))}catch(Ti){UY(We,15,"Failed to grab failed fetch diagnostics message",{exception:Fr(Ti)})}return Qt}function vi(Bt,Qt,Ti,Ki,un,Sr,lo){if(!un)return;function Wr(qr,Eo,os){var vl=os||{};vl.fetchDiagnosticsMessage=Ut(Ti),Eo&&(vl.exception=Fr(Eo)),hA(We,qr,pWe+"fetch call"+cWe,vl)}un[nL]=wU(),un[Kv]=Qt,wt(oL,un,function(){var qr=un[PY]("Fetch",c,Sr),Eo;try{Ie&&(Eo=Ie({status:Qt,request:Ti,response:Ki}))}catch{hA(We,104,uWe)}if(qr){Eo!==void 0&&(qr[O2]=om(om({},qr.properties),Eo));var os=un[NY]();$i(ke,We[b1],un,qr,null,os)}else Wr(14,null,{requestSentTime:un[mA],responseFinishedTime:un[nL]})},function(qr){Wr(18,qr,null)})}function Xt(Bt){if(Bt&&Bt[P2])try{var Qt=Bt[P2].get(Vc[0]);return sle(Qt)}catch(Ti){hA(We,18,dWe,{fetchDiagnosticsMessage:Ut(Bt),exception:Fr(Ti)})}}function $i(Bt,Qt,Ti,Ki,un,Sr){var lo=!0,Wr=Bt[uA];if(Wr>0){var qr={item:Ki,properties:un,sysProperties:Sr,context:Ti?Ti[$U]:null,aborted:Ti?!!Ti[R2]:!1};lo=gWe(Qt,Bt,qr,"initializer")}lo&&We[iTe](Ki,un,Sr)}}),e}return i.prototype.processTelemetry=function(e,n){this.processNext(e,n)},i.prototype.addDependencyInitializer=function(e){return null},i.identifier="AjaxDependencyPlugin",i})(p0);var yWe=(function(){function t(){}return t})();var vWe=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})();var u9t="3.3.9",bWe=(function(){function t(i,e){var n=this,r=Gl(i,function(){var o=i.sdkExtension;n.sdkVersion=(o?o+"_":"")+"javascript:"+u9t});e&&e.add(r)}return t})();var CWe=(function(){function t(){}return t})();var ZU="session",XU="sessionManager",JU="isUserCookieSet",e6="isNewUser",jle="getTraceCtx",HY="telemetryTrace",$le="applySessionContext",qle="applyApplicationContext",Yle="applyOperationContext",Kle="applyOperatingSystemContxt",Wle="applyLocationContext",Qle="applyInternalContext",t6="getSessionId",Zle="sessionCookiePostfix",fA="automaticSession",B2="accountId",V2="authenticatedId",i6="acquisitionDate",GY="renewalDate",n6="cookieSeparator",Xle="authUserCookieName";var p9t="ai_session",m9t=864e5,h9t=18e5,f9t=6e4,fTe=(function(){function t(){}return t})();var xWe=(function(){function t(i,e,n){var r=this,o,a,c=d0(e),m=RF(e),g,C;Ka(t,r,function(w){i||(i={});var P=Gl(i,function(ne){g=i.sessionExpirationMs||m9t,C=i.sessionRenewalMs||h9t;var me=i[Zle]||i.namePrefix||"";o=p9t+me});n&&n.add(P),w[fA]=new fTe,w.update=function(){var ne=Lm(),me=!1,Te=w[fA];if(Te.id||(me=!R(Te,ne)),!me&&g>0){var Ie=ne-Te[i6],ye=ne-Te[GY];me=Ie<0||ye<0,me=me||Ie>g,me=me||ye>C}me?H(ne):(!a||ne-a>f9t)&&j(Te,ne)},w.backup=function(){var ne=w[fA];K(ne.id,ne[i6],ne[GY])};function R(ne,me){var Te=!1,Ie=m.get(o);if(Ie&&oo(Ie.split))Te=z(ne,Ie);else{var ye=aY(c,o);ye&&(Te=z(ne,ye))}return Te||!!ne.id}function z(ne,me){var Te=!1,Ie=", session will be reset",ye=me.split("|");if(ye.length>=2)try{var fe=+ye[1]||0,Re=+ye[2]||0;isNaN(fe)||fe<=0?sr(c,2,27,"AI session acquisition date is 0"+Ie):isNaN(Re)||Re<=0?sr(c,2,27,"AI session renewal date is 0"+Ie):ye[0]&&(ne.id=ye[0],ne[i6]=fe,ne[GY]=Re,Te=!0)}catch(Ae){sr(c,1,9,"Error parsing ai_session value ["+(me||"")+"]"+Ie+" - "+ol(Ae),{exception:Fr(Ae)})}return Te}function H(ne){var me=i.getNewId||kF;w[fA].id=me(i.idLength||22),w[fA][i6]=ne,j(w[fA],ne),$F()||sr(c,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function j(ne,me){var Te=ne[i6];ne[GY]=me;var Ie=C,ye=Te+g-me,fe=[ne.id,Te,me],Re=0;ye0?Re:null,Ae),a=me}function K(ne,me,Te){sY(c,o,[ne,me,Te].join("|"))}})}return t.__ieDyn=1,t})();var SWe=(function(){function t(i,e,n,r){var o=this;o.traceID=i||u0(),o.parentID=e;var a=wh();!n&&a&&a.pathname&&(n=a.pathname),o.name=yc(r,n)}return t})();function wWe(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var IWe=(function(){function t(i,e,n){this.isNewUser=!1,this.isUserCookieSet=!1;var r=d0(e),o=RF(e),a;Ka(t,this,function(c){Ya(c,"config",{g:function(){return i}});var m=Gl(i,function(){var P=i.userCookiePostfix||"";a=t.userCookieName+P;var R=o.get(a);if(R){c[e6]=!1;var z=R.split(t[n6]);z.length>0&&(c.id=z[0],c[JU]=!!c.id)}if(!c.id){c.id=g();var H=C(c.id);w(H.join(t[n6]));var j=(i.namePrefix||"")+"ai_session";TIe(r,j)}c[B2]=i[B2]||void 0;var K=o.get(t[Xle]);if(K){K=decodeURI(K);var ne=K.split(t[n6]);ne[0]&&(c[V2]=ne[0]),ne.length>1&&ne[1]&&(c[B2]=ne[1])}});n&&n.add(m);function g(){var P=i||{},R=P.getNewId||kF,z=R(P.idLength?i.idLength:22);return z}function C(P){var R=gC(new Date);c.accountAcquisitionDate=R,c[e6]=!0;var z=[P,R];return z}function w(P){var R=31536e3;c[JU]=o.set(a,P,R)}c.setAuthenticatedUserContext=function(P,R,z){z===void 0&&(z=!1);var H=!wWe(P)||R&&!wWe(R);if(H){sr(r,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}c[V2]=P;var j=c[V2];R&&(c[B2]=R,j=[c[V2],c.accountId].join(t[n6])),z&&o.set(t[Xle],encodeURI(j))},c.clearAuthenticatedUserContext=function(){c[V2]=null,c[B2]=null,o.del(t[Xle])},c.update=function(P){if(c.id!==P||!c[JU]){var R=P||g(),z=C(R);w(z.join(t[n6]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})();var Jle="ext",ece="tags";function r6(t,i){t&&t[i]&&Qg(t[i]).length===0&&delete t[i]}function TWe(){return null}var EWe=(function(){function t(i,e,n,r){var o=this,a=i.logger;Ka(t,this,function(c){if(c.appId=TWe,c[t6]=TWe,c.application=new yWe,c.internal=new bWe(e,r),WM()){c[XU]=new xWe(e,i,r),c.device=new vWe,c.location=new CWe,c.user=new IWe(e,i,r);var m=void 0,g=void 0,C;n&&(m=n.getTraceId(),g=n.getSpanId(),C=n.getName()),c[HY]=new SWe(m,g,C,a),c[ZU]=new fTe}c[t6]=function(){var w=c[ZU],P=null;if(w&&wo(w.id))P=w.id;else{var R=(c[XU]||{})[fA];P=R&&wo(R.id)?R.id:null}return P},c[$le]=function(w,P){Zc(Sh(w.ext,t_.AppExt),"sesId",c[t6](),wo)},c[Kle]=function(w,P){Zc(w.ext,t_.OSExt,c.os)},c[qle]=function(w,P){var R=c.application;if(R){var z=Sh(w,ece);Zc(z,pd.applicationVersion,R.ver,wo),Zc(z,pd.applicationBuild,R.build,wo)}},c.applyDeviceContext=function(w,P){var R=c.device;if(R){var z=Sh(Sh(w,Jle),t_.DeviceExt);Zc(z,"localId",R.id,wo),Zc(z,"ip",R.ip,wo),Zc(z,"model",R.model,wo),Zc(z,"deviceClass",R.deviceClass,wo)}},c[Qle]=function(w,P){var R=c.internal;if(R){var z=Sh(w,ece);Zc(z,pd.internalAgentVersion,R.agentVersion,wo),Zc(z,pd.internalSdkVersion,yc(a,R.sdkVersion,64),wo),(w.baseType===ZE.dataType||w.baseType===by.dataType)&&(Zc(z,pd.internalSnippet,R.snippetVer,wo),Zc(z,pd.internalSdkSrc,R.sdkSrc,wo))}},c[Wle]=function(w,P){var R=o.location;R&&Zc(Sh(w,ece,[]),pd.locationIp,R.ip,wo)},c[Yle]=function(w,P){var R=c[HY];if(R){var z=Sh(Sh(w,Jle),t_.TraceExt,{traceID:void 0,parentID:void 0});Zc(z,"traceID",R.traceID,wo,Gn),Zc(z,"name",R.name,wo,Gn),Zc(z,"parentID",R.parentID,wo,Gn)}},c.applyWebContext=function(w,P){var R=o.web;R&&Zc(Sh(w,Jle),t_.WebExt,R)},c.applyUserContext=function(w,P){var R=c.user;if(R){var z=Sh(w,ece,[]);Zc(z,pd.userAccountId,R[B2],wo);var H=Sh(Sh(w,Jle),t_.UserExt);Zc(H,"id",R.id,wo),Zc(H,"authId",R[V2],wo)}},c.cleanUp=function(w,P){var R=w.ext;R&&(r6(R,t_.DeviceExt),r6(R,t_.UserExt),r6(R,t_.WebExt),r6(R,t_.OSExt),r6(R,t_.AppExt),r6(R,t_.TraceExt))}})}return t.__ieDyn=1,t})();var z2,gTe,o6=null,g9t=fy((z2={accountId:o6,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:o6,sdkExtension:o6,isBrowserLinkTrackingEnabled:!1,appId:o6},z2[t6]=o6,z2.namePrefix=gTe,z2[Zle]=gTe,z2.userCookiePostfix=gTe,z2.idLength=22,z2.getNewId=o6,z2)),_9t=(function(t){lf(i,t);function i(){var e=t.call(this)||this;e.priority=110,e.identifier=eI;var n,r,o,a,c;return Ka(i,e,function(m,g){C(),Ya(m,"context",{g:function(){return a}}),m.initialize=function(R,z,H,j){g.initialize(R,z,H,j),w(R)},m.processTelemetry=function(R,z){if(!Gn(R)){z=m._getTelCtx(z),R.name===by.envelopeType&&z.diagLog().resetInternalMessageCount();var H=a||{};H[ZU]&&typeof a[ZU].id!="string"&&H[XU]&&H[XU].update();var j=H.user;if(j&&!j[JU]&&j.update(H.user.id),P(R,z),j&&j[e6]&&(j[e6]=!1,!c)){var K=new ZE(72,(ag()||{}).userAgent||"");Bwe(z.diagLog(),1,K)}m.processNext(R,z)}},m._doTeardown=function(R,z){var H=(R||{}).core();if(H&&H[jle]){var j=H[jle](!1);j===r&&H.setTraceCtx(o)}C()};function C(){n=null,r=null,o=null,a=null,c=!0}function w(R){var z=m.identifier,H=m.core;m._addHook(Gl(R,function(){var j=Hm(null,R,H);R.storagePrefix&&jF(R.storagePrefix),c=R.disableUserInitMessage!==!1,n=j.getExtCfg(z,g9t),m._extConfig=n})),o=H[jle](!1),a=new EWe(H,n,o,m._unloadHooks),r=GF(m.context[HY],o),H.setTraceCtx(r),m.context.appId=function(){var j=H.getPlugin(ple);return j?j.plugin._appId:null}}function P(R,z){Sh(R,"tags",[]),Sh(R,"ext",{});var H=m.context;H[$le](R,z),H[qle](R,z),H.applyDeviceContext(R,z),H[Yle](R,z),H.applyUserContext(R,z),H[Kle](R,z),H.applyWebContext(R,z),H[Wle](R,z),H[Qle](R,z),H.cleanUp(R,z)}}),e}return i.__ieDyn=1,i})(p0),_Te=_9t;var AWe="AuthenticatedUserContext",a6="track";var tce="snippet",DWe="getCookieMgr",kWe="startTrackPage",MWe="stopTrackPage",ice="flush",OWe="startTrackEvent",RWe="stopTrackEvent",yTe="addTelemetryInitializer",rir=yTe+"s",vTe="pollInternalLogs",nce="getPlugin",rce="evtNamespace",PWe=a6+"Event",NWe=a6+"Trace",FWe=a6+"Metric",LWe=a6+"PageView",BWe=a6+"Exception",VWe=a6+"DependencyData",zWe="set"+AWe,UWe="clear"+AWe,HWe="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json";var jY="connectionString",oce="version",U2="queue",s6="instrumentationKey",aL="userOverrideEndpointUrl",ace="endpointUrl",l6="onunloadFlush",Wv="context",bTe="addHousekeepingBeforeUnload",sce="sendMessage",GWe="updateSnippetDefinitions";var oI,c6,d6,CTe,$Y,jWe=[tce,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],qWe="iKeyUsage",YWe="CdnUsage",KWe="SdkLoaderVer",y9t="zipPayload",lce=void 0,v9t={samplingRate:100,maxSendNumber:1},b9t={monthInterval:3,daysOfMonth:[28]},cce={disabled:!0,limit:c0(v9t),interval:c0(b9t)},C9t=(oI={},oI[jY]=lce,oI.endpointUrl=lce,oI[s6]=lce,oI[aL]=lce,oI.diagnosticLogInterval=r2(x9t,1e4),oI.featureOptIn=(c6={},c6[qWe]={mode:3},c6[YWe]={mode:2},c6[KWe]={mode:2},c6[y9t]={mode:1},c6),oI.throttleMgrCfg=c0((d6={},d6[109]=c0(cce),d6[106]=c0(cce),d6[111]=c0(cce),d6[110]=c0(cce),d6)),oI.extensionConfig=c0((CTe={},CTe.AppInsightsCfgSyncPlugin=c0({cfgUrl:HWe,syncMode:2}),CTe)),oI);function x9t(t){return t&&t>0}function $We(t,i){return lU(function(e,n){Ch(i,function(r){var o=r&&r.value,a=null;!r.rejected&&o&&(t[jY]=o,a=cle(o)),e(a)})})}var xTe=(function(){function t(i){var e=this,n,r,o,a,c,m,g,C,w,P,R,z,H,j;Ka(t,this,function(K){Te(),Ya(K,"config",{g:function(){return C}}),_r(["pluginVersionStringArr","pluginVersionString"],function(fe){Ya(K,fe,{g:function(){return g?g[fe]:null}})}),a=""+(i.sv||i[oce]||""),i[U2]=i[U2]||[],i[oce]=i[oce]||2;var ne=Um(i.config||{},C9t);C=ne.cfg,w=new Sle,Ya(K,"appInsights",{g:function(){return w}}),r=new _Te,n=new hTe,o=new eTe,g=new iIe,Ya(K,"core",{g:function(){return g}}),ye(Gl(ne,function(){var fe=C[jY];if(Pv(fe)){var Re=lU(function(we,Rt){Ch($We(C,fe),function(rt){if(rt.rejected)we(null);else{var Ze=C[s6],Et=rt.value;Ze=Et&&Et.instrumentationkey||Ze,we(Ze)}})}),Ae=C[aL];Gn(Ae)&&(Ae=lU(function(we,Rt){Ch($We(C,fe),function(rt){if(rt.rejected)we(null);else{var Ze=C[ace],Et=rt.value,We=Et&&Et.ingestionendpoint;Ze=We?We+Qw:Ze,we(Ze)}})})),C[s6]=Re,C[ace]=Ae}if(wo(fe)&&fe){var ke=cle(fe),Qe=ke.ingestionendpoint;C.endpointUrl=C[aL]?C[aL]:Qe+Qw,C[s6]=ke.instrumentationkey||C[s6]}C.endpointUrl=C[aL]?C[aL]:C[ace]})),K[tce]=i,K[ice]=function(fe,Re){fe===void 0&&(fe=!0);var Ae;return s2(g,function(){return"AISKU.flush"},function(){fe&&!Re&&(Ae=Uv(function(we){Re=we}));var ke=1,Qe=function(){ke--,ke===0&&Re()};_r(g.getChannels(),function(we){we&&(ke++,we[ice](fe,Qe))}),Qe()},null,fe),Ae},K[l6]=function(fe){fe===void 0&&(fe=!0),_r(g.getChannels(),function(Re){Re[l6]?Re[l6]():Re[ice](fe)})},K.loadAppInsights=function(fe,Re,Ae){fe===void 0&&(fe=!1),fe&&yqe("Legacy Mode is no longer supported");function ke(Qe){if(Qe){var we="";Gn(a)||(we+=a),K[Wv]&&K[Wv].internal&&(K[Wv].internal.snippetVer=we||"-"),ba(K,function(Rt,rt){wo(Rt)&&!oo(rt)&&Rt&&Rt[0]!=="_"&&Ed(jWe,Rt)===-1&&Qe[Rt]!==rt&&(Qe[Rt]=rt)})}}return s2(K.core,function(){return"AISKU.loadAppInsights"},function(){g.initialize(C,[o,r,n,w,P],Re,Ae),Ya(K,"context",{g:function(){return r[Wv]}}),R||(R=new EIe(g));var Qe=S9t();Qe&&K[Wv]&&(K[Wv].internal.sdkSrc=Qe),ke(K[tce]),K.emptyQueue(),K[vTe](),K[bTe](K),ye(Gl(ne,function(){var we=!1;C.throttleMgrCfg[109]&&(we=!C.throttleMgrCfg[109].disabled),!R.isReady()&&C.extensionConfig&&C.extensionConfig[P.identifier]&&we&&R.onReadyState(!0),!z&&!C[jY]&&TF(qWe,C,!0)&&(R[sce](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),z=!0),!H&&K[Wv].internal.sdkSrc&&K[Wv].internal.sdkSrc.indexOf("az416426")!=-1&&TF(YWe,C,!0)&&(R[sce](110,"See Cdn support notice at aka.ms/JsActiveCdn"),H=!0),!j&&parseInt(a)<6&&TF(KWe,C,!0)&&(R[sce](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),j=!0)}))}),K},K[GWe]=function(fe){fwe(fe,K,function(Re){return Re&&Ed(jWe,Re)===-1})},K.emptyQueue=function(){try{if(ea(K.snippet[U2])){for(var fe=K.snippet[U2].length,Re=0;Re{class t extends b5{_environmentService;_router;_applicationInsightsInstance;name="BdUserApplicationInsightsTrackingService";constructor(e,n){super(),this._environmentService=e,this._router=n}init(e){let n=this._environmentService.load("BD_APPLICATION_INSIGHTS_KEY"),r=new DKe;this._applicationInsightsInstance=new xTe({config:{instrumentationKey:n,extensions:[r],extensionConfig:{[r.identifier]:{router:this._router}}}}),this._applicationInsightsInstance.loadAppInsights(),e&&this._applicationInsightsInstance.setAuthenticatedUserContext(e.localAccountId),this.isEnabled=!0}destroy(){this._applicationInsightsInstance&&(this._applicationInsightsInstance.unload(),this._applicationInsightsInstance=null),this.isEnabled=!1}addAuthenticatedUserContext(e){this._applicationInsightsInstance&&e&&this._applicationInsightsInstance.setAuthenticatedUserContext(e.localAccountId)}removeAuthenticatedUserContext(){this._applicationInsightsInstance&&this._applicationInsightsInstance.clearAuthenticatedUserContext()}trackException(e,n){this._applicationInsightsInstance&&this._applicationInsightsInstance.trackException({exception:e},n)}trackEvent(e,n){this._applicationInsightsInstance&&this._applicationInsightsInstance.trackEvent({name:e},n)}static \u0275fac=function(n){return new(n||t)(ai(xr),ai(Ws))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p6=class{_locale;filename;constructor(i,e){this._locale=i,this.filename=e}static _instanceOfNumberFormatOptions(i){return i?"localeMatcher"in i||"style"in i||"currency"in i||"currencyDisplay"in i||"currencySign"in i||"useGrouping"in i||"minimumIntegerDigits"in i||"minimumFractionDigits"in i||"maximumFractionDigits"in i||"minimumSignificantDigits"in i||"maximumSignificantDigits"in i:!1}static _instanceOfDateTimeFormatOptions(i){return i?"localeMatcher"in i||"weekday"in i||"era"in i||"year"in i||"month"in i||"day"in i||"hour"in i||"minute"in i||"second"in i||"timeZoneName"in i||"formatMatcher"in i||"hour12"in i||"timeZone"in i:!1}};var WWe=mp(TTe());var dce=class t extends p6{_exportData;constructor(i,e,n){super(e,`${n}.csv`),this._exportData=i}_defaultConfig={quotes:!1,quoteChar:'"',delimiter:";",header:!0,newline:`\r `};process(){return _t(this,null,function*(){let i={},e=yield this._exportData;try{let n=(0,WWe.unparse)({data:this._getData(e.data),fields:e.fields},this._defaultConfig);i.result=new Blob(["\uFEFF"+n],{type:"text/csv;charset=utf-8"})}catch(n){i.errors=[n instanceof Error?n.message:"Unknown error"]}return Promise.resolve(i)})}_getData(i){return i.map(e=>e.map(n=>this._itemToString(n)))}_itemToString(i){if(!i.value)return"";if(i.type==="boolean")return i.value?"ja":"nein";if(i.type==="number"){let e=t._instanceOfNumberFormatOptions(i.format)?i.format:z$;return Ru.format(i.value,e,[this._locale])}if(i.type==="Date"){let e=t._instanceOfDateTimeFormatOptions(i.format)?i.format:void 0;return Intl.DateTimeFormat(this._locale,e).format(i.value)}return i.value.toString()}};var fQe=mp(ZWe(),1),gQe=mp(dq(),1);function qY(t){if(!t)throw new Error("`contentType` is required");var i=t.toLowerCase().replace(/.*\//,"");if(!i)throw new Error("Unsupported `contentType`: "+t);return i}function YY(t,i){var e=i.sheetId,n=i.sheetImages;return"sheet".concat(e,"-image").concat(n.indexOf(t)+1,".").concat(qY(t.contentType))}function KY(t,i){var e=i.attribute;return t=t.replace(w9t,"&").replace(I9t,">").replace(T9t,"<"),e&&(t=t.replace(E9t,"'").replace(A9t,""")),t}var w9t=/&/g,I9t=/>/g,T9t=/1&&arguments[1]!==void 0?arguments[1]:{},e=i.removeDiscouragedCharacters,n=e===void 0?!0:e;return t=t.replace(D9t,""),n&&(t=t.replace(k9t,"")),t}function $m(t){return KY(WY(t),{attribute:!0})}function ATe(t){var i=t.sheets,e=t.stickyRowsCount,n=t.stickyColumnsCount;return''+(e||n?"":"")+""+i.map(function(r){var o=r.id,a=r.name;return'')}).join("")+""}function DTe(t){var i=t.sheets;return''+i.map(function(e){var n=e.id;return'')}).join("")+'')+'')+""}var XWe='';function kTe(t,i){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=M9t(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 M9t(t,i){if(t){if(typeof t=="string")return JWe(t,i);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)?JWe(t,i):void 0}}function JWe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e'+i.map(function(n){var r=n.id;return'')}).join("")+i.map(function(n){var r=n.id,o=n.images;return o?''):""}).join("")+''+O9t(e).map(function(n){var r=n.fileExtension,o=n.contentType;return'')}).join("")+""}function O9t(t){if(!t)return[];var i=[],e=function(R){var z=qY(R.contentType),H=i.find(function(j){return j.fileExtension===z});H||i.push({fileExtension:z,contentType:R.contentType})};if(Array.isArray(t[0]))for(var n=kTe(t),r;!(r=n()).done;)for(var o=r.value,a=kTe(o),c;!(c=a()).done;){var m=c.value;e(m)}else for(var g=kTe(t),C;!(C=g()).done;){var w=C.value;e(w)}return i}function R9t(t,i){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=P9t(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 P9t(t,i){if(t){if(typeof t=="string")return eQe(t,i);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)?eQe(t,i):void 0}}function eQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e',n=0,r=function(){var m=a.value,g=n+1,C=function(P){return F9t(P,m.dpi)};e+="",e+="",e+="".concat(m.anchor.column-1,""),e+="".concat(typeof m.offsetX=="number"?C(m.offsetX):0,""),e+="".concat(m.anchor.row-1,""),e+="".concat(typeof m.offsetY=="number"?C(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+="",n++},o=R9t(i),a;!(a=o()).done;)r();return e+="",e}var tQe=96,N9t=96;function F9t(t,i){var e=tQe;return Math.round(t*9525*(tQe/e)*(N9t/i))}function RTe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.images,e=i===void 0?[]:i,n=t.sheetId;return''+e.map(function(r,o){return'')}).join("")+""}function PTe(t){var i=t.id,e=t.images;return''+(e?''):"")+""}function QY(t){return KY(WY(t),{attribute:!1})}function L9t(t,i){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=B9t(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 B9t(t,i){if(t){if(typeof t=="string")return iQe(t,i);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)?iQe(t,i):void 0}}function iQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e"),i+=QY(r),i+=""}return i+="",i}var FTe=100;function LTe(t){var i=t.fontFamily,e=t.fontSize,n=!!(i||e);i===void 0&&(i="Calibri"),e===void 0&&(e=12);var r=[],o={},a=[],c={},m=[],g={},C=[],w={},P=[],R={};m.push({size:e,family:i,custom:n}),g["-:-"]=0,C.push({}),w["-"]=0,P.push({left:{},right:{},top:{},bottom:{}}),R["-:-/-:-/-:-/-:-"]=0,C.push({gray125:!0});function z(H,j){var K=H.align,ne=H.alignVertical,me=H.textRotation,Te=H.indent,Ie=H.wrap,ye=H.fontFamily,fe=H.fontSize,Re=H.fontWeight,Ae=H.fontStyle,ke=H.color,Qe=H.backgroundColor,we=H.borderColor,Rt=H.borderStyle,rt=H.leftBorderColor,Ze=H.leftBorderStyle,Et=H.rightBorderColor,We=H.rightBorderStyle,bt=H.topBorderColor,st=H.topBorderStyle,kt=H.bottomBorderColor,pi=H.bottomBorderStyle,Kt=j.format,gt=void 0,ht="".concat(ye||"-",":").concat(fe||"-",":").concat(Re||"-",":").concat(Ae||"-",":").concat(ke||"-"),li=Qe||"-",ui="".concat(bt||we||"-",":").concat(st||Rt||"-")+"/"+"".concat(Et||we||"-",":").concat(We||Rt||"-")+"/"+"".concat(kt||we||"-",":").concat(pi||Rt||"-")+"/"+"".concat(rt||we||"-",":").concat(Ze||Rt||"-"),Bi="".concat(K||"-","/").concat(ne||"-","/").concat(me||"-","/").concat(Te||"-","/").concat(Ie||"-","/").concat(Kt||"-","/").concat(ht,"/").concat(li,"/").concat(ui),wn=c[Bi];if(wn!==void 0)return wn;var yn;Kt&&(yn=o[Kt],yn===void 0&&(yn=o[Kt]=String(FTe+r.length),r.push(Kt)));var Xn=n?0:void 0;(ye||fe||Re||Ae||ke)&&(Xn=g[ht],Xn===void 0&&(Xn=g[ht]=String(m.length),m.push({custom:!0,size:fe||e,family:ye||i,weight:Re,style:Ae,color:ke})));var Rr;Qe&&(Rr=w[li],Rr===void 0&&(Rr=w[li]=String(C.length),C.push({color:Qe})));var De;return(we||Rt||rt||Ze||Et||We||bt||st||kt||pi)&&(De=R[ui],De===void 0&&(De=R[ui]=String(P.length),P.push({left:{style:Ze||Rt,color:rt||we},right:{style:We||Rt,color:Et||we},top:{style:st||Rt,color:bt||we},bottom:{style:pi||Rt,color:kt||we}}))),a.push({fontId:Xn,fillId:Rr,borderId:De,align:K,alignVertical:ne,textRotation:me,indent:Te,wrap:Ie,formatId:yn}),c[Bi]=String(a.length-1)}return z({},{}),{getStyles:function(){return{formats:r,styles:a,fonts:m,fills:C,borders:P}},getStyle:z}}function uce(t,i){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=V9t(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 V9t(t,i){if(t){if(typeof t=="string")return nQe(t,i);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)?nQe(t,i):void 0}}function nQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e';if(a+='',i.length>0){a+='');for(var c=0;c');a+=""}a+='');for(var m=uce(n),g;!(g=m()).done;){var C=g.value,w=C.size,P=C.family,R=C.color,z=C.weight,H=C.style,j=C.custom;a+="",a+=''),a+=""),a+=''),a+='',j||(a+=''),z==="bold"&&(a+=""),H==="italic"&&(a+=""),a+=""}a+="",a+='');for(var K=uce(r),ne;!(ne=K()).done;){var me=ne.value,Te=me.color,Ie=me.gray125;a+="",Te?(a+='',a+=''),a+='',a+=""):Ie?a+='':a+='',a+=""}a+="",a+='');for(var ye=uce(o),fe;!(fe=ye()).done;){var Re=fe.value,Ae=Re.left,ke=Re.right,Qe=Re.top,we=Re.bottom,Rt=function(Bi,wn){var yn=wn.style,Xn=wn.color;Xn&&!yn&&(yn="thin");var Rr=!!Xn;return"<".concat(Bi)+(yn?' style="'.concat($m(yn),'"'):"")+(Rr?">":"/>")+(Xn?''):"")+(Rr?""):"")};a+="",a+=Rt("left",Ae),a+=Rt("right",ke),a+=Rt("top",Qe),a+=Rt("bottom",we),a+="",a+=""}a+="",a+='');for(var rt=uce(e),Ze;!(Ze=rt()).done;){var Et=Ze.value,We=Et.fontId,bt=Et.fillId,st=Et.borderId,kt=Et.align,pi=Et.alignVertical,Kt=Et.textRotation,gt=Et.indent,ht=Et.wrap,li=Et.formatId;a+=""+(kt||pi||Kt||gt||ht?"":"")+""}return a+="",a+="",a}function BTe(t){if(t[0]!=="#")throw new Error('Color "'.concat(t,'" must start with a "#"'));return"FF".concat(t.slice(1).toUpperCase())}function z9t(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 U9t(t){return t<0?90-t:t}function gA(t){return Object.keys(t).map(function(i){return"".concat(i,'="').concat($m(String(t[i])),'"')}).reduce(function(i,e){return i+" "+e},"")}function H2(t,i){return"".concat(oQe(t)).concat(i)}var rQe=26;function oQe(t){if(typeof t!="number")return"";var i=Math.floor(t/rQe),e=String.fromCharCode(97+t%rQe).toUpperCase();return i===0?e:oQe(i-1)+e}var H9t=25569,G9t=3600*1e3,j9t=24*G9t;function zTe(t){return t.getTime()/j9t+H9t}function $9t(t,i){return W9t(t)||K9t(t,i)||Y9t(t,i)||q9t()}function q9t(){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 Y9t(t,i){if(t){if(typeof t=="string")return aQe(t,i);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)?aQe(t,i):void 0}}function aQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e");if(n===Date&&!r)throw new Error('No "format" has been specified for a Date cell');var c=Z9t(n,e,o),m=Q9t(n);m&&(a.t=m);var g=J9t(n),C=$9t(g,2),w=C[0],P=C[1];return"")+w+c+P+""}function Q9t(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 Z9t(t,i,e){switch(t){case String:if(typeof i!="string")throw new Error("Invalid cell value: ".concat(i,". Expected a string"));return e(i);case Number:if(typeof i!="number")throw new Error("Invalid cell value: ".concat(i,". Expected a number"));return String(i);case Date:if(!(i instanceof Date))throw new Error("Invalid cell value: ".concat(i,". Expected a Date"));return String(zTe(i));case Boolean:if(typeof i!="boolean")throw new Error("Invalid cell value: ".concat(i,". Expected a boolean"));return i?"1":"0";case"Formula":if(typeof i!="string")throw new Error("Invalid cell value: ".concat(i,". Expected a string"));return QY(i);default:throw new Error("Unknown schema type: ".concat(t&&t.name||t))}}var X9t=/";default:return""}}function ZY(t){var i=t.align,e=t.alignVertical,n=t.textRotation,r=t.indent,o=t.wrap,a=t.fontFamily,c=t.fontSize,m=t.fontWeight,g=t.fontStyle,C=t.color,w=t.backgroundColor,P=t.borderColor,R=t.borderStyle,z=t.leftBorderColor,H=t.leftBorderStyle,j=t.rightBorderColor,K=t.rightBorderStyle,ne=t.topBorderColor,me=t.topBorderStyle,Te=t.bottomBorderColor,Ie=t.bottomBorderStyle;if(i||e||n||r||o||a||c||m||g||C||w||P||R||z||H||j||K||ne||me||Te||Ie)return t$t({align:i,alignVertical:e,textRotation:n,indent:r,wrap:o,fontFamily:a,fontSize:c,fontWeight:m,fontStyle:g,color:C,backgroundColor:w,borderColor:P,borderStyle:R,leftBorderColor:z,leftBorderStyle:H,rightBorderColor:j,rightBorderStyle:K,topBorderColor:ne,topBorderStyle:me,bottomBorderColor:Te,bottomBorderStyle:Ie})}function t$t(t){var i={};for(var e in t)t[e]!==void 0&&(i[e]=t[e]);return i}function HTe(t){"@babel/helpers - typeof";return HTe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},HTe(t)}function GTe(t,i,e){var n=e.getStyle,r=e.getSharedString,o=e.customFont,a=e.dateFormat,c=e.usesSchema,m=i+1,g,C=t.map(function(P,R){if(P==null)return"";var z=P.height,H=ZY(P),j=P.type,K=P.value,ne=P.format;if(i$t(K)?K=null:j===void 0&&(c||(j=n$t(K)),j===void 0&&(j=String,K=String(K))),ne){if(j!==Date&&j!==Number&&j!==String&&j!=="Formula")throw new Error('`format` can only be used on `Date`, `Number`, `String` or `"Formula"` cells');if(j===String&&ne!=="@")throw new Error('`String` cells only support "@" `format`')}else j===Date&&(ne=a);var me;return(ne||o||H)&&(me=n(H||{},{format:ne})),z&&(g===void 0||g")+C+""}function i$t(t){return t==null||t===""}function n$t(t){switch(HTe(t)){case"string":return String;case"number":return Number;case"boolean":return Boolean;default:if(t instanceof Date)return Date}}function XY(t){"@babel/helpers - typeof";return XY=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},XY(t)}function sQe(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function pce(t){for(var i=1;i=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 l$t(t,i){if(t){if(typeof t=="string")return lQe(t,i);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)?lQe(t,i):void 0}}function lQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e')}function qTe(t){var i=t.schema,e=t.columns;if(i||e){var n=(i||e).map($Te).join("");if(n)return"".concat(n,"")}return""}function YTe(t,i){var e=i.schema,n=[];if(e)return{data:t,mergedCells:n};for(var r=function(){t=t.slice();for(var z=0;z1||P>1)&&(u$t({data:t,rowIndex:o,columnIndex:c,span:C,rowSpan:P,cloneData:r}),n.push([[o,c],[o+(P?P-1:0),c+(C?C-1:0)]]))}c++}o++}return{data:t,mergedCells:n}}function u$t(t){var i=t.data,e=t.rowIndex,n=t.columnIndex,r=t.span,o=t.rowSpan,a=t.cloneData,c=ZY(i[e][n]);c&&(i=a());for(var m=e;m<=e+(o-1);){for(var g=n;g<=n+(r-1);){var C=i[m][g];if(m>e||g>n){if(C!=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(n+1," is configured with `span` ").concat(r," and `rowSpan` ").concat(o,". Cell at row ").concat(m+1," and column ").concat(g+1," is neither `null` nor `undefined`: ").concat(JSON.stringify(C)));c&&(i[m][g]=c)}g++}m++}}function p$t(t,i){return g$t(t)||f$t(t,i)||h$t(t,i)||m$t()}function m$t(){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 h$t(t,i){if(t){if(typeof t=="string")return cQe(t,i);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)?cQe(t,i):void 0}}function cQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e')+t.map(function(i){var e=p$t(i,2),n=e[0],r=e[1],o=H2(n[1],n[0]+1)+":"+H2(r[1],r[0]+1);return'')}).join("")+""}function WTe(t){var i=t.sheetId,e=t.orientation,n="";if(e){var r=.7,o=.7,a=.75,c=.75,m=.3,g=.3;n+=""),o+=""),o+="",o+="",o}function ZTe(t){var i=t.images;return i?'':""}var _$t=` {views}{columnsDescription}{data}{mergedCellsDescription}{layout}{drawing}`;function XTe(t,i){var e=i.schema,n=i.columns,r=i.images,o=i.getHeaderStyle,a=i.getStyle,c=i.getSharedString,m=i.customFont,g=i.dateFormat,C=i.orientation,w=i.stickyRowsCount,P=i.stickyColumnsCount,R=i.showGridLines,z=i.rightToLeft,H=i.sheetId;y$t(t,{schema:e});var j=YTe(t,{schema:e}),K=j.data,ne=j.mergedCells;return _$t.replace("{data}",jTe(K,{schema:e,getHeaderStyle:o,getStyle:a,getSharedString:c,customFont:m,dateFormat:g})).replace("{views}",QTe({stickyRowsCount:w,stickyColumnsCount:P,showGridLines:R,rightToLeft:z})).replace("{columnsDescription}",qTe({schema:e,columns:n})).replace("{mergedCellsDescription}",KTe(ne)).replace("{layout}",WTe({sheetId:H,orientation:C})).replace("{drawing}",ZTe({images:r}))}function y$t(t,i){var e=i.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 JTe(){var t=[],i={};return{getSharedStrings:function(){return t},getSharedString:function(n){var r=i[n];return r===void 0&&(r=String(t.length),i[n]=r,t.push(n)),r}}}var v$t=/[\[\]\/\\:*?]+/;function eEe(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(v$t.test(t))throw new Error('Sheet name "'.concat(t,'" contains illegal characters: []/\\:*?'))}function dQe(t,i){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=b$t(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 b$t(t,i){if(t){if(typeof t=="string")return uQe(t,i);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)?uQe(t,i):void 0}}function uQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e=t.length?{done:!0}:{done:!1,value:t[n++]}}}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 x$t(t,i){if(t){if(typeof t=="string")return hQe(t,i);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)?hQe(t,i):void 0}}function hQe(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);e1&&arguments[1]!==void 0?arguments[1]:{},e=i.fileName,n=S$t(i,C$t);return I$t(t,n).then(function(r){return e?gQe.default.saveAs(r,e):r})}function I$t(t,i){var e=i.sheet,n=i.sheets,r=i.schema,o=i.columns,a=i.images,c=i.headerStyle,m=i.getHeaderStyle,g=i.fontFamily,C=i.fontSize,w=i.orientation,P=i.stickyRowsCount,R=i.stickyColumnsCount,z=i.showGridLines,H=i.rightToLeft,j=i.dateFormat,K=new fQe.default,ne=pQe({data:t,sheetName:e,sheetNames:n,schema:r,columns:o,images:a,headerStyle:c,getHeaderStyle:m,fontFamily:g,fontSize:C,orientation:w,stickyRowsCount:P,stickyColumnsCount:R,showGridLines:z,rightToLeft:H,dateFormat:j}),me=ne.sheets,Te=ne.getSharedStrings,Ie=ne.getStyles;K.file("_rels/.rels",XWe),K.file("[Content_Types].xml",MTe({sheets:me,images:a}));var ye=K.folder("xl");ye.file("_rels/workbook.xml.rels",DTe({sheets:me})),ye.file("workbook.xml",ATe({sheets:me,stickyRowsCount:P,stickyColumnsCount:R})),ye.file("styles.xml",VTe(Ie())),ye.file("sharedStrings.xml",NTe(Te()));for(var fe=mQe(me),Re;!(Re=fe()).done;){var Ae=Re.value,ke=Ae.id,Qe=Ae.data,we=Ae.images;if(ye.file("worksheets/sheet".concat(ke,".xml"),Qe),ye.file("worksheets/_rels/sheet".concat(ke,".xml.rels"),PTe({id:ke,images:we})),we){ye.file("drawings/drawing".concat(ke,".xml"),OTe({images:we})),ye.file("drawings/_rels/drawing".concat(ke,".xml.rels"),RTe({images:we,sheetId:ke}));for(var Rt=mQe(we),rt;!(rt=Rt()).done;){var Ze=rt.value;ye.file("media/".concat(YY(Ze,{sheetId:ke,sheetImages:we})),Ze.content)}}}return K.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",compression:"deflate"})}var mce=class t extends p6{_exportData;defaultDateTimeFormat;constructor(i,e,n){super(e,`${n}.xlsx`),this._exportData=i,this.defaultDateTimeFormat=Intl.DateTimeFormat(e).format(new Date(1999,11,31)).replace("1999","yyyy").replace("12","mm").replace("31","dd")}process(){return _t(this,null,function*(){let i={},e=yield this._exportData;return(Array.isArray(e)?this._processSheets(e):this._processSheet(e)).then(r=>(i.result=r,i)).catch(r=>(i.errors=[r instanceof Error?r.message:"Unknown error"],i))})}_processSheets(i){return _t(this,null,function*(){let e=i.map(n=>this._sheet(n.data,n.fields));return JY(e,{sheets:Array.isArray(i)?i.map(n=>QN.sanitizeSheetName(n.sheetName)??""):void 0})})}_processSheet(i){return _t(this,null,function*(){let e=this._sheet(i.data,i.fields);return JY(e,{sheet:Array.isArray(i)?void 0:QN.sanitizeSheetName(i.sheetName)??""})})}_sheet(i,e){return[this._header(e),...i.map(n=>this._row(n))]}_row(i){return i.map(e=>this._cell(e))}_header(i){return i.map(e=>({type:String,value:e,fontWeight:"bold"}))}_cell(i){let e={value:i.value};return i.type==="number"?$e(pe({},e),{type:Number,format:this._numberFormat(i.value,i.format)}):i.type==="Date"?$e(pe({},e),{type:Date,format:typeof i.format=="string"?i.format:this.defaultDateTimeFormat}):i.type==="boolean"?$e(pe({},e),{type:Boolean}):$e(pe({},e),{type:String})}_numberFormat(i,e){if(!i)return;if(!e)return this._defaultNumberFormat(i);if(typeof e=="string")return e;let n;return t._instanceOfNumberFormatOptions(e)&&(n=this._fractionPattern(e)),this._defaultNumberFormat(i,n)}_defaultNumberFormat(i,e){return Number(i)===i&&i%1===0?e?`0.${e}`:"0":(e=e||this._fractionPattern(z$),`0.${e}`)}_fractionPattern(i){let e=i.minimumFractionDigits||0,n=i.maximumFractionDigits||e;return"0".repeat(n)}};var hce=class{_hubspotFormService;_input;_config;_authenticated;_fileService;_contact;isValid;constructor(i,e,n,r,o,a){this._hubspotFormService=i,this._input=e,this._config=n,this._authenticated=r,this._fileService=o,this._contact=a,this._updateIsValid()}export(){let i;this._authenticated?i=Hr(this._input.data.getExport()):(this._config.authenticationStrategy==="contact"?i=this._exportContact():this._config.authenticationStrategy==="reduce"&&(i=this._exportReduced()),this._input.saveInDownloadCenter=!1);let e=i.pipe(On(n=>{let r=this._getExportConverter(n);return Hr(r.process())}));return this._input.saveInDownloadCenter&&(e=e.pipe(On(n=>{let r=new File([n.result],`${this._input.filename}.${this._input.exportType}`);return this._fileService.upload(r,this._input.labels||[]).pipe(ot(()=>n))}))),e}_exportContact(){let i=this.config.authenticationStrategyConfig;return this._hubspotFormService.sendForm(i.portalId,i.formId,this._contact?.toRequestBody(),this._contact?.data.privacyConsent,window.location.href,`Export ${this._input.filename}`).pipe(On(()=>Hr(this._input.data.getExport())))}_exportReduced(){return Hr(this._input.data.getExport()).pipe(ot(i=>{let e=this.config.authenticationStrategyConfig.resultSetCount;return Array.isArray(i)?$e(pe({},i[0]),{data:i[0].data.slice(0,e)}):$e(pe({},i),{data:i.data.slice(0,e)})}))}_getExportConverter(i){let e=S7e.getPreferredLocale(),n;if(this._input.exportType==="csv"){if(Array.isArray(i))throw new Error("CSV converter can not handle more than one BdExportAsFileDataSheet");n=new dce(Promise.resolve(i),e,this._input.filename)}else this._input.exportType==="xlsx"&&(n=new mce(Promise.resolve(i),e,this._input.filename));return n}_updateIsValid(){let i=!0;(!this._exportInputIsValid()||!this.authenticated&&this._config.authenticationStrategy==="contact"&&(!this._contact||!this._contact.dataIsValid()))&&(i=!1),this.isValid=i}_exportInputIsValid(){return!!this._input.exportType&&!!this._input.data&&!!this._input.filename}get input(){return this._input}set input(i){this._input=i,this._updateIsValid()}get config(){return this._config}set config(i){this._config=i,this._updateIsValid()}get authenticated(){return this._authenticated}set authenticated(i){this._authenticated=i,this._updateIsValid()}get contact(){return this._contact}set contact(i){this._contact=i,this._updateIsValid()}};var EQe=mp(dq());var _Qe=(()=>{class t{_http;constructor(e){this._http=e}sendForm(e,n,r,o,a,c){r=r.filter(w=>!!w.value);let m=`https://api.hsforms.com/submissions/v3/integration/submit/${e}/${n}`,g=this._getCookie("hubspotutk"),C={pageUri:a,pageName:c};return g&&(C.hutk=g),this._http.post(m,{fields:r,context:C,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:o,subscriptionTypeId:5651662,text:"Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten."}]}}})}_getCookie(e){let n=document.cookie.split(";"),r=n.length,o=`${e}=`,a;for(let c=0;c{class t{_elementRef=ae(qn);_changeDetectorRef=ae(dn);_ngZone=ae(Pn);_animationsDisabled=tl();_options=ae(k$t,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let n=new tEe;return n.source=this,n.checked=e,n}_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=i_.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){ae(pc).load(gp);let e=ae(new $f("tabindex"),{optional:!0});this._options=this._options||yQe,this.color=this._options.color||yQe.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=ae(Tl).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 n=e!=this._indeterminate();this._indeterminate.set(e),n&&(e?this._transitionCheckState(i_.Indeterminate):this._transitionCheckState(this.checked?i_.Checked:i_.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=hr(!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 n=this._currentCheckState,r=this._getAnimationTargetElement();if(!(n===e||!r)&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},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?i_.Checked:i_.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,n){if(this._animationsDisabled)return"";switch(e){case i_.Init:if(n===i_.Checked)return this._animationClasses.uncheckedToChecked;if(n==i_.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case i_.Unchecked:return n===i_.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case i_.Checked:return n===i_.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case i_.Indeterminate:return n===i_.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let n=this._inputElement;n&&(n.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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-checkbox"]],viewQuery:function(n,r){if(n&1&&(Xi(E$t,5),Xi(A$t,5)),n&2){let o;ze(o=Ue())&&(r._inputElement=o.first),ze(o=Ue())&&(r._labelElement=o.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(n,r){n&2&&(sa("id",r.id),lt("tabindex",null)("aria-label",null)("aria-labelledby",null),Pe(r.color?"mat-"+r.color:"mat-accent"),zn("_mat-animation-noopable",r._animationsDisabled)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.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:En(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:[Ii([{provide:Wc,useExisting:No(()=>t),multi:!0},{provide:Lx,useExisting:t,multi:!0}]),Yt],ngContentSelectors:D$t,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(n,r){if(n&1){let o=qe();Kn(),O(0,"div",3),te("click",function(c){return se(o),le(r._preventBubblingFromLabel(c))}),O(1,"div",4,0)(3,"div",5),te("click",function(){return se(o),le(r._onTouchTargetClick())}),M(),O(4,"input",6,1),te("blur",function(){return se(o),le(r._onBlur())})("click",function(){return se(o),le(r._onInputClick())})("change",function(c){return se(o),le(r._onInteractionEvent(c))}),M(),be(6,"div",7),O(7,"div",8),Pi(),O(8,"svg",9),be(9,"path",10),M(),RT(),be(10,"div",11),M(),be(11,"div",12),M(),O(12,"label",13,2),Sn(14),M()()}if(n&2){let o=Oi(2);D("labelPosition",r.labelPosition),E(4),zn("mdc-checkbox--selected",r.checked),D("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),lt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-controls",r.ariaControls)("aria-disabled",r.disabled&&r.disabledInteractive?!0:null)("aria-expanded",r.ariaExpanded)("aria-owns",r.ariaOwns)("name",r.name)("value",r.value),E(7),D("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),E(),D("for",r.inputId)}},dependencies:[Wh,Y4],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})(),wy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[cg,_a,_a]})}return t})();var m6=class extends Xo{valid=!0;searching=!0;selectCtrl=new ho;placeholderLabel;noEntriesFoundLabel;errorMessage;allOptions=new hi(1);_onDestroy=new Ai;constructor(){super()}init(i){this.placeholderLabel=`${i.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${i.selectLabel} gefunden`,this.selectCtrl.valueChanges.pipe(ha(this._onDestroy)).subscribe(()=>{this.onSelectionChange(this.selectCtrl.value)}),i.valid$&&i.valid$.pipe(ha(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(i,e){this.selectCtrl.setValue(i,e)}};var M$t=()=>["searchTerm"];function O$t(t,i){if(t&1&&(O(0,"small",2),ee(1),M()),t&2){let e=L();D("id",e.selectConfig.id+"-help"),E(),Pt(e.errorMessage)}}var Va=(()=>{class t extends m6{config;initialSelection=void 0;selectOptions=$t([]);selection=new ve;optionsChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};selectConfig={id:"single-select",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,resetOption:!1,valid$:new hi(1)};_initialSelection$=new Bf;constructor(){super(),this._subs.push(Ec([this._initialSelection$.pipe(ar(1),ot(e=>this.transformToWrapper(e))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=$e(pe({id:`single-select-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new hi(1),resetOption:!1},this.config),{option:pe({searchOptionDisplayName:n=>this.config.option.searchOptionDisplayName?this.config.option.searchOptionDisplayName(n):this.config.option.searchOptionAccessor(n)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof qo?this._subs.push(this.initialSelection.subscribe(n=>{this._initialSelection$.next(n),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(ot(e=>e.map(n=>this.transformToWrapper(n)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((n,r)=>this.selectConfig.option.sortFnc(n.realValue,r.realValue))),this.searching=!1,this.optionsChange.emit(e.map(n=>n.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-ui-single-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Tt,Yt],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(n,r){n&1&&(O(0,"p-iftalabel"),be(1,"p-select",0),Dr(2,"async"),O(3,"label",1),ee(4),M(),yt(5,O$t,2,2,"small",2),M()),n&2&&(E(),Pe(r.valid?"mb-4":r.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),D("inputId",r.selectConfig.id)("formControl",r.selectCtrl)("options",ca(2,17,r.allOptions))("data-test",r.selectConfig.id)("loading",r.searching)("showClear",r.selectConfig.resetOption)("filter",!0)("filterFields",Vr(19,M$t))("filterPlaceholder",r.placeholderLabel)("emptyFilterMessage",r.noEntriesFoundLabel)("emptyMessage",r.noEntriesFoundLabel)("overlayOptions",r.overlayOptions),E(2),D("for",r.selectConfig.id),E(),Pt(r.selectConfig==null?null:r.selectConfig.selectLabel),E(),vt(r.errorMessage?5:-1))},dependencies:[oa,yr,Mc,Ho,Us,fh,Dc],encapsulation:2,changeDetection:0})}return t})();var R$t=()=>["searchTerm"];function P$t(t,i){if(t&1&&(O(0,"small",2),ee(1),M()),t&2){let e=L();D("id",e.selectConfig.id+"-help"),E(),Pt(e.errorMessage)}}var iEe=(()=>{class t extends m6{config;initialSelection=void 0;selectOptions=$t([]);selection=new ve;optionsChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};selectConfig={id:"single-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},optionGroup:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},emitEventOnInitialSelection:!1,resetOption:!1,valid$:new hi(1)};_initialSelection$=new Bf;constructor(){super(),this._subs.push(Ec([this._initialSelection$.pipe(ar(1),ot(e=>this.transformToWrapper(e))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=$e(pe({id:`single-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new hi(1),resetOption:!1},this.config),{option:{uniqueFnc:n=>this.config.option.uniqueFnc(n),searchOptionAccessor:n=>this.config.option.searchOptionAccessor(n),searchOptionDisplayName:n=>this.config.option.searchOptionDisplayName?this.config.option.searchOptionDisplayName(n):this.config.option.searchOptionAccessor(n),cloneFn:n=>JSON.parse(JSON.stringify(n)),sortFnc:(n,r)=>this.config.option.sortFnc(n,r)},optionGroup:{uniqueFnc:n=>this.config.optionGroup.uniqueFnc(n),searchOptionAccessor:n=>this.config.optionGroup.searchOptionAccessor(n),searchOptionDisplayName:n=>this.config.optionGroup.searchOptionDisplayName?this.config.optionGroup.searchOptionDisplayName(n):this.config.optionGroup.searchOptionAccessor(n),cloneFn:n=>JSON.parse(JSON.stringify(n)),sortFnc:(n,r)=>this.config.optionGroup.sortFnc(n,r)}}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof qo?this._subs.push(this.initialSelection.subscribe(n=>{this._initialSelection$.next(n),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(ot(e=>e.map(n=>({realValue:n,dataKey:this.selectConfig.optionGroup.uniqueFnc(n),searchTerm:this.selectConfig.optionGroup.searchOptionAccessor(n),displayName:this.selectConfig.optionGroup.searchOptionDisplayName(n),options:n.options.sort((r,o)=>this.selectConfig.option.sortFnc(r,o)).map(r=>this.transformToWrapper(r))})))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((n,r)=>this.selectConfig.optionGroup.sortFnc(n.realValue,r.realValue))),this.searching=!1,this.optionsChange.emit(e.map(n=>n.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-ui-single-select-option-group"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Tt,Yt],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(n,r){n&1&&(O(0,"p-iftalabel"),be(1,"p-select",0),Dr(2,"async"),O(3,"label",1),ee(4),M(),yt(5,P$t,2,2,"small",2),M()),n&2&&(E(),Pe(r.valid?"mb-4":r.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),D("inputId",r.selectConfig.id)("data-test",r.selectConfig.id)("formControl",r.selectCtrl)("options",ca(2,17,r.allOptions))("showClear",r.selectConfig.resetOption)("filterPlaceholder",r.placeholderLabel)("emptyFilterMessage",r.noEntriesFoundLabel)("emptyMessage",r.noEntriesFoundLabel)("overlayOptions",r.overlayOptions)("group",!0)("filter",!0)("filterFields",Vr(19,R$t)),E(2),D("for",r.selectConfig.id),E(),Pt(r.selectConfig==null?null:r.selectConfig.selectLabel),E(),vt(r.errorMessage?5:-1))},dependencies:[oa,yr,Mc,fh,Ho,Us,Dc],encapsulation:2})}return t})();var N$t=()=>[];function F$t(t,i){if(t&1){let e=qe();O(0,"bd-ui-labels-input",6),te("labelsChange",function(r){se(e);let o=L(2);return le(o.onLabelsChange(r))}),M()}if(t&2){let e=L(2);D("labels",e.input.labels||Vr(1,N$t))}}function L$t(t,i){if(t&1&&(O(0,"div")(1,"mat-checkbox",4),ee(2,"Zus\xE4tzlich im File-Center ablegen "),M()(),yt(3,F$t,1,2,"bd-ui-labels-input",5)),t&2){let e=L();E(),D("formControl",e.saveInDownloadCenterFormControl),E(2),vt(e.input.saveInDownloadCenter?3:-1)}}var bQe=(()=>{class t{input;config;authenticated;inputChange=new ve;exportTypeConfig={id:"export-type-select",selectLabel:"Typ",resetOption:!1,option:{sortFnc:(e,n)=>e.label.localeCompare(n.label),uniqueFnc:e=>e.value,searchOptionAccessor:e=>e.label}};fileNameFormControl=new ho(null,La.required);exportTypeOptions=dl;exportTypeInitial;saveInDownloadCenterFormControl=new ho(!1);constructor(){this.fileNameFormControl.valueChanges.pipe(Hh(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=$t(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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-export-as-file-dialog-form"]],inputs:{input:"input",config:"config",authenticated:"authenticated"},outputs:{inputChange:"inputChange"},features:[Yt],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(n,r){n&1&&(O(0,"div",0)(1,"div")(2,"bd-ui-single-select",1),te("selection",function(a){return r.onExportTypeChange(a)}),M()(),O(3,"div")(4,"mat-form-field")(5,"mat-label"),ee(6,"Name"),M(),be(7,"input",2),O(8,"span",3),ee(9),M()()(),yt(10,L$t,4,2),M()),n&2&&(E(2),D("config",r.exportTypeConfig)("selectOptions",r.exportTypeOptions)("initialSelection",r.exportTypeInitial),E(5),D("formControl",r.fileNameFormControl),E(2),gn(".",r.input.exportType),E(),vt(r.authenticated?10:-1))},dependencies:[mc,Oa,rd,km,oa,nd,yr,Mc,hc,zs,wy,cg,X$,Va],encapsulation:2})}return t})();var fce=class{data;constructor(i){this.data=i}dataIsValid(){return!!this.data.email&&!!this.data.firstname&&!!this.data.lastname&&this.data.privacyConsent}toRequestBody(){let i=[];return i.push({name:"email",value:this.data.email}),this.data.company&&i.push({name:"company",value:this.data.company}),i.push({name:"lastname",value:this.data.lastname}),i.push({name:"firstname",value:this.data.firstname}),i.push({name:"mobilephone",value:this.data.mobilephone}),i}};function B$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Bitte geben Sie ihren Vorname an"),M())}function V$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Bitte geben Sie ihren Nachname an"),M())}function z$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Ung\xFCltige Email-Adresse"),M())}function U$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Bitte geben Sie eine Email an"),M())}function H$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Ung\xFCltige Nummer"),M())}function G$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Mindestens 7 Stellen"),M())}function j$t(t,i){t&1&&(O(0,"mat-error"),ee(1," Maximal 20 Stellen"),M())}var CQe=(()=>{class t{contact=new fce({company:null,firstname:null,lastname:null,email:null,mobilephone:null,privacyConsent:!0});contactChange=new ve;form=new Mu({email:new ho(null,[La.email,La.required]),firstname:new ho(null,[La.required]),lastname:new ho(null,[La.required]),company:new ho(null,[]),mobilephone:new MUe(null,[La.minLength(7),La.maxLength(20)]),privacyConsent:new ho(!0,[La.requiredTrue])});constructor(){this.form.valueChanges.subscribe(e=>{this.contact.data=e,this.contactChange.emit(this.contact)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),ee(5,"Firma"),M(),be(6,"input",3),M()(),O(7,"div",2)(8,"div",4)(9,"div",2)(10,"mat-form-field")(11,"mat-label"),ee(12,"Vorname"),M(),be(13,"input",5),yt(14,B$t,2,0,"mat-error"),M()(),O(15,"div",2)(16,"mat-form-field")(17,"mat-label"),ee(18,"Nachname"),M(),be(19,"input",6),yt(20,V$t,2,0,"mat-error"),M()()()(),O(21,"div",2)(22,"mat-form-field")(23,"mat-label"),ee(24,"Email"),M(),be(25,"input",7),yt(26,z$t,2,0,"mat-error"),yt(27,U$t,2,0,"mat-error"),M()(),O(28,"div",2)(29,"div",4)(30,"div",8)(31,"mat-form-field")(32,"mat-label"),ee(33,"Telefon"),M(),be(34,"input",9),yt(35,H$t,2,0,"mat-error"),yt(36,G$t,2,0,"mat-error"),yt(37,j$t,2,0,"mat-error"),M()()()(),O(38,"div",2)(39,"span",10),ee(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: "),M()(),O(41,"div",2)(42,"mat-checkbox",11),ee(43," Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten. "),M()(),O(44,"div",2)(45,"span",10),ee(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."),M()(),O(47,"div",2)(48,"span",10),ee(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."),M()()()()),n&2&&(D("formGroup",r.form),E(14),vt(r.form.get("firstname").hasError("required")?14:-1),E(6),vt(r.form.get("lastname").hasError("required")?20:-1),E(6),vt(r.form.get("email").hasError("email")&&!r.form.get("email").hasError("required")?26:-1),E(),vt(r.form.get("email").hasError("required")?27:-1),E(8),vt(r.form.get("mobilephone").hasError("number")?35:-1),E(),vt(r.form.get("mobilephone").hasError("minlength")?36:-1),E(),vt(r.form.get("mobilephone").hasError("maxlength")?37:-1))},dependencies:[oa,Am,nd,yr,Em,Bx,Xu,Y_,mc,Oa,rd,Uie,hc,zs,wy,cg],encapsulation:2})}return t})();var xQe=(()=>{class t extends ur{pFocusTrapDisabled=!1;platformId=ae(Hf);document=ae(Gr);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),Js(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&Js(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 n=r=>UUe("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:r?.bind(this)});this.firstHiddenFocusableElement=n(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=n(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:n,relatedTarget:r}=e,o=r===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(r)?k4(n.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;Ba(o)}onLastHiddenElementFocus(e){let{currentTarget:n,relatedTarget:r}=e,o=r===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(r)?M4(n.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;Ba(o)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",Je]},features:[Tt,Yt]})}return t})();var SQe=` .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 $$t={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"}},q$t={mask:({instance:t})=>{let e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(n=>n===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"},wQe=(()=>{class t extends br{name="dialog";theme=SQe;classes=q$t;inlineStyles=$$t;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Ear=lw([ul({transform:"{{transform}}",opacity:0}),Jl("{{transition}}")]),Aar=lw([Jl("{{transition}}",ul({transform:"{{transform}}",opacity:0}))]);var Y$t=["mask"],K$t=["content"],W$t=["footer"],Q$t=["titlebar"],Z$t=(t,i,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":i,"pointer-events":e}),X$t=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),J$t=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),eqt=(t,i)=>({transform:t,transition:i}),tqt=t=>({value:"visible",params:t});function iqt(t,i){if(t&1){let e=qe();O(0,"div",15),te("mousedown",function(r){se(e);let o=L(2);return le(o.initResize(r))}),M()}t&2&&D("ngClass","p-resizable-handle")}function nqt(t,i){t&1&&Li(0)}function rqt(t,i){t&1&&(Pi(),be(0,"svg",24))}function oqt(t,i){}function aqt(t,i){t&1&&ie(0,oqt,0,0,"ng-template")}function sqt(t,i){if(t&1&&(fi(0),ie(1,rqt,1,0,"svg",22)(2,aqt,1,0,null,23),gi()),t&2){let e=L(6);E(),D("ngIf",!e.maximizeIconTemplate),E(),D("ngTemplateOutlet",e.maximizeIconTemplate)}}function lqt(t,i){t&1&&(Pi(),be(0,"svg",26))}function cqt(t,i){}function dqt(t,i){t&1&&ie(0,cqt,0,0,"ng-template")}function uqt(t,i){if(t&1&&(fi(0),ie(1,lqt,1,0,"svg",25)(2,dqt,1,0,null,23),gi()),t&2){let e=L(6);E(),D("ngIf",!e.minimizeIconTemplate),E(),D("ngTemplateOutlet",e.minimizeIconTemplate)}}function pqt(t,i){if(t&1&&ie(0,sqt,3,2,"ng-container",12)(1,uqt,3,2,"ng-container",12),t&2){let e=L(5);D("ngIf",!e.maximized),E(),D("ngIf",e.maximized)}}function mqt(t,i){if(t&1){let e=qe();O(0,"p-button",21),te("onClick",function(){se(e);let r=L(4);return le(r.maximize())})("keydown.enter",function(){se(e);let r=L(4);return le(r.maximize())}),ie(1,pqt,2,2,"ng-template",null,4,di),M()}if(t&2){let e=L(4);D("styleClass","p-dialog-maximize-button")("tabindex",e.maximizable?"0":"-1")}}function hqt(t,i){t&1&&(Pi(),be(0,"svg",29))}function fqt(t,i){}function gqt(t,i){t&1&&ie(0,fqt,0,0,"ng-template")}function _qt(t,i){if(t&1&&ie(0,hqt,1,0,"svg",28)(1,gqt,1,0,null,23),t&2){let e=L(5);D("ngIf",!e.closeIconTemplate),E(),D("ngTemplateOutlet",e.closeIconTemplate)}}function yqt(t,i){if(t&1){let e=qe();O(0,"p-button",27),te("onClick",function(){se(e);let r=L(4);return le(r.hide())})("keydown.enter",function(){se(e);let r=L(4);return le(r.hide())}),ie(1,_qt,2,2,"ng-template",null,4,di),M()}if(t&2){let e=L(4);D("styleClass","p-dialog-close-button"),uc("ariaLabel",e.ddconfig.closeAriaLabel||e.defaultCloseAriaLabel)}}function vqt(t,i){if(t&1&&(fi(0),O(1,"span",17),ee(2),M(),O(3,"div",18),ie(4,mqt,3,2,"p-button",19)(5,yqt,3,2,"p-button",20),M(),gi()),t&2){let e=L(3);E(),D("ngClass","p-dialog-title")("id",e.ariaLabelledBy),E(),Pt(e.ddconfig.header),E(),D("ngClass","p-dialog-header-actions"),E(),D("ngIf",e.ddconfig.maximizable),E(),D("ngIf",e.closable)}}function bqt(t,i){if(t&1){let e=qe();O(0,"div",16,3),te("mousedown",function(r){se(e);let o=L(2);return le(o.initDrag(r))}),ie(2,nqt,1,0,"ng-container",13)(3,vqt,6,6,"ng-container",12),M()}if(t&2){let e=L(2);D("ngClass","p-dialog-header"),E(2),D("ngComponentOutlet",e.headerTemplate),E(),D("ngIf",!e.headerTemplate)}}function Cqt(t,i){}function xqt(t,i){t&1&&ie(0,Cqt,0,0,"ng-template",30)}function Sqt(t,i){t&1&&Li(0)}function wqt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(3);E(),gn(" ",e.ddconfig.footer," ")}}function Iqt(t,i){t&1&&Li(0)}function Tqt(t,i){if(t&1&&(O(0,"div",18,5),ie(2,wqt,2,1,"ng-container",12)(3,Iqt,1,0,"ng-container",13),M()),t&2){let e=L(2);D("ngClass","p-dialog-footer"),E(2),D("ngIf",!e.footerTemplate),E(),D("ngComponentOutlet",e.footerTemplate)}}function Eqt(t,i){if(t&1){let e=qe();O(0,"div",8,1),te("@animation.start",function(r){se(e);let o=L();return le(o.onAnimationStart(r))})("@animation.done",function(r){se(e);let o=L();return le(o.onAnimationEnd(r))}),ie(2,iqt,1,1,"div",9)(3,bqt,4,3,"div",10),O(4,"div",11,2),ie(6,xqt,1,0,null,12)(7,Sqt,1,0,"ng-container",13),M(),ie(8,Tqt,4,3,"div",14),M()}if(t&2){let e=L();is(e.ddconfig.style),Pe(e.ddconfig.styleClass),la("width",e.ddconfig.width)("height",e.ddconfig.height),D("ngClass",Yi(22,X$t,e.maximizable&&e.maximized))("ngStyle",Vr(24,J$t))("@animation",Yi(28,tqt,na(25,eqt,e.transformOptions,e.ddconfig.transitionOptions||"150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled",e.ddconfig.focusTrap===!1),lt("aria-labelledby",e.ariaLabelledBy)("aria-modal",!0)("id",e.dialogId),E(2),D("ngIf",e.ddconfig.resizable),E(),D("ngIf",e.ddconfig.showHeader!==!1),E(),D("ngClass","p-dialog-content")("ngStyle",e.ddconfig.contentStyle),E(2),D("ngIf",!e.contentTemplate),E(),D("ngComponentOutlet",e.contentTemplate),E(),D("ngIf",e.ddconfig.footer||e.footerTemplate)}}var IQe=(()=>{class t{viewContainerRef;constructor(e){this.viewContainerRef=e}static \u0275fac=function(n){return new(n||t)(xe($l))};static \u0275dir=hn({type:t,selectors:[["","pDynamicDialogContent",""]]})}return t})(),TQe=(()=>{class t extends wQe{name="dialog";static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var zc=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},El=class{constructor(){}close(i){this._onClose.next(i),setTimeout(()=>{this._onClose.complete()},1e3)}destroy(){this._onDestroy.next(null)}dragStart(i){this._onDragStart.next(i)}dragEnd(i){this._onDragEnd.next(i)}resizeInit(i){this._onResizeInit.next(i)}resizeEnd(i){this._onResizeEnd.next(i)}maximize(i){this._onMaximize.next(i)}_onClose=new Ai;onClose=this._onClose.asObservable();_onDestroy=new Ai;onDestroy=this._onDestroy.asObservable();_onDragStart=new Ai;onDragStart=this._onDragStart.asObservable();_onDragEnd=new Ai;onDragEnd=this._onDragEnd.asObservable();_onResizeInit=new Ai;onResizeInit=this._onResizeInit.asObservable();_onResizeEnd=new Ai;onResizeEnd=this._onResizeEnd.asObservable();_onMaximize=new Ai;onMaximize=this._onMaximize.asObservable();onChildComponentLoaded=new Ai},Aqt=lw([ul({transform:"{{transform}}",opacity:0}),Jl("{{transition}}",ul({transform:"none",opacity:1}))]),Dqt=lw([Jl("{{transition}}",ul({transform:"{{transform}}",opacity:0}))]),kqt=(()=>{class t extends ur{renderer;ddconfig;dialogRef;zone;parentDialog;visible=!0;componentRef;mask;resizing;dragging;maximized;_style={};originalStyle;lastPageX;lastPageY;ariaLabelledBy;id=fa("pn_id_");styleElement;insertionPoint;maskViewChild;contentViewChild;footerViewChild;headerViewChild;childComponentType;inputValues;container;wrapper;documentKeydownListener;documentEscapeListener;maskClickListener;transformOptions="scale(0.7)";documentResizeListener;documentResizeEndListener;documentDragListener;documentDragEndListener;_componentStyle=ae(TQe);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(xs.ARIA).close}set style(e){e&&(this._style=pe({},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 n=e[e.length-1].querySelector(".p-dialog-content");if(n)return Array.isArray(n)?n[0]:n}}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 n=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(r=>r===this.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":this.ddconfig.modal||this.ddconfig.dismissableMask,[`p-dialog-${n}`]:n}}get dialogId(){return this.attrSelector}zIndexForLayering;constructor(e,n,r,o,a){super(),this.renderer=e,this.ddconfig=n,this.dialogRef=r,this.zone=o,this.parentDialog=a}ngOnInit(){super.ngOnInit(),this.breakpoints&&this.createStyle()}createStyle(){if(Js(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",$k(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let n in this.breakpoints)e+=` @media screen and (max-width: ${n}) { .p-dialog[id=${this.dialogId}]:not(.p-dialog-maximized) { width: ${this.breakpoints[n]} !important; } } `;this.renderer.setProperty(this.styleElement,"innerHTML",e),$k(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:n}=this.ddconfig;return e===null||n===!1?null:fa("pn_id_")+"_header"}loadChildComponent(e){let n=this.insertionPoint?.viewContainerRef;n?.clear(),this.componentRef=n?.createComponent(e),this.inputValues&&Object.entries(this.inputValues).forEach(([r,o])=>{this.componentRef.setInput(r,o)}),this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance)}moveOnTop(){this.ddconfig.autoZIndex!==!1?(Fd.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=Fd.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&&nu(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&&Fd.clear(this.container),this.zIndexForLayering&&Fd.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&&nu(this.document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.ddconfig.dismissableMask&&this.unbindMaskClickListener(),this.ddconfig.modal!==!1&&qp(this.document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}focus(e=this.contentViewChild.nativeElement){let n=eo.getFocusableElement(e,"[autofocus]");if(n){this.zone.runOutsideAngular(()=>{setTimeout(()=>n.focus(),5)});return}let r=eo.getFocusableElement(e);r?this.zone.runOutsideAngular(()=>{setTimeout(()=>r.focus(),5)}):this.footerViewChild?this.focus(this.footerViewChild.nativeElement):!r&&this.headerViewChild&&this.focus(this.headerViewChild.nativeElement)}maximize(){this.maximized=!this.maximized,this.maximized?nu(this.document.body,"p-overflow-hidden"):qp(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,nu(this.document.body,"p-unselectable-text"),this.dialogRef.resizeInit(e))}onResize(e){if(this.resizing){let n=e.pageX-this.lastPageX,r=e.pageY-this.lastPageY,o=Nd(this.container),a=zg(this.container),c=zg(this.contentViewChild.nativeElement),m=o+n,g=a+r,C=this.container.style.minWidth,w=this.container.style.minHeight,P=this.container.getBoundingClientRect(),R=jk();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(m+=n,g+=r),(!C||m>parseInt(C))&&P.left+mparseInt(w))&&P.top+g=this.minX&&m+n=this.minY&&g+r{this.documentDragListener=this.renderer.listen(this.document,"mousemove",this.onDrag.bind(this))})}bindDocumentDragEndListener(){Js(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(){Js(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",n=>{if(n.which==27){let r=Fd.getCurrent();(parseInt(this.container.style.zIndex)==r||this.zIndexForLayering==r)&&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(n){return new(n||t)(xe(Ma),xe(zc),xe(El),xe(Pn),xe(t,12))};static \u0275cmp=re({type:t,selectors:[["p-dynamicDialog"],["p-dynamicdialog"],["p-dynamic-dialog"]],viewQuery:function(n,r){if(n&1&&(Xi(IQe,5),Xi(Y$t,5),Xi(K$t,5),Xi(W$t,5),Xi(Q$t,5)),n&2){let o;ze(o=Ue())&&(r.insertionPoint=o.first),ze(o=Ue())&&(r.maskViewChild=o.first),ze(o=Ue())&&(r.contentViewChild=o.first),ze(o=Ue())&&(r.footerViewChild=o.first),ze(o=Ue())&&(r.headerViewChild=o.first)}},features:[Ii([TQe]),Tt],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(n,r){n&1&&(O(0,"div",6,0),ie(2,Eqt,9,30,"div",7),M()),n&2&&(Pe(r.ddconfig.maskStyleClass),D("ngStyle",Qu(5,Z$t,r.position==="left"||r.position==="topleft"||r.position==="bottomleft"?"flex-start":r.position==="right"||r.position==="topright"||r.position==="bottomright"?"flex-end":"center",r.position==="top"||r.position==="topleft"||r.position==="topright"?"flex-start":r.position==="bottom"||r.position==="bottomleft"||r.position==="bottomright"?"flex-end":"center",r.ddconfig.modal?"auto":"none"))("ngClass",r.maskClass),E(2),D("ngIf",r.visible))},dependencies:[rr,qa,Tye,Xr,Jr,Xs,Un,IQe,F6e,L6e,Qf,Yl,xQe],encapsulation:2,data:{animation:[Wp("animation",[Oc("void => visible",[Jk(Aqt)]),Oc("visible => void",[Jk(Dqt)])])]}})}return t})();var nEe=class{_parentInjector;_additionalTokens;constructor(i,e){this._parentInjector=i,this._additionalTokens=e}get(i,e,n){let r=this._additionalTokens.get(i);return r||this._parentInjector.get(i,e)}},To=(()=>{class t{appRef;injector;document;dialogComponentRefMap=new Map;constructor(e,n,r){this.appRef=e,this.injector=n,this.document=r}open(e,n){if(!this.duplicationPermission(e,n))return null;let r=this.appendDialogComponentToBody(n,e);return this.dialogComponentRefMap.get(r).instance.childComponentType=e,this.dialogComponentRefMap.get(r).instance.inputValues=n.inputValues,r}getInstance(e){return this.dialogComponentRefMap.get(e).instance}appendDialogComponentToBody(e,n){let r=new WeakMap;r.set(zc,e);let o=new El;r.set(El,o);let a=o.onClose.subscribe(()=>{this.dialogComponentRefMap.get(o).instance.close()}),c=o.onDestroy.subscribe(()=>{this.removeDialogComponentFromBody(o),c.unsubscribe(),a.unsubscribe()}),m=WV(kqt,{environmentInjector:this.appRef.injector,elementInjector:new nEe(this.injector,r)});this.appRef.attachView(m.hostView);let g=m.hostView.rootNodes[0];return!e.appendTo||e.appendTo==="body"?this.document.body.appendChild(g):KT(e.appendTo,g),this.dialogComponentRefMap.set(o,m),o}removeDialogComponentFromBody(e){if(!e||!this.dialogComponentRefMap.has(e))return;let n=this.dialogComponentRefMap.get(e);this.appRef.detachView(n.hostView),n.destroy(),n.changeDetectorRef.detectChanges(),this.dialogComponentRefMap.delete(e)}duplicationPermission(e,n){if(n.duplicate)return!0;let r=!0;for(let[o,a]of this.dialogComponentRefMap)if(a.instance.childComponentType===e){r=!1;break}return r}static \u0275fac=function(n){return new(n||t)(ai($h),ai(Ir),ai(Gr))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function Mqt(t,i){if(t&1&&(O(0,"div")(1,"div",7)(2,"div",8)(3,"div",9)(4,"mat-icon"),ee(5,"info_outline"),M()(),O(6,"div",10)(7,"span",11),ee(8),O(9,"a",12),ee(10,"Kontaktieren Sie unseren Vertrieb"),M()()()()()()),t&2){let e=L(2);E(8),gn("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 Oqt(t,i){if(t&1){let e=qe();O(0,"div",13)(1,"bd-export-as-file-dialog-form-hubspot-contact",14),te("contactChange",function(r){se(e);let o=L(2);return le(o.onContactChange(r))}),M()(),be(2,"mat-divider")}}function Rqt(t,i){if(t&1){let e=qe();yt(0,Mqt,11,1,"div"),yt(1,Oqt,3,0),O(2,"div")(3,"bd-export-as-file-dialog-form",3),te("inputChange",function(r){se(e);let o=L();return le(o.onInputChange(r))}),M()(),O(4,"div",4)(5,"button",5),te("click",function(){se(e);let r=L();return le(r.abort())}),ee(6,"Abbrechen"),M(),O(7,"button",6),te("click",function(){se(e);let r=L();return le(r.onExportClick())}),ee(8," Exportieren "),M()()}if(t&2){let e=L();vt(e.config.authenticationStrategy==="reduce"&&!e.exportHandler.authenticated?0:-1),E(),vt(e.config.authenticationStrategy==="contact"&&!e.exportHandler.authenticated?1:-1),E(2),D("input",e.exportHandler.input)("config",e.config)("authenticated",e.exportHandler.authenticated),E(4),D("disabled",!e.exportHandler.isValid)}}function Pqt(t,i){if(t&1){let e=qe();O(0,"p",15),ee(1," Es ist ein Fehler w\xE4hrend dem Export aufgetreten, der Export konnte nicht erstellt werden "),M(),O(2,"div",4)(3,"button",16),te("click",function(){se(e);let r=L();return le(r.abort())}),ee(4," Abbrechen "),M()()}}var AQe=(()=>{class t{_dialogRef;_currentUserService;_hubspotFormService;_fileService;loading$=new Ai;config;exportHandler;constructor(e,n,r,o,a){this._dialogRef=n,this._currentUserService=r,this._hubspotFormService=o,this._fileService=a,e.data.input.exportType=e.data.input.exportType??"xlsx",this.config=e.data.config??i1,this._currentUserService.authenticated$.pipe(ar(1)).subscribe(c=>{this.exportHandler=new hce(this._hubspotFormService,e.data.input,this.config,c,this._fileService)})}abort(){this._dialogRef.close()}onContactChange(e){this.exportHandler.contact=e}onInputChange(e){this.exportHandler.input=e}onExportClick(){this.loading$.next(ni.LOADING),this.exportHandler.export().subscribe({next:e=>{e.errors?(this.loading$.next(ni.ERROR),console.error(e.errors)):(this.loading$.next(ni.SUCCESS),(0,EQe.saveAs)(e.result,`${this.exportHandler.input.filename}.${this.exportHandler.input.exportType}`),this._dialogRef.close())},error:e=>{console.error(e),this.loading$.next(ni.ERROR)}})}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El),xe(Yg),xe(_Qe),xe(my,8))};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"div"),be(1,"bd-loader",2),M(),ie(2,Rqt,9,6,"ng-template",null,0,di)(4,Pqt,5,0,"ng-template",null,1,di)),n&2){let o=Oi(3),a=Oi(5);E(),D("loadItem",r.loading$)("initTemplate",o)("errorTemplate",a)}},dependencies:[fr,da,zr,CQe,Cp,Id,bQe,so,Kr],styles:[".contact-form[_ngcontent-%COMP%], .export-form[_ngcontent-%COMP%]{padding:24px 0}"]})}return t})();var G2={position:"center",modal:!0,width:"70%",closable:!0,closeOnEscape:!0,maximizable:!1,breakpoints:{"640px":"100%","768px":"90%","1024px":"85%","1280px":"80%"}};function Nqt(t,i){if(t&1){let e=qe();O(0,"div")(1,"button",0),te("click",function(){se(e);let r=L();return le(r.onClick())}),O(2,"mat-icon"),ee(3,"save"),M()()()}if(t&2){let e=L();E(),D("data-test",e.exportConfig.trigger.dataTestKey)("color",e.exportConfig.trigger.color)("matTooltip",e.exportConfig.trigger.tooltipText)}}var C1=(()=>{class t extends Xo{_dialogService;_currentUserService;data;filename;config=i1;showTrigger;exportConfig=i1;_authenticated;constructor(e,n){super(),this._dialogService=e,this._currentUserService=n;let r=this._currentUserService.authenticated$.subscribe(o=>{this._authenticated=o,this._updateShowTrigger(o)});this._subs.push(r)}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},n=$e(pe({},G2),{header:"Export",data:{input:e,config:this.config,authenticated:this._authenticated}});this._dialogService.open(AQe,n)}_updateShowTrigger(e){this.exportConfig.authenticationStrategy==="always"&&!e&&(this.showTrigger=!1),this.showTrigger=!0}static \u0275fac=function(n){return new(n||t)(xe(To),xe(Yg))};static \u0275cmp=re({type:t,selectors:[["bd-export-as-file"]],inputs:{data:"data",filename:"filename",config:"config"},features:[Ii([To]),Tt],decls:1,vars:1,consts:[["mat-icon-button","",3,"click","data-test","color","matTooltip"]],template:function(n,r){n&1&&yt(0,Nqt,4,3,"div"),n&2&&vt(r.showTrigger?0:-1)},dependencies:[so,il,Xf,Ld,da,zr,fh],encapsulation:2})}return t})();function Fqt(t,i){if(t&1&&(O(0,"div",4),be(1,"bd-permissions-users-list-items",5),M()),t&2){let e=L();E(),D("users",e.users)("options",e.usersItemsOptions)}}var DQe=(()=>{class t{_cachedUserService;loading$=new hi(1);users=[];usersItemsOptions={enableRemoveAction:!1,tooltipRemoveAction:""};export;constructor(e){this._cachedUserService=e}ngOnInit(){this.loading$.next(ni.LOADING),this._cachedUserService.findAll().then(e=>{this.users=e,this.export=new rae(this.users),this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(M5))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:8,vars:3,consts:[["content",""],[1,"toolbar-spacer"],["filename","Nutzer",3,"data"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[3,"users","options"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2,"Nutzer"),M(),be(3,"span",1)(4,"bd-export-as-file",2),M(),be(5,"bd-loader",3),ie(6,Fqt,2,2,"ng-template",null,0,di)),n&2){let o=Oi(7);E(4),D("data",r.export),E(),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[zl,C1,fr,k5],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-form-field[_ngcontent-%COMP%]{width:100%}"]})}return t})();var Lqt=()=>[10,25,50],Bqt=()=>["name","id"],Vqt=t=>["/companies",t];function zqt(t,i){if(t&1){let e=qe();O(0,"input",6),te("input",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.target.value,"contains"))}),M()}}function Uqt(t,i){t&1&&(O(0,"tr")(1,"th",7),ee(2,"ID"),M(),O(3,"th",8),ee(4," Name "),be(5,"p-sortIcon",9),M(),be(6,"th",10),M())}function Hqt(t,i){if(t&1&&(O(0,"tr")(1,"td"),ee(2),M(),O(3,"td"),ee(4),M(),O(5,"td")(6,"a",11)(7,"mat-icon"),ee(8,"open_in_new"),M()()()()),t&2){let e=i.$implicit;E(2),gn(" ",e.id," "),E(2),gn(" ",e.name," "),E(2),D("routerLink",Yi(3,Vqt,e.id))}}function Gqt(t,i){t&1&&(O(0,"tr")(1,"td",12),ee(2,"Keine Kunden gefunden."),M()())}var gce=(()=>{class t{companies=[];static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-company-list"]],inputs:{companies:"companies"},decls:6,vars:10,consts:[["companyTable",""],["dataKey","id","sortField","name","currentPageReportTemplate","{first} - {last} von {totalRecords}",3,"value","sortOrder","rows","rowsPerPageOptions","paginator","showCurrentPageReport","pageLinks","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pInputText","","type","text","placeholder","Suche",1,"w-full",3,"input"],[2,"width","380px"],["pSortableColumn","name"],["field","name"],[2,"width","40px"],["mat-icon-button","","color","accent",3,"routerLink"],["colspan","5"]],template:function(n,r){n&1&&(O(0,"p-table",1,0),ie(2,zqt,1,0,"ng-template",2)(3,Uqt,7,0,"ng-template",3)(4,Hqt,9,5,"ng-template",4)(5,Gqt,3,0,"ng-template",5),M()),n&2&&D("value",r.companies)("sortOrder",1)("rows",25)("rowsPerPageOptions",Vr(8,Lqt))("paginator",!0)("showCurrentPageReport",!0)("pageLinks",!1)("globalFilterFields",Vr(9,Bqt))},dependencies:[Td,rc,Tr,aC,sC,Ms,zr,ow,_p,RP],encapsulation:2})}return t})();function jqt(t,i){if(t&1&&be(0,"bd-company-list",2),t&2){let e=L();D("companies",e.companies)}}var kQe=(()=>{class t{_permissionsUserService;user;loading$=new hi(1);companies;constructor(e){this._permissionsUserService=e}ngOnInit(){this.loading$.next(ni.LOADING),this.user.valid?this._permissionsUserService.userCompanies(this.user.oid).subscribe(e=>{this.companies=e,this.loading$.next(ni.SUCCESS)}):(this.companies=[],this.loading$.next(ni.SUCCESS))}static \u0275fac=function(n){return new(n||t)(xe($g))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-users-details-companies"]],inputs:{user:"user"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"companies"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,jqt,1,1,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,gce],encapsulation:2})}return t})();var $qt=[{permission:"CREATOR",explanation:"",weight:4},{permission:"READ",explanation:"READ",weight:1},{permission:"UPDATE",explanation:"READ + UPDATE",weight:2},{permission:"DELETE",explanation:"READ + UPDATE + DELETE",weight:3}],_A=class t{permission;explanation;weight;static of(i){return $qt.find(e=>e.permission===i)}static tree(i){return i==="READ"?[t.of("READ")]:i==="UPDATE"?[t.of("READ"),t.of("UPDATE")]:[t.of("READ"),t.of("UPDATE"),t.of("DELETE")]}constructor(i,e,n){this.permission=i,this.explanation=e,this.weight=n}};var _ce=class{static filterAlreadySharedResources(i,e,n){return e.filter(r=>{let o=i.filter(a=>n==="user"?!!a.user_id:!!a.group_id).find(a=>{let c=a.resource_id===r.resource_id,m=a.resource_name===r.resource_name;return c&&m});return o?_A.of(o.permission).weight<_A.of(r.permission).weight:!0})}};var qqt=["input"],Yqt=["formField"],Kqt=["*"],yce=class{source;value;constructor(i,e){this.source=i,this.value=e}},Wqt={provide:Wc,useExisting:No(()=>eK),multi:!0},MQe=new Mi("MatRadioGroup"),Qqt=new Mi("mat-radio-default-options",{providedIn:"root",factory:Zqt});function Zqt(){return{color:"accent",disabledInteractive:!1}}var eK=(()=>{class t{_changeDetector=ae(dn);_value=null;_name=ae(Tl).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(n=>{n.checked=this.value===n.value,n.checked&&(this._selected=n)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new yce(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(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["mat-radio-group"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,h6,5),n&2){let a;ze(a=Ue())&&(r._radios=a)}},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:[Ii([Wqt,{provide:MQe,useExisting:t}])]})}return t})(),h6=(()=>{class t{_elementRef=ae(qn);_changeDetector=ae(dn);_focusMonitor=ae(wm);_radioDispatcher=ae(VP);_defaultOptions=ae(Qqt,{optional:!0});_ngZone=ae(Pn);_renderer=ae(Ma);_uniqueId=ae(Tl).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=tl();_injector=ae(Ir);constructor(){ae(pc).load(gp);let e=ae(MQe,{optional:!0}),n=ae(new $f("tabindex"),{optional:!0});this.radioGroup=e,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,n&&(this.tabIndex=En(n,0))}focus(e,n){n?this._focusMonitor.focusVia(this._inputElement,n,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,n)=>{e!==this.id&&n===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 yce(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let n=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),n&&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,n;if(!e||!e.selected||this.disabled?n=this.tabIndex:n=e.selected===this?this.tabIndex:-1,n!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",n+""),this._previousTabIndex=n,Rd(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===r&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===r&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-radio-button"]],viewQuery:function(n,r){if(n&1&&(Xi(qqt,5),Xi(Yqt,7,qn)),n&2){let o;ze(o=Ue())&&(r._inputElement=o.first),ze(o=Ue())&&(r._rippleTrigger=o.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(n,r){n&1&&te("focus",function(){return r._inputElement.nativeElement.focus()}),n&2&&(lt("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),zn("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("mat-mdc-radio-disabled",r.disabled)("mat-mdc-radio-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._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:En(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:Kqt,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(n,r){if(n&1){let o=qe();Kn(),O(0,"div",2,0)(2,"div",3)(3,"div",4),te("click",function(c){return se(o),le(r._onTouchTargetClick(c))}),M(),O(4,"input",5,1),te("change",function(c){return se(o),le(r._onInputInteraction(c))}),M(),O(6,"div",6),be(7,"div",7)(8,"div",8),M(),O(9,"div",9),be(10,"div",10),M()(),O(11,"label",11),Sn(12),M()()}n&2&&(D("labelPosition",r.labelPosition),E(2),zn("mdc-radio--disabled",r.disabled),E(2),D("id",r.inputId)("checked",r.checked)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),lt("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),E(5),D("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),E(2),D("for",r.inputId))},dependencies:[Wh,Y4],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})(),OQe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,tw,h6,_a]})}return t})();var RQe=(()=>{class t{type;typeChange=new ve;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-resources-share-dialog-type"]],inputs:{type:"type"},outputs:{typeChange:"typeChange"},decls:5,vars:1,consts:[[3,"change","value"],["value","USER"],["value","GROUP"]],template:function(n,r){n&1&&(O(0,"mat-radio-group",0),te("change",function(a){return r.typeChange.emit(a.value)}),O(1,"mat-radio-button",1),ee(2," mit Nutzer teilen "),M(),O(3,"mat-radio-button",2),ee(4," mit Gruppe teilen "),M()()),n&2&&D("value",r.type)},dependencies:[eK,h6],encapsulation:2})}return t})();var vce=class{userFilterCtrl=new ho(null);userOptions=[];userFilteredOptions;constructor(){this.userFilteredOptions=this.userFilterCtrl.valueChanges.pipe(ks(""),ot(i=>typeof i=="string"?i:""),ot(i=>i?this._filter(i):this.userOptions.slice()))}displayFn(i){return i&&i.displayName?i.displayName:""}_filter(i){let e=i.toLowerCase();return this.userOptions.filter(n=>zd.filterUserBySearchTerm(e,n))}};function Jqt(t,i){if(t&1&&(fi(0),O(1,"span",4),ee(2),M(),gi()),t&2){let e=L();E(2),gn("/ ",e.user==null?null:e.user.mail)}}function eYt(t,i){t&1&&(fi(0),O(1,"div")(2,"mat-icon",5),ee(3,"card_membership"),M()(),gi())}function tYt(t,i){t&1&&(fi(0),O(1,"div")(2,"mat-icon",6),ee(3,"block"),M()(),gi())}var PQe=(()=>{class t{user;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-user-search-item"]],inputs:{user:"user"},decls:13,vars:8,consts:[[1,"flex","flex-row","gap-1","items-center"],[1,"flex-1"],[1,"mat-body"],[4,"ngIf"],[1,"mat-caption"],["matTooltip","Externer Account"],["matTooltip","Nuzter ist gesperrt"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"span",2),ee(3),M(),ie(4,Jqt,3,1,"ng-container",3),O(5,"span",4),ee(6),M()(),ie(7,eYt,4,0,"ng-container",3)(8,tYt,4,0,"ng-container",3),O(9,"div")(10,"span",4),ee(11),Dr(12,"date"),M()()()),n&2&&(E(3),gn("",r.user==null?null:r.user.displayName," "),E(),D("ngIf",r.user==null?null:r.user.mail),E(2),gn(" / ",r.user==null?null:r.user.oid),E(),D("ngIf",r.user.type==="external"),E(),D("ngIf",!r.user.enabled),E(3),Pt(ca(12,6,r.user==null?null:r.user.createdDateTime)))},dependencies:[Xr,zr,Ld,Hp],encapsulation:2})}return t})();function iYt(t,i){if(t&1&&be(0,"bd-administration-user-search-item",3),t&2){let e=i.$implicit;D("user",e)}}var NQe=(()=>{class t extends vce{_cachedUserService;userSelect=new ve;items;constructor(e){super(),this._cachedUserService=e,this._cachedUserService.findAll().then(n=>this.userOptions=n),this.userFilteredOptions.subscribe(n=>this.items=n)}onSearch(e){this.userFilterCtrl.setValue(e.query)}onUserSelect(e){this.userSelect.emit(e.value)}static \u0275fac=function(n){return new(n||t)(xe(M5))};static \u0275cmp=re({type:t,selectors:[["bd-administration-user-search-all"]],outputs:{userSelect:"userSelect"},features:[Tt],decls:6,vars:4,consts:[["item",""],["optionLabel","displayName","dataKey","oid","fluid","","variant","filled","inputId","administration-user-search",3,"completeMethod","onSelect","virtualScroll","suggestions","virtualScrollItemSize","dropdown"],["for","administration-user-search"],[1,"w-full",3,"user"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-autocomplete",1),te("completeMethod",function(c){return se(o),le(r.onSearch(c))})("onSelect",function(c){return se(o),le(r.onUserSelect(c))}),ie(2,iYt,1,1,"ng-template",null,0,di),M(),O(4,"label",2),ee(5,"Nutzer"),M()()}n&2&&(E(),D("virtualScroll",!0)("suggestions",r.items)("virtualScrollItemSize",34)("dropdown",!0))},dependencies:[ra,oa,Pu,Ho,PQe],encapsulation:2})}return t})();function nYt(t,i){if(t&1&&ee(0),t&2){let e=i.$implicit;Pd(" ",e.permission," (",e.explanation,") ")}}var FQe=(()=>{class t{permissionOptions;permission;permissionSelect=new ve;overlayOptions={mode:"overlay",appendTo:"body"};onPermissionSelect(e){this.permissionSelect.emit(e.value)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-resources-share-dialog-permission"]],inputs:{permissionOptions:"permissionOptions",permission:"permission"},outputs:{permissionSelect:"permissionSelect"},decls:6,vars:2,consts:[["item",""],["inputId","permission-select","dataKey","permission","optionValue","permission","optionLabel","permission","fluid","","variant","filled",3,"onChange","options","overlayOptions"],["for","permission-select"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-select",1),te("onChange",function(c){return se(o),le(r.onPermissionSelect(c))}),ie(2,nYt,1,2,"ng-template",null,0,di),M(),O(4,"label",2),ee(5,"Berechtigung"),M()()}n&2&&(E(),D("options",r.permissionOptions)("overlayOptions",r.overlayOptions))},dependencies:[Ho,Us],encapsulation:2})}return t})();function rYt(t,i){if(t&1){let e=qe();fi(0),O(1,"div",3)(2,"bd-administration-user-search-all",12),te("userSelect",function(r){se(e);let o=L();return le(o.onUserChange(r))}),M()(),gi()}}function oYt(t,i){if(t&1){let e=qe();fi(0),O(1,"bd-administration-combined-group-select",13),te("groupSelect",function(r){se(e);let o=L();return le(o.onGroupChange(r))}),M(),gi()}}var f6=(()=>{class t{_resourcesService;_resourceAdminService;_dialogRef;data;permissionOptions;loading$=new Sa(ni.INIT);jobExecutor=new Ai;type="USER";user;group;permission="READ";shareChildren=!0;constructor(e,n,r,o){this._resourcesService=e,this._resourceAdminService=n,this._dialogRef=r,this.data=o;let a=this.data.resources.map(c=>c.permission).reduce((c,m)=>this._permissionWithLowerWeight(c,m));this.permissionOptions=_A.tree(a)}onTypeChange(e){this.type=e,e==="USER"?this.group=null:this.user=null}onUserChange(e){this.group=null,this.user=e}onGroupChange(e){this.user=null,this.group=e}onPermissionChange(e){this.permission=e}submit(){this.loading$.next(ni.LOADING);let e,n=this._getShareRecords();this.shareChildren?e=Ys(n.map(r=>this._getChildResourceShares(r))).pipe(ot(r=>r.reduce((o,a)=>o.concat(a),[])),ot(r=>r.concat(n))):e=$t(n),e.pipe(On(r=>this._getExistingShares().pipe(ar(1),ot(o=>{let a=this.user?"user":"group";return _ce.filterAlreadySharedResources(o,r,a)})))).subscribe(r=>{this.loading$.next(ni.SUCCESS);let o={items:r,fn:a=>this._resourceAdminService.share(a)};this.jobExecutor.next(o)})}onClose(){this._dialogRef.close(!0)}validShareParameter(){return(this.type==="USER"?!!this.user:!!this.group)&&!!this.permission}_getChildResourceShares(e){let n=Foe[e.resource_name];return n&&n.children&&n.children.length>0?this._resourcesService.of(e.resource_name).children(e.resource_id).pipe(ar(1),ot(o=>{let a=Object.keys(o),c=[];return a.forEach(m=>{o[m].forEach(g=>{let C={resource_id:g,resource_name:m,permission:e.permission};e.user_id?C.user_id=e.user_id:e.group_id&&(C.group_id=e.group_id),c.push(C)})}),c})):$t([])}_getExistingShares(){return this.type==="USER"?this._resourceAdminService.sharedRecordsByUserId(this.user.oid):this._resourceAdminService.sharedRecordsByGroupId(this.group.id)}_getShareRecords(){return this.data.resources.map(e=>{let n={resource_id:e.resource_id,resource_name:e.resource_name,permission:this.permission};return this.type==="USER"?n.user_id=this.user.oid:n.group_id=this.group.id,n})}_permissionWithLowerWeight(e,n){let r=_A.of(e),o=_A.of(n);return r.weight>o.weight?o.permission:r.permission}static \u0275fac=function(n){return new(n||t)(xe(Rw),xe(rf),xe(Im),xe(Z0))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:20,vars:9,consts:[["mat-dialog-title",""],[3,"cancel","jobExecutor"],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[3,"typeChange","type"],[4,"ngIf"],[3,"permissionSelect","permission","permissionOptions"],[3,"change","checked"],[1,"bd-container"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent",3,"click","disabled"],["mat-button","","mat-dialog-close",""],[3,"userSelect"],[3,"groupSelect"]],template:function(n,r){n&1&&(O(0,"h1",0),ee(1,"Resourcen teilen"),M(),O(2,"mat-dialog-content")(3,"bd-in-progress-indicator",1),te("cancel",function(){return r.onClose()}),O(4,"div",2)(5,"div",3)(6,"bd-administration-resources-share-dialog-type",4),te("typeChange",function(a){return r.onTypeChange(a)}),M()(),ie(7,rYt,3,0,"ng-container",5)(8,oYt,2,0,"ng-container",5),O(9,"div",3)(10,"bd-administration-resources-share-dialog-permission",6),te("permissionSelect",function(a){return r.onPermissionChange(a)}),M()(),O(11,"div",3)(12,"mat-checkbox",7),te("change",function(a){return r.shareChildren=a.checked}),ee(13," Mit Subresourcen teilen "),M()()(),O(14,"div",8)(15,"div",9)(16,"button",10),te("click",function(){return r.submit()}),ee(17),M(),O(18,"button",11),ee(19,"Abbrechen"),M()()()()()),n&2&&(E(3),D("jobExecutor",r.jobExecutor),E(3),D("type",r.type),E(),D("ngIf",r.type==="USER"),E(),D("ngIf",r.type==="GROUP"),E(2),D("permission",r.permission)("permissionOptions",r.permissionOptions),E(2),D("checked",r.shareChildren),E(4),D("disabled",!r.validShareParameter()),E(),gn(" ",r.data.resources.length," Resourcen freigeben "))},dependencies:[$_,lh,T5,Xr,cg,Kr,Kf,RQe,NQe,Joe,FQe],encapsulation:2})}return t})();var LQe=(()=>{class t{_permissionResourceService;_dialogRef;data;jobExecutor=new Ai;constructor(e,n,r){this._permissionResourceService=e,this._dialogRef=n,this.data=r}submit(){let e={items:this.data.resources,fn:n=>this._permissionResourceService.archive(n.resource_name,n.resource_id,n.id)};this.jobExecutor.next(e)}onClose(){this._dialogRef.close(!0)}static \u0275fac=function(n){return new(n||t)(xe(rf),xe(Im),xe(Z0))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:13,vars:2,consts:[["mat-dialog-title",""],[3,"cancel","jobExecutor"],[1,"flex","flex-col"],[1,"flex-1","mat-body"],[1,"flex","flex-row-reverse","gap-6"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","accent",3,"click"]],template:function(n,r){n&1&&(O(0,"h1",0),ee(1,"Resourcen archivieren"),M(),O(2,"mat-dialog-content")(3,"bd-in-progress-indicator",1),te("cancel",function(){return r.onClose()}),O(4,"div",2)(5,"span",3),ee(6),M(),O(7,"div")(8,"div",4)(9,"button",5),ee(10,"Abbrechen"),M(),O(11,"button",6),te("click",function(){return r.submit()}),ee(12," Archivieren "),M()()()()()()),n&2&&(E(3),D("jobExecutor",r.jobExecutor),E(3),gn("M\xF6chten Sie die ",r.data==null||r.data.resources==null?null:r.data.resources.length," Resourcen wirklich archivieren ?"))},dependencies:[$_,lh,T5,Kr,Kf],encapsulation:2})}return t})();var BQe=` .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 aYt=["content"],sYt=["dropdownicon"],lYt=["defaultbtn"],cYt=["menu"];function dYt(t,i){t&1&&Li(0)}function uYt(t,i){if(t&1){let e=qe();fi(0),O(1,"button",8),te("click",function(r){se(e);let o=L();return le(o.onDefaultButtonClick(r))}),ie(2,dYt,1,0,"ng-container",9),M(),gi()}if(t&2){let e=L();E(),Pe(e.cx("pcButton")),D("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),lt("tabindex",e.tabindex)("aria-label",(e.buttonProps==null?null:e.buttonProps.ariaLabel)||e.label),E(),D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)}}function pYt(t,i){if(t&1){let e=qe();O(0,"button",10,2),te("click",function(r){se(e);let o=L();return le(o.onDefaultButtonClick(r))}),M()}if(t&2){let e=L();Pe(e.cx("pcButton")),D("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),lt("tabindex",e.tabindex)("aria-label",e.buttonProps==null?null:e.buttonProps.ariaLabel)}}function mYt(t,i){if(t&1&&be(0,"span"),t&2){let e=L();Pe(e.dropdownIcon)}}function hYt(t,i){t&1&&(Pi(),be(0,"svg",12))}function fYt(t,i){}function gYt(t,i){t&1&&ie(0,fYt,0,0,"ng-template")}function _Yt(t,i){if(t&1&&(fi(0),ie(1,hYt,1,0,"svg",11)(2,gYt,1,0,null,9),gi()),t&2){let e=L();E(),D("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),E(),D("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}var yYt={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"},VQe=(()=>{class t extends br{name="splitbutton";theme=BQe;classes=yYt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var lL=(()=>{class t extends ur{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=hr(!1);_disabled;_componentStyle=ae(VQe);_contentTemplate;_dropdownIconTemplate;ngOnInit(){super.ngOnInit(),this.ariaId=fa("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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-splitbutton"],["p-splitButton"],["p-split-button"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,aYt,4),Vt(o,sYt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.dropdownIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(lYt,5),Xi(cYt,5)),n&2){let o;ze(o=Ue())&&(r.buttonViewChild=o.first),ze(o=Ue())&&(r.menu=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.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",En],menuButtonDisabled:[2,"menuButtonDisabled","menuButtonDisabled",Je],buttonDisabled:[2,"buttonDisabled","buttonDisabled",Je]},outputs:{onClick:"onClick",onMenuHide:"onMenuHide",onMenuShow:"onMenuShow",onDropdownClick:"onDropdownClick"},features:[Ii([VQe]),Tt],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(n,r){if(n&1){let o=qe();ie(0,uYt,3,15,"ng-container",3)(1,pYt,2,15,"ng-template",null,0,di),O(3,"button",4),te("click",function(c){return se(o),le(r.onDropdownButtonClick(c))})("keydown",function(c){return se(o),le(r.onDropdownButtonKeydown(c))}),ie(4,mYt,1,2,"span",5)(5,_Yt,3,2,"ng-container",6),M(),O(6,"p-tieredmenu",7,1),te("onHide",function(){return se(o),le(r.onHide())})("onShow",function(){return se(o),le(r.onShow())}),M()}if(n&2){let o=Oi(2);D("ngIf",r.contentTemplate||r._contentTemplate)("ngIfElse",o),E(3),Pe(r.cx("pcDropdown")),D("size",r.size)("severity",r.severity)("text",r.text)("outlined",r.outlined)("disabled",r.menuButtonDisabled),lt("aria-label",(r.menuButtonProps==null?null:r.menuButtonProps.ariaLabel)||r.expandAriaLabel)("aria-haspopup",(r.menuButtonProps==null?null:r.menuButtonProps.ariaHasPopup)||!0)("aria-expanded",(r.menuButtonProps==null?null:r.menuButtonProps.ariaExpanded)||r.isExpanded())("aria-controls",(r.menuButtonProps==null?null:r.menuButtonProps.ariaControls)||r.ariaId),E(),D("ngIf",r.dropdownIcon),E(),D("ngIf",!r.dropdownIcon),E(),is(r.menuStyle),D("id",r.ariaId)("popup",!0)("model",r.model)("styleClass",r.menuStyleClass)("appendTo",r.appendTo)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions)}},dependencies:[rr,Xr,Jr,aw,KN,Zh,Dm,Qc,sE,tg,Un],encapsulation:2,changeDetection:0})}return t})(),zQe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[lL,Un,Un]})}return t})();var UQe=` .p-tag { display: inline-flex; align-items: center; justify-content: center; background: dt('tag.primary.background'); color: dt('tag.primary.color'); font-size: dt('tag.font.size'); font-weight: dt('tag.font.weight'); padding: dt('tag.padding'); border-radius: dt('tag.border.radius'); gap: dt('tag.gap'); } .p-tag-icon { font-size: dt('tag.icon.size'); width: dt('tag.icon.size'); height: dt('tag.icon.size'); } .p-tag-rounded { border-radius: dt('tag.rounded.border.radius'); } .p-tag-success { background: dt('tag.success.background'); color: dt('tag.success.color'); } .p-tag-info { background: dt('tag.info.background'); color: dt('tag.info.color'); } .p-tag-warn { background: dt('tag.warn.background'); color: dt('tag.warn.color'); } .p-tag-danger { background: dt('tag.danger.background'); color: dt('tag.danger.color'); } .p-tag-secondary { background: dt('tag.secondary.background'); color: dt('tag.secondary.color'); } .p-tag-contrast { background: dt('tag.contrast.background'); color: dt('tag.contrast.color'); } `;var bYt=["icon"],CYt=["*"];function xYt(t,i){if(t&1&&be(0,"span",3),t&2){let e=L(2);Pe(e.cx("icon")),D("ngClass",e.icon)}}function SYt(t,i){if(t&1&&(fi(0),ie(1,xYt,1,3,"span",2),gi()),t&2){let e=L();E(),D("ngIf",e.icon)}}function wYt(t,i){}function IYt(t,i){t&1&&ie(0,wYt,0,0,"ng-template")}function TYt(t,i){if(t&1&&(O(0,"span"),ie(1,IYt,1,0,null,4),M()),t&2){let e=L();Pe(e.cx("icon")),E(),D("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)}}var EYt={root:({instance:t})=>["p-tag p-component",{"p-tag-info":t.severity==="info","p-tag-success":t.severity==="success","p-tag-warn":t.severity==="warn","p-tag-danger":t.severity==="danger","p-tag-secondary":t.severity==="secondary","p-tag-contrast":t.severity==="contrast","p-tag-rounded":t.rounded}],icon:"p-tag-icon",label:"p-tag-label"},HQe=(()=>{class t extends br{name="tag";theme=UQe;classes=EYt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var AYt=(()=>{class t extends ur{styleClass;severity;value;icon;rounded;iconTemplate;templates;_iconTemplate;_componentStyle=ae(HQe);ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break}})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-tag"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,bYt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.iconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cn(r.cx("root"),r.styleClass))},inputs:{styleClass:"styleClass",severity:"severity",value:"value",icon:"icon",rounded:[2,"rounded","rounded",Je]},features:[Ii([HQe]),Tt],ngContentSelectors:CYt,decls:5,vars:5,consts:[[4,"ngIf"],[3,"class",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(n,r){n&1&&(Kn(),Sn(0),ie(1,SYt,2,1,"ng-container",0)(2,TYt,2,3,"span",1),O(3,"span"),ee(4),M()),n&2&&(E(),D("ngIf",!r.iconTemplate&&!r._iconTemplate),E(),D("ngIf",r.iconTemplate||r._iconTemplate),E(),Pe(r.cx("label")),E(),Pt(r.value))},dependencies:[rr,qa,Xr,Jr,Un],encapsulation:2,changeDetection:0})}return t})(),GQe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[AYt,Un,Un]})}return t})();var DYt=()=>[5,10,25,50],kYt=()=>["resource_name","resource_id","user_id"],jQe=(t,i)=>["/resources",t,i],MYt=t=>["/groups",t],OYt=t=>["/users",t];function RYt(t,i){if(t&1){let e=qe();O(0,"div",5)(1,"div",6)(2,"bd-search-box",7),te("searchChange",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.trim(),"contains"))}),M()(),O(3,"div",6)(4,"p-splitButton",8),te("onClick",function(){se(e);let r=L();return le(r.shareMultipleResources(r.selection.selected))}),M()()()}if(t&2){let e=L();E(4),D("label",e.selection.selected.length+" Resource freigeben")("disabled",e.selection.isEmpty())("model",e.selectionMenu)}}function PYt(t,i){if(t&1){let e=qe();O(0,"p-select",13),te("onChange",function(r){let o=se(e).filterCallback;return le(o(r.value))}),M()}if(t&2){let e=i.$implicit,n=L(2);D("ngModel",e)("options",n.allResourceNames)}}function NYt(t,i){t&1&&(O(0,"tr")(1,"th",9),be(2,"p-tableHeaderCheckbox"),M(),O(3,"th"),ee(4,"Resource Type"),M(),O(5,"th"),ee(6,"Resource Name"),M(),O(7,"th"),ee(8,"Resource Id"),M(),O(9,"th"),ee(10,"Berechtigung"),M(),O(11,"th"),ee(12,"Besitzer"),M(),be(13,"th"),M(),O(14,"tr"),be(15,"th"),O(16,"th")(17,"p-columnFilter",10),ie(18,PYt,1,2,"ng-template",11),M()(),be(19,"th"),O(20,"th"),be(21,"p-columnFilter",12),M(),be(22,"th")(23,"th")(24,"th"),M()),t&2&&(E(17),D("showMenu",!1))}function FYt(t,i){if(t&1&&(fi(0),O(1,"div",20)(2,"mat-icon"),ee(3,"group"),M(),O(4,"a",15),ee(5),M()(),gi()),t&2){let e=L().$implicit;E(4),D("routerLink",Yi(2,MYt,e.group_id)),E(),gn(" ",e.group_id," ")}}function LYt(t,i){if(t&1&&(fi(0),O(1,"div",20)(2,"mat-icon"),ee(3,"person"),M(),O(4,"a",15),ee(5),M()(),gi()),t&2){let e=L().$implicit;E(4),D("routerLink",Yi(2,OYt,e.user_id)),E(),gn(" ",e.user_id," ")}}function BYt(t,i){if(t&1){let e=qe();O(0,"tr")(1,"td"),be(2,"p-tableCheckbox",14),M(),O(3,"td"),ee(4),M(),O(5,"td"),ee(6),Dr(7,"resourceDisplayName"),Dr(8,"async"),M(),O(9,"td")(10,"a",15),ee(11),M()(),O(12,"td"),ee(13),M(),O(14,"td"),ie(15,FYt,6,4,"ng-container",16)(16,LYt,6,4,"ng-container",16),M(),O(17,"td")(18,"a",17)(19,"mat-icon"),ee(20,"open_in_new"),M()(),O(21,"button",18),te("click",function(){let r=se(e).$implicit,o=L();return le(o.shareResource(r))}),O(22,"mat-icon"),ee(23,"share"),M()(),O(24,"button",19),te("click",function(){let r=se(e).$implicit,o=L();return le(o.archiveResource(r))}),O(25,"mat-icon"),ee(26,"archive"),M()()()()}if(t&2){let e=i.$implicit;E(2),D("value",e),E(2),Pt(e==null?null:e.resource_name),E(2),gn(" ",ca(8,12,gl(7,9,e.resource_id,e.resource_name))," "),E(4),D("routerLink",na(14,jQe,e.resource_name,e.resource_id)),E(),gn(" ",e==null?null:e.resource_id," "),E(2),Pt(e==null?null:e.permission),E(2),D("ngIf",e.group_id),E(),D("ngIf",e.user_id),E(2),D("routerLink",na(17,jQe,e.resource_name,e.resource_id))}}var bce=(()=>{class t extends FM{_dialog;_responsiveDialogService;_confirmDialog;_permissionResourceService;currentUser;resources;resourceChange=new ve;allResourceNames=[tn.APP_CONTENT_SNIPPET,tn.CLINICS_FILTER,tn.CLINIC_OPERATING_NUMBER_GROUP,tn.CODE_SPECTRUM,tn.FILE,tn.MARKET,tn.SCENARIO_ANALYSIS,tn.SCENARIO_ANALYSIS_OPEN_CLOSE,tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE,tn.VIRTUAL_CLINIC,tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD,tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP,tn.VIRTUAL_CLINIC_CZ,tn.VIRTUAL_CLINIC_REFERRAL_IMPORT];selectionMenu=[{label:"Archivieren",command:e=>this.archiveMultipleResources(this.selection.selected)}];constructor(e,n,r,o){super(),this._dialog=e,this._responsiveDialogService=n,this._confirmDialog=r,this._permissionResourceService=o}shareMultipleResources(e){let n=this._responsiveDialogService.config();n.data={resources:e,actionUserId:null},this._dialog.open(f6,n).afterClosed().pipe(vn(r=>!!r)).subscribe(()=>{this.selection.clear(),this.resourceChange.emit(!0)})}shareResource(e){return this.shareMultipleResources([e])}archiveMultipleResources(e){let n=this._responsiveDialogService.config();n.data={resources:e,actionUserId:null},this._dialog.open(LQe,n).afterClosed().pipe(vn(r=>!!r)).subscribe(()=>{this.selection.clear(),this.resourceChange.emit(!0)})}archiveResource(e){Hr(this._confirmDialog.get("Resource archivieren","M\xF6chten Sie die Resource wirklich archivieren ?","Archivieren")).pipe(vn(n=>!!n),ps(()=>this._permissionResourceService.archive(e.resource_name,e.resource_id,e.id))).subscribe(()=>this.resourceChange.emit(!0))}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm),xe(Vb),xe(rf))};static \u0275cmp=re({type:t,selectors:[["bd-administration-resources-list-items"]],inputs:{currentUser:"currentUser",resources:"resources"},outputs:{resourceChange:"resourceChange"},features:[Tt],decls:5,vars:8,consts:[["dataTable",""],["currentPageReportTemplate","{first} - {last} von {totalRecords}","selectionMode","multiple","dataKey","id",3,"selectionChange","value","paginator","rows","rowsPerPageOptions","showCurrentPageReport","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[1,"flex","flex-row-reverse","justify-between","items-center"],[1,"basis-1/4"],[3,"searchChange"],[3,"onClick","label","disabled","model"],[2,"width","4rem"],["field","resource_name","matchMode","equals",3,"showMenu"],["pTemplate","filter"],["type","text","field","resource_id","placeholder","Suche nach Resource Id","ariaLabel","Filter Resource Id","matchMode","equals"],["placeholder","Resource Type filtern","appendTo","body",3,"onChange","ngModel","options"],[3,"value"],["mat-button","","color","accent",3,"routerLink"],[4,"ngIf"],["mat-icon-button","","matTooltip","Resource Details \xF6ffnen","color","accent",3,"routerLink"],["mat-icon-button","","color","accent","matTooltip","Resource freigeben",3,"click"],["mat-icon-button","","color","accent","matTooltip","Resource archivieren",3,"click"],[1,"flex","flex-row"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-table",1,0),te("selectionChange",function(c){return se(o),le(r.updateSelection(c))}),ie(2,RYt,5,3,"ng-template",2)(3,NYt,25,1,"ng-template",3)(4,BYt,27,20,"ng-template",4),M()}n&2&&D("value",r.resources)("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(6,DYt))("showCurrentPageReport",!0)("globalFilterFields",Vr(7,kYt))},dependencies:[Td,rc,Tr,Mw,Ow,E1e,A5,zQe,lL,iw,zr,Ld,il,Xr,ere,Us,ra,yr,ya,GQe,Ms,BM,Dc],encapsulation:2})}return t})();function VYt(t,i){if(t&1){let e=qe();O(0,"bd-administration-resources-list-items",2),te("resourceChange",function(){se(e);let r=L();return le(r.ngOnInit())}),M()}if(t&2){let e=L();D("resources",e.resources)("currentUser",e.user)}}var $Qe=(()=>{class t{_permissionsResourcesAdminService;user;loading$=new hi(1);resources;constructor(e){this._permissionsResourcesAdminService=e}ngOnInit(){this.loading$.next(ni.LOADING),this.user.valid?this._permissionsResourcesAdminService.sharedRecordsByUserId(this.user.oid).subscribe(e=>{this.resources=e.reverse(),this.loading$.next(ni.SUCCESS)}):(this.resources=[],this.loading$.next(ni.SUCCESS))}static \u0275fac=function(n){return new(n||t)(xe(rf))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-users-details-resources"]],inputs:{user:"user"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"resourceChange","resources","currentUser"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,VYt,1,2,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,bce],encapsulation:2})}return t})();var qQe=` .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 Cce=["*"],zYt=["toggleicon"],UYt=t=>({active:t});function HYt(t,i){}function GYt(t,i){t&1&&ie(0,HYt,0,0,"ng-template")}function jYt(t,i){if(t&1&&ie(0,GYt,1,0,null,0),t&2){let e=L();D("ngTemplateOutlet",e.toggleicon)("ngTemplateOutletContext",Yi(2,UYt,e.active()))}}function $Yt(t,i){if(t&1&&be(0,"span",4),t&2){let e=L(3);Pe(e.pcAccordion.collapseIcon),D("ngClass",e.pcAccordion.iconClass),lt("aria-hidden",!0)}}function qYt(t,i){if(t&1&&(Pi(),be(0,"svg",5)),t&2){let e=L(3);Pe(e.pcAccordion.iconClass),lt("aria-hidden",!0)}}function YYt(t,i){if(t&1&&(fi(0),ie(1,$Yt,1,4,"span",2)(2,qYt,1,3,"svg",3),gi()),t&2){let e=L(2);E(),D("ngIf",e.pcAccordion.collapseIcon),E(),D("ngIf",!e.pcAccordion.collapseIcon)}}function KYt(t,i){if(t&1&&be(0,"span",4),t&2){let e=L(3);Pe(e.pcAccordion.expandIcon),D("ngClass",e.pcAccordion.iconClass),lt("aria-hidden",!0)}}function WYt(t,i){if(t&1&&(Pi(),be(0,"svg",7)),t&2){let e=L(3);Pe(e.pcAccordion.iconClass),lt("aria-hidden",!0)}}function QYt(t,i){if(t&1&&(fi(0),ie(1,KYt,1,4,"span",2)(2,WYt,1,3,"svg",6),gi()),t&2){let e=L(2);E(),D("ngIf",e.pcAccordion.expandIcon),E(),D("ngIf",!e.pcAccordion.expandIcon)}}function ZYt(t,i){if(t&1&&ie(0,YYt,3,2,"ng-container",1)(1,QYt,3,2,"ng-container",1),t&2){let e=L();D("ngIf",e.active()),E(),D("ngIf",!e.active())}}var YQe=t=>({transitionParams:t}),XYt=t=>({value:"visible",params:t}),JYt=t=>({value:"hidden",params:t}),eKt=` ${qQe} /*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; } `,tKt={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"},j2=(()=>{class t extends br{name="accordion";theme=eKt;classes=tKt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var yA=(()=>{class t extends ur{pcAccordion=ae(No(()=>aI));value=Pb(void 0);disabled=kr(!1,{transform:e=>FP(e)});active=Or(()=>this.pcAccordion.multiple()?this.valueEquals(this.pcAccordion.value(),this.value()):this.pcAccordion.value()===this.value());valueEquals(e,n){return Array.isArray(e)?e.includes(n):e===n}_componentStyle=ae(j2);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-accordion-panel"],["p-accordionpanel"]],hostVars:5,hostBindings:function(n,r){n&2&&(lt("data-pc-name","accordionpanel")("data-p-disabled",r.disabled())("data-p-active",r.active()),Pe(r.cx("panel")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[Ii([j2]),Tt],ngContentSelectors:Cce,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),cL=(()=>{class t extends ur{pcAccordion=ae(No(()=>aI));pcAccordionPanel=ae(No(()=>yA));id=Or(()=>`${this.pcAccordion.id()}_accordionheader_${this.pcAccordionPanel.value()}`);active=Or(()=>this.pcAccordionPanel.active());disabled=Or(()=>this.pcAccordionPanel.disabled());ariaControls=Or(()=>`${this.pcAccordion.id()}_accordioncontent_${this.pcAccordionPanel.value()}`);toggleicon;onClick(e){let n=this.active();this.changeActiveValue();let r=this.active(),o=this.pcAccordionPanel.value();!n&&r?this.pcAccordion.onOpen.emit({originalEvent:e,index:o}):n&&!r&&this.pcAccordion.onClose.emit({originalEvent:e,index:o})}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=ae(j2);changeActiveValue(){this.pcAccordion.updateValue(this.pcAccordionPanel.value())}findPanel(e){return e?.closest('[data-pc-name="accordionpanel"]')}findHeader(e){return $r(e,'[data-pc-name="accordionheader"]')}findNextPanel(e,n=!1){let r=n?e:e.nextElementSibling;return r?Qh(r,"data-p-disabled")?this.findNextPanel(r):this.findHeader(r):null}findPrevPanel(e,n=!1){let r=n?e:e.previousElementSibling;return r?Qh(r,"data-p-disabled")?this.findPrevPanel(r):this.findHeader(r):null}findFirstPanel(){return this.findNextPanel(this.pcAccordion.el.nativeElement.firstElementChild,!0)}findLastPanel(){return this.findPrevPanel(this.pcAccordion.el.nativeElement.lastElementChild,!0)}changeFocusedPanel(e,n){Ba(n)}arrowDownKey(e){let n=this.findNextPanel(this.findPanel(e.currentTarget));n?this.changeFocusedPanel(e,n):this.onHomeKey(e),e.preventDefault()}arrowUpKey(e){let n=this.findPrevPanel(this.findPanel(e.currentTarget));n?this.changeFocusedPanel(e,n):this.onEndKey(e),e.preventDefault()}onHomeKey(e){let n=this.findFirstPanel();this.changeFocusedPanel(e,n),e.preventDefault()}onEndKey(e){let n=this.findLastPanel();this.changeFocusedPanel(e,n),e.preventDefault()}onEnterKey(e){this.changeActiveValue(),e.preventDefault()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-accordion-header"],["p-accordionheader"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,zYt,5),n&2){let a;ze(a=Ue())&&(r.toggleicon=a.first)}},hostVars:13,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onClick(a)})("focus",function(a){return r.onFocus(a)})("keydown",function(a){return r.onKeydown(a)}),n&2&&(lt("id",r.id())("aria-expanded",r.active())("aria-controls",r.ariaControls())("aria-disabled",r.disabled())("role","button")("tabindex",r.disabled()?"-1":"0")("data-p-active",r.active())("data-p-disabled",r.disabled())("data-pc-name","accordionheader"),Pe(r.cx("header")),la("user-select","none"))},features:[Ii([j2]),BT([Qc]),Tt],ngContentSelectors:Cce,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(n,r){n&1&&(Kn(),Sn(0),yt(1,jYt,1,4)(2,ZYt,2,2)),n&2&&(E(),vt(r.toggleicon?1:2))},dependencies:[rr,qa,Xr,Jr,Dm,Oie],encapsulation:2,changeDetection:0})}return t})(),dL=(()=>{class t extends ur{pcAccordion=ae(No(()=>aI));pcAccordionPanel=ae(No(()=>yA));active=Or(()=>this.pcAccordionPanel.active());ariaLabelledby=Or(()=>`${this.pcAccordion.id()}_accordionheader_${this.pcAccordionPanel.value()}`);id=Or(()=>`${this.pcAccordion.id()}_accordioncontent_${this.pcAccordionPanel.value()}`);_componentStyle=ae(j2);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-accordion-content"],["p-accordioncontent"]],hostVars:7,hostBindings:function(n,r){n&2&&(lt("id",r.id())("role","region")("data-pc-name","accordioncontent")("data-p-active",r.active())("aria-labelledby",r.ariaLabelledby()),Pe(r.cx("contentContainer")))},features:[Ii([j2]),Tt],ngContentSelectors:Cce,decls:2,vars:11,template:function(n,r){n&1&&(Kn(),O(0,"div"),Sn(1),M()),n&2&&(Pe(r.cx("content")),D("@content",r.active()?Yi(5,XYt,Yi(3,YQe,r.pcAccordion.transitionOptions)):Yi(9,JYt,Yi(7,YQe,r.pcAccordion.transitionOptions))))},dependencies:[rr],encapsulation:2,data:{animation:[Wp("content",[J0("hidden",ul({height:"0",paddingBlockStart:"0",paddingBlockEnd:"0",borderBlockStartWidth:"0",borderBlockEndWidth:"0",visibility:"hidden"})),J0("visible",ul({height:"*"})),Oc("visible <=> hidden",[Jl("{{transitionParams}}")]),Oc("void => *",Jl(0))])]},changeDetection:0})}return t})(),aI=(()=>{class t extends ur{value=Pb(void 0);multiple=kr(!1,{transform:e=>FP(e)});styleClass;expandIcon;collapseIcon;selectOnFocus=kr(!1,{transform:e=>FP(e)});transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";onClose=new ve;onOpen=new ve;id=hr(fa("pn_id_"));_componentStyle=ae(j2);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 n=this.findNextHeaderAction(e.target.parentElement);n?this.changeFocusedTab(n):this.onTabHomeKey(e),e.preventDefault()}onTabArrowUpKey(e){let n=this.findPrevHeaderAction(e.target.parentElement);n?this.changeFocusedTab(n):this.onTabEndKey(e),e.preventDefault()}onTabHomeKey(e){let n=this.findFirstHeaderAction();this.changeFocusedTab(n),e.preventDefault()}changeFocusedTab(e){e&&Ba(e)}findNextHeaderAction(e,n=!1){let r=n?e:e.nextElementSibling,o=$r(r,'[data-pc-section="accordionheader"]');return o?Qh(o,"data-p-disabled")?this.findNextHeaderAction(o.parentElement):$r(o.parentElement,'[data-pc-section="accordionheader"]'):null}findPrevHeaderAction(e,n=!1){let r=n?e:e.previousElementSibling,o=$r(r,'[data-pc-section="accordionheader"]');return o?Qh(o,"data-p-disabled")?this.findPrevHeaderAction(o.parentElement):$r(o.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 n=this.findLastHeaderAction();this.changeFocusedTab(n),e.preventDefault()}getBlockableElement(){return this.el.nativeElement.children[0]}updateValue(e){let n=this.value();if(this.multiple()){let r=Array.isArray(n)?[...n]:[],o=r.indexOf(e);o!==-1?r.splice(o,1):r.push(e),this.value.set(r)}else n===e?this.value.set(void 0):this.value.set(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-accordion"]],hostVars:2,hostBindings:function(n,r){n&1&&te("keydown",function(a){return r.onKeydown(a)}),n&2&&Pe(r.cn(r.cx("root"),r.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:[Ii([j2]),Tt],ngContentSelectors:Cce,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),xce=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[aI,Un,yA,cL,dL,Un]})}return t})();var iKt=(t,i)=>i.featuresCategoryName;function nKt(t,i){if(t&1){let e=qe();fi(0),O(1,"div")(2,"div",4)(3,"p-checkbox",5),te("onChange",function(){let r=se(e).$implicit,o=L(4);return le(o.onFeaturePermissionToggle(r))}),M(),O(4,"label",6),ee(5),M()()(),gi()}if(t&2){let e=i.$implicit,n=L(4);E(3),D("value",e)("ngModel",n.enabledPermissions)("inputId",e),E(),D("for",e),E(),Pt(e)}}function rKt(t,i){if(t&1&&(O(0,"div")(1,"span",2),ee(2),M()(),O(3,"div"),ie(4,nKt,6,5,"ng-container",3),M()),t&2){let e=L().$implicit;E(2),Pt(e.displayName),E(2),D("ngForOf",e.permissions)}}function oKt(t,i){if(t&1&&yt(0,rKt,5,2),t&2){let e=i.$implicit;vt(e.permissions?0:-1)}}function aKt(t,i){if(t&1&&(O(0,"p-accordion-panel",1)(1,"p-accordion-header"),ee(2),M(),O(3,"p-accordion-content"),Qo(4,oKt,1,1,null,null,ms),M()()),t&2){let e=i.$implicit;D("value",e.featuresCategoryName),E(2),gn(" ",e.featuresCategoryName," "),E(2),Zo(e.features)}}var g6=(()=>{class t{enabledPermissions=[];enabledPermissionsChange=new ve;features=[{featuresCategoryName:"BinDoc",features:[...woe,t7e]},{featuresCategoryName:"BinDoc AT",features:[...jje,...i7e]},{featuresCategoryName:"BinDoc UK",features:[...$je,...r7e]},{featuresCategoryName:"BinDoc CH",features:[...n7e]},{featuresCategoryName:"Intuitive",features:[Wje,Qje,Zje,Xje,Jje]},{featuresCategoryName:"Hartmann",features:[qje,Yje,Kje]},{featuresCategoryName:"Hartmann CZ",features:[o7e,a7e]}];onFeaturePermissionToggle(e){let n=this.enabledPermissions.indexOf(e);n===-1?this.enabledPermissions.push(e):this.enabledPermissions.splice(n,1),this.enabledPermissionsChange.emit(this.enabledPermissions)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-feature-permissions-list"]],inputs:{enabledPermissions:"enabledPermissions"},outputs:{enabledPermissionsChange:"enabledPermissionsChange"},decls:3,vars:1,consts:[[3,"multiple"],[3,"value"],[1,"mat-subheading-2"],[4,"ngFor","ngForOf"],[1,"flex","items-center","gap-2"],[3,"onChange","value","ngModel","inputId"],[3,"for"]],template:function(n,r){n&1&&(O(0,"p-accordion",0),Qo(1,aKt,6,2,"p-accordion-panel",1,iKt),M()),n&2&&(D("multiple",!0),E(),Zo(r.features))},dependencies:[Vl,qg,ra,yr,ya,aI,yA,cL,dL],encapsulation:2})}return t})();function sKt(t,i){if(t&1&&be(0,"bd-feature-permissions-list",4),t&2){let e=L();D("enabledPermissions",e.enabledFeaturePermissions)}}var WQe=(()=>{class t{_featurePermissionAdminService;user;loading$=new hi(1);enabledFeaturePermissions;constructor(e){this._featurePermissionAdminService=e}ngOnInit(){this.user&&(this.loading$.next(ni.LOADING),this._featurePermissionAdminService.getAllPermissions(this.user.oid).then(e=>e).then(e=>this.enabledFeaturePermissions=[...e.map(n=>n.permission)]).then(()=>this.loading$.next(ni.SUCCESS)))}static \u0275fac=function(n){return new(n||t)(xe(f5))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-users-details-feature-permissions"]],inputs:{user:"user"},decls:9,vars:2,consts:[["successTpl",""],[1,"mat-caption"],[1,"bd-container"],[3,"loadItem","successTemplate"],[3,"enabledPermissions"]],template:function(n,r){if(n&1&&(O(0,"mat-toolbar")(1,"mat-icon"),ee(2,"lock"),M(),O(3,"span",1),ee(4,"Berechtigungen k\xF6nnen nur auf Kunden- und Gruppen-Ebene ge\xE4ndert werden"),M()(),O(5,"div",2),be(6,"bd-loader",3),M(),ie(7,sKt,1,1,"ng-template",null,0,di)),n&2){let o=Oi(8);E(6),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[nM,zr,fr,g6],encapsulation:2})}return t})();var lEe=["*"];function lKt(t,i){t&1&&Sn(0)}var cKt=["tabListContainer"],dKt=["tabList"],uKt=["tabListInner"],pKt=["nextPaginator"],mKt=["previousPaginator"],hKt=["content"];function fKt(t,i){}var gKt=["tabBodyWrapper"],_Kt=["tabHeader"];function yKt(t,i){}function vKt(t,i){if(t&1&&ie(0,yKt,0,0,"ng-template",12),t&2){let e=L().$implicit;D("cdkPortalOutlet",e.templateLabel)}}function bKt(t,i){if(t&1&&ee(0),t&2){let e=L().$implicit;Pt(e.textLabel)}}function CKt(t,i){if(t&1){let e=qe();O(0,"div",7,2),te("click",function(){let r=se(e),o=r.$implicit,a=r.$index,c=L(),m=Oi(1);return le(c._handleClick(o,m,a))})("cdkFocusChange",function(r){let o=se(e).$index,a=L();return le(a._tabFocusChanged(r,o))}),be(2,"span",8)(3,"div",9),O(4,"span",10)(5,"span",11),yt(6,vKt,1,1,null,12)(7,bKt,1,1),M()()()}if(t&2){let e=i.$implicit,n=i.$index,r=Oi(1),o=L();Pe(e.labelClass),zn("mdc-tab--active",o.selectedIndex===n),D("id",o._getTabLabelId(e,n))("disabled",e.disabled)("fitInkBarToContent",o.fitInkBarToContent),lt("tabIndex",o._getTabIndex(n))("aria-posinset",n+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(n))("aria-selected",o.selectedIndex===n)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),E(3),D("matRippleTrigger",r)("matRippleDisabled",e.disabled||o.disableRipple),E(3),vt(e.templateLabel?6:7)}}function xKt(t,i){t&1&&Sn(0)}function SKt(t,i){if(t&1){let e=qe();O(0,"mat-tab-body",13),te("_onCentered",function(){se(e);let r=L();return le(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){se(e);let o=L();return le(o._setTabBodyWrapperHeight(r))})("_beforeCentering",function(r){se(e);let o=L();return le(o._bodyCentered(r))}),M()}if(t&2){let e=i.$implicit,n=i.$index,r=L();Pe(e.bodyClass),D("id",r._getTabContentId(n))("content",e.content)("position",e.position)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),lt("tabindex",r.contentTabIndex!=null&&r.selectedIndex===n?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(e,n))("aria-hidden",r.selectedIndex!==n)}}var wKt=new Mi("MatTabContent"),tK=(()=>{class t{template=ae(Bl);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matTabContent",""]],features:[Ii([{provide:wKt,useExisting:t}])]})}return t})(),IKt=new Mi("MatTabLabel"),JQe=new Mi("MAT_TAB"),TKt=(()=>{class t extends Kze{_closestTab=ae(JQe,{optional:!0});static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[Ii([{provide:IKt,useExisting:t}]),Tt]})}return t})(),eZe=new Mi("MAT_TAB_GROUP"),iK=(()=>{class t{_viewContainerRef=ae($l);_closestTabGroup=ae(eZe,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new Ai;position=null;origin=null;isActive=!1;constructor(){ae(pc).load(gp)}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Yh(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-tab"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,TKt,5),Vt(o,tK,7,Bl)),n&2){let a;ze(a=Ue())&&(r.templateLabel=a.first),ze(a=Ue())&&(r._explicitContent=a.first)}},viewQuery:function(n,r){if(n&1&&Xi(Bl,7),n&2){let o;ze(o=Ue())&&(r._implicitContent=o.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(n,r){n&2&<("id",null)},inputs:{disabled:[2,"disabled","disabled",Je],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[Ii([{provide:JQe,useExisting:t}]),Yt],ngContentSelectors:lEe,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),VT(0,lKt,1,0,"ng-template"))},encapsulation:2})}return t})(),rEe="mdc-tab-indicator--active",QQe="mdc-tab-indicator--no-transition",oEe=class{_items;_currentItem;constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar()),this._currentItem=void 0}alignToElement(i){let e=this._items.find(r=>r.elementRef.nativeElement===i),n=this._currentItem;if(e!==n&&(n?.deactivateInkBar(),e)){let r=n?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(r),this._currentItem=e}}},EKt=(()=>{class t{_elementRef=ae(qn);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(e){this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(e){let n=this._elementRef.nativeElement;if(!e||!n.getBoundingClientRect||!this._inkBarContentElement){n.classList.add(rEe);return}let r=n.getBoundingClientRect(),o=e.width/r.width,a=e.left-r.left;n.classList.add(QQe),this._inkBarContentElement.style.setProperty("transform",`translateX(${a}px) scaleX(${o})`),n.getBoundingClientRect(),n.classList.remove(QQe),n.classList.add(rEe),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(rEe)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let e=this._elementRef.nativeElement.ownerDocument||document,n=this._inkBarElement=e.createElement("span"),r=this._inkBarContentElement=e.createElement("span");n.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",n.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let e=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;e.appendChild(this._inkBarElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",Je]}})}return t})();var tZe=(()=>{class t extends EKt{elementRef=ae(qn);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(n,r){n&2&&(lt("aria-disabled",!!r.disabled),zn("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[2,"disabled","disabled",Je]},features:[Tt]})}return t})(),ZQe={passive:!0},AKt=650,DKt=100,kKt=(()=>{class t{_elementRef=ae(qn);_changeDetectorRef=ae(dn);_viewportRuler=ae(Fb);_dir=ae(Du,{optional:!0});_ngZone=ae(Pn);_platform=ae(_s);_sharedResizeObserver=ae(Vie);_injector=ae(Ir);_renderer=ae(Ma);_animationsDisabled=tl();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new Ai;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new Ai;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let n=isNaN(e)?0:e;this._selectedIndex!=n&&(this._selectedIndexChanged=!0,this._selectedIndex=n,this._keyManager&&this._keyManager.updateActiveItem(n))}_selectedIndex=0;selectFocusedIndex=new ve;indexFocused=new ve;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),ZQe),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),ZQe))}ngAfterContentInit(){let e=this._dir?this._dir.change:$t("ltr"),n=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(Hh(32),ha(this._destroyed)),r=this._viewportRuler.change(150).pipe(ha(this._destroyed)),o=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new ew(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),Rd(o,{injector:this._injector}),Vp(e,r,n,this._items.changes,this._itemsResized()).pipe(ha(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),o()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(a=>{this.indexFocused.emit(a),this._setTabFocus(a)})}_itemsResized(){return typeof ResizeObserver!="function"?Xd:this._items.changes.pipe(ks(this._items),On(e=>new qo(n=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(o=>n.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),QR(1),vn(e=>e.some(n=>n.contentRect.width>0&&n.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(e=>e()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!Au(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let n=this._items.get(this.focusIndex);n&&!n.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager?.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return this._items?!!this._items.toArray()[e]:!0}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let n=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?n.scrollLeft=0:n.scrollLeft=n.scrollWidth-n.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,n=this._getLayoutDirection()==="ltr"?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(n)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){let n=this._tabListContainer.nativeElement.offsetWidth,r=(e=="before"?-1:1)*n/3;return this._scrollTo(this._scrollDistance+r)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let n=this._items?this._items.toArray()[e]:null;if(!n)return;let r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:a}=n.elementRef.nativeElement,c,m;this._getLayoutDirection()=="ltr"?(c=o,m=c+a):(m=this._tabListInner.nativeElement.offsetWidth-o,c=m-a);let g=this.scrollDistance,C=this.scrollDistance+r;cC&&(this.scrollDistance+=Math.min(m-C,c-g))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth,n=this._elementRef.nativeElement.offsetWidth,r=e-n>=5;r||(this.scrollDistance=0),r!==this._showPaginationControls&&(this._showPaginationControls=r,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let e=this._tabListInner.nativeElement.scrollWidth,n=this._tabListContainer.nativeElement.offsetWidth;return e-n||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,n=e?e.elementRef.nativeElement:null;n?this._inkBar.alignToElement(n):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,n){n&&n.button!=null&&n.button!==0||(this._stopInterval(),cv(AKt,DKt).pipe(ha(Vp(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:r,distance:o}=this._scrollHeader(e);(o===0||o>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let n=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(n,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:n,distance:this._scrollDistance}}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,inputs:{disablePagination:[2,"disablePagination","disablePagination",Je],selectedIndex:[2,"selectedIndex","selectedIndex",En]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return t})(),MKt=(()=>{class t extends kKt{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new oEe(this._items),super.ngAfterContentInit()}_itemSelected(e){e.preventDefault()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["mat-tab-header"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,tZe,4),n&2){let a;ze(a=Ue())&&(r._items=a)}},viewQuery:function(n,r){if(n&1&&(Xi(cKt,7),Xi(dKt,7),Xi(uKt,7),Xi(pKt,5),Xi(mKt,5)),n&2){let o;ze(o=Ue())&&(r._tabListContainer=o.first),ze(o=Ue())&&(r._tabList=o.first),ze(o=Ue())&&(r._tabListInner=o.first),ze(o=Ue())&&(r._nextPaginator=o.first),ze(o=Ue())&&(r._previousPaginator=o.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(n,r){n&2&&zn("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl",r._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",Je]},features:[Tt],ngContentSelectors:lEe,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(n,r){if(n&1){let o=qe();Kn(),O(0,"div",5,0),te("click",function(){return se(o),le(r._handlePaginatorClick("before"))})("mousedown",function(c){return se(o),le(r._handlePaginatorPress("before",c))})("touchend",function(){return se(o),le(r._stopInterval())}),be(2,"div",6),M(),O(3,"div",7,1),te("keydown",function(c){return se(o),le(r._handleKeydown(c))}),O(5,"div",8,2),te("cdkObserveContent",function(){return se(o),le(r._onContentChanges())}),O(7,"div",9,3),Sn(9),M()()(),O(10,"div",10,4),te("mousedown",function(c){return se(o),le(r._handlePaginatorPress("after",c))})("click",function(){return se(o),le(r._handlePaginatorClick("after"))})("touchend",function(){return se(o),le(r._stopInterval())}),be(12,"div",6),M()}n&2&&(zn("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),D("matRippleDisabled",r._disableScrollBefore||r.disableRipple),E(3),zn("_mat-animation-noopable",r._animationsDisabled),E(2),lt("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby||null),E(5),zn("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),D("matRippleDisabled",r._disableScrollAfter||r.disableRipple))},dependencies:[Wh,Vte],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}} `],encapsulation:2})}return t})(),OKt=new Mi("MAT_TABS_CONFIG"),XQe=(()=>{class t extends Gp{_host=ae(aEe);_ngZone=ae(Pn);_centeringSub=Ia.EMPTY;_leavingSub=Ia.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(ks(this._host._isCenterPosition())).subscribe(e=>{this._host._content&&e&&!this.hasAttached()&&this._ngZone.run(()=>{Promise.resolve().then(),this.attach(this._host._content)})}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this._ngZone.run(()=>this.detach())})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","matTabBodyHost",""]],features:[Tt]})}return t})(),aEe=(()=>{class t{_elementRef=ae(qn);_dir=ae(Du,{optional:!0});_ngZone=ae(Pn);_injector=ae(Ir);_renderer=ae(Ma);_diAnimationsDisabled=tl();_eventCleanups;_initialized;_fallbackTimer;_positionIndex;_dirChangeSubscription=Ia.EMPTY;_position;_previousPosition;_onCentering=new ve;_beforeCentering=new ve;_afterLeavingCenter=new ve;_onCentered=new ve(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(){if(this._dir){let e=ae(dn);this._dirChangeSubscription=this._dir.change.subscribe(n=>{this._computePositionAnimationState(n),e.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),Rd(()=>this._onCentering.emit(this._elementRef.nativeElement.clientHeight),{injector:this._injector})),this._initialized=!0}ngOnDestroy(){clearTimeout(this._fallbackTimer),this._eventCleanups?.forEach(e=>e()),this._dirChangeSubscription.unsubscribe()}_bindTransitionEvents(){this._ngZone.runOutsideAngular(()=>{let e=this._elementRef.nativeElement,n=r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.remove("mat-tab-body-animating"),r.type==="transitionend"&&this._transitionDone())};this._eventCleanups=[this._renderer.listen(e,"transitionstart",r=>{r.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.add("mat-tab-body-animating"),this._transitionStarted())}),this._renderer.listen(e,"transitionend",n),this._renderer.listen(e,"transitioncancel",n)]})}_transitionStarted(){clearTimeout(this._fallbackTimer);let e=this._position==="center";this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_transitionDone(){this._position==="center"?this._onCentered.emit():this._previousPosition==="center"&&this._afterLeavingCenter.emit()}_setActiveClass(e){this._elementRef.nativeElement.classList.toggle("mat-mdc-tab-body-active",e)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(){return this._positionIndex===0}_computePositionAnimationState(e=this._getLayoutDirection()){this._previousPosition=this._position,this._positionIndex<0?this._position=e=="ltr"?"left":"right":this._positionIndex>0?this._position=e=="ltr"?"right":"left":this._position="center",this._animationsDisabled()?this._simulateTransitionEvents():this._initialized&&(this._position==="center"||this._previousPosition==="center")&&(clearTimeout(this._fallbackTimer),this._fallbackTimer=this._ngZone.runOutsideAngular(()=>setTimeout(()=>this._simulateTransitionEvents(),100)))}_simulateTransitionEvents(){this._transitionStarted(),Rd(()=>this._transitionDone(),{injector:this._injector})}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0ms"||this.animationDuration==="0s"}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-tab-body"]],viewQuery:function(n,r){if(n&1&&(Xi(XQe,5),Xi(hKt,5)),n&2){let o;ze(o=Ue())&&(r._portalHost=o.first),ze(o=Ue())&&(r._contentElement=o.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(n,r){n&2&<("inert",r._position==="center"?null:"")},inputs:{_content:[0,"content","_content"],animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(n,r){n&1&&(O(0,"div",1,0),ie(2,fKt,0,0,"ng-template",2),M()),n&2&&zn("mat-tab-body-content-left",r._position==="left")("mat-tab-body-content-right",r._position==="right")("mat-tab-body-content-can-animate",r._position==="center"||r._previousPosition==="center")},dependencies:[XQe,w7],styles:[`.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)} `],encapsulation:2})}return t})(),Sce=(()=>{class t{_elementRef=ae(qn);_changeDetectorRef=ae(dn);_ngZone=ae(Pn);_tabsSubscription=Ia.EMPTY;_tabLabelSubscription=Ia.EMPTY;_tabBodySubscription=Ia.EMPTY;_diAnimationsDisabled=tl();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new Uf;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=e,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=isNaN(e)?null:e}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(e){let n=e+"";this._animationDuration=/^\d+$/.test(n)?e+"ms":n}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=isNaN(e)?null:e}_contentTabIndex;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let n=this._elementRef.nativeElement.classList;n.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&n.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new ve;focusChange=new ve;animationDone=new ve;selectedTabChange=new ve(!0);_groupId;_isServer=!ae(_s).isBrowser;constructor(){let e=ae(OKt,{optional:!0});this._groupId=ae(Tl).getId("mat-tab-group-"),this.animationDuration=e&&e.animationDuration?e.animationDuration:"500ms",this.disablePagination=e&&e.disablePagination!=null?e.disablePagination:!1,this.dynamicHeight=e&&e.dynamicHeight!=null?e.dynamicHeight:!1,e?.contentTabIndex!=null&&(this.contentTabIndex=e.contentTabIndex),this.preserveContent=!!e?.preserveContent,this.fitInkBarToContent=e&&e.fitInkBarToContent!=null?e.fitInkBarToContent:!1,this.stretchTabs=e&&e.stretchTabs!=null?e.stretchTabs:!0,this.alignTabs=e&&e.alignTabs!=null?e.alignTabs:null}ngAfterContentChecked(){let e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){let n=this._selectedIndex==null;if(!n){this.selectedTabChange.emit(this._createChangeEvent(e));let r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,o)=>r.isActive=o===e),n||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((n,r)=>{n.position=r-e,this._selectedIndex!=null&&n.position==0&&!n.origin&&(n.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){let n=this._tabs.toArray(),r;for(let o=0;o{n[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}ngAfterViewInit(){this._tabBodySubscription=this._tabBodies.changes.subscribe(()=>this._bodyCentered(!0))}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(ks(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(n=>n._closestTabGroup===this||!n._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe(),this._tabBodySubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){let n=this._tabHeader;n&&(n.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){let n=new sEe;return n.index=e,this._tabs&&this._tabs.length&&(n.tab=this._tabs.toArray()[e]),n}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Vp(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e,n){return e.id||`${this._groupId}-label-${n}`}_getTabContentId(e){return`${this._groupId}-content-${e}`}_setTabBodyWrapperHeight(e){if(!this.dynamicHeight||!this._tabBodyWrapperHeight){this._tabBodyWrapperHeight=e;return}let n=this._tabBodyWrapper.nativeElement;n.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(n.style.height=e+"px")}_removeTabBodyWrapperHeight(){let e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this._ngZone.run(()=>this.animationDone.emit())}_handleClick(e,n,r){n.focusIndex=r,e.disabled||(this.selectedIndex=r)}_getTabIndex(e){let n=this._lastFocusedTabIndex??this.selectedIndex;return e===n?0:-1}_tabFocusChanged(e,n){e&&e!=="mouse"&&e!=="touch"&&(this._tabHeader.focusIndex=n)}_bodyCentered(e){e&&this._tabBodies?.forEach((n,r)=>n._setActiveClass(r===this._selectedIndex))}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0"||this.animationDuration==="0ms"}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-tab-group"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,iK,5),n&2){let a;ze(a=Ue())&&(r._allTabs=a)}},viewQuery:function(n,r){if(n&1&&(Xi(gKt,5),Xi(_Kt,5),Xi(aEe,5)),n&2){let o;ze(o=Ue())&&(r._tabBodyWrapper=o.first),ze(o=Ue())&&(r._tabHeader=o.first),ze(o=Ue())&&(r._tabBodies=o)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(n,r){n&2&&(lt("mat-align-tabs",r.alignTabs),Pe("mat-"+(r.color||"primary")),la("--mat-tab-animation-duration",r.animationDuration),zn("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header",r.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",Je],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",Je],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",Je],selectedIndex:[2,"selectedIndex","selectedIndex",En],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",En],disablePagination:[2,"disablePagination","disablePagination",Je],disableRipple:[2,"disableRipple","disableRipple",Je],preserveContent:[2,"preserveContent","preserveContent",Je],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[Ii([{provide:eZe,useExisting:t}])],ngContentSelectors:lEe,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","class","content","position","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","_beforeCentering","id","content","position","animationDuration","preserveContent"]],template:function(n,r){if(n&1){let o=qe();Kn(),O(0,"mat-tab-header",3,0),te("indexFocused",function(c){return se(o),le(r._focusChanged(c))})("selectFocusedIndex",function(c){return se(o),le(r.selectedIndex=c)}),Qo(2,CKt,8,17,"div",4,ms),M(),yt(4,xKt,1,0),O(5,"div",5,1),Qo(7,SKt,1,10,"mat-tab-body",6,ms),M()}n&2&&(D("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination),uc("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),E(2),Zo(r._tabs),E(2),vt(r._isServer?4:-1),E(),zn("_mat-animation-noopable",r._animationsDisabled()),E(2),Zo(r._tabs))},dependencies:[MKt,tZe,kve,Wh,Gp,aEe],styles:[`.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important} `],encapsulation:2})}return t})(),sEe=class{index;tab};var RKt=()=>["/users"];function PKt(t,i){t&1&&(fi(0),O(1,"mat-toolbar",19)(2,"span",20),ee(3,"Nutzer ist gel\xF6scht oder unbekannt !"),M()(),gi())}function NKt(t,i){t&1&&(fi(0),O(1,"mat-toolbar",19)(2,"span",20),ee(3,"Nutzer ist gesperrt, die Anmeldung ist blockiert"),M()(),gi())}function FKt(t,i){if(t&1){let e=qe();fi(0),O(1,"div")(2,"button",21),te("click",function(){se(e);let r=L(2);return le(r.disableUser())}),ee(3," Nutzer sperren "),M()(),gi()}}function LKt(t,i){if(t&1){let e=qe();fi(0),O(1,"button",22),te("click",function(){se(e);let r=L(2);return le(r.enableUser())}),ee(2),M(),gi()}if(t&2){let e=L(2);E(2),gn(" ",e.user.displayName," entsperren ")}}function BKt(t,i){if(t&1&&be(0,"bd-permissions-users-details-feature-permissions",23),t&2){let e=L(2);D("user",e.user)}}function VKt(t,i){if(t&1&&be(0,"bd-permissions-users-details-resources",23),t&2){let e=L(2);D("user",e.user)}}function zKt(t,i){if(t&1&&be(0,"bd-permissions-users-details-companies",23),t&2){let e=L(2);D("user",e.user)}}function UKt(t,i){if(t&1&&(ie(0,PKt,4,0,"ng-container",5)(1,NKt,4,0,"ng-container",5),O(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"div")(7,"div",10)(8,"div",11)(9,"span",12),ee(10,"ID"),M()(),O(11,"span",13),ee(12),M(),O(13,"div")(14,"button",14)(15,"mat-icon"),ee(16,"file_copy"),M()()()()(),O(17,"div",8)(18,"div",10)(19,"div",11)(20,"span",12),ee(21,"Email"),M()(),O(22,"span",13),ee(23),M(),O(24,"div")(25,"button",14)(26,"mat-icon"),ee(27,"file_copy"),M()()()()()()(),O(28,"div",8)(29,"div",3),ie(30,FKt,4,0,"ng-container",5)(31,LKt,3,1,"ng-container",5),M()()()(),be(32,"mat-divider"),O(33,"div",2)(34,"mat-tab-group")(35,"mat-tab",15),ie(36,BKt,1,1,"ng-template",16),M(),O(37,"mat-tab",17),ie(38,VKt,1,1,"ng-template",16),M(),O(39,"mat-tab",18),ie(40,zKt,1,1,"ng-template",16),M()()()),t&2){let e=L();D("ngIf",!e.user.valid),E(),D("ngIf",!e.user.enabled),E(11),Pt(e.user.oid),E(2),D("cdkCopyToClipboard",e.user.oid),E(9),Pt(e.user==null?null:e.user.mail),E(2),D("cdkCopyToClipboard",e.user==null?null:e.user.mail),E(5),D("ngIf",e.user.enabled),E(),D("ngIf",!e.user.enabled)}}var iZe=(()=>{class t{_route;_permissionsUserService;loading$=new hi(1);userId;user;constructor(e,n){this._route=e,this._permissionsUserService=n}ngOnInit(){this._route.params.subscribe(e=>{this.userId=e.userId,this.fetchData()})}fetchData(){this.loading$.next(ni.LOADING),this._permissionsUserService.getById(this.userId,!1).pipe(ot(e=>zd.unsafe(this.userId,e)),Ac(()=>$t(zd.ofUnknown(this.userId)))).subscribe(e=>{this.user=e,this.loading$.next(ni.SUCCESS)})}disableUser(){this._permissionsUserService.disable(this.user.oid).subscribe(()=>this.fetchData())}enableUser(){this._permissionsUserService.enable(this.user.oid).subscribe(()=>this.fetchData())}static \u0275fac=function(n){return new(n||t)(xe(id),xe($g))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:12,vars:5,consts:[["successContent",""],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[4,"ngIf"],[1,"bd-container"],[1,"flex","flex-row","gap-6"],[1,"flex-1"],[1,"flex","flex-col"],[1,"flex","flex-row","gap-6","items-center"],[1,"basis-8"],[1,"mat-caption"],[1,"flex-1","mat-body-2"],["mat-icon-button","","color","accent",3,"cdkCopyToClipboard"],["label","Feature Berechtigungen"],["matTabContent",""],["label","Resources"],["label","Kunden"],["color","warn"],[1,"mat-body"],["mat-button","","color","warn",3,"click"],["mat-button","",3,"click"],[3,"user"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2),M()(),be(3,"bd-loader",1)(4,"mat-divider"),O(5,"div",2)(6,"div",3)(7,"a",4)(8,"span"),ee(9,"Zur \xDCbersicht"),M()()()(),ie(10,UKt,41,8,"ng-template",null,0,di)),n&2){let o=Oi(11);E(2),Pt(r.user==null?null:r.user.displayName),E(),D("loadItem",r.loading$)("successTemplate",o),E(4),D("routerLink",Vr(4,RKt))}},dependencies:[zl,fr,Id,iw,Ms,Xr,nM,il,m5,zr,Sce,iK,tK,WQe,$Qe,kQe],encapsulation:2})}return t})();var wce=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-users-hint"]],decls:2,vars:0,consts:[[1,"bd-container-inner"],["severity","info","styleClass","w-full","text","Nutzer werden global f\xFCr alle Systeme (Staging, Production) angelegt"]],template:function(n,r){n&1&&(O(0,"div",0),be(1,"p-message",1),M())},dependencies:[fae,iF],encapsulation:2})}return t})();function HKt(t,i){if(t&1&&(O(0,"div",2)(1,"span",21),ee(2),M()()),t&2){let e=L(2);E(2),Pt(e.errorMessage)}}function GKt(t,i){if(t&1){let e=qe();yt(0,HKt,3,1,"div",2),O(1,"form",3),te("ngSubmit",function(){se(e);let r=L();return le(r.createUser())}),O(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",5)(6,"mat-form-field")(7,"mat-label"),ee(8,"Vorname"),M(),be(9,"input",7),M()(),O(10,"div",5)(11,"mat-form-field")(12,"mat-label"),ee(13,"Nachname"),M(),be(14,"input",8),M()()(),O(15,"div",5)(16,"mat-form-field")(17,"mat-label"),ee(18,"Email"),M(),be(19,"input",9),M()(),O(20,"div",5)(21,"div",10)(22,"div",5)(23,"mat-form-field")(24,"mat-label"),ee(25,"Passwort"),M(),be(26,"input",11),M()(),O(27,"div",5)(28,"button",12),te("click",function(){se(e);let r=L();return le(r.generateRandomPassword())}),ee(29," Neues Passwort generieren "),M()()()(),O(30,"div",5)(31,"div",6)(32,"div",5)(33,"p-iftalabel"),be(34,"p-multiSelect",13),O(35,"label",14),ee(36,"Zu Kunden hinzuf\xFCgen"),M()()(),O(37,"div",5)(38,"p-iftalabel"),be(39,"p-multiSelect",15),O(40,"label",16),ee(41,"F\xFCr Kontakt zust\xE4ndiger Mitarbeiter"),M()()()()()()(),O(42,"div",17)(43,"div",18)(44,"button",19),ee(45," Nutzer erstellen "),M()(),O(46,"div",18)(47,"button",20),ee(48,"Abbrechen"),M()()()()}if(t&2){let e=L();vt(e.errorMessage?0:-1),E(),D("formGroup",e.creationForm),E(33),D("options",e.allCompanies),E(5),D("options",e.allEmploys)("selectionLimit",1),E(5),D("disabled",e.creationForm.invalid)}}var nZe=(()=>{class t{_router;_companyService;_userService;_userCache;loading$=new Sa(ni.INIT);errorMessage;allCompanies;allEmploys=[{hubspotId:"250721862",name:"Anne Demond"},{hubspotId:"34578586",name:"Manuel Heurich"},{hubspotId:"34846418",name:"Markus Schicktanz"},{hubspotId:"35049636",name:"Maximilian Schmid"},{hubspotId:"108938088",name:"Michele D\xF6bler-Bakalli"},{hubspotId:"164373324",name:"Verena Schiefelbein"}];creationForm=new Mu({firstNameCtrl:new ho(null,[La.required]),lastNameCtrl:new ho(null,[La.required]),passwordCtrl:new ho(zd.createRandomPassword(),[La.required,La.minLength(6)]),emailAddressCtrl:new ho(null,[La.required,La.email]),companiesCtrl:new ho(null,[]),hubspotOwnerId:new ho(null,[La.required])});constructor(e,n,r,o){this._router=e,this._companyService=n,this._userService=r,this._userCache=o}ngOnInit(){this.loading$.next(ni.LOADING),this._companyService.getAll().subscribe(e=>{this.allCompanies=e.sort((n,r)=>n.name?.localeCompare(r.name)),this.loading$.next(ni.SUCCESS)})}createUser(){this.loading$.next(ni.LOADING),this.errorMessage=null;let e=this.creationForm.value,n=e.companiesCtrl||[],r;this._userService.create(e.firstNameCtrl,e.lastNameCtrl,e.emailAddressCtrl,e.passwordCtrl,e.hubspotOwnerId[0]).pipe(yo(o=>r=o),ps(o=>Gfe(()=>!!n&&n.length>0,Ys(n.map(a=>this._companyService.addUserToCompany(o.oid,a.id))),$t(o)))).subscribe({next:()=>{this.loading$.next(ni.SUCCESS),this._userCache.reload(),this._router.navigate(["/users",r.oid])},error:o=>{this.errorMessage=o?.error?.error,this.loading$.next(ni.SUCCESS)}})}generateRandomPassword(){this.creationForm.patchValue({passwordCtrl:zd.createRandomPassword()})}static \u0275fac=function(n){return new(n||t)(xe(Ws),xe(bp),xe($g),xe(M5))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:7,vars:2,consts:[["successContent",""],[3,"loadItem","successTemplate"],[1,"bd-container"],[3,"ngSubmit","formGroup"],[1,"bd-container-inner","flex","flex-col"],[1,"flex-1"],[1,"flex","flex-row","gap-2"],["type","text","matInput","","required","","formControlName","firstNameCtrl"],["type","text","matInput","","required","","formControlName","lastNameCtrl"],["type","email","matInput","","required","","formControlName","emailAddressCtrl"],[1,"flex","flex-row","gap-2","items-center"],["type","text","matInput","","required","","formControlName","passwordCtrl"],["type","button","mat-button","",3,"click"],["inputId","companiesCtrl","placeholder","Zu Kunden hinzuf\xFCgen","filterPlaceHolder","Kunden suchen","formControlName","companiesCtrl","dataKey","id","optionLabel","name","variant","filled",1,"w-full",3,"options"],["for","companiesCtrl"],["inputId","hubspotOwnerId","placeholder","F\xFCr Kontakt zust\xE4ndiger Mitarbeiter","filterPlaceHolder","Kontakt suchen","formControlName","hubspotOwnerId","dataKey","hubspotId","optionLabel","name","optionValue","hubspotId","variant","filled",1,"w-full",3,"options","selectionLimit"],["for","hubspotOwnerId"],[1,"bd-container-inner","flex","flex-row-reverse"],[1,"flex-none"],["mat-raised-button","","color","accent","type","submit",3,"disabled"],["mat-button",""],[1,"mat-body","bd-warn-text"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2,"Neuer Nutzer"),M()(),be(3,"bd-administration-users-hint")(4,"bd-loader",1),ie(5,GKt,49,6,"ng-template",null,0,di)),n&2){let o=Oi(6);E(4),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[zl,wce,fr,ra,Am,nd,yr,Em,Bx,oa,Xu,Y_,Oa,rd,zs,Kr,VM,sy,Ho],encapsulation:2})}return t})();var _6=class{id;data;isValid;constructor(i,e,n){this.id=i,this.data=e,this.isValid=n}};var Ice=mp(TTe());var n_=class t{_processSource=new Ai;static createSchemaFile(i){let e=[],n=i.columnDefinitions,r={};n.forEach(c=>r[c.fieldName]=`${c.displayName}_1`),e.push(r);let o={};n.forEach(c=>o[c.fieldName]=`${c.displayName}_2`),e.push(o);let a={};return n.forEach(c=>a[c.fieldName]=`${c.displayName}_2`),e.push(a),(0,Ice.unparse)(e,{delimiter:";",header:!0})}static isNumber(i){return i!=null&&i!==""&&!isNaN(Number(i.toString()))}static validateRow(i,e,n){if(!n)return Promise.resolve(new _6(i,e.map(o=>({value:o,valid:!0})),!0));if(e.lengtho.validationFnc?mV(o.validationFnc(e[a],e))?ym(o.validationFnc(e[a],e)):Promise.resolve(o.validationFnc(e[a],e)):Promise.resolve(!0));return Promise.all(r).then(o=>new _6(i,e.map((a,c)=>({value:a,valid:o[c]})),o.every(a=>a)))}static removeDuplicateRows(i){return i.filter((e,n,r)=>!r.filter((o,a)=>this._isEqualRow(e,o)&&ao)})}static applyMappingOnRow(i,e){return Object.keys(i).map(n=>parseInt(n)).map(n=>$e(pe({},i[n]),{originalIndex:n})).map(n=>{let r=e.length-1>=(n.rowIndex??e.length),o=!n.shouldBeEmpty&&n.rowIndex!==null;return r&&o?e[n.rowIndex]:""})}static _isEqualRow(i,e){return JSON.stringify(i)===JSON.stringify(e)}static _isEmptyRow(i){return i.every(e=>e==null||e==="")}static _validateChunk(i,e,n,r,o){return _t(this,null,function*(){let a=o.length,c=yield Promise.all(e.map((m,g)=>t.validateRow(a+g,m,r)));return o.push(...c),c!==void 0&&n.length?this._validateChunk(i,n.splice(0,i),n,r,o):Promise.resolve(o)})}process(i,e,n={delimiter:";"}){let r=[];return(0,Ice.parse)(i,{delimiter:n.delimiter,step:o=>{e?r.push(t.applyMappingOnRow(e,o.data)):r.push(o.data)},complete:()=>this._onParseComplete(r,i.name),error:o=>this._onParseError(o)}),this._processSource.asObservable()}_onParseComplete(i,e){let n=i.filter(r=>!t._isEmptyRow(r));this._processSource.next({originalFileName:e,data:n})}_onParseError(i){this._processSource.error(i)}};function jKt(t,i){if(t&1&&(O(0,"div",3)(1,"mat-form-field")(2,"mat-label"),ee(3),M(),be(4,"input",7),M()()),t&2){let e=i.$implicit,n=L();E(3),Pt(n.getPlaceholderBy(e)),E(),D("formControlName",e)}}var rZe=(()=>{class t{_dialogRef;data;formGroup=new Mu({});definition;constructor(e,n){this._dialogRef=e,this.data=n}ngOnInit(){this.definition=this.data.config.columnDefinitions.map((e,n)=>({ctrlName:`${e.fieldName}Ctrl`,placeholder:e.displayName,editable:e.editable,value:this.data.row.data[n].value})),this.definition.forEach(e=>{let n=new ho({value:e.value,disabled:!e.editable},La.required);this.formGroup.addControl(e.ctrlName,n)})}getControls(){return Object.keys(this.formGroup.controls)}getPlaceholderBy(e){let n=this.definition.find(r=>r.ctrlName===e).placeholder||"";return n.startsWith("Spalte")?n:`Spalte ${n}`}submit(){let e=this.data.row;this.definition.forEach((n,r)=>{this.data.row.data[r]={value:this.formGroup.get(n.ctrlName).value,valid:!1}}),this._dialogRef.close(e)}static \u0275fac=function(n){return new(n||t)(xe(Im),xe(Z0))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"h1",0),ee(1,"Zeile bearbeiten"),M(),O(2,"form",1),te("ngSubmit",function(){return r.submit()}),O(3,"mat-dialog-content")(4,"div",2),Qo(5,jKt,5,2,"div",3,ms),M()(),O(7,"mat-dialog-actions",4)(8,"button",5),ee(9," Abbrechen "),M(),O(10,"button",6),ee(11," \xC4nderungen \xFCbernehmen "),M()()()),n&2&&(E(2),D("formGroup",r.formGroup),E(3),Zo(r.getControls()),E(2),D("align","end"),E(),D("mat-dialog-close",null),E(2),D("disabled",r.formGroup.invalid||r.formGroup.pristine))},dependencies:[$_,oa,Am,nd,yr,Em,Xu,Y_,lh,mc,Oa,rd,hc,zs,bv,so,Kr,Kf],encapsulation:2})}return t})();var $Kt=()=>[5,10,25,50],qKt=()=>({"min-width":"50rem"}),YKt=t=>({"invalid-cell":t}),oZe=(t,i)=>i.fieldName;function KKt(t,i){if(t&1&&(O(0,"th"),ee(1),M()),t&2){let e=i.$implicit;E(),gn(" ",e.displayName," ")}}function WKt(t,i){if(t&1&&(O(0,"tr")(1,"th",3)(2,"div",4)(3,"mat-icon"),ee(4,"error_outline"),M(),be(5,"p-sortIcon",5),M()(),Qo(6,KKt,2,1,"th",null,oZe),be(8,"th",6),M()),t&2){let e=i.$implicit;E(6),Zo(e)}}function QKt(t,i){t&1&&(O(0,"mat-icon",8),ee(1,"error_outline "),M())}function ZKt(t,i){if(t&1&&(O(0,"td"),ee(1),M()),t&2){let e=i.$implicit,n=i.$index,r=L().$implicit,o=L();Pe(Yi(3,YKt,!r.data[n].valid)),E(),gn(" ",o.getValueForColumn(e.fieldName,r)," ")}}function XKt(t,i){if(t&1){let e=qe();O(0,"button",13),te("click",function(){se(e);let r=L().$implicit,o=L();return le(o.editRow(r))}),O(1,"mat-icon"),ee(2,"edit"),M()()}}function JKt(t,i){if(t&1){let e=qe();O(0,"tr")(1,"td",7),yt(2,QKt,2,0,"mat-icon",8),M(),Qo(3,ZKt,2,5,"td",9,oZe),O(5,"td",6)(6,"div",10),yt(7,XKt,3,0,"button",11),O(8,"button",12),te("click",function(){let r=se(e).$implicit,o=L();return le(o.removeRow(r))}),O(9,"mat-icon"),ee(10,"delete"),M()()()()()}if(t&2){let e=i.$implicit,n=i.columns,r=L();E(2),vt(e.isValid?-1:2),E(),Zo(n),E(4),vt(r.editModeEnabled?7:-1)}}var aZe=(()=>{class t{_dialog;_responsiveDialogService;config;rows;rowsChange=new ve;displayedColumns=[];columnCount;columnDefinitions;editModeEnabled=!1;_mapping={};constructor(e,n){this._dialog=e,this._responsiveDialogService=n}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 n=this._responsiveDialogService.config();n.data={row:JSON.parse(JSON.stringify(e)),config:this.config},this._dialog.open(rZe,n).afterClosed().pipe(vn(r=>!!r)).subscribe(r=>{r&&(this.rows=this.rows.filter(o=>o.id!==r.id).concat(r).sort((o,a)=>o.id-a.id),this.rowsChange.emit(this.rows))})}removeRow(e){this.rows=this.rows.filter(n=>n.id!==e.id),this.rowsChange.emit(this.rows)}getValueForColumn(e,n){return n.data[this._mapping[e]]?.value}_createColumnDefinition(e){let n=[];return e?.data?.forEach(r=>{if(r.value.length===0){console.warn(`Column ${r} cannot be accept, is empty`);return}if(n.some(o=>o.fieldName===r.value)){console.warn(`Column ${r} exists already, skip this`);return}n.push({fieldName:r.value,displayName:r.value,editable:!1})}),n}_updateMapping(){this.columnDefinitions.forEach((e,n)=>this._mapping[e.fieldName]=n)}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-table",0),ie(1,WKt,9,0,"ng-template",1)(2,JKt,11,2,"ng-template",2),M()),n&2&&D("columns",r.displayedColumns)("value",r.rows)("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(7,$Kt))("showCurrentPageReport",!0)("tableStyle",Vr(8,qKt))},dependencies:[Td,rc,Tr,aC,sC,da,zr,so,il,Xf,Ld],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 eWt(t,i){if(t&1&&(O(0,"p-message",2),ee(1),M()),t&2){let e=L();E(),Pd(" ",e.resultStats.invalidRows," von ",e.resultStats.totalRows," Zeilen sind fehlerhaft. Bitte entfernen Sie die Fehler oder importieren Sie eine andere Datei. ")}}function tWt(t,i){if(t&1){let e=qe();O(0,"bd-csv-import-result-table",8),te("rowsChange",function(r){se(e);let o=L(2);return le(o.onRowsChange(r))}),M()}if(t&2){let e=L(2);D("config",e.config)("rows",e.result)}}function iWt(t,i){if(t&1&&yt(0,tWt,1,2,"bd-csv-import-result-table",7),t&2){let e=L();vt((e.result==null?null:e.result.length)>0?0:-1)}}var sZe=(()=>{class t{config;data;dataChange=new ve;resetFile=new ve;loading$=new hi(1);result=[];resultStats;ngOnInit(){this.loading$.next(ni.LOADING),n_.validate(this.data,this.config).then(e=>this.onRowsChange(e)).then(()=>{this.loading$.next(ni.SUCCESS)}).catch(()=>this.loading$.next(ni.ERROR))}onRowsChange(e){this.result=e,this._validateResult(),this.resultStats.hasErrors||this.emit()}emit(){let e=this.result.map(n=>n.data.map(r=>r.value));this.dataChange.emit(e)}onReset(){this.resetFile.emit(!0)}_validateResult(){let e=this.result.filter(n=>!n.isValid).length;this.resultStats={invalidRows:e,totalRows:this.result.length,hasErrors:e>0}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"span",1),ee(1,"Gefundene Daten"),M(),yt(2,eWt,2,2,"p-message",2),be(3,"bd-loader",3),ie(4,iWt,1,1,"ng-template",null,0,di),O(6,"div")(7,"div",4)(8,"div",5)(9,"button",6),te("click",function(){return se(o),le(r.onReset())}),ee(10,"Andere Datei ausw\xE4hlen"),M()()()()}if(n&2){let o=Oi(5);E(2),vt(r.resultStats!=null&&r.resultStats.hasErrors?2:-1),E(),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,aZe,so,Kr,fae,iF],encapsulation:2})}return t})();var lZe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,_a]})}return t})();var cZe=` .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 y6=["*"],_Ze=["content"],yZe=(t,i,e)=>({activateCallback:t,value:i,active:e});function nWt(t,i){t&1&&be(0,"p-stepper-separator")}function rWt(t,i){if(t&1){let e=qe();O(0,"button",0),te("click",function(){se(e);let r=L();return le(r.onStepClick())}),O(1,"span"),ee(2),M(),O(3,"span"),Sn(4),M()(),yt(5,nWt,1,0,"p-stepper-separator")}if(t&2){let e=L();Pe(e.cx("header")),D("tabindex",e.isStepDisabled()?-1:void 0)("disabled",e.isStepDisabled()),lt("id",e.id())("role","tab")("aria-controls",e.ariaControls()),E(),Pe(e.cx("number")),E(),Pt(e.value()),E(),Pe(e.cx("title")),E(2),vt(e.isSeparatorVisible()?5:-1)}}function oWt(t,i){t&1&&Li(0)}function aWt(t,i){t&1&&be(0,"p-stepper-separator")}function sWt(t,i){if(t&1&&(ie(0,oWt,1,0,"ng-container",1),yt(1,aWt,1,0,"p-stepper-separator")),t&2){let e=L();D("ngTemplateOutlet",e.content||e._contentTemplate)("ngTemplateOutletContext",Qu(3,yZe,e.onStepClick.bind(e),e.value(),e.active())),E(),vt(e.isSeparatorVisible()?1:-1)}}var dZe=t=>({transitionParams:t}),lWt=t=>({value:"visible",params:t}),cWt=t=>({value:"hidden",params:t});function dWt(t,i){t&1&&be(0,"p-stepper-separator")}function uWt(t,i){t&1&&Li(0)}function pWt(t,i){if(t&1&&ie(0,uWt,1,0,"ng-container",0),t&2){let e=L();D("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Qu(2,yZe,e.updateValue.bind(e),e.value(),e.active()))}}var mWt={root:({instance:t})=>["p-stepitem",{"p-stepitem-active":t.isActive()}]},uZe=(()=>{class t extends br{name="stepitem";classes=mWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var hWt={root:"p-steplist"},pZe=(()=>{class t extends br{name="steplist";classes=hWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var fWt={root:"p-steppanels"},mZe=(()=>{class t extends br{name="steppanel";classes=fWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var gWt={root:({instance:t})=>["p-steppanel",{"p-steppanel-active":t.isVertical()&&t.active()}],content:"p-steppanel-content"},hZe=(()=>{class t extends br{name="steppanel";classes=gWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var _Wt=` ${cZe} /* For PrimeNG */ .p-steppanel:not(.p-steppanel-active) > .p-steppanel-content, .p-steppanel-content.ng-animating { overflow: hidden; } `,yWt={root:({instance:t})=>["p-stepper p-component",{"p-readonly":t.linear()}],separator:"p-stepper-separator"},Tce=(()=>{class t extends br{name="stepper";theme=_Wt;classes=yWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var vWt={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"},fZe=(()=>{class t extends br{name="step";classes=vWt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Ece=(()=>{class t extends ur{steps=Oee(No(()=>$2));_componentStyle=ae(pZe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-step-list"]],contentQueries:function(n,r,o){n&1&&pv(o,r.steps,$2,4),n&2&&Rb()},hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("root"))},features:[Ii([pZe]),Tt],ngContentSelectors:y6,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),vZe=(()=>{class t extends ur{_componentStyle=ae(Tce);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-stepper-separator"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("separator"))},features:[Ii([Tce]),Tt],ngContentSelectors:y6,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),gZe=(()=>{class t extends ur{pcStepper=ae(No(()=>nK));value=Pb();isActive=Or(()=>this.pcStepper.value()===this.value());step=UT(No(()=>$2));stepPanel=UT(No(()=>Ace));constructor(){super(),tu(()=>{this.step().value.set(this.value())}),tu(()=>{this.stepPanel().value.set(this.value())})}_componentStyle=ae(uZe);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["p-step-item"]],contentQueries:function(n,r,o){n&1&&(pv(o,r.step,$2,5),pv(o,r.stepPanel,Ace,5)),n&2&&Rb(2)},hostVars:3,hostBindings:function(n,r){n&2&&(lt("data-p-active",r.isActive()),Pe(r.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[Ii([uZe]),Tt],ngContentSelectors:y6,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),$2=(()=>{class t extends ur{pcStepper=ae(No(()=>nK));value=Pb();disabled=kr(!1,{transform:e=>FP(e)});active=Or(()=>this.pcStepper.isStepActive(this.value()));isStepDisabled=Or(()=>!this.active()&&(this.pcStepper.linear()||this.disabled()));id=Or(()=>`${this.pcStepper.id()}_step_${this.value()}`);ariaControls=Or(()=>`${this.pcStepper.id()}_steppanel_${this.value()}`);isSeparatorVisible=Or(()=>{if(this.pcStepper.stepList()){let e=this.pcStepper.stepList().steps(),n=e.indexOf(this),r=e.length;return n!==r-1}else return!1});content;templates;_contentTemplate;_componentStyle=ae(fZe);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-step"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,_Ze,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.content=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:7,hostBindings:function(n,r){n&2&&(lt("aria-current",r.active()?"step":void 0)("role","presentation")("data-p-active",r.active())("data-p-disabled",r.isStepDisabled())("data-pc-name","step"),Pe(r.cx("root")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[Ii([fZe]),Tt],ngContentSelectors:y6,decls:2,vars:1,consts:[["type","button",3,"click","tabindex","disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(Kn(),yt(0,rWt,6,13)(1,sWt,2,7)),n&2&&vt(!r.content&&!r._contentTemplate?0:1)},dependencies:[rr,Jr,vZe,Un],encapsulation:2,changeDetection:0})}return t})(),Ace=(()=>{class t extends ur{pcStepper=ae(No(()=>nK));transitionOptions=Or(()=>this.pcStepper.transitionOptions());value=Pb(void 0);active=Or(()=>this.pcStepper.value()===this.value());visible=hr(this.active());isVisible=Or(()=>this.active()||this.isVertical()&&this.visible());ariaControls=Or(()=>`${this.pcStepper.id()}_step_${this.value()}`);id=Or(()=>`${this.pcStepper.id()}_steppanel_${this.value()}`);isVertical=Or(()=>this.pcStepper.stepItems().length>0);isSeparatorVisible=Or(()=>{if(this.pcStepper.stepItems()){let e=this.pcStepper.stepItems().length,n=Yp(this.pcStepper.el.nativeElement,'[data-pc-name="steppanel"]');return i6e(this.el.nativeElement,n)!==e-1}});contentTemplate;templates;_contentTemplate;_componentStyle=ae(hZe);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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-step-panel"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,_Ze,5),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.contentTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},hostVars:7,hostBindings:function(n,r){n&2&&(lt("role","tabpanel")("aria-controls",r.ariaControls())("id",r.id())("data-p-active",r.active())("data-pc-name","steppanel"),Pe(r.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[Ii([hZe]),Tt],decls:3,vars:13,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(yt(0,dWt,1,0,"p-stepper-separator"),O(1,"div"),te("@content.start",function(a){return r.onAnimationStart(a)})("@content.done",function(a){return r.onAnimationEnd(a)}),yt(2,pWt,1,6,"ng-container"),M()),n&2&&(vt(r.isSeparatorVisible()?0:-1),E(),Pe(r.cx("content")),D("@content",r.isVertical()?r.active()?Yi(7,lWt,Yi(5,dZe,r.transitionOptions())):Yi(11,cWt,Yi(9,dZe,r.transitionOptions())):void 0),E(),vt(r.isVisible()?2:-1))},dependencies:[rr,Jr,vZe,Un],encapsulation:2,data:{animation:[Wp("content",[J0("hidden",ul({height:"0"})),J0("visible",ul({height:"*"})),Oc("visible <=> hidden",[Jl("400ms cubic-bezier(0.86, 0, 0.07, 1)")]),Oc("void => *",Jl(0))])]},changeDetection:0})}return t})(),bZe=(()=>{class t extends ur{_componentStyle=ae(mZe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-step-panels"]],hostVars:2,hostBindings:function(n,r){n&2&&Pe(r.cx("root"))},features:[Ii([mZe]),Tt],ngContentSelectors:y6,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),nK=(()=>{class t extends ur{value=Pb(void 0);linear=kr(!1,{transform:e=>FP(e)});transitionOptions=kr("400ms cubic-bezier(0.86, 0, 0.07, 1)");_componentStyle=ae(Tce);id=hr(fa("pn_id_"));stepItems=Oee(gZe);steps=Oee($2);stepList=UT(Ece);updateValue(e){this.value.set(e)}isStepActive(e){return this.value()===e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-stepper"]],contentQueries:function(n,r,o){n&1&&(pv(o,r.stepItems,gZe,4),pv(o,r.steps,$2,4),pv(o,r.stepList,Ece,5)),n&2&&Rb(3)},hostVars:4,hostBindings:function(n,r){n&2&&(lt("role","tablist")("id",r.id()),Pe(r.cx("root")))},inputs:{value:[1,"value"],linear:[1,"linear"],transitionOptions:[1,"transitionOptions"]},outputs:{value:"valueChange"},features:[Ii([Tce]),Tt],ngContentSelectors:y6,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})();var CZe=` .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 SZe=t=>({height:t}),wZe=t=>({param:t}),bWt=(t,i)=>({$implicit:t,loading:i}),CWt=(t,i,e)=>({$implicit:t,partialSelected:i,class:e}),IZe=t=>({$implicit:t});function xWt(t,i){if(t&1){let e=qe();O(0,"li",9),te("drop",function(r){se(e);let o=L(2);return le(o.onDropPoint(r,-1))})("dragover",function(r){se(e);let o=L(2);return le(o.onDropPointDragOver(r))})("dragenter",function(r){se(e);let o=L(2);return le(o.onDropPointDragEnter(r,-1))})("dragleave",function(r){se(e);let o=L(2);return le(o.onDropPointDragLeave(r))}),M()}if(t&2){let e=L(2);Pe(e.cx("dropPoint",Yi(3,wZe,e.draghoverPrev))),lt("aria-hidden",!0)}}function SWt(t,i){if(t&1&&(Pi(),be(0,"svg",12)),t&2){let e=L(4);Pe(e.cx("nodeToggleIcon"))}}function wWt(t,i){if(t&1&&(Pi(),be(0,"svg",13)),t&2){let e=L(4);Pe(e.cx("nodeToggleIcon"))}}function IWt(t,i){if(t&1&&(fi(0),ie(1,SWt,1,2,"svg",10)(2,wWt,1,2,"svg",11),gi()),t&2){let e=L(3);E(),D("ngIf",!e.node.expanded),E(),D("ngIf",e.node.expanded)}}function TWt(t,i){if(t&1&&(fi(0),Pi(),be(1,"svg",14),gi()),t&2){let e=L(3);E(),Pe(e.cx("nodeToggleIcon"))}}function EWt(t,i){if(t&1&&(fi(0),ie(1,IWt,3,2,"ng-container",5)(2,TWt,2,2,"ng-container",5),gi()),t&2){let e=L(2);E(),D("ngIf",!e.node.loading),E(),D("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function AWt(t,i){}function DWt(t,i){t&1&&ie(0,AWt,0,0,"ng-template")}function kWt(t,i){if(t&1&&(O(0,"span"),ie(1,DWt,1,0,null,15),M()),t&2){let e=L(2);Pe(e.cx("nodeToggleIcon")),E(),D("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",na(4,bWt,e.node.expanded,e.node.loading))}}function MWt(t,i){}function OWt(t,i){t&1&&ie(0,MWt,0,0,"ng-template")}function RWt(t,i){if(t&1&&ie(0,OWt,1,0,null,15),t&2){let e=L(4);D("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",Qu(2,CWt,e.isSelected(),e.node.partialSelected,e.cx("nodeCheckbox")))}}function PWt(t,i){t&1&&(fi(0),ie(1,RWt,1,6,"ng-template",null,0,di),gi())}function NWt(t,i){if(t&1){let e=qe();O(0,"p-checkbox",16),te("click",function(r){return se(e),le(r.preventDefault())}),ie(1,PWt,3,0,"ng-container",5),M()}if(t&2){let e=L(2);D("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),lt("data-p-partialchecked",e.node.partialSelected),E(),D("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function FWt(t,i){if(t&1&&be(0,"span"),t&2){let e=L(2);Pe(e.getIcon())}}function LWt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2);E(),Pt(e.node.label)}}function BWt(t,i){t&1&&Li(0)}function VWt(t,i){if(t&1&&(O(0,"span"),ie(1,BWt,1,0,"ng-container",15),M()),t&2){let e=L(2);E(),D("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",Yi(2,IZe,e.node))}}function zWt(t,i){if(t&1&&be(0,"p-treeNode",19),t&2){let e=i.$implicit,n=i.first,r=i.last,o=i.index,a=L(3);D("node",e)("parentNode",a.node)("firstChild",n)("lastChild",r)("index",o)("itemSize",a.itemSize)("level",a.level+1)("loadingMode",a.loadingMode)}}function UWt(t,i){if(t&1&&(O(0,"ul",17),ie(1,zWt,1,8,"p-treeNode",18),M()),t&2){let e=L(2);Pe(e.cx("nodeChildren")),E(),D("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function HWt(t,i){if(t&1){let e=qe();O(0,"li",9),te("drop",function(r){se(e);let o=L(2);return le(o.onDropPoint(r,1))})("dragover",function(r){se(e);let o=L(2);return le(o.onDropPointDragOver(r))})("dragenter",function(r){se(e);let o=L(2);return le(o.onDropPointDragEnter(r,1))})("dragleave",function(r){se(e);let o=L(2);return le(o.onDropPointDragLeave(r))}),M()}if(t&2){let e=L(2);Pe(e.cx("dropPoint",Yi(3,wZe,e.draghoverNext))),lt("aria-hidden",!0)}}function GWt(t,i){if(t&1){let e=qe();ie(0,xWt,1,5,"li",1),O(1,"li",2),te("keydown",function(r){se(e);let o=L();return le(o.onKeyDown(r))}),O(2,"div",3),te("click",function(r){se(e);let o=L();return le(o.onNodeClick(r))})("contextmenu",function(r){se(e);let o=L();return le(o.onNodeRightClick(r))})("dblclick",function(r){se(e);let o=L();return le(o.onNodeDblClick(r))})("touchend",function(){se(e);let r=L();return le(r.onNodeTouchEnd())})("drop",function(r){se(e);let o=L();return le(o.onDropNode(r))})("dragover",function(r){se(e);let o=L();return le(o.onDropNodeDragOver(r))})("dragenter",function(r){se(e);let o=L();return le(o.onDropNodeDragEnter(r))})("dragleave",function(r){se(e);let o=L();return le(o.onDropNodeDragLeave(r))})("dragstart",function(r){se(e);let o=L();return le(o.onDragStart(r))})("dragend",function(r){se(e);let o=L();return le(o.onDragStop(r))}),O(3,"button",4),te("click",function(r){se(e);let o=L();return le(o.toggle(r))}),ie(4,EWt,3,2,"ng-container",5)(5,kWt,2,7,"span",6),M(),ie(6,NWt,2,9,"p-checkbox",7)(7,FWt,1,2,"span",6),O(8,"span"),ie(9,LWt,2,1,"span",5)(10,VWt,2,4,"span",5),M()(),ie(11,UWt,2,4,"ul",8),M(),ie(12,HWt,1,5,"li",1)}if(t&2){let e=L();D("ngIf",e.tree.droppableNodes),E(),is(e.node.style),Pe(e.cn(e.cx("node"),e.node.styleClass)),D("ngStyle",Yi(33,SZe,e.itemSize+"px")),lt("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),E(),Pe(e.cx("nodeContent")),la("padding-left",e.level*e.indentation+"rem"),D("draggable",e.tree.draggableNodes),E(),Pe(e.cx("nodeToggleButton")),lt("data-pc-section","toggler"),E(),D("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),E(),D("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),E(),D("ngIf",e.tree.selectionMode=="checkbox"),E(),D("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),E(),Pe(e.cx("nodeLabel")),E(),D("ngIf",!e.tree.getTemplateForNode(e.node)),E(),D("ngIf",e.tree.getTemplateForNode(e.node)),E(),D("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),E(),D("ngIf",e.tree.droppableNodes&&e.lastChild)}}var xZe=["filter"],jWt=["node"],$Wt=["header"],qWt=["footer"],YWt=["loader"],KWt=["empty"],WWt=["togglericon"],QWt=["checkboxicon"],ZWt=["loadingicon"],XWt=["filtericon"],JWt=["scroller"],eQt=["wrapper"],tQt=["content"],iQt=t=>({options:t});function nQt(t,i){if(t&1&&be(0,"i"),t&2){let e=L(2);Pe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function rQt(t,i){if(t&1&&(Pi(),be(0,"svg",12)),t&2){let e=L(3);Pe(e.cx("loadingIcon"))}}function oQt(t,i){}function aQt(t,i){t&1&&ie(0,oQt,0,0,"ng-template")}function sQt(t,i){if(t&1&&(O(0,"span"),ie(1,aQt,1,0,null,8),M()),t&2){let e=L(3);Pe(e.cx("loadingIcon")),E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function lQt(t,i){if(t&1&&(fi(0),ie(1,rQt,1,2,"svg",11)(2,sQt,2,3,"span",7),gi()),t&2){let e=L(2);E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function cQt(t,i){if(t&1&&(O(0,"div"),ie(1,nQt,1,2,"i",7)(2,lQt,3,2,"ng-container",10),M()),t&2){let e=L();Pe(e.cx("mask")),E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function dQt(t,i){t&1&&Li(0)}function uQt(t,i){t&1&&Li(0)}function pQt(t,i){if(t&1&&ie(0,uQt,1,0,"ng-container",13),t&2){let e=L();D("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",Yi(2,IZe,e.filterOptions))}}function mQt(t,i){if(t&1&&(Pi(),be(0,"svg",16)),t&2){let e=L(3);Pe(e.cx("filterIcon"))}}function hQt(t,i){}function fQt(t,i){t&1&&ie(0,hQt,0,0,"ng-template")}function gQt(t,i){if(t&1&&(O(0,"span"),ie(1,fQt,1,0,null,8),M()),t&2){let e=L(3);Pe(e.cx("filterIcon")),E(),D("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function _Qt(t,i){if(t&1){let e=qe();O(0,"p-iconfield")(1,"input",14,0),te("keydown.enter",function(r){return se(e),le(r.preventDefault())})("input",function(r){se(e);let o=L(2);return le(o._filter(r.target==null?null:r.target.value))}),M(),O(3,"p-inputicon"),ie(4,mQt,1,2,"svg",15)(5,gQt,2,3,"span",7),M()()}if(t&2){let e=L(2);Pe(e.cx("pcFilterContainer")),E(),Pe(e.cx("pcFilterInput")),D("pAutoFocus",e.filterInputAutoFocus),lt("placeholder",e.filterPlaceholder),E(3),D("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),E(),D("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function yQt(t,i){if(t&1&&ie(0,_Qt,6,8,"p-iconfield",7),t&2){let e=L();D("ngIf",e.filter)}}function vQt(t,i){if(t&1&&be(0,"p-treeNode",22,3),t&2){let e=i.$implicit,n=i.first,r=i.last,o=i.index,a=L(2).options,c=L(3);D("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",r)("index",c.getIndex(a,o))("itemSize",a.itemSize)("indentation",c.indentation)("loadingMode",c.loadingMode)}}function bQt(t,i){if(t&1&&(O(0,"ul",20,2),ie(2,vQt,2,10,"p-treeNode",21),M()),t&2){let e=L(),n=e.$implicit,r=e.options,o=L(3);is(r.contentStyle),Pe(o.cx("rootChildren")),D("ngClass",r.contentStyleClass),lt("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),E(2),D("ngForOf",n)("ngForTrackBy",o.trackBy)}}function CQt(t,i){if(t&1&&ie(0,bQt,3,9,"ul",19),t&2){let e=i.$implicit;D("ngIf",e)}}function xQt(t,i){t&1&&Li(0)}function SQt(t,i){if(t&1&&ie(0,xQt,1,0,"ng-container",13),t&2){let e=i.options,n=L(4);D("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",Yi(2,iQt,e))}}function wQt(t,i){t&1&&(fi(0),ie(1,SQt,1,4,"ng-template",null,4,di),gi())}function IQt(t,i){if(t&1){let e=qe();O(0,"p-scroller",18,1),te("onScroll",function(r){se(e);let o=L(2);return le(o.onScroll.emit(r))})("onScrollIndexChange",function(r){se(e);let o=L(2);return le(o.onScrollIndexChange.emit(r))})("onLazyLoad",function(r){se(e);let o=L(2);return le(o.onLazyLoad.emit(r))}),ie(2,CQt,1,1,"ng-template",null,2,di)(4,wQt,3,0,"ng-container",10),M()}if(t&2){let e=L(2);is(Yi(10,SZe,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),D("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),E(4),D("ngIf",e.loaderTemplate||e._loaderTemplate)}}function TQt(t,i){if(t&1&&be(0,"p-treeNode",26),t&2){let e=i.$implicit,n=i.first,r=i.last,o=i.index,a=L(4);D("node",e)("firstChild",n)("lastChild",r)("index",o)("level",0)("loadingMode",a.loadingMode)}}function EQt(t,i){if(t&1&&(O(0,"ul",24,2),ie(2,TQt,1,6,"p-treeNode",25),M()),t&2){let e=L(3);Pe(e.cx("rootChildren")),lt("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),E(2),D("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function AQt(t,i){if(t&1&&(fi(0),O(1,"div",null,5),ie(3,EQt,3,6,"ul",23),M(),gi()),t&2){let e=L(2);E(),Pe(e.cx("wrapper")),la("max-height",e.scrollHeight),E(2),D("ngIf",e.getRootNode())}}function DQt(t,i){if(t&1&&(fi(0),ie(1,IQt,5,12,"p-scroller",17)(2,AQt,4,5,"ng-container",10),gi()),t&2){let e=L();E(),D("ngIf",e.virtualScroll),E(),D("ngIf",!e.virtualScroll)}}function kQt(t,i){if(t&1&&(fi(0),ee(1),gi()),t&2){let e=L(2);E(),gn(" ",e.emptyMessageLabel," ")}}function MQt(t,i){}function OQt(t,i){t&1&&ie(0,MQt,0,0,"ng-template",null,6,di)}function RQt(t,i){if(t&1&&(O(0,"div"),ie(1,kQt,2,1,"ng-container",27)(2,OQt,2,0,null,8),M()),t&2){let e=L();Pe(e.cx("emptyMessage")),E(),D("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),E(),D("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function PQt(t,i){t&1&&Li(0)}var NQt={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}]},Dce=(()=>{class t extends br{name="tree";theme=CZe;classes=NQt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var FQt=(()=>{class t extends ur{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=ae(No(()=>Iy));timeout;draghoverPrev;draghoverNext;draghoverNode;_componentStyle=ae(Dce);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 n=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!n&&(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,n){e.preventDefault();let r=this.tree.dragNode,o=this.tree.dragNodeIndex,a=this.tree.dragNodeScope,c=this.tree.dragNodeTree===this.tree?n===1||o!==this.index-1:!0;if(this.tree.allowDrop(r,this.node,a)&&c){let m=pe({},this.createDropPointEventMetadata(n));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:r,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(m)}}):(this.processPointDrop(m),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:r,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let n=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let r=this.index;e.position<0?(r=e.dragNodeSubNodes===n?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,n.splice(r,0,e.dragNode)):(r=n.length,n.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,n){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(n<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 n=this.tree.dragNode;if(this.tree.allowDrop(n,this.node,this.tree.dragNodeScope)){let r=pe({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(r)}}):(this.processNodeDrop(r),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,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 n=e.dragNodeIndex;e.dragNodeSubNodes.splice(n,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:n})}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 n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x=Math.floor(n.top+n.height)||e.y0)this.focusRowChange(n,r.children[0]);else if(n.parentElement.nextElementSibling)this.focusRowChange(n,n.parentElement.nextElementSibling);else{let o=this.findNextSiblingOfAncestor(n.parentElement);o&&this.focusRowChange(n,o)}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 n=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 r=this.getParentNodeElement(n.parentElement);r&&this.focusRowChange(e.currentTarget,r),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=Yp(this.tree.el.nativeElement,".p-tree-node"),n=[...e].some(r=>r.getAttribute("aria-selected")==="true"||r.getAttribute("aria-checked")==="true");if([...e].forEach(r=>{r.tabIndex=-1}),n){let r=[...e].filter(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");r[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,n){if(this.tree.selectionMode!==null){let r=[...Yp(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=n===!1?-1:0,r.every(o=>o.tabIndex===-1)&&(r[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let n=this.getParentNodeElement(e);return n?n.nextElementSibling?n.nextElementSibling:this.findNextSiblingOfAncestor(n):null}findLastVisibleDescendant(e){let r=Array.from(e.children).find(o=>Cd(o,"p-tree-node"))?.children[1];if(r&&r.children.length>0){let o=r.children[r.children.length-1];return this.findLastVisibleDescendant(o)}else return e}getParentNodeElement(e){let n=e.parentElement?.parentElement?.parentElement;return n?.tagName==="P-TREENODE"?n:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,n,r){e.tabIndex="-1",n.children[0].tabIndex="0",this.focusNode(r||n)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=$r(this.tree?.contentViewChild.nativeElement,`[data-id="${this.node?.key??this.node?.data}"]`);Ba(e)},1)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",Je],index:[2,"index","index",En],firstChild:[2,"firstChild","firstChild",Je],lastChild:[2,"lastChild","lastChild",Je],level:[2,"level","level",En],indentation:[2,"indentation","indentation",En],itemSize:[2,"itemSize","itemSize",En],loadingMode:"loadingMode"},features:[Ii([Dce]),Tt],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(n,r){n&1&&yt(0,GWt,13,35),n&2&&vt(r.node?0:-1)},dependencies:[t,rr,Vl,Xr,Jr,Xs,Qc,qg,ra,yr,ya,Gb,Dm,W_,Un],encapsulation:2})}return t})(),Iy=(()=>{class t extends ur{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,n)=>n;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=ae(Dce);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(xs.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,n,r,o){if(n&&n.length)for(let a of n){a.parent=e;let c={node:a,parent:e,level:r,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(c),c.visible&&a.expanded&&this.serializeNodes(a,a.children,r+1,c.visible)}}onNodeClick(e,n){let r=e.target;if(!(Cd(r,"p-tree-toggler")||Cd(r,"p-tree-toggler-icon"))){if(this.selectionMode){if(n.selectable===!1){n.style="--p-focus-ring-color: none;";return}else n.style?.includes("--p-focus-ring-color")||(n.style=n.style?`${n.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(n=this.getNodeWithKey(n.key,this.filteredNodes),!n))return;let o=this.findIndexInSelection(n),a=o>=0;if(this.isCheckboxSelectionMode())a?(this.propagateSelectionDown?this.propagateDown(n,!1):this.selection=this.selection.filter((c,m)=>m!=o),this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown?this.propagateDown(n,!0):this.selection=[...this.selection||[],n],this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n}));else if(this.nodeTouched?!1:this.metaKeySelection){let m=e.metaKey||e.ctrlKey;a&&m?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((g,C)=>C!=o),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.isMultipleSelectionMode()&&(this.selection=m?this.selection||[]:[],this.selection=[...this.selection,n],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:n}))}else this.isSingleSelectionMode()?a?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=n,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})):a?(this.selection=this.selection.filter((m,g)=>g!=o),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=[...this.selection||[],n],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,n){if(this.contextMenu){let r=e.target;if(r.className&&r.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(n)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.selectionChange.emit([n])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:n})}}onNodeDblClick(e,n){this.onNodeDoubleClick.emit({originalEvent:e,node:n})}findIndexInSelection(e){let n=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())n=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let r=0;r0}getNodeWithKey(e,n){for(let r of n){if(r.key===e)return r;if(r.children){let o=this.getNodeWithKey(e,r.children);if(o)return o}}}propagateUp(e,n){if(e.children&&e.children.length){let o=0,a=!1;for(let c of e.children)this.isSelected(c)?o++:c.partialSelected&&(a=!0);if(n&&o==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!n){let c=this.findIndexInSelection(e);c>=0&&(this.selection=this.selection.filter((m,g)=>g!=c))}a||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let r=e.parent;r&&this.propagateUp(r,n)}propagateDown(e,n){let r=this.findIndexInSelection(e);if(n&&r==-1?this.selection=[...this.selection||[],e]:!n&&r>-1&&(this.selection=this.selection.filter((o,a)=>a!=r)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,n)}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 n=this.dragNode;if(this.allowDrop(n,null,this.dragNodeScope)){let r=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:r,accept:()=>{this.processTreeDrop(n,r)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:r}),this.processTreeDrop(n,r))}}}processTreeDrop(e,n){this.dragNodeSubNodes.splice(n,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 n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.xn.top+n.height||e.y-1&&(c=!0);return(!c||a&&!this.isNodeLeaf(e))&&(c=this.findFilteredNodes(e,{searchFields:r,filterText:o,isStrictMode:a})||c),c}getIndex(e,n){let r=e.getItemOptions;return r?r(n).index:n}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(l6e,8))};static \u0275cmp=re({type:t,selectors:[["p-tree"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,xZe,4),Vt(o,jWt,4),Vt(o,$Wt,4),Vt(o,qWt,4),Vt(o,YWt,4),Vt(o,KWt,4),Vt(o,WWt,4),Vt(o,QWt,4),Vt(o,ZWt,4),Vt(o,XWt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.filterTemplate=a.first),ze(a=Ue())&&(r.nodeTemplate=a.first),ze(a=Ue())&&(r.headerTemplate=a.first),ze(a=Ue())&&(r.footerTemplate=a.first),ze(a=Ue())&&(r.loaderTemplate=a.first),ze(a=Ue())&&(r.emptyMessageTemplate=a.first),ze(a=Ue())&&(r.togglerIconTemplate=a.first),ze(a=Ue())&&(r.checkboxIconTemplate=a.first),ze(a=Ue())&&(r.loadingIconTemplate=a.first),ze(a=Ue())&&(r.filterIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(xZe,5),Xi(JWt,5),Xi(eQt,5),Xi(tQt,5)),n&2){let o;ze(o=Ue())&&(r.filterViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first),ze(o=Ue())&&(r.wrapperViewChild=o.first),ze(o=Ue())&&(r.contentViewChild=o.first)}},hostVars:2,hostBindings:function(n,r){n&1&&te("drop",function(a){return r.handleDropEvent(a)})("dragover",function(a){return r.handleDragOverEvent(a)})("dragenter",function(){return r.handleDragEnterEvent()})("dragleave",function(a){return r.handleDragLeaveEvent(a)}),n&2&&Pe(r.cn(r.cx("root"),r.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",En],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",En],_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:[Ii([Dce]),Tt,Yt],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(n,r){if(n&1&&(ie(0,cQt,3,4,"div",7)(1,dQt,1,0,"ng-container",8),yt(2,pQt,1,4,"ng-container")(3,yQt,1,1,"p-iconfield",9),ie(4,DQt,3,2,"ng-container",10)(5,RQt,3,5,"div",7)(6,PQt,1,0,"ng-container",8)),n&2){let o;D("ngIf",r.loading&&r.loadingMode==="mask"),E(),D("ngTemplateOutlet",r.headerTemplate||r._headerTemplate),E(),vt(r.filterTemplate||r._filterTemplate?2:3),E(2),D("ngIf",(o=r.getRootNode())==null?null:o.length),E(),D("ngIf",!r.loading&&(r.getRootNode()==null||r.getRootNode().length===0)),E(),D("ngTemplateOutlet",r.footerTemplate||r._footerTemplate)}},dependencies:[rr,qa,Vl,Xr,Jr,ey,Un,z4,W_,_p,ra,tM,iM,FQt,S6e,Zh],encapsulation:2})}return t})(),wC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[Iy,Un,Un]})}return t})();var kZe=mp(dq());function LQt(t,i){t&1&&(O(0,"tr")(1,"th",5),ee(2,"SPALTEN\xDCBERSCHRIFT AUS DATEI"),M(),O(3,"th",6),ee(4,"DATEN-VORSCHAU"),M(),O(5,"th",7),ee(6,"ZUGEORDNET"),M(),O(7,"th"),ee(8,"EIGENSCHAFT"),M()())}function BQt(t,i){if(t&1&&(O(0,"span",9),ee(1),M(),be(2,"br")),t&2){let e=i.$implicit;E(),Pt(e)}}function VQt(t,i){t&1&&(O(0,"mat-icon"),ee(1,"check_circle"),M())}function zQt(t,i){t&1&&(O(0,"small"),ee(1,"Spalte mehrfach ausgew\xE4hlt"),M())}function UQt(t,i){if(t&1){let e=qe();O(0,"tr")(1,"td",5),ee(2),M(),O(3,"td",6),Qo(4,BQt,3,1,null,null,kj),M(),O(6,"td",7),yt(7,VQt,2,0,"mat-icon"),M(),O(8,"td")(9,"p-select",8),te("onChange",function(r){let o=se(e).$implicit,a=L(2);return le(a.onMappingChange(o,r.value))}),M(),yt(10,zQt,2,0,"small"),M()()}if(t&2){let e=i.$implicit,n=L(2);E(2),Pt(e.headerValue),E(2),Zo(e.previewInformation),E(3),vt(e.mapped?7:-1),E(2),Pe(n.mappingError[e.mappingFieldName]?"ng-invalid ng-dirty":""),D("ngModel",e.mappingFieldName)("options",n.config.columnDefinitions),E(),vt(n.mappingError[e.mappingFieldName]?10:-1)}}function HQt(t,i){if(t&1&&(O(0,"p-table",4),ie(1,LQt,9,0,"ng-template",null,1,di)(3,UQt,11,7,"ng-template",null,2,di),M()),t&2){let e=L();D("value",e.data)}}var TZe=(()=>{class t{config;originalFileName;rawFile;mappingChange=new ve;loading$=new hi(1);mappingErrors=!1;mapping={};mappingError={};data=[];ngOnInit(){this._init(this.rawFile)}onMappingChange(e,n){n?(e.mappingFieldName=n,e.mapped=!0):(e.mapped=!1,e.mappingFieldName=null),this._updateMapping()}hasMappingErrors(){let e=this.data.map(c=>c.mappingFieldName).filter(c=>c).length,n=this.data.map(c=>c.mappingFieldName).filter(c=>c),r=n.filter((c,m,g)=>g.indexOf(c)===m).length;this.mappingError={},this._findDuplicates(n).forEach(c=>this.mappingError[c]=!0);let o=Object.keys(this.mappingError).length>0;return!(e===r)||o}_init(e){this.loading$.next(ni.LOADING),new n_().process(e,null).subscribe(n=>{let r=n.data.slice(0,4),o=r[0].map((c,m)=>{let g=r[0][m],C=this._guessColumnFromHeaderValue(g,m);return{headerValue:g,mappingFieldName:C.columnDefinition?C.columnDefinition.fieldName:null,previewInformation:r.slice(1).map(w=>w[m]).filter(w=>!!w),fileIndex:m,mapped:C.exactMatch}}),a=[];this.config.columnDefinitions.length>n.data[0].length&&(a=this.config.columnDefinitions.filter(c=>!o.find(m=>m.mappingFieldName===c.fieldName)).map((c,m)=>({fileIndex:m+o.length+1,mapped:!1,mappingFieldName:c.fieldName,previewInformation:[],headerValue:""}))),this.data=[...o,...a],this._updateMapping(),this.loading$.next(ni.SUCCESS)})}_findDuplicates(e){return e.filter((n,r)=>e.indexOf(n)!==r)}_updateMapping(){this.mapping={},this.config.columnDefinitions.forEach((e,n)=>{let r=this.data.find(o=>o.mappingFieldName===e.fieldName);this.mapping[n]={rowIndex:r?r.fileIndex:null,columnFieldName:e.fieldName,shouldBeEmpty:!r}}),this.mappingErrors=this.hasMappingErrors(),this.mappingChange.emit({mappingErrors:this.mappingErrors,mapping:this.mapping})}_guessColumnFromHeaderValue(e,n){let r=this.config.columnDefinitions.find(a=>a.fieldName.toLowerCase()===e.toLowerCase());if(r)return{exactMatch:!0,columnDefinition:r};let o=this.config.columnDefinitions.find(a=>a.fieldName.toLowerCase().includes(e.toLowerCase()));return o?{exactMatch:!1,columnDefinition:o}:n<=this.config.columnDefinitions.length?{exactMatch:!1,columnDefinition:this.config.columnDefinitions[n]}:{exactMatch:!1,columnDefinition:null}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"div"),be(1,"bd-loader",3),M(),ie(2,HQt,5,1,"ng-template",null,0,di)),n&2){let o=Oi(3);E(),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,so,da,zr,mc,Td,rc,Us,ra,yr,ya],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 EZe=` .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 GQt=["*"],jQt={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})},$Qt={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"},AZe=(()=>{class t extends br{name="divider";theme=EZe;classes=$Qt;inlineStyles=jQt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var DZe=(()=>{class t extends ur{styleClass;layout="horizontal";type="solid";align;_componentStyle=ae(AZe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-divider"]],hostAttrs:["data-pc-name","divider","role","separator"],hostVars:5,hostBindings:function(n,r){n&2&&(lt("aria-orientation",r.layout),is(r.sx("root")),Pe(r.cn(r.cx("root"),r.styleClass)))},inputs:{styleClass:"styleClass",layout:"layout",type:"type",align:"align"},features:[Ii([AZe]),Tt],ngContentSelectors:GQt,decls:2,vars:2,template:function(n,r){n&1&&(Kn(),O(0,"div"),Sn(1),M()),n&2&&Pe(r.cx("content"))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})();function qQt(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=L(2);E(),Pt(e.rawFile.name)}}function YQt(t,i){if(t&1){let e=qe();O(0,"div",10)(1,"p-button",13),te("onClick",function(){se(e);let r=L(2);return le(r.downloadSchemaFile())}),ee(2," Vorlage herunterladen "),M()()}t&2&&(E(),D("outlined",!0))}function KQt(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"div",5)(2,"div",6)(3,"p-fileupload",7),te("onSelect",function(r){se(e);let o=L();return le(o.onFileChange(r))}),M(),yt(4,qQt,2,1,"span"),M()(),O(5,"div",8)(6,"p-divider",9)(7,"b"),ee(8,"oder"),M()()(),O(9,"div",5),be(10,"p-tree",3),yt(11,YQt,3,1,"div",10),M()(),O(12,"div",11)(13,"p-button",12),te("onClick",function(){let r=se(e).activateCallback;return le(r(2))}),ee(14,"Weiter "),M()()}if(t&2){let e=L();E(3),D("auto",!0),E(),vt(e.rawFile?4:-1),E(6),D("value",e.treeNode),E(),vt(e.config?11:-1),E(2),D("disabled",!e.rawFile)("raised",!0)}}function WQt(t,i){if(t&1){let e=qe();O(0,"bd-csv-import-mapping",14),te("mappingChange",function(r){se(e);let o=L();return le(o.onMappingChange(r))}),M(),O(1,"div",11)(2,"p-button",12),te("onClick",function(){se(e);let r=L();return le(r.process())}),ee(3,"Weiter "),M()()}if(t&2){let e=L();D("rawFile",e.rawFile)("config",e.config)("originalFileName",e.rawFile.name),E(2),D("disabled",e.mapping.mappingErrors)("raised",!0)}}function QQt(t,i){if(t&1&&be(0,"bd-loader",15),t&2){let e=L(),n=Oi(19);D("loadItem",e.loading$)("successTemplate",n)}}function ZQt(t,i){if(t&1){let e=qe();O(0,"bd-csv-import-result",17),te("resetFile",function(){se(e);let r=L(2);return le(r.onReset())})("dataChange",function(r){se(e);let o=L(2);return le(o.onDataChanged(r))}),M()}if(t&2){let e=L(2);D("data",e.importResult.data)("config",e.config)}}function XQt(t,i){if(t&1&&yt(0,ZQt,1,2,"bd-csv-import-result",16),t&2){let e=L();vt(e.importResult.data?0:-1)}}var kce=(()=>{class t{config;inputChange=new ve;loading$=new hi(1);step=1;rawFile;importResult;treeNode;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(n=>({label:n})):[]]}))}]}onFileChange(e){this.rawFile=e.currentFiles[0]}onMappingChange(e){this.mapping=e}process(){this.step=3,this.loading$.next(ni.LOADING),new n_().process(this.rawFile,this.mapping.mapping).subscribe({next:e=>{this.importResult=e,this.loading$.next(ni.SUCCESS)},error:()=>this.loading$.next(ni.ERROR)})}onReset(){this.rawFile=null,this.importResult=null,this.step=1,this.loading$.next(ni.INIT)}onDataChanged(e){this.inputChange.emit({data:e,originalFileName:this.importResult.originalFileName})}downloadSchemaFile(){let e=n_.createSchemaFile(this.config),n=new Blob(["\uFEFF"+e],{type:"text/csv;charset=utf-8"});(0,kZe.saveAs)(n,"Vorlage.csv")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-stepper",2)(1,"p-step-list")(2,"p-step",3),ee(3,"Datei"),M(),O(4,"p-step",3),ee(5,"Zuordnung"),M(),O(6,"p-step",3),ee(7,"Ergebnis"),M()(),O(8,"p-step-panels")(9,"p-step-panel",3),ie(10,KQt,15,6,"ng-template",null,0,di),M(),O(12,"p-step-panel",3),ie(13,WQt,4,5,"ng-template",null,0,di),M(),O(15,"p-step-panel",3),ie(16,QQt,1,2,"ng-template",null,0,di),M()()(),ie(18,XQt,1,1,"ng-template",null,1,di)),n&2&&(D("value",r.step)("linear",!0),E(2),D("value",1),E(2),D("value",2),E(2),D("value",3),E(3),D("value",1),E(3),D("value",2),E(3),D("value",3))},dependencies:[sZe,lZe,BHe,nK,Ece,$2,bZe,Ace,_ae,Iy,Yl,TZe,DZe,fr],encapsulation:2})}return t})();var cEe=(()=>{class t{config;ref;importResult;constructor(e,n){this.config=e,this.ref=n}onInputChanged(e){this.importResult=e}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"bd-csv-import",1),te("inputChange",function(a){return r.onInputChanged(a)}),M(),O(2,"div",2)(3,"p-button",3),te("onClick",function(){return r.ref.close()}),M(),O(4,"p-button",4),te("onClick",function(){return r.ref.close(r.importResult)}),M()()()),n&2&&(E(),D("config",r.config.data==null?null:r.config.data.importConfig),E(2),D("outlined",!0),E(),D("disabled",!r.importResult))},dependencies:[kce,Yl],encapsulation:2})}return t})();var v6=(()=>{class t{_dialogService;config;inputChange=new ve;constructor(e){this._dialogService=e}onOpenDialog(){let e=$e(pe({},Ul),{header:"CSV-Datei importieren",data:{importConfig:this.config}});this._dialogService.open(cEe,e).onClose.pipe(vn(n=>!!n)).subscribe(n=>this.inputChange.emit(n))}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["bd-csv-import-file-button"]],inputs:{config:"config"},outputs:{inputChange:"inputChange"},features:[Ii([To])],decls:1,vars:1,consts:[["pTooltip","CSV-Datei importieren","icon","pi pi-file-import",3,"onClick","text"]],template:function(n,r){n&1&&(O(0,"p-button",0),te("onClick",function(){return r.onOpenDialog()}),M()),n&2&&D("text",!0)},dependencies:[Yl,tg],encapsulation:2})}return t})();var MZe=new Mi("CdkAccordion");var OZe=(()=>{class t{accordion=ae(MZe,{optional:!0,skipSelf:!0});_changeDetectorRef=ae(dn);_expansionDispatcher=ae(VP);_openCloseAllSubscription=Ia.EMPTY;closed=new ve;opened=new ve;destroyed=new ve;expandedChange=new ve;id=ae(Tl).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let n=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,n)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=hr(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,n)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===n&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",Je],disabled:[2,"disabled","disabled",Je]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Ii([{provide:MZe,useValue:void 0}])]})}return t})();var JQt=["body"],eZt=["bodyWrapper"],tZt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],iZt=["mat-expansion-panel-header","*","mat-action-row"];function nZt(t,i){}var rZt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],oZt=["mat-panel-title","mat-panel-description","*"];function aZt(t,i){t&1&&(vo(0,"span",1),Pi(),vo(1,"svg",2),Cr(2,"path",3),So()())}var RZe=new Mi("MAT_ACCORDION"),PZe=new Mi("MAT_EXPANSION_PANEL"),sZt=(()=>{class t{_template=ae(Bl);_expansionPanel=ae(PZe,{optional:!0});constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]})}return t})(),NZe=new Mi("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),dEe=(()=>{class t extends OZe{_viewContainerRef=ae($l);_animationsDisabled=tl();_document=ae(Gr);_ngZone=ae(Pn);_elementRef=ae(qn);_renderer=ae(Ma);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new ve;afterCollapse=new ve;_inputChanges=new Ai;accordion=ae(RZe,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=ae(Tl).getId("mat-expansion-panel-header-");constructor(){super();let e=ae(NZe,{optional:!0});this._expansionDispatcher=ae(VP),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(ks(null),vn(()=>this.expanded&&!this._portal),ar(1)).subscribe(()=>{this._portal=new Yh(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,n=this._body.nativeElement;return e===n||n.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:n})=>{e===this._bodyWrapper?.nativeElement&&n==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(n,r,o){if(n&1&&Vt(o,sZt,5),n&2){let a;ze(a=Ue())&&(r._lazyContent=a.first)}},viewQuery:function(n,r){if(n&1&&(Xi(JQt,5),Xi(eZt,5)),n&2){let o;ze(o=Ue())&&(r._body=o.first),ze(o=Ue())&&(r._bodyWrapper=o.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(n,r){n&2&&zn("mat-expanded",r.expanded)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",Je],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Ii([{provide:RZe,useValue:void 0},{provide:PZe,useExisting:t}]),Tt,Yt],ngContentSelectors:iZt,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,r){n&1&&(Kn(tZt),Sn(0),O(1,"div",2,0)(3,"div",3,1)(5,"div",4),Sn(6,1),ie(7,nZt,0,0,"ng-template",5),M(),Sn(8,2),M()()),n&2&&(E(),lt("inert",r.expanded?null:""),E(2),D("id",r.id),lt("aria-labelledby",r._headerId),E(4),D("cdkPortalOutlet",r._portal))},dependencies:[Gp],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-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-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden;font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px} `],encapsulation:2,changeDetection:0})}return t})();var FZe=(()=>{class t{panel=ae(dEe,{host:!0});_element=ae(qn);_focusMonitor=ae(wm);_changeDetectorRef=ae(dn);_parentChangeSubscription=Ia.EMPTY;constructor(){ae(pc).load(gp);let e=this.panel,n=ae(NZe,{optional:!0}),r=ae(new $f("tabindex"),{optional:!0}),o=e.accordion?e.accordion._stateChanges.pipe(vn(a=>!!(a.hideToggle||a.togglePosition))):Xd;this.tabIndex=parseInt(r||"")||0,this._parentChangeSubscription=Vp(e.opened,e.closed,o,e._inputChanges.pipe(vn(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(vn(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),n&&(this.expandedHeight=n.expandedHeight,this.collapsedHeight=n.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:Au(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,n){e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(n,r){n&1&&te("click",function(){return r._toggle()})("keydown",function(a){return r._keydown(a)}),n&2&&(lt("id",r.panel._headerId)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r._getPanelId())("aria-expanded",r._isExpanded())("aria-disabled",r.panel.disabled),la("height",r._getHeaderHeight()),zn("mat-expanded",r._isExpanded())("mat-expansion-toggle-indicator-after",r._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",r._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:En(e)]},ngContentSelectors:oZt,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(n,r){n&1&&(Kn(rZt),vo(0,"span",0),Sn(1),Sn(2,1),Sn(3,2),So(),yt(4,aZt,3,0,"span",1)),n&2&&(zn("mat-content-hide-toggle",!r._showToggle()),E(4),vt(r._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}} `],encapsulation:2,changeDetection:0})}return t})();function lZt(t,i){if(t&1){let e=qe();fi(0),O(1,"div",3)(2,"bd-csv-import",4),te("inputChange",function(r){se(e);let o=L();return le(o.onImportResultChange(r))}),M(),O(3,"p-iftalabel")(4,"p-multiSelect",5),te("onChange",function(r){se(e);let o=L();return le(o.onHubspotOwnerIdChange(r))}),M(),O(5,"label",6),ee(6,"F\xFCr Kontakt zust\xE4ndiger Mitarbeiter"),M()()(),be(7,"mat-divider"),gi()}if(t&2){let e=L();E(2),D("config",e.csvImportConfig),E(2),D("options",e.allEmploys)("selectionLimit",1)}}function cZt(t,i){t&1&&be(0,"mat-divider")}function dZt(t,i){if(t&1&&(fi(0),O(1,"mat-list-item")(2,"mat-icon",12),ee(3,"account_circle"),M(),O(4,"span",13),ee(5),M(),O(6,"span",14),ee(7),M()(),ie(8,cZt,1,0,"mat-divider",1),gi()),t&2){let e=i.$implicit,n=i.last;E(5),Pd("",e.lastName," ",e.foreName),E(2),gn(" ",e.mail," "),E(),D("ngIf",!n)}}function uZt(t,i){if(t&1&&(fi(0),O(1,"div",9)(2,"mat-expansion-panel")(3,"mat-expansion-panel-header"),ee(4),M(),O(5,"mat-list"),ie(6,dZt,9,4,"ng-container",11),M()()(),gi()),t&2){let e=L(2);E(4),gn(" ",e.userImportDuplicates.length," Email-Adressen f\xFCr bestehende Nutzer gefunden "),E(2),D("ngForOf",e.userImportDuplicates)}}function pZt(t,i){t&1&&be(0,"mat-divider")}function mZt(t,i){if(t&1&&(fi(0),O(1,"mat-list-item")(2,"mat-icon",12),ee(3,"check_circle"),M(),O(4,"span",13),ee(5),M(),O(6,"span",14),ee(7),M()(),ie(8,pZt,1,0,"mat-divider",1),gi()),t&2){let e=i.$implicit,n=i.last;E(5),Pt(e.displayName),E(2),Pd(" ",e.mail,", ",e.oid," "),E(),D("ngIf",!n)}}function hZt(t,i){if(t&1&&(fi(0),O(1,"div",3)(2,"span",15),ee(3),M(),O(4,"mat-list"),ie(5,mZt,9,4,"ng-container",11),M()(),gi()),t&2){let e=L(2);E(3),Pt(e.messageLog),E(2),D("ngForOf",e.userImportFinished)}}function fZt(t,i){if(t&1){let e=qe();O(0,"div",7)(1,"div",8),ie(2,uZt,7,2,"ng-container",1),O(3,"div",9)(4,"button",10),te("click",function(){se(e);let r=L();return le(r.import())}),O(5,"span"),ee(6),M()()()()(),ie(7,hZt,6,2,"ng-container",1)}if(t&2){let e=L();E(2),D("ngIf",(e.userImportDuplicates==null?null:e.userImportDuplicates.length)>0),E(2),D("disabled",e.userImportRunning===!0||e.userImportSize===0||e.hubspotOwnerId.length!==1),E(2),gn("Import f\xFCr ",e.userImportSize," Nutzer starten"),E(),D("ngIf",e.userImportRunning)}}var uEe=class{lastName;foreName;mail;companyId;constructor(i,e,n,r){this.lastName=i,this.foreName=e,this.mail=n,this.companyId=r}},LZe=(()=>{class t{_companyService;_userService;loading$=new Sa(ni.INIT);csvImportConfig={title:"CSV-Datei",columnDefinitions:[{displayName:"Name",fieldName:"name"},{displayName:"Vorname",fieldName:"vorname"},{displayName:"Mail",fieldName:"mail"},{displayName:"Unternehmens-ID",fieldName:"unternehmens_id"}]};allEmploys=[{hubspotId:"34578586",name:"Manuel Heurich"},{hubspotId:"34846418",name:"Markus Schicktanz"},{hubspotId:"35049636",name:"Maximilian Schmid"},{hubspotId:"108938088",name:"Michele D\xF6bler-Bakalli"},{hubspotId:"164373324",name:"Verena Schiefelbein"}];userImportRunning=!1;userImport;userImportDuplicates;userImportSize;userImportFinished=[];messageLog="";hubspotOwnerId=[];constructor(e,n){this._companyService=e,this._userService=n}onHubspotOwnerIdChange(e){this.hubspotOwnerId=e.value}onImportResultChange(e){this.loading$.next(ni.LOADING),this._userService.getAll().subscribe(n=>{let r=n.map(a=>a.mail),o=e.data.map(a=>new uEe(a[0],a[1],a[2],a[3]));this.userImport=o.filter(a=>!r.includes(a.mail)),this.userImportSize=this.userImport.length,this.userImportDuplicates=o.filter(a=>r.includes(a.mail)),this.loading$.next(ni.SUCCESS)})}import(){if(this.userImportRunning=!0,this.userImport.length===0)return;let e=this.userImport.pop();e&&this.saveUser(e).subscribe(()=>{this.userImportFinished.length===this.userImportSize?this.messageLog="Import erfolgreich abgeschlossen":this.messageLog=`${this.userImportFinished.length} Nutzer von ${this.userImportSize} importiert..`,this.import()},n=>{this.messageLog=`Fehler: ${JSON.stringify(n)}`})}saveUser(e){return this._userService.create(e.foreName,e.lastName,e.mail,zd.createRandomPassword(),this.hubspotOwnerId.at(0)).pipe(yo(n=>this.userImportFinished.push(n)),On(n=>this._companyService.addUserToCompany(n.oid,e.companyId)))}static \u0275fac=function(n){return new(n||t)(xe(bp),xe($g))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:8,vars:3,consts:[["successContent",""],[4,"ngIf"],[3,"loadItem","successTemplate"],[1,"bd-container"],[3,"inputChange","config"],["inputId","hubspotOwnerId","placeholder","F\xFCr Kontakt zust\xE4ndiger Mitarbeiter","filterPlaceHolder","Kontakt suchen","dataKey","hubspotId","optionLabel","name","optionValue","hubspotId","styleClass","w-full","variant","filled",3,"onChange","options","selectionLimit"],["for","hubspotOwnerId"],[1,"bd-container-inner"],[1,"flex","flex-col","gap-6"],[1,"flex-1"],["mat-raised-button","","color","accent",3,"click","disabled"],[4,"ngFor","ngForOf"],["matListItemIcon",""],["matListItemTitle",""],["matListItemLine",""],[1,"mat-body"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2,"Neue Nutzer importieren"),M()(),be(3,"bd-administration-users-hint"),ie(4,lZt,8,3,"ng-container",1),be(5,"bd-loader",2),ie(6,fZt,8,4,"ng-template",null,0,di)),n&2){let o=Oi(7);E(4),D("ngIf",r.userImportRunning===!1),E(),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[zl,wce,Xr,kce,VM,sy,Id,fr,dEe,FZe,dae,Vl,uae,zr,W$,Y$,K$,Kr,Ho],encapsulation:2})}return t})();var BZe=[{path:"users",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG},pageTitle:bu.title("Nutzer")},children:[{path:"",pathMatch:"full",component:DQe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}},{path:"new",component:nZe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG},pageTitle:bu.title("Neuer Nutzer")}},{path:"import",component:LZe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG},pageTitle:bu.title("Nutzer importieren")}},{path:":userId",component:iZe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}}]}],VZe=[{id:"BD_ADMINISTRATION_USERS_FEATURE_NEW",displayName:"Neuer Nutzer",type:"users",permissions:["ADMIN:BASE"],navigation:{title:"Neuer Nutzer",path:["users","new"]}},{id:"BD_ADMINISTRATION_USERS_FEATURE_IMPORT",displayName:"Neue Nutzer importieren",type:"users",permissions:["ADMIN:BASE"],navigation:{title:"Neue Nutzer importieren",path:["users","import"]}},{id:"BD_ADMINISTRATION_USERS_FEATURE",displayName:"Nutzer \xDCbersicht",type:"users",permissions:["ADMIN:BASE"],navigation:{title:"Nutzer \xDCbersicht",path:["users"]}}];var Mce=(()=>{class t{_resourceService;_confirmService;shareRecord;archived=new ve;constructor(e,n){this._resourceService=e,this._confirmService=n}archive(){Hr(this._confirmService.get("Resource","M\xF6chten Sie die Resource wirklich archivieren.")).pipe(vn(n=>!!n),ps(()=>this._resourceService.archive(this.shareRecord.resource_name,this.shareRecord.resource_id,this.shareRecord.id))).subscribe(()=>this.archived.emit(!0))}static \u0275fac=function(n){return new(n||t)(xe(rf),xe(Vb))};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-details-archive"]],inputs:{shareRecord:"shareRecord"},outputs:{archived:"archived"},decls:3,vars:0,consts:[["mat-icon-button","","matTooltip","Resource Freigabe archivieren","color","accent",3,"click"]],template:function(n,r){n&1&&(O(0,"button",0),te("click",function(){return r.archive()}),O(1,"mat-icon"),ee(2,"archive"),M()())},dependencies:[il,Ld,zr],encapsulation:2})}return t})();var zZe=(()=>{class t{_groupService;_companyService;share;company;constructor(e,n){this._groupService=e,this._companyService=n}ngOnInit(){this._groupService.getById(this.share.group_id).pipe(On(e=>this._companyService.getById(e.companyId))).subscribe(e=>this.company=e)}static \u0275fac=function(n){return new(n||t)(xe(iC),xe(bp))};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-detail-group-share"]],inputs:{share:"share"},decls:11,vars:8,consts:[[1,"flex","flex-row","gap-6"],[1,"flex-1"],[1,"mat-body-1"],[1,"basis-10"],[3,"shareRecord"]],template:function(n,r){if(n&1&&(O(0,"div",0)(1,"div",1)(2,"span",2),ee(3),Dr(4,"groupAdmin"),Dr(5,"async"),M()(),O(6,"div")(7,"span",2),ee(8),M()(),O(9,"div",3),be(10,"bd-administration-resource-details-archive",4),M()()),n&2){let o;E(3),Pd("",r.company==null?null:r.company.name," / ",(o=ca(5,6,ca(4,4,r.share.group_id)))==null?null:o.name),E(5),Pt(r.share.permission),E(2),D("shareRecord",r.share)}},dependencies:[Mce,m7e,Dc],encapsulation:2})}return t})();var gZt=(t,i,e)=>({resource_name:t,resource_id:i,permission:"CREATOR",user_id:e});function _Zt(t,i){if(t&1&&(fi(0),O(1,"span",9),ee(2),Dr(3,"userAdmin"),Dr(4,"async"),M(),gi()),t&2){let e,n=L();E(2),Pt(((e=ca(4,3,ca(3,1,n.shared.creatorId)))==null?null:e.displayName)||"Unbekannt")}}function yZt(t,i){t&1&&(fi(0),O(1,"span",9),ee(2,"Unbekannt"),M(),gi())}function vZt(t,i){if(t&1&&(fi(0),O(1,"div",11)(2,"div",5)(3,"span",9),ee(4),Dr(5,"userAdmin"),Dr(6,"async"),M()(),O(7,"div",5)(8,"span",9),ee(9),M()(),O(10,"div"),be(11,"bd-administration-resource-details-archive",7),M()(),gi()),t&2){let e,n=i.$implicit;E(4),Pt((e=ca(6,5,ca(5,3,n.user_id)))==null?null:e.displayName),E(5),Pt(n.permission),E(2),D("shareRecord",n)}}function bZt(t,i){if(t&1&&(fi(0),ie(1,vZt,12,7,"ng-container",10),gi()),t&2){let e=L();E(),D("ngForOf",e.shared.users)}}function CZt(t,i){if(t&1&&(fi(0),be(1,"bd-administration-resource-detail-group-share",12),gi()),t&2){let e=i.$implicit;E(),D("share",e)}}function xZt(t,i){if(t&1&&(fi(0),ie(1,CZt,2,1,"ng-container",10),gi()),t&2){let e=L();E(),D("ngForOf",e.shared.groups)}}function SZt(t,i){t&1&&be(0,"bd-message-empty",13)}var UZe=(()=>{class t{resource;shared;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-details-shared"]],inputs:{resource:"resource",shared:"shared"},decls:25,vars:11,consts:[["noShareTpl",""],[1,"bd-container"],[1,"mat-headline"],[1,"mat-subheading-2"],[1,"flex","flex-row","items-center"],[1,"flex-1"],[4,"ngIf"],[3,"shareRecord"],[4,"ngIf","ngIfElse"],[1,"mat-body-1"],[4,"ngFor","ngForOf"],[1,"flex","flex-row"],[3,"share"],["message","Resource wurde noch nicht geteilt."]],template:function(n,r){if(n&1&&(O(0,"div",1)(1,"span",2),ee(2,"Freigaben"),M()(),O(3,"div",1)(4,"div")(5,"span",3),ee(6,"Ersteller"),M()(),O(7,"div",4)(8,"div",5),ie(9,_Zt,5,5,"ng-container",6)(10,yZt,3,0,"ng-container",6),M(),O(11,"div"),be(12,"bd-administration-resource-details-archive",7),M()()(),O(13,"div",1)(14,"div")(15,"span",3),ee(16,"Nutzer"),M()(),ie(17,bZt,2,1,"ng-container",8),M(),O(18,"div",1)(19,"div")(20,"span",3),ee(21,"Gruppen"),M()(),ie(22,xZt,2,1,"ng-container",8),M(),ie(23,SZt,1,0,"ng-template",null,0,di)),n&2){let o=Oi(24);E(9),D("ngIf",r.shared.creatorId),E(),D("ngIf",!r.shared.creatorId),E(2),D("shareRecord",Qu(7,gZt,r.resource.name,r.resource.id,r.shared.creatorId)),E(5),D("ngIf",!!r.shared.users&&r.shared.users.length>0)("ngIfElse",o),E(5),D("ngIf",!!r.shared.groups&&r.shared.groups.length>0)("ngIfElse",o)}},dependencies:[Xr,Mce,Vl,zZe,ec,Dc,w7e],encapsulation:2})}return t})();var wZt=(t,i)=>["/resources",t,i];function IZt(t,i){if(t&1&&(fi(0),O(1,"div",6)(2,"div",7)(3,"span",8),ee(4),M()(),O(5,"div",7)(6,"span",8),ee(7),Dr(8,"resourceDisplayName"),Dr(9,"async"),M()(),O(10,"div")(11,"a",9)(12,"mat-icon"),ee(13,"open_in_new"),M()()()(),gi()),t&2){let e=i.$implicit,n=L().$implicit;E(4),Pt(e),E(3),gn(" ",ca(9,6,gl(8,3,e,n))," "),E(4),D("routerLink",na(8,wZt,n,e))}}function TZt(t,i){if(t&1&&(fi(0),O(1,"div")(2,"span",5),ee(3),M()(),ie(4,IZt,14,11,"ng-container",4),gi()),t&2){let e=i.$implicit,n=L(2);E(3),Pt(e),E(),D("ngForOf",n.childResources[e])}}function EZt(t,i){if(t&1&&(fi(0),ie(1,TZt,5,2,"ng-container",4),gi()),t&2){let e=L();E(),D("ngForOf",e.childResourceNames)}}function AZt(t,i){t&1&&be(0,"bd-message-empty",10)}var HZe=(()=>{class t{childResources;childResourceNames;ngOnChanges(e){e.childResources&&e.childResources.currentValue&&(this.childResourceNames=Object.keys(this.childResources))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-details-children"]],inputs:{childResources:"childResources"},features:[Yt],decls:7,vars:2,consts:[["emptyChildResourcesTpl",""],[1,"bd-container"],[1,"mat-headline"],[4,"ngIf","ngIfElse"],[4,"ngFor","ngForOf"],[1,"mat-subheading-2"],[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-body-1"],["mat-icon-button","","color","accent",3,"routerLink"],["message","Keine Subresourcen vorhanden."]],template:function(n,r){if(n&1&&(O(0,"div",1)(1,"span",2),ee(2,"Subresourcen"),M()(),O(3,"div",1),ie(4,EZt,2,1,"ng-container",3),M(),ie(5,AZt,1,0,"ng-template",null,0,di)),n&2){let o=Oi(6);E(4),D("ngIf",!!r.childResourceNames)("ngIfElse",o)}},dependencies:[Xr,Vl,RP,Ms,zr,ec,Dc,BM],encapsulation:2})}return t})();var GZe=(()=>{class t{_dialog;_dialogConfigService;_resourceService;_authService;resource;shared=new ve;_account=null;constructor(e,n,r,o){this._dialog=e,this._dialogConfigService=n,this._resourceService=r,this._authService=o}ngOnInit(){this._authService.accountInfo$.subscribe(e=>this._account=e)}openShareDialog(){let e=this._dialogConfigService.config();e.data={actionUserId:this._account?.idTokenClaims.oid,resources:[{resource_id:this.resource.id,resource_name:this.resource.name,permission:"DELETE"}]},this._dialog.open(f6,e).afterClosed().pipe(ar(1)).subscribe(()=>this.shared.emit())}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm),xe(Rm),xe(em))};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-details-share"]],inputs:{resource:"resource"},outputs:{shared:"shared"},decls:2,vars:0,consts:[["mat-raised-button","","color","accent",3,"click"]],template:function(n,r){n&1&&(O(0,"button",0),te("click",function(){return r.openShareDialog()}),ee(1," Resource teilen "),M())},dependencies:[Kr],encapsulation:2})}return t})();var jZe=(()=>{class t{resource;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-details-header"]],inputs:{resource:"resource"},decls:28,vars:10,consts:[[1,"bd-container"],[1,"flex","flex-row","gap-6","items-center"],[1,"basis-24"],[1,"mat-body-2"],[1,"flex-1"],[1,"mat-body-1"],["mat-icon-button","","color","accent",3,"cdkCopyToClipboard"]],template:function(n,r){n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2),Dr(3,"resourceDisplayName"),Dr(4,"async"),M()(),O(5,"div",0)(6,"div",1)(7,"div",2)(8,"span",3),ee(9,"ResourceId"),M()(),O(10,"div",4)(11,"span",5),ee(12),M()(),O(13,"div")(14,"button",6)(15,"mat-icon"),ee(16," content_copy"),M()()()(),O(17,"div",1)(18,"div",2)(19,"span",3),ee(20,"ResourceName"),M()(),O(21,"div",4)(22,"span",5),ee(23),M()(),O(24,"div")(25,"button",6)(26,"mat-icon"),ee(27," content_copy"),M()()()()()),n&2&&(E(2),Pt(ca(4,8,gl(3,5,r.resource.id,r.resource.name))),E(10),Pt(r.resource.id),E(2),D("cdkCopyToClipboard",r.resource.id),E(9),Pt(r.resource.name),E(2),D("cdkCopyToClipboard",r.resource.name))},dependencies:[zl,il,m5,zr,Dc,BM],encapsulation:2})}return t})();var DZt=t=>["/resources",t];function kZt(t,i){if(t&1&&be(0,"bd-administration-resource-details-children",7)(1,"mat-divider")(2,"bd-administration-resource-details-shared",8)(3,"mat-divider"),t&2){let e=L();D("childResources",e.childResources),E(2),D("resource",e.resource)("shared",e.shared)}}var $Ze=(()=>{class t{_activatedRoute;_resourceService;_resourcesService;loading$=new Ai;resource;childResources={};shared;constructor(e,n,r){this._activatedRoute=e,this._resourceService=n,this._resourcesService=r}ngOnInit(){this._activatedRoute.params.subscribe(e=>{this.resource={name:e.resourceName,id:e.resourceId},this._fetch()})}onResourceShare(){this._fetch()}_fetch(){this._fetchResource(),this._fetchChildResources()}_fetchResource(){this.loading$.next(ni.LOADING),this._resourceService.sharedRecordsByResourceName(this.resource.name).pipe(ot(e=>e.filter(n=>n.resource_id===this.resource.id))).subscribe(e=>{this.shared={creatorId:null,users:[],groups:[]},e.forEach(n=>{n.permission==="CREATOR"?this.shared.creatorId=n.user_id:n.user_id?this.shared.users.push(n):n.group_id&&this.shared.groups.push(n)}),this.loading$.next(ni.SUCCESS)})}_fetchChildResources(){let e=Foe[this.resource.name];e&&e.children&&e.children.length>0&&this._resourcesService.of(this.resource.name).children(this.resource.id).pipe(ar(1)).subscribe(r=>{this.childResources=r})}static \u0275fac=function(n){return new(n||t)(xe(id),xe(rf),xe(Rw))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:12,vars:7,consts:[["sharesTpl",""],[3,"resource"],[3,"loadItem","successTemplate"],[1,"bd-container"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[3,"shared","resource"],[3,"childResources"],[3,"resource","shared"]],template:function(n,r){if(n&1){let o=qe();be(0,"bd-administration-resource-details-header",1)(1,"mat-divider")(2,"bd-loader",2),O(3,"div",3)(4,"div",4)(5,"div")(6,"a",5),ee(7," Resourcen \xDCbersicht "),M()(),O(8,"div")(9,"bd-administration-resource-details-share",6),te("shared",function(){return se(o),le(r.onResourceShare())}),M()()()(),ie(10,kZt,4,3,"ng-template",null,0,di)}if(n&2){let o=Oi(11);D("resource",r.resource),E(2),D("loadItem",r.loading$)("successTemplate",o),E(4),D("routerLink",Yi(5,DZt,r.resource.name)),E(3),D("resource",r.resource)}},dependencies:[jZe,Id,fr,iw,Ms,GZe,HZe,UZe],styles:["mat-divider[_ngcontent-%COMP%]{margin:12px 0}"]})}return t})();var MZt=()=>[5,10,25,50],OZt=()=>["resource_name","resource_id","user_id"],qZe=(t,i)=>["/resources",t,i],RZt=t=>["/groups",t],PZt=t=>["/users",t];function NZt(t,i){if(t&1){let e=qe();O(0,"div",5)(1,"div",6)(2,"bd-search-box",7),te("searchChange",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.trim(),"contains"))}),M()(),O(3,"div",6)(4,"button",8),te("click",function(){se(e);let r=L();return le(r.shareMultipleResources(r.selection.selected))}),ee(5),M()()()}if(t&2){let e=L();E(4),D("disabled",e.selection.isEmpty()),E(),gn(" ",e.selection.selected.length," Resourcen Freigeben ")}}function FZt(t,i){t&1&&(O(0,"tr")(1,"th",9),be(2,"p-tableHeaderCheckbox"),M(),O(3,"th"),ee(4,"Resource Name"),M(),O(5,"th"),ee(6,"Resource Id"),M(),O(7,"th"),ee(8,"Berechtigung"),M(),O(9,"th"),ee(10,"Besitzer"),M(),be(11,"th"),M())}function LZt(t,i){if(t&1&&(fi(0),O(1,"div",16)(2,"mat-icon"),ee(3,"group"),M(),O(4,"a",11),ee(5),M()(),gi()),t&2){let e=L().$implicit;E(4),D("routerLink",Yi(2,RZt,e.group_id)),E(),gn(" ",e.group_id," ")}}function BZt(t,i){if(t&1&&(fi(0),O(1,"div",16)(2,"mat-icon"),ee(3,"person"),M(),O(4,"a",11),ee(5),M()(),gi()),t&2){let e=L().$implicit;E(4),D("routerLink",Yi(2,PZt,e.user_id)),E(),gn(" ",e.user_id," ")}}function VZt(t,i){if(t&1){let e=qe();O(0,"tr")(1,"td"),be(2,"p-tableCheckbox",10),M(),O(3,"td"),ee(4),Dr(5,"resourceDisplayName"),Dr(6,"async"),M(),O(7,"td")(8,"a",11),ee(9),M()(),O(10,"td"),ee(11),M(),O(12,"td"),ie(13,LZt,6,4,"ng-container",12)(14,BZt,6,4,"ng-container",12),M(),O(15,"td")(16,"a",13)(17,"mat-icon"),ee(18,"open_in_new"),M()(),O(19,"button",14),te("click",function(){let r=se(e).$implicit,o=L();return le(o.shareResource(r))}),O(20,"mat-icon"),ee(21,"share"),M()(),O(22,"button",15),te("click",function(){let r=se(e).$implicit,o=L();return le(o.archiveResource(r))}),O(23,"mat-icon"),ee(24,"archive"),M()()()()}if(t&2){let e=i.$implicit;E(2),D("value",e),E(2),gn(" ",ca(6,11,gl(5,8,e.resource_id,e.resource_name))," "),E(4),D("routerLink",na(13,qZe,e.resource_name,e.resource_id)),E(),gn(" ",e==null?null:e.resource_id," "),E(2),Pt(e==null?null:e.permission),E(2),D("ngIf",e.group_id),E(),D("ngIf",e.user_id),E(2),D("routerLink",na(16,qZe,e.resource_name,e.resource_id))}}var YZe=(()=>{class t extends FM{_dialog;_responsiveDialogService;_confirmDialog;_permissionResourceService;resources;resourceChange=new ve;constructor(e,n,r,o){super(),this._dialog=e,this._responsiveDialogService=n,this._confirmDialog=r,this._permissionResourceService=o}shareMultipleResources(e){let n=this._responsiveDialogService.config();n.data={resources:e,actionUserId:null},this._dialog.open(f6,n).afterClosed().pipe(vn(r=>!!r)).subscribe(()=>{this.resourceChange.emit(!0)})}shareResource(e){return this.shareMultipleResources([e])}archiveResource(e){Hr(this._confirmDialog.get("Resource archivieren","M\xF6chten Sie die Resource wirklich archivieren ?","Archivieren")).pipe(vn(n=>!!n),ps(()=>this._permissionResourceService.archive(e.resource_name,e.resource_id,e.id))).subscribe(()=>this.resourceChange.emit(!0))}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm),xe(Vb),xe(rf))};static \u0275cmp=re({type:t,selectors:[["bd-administration-resource-list-data"]],inputs:{resources:"resources"},outputs:{resourceChange:"resourceChange"},features:[Tt],decls:5,vars:8,consts:[["dataTable",""],["currentPageReportTemplate","{first} - {last} von {totalRecords}","selectionMode","multiple","dataKey","id",3,"selectionChange","value","paginator","rows","rowsPerPageOptions","showCurrentPageReport","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[1,"flex","flex-row-reverse","justify-between","items-center"],[1,"basis-1/4"],[3,"searchChange"],["mat-raised-button","","color","accent",3,"click","disabled"],[2,"width","4rem"],[3,"value"],["mat-button","","color","accent",3,"routerLink"],[4,"ngIf"],["mat-icon-button","","matTooltip","Resource Details \xF6ffnen","color","accent",3,"routerLink"],["mat-icon-button","","color","accent","matTooltip","Resource freigeben",3,"click"],["mat-icon-button","","color","accent","matTooltip","Resource archivieren",3,"click"],[1,"flex","flex-row","gap-6"]],template:function(n,r){if(n&1){let o=qe();O(0,"p-table",1,0),te("selectionChange",function(c){return se(o),le(r.updateSelection(c))}),ie(2,NZt,6,2,"ng-template",2)(3,FZt,12,0,"ng-template",3)(4,VZt,25,19,"ng-template",4),M()}n&2&&D("value",r.resources)("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(6,MZt))("showCurrentPageReport",!0)("globalFilterFields",Vr(7,OZt))},dependencies:[zr,il,Ld,Ms,Xr,iw,Td,rc,Tr,Mw,Ow,A5,BM,Dc],encapsulation:2})}return t})();function zZt(t,i){if(t&1&&(O(0,"div",3),be(1,"bd-administration-resource-list-data",4),M()),t&2){let e=L();E(),D("resources",e.resources)}}var KZe=(()=>{class t{_activatedRoute;_permissionResourceService;loading$=new Sa(ni.INIT);resources;resourceName;constructor(e,n){this._activatedRoute=e,this._permissionResourceService=n}ngOnInit(){this._activatedRoute.params.subscribe(e=>{this.resourceName=e.resourceName,this._fetchData(this.resourceName)})}_fetchData(e){this.loading$.next(ni.LOADING),this._permissionResourceService.sharedRecordsByResourceName(e).pipe(ot(n=>n.filter((r,o,a)=>a.map(c=>c.resource_id).indexOf(r.resource_id)===o))).subscribe(n=>{this.resources=n,this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(id),xe(rf))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:7,vars:3,consts:[["content",""],[1,"toolbar-spacer"],[3,"loadItem","successTemplate"],[1,"bd-container"],[3,"resources"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2),M(),be(3,"span",1),M(),be(4,"bd-loader",2),ie(5,zZt,2,1,"ng-template",null,0,di)),n&2){let o=Oi(6);E(2),gn("Resources ",r.resourceName),E(2),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[YZe,fr,zl],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var WZe=[{path:"resources",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG},pageTitle:bu.title("Resourcen")},children:[{path:":resourceName",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}},children:[{path:"",pathMatch:"full",component:KZe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}},{path:":resourceId",component:$Ze,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}}]}]}],QZe=Object.values(tn).sort((t,i)=>t.localeCompare(i)).map(t=>UZt(t));function UZt(t){return{id:`BD_ADMINISTRATION_RESOURCES_FEATURE_${t}`,displayName:t,type:"resource",permissions:["ADMIN:BASE"],navigation:{title:t,path:["resources",t]}}}function HZt(t,i){if(t&1&&(O(0,"div",3),be(1,"bd-company-list",4),M()),t&2){let e=L();E(),D("companies",e.companies)}}var ZZe=(()=>{class t{_permissionCompanyService;loading$=new hi(1);companies=[];constructor(e){this._permissionCompanyService=e}ngOnInit(){this._permissionCompanyService.getAll().pipe(ar(1)).subscribe(e=>{this.companies=e.sort((n,r)=>n.name.localeCompare(r.name)),this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(bp))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:7,vars:2,consts:[["content",""],[1,"toolbar-spacer"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[3,"companies"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2,"Kunden"),M(),be(3,"span",1),M(),be(4,"bd-loader",2),ie(5,HZt,2,1,"ng-template",null,0,di)),n&2){let o=Oi(6);E(4),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[zl,fr,Td,ow,gce],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var XZe=(()=>{class t{_dialogRef;groupNameCtrl=new ho;constructor(e){this._dialogRef=e}saveGroup(){this._dialogRef.close(this.groupNameCtrl.value)}static \u0275fac=function(n){return new(n||t)(xe(Im))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:13,vars:3,consts:[["matDialogTitle",""],["type","text","matInput","",3,"formControl"],[3,"align"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","accent",3,"click","disabled"]],template:function(n,r){n&1&&(O(0,"h1",0),ee(1,"Gruppe erstellen"),M(),O(2,"mat-dialog-content")(3,"form")(4,"mat-form-field")(5,"mat-label"),ee(6,"Name"),M(),be(7,"input",1),M()()(),O(8,"mat-dialog-actions",2)(9,"button",3),ee(10,"Abbrechen"),M(),O(11,"button",4),te("click",function(){return r.saveGroup()}),ee(12," Speichern "),M()()),n&2&&(E(7),D("formControl",r.groupNameCtrl),E(),D("align","end"),E(3),D("disabled",r.groupNameCtrl.invalid))},dependencies:[$_,lh,Oa,bv,Kr,Kf,oa,Am,nd,yr,Em,Mc,zs,rd],encapsulation:2})}return t})();var JZe=(()=>{class t{_dialog;_responsiveDialogService;addGroup=new ve;constructor(e,n){this._dialog=e,this._responsiveDialogService=n}onAddGroup(){this._dialog.open(XZe,this._responsiveDialogService.config()).afterClosed().subscribe(e=>{e&&this.addGroup.emit(e)})}static \u0275fac=function(n){return new(n||t)(xe(ku),xe(Tm))};static \u0275cmp=re({type:t,selectors:[["bd-administration-groups-actions"]],outputs:{addGroup:"addGroup"},decls:2,vars:0,consts:[[1,"flex","flex-row-reverse"],["raised","true","label","Gruppe erstellen",3,"click"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"p-button",1),te("click",function(){return r.onAddGroup()}),M()())},dependencies:[Yl],encapsulation:2})}return t})();var GZt=()=>["name","id"],jZt=t=>["/groups",t];function $Zt(t,i){if(t&1){let e=qe();O(0,"input",6),te("input",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.target.value,"contains"))}),M()}}function qZt(t,i){t&1&&(O(0,"tr")(1,"th",7),ee(2,"ID"),M(),O(3,"th",8),ee(4," Name "),be(5,"p-sortIcon",9),M(),be(6,"th",10),M())}function YZt(t,i){if(t&1&&(O(0,"tr")(1,"td"),ee(2),M(),O(3,"td"),ee(4),M(),O(5,"td")(6,"a",11)(7,"mat-icon"),ee(8,"open_in_new"),M()()()()),t&2){let e=i.$implicit;E(2),gn(" ",e.id," "),E(2),gn(" ",e.name," "),E(2),D("routerLink",Yi(3,jZt,e.id))}}function KZt(t,i){t&1&&(O(0,"tr")(1,"td",12),ee(2,"Keine Gruppen gefunden."),M()())}var eXe=(()=>{class t{groups;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-company-groups-list"]],inputs:{groups:"groups"},decls:6,vars:6,consts:[["groupsTable",""],["dataKey","id","sortField","name",3,"value","sortOrder","rows","paginator","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pInputText","","type","text","placeholder","Suche",1,"w-full",3,"input"],[2,"width","380px"],["pSortableColumn","name"],["field","name"],[2,"width","40px"],["mat-icon-button","","color","accent",3,"routerLink"],["colspan","5"]],template:function(n,r){n&1&&(O(0,"p-table",1,0),ie(2,$Zt,1,0,"ng-template",2)(3,qZt,7,0,"ng-template",3)(4,YZt,9,5,"ng-template",4)(5,KZt,3,0,"ng-template",5),M()),n&2&&D("value",r.groups)("sortOrder",1)("rows",30)("paginator",!0)("globalFilterFields",Vr(5,GZt))},dependencies:[ow,_p,zr,RP,Tr,Td,rc,aC,sC,Ms],encapsulation:2})}return t})();function WZt(t,i){if(t&1){let e=qe();be(0,"bd-company-groups-list",2),O(1,"div",3)(2,"bd-administration-groups-actions",4),te("addGroup",function(r){se(e);let o=L();return le(o.addGroup(r))}),M()()}if(t&2){let e=L();D("groups",e.groups)}}var tXe=(()=>{class t{_router;_permissionCompanyService;companyId;loading$=new hi(1);groups;constructor(e,n){this._router=e,this._permissionCompanyService=n}ngOnInit(){this.loading$.next(ni.LOADING),this._permissionCompanyService.getAllGroupsByCompanyId(this.companyId).pipe(Ac(e=>$t([]))).subscribe(e=>{this.groups=e,this.loading$.next(ni.SUCCESS)})}addGroup(e){this.loading$.next(ni.LOADING),this._permissionCompanyService.createGroup(this.companyId,e).subscribe(n=>{this.loading$.next(ni.SUCCESS),this._router.navigate(["/groups",n.id])},n=>{this.loading$.next(ni.ERROR),console.error(n)})}static \u0275fac=function(n){return new(n||t)(xe(Ws),xe(bp))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-company-details-groups"]],inputs:{companyId:"companyId"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"groups"],[1,"bd-container"],[3,"addGroup"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,WZt,3,1,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,eXe,JZe],encapsulation:2})}return t})();function QZt(t,i){if(t&1&&(O(0,"div",6)(1,"span",7),ee(2),M(),O(3,"span",8),ee(4),M()()),t&2){let e=i.$implicit;E(2),Pt(e==null?null:e.displayName),E(2),Pt(e==null?null:e.mail)}}var iXe=(()=>{class t{_cd;_permissionUserService;ref;user;options=[];constructor(e,n,r){this._cd=e,this._permissionUserService=n,this.ref=r}onSearch(e){this._permissionUserService.getAll().pipe(ot(n=>n.map(r=>zd.of(r))),ot(n=>n.filter(r=>zd.filterUserBySearchTerm(e.query,r)))).subscribe(n=>{this.options=[],this.options=n,this._cd.markForCheck(),console.log("onSearch",n)})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe($g),xe(El))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:9,vars:4,consts:[[1,"flex","flex-col","gap-4"],["fluid","","optionLabel","displayName",3,"ngModelChange","completeMethod","ngModel","suggestions"],["pTemplate","item"],[1,"flex","flex-row","justify-end","gap-4"],[3,"onClick"],[3,"onClick","raised","disabled"],[1,"flex","flex-row","gap-6"],[1,"mat-body-strong"],[1,"flex-1","mat-body"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div")(2,"p-autoComplete",1),jf("ngModelChange",function(a){return Fg(r.user,a)||(r.user=a),a}),te("completeMethod",function(a){return r.onSearch(a)}),ie(3,QZt,5,2,"ng-template",2),M()(),O(4,"div",3)(5,"p-button",4),te("onClick",function(){return r.ref.close()}),ee(6,"Abbrechen"),M(),O(7,"p-button",5),te("onClick",function(){return r.ref.close(r.user)}),ee(8," \xDCbernehmen "),M()()()),n&2&&(E(2),Gf("ngModel",r.user),D("suggestions",r.options),E(5),D("raised",!0)("disabled",!r.user))},dependencies:[Xoe,Pu,Tr,ra,yr,ya,Yl],encapsulation:2})}return t})();var nXe={enableAddAction:!0,enableCleaningAction:!0};function ZZt(t,i){if(t&1){let e=qe();O(0,"p-button",1),te("click",function(){se(e);let r=L();return le(r.onAddUser())}),ee(1," Nutzer hinzuf\xFCgen "),M()}t&2&&D("raised",!0)}var Oce=(()=>{class t{_dialogService;options=nXe;addUser=new ve;constructor(e){this._dialogService=e}onAddUser(){let e=$e(pe({},Ul),{header:"Nutzer suchen"});this._dialogService.open(iXe,e).onClose.subscribe(n=>{n&&this.addUser.emit(n)})}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["bd-administration-users-actions"]],inputs:{options:"options"},outputs:{addUser:"addUser"},features:[Ii([To])],decls:1,vars:1,consts:[[3,"raised"],[3,"click","raised"]],template:function(n,r){n&1&&yt(0,ZZt,2,1,"p-button",0),n&2&&vt(r.options!=null&&r.options.enableAddAction?0:-1)},dependencies:[Yl],encapsulation:2})}return t})();function XZt(t,i){if(t&1){let e=qe();O(0,"bd-permissions-users-list-items",2),te("removeUser",function(r){se(e);let o=L();return le(o.removeUserFromCompany(r))}),M(),O(1,"div",3)(2,"bd-administration-users-actions",4),te("addUser",function(r){se(e);let o=L();return le(o.addUserToCompany(r))}),M()()}if(t&2){let e=L();D("users",e.users)("options",e.BD_PERMISSIONS_USERS_ITEMS_OPTIONS_COMPANY)}}var rXe=(()=>{class t{_permissionCompanyService;companyId;BD_PERMISSIONS_USERS_ITEMS_OPTIONS_COMPANY={enableRemoveAction:!0,tooltipRemoveAction:"Nutzer von Kunden entfernen"};loading$=new hi(1);users;constructor(e){this._permissionCompanyService=e}ngOnInit(){this.loading$.next(ni.LOADING),this._permissionCompanyService.getAllUsersByCompanyId(this.companyId).pipe(ot(e=>e.map(n=>zd.of(n))),Ac(()=>$t([]))).subscribe(e=>{this.users=e,this.loading$.next(ni.SUCCESS)})}addUserToCompany(e){this.loading$.next(ni.LOADING),this._permissionCompanyService.addUserToCompany(e.oid,this.companyId).pipe(ps(()=>this._permissionCompanyService.getAllUsersByCompanyId(this.companyId).pipe(ot(n=>n.map(r=>zd.of(r)))))).subscribe(n=>{this.users=n,this.loading$.next(ni.SUCCESS)})}removeUserFromCompany(e){this.loading$.next(ni.LOADING),this._permissionCompanyService.removeUserFromCompany(e,this.companyId).pipe(ps(()=>this._permissionCompanyService.getAllUsersByCompanyId(this.companyId).pipe(ot(n=>n.map(r=>zd.of(r)))))).subscribe(n=>{this.users=n,this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(bp))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-company-details-users"]],inputs:{companyId:"companyId"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"removeUser","users","options"],[1,"bd-container"],[3,"addUser"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,XZt,3,2,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,k5,Oce],encapsulation:2})}return t})();function JZt(t,i){if(t&1){let e=qe();O(0,"bd-feature-permissions-list",5),te("enabledPermissionsChange",function(r){se(e);let o=L();return le(o.onEnabledFeaturePermissionChange(r))}),M()}if(t&2){let e=L();D("enabledPermissions",e.enabledFeaturePermissions)}}var oXe=(()=>{class t{_companyAdminService;_featurePermissionService;companyId;loading$=new hi(1);oldEnabledFeaturePermissions;enabledFeaturePermissions;hasChanged=!1;constructor(e,n){this._companyAdminService=e,this._featurePermissionService=n}ngOnInit(){this.companyId&&(this.loading$.next(ni.LOADING),this._companyAdminService.getAllFeaturePermissionsByCompanyId(this.companyId).subscribe(e=>{e.sort(),this.enabledFeaturePermissions=e,this.oldEnabledFeaturePermissions=[...e],this.loading$.next(ni.SUCCESS)}))}onEnabledFeaturePermissionChange(e){this.enabledFeaturePermissions=[...e],this.hasChanged=!Ni.equals(this.enabledFeaturePermissions,this.oldEnabledFeaturePermissions)}save(){this.loading$.next(ni.LOADING);let e=this._arrayDifferences(this.enabledFeaturePermissions,this.oldEnabledFeaturePermissions),n=this._arrayDifferences(this.oldEnabledFeaturePermissions,this.enabledFeaturePermissions),r=e.map(a=>this._companyAdminService.addFeaturePermissionsToCompany(this.companyId,a)),o=n.map(a=>this._companyAdminService.removeFeaturePermissionsFromCompany(this.companyId,a));Ys([...r,...o]).subscribe(()=>{this.oldEnabledFeaturePermissions=[...this.enabledFeaturePermissions],this.hasChanged=!1,this.loading$.next(ni.SUCCESS)})}_arrayDifferences(e,n){let r=[];return e.forEach(o=>{n.indexOf(o)===-1&&r.push(o)}),r}static \u0275fac=function(n){return new(n||t)(xe(bp),xe(f5))};static \u0275cmp=re({type:t,selectors:[["bd-company-feature-permissions"]],inputs:{companyId:"companyId"},decls:6,vars:3,consts:[["successTpl",""],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["raised","true","label","Speichern",3,"click","disabled"],[3,"enabledPermissionsChange","enabledPermissions"]],template:function(n,r){if(n&1){let o=qe();O(0,"div",1),be(1,"bd-loader",2),M(),O(2,"div",3)(3,"p-button",4),te("click",function(){return se(o),le(r.save())}),M()(),ie(4,JZt,1,1,"ng-template",null,0,di)}if(n&2){let o=Oi(5);E(),D("loadItem",r.loading$)("successTemplate",o),E(2),D("disabled",!r.hasChanged)}},dependencies:[fr,g6,Yl],encapsulation:2})}return t})();var aXe=` .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 eXt=["previcon"],tXt=["nexticon"],iXt=["content"],nXt=["prevButton"],rXt=["nextButton"],oXt=["inkbar"],aXt=["tabs"],oK=["*"];function sXt(t,i){t&1&&Li(0)}function lXt(t,i){if(t&1&&ie(0,sXt,1,0,"ng-container",11),t&2){let e=L(2);D("ngTemplateOutlet",e.prevIconTemplate||e._prevIconTemplate)}}function cXt(t,i){t&1&&(Pi(),be(0,"svg",10))}function dXt(t,i){if(t&1){let e=qe();O(0,"button",9,3),te("click",function(){se(e);let r=L();return le(r.onPrevButtonClick())}),yt(2,lXt,1,1,"ng-container")(3,cXt,1,0,":svg:svg",10),M()}if(t&2){let e=L();Pe(e.cx("prevButton")),lt("aria-label",e.prevButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),E(2),vt(e.prevIconTemplate||e._prevIconTemplate?2:3)}}function uXt(t,i){t&1&&Li(0)}function pXt(t,i){if(t&1&&ie(0,uXt,1,0,"ng-container",11),t&2){let e=L(2);D("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function mXt(t,i){t&1&&(Pi(),be(0,"svg",12))}function hXt(t,i){if(t&1){let e=qe();O(0,"button",9,4),te("click",function(){se(e);let r=L();return le(r.onNextButtonClick())}),yt(2,pXt,1,1,"ng-container")(3,mXt,1,0,":svg:svg",12),M()}if(t&2){let e=L();Pe(e.cx("nextButton")),lt("aria-label",e.nextButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),E(2),vt(e.nextIconTemplate||e._nextIconTemplate?2:3)}}function fXt(t,i){t&1&&Sn(0)}var gXt={root:({instance:t})=>["p-tabs p-component",{"p-tabs-scrollable":t.scrollable()}]},sXe=(()=>{class t extends br{name="tabs";theme=aXe;classes=gXt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var _Xt={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"},lXe=(()=>{class t extends br{name="tablist";classes=_Xt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var b6=(()=>{class t extends ur{prevIconTemplate;nextIconTemplate;templates;content;prevButton;nextButton;inkbar;tabs;pcTabs=ae(No(()=>q2));isPrevButtonEnabled=hr(!1);isNextButtonEnabled=hr(!1);resizeObserver;showNavigators=Or(()=>this.pcTabs.showNavigators());tabindex=Or(()=>this.pcTabs.tabindex());scrollable=Or(()=>this.pcTabs.scrollable());_componentStyle=ae(lXe);constructor(){super(),tu(()=>{this.pcTabs.value(),Js(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()&&Js(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,n=K_(e),r=Math.abs(e.scrollLeft)-n,o=r<=0?0:r;e.scrollLeft=bie(e)?-1*o:o}onNextButtonClick(){let e=this.content.nativeElement,n=K_(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+n,o=e.scrollWidth-n,a=r>=o?o:r;e.scrollLeft=bie(e)?-1*a:a}updateButtonState(){let e=this.content?.nativeElement,n=this.el?.nativeElement,{scrollWidth:r,offsetWidth:o}=e,a=Math.abs(e.scrollLeft),c=K_(e);this.isPrevButtonEnabled.set(a!==0),this.isNextButtonEnabled.set(n.offsetWidth>=o&&a!==r-c)}updateInkBar(){let e=this.content?.nativeElement,n=this.inkbar?.nativeElement,r=this.tabs?.nativeElement,o=$r(e,'[data-pc-name="tab"][data-p-active="true"]');n&&(n.style.width=Nd(o)+"px",n.style.left=Vx(o).left-Vx(r).left+"px")}getVisibleButtonWidths(){let e=this.prevButton?.nativeElement,n=this.nextButton?.nativeElement;return[e,n].reduce((r,o)=>o?r+K_(o):r,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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["p-tablist"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,eXt,4),Vt(o,tXt,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r.prevIconTemplate=a.first),ze(a=Ue())&&(r.nextIconTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(iXt,5),Xi(nXt,5),Xi(rXt,5),Xi(oXt,5),Xi(aXt,5)),n&2){let o;ze(o=Ue())&&(r.content=o.first),ze(o=Ue())&&(r.prevButton=o.first),ze(o=Ue())&&(r.nextButton=o.first),ze(o=Ue())&&(r.inkbar=o.first),ze(o=Ue())&&(r.tabs=o.first)}},hostVars:3,hostBindings:function(n,r){n&2&&(lt("data-pc-name","tablist"),Pe(r.cx("root")))},features:[Ii([lXe]),Tt],ngContentSelectors:oK,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(n,r){if(n&1){let o=qe();Kn(),yt(0,dXt,4,6,"button",5),O(1,"div",6,0),te("scroll",function(c){return se(o),le(r.onScroll(c))}),O(3,"div",7,1),Sn(5),be(6,"span",8,2),M()(),yt(8,hXt,4,6,"button",5)}n&2&&(vt(r.showNavigators()&&r.isPrevButtonEnabled()?0:-1),E(),Pe(r.cx("content")),E(2),Pe(r.cx("tabList")),E(3),Pe(r.cx("activeBar")),lt("data-pc-section","inkbar"),E(2),vt(r.showNavigators()&&r.isNextButtonEnabled()?8:-1))},dependencies:[rr,Jr,Mie,Gb,J6e,Qc,Un],encapsulation:2,changeDetection:0})}return t})(),yXt={root:({instance:t})=>["p-tab",{"p-tab-active":t.active(),"p-disabled":t.disabled()}]},cXe=(()=>{class t extends br{name="tab";classes=yXt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var aK=(()=>{class t extends ur{value=Pb();disabled=kr(!1,{transform:Je});pcTabs=ae(No(()=>q2));pcTabList=ae(No(()=>b6));el=ae(qn);_componentStyle=ae(cXe);ripple=Or(()=>this.config.ripple());id=Or(()=>`${this.pcTabs.id()}_tab_${this.value()}`);ariaControls=Or(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);active=Or(()=>xd(this.pcTabs.value(),this.value()));tabindex=Or(()=>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 n=this.findNextTab(e.currentTarget);n?this.changeFocusedTab(e,n):this.onHomeKey(e),e.preventDefault()}onArrowLeftKey(e){let n=this.findPrevTab(e.currentTarget);n?this.changeFocusedTab(e,n):this.onEndKey(e),e.preventDefault()}onHomeKey(e){let n=this.findFirstTab();this.changeFocusedTab(e,n),e.preventDefault()}onEndKey(e){let n=this.findLastTab();this.changeFocusedTab(e,n),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,n=!1){let r=n?e:e.nextElementSibling;return r?Qh(r,"data-p-disabled")||Qh(r,"data-pc-section")==="inkbar"?this.findNextTab(r):r:null}findPrevTab(e,n=!1){let r=n?e:e.previousElementSibling;return r?Qh(r,"data-p-disabled")||Qh(r,"data-pc-section")==="inkbar"?this.findPrevTab(r):r: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,n){Ba(n),this.scrollInView(n)}scrollInView(e){e?.scrollIntoView?.({block:"nearest"})}bindMutationObserver(){Js(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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-tab"]],hostVars:10,hostBindings:function(n,r){n&1&&te("focus",function(a){return r.onFocus(a)})("click",function(a){return r.onClick(a)})("keydown",function(a){return r.onKeyDown(a)}),n&2&&(lt("data-pc-name","tab")("id",r.id())("aria-controls",r.ariaControls())("role","tab")("aria-selected",r.active())("data-p-disabled",r.disabled())("data-p-active",r.active())("tabindex",r.tabindex()),Pe(r.cx("root")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[Ii([cXe]),BT([Qc]),Tt],ngContentSelectors:oK,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr,Un],encapsulation:2,changeDetection:0})}return t})(),vXt={root:({instance:t})=>["p-tabpanel",{"p-tabpanel-active":t.active()}]},dXe=(()=>{class t extends br{name="tabpanel";classes=vXt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var sK=(()=>{class t extends ur{pcTabs=ae(No(()=>q2));value=Pb(void 0);id=Or(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);ariaLabelledby=Or(()=>`${this.pcTabs.id()}_tab_${this.value()}`);active=Or(()=>xd(this.pcTabs.value(),this.value()));_componentStyle=ae(dXe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-tabpanel"]],hostVars:7,hostBindings:function(n,r){n&2&&(lt("data-pc-name","tabpanel")("id",r.id())("role","tabpanel")("aria-labelledby",r.ariaLabelledby())("data-p-active",r.active()),Pe(r.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[Ii([dXe]),Tt],ngContentSelectors:oK,decls:1,vars:1,template:function(n,r){n&1&&(Kn(),yt(0,fXt,1,0)),n&2&&vt(r.active()?0:-1)},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),bXt={root:"p-tabpanels"},uXe=(()=>{class t extends br{name="tabpanels";classes=bXt;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var lK=(()=>{class t extends ur{_componentStyle=ae(uXe);static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-tabpanels"]],hostVars:4,hostBindings:function(n,r){n&2&&(lt("data-pc-name","tabpanels")("role","presentation"),Pe(r.cx("root")))},features:[Ii([uXe]),Tt],ngContentSelectors:oK,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),q2=(()=>{class t extends ur{value=Pb(void 0);scrollable=kr(!1,{transform:Je});lazy=kr(!1,{transform:Je});selectOnFocus=kr(!1,{transform:Je});showNavigators=kr(!0,{transform:Je});tabindex=kr(0,{transform:En});id=hr(fa("pn_id_"));_componentStyle=ae(sXe);updateValue(e){this.value.update(()=>e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-tabs"]],hostVars:4,hostBindings:function(n,r){n&2&&(lt("data-pc-name","tabs")("id",r.id()),Pe(r.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:[Ii([sXe]),Tt],ngContentSelectors:oK,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),Sn(0))},dependencies:[rr],encapsulation:2,changeDetection:0})}return t})(),pXe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[q2,lK,sK,b6,aK]})}return t})();var xXt=()=>["/companies"];function SXt(t,i){if(t&1&&be(0,"bd-company-feature-permissions",8),t&2){let e=L(2);D("companyId",e.company.id)}}function wXt(t,i){if(t&1&&be(0,"bd-permissions-company-details-users",8),t&2){let e=L(2);D("companyId",e.company.id)}}function IXt(t,i){if(t&1&&be(0,"bd-permissions-company-details-groups",8),t&2){let e=L(2);D("companyId",e.company.id)}}function TXt(t,i){if(t&1){let e=qe();O(0,"div",3)(1,"p-tabs",6),te("valueChange",function(r){se(e);let o=L();return le(o.onViewStateChange(r))}),O(2,"p-tablist")(3,"p-tab",7),ee(4,"Feature Berechtigungen"),M(),O(5,"p-tab",7),ee(6,"Nutzer"),M(),O(7,"p-tab",7),ee(8,"Gruppen"),M()(),O(9,"p-tabpanels")(10,"p-tabpanel",7),yt(11,SXt,1,1,"bd-company-feature-permissions",8),M(),O(12,"p-tabpanel",7),yt(13,wXt,1,1,"bd-permissions-company-details-users",8),M(),O(14,"p-tabpanel",7),yt(15,IXt,1,1,"bd-permissions-company-details-groups",8),M()()()()}if(t&2){let e=L();E(),D("value",e.viewState),E(2),D("value","feature-permissions"),E(2),D("value","users"),E(2),D("value","groups"),E(3),D("value","feature-permissions"),E(),vt(e.viewState==="feature-permissions"?11:-1),E(),D("value","users"),E(),vt(e.viewState==="users"?13:-1),E(),D("value","groups"),E(),vt(e.viewState==="groups"?15:-1)}}var mXe=(()=>{class t{_activatedRoute;_router;_permissionCompanyService;loading$=new Sa(ni.INIT);company;viewState="feature-permissions";constructor(e,n,r){this._activatedRoute=e,this._router=n,this._permissionCompanyService=r}ngOnInit(){this._activatedRoute.queryParams.pipe(vn(e=>!!e.viewState)).subscribe(e=>{this.viewState=e.viewState}),this._activatedRoute.params.pipe(vn(e=>!!e.companyId),On(e=>{let n=e.companyId;return this.loading$.next(ni.LOADING),this._permissionCompanyService.getById(n)})).subscribe(e=>{this.company=e,this.loading$.next(ni.SUCCESS)})}onViewStateChange(e){this._router.navigate([],{queryParamsHandling:"merge",queryParams:{viewState:e}})}static \u0275fac=function(n){return new(n||t)(xe(id),xe(Ws),xe(bp))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:11,vars:5,consts:[["content",""],[1,"toolbar-spacer"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["raised","true",3,"routerLink"],["lazy","true",3,"valueChange","value"],[3,"value"],[3,"companyId"]],template:function(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2),M(),be(3,"span",1),M(),be(4,"bd-loader",2),O(5,"div",3)(6,"div",4)(7,"p-button",5),ee(8," Kunden\xFCbersicht "),M()()(),ie(9,TXt,16,10,"ng-template",null,0,di)),n&2){let o=Oi(10);E(2),Pt(r.company==null?null:r.company.name),E(2),D("loadItem",r.loading$)("successTemplate",o),E(3),D("routerLink",Vr(4,xXt))}},dependencies:[zl,fr,Ms,oXe,rXe,tXe,q2,b6,aK,lK,sK,Yl],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var hXe=[{path:"companies",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG},pageTitle:bu.title("Kunden")},children:[{path:"",pathMatch:"full",component:ZZe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}},{path:":companyId",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}},children:[{path:"",pathMatch:"full",component:mXe,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"],failStrategy:mh.DIALOG}}}]}]}],fXe={id:"BD_ADMINISTRATION_COMPANIES_FEATURE",displayName:"Kunden \xDCbersicht",type:"companies",permissions:["ADMIN:BASE"],navigation:{title:"Kunden \xDCbersicht",path:["companies"]}};function EXt(t,i){t&1&&be(0,"router-outlet")}var gXe=(()=>{class t extends Soe{_appService;_snackBar;_environmentService;features=[fXe,...VZe,...QZe];constructor(e,n,r,o,a,c,m){super(e,c,m,r),this._appService=n,this._snackBar=o,this._environmentService=a,this._appService.setTitle("BinDoc Administration")}ngOnDestroy(){super.onDestroy()}ngOnInit(){this._initAuthenticationRoot(),this._initBanner(this._snackBar,this._environmentService)}static \u0275fac=function(n){return new(n||t)(xe(qN),xe(Eoe),xe(em),xe(Fje),xe(xr),xe(EE),xe(ry))};static \u0275cmp=re({type:t,selectors:[["app-root"]],features:[Tt],decls:11,vars:2,consts:[[3,"features"],["bd-app-top-right-action",""],[1,"flex","items-center","content-center"],[1,"hidden","sm:block"],["bd-app-content",""]],template:function(n,r){n&1&&(O(0,"bd-app-container",0),fi(1,1),O(2,"div",2)(3,"div",3),be(4,"bd-user-authentication-state"),M(),O(5,"div"),be(6,"bd-user-zendesk-button"),M(),O(7,"div"),be(8,"bd-authentication-menu"),M()(),gi(),fi(9,4),yt(10,EXt,1,0,"router-outlet"),gi(),M()),n&2&&(D("features",r.features),E(10),vt(r.isIframe?-1:10))},dependencies:[M7e,t$e,zje,m7,K$e],encapsulation:2})}return t})();var _Xe={production:!0,configRequestUrl:"/config/v2",configRequestMethod:"POST"};var yXe={id:"adminapp",hostKey:"ADMIN_APP_URL",domain:"BINDOC",apiEndpointKeys:["APP_CONTENT_SNIPPET_RESOURCE_BASE_URL","AT_CODE_SPECTRUM_API_URL","AT_CUBE_DASHBOARD_API_URL","AT_VIRTUAL_CLINIC_API_URL","AYS_BENCHMARKING_GROUP_RESOURCE_URL","AYS_CLINIC_FILTER_STORAGE_URL","AYS_CLINIC_RESOURCE_URL","AYS_CODE_SPECTRUM_STORAGE_URL","AYS_DEMAND_ANALYSIS_URL","AYS_MARKET_STORAGE_URL","AYS_OPERATING_NUMBER_GROUPS_URL","AYS_OPERATING_NUMBER_INFO_URL","AYS_OPERATING_NUMBER_URL","AYS_SCENARIO_ANALYSIS_RESOURCE_URL","AYS_VIRTUAL_CLINIC_ANALYSIS_URL","AYS_VIRTUAL_CLINIC_P21_IMPORT_RESOURCE_URL","AYS_VIRTUAL_CLINIC_REFERRAL_IMPORT_RESOURCE_URL","AYS_VIRTUAL_CLINIC_RESOURCE_URL","BD_DISTRICT_URL","BD_FILES_RESOURCE_URL","BD_FRONTEND_CONFIG_RESOURCE_URL","BD_PERMISSION_RESOURCE_URL","BMG_DEMAND_ANALYSIS_URL","CH_VIRTUAL_CLINIC_API_URL","CUBE_DASHBOARD_URL","UK_CODE_SPECTRUM_API_URL"],variableKeys:["AUTHENTICATION_AUTHORITY","AUTHENTICATION_PASSWORD_RESET_AUTHORITY","AUTHENTICATION_CLIENT_ID","BD_APPLICATION_INSIGHTS_KEY","BD_STAGING_BANNER","COOKIE_MANAGER_DOMAIN_ID"],helpKeys:["@analytics:home"]};var Rce,AXt=new Uint8Array(16);function pEe(){if(!Rce&&(Rce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Rce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rce(AXt)}var vXe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DXt(t){return typeof t=="string"&&vXe.test(t)}var bXe=DXt;var dg=[];for(Pce=0;Pce<256;++Pce)dg.push((Pce+256).toString(16).substr(1));var Pce;function kXt(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(dg[t[i+0]]+dg[t[i+1]]+dg[t[i+2]]+dg[t[i+3]]+"-"+dg[t[i+4]]+dg[t[i+5]]+"-"+dg[t[i+6]]+dg[t[i+7]]+"-"+dg[t[i+8]]+dg[t[i+9]]+"-"+dg[t[i+10]]+dg[t[i+11]]+dg[t[i+12]]+dg[t[i+13]]+dg[t[i+14]]+dg[t[i+15]]).toLowerCase();if(!bXe(e))throw TypeError("Stringified UUID is invalid");return e}var CXe=kXt;function MXt(t,i,e){t=t||{};var n=t.random||(t.rng||pEe)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,i){e=e||0;for(var r=0;r<16;++r)i[e+r]=n[r];return i}return CXe(n)}var Zs=MXt;var Ty=class{static create(i){let e=i.map(n=>Promise.resolve(n.validationStepValid).then(r=>({stepDescription:n.stepDescription,validationStepValid:r,showValidationStep:n.showValidationStep})));return Promise.all(e).then(n=>({valid:n.every(r=>r.validationStepValid),validationSteps:n.filter(r=>{if(r.showValidationStep)switch(r.showValidationStep){case"ONLY_ON_ERROR":return!r.validationStepValid;default:return!0}else return!0})}))}};var Ey=class{id;_colspan;_displayName;note;update$=new hi;type;tileIndex;errors;constructor(i,e=1,n,r){this.id=i,this._colspan=e,this._displayName=n,this.note=r,this.id=this.id?this.id:Zs()}isValid(){return Ty.create(this.validationSteps())}toJSON(){return{id:this.id,type:this.type,colspan:this._colspan,displayName:this._displayName,note:this.note}}validationSteps(){return[{validationStepValid:!!this.type,stepDescription:"Eigenschaften ausgew\xE4hlt",showValidationStep:"ONLY_ON_ERROR"},{validationStepValid:!!this._colspan&&this._colspan>0,stepDescription:"Breite f\xFCr Kachel",showValidationStep:"ONLY_ON_ERROR"}]}parseResponseAndWriteErrors(i){let e={},n={};function r(o,a,c){n[o]?c.forEach(m=>n[o].push({errorType:a,text:m.text})):n[o]=c.map(m=>({text:m.text,errorType:a}))}return Object.keys(i).forEach(o=>{i[o].errors?r(o,"ERROR",i[o].errors):i[o].warning?r(o,"WARNING",i[o].warning):e[o]=i[o]}),this.errors=n,e}get displayName(){return this._displayName}set displayName(i){this._displayName=i,this._update({eventType:"redraw",fieldName:"displayName",fieldValue:i})}get colspan(){return this._colspan}set colspan(i){this._colspan=i,this._update({eventType:"redraw",fieldName:"colspan",fieldValue:i})}};var Nce="static-image",cK=class t extends Ey{_image;_fitToTile;constructor(i,e,n,r,o,a=!0){super(i,e,n,r),this._image=o,this._fitToTile=a,this.type=Nce}clone(){return new t(this.id,this.colspan,this.displayName,this.note,this._image,this._fitToTile)}overrideClone(){return new t(null,this.colspan,this.displayName,this.note,this._image,this._fitToTile)}getChildResources(){return{}}getDataTabular(){return{columns:[],content:[]}}toPrecalculatedTileRequest(){return Promise.resolve([])}getOverrideProperties(){return[]}isLoaded(){return!0}isValid(){return Ty.create([...super.validationSteps(),{validationStepValid:!!this._image,stepDescription:"Ein Bild gespeichert"}])}toJSON(){return $e(pe({},super.toJSON()),{image:this._image,fitToTile:this._fitToTile})}_update(){this.isValid().then(i=>{this.update$.next({eventType:"redraw",tileValid:i.valid})})}get image(){return this._image}set image(i){this._image=i,this._update()}get fitToTile(){return this._fitToTile}set fitToTile(i){this._fitToTile=i}};var Fce="static-text",dK=class t extends Ey{_text;constructor(i,e,n,r,o){super(i,e,n,r),this._text=o,this.type=Fce}clone(){return new t(this.id,this.colspan,this._displayName,this.note,this._text)}overrideClone(){return new t(null,this.colspan,this._displayName,this.note,this._text)}getChildResources(){return{}}getOverrideProperties(){return[]}toPrecalculatedTileRequest(){return Promise.resolve([])}isLoaded(){return!0}isValid(){return Ty.create([...super.validationSteps()])}toJSON(){return $e(pe({},super.toJSON()),{text:this._text})}_update(i){this.isValid().then(e=>{this.update$.next($e(pe({},i),{tileValid:e.valid}))})}get text(){return this._text}set text(i){this._text=i,this._update({eventType:"redraw",fieldName:"text",fieldValue:i})}};var C6=class{_term;type;constructor(i){this._term=i}toJSON(){return{type:this.type,term:this.term?this._term.toJSON():null}}getChildResources(){let i={};return this._term&&(i=yl.merge(i,this._term.getChildResources())),i}isValid(){return!!this._term&&this._term.isValid()}getOverrideProperties(i,e=void 0){let n=[];return this._term&&n.push(...this._term.getOverrideProperties(i,e)),n}get term(){return this._term}set term(i){this._term=i}};var pL=class t extends C6{_virtualClinicId;type="single-virtual-clinic";constructor(i,e){super(i),this._virtualClinicId=e}updateVirtualClinicId(i){this._virtualClinicId=i,this.term.onUpdateVirtualClinicId(i)}isValid(){return super.isValid()&&!!this._virtualClinicId}toJSON(){return $e(pe({},super.toJSON()),{virtualClinicId:this._virtualClinicId})}getChildResources(){let i=super.getChildResources();return this._virtualClinicId&&(i=yl.merge(i,{[tn.VIRTUAL_CLINIC]:[this._virtualClinicId]})),i}getOverrideProperties(i){let e=super.getOverrideProperties(i,this._virtualClinicId);return this._virtualClinicId&&e.push(new su(i,"virtualClinicId",this._virtualClinicId,this._virtualClinicId,"not-possible",void 0)),e}clone(){return new t(this._term.clone(),this._virtualClinicId)}overrideClone(i){return new t(this._term.overrideClone(i),lu.overrideProperty(this._virtualClinicId,"virtualClinicId",i,e=>e))}toRequestPart(i){return this.isValid()?this._term.toRequestPart(i).then(e=>({type:"VirtualClinicOperatingNumberSingle",term:e,virtualClinicId:this._virtualClinicId})):Promise.resolve(null)}get virtualClinicId(){return this._virtualClinicId}set virtualClinicId(i){this._virtualClinicId=i}};var uK=class t extends C6{_clinicsFilter;type="benchmarking";constructor(i,e){super(i),this._clinicsFilter=e}clone(){return new t(this._term.clone(),this._clinicsFilter.clone())}overrideClone(i){return new t(this._term.overrideClone(i),this._clinicsFilter.overrideClone(i))}getChildResources(){let i=super.getChildResources();return this._clinicsFilter&&(i=yl.merge(i,this._clinicsFilter.getChildResources())),i}getOverrideProperties(i){let e=super.getOverrideProperties(i,void 0);return this._clinicsFilter&&e.push(...this._clinicsFilter.getOverrideProperties(i,void 0)),e}toJSON(){return $e(pe({},super.toJSON()),{clinicsFilter:this._clinicsFilter?this._clinicsFilter.toJSON():null})}toRequestPart(i){return this.isValid()?Promise.all([this._term.toRequestPart(i),this._clinicsFilter?this._clinicsFilter.toRequestBody(i):Promise.resolve(null)]).then(e=>{let n={type:"VirtualClinicOperatingNumberBenchmark",term:e[0]};return this._clinicsFilter&&(n.benchmark={virtualClinicCondition:e[1]}),n}):Promise.resolve(null)}get clinicsFilter(){return this._clinicsFilter}set clinicsFilter(i){this._clinicsFilter=i}};var sI=class{type;constructor(i){this.type=i}getIncludedTypes(){return[this.type]}};var pK=class t extends sI{value;static fromObject(i={}){return new t(i.value)}constructor(i){super("constant"),this.value=i}clone(){return new t(this.value)}overrideClone(i){return new t(this.value)}getChildResources(){return{}}getFullyInpatientCasesFilters(){return[]}getOverrideProperties(i,e){return[]}isValid(){return Number.isFinite(this.value)}toJSON(){return{type:this.type,value:this.value}}toRequestPart(){return Promise.resolve({type:this.type,value:this.value})}onUpdateVirtualClinicId(i){}};var _n=(()=>{class t{type;static Specification;constructor(e){this.type=e}equals(e){return!!e&&this.type===e.type}valid(){let e=this.toValue();return e instanceof Array?!!e&&e.length>0:!!e}hasRelativeTimeSelection(){return!1}getChildResources(){return{}}overrideClone(e){return this.clone()}getOverrideProperties(e,n){return[]}}return t})();var mK={type:"codes-at",category:"case",displayName:{de:"Ziffer-Spektra"},sortingIndex:8,occurrence:"multiple",fromObject(t){let i=t.codingSystem||"ICD-10-AT",e=t.matching||"exact",n;return t.codeTypeSpecification?n=t.codeTypeSpecification:i==="ICD-10-AT"&&(n="mainDiagnosis"),Promise.resolve(new Lce(t.codeSpectrumIds||[],i,n,e,t.includes))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new Lce([],"ICD-10-AT"))}},Lce=(()=>{class t extends _n{codeSpectrumIds;codingSystem;codeTypeSpecification;matching;includes;codes;static Specification=mK;constructor(e,n,r,o="exact",a=!0,c=[]){super(mK.type),this.codeSpectrumIds=e,this.codingSystem=n,this.codeTypeSpecification=r,this.matching=o,this.includes=a,this.codes=c}clone(){return new t([...this.codeSpectrumIds],this.codingSystem,this.codeTypeSpecification,this.matching,this.includes,this.codes?[...this.codes.map(e=>e.clone())]:null)}equals(e){return super.equals(e)&&Ni.equals(this.codeSpectrumIds,e.codeSpectrumIds)&&gr.equals(this.codingSystem,e.codingSystem)&&gr.equals(this.codeTypeSpecification,e.codeTypeSpecification)&&gr.equals(this.matching,e.matching)&&gr.equals(this.includes,e.includes)}getChildResources(){let e=[];return this.codeSpectrumIds.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),{[tn.AT_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,codingSystem:this.codingSystem,codeSpectrumIds:this.codeSpectrumIds,codeTypeSpecification:this.codeTypeSpecification,matching:this.matching,includes:this.includes}}toValue(){return this}toCondition(e){if(!e.codeSpectraAt)throw new Error("Missing dependency resolver: CODE_SPECTRA_AT");return e.codeSpectraAt.resolve({codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem}).then(r=>{this.codes=r;let o=null;switch(this.codingSystem){case"ICD-10-AT":o=this._toIcd10AtCondition();break;case"PROCEDURE-AT":o=this._toProcedureAtCondition();break;default:throw new Error(`Invalid coding system: ${this.codingSystem}`)}return o})}_toIcd10AtCondition(){let e=this.codeTypeSpecification,n;switch(e){case"secondaryDiagnosis":{n=this._toSecondaryDiagnosisCondition();break}default:{n=this._toMainDiagnosisCondition();break}}return this.includes?n.includes=this.codes:n.excludes=this.codes,n}_toMainDiagnosisCondition(){return this.matching==="exact"?new H5([],[]):new G5([],[])}_toSecondaryDiagnosisCondition(){return this.matching==="exact"?new q5([],[]):new Y5([],[])}_toProcedureAtCondition(){let e=this.matching==="exact"?new yae([],[]):new vae([],[]);return this.includes?e.includes=this.codes:e.excludes=this.codes,e}}return t})();var hEe="fondsrelevanzAT",fK={type:"fondsrelevanzAT",category:"case",displayName:{de:"Fondsrelevanz"},sortingIndex:11,occurrence:"multiple",fromObject(t){return Promise.resolve(new hK(t.fondsrelevanz))},fromCondition(t){return Promise.resolve(new hK(t.includes))},newInstance(){return Promise.resolve(new hK([]))}},hK=(()=>{class t extends _n{fondsrelevanz;static Specification=fK;constructor(e){super(fK.type),this.fondsrelevanz=e}toCondition(){return Promise.resolve(new mEe(this.fondsrelevanz,[]))}toJSON(){return{type:this.type,fondsrelevanz:this.fondsrelevanz}}toText(){return"Fondsrelevanz"}toValue(){return this.fondsrelevanz}equals(e){return super.equals(e)&&Ni.equals(this.fondsrelevanz,e.fondsrelevanz)}validationToText(){return this.fondsrelevanz.length===0?"Mindestens eine Fondsrelevanz ausw\xE4hlen":""}clone(){return new t(this.fondsrelevanz)}}return t})(),mEe=class extends Zn{constructor(i,e){super(hEe,i,e)}};var gEe="admissionType1AT",_K={type:"admissionType1",category:"case",displayName:{de:"Aufnahmeart 1"},sortingIndex:2,occurrence:"single",fromObject(t){return Promise.resolve(new gK(t.admissionType1))},fromCondition(t){return Promise.resolve(new gK(t.includes))},newInstance(){return Promise.resolve(new gK([]))}},gK=(()=>{class t extends _n{admissionType1;static Specification=_K;constructor(e){super(_K.type),this.admissionType1=e}clone(){return new t([...this.admissionType1])}equals(e){return super.equals(e)&&Ni.equals(this.admissionType1,e.admissionType1)}validationToText(){return this.admissionType1.length===0?"Mindestens eine Aufnahmeart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new fEe(this.admissionType1,[]))}toText(){return this.admissionType1.length===1?"eine Aufnahmeart 1":`${this.admissionType1.length} Aufnahmearten 1`}toJSON(){return{type:this.type,admissionType1:this.admissionType1}}toValue(){return this.admissionType1}}return t})(),fEe=class extends Zn{constructor(i,e){super(gEe,i,e)}};var yEe="admissionType2AT",vK={type:"admissionType2",category:"case",displayName:{de:"Aufnahmeart 2"},sortingIndex:3,occurrence:"single",fromObject(t){return Promise.resolve(new yK(t.admissionType2))},fromCondition(t){return Promise.resolve(new yK(t.includes))},newInstance(){return Promise.resolve(new yK([]))}},yK=(()=>{class t extends _n{admissionType2;static Specification=vK;constructor(e){super(vK.type),this.admissionType2=e}clone(){return new t([...this.admissionType2])}equals(e){return super.equals(e)&&Ni.equals(this.admissionType2,e.admissionType2)}validationToText(){return this.admissionType2.length===0?"Mindestens eine Aufnahmeart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new _Ee(this.admissionType2,[]))}toText(){return this.admissionType2.length===2?"eine Aufnahmeart 2":`${this.admissionType2.length} Aufnahmearten 2`}toJSON(){return{type:this.type,admissionType2:this.admissionType2}}toValue(){return this.admissionType2}}return t})(),_Ee=class extends Zn{constructor(i,e){super(yEe,i,e)}};var bEe="dismissalTypeAT",CK={type:"dismissalType",category:"case",displayName:{de:"Entlassart"},sortingIndex:9,occurrence:"single",fromObject(t){return Promise.resolve(new bK(t.dismissalType))},fromCondition(t){return Promise.resolve(new bK(t.includes))},newInstance(){return Promise.resolve(new bK([]))}},bK=(()=>{class t extends _n{dismissalType;static Specification=CK;constructor(e){super(CK.type),this.dismissalType=e}clone(){return new t([...this.dismissalType])}equals(e){return super.equals(e)&&Ni.equals(this.dismissalType,e.dismissalType)}validationToText(){return this.dismissalType.length===0?"Mindestens eine Entlassart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new vEe(this.dismissalType,[]))}toText(){return this.dismissalType.length===2?"eine Entlassart":`${this.dismissalType.length} Entlassarten`}toJSON(){return{type:this.type,dismissalType:this.dismissalType}}toValue(){return this.dismissalType}}return t})(),vEe=class extends Zn{constructor(i,e){super(bEe,i,e)}};var xEe="saps3ChirurgischerStatus",SK={type:"saps3ChirurgischerStatus",category:"case",displayName:{de:"SAPS3: Chirurgischer Status"},sortingIndex:20,occurrence:"single",fromObject(t){return Promise.resolve(new xK(t.saps3ChirurgischerStatus))},fromCondition(t){return Promise.resolve(new xK(t.includes))},newInstance(){return Promise.resolve(new xK([]))}},xK=(()=>{class t extends _n{saps3ChirurgischerStatus;static Specification=SK;constructor(e){super(SK.type),this.saps3ChirurgischerStatus=e}clone(){return new t([...this.saps3ChirurgischerStatus])}equals(e){return super.equals(e)&&Ni.equals(this.saps3ChirurgischerStatus,e.saps3ChirurgischerStatus)}validationToText(){return this.saps3ChirurgischerStatus.length===0?"Mindestens einen Status ausw\xE4hlen":""}toCondition(){return Promise.resolve(new CEe(this.saps3ChirurgischerStatus,[]))}toText(){return this.saps3ChirurgischerStatus.length===1?"ein chirurgischer Status":`${this.saps3ChirurgischerStatus.length} chirurgische Status`}toJSON(){return{type:this.type,saps3ChirurgischerStatus:this.saps3ChirurgischerStatus}}toValue(){return this.saps3ChirurgischerStatus}}return t})(),CEe=class extends Zn{constructor(i,e){super(xEe,i,e)}};var wEe="saps3Zutransferierung",IK={type:"saps3Zutransferierung",category:"case",displayName:{de:"SAPS3: Zutransferierung"},sortingIndex:21,occurrence:"single",fromObject(t){return Promise.resolve(new wK(t.saps3Zutransferierung))},fromCondition(t){return Promise.resolve(new wK(t.includes))},newInstance(){return Promise.resolve(new wK([]))}},wK=(()=>{class t extends _n{saps3Zutransferierung;static Specification=IK;constructor(e){super(IK.type),this.saps3Zutransferierung=e}clone(){return new t([...this.saps3Zutransferierung])}equals(e){return super.equals(e)&&Ni.equals(this.saps3Zutransferierung,e.saps3Zutransferierung)}validationToText(){return this.saps3Zutransferierung.length===0?"Mindestens eine Zutransferierung ausw\xE4hlen":""}toCondition(){return Promise.resolve(new SEe(this.saps3Zutransferierung,[]))}toText(){return this.saps3Zutransferierung.length===1?"eine Zutransferierung":`${this.saps3Zutransferierung.length} Zutransferierungen`}toJSON(){return{type:this.type,saps3Zutransferierung:this.saps3Zutransferierung}}toValue(){return this.saps3Zutransferierung}}return t})(),SEe=class extends Zn{constructor(i,e){super(wEe,i,e)}};var TEe="tissAAtemwegszugang",EK={type:"tissAAtemwegszugang",category:"case",displayName:{de:"TISS-A: Atemwegszugang"},sortingIndex:23,occurrence:"single",fromObject(t){return Promise.resolve(new TK(t.tissAAtemwegszugang))},fromCondition(t){return Promise.resolve(new TK(t.includes))},newInstance(){return Promise.resolve(new TK([]))}},TK=(()=>{class t extends _n{tissAAtemwegszugang;static Specification=EK;constructor(e){super(EK.type),this.tissAAtemwegszugang=e}clone(){return new t([...this.tissAAtemwegszugang])}equals(e){return super.equals(e)&&Ni.equals(this.tissAAtemwegszugang,e.tissAAtemwegszugang)}validationToText(){return this.tissAAtemwegszugang.length===0?"Mindestens einen Atemwegszugang ausw\xE4hlen":""}toCondition(){return Promise.resolve(new IEe(this.tissAAtemwegszugang,[]))}toText(){return this.tissAAtemwegszugang.length===1?"ein Atemwegszugang":`${this.tissAAtemwegszugang.length} Atemwegszug\xE4nge`}toJSON(){return{type:this.type,tissAAtemwegszugang:this.tissAAtemwegszugang}}toValue(){return this.tissAAtemwegszugang}}return t})(),IEe=class extends Zn{constructor(i,e){super(TEe,i,e)}};var AEe="tissAAtmungsmodus",DK={type:"tissAAtmungsmodus",category:"case",displayName:{de:"TISS-A: Atmungsmodus"},sortingIndex:22,occurrence:"single",fromObject(t){return Promise.resolve(new AK(t.tissAAtmungsmodus))},fromCondition(t){return Promise.resolve(new AK(t.includes))},newInstance(){return Promise.resolve(new AK([]))}},AK=(()=>{class t extends _n{tissAAtmungsmodus;static Specification=DK;constructor(e){super(DK.type),this.tissAAtmungsmodus=e}clone(){return new t([...this.tissAAtmungsmodus])}equals(e){return super.equals(e)&&Ni.equals(this.tissAAtmungsmodus,e.tissAAtmungsmodus)}validationToText(){return this.tissAAtmungsmodus.length===0?"Mindestens einen Atmungsmodus ausw\xE4hlen":""}toCondition(){return Promise.resolve(new EEe(this.tissAAtmungsmodus,[]))}toText(){return this.tissAAtmungsmodus.length===1?"ein Atmungsmodus":`${this.tissAAtmungsmodus.length} Atmungsmodi`}toJSON(){return{type:this.type,tissAAtmungsmodus:this.tissAAtmungsmodus}}toValue(){return this.tissAAtmungsmodus}}return t})(),EEe=class extends Zn{constructor(i,e){super(AEe,i,e)}};var kEe="treatmentTypeAT",MK={type:"treatmentType",category:"case",displayName:{de:"Behandlungsart"},sortingIndex:1,occurrence:"single",fromObject(t){return Promise.resolve(new kK(t.treatmentType))},fromCondition(t){return Promise.resolve(new kK(t.includes))},newInstance(){return Promise.resolve(new kK([]))}},kK=(()=>{class t extends _n{treatmentType;static Specification=MK;constructor(e){super(MK.type),this.treatmentType=e}clone(){return new t([...this.treatmentType])}equals(e){return super.equals(e)&&Ni.equals(this.treatmentType,e.treatmentType)}validationToText(){return this.treatmentType.length===0?"Mindestens eine Behandlungsart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new DEe(this.treatmentType,[]))}toText(){return this.treatmentType.length===1?"eine Behandlungsart":`${this.treatmentType.length} Behandlungsarten`}toJSON(){return{type:this.type,treatmentType:this.treatmentType}}toValue(){return this.treatmentType}}return t})(),DEe=class extends Zn{constructor(i,e){super(kEe,i,e)}};var OK=class{static fromObject(i,e){switch(i.kind){case"AND":return x1.fromObject(i,e);case"OR":return lI.fromObject(i,e);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(i)}]`)}}static fromConditionJson(i,e,n){switch(i){case tq:return x1.fromConditionJson(e,n);case eq:return lI.fromConditionJson(e,n);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(e)}]`)}}},Bce=class{expression;static fromObject(i,e){throw new Error(JSON.stringify([i,e]))}static fromConditionJson(i,e){throw new Error(JSON.stringify([i,e]))}constructor(i){this.expression=i}type="combination";equals(i){return gr.equals(this,i,(e,n)=>e.type===n.type)&&gr.equals(this.kind,i.kind)&&gr.equals(this.expression,i.expression,(e,n)=>e.length===n.length)&&this.expression.every((e,n)=>Pa.equals(e,i.expression.at(n)))}valid(){return!!this.kind&&(this.expression.length===0||this.expression.every(i=>i.valid()))}getChildResources(){return this.expression.map(i=>i.getChildResources()).reduce((i,e)=>yl.merge(i,e),{})}getOverrideProperties(i,e){return this.expression.map(n=>n.getOverrideProperties(i,e)).reduce((n,r)=>[...n,...r],[])}hasRelativeTimeSelection(){return this.expression.some(i=>i.hasRelativeTimeSelection())}toJSON(){return{type:this.type,kind:this.kind,expression:this.expression.filter(i=>!!i).map(i=>i.toJSON())}}toText(){return this.expression.filter(i=>!!i).map(i=>i.type==="combination"?`( ${i.toText()} )`:i.toText()).join(` ${this.kindToText()} `)}},x1=class t extends Bce{kind="AND";static fromObject(i,e){return Promise.all(i.expression.map(n=>Pa.fromObject(n,e))).then(n=>new t(n))}static fromConditionJson(i,e){return Promise.all(i.conditions.map(n=>Pa.fromConditionJson(n,e))).then(n=>new t(n))}constructor(i){super(i)}clone(){return new t([...this.expression.map(i=>i.clone())])}overrideClone(i){return new t(this.expression.map(e=>e.overrideClone(i)).filter(e=>!!e))}toCondition(i){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(i))).then(e=>new Nu(e))}kindToText(){return"und"}},lI=class t extends Bce{kind="OR";static fromObject(i,e){return Promise.all(i.expression.map(n=>Pa.fromObject(n,e))).then(n=>new t(n))}static fromConditionJson(i,e){let n=i.conditions.map(r=>Pa.fromConditionJson(r,e));return Promise.all(n).then(r=>new t(r))}constructor(i){super(i)}clone(){return new t([...this.expression.map(i=>i.clone())])}overrideClone(i){return new t(this.expression.map(e=>e.overrideClone(i)).filter(e=>!!e))}toCondition(i){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(i))).then(e=>new UM(e))}kindToText(){return"oder"}};var MEe="administrativeDistrictId",mL={type:"administrativeDistrictIds",category:"person",displayName:{de:"Landkreise"},sortingIndex:4,occurrence:"single",fromObject(t){return Promise.resolve(new pf(t.administrativeDistrictIds.map(i=>io.create(i))))},fromCondition(t){return Promise.resolve(new pf(t?.includes?.map(i=>io.create(i))))},newInstance(){return Promise.resolve(new pf([]))}},pf=(()=>{class t extends _n{administrativeDistrictIds;static Specification=mL;constructor(e){super(mL.type),this.administrativeDistrictIds=e}clone(){return new t([...this.administrativeDistrictIds.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(n,r)=>n.value===r.value)}validationToText(){return this.administrativeDistrictIds.length===0?"Mindestens einen Landkreis ausw\xE4hlen":""}toCondition(){return Promise.resolve(new hL(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})(),hL=class extends Zn{constructor(i,e){super(MEe,i?i.map(n=>n.getNumericValue()):null,e?e.map(n=>n.getNumericValue()):null)}};var REe="administrativeRegion",fL={type:"administrativeRegionIds",category:"person",displayName:{de:"Regierungsbezirke"},sortingIndex:2,occurrence:"single",fromObject(t){return Promise.resolve(new _0(t.administrativeRegionIds))},fromCondition(t){return Promise.resolve(new _0(t.includes))},newInstance(){return Promise.resolve(new _0([]))}},_0=(()=>{class t extends _n{administrativeRegionIds;static Specification=fL;constructor(e){super(fL.type),this.administrativeRegionIds=e}clone(){return new t([...this.administrativeRegionIds?this.administrativeRegionIds:[]])}equals(e){return super.equals(e)&&Ni.equals(this.administrativeRegionIds,e.administrativeRegionIds)}validationToText(){return this.administrativeRegionIds.length===0?"Mindestens einen Regierungsbezirk ausw\xE4hlen":""}toCondition(){return Promise.resolve(new OEe(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})(),OEe=class extends Zn{constructor(i,e){super(REe,i,e)}};var NEe="admissionCause",RK={type:"admissionCauses",category:"case",displayName:{de:"Aufnahmeanlass"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new gL(t.admissionCauses))},fromCondition(t){return Promise.resolve(new gL(t?.includes??[]))},newInstance(){return Promise.resolve(new gL([]))}},gL=(()=>{class t extends _n{admissionCauses;static Specification=RK;constructor(e){super(RK.type),this.admissionCauses=e}clone(){return new t([...this.admissionCauses.slice()])}equals(e){return super.equals(e)&&Ni.equals(this.admissionCauses,e.admissionCauses)}validationToText(){return this.admissionCauses.length===0?"Mindestens einen Aufnahmeanlass ausw\xE4hlen":""}toCondition(){return Promise.resolve(new PEe(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})(),PEe=class extends Zn{constructor(i,e){super(NEe,i,e)}};var LEe="admissionReason",PK={type:"admissionReasons",category:"case",displayName:{de:"Aufnahmegrund"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new Y2(t.admissionReasons))},fromCondition(t){return Promise.resolve(new Y2(t.includes))},newInstance(){return Promise.resolve(new Y2([]))}},Y2=(()=>{class t extends _n{admissionReasons;static Specification=PK;constructor(e){super(PK.type),this.admissionReasons=e}clone(){return new t([...this.admissionReasons])}equals(e){return super.equals(e)&&Ni.equals(this.admissionReasons,e.admissionReasons)}validationToText(){return this.admissionReasons.length===0?"Mindestens einen Aufnahmegrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new FEe(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})(),FEe=class extends Zn{constructor(i,e){super(LEe,i,e)}};var Vce="agmId",vA={type:"ageGroups",category:"person",displayName:{de:"Altersgruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new Qv(t.agm))},fromCondition(t){return Promise.resolve(new Qv(t.includes))},newInstance(){return Promise.resolve(new Qv([]))}},Qv=(()=>{class t extends _n{agm;static Specification=vA;constructor(e){super(vA.type),this.agm=e}clone(){return new t([...this.agm])}equals(e){return super.equals(e)&&Ni.equals(this.agm,e.agm)}validationToText(){return this.agm.length===0?"Mindestens eine Altersgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new BEe(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})(),BEe=class extends Zn{constructor(i,e){super(Vce,i,e)}};var _L=class t{from;to;static fromObject(i={}){return new t(i.from,i.to)}constructor(i,e){this.from=i,this.to=e}equals(i){return this.to===i.to&&this.from===i.from}clone(){return new t(this.from,this.to)}};var zce={0:"keine Komplikation oder Komorbidit\xE4t (0)",1:"leichte Komplikation oder Komorbidit\xE4t (1)",2:"m\xE4\xDFig schwere Komplikation oder Komorbidit\xE4t (2)",3:"schwere Komplikation oder Komorbidit\xE4t (3)",4:"\xE4u\xDFerst schwere Komplikation oder Komorbidit\xE4t (4)",5:"\xE4u\xDFerst schwere Komplikation oder Komorbidit\xE4t (5)",6:"\xE4u\xDFerst schwere Komplikation oder Komorbidit\xE4t (6)"};var xXe={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 VEe={"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 Uce={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 Hce={A:"Aufnahme in den allgemein station\xE4ren Bereich inkl. Aufnahme auf Intensiveinheiten",G:"Aufnahme eines Fr\xFChgeborenen/Neugeborenen am Tag der Geburt oder am Folgetag in den allgemein station\xE4ren Bereich inkl. Aufnahme auf Intensiveinheiten",K:"Aufnahme eines 0-Tagesfalls",T:"Transfer von einem anderen Krankenhaus in den allgemein station\xE4ren Bereich inkl. Intensiveinheiten",W:"Wiederaufnahme in den allgemein station\xE4ren Bereich inkl. Wiederaufnahme auf Intensiveinheiten",R:"Aufnahme in den Bereich der Rehabilitation",P:"Aufnahme in den ausschlie\xDFlichen Bereich der Pflege",L:"Kennzeichen der Datens\xE4tze, die den Patientenaufenthalt nach dem Zeitpunkt der Asylierung beschreiben",1:"Fremdzuweisung von einem:einer Allgemeinmediziner:in",2:"Fremdzuweisung von einem Facharzt/einer Fach\xE4rztin",3:"Fremdzuweisung von der eigenen/einer anderen Krankenanstalt ohne bestehenden station\xE4ren Aufenthalt",4:"Fremdzuweisung von einem Notarzt/einer Not\xE4rztin",5:"Selbstzuweisung (ohne Einweisungsschein)",6:"Wiederbestellung",9:"Sonstige Zuweisung (durch Beh\xF6rde, Pflegeeinrichtung, etc.)"};var Gce={P:"geplante station\xE4re Aufnahme/geplanter ambulanter Besuch (mit vorhergehender Terminvereinbarung, Richtwert: mindestens 24 Stunden)",A:"akute station\xE4re Aufnahme/akuter ambulanter Besuch (ohne vorhergehende Terminvereinbarung)",K:"station\xE4re Aufnahme/ambulanter Besuch aus Kapazit\xE4tsgr\xFCnden zugewiesen"};var jce={E:"Entlassung aus dem Krankenhaus",T:"Transfer in ein anderes Krankenhaus",S:"Sterbefall",A:"Krankenhausinterne Verlegung vom Bereich der Rehabilitation und vom ausschlie\xDFlichen Bereich der Pflege in den allgemeinen station\xE4ren Bereich (inkl. Intensivbereich)",R:"Krankenhausinterne Verlegung in den Bereich der Rehabilitation",P:"Krankenhausinterne Verlegung in den ausschlie\xDFlichen Bereich der Pflege",L:"Kennzeichen der Datens\xE4tze, die zum Zeitpunkt der Asylierung dokumentarischabgeschlossen werden",V:"Kennzeichen f\xFCr noch nicht abgeschlossene Aufenthalte von am Jahresende verbleibenden Patient:innen",4:"Entlassung gegen Revers"};var $ce={J:"Ja (Abrechnung des station\xE4ren Aufenthalts/ambulanten Besuchs erfolgt \xFCber den Landesgesundheitsfonds/PRIKRAF)",K:"Nein (Abrechnung des station\xE4ren Aufenthalts/ambulanten Besuchs erfolgt \xFCber den Sozialversicherungstr\xE4ger)",N:"Nein (Abrechnung des station\xE4ren Aufenthalts/ambulanten Besuchs erfolgt weder \xFCber den Landesgesundheitsfonds/PRIKRAF noch \xFCber den Sozialversicherungstr\xE4ger)"};var qce={1:"Elektive Chirurgie",2:"Notfalls-Eingriff",3:"Kein chirurgischer Eingriff"};var Yce={1:"Bettenstation",2:"Notaufnahme",3:"Andere Intensivstation",4:"IMCU",5:"OP",6:"Aufwachraum",7:"Andere"};var Kce={0:"Keine Atemwegszugang/nicht erhoben",1:"O\u2082-Maske oder-Brille",2:"CPAP-Maske",3:"CPAP-Helm",4:"Tubus",5:"Kan\xFCle"};var Wce={0:"Spontanatmung/nicht erhoben",1:"BIPAP",2:"CPAP",3:"Assistiert",4:"Kontrolliert",5:"HF-Beatmung"};var Qce={S:"Station\xE4r",I:"Spitalsambulant",E:"Extramural ambulant"};var Zce={"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 OXt=["mainDiagnosis","secondaryDiagnosis","skCode"],RXt=["opsCode","mainProcedure"],PXt=["mainDiagnosis","secondaryDiagnosis"],NXt=["mainDiagnosis","secondaryDiagnosis"],FXt=["opcs","mainProcedure"],LXt=["procedure"],bA={secondaryDiagnosis:"Nebendiagnose",mainDiagnosis:"Hauptdiagnose",mainProcedure:"Hauptprozedur",skCode:"Sekund\xE4r-Ziffer",opsCode:"OPS-Ziffer",procedure:"Prozedur",opcs:"OPCS"},K2={"ICD-10-GM":OXt.map(t=>t),"ICD-10-AT":PXt.map(t=>t),"ICD-10-UK":NXt.map(t=>t),OPS:RXt.map(t=>t),"OPCS-4":FXt.map(t=>t),"PROCEDURE-AT":LXt.map(t=>t),"G-DRG":[]};var W2={"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 xi=class t{name;description;codingSystem;hierarchyElementType;year;static validateCodeName(i,e){let n;switch(e){case"OPS":n=!!i.match(/^[0-9]-\S{2,3}(\.\S{1,2})?$/);break;case"ICD-10-GM":case"ICD-10-AT":n=!!i.match(/^[A-Z]\d{2}(\.\d{1,2})?(\+)?$/);break;case"G-DRG":n=!!i.match(/^[0-9A-Z][0-9][0-9][A-Z]$/);break;default:n=!0}return n}static fromObject(i){return new t(i.name,i.description,i.codingSystem,i.hierarchyElementType,i.year)}constructor(i,e,n,r,o){this.name=i,this.description=e,this.codingSystem=n,this.hierarchyElementType=r,this.year=o}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(i){let e=new RegExp("[-+.!*]");return i.match(e)?this._cleanName(i.replace(e,"")):i}},yL=class t{code;count;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){let e=i.code?xi.fromObject(i.code):null;return new t(e,i.count)}constructor(i,e){this.code=i,this.count=e}};var cI={INLIER:"Normallieger",OUTLIER_LONG_STAY:"Langlieger",OUTLIER_SHORT_STAY:"Kurzlieger",UNKNOWN:"Unbekannt"};var Xce=["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 NK=2025;var x6=class t{data;departments;departmentSums;sectionSums;topSectionSums;total;constructor(i){this.data=i,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 i={};this.departments.forEach(e=>{let n=Object.keys(this.data[e]),r=0;this.data[e]&&n.forEach(o=>{this.data[e][o]&&(r=r+this.data[e][o])}),i[e]=r}),this.departmentSums=i}_calculateTopSectionSums(){let i=this.sectionSums.MEDICAL_SERVICE+this.sectionSums.MEDTECH_SERVICE+this.sectionSums.NURSING_SERVICE,e=this.sectionSums.DRUGS_OVERHEAD+this.sectionSums.DRUGS_SINGLE,n=this.sectionSums.IMPLANTS,r=this.sectionSums.MEDICAL_SUPPLIES_OVERHEAD+this.sectionSums.MEDICAL_SUPPLIES_SINGLE+this.sectionSums.MEDICAL_SUPPLIES_EXTERNAL,o=this.sectionSums.INFRASTRUCTURE_MEDICAL+this.sectionSums.INFRASTRUCTURE_NON_MEDICAL,a={STAFF:i,DRUGS:e,IMPLANTS:n,MEDICAL_SUPPLIES:r,INFRASTRUCTURE:o};this.topSectionSums=a}_calculateSectionSums(){let i={};Xce.forEach(e=>{let n=0;this.departments.forEach(r=>{n=n+this.data[r][e]}),i[e]=n}),this.sectionSums=i}_calculateTotal(){let i=(e,n)=>e+this.departmentSums[n];this.total=this.departments.reduce(i,0)}};var S6=class t extends xi{mainDepartment;mainDiagnoses;procedures;costTable;static fromObject(i){let e=[],n=[],r=null;return i.mainDiagnoses&&(e=i.mainDiagnoses.map(o=>({code:xi.fromObject(o.code),percentage:o.percentage}))),i.procedures&&(n=i.procedures.map(o=>({code:xi.fromObject(o.code),percentage:o.percentage}))),i.costTable&&(r=new x6(i.costTable)),new t(i.name,i.description,i.year,i.mainDepartment,e,n,r)}constructor(i,e,n,r,o,a,c){super(i,e,"G-DRG","specific",n),this.mainDepartment=r,this.mainDiagnoses=o,this.procedures=a,this.costTable=c}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(i=>({code:i.code.clone(),percentage:i.percentage}))]:void 0,this.procedures?[...this.procedures.map(i=>({code:i.code.clone(),percentage:i.percentage}))]:void 0,this.costTable?this.costTable.clone():void 0)}};var Jce=class t extends xi{content;ansteckend;ebmlabor;rare;age;agereject;morbodity;mortalities;paragraph295;paragraph301;sexcode;sexreject;static fromObject(i){return new t(i.name,i.description,i.year,i.content,i.ansteckend,i.ebmlabor,i.rare,i.age,i.agereject,i.morbodity,i.mortalities,i.paragraph295,i.paragraph301,i.sexcode,i.sexreject)}constructor(i,e,n,r,o,a,c,m,g,C,w,P,R,z,H){super(i,e,"ICD-10-GM","specific",n),this.content=r,this.ansteckend=o,this.ebmlabor=a,this.rare=c,this.age=m,this.agereject=g,this.morbodity=C,this.mortalities=w,this.paragraph295=P,this.paragraph301=R,this.sexcode=z,this.sexreject=H}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 Zv=class{static summary(i,e){if(e.length===0)return`Alle ${i} Kapitel`;function n(a){switch(a.hierarchyElementType){case"chapter":return"Kapitel";case"block":return"Gruppe";default:return""}}function r(a){switch(a.hierarchyElementType){case"chapter":return 3;case"block":return 2;default:return 1}}if(e.length===1)return`${n(e[0])} ${e[0].name}`;let o=e.sort((a,c)=>r(c)-r(a))[0];return`${n(o)} ${o.name} + ${e.length-1} weitere`}static fromObject(i){let e;switch(i.hierarchyElementType){case"chapter":case"block":e=mf.fromObject(i);break;case"specific":switch(i.codingSystem){case"G-DRG":{e=S6.fromObject(i);break}case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":e=Jce.fromObject(i);break;default:e=xi.fromObject(i)}}return e}};var mf=class t extends xi{shortName;longName;chapterStart;chapterEnd;static fromObject(i){return new t(i.name,i.description,i.codingSystem,i.hierarchyElementType,i.shortName,i.longName,i.start?Zv.fromObject(i.start):void 0,i.end?Zv.fromObject(i.end):void 0)}constructor(i,e,n,r,o,a,c,m){super(i,e,n,r),this.shortName=o,this.longName=a,this.chapterStart=c,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 FK=class t{caseId;internMark;additionalInformation;amount;casemix;casemixRelevantAmount;code;count;fabKey;specialtyDepartmentId;virtualClinicId;year;procedures;diagnoses;mainDiagnosis;mainProcedure;charges;chargeRealm;static fromObjArr(i){let e=n=>t.fromObj(n);return i.map(e)}static fromObj(i){let e=i.code?xi.fromObject(i.code):null,n=zEe.fromObj(i.additionalInformation);return new t(i.caseId,i.internMark,n,i.amount,i.casemix,i.casemixRelevantAmount,e,i.count,i.fabKey,i.specialtyDepartmentId,i.virtualClinicId,i.year,HEe.fromObjArray(i.procedures),UEe.fromObjectArray(i.diagnoses),i.mainDiagnosis?xi.fromObject(i.mainDiagnosis):void 0,i.mainProcedure?xi.fromObject(i.mainProcedure):void 0,GEe.fromObjectArray(i.charges),i.chargeRealm)}constructor(i,e,n,r,o,a,c,m,g,C,w,P,R,z,H,j,K=[],ne=null){this.caseId=i,this.internMark=e,this.additionalInformation=n,this.amount=r,this.casemix=o,this.casemixRelevantAmount=a,this.code=c,this.count=m,this.fabKey=g,this.specialtyDepartmentId=C,this.virtualClinicId=w,this.year=P,this.procedures=R,this.diagnoses=z,this.mainDiagnosis=H,this.mainProcedure=j,this.charges=K,this.chargeRealm=ne}},zEe=class t{administrativeDistrictId;postalCode;fabs;admission;dismissal;patientInformation;caseInformation;constructor(i,e,n,r,o,a,c){this.administrativeDistrictId=i,this.postalCode=e,this.fabs=n,this.admission=r,this.dismissal=o,this.patientInformation=a,this.caseInformation=c}static fromObj(i){let e=i.administrativeDistrictId?io.createFromNumber(i.administrativeDistrictId):null;return new t(e,i.postalCode,i.fabs.map(n=>$e(pe({},n),{admissionDate:new Date(n.admissionDate),dismissalDate:new Date(n.dismissalDate)})),$e(pe({},i.admission),{date:new Date(i.admission.date)}),$e(pe({},i.dismissal),{date:new Date(i.dismissal.date)}),i.patientInformation,i.caseInformation)}},UEe=class t{count;diagnoseType;chargeRealm;version;code;localisation;diagnosisSecurity;skCode;skLocalisation;skDiagnosisSecurity;static fromObjectArray(i){return i.map(e=>t.fromObject(e))}static fromObject(i){return new t(i.count,i.diagnoseType,i.chargeRealm,i.version,xi.fromObject(i.code),i.localisation,i.diagnosisSecurity,i.skCode?xi.fromObject(i.skCode):void 0,i.skLocalisation,i.skDiagnosisSecurity)}constructor(i,e,n,r,o,a,c,m,g,C){this.count=i,this.diagnoseType=e,this.chargeRealm=n,this.version=r,this.code=o,this.localisation=a,this.diagnosisSecurity=c,this.skCode=m,this.skLocalisation=g,this.skDiagnosisSecurity=C}},HEe=class t{count;procedureDate;localisation;code;static fromObjArray(i){return i.map(e=>t.fromObj(e))}static fromObj(i){return new t(i.count,new Date(i.procedureDate),i.localisation,xi.fromObject(i.code))}constructor(i,e,n,r){this.count=i,this.procedureDate=e,this.localisation=n,this.code=r}},GEe=class t{accountingStart;accountingEnd;amount;chargeRealm;count;dayOfTreatment;daysWithoutCharge;type;static fromObjectArray(i){return i.map(e=>t.fromObject(e))}static fromObject(i){return new t(i.accountingStart?new Date(i.accountingStart):void 0,i.accountingEnd?new Date(i.accountingEnd):void 0,i.amount,i.chargeRealm,i.count,i.dayOfTreatment,i.daysWithoutCharge,i.type)}constructor(i,e,n,r,o,a,c,m){this.accountingStart=i,this.accountingEnd=e,this.amount=n,this.chargeRealm=r,this.count=o,this.dayOfTreatment=a,this.daysWithoutCharge=c,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 BXt=["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"],w6=class{id;name;constructor(i,e){this.id=i,this.name=e}parent(){if(this.isLeistungsgruppe()){let i=this.id.slice(0,this.id.indexOf("."));return Eh.find(e=>e.id===i)}else return}children(){return this.isLeistungsbereich()?Eh.filter(i=>i.isLeistungsgruppe()).filter(i=>i.parent()?.id===this.id):[]}isLeistungsbereich(){return!this.id.includes(".")}isLeistungsgruppe(){return this.id.includes(".")}},ede={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"},Eh=BXt.map(t=>new w6(t,ede[t]));var tde=class t{id;name;errorRecipientEmailAddress;recipientEmailAddress;fabSelectionStrategy;status;virtualClinicId;blobReference;createdDate;modifiedDate;static fromObj(i){let e=i.modifiedDate?this.fixUTC(new Date(i.modifiedDate)):null,n=i.createdDate?this.fixUTC(new Date(i.createdDate)):null;return new t(i.id,i.originalFileName,i.errorRecipientEmailAddress,i.recipientEmailAddress,i.fabSelectionStrategy,i.status,i.virtualClinicId,i.blobReference,n,e)}static fixUTC(i){return i.setHours(i.getHours()+2),i}constructor(i,e,n,r,o,a,c,m,g,C){this.id=i,this.name=e,this.errorRecipientEmailAddress=n,this.recipientEmailAddress=r,this.fabSelectionStrategy=o,this.status=a,this.virtualClinicId=c,this.blobReference=m,this.createdDate=g,this.modifiedDate=C}clone(){return new t(this.id,this.name,this.errorRecipientEmailAddress,this.recipientEmailAddress,this.fabSelectionStrategy,this.status,this.virtualClinicId,pe({},this.blobReference),this.createdDate,this.modifiedDate)}};var LK=class t{id;name;importCaseCount;relevantCaseCount;errorRecipientEmailAddress;recipientEmailAddress;status;virtualClinicId;blobReference;createdDate;modifiedDate;year;static fromObj(i){return new t(i.id,i.originalFileName,i.importCaseCount,i.relevantCaseCount,i.errorRecipientEmailAddress,i.recipientEmailAddress,i.status,i.virtualClinicId,i.blobReference,i.createdDate,i.modifiedDate,i.year)}resourceName=tn.VIRTUAL_CLINIC_REFERRAL_IMPORT;constructor(i,e,n,r,o,a,c,m,g,C,w,P){this.id=i,this.name=e,this.importCaseCount=n,this.relevantCaseCount=r,this.errorRecipientEmailAddress=o,this.recipientEmailAddress=a,this.status=c,this.virtualClinicId=m,this.blobReference=g,this.createdDate=C,this.modifiedDate=w,this.year=P}clone(){return new t(this.id,this.name,this.importCaseCount,this.relevantCaseCount,this.errorRecipientEmailAddress,this.recipientEmailAddress,this.status,this.virtualClinicId,pe({},this.blobReference),this.createdDate,this.modifiedDate,this.year)}};var vL=class t{fabKey;id;virtualClinicId;name;fabIntern;constructor(i,e,n,r,o){this.fabKey=i,this.id=e,this.virtualClinicId=n,this.name=r,this.fabIntern=o}static fromObj(i){return new t(i.fabKey,i.id,i.virtualClinicId,i.name,i.fabIntern)}static fromObjArr(i){return i.map(t.fromObj)}};var I6=class t{id;name;createdDate;modifiedDate;highestPermission;address;clinicInformation;benchmarkable;hasError;labels;static fromObj(i){let e=null,n=null,r;i.createdDate&&(e=new Date(i.createdDate)),i.modifiedDate&&(n=new Date(i.modifiedDate)),i.administrativeDistrictId!==0&&i.address&&i.address.city&&(r=BK.fromObject(i.address));let o=i.clinicInformation?jEe.fromObject(i.clinicInformation):void 0;return new t(i.id,i.name,e,n,i.highestPermission,r,o,i.benchmarkable,void 0)}static fromObjArr(i){return i.map(t.fromObj)}resourceName=tn.VIRTUAL_CLINIC;constructor(i,e,n,r,o,a,c,m,g,C){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o,this.address=a,this.clinicInformation=c,this.benchmarkable=m,this.hasError=g,this.labels=C}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)}},jEe=class t{origin;costDataExists;postalCodeExists;referralDataExists;dismissalDateRange;static fromObject(i){let e;return i&&i.dismissalDateRange&&(e=new Mm(new Date(i.dismissalDateRange.from),new Date(i.dismissalDateRange.to))),new t(i.origin,i.costDataExists,i.postalCodeExists,i.referralDataExists,e)}constructor(i,e,n,r,o){this.origin=i,this.costDataExists=e,this.postalCodeExists=n,this.referralDataExists=r,this.dismissalDateRange=o}clone(...i){return new t(JSON.parse(JSON.stringify(this.origin)),this.costDataExists,this.postalCodeExists,this.referralDataExists,this.dismissalDateRange?this.dismissalDateRange.clone():void 0)}toLabels(){let i=[];return this.postalCodeExists&&i.push("PLZ-Analyse"),this.costDataExists&&i.push("Kosten-Daten"),this.referralDataExists&&i.push("Einweiser-Daten"),i}},BK=class t{street;houseNumber;postalCode;city;country;location;administrativeDistrictId;static fromObject(i){return new t(i.street,i.houseNumber,i.postalCode,i.city,i.country,i.location,i.administrativeDistrictId?io.create(i.administrativeDistrictId):null)}constructor(i,e,n,r,o,a,c){this.street=i,this.houseNumber=e,this.postalCode=n,this.city=r,this.country=o,this.location=a,this.administrativeDistrictId=c}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())}},ide=class t{virtualClinicId;year;beds;clinicSize;clinicType;isUniversity;medicalCareLevel;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){return new t(i.virtualClinicId,i.year,i.beds,i.clinicSize,i.clinicType,i.isUniversity,i.medicalCareLevel)}constructor(i,e,n,r,o,a,c){this.virtualClinicId=i,this.year=e,this.beds=n,this.clinicSize=r,this.clinicType=o,this.isUniversity=a,this.medicalCareLevel=c}},nde=class t{year;virtualClinicId;parts;constructor(i,e,n){this.year=i,this.virtualClinicId=e,this.parts=n}static fromObj(i){return new t(i.year,i.virtualClinicId,i.parts)}static fromObjArr(i){return i.map(t.fromObj)}},VK=class t{year;virtualClinicId;specialtyDepartmentId;nursing;medical;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){return new t(i.year,i.virtualClinicId,i.specialtyDepartmentId,i.nursing,i.medical)}constructor(i,e,n,r,o){this.year=i,this.virtualClinicId=e,this.specialtyDepartmentId=n,this.nursing=r,this.medical=o}},zK=class t{year;virtualClinicId;specialtyDepartmentId;cmi;caseCount;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){return new t(i.year,i.virtualClinicId,i.specialtyDepartmentId,i.cmi,i.caseCount)}constructor(i,e,n,r,o){this.year=i,this.virtualClinicId=e,this.specialtyDepartmentId=n,this.cmi=r,this.caseCount=o}};var $Ee="artificialRespirationHours",UK={type:"artificialRespirationHours",category:"case",displayName:{de:"K\xFCnstliche Beatmungsstunden"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new T6(_L.fromObject(t.artificialRespirationHours)))},fromCondition(t){return Promise.reject(new Error("Not implemented"))},newInstance(){return Promise.resolve(new T6(new _L(null,null)))}},T6=(()=>{class t extends _n{artificialRespirationHours;static Specification=UK;constructor(e){super(UK.type),this.artificialRespirationHours=e}clone(){return new t(this.artificialRespirationHours.clone())}equals(e){return super.equals(e)&&gr.equals(this.artificialRespirationHours,e.artificialRespirationHours,(n,r)=>n.equals(r))}valid(){return this.artificialRespirationHours?Number.isInteger(this.artificialRespirationHours.to)&&Number.isInteger(this.artificialRespirationHours.from)?this.artificialRespirationHours.from{class t extends _n{careServiceAreaIds;static Specification=bL;constructor(e){super(bL.type),this.careServiceAreaIds=e}clone(){return new t([...this.careServiceAreaIds?this.careServiceAreaIds:[]])}equals(e){return super.equals(e)&&Ni.equals(this.careServiceAreaIds,e.careServiceAreaIds)}validationToText(){return this.careServiceAreaIds.length===0?"Mindestens ein Versorgungsgebiet ausw\xE4hlen":""}toCondition(){return Promise.resolve(new qEe(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})(),qEe=class extends Zn{constructor(i,e){super(YEe,i,e)}};var WEe="chargeRealm",HK={type:"chargeRealm",category:"case",displayName:{de:"Entgeltbereich"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new CL(t.includes))},fromCondition(t){return Promise.resolve(new CL(t.includes))},newInstance(){return Promise.resolve(new CL([]))}},CL=(()=>{class t extends _n{includes;static Specification=HK;constructor(e){super(HK.type),this.includes=e}clone(){return new t([...this.includes])}equals(e){return super.equals(e)&&Ni.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens einen Entgeltbereich ausw\xE4hlen":""}toCondition(){return Promise.resolve(new KEe(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})(),KEe=class extends Zn{constructor(i,e){super(WEe,i,e)}};var ZEe="clinicBeds",GK={type:"clinicBeds",category:"clinic",displayName:{de:"Klinik-Betten"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new xL(t.from,t.to))},fromCondition(t){return Promise.resolve(new xL(t.from,t.to))},newInstance(){return Promise.resolve(new xL(null,null))}},xL=(()=>{class t extends _n{from;to;static Specification=GK;constructor(e,n){super(GK.type),this.from=e,this.to=n}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&gr.equals(this.from,e.from)&&gr.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.from{class t extends _n{nrwServiceGroupId;qualification;static Specification=jK;constructor(e,n){super(jK.type),this.nrwServiceGroupId=e,this.qualification=n}clone(){return new t(this.nrwServiceGroupId,this.qualification)}equals(e){return super.equals(e)&&gr.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&gr.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 XEe(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})(),XEe=class extends Is{lgNr;flag;constructor(i,e){super(JEe),this.lgNr=i,this.flag=e}toJSON(){return{[this.id]:{lgNr:this.lgNr,flag:this.flag}}}};var tAe="clinicLevel",$K={type:"clinicLevels",category:"clinic",displayName:{de:"Versorgungslevel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new wL(t.includes))},fromCondition(t){return Promise.resolve(new wL(t.includes))},newInstance(){return Promise.resolve(new wL([]))}},wL=(()=>{class t extends _n{includes;static Specification=$K;constructor(e){super($K.type),this.includes=e}clone(){return new t([...this.includes])}equals(e){return super.equals(e)&&Ni.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens ein Versorgungslevel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new eAe(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})(),eAe=class extends Zn{constructor(i,e){super(tAe,i,e)}};var nAe="medicalCareLevel",YK={type:"medicalCareLevels",category:"clinic",displayName:{de:"Versorgungsstufe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new qK(t.medicalCareLevels))},fromCondition(t){return Promise.resolve(new qK(t.includes))},newInstance(){return Promise.resolve(new qK([]))}},qK=(()=>{class t extends _n{medicalCareLevels;static Specification=YK;constructor(e){super(YK.type),this.medicalCareLevels=e}clone(){return new t([...this.medicalCareLevels])}equals(e){return super.equals(e)&&Ni.equals(this.medicalCareLevels,e.medicalCareLevels)}validationToText(){return this.medicalCareLevels.length===0?"Mindestens eine Versorgungsstufe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new iAe(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})(),iAe=class extends Zn{constructor(i,e){super(nAe,i,e)}};var oAe="physicianRequirements",KK={type:"clinicPhysicianRequirements",category:"clinic",displayName:{de:"Qualit\xE4tskriterien - Fach\xE4rtzliche Vorgaben"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new IL(t.nrwServiceGroupId,t.qualification,t.availability))},fromCondition(t){return Promise.resolve(new IL(t.lgNr,t.qualification,t.availability))},newInstance(){return Promise.resolve(new IL(null,null,null))}},IL=(()=>{class t extends _n{nrwServiceGroupId;qualification;availability;static Specification=KK;constructor(e,n,r){super(KK.type),this.nrwServiceGroupId=e,this.qualification=n,this.availability=r}clone(){return new t(this.nrwServiceGroupId,this.qualification,this.availability)}equals(e){return super.equals(e)&&gr.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&gr.equals(this.availability,e.availability)&&gr.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 rAe(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})(),rAe=class extends Is{lgNr;qualification;availability;constructor(i,e,n){super(oAe),this.lgNr=i,this.qualification=e,this.availability=n}toJSON(){return{[this.id]:{lgNr:this.lgNr,qualification:this.qualification,availability:this.availability}}}};var sAe="clinicSize",WK={type:"clinicSizes",category:"clinic",displayName:{de:"Klinik-Gr\xF6\xDFe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new TL(t.clinicSizes))},fromCondition(t){return Promise.resolve(new TL(t.includes))},newInstance(){return Promise.resolve(new TL([]))}},TL=(()=>{class t extends _n{clinicSizes;static Specification=WK;constructor(e){super(WK.type),this.clinicSizes=e}clone(){return new t([...this.clinicSizes])}equals(e){return super.equals(e)&&Ni.equals(this.clinicSizes,e.clinicSizes)}validationToText(){return this.clinicSizes.length===0?"Mindestens eine Klinik-Gr\xF6\xDFe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new aAe(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})(),aAe=class extends Zn{constructor(i,e){super(sAe,i,e)}};var cAe="clinicSn",ZK={type:"clinicSn",category:"clinic",displayName:{de:"Klinik-Standort"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new QK(t.excludes))},fromCondition(t){return Promise.resolve(new QK(t.excludes))},newInstance(){return Promise.resolve(new QK([99]))}},QK=(()=>{class t extends _n{excludes;static Specification=ZK;constructor(e){super(ZK.type),this.excludes=e}clone(){return new t([...this.excludes])}equals(e){return super.equals(e)&&Ni.equals(this.excludes,e.excludes)}validationToText(){return this.excludes.length===0?"Mindestens einen Klinik-Standort ausw\xE4hlen":""}toCondition(){return Promise.resolve(new lAe([],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})(),lAe=class extends Zn{constructor(i,e){super(cAe,i,e)}};var uAe="clinicType",XK={type:"clinicTypes",category:"clinic",displayName:{de:"Tr\xE4gerart"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new CA(t.clinicTypes))},fromCondition(t){return Promise.resolve(new CA(t.includes))},newInstance(){return Promise.resolve(new CA([]))}},CA=(()=>{class t extends _n{clinicTypes;static Specification=XK;constructor(e){super(XK.type),this.clinicTypes=e}clone(){return new t([...this.clinicTypes])}equals(e){return super.equals(e)&&Ni.equals(this.clinicTypes,e.clinicTypes)}validationToText(){return this.clinicTypes.length===0?"Mindestens eine Tr\xE4gerart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new dAe(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})(),dAe=class extends Zn{constructor(i,e){super(uAe,i,e)}};var Bu=class t{street;postalCode;city;location;note;administrativeDistrictId;static fromObject(i){return new t(i.street,i.postalCode,i.city,i.location,i.note,i.administrativeDistrictId)}constructor(i,e,n,r,o,a){this.street=i,this.postalCode=e,this.city=n,this.location=r,this.note=o,this.administrativeDistrictId=a}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(...i){return new t(this.street,this.postalCode,this.city,this.location,this.note,this.administrativeDistrictId)}};var vs=class t{ik;sn;year;static fromString(i){let e=i.split("_"),n=e[2]?parseInt(e[2],10):void 0;return new t(e[0],e[1],n)}static fromObj(i={}){return new t(i.ik.toString(),i.sn.toString(),i.year)}constructor(i,e,n){this.ik=i,this.sn=e,this.year=n}toString(){let i=null;return this.ik&&this.sn!==null&&this.sn!==void 0&&(i=`${this.ik}_${this.sn}`,this.year&&(i=`${i}_${this.year}`)),i}clone(){return new t(this.ik,this.sn,this.year)}equals(i){return!!this&&!!i&&this.toString()===i.toString()}equalsByIkAndSn(i){return gr.equals(this.ik,i.ik)&&gr.equals(this.sn,i.sn)}};var dI=(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})(dI||{});var xA=(function(t){return t.PUBLIC="public",t.PRIVATE="private",t.NONPROFIT="nonprofit",t})(xA||{});var uI=2023;var ode=class t{id;name;nameOfOwner;address;type;size;beds;cmi;level;static fromObj(i={}){return new t(vs.fromObj(i.id),i.name,i.nameOfOwner,Bu.fromObject(i.address),i.type,i.size,i.beds,i.cmi,i.level)}constructor(i,e,n,r,o,a,c,m,g){this.id=i,this.name=e,this.nameOfOwner=n,this.address=r,this.type=o,this.size=a,this.beds=c,this.cmi=m,this.level=g}};var pI=(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})(pI||{}),EL={BASIC_REGULAR_PROVIDER:"Grund- & Regelversorger",FOCUS_PROVIDER:"Schwerpunktversorger",SPECIALIZED_HOSPITAL:"Fachkrankenhaus",MAXIMUM_PROVIDER:"Maximalversorger"};var AL=class t{medical;nursing;static fromObject(i){let e=pAe.fromObject(i.medical),n=mAe.fromObject(i.nursing);return new t(e,n)}constructor(i,e){this.medical=i,this.nursing=e}},pAe=class t{total;medicalSpecialists;nonSpecialists;inpatientDocs;static fromObject(i={}){let e=i.docsWithoutInpatientDocs.medicalSpecialists||{},n=i.docsWithoutInpatientDocs.nonSpecialists||{};return new t(i.total,e,n,i.inpatientDocs)}_normalizedYears;constructor(i={},e={},n={},r={}){this.total=i,this.medicalSpecialists=e,this.nonSpecialists=n,this.inpatientDocs=r;let o=Object.keys(this.total);o=o.concat(Object.keys(this.medicalSpecialists).filter(a=>o.indexOf(a)===-1)),o=o.concat(Object.keys(this.nonSpecialists).filter(a=>o.indexOf(a)===-1)),o=o.concat(Object.keys(this.inpatientDocs).filter(a=>o.indexOf(a)===-1)),this._normalizedYears=o}chartData(i,e,n){let r=this[i],o=this._normalizedYears.map(c=>r[c]);return{label:e,data:o,lineTension:0,fill:!1,borderWidth:i==="total"?3:1,borderColor:n,backgroundColor:n}}hasData(i){let e=this[i];return Object.keys(e).filter(r=>!!e[r]).length>0}get normalizedYears(){return this._normalizedYears}},mAe=class t{total;deliveryNurses;enrolledChildrenNurses;enrolledNurses;geriatricNurses;hospitalPorters;licensedPracticalNurses;scrubNurses;static fromObject(i={}){return new t(i.total,i.deliveryNurses,i.enrolledChildrenNurses,i.enrolledNurses,i.geriatricNurses,i.hospitalPorters,i.licensedPracticalNurses,i.scrubNurses)}_normalizedYears;constructor(i,e={},n={},r={},o={},a={},c={},m={}){this.total=i,this.deliveryNurses=e,this.enrolledChildrenNurses=n,this.enrolledNurses=r,this.geriatricNurses=o,this.hospitalPorters=a,this.licensedPracticalNurses=c,this.scrubNurses=m;let g=Object.keys(this.total);g=g.concat(Object.keys(this.deliveryNurses).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.enrolledChildrenNurses).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.enrolledNurses).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.geriatricNurses).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.hospitalPorters).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.licensedPracticalNurses).filter(C=>g.indexOf(C)===-1)),g=g.concat(Object.keys(this.scrubNurses).filter(C=>g.indexOf(C)===-1)),this._normalizedYears=g}chartData(i,e,n){let r=this[i],o=this._normalizedYears.map(c=>r[c]);return{label:e,data:o,lineTension:0,fill:!1,borderWidth:i==="total"?3:1,borderColor:n,backgroundColor:n}}hasData(i){let e=this[i];return Object.keys(e).filter(r=>!!e[r]).length>0}get normalizedYears(){return this._normalizedYears}};var Xv=(function(t){return t.WITH_UNIVERSITIES="WITH_UNIVERSITIES",t.WITHOUT_UNIVERSITIES="WITHOUT_UNIVERSITIES",t.ONLY_UNIVERSITIES="ONLY_UNIVERSITIES",t})(Xv||{}),E6={[Xv.WITH_UNIVERSITIES]:"Mit Universit\xE4ts-Kliniken",[Xv.WITHOUT_UNIVERSITIES]:"Ohne Universit\xE4ts-Kliniken",[Xv.ONLY_UNIVERSITIES]:"Nur Universit\xE4ts-Kliniken"};var VXt={callback:t=>new Intl.NumberFormat().format(t)},zXt={color:"rgba(0,0,0,0.07)",drawOnChartArea:!0,tickLength:4},UXt={family:"Roboto"},A6={type:"linear",ticks:VXt,grid:zXt,scaleLabel:UXt};function tW(t){return t+.5|0}var Q2=(t,i,e)=>Math.max(Math.min(t,e),i);function JK(t){return Q2(tW(t*2.55),0,255)}function Z2(t){return Q2(tW(t*255),0,255)}function SA(t){return Q2(tW(t/2.55)/100,0,1)}function SXe(t){return Q2(tW(t*100),0,100)}var IC={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},fAe=[..."0123456789ABCDEF"],HXt=t=>fAe[t&15],GXt=t=>fAe[(t&240)>>4]+fAe[t&15],ade=t=>(t&240)>>4===(t&15),jXt=t=>ade(t.r)&&ade(t.g)&&ade(t.b)&&ade(t.a);function $Xt(t){var i=t.length,e;return t[0]==="#"&&(i===4||i===5?e={r:255&IC[t[1]]*17,g:255&IC[t[2]]*17,b:255&IC[t[3]]*17,a:i===5?IC[t[4]]*17:255}:(i===7||i===9)&&(e={r:IC[t[1]]<<4|IC[t[2]],g:IC[t[3]]<<4|IC[t[4]],b:IC[t[5]]<<4|IC[t[6]],a:i===9?IC[t[7]]<<4|IC[t[8]]:255})),e}var qXt=(t,i)=>t<255?i(t):"";function YXt(t){var i=jXt(t)?HXt:GXt;return t?"#"+i(t.r)+i(t.g)+i(t.b)+qXt(t.a,i):void 0}var KXt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function EXe(t,i,e){let n=i*Math.min(e,1-e),r=(o,a=(o+t/30)%12)=>e-n*Math.max(Math.min(a-3,9-a,1),-1);return[r(0),r(8),r(4)]}function WXt(t,i,e){let n=(r,o=(r+t/60)%6)=>e-e*i*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function QXt(t,i,e){let n=EXe(t,1,.5),r;for(i+e>1&&(r=1/(i+e),i*=r,e*=r),r=0;r<3;r++)n[r]*=1-i-e,n[r]+=i;return n}function ZXt(t,i,e,n,r){return t===r?(i-e)/n+(i.5?C/(2-o-a):C/(o+a),m=ZXt(e,n,r,C,o),m=m*60+.5),[m|0,g||0,c]}function _Ae(t,i,e,n){return(Array.isArray(i)?t(i[0],i[1],i[2]):t(i,e,n)).map(Z2)}function yAe(t,i,e){return _Ae(EXe,t,i,e)}function XXt(t,i,e){return _Ae(QXt,t,i,e)}function JXt(t,i,e){return _Ae(WXt,t,i,e)}function AXe(t){return(t%360+360)%360}function eJt(t){let i=KXt.exec(t),e=255,n;if(!i)return;i[5]!==n&&(e=i[6]?JK(+i[5]):Z2(+i[5]));let r=AXe(+i[2]),o=+i[3]/100,a=+i[4]/100;return i[1]==="hwb"?n=XXt(r,o,a):i[1]==="hsv"?n=JXt(r,o,a):n=yAe(r,o,a),{r:n[0],g:n[1],b:n[2],a:e}}function tJt(t,i){var e=gAe(t);e[0]=AXe(e[0]+i),e=yAe(e),t.r=e[0],t.g=e[1],t.b=e[2]}function iJt(t){if(!t)return;let i=gAe(t),e=i[0],n=SXe(i[1]),r=SXe(i[2]);return t.a<255?`hsla(${e}, ${n}%, ${r}%, ${SA(t.a)})`:`hsl(${e}, ${n}%, ${r}%)`}var wXe={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"},IXe={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 nJt(){let t={},i=Object.keys(IXe),e=Object.keys(wXe),n,r,o,a,c;for(n=0;n>16&255,o>>8&255,o&255]}return t}var sde;function rJt(t){sde||(sde=nJt(),sde.transparent=[0,0,0,0]);let i=sde[t.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var oJt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function aJt(t){let i=oJt.exec(t),e=255,n,r,o;if(i){if(i[7]!==n){let a=+i[7];e=i[8]?JK(a):Q2(a*255,0,255)}return n=+i[1],r=+i[3],o=+i[5],n=255&(i[2]?JK(n):Q2(n,0,255)),r=255&(i[4]?JK(r):Q2(r,0,255)),o=255&(i[6]?JK(o):Q2(o,0,255)),{r:n,g:r,b:o,a:e}}}function sJt(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${SA(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var hAe=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,D6=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function lJt(t,i,e){let n=D6(SA(t.r)),r=D6(SA(t.g)),o=D6(SA(t.b));return{r:Z2(hAe(n+e*(D6(SA(i.r))-n))),g:Z2(hAe(r+e*(D6(SA(i.g))-r))),b:Z2(hAe(o+e*(D6(SA(i.b))-o))),a:t.a+e*(i.a-t.a)}}function lde(t,i,e){if(t){let n=gAe(t);n[i]=Math.max(0,Math.min(n[i]+n[i]*e,i===0?360:1)),n=yAe(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function DXe(t,i){return t&&Object.assign(i||{},t)}function TXe(t){var i={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(i={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(i.a=Z2(t[3]))):(i=DXe(t,{r:0,g:0,b:0,a:1}),i.a=Z2(i.a)),i}function cJt(t){return t.charAt(0)==="r"?aJt(t):eJt(t)}var eW=class t{constructor(i){if(i instanceof t)return i;let e=typeof i,n;e==="object"?n=TXe(i):e==="string"&&(n=$Xt(i)||rJt(i)||cJt(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=DXe(this._rgb);return i&&(i.a=SA(i.a)),i}set rgb(i){this._rgb=TXe(i)}rgbString(){return this._valid?sJt(this._rgb):void 0}hexString(){return this._valid?YXt(this._rgb):void 0}hslString(){return this._valid?iJt(this._rgb):void 0}mix(i,e){if(i){let n=this.rgb,r=i.rgb,o,a=e===o?.5:e,c=2*a-1,m=n.a-r.a,g=((c*m===-1?c:(c+m)/(1+c*m))+1)/2;o=1-g,n.r=255&g*n.r+o*r.r+.5,n.g=255&g*n.g+o*r.g+.5,n.b=255&g*n.b+o*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(i,e){return i&&(this._rgb=lJt(this._rgb,i._rgb,e)),this}clone(){return new t(this.rgb)}alpha(i){return this._rgb.a=Z2(i),this}clearer(i){let e=this._rgb;return e.a*=1-i,this}greyscale(){let i=this._rgb,e=tW(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=e,this}opaquer(i){let e=this._rgb;return e.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return lde(this._rgb,2,i),this}darken(i){return lde(this._rgb,2,-i),this}saturate(i){return lde(this._rgb,1,i),this}desaturate(i){return lde(this._rgb,1,-i),this}rotate(i){return tJt(this._rgb,i),this}};function I1(){}var xAe=(()=>{let t=0;return()=>t++})();function al(t){return t==null}function Gd(t){if(Array.isArray&&Array.isArray(t))return!0;let i=Object.prototype.toString.call(t);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function Al(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Vu(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function v0(t,i){return Vu(t)?t:i}function fs(t,i){return typeof t>"u"?i:t}var SAe=(t,i)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/i,fde=(t,i)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*i:+t;function ad(t,i,e){if(t&&typeof t.call=="function")return t.apply(e,i)}function Uc(t,i,e,n){let r,o,a;if(Gd(t))if(o=t.length,n)for(r=o-1;r>=0;r--)i.call(e,t[r],r);else for(r=0;rt,x:t=>t.x,y:t=>t.y};function HXe(t){let i=t.split("."),e=[],n="";for(let r of i)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function dJt(t){let i=HXe(t);return e=>{for(let n of i){if(n==="")break;e=e&&e[n]}return e}}function gI(t,i){return(kXe[i]||(kXe[i]=dJt(i)))(t)}function aW(t){return t.charAt(0).toUpperCase()+t.slice(1)}var OL=t=>typeof t<"u",hI=t=>typeof t=="function",gde=(t,i)=>{if(t.size!==i.size)return!1;for(let e of t)if(!i.has(e))return!1;return!0};function wAe(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var vc=Math.PI,jd=2*vc,GXe=jd+vc,rW=Number.POSITIVE_INFINITY,jXe=vc/180,ap=vc/2,X2=vc/4,bAe=vc*2/3,fI=Math.log10,TC=Math.sign;function RL(t,i,e){return Math.abs(t-i)r-o).pop(),i}function uJt(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function eO(t){return!uJt(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function TAe(t,i){let e=Math.round(t);return e-i<=t&&e+i>=t}function yde(t,i,e){let n,r,o;for(n=0,r=t.length;nm&&g=Math.min(i,e)-n&&t<=Math.max(i,e)+n}function lW(t,i,e){e=e||(a=>t[a]1;)o=r+n>>1,e(o)?r=o:n=o;return{lo:r,hi:n}}var S1=(t,i,e,n)=>lW(t,e,n?r=>{let o=t[r][i];return ot[r][i]lW(t,e,n=>t[n][i]>=e);function DAe(t,i,e){let n=0,r=t.length;for(;nn&&t[r-1]>e;)r--;return n>0||r{let n="_onData"+aW(e),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...o){let a=r.apply(this,o);return t._chartjs.listeners.forEach(c=>{typeof c[n]=="function"&&c[n](...o)}),a}})})}function Cde(t,i){let e=t._chartjs;if(!e)return;let n=e.listeners,r=n.indexOf(i);r!==-1&&n.splice(r,1),!(n.length>0)&&(qXe.forEach(o=>{delete t[o]}),delete t._chartjs)}function xde(t){let i=new Set(t);return i.size===t.length?t:Array.from(i)}var Sde=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function wde(t,i){let e=[],n=!1;return function(...r){e=r,n||(n=!0,Sde.call(window,()=>{n=!1,t.apply(i,e)}))}}function MAe(t,i){let e;return function(...n){return i?(clearTimeout(e),e=setTimeout(t,i,n)):t.apply(this,n),i}}var cW=t=>t==="start"?"left":t==="end"?"right":"center",ff=(t,i,e)=>t==="start"?i:t==="end"?e:(i+e)/2,OAe=(t,i,e,n)=>t===(n?"left":"right")?e:t==="center"?(i+e)/2:i;function Ide(t,i,e){let n=i.length,r=0,o=n;if(t._sorted){let{iScale:a,vScale:c,_parsed:m}=t,g=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,C=a.axis,{min:w,max:P,minDefined:R,maxDefined:z}=a.getUserBounds();if(R){if(r=Math.min(S1(m,C,w).lo,e?n:S1(i,C,a.getPixelForValue(w)).lo),g){let H=m.slice(0,r+1).reverse().findIndex(j=>!al(j[c.axis]));r-=Math.max(0,H)}r=qm(r,0,n-1)}if(z){let H=Math.max(S1(m,a.axis,P,!0).hi+1,e?0:S1(i,C,a.getPixelForValue(P),!0).hi+1);if(g){let j=m.slice(H-1).findIndex(K=>!al(K[c.axis]));H+=Math.max(0,j)}o=qm(H,r,n)-r}else o=n-r}return{start:r,count:o}}function Tde(t){let{xScale:i,yScale:e,_scaleRanges:n}=t,r={xmin:i.min,xmax:i.max,ymin:e.min,ymax:e.max};if(!n)return t._scaleRanges=r,!0;let o=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,r),o}var cde=t=>t===0||t===1,MXe=(t,i,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-i)*jd/e)),OXe=(t,i,e)=>Math.pow(2,-10*t)*Math.sin((t-i)*jd/e)+1,DL={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*ap)+1,easeOutSine:t=>Math.sin(t*ap),easeInOutSine:t=>-.5*(Math.cos(vc*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=>cde(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=>cde(t)?t:MXe(t,.075,.3),easeOutElastic:t=>cde(t)?t:OXe(t,.075,.3),easeInOutElastic(t){return cde(t)?t:t<.5?.5*MXe(t*2,.1125,.45):.5+.5*OXe(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 i=1.70158;return(t/=.5)<1?.5*(t*t*(((i*=1.525)+1)*t-i)):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:t=>1-DL.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?DL.easeInBounce(t*2)*.5:DL.easeOutBounce(t*2-1)*.5+.5};function Ede(t){if(t&&typeof t=="object"){let i=t.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function Ade(t){return Ede(t)?t:new eW(t)}function mde(t){return Ede(t)?t:new eW(t).saturate(.5).darken(.1).hexString()}var pJt=["x","y","borderWidth","radius","tension"],mJt=["color","borderColor","backgroundColor"];function hJt(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:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),t.set("animations",{colors:{type:"color",properties:mJt},numbers:{type:"number",properties:pJt}}),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:i=>i|0}}}})}function fJt(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var RXe=new Map;function gJt(t,i){i=i||{};let e=t+JSON.stringify(i),n=RXe.get(e);return n||(n=new Intl.NumberFormat(t,i),RXe.set(e,n)),n}function NL(t,i,e){return gJt(i,e).format(t)}var YXe={values(t){return Gd(t)?t:""+t},numeric(t,i,e){if(t===0)return"0";let n=this.chart.options.locale,r,o=t;if(e.length>1){let g=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(g<1e-4||g>1e15)&&(r="scientific"),o=_Jt(t,e)}let a=fI(Math.abs(o)),c=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),m={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(m,this.options.ticks.format),NL(t,n,m)},logarithmic(t,i,e){if(t===0)return"0";let n=e[i].significand||t/Math.pow(10,Math.floor(fI(t)));return[1,2,3,5,10,15].includes(n)||i>.8*e.length?YXe.numeric.call(this,t,i,e):""}};function _Jt(t,i){let e=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(e)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}var dW={formatters:YXe};function yJt(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:(i,e)=>e.lineWidth,tickColor:(i,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:dW.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:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var tO=Object.create(null),Dde=Object.create(null);function iW(t,i){if(!i)return t;let e=i.split(".");for(let n=0,r=e.length;nn.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=(n,r)=>mde(r.backgroundColor),this.hoverBorderColor=(n,r)=>mde(r.borderColor),this.hoverColor=(n,r)=>mde(r.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(i),this.apply(e)}set(i,e){return vAe(this,i,e)}get(i){return iW(this,i)}describe(i,e){return vAe(Dde,i,e)}override(i,e){return vAe(tO,i,e)}route(i,e,n,r){let o=iW(this,i),a=iW(this,n),c="_"+e;Object.defineProperties(o,{[c]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let m=this[c],g=a[r];return Al(m)?Object.assign({},g,m):fs(m,g)},set(m){this[c]=m}}})}apply(i){i.forEach(e=>e(this))}},$d=new CAe({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[hJt,fJt,yJt]);function KXe(t){return!t||al(t.size)||al(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function k6(t,i,e,n,r){let o=i[r];return o||(o=i[r]=t.measureText(r).width,e.push(r)),o>n&&(n=o),n}function RAe(t,i,e,n){n=n||{};let r=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(r=n.data={},o=n.garbageCollect=[],n.font=i),t.save(),t.font=i;let a=0,c=e.length,m,g,C,w,P;for(m=0;me.length){for(m=0;m0&&t.stroke()}}function w1(t,i,e){return e=e||.5,!i||t&&t.x>i.left-e&&t.xi.top-e&&t.y0&&o.strokeColor!=="",m,g;for(t.save(),t.font=r.string,vJt(t,o),m=0;m+t||0;function pW(t,i){let e={},n=Al(i),r=n?Object.keys(i):i,o=Al(t)?n?a=>fs(t[a],t[i[a]]):a=>t[a]:()=>t;for(let a of r)e[a]=wJt(o(a));return e}function Ode(t){return pW(t,{top:"y",right:"x",bottom:"y",left:"x"})}function EA(t){return pW(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ym(t){let i=Ode(t);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function sp(t,i){t=t||{},i=i||$d.font;let e=fs(t.size,i.size);typeof e=="string"&&(e=parseInt(e,10));let n=fs(t.style,i.style);n&&!(""+n).match(SJt)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:fs(t.family,i.family),lineHeight:WXe(fs(t.lineHeight,i.lineHeight),e),size:e,style:n,weight:fs(t.weight,i.weight),string:""};return r.string=KXe(r),r}function Ad(t,i,e,n){let r=!0,o,a,c;for(o=0,a=t.length;oe&&c===0?0:c+m;return{min:a(n,-Math.abs(o)),max:a(r,o)}}function _I(t,i){return Object.assign(Object.create(t),i)}function mW(t,i=[""],e,n,r=()=>t[0]){let o=e||t;typeof n>"u"&&(n=XXe("_fallback",t));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:r,override:c=>mW([c,...t],i,o,n)};return new Proxy(a,{deleteProperty(c,m){return delete c[m],delete c._keys,delete t[0][m],!0},get(c,m){return QXe(c,m,()=>OJt(m,i,t,c))},getOwnPropertyDescriptor(c,m){return Reflect.getOwnPropertyDescriptor(c._scopes[0],m)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,m){return NXe(c).includes(m)},ownKeys(c){return NXe(c)},set(c,m,g){let C=c._storage||(c._storage=r());return c[m]=C[m]=g,delete c._keys,!0}})}function J2(t,i,e,n){let r={_cacheable:!1,_proxy:t,_context:i,_subProxy:e,_stack:new Set,_descriptors:Rde(t,n),setContext:o=>J2(t,o,e,n),override:o=>J2(t.override(o),i,e,n)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete t[a],!0},get(o,a,c){return QXe(o,a,()=>TJt(o,a,c))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(o,a,c){return t[a]=c,delete o[a],!0}})}function Rde(t,i={scriptable:!0,indexable:!0}){let{_scriptable:e=i.scriptable,_indexable:n=i.indexable,_allKeys:r=i.allKeys}=t;return{allKeys:r,scriptable:e,indexable:n,isScriptable:hI(e)?e:()=>e,isIndexable:hI(n)?n:()=>n}}var IJt=(t,i)=>t?t+aW(i):i,LAe=(t,i)=>Al(i)&&t!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function QXe(t,i,e){if(Object.prototype.hasOwnProperty.call(t,i)||i==="constructor")return t[i];let n=e();return t[i]=n,n}function TJt(t,i,e){let{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=t,c=n[i];return hI(c)&&a.isScriptable(i)&&(c=EJt(i,c,t,e)),Gd(c)&&c.length&&(c=AJt(i,c,t,a.isIndexable)),LAe(i,c)&&(c=J2(c,r,o&&o[i],a)),c}function EJt(t,i,e,n){let{_proxy:r,_context:o,_subProxy:a,_stack:c}=e;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);c.add(t);let m=i(o,a||n);return c.delete(t),LAe(t,m)&&(m=BAe(r._scopes,r,t,m)),m}function AJt(t,i,e,n){let{_proxy:r,_context:o,_subProxy:a,_descriptors:c}=e;if(typeof o.index<"u"&&n(t))return i[o.index%i.length];if(Al(i[0])){let m=i,g=r._scopes.filter(C=>C!==m);i=[];for(let C of m){let w=BAe(g,r,t,C);i.push(J2(w,o,a&&a[t],c))}}return i}function ZXe(t,i,e){return hI(t)?t(i,e):t}var DJt=(t,i)=>t===!0?i:typeof t=="string"?gI(i,t):void 0;function kJt(t,i,e,n,r){for(let o of i){let a=DJt(e,o);if(a){t.add(a);let c=ZXe(a._fallback,e,r);if(typeof c<"u"&&c!==e&&c!==n)return c}else if(a===!1&&typeof n<"u"&&e!==n)return null}return!1}function BAe(t,i,e,n){let r=i._rootScopes,o=ZXe(i._fallback,e,n),a=[...t,...r],c=new Set;c.add(n);let m=PXe(c,a,e,o||e,n);return m===null||typeof o<"u"&&o!==e&&(m=PXe(c,a,o,m,n),m===null)?!1:mW(Array.from(c),[""],r,o,()=>MJt(i,e,n))}function PXe(t,i,e,n,r){for(;e;)e=kJt(t,i,e,n,r);return e}function MJt(t,i,e){let n=t._getTarget();i in n||(n[i]={});let r=n[i];return Gd(r)&&Al(e)?e:r||{}}function OJt(t,i,e,n){let r;for(let o of i)if(r=XXe(IJt(o,t),e),typeof r<"u")return LAe(t,r)?BAe(e,n,t,r):r}function XXe(t,i){for(let e of i){if(!e)continue;let n=e[t];if(typeof n<"u")return n}}function NXe(t){let i=t._keys;return i||(i=t._keys=RJt(t._scopes)),i}function RJt(t){let i=new Set;for(let e of t)for(let n of Object.keys(e).filter(r=>!r.startsWith("_")))i.add(n);return Array.from(i)}function Pde(t,i,e,n){let{iScale:r}=t,{key:o="r"}=this._parsing,a=new Array(n),c,m,g,C;for(c=0,m=n;cit==="x"?"y":"x";function eJe(t,i,e,n){let r=t.skip?i:t,o=i,a=e.skip?i:e,c=oW(o,r),m=oW(a,o),g=c/(c+m),C=m/(c+m);g=isNaN(g)?0:g,C=isNaN(C)?0:C;let w=n*g,P=n*C;return{previous:{x:o.x-w*(a.x-r.x),y:o.y-w*(a.y-r.y)},next:{x:o.x+P*(a.x-r.x),y:o.y+P*(a.y-r.y)}}}function NJt(t,i,e){let n=t.length,r,o,a,c,m,g=M6(t,0);for(let C=0;C!g.skip)),i.cubicInterpolationMode==="monotone")tJe(t,r);else{let g=n?t[t.length-1]:t[0];for(o=0,a=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);function iJe(t,i){return Nde(t).getPropertyValue(i)}var BJt=["top","right","bottom","left"];function kL(t,i,e){let n={};e=e?"-"+e:"";for(let r=0;r<4;r++){let o=BJt[r];n[o]=parseFloat(t[i+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var VJt=(t,i,e)=>(t>0||i>0)&&(!e||!e.shadowRoot);function zJt(t,i){let e=t.touches,n=e&&e.length?e[0]:t,{offsetX:r,offsetY:o}=n,a=!1,c,m;if(VJt(r,o,t.target))c=r,m=o;else{let g=i.getBoundingClientRect();c=n.clientX-g.left,m=n.clientY-g.top,a=!0}return{x:c,y:m,box:a}}function AA(t,i){if("native"in t)return t;let{canvas:e,currentDevicePixelRatio:n}=i,r=Nde(e),o=r.boxSizing==="border-box",a=kL(r,"padding"),c=kL(r,"border","width"),{x:m,y:g,box:C}=zJt(t,e),w=a.left+(C&&c.left),P=a.top+(C&&c.top),{width:R,height:z}=i;return o&&(R-=a.width+c.width,z-=a.height+c.height),{x:Math.round((m-w)/R*e.width/n),y:Math.round((g-P)/z*e.height/n)}}function UJt(t,i,e){let n,r;if(i===void 0||e===void 0){let o=t&&fW(t);if(!o)i=t.clientWidth,e=t.clientHeight;else{let a=o.getBoundingClientRect(),c=Nde(o),m=kL(c,"border","width"),g=kL(c,"padding");i=a.width-g.width-m.width,e=a.height-g.height-m.height,n=hde(c.maxWidth,o,"clientWidth"),r=hde(c.maxHeight,o,"clientHeight")}}return{width:i,height:e,maxWidth:n||rW,maxHeight:r||rW}}var ude=t=>Math.round(t*10)/10;function zAe(t,i,e,n){let r=Nde(t),o=kL(r,"margin"),a=hde(r.maxWidth,t,"clientWidth")||rW,c=hde(r.maxHeight,t,"clientHeight")||rW,m=UJt(t,i,e),{width:g,height:C}=m;if(r.boxSizing==="content-box"){let P=kL(r,"border","width"),R=kL(r,"padding");g-=R.width+P.width,C-=R.height+P.height}return g=Math.max(0,g-o.width),C=Math.max(0,n?g/n:C-o.height),g=ude(Math.min(g,a,m.maxWidth)),C=ude(Math.min(C,c,m.maxHeight)),g&&!C&&(C=ude(g/2)),(i!==void 0||e!==void 0)&&n&&m.height&&C>m.height&&(C=m.height,g=ude(Math.floor(C*n))),{width:g,height:C}}function Fde(t,i,e){let n=i||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let a=t.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||a.height!==r||a.width!==o?(t.currentDevicePixelRatio=n,a.height=r,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}var UAe=(function(){let t=!1;try{let i={get passive(){return t=!0,!1}};hW()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return t})();function Lde(t,i){let e=iJe(t,i),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function wA(t,i,e,n){return{x:t.x+e*(i.x-t.x),y:t.y+e*(i.y-t.y)}}function HAe(t,i,e,n){return{x:t.x+e*(i.x-t.x),y:n==="middle"?e<.5?t.y:i.y:n==="after"?e<1?t.y:i.y:e>0?i.y:t.y}}function GAe(t,i,e,n){let r={x:t.cp2x,y:t.cp2y},o={x:i.cp1x,y:i.cp1y},a=wA(t,r,e),c=wA(r,o,e),m=wA(o,i,e),g=wA(a,c,e),C=wA(c,m,e);return wA(g,C,e)}var HJt=function(t,i){return{x(e){return t+t+i-e},setWidth(e){i=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},GJt=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,i){return t+i},leftForLtr(t,i){return t}}};function iO(t,i,e){return t?HJt(i,e):GJt()}function Bde(t,i){let e,n;(i==="ltr"||i==="rtl")&&(e=t.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",i,"important"),t.prevTextDirection=n)}function Vde(t,i){i!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",i[0],i[1]))}function nJe(t){return t==="angle"?{between:PL,compare:$Xe,normalize:hf}:{between:T1,compare:(i,e)=>i-e,normalize:i=>i}}function FXe({start:t,end:i,count:e,loop:n,style:r}){return{start:t%e,end:i%e,loop:n&&(i-t+1)%e===0,style:r}}function jJt(t,i,e){let{property:n,start:r,end:o}=e,{between:a,normalize:c}=nJe(n),m=i.length,{start:g,end:C,loop:w}=t,P,R;if(w){for(g+=m,C+=m,P=0,R=m;Pm(r,me,K)&&c(r,me)!==0,Ie=()=>c(o,K)===0||m(o,me,K),ye=()=>H||Te(),fe=()=>!H||Ie();for(let Re=C,Ae=C;Re<=w;++Re)ne=i[Re%a],!ne.skip&&(K=g(ne[n]),K!==me&&(H=m(K,r,o),j===null&&ye()&&(j=c(K,r)===0?Re:Ae),j!==null&&fe()&&(z.push(FXe({start:j,end:Re,loop:P,count:a,style:R})),j=null),Ae=Re,me=K));return j!==null&&z.push(FXe({start:j,end:w,loop:P,count:a,style:R})),z}function Ude(t,i){let e=[],n=t.segments;for(let r=0;rr&&t[o%i].skip;)o--;return o%=i,{start:r,end:o}}function qJt(t,i,e,n){let r=t.length,o=[],a=i,c=t[i],m;for(m=i+1;m<=e;++m){let g=t[m%r];g.skip||g.stop?c.skip||(n=!1,o.push({start:i%r,end:(m-1)%r,loop:n}),i=a=g.stop?m:null):(a=m,c.skip&&(i=m)),c=g}return a!==null&&o.push({start:i%r,end:a%r,loop:n}),o}function jAe(t,i){let e=t.points,n=t.options.spanGaps,r=e.length;if(!r)return[];let o=!!t._loop,{start:a,end:c}=$Jt(e,r,o,n);if(n===!0)return LXe(t,[{start:a,end:c,loop:o}],e,i);let m=cc({chart:i,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Sde.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let e=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let o=n.items,a=o.length-1,c=!1,m;for(;a>=0;--a)m=o[a],m._active?(m._total>n.duration&&(n.duration=m._total),m.tick(i),c=!0):(o[a]=o[o.length-1],o.pop());c&&(r.draw(),this._notify(r,n,i,"progress")),o.length||(n.running=!1,this._notify(r,n,i,"complete"),n.initial=!1),e+=o.length}),this._lastDate=i,e===0&&(this._running=!1)}_getAnims(i){let e=this._charts,n=e.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(i,n)),n}listen(i,e,n){this._getAnims(i).listeners[e].push(n)}add(i,e){!e||!e.length||this._getAnims(i).items.push(...e)}has(i){return this._getAnims(i).items.length>0}start(i){let e=this._charts.get(i);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(i){if(!this._running)return!1;let e=this._charts.get(i);return!(!e||!e.running||!e.items.length)}stop(i){let e=this._charts.get(i);if(!e||!e.items.length)return;let n=e.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();e.items=[],this._notify(i,e,Date.now(),"complete")}remove(i){return this._charts.delete(i)}},DA=new iDe,rJe="transparent",QJt={boolean(t,i,e){return e>.5?i:t},color(t,i,e){let n=Ade(t||rJe),r=n.valid&&Ade(i||rJe);return r&&r.valid?r.mix(n,e).hexString():i},number(t,i,e){return t+(i-t)*e}},nDe=class{constructor(i,e,n,r){let o=e[n];r=Ad([i.to,r,o,i.from]);let a=Ad([i.from,o,r]);this._active=!0,this._fn=i.fn||QJt[i.type||typeof a],this._easing=DL[i.easing]||DL.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=e,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(i,e,n){if(this._active){this._notify(!1);let r=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=Ad([i.to,e,r,i.from]),this._from=Ad([i.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let e=i-this._start,n=this._duration,r=this._prop,o=this._from,a=this._loop,c=this._to,m;if(this._active=o!==c&&(a||e1?2-m:m,m=this._easing(Math.min(1,Math.max(0,m))),this._target[r]=this._fn(o,c,m)}wait(){let i=this._promises||(this._promises=[]);return new Promise((e,n)=>{i.push({res:e,rej:n})})}_notify(i){let e=i?"res":"rej",n=this._promises||[];for(let r=0;r{let o=i[r];if(!Al(o))return;let a={};for(let c of e)a[c]=o[c];(Gd(o.properties)&&o.properties||[r]).forEach(c=>{(c===r||!n.has(c))&&n.set(c,a)})})}_animateOptions(i,e){let n=e.options,r=XJt(i,n);if(!r)return[];let o=this._createAnimations(r,n);return n.$shared&&ZJt(i.options.$animations,n).then(()=>{i.options=n},()=>{}),o}_createAnimations(i,e){let n=this._properties,r=[],o=i.$animations||(i.$animations={}),a=Object.keys(e),c=Date.now(),m;for(m=a.length-1;m>=0;--m){let g=a[m];if(g.charAt(0)==="$")continue;if(g==="options"){r.push(...this._animateOptions(i,e));continue}let C=e[g],w=o[g],P=n.get(g);if(w)if(P&&w.active()){w.update(P,C,c);continue}else w.cancel();if(!P||!P.duration){i[g]=C;continue}o[g]=w=new nDe(P,i,g,C),r.push(w)}return r}update(i,e){if(this._properties.size===0){Object.assign(i,e);return}let n=this._createAnimations(i,e);if(n.length)return DA.add(this._chart,n),!0}};function ZJt(t,i){let e=[],n=Object.keys(i);for(let r=0;r0||!e&&o<0)return r.index}return null}function lJe(t,i){let{chart:e,_cachedMeta:n}=t,r=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:c}=n,m=o.axis,g=a.axis,C=iei(o,a,n),w=i.length,P;for(let R=0;Re[n].axis===i).shift()}function oei(t,i){return _I(t,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}function aei(t,i,e){return _I(t,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:e,index:i,mode:"default",type:"data"})}function gW(t,i){let e=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){i=i||t._parsed;for(let r of i){let o=r._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}var YAe=t=>t==="reset"||t==="none",cJe=(t,i)=>i?t:Object.assign({},t),sei=(t,i,e)=>t&&!i.hidden&&i._stacked&&{keys:ret(e,!0),values:null},rO=(()=>{class t{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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=$Ae(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&&gW(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(P,R,z,H)=>P==="x"?R:P==="r"?H:z,a=n.xAxisID=fs(r.xAxisID,qAe(e,"x")),c=n.yAxisID=fs(r.yAxisID,qAe(e,"y")),m=n.rAxisID=fs(r.rAxisID,qAe(e,"r")),g=n.indexAxis,C=n.iAxisID=o(g,a,c,m),w=n.vAxisID=o(g,c,a,m);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(c),n.rScale=this.getScaleForId(m),n.iScale=this.getScaleForId(C),n.vScale=this.getScaleForId(w)}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 n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&Cde(this._data,this),e._stacked&&gW(e)}_dataCheck(){let e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(Al(n)){let o=this._cachedMeta;this._data=tei(n,o)}else if(r!==n){if(r){Cde(r,this);let o=this._cachedMeta;gW(o),o._parsed=[]}n&&Object.isExtensible(n)&&kAe(n,this),this._syncList=[],this._data=n}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let a=n._stacked;n._stacked=$Ae(n.vScale,n),n.stack!==r.stack&&(o=!0,gW(n),n.stack=r.stack),this._resyncElements(e),(o||a!==n._stacked)&&(lJe(this,n._parsed),n._stacked=$Ae(n.vScale,n))}configure(){let e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){let{_cachedMeta:r,_data:o}=this,{iScale:a,_stacked:c}=r,m=a.axis,g=e===0&&n===o.length?!0:r._sorted,C=e>0&&r._parsed[e-1],w,P,R;if(this._parsing===!1)r._parsed=o,r._sorted=!0,R=o;else{Gd(o[e])?R=this.parseArrayData(r,o,e,n):Al(o[e])?R=this.parseObjectData(r,o,e,n):R=this.parsePrimitiveData(r,o,e,n);let z=()=>P[m]===null||C&&P[m]j||P=0;--R)if(!H()){this.updateRangeFromParsed(C,e,z,g);break}}return C}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],o,a,c;for(o=0,a=n.length;o=0&&ethis.getContext(r,o,n),j=C.resolveNamedOptions(R,z,H,P);return j.$shared&&(j.$shared=g,a[c]=Object.freeze(cJe(j,g))),j}_resolveAnimations(e,n,r){let o=this.chart,a=this._cachedDataOpts,c=`animation-${n}`,m=a[c];if(m)return m;let g;if(o.options.animation!==!1){let w=this.chart.config,P=w.datasetAnimationScopeKeys(this._type,n),R=w.getOptionScopes(this.getDataset(),P);g=w.createResolver(R,this.getContext(e,r,n))}let C=new Zde(o,g&&g.animations);return g&&g._cacheable&&(a[c]=Object.freeze(C)),C}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||YAe(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){let r=this.resolveDataElementOptions(e,n),o=this._sharedOptions,a=this.getSharedOptions(r),c=this.includeOptions(n,a)||a!==o;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:c}}updateElement(e,n,r,o){YAe(o)?Object.assign(e,r):this._resolveAnimations(n,o).update(e,r)}updateSharedOptions(e,n,r){e&&!YAe(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,o){e.active=o;let a=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(e,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"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 n=this._data,r=this._cachedMeta.data;for(let[m,g,C]of this._syncList)this[m](g,C);this._syncList=[];let o=r.length,a=n.length,c=Math.min(a,o);c&&this.parse(0,c),a>o?this._insertElements(o,a-o,e):a{for(C.length+=n,m=C.length-1;m>=c;m--)C[m]=C[m-n]};for(g(a),m=e;mr-o))}return t._cache.$bar}function cei(t){let i=t.iScale,e=lei(i,t.type),n=i._length,r,o,a,c,m=()=>{a===32767||a===-32768||(OL(c)&&(n=Math.min(n,Math.abs(a-c)||n)),c=a)};for(r=0,o=e.length;r0?r[t-1]:null,c=tMath.abs(c)&&(m=c,g=a),i[e.axis]=g,i._custom={barStart:m,barEnd:g,start:r,end:o,min:a,max:c}}function oet(t,i,e,n){return Gd(t)?pei(t,i,e,n):i[e.axis]=e.parse(t,n),i}function dJe(t,i,e,n){let r=t.iScale,o=t.vScale,a=r.getLabels(),c=r===o,m=[],g,C,w,P;for(g=e,C=e+n;g=e?1:-1)}function hei(t){let i,e,n,r,o;return t.horizontal?(i=t.base>t.x,e="left",n="right"):(i=t.base{class t extends rO{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,n,r,o){return dJe(e,n,r,o)}parseArrayData(e,n,r,o){return dJe(e,n,r,o)}parseObjectData(e,n,r,o){let{iScale:a,vScale:c}=e,{xAxisKey:m="x",yAxisKey:g="y"}=this._parsing,C=a.axis==="x"?m:g,w=c.axis==="x"?m:g,P=[],R,z,H,j;for(R=r,z=r+o;Rw.controller.options.grouped),a=r.options.stacked,c=[],m=this._cachedMeta.controller.getParsed(n),g=m&&m[r.axis],C=w=>{let P=w._parsed.find(z=>z[r.axis]===g),R=P&&P[w.vScale.axis];if(al(R)||isNaN(R))return!0};for(let w of o)if(!(n!==void 0&&C(w))&&((a===!1||c.indexOf(w.stack)===-1||a===void 0&&w.stack===void 0)&&c.push(w.stack),w.index===e))break;return c.length||c.push(void 0),c}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===n).shift()}_getAxis(){let e={},n=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)e[fs(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,r){let o=this._getStacks(e,r),a=n!==void 0?o.indexOf(n):-1;return a===-1?o.length-1:a}_getRuler(){let e=this.options,n=this._cachedMeta,r=n.iScale,o=[],a,c;for(a=0,c=n.data.length;a{class t extends rO{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,n,r,o){let a=super.parsePrimitiveData(e,n,r,o);for(let c=0;c=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:o,yScale:a}=n,c=this.getParsed(e),m=o.getLabelForValue(c.x),g=a.getLabelForValue(c.y),C=c._custom;return{label:r[e]||"",value:"("+m+", "+g+(C?", "+C:"")+")"}}update(e){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,o){let a=o==="reset",{iScale:c,vScale:m}=this._cachedMeta,{sharedOptions:g,includeOptions:C}=this._getSharedOptions(n,o),w=c.axis,P=m.axis;for(let R=n;RPL(me,c,m,!0)?1:Math.max(Te,Te*e,Ie,Ie*e),z=(me,Te,Ie)=>PL(me,c,m,!0)?-1:Math.min(Te,Te*e,Ie,Ie*e),H=R(0,g,w),j=R(ap,C,P),K=z(vc,g,w),ne=z(vc+ap,C,P);n=(H-K)/2,r=(j-ne)/2,o=-(H+K)/2,a=-(j+ne)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:a}}var CDe=(()=>{class t extends rO{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 n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=e.legend.options;return n.labels.map((a,c)=>{let g=e.getDatasetMeta(0).controller.getStyle(c);return{text:a,fillStyle:g.backgroundColor,strokeStyle:g.borderColor,fontColor:o,lineWidth:g.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(c),index:c}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let a=g=>+r[g];if(Al(r[e])){let{key:g="value"}=this._parsing;a=C=>+gI(r[C],g)}let c,m;for(c=e,m=e+n;c0&&!isNaN(e)?jd*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],a=NL(n._parsed[e],r.options.locale);return{label:o[e]||"",value:a}}getMaxBorderWidth(e){let n=0,r=this.chart,o,a,c,m,g;if(!e){for(o=0,a=r.data.datasets.length;o{class t extends rO{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 n=this._cachedMeta,{dataset:r,data:o=[],_dataset:a}=n,c=this.chart._animationsDisabled,{start:m,count:g}=Ide(n,o,c);this._drawStart=m,this._drawCount=g,Tde(n)&&(m=0,g=o.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=o;let C=this.resolveDatasetElementOptions(e);this.options.showLine||(C.borderWidth=0),C.segment=this.options.segment,this.updateElement(r,void 0,{animated:!c,options:C},e),this.updateElements(o,m,g,e)}updateElements(e,n,r,o){let a=o==="reset",{iScale:c,vScale:m,_stacked:g,_dataset:C}=this._cachedMeta,{sharedOptions:w,includeOptions:P}=this._getSharedOptions(n,o),R=c.axis,z=m.axis,{spanGaps:H,segment:j}=this.options,K=eO(H)?H:Number.POSITIVE_INFINITY,ne=this.chart._animationsDisabled||a||o==="none",me=n+r,Te=e.length,Ie=n>0&&this.getParsed(n-1);for(let ye=0;ye=me){Re.skip=!0;continue}let Ae=this.getParsed(ye),ke=al(Ae[z]),Qe=Re[R]=c.getPixelForValue(Ae[R],ye),we=Re[z]=a||ke?m.getBasePixel():m.getPixelForValue(g?this.applyStack(m,Ae,g):Ae[z],ye);Re.skip=isNaN(Qe)||isNaN(we)||ke,Re.stop=ye>0&&Math.abs(Ae[R]-Ie[R])>K,j&&(Re.parsed=Ae,Re.raw=C.data[ye]),P&&(Re.options=w||this.resolveDataElementOptions(ye,fe.active?"active":o)),ne||this.updateElement(fe,ye,Re,o),Ie=Ae}}getMaxOverflow(){let e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,o=e.data||[];if(!o.length)return r;let a=o[0].size(this.resolveDataElementOptions(0)),c=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(r,a,c)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}return t})(),aet=(()=>{class t extends rO{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 n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=e.legend.options;return n.labels.map((a,c)=>{let g=e.getDatasetMeta(0).controller.getStyle(c);return{text:a,fillStyle:g.backgroundColor,strokeStyle:g.borderColor,fontColor:o,lineWidth:g.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(c),index:c}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],a=NL(n._parsed[e].r,r.options.locale);return{label:o[e]||"",value:a}}parseObjectData(e,n,r,o){return Pde.bind(this)(e,n,r,o)}update(e){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){let e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(an.max&&(n.max=a))}),n}_updateRadius(){let e=this.chart,n=e.chartArea,r=e.options,o=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(o/2,0),c=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),m=(a-c)/e.getVisibleDatasetCount();this.outerRadius=a-m*this.index,this.innerRadius=this.outerRadius-m}updateElements(e,n,r,o){let a=o==="reset",c=this.chart,g=c.options.animation,C=this._cachedMeta.rScale,w=C.xCenter,P=C.yCenter,R=C.getIndexAngle(0)-.5*vc,z=R,H,j=360/this.countVisibleElements();for(H=0;H{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Jv(this.resolveDataElementOptions(e,n).angle||r):0}}return t})(),xei=(()=>{class t extends CDe{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return t})(),Sei=(()=>{class t extends rO{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 n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,o){return Pde.bind(this)(e,n,r,o)}update(e){let n=this._cachedMeta,r=n.dataset,o=n.data||[],a=n.iScale.getLabels();if(r.points=o,e!=="resize"){let c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0);let m={_loop:!0,_fullLoop:a.length===o.length,options:c};this.updateElement(r,void 0,m,e)}this.updateElements(o,0,o.length,e)}updateElements(e,n,r,o){let a=this._cachedMeta.rScale,c=o==="reset";for(let m=n;m{class t extends rO{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 n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:o,yScale:a}=n,c=this.getParsed(e),m=o.getLabelForValue(c.x),g=a.getLabelForValue(c.y);return{label:r[e]||"",value:"("+m+", "+g+")"}}update(e){let n=this._cachedMeta,{data:r=[]}=n,o=this.chart._animationsDisabled,{start:a,count:c}=Ide(n,r,o);if(this._drawStart=a,this._drawCount=c,Tde(n)&&(a=0,c=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:m,_dataset:g}=n;m._chart=this.chart,m._datasetIndex=this.index,m._decimated=!!g._decimated,m.points=r;let C=this.resolveDatasetElementOptions(e);C.segment=this.options.segment,this.updateElement(m,void 0,{animated:!o,options:C},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,a,c,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,o){let a=o==="reset",{iScale:c,vScale:m,_stacked:g,_dataset:C}=this._cachedMeta,w=this.resolveDataElementOptions(n,o),P=this.getSharedOptions(w),R=this.includeOptions(o,P),z=c.axis,H=m.axis,{spanGaps:j,segment:K}=this.options,ne=eO(j)?j:Number.POSITIVE_INFINITY,me=this.chart._animationsDisabled||a||o==="none",Te=n>0&&this.getParsed(n-1);for(let Ie=n;Ie0&&Math.abs(fe[z]-Te[z])>ne,K&&(Re.parsed=fe,Re.raw=C.data[Ie]),R&&(Re.options=P||this.resolveDataElementOptions(Ie,ye.active?"active":o)),me||this.updateElement(ye,Ie,Re,o),Te=fe}this.updateSharedOptions(P,o,w)}getMaxOverflow(){let e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let m=0;for(let g=n.length-1;g>=0;--g)m=Math.max(m,n[g].size(this.resolveDataElementOptions(g))/2);return m>0&&m}let r=e.dataset,o=r.options&&r.options.borderWidth||0;if(!n.length)return o;let a=n[0].size(this.resolveDataElementOptions(0)),c=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,a,c)/2}}return t})(),Iei=Object.freeze({__proto__:null,BarController:yei,BubbleController:vei,DoughnutController:CDe,LineController:Cei,PieController:xei,PolarAreaController:aet,RadarController:Sei,ScatterController:wei});function LL(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var rDe=class t{static override(i){Object.assign(t.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return LL()}parse(){return LL()}format(){return LL()}add(){return LL()}diff(){return LL()}startOf(){return LL()}endOf(){return LL()}},Tei={_date:rDe};function Eei(t,i,e,n){let{controller:r,data:o,_sorted:a}=t,c=r._cachedMeta.iScale,m=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&i===c.axis&&i!=="r"&&a&&o.length){let g=c._reversePixels?AAe:S1;if(n){if(r._sharedOptions){let C=o[0],w=typeof C.getRange=="function"&&C.getRange(i);if(w){let P=g(o,i,e-w),R=g(o,i,e+w);return{lo:P.lo,hi:R.hi}}}}else{let C=g(o,i,e);if(m){let{vScale:w}=r._cachedMeta,{_parsed:P}=t,R=P.slice(0,C.lo+1).reverse().findIndex(H=>!al(H[w.axis]));C.lo-=Math.max(0,R);let z=P.slice(C.hi).findIndex(H=>!al(H[w.axis]));C.hi+=Math.max(0,z)}return C}}return{lo:0,hi:o.length-1}}function AW(t,i,e,n,r){let o=t.getSortedVisibleDatasetMetas(),a=e[i];for(let c=0,m=o.length;c{m[a]&&m[a](i[e],r)&&(o.push({element:m,datasetIndex:g,index:C}),c=c||m.inRange(i.x,i.y,r))}),n&&!c?[]:o}var Mei={evaluateInteractionItems:AW,modes:{index(t,i,e,n){let r=AA(i,t),o=e.axis||"x",a=e.includeInvisible||!1,c=e.intersect?WAe(t,r,o,n,a):QAe(t,r,o,!1,n,a),m=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(g=>{let C=c[0].index,w=g.data[C];w&&!w.skip&&m.push({element:w,datasetIndex:g.index,index:C})}),m):[]},dataset(t,i,e,n){let r=AA(i,t),o=e.axis||"xy",a=e.includeInvisible||!1,c=e.intersect?WAe(t,r,o,n,a):QAe(t,r,o,!1,n,a);if(c.length>0){let m=c[0].datasetIndex,g=t.getDatasetMeta(m).data;c=[];for(let C=0;Ce.pos===i)}function hJe(t,i){return t.filter(e=>set.indexOf(e.pos)===-1&&e.box.axis===i)}function yW(t,i){return t.sort((e,n)=>{let r=i?n:e,o=i?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function Oei(t){let i=[],e,n,r,o,a,c;for(e=0,n=(t||[]).length;eg.box.fullSize),!0),n=yW(_W(i,"left"),!0),r=yW(_W(i,"right")),o=yW(_W(i,"top"),!0),a=yW(_W(i,"bottom")),c=hJe(i,"x"),m=hJe(i,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:r.concat(m).concat(a).concat(c),chartArea:_W(i,"chartArea"),vertical:n.concat(r).concat(m),horizontal:o.concat(a).concat(c)}}function fJe(t,i,e,n){return Math.max(t[e],i[e])+Math.max(t[n],i[n])}function cet(t,i){t.top=Math.max(t.top,i.top),t.left=Math.max(t.left,i.left),t.bottom=Math.max(t.bottom,i.bottom),t.right=Math.max(t.right,i.right)}function Fei(t,i,e,n){let{pos:r,box:o}=e,a=t.maxPadding;if(!Al(r)){e.size&&(t[r]-=e.size);let w=n[e.stack]||{size:0,count:1};w.size=Math.max(w.size,e.horizontal?o.height:o.width),e.size=w.size/w.count,t[r]+=e.size}o.getPadding&&cet(a,o.getPadding());let c=Math.max(0,i.outerWidth-fJe(a,t,"left","right")),m=Math.max(0,i.outerHeight-fJe(a,t,"top","bottom")),g=c!==t.w,C=m!==t.h;return t.w=c,t.h=m,e.horizontal?{same:g,other:C}:{same:C,other:g}}function Lei(t){let i=t.maxPadding;function e(n){let r=Math.max(i[n]-t[n],0);return t[n]+=r,r}t.y+=e("top"),t.x+=e("left"),e("right"),e("bottom")}function Bei(t,i){let e=i.maxPadding;function n(r){let o={left:0,top:0,right:0,bottom:0};return r.forEach(a=>{o[a]=Math.max(i[a],e[a])}),o}return n(t?["left","right"]:["top","bottom"])}function CW(t,i,e,n){let r=[],o,a,c,m,g,C;for(o=0,a=t.length,g=0;o{typeof H.beforeLayout=="function"&&H.beforeLayout()});let C=m.reduce((H,j)=>j.box.options&&j.box.options.display===!1?H:H+1,0)||1,w=Object.freeze({outerWidth:i,outerHeight:e,padding:r,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/C,hBoxMaxHeight:a/2}),P=Object.assign({},r);cet(P,Ym(n));let R=Object.assign({maxPadding:P,w:o,h:a,x:r.left,y:r.top},r),z=Pei(m.concat(g),w);CW(c.fullSize,R,w,z),CW(m,R,w,z),CW(g,R,w,z)&&CW(m,R,w,z),Lei(R),gJe(c.leftAndTop,R,w,z),R.x+=R.w,R.y+=R.h,gJe(c.rightAndBottom,R,w,z),t.chartArea={left:R.left,top:R.top,right:R.left+R.w,bottom:R.top+R.h,height:R.h,width:R.w},Uc(c.chartArea,H=>{let j=H.box;Object.assign(j,t.chartArea),j.update(R.w,R.h,{left:0,top:0,right:0,bottom:0})})}},Xde=class{acquireContext(i,e){}releaseContext(i){return!1}addEventListener(i,e,n){}removeEventListener(i,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,e,n,r){return e=Math.max(0,e||i.width),n=n||i.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}isAttached(i){return!0}updateConfig(i){}},oDe=class extends Xde{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}},Wde="$chartjs",Vei={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},_Je=t=>t===null||t==="";function zei(t,i){let e=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[Wde]={initial:{height:n,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",_Je(r)){let o=Lde(t,"width");o!==void 0&&(t.width=o)}if(_Je(n))if(t.style.height==="")t.height=t.width/(i||2);else{let o=Lde(t,"height");o!==void 0&&(t.height=o)}return t}var det=UAe?{passive:!0}:!1;function Uei(t,i,e){t&&t.addEventListener(i,e,det)}function Hei(t,i,e){t&&t.canvas&&t.canvas.removeEventListener(i,e,det)}function Gei(t,i){let e=Vei[t.type]||t.type,{x:n,y:r}=AA(t,i);return{type:e,chart:i,native:t,x:n!==void 0?n:null,y:r!==void 0?r:null}}function Jde(t,i){for(let e of t)if(e===i||e.contains(i))return!0}function jei(t,i,e){let n=t.canvas,r=new MutationObserver(o=>{let a=!1;for(let c of o)a=a||Jde(c.addedNodes,n),a=a&&!Jde(c.removedNodes,n);a&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function $ei(t,i,e){let n=t.canvas,r=new MutationObserver(o=>{let a=!1;for(let c of o)a=a||Jde(c.removedNodes,n),a=a&&!Jde(c.addedNodes,n);a&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}var SW=new Map,yJe=0;function uet(){let t=window.devicePixelRatio;t!==yJe&&(yJe=t,SW.forEach((i,e)=>{e.currentDevicePixelRatio!==t&&i()}))}function qei(t,i){SW.size||window.addEventListener("resize",uet),SW.set(t,i)}function Yei(t){SW.delete(t),SW.size||window.removeEventListener("resize",uet)}function Kei(t,i,e){let n=t.canvas,r=n&&fW(n);if(!r)return;let o=wde((c,m)=>{let g=r.clientWidth;e(c,m),g{let m=c[0],g=m.contentRect.width,C=m.contentRect.height;g===0&&C===0||o(g,C)});return a.observe(r),qei(t,o),a}function ZAe(t,i,e){e&&e.disconnect(),i==="resize"&&Yei(t)}function Wei(t,i,e){let n=t.canvas,r=wde(o=>{t.ctx!==null&&e(Gei(o,t))},t);return Uei(n,i,r),r}var aDe=class extends Xde{acquireContext(i,e){let n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(zei(i,e),n):null}releaseContext(i){let e=i.canvas;if(!e[Wde])return!1;let n=e[Wde].initial;["height","width"].forEach(o=>{let a=n[o];al(a)?e.removeAttribute(o):e.setAttribute(o,a)});let r=n.style||{};return Object.keys(r).forEach(o=>{e.style[o]=r[o]}),e.width=e.width,delete e[Wde],!0}addEventListener(i,e,n){this.removeEventListener(i,e);let r=i.$proxies||(i.$proxies={}),a={attach:jei,detach:$ei,resize:Kei}[e]||Wei;r[e]=a(i,e,n)}removeEventListener(i,e){let n=i.$proxies||(i.$proxies={}),r=n[e];if(!r)return;({attach:ZAe,detach:ZAe,resize:ZAe}[e]||Hei)(i,e,r),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,e,n,r){return zAe(i,e,n,r)}isAttached(i){let e=i&&fW(i);return!!(e&&e.isConnected)}};function Qei(t){return!hW()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?oDe:aDe}var E1=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){let{x:e,y:n}=this.getProps(["x","y"],i);return{x:e,y:n}}hasValue(){return eO(this.x)&&eO(this.y)}getProps(i,e){let n=this.$animations;if(!e||!n)return this;let r={};return i.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};function Zei(t,i){let e=t.options.ticks,n=Xei(t),r=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?eti(i):[],a=o.length,c=o[0],m=o[a-1],g=[];if(a>r)return tti(i,g,o,a/r),g;let C=Jei(o,i,r);if(a>0){let w,P,R=a>1?Math.round((m-c)/(a-1)):null;for(jde(i,g,C,al(R)?0:c-R,c),w=0,P=a-1;wr)return m}return Math.max(r,1)}function eti(t){let i=[],e,n;for(e=0,n=t.length;et==="left"?"right":t==="right"?"left":t,vJe=(t,i,e)=>i==="top"||i==="left"?t[i]+e:t[i]-e,bJe=(t,i)=>Math.min(i||t,t);function CJe(t,i){let e=[],n=t.length/i,r=t.length,o=0;for(;oa+c)))return m}function oti(t,i){Uc(t,e=>{let n=e.gc,r=n.length/2,o;if(r>i){for(o=0;on?n:e,n=r&&e>n?e:n,{min:v0(e,v0(n,e)),max:v0(n,v0(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ad(this.options.beforeUpdate,[this])}update(i,e,n){let{beginAtZero:r,grace:o,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=FAe(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let m=c=o||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let C=this._getLabelSizes(),w=C.widest.width,P=C.highest.height,R=qm(this.chart.width-w,0,this.maxWidth);c=i.offset?this.maxWidth/n:R/(n-1),w+6>c&&(c=R/(n-(i.offset?.5:1)),m=this.maxHeight-vW(i.grid)-e.padding-xJe(i.title,this.chart.options.font),g=Math.sqrt(w*w+P*P),a=sW(Math.min(Math.asin(qm((C.highest.height+6)/c,-1,1)),Math.asin(qm(m/g,-1,1))-Math.asin(qm(P/g,-1,1)))),a=Math.max(r,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ad(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ad(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:o}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){let m=xJe(r,e.options.font);if(c?(i.width=this.maxWidth,i.height=vW(o)+m):(i.height=this.maxHeight,i.width=vW(o)+m),n.display&&this.ticks.length){let{first:g,last:C,widest:w,highest:P}=this._getLabelSizes(),R=n.padding*2,z=Jv(this.labelRotation),H=Math.cos(z),j=Math.sin(z);if(c){let K=n.mirror?0:j*w.width+H*P.height;i.height=Math.min(this.maxHeight,i.height+K+R)}else{let K=n.mirror?0:H*w.width+j*P.height;i.width=Math.min(this.maxWidth,i.width+K+R)}this._calculatePadding(g,C,j,H)}}this._handleMargins(),c?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,e,n,r){let{ticks:{align:o,padding:a},position:c}=this.options,m=this.labelRotation!==0,g=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let C=this.getPixelForTick(0)-this.left,w=this.right-this.getPixelForTick(this.ticks.length-1),P=0,R=0;m?g?(P=r*i.width,R=n*e.height):(P=n*i.height,R=r*e.width):o==="start"?R=e.width:o==="end"?P=i.width:o!=="inner"&&(P=i.width/2,R=e.width/2),this.paddingLeft=Math.max((P-C+a)*this.width/(this.width-C),0),this.paddingRight=Math.max((R-w+a)*this.width/(this.width-w),0)}else{let C=e.height/2,w=i.height/2;o==="start"?(C=0,w=i.height):o==="end"&&(C=e.height,w=0),this.paddingTop=C+a,this.paddingBottom=w+a}}_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(){ad(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:e}=this.options;return e==="top"||e==="bottom"||i==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let e,n;for(e=0,n=i.length;e({width:a[Ae]||0,height:c[Ae]||0});return{first:Re(0),last:Re(e-1),widest:Re(ye),highest:Re(fe),widths:a,heights:c}}getLabelForValue(i){return i}getPixelForValue(i,e){return NaN}getValueForPixel(i){}getPixelForTick(i){let e=this.ticks;return i<0||i>e.length-1?null:this.getPixelForValue(e[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let e=this._startPixel+i*this._length;return EAe(this._alignToPixels?IA(this.chart,e,0):e)}getDecimalForPixel(i){let e=(i-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:e}=this;return i<0&&e<0?e:i>0&&e>0?i:0}getContext(i){let e=this.ticks||[];if(i>=0&&ic*r?c/n:m/r:m*r0}_computeGridLineItems(i){let e=this.axis,n=this.chart,r=this.options,{grid:o,position:a,border:c}=r,m=o.offset,g=this.isHorizontal(),w=this.ticks.length+(m?1:0),P=vW(o),R=[],z=c.setContext(this.getContext()),H=z.display?z.width:0,j=H/2,K=function(Et){return IA(n,Et,H)},ne,me,Te,Ie,ye,fe,Re,Ae,ke,Qe,we,Rt;if(a==="top")ne=K(this.bottom),fe=this.bottom-P,Ae=ne-j,Qe=K(i.top)+j,Rt=i.bottom;else if(a==="bottom")ne=K(this.top),Qe=i.top,Rt=K(i.bottom)-j,fe=ne+j,Ae=this.top+P;else if(a==="left")ne=K(this.right),ye=this.right-P,Re=ne-j,ke=K(i.left)+j,we=i.right;else if(a==="right")ne=K(this.left),ke=i.left,we=K(i.right)-j,ye=ne+j,Re=this.left+P;else if(e==="x"){if(a==="center")ne=K((i.top+i.bottom)/2+.5);else if(Al(a)){let Et=Object.keys(a)[0],We=a[Et];ne=K(this.chart.scales[Et].getPixelForValue(We))}Qe=i.top,Rt=i.bottom,fe=ne+j,Ae=fe+P}else if(e==="y"){if(a==="center")ne=K((i.left+i.right)/2);else if(Al(a)){let Et=Object.keys(a)[0],We=a[Et];ne=K(this.chart.scales[Et].getPixelForValue(We))}ye=ne-j,Re=ye-P,ke=i.left,we=i.right}let rt=fs(r.ticks.maxTicksLimit,w),Ze=Math.max(1,Math.ceil(w/rt));for(me=0;me0&&(ui-=ht/2);break}pi={left:ui,top:li,width:ht+Kt.width,height:gt+Kt.height,color:Ze.backdropColor}}j.push({label:Te,font:Ae,textOffset:we,options:{rotation:H,color:We,strokeColor:bt,strokeWidth:st,textAlign:kt,textBaseline:Rt,translation:[Ie,ye],backdrop:pi}})}return j}_getXAxisLabelAlignment(){let{position:i,ticks:e}=this.options;if(-Jv(this.labelRotation))return i==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(i){let{position:e,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,a=this._getLabelSizes(),c=i+o,m=a.widest.width,g,C;return e==="left"?r?(C=this.right+o,n==="near"?g="left":n==="center"?(g="center",C+=m/2):(g="right",C+=m)):(C=this.right-c,n==="near"?g="right":n==="center"?(g="center",C-=m/2):(g="left",C=this.left)):e==="right"?r?(C=this.left+o,n==="near"?g="right":n==="center"?(g="center",C-=m/2):(g="left",C-=m)):(C=this.left+c,n==="near"?g="left":n==="center"?(g="center",C+=m/2):(g="right",C=this.right)):g="right",{textAlign:g,x:C}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:e},left:n,top:r,width:o,height:a}=this;e&&(i.save(),i.fillStyle=e,i.fillRect(n,r,o,a),i.restore())}getLineWidthForValue(i){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let r=this.ticks.findIndex(o=>o.value===i);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(i){let e=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,c=(m,g,C)=>{!C.width||!C.color||(n.save(),n.lineWidth=C.width,n.strokeStyle=C.color,n.setLineDash(C.borderDash||[]),n.lineDashOffset=C.borderDashOffset,n.beginPath(),n.moveTo(m.x,m.y),n.lineTo(g.x,g.y),n.stroke(),n.restore())};if(e.display)for(o=0,a=r.length;o{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[],o,a;for(o=0,a=e.length;o{let n=e.split("."),r=n.pop(),o=[t].concat(n).join("."),a=i[e].split("."),c=a.pop(),m=a.join(".");$d.route(o,r,m,c)})}function pti(t){return"id"in t&&"defaults"in t}var sDe=class{constructor(){this.controllers=new F6(rO,"datasets",!0),this.elements=new F6(E1,"elements"),this.plugins=new F6(Object,"plugins"),this.scales=new F6(VL,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,e,n){[...e].forEach(r=>{let o=n||this._getRegistryForType(r);n||o.isForType(r)||o===this.plugins&&r.id?this._exec(i,o,r):Uc(r,a=>{let c=n||this._getRegistryForType(a);this._exec(i,c,a)})})}_exec(i,e,n){let r=aW(i);ad(n["before"+r],[],n),e[i](n),ad(n["after"+r],[],n)}_getRegistryForType(i){for(let e=0;eo.filter(c=>!a.some(m=>c.plugin.id===m.plugin.id));this._notify(r(e,n),i,"stop"),this._notify(r(n,e),i,"start")}};function mti(t){let i={},e=[],n=Object.keys(vI.plugins.items);for(let o=0;o1&&SJe(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function wJe(t,i,e){if(e[i+"AxisID"]===t)return{axis:i}}function bti(t,i){if(i.data&&i.data.datasets){let e=i.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(e.length)return wJe(t,"x",e[0])||wJe(t,"y",e[0])}return{}}function Cti(t,i){let e=tO[t.type]||{scales:{}},n=i.scales||{},r=cDe(t.type,i),o=Object.create(null);return Object.keys(n).forEach(a=>{let c=n[a];if(!Al(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let m=dDe(a,c,bti(a,t),$d.scales[c.type]),g=yti(m,r),C=e.scales||{};o[a]=ML(Object.create(null),[{axis:m},c,C[m],C[g]])}),t.data.datasets.forEach(a=>{let c=a.type||t.type,m=a.indexAxis||cDe(c,i),C=(tO[c]||{}).scales||{};Object.keys(C).forEach(w=>{let P=_ti(w,m),R=a[P+"AxisID"]||P;o[R]=o[R]||Object.create(null),ML(o[R],[{axis:P},n[R],C[w]])})}),Object.keys(o).forEach(a=>{let c=o[a];ML(c,[$d.scales[c.type],$d.scale])}),o}function pet(t){let i=t.options||(t.options={});i.plugins=fs(i.plugins,{}),i.scales=Cti(t,i)}function met(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function xti(t){return t=t||{},t.data=met(t.data),pet(t),t}var IJe=new Map,het=new Set;function $de(t,i){let e=IJe.get(t);return e||(e=i(),IJe.set(t,e),het.add(e)),e}var bW=(t,i,e)=>{let n=gI(i,e);n!==void 0&&t.add(n)},uDe=class{constructor(i){this._config=xti(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=met(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),pet(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return $de(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,e){return $de(`${i}.transition.${e}`,()=>[[`datasets.${i}.transitions.${e}`,`transitions.${e}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,e){return $de(`${i}-${e}`,()=>[[`datasets.${i}.elements.${e}`,`datasets.${i}`,`elements.${e}`,""]])}pluginScopeKeys(i){let e=i.id,n=this.type;return $de(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,e){let n=this._scopeCache,r=n.get(i);return(!r||e)&&(r=new Map,n.set(i,r)),r}getOptionScopes(i,e,n){let{options:r,type:o}=this,a=this._cachedScopes(i,n),c=a.get(e);if(c)return c;let m=new Set;e.forEach(C=>{i&&(m.add(i),C.forEach(w=>bW(m,i,w))),C.forEach(w=>bW(m,r,w)),C.forEach(w=>bW(m,tO[o]||{},w)),C.forEach(w=>bW(m,$d,w)),C.forEach(w=>bW(m,Dde,w))});let g=Array.from(m);return g.length===0&&g.push(Object.create(null)),het.has(e)&&a.set(e,g),g}chartOptionScopes(){let{options:i,type:e}=this;return[i,tO[e]||{},$d.datasets[e]||{},{type:e},$d,Dde]}resolveNamedOptions(i,e,n,r=[""]){let o={$shared:!0},{resolver:a,subPrefixes:c}=TJe(this._resolverCache,i,r),m=a;if(wti(a,e)){o.$shared=!1,n=hI(n)?n():n;let g=this.createResolver(i,n,c);m=J2(a,n,g)}for(let g of e)o[g]=m[g];return o}createResolver(i,e,n=[""],r){let{resolver:o}=TJe(this._resolverCache,i,n);return Al(e)?J2(o,e,void 0,r):o}};function TJe(t,i,e){let n=t.get(i);n||(n=new Map,t.set(i,n));let r=e.join(),o=n.get(r);return o||(o={resolver:mW(i,e),subPrefixes:e.filter(c=>!c.toLowerCase().includes("hover"))},n.set(r,o)),o}var Sti=t=>Al(t)&&Object.getOwnPropertyNames(t).some(i=>hI(t[i]));function wti(t,i){let{isScriptable:e,isIndexable:n}=Rde(t);for(let r of i){let o=e(r),a=n(r),c=(a||o)&&t[r];if(o&&(hI(c)||Sti(c))||a&&Gd(c))return!0}return!1}var Iti="4.5.0",Tti=["top","bottom","left","right","chartArea"];function EJe(t,i){return t==="top"||t==="bottom"||Tti.indexOf(t)===-1&&i==="x"}function AJe(t,i){return function(e,n){return e[t]===n[t]?e[i]-n[i]:e[t]-n[t]}}function DJe(t){let i=t.chart,e=i.options.animation;i.notifyPlugins("afterRender"),ad(e&&e.onComplete,[t],i)}function Eti(t){let i=t.chart,e=i.options.animation;ad(e&&e.onProgress,[t],i)}function fet(t){return hW()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var Qde={},kJe=t=>{let i=fet(t);return Object.values(Qde).filter(e=>e.canvas===i).pop()};function Ati(t,i,e){let n=Object.keys(t);for(let r of n){let o=+r;if(o>=i){let a=t[r];delete t[r],(e>0||o>i)&&(t[o+e]=a)}}}function Dti(t,i,e,n){return!e||t.type==="mouseout"?null:n?i:t}var A1=(()=>{class t{static defaults=$d;static instances=Qde;static overrides=tO;static registry=vI;static version=Iti;static getChart=kJe;static register(...e){vI.add(...e),MJe()}static unregister(...e){vI.remove(...e),MJe()}constructor(e,n){let r=this.config=new uDe(n),o=fet(e),a=kJe(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let c=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Qei(o)),this.platform.updateConfig(r);let m=this.platform.acquireContext(o,c.aspectRatio),g=m&&m.canvas,C=g&&g.height,w=g&&g.width;if(this.id=xAe(),this.ctx=m,this.canvas=g,this.width=w,this.height=C,this._options=c,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 lDe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=MAe(P=>this.update(P),c.resizeDelay||0),this._dataChanges=[],Qde[this.id]=this,!m||!g){console.error("Failed to create chart: can't acquire context from the given item");return}DA.listen(this,"complete",DJe),DA.listen(this,"progress",Eti),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:o,_aspectRatio:a}=this;return al(e)?n&&a?a:o?r/o: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 vI}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Fde(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return kde(this.canvas,this.ctx),this}stop(){return DA.stop(this),this}resize(e,n){DA.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){let r=this.options,o=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,c=this.platform.getMaximumSize(o,e,n,a),m=r.devicePixelRatio||this.platform.getDevicePixelRatio(),g=this.width?"resize":"attach";this.width=c.width,this.height=c.height,this._aspectRatio=this.aspectRatio,Fde(this,m,!0)&&(this.notifyPlugins("resize",{size:c}),ad(r.onResize,[this,c],this),this.attached&&this._doResize(g)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};Uc(n,(r,o)=>{r.id=o})}buildOrUpdateScales(){let e=this.options,n=e.scales,r=this.scales,o=Object.keys(r).reduce((c,m)=>(c[m]=!1,c),{}),a=[];n&&(a=a.concat(Object.keys(n).map(c=>{let m=n[c],g=dDe(c,m),C=g==="r",w=g==="x";return{options:m,dposition:C?"chartArea":w?"bottom":"left",dtype:C?"radialLinear":w?"category":"linear"}}))),Uc(a,c=>{let m=c.options,g=m.id,C=dDe(g,m),w=fs(m.type,c.dtype);(m.position===void 0||EJe(m.position,C)!==EJe(c.dposition))&&(m.position=c.dposition),o[g]=!0;let P=null;if(g in r&&r[g].type===w)P=r[g];else{let R=vI.getScale(w);P=new R({id:g,type:w,ctx:this.ctx,chart:this}),r[P.id]=P}P.init(m,e)}),Uc(o,(c,m)=>{c||delete r[m]}),Uc(r,c=>{r_.configure(this,c,c.options),r_.addBox(this,c)})}_updateMetasets(){let e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((o,a)=>o.index-a.index),r>n){for(let o=n;on.length&&delete this._stacks,e.forEach((r,o)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let e=[],n=this.data.datasets,r,o;for(this._removeUnreferencedMetasets(),r=0,o=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let c=0;for(let C=0,w=this.data.datasets.length;C{C.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(AJe("z","_idx"));let{_active:m,_lastEvent:g}=this;g?this._eventHandler(g,!0):m.length&&this._updateHoverStyles(m,m,!0),this.render()}_updateScales(){Uc(this.scales,e=>{r_.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!gde(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:o,count:a}of n){let c=r==="_removeElements"?-a:a;Ati(e,o,c)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=a=>new Set(e.filter(c=>c[0]===a).map((c,m)=>m+","+c.splice(1).join(","))),o=r(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;r_.update(this,this.width,this.height,e);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Uc(this.boxes,o=>{r&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let n=this.ctx,r={meta:e,index:e.index,cancelable:!0},o=Hde(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(o&&R6(n,o),e.controller.draw(),o&&P6(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return w1(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,o){let a=Mei.modes[n];return typeof a=="function"?a(this,e,r,o):[]}getDatasetMeta(e){let n=this.data.datasets[e],r=this._metasets,o=r.filter(a=>a&&a._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(o)),o}getContext(){return this.$context||(this.$context=_I(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let n=this.data.datasets[e];if(!n)return!1;let r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){let r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){let o=r?"show":"hide",a=this.getDatasetMeta(e),c=a.controller._resolveAnimations(void 0,o);OL(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),c.update(a,{visible:r}),this.update(m=>m.datasetIndex===e?o:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){let n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),DA.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,a,c),e[a]=c},o=(a,c,m)=>{a.offsetX=c,a.offsetY=m,this._eventHandler(a)};Uc(this.options.events,a=>r(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,n=this.platform,r=(g,C)=>{n.addEventListener(this,g,C),e[g]=C},o=(g,C)=>{e[g]&&(n.removeEventListener(this,g,C),delete e[g])},a=(g,C)=>{this.canvas&&this.resize(g,C)},c,m=()=>{o("attach",m),this.attached=!0,this.resize(),r("resize",a),r("detach",c)};c=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),r("attach",m)},n.isAttached(this.canvas)?m():c()}unbindEvents(){Uc(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Uc(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){let o=r?"set":"remove",a,c,m,g;for(n==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),m=0,g=e.length;m{let m=this.getDatasetMeta(a);if(!m)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:m.data[c],index:c}});!O6(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){let o=this.options.hover,a=(g,C)=>g.filter(w=>!C.some(P=>w.datasetIndex===P.datasetIndex&&w.index===P.index)),c=a(n,e),m=r?e:a(e,n);c.length&&this.updateHoverStyle(c,o.mode,!1),m.length&&o.mode&&this.updateHoverStyle(m,o.mode,!0)}_eventHandler(e,n){let r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},o=c=>(c.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,o)===!1)return;let a=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,o),(a||r.changed)&&this.render(),this}_handleEvent(e,n,r){let{_active:o=[],options:a}=this,c=n,m=this._getActiveElements(e,o,r,c),g=wAe(e),C=Dti(e,this._lastEvent,r,g);r&&(this._lastEvent=null,ad(a.onHover,[e,m,this],this),g&&ad(a.onClick,[e,m,this],this));let w=!O6(m,o);return(w||n)&&(this._active=m,this._updateHoverStyles(m,o,n)),this._lastEvent=C,w}_getActiveElements(e,n,r,o){if(e.type==="mouseout")return[];if(!r)return n;let a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,o)}}return t})();function MJe(){return Uc(A1.instances,t=>t._plugins.invalidate())}function kti(t,i,e){let{startAngle:n,x:r,y:o,outerRadius:a,innerRadius:c,options:m}=i,{borderWidth:g,borderJoinStyle:C}=m,w=Math.min(g/a,hf(n-e));if(t.beginPath(),t.arc(r,o,a-g/2,n+w/2,e-w/2),c>0){let P=Math.min(g/c,hf(n-e));t.arc(r,o,c+g/2,e-P/2,n+P/2,!0)}else{let P=Math.min(g/2,a*hf(n-e));if(C==="round")t.arc(r,o,P,e-vc/2,n+vc/2,!0);else if(C==="bevel"){let R=2*P*P,z=-R*Math.cos(e+vc/2)+r,H=-R*Math.sin(e+vc/2)+o,j=R*Math.cos(n+vc/2)+r,K=R*Math.sin(n+vc/2)+o;t.lineTo(z,H),t.lineTo(j,K)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function Mti(t,i,e){let{startAngle:n,pixelMargin:r,x:o,y:a,outerRadius:c,innerRadius:m}=i,g=r/c;t.beginPath(),t.arc(o,a,c,n-g,e+g),m>r?(g=r/m,t.arc(o,a,m,e+g,n-g,!0)):t.arc(o,a,r,e+ap,n-ap),t.closePath(),t.clip()}function Oti(t){return pW(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Rti(t,i,e,n){let r=Oti(t.options.borderRadius),o=(e-i)/2,a=Math.min(o,n*i/2),c=m=>{let g=(e-Math.min(o,m))*n/2;return qm(m,0,Math.min(o,g))};return{outerStart:c(r.outerStart),outerEnd:c(r.outerEnd),innerStart:qm(r.innerStart,0,a),innerEnd:qm(r.innerEnd,0,a)}}function N6(t,i,e,n){return{x:e+t*Math.cos(i),y:n+t*Math.sin(i)}}function eue(t,i,e,n,r,o){let{x:a,y:c,startAngle:m,pixelMargin:g,innerRadius:C}=i,w=Math.max(i.outerRadius+n+e-g,0),P=C>0?C+n+e+g:0,R=0,z=r-m;if(n){let Ze=C>0?C-n:0,Et=w>0?w-n:0,We=(Ze+Et)/2,bt=We!==0?z*We/(We+n):z;R=(z-bt)/2}let H=Math.max(.001,z*w-e/vc)/w,j=(z-H)/2,K=m+j+R,ne=r-j-R,{outerStart:me,outerEnd:Te,innerStart:Ie,innerEnd:ye}=Rti(i,P,w,ne-K),fe=w-me,Re=w-Te,Ae=K+me/fe,ke=ne-Te/Re,Qe=P+Ie,we=P+ye,Rt=K+Ie/Qe,rt=ne-ye/we;if(t.beginPath(),o){let Ze=(Ae+ke)/2;if(t.arc(a,c,w,Ae,Ze),t.arc(a,c,w,Ze,ke),Te>0){let st=N6(Re,ke,a,c);t.arc(st.x,st.y,Te,ke,ne+ap)}let Et=N6(we,ne,a,c);if(t.lineTo(Et.x,Et.y),ye>0){let st=N6(we,rt,a,c);t.arc(st.x,st.y,ye,ne+ap,rt+Math.PI)}let We=(ne-ye/P+(K+Ie/P))/2;if(t.arc(a,c,P,ne-ye/P,We,!0),t.arc(a,c,P,We,K+Ie/P,!0),Ie>0){let st=N6(Qe,Rt,a,c);t.arc(st.x,st.y,Ie,Rt+Math.PI,K-ap)}let bt=N6(fe,K,a,c);if(t.lineTo(bt.x,bt.y),me>0){let st=N6(fe,Ae,a,c);t.arc(st.x,st.y,me,K-ap,Ae)}}else{t.moveTo(a,c);let Ze=Math.cos(Ae)*w+a,Et=Math.sin(Ae)*w+c;t.lineTo(Ze,Et);let We=Math.cos(ke)*w+a,bt=Math.sin(ke)*w+c;t.lineTo(We,bt)}t.closePath()}function Pti(t,i,e,n,r){let{fullCircles:o,startAngle:a,circumference:c}=i,m=i.endAngle;if(o){eue(t,i,e,n,m,r);for(let g=0;g=vc&&R===0&&C!=="miter"&&kti(t,i,H),o||(eue(t,i,e,n,H,r),t.stroke())}var wW=class extends E1{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:i=>i!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){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,i&&Object.assign(this,i)}inRange(i,e,n){let r=this.getProps(["x","y"],n),{angle:o,distance:a}=bde(r,{x:i,y:e}),{startAngle:c,endAngle:m,innerRadius:g,outerRadius:C,circumference:w}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),P=(this.options.spacing+this.options.borderWidth)/2,R=fs(w,m-c),z=PL(o,c,m)&&c!==m,H=R>=jd||z,j=T1(a,g+P,C+P);return H&&j}getCenterPoint(i){let{x:e,y:n,startAngle:r,endAngle:o,innerRadius:a,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:m,spacing:g}=this.options,C=(r+o)/2,w=(a+c+g+m)/2;return{x:e+Math.cos(C)*w,y:n+Math.sin(C)*w}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:e,circumference:n}=this,r=(e.offset||0)/4,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=n>jd?Math.floor(n/jd):0,n===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let c=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(c)*r,Math.sin(c)*r);let m=1-Math.sin(Math.min(vc,n||0)),g=r*m;i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,Pti(i,this,g,o,a),Nti(i,this,g,o,a),i.restore()}};function get(t,i,e=i){t.lineCap=fs(e.borderCapStyle,i.borderCapStyle),t.setLineDash(fs(e.borderDash,i.borderDash)),t.lineDashOffset=fs(e.borderDashOffset,i.borderDashOffset),t.lineJoin=fs(e.borderJoinStyle,i.borderJoinStyle),t.lineWidth=fs(e.borderWidth,i.borderWidth),t.strokeStyle=fs(e.borderColor,i.borderColor)}function Fti(t,i,e){t.lineTo(e.x,e.y)}function Lti(t){return t.stepped?PAe:t.tension||t.cubicInterpolationMode==="monotone"?NAe:Fti}function _et(t,i,e={}){let n=t.length,{start:r=0,end:o=n-1}=e,{start:a,end:c}=i,m=Math.max(r,a),g=Math.min(o,c),C=rc&&o>c;return{count:n,start:m,loop:i.loop,ilen:g(a+(g?c-Te:Te))%o,me=()=>{H!==j&&(t.lineTo(C,j),t.lineTo(C,H),t.lineTo(C,K))};for(m&&(R=r[ne(0)],t.moveTo(R.x,R.y)),P=0;P<=c;++P){if(R=r[ne(P)],R.skip)continue;let Te=R.x,Ie=R.y,ye=Te|0;ye===z?(Iej&&(j=Ie),C=(w*C+Te)/++w):(me(),t.lineTo(Te,Ie),z=ye,w=0,H=j=Ie),K=Ie}me()}function pDe(t){let i=t.options,e=i.borderDash&&i.borderDash.length;return!t._decimated&&!t._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!e?Vti:Bti}function zti(t){return t.stepped?HAe:t.tension||t.cubicInterpolationMode==="monotone"?GAe:wA}function Uti(t,i,e,n){let r=i._path;r||(r=i._path=new Path2D,i.path(r,e,n)&&r.closePath()),get(t,i.options),t.stroke(r)}function Hti(t,i,e,n){let{segments:r,options:o}=i,a=pDe(i);for(let c of r)get(t,o,c.style),t.beginPath(),a(t,i,c,{start:e,end:e+n-1})&&t.closePath(),t.stroke()}var Gti=typeof Path2D=="function";function jti(t,i,e,n){Gti&&!i.options.segment?Uti(t,i,e,n):Hti(t,i,e,n)}var nue=(()=>{class t extends E1{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,n){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let o=r.spanGaps?this._loop:this._fullLoop;VAe(this._points,r,e,o,n),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=jAe(this,this.options.segment))}first(){let e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){let e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){let r=this.options,o=e[n],a=this.points,c=Ude(this,{property:n,start:o,end:o});if(!c.length)return;let m=[],g=zti(r),C,w;for(C=0,w=c.length;C{class t extends E1{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,n,r){let o=this.options,{x:a,y:c}=this.getProps(["x","y"],r);return Math.pow(e-a,2)+Math.pow(n-c,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function vet(t){return mDe[t%mDe.length]}function bet(t){return RJe[t%RJe.length]}function Zti(t,i){return t.borderColor=vet(i),t.backgroundColor=bet(i),++i}function Xti(t,i){return t.backgroundColor=t.data.map(()=>vet(i++)),i}function Jti(t,i){return t.backgroundColor=t.data.map(()=>bet(i++)),i}function eii(t){let i=0;return(e,n)=>{let r=t.getDatasetMeta(n).controller;r instanceof CDe?i=Xti(e,i):r instanceof aet?i=Jti(e,i):r&&(i=Zti(e,i))}}function PJe(t){let i;for(i in t)if(t[i].borderColor||t[i].backgroundColor)return!0;return!1}function tii(t){return t&&(t.borderColor||t.backgroundColor)}function iii(){return $d.borderColor!=="rgba(0,0,0,0.1)"||$d.backgroundColor!=="rgba(0,0,0,0.1)"}var nii={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,i,e){if(!e.enabled)return;let{data:{datasets:n},options:r}=t.config,{elements:o}=r,a=PJe(n)||tii(r)||o&&PJe(o)||iii();if(!e.forceOverride&&a)return;let c=eii(t);n.forEach(c)}};function rii(t,i,e,n,r){let o=r.samples||n;if(o>=e)return t.slice(i,i+e);let a=[],c=(e-2)/(o-2),m=0,g=i+e-1,C=i,w,P,R,z,H;for(a[m++]=t[C],w=0;wR&&(R=z,P=t[ne],H=ne);a[m++]=P,C=H}return a[m++]=t[g],a}function oii(t,i,e,n){let r=0,o=0,a,c,m,g,C,w,P,R,z,H,j=[],K=i+e-1,ne=t[i].x,Te=t[K].x-ne;for(a=i;aH&&(H=g,P=a),r=(o*r+c.x)/++o;else{let ye=a-1;if(!al(w)&&!al(P)){let fe=Math.min(w,P),Re=Math.max(w,P);fe!==R&&fe!==ye&&j.push($e(pe({},t[fe]),{x:r})),Re!==R&&Re!==ye&&j.push($e(pe({},t[Re]),{x:r}))}a>0&&ye!==R&&j.push(t[ye]),j.push(c),C=Ie,o=0,z=H=g,w=P=R=a}}return j}function Cet(t){if(t._decimated){let i=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function NJe(t){t.data.datasets.forEach(i=>{Cet(i)})}function aii(t,i){let e=i.length,n=0,r,{iScale:o}=t,{min:a,max:c,minDefined:m,maxDefined:g}=o.getUserBounds();return m&&(n=qm(S1(i,o.axis,a).lo,0,e-1)),g?r=qm(S1(i,o.axis,c).hi+1,n,e)-n:r=e-n,{start:n,count:r}}var sii={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,i,e)=>{if(!e.enabled){NJe(t);return}let n=t.width;t.data.datasets.forEach((r,o)=>{let{_data:a,indexAxis:c}=r,m=t.getDatasetMeta(o),g=a||r.data;if(Ad([c,t.options.indexAxis])==="y"||!m.controller.supportsDecimation)return;let C=t.scales[m.xAxisID];if(C.type!=="linear"&&C.type!=="time"||t.options.parsing)return;let{start:w,count:P}=aii(m,g),R=e.threshold||4*n;if(P<=R){Cet(r);return}al(a)&&(r._data=g,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(H){this._data=H}}));let z;switch(e.algorithm){case"lttb":z=rii(g,w,P,n,e);break;case"min-max":z=oii(g,w,P,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=z})},destroy(t){NJe(t)}};function lii(t,i,e){let n=t.segments,r=t.points,o=i.points,a=[];for(let c of n){let{start:m,end:g}=c;g=rue(m,g,r);let C=hDe(e,r[m],r[g],c.loop);if(!i.segments){a.push({source:c,target:C,start:r[m],end:r[g]});continue}let w=Ude(i,C);for(let P of w){let R=hDe(e,o[P.start],o[P.end],P.loop),z=zde(c,r,R);for(let H of z)a.push({source:H,target:P,start:{[e]:FJe(C,R,"start",Math.max)},end:{[e]:FJe(C,R,"end",Math.min)}})}}return a}function hDe(t,i,e,n){if(n)return;let r=i[t],o=e[t];return t==="angle"&&(r=hf(r),o=hf(o)),{property:t,start:r,end:o}}function cii(t,i){let{x:e=null,y:n=null}=t||{},r=i.points,o=[];return i.segments.forEach(({start:a,end:c})=>{c=rue(a,c,r);let m=r[a],g=r[c];n!==null?(o.push({x:m.x,y:n}),o.push({x:g.x,y:n})):e!==null&&(o.push({x:e,y:m.y}),o.push({x:e,y:g.y}))}),o}function rue(t,i,e){for(;i>t;i--){let n=e[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function FJe(t,i,e,n){return t&&i?n(t[e],i[e]):t?t[e]:i?i[e]:0}function xet(t,i){let e=[],n=!1;return Gd(t)?(n=!0,e=t):e=cii(t,i),e.length?new nue({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function LJe(t){return t&&t.fill!==!1}function dii(t,i,e){let r=t[i].fill,o=[i],a;if(!e)return r;for(;r!==!1&&o.indexOf(r)===-1;){if(!Vu(r))return r;if(a=t[r],!a)return!1;if(a.visible)return r;o.push(r),r=a.fill}return!1}function uii(t,i,e){let n=fii(t);if(Al(n))return isNaN(n.value)?!1:n;let r=parseFloat(n);return Vu(r)&&Math.floor(r)===r?pii(n[0],i,r,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function pii(t,i,e,n){return(t==="-"||t==="+")&&(e=i+e),e===i||e<0||e>=n?!1:e}function mii(t,i){let e=null;return t==="start"?e=i.bottom:t==="end"?e=i.top:Al(t)?e=i.getPixelForValue(t.value):i.getBasePixel&&(e=i.getBasePixel()),e}function hii(t,i,e){let n;return t==="start"?n=e:t==="end"?n=i.options.reverse?i.min:i.max:Al(t)?n=t.value:n=i.getBaseValue(),n}function fii(t){let i=t.options,e=i.fill,n=fs(e&&e.target,e);return n===void 0&&(n=!!i.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function gii(t){let{scale:i,index:e,line:n}=t,r=[],o=n.segments,a=n.points,c=_ii(i,e);c.push(xet({x:null,y:i.bottom},n));for(let m=0;m=0;--a){let c=r[a].$filler;c&&(c.line.updateControlPoints(o,c.axis),n&&c.fill&&eDe(t.ctx,c,o))}},beforeDatasetsDraw(t,i,e){if(e.drawTime!=="beforeDatasetsDraw")return;let n=t.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){let o=n[r].$filler;LJe(o)&&eDe(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,i,e){let n=i.meta.$filler;!LJe(n)||e.drawTime!=="beforeDatasetDraw"||eDe(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},UJe=(t,i)=>{let{boxHeight:e=i,boxWidth:n=i}=t;return t.usePointStyle&&(e=Math.min(e,i),n=t.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(i,e)}},Aii=(t,i)=>t!==null&&i!==null&&t.datasetIndex===i.datasetIndex&&t.index===i.index,iue=class extends E1{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,e,n){this.maxWidth=i,this.maxHeight=e,this._margins=n,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 i=this.options.labels||{},e=ad(i.generateLabels,[this.chart],this)||[];i.filter&&(e=e.filter(n=>i.filter(n,this.chart.data))),i.sort&&(e=e.sort((n,r)=>i.sort(n,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:i,ctx:e}=this;if(!i.display){this.width=this.height=0;return}let n=i.labels,r=sp(n.font),o=r.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:m}=UJe(n,o),g,C;e.font=r.string,this.isHorizontal()?(g=this.maxWidth,C=this._fitRows(a,o,c,m)+10):(C=this.maxHeight,g=this._fitCols(a,r,c,m)+10),this.width=Math.min(g,i.maxWidth||this.maxWidth),this.height=Math.min(C,i.maxHeight||this.maxHeight)}_fitRows(i,e,n,r){let{ctx:o,maxWidth:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],g=this.lineWidths=[0],C=r+c,w=i;o.textAlign="left",o.textBaseline="middle";let P=-1,R=-C;return this.legendItems.forEach((z,H)=>{let j=n+e/2+o.measureText(z.text).width;(H===0||g[g.length-1]+j+2*c>a)&&(w+=C,g[g.length-(H>0?0:1)]=0,R+=C,P++),m[H]={left:0,top:R,row:P,width:j,height:r},g[g.length-1]+=j+c}),w}_fitCols(i,e,n,r){let{ctx:o,maxHeight:a,options:{labels:{padding:c}}}=this,m=this.legendHitBoxes=[],g=this.columnSizes=[],C=a-i,w=c,P=0,R=0,z=0,H=0;return this.legendItems.forEach((j,K)=>{let{itemWidth:ne,itemHeight:me}=Dii(n,e,o,j,r);K>0&&R+me+2*c>C&&(w+=P+c,g.push({width:P,height:R}),z+=P+c,H++,P=R=0),m[K]={left:z,top:R,col:H,width:ne,height:me},P=Math.max(P,ne),R+=me+c}),w+=P,g.push({width:P,height:R}),w}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:o}}=this,a=iO(o,this.left,this.width);if(this.isHorizontal()){let c=0,m=ff(n,this.left+r,this.right-this.lineWidths[c]);for(let g of e)c!==g.row&&(c=g.row,m=ff(n,this.left+r,this.right-this.lineWidths[c])),g.top+=this.top+i+r,g.left=a.leftForLtr(a.x(m),g.width),m+=g.width+r}else{let c=0,m=ff(n,this.top+i+r,this.bottom-this.columnSizes[c].height);for(let g of e)g.col!==c&&(c=g.col,m=ff(n,this.top+i+r,this.bottom-this.columnSizes[c].height)),g.top=m,g.left+=this.left+r,g.left=a.leftForLtr(a.x(g.left),g.width),m+=g.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let i=this.ctx;R6(i,this),this._draw(),P6(i)}}_draw(){let{options:i,columnSizes:e,lineWidths:n,ctx:r}=this,{align:o,labels:a}=i,c=$d.color,m=iO(i.rtl,this.left,this.width),g=sp(a.font),{padding:C}=a,w=g.size,P=w/2,R;this.drawTitle(),r.textAlign=m.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=g.string;let{boxWidth:z,boxHeight:H,itemHeight:j}=UJe(a,w),K=function(ye,fe,Re){if(isNaN(z)||z<=0||isNaN(H)||H<0)return;r.save();let Ae=fs(Re.lineWidth,1);if(r.fillStyle=fs(Re.fillStyle,c),r.lineCap=fs(Re.lineCap,"butt"),r.lineDashOffset=fs(Re.lineDashOffset,0),r.lineJoin=fs(Re.lineJoin,"miter"),r.lineWidth=Ae,r.strokeStyle=fs(Re.strokeStyle,c),r.setLineDash(fs(Re.lineDash,[])),a.usePointStyle){let ke={radius:H*Math.SQRT2/2,pointStyle:Re.pointStyle,rotation:Re.rotation,borderWidth:Ae},Qe=m.xPlus(ye,z/2),we=fe+P;Mde(r,ke,Qe,we,a.pointStyleWidth&&z)}else{let ke=fe+Math.max((w-H)/2,0),Qe=m.leftForLtr(ye,z),we=EA(Re.borderRadius);r.beginPath(),Object.values(we).some(Rt=>Rt!==0)?FL(r,{x:Qe,y:ke,w:z,h:H,radius:we}):r.rect(Qe,ke,z,H),r.fill(),Ae!==0&&r.stroke()}r.restore()},ne=function(ye,fe,Re){TA(r,Re.text,ye,fe+j/2,g,{strikethrough:Re.hidden,textAlign:m.textAlign(Re.textAlign)})},me=this.isHorizontal(),Te=this._computeTitleHeight();me?R={x:ff(o,this.left+C,this.right-n[0]),y:this.top+C+Te,line:0}:R={x:this.left+C,y:ff(o,this.top+Te+C,this.bottom-e[0].height),line:0},Bde(this.ctx,i.textDirection);let Ie=j+C;this.legendItems.forEach((ye,fe)=>{r.strokeStyle=ye.fontColor,r.fillStyle=ye.fontColor;let Re=r.measureText(ye.text).width,Ae=m.textAlign(ye.textAlign||(ye.textAlign=a.textAlign)),ke=z+P+Re,Qe=R.x,we=R.y;m.setWidth(this.width),me?fe>0&&Qe+ke+C>this.right&&(we=R.y+=Ie,R.line++,Qe=R.x=ff(o,this.left+C,this.right-n[R.line])):fe>0&&we+Ie>this.bottom&&(Qe=R.x=Qe+e[R.line].width+C,R.line++,we=R.y=ff(o,this.top+Te+C,this.bottom-e[R.line].height));let Rt=m.x(Qe);if(K(Rt,we,ye),Qe=OAe(Ae,Qe+z+P,me?Qe+ke:this.right,i.rtl),ne(m.x(Qe),we,ye),me)R.x+=ke+C;else if(typeof ye.text!="string"){let rt=g.lineHeight;R.y+=wet(ye,rt)+C}else R.y+=Ie}),Vde(this.ctx,i.textDirection)}drawTitle(){let i=this.options,e=i.title,n=sp(e.font),r=Ym(e.padding);if(!e.display)return;let o=iO(i.rtl,this.left,this.width),a=this.ctx,c=e.position,m=n.size/2,g=r.top+m,C,w=this.left,P=this.width;if(this.isHorizontal())P=Math.max(...this.lineWidths),C=this.top+g,w=ff(i.align,w,this.right-P);else{let z=this.columnSizes.reduce((H,j)=>Math.max(H,j.height),0);C=g+ff(i.align,this.top,this.bottom-z-i.labels.padding-this._computeTitleHeight())}let R=ff(c,w,w+P);a.textAlign=o.textAlign(cW(c)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,TA(a,e.text,R,C,n)}_computeTitleHeight(){let i=this.options.title,e=sp(i.font),n=Ym(i.padding);return i.display?e.lineHeight+n.height:0}_getLegendItemAt(i,e){let n,r,o;if(T1(i,this.left,this.right)&&T1(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;no.length>a.length?o:a)),i+e.size/2+n.measureText(r).width}function Mii(t,i,e){let n=t;return typeof i.text!="string"&&(n=wet(i,e)),n}function wet(t,i){let e=t.text?t.text.length:0;return i*e}function Oii(t,i){return!!((t==="mousemove"||t==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(t==="click"||t==="mouseup"))}var Rii={id:"legend",_element:iue,start(t,i,e){let n=t.legend=new iue({ctx:t.ctx,options:e,chart:t});r_.configure(t,n,e),r_.addBox(t,n)},stop(t){r_.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,i,e){let n=t.legend;r_.configure(t,n,e),n.options=e},afterUpdate(t){let i=t.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(t,i){i.replay||t.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,i,e){let n=i.datasetIndex,r=e.chart;r.isDatasetVisible(n)?(r.hide(n),i.hidden=!0):(r.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let i=t.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:r,color:o,useBorderRadius:a,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(m=>{let g=m.controller.getStyle(e?0:void 0),C=Ym(g.borderWidth);return{text:i[m.index].label,fillStyle:g.backgroundColor,fontColor:o,hidden:!m.visible,lineCap:g.borderCapStyle,lineDash:g.borderDash,lineDashOffset:g.borderDashOffset,lineJoin:g.borderJoinStyle,lineWidth:(C.width+C.height)/4,strokeStyle:g.borderColor,pointStyle:n||g.pointStyle,rotation:g.rotation,textAlign:r||g.textAlign,borderRadius:a&&(c||g.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)}}},TW=class extends E1{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,e){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=e;let r=Gd(n.text)?n.text.length:1;this._padding=Ym(n.padding);let o=r*sp(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom"}_drawArgs(i){let{top:e,left:n,bottom:r,right:o,options:a}=this,c=a.align,m=0,g,C,w;return this.isHorizontal()?(C=ff(c,n,o),w=e+i,g=o-n):(a.position==="left"?(C=n+i,w=ff(c,r,e),m=vc*-.5):(C=o-i,w=ff(c,e,r),m=vc*.5),g=r-e),{titleX:C,titleY:w,maxWidth:g,rotation:m}}draw(){let i=this.ctx,e=this.options;if(!e.display)return;let n=sp(e.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:c,maxWidth:m,rotation:g}=this._drawArgs(o);TA(i,e.text,0,0,n,{color:e.color,maxWidth:m,rotation:g,textAlign:cW(e.align),textBaseline:"middle",translation:[a,c]})}};function Pii(t,i){let e=new TW({ctx:t.ctx,options:i,chart:t});r_.configure(t,e,i),r_.addBox(t,e),t.titleBlock=e}var Nii={id:"title",_element:TW,start(t,i,e){Pii(t,e)},stop(t){let i=t.titleBlock;r_.removeBox(t,i),delete t.titleBlock},beforeUpdate(t,i,e){let n=t.titleBlock;r_.configure(t,n,e),n.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}},qde=new WeakMap,Fii={id:"subtitle",start(t,i,e){let n=new TW({ctx:t.ctx,options:e,chart:t});r_.configure(t,n,e),r_.addBox(t,n),qde.set(t,n)},stop(t){r_.removeBox(t,qde.get(t)),qde.delete(t)},beforeUpdate(t,i,e){let n=qde.get(t);r_.configure(t,n,e),n.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}},xW={average(t){if(!t.length)return!1;let i,e,n=new Set,r=0,o=0;for(i=0,e=t.length;ic+m)/n.size,y:r/o}},nearest(t,i){if(!t.length)return!1;let e=i.x,n=i.y,r=Number.POSITIVE_INFINITY,o,a,c;for(o=0,a=t.length;o-1?t.split(` `):t}function Lii(t,i){let{element:e,datasetIndex:n,index:r}=i,o=t.getDatasetMeta(n).controller,{label:a,value:c}=o.getLabelAndValue(r);return{chart:t,label:a,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:c,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:e}}function HJe(t,i){let e=t.chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:a,boxHeight:c}=i,m=sp(i.bodyFont),g=sp(i.titleFont),C=sp(i.footerFont),w=o.length,P=r.length,R=n.length,z=Ym(i.padding),H=z.height,j=0,K=n.reduce((Te,Ie)=>Te+Ie.before.length+Ie.lines.length+Ie.after.length,0);if(K+=t.beforeBody.length+t.afterBody.length,w&&(H+=w*g.lineHeight+(w-1)*i.titleSpacing+i.titleMarginBottom),K){let Te=i.displayColors?Math.max(c,m.lineHeight):m.lineHeight;H+=R*Te+(K-R)*m.lineHeight+(K-1)*i.bodySpacing}P&&(H+=i.footerMarginTop+P*C.lineHeight+(P-1)*i.footerSpacing);let ne=0,me=function(Te){j=Math.max(j,e.measureText(Te).width+ne)};return e.save(),e.font=g.string,Uc(t.title,me),e.font=m.string,Uc(t.beforeBody.concat(t.afterBody),me),ne=i.displayColors?a+2+i.boxPadding:0,Uc(n,Te=>{Uc(Te.before,me),Uc(Te.lines,me),Uc(Te.after,me)}),ne=0,e.font=C.string,Uc(t.footer,me),e.restore(),j+=z.width,{width:j,height:H}}function Bii(t,i){let{y:e,height:n}=i;return et.height-n/2?"bottom":"center"}function Vii(t,i,e,n){let{x:r,width:o}=n,a=e.caretSize+e.caretPadding;if(t==="left"&&r+o+a>i.width||t==="right"&&r-o-a<0)return!0}function zii(t,i,e,n){let{x:r,width:o}=e,{width:a,chartArea:{left:c,right:m}}=t,g="center";return n==="center"?g=r<=(c+m)/2?"left":"right":r<=o/2?g="left":r>=a-o/2&&(g="right"),Vii(g,t,i,e)&&(g="center"),g}function GJe(t,i,e){let n=e.yAlign||i.yAlign||Bii(t,e);return{xAlign:e.xAlign||i.xAlign||zii(t,i,e,n),yAlign:n}}function Uii(t,i){let{x:e,width:n}=t;return i==="right"?e-=n:i==="center"&&(e-=n/2),e}function Hii(t,i,e){let{y:n,height:r}=t;return i==="top"?n+=e:i==="bottom"?n-=r+e:n-=r/2,n}function jJe(t,i,e,n){let{caretSize:r,caretPadding:o,cornerRadius:a}=t,{xAlign:c,yAlign:m}=e,g=r+o,{topLeft:C,topRight:w,bottomLeft:P,bottomRight:R}=EA(a),z=Uii(i,c),H=Hii(i,m,g);return m==="center"?c==="left"?z+=g:c==="right"&&(z-=g):c==="left"?z-=Math.max(C,P)+r:c==="right"&&(z+=Math.max(w,R)+r),{x:qm(z,0,n.width-i.width),y:qm(H,0,n.height-i.height)}}function Yde(t,i,e){let n=Ym(e.padding);return i==="center"?t.x+t.width/2:i==="right"?t.x+t.width-n.right:t.x+n.left}function $Je(t){return yI([],kA(t))}function Gii(t,i,e){return _I(t,{tooltip:i,tooltipItems:e,type:"tooltip"})}function qJe(t,i){let e=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return e?t.override(e):t}var Iet={beforeTitle:I1,title(t){if(t.length>0){let i=t[0],e=i.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex"u"?Iet[i].call(e,n):r}var YJe=(()=>{class t extends E1{static positioners=xW;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 n=this.chart,r=this.options.setContext(this.getContext()),o=r.enabled&&n.options.animation&&r.animations,a=new Zde(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Gii(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){let{callbacks:r}=n,o=Ay(r,"beforeTitle",this,e),a=Ay(r,"title",this,e),c=Ay(r,"afterTitle",this,e),m=[];return m=yI(m,kA(o)),m=yI(m,kA(a)),m=yI(m,kA(c)),m}getBeforeBody(e,n){return $Je(Ay(n.callbacks,"beforeBody",this,e))}getBody(e,n){let{callbacks:r}=n,o=[];return Uc(e,a=>{let c={before:[],lines:[],after:[]},m=qJe(r,a);yI(c.before,kA(Ay(m,"beforeLabel",this,a))),yI(c.lines,Ay(m,"label",this,a)),yI(c.after,kA(Ay(m,"afterLabel",this,a))),o.push(c)}),o}getAfterBody(e,n){return $Je(Ay(n.callbacks,"afterBody",this,e))}getFooter(e,n){let{callbacks:r}=n,o=Ay(r,"beforeFooter",this,e),a=Ay(r,"footer",this,e),c=Ay(r,"afterFooter",this,e),m=[];return m=yI(m,kA(o)),m=yI(m,kA(a)),m=yI(m,kA(c)),m}_createItems(e){let n=this._active,r=this.chart.data,o=[],a=[],c=[],m=[],g,C;for(g=0,C=n.length;ge.filter(w,P,R,r))),e.itemSort&&(m=m.sort((w,P)=>e.itemSort(w,P,r))),Uc(m,w=>{let P=qJe(e.callbacks,w);o.push(Ay(P,"labelColor",this,w)),a.push(Ay(P,"labelPointStyle",this,w)),c.push(Ay(P,"labelTextColor",this,w))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=c,this.dataPoints=m,m}update(e,n){let r=this.options.setContext(this.getContext()),o=this._active,a,c=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let m=xW[r.position].call(this,o,this._eventPosition);c=this._createItems(r),this.title=this.getTitle(c,r),this.beforeBody=this.getBeforeBody(c,r),this.body=this.getBody(c,r),this.afterBody=this.getAfterBody(c,r),this.footer=this.getFooter(c,r);let g=this._size=HJe(this,r),C=Object.assign({},m,g),w=GJe(this.chart,r,C),P=jJe(r,C,w,this.chart);this.xAlign=w.xAlign,this.yAlign=w.yAlign,a={opacity:1,x:P.x,y:P.y,width:g.width,height:g.height,caretX:m.x,caretY:m.y}}this._tooltipItems=c,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,o){let a=this.getCaretPosition(e,r,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,r){let{xAlign:o,yAlign:a}=this,{caretSize:c,cornerRadius:m}=r,{topLeft:g,topRight:C,bottomLeft:w,bottomRight:P}=EA(m),{x:R,y:z}=e,{width:H,height:j}=n,K,ne,me,Te,Ie,ye;return a==="center"?(Ie=z+j/2,o==="left"?(K=R,ne=K-c,Te=Ie+c,ye=Ie-c):(K=R+H,ne=K+c,Te=Ie-c,ye=Ie+c),me=K):(o==="left"?ne=R+Math.max(g,w)+c:o==="right"?ne=R+H-Math.max(C,P)-c:ne=this.caretX,a==="top"?(Te=z,Ie=Te-c,K=ne-c,me=ne+c):(Te=z+j,Ie=Te+c,K=ne+c,me=ne-c),ye=Te),{x1:K,x2:ne,x3:me,y1:Te,y2:Ie,y3:ye}}drawTitle(e,n,r){let o=this.title,a=o.length,c,m,g;if(a){let C=iO(r.rtl,this.x,this.width);for(e.x=Yde(this,r.titleAlign,r),n.textAlign=C.textAlign(r.titleAlign),n.textBaseline="middle",c=sp(r.titleFont),m=r.titleSpacing,n.fillStyle=r.titleColor,n.font=c.string,g=0;gme!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,FL(e,{x:j,y:H,w:C,h:g,radius:ne}),e.fill(),e.stroke(),e.fillStyle=c.backgroundColor,e.beginPath(),FL(e,{x:K,y:H+1,w:C-2,h:g-2,radius:ne}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(j,H,C,g),e.strokeRect(j,H,C,g),e.fillStyle=c.backgroundColor,e.fillRect(K,H+1,C-2,g-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){let{body:o}=this,{bodySpacing:a,bodyAlign:c,displayColors:m,boxHeight:g,boxWidth:C,boxPadding:w}=r,P=sp(r.bodyFont),R=P.lineHeight,z=0,H=iO(r.rtl,this.x,this.width),j=function(Ae){n.fillText(Ae,H.x(e.x+z),e.y+R/2),e.y+=R+a},K=H.textAlign(c),ne,me,Te,Ie,ye,fe,Re;for(n.textAlign=c,n.textBaseline="middle",n.font=P.string,e.x=Yde(this,K,r),n.fillStyle=r.bodyColor,Uc(this.beforeBody,j),z=m&&K!=="right"?c==="center"?C/2+w:C+2+w:0,Ie=0,fe=o.length;Ie0&&n.stroke()}_updateAnimationTarget(e){let n=this.chart,r=this.$animations,o=r&&r.x,a=r&&r.y;if(o||a){let c=xW[e.position].call(this,this._active,this._eventPosition);if(!c)return;let m=this._size=HJe(this,e),g=Object.assign({},c,this._size),C=GJe(n,e,g),w=jJe(e,g,C,n);(o._to!==w.x||a._to!==w.y)&&(this.xAlign=C.xAlign,this.yAlign=C.yAlign,this.width=m.width,this.height=m.height,this.caretX=c.x,this.caretY=c.y,this._resolveAnimations().update(this,w))}}_willRender(){return!!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let c=Ym(n.padding),m=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&m&&(e.save(),e.globalAlpha=r,this.drawBackground(a,e,o,n),Bde(e,n.textDirection),a.y+=c.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),Vde(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,o=e.map(({datasetIndex:m,index:g})=>{let C=this.chart.getDatasetMeta(m);if(!C)throw new Error("Cannot find a dataset at index "+m);return{datasetIndex:m,element:C.data[g],index:g}}),a=!O6(r,o),c=this._positionChanged(o,n);(a||c)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],c=this._getActiveElements(e,a,n,r),m=this._positionChanged(c,e),g=n||!O6(c,a)||m;return g&&(this._active=c,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),g}_getActiveElements(e,n,r,o){let a=this.options;if(e.type==="mouseout")return[];if(!o)return n.filter(m=>this.chart.data.datasets[m.datasetIndex]&&this.chart.getDatasetMeta(m.datasetIndex).controller.getParsed(m.index)!==void 0);let c=this.chart.getElementsAtEventForMode(e,a.mode,a,r);return a.reverse&&c.reverse(),c}_positionChanged(e,n){let{caretX:r,caretY:o,options:a}=this,c=xW[a.position].call(this,e,n);return c!==!1&&(r!==c.x||o!==c.y)}}return t})(),jii={id:"tooltip",_element:YJe,positioners:xW,afterInit(t,i,e){e&&(t.tooltip=new YJe({chart:t,options:e}))},beforeUpdate(t,i,e){t.tooltip&&t.tooltip.initialize(e)},reset(t,i,e){t.tooltip&&t.tooltip.initialize(e)},afterDraw(t){let i=t.tooltip;if(i&&i._willRender()){let e={tooltip:i};if(t.notifyPlugins("beforeTooltipDraw",$e(pe({},e),{cancelable:!0}))===!1)return;i.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,i){if(t.tooltip){let e=i.replay;t.tooltip.handleEvent(i.event,e,i.inChartArea)&&(i.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,i)=>i.bodyFont.size,boxWidth:(t,i)=>i.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:Iet},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"]},$ii=Object.freeze({__proto__:null,Colors:nii,Decimation:sii,Filler:Eii,Legend:Rii,SubTitle:Fii,Title:Nii,Tooltip:jii}),qii=(t,i,e,n)=>(typeof i=="string"?(e=t.push(i)-1,n.unshift({index:e,label:i})):isNaN(i)&&(e=null),e);function Yii(t,i,e,n){let r=t.indexOf(i);if(r===-1)return qii(t,i,e,n);let o=t.lastIndexOf(i);return r!==o?e:r}var Kii=(t,i)=>t===null?null:qm(Math.round(t),0,i);function KJe(t){let i=this.getLabels();return t>=0&&t{class t extends VL{static id="category";static defaults={ticks:{callback:KJe}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:o,label:a}of n)r[o]===a&&r.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(al(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:Yii(r,e,fs(n,e),this._addedLabels),Kii(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(o=this.getLabels().length-1)),this.min=r,this.max=o}buildTicks(){let e=this.min,n=this.max,r=this.options.offset,o=[],a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let c=e;c<=n;c++)o.push({value:c});return o}getLabelForValue(e){return KJe.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 n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}return t})();function Qii(t,i){let e=[],{bounds:r,step:o,min:a,max:c,precision:m,count:g,maxTicks:C,maxDigits:w,includeBounds:P}=t,R=o||1,z=C-1,{min:H,max:j}=i,K=!al(a),ne=!al(c),me=!al(g),Te=(j-H)/(w+1),Ie=_de((j-H)/z/R)*R,ye,fe,Re,Ae;if(Ie<1e-14&&!K&&!ne)return[{value:H},{value:j}];Ae=Math.ceil(j/Ie)-Math.floor(H/Ie),Ae>z&&(Ie=_de(Ae*Ie/z/R)*R),al(m)||(ye=Math.pow(10,m),Ie=Math.ceil(Ie*ye)/ye),r==="ticks"?(fe=Math.floor(H/Ie)*Ie,Re=Math.ceil(j/Ie)*Ie):(fe=H,Re=j),K&&ne&&o&&TAe((c-a)/o,Ie/1e3)?(Ae=Math.round(Math.min((c-a)/Ie,C)),Ie=(c-a)/Ae,fe=a,Re=c):me?(fe=K?a:fe,Re=ne?c:Re,Ae=g-1,Ie=(Re-fe)/Ae):(Ae=(Re-fe)/Ie,RL(Ae,Math.round(Ae),Ie/1e3)?Ae=Math.round(Ae):Ae=Math.ceil(Ae));let ke=Math.max(vde(Ie),vde(fe));ye=Math.pow(10,al(m)?ke:m),fe=Math.round(fe*ye)/ye,Re=Math.round(Re*ye)/ye;let Qe=0;for(K&&(P&&fe!==a?(e.push({value:a}),fec)break;e.push({value:we})}return ne&&P&&Re!==c?e.length&&RL(e[e.length-1].value,c,WJe(c,Te,t))?e[e.length-1].value=c:e.push({value:c}):(!ne||Re===c)&&e.push({value:Re}),e}function WJe(t,i,{horizontal:e,minRotation:n}){let r=Jv(n),o=(e?Math.sin(r):Math.cos(r))||.001,a=.75*i*(""+t).length;return Math.min(i/o,a)}var L6=class extends VL{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,e){return al(i)||(typeof i=="number"||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this,a=m=>r=e?r:m,c=m=>o=n?o:m;if(i){let m=TC(r),g=TC(o);m<0&&g<0?c(0):m>0&&g>0&&a(0)}if(r===o){let m=o===0?1:Math.abs(o*.05);c(o+m),i||a(r-m)}this.min=r,this.max=o}getTickLimit(){let i=this.options.ticks,{maxTicksLimit:e,stepSize:n}=i,r;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,e=i.ticks,n=this.getTickLimit();n=Math.max(2,n);let r={maxTicks:n,bounds:i.bounds,min:i.min,max:i.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Qii(r,o);return i.bounds==="ticks"&&yde(a,this,"value"),i.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let i=this.ticks,e=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){let r=(n-e)/Math.max(i.length-1,1)/2;e-=r,n+=r}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(i){return NL(i,this.chart.options.locale,this.options.ticks.format)}},fDe=class extends L6{static id="linear";static defaults={ticks:{callback:dW.formatters.numeric}};determineDataLimits(){let{min:i,max:e}=this.getMinMax(!0);this.min=Vu(i)?i:0,this.max=Vu(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let i=this.isHorizontal(),e=i?this.width:this.height,n=Jv(this.options.ticks.minRotation),r=(i?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(i){return i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},EW=t=>Math.floor(fI(t)),BL=(t,i)=>Math.pow(10,EW(t)+i);function QJe(t){return t/Math.pow(10,EW(t))===1}function ZJe(t,i,e){let n=Math.pow(10,e),r=Math.floor(t/n);return Math.ceil(i/n)-r}function Zii(t,i){let e=i-t,n=EW(e);for(;ZJe(t,i,n)>10;)n++;for(;ZJe(t,i,n)<10;)n--;return Math.min(n,EW(t))}function Xii(t,{min:i,max:e}){i=v0(t.min,i);let n=[],r=EW(i),o=Zii(i,e),a=o<0?Math.pow(10,Math.abs(o)):1,c=Math.pow(10,o),m=r>o?Math.pow(10,r):0,g=Math.round((i-m)*a)/a,C=Math.floor((i-m)/c/10)*c*10,w=Math.floor((g-C)/Math.pow(10,o)),P=v0(t.min,Math.round((m+C+w*Math.pow(10,o))*a)/a);for(;P=10?w=w<15?15:20:w++,w>=20&&(o++,w=2,a=o>=0?1:a),P=Math.round((m+C+w*Math.pow(10,o))*a)/a;let R=v0(t.max,P);return n.push({value:R,major:QJe(R),significand:w}),n}var gDe=class extends VL{static id="logarithmic";static defaults={ticks:{callback:dW.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,e){let n=L6.prototype.parse.apply(this,[i,e]);if(n===0){this._zero=!0;return}return Vu(n)&&n>0?n:null}determineDataLimits(){let{min:i,max:e}=this.getMinMax(!0);this.min=Vu(i)?Math.max(0,i):null,this.max=Vu(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Vu(this._userMin)&&(this.min=i===BL(this.min,0)?BL(this.min,-1):BL(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:i,maxDefined:e}=this.getUserBounds(),n=this.min,r=this.max,o=c=>n=i?n:c,a=c=>r=e?r:c;n===r&&(n<=0?(o(1),a(10)):(o(BL(n,-1)),a(BL(r,1)))),n<=0&&o(BL(r,-1)),r<=0&&a(BL(n,1)),this.min=n,this.max=r}buildTicks(){let i=this.options,e={min:this._userMin,max:this._userMax},n=Xii(e,this);return i.bounds==="ticks"&&yde(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(i){return i===void 0?"0":NL(i,this.chart.options.locale,this.options.ticks.format)}configure(){let i=this.min;super.configure(),this._startValue=fI(i),this._valueRange=fI(this.max)-fI(i)}getPixelForValue(i){return(i===void 0||i===0)&&(i=this.min),i===null||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(fI(i)-this._startValue)/this._valueRange)}getValueForPixel(i){let e=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+e*this._valueRange)}};function _De(t){let i=t.ticks;if(i.display&&t.display){let e=Ym(i.backdropPadding);return fs(i.font&&i.font.size,$d.font.size)+e.height}return 0}function Jii(t,i,e){return e=Gd(e)?e:[e],{w:RAe(t,i.string,e),h:e.length*i.lineHeight}}function XJe(t,i,e,n,r){return t===n||t===r?{start:i-e/2,end:i+e/2}:tr?{start:i-e,end:i}:{start:i,end:i+e}}function eni(t){let i={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({},i),n=[],r=[],o=t._pointLabels.length,a=t.options.pointLabels,c=a.centerPointLabels?vc/o:0;for(let m=0;mi.r&&(c=(n.end-i.r)/o,t.r=Math.max(t.r,i.r+c)),r.starti.b&&(m=(r.end-i.b)/a,t.b=Math.max(t.b,i.b+m))}function ini(t,i,e){let n=t.drawingArea,{extra:r,additionalAngle:o,padding:a,size:c}=e,m=t.getPointPosition(i,n+r+a,o),g=Math.round(sW(hf(m.angle+ap))),C=sni(m.y,c.h,g),w=oni(g),P=ani(m.x,c.w,w);return{visible:!0,x:m.x,y:C,textAlign:w,left:P,top:C,right:P+c.w,bottom:C+c.h}}function nni(t,i){if(!i)return!0;let{left:e,top:n,right:r,bottom:o}=t;return!(w1({x:e,y:n},i)||w1({x:e,y:o},i)||w1({x:r,y:n},i)||w1({x:r,y:o},i))}function rni(t,i,e){let n=[],r=t._pointLabels.length,o=t.options,{centerPointLabels:a,display:c}=o.pointLabels,m={extra:_De(o)/2,additionalAngle:a?vc/r:0},g;for(let C=0;C270||e<90)&&(t-=i),t}function lni(t,i,e){let{left:n,top:r,right:o,bottom:a}=e,{backdropColor:c}=i;if(!al(c)){let m=EA(i.borderRadius),g=Ym(i.backdropPadding);t.fillStyle=c;let C=n-g.left,w=r-g.top,P=o-n+g.width,R=a-r+g.height;Object.values(m).some(z=>z!==0)?(t.beginPath(),FL(t,{x:C,y:w,w:P,h:R,radius:m}),t.fill()):t.fillRect(C,w,P,R)}}function cni(t,i){let{ctx:e,options:{pointLabels:n}}=t;for(let r=i-1;r>=0;r--){let o=t._pointLabelItems[r];if(!o.visible)continue;let a=n.setContext(t.getPointLabelContext(r));lni(e,a,o);let c=sp(a.font),{x:m,y:g,textAlign:C}=o;TA(e,t._pointLabels[r],m,g+c.lineHeight/2,c,{color:a.color,textAlign:C,textBaseline:"middle"})}}function Tet(t,i,e,n){let{ctx:r}=t;if(e)r.arc(t.xCenter,t.yCenter,i,0,jd);else{let o=t.getPointPosition(0,i);r.moveTo(o.x,o.y);for(let a=1;a{let r=ad(this.options.pointLabels.callback,[e,n],this);return r||r===0?r:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){let i=this.options;i.display&&i.pointLabels.display?eni(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,e,n,r){this.xCenter+=Math.floor((i-e)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,e,n,r))}getIndexAngle(i){let e=jd/(this._pointLabels.length||1),n=this.options.startAngle||0;return hf(i*e+Jv(n))}getDistanceFromCenterForValue(i){if(al(i))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*e:(i-this.min)*e}getValueForDistanceFromCenter(i){if(al(i))return NaN;let e=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(i){let e=this._pointLabels||[];if(i>=0&&i{if(w!==0||w===0&&this.min<0){m=this.getDistanceFromCenterForValue(C.value);let P=this.getContext(w),R=r.setContext(P),z=o.setContext(P);dni(this,R,m,a,z)}}),n.display){for(i.save(),c=a-1;c>=0;c--){let C=n.setContext(this.getPointLabelContext(c)),{color:w,lineWidth:P}=C;!P||!w||(i.lineWidth=P,i.strokeStyle=w,i.setLineDash(C.borderDash),i.lineDashOffset=C.borderDashOffset,m=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),g=this.getPointPosition(c,m),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(g.x,g.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){let i=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;let r=this.getIndexAngle(0),o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(r),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((c,m)=>{if(m===0&&this.min>=0&&!e.reverse)return;let g=n.setContext(this.getContext(m)),C=sp(g.font);if(o=this.getDistanceFromCenterForValue(this.ticks[m].value),g.showLabelBackdrop){i.font=C.string,a=i.measureText(c.label).width,i.fillStyle=g.backdropColor;let w=Ym(g.backdropPadding);i.fillRect(-a/2-w.left,-o-C.size/2-w.top,a+w.width,C.size+w.height)}TA(i,c.label,0,-o,C,{color:g.color,strokeColor:g.textStrokeColor,strokeWidth:g.textStrokeWidth})}),i.restore()}drawTitle(){}},oue={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}},Dy=Object.keys(oue);function JJe(t,i){return t-i}function eet(t,i){if(al(i))return null;let e=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts,a=i;return typeof n=="function"&&(a=n(a)),Vu(a)||(a=typeof n=="string"?e.parse(a,n):e.parse(a)),a===null?null:(r&&(a=r==="week"&&(eO(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,r)),+a)}function tet(t,i,e,n){let r=Dy.length;for(let o=Dy.indexOf(t);o=Dy.indexOf(e);o--){let a=Dy[o];if(oue[a].common&&t._adapter.diff(r,n,a)>=i-1)return a}return Dy[e?Dy.indexOf(e):0]}function mni(t){for(let i=Dy.indexOf(t)+1,e=Dy.length;i=i?e[n]:e[r];t[o]=!0}}function hni(t,i,e,n){let r=t._adapter,o=+r.startOf(i[0].value,n),a=i[i.length-1].value,c,m;for(c=o;c<=a;c=+r.add(c,1,n))m=e[c],m>=0&&(i[m].major=!0);return i}function net(t,i,e){let n=[],r={},o=i.length,a,c;for(a=0;a{class t extends VL{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,n={}){let r=e.time||(e.time={}),o=this._adapter=new Tei._date(e.adapters.date);o.init(n),ML(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:eet(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||"day",{min:o,max:a,minDefined:c,maxDefined:m}=this.getUserBounds();function g(C){!c&&!isNaN(C.min)&&(o=Math.min(o,C.min)),!m&&!isNaN(C.max)&&(a=Math.max(a,C.max))}(!c||!m)&&(g(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&g(this.getMinMax(!1))),o=Vu(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),a=Vu(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let e=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,c=this.max,m=DAe(o,a,c);return this._unit=n.unit||(r.autoSkip?tet(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):pni(this,m.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:mni(this._unit),this.initOffsets(o),e.reverse&&m.reverse(),net(this,m,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,o,a;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?n=1-o:n=(this.getDecimalForValue(e[1])-o)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?r=a:r=(a-this.getDecimalForValue(e[e.length-2]))/2);let c=e.length<3?.5:.25;n=qm(n,0,c),r=qm(r,0,c),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let e=this._adapter,n=this.min,r=this.max,o=this.options,a=o.time,c=a.unit||tet(a.minUnit,n,r,this._getLabelCapacity(n)),m=fs(o.ticks.stepSize,1),g=c==="week"?a.isoWeekday:!1,C=eO(g)||g===!0,w={},P=n,R,z;if(C&&(P=+e.startOf(P,"isoWeek",g)),P=+e.startOf(P,C?"day":c),e.diff(r,n,c)>1e5*m)throw new Error(n+" and "+r+" are too far apart with stepSize of "+m+" "+c);let H=o.ticks.source==="data"&&this.getDataTimestamps();for(R=P,z=0;R+j)}getLabelForValue(e){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){let o=this.options.time.displayFormats,a=this._unit,c=n||o[a];return this._adapter.format(e,c)}_tickFormatFunction(e,n,r,o){let a=this.options,c=a.ticks.callback;if(c)return ad(c,[e,n,r],this);let m=a.time.displayFormats,g=this._unit,C=this._majorUnit,w=g&&m[g],P=C&&m[C],R=r[n],z=C&&P&&R&&R.major;return this._adapter.format(e,o||(z?P:w))}generateTickLabels(e){let n,r,o;for(n=0,r=e.length;n0?m:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n=t[n].pos&&i<=t[r].pos&&({lo:n,hi:r}=S1(t,"pos",i)),{pos:o,time:c}=t[n],{pos:a,time:m}=t[r]):(i>=t[n].time&&i<=t[r].time&&({lo:n,hi:r}=S1(t,"time",i)),{time:o,pos:c}=t[n],{time:a,pos:m}=t[r]);let g=a-o;return g?c+(m-c)*(i-o)/g:c}var bDe=class extends vDe{static id="timeseries";static defaults=vDe.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let i=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(i);this._minPos=Kde(e,this.min),this._tableRange=Kde(e,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){let{min:e,max:n}=this,r=[],o=[],a,c,m,g,C;for(a=0,c=i.length;a=e&&g<=n&&r.push(g);if(r.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,c=r.length;ar-o)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?i=this.normalize(e.concat(n)):i=e.length?e:n,i=this._cache.all=i,i}getDecimalForValue(i){return(Kde(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){let e=this._offsets,n=this.getDecimalForPixel(i)/e.factor-e.end;return Kde(this._table,n*this._tableRange+this._minPos,!0)}},fni=Object.freeze({__proto__:null,CategoryScale:Wii,LinearScale:fDe,LogarithmicScale:gDe,RadialLinearScale:yDe,TimeScale:vDe,TimeSeriesScale:bDe}),Eet=[Iei,Qti,$ii,fni];var Tp=$e(pe({},A1.defaults.plugins.tooltip),{backgroundColor:"rgb(255,255,255)",titleFont:{family:"Roboto, sans-serif",size:12,style:"normal",lineHeight:A1.defaults.font.lineHeight,weight:A1.defaults.font.weight},bodyFont:{family:"Roboto, sans-serif",size:14,style:A1.defaults.font.style,lineHeight:A1.defaults.font.lineHeight,weight:A1.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 B6=class t{id;displayName;description;chart;trendChart;resultSize;static fromObj(i){let e=i.description?i.description.text:null,n,r;if(i.chart){let o=i.chart.data.datasets[0].format||"1.0-2";n=t._processChartObject(i.chart,o)}if(i.trendChart){let o=i.trendChart.data.datasets[0].format||"1.0-2";r=t._processChartObject(i.trendChart,o)}return new t(i.id,i.name,e,n,r,i.resultSize)}static _processChartObject(i,e="1.0-2"){return i.options.scales.yAxes[0].ticks&&(i.options.scales.yAxes[0].ticks.callback=gni()),i.options.maintainAspectRatio=!1,i.options.tooltips=Tp,i.options.tooltips.callbacks={label:_ni(e),title:()=>{}},i}constructor(i,e,n,r,o,a){this.id=i,this.displayName=e,this.description=n,this.chart=r,this.trendChart=o,this.resultSize=a}};function gni(){return function(t){let i={minimumFractionDigits:0,maximumFractionDigits:2};return new Intl.NumberFormat(void 0,i).format(t)}}function _ni(t){return function(i){let e=yni(t);return new Intl.NumberFormat(void 0,e).format(i.yLabel)}}function yni(t){let i=t.split(".")[1],e=i.split("-")[0],n=i.split("-")[1];return{minimumFractionDigits:parseInt(e,10),maximumFractionDigits:parseInt(n,10)}}var aue=class t{id;name;createdDate;modifiedDate;highestPermission;operatingNumberIds;static fromObj(i){let e=i.createdDate?new Date(i.createdDate):null,n=i.modifiedDate?new Date(i.modifiedDate):null;return new t(i.id,i.name,e,n,i.highestPermission,i.operatingNumberIds)}resourceName=tn.CLINIC_OPERATING_NUMBER_GROUP;constructor(i,e,n,r,o,a=[]){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o,this.operatingNumberIds=a}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.operatingNumberIds.slice())}hasErrors(){return this.name?null:"Bitte geben Sie einen Namen f\xFCr Ihre Kennzahlengruppe an."}};var oO=class t extends aue{type;static fromObj(i){let e=i.createdDate?new Date(i.createdDate):null,n=i.modifiedDate?new Date(i.modifiedDate):null;return new t(i.id,i.name,e,n,i.highestPermission,i.operatingNumberIds,i.type)}constructor(i,e,n,r,o,a=[],c="pre-defined"){super(i,e,n,r,o,a),this.type=c}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.operatingNumberIds.slice(),this.type)}};var wDe="university",DW={type:"universityType",category:"clinic",displayName:{de:"Universit\xE4tskliniken"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new zL(t.universityType))},fromCondition(t){return Promise.resolve(new zL(t.flag))},newInstance(){return Promise.resolve(new zL(Xv.WITH_UNIVERSITIES))}},zL=(()=>{class t extends _n{universityType;static Specification=DW;constructor(e){super(DW.type),this.universityType=e}equals(e){return super.equals(e)&&gr.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 SDe(this.universityType))}toJSON(){return{type:this.type,universityType:this.universityType}}toText(){return"Universit\xE4tskliniken"}toValue(){return this.universityType}}return t})(),SDe=class extends Is{flag;constructor(i){super(wDe),this.flag=i}toJSON(){return{[this.id]:{flag:this.flag}}}};var aO=class t extends xi{codeSpectrumId;weight;static fromObject(i){return new t(i.name,i.description,i.codingSystem,i.hierarchyElementType,i.year,i.codeSpectrumId,i.weight)}constructor(i,e,n,r,o,a,c){super(i,e,n,r,o),this.codeSpectrumId=a,this.weight=c}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year,this.codeSpectrumId,this.weight)}toJSON(){return $e(pe({},super.toJSON()),{codeSpectrumId:this.codeSpectrumId,weight:this.weight})}};var V6=class t{id;name;createdDate;modifiedDate;highestPermission;resourceName=tn.CODE_SPECTRUM;static fromObject(i){let e=i.createdDate?new Date(i.createdDate):null,n=i.modifiedDate?new Date(i.modifiedDate):null;return new t(i.id,i.name,e,n,i.highestPermission)}constructor(i,e,n,r,o){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o}isValid(){return!!this.name}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission)}};var sue=class extends PM{};var IDe="drgCode",UL={type:"drgCode",category:"case",displayName:{de:"DRG-Ziffer"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new EC(t.codes.map(i=>xi.fromObject(i))))},fromCondition(t){return Promise.resolve(new EC(t.includes.map(i=>xi.fromObject(i))))},newInstance(){return Promise.resolve(new EC([]))}},EC=(()=>{class t extends _n{codes;static Specification=UL;constructor(e){super(UL.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.codes,e.codes,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine DRG-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new z6(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"DRG-Ziffer"}toValue(){return this.codes}}return t})(),z6=class extends Zn{constructor(i,e){super(IDe,i,e)}};var HL={type:"codes",category:"case",displayName:{de:"Ziffer-Spektra"},sortingIndex:8,occurrence:"multiple",fromObject(t){let i=t.matching||"exact",e;return t.codeTypeSpecification&&(e=t.codeTypeSpecification),Promise.resolve(new MA(t.codeSpectrumIds||[],t.codingSystem,i,e,t.codeTypeClassification,t.includes,t.grouperVersionYear))},fromCondition(t){let i=[];return t.includes&&(i=t.includes.map(e=>e).map(e=>new aO(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),t.excludes&&(i=t.excludes.map(e=>e).map(e=>new aO(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),Promise.resolve(new MA(t.codeSpectrumIds,t.codingSystem,t.matching,t.codeTypeSpecification,t.codeTypeClassification,!t?.excludes,t.grouperVersionYear,i))},newInstance(){return Promise.resolve(new MA([],"OPS"))}},MA=(()=>{class t extends _n{codeSpectrumIds;codingSystem;matching;codeTypeSpecification;codeTypeClassification;includes;grouperVersionYear;codes;static Specification=HL;constructor(e,n,r="exact",o,a,c=!0,m,g=[]){super(HL.type),this.codeSpectrumIds=e,this.codingSystem=n,this.matching=r,this.codeTypeSpecification=o,this.codeTypeClassification=a,this.includes=c,this.grouperVersionYear=m,this.codes=g}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)&&Ni.equals(this.codeSpectrumIds,e.codeSpectrumIds)&&gr.equals(this.codingSystem,e.codingSystem)&&gr.equals(this.matching,e.matching)&&gr.equals(this.codeTypeClassification,e.codeTypeClassification,(n,r)=>gr.equals(n?.name,r?.name)&&gr.equals(n?.numberOfDigit,r?.numberOfDigit))&&gr.equals(this.codeTypeSpecification,e.codeTypeSpecification,(n,r)=>JSON.stringify(n)===JSON.stringify(r))&&gr.equals(this.includes,e.includes)&&gr.equals(this.grouperVersionYear,e.grouperVersionYear)}getChildResources(){let e=[];return this.codeSpectrumIds.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),{[tn.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(){let e=[this.codingSystem.toString()],n=[];if(this.codeTypeSpecification&&n.push(bA[this.codeTypeSpecification]),this.codeTypeClassification&&n.push(this.codeTypeClassification.name),e.push(this.includes?"einschlie\xDFend":"ausschlie\xDFend"),this.matching)switch(this.matching){case"exact":{e.push("exakt");break}case"leftAnchored":{e.push("aufl\xF6send");break}}let r=n.length>0?`Ziffer-Spektrum nach ${n.join(" ")}`:"Ziffer-Spektrum";return this.codeSpectrumIds.length===1?`ein ${e.join(" ")} ${r}`:`${this.codeSpectrumIds.length} ${e.join(" ")} ${r}`}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(r=>{this.codes=r;let o=null;switch(this.codingSystem){case"ICD-10-UK":case"ICD-10-AT":case"ICD-10-GM":o=this._toIcdCondition();break;case"OPS":o=this._toOpsCondition();break;case"G-DRG":this.grouperVersionYear?o=this.includes?new J$(this.grouperVersionYear,this.codes,null):new J$(this.grouperVersionYear,null,this.codes):o=this.includes?new z6(this.codes,null):new z6(null,this.codes);break;default:throw new Error(`Invalid coding system: ${this.codingSystem}`)}return o})}_toIcdCondition(){let e=this.codeTypeSpecification,n;switch(e){case"secondaryDiagnosis":{n=this._toSecondaryDiagnosisCondition();break}case"skCode":{n=this._toIcdSecondaryCode();break}default:{n=this._toMainDiagnosisCondition();break}}return this.includes?n.includes=this.codes:n.excludes=this.codes,n}_toMainDiagnosisCondition(){return this.matching==="exact"?new H5(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new G5(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 q5(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Y5(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,n;switch(e){case"mainProcedure":{n=this._toOpsMainProcedure();break}default:{n=this._toOpsCode();break}}return this.includes?n.includes=this.codes:n.excludes=this.codes,n}_toOpsMainProcedure(){return this.matching==="exact"?new Dae(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new kae(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 Oae(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Rae(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 qM(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Mae(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}}return t})();var GL={type:"dismissalDate",category:"case",displayName:{de:"Entlass-Datum"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new sO(qP.fromObject(t.timeSelection)))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new sO(new Zb(new Mm(new Date,new Date))))}},sO=(()=>{class t extends _n{timeSelection;static Specification=GL;constructor(e){super(GL.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 $5(e.intervalRelative))}default:{let e=this.timeSelection;return Promise.resolve(new BE(e.interval))}}}toJSON(){return{type:this.type,timeSelection:this.timeSelection.toJSON()}}toText(){return"Entlass-Datum"}toValue(){return this.timeSelection}getOverrideProperties(e,n){return[new su(e,"dismissalDate",this.timeSelection,this.timeSelection,"possible",void 0,(r,o)=>r.equals(o),r=>r.clone())]}overrideClone(e){let n=lu.overrideProperty(this.timeSelection,"dismissalDate",e,r=>r.clone());return n?new t(n):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 kW={type:"dismissalYear",category:"case",displayName:{de:"Entlass Jahr"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new AC(t.year))},fromCondition(t){return t.includes&&t.includes.length===1?Promise.resolve(new AC(t.includes[0])):Promise.reject(new Error("Missing DismissalYear"))},newInstance(){return Promise.resolve(new AC(new Date().getFullYear()))}},AC=(()=>{class t extends _n{year;static Specification=kW;constructor(e){super(kW.type),this.year=e}clone(){return new t(this.year)}equals(e){return super.equals(e)&&gr.equals(this.year,e.year)}validationToText(){return this.year?"":"Entlass-Jahr auw\xE4hlen"}toCondition(){return Promise.resolve(new py([this.year],[]))}toJSON(){return{type:this.type,year:this.year}}toText(){return"Entlass-Jahr"}toValue(){return this.year}}return t})();var OW={type:"dismissalYears",category:"case",displayName:{de:"Entlass Jahr"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new MW(t.years))},fromCondition(t){return Promise.resolve(new MW(t.includes))},newInstance(){return Promise.resolve(new MW([]))}},MW=(()=>{class t extends _n{years;static Specification=OW;constructor(e){super(OW.type),this.years=e}clone(){return new t([...this.years])}equals(e){return super.equals(e)&&Ni.equals(this.years,e.years)}validationToText(){return this.years.length===0?"Mindestens ein Entlass-Jahr ausw\xE4hlen":""}toCondition(){return Promise.resolve(new py(this.years,[]))}toJSON(){return{type:this.type,years:this.years}}toText(){return"Entlass-Jahr"}toValue(){return this.years}}return t})();var EDe="dismissalReason",RW={type:"dismissionCauses",category:"case",displayName:{de:"Entlassgrund"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new jL(t.dismissionCauses))},fromCondition(t){return Promise.resolve(new jL(t.includes))},newInstance(){return Promise.resolve(new jL([]))}},jL=(()=>{class t extends _n{dismissionCauses;static Specification=RW;constructor(e){super(RW.type),this.dismissionCauses=e}clone(){return new t([...this.dismissionCauses])}equals(e){return super.equals(e)&&Ni.equals(this.dismissionCauses,e.dismissionCauses)}validationToText(){return this.dismissionCauses.length===0?"Mindestens einen Entlassgrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new TDe(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})(),TDe=class extends Zn{constructor(i,e){super(EDe,i,e)}};var DDe="drgCodeExists",PW={type:"drgCodeExists",category:"case",displayName:{de:"DRG vorhanden"},sortingIndex:11,occurrence:"multiple",fromObject(t){return Promise.resolve(new $L(t.isNotNull??t._isNotNull))},fromCondition(t){return Promise.resolve(new $L(t.isNotNull))},newInstance(){return Promise.resolve(new $L(!0))}},$L=(()=>{class t extends _n{_isNotNull;static Specification=PW;constructor(e){super(PW.type),this._isNotNull=e}toCondition(){return Promise.resolve(new ADe(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})(),ADe=class extends Is{isNotNull;constructor(i){super(DDe),this.isNotNull=i}toJSON(){return{[this.id]:{isNotNull:this.isNotNull}}}};var MDe="drgMdc",qL={type:"drgMdc",category:"case",displayName:{de:"DRG-Kapitel"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new D1(t.codes.map(i=>xi.fromObject(i))))},fromCondition(t){return Promise.resolve(new D1(t.includes.map(i=>xi.fromObject(i))))},newInstance(){return Promise.resolve(new D1([]))}},D1=(()=>{class t extends _n{codes;static Specification=qL;constructor(e){super(qL.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.codes,e.codes,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens ein DRG-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new kDe(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"DRG-Kapitel"}toValue(){return this.codes}}return t})(),kDe=class extends Zn{constructor(i,e){super(MDe,i,e)}};var NW={type:"drivingTime",category:"case",displayName:{de:"Erreichbarkeit innerhalb Fahrzeit"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new U6(t.includeRanges))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new U6([]))}},U6=(()=>{class t extends _n{includeRanges;static Specification=NW;constructor(e){super(NW.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 UM(this.includeRanges.map(e=>this._rangeToCondition(e)))):Promise.resolve(new VE)}toJSON(){return{type:this.type,includeRanges:this.includeRanges}}toText(){return"Erreichbarkeit innerhalb einer Fahrzeit"}toValue(){return this.includeRanges}equals(e){return super.equals(e)&&Ni.equals(this.includeRanges,e.includeRanges,(n,r)=>gr.equals(n.min,r.min)&&gr.equals(n.max,r.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 Nu([new rF(e.min,dC.GREATER_OR_EQUAL),new rF(e.max,dC.LESS_OR_EQUAL)]):e.min!==void 0?new rF(e.min,dC.GREATER_OR_EQUAL):new rF(e.max,dC.LESS_OR_EQUAL)}}return t})();var ODe="fabKey",YL={type:"fabKeys",category:"case",displayName:{de:"\xA7301 Fachabteilungsschl\xFCssel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new gf(t.fabKeys))},fromCondition(t){return Promise.resolve(new gf(t.includes))},newInstance(){return Promise.resolve(new gf([]))}},gf=(()=>{class t extends _n{fabKeys;static Specification=YL;constructor(e){super(YL.type),this.fabKeys=e}clone(){return new t([...this.fabKeys])}equals(e){return super.equals(e)&&Ni.equals(this.fabKeys,e.fabKeys)}overrideClone(e){let n=this.fabKeys?lu.overrideProperties(this.fabKeys,"fabKey",e,r=>r):null;return new t(n)}getOverrideProperties(e,n){return this.fabKeys.map(r=>new su(e,"fabKey",r,r,"possible",n))}validationToText(){return this.fabKeys.length===0?"Mindestens einen \xA7301 Fachabteilungsschl\xFCssel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new H6(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})(),H6=class extends Zn{constructor(i,e){super(ODe,i,e)}};var PDe="fullyInpatientCases",FW={type:"fullyInpatientCases",category:"clinic",displayName:{de:"Fallzahl"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new KL(t.from,t.to))},fromCondition(t){return Promise.resolve(new KL(t.from,t.to))},newInstance(){return Promise.resolve(new KL(null,null))}},KL=(()=>{class t extends _n{from;to;static Specification=FW;constructor(e,n){super(FW.type),this.from=e,this.to=n}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&gr.equals(this.from,e.from)&&gr.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.fromio.create(i))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new WL(t.coordinate,t.value,vs.fromObj(t.clinicId),[...t.administrativeDistricts.map(i=>io.create(i))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new WL(null,null,null,[],[]))}},WL=(()=>{class t extends _n{coordinate;value;clinicId;administrativeDistricts;postalCodes;static Specification=LW;constructor(e,n,r,o,a){super(LW.type),this.coordinate=e,this.value=n,this.clinicId=r,this.administrativeDistricts=o,this.postalCodes=a}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)&&gr.equals(this.value,e.value)&&Ni.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 FDe(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 NDe(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),NDe=class{coordinate;value;clinicId;administrativeDistricts;postalCodes;constructor(i,e,n,r,o){this.coordinate=i,this.value=e,this.clinicId=n,this.administrativeDistricts=r,this.postalCodes=o}},FDe=class extends Is{_value;constructor(i){super(LDe),this._value=i}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(i=>i.getNumericValue())}}}};var zDe="drivingTimeAroundClinicId",BW={type:"drivingTimeAroundClinicId",category:"clinic",displayName:{de:"Fahrzeit"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new QL(t.coordinate,t.value,vs.fromObj(t.clinicId),[...t.administrativeDistricts.map(i=>io.create(i))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new QL(t.coordinate,t.value,vs.fromObj(t.clinicId),[...t.administrativeDistricts.map(i=>io.create(i))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new QL(null,10,null,[],[]))}},QL=(()=>{class t extends _n{coordinate;value;clinicId;administrativeDistricts;postalCodes;static Specification=BW;constructor(e,n,r,o,a){super(BW.type),this.coordinate=e,this.value=n,this.clinicId=r,this.administrativeDistricts=o,this.postalCodes=a}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)&&gr.equals(this.value,e.value)&&Ni.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 VDe(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 BDe(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),BDe=class{coordinate;value;clinicId;administrativeDistricts;postalCodes;constructor(i,e,n,r,o){this.coordinate=i,this.value=e,this.clinicId=n,this.administrativeDistricts=r,this.postalCodes=o}},VDe=class extends Is{_value;constructor(i){super(zDe),this._value=i}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(i=>i.getNumericValue())}}}};var HDe="icdChapter",ZL={type:"icdChapter",category:"case",displayName:{de:"ICD-Kapitel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new k1(t.chapters.map(i=>mf.fromObject(i))))},fromCondition(t){return Promise.resolve(new k1(t.includes.map(i=>mf.fromObject(i))))},newInstance(){return Promise.resolve(new k1([]))}},k1=(()=>{class t extends _n{chapters;static Specification=ZL;constructor(e){super(ZL.type),this.chapters=e}clone(){return new t([...this.chapters.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.chapters,e.chapters,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.chapters.length===0?"Mindestens ein ICD-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new UDe(this.chapters,[]))}toJSON(){return{type:this.type,chapters:this.chapters}}toText(){return"ICD-Kapitel"}toValue(){return this.chapters}}return t})(),UDe=class extends Zn{constructor(i,e){super(HDe,i,e)}};var jDe="icdGroup",XL={type:"icdGroup",category:"case",displayName:{de:"ICD-Gruppe"},sortingIndex:9,occurrence:"single",fromObject(t){return Promise.resolve(new M1(t.groups.map(i=>mf.fromObject(i))))},fromCondition(t){return Promise.resolve(new M1(t.includes.map(i=>mf.fromObject(i))))},newInstance(){return Promise.resolve(new M1([]))}},M1=(()=>{class t extends _n{groups;static Specification=XL;constructor(e){super(XL.type),this.groups=e}clone(){return new t([...this.groups.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.groups,e.groups,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.groups.length===0?"Mindestens eine ICD-Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new GDe(this.groups,[]))}toJSON(){return{type:this.type,groups:this.groups}}toText(){return"ICD-Gruppe"}toValue(){return this.groups}}return t})(),GDe=class extends Zn{constructor(i,e){super(jDe,i,e)}};var qDe="icdCode",JL={type:"icdCode",category:"case",displayName:{de:"ICD-Ziffer"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new DC(t.codes.map(i=>xi.fromObject(i))))},fromCondition(t){return Promise.resolve(new DC(t.includes.map(i=>xi.fromObject(i))))},newInstance(){return Promise.resolve(new DC([]))}},DC=(()=>{class t extends _n{codes;static Specification=JL;constructor(e){super(JL.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.codes,e.codes,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine ICD-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new $De(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"ICD-Ziffer"}toValue(){return this.codes}}return t})(),$De=class extends Zn{constructor(i,e){super(qDe,i,e)}};var KDe="inekCalculationLocation",VW={type:"inekCalculationLocation",category:"clinic",displayName:{de:"InEK Kalkulationskrankenh\xE4user"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new eB(t.inekCalculationLocation))},fromCondition(t){return Promise.resolve(new eB(t.flag))},newInstance(){return Promise.resolve(new eB(!0))}},eB=(()=>{class t extends _n{bool;static Specification=VW;constructor(e){super(VW.type),this.bool=e}clone(){return new t(this.bool)}equals(e){return super.equals(e)&&gr.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 YDe(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})(),YDe=class extends bae{flag;constructor(i){super(KDe,i),this.flag=i}};var WDe="inlierType",UW={type:"inlierType",category:"case",displayName:{de:"Verweildauer"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new zW(t.inlierType))},fromCondition(t){return Promise.resolve(new zW(t.equals))},newInstance(){return Promise.resolve(new zW("INLIER"))}},zW=(()=>{class t extends _n{inlierType;static Specification=UW;constructor(e){super(UW.type),this.inlierType=e}clone(){return new t(this.inlierType)}equals(e){return super.equals(e)&&gr.equals(this.inlierType,e.inlierType)}validationToText(){return this.valid()?"":"Verweildauer ausw\xE4hlen"}toCondition(){return Promise.resolve(new HW(this.inlierType))}toJSON(){return{type:this.type,inlierType:this.inlierType}}toText(){return"ein Typ der Verweildauer"}toValue(){return this.inlierType}}return t})(),HW=class extends L5{constructor(i){super(WDe,i)}};var GW={type:"inlierTypes",category:"case",displayName:{de:"Verweildauer"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new G6(t.inlierTypes))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new G6([]))}},G6=(()=>{class t extends _n{inlierTypes;static Specification=GW;constructor(e){super(GW.type),this.inlierTypes=e}clone(){return new t([...this.inlierTypes])}equals(e){return super.equals(e)&&Ni.equals(this.inlierTypes,e.inlierTypes)}validationToText(){return this.valid()?"":"Mindestens eine Verweildauer ausw\xE4hlen"}toCondition(){return Promise.resolve(new UM(this.inlierTypes.map(e=>new HW(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 ZDe="insuranceType",jW={type:"insuranceType",category:"person",displayName:{de:"Versicherungsart"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new lO(t.insuranceType))},fromCondition(t){return Promise.resolve(new lO(t.equals))},newInstance(){return Promise.resolve(new lO(null))}},lO=(()=>{class t extends _n{insuranceType;static Specification=jW;constructor(e){super(jW.type),this.insuranceType=e}clone(){return new t(this.insuranceType)}equals(e){return super.equals(e)&&gr.equals(this.insuranceType,e.insuranceType)}validationToText(){return this.valid()?"":"Versicherungsart ausw\xE4hlen"}toCondition(){return Promise.resolve(new QDe(this.insuranceType))}toJSON(){return{type:this.type,insuranceType:this.insuranceType}}toText(){return"Versicherungsart"}toValue(){return this.insuranceType}}return t})(),QDe=class extends L5{constructor(i){super(ZDe,i)}};var JDe="khtgLeistungsgruppe",j6={type:"khtgLeistungsgruppe",category:"case",displayName:{de:"KHTG Leistungsgruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new OA(t.leistungsgruppen))},fromCondition(t){return Promise.reject(new Error("not yet implemented"))},newInstance(){return Promise.resolve(new OA([]))}},OA=(()=>{class t extends _n{leistungsgruppen;static Specification=j6;constructor(e){super(j6.type),this.leistungsgruppen=e}clone(){return new t([...this.leistungsgruppen])}equals(e){return super.equals(e)&&Ni.equals(this.leistungsgruppen,e.leistungsgruppen)}validationToText(){return this.valid()?"":"Mindestens eine KHTG Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new XDe(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})(),XDe=class extends Zn{constructor(i,e){super(JDe,i,e)}};var eke="stateId",tB={type:"stateIds",category:"person",displayName:{de:"Bundesl\xE4nder"},sortingIndex:1,occurrence:"single",fromObject(t){return Promise.resolve(new ug(t.stateIds))},fromCondition(t){return Promise.resolve(new ug(t.includes))},newInstance(){return Promise.resolve(new ug([]))}},ug=(()=>{class t extends _n{stateIds;static Specification=tB;constructor(e){super(tB.type),this.stateIds=e}clone(){return new t([...this.stateIds??[]])}equals(e){return super.equals(e)&&Ni.equals(this.stateIds,e.stateIds)}validationToText(){return this.stateIds.length===0?"Mindestens ein Bundesland ausw\xE4hlen":""}toCondition(){return Promise.resolve(new iB(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})(),iB=class extends Zn{constructor(i,e){super(eke,i,e)}};var tke="postalCode",nB={type:"postalCodes",category:"person",displayName:{de:"Postleitzahlen"},sortingIndex:5,occurrence:"single",fromObject(t){return Promise.resolve(new _f(t.postalCodes))},fromCondition(t){return Promise.resolve(new _f(t.includes))},newInstance(){return Promise.resolve(new _f([]))}},_f=(()=>{class t extends _n{postalCodes;static Specification=nB;constructor(e){super(nB.type),this.postalCodes=e}clone(){return new t([...this.postalCodes])}equals(e){return super.equals(e)&&Ni.equals(this.postalCodes,e.postalCodes)}validationToText(){return this.postalCodes.length===0?"Mindestens eine Postleitzahl ausw\xE4hlen":""}toCondition(){return Promise.resolve(new rB(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})(),rB=class extends Zn{constructor(i,e){super(tke,i,e)}};var oB={type:"marketsSelection",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new O1(t.marketIds,t.stateIds,t.administrativeDistrictIds?t.administrativeDistrictIds.map(i=>io.create(i)):[],t.postalCodes))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new O1)}},O1=(()=>{class t extends _n{marketIds;stateIds;administrativeDistrictIds;postalCodes;static Specification=oB;constructor(e=[],n=[],r=[],o=[]){super(oB.type),this.marketIds=e,this.stateIds=n,this.administrativeDistrictIds=r,this.postalCodes=o}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)&&Ni.equals(this.marketIds,e.marketIds)&&Ni.equals(this.stateIds,e.stateIds)&&Ni.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(n,r)=>n.value===r.value)&&Ni.equals(this.postalCodes,e.postalCodes)}getChildResources(){return{[tn.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(r=>Object.values(r)).then(r=>new Nu(r.map(o=>this._propsToCondition(o.map(a=>a.label).map(a=>parseInt(a,10)),o.map(a=>a.children??[]).flat().map(a=>io.create(a.label)),o.map(a=>a.children??[]).flat().map(a=>a.children??[]).flat().map(a=>a.label))))):Promise.resolve(new VE)}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,n,r){let o=[];return e?.length>0&&o.push(new iB(e,[])),n?.length>0&&o.push(new hL(n,[])),r?.length>0&&o.push(new rB(r,[])),o.length===1?o[0]:new Nu(o)}}return t})();var $W={type:"markets",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new $6(t.marketIds))},fromCondition(t){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new $6([]))}},$6=(()=>{class t extends _n{marketIds;static Specification=$W;constructor(e){super($W.type),this.marketIds=e}clone(){return new t([...this.marketIds])}equals(e){return super.equals(e)&&Ni.equals(this.marketIds,e.marketIds)}overrideClone(e){return new t(this.marketIds?lu.overrideProperties(this.marketIds,"market",e,n=>n):[])}getOverrideProperties(e,n){return this.marketIds.map(r=>new su(e,"market",r,r,"possible"))}getChildResources(){return{[tn.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(r=>{let o=[],a=Object.values(r).flat().map(g=>parseInt(g.label,10));a.length>0&&o.push(new iB(a,[]));let c=Object.values(r).flat().map(g=>g.children??[]).flat().map(g=>io.create(g.label));c.length>0&&o.push(new hL(c,[]));let m=Object.values(r).flat().map(g=>g.children??[]).flat().map(g=>g.children??[]).flat().map(g=>g.label);return m.length>0&&o.push(new rB(m,[])),new Nu(o)})}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 nke="marketId",YW={type:"marketIds",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new qW(t.marketIds))},fromCondition(t){return Promise.resolve(new qW(t.includes))},newInstance(){return Promise.resolve(new qW([]))}},qW=(()=>{class t extends _n{marketIds;static Specification=YW;constructor(e){super(YW.type),this.marketIds=e}clone(){return new t([...this.marketIds])}equals(e){return super.equals(e)&&Ni.equals(this.marketIds,e.marketIds)}overrideClone(e){return new t(this.marketIds?lu.overrideProperties(this.marketIds,"market",e,n=>n):[])}getOverrideProperties(e,n){return this.marketIds.map(r=>new su(e,"market",r,r,"possible"))}getChildResources(){return{[tn.MARKET]:this.marketIds}}validationToText(){return this.marketIds.length===0?"Mindestens einen Markt ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ike(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})(),ike=class extends Zn{constructor(i,e){super(nke,i,e)}};var oke="nrwServiceArea",q6={type:"nrwServiceArea",category:"case",displayName:{de:"NRW Leistungsbereiche"},sortingIndex:6,occurrence:"single",fromObject(t){return Promise.resolve(new cO(t.nrwServiceGroupIds))},fromCondition(t){return Promise.resolve(new cO(t.includes))},newInstance(){return Promise.resolve(new cO([]))}},cO=(()=>{class t extends _n{nrwServiceGroupIds;static Specification=q6;constructor(e){super(q6.type),this.nrwServiceGroupIds=e}clone(){return new t([...this.nrwServiceGroupIds])}equals(e){return super.equals(e)&&Ni.equals(this.nrwServiceGroupIds,e.nrwServiceGroupIds)}validationToText(){return this.nrwServiceGroupIds.length===0?"Mindestens einen NRW Leistungsbereich ausw\xE4hlen":""}toCondition(){return Promise.resolve(new rke(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})(),rke=class extends Zn{constructor(i,e=[]){super(oke,i,e)}};var ske="nrwServiceGroup",Y6={type:"nrwServiceGroups",category:"case",displayName:{de:"NRW Leistungsgruppen"},sortingIndex:7,occurrence:"single",fromObject(t){return Promise.resolve(new bI(t.nrwServiceGroupIds))},fromCondition(t){return Promise.resolve(new bI(t.includes))},newInstance(){return Promise.resolve(new bI([]))}},bI=(()=>{class t extends _n{nrwServiceGroupIds;static Specification=Y6;constructor(e){super(Y6.type),this.nrwServiceGroupIds=e}clone(){return new t([...this.nrwServiceGroupIds])}equals(e){return super.equals(e)&&Ni.equals(this.nrwServiceGroupIds,e.nrwServiceGroupIds)}validationToText(){return this.nrwServiceGroupIds.length===0?"Mindestens eine NRW Leistungsgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ake(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})(),ake=class extends Zn{constructor(i,e=[]){super(ske,i,e)}};var cke="opsChapter",aB={type:"opsChapter",category:"case",displayName:{de:"OPS-Kapitel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new R1(t.chapters.map(i=>mf.fromObject(i))))},fromCondition(t){return Promise.resolve(new R1(t.includes.map(i=>mf.fromObject(i))))},newInstance(){return Promise.resolve(new R1([]))}},R1=(()=>{class t extends _n{chapters;static Specification=aB;constructor(e){super(aB.type),this.chapters=e}clone(){return new t([...this.chapters.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.chapters,e.chapters,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.chapters.length===0?"Mindestens ein OPS-Kapitel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new lke(this.chapters,[]))}toJSON(){return{type:this.type,chapters:this.chapters}}toText(){return"OPS-Kapitel"}toValue(){return this.chapters}}return t})(),lke=class extends Zn{constructor(i,e){super(cke,i,e)}};var sB={type:"fourDigitOpsCode",category:"case",displayName:{de:"OPS-Ziffer 4-Steller"},sortingIndex:11,occurrence:"single",fromObject(t){return Promise.resolve(new kC(t.codes.map(i=>xi.fromObject(i))))},fromCondition(t){return Promise.resolve(new kC(t.includes.map(i=>xi.fromObject(i))))},newInstance(){return Promise.resolve(new kC([]))}},kC=(()=>{class t extends _n{codes;static Specification=sB;constructor(e){super(sB.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.codes,e.codes,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine OPS-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new qM(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"OPS-Ziffer 4-Steller"}toValue(){return this.codes}}return t})();var uke="opsGroup",lB={type:"opsGroup",category:"case",displayName:{de:"OPS-Gruppe"},sortingIndex:9,occurrence:"single",fromObject(t){return Promise.resolve(new P1(t.groups.map(i=>mf.fromObject(i))))},fromCondition(t){return Promise.resolve(new P1(t.includes.map(i=>mf.fromObject(i))))},newInstance(){return Promise.resolve(new P1([]))}},P1=(()=>{class t extends _n{groups;static Specification=lB;constructor(e){super(lB.type),this.groups=e}clone(){return new t([...this.groups.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.groups,e.groups,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.groups.length===0?"Mindestens eine OPS-Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new dke(this.groups,[]))}toJSON(){return{type:this.type,groups:this.groups}}toText(){return"OPS-Gruppe"}toValue(){return this.groups}}return t})(),dke=class extends Zn{constructor(i,e){super(uke,i,e)}};var cB={type:"threeDigitOpsCode",category:"case",displayName:{de:"OPS-Ziffer 3-Steller"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new MC(t.codes.map(i=>xi.fromObject(i))))},fromCondition(t){return Promise.resolve(new MC(t.includes.map(i=>xi.fromObject(i))))},newInstance(){return Promise.resolve(new MC([]))}},MC=(()=>{class t extends _n{codes;static Specification=cB;constructor(e){super(cB.type),this.codes=e}clone(){return new t([...this.codes.map(e=>e.clone())])}equals(e){return super.equals(e)&&Ni.equals(this.codes,e.codes,(n,r)=>n.name===r.name&&n.codingSystem===r.codingSystem)}validationToText(){return this.codes.length===0?"Mindestens eine OPS-Ziffer ausw\xE4hlen":""}toCondition(){return Promise.resolve(new qM(this.codes,[]))}toJSON(){return{type:this.type,codes:this.codes}}toText(){return"OPS-Ziffer 3-Steller"}toValue(){return this.codes}}return t})();var mke="specialEquipment",KW={type:"specialEquipment",category:"clinic",displayName:{de:"Klinik-Ausstattung"},occurrence:"single",sortingIndex:8,fromObject(t){return Promise.resolve(new dB(t.includeSpecialEquipmentKeys))},newInstance(){return Promise.resolve(new dB)},fromCondition(t){return Promise.resolve(new dB(t.includes,t.excludes))}},dB=(()=>{class t extends _n{includeKeys;excludeKeys;static Specification=KW;constructor(e=[],n=[]){super(KW.type),this.includeKeys=e,this.excludeKeys=n}toCondition(){return Promise.resolve(new pke(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)&&Ni.equals(this.includeKeys,e.includeKeys)&&Ni.equals(this.excludeKeys,e.excludeKeys)}}return t})(),pke=class extends Zn{constructor(i=[],e=[]){super(mke,i,e)}};var hke="specialtyDepartmentId",OC={type:"specialtyDepartmentIds",category:"case",displayName:{de:"Fachabteilung"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new dO(t.specialtyDepartmentIds))},fromCondition(t){return Promise.resolve(new dO(t.includes))},newInstance(){return Promise.resolve(new dO([]))}},dO=(()=>{class t extends _n{specialtyDepartmentIds;static Specification=OC;constructor(e){super(OC.type),this.specialtyDepartmentIds=e}clone(){return new t([...this.specialtyDepartmentIds])}equals(e){return super.equals(e)&&Ni.equals(this.specialtyDepartmentIds,e.specialtyDepartmentIds)}getOverrideProperties(e,n){return this.specialtyDepartmentIds.map(r=>new su(e,"specialtyDepartmentId",r,r,"possible",n))}overrideClone(e){let n=lu.overrideProperties(this.specialtyDepartmentIds,"specialtyDepartmentId",e,r=>r);return new t(n)}validationToText(){return this.specialtyDepartmentIds.length===0?"Mindestens eine Fachabteilung ausw\xE4hlen":""}toCondition(){return Promise.resolve(new lue(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})(),lue=class extends Zn{constructor(i=[],e=[]){super(hke,i,e)}};var gke="virtualClinicBenchmarkingGroupIds",WW={type:"virtualBenchmarkingGroupIds",category:"clinic",displayName:{de:"Benchmarking Gruppe"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new uB(t.virtualBenchmarkingGroupIds))},fromCondition(t){return Promise.resolve(new uB(t.includes))},newInstance(){return Promise.resolve(new uB([]))}},uB=(()=>{class t extends _n{virtualBenchmarkingGroupIds;static Specification=WW;constructor(e){super(WW.type),this.virtualBenchmarkingGroupIds=e}clone(){return new t([...this.virtualBenchmarkingGroupIds])}equals(e){return super.equals(e)&&Ni.equals(this.virtualBenchmarkingGroupIds,e.virtualBenchmarkingGroupIds)}getChildResources(){let e={};return e[tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP]=this.virtualBenchmarkingGroupIds,e}getOverrideProperties(e,n){let r=[];return this.virtualBenchmarkingGroupIds&&this.virtualBenchmarkingGroupIds.length>0&&this.virtualBenchmarkingGroupIds.forEach(o=>{r.push(new su(e,"virtualBenchmarkingGroupId",o,o,"possible",void 0))}),r}overrideClone(e){let n=this.virtualBenchmarkingGroupIds?lu.overrideProperties(this.virtualBenchmarkingGroupIds,"virtualBenchmarkingGroupId",e,r=>r):[];return new t(n)}validationToText(){return this.virtualBenchmarkingGroupIds.length===0?"Mindestens eine Benchmarking Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new fke(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})(),fke=class extends Zn{constructor(i=[],e=[]){super(gke,i,e)}};var Pa=class t{static EMPTY(){return new x1([])}static equals(i,e){return gr.equals(i,e,()=>{if(i.type!==e.type)return!1;switch(i.type){case"combination":return i.equals(e);default:return i.equals(e)}})}static fromConditionJson(i,e){let n=Object.keys(i);if(n.length===0||n.length>1)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(i)}]`);let r=n[0],o=i[n[0]];switch(r){case eq:case tq:return OK.fromConditionJson(r,o,e);case tSe:case iSe:case Y1e:case K1e:case W1e:case Q1e:case Z1e:case X1e:case J1e:case eSe:return HL.fromCondition(o);default:{let a=e.find(c=>c.filterConditionId===r);return a?a.filterConditionPluginSpecification.fromCondition(o):Promise.reject(new Error(`No filter plugin found for ${r}, input [${JSON.stringify(i)}]`))}}}static fromObject(i,e){if(!i.type)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(i)}]`);switch(i.type){case"combination":return OK.fromObject(i,e);default:{let n=e.find(r=>r.filterType===i.type);return n?n.filterConditionPluginSpecification.fromObject(i):Promise.reject(new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(i)}]`))}}}static withoutType(i,e){switch(i.type){case"combination":{let n=i;return n.expression=n.expression.map(r=>t.withoutType(r,e)).filter(r=>!!r),n}default:return i.type===e.type?null:i}}static findAll(i,e){switch(e.type){case"combination":return e.expression.map(n=>this.findAll(i,n)).flat();case i.type:return[e];default:return[]}}static and(i,e){return i.type==="combination"&&i.kind==="AND"?(i.expression.push(e),i):e.type==="combination"&&e.kind==="AND"?(e.expression.push(i),e):new x1([i,e])}static or(i,e){return i.type==="combination"&&i.kind==="OR"?(i.expression.push(e),i):e.type==="combination"&&e.kind==="OR"?(e.expression.push(i),e):new lI([i,e])}static formatter(i){switch(i.type){case"combination":{let e=i.kindToText();return i.expression.map(n=>({kind:e,expressionText:this.formatter(n)}))}default:return i.toText()}}};var ky=class{type;expression;constructor(i,e){this.type=i,this.expression=e}getOverrideProperties(i,e){return[...this.expression.getOverrideProperties(i,e)]}toJSON(){return{type:this.type,expression:this.expression.toJSON()}}getChildResources(){return this.expression.getChildResources()}toRequestBody(i){return this.expression.toCondition(i)}equals(i){return gr.equals(this.type,i.type)&&Pa.equals(this.expression,i.expression)}};var yke="aop",QW={type:"aop",category:"case",displayName:{de:"AOP Kriterien"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new uO(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 uO(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 uO(uO.DEFAULT_AOP_VERSION_YEAR,null,null,!0,!0,!0,!0,!0,!0,!0,!0,!0,null))}},uO=(()=>{class t extends _n{_aopVersionYear;_abschnitt1;_abschnitt2;_abschnitt1Oder2;_icdNichtAmbulant;_opsStationaer;_funktionseinschraenkungen;_pflegegrad;_beatmung;_altersgrenze;_beidseitig;_ophthalm;_aop;static DEFAULT_AOP_VERSION_YEAR=2025;static Specification=QW;constructor(e,n=null,r=null,o=null,a=null,c=null,m=null,g=null,C=null,w=null,P=null,R=null,z=null){super(QW.type),this._aopVersionYear=e,this._abschnitt1=n,this._abschnitt2=r,this._abschnitt1Oder2=o,this._icdNichtAmbulant=a,this._opsStationaer=c,this._funktionseinschraenkungen=m,this._pflegegrad=g,this._beatmung=C,this._altersgrenze=w,this._beidseitig=P,this._ophthalm=R,this._aop=z}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 _ke(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})(),_ke=class extends Is{aopVersionYear;abschnitt1;abschnitt2;abschnitt1Oder2;icdNichtAmbulant;opsStationaer;funktionseinschraenkungen;pflegegrad;beatmung;altersgrenze;beidseitig;ophthalm;aop;constructor(i,e,n,r,o,a,c,m,g,C,w,P,R){super(yke),this.aopVersionYear=i,this.abschnitt1=e,this.abschnitt2=n,this.abschnitt1Oder2=r,this.icdNichtAmbulant=o,this.opsStationaer=a,this.funktionseinschraenkungen=c,this.pflegegrad=m,this.beatmung=g,this.altersgrenze=C,this.beidseitig=w,this.ophthalm=P,this.aop=R}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 bke="hartmannGroup",ZW={type:"hartmannCodeGroupIds",category:"case",displayName:{de:"Hartmann Gruppen"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new pB(t.hartmannCodeGroupIds))},fromCondition(t){return Promise.resolve(new pB(t.includes))},newInstance(){return Promise.resolve(new pB([]))}},pB=(()=>{class t extends _n{hartmannCodeGroupIds;static Specification=ZW;constructor(e){super(ZW.type),this.hartmannCodeGroupIds=e}clone(){return new t([...this.hartmannCodeGroupIds])}equals(e){return super.equals(e)&&Ni.equals(this.hartmannCodeGroupIds,e.hartmannCodeGroupIds)}validationToText(){return this.hartmannCodeGroupIds.length===0?"Mindestens eine Hartmann Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new vke(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})(),vke=class extends Zn{constructor(i,e){super(bke,i,e)}};var mB=class t{_einschlussKriterien;_k1DrgStationaer;_k2OpsStationaer;_k3StationaereBehandlungBeatmung;_k5IcdBetreuungsbedarf;_k6IcdStationaer;_k6sErhoehterAufwand;_k7Pccl;_k8Pflegegrade;_kSharpAlter;static fromObject(i={}){return new t(i.einschlussKriterien??null,i.k1DrgStationaer??null,i.k2OpsStationaer??null,i.k3StationaereBehandlungBeatmung??null,i.k5IcdBetreuungsbedarf??null,i.k6IcdStationaer??null,i.k6sErhoehterAufwand??null,i.k7Pccl??null,i.k8Pflegegrade??null,i.kSharpAlter??null)}constructor(i,e,n,r,o,a,c,m,g,C){this._einschlussKriterien=i,this._k1DrgStationaer=e,this._k2OpsStationaer=n,this._k3StationaereBehandlungBeatmung=r,this._k5IcdBetreuungsbedarf=o,this._k6IcdStationaer=a,this._k6sErhoehterAufwand=c,this._k7Pccl=m,this._k8Pflegegrade=g,this._kSharpAlter=C}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(i){return!!i&&this._einschlussKriterien===i._einschlussKriterien&&this._k1DrgStationaer===i.k1DrgStationaer&&this._k2OpsStationaer===i.k2OpsStationaer&&this._k3StationaereBehandlungBeatmung===i.k3StationaereBehandlungBeatmung&&this._k5IcdBetreuungsbedarf===i.k5IcdBetreuungsbedarf&&this._k6IcdStationaer===i.k6IcdStationaer&&this._k6sErhoehterAufwand===i.k6sErhoehterAufwand&&this._k7Pccl===i.k7Pccl&&this._k8Pflegegrade===i.k8Pflegegrade&&this._kSharpAlter===i.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(i){this._einschlussKriterien=i}set k1DrgStationaer(i){this._k1DrgStationaer=i}set k2OpsStationaer(i){this._k2OpsStationaer=i}set k3StationaereBehandlungBeatmung(i){this._k3StationaereBehandlungBeatmung=i}set k6IcdStationaer(i){this._k6IcdStationaer=i}set k5IcdBetreuungsbedarf(i){this._k5IcdBetreuungsbedarf=i}set k8Pflegegrade(i){this._k8Pflegegrade=i}set k6sErhoehterAufwand(i){this._k6sErhoehterAufwand=i}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(i){this._kSharpAlter=i}get k7Pccl(){return this._k7Pccl}set k7Pccl(i){this._k7Pccl=i}};var xke="iges",XW={type:"iges",category:"case",displayName:{de:"IGES Kriterien"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new pO(mB.fromObject(t.iges)))},fromCondition(t){return Promise.resolve(new pO(mB.fromObject(t)))},newInstance(){return Promise.resolve(new pO(null))}},pO=(()=>{class t extends _n{_iges;static Specification=XW;constructor(e){super(XW.type),this._iges=e}clone(){let e=this._iges?this._iges.clone():null;return new t(e)}equals(e){return super.equals(e)&&gr.equals(this._iges,e._iges,(n,r)=>n.equals(r))}toCondition(){return Promise.resolve(new Cke(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})(),Cke=class extends Is{einschlussKriterien;k1DrgStationaer;k2OpsStationaer;k3StationaereBehandlungBeatmung;k5IcdBetreuungsbedarf;k6IcdStationaer;k6sErhoehterAufwand;k7Pccl;k8Pflegegrade;kSharpAlter;constructor(i,e,n,r,o,a,c,m,g,C){super(xke),this.einschlussKriterien=i,this.k1DrgStationaer=e,this.k2OpsStationaer=n,this.k3StationaereBehandlungBeatmung=r,this.k5IcdBetreuungsbedarf=o,this.k6IcdStationaer=a,this.k6sErhoehterAufwand=c,this.k7Pccl=m,this.k8Pflegegrade=g,this.kSharpAlter=C}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 wke="pccl",JW={type:"pccl",category:"case",displayName:{de:"PCCL Kriterium"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new hB(t.pccl))},fromCondition(t){return Promise.resolve(new hB(t.includes))},newInstance(){return Promise.resolve(new hB([]))}},hB=(()=>{class t extends _n{pccl;static Specification=JW;constructor(e){super(JW.type),this.pccl=e}clone(){return new t([...this.pccl])}equals(e){return super.equals(e)&&Ni.equals(this.pccl,e.pccl)}validationToText(){return this.pccl.length===0?"Mindestens ein PCCL Kriterium ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Ske(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})(),Ske=class extends Zn{constructor(i,e){super(wke,i,e)}};var Tke="fullyInpatientCaseOperatingNumberValue",eQ={type:"operatingNumberFilter",category:"case",displayName:{de:"Kennzahl-Filter"},sortingIndex:9,occurrence:"multiple",fromObject(t){return Promise.resolve(new mO(t.operatingNumberId,t.value,t.comparison))},fromCondition(t){return Promise.resolve(new mO(t.operatingNumberId,t.value,t.comparison))},newInstance(){return Promise.resolve(new mO("counts","0","EQUAL"))}},mO=(()=>{class t extends _n{operatingNumberId;value;comparison;static Specification=eQ;constructor(e,n,r){super(eQ.type),this.operatingNumberId=e,this.value=n,this.comparison=r}clone(){return new t(this.operatingNumberId,this.value,this.comparison)}equals(e){return super.equals(e)&&gr.equals(this.value,e.value)&&gr.equals(this.operatingNumberId,e.operatingNumberId)&&gr.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 Ike(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})(),Ike=class extends Is{operatingNumberId;value;comparison;constructor(i,e,n){super(Tke),this.operatingNumberId=i,this.value=e,this.comparison=n}toJSON(){return{[this.id]:{operatingNumberId:this.operatingNumberId,value:this.value.replace(",","."),comparison:this.comparison}}}};var hO=class t{hybridDrgVersionYear;ops_p115f_a1_s1_n2_sgb;icdNichtAmbulant;opsStationaer;funktionseinschraenkungen;pflegegrad;beatmung;altersgrenze;beidseitig;ophthalm;belegungstage_lt_2;pccl_lt_3;keine_neubildungen;ze_diagnosen;ze_prozeduren;static fromObject(i={}){return new t(i.hybridDrgVersionYear,i.ops_p115f_a1_s1_n2_sgb??null,i.icdNichtAmbulant??null,i.opsStationaer??null,i.funktionseinschraenkungen??null,i.pflegegrad??null,i.beatmung??null,i.altersgrenze??null,i.beidseitig??null,i.ophthalm??null,i.belegungstage_lt_2??null,i.pccl_lt_3??null,i.keine_neubildungen??null,i.ze_diagnosen??null,i.ze_prozeduren??null)}constructor(i=2025,e=!0,n=!0,r=!0,o=!0,a=!0,c=!0,m=!0,g=!0,C=!0,w=!0,P=!0,R=!0,z=null,H=null){this.hybridDrgVersionYear=i,this.ops_p115f_a1_s1_n2_sgb=e,this.icdNichtAmbulant=n,this.opsStationaer=r,this.funktionseinschraenkungen=o,this.pflegegrad=a,this.beatmung=c,this.altersgrenze=m,this.beidseitig=g,this.ophthalm=C,this.belegungstage_lt_2=w,this.pccl_lt_3=P,this.keine_neubildungen=R,this.ze_diagnosen=z,this.ze_prozeduren=H}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,this.ze_diagnosen,this.ze_prozeduren)}equals(i){return!!i&&gr.equals(this.hybridDrgVersionYear,i.hybridDrgVersionYear)&&this.ops_p115f_a1_s1_n2_sgb===i.ops_p115f_a1_s1_n2_sgb&&this.icdNichtAmbulant===i.icdNichtAmbulant&&this.opsStationaer===i.opsStationaer&&this.funktionseinschraenkungen===i.funktionseinschraenkungen&&this.pflegegrad===i.pflegegrad&&this.beatmung===i.beatmung&&this.altersgrenze===i.altersgrenze&&this.beidseitig===i.beidseitig&&this.ophthalm===i.ophthalm&&this.belegungstage_lt_2===i.belegungstage_lt_2&&this.pccl_lt_3===i.pccl_lt_3&&this.keine_neubildungen===i.keine_neubildungen&&this.ze_diagnosen===i.ze_diagnosen&&this.ze_prozeduren===i.ze_prozeduren}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,ze_diagnosen:this.ze_diagnosen,ze_prozeduren:this.ze_prozeduren}}};var Ake="hybridDrg",tQ={type:"hybridDrg",category:"case",displayName:{de:"Hybrid DRG"},sortingIndex:10,occurrence:"single",fromObject(t){return Promise.resolve(new fO(hO.fromObject(t.hybridDrg)))},fromCondition(t){return Promise.resolve(new fO(hO.fromObject(t)))},newInstance(){return Promise.resolve(new fO(new hO))}},fO=(()=>{class t extends _n{_hybridDrg;static Specification=tQ;constructor(e){super(tQ.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 Eke(this._hybridDrg))}validationToText(){return"Hybrid DRG Kriterien ausw\xE4hlen"}toJSON(){return{type:this.type,hybridDrg:this._hybridDrg.toJSON()}}toText(){return`Hybrid DRG Kriterien ${this._hybridDrg.hybridDrgVersionYear}`}toValue(){return this._hybridDrg}}return t})(),Eke=class extends Is{hybridDrg;constructor(i){super(Ake),this.hybridDrg=i}toJSON(){return{[this.id]:{hybridDrgVersionYear:this.hybridDrg.hybridDrgVersionYear,ops_p115f_a1_s1_n2_sgb:this.hybridDrg.ops_p115f_a1_s1_n2_sgb,icdNichtAmbulant:this.hybridDrg.icdNichtAmbulant,opsStationaer:this.hybridDrg.opsStationaer,funktionseinschraenkungen:this.hybridDrg.funktionseinschraenkungen,pflegegrad:this.hybridDrg.pflegegrad,beatmung:this.hybridDrg.beatmung,altersgrenze:this.hybridDrg.altersgrenze,beidseitig:this.hybridDrg.beidseitig,ophthalm:this.hybridDrg.ophthalm,belegungstage_lt_2:this.hybridDrg.belegungstage_lt_2,pccl_lt_3:this.hybridDrg.pccl_lt_3,keine_neubildungen:this.hybridDrg.keine_neubildungen,ze_diagnosen:this.hybridDrg.ze_diagnosen,ze_prozeduren:this.hybridDrg.ze_prozeduren}}}};var kke="intuitiveFotCategory",fB={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 gO([],null))},fromCondition(t){return Promise.resolve(new gO(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new gO(t.includes?t.includes:null,t.excludes?t.excludes:null))}},gO=(()=>{class t extends _n{includes;excludes;static Specification=fB;constructor(e,n){super(fB.type),this.includes=e,this.excludes=n}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Dke(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})(),Dke=class extends Zn{constructor(i,e){super(kke,i,e)}};var Oke="intuitiveFotProcedureName",gB={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 _O([],null))},fromCondition(t){return Promise.resolve(new _O(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new _O(t.includes?t.includes:null,t.excludes?t.excludes:null))}},_O=(()=>{class t extends _n{includes;excludes;static Specification=gB;constructor(e,n){super(gB.type),this.includes=e,this.excludes=n}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Mke(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})(),Mke=class extends Zn{constructor(i,e){super(Oke,i,e)}};var Pke="intuitiveFotProcedureSubject",_B={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 yO([],null))},fromCondition(t){return Promise.resolve(new yO(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new yO(t.includes?t.includes:null,t.excludes?t.excludes:null))}},yO=(()=>{class t extends _n{includes;excludes;static Specification=_B;constructor(e,n){super(_B.type),this.includes=e,this.excludes=n}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Rke(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})(),Rke=class extends Zn{constructor(i,e){super(Pke,i,e)}};var Fke="intuitiveFotTypeOfEntry",yB={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 vO([],null))},fromCondition(t){return Promise.resolve(new vO(t.includes?t.includes:null,t.excludes?t.excludes:null))},fromObject(t){return Promise.resolve(new vO(t.includes?t.includes:null,t.excludes?t.excludes:null))}},vO=(()=>{class t extends _n{includes;excludes;static Specification=yB;constructor(e,n){super(yB.type),this.includes=e,this.excludes=n}clone(){return new t(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Nke(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})(),Nke=class extends Zn{constructor(i,e){super(Fke,i,e)}};var RA=class t extends ky{static SPECIFICATIONS=[{specification:$6.Specification},{specification:uO.Specification},{specification:pB.Specification,permissions:["HARTMANN_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:pO.Specification},{specification:fO.Specification},{specification:hB.Specification},{specification:pf.Specification},{specification:Qv.Specification},{specification:MA.Specification},{specification:_f.Specification},{specification:ug.Specification},{specification:gf.Specification},{specification:gL.Specification},{specification:Y2.Specification},{specification:sO.Specification},{specification:G6.Specification},{specification:lO.Specification},{specification:T6.Specification},{specification:jL.Specification},{specification:bI.Specification},{specification:OA.Specification},{specification:dO.Specification},{specification:mO.Specification},{specification:U6.Specification},{specification:CL.Specification},{specification:$L.Specification},{specification:gO.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:_O.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:yO.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:vO.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]}];static fromObject(i,e){return _t(this,null,function*(){return Pa.fromObject(i.expression,e).then(n=>new t(n))})}constructor(i=Pa.EMPTY()){super("fully-inpatient-cases-filter",i)}clone(){return new t(this.expression.clone())}overrideClone(i){return new t(this.expression.overrideClone(i))}onUpdateVirtualClinicId(i){this.expression=Pa.withoutType(this.expression,OC)}};var bO=class t extends sI{operatingNumberId;fullyInpatientCasesFilter;static fromObject(){return _t(this,arguments,function*(i={},e){let n=yield RA.fromObject(i.fullyInpatientCasesFilter,e);return new t(i.operatingNumberId,n)})}constructor(i,e){super("fullyInpatientCaseOperatingNumber"),this.operatingNumberId=i,this.fullyInpatientCasesFilter=e}clone(){return new t(this.operatingNumberId,this.fullyInpatientCasesFilter.clone())}overrideClone(i){return new t(this.operatingNumberId,this.fullyInpatientCasesFilter.overrideClone(i))}getChildResources(){return this.fullyInpatientCasesFilter.getChildResources()}getFullyInpatientCasesFilters(){return[this.fullyInpatientCasesFilter]}getOverrideProperties(i,e){return[...this.fullyInpatientCasesFilter.getOverrideProperties(i,e)]}isValid(){return!!this.operatingNumberId&&!!this.fullyInpatientCasesFilter&&this.fullyInpatientCasesFilter.expression.valid()}toRequestPart(i){return this.fullyInpatientCasesFilter.expression.toCondition(i)?.then(e=>({type:this.type,operatingNumberId:this.operatingNumberId,condition:e}))}toJSON(){return{type:this.type,operatingNumberId:this.operatingNumberId,fullyInpatientCasesFilter:this.fullyInpatientCasesFilter.toJSON()}}onUpdateVirtualClinicId(i){this.fullyInpatientCasesFilter.onUpdateVirtualClinicId(i)}};var iQ=class t{years;static fromObject(i={}){return new t(i.years)}constructor(i=null){this.years=i}clone(){let i=this.years?this.years.slice():null;return new t(i)}toCondition(){return new py(this.years,[])}toJSON(){return{years:this.years}}};var nQ=class t extends sI{operatingNumberId;virtualClinicFilter;static fromObject(){return _t(this,arguments,function*(i={}){let e=iQ.fromObject(i.virtualClinicFilter);return new t(i.operatingNumberId,e)})}constructor(i,e){super("virtualClinicOperatingNumber"),this.operatingNumberId=i,this.virtualClinicFilter=e}clone(){let i=this.virtualClinicFilter?this.virtualClinicFilter.clone():null;return new t(this.operatingNumberId,i)}overrideClone(i){let e=this.virtualClinicFilter?this.virtualClinicFilter.clone():null;return new t(this.operatingNumberId,e)}getChildResources(){return{}}getFullyInpatientCasesFilters(){return[]}getOverrideProperties(i,e){return[]}isValid(){return!!this.operatingNumberId}toRequestPart(){return Promise.resolve({type:this.type,operatingNumberId:this.operatingNumberId,condition:this.virtualClinicFilter.toCondition()})}toJSON(){return{type:this.type,operatingNumberId:this.operatingNumberId,virtualClinicFilter:this.virtualClinicFilter.toJSON()}}onUpdateVirtualClinicId(i){}};var CO=class{static fromObject(){return _t(this,arguments,function*(i={},e){let n=null;switch(i=i??{},i.type){case"fullyInpatientCaseOperatingNumber":n=yield bO.fromObject(i,e);break;case"constant":n=Promise.resolve(pK.fromObject(i));break;case"function":n=yield rQ.fromObject(i,e);break;case"virtualClinicOperatingNumber":n=Promise.resolve(nQ.fromObject(i));break}return n})}};var rQ=class t extends sI{leftOperand;rightOperand;operation;static fromObject(){return _t(this,arguments,function*(i={},e){let n=yield CO.fromObject(i.leftOperand,e),r=yield CO.fromObject(i.rightOperand,e);return new t(n,r,i.operation)})}constructor(i,e,n){super("function"),this.leftOperand=i,this.rightOperand=e,this.operation=n}clone(){return new t(this.leftOperand?this.leftOperand.clone():null,this.rightOperand?this.rightOperand.clone():null,this.operation)}overrideClone(i){return new t(this.leftOperand.overrideClone(i),this.rightOperand.overrideClone(i),this.operation)}getChildResources(){return yl.merge(this.leftOperand.getChildResources(),this.rightOperand.getChildResources())}getFullyInpatientCasesFilters(){let i=[];return this.leftOperand&&i.push(...this.leftOperand.getFullyInpatientCasesFilters()),this.rightOperand&&i.push(...this.rightOperand.getFullyInpatientCasesFilters()),i}getOverrideProperties(i,e){return[...this.leftOperand.getOverrideProperties(i,e),...this.rightOperand.getOverrideProperties(i,e)]}getIncludedTypes(){let i=this.leftOperand?this.leftOperand.getIncludedTypes():[],e=this.rightOperand?this.rightOperand.getIncludedTypes():[],n=[...i,...e,this.type];return n.filter((r,o)=>n.indexOf(r)===o)}isValid(){return!!this.leftOperand&&this.leftOperand.isValid()&&!!this.rightOperand&&this.rightOperand.isValid()&&!!this.operation}toRequestPart(i){return this.isValid()?Promise.all([this.leftOperand.toRequestPart(i),this.rightOperand.toRequestPart(i)]).then(e=>({type:this.type,leftOperand:e[0],rightOperand:e[1],operation:this.operation})):null}toJSON(){return{type:this.type,leftOperand:this.leftOperand?this.leftOperand.toJSON():null,rightOperand:this.rightOperand?this.rightOperand.toJSON():null,operation:this.operation}}onUpdateVirtualClinicId(i){this.leftOperand.onUpdateVirtualClinicId(i),this.rightOperand.onUpdateVirtualClinicId(i)}};var K6=class t extends ky{static TYPES=[{specification:AC.Specification},{specification:uB.Specification},{specification:zL.Specification},{specification:CA.Specification},{specification:TL.Specification}];static fromObject(i,e){return Pa.fromObject(i.expression,e).then(n=>new t(n))}constructor(i=Pa.EMPTY()){super("clinics-filter",i)}clone(){return new t(this.expression.clone())}overrideClone(i){return new t(this.expression.overrideClone(i))}};var RC=class{static fromObject(i,e){return _t(this,null,function*(){switch(i.type){case"single-virtual-clinic":return CO.fromObject(i.term,e).then(n=>new pL(n,i.virtualClinicId));case"benchmarking":return Promise.all([CO.fromObject(i.term,e),i.clinicsFilter?K6.fromObject(i.clinicsFilter,e):Promise.resolve(null)]).then(n=>new uK(n[0],n[1]));default:throw new Error(`Unknown calculation type: ${i.type}`)}})}};var N1=class{static fromObject(i={}){let e=null;switch(i.type){case"percent":e=new due(i.format);break;case"currency":e=new cue(i.format);break;case"manual":e=new W6(i.format,i.label)}return e}},W6=class{format;label;type;constructor(i,e){this.format=i,this.label=e,this.type="manual"}value(i){return i}formatFnc(i,e=!1){let n=null;return e&&this.label?n=`${Ru.format(i,this.format)} ${this.label}`:n=Ru.format(i,this.format),n}clone(){return N1.fromObject({type:this.type,format:JSON.parse(JSON.stringify(this.format)),label:this.label})}},cue=class extends W6{constructor(i={minimumFractionDigits:2,maximumFractionDigits:2}){super(i,"\u20AC"),this.type="currency"}},due=class extends W6{constructor(i={minimumFractionDigits:0,maximumFractionDigits:0}){super(i,"%"),this.type="percent"}value(i){return super.value(i*100)}formatFnc(i,e=!1){let n=this.value(i);return super.formatFnc(n,e)}formatPercentValueFnc(i,e=!1){return super.formatFnc(i,e)}};var Ep=class{static createDictionary(i){let e={fieldNames:{},parameters:{},parameterValues:{},aggregations:{},categories:{}};return i.forEach(n=>{e.fieldNames[n.fieldName]=n.displayName,n.possibleParameters.forEach(r=>{e.parameters[r.name]=r.displayName,(r.possibleValues||[]).forEach(o=>{e.parameterValues[o.value]=o.displayName})}),n.possibleAggregations.forEach(r=>{e.aggregations[r.name]=r.displayName}),e.categories[n.category?.id]=n.category?.displayName}),e}static normalize(i){let e=n=>Array.isArray(n)?n.map(r=>r&&typeof r=="object"?e(r):r).filter(r=>r!=null):Object.entries(n).map(([r,o])=>[r,o&&typeof o=="object"?e(o):o]).reduce((r,[o,a])=>(a==null||typeof a=="object"&&Object.keys(a).length===0||(r[o]=a),r),{});return e(i)}static valid(i){let e=!!i.aggregation&&!!i.aggregation.name;return!!i.fieldName&&e}static toRequestData(i){return i?i.map(e=>pe({},this.normalize(e))):null}};var uue=class{static getSortByGroupLabelFnc(i,e){let n;return["admissionDateTime","dismissalDateTime"].includes(i.fieldName)?n=this._getSortByTimeUnitGroupLabelFnc(i,e):i.fieldName==="agmId"?n=this._getSortAgeGroupLabelFnc(i,e):i.fieldName==="drivingTime"&&(n=this._getSortDrivingTimeLabelFnc(i,e)),n??this._getDefaultSortByGroupLabelFnc(e)}static _getSortDrivingTimeLabelFnc(i,e){return(r,o)=>{let a={"0-10":10,"10-20":20,"20-30":30,"30-40":40,"40-50":50,"50-60":60,"60-70":70,"70-80":80,"80-90":90,"90-100":100,"100-110":110,">250":250};return e*(a[r.label.key]-a[o.label.key])}}static _getSortAgeGroupLabelFnc(i,e){return(r,o)=>{let a={"00 - < 01":0,"01 - < 05":1,"05 - < 10":2,"10 - < 15":3,"15 - < 20":4,"20 - < 25":5,"25 - < 30":6,"30 - < 35":7,"35 - < 40":8,"40 - < 45":9,"45 - < 50":10,"50 - < 55":11,"55 - < 60":12,"60 - < 65":13,"65 - < 70":14,"70 - < 75":15,"75 - < 80":16,"80 - < 85":17,"85 - < 90":18,"90 - < 95":19,"> 95":20,unbekannt:21};return e*(a[r.label.shortDisplayName]-a[o.label.shortDisplayName])}}static _getSortByTimeUnitGroupLabelFnc(i,e){let n=i.parameters?.map(o=>o.value),r;return n.includes("dayOfWeek")&&(r=(o,a)=>{let c={Montag:1,Dienstag:2,Mittwoch:3,Donnerstag:4,Freitag:5,Samstag:6,Sonntag:7};return e*(c[o.label.shortDisplayName]-c[a.label.shortDisplayName])}),r}static _getDefaultSortByGroupLabelFnc(i){return(e,n)=>i*e.label.shortDisplayName.localeCompare(n.label.shortDisplayName)}};var Q6=class{static createOperatingNumberDataNodes(i,e,n,r){let o={aggregatedRoots:{},nodes:[],dictionary:{}},a=[];for(let c of i){let m=e[c.id];if(m){o.aggregatedRoots[c.id]=m.aggregatedValue;let g=this._groupedValuesToOperatingNumberDataNodes(c.id,m.groupedValues);a=this._mergeOperatingNumberDataNode(c.id,g,a)}}return o.nodes=this._sortOperatingNumberDataNodes(i.map(c=>c.id),a,n,r),o.dictionary=this._getDataNodeLabels(o.nodes),o}static _getDataNodeLabels(i,e={}){return i.forEach(n=>{n.children&&(e=this._getDataNodeLabels(n.children,e)),e[n.label.shortDisplayName]||(e[n.label.shortDisplayName]={shortDisplayName:n.label.shortDisplayName,longDisplayName:n.label.longDisplayName})}),e}static _sortOperatingNumberDataNodes(i,e,n,r,o=0){let a=e,c=n[o],m=c.sort?.direction==="DESC"?-1:1;r?a=this._sortOperatingNumberDataNodesByResultSetOperation(r,e):!c.sort||c.sort?.sortBy==="LABEL"?a=this._sortOperatingNumberDataNodesByLabel(c,e,m):c.sort?.sortBy==="VALUE"&&(a=this._sortOperatingNumberDataNodesByValue(i,e,m));for(let g of a)g.children&&(g.children=this._sortOperatingNumberDataNodes(i,g.children,n,r,o+1));return a}static _sortOperatingNumberDataNodesByResultSetOperation(i,e){let n=(r,o)=>{let a={"Unteres Quartil":0,Median:1,"Oberes Quartil":2};return a[r.label.shortDisplayName]-a[o.label.shortDisplayName]};return e.sort(n)}static _sortOperatingNumberDataNodesByLabel(i,e,n){let r=uue.getSortByGroupLabelFnc(i,n);return e.sort(r)}static _sortOperatingNumberDataNodesByValue(i,e,n){return((o,a)=>{let c=(m,g,C)=>Math.sign(m-g)?n*Math.sign(m-g):0;return o.sort((m,g)=>a.map((C,w)=>c(m.values[C],g.values[C],w)).filter(C=>C!==0)[0])})(e,i)}static _groupedValuesToOperatingNumberDataNodes(i,e){return e.map(n=>{let r=n.type==="node"?n.aggregated:n.value,o={label:n.label,values:{[i]:r}};return n.type==="node"&&(o.children=this._groupedValuesToOperatingNumberDataNodes(i,n.groupedValues)),o})}static _mergeOperatingNumberDataNode(i,e,n=[]){for(let r of e){let o=n.findIndex(a=>a.label.key===r.label.key);o===-1?n.push(r):o>-1&&(n[o].values=pe(pe({},n[o].values),r.values),r.children&&(n[o].children=this._mergeOperatingNumberDataNode(i,r.children,n[o].children)))}return n}};var PC=class{static calculationsToRequest(i,e,n){return _t(this,null,function*(){let r=this.resultSetOperationToRequestFormat(n),o=i.filter(c=>c.calculation.type==="benchmarking"),a=i.filter(c=>c.calculation.type==="single-virtual-clinic");return Promise.all([this._benchmarkVirtualClinicCalculationsToRequest(o,e,r,"merged"),this._singleVirtualClinicCalculationsToRequest(a,e,r)]).then(c=>[...c[0],...c[1]])})}static _singleVirtualClinicCalculationsToRequest(i,e,n){let r=i.reduce((o,a)=>(o[a.calculation.virtualClinicId]?o[a.calculation.virtualClinicId][a.id]={calculation:a.calculation,groupBy:Ep.toRequestData(a.groupBy)}:o[a.calculation.virtualClinicId]={[a.id]:{calculation:a.calculation,groupBy:Ep.toRequestData(a.groupBy)}},o),{});return Promise.all(i.map(o=>o.calculation.toRequestPart(e).then(a=>({requestPart:a,partId:o.id})))).then(o=>Object.keys(r).map(a=>Object.keys(r[a]).reduce((c,m)=>{let g=$e(pe({type:"VirtualClinicOperatingNumberSingle",term:null},o.find(C=>C.partId===m).requestPart),{groupBy:r[a][m].groupBy,virtualClinicId:a});return n&&(g.resultSetOperation=n),c[m]=g,c},{})))}static _benchmarkVirtualClinicCalculationsToRequest(i,e,n,r="single"){let o=(c,m,g)=>c.toRequestPart(e).then(C=>{let w=$e(pe({},C),{groupBy:Ep.toRequestData(m)});return g&&(w.resultSetOperation=g),w}),a=i.map(c=>o(c.calculation,c.groupBy,n).then(m=>({requestPart:m,id:c.id})));return r==="single"?Promise.all(a).then(c=>[c.reduce((m,g)=>m[g.id]=g.requestPart,{})]):Promise.all(a).then(c=>c.map(m=>{let g={};return g[m.id]=m.requestPart,g}))}static resultSetOperationToRequestFormat(i){let e=null;return i&&(e={name:i.fieldName,parameters:i.parameters.map(n=>n.name)}),e}};var pue=class t{patientCount;static of(i,e,n){let r={};return i.groupedValues.forEach(o=>{let a={},c=o.aggregated/i.aggregatedValue,m=e[o.label.key]?e[o.label.key].displayName():"n/a";o.groupedValues.forEach(g=>{let C=n[g.label.key]?n[g.label.key].getDisplayName():g.label.shortDisplayName;a[g.label.key]={count:g.value,name:C}}),r[o.label.key]={count:o.aggregated,name:m,percentage:c,postalCodes:a}}),new t(r)}data;postalCodeLayerData;constructor(i){this.patientCount=i,this.init(),this.postalCodeLayerData=this.data.reduce((e,n)=>(n.children.forEach(r=>e[r.postalCode]=r.total),e),{})}init(){let i=Object.keys(this.patientCount);this.data=i.map(e=>{let n=this.patientCount[e],r={adId:e,name:n.name},o=Object.keys(n.postalCodes);return r.children=o.map(a=>{let c=n.postalCodes[a];return{postalCode:a,name:c.name,total:c.count}}).sort((a,c)=>{let m=0;return a.total>c.total?m=-1:a.totala+c.total,0),r}).sort((e,n)=>{let r=0;return e.total>n.total?r=-1:e.totalr&&n0(r)?new ua(r):new ua(MM[0]))};switch(i.chartOptionsType){case"cartesian":n.chartOptionsType="cartesian",n.type=i.type;break;case"radar":n.chartOptionsType="radar",n.fill=i.fill;break;case"polarArea":n.chartOptionsType="polarArea";break;case"pie":n.chartOptionsType="pie";break;case"doughnut":n.chartOptionsType="doughnut";break}return n}static toJSON(i){let n={color:i.color.map(r=>r.toHexString())};switch(i.chartOptionsType){case"cartesian":n.chartOptionsType="cartesian",n.type=i.type;break;case"radar":n.chartOptionsType="radar",n.fill=i.fill;break;case"polarArea":n.chartOptionsType="polarArea";break;case"pie":n.chartOptionsType="pie";break;case"doughnut":n.chartOptionsType="doughnut";break}return n}};var mue=class t{_id;_displayName;_calculation;_chartOptions;_formatting;static fromObject(i,e){return _t(this,null,function*(){let n=i.calculation?yield RC.fromObject(i.calculation,e):null,r=vB.fromObject(i.chartOptions),o=i.formatting?N1.fromObject(i.formatting):null;return new t(i.id,i.displayName,n,r,o)})}constructor(i,e,n,r,o){this._id=i,this._displayName=e,this._calculation=n,this._chartOptions=r,this._formatting=o,this._id||(this._id=Zs())}clone(){let i=this._calculation.clone(),e=vB.clone(this._chartOptions),n=this._formatting.clone();return new t(this._id,this._displayName,i,e,n)}overrideClone(i){let e=this._calculation.overrideClone(i),n=vB.clone(this._chartOptions),r=this._formatting.clone();return new t(null,this._displayName,e,n,r)}getOverrideProperties(i){return this._calculation.getOverrideProperties(i,void 0)}toJSON(){let i=vB.toJSON(this._chartOptions);return{id:this._id,displayName:this._displayName,calculation:this._calculation.toJSON(),chartOptions:i,formatting:this._formatting}}toPrecalculatedTileRequest(i,e,n,r){return this.calculation.toRequestPart(r).then(o=>o?{tileId:i,calculationId:this._id,calculationInput:$e(pe({},o),{groupBy:e,resultSetOperation:n?PC.resultSetOperationToRequestFormat(n):null})}:null)}isValid(){return this.displayName&&this._calculation&&this._calculation.isValid()&&!!this._chartOptions}get calculation(){return this._calculation}set calculation(i){this._calculation=i}get chartOptions(){return this._chartOptions}set chartOptions(i){this._chartOptions=i}get displayName(){return this._displayName}set displayName(i){this._displayName=i}get id(){return this._id}get formatting(){return this._formatting}set formatting(i){this._formatting=i}};var Z6=class{chartOptions;chartParts;responses;groupBy;resultSetOperation;_aggregatedRoots={};_operatingNumberDataNodes;_labelDictionary;constructor(i,e,n,r,o){this.chartOptions=i,this.chartParts=e,this.responses=n,this.groupBy=r,this.resultSetOperation=o,this._init()}_init(){let i=Q6.createOperatingNumberDataNodes(this.chartParts,this.responses,this.groupBy,this.resultSetOperation);this._aggregatedRoots=i.aggregatedRoots,this._operatingNumberDataNodes=i.nodes,this._labelDictionary=i.dictionary}_getValueScaleOptions(i){return i.type==="manual"?{min:i.min,max:i.max}:i.type==="auto"&&i.beginAtZero?{beginAtZero:!0}:{beginAtZero:!1}}get operatingNumberDataNodes(){return this._operatingNumberDataNodes}get labelDictionary(){return this._labelDictionary}};var oQ=class{static findLongestLabelLength(i){if(i.length){let e=i[0].label.length;for(let n of i)n.children&&(e=Math.max(e,this.findLongestLabelLength(n.children)));return e}else return 0}static interaction(i){return i==="x"?{intersect:!1,mode:"nearest",axis:"xy",includeInvisible:!1}:{intersect:!1,mode:"nearest",axis:"y",includeInvisible:!1}}static calculatePaddingByLongestLabel(i,e,n,r=30){return{left:i==="x"?0:e*(n+r)*1.2,bottom:i==="x"?e*r:0}}};var hue=class extends Z6{chartOptions;_hierarchicalLabels;constructor(i,e,n,r,o){super(i,e,n,r,o),this.chartOptions=i}getChartConfiguration(){let i=this._getHierarchicalLabels(this._operatingNumberDataNodes),e=this._getDatasets(),n=this.chartParts.map(a=>a.formatting),r=oQ.findLongestLabelLength(i),o=this._getChartOptions(this.chartOptions,n,this.groupBy,r);return{type:null,data:{labels:i,datasets:e},options:o}}_getChartOptions(i,e,n,r){let a={layout:{padding:oQ.calculatePaddingByLongestLabel(this.chartOptions.indexAxis,n.length,r)},plugins:{tooltip:$e(pe({},Tp),{callbacks:{label(c){let m=e[c.datasetIndex];return m.type==="percent"?m.formatPercentValueFnc(c.raw,!0):m.formatFnc(c.raw,!0)},title:c=>{let m=c[0].label;return this.labelDictionary[m].longDisplayName}}})}};return a=this._addScaleOptions(i.indexAxis,a,r),a}_addScaleOptions(i,e,n,r){e.indexAxis=i;let o={type:"hierarchical",reverseOrder:!0,hierarchyGroupLabelPosition:"center",hierarchyBoxLineHeight:i==="x"?30:n,hierarchyLabelPosition:"above",attributes:{}},a=this._getValueScaleOptions(this.chartOptions.axes.value.scaleRange);return i==="x"?e.scales={x:o,y:a}:e.scales={y:o,x:a},e}_getDatasets(){let i=this._getDataSetValueTrees();return this.chartParts.map((e,n)=>{let r;switch(e.chartOptions.type){case"bar":r=this._getBarDataset(e,i[e.id]);break;case"line":r=this._getLineDataset(e,i[e.id]);break}return r.order=n+1,r})}_getLineDataset(i,e){let n=i.chartOptions.color.map(r=>r.toHexString());return{type:i.chartOptions.type,label:i.displayName,tree:e,backgroundColor:n,borderColor:n}}_getBarDataset(i,e){let n=i.chartOptions.color.map(r=>r.toHexString());return{type:i.chartOptions.type,label:i.displayName,tree:e,backgroundColor:n,borderColor:n}}_getDataSetValueTrees(){let i={};return this.chartParts.forEach(e=>{i[e.id]=this._getDataSetValueTree(e,this._operatingNumberDataNodes)}),i}_getDataSetValueTree(i,e){return e.map(n=>{let r;if(n.children){let o=null;i.formatting&&i.formatting.type==="percent"?o=n.values[i.id]*100||null:o=n.values[i.id]||null,r={value:o,children:this._getDataSetValueTree(i,n.children)}}else i.formatting&&i.formatting.type==="percent"?r=n.values[i.id]*100||null:r=n.values[i.id]||null;return r})}_getHierarchicalLabels(i){return i.map(e=>{let n={label:e.label.shortDisplayName,tooltipText:e.label.longDisplayName};return e.children&&(n.children=this._getHierarchicalLabels(e.children)),n})}get hierarchicalLabels(){return this._hierarchicalLabels}};var CI=class extends Z6{chartOptions;constructor(i,e,n,r){super(i,e,n,r),this.chartOptions=i}_getLabels(){return this._operatingNumberDataNodes.map(i=>i.label.shortDisplayName)}_getLabelsForAggregatedValues(){return this.chartParts.map(i=>i.displayName)}_getDatasetsWithAggregatedValues(){return this.chartParts.map(i=>({label:i.displayName,data:[this._aggregatedRoots[i.id]]}))}_getDatasets(){return this.chartParts.map((i,e)=>{let n=this._operatingNumberDataNodes.map(o=>o.values[i.id]?o.values[i.id]:null),r=i.chartOptions.color.map(o=>o.toHexString());return{label:i.displayName,data:n,order:e,fill:i.chartOptions.fill,backgroundColor:r,borderColor:r}})}};var fue=class extends CI{constructor(i,e,n,r){super(i,e,n,r)}getChartConfiguration(){let i=this._getLabels(),e=this._getDatasets(),n=this.chartParts.map(r=>r.formatting);return{type:"radar",data:{labels:i,datasets:e},options:{scales:{r:this._getValueScaleOptions(this.chartOptions.axes.value.scaleRange)},plugins:{tooltip:$e(pe({},Tp),{callbacks:{label(r){let o=n[r.datasetIndex];return o.type==="percent"?o.formatPercentValueFnc(r.raw,!0):o.formatFnc(r.raw,!0)},title:r=>this.labelDictionary[r[0].label].longDisplayName}})}}}}};var gue=class extends CI{getChartConfiguration(){let i=this._getLabels(),e=this._getDatasets(),n=this.chartParts.map(r=>r.formatting);return{type:"polarArea",data:{labels:i,datasets:e},options:{scales:{r:this._getValueScaleOptions(this.chartOptions.axes.value.scaleRange)},plugins:{tooltip:$e(pe({},Tp),{callbacks:{label(r){let o=n[r.datasetIndex];return o.type==="percent"?o.formatPercentValueFnc(r.raw,!0):o.formatFnc(r.raw,!0)},title(r){let o=r[0].label;return r[0].dataset[o]}}})}}}}};var _ue=class extends CI{constructor(i,e,n,r){super(i,e,n,r)}getChartConfiguration(){let i=this._getLabelsForAggregatedValues(),e=this._getDatasetsWithAggregatedValues(),n=this.chartParts.map(r=>r.formatting);return{type:"pie",data:{labels:i,datasets:e},options:{scales:{},plugins:{tooltip:$e(pe({},Tp),{callbacks:{label(r){let o=n[r.datasetIndex];return o.type==="percent"?o.formatPercentValueFnc(r.raw,!0):o.formatFnc(r.raw,!0)},title(r){let o=r[0].label;return r[0].dataset[o]}}})}}}}};var yue=class extends CI{_responsesAggregatedValueSum;constructor(i,e,n,r){super(i,e,n,r),this._responsesAggregatedValueSum=this.chartParts.reduce((o,a)=>o+this.responses[a.id].aggregatedValue,0)}getChartConfiguration(){let i=this._getData(),e=this._getOptions();return{type:"doughnut",data:i,options:e}}_getData(){let i=[];this.chartParts.forEach(r=>{let o=r.chartOptions.color[0].toHexString();i.push(o)});let e=this.chartParts.map(r=>this.responses[r.id].aggregatedValue),n=this.chartParts.map(r=>r.displayName);return this.chartOptions.axes.value.scaleRange.type==="auto"||this._responsesAggregatedValueSum>this.chartOptions.axes.value.scaleRange.max?{labels:n,datasets:[{data:e,backgroundColor:i}]}:{labels:n.concat(["n/a"]),datasets:[{data:e.concat([this.chartOptions.axes.value.scaleRange.max-this._responsesAggregatedValueSum]),backgroundColor:i.concat(["rgba(0, 0, 0, 0.3)"])}]}}_getOptions(){let i=null;this.chartOptions.axes.value.scaleRange.max?i=this.chartOptions.axes.value.scaleRange.max:this._responsesAggregatedValueSum&&(i=this._responsesAggregatedValueSum);let e={id:"text-in-center",type:"label",content:i?`${Math.round(this._responsesAggregatedValueSum)} / ${Math.round(i)}`:`${Math.round(this._responsesAggregatedValueSum)}`,color:"#000000",xValue:2.5,yValue:60,xScaleID:null,yScaleID:null,font:{size:18,style:"normal",weight:null,family:"Roboto",lineHeight:null}};return{maintainAspectRatio:!1,scales:{},cutout:"75%",plugins:{tooltip:$e(pe({},Tp),{callbacks:{label(n){return(n.raw/i*100).toFixed(2)+"%"}}}),legend:{display:!1},annotation:{annotations:[e]}}}}};var vue=class{static get(i,e,n,r,o){let a=null,c=e.filter(g=>!!n[g.id]);if(i.coordinateSystem==="cartesian")a=new hue(i,c,n,r,o).getChartConfiguration();else if(i.coordinateSystem==="radial")switch(i.chartType){case"radar":a=new fue(i,c,n,r).getChartConfiguration();break;case"polarArea":a=new gue(i,c,n,r).getChartConfiguration();break;case"pie":a=new _ue(i,c,n,r).getChartConfiguration();break;case"doughnut":a=new yue(i,c,n,r).getChartConfiguration();break}let m={responsive:!0,maintainAspectRatio:!1};return a.options=pe(pe({},m),a.options),a}};var xO="chart",aQ=class t extends Ey{_chartOptions;_chartParts;_groupBys;_resultSetOperation;type=xO;static fromObject(){return _t(this,arguments,function*(i={chartParts:[]},e){let n=(i.chartParts||[]).map(o=>mue.fromObject(o,e)),r=yield Promise.all(n);return new t(i.id,i.colspan,i.displayName,i.note,i.chartOptions,r,i.groupBys,i.resultSetOperation)})}_responses;_chartConfiguration;constructor(i,e,n,r,o,a,c,m){super(i,e,n,r),this._chartOptions=o,this._chartParts=a,this._groupBys=c,this._resultSetOperation=m,this.update$.pipe(vn(g=>g.eventType==="redraw")).subscribe(()=>this._updateChartConfiguration())}clone(){let i=this._chartParts.map(a=>a.clone()),e=this.note?JSON.parse(JSON.stringify(this.note)):null,n=this._chartOptions?JSON.parse(JSON.stringify(this._chartOptions)):null,r=this._groupBys?JSON.parse(JSON.stringify(this._groupBys)):null,o=this._resultSetOperation?JSON.parse(JSON.stringify(this._resultSetOperation)):null;return new t(this.id,this.colspan,this.displayName,e,n,i,r,o)}overrideClone(i){let e=this._chartParts.map(c=>c.overrideClone(i)),n=this.note?JSON.parse(JSON.stringify(this.note)):null,r=this._chartOptions?JSON.parse(JSON.stringify(this._chartOptions)):null,o=this._groupBys?JSON.parse(JSON.stringify(this._groupBys)):null,a=this._resultSetOperation?JSON.parse(JSON.stringify(this._resultSetOperation)):null;return new t(null,this.colspan,this.displayName,n,r,e,o,a)}toRequests(i){return PC.calculationsToRequest(this._chartParts.map(e=>({id:e.id,calculation:e.calculation,groupBy:this._groupBys.map(n=>Ep.normalize(n))})),i,this._resultSetOperation)}toJSON(){return $e(pe({},super.toJSON()),{chartOptions:this._chartOptions,chartParts:this._chartParts.map(i=>i.toJSON()),groupBys:this._groupBys,resultSetOperation:this._resultSetOperation})}getChildResources(){let i={};return this._chartParts.map(e=>{let n=e.calculation.getChildResources();i=yl.merge(i,n)}),i}isLoaded(){return!!this._responses&&Object.keys(this._responses).length>0}isValid(){return Ty.create([...super.validationSteps(),{validationStepValid:!!this._chartParts&&this._chartParts.length>0,stepDescription:"Min. ein Chart-Teil ausgew\xE4hlt"},{validationStepValid:this._chartParts.every(i=>i.isValid()),stepDescription:"Alle Chart-Teile korrekt",showValidationStep:"ONLY_ON_ERROR"},{validationStepValid:this._groupBys&&this._groupBys.length>0,stepDescription:"Min. eine Gruppierung ausgew\xE4hlt"},...this._validationStepsBenchmarking()])}getOverrideProperties(){let i=[];return this._chartParts.forEach(e=>{i.push(...e.getOverrideProperties(this.id))}),i}toPrecalculatedTileRequest(i,e){let n=this._chartParts.map(r=>r.toPrecalculatedTileRequest(this.id,this._groupBys.map(o=>Ep.normalize(o)),this._resultSetOperation,i));return Promise.all(n).then(r=>(e&&r.filter(o=>o).forEach(o=>{this._responses&&this._responses[o.calculationId]&&(o.response=this._responses[o.calculationId])}),r))}_update(i){i.eventType==="resolve"&&(this._responses=null),this.isValid().then(e=>{this.update$.next($e(pe({},i),{tileValid:e.valid}))})}_updateChartConfiguration(){this._chartConfiguration=vue.get(this._chartOptions,this._chartParts,this._responses,this._groupBys,this._resultSetOperation)}_onChartOptionChange(){this._chartParts=this._chartParts.map(i=>{if(i=i.clone(),this.chartOptions.coordinateSystem==="cartesian"&&i.chartOptions.chartOptionsType!=="cartesian")i.chartOptions={chartOptionsType:"cartesian",type:"bar",color:i.chartOptions.color};else if(this.chartOptions.coordinateSystem==="radial"&&i.chartOptions.chartOptionsType==="cartesian")switch(this.chartOptions.chartType){case"radar":i.chartOptions={chartOptionsType:"radar",color:i.chartOptions.color,fill:!1};break;case"pie":i.chartOptions={chartOptionsType:"pie",color:i.chartOptions.color};break;case"doughnut":i.chartOptions={chartOptionsType:"doughnut",color:i.chartOptions.color};break;case"polarArea":i.chartOptions={chartOptionsType:"polarArea",color:i.chartOptions.color};break}return i})}_validationStepsBenchmarking(){let i=this._chartParts.some(r=>r.calculation.type==="benchmarking"),e=this._groupBys.some(r=>r.fieldName==="specialtyDepartment"),n=this._chartParts.map(r=>r.calculation.term.getFullyInpatientCasesFilters()).flat().map(r=>r.expression).some(r=>Pa.findAll(OC,r).length>0);return[{validationStepValid:i?!e:!0,stepDescription:"Gruppierung nach Fachabteilung in Benchmarking Kachel nicht m\xF6glich",showValidationStep:"ONLY_ON_ERROR"},{validationStepValid:i?!n:!0,stepDescription:"Filter mit interner Fachabteilung in Benchmarking Kachel nicht m\xF6glich",showValidationStep:"ONLY_ON_ERROR"}]}get chartOptions(){return this._chartOptions}set chartOptions(i){this._chartOptions=i,this._onChartOptionChange(),this._update({eventType:"redraw"})}get chartParts(){return this._chartParts}set chartParts(i){this._chartParts=i,this._update({eventType:"resolve"})}get groupBys(){return this._groupBys}set groupBys(i){this._groupBys=i,this._update({eventType:"resolve"})}get resultSetOperation(){return this._resultSetOperation}set resultSetOperation(i){this._resultSetOperation=i,this._update({eventType:"resolve"})}get chartConfiguration(){return this._chartConfiguration}get responses(){return this._responses}set responses(i){this._responses=this.parseResponseAndWriteErrors(i),this.update$.next({eventType:"redraw"})}};var vni="marker-layer",bue=class t extends aq{id;layerDisplayName;layerOptions;inputSource;config;layerType=vni;tileResponse$=new hi(1);colorAsHex="#000000";constructor(i=Zs(),e,n,r,o={displayName:e,sourceId:`marker-source-${Zs()}`,popup:{popupType:"default",messagePrefix:"",titleFnc:a=>a.properties.itemName}}){super(i,o),this.id=i,this.layerDisplayName=e,this.layerOptions=n,this.inputSource=r,this.config=o,this.layerOptions&&this.layerOptions.paint["icon-color"]&&typeof this.layerOptions.paint["icon-color"]=="string"&&(this.colorAsHex=this.layerOptions.paint["icon-color"])}afterInit(i,e){super.afterInit(i,e),this.tileResponse$.asObservable().subscribe(n=>{this.transformData(n)})}updateLegendRef(i){let e=new Pm(this.layerControlId,this.config.displayName,"location_on",this.colorAsHex);return this.applyLegendConfig(e,i),e}clone(){return new t(this.id,this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.clone():null,this.config)}overrideClone(i){return new t(Zs(),this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.overrideClone(i):null,this.config)}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}transformData(i){switch(this.inputSource.sourceType){case"virtual-clinic-source":{let n=i.value.map(r=>_h({type:"Point",coordinates:r.address?.location},{itemKey:r.id?.toString(),itemName:r.name,itemActive:!0,colorAsHex:this.colorAsHex}));this.data$.next(od(n));break}case"clinics-filter-source":{let n=i.value.map(r=>_h({type:"Point",coordinates:r.clinic.address.location},{itemKey:r.clinic.id?.toString(),itemName:r.clinic.name,itemActive:!0,colorAsHex:this.colorAsHex}));this.data$.next(od(n))}}}valid(){return!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,layerOptions:this.layerOptions,inputSource:this.inputSource,config:this.config}}};function X6(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 bB(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 J6(t){return t.type==="Feature"?t.geometry:t}function Aet(t,i){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function Lke(t,i,e,n){n===void 0&&(n={});var r=X6(t),o=wae(r[0]),a=wae(r[1]),c=wae(e),m=R$e(i,n.units),g=Math.asin(Math.sin(a)*Math.cos(m)+Math.cos(a)*Math.sin(m)*Math.cos(c)),C=o+Math.atan2(Math.sin(c)*Math.sin(m)*Math.cos(a),Math.cos(m)-Math.sin(a)*Math.sin(g)),w=B1e(C),P=B1e(g);return yh([w,P],n.properties)}function bni(t,i,e){e===void 0&&(e={});for(var n=e.steps||64,r=e.properties?e.properties:!Array.isArray(t)&&t.type==="Feature"&&t.properties?t.properties:{},o=[],a=0;athis.transformData(n))}layer(){return $e(pe({},this.layerOptions),{type:"line",id:this.layerId,source:this.sourceId})}source(){return{sourceId:this.sourceId,sourceData:{type:"geojson",data:null}}}updateLegendRef(i){return new Pm(this.id,this.layerDisplayName,"filter_tilt_shift",this.layerOptions?.paint?.["line-color"]??"#3FB1CE")}clone(){return new t(this.id,this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.clone():null,this.config)}overrideClone(i){return new t(Zs(),this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.overrideClone(i):null,this.config)}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}transformData(i){let e=od(this.inputSource.transformResponse(i).features.map(n=>CB(n.geometry.coordinates,this.layerOptions.radius,{units:this.layerOptions.radiusUnit})));this.updateSource(e)}valid(){return!!this.layerOptions?.radius&&!!this.layerOptions?.radiusUnit&&!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,layerOptions:this.layerOptions,inputSource:this.inputSource}}};var xni="circle-layer",xue=class t extends uy{id;layerDisplayName;layerOptions;inputSource;config;layerType=xni;tileResponse$=new hi(1);layerId;sourceId;constructor(i=Zs(),e,n,r,o={displayName:e,sourceId:`market-source-${Zs()}`}){super(i,o),this.id=i,this.layerDisplayName=e,this.layerOptions=n,this.inputSource=r,this.config=o,this.layerId=`custom-layer-${Zs()}`,this.sourceId=o.sourceId}layer(){return $e(pe({},this.layerOptions),{type:"circle",id:this.layerId,source:this.sourceId})}source(){return{sourceId:this.sourceId,sourceData:{type:"geojson",data:null}}}updateLegendRef(i){return new Pm(this.layerControlId,this.config.displayName,"trip_origin",this.layerOptions?.paint?.["circle-color"]??"#000000")}clone(){return new t(this.id,this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.clone():null)}overrideClone(i){return new t(Zs(),this.layerDisplayName,this.layerOptions?pe({},this.layerOptions):null,this.inputSource?this.inputSource.overrideClone(i):null)}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}transformData(i){this.updateSource(this.inputSource.transformResponse(i))}valid(){return!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,layerOptions:this.layerOptions,inputSource:this.inputSource}}};var NC=class{layerId;requestParams;constructor(i,e){this.layerId=i,this.requestParams=e}};var e8=class{summary;source;constructor(i,e){this.summary=i,this.source=e}valid(){return!!this.summary}};var lQ="virtual-clinic-source",sQ=class t extends e8{sourceType=lQ;constructor(i,e){super(i,e)}clone(){return new t(this.summary,this.source?[...this.source]:null)}overrideClone(i){return new t(this.summary,this.source?lu.overrideProperties(this.source,"virtualClinicId",i,e=>e):[])}toRequest(i){let e={};return this.source.forEach(n=>e[n]=[n]),Promise.resolve(new NC(i,e))}transformResponse(i){return od(i.value.map(e=>yh(e.address?.location,{displayName:e.name})))}getOverrideProperties(i){return this.source.map(e=>new su(i,"virtualClinicId",e,e,"possible",void 0))}getChildResources(){return{[tn.VIRTUAL_CLINIC]:this.source}}valid(){return super.valid()&&!!this.source&&this.source.length>0}};var Bke="clinics-filter-source",cQ=class t extends e8{sourceType=Bke;constructor(i,e){super(i,e)}clone(){return new t(this.summary,[...this.source])}overrideClone(i){return new t(this.summary,this.source?lu.overrideProperties(this.source,"clinicsFilterId",i,e=>e):[])}toRequest(i){let e={};return this.source.forEach(n=>{e[n]=[n,uI]}),Promise.resolve(new NC(i,e))}transformResponse(i){return od(i.value.map(e=>yh(e.clinic.address.location,{displayName:e.clinic.name})))}getOverrideProperties(i){return this.source.map(e=>new su(i,"clinicsFilterId",e,e,"possible",void 0))}getChildResources(){return{[tn.CLINICS_FILTER]:this.source}}valid(){return super.valid()&&!!this.source&&this.source.length>0}};var uQ="calculation",dQ=class t{summary;source;groupBys;resultSetOperation;constructor(i,e,n,r){this.summary=i,this.source=e,this.groupBys=n,this.resultSetOperation=r}sourceType=uQ;clone(){return new t(this.summary,this.source?this.source.clone():null,this.groupBys?[...this.groupBys]:null,this.resultSetOperation?pe({},this.resultSetOperation):null)}overrideClone(i){return new t(this.summary,this.source?this.source.overrideClone(i):null,this.groupBys?[...this.groupBys]:null,this.resultSetOperation?pe({},this.resultSetOperation):null)}toRequest(i,e){return PC.calculationsToRequest([{id:i,calculation:this.source,groupBy:this.groupBys}],e,this.resultSetOperation).then(n=>n[0]).then(n=>new NC(i,{0:[n]}))}toPrecalculatedTileRequest(i,e,n){return this.valid()?this.source.toRequestPart(n).then(r=>({tileId:i,calculationId:e,calculationInput:$e(pe({},r),{groupBy:this.groupBys.map(o=>Ep.normalize(o)),resultSetOperation:this.resultSetOperation})})):null}valid(){return!!this.summary&&!!this.source&&this.source.isValid()&&!!this.groupBys}getOverrideProperties(i){return this.source.getOverrideProperties(i)}getChildResources(){return this.source.getChildResources()}};var Vke="market-source",pQ=class t{summary;source;marketGranularity;sourceType=Vke;constructor(i,e,n){this.summary=i,this.source=e,this.marketGranularity=n}clone(){return new t(this.summary,this.source?[...this.source]:null,this.marketGranularity)}getChildResources(){return{[tn.MARKET]:this.source}}getOverrideProperties(i){return this.source.map(e=>new su(i,"market",e,e,"possible",void 0))}overrideClone(i){return new t(this.summary,this.source?lu.overrideProperties(this.source,"market",i,e=>e):[],this.marketGranularity)}toRequest(i){let e={},n=[];switch(this.marketGranularity){case"postalCodes":{n=[{value:"postalCode"}];break}case"administrativeDistricts":{n=[{value:"administrativeDistrictId"}];break}}return this.source.forEach(r=>e[r]=[r,n]),Promise.resolve(new NC(i,e))}valid(){return!!this.summary&&!!this.source&&this.source.length>0}};var hQ="isochrone-source",mQ=class t{summary;source;distanceInMinutes;sourceType=hQ;constructor(i,e,n){this.summary=i,this.source=e,this.distanceInMinutes=n}clone(){return new t(this.summary,this.source,this.distanceInMinutes)}getChildResources(){return this.source.type==="virtualClinic"?{[tn.VIRTUAL_CLINIC]:[this.source.value]}:{}}getOverrideProperties(i){return this.source.type==="virtualClinic"?[new su(i,"virtualClinicId",this.source.value,this.source.value,"not-possible",void 0)]:[]}overrideClone(i){let e=this.source.value;return this.source.type==="virtualClinic"&&(e=lu.overrideProperty(this.source.value,"virtualClinicId",i,n=>n)),new t(this.summary,{value:e,type:this.source.type},this.distanceInMinutes)}toRequest(i){let e={};return e[1]=[this.source.type,this.source.value],e[2]=[this.distanceInMinutes],Promise.resolve(new NC(i,e))}valid(){return!!this.summary&&!!this.source&&!!this.source.type&&!!this.source.value&&!!this.distanceInMinutes}};var xB=class{static defaultLayerOptions(i){switch(i){case"isochrone-source":return{color:new ua("#3FB1CE"),formatting:{type:"manual",format:{minimumFractionDigits:0,maximumFractionDigits:0}},paint:{"fill-opacity":.9}};case"calculation":return{colorFactory:new r0,formatting:{type:"manual",format:{minimumFractionDigits:0,maximumFractionDigits:0}}};case"market-source":return{color:new ua("#3FB1CE"),formatting:{type:"manual",format:{minimumFractionDigits:0,maximumFractionDigits:0}},paint:{"fill-opacity":.9}};default:return null}}static of(i,e){switch(i){case"virtual-clinic-source":return new sQ("Virtual Klinik Werte",[]);case"clinics-filter-source":return new cQ("Klinik-Filter Werte",[]);case"market-source":return new pQ("M\xE4rkte",[],"postalCodes");case"isochrone-source":return new mQ("Fahrzeit",null,20);case"calculation":return new dQ("Neue Berechnung",new pL(new bO("counts",new RA),null),[{fieldName:e,aggregation:{name:"SUM"}}],null)}}static fromObject(i,e){return _t(this,null,function*(){switch(i.sourceType){case"calculation":return RC.fromObject(i.source,e).then(n=>new dQ(i.summary,n,i.groupBys,i.resultSetOperation));case"virtual-clinic-source":return Promise.resolve(new sQ(i.summary,i.source));case"clinics-filter-source":return Promise.resolve(new cQ(i.summary,i.source));case"market-source":return Promise.resolve(new pQ(i.summary,i.source,i.marketGranularity));case"isochrone-source":return Promise.resolve(new mQ(i.summary,i.source,i.distanceInMinutes));default:throw new Error(`${i.sourceType} is not implemented !`)}})}};var t8={"virtual-clinic-source":"Virtuelle Klinik","clinics-filter-source":"Klinik-Filter","market-source":"M\xE4rkte",calculation:"Berechnung","isochrone-source":"Fahrzeit"};var Det="fill-layer",eb=class{static cloneOptions(i){return i?$e(pe({},i),{colorFactory:i.colorFactory?.clone(),color:i?.color?.clone()}):null}static heatmapControlLayerConfig(i,e,n,r){let o="";switch(e.sourceType){case"calculation":{o=e.groupBys.slice().pop().fieldName;break}case"market-source":switch(e.marketGranularity){case"postalCodes":{o="postalCode";break}case"administrativeDistricts":{o="administrativeDistrict";break}default:{o=e.marketGranularity;break}}}let a=r.sourceMapping[o].geoJsonPropertiesKey,c=N1.fromObject(n.formatting);return{displayName:i,layerId:r.layerMapping[o].id,sourceId:r.sourceMapping[o].id,geoJsonPropertiesKey:a,popup:{popupType:"default",titleFnc:r.sourceMapping[o].popupConfig.titleFn,messageFnc:(m,g)=>g?c.formatFnc(g[m.properties[a]]):null,messagePrefix:c.type==="manual"&&c?.label||""},visible:"visible"}}};var Sue=class t extends uy{id;layerDisplayName;layerOptions;inputSource;config;layerType=Det;tileResponse$=new hi(1);layerId;sourceId;constructor(i=Zs(),e,n,r,o={displayName:e,sourceId:`isochrome-source-${Zs()}`}){super(i,o),this.id=i,this.layerDisplayName=e,this.layerOptions=n,this.inputSource=r,this.config=o,this.layerId=`isochrome-layer-${Zs()}`,this.sourceId=this.config.sourceId}afterInit(i,e){super.afterInit(i,e),this.tileResponse$.asObservable().subscribe(n=>this.transformData(n))}layer(){let i=this.layerOptions.color?this.layerOptions.color.toString():this.layerOptions.colorFactory.getColorForValue(0,0,0)?.toString()??"#000000";return $e(pe({},this.layerOptions),{type:"fill",id:this.layerId,source:this.sourceId,paint:$e(pe({},this.layerOptions.paint),{"fill-color":i})})}source(){return{sourceId:this.sourceId,sourceData:{type:"geojson",data:null}}}clone(){return new t(this.id,this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.clone():null,this.config)}overrideClone(i){return new t(Zs(),this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.overrideClone(i):null,this.config)}transformData(i){this.updateSource(i.value)}updateLegendRef(i){return this.layerOptions.color?new Pm(this.id,this.layerDisplayName,"public",this.layerOptions.color.toString()):new GM(this.id,this.layerDisplayName,this.layerOptions.colorFactory,null,null)}valid(){let i=!!this.layerOptions.colorFactory||!!this.layerOptions.color;return!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()&&i}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,inputSource:this.inputSource,layerOptions:$e(pe({},this.layerOptions),{color:this.layerOptions?.color?.toString()??void 0})}}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}};var wue=class t extends Bw{id;layerDisplayName;layerOptions;inputSource;cubeMapFeatureConfig;config;currentGroupBy;layerType="fill-layer";tileResponse$=new hi(1);constructor(i=Zs(),e,n,r,o,a=eb.heatmapControlLayerConfig(e,r,n,o)){super(i,a),this.id=i,this.layerDisplayName=e,this.layerOptions=n,this.inputSource=r,this.cubeMapFeatureConfig=o,this.config=a,this.currentGroupBy=this.inputSource.groupBys.slice().pop(),this.defaultBounds=this.cubeMapFeatureConfig.mapOptions.bounds,this.layerOptions.colorFactory&&this.colorFactory$.next(this.layerOptions.colorFactory)}afterInit(i,e){super.afterInit(i,e),this.tileResponse$.asObservable().subscribe(n=>this.transformData(n))}clone(){return new t(this.id,this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.clone():null,this.cubeMapFeatureConfig,this.config)}overrideClone(i){return new t(Zs(),this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.overrideClone(i):null,this.cubeMapFeatureConfig,this.config)}layer(){if(this.cubeMapFeatureConfig.layerMapping[this.currentGroupBy.fieldName])return $e(pe({},this.cubeMapFeatureConfig.layerMapping[this.currentGroupBy.fieldName]),{id:`${this.layerControlId}_${this.config.layerId}`,source:this.config.sourceId});console.error(`unknown layerMapping: ${this.currentGroupBy.fieldName}`)}source(){if(this.cubeMapFeatureConfig.sourceMapping[this.currentGroupBy.fieldName])return{sourceId:this.config.sourceId,sourceData:pe({},this.cubeMapFeatureConfig.sourceMapping[this.currentGroupBy.fieldName])};console.error(`unknown sourceMapping: ${this.currentGroupBy.fieldName}`)}transformData(i){let e=this._heatmapData(i,this.inputSource.groupBys);this.data$.next(e)}_heatmapData(i,e){let n=i.groupedValues||[],r={};return n.forEach(o=>{let a=e.some(c=>c.fieldName==="administrativeDistrict")?io.create(o.label.key)?.value:o.label.key;r[a]=o.value}),delete r[0],r}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,layerOptions:this.layerOptions,inputSource:$e(pe({},this.inputSource),{color:this.layerOptions?.color?.toString()??void 0})}}valid(){return!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()}};var Iue=class t extends Bw{id;layerDisplayName;layerOptions;inputSource;cubeMapFeatureConfig;config;layerId;layerType="fill-layer";tileResponse$=new hi(1);constructor(i=Zs(),e,n,r,o,a=eb.heatmapControlLayerConfig(e,r,n,o)){super(i,a),this.id=i,this.layerDisplayName=e,this.layerOptions=n,this.inputSource=r,this.cubeMapFeatureConfig=o,this.config=a,this.layerId=`market-layer-${Zs()}`}afterInit(i,e){super.afterInit(i,e),this.tileResponse$.asObservable().subscribe(n=>this.transformData(n))}layer(){if(this.cubeMapFeatureConfig.layerMapping[this.inputSource.marketGranularity])return $e(pe(pe({},this.cubeMapFeatureConfig.layerMapping[this.inputSource.marketGranularity]),this.layerOptions),{type:"fill",id:this.layerId,paint:$e(pe({},this.layerOptions.paint),{"fill-color":"rgba(0,0,0,0.0)","fill-outline-color":"rgba(0,0,0,0.0)"})});console.error(`unknown layerMapping: ${this.inputSource.marketGranularity}`)}source(){if(this.cubeMapFeatureConfig.sourceMapping[this.inputSource.marketGranularity])return{sourceId:this.cubeMapFeatureConfig.sourceMapping[this.inputSource.marketGranularity].id,sourceData:pe({},this.cubeMapFeatureConfig.sourceMapping[this.inputSource.marketGranularity])};console.error(`unknown sourceMapping: ${this.inputSource.marketGranularity}`)}clone(){return new t(this.id,this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.clone():null,this.cubeMapFeatureConfig,this.config)}overrideClone(i){return new t(Zs(),this.layerDisplayName,eb.cloneOptions(this.layerOptions),this.inputSource?this.inputSource.overrideClone(i):null,this.cubeMapFeatureConfig,this.config)}transformData(i){let e={};switch(this.inputSource.marketGranularity){case"postalCodes":{new Set(i.value.map(r=>r.label)).forEach(r=>{e[r]=null});break}case"administrativeDistricts":{i.value.map(n=>n.label).map(n=>io.create(n)).forEach(n=>{e[n.value]=null});break}}this.data$.next(e)}updateSource(i){let e="rgba(0,0,0,0.0)",n=this.layerOptions.color?this.layerOptions.color.toString():this.layerOptions.colorFactory.getColorForValue(0,0,0)?.toString()??"#000000";switch(this.inputSource.marketGranularity){case"postalCodes":{if(Object.keys(i).length>0){e=["match",["get","plz"]];for(let r of Object.keys(i))e.push(r,n);e.push("rgba(0,0,0,0)")}break}case"administrativeDistricts":{let r=Object.keys(i).map(o=>io.create(o));r.length>0&&(e=["match",["get","AGS"]],Ni.unique(r,o=>o.value).forEach(o=>{e instanceof Array&&e.push(o.value,n)}),e.push("rgba(0,0,0,0)"));break}}this.mapRef.setPaintProperty(this.layerId,"fill-color",e)}updateLegendRef(i,e){return this.layerOptions.color?new Pm(this.id,this.layerDisplayName,"public",this.layerOptions.color.toString()):new GM(this.id,this.layerDisplayName,this.layerOptions.colorFactory,e.min,e.max)}getOverrideProperties(i){return this.inputSource.getOverrideProperties(i)}toJSON(){return{layerType:this.layerType,id:this.id,layerDisplayName:this.layerDisplayName,layerOptions:this.layerOptions,inputSource:$e(pe({},this.inputSource),{color:this.layerOptions?.color?.toString()??void 0})}}valid(){return!!this.layerDisplayName&&!!this.inputSource&&this.inputSource.valid()}};var Tue=class{static possibleSourceTypes(i){switch(i){case"fill-layer":return[{sourceType:"calculation",displayName:t8.calculation},{sourceType:"market-source",displayName:t8["market-source"]},{sourceType:"isochrone-source",displayName:t8["isochrone-source"]}];case"marker-layer":case"circle-layer":case"line-layer":return[{sourceType:"virtual-clinic-source",displayName:t8["virtual-clinic-source"]},{sourceType:"clinics-filter-source",displayName:t8["clinics-filter-source"]}]}}static fromObject(i,e,n){return _t(this,null,function*(){switch(i.layerType){case"marker-layer":return xB.fromObject(i.inputSource,n).then(r=>new bue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r));case"line-layer":return xB.fromObject(i.inputSource,n).then(r=>new Cue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r));case"circle-layer":return xB.fromObject(i.inputSource,n).then(r=>new xue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r));case"fill-layer":return xB.fromObject(i.inputSource,n).then(r=>{switch(r.sourceType){case"isochrone-source":return new Sue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r);case"calculation":return new wue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r,e);case"market-source":return new Iue(i.id,i.layerDisplayName,this.layerOptionsFromObject(i.layerType,i.layerOptions),r,e);default:throw Error(`${r.sourceType} not implemented for AysTileMapFillLayer`)}})}})}static layerOptionsFromObject(i,e){switch(i){case"fill-layer":return $e(pe({},e),{colorFactory:e.colorFactory?v5.fromObject(e.colorFactory):new r0,color:e.color?new ua(e.color):null});case"circle-layer":case"line-layer":case"marker-layer":return e}}};var SO="map",fQ=class t extends Ey{_mapboxOptions;_mapboxLayers;static fromObject(i,e,n){return _t(this,null,function*(){let r=Promise.resolve(null);return i.mapboxLayers&&(r=Promise.all(i.mapboxLayers.map(o=>Tue.fromObject(o,e,n)))),r.then(o=>new t(i.id,i.colspan,i.displayName,i.note,i.mapboxOptions,o))})}type=SO;_responses;constructor(i,e,n,r,o,a){super(i,e,n,r),this._mapboxOptions=o,this._mapboxLayers=a}clone(){return new t(this.id,this.colspan,this.displayName,JSON.parse(JSON.stringify(this.note)),pe({},this.mapboxOptions),[...this._mapboxLayers.map(i=>i.clone())])}toRequests(i){let e={calculation:[],"clinics-filter-source":[],"virtual-clinic-source":[],"market-source":[],"isochrone-source":[]};if(!this._mapboxLayers||this._mapboxLayers?.length===0)return Promise.resolve(e);let n=this._mapboxLayers.map(r=>r.inputSource.toRequest(r.id,i).then(o=>({request:o,sourceType:r.inputSource.sourceType})));return Promise.all(n).then(r=>(r.forEach(o=>{e[o.sourceType].push(o.request)}),e))}overrideClone(i){let e=this._mapboxLayers?this._mapboxLayers.map(n=>n.overrideClone(i)):null;return new t(Zs(),this.colspan,this.displayName,JSON.parse(JSON.stringify(this.note)),pe({},this.mapboxOptions),e)}isLoaded(){return!!this._responses&&Object.keys(this._responses).length>0}getChildResources(){let i={};return this._mapboxLayers.map(e=>e.inputSource).map(e=>{let n=e.getChildResources();i=yl.merge(i,n)}),i}getOverrideProperties(){let i=[];return this._mapboxLayers.forEach(e=>i.push(...e.getOverrideProperties(this.id))),i}toPrecalculatedTileRequest(i,e){let n=this._mapboxLayers.filter(r=>r.inputSource.sourceType==="calculation").map(r=>r.inputSource.toPrecalculatedTileRequest(this.id,r.id,i));return Promise.all(n).then(r=>(e&&r.forEach(o=>{this._responses[o.calculationId]&&(o.response=this._responses[o.calculationId])}),r))}toJSON(){return $e(pe({},super.toJSON()),{mapboxOptions:this._mapboxOptions,mapboxLayers:this._mapboxLayers})}_update(i){this.isValid().then(e=>{let n=$e(pe({},i),{tileValid:e.valid});i.eventType==="resolve"&&(this._responses=null),this.update$.next(n)})}get responses(){return this._responses}set responses(i){this._responses=this.parseResponseAndWriteErrors(i),this._update({eventType:"redraw"})}get mapboxOptions(){return this._mapboxOptions}set mapboxOptions(i){this._mapboxOptions=i;let e=this._mapboxLayers.some(n=>n.layerType==="fill-layer")?"resolve":"redraw";this._update({eventType:e,fieldName:"mapboxOptions",fieldValue:i})}get mapboxLayers(){return this._mapboxLayers}set mapboxLayers(i){this._mapboxLayers=[...i.map(e=>e.clone())],this._update({eventType:"resolve",fieldName:"mapboxLayers",fieldValue:i})}};var Eue=class t{_id;_displayName;_calculation;_groupBy;_formatting;static fromObject(i,e){return _t(this,null,function*(){let n=i.calculation?yield RC.fromObject(i.calculation,e):null,r=i.formatting?N1.fromObject(i.formatting):null;return new t(i.id,i.displayName,n,i.groupBy,r)})}constructor(i,e,n,r,o){this._id=i,this._displayName=e,this._calculation=n,this._groupBy=r,this._formatting=o,this._id||(this._id=Zs())}isValid(){return!!this._calculation&&this._calculation.isValid()&&Ep.valid(this._groupBy)}toJSON(){return{id:this._id,displayName:this._displayName,calculation:this._calculation.toJSON(),groupBy:this._groupBy,formatting:this._formatting}}clone(){let i=this._calculation.clone(),e=JSON.parse(JSON.stringify(this._groupBy)),n=this._formatting.clone();return new t(this._id,this._displayName,i,e,n)}overrideClone(i){let e=this._calculation.overrideClone(i),n=JSON.parse(JSON.stringify(this._groupBy)),r=this._formatting.clone();return new t(null,this._displayName,e,n,r)}getOverrideProperties(i){return this._calculation.getOverrideProperties(i)}getChildResources(){return this._calculation.getChildResources()}get id(){return this._id}set id(i){this._id=i}get displayName(){return this._displayName}set displayName(i){this._displayName=i}get calculation(){return this._calculation}set calculation(i){this._calculation=i}get groupBy(){return this._groupBy}set groupBy(i){this._groupBy=i}get formatting(){return this._formatting}set formatting(i){this._formatting=i}};var wO="value",gQ=class t extends Ey{_valueParts;static fromObject(i,e){return _t(this,null,function*(){let n=(i.valueParts||[]).map(r=>Eue.fromObject(r,e));return new t(i.id,i.colspan,i.displayName,i.note,yield Promise.all(n))})}type=wO;formattedValues;_responses;constructor(i,e,n,r,o){super(i,e,n,r),this._valueParts=o}clone(){let i=this._valueParts.map(n=>n.clone()),e=this.note?JSON.parse(JSON.stringify(this.note)):null;return new t(this.id,this.colspan,this.displayName,e,i)}overrideClone(i){let e=this._valueParts.map(r=>r.overrideClone(i)),n=this.note?JSON.parse(JSON.stringify(this.note)):null;return new t(null,this.colspan,this.displayName,n,e)}getChildResources(){let i={};return this._valueParts.map(e=>{let n=e.getChildResources();i=yl.merge(i,n)}),i}getOverrideProperties(){let i=[];return this._valueParts.forEach(e=>{i.push(...e.getOverrideProperties(this.id))}),i}toPrecalculatedTileRequest(i,e){return _t(this,null,function*(){let n=[];for(let r=0;r({id:e.id,calculation:e.calculation,groupBy:[Ep.normalize(e.groupBy)]})),i)}isLoaded(){return!!this._responses&&Object.keys(this._responses).length>0}isValid(){return Ty.create([...super.validationSteps(),{validationStepValid:this._valueParts.length>0,stepDescription:"Min. ein Value-Teil ausgew\xE4hlt"},{validationStepValid:this._valueParts.every(i=>i.isValid()),stepDescription:"Alle Value-Teile korrekt",showValidationStep:"ONLY_ON_ERROR"},...this._validationStepsBenchmarking()])}toJSON(){return $e(pe({},super.toJSON()),{valueParts:this._valueParts.map(i=>i.toJSON())})}_updateFormattedValues(){this.formattedValues=this._valueParts.filter(i=>this._responses[i.id]).map(i=>{let e=this._responses[i.id];return{value:i.formatting.formatFnc(e?.aggregatedValue,!0)||"n/a",displayName:i.displayName}})}_update(i){i.eventType==="resolve"&&(this._responses=null),this.isValid().then(e=>{this.update$.next($e(pe({},i),{tileValid:e.valid}))})}_validationStepsBenchmarking(){let i=[];return this._valueParts.forEach(e=>{i.push({validationStepValid:e.calculation.type==="benchmarking"?e.groupBy.fieldName!=="specialtyDepartment":!0,stepDescription:`[${e.displayName}] Gruppierung nach Fachabteilung in Benchmarking Kachel nicht m\xF6glich`,showValidationStep:"ONLY_ON_ERROR"});let n=e.calculation.term.getFullyInpatientCasesFilters().flat().map(r=>r.expression).some(r=>Pa.findAll(OC,r).length>0);i.push({validationStepValid:e.calculation.type==="benchmarking"?!n:!0,stepDescription:`[${e.displayName}] Filter mit interner Fachabteilung in Benchmarking Kachel nicht m\xF6glich`,showValidationStep:"ONLY_ON_ERROR"})}),i}get responses(){return this._responses}set responses(i){this._responses=this.parseResponseAndWriteErrors(i),this._updateFormattedValues(),this._update({eventType:"redraw"})}get valueParts(){return this._valueParts}set valueParts(i){this._valueParts=i,this._update({eventType:"resolve"})}};var Aue=class t{_groupBy;static fromObject(i){return new t(i.groupBy)}constructor(i){this._groupBy=i}clone(){let i=JSON.parse(JSON.stringify(this._groupBy));return new t(i)}isValid(){return!!this._groupBy&&Ep.valid(this._groupBy)}toJSON(){return{groupBy:this._groupBy}}get groupBy(){return this._groupBy}set groupBy(i){this._groupBy=i}};var Due=class{_id;_calculation;_colorScheme;_tolerance;type;constructor(i,e,n,r=0){this._id=i,this._calculation=e,this._colorScheme=n,this._tolerance=r,this._id||(this._id=Zs())}getChildResources(){return this._calculation.getChildResources()}getOverrideProperties(i){return this._calculation.getOverrideProperties(i)}isValid(){return this._calculation.isValid()&&!!this._colorScheme}toJSON(){return{type:this.type,id:this._id,calculation:this._calculation.toJSON(),colorScheme:{lower:this._colorScheme.lower.toHexString(),higher:this._colorScheme.higher.toHexString()},tolerance:this._tolerance}}get id(){return this._id}set id(i){this._id=i}get calculation(){return this._calculation}set calculation(i){this._calculation=i}get colorScheme(){return this._colorScheme}set colorScheme(i){this._colorScheme=i}get tolerance(){return this._tolerance}set tolerance(i){this._tolerance=i}};var _Q=class t extends Due{_aggregation;static fromObject(i,e){return _t(this,null,function*(){let n=yield RC.fromObject(i.calculation,e),r={lower:new ua(i.colorScheme.lower),higher:new ua(i.colorScheme.higher)};return new t(i.id,n,r,i.tolerance,i.aggregation)})}type="benchmark";constructor(i,e,n,r,o){super(i,e,n,r),this._aggregation=o}toJSON(){return $e(pe({},super.toJSON()),{aggregation:this._aggregation})}getRequestData(i){let e=[];if(i.length>0&&e.push(this._getRequestDataPart(0,[i[0]],i[0].aggregation)),i.length>1){let n=JSON.parse(JSON.stringify(i)).reverse(),r=this._getGroupByArrays(n);r.splice(0,1),r.forEach((o,a)=>{let c=this._getRequestDataPart(a+1,o,this._aggregation);e.push(c)})}return e}_getGroupByArrays(i){let e=[];for(let n=0;nOue.fromObject(a,e)),r=yield Promise.all(n),o=(i.groupBys||[]).map(a=>Aue.fromObject(a));return new t(i.id,i.colspan,i.displayName,i.note,r,o)})}tableData;_responses;constructor(i,e,n,r,o,a){super(i,e,n,r),this._columns=o,this._groupBys=a}clone(){let i=this._columns.map(n=>n.clone()),e=this._groupBys.map(n=>n.clone());return new t(this.id,this.colspan,this.displayName,this.note,i,e)}overrideClone(i){let e=this._columns.map(r=>r.overrideClone(i)),n=this._groupBys.map(r=>r.clone());return new t(null,this.colspan,this.displayName,this.note,e,n)}getChildResources(){let i={};return this._columns.forEach(e=>{i=yl.merge(i,e.getChildResources())}),i}getOverrideProperties(){let i=[];return this._columns.filter(e=>SB.isCalculationColumn(e)).forEach(e=>{i.push(...e.getOverrideProperties(this.id))}),i}toPrecalculatedTileRequest(i,e){return this.toRequests(i).then(r=>{let o=r.map(a=>Object.entries(a)).flat().map(a=>({tileId:this.id,calculationId:a[0],calculationInput:a[1]}));return e&&o.forEach(a=>{this._responses[a.calculationId]&&(a.response=this._responses[a.calculationId])}),o})}isLoaded(){return!!this._responses&&Object.keys(this._responses).length>0}isValid(){return Ty.create([...super.validationSteps(),{validationStepValid:!!this._columns&&this._columns.length>0,stepDescription:"Min. eine Spalte ausgew\xE4hlt"},{validationStepValid:this._columns.every(i=>i.isValid()),stepDescription:"Alle Spalten korrekt",showValidationStep:"ONLY_ON_ERROR"},{validationStepValid:this._groupBys&&this._groupBys.length>0,stepDescription:"Min. eine Gruppierung ausgew\xE4hlt"},...this._validationStepsBenchmarking()])}toJSON(){return $e(pe({},super.toJSON()),{columns:this._columns.map(i=>i.toJSON()),groupBys:this._groupBys.map(i=>i.toJSON())})}toRequests(i){let e=this._groupBys.map(r=>Ep.normalize(r.groupBy)),n=this._columns.map(r=>r.getRequestData(e)).flat();return PC.calculationsToRequest(n,i)}_update(i){this.isValid().then(e=>{let n=$e(pe({},i),{tileValid:e.valid});i.eventType==="resolve"&&(this._responses=null),this.update$.next(n)})}_updateTableData(){let i=this._groupBys.map(n=>n.groupBy),e=Q6.createOperatingNumberDataNodes(this._columns,this._responses,i);this.tableData=e.nodes}_validationStepsBenchmarking(){let i=this._columns.filter(n=>n.type==="calculation").map(n=>n).some(n=>n.calculation.type==="benchmarking"||n.comparison?.type==="benchmark"),e=this._groupBys.some(n=>n.groupBy.fieldName==="specialtyDepartment");return[{validationStepValid:i?!e:!0,stepDescription:"Gruppierung nach Fachabteilung in Benchmarking Kachel nicht m\xF6glich",showValidationStep:"ONLY_ON_ERROR"}]}get columns(){return this._columns}set columns(i){this._columns=i,this._update({eventType:"resolve"})}get groupBys(){return this._groupBys}set groupBys(i){this._groupBys=i,this._update({eventType:"resolve"})}get responses(){return this._responses}set responses(i){this._responses=this.parseResponseAndWriteErrors(i),this._updateTableData(),this._update({eventType:"redraw"})}};var Rue=class{static fromObject(i,e,n){return _t(this,null,function*(){switch(i.type){case Fce:return Promise.resolve(new dK(i.id,i.colspan,i.displayName,i.note,i.text));case Nce:return Promise.resolve(new cK(i.id,i.colspan,i.displayName,i.note,i.image,i.fitToTile));case wO:return gQ.fromObject(i,n);case xO:return aQ.fromObject(i,n);case SO:return fQ.fromObject(i,e,n);case IO:return vQ.fromObject(i,n);default:throw new Error(`Unknown tile type: ${i.type}`)}})}static getDefault(i,e=1){let n="Neue Kachel",r;switch(i){case IO:r=new vQ(null,e,n,null,[],[]);break;case xO:r=new aQ(null,e,n,null,{coordinateSystem:"cartesian",axes:{value:{scaleRange:{type:"auto",beginAtZero:!0}}},indexAxis:"x"},[],[{fieldName:"dismissalDateTime",aggregation:{name:"SUM"},parameters:[{name:"dismissalTimeUnit",value:"year"}]}],null);break;case Fce:r=new dK(null,e,n,null,null);break;case Nce:r=new cK(null,e,n,null,null);break;case SO:r=new fQ(null,e,n,null,{scaleRange:{type:"auto"}},[]);break;case wO:r=new gQ(null,e,n,null,[]);break;default:throw new Error(`Unknown tile type: ${i}`)}return r}};var wB=class{static isPrecalculatable(i){return i.type===xO||i.type===IO||i.type===SO||i.type===wO}static getRelativeTimeSelectionTriggerItems(i){let e=[];switch(i.type){case"table":i.columns.filter(n=>n.type==="calculation").forEach(n=>{let r=this._processTerm(i.id,n.id,n.calculation.term);if(r&&e.push(r),n.comparison){let o=this._processTerm(i.id,n.comparison.id,n.comparison.calculation.term);o&&e.push(o)}});break;case"value":i.valueParts.forEach(n=>{let r=this._processTerm(i.id,n.id,n.calculation.term);r&&e.push(r)});break;case"chart":i.chartParts.forEach(n=>{let r=this._processTerm(i.id,n.id,n.calculation.term);r&&e.push(r)});break;case"map":i.mapboxLayers.filter(n=>n.inputSource.sourceType==="calculation").forEach(n=>{let r=n.inputSource,o=this._processTerm(i.id,n.id,r.source.term);o&&e.push(o)});break}return e}static _processTerm(i,e,n){let r=n.getFullyInpatientCasesFilters().filter(o=>o.expression.hasRelativeTimeSelection()).map(o=>Pa.findAll(sO.Specification,o.expression)).flat().filter(o=>o.hasRelativeTimeSelection()).map(o=>o.toValue()).map(o=>o.intervalRelative);return r.length>0?this._createTriggerItemForRelativeTimeSelections(i,e,r):null}static _createTriggerItemForRelativeTimeSelections(i,e,n){let r={tileId:i,preCalculationId:e,triggerDate:null},o=n.map(a=>a.getTriggerDateNextInterval()).sort();return r.triggerDate=o[0],r}};var Sni=2,wni=250,Pue=class t{id;_cols;tiles;_heightInPixel;static fromObject(i,e,n){return _t(this,null,function*(){let r=i.tiles.map(o=>Rue.fromObject(o,e,n));return Promise.all(r).then(o=>new t(i.id,i.cols,o,i.heightInPixel))})}rowIndex;colsLeft;update$=new Ai;constructor(i,e=Sni,n=[],r=wni){this.id=i,this._cols=e,this.tiles=n,this._heightInPixel=r,this.id=this.id?this.id:Zs(),this._updateColsLeft(),this._setTileIndices()}addTile(i){this.tiles.push(i),this._update({reload:!0,store:!0})}deleteTile(i,e){return _t(this,null,function*(){let n=this.tiles[i],r={reload:!1,store:!0};if(wB.isPrecalculatable(n)){let o=yield n.toPrecalculatedTileRequest(e,!1).then(a=>a.map(c=>c.calculationId));r.changes=[{type:"DELETE",tileId:n.id,preCalculationIds:o}]}this.tiles.splice(i,1),this._update(r)})}updateTileIndex(i,e){let n=this.tiles.map(o=>o.id).indexOf(i),r=this.tiles[n];this.tiles.splice(n,1),this.tiles.splice(e,0,r),this._update({reload:!1,store:!0,changes:[]})}clone(){return new t(this.id,this._cols,this.tiles.map(i=>i.clone()),this._heightInPixel)}overrideClone(i=[]){let e=this.tiles.map(n=>n.overrideClone(i.filter(r=>r.tileId===n.id)));return new t(null,this._cols,e,this._heightInPixel)}equals(i){return gr.equals(this.id,i.id)&&gr.equals(this._cols,i._cols)&&Ni.equals(this.tiles,i.tiles,(e,n)=>gr.equals(e.id,n.id))&&gr.equals(this._heightInPixel,i._heightInPixel)}getChildResources(){let i={};return this.tiles.forEach(e=>{let n=e.getChildResources();i=yl.merge(i,n)}),i}getTilesByChildResources(i){let e=Object.keys(i);return this.tiles.filter(n=>{let r=n.getChildResources();return Object.keys(r).filter(c=>e.includes(c)).some(c=>{let m=r[c].filter(g=>i[c].includes(g));return m&&m.length>0})})}toJSON(){return{id:this.id,cols:this._cols,tiles:this.tiles,heightInPixel:this._heightInPixel}}get heightInPixel(){return this._heightInPixel}set heightInPixel(i){this._heightInPixel=i,this._update({value:this,store:!0,reload:!0})}get cols(){return this._cols}set cols(i){this._cols=i,this._updateColsLeft(),this._update({value:this,store:!0,reload:!0})}_update(i){this._updateColsLeft(),this._setTileIndices(),this.update$.next(i)}_updateColsLeft(){let i=this.tiles.reduce((e,n)=>e+n.colspan,0);this.colsLeft=this._cols-i}_setTileIndices(){this.tiles.forEach((i,e)=>i.tileIndex=e)}};var Nue=class t{id;name;rows;static fromObject(i,e,n){return _t(this,null,function*(){let o=(i.rows||[]).map(a=>Pue.fromObject(a,e,n));return Promise.all(o).then(a=>new t(i.id,i.name,a))})}update$=new Ai;_rowUpdateProxy$=new Ai;_rowUpdateSubs=[];constructor(i,e,n=[]){this.id=i,this.name=e,this.rows=n,this.id=this.id?this.id:Zs(),this._rowUpdateProxy$.subscribe(r=>{let o=$e(pe({},r),{value:this});this.update$.next(o)}),this._setRowUpdateSubscriptions(),this._setRowIndices()}addRow(i){this.rows.push(i),this._setRowUpdateSubscriptions(),this._setRowIndices(),this.update$.next({reload:!1,store:!0,value:this,changes:[]})}updateRow(i){let e=this.rows.map(n=>n.id).indexOf(i.id);this.rows.splice(e,1,i),this._setRowUpdateSubscriptions(),this.update$.next({reload:!0,store:!0,value:this,changes:[]})}deleteRow(i){let e=this.rows.splice(i,1),n=[];e[0].tiles.forEach(r=>_t(this,null,function*(){if(r.type===xO||r.type===IO||r.type===SO||r.type===wO){let o=yield r.toPrecalculatedTileRequest({codeSpectra:{resolve(a){return Promise.resolve(a)}},markets:{resolve(a){return Promise.resolve(a)}}},!1).then(a=>a.map(c=>c.calculationId));n.push({type:"DELETE",tileId:r.id,preCalculationIds:o})}})),this._setRowIndices(),this._setRowUpdateSubscriptions(),this.update$.next({reload:!1,store:!0,value:this,changes:n})}updateRowIndex(i,e){let n=this.rows.map(o=>o.id).indexOf(i),r=this.rows[n];this.rows.splice(n,1),this.rows.splice(e,0,r),this._setRowIndices(),this.update$.next({reload:!1,store:!0,value:this,changes:[]})}clone(){let i=this.rows.map(e=>e.clone());return new t(this.id,this.name,i)}overrideClone(i){let e=this.rows.map(n=>n.overrideClone(i));return new t(null,this.name,e)}equals(i){return gr.equals(this.id,i.id)&&gr.equals(this.name,i.name)&&Ni.equals(this.rows,i.rows,(e,n)=>e.equals(n))}destroy(){this._rowUpdateSubs.forEach(i=>i.unsubscribe()),this._rowUpdateSubs=[]}toJSON(){return{id:this.id,name:this.name,rows:this.rows}}getTilesByChildResources(i){let e=[];return this.rows.forEach(n=>{let r=n.getTilesByChildResources(i);e=e.concat(r)}),e}getChildResources(){let i={};return this.rows.forEach(e=>{let n=e.getChildResources();i=yl.merge(i,n)}),i}hasTiles(){return this.rows.some(i=>!!i.tiles&&i.tiles.length>0)}_setRowIndices(){this.rows.forEach((i,e)=>i.rowIndex=e)}_setRowUpdateSubscriptions(){this._rowUpdateSubs&&this._rowUpdateSubs.length>0&&(this._rowUpdateSubs.forEach(i=>i.unsubscribe()),this._rowUpdateSubs=[]),this.rows.forEach(i=>{this._subscribeToRowUpdates(i)})}_subscribeToRowUpdates(i){let e=i.update$.subscribe(n=>{this._rowUpdateProxy$.next(n)});this._rowUpdateSubs.push(e)}};var n8=class t{id;name;_pages;createdDate;modifiedDate;highestPermission;hasError;static fromObject(i,e,n){return _t(this,null,function*(){let o=(i.pages||[]).map(m=>Nue.fromObject(m,e,n)),a=null;i.createdDate&&(a=new Date(i.createdDate));let c=null;return i.modifiedDate&&(c=new Date(i.modifiedDate)),Promise.all(o).then(m=>new t(i.id,i.name,m,a,c,i.highestPermission,i.hasError))})}update$=new Ai;resourceName=tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD;_pageUpdateProxy$=new Ai;_pageUpdateSubs=[];constructor(i,e,n,r,o,a,c){this.id=i,this.name=e,this._pages=n,this.createdDate=r,this.modifiedDate=o,this.highestPermission=a,this.hasError=c,this._pageUpdateProxy$.subscribe(m=>{let g=$e(pe({},m),{value:this});this.update$.next(g)}),this._setPageUpdateSubscriptions()}getTilesByChildResources(i){let e=[];return this._pages.forEach(n=>{let r=n.getTilesByChildResources(i);e=e.concat(r)}),e}getChildResources(){let i={};return this._pages.forEach(e=>{let n=e.getChildResources();i=yl.merge(i,n)}),i}findTile(i){let e=null;return this._pages.forEach(n=>{n.rows.forEach(r=>{r.tiles.forEach(o=>{if(o.id===i){e=o;return}})})}),e}clone(){return new t(this.id,this.name,this._pages.map(i=>i.clone()),this.createdDate,this.modifiedDate,this.highestPermission,this.hasError)}overrideClone(i){let e=this._pages.map(n=>n.overrideClone(i));return new t(null,`${this.name} Kopie`,e)}toJSON(){return{id:this.id,name:this.name,pages:this._pages,modifiedDate:this.modifiedDate,createdDate:this.createdDate,highestPermission:this.highestPermission,hasError:this.hasError}}getAllTiles(i=e=>!0){let e=[];return this._pages.forEach(n=>{n.rows.forEach(r=>{let o=r.tiles.filter(i);e=e.concat(o)})}),e}editPage(i){let e=this._pages.map(n=>n.id).indexOf(i.id);this._pages[e]=i,this.update$.next({changes:[],store:!0,reload:!1,value:this})}addPage(i,e){let n=[];i.rows.forEach(r=>{r.tiles.filter(wB.isPrecalculatable).forEach(o=>{let a=o.toPrecalculatedTileRequest(e,!1).then(c=>({type:"CREATE",tileId:o.id,preCalculations:c}));n.push(a)})}),Promise.all(n).then(r=>{this._pages.push(i),this.update$.next({changes:r,store:!0,reload:!1,value:this}),this._setPageUpdateSubscriptions()})}deletePage(i,e){let n=this._pages[i],r=[];n.rows.forEach(o=>{o.tiles.filter(wB.isPrecalculatable).forEach(a=>{let c=a.toPrecalculatedTileRequest(e,!1).then(m=>m.map(g=>g.calculationId)).then(m=>({type:"DELETE",tileId:a.id,preCalculationIds:m}));r.push(c)})}),Promise.all(r).then(o=>{this._pages.splice(i,1),this.update$.next({changes:o,store:!0,reload:!1,value:this}),this._setPageUpdateSubscriptions()})}_setPageUpdateSubscriptions(){this._pageUpdateSubs&&this._pageUpdateSubs.length>0&&(this._pageUpdateSubs.forEach(i=>i.unsubscribe()),this._pageUpdateSubs=[]),(this.pages??[]).forEach(i=>{this._subscribeToPageUpdates(i)})}_subscribeToPageUpdates(i){let e=i.update$.subscribe(n=>{this._pageUpdateProxy$.next(n)});this._pageUpdateSubs.push(e)}get pages(){return this._pages}set pages(i){this._pages=i,this.update$.next({changes:[],store:!0,reload:!1,value:this})}};var Fue=class{defaultMapping="administrativeDistrict";possibleSourceTypes=[lQ,uQ,hQ,Vke,Bke];layerMapping={postalCode:ng,postalCodes:ng,administrativeDistrict:uC,administrativeDistricts:uC};sourceMapping={postalCode:$e(pe({},aF),{id:Mv,geoJsonPropertiesKey:"plz",popupConfig:{titleFn:i=>i.properties.note}}),postalCodes:$e(pe({},aF),{id:Mv,geoJsonPropertiesKey:"plz",popupConfig:{titleFn:i=>i.properties.note}}),administrativeDistrict:$e(pe({},oF),{id:n1,geoJsonPropertiesKey:"AGS",popupConfig:{titleFn:i=>i.properties.GEN}}),administrativeDistricts:$e(pe({},oF),{id:n1,geoJsonPropertiesKey:"AGS",popupConfig:{titleFn:i=>i.properties.GEN}})};mapOptions=JSON.parse(JSON.stringify(rg))};var Lue=class{defaultMapping="stateId";possibleSourceTypes=[lQ,uQ,hQ];layerMapping={stateId:w$e,bezirkAT:A$e,municipalCodeAT:T$e};sourceMapping={stateId:$e(pe({},I$e),{id:P1e,geoJsonPropertiesKey:"key",popupConfig:{titleFn:i=>i.properties.displayName}}),bezirkAT:$e(pe({},D$e),{id:F1e,geoJsonPropertiesKey:"key",popupConfig:{titleFn:i=>i.properties.displayName}}),municipalCodeAT:$e(pe({},E$e),{id:N1e,geoJsonPropertiesKey:"key",popupConfig:{titleFn:i=>i.properties.displayName}})};mapOptions=JSON.parse(JSON.stringify(N$e))};var Bue=class{_baseUrl;constructor(i){this._baseUrl=i}base(){return`${this._baseUrl}/dashboards/user-defined`}byId(i){return`${this._baseUrl}/dashboards/user-defined/${i}`}children(i){return`${this.byId(i)}/relationships/children`}};var bQ=class{_environmentService;constructor(i){this._environmentService=i}index(){return`${this._environmentService.load("AYS_CLINIC_RESOURCE_URL")}/`}searchByGeo(){return`${this.index()}by-distance/`}clinic(i){return`${this.index()}by-id/${i.ik}/${i.sn}`}clinicLocations(i){return`${this.clinic(i)}/locations`}clinicBeds(i){return`${this.clinic(i)}/beds`}clinicCaseNumbers(i){return`${this.clinic(i)}/case-numbers`}clinicStaffing(i){return`${this.clinic(i)}/staffings`}cases(i){return`${this.clinic(i)}/G-DRG`}handDisinfectionUsage(i){return`${this.clinic(i)}/hand-disinfection-usage`}clinicSpecialtyDepartments(i){return`${this.clinic(i)}/specialty-departments/`}specialtyDepartment(i){return`${this.clinic(i)}/specialty-departments/${i.key}`}specialtyDepartmentCaseNumbers(i){return`${this.specialtyDepartment(i)}/case-numbers`}specialtyDepartmentCodes(i,e,n){let r=`${this.specialtyDepartment(i)}/${e}`;return n?`${r}?pageable`:r}specialtyDepartmentStaffing(i){return`${this.specialtyDepartment(i)}/staffings`}availableClinicLevels(){return`${this.index()}levels/available/`}availableSpecialEquipment(){return`${this.index().replace("/clinics","")}special-equipment/available`}bmgCriteriaDetails(i,e){return`${this.clinic(i)}/bmg-criteria/${e}/details`}bmgCriteriaOverview(){return`${this.index()}by-condition/bmg-criteria/overview`}};var Met=t=>ode.fromObj(t),r8=t=>{let i=Bu.fromObject(t.address);return{id:vs.fromObj(t.id),address:i,name:t.name}},Oet=t=>({geometry:t.geometry,clinic:r8(t.clinic)}),Ret=t=>({mainLocation:t.mainLocation?vs.fromObj(t.mainLocation):null,childLocations:t.childLocations&&t.childLocations.length>0?t.childLocations.map(i=>vs.fromObj(i)):null,otherLocations:t.otherLocations&&t.otherLocations.length>0?t.otherLocations.map(i=>vs.fromObj(i)):null});var tb=(()=>{class t{_httpClient;_environmentService;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new bQ(this._environmentService)}search(e,n=r8,r=()=>!0){let o=this._store.index(),a=new Vo().set("q",e);return this._httpClient.get(o,{params:a}).pipe(ot(c=>c.map(m=>n(m))),ot(c=>c.filter(m=>r(m))))}searchByDistance(e,n,r=3e4,o=null,a=Oet,c=()=>!0){let m=this._store.searchByGeo(),g=`[${n.toString()}, ${e.toString()}]`,C=new Vo;return C=C.set("center",g),C=C.set("distance",r.toString()),o&&(C=C.appendAll({years:o.map(w=>w.toString())})),this._httpClient.get(m,{params:C}).pipe(ot(w=>w.map(P=>a(P))),ot(w=>w.filter(P=>c(P))))}get(e,n=Met){let r=this._store.clinic(e),o=new Vo;return e.year&&(o=o.append("year",e.year)),this._httpClient.get(r,{params:o}).pipe(ot(a=>n(a)))}getAll(e,n=r8){let r=this._store.index(),o=new zM(e,null);return this._httpClient.post(r,o).pipe(ot(a=>a.map(c=>n(c.clinic))))}beds(e){let n=this._store.clinicBeds(e);return this._httpClient.get(n)}caseNumbers(e){let n=this._store.clinicCaseNumbers(e);return this._httpClient.get(n)}locations(e,n=Ret){let r=this._store.clinicLocations(e);return this._httpClient.get(r).pipe(ot(o=>n(o)))}staffing(e){let n=this._store.clinicStaffing(e);return this._httpClient.get(n).pipe(ot(AL.fromObject))}cases(e,n=Zie.DEFAULT){let r=this._store.cases(e);return this._httpClient.get(r,{params:n.toHttpParams()}).pipe(ot(o=>rE.responseToPage(o,a=>a.map(c=>yL.fromObj(c)))))}handDisinfectionUsage(e){let n=this._store.handDisinfectionUsage(e);return this._httpClient.get(n)}availableClinicLevels(){let e=this._store.availableClinicLevels();return this._httpClient.get(e).pipe(ot(n=>$e(pe({},n),{information:$e(pe({},n.information),{date:new Date(n.information.date)})})))}bmgCriteriaDetails(e,n){let r=this._store.bmgCriteriaDetails(e,n);return this._httpClient.get(r)}bmgCriteriaOverview(e){let n=this._store.bmgCriteriaOverview(),r=new Nu([new zM(e,null)]);return this._httpClient.post(n,r.toJSON())}availableSpecialEquipment(){let e=this._store.availableSpecialEquipment();return this._httpClient.get(e)}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Vue=(()=>{class t{transform(e){let n;switch(e){case 1:n="Klein (< 100 Betten)";break;case 2:n="Mittel (100 - 200 Betten)";break;case 3:n="Gro\xDF (200 - 500 Betten)";break;case 4:n="Sehr Gro\xDF (> 500 Betten)";break;default:n="n/a"}return n}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Tu({name:"displayClinicSize",type:t,pure:!0})}return t})();var CQ=(()=>{class t{transform(e){let n;switch(e){case"public":n="\xD6ffentlich";break;case"private":n="Privat";break;case"nonprofit":n="Freigemeinn\xFCtzig";break;default:n=e&&e.length>0?e:"n/a"}return n}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=Tu({name:"displayClinicType",type:t,pure:!0})}return t})();var Dni=()=>["80"];function kni(t,i){if(t&1&&(O(0,"div",3)(1,"span",4),ee(2),Dr(3,"truncate"),M(),O(4,"span",5),ee(5),M(),O(6,"span",5),ee(7),M()()),t&2){let e=i.$implicit;E(2),Pt(gl(3,3,e.name,Vr(6,Dni))),E(3),Pt(e==null||e.id==null?null:e.id.sn),E(2),Pt(e==null||e.address==null?null:e.address.toString())}}var o8=(()=>{class t{_clinicService;_cdr;placeholderText="Klinik suchen";filterClinicFn;clinicSelect=new ve;suggestions=[];constructor(e,n){this._clinicService=e,this._cdr=n}onClinicSelect(e){this.clinicSelect.emit(e.value)}onCompleteMethod(e){this._clinicService.search(e.query,n=>r8(n),this.filterClinicFn).subscribe(n=>{this.suggestions=n,this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(tb),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-auto-complete",1),te("completeMethod",function(c){return se(o),le(r.onCompleteMethod(c))})("onSelect",function(c){return se(o),le(r.onClinicSelect(c))}),ie(2,kni,8,7,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),D("suggestions",r.suggestions)("placeholder",r.placeholderText)("showClear",!0)("delay",500),E(4),Pt(r.placeholderText))},dependencies:[Xoe,Pu,Ho,Qxe],encapsulation:2})}return t})();var SQ={type:"clinicIds",category:"clinic",displayName:{de:"Kliniken"},sortingIndex:8,occurrence:"single",fromObject(t){let i=null,e=null;return t.includes&&(i=t.includes.map(n=>vs.fromString(n))),t.excludes&&(e=t.excludes.map(n=>vs.fromString(n))),Promise.resolve(new xQ(i,e))},fromCondition(t){let i=null,e=null;return t.includes&&(i=t.includes.map(n=>vs.fromObj(n))),t.excludes&&(e=t.excludes.map(n=>vs.fromObj(n))),Promise.resolve(new xQ(i,e))},newInstance(){return Promise.resolve(new xQ([]))}},xQ=(()=>{class t extends _n{includes;excludes;static Specification=SQ;constructor(e,n=null){super(SQ.type),this.includes=e,this.excludes=n}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)&&Ni.equals(this.includes,e.includes,(n,r)=>n.equals(r))&&Ni.equals(this.excludes,e.excludes,(n,r)=>n.equals(r))}valid(){return!0}validationToText(){return this.valid()?"":"Mindestens eine Klinik als Basismenge oder Ausschluss ausw\xE4hlen"}toCondition(e){if(e&&e.clinicIds){let n=this.includes?this.includes.map(o=>e.clinicIds.resolve(o)):[],r=this.excludes?this.excludes.map(o=>e.clinicIds.resolve(o)):[];return Promise.all(n).then(o=>Promise.all(r).then(a=>({includes:o,excludes:a}))).then(o=>new zM(o.includes,o.excludes))}else return Promise.resolve(new zM(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 PA=class extends PM{_customClinicIdentifierYear;constructor(i){super(),this._customClinicIdentifierYear=i}resolve(i){return Promise.resolve(new vs(i.ik,i.sn,this._customClinicIdentifierYear))}};var TO=class t extends ky{id;name;createdDate;modifiedDate;highestPermission;static fromObj(i,e){let n=null,r=null;i.createdDate&&(n=new Date(i.createdDate)),i.modifiedDate&&(r=new Date(i.modifiedDate));let o=Promise.resolve(Pa.EMPTY());return i.condition&&(o=Pa.fromConditionJson(i.condition,e)),o.then(a=>new t(i.id,i.name,n,r,i.highestPermission,a))}static SPECIFICATION=[{specification:ug.Specification,needsAuthentication:!1},{specification:pf.Specification,needsAuthentication:!1},{specification:_0.Specification,needsAuthentication:!1},{specification:y0.Specification,needsAuthentication:!1},{specification:_f.Specification,needsAuthentication:!1},{specification:xQ.Specification,needsAuthentication:!0},{specification:gf.Specification,needsAuthentication:!1},{specification:wL.Specification,needsAuthentication:!1},{specification:CA.Specification,needsAuthentication:!1},{specification:eB.Specification,needsAuthentication:!1},{specification:KL.Specification,needsAuthentication:!1},{specification:xL.Specification,needsAuthentication:!1},{specification:IL.Specification,needsAuthentication:!1},{specification:SL.Specification,needsAuthentication:!1},{specification:MA.Specification,needsAuthentication:!0},{specification:dB.Specification,needsAuthentication:!1}];resourceName=tn.CLINICS_FILTER;constructor(i,e,n,r,o,a=Pa.EMPTY()){super("clinics-filter",a),this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o}toJSON(){return $e(pe({},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(i){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.expression.overrideClone(i))}equals(i){return super.equals(i)&&gr.equals(this.id,i.id)&&gr.equals(this.name,i.name)}toRequestFormat(i){return this.toRequestBody(i).then(e=>({id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,condition:e}))}};var a8=class{q;constructor(i=""){this.q=i}toHttpParams(){let i=new Vo;return i=i.append("q",this.q),i}};var zue=class{_environmentService;constructor(i){this._environmentService=i}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/administrative_districts/`}casesAll(i){return`${this.index()}cases/${i}/all`}byAdministrativeDistrictId(i){return`${this.index()}${i}`}postalCodes(){return`${this.index()}postal-codes`}centerPoints(){return`${this.index()}center-points`}};var Mni=20,Fet=(()=>{class t{cache;constructor(){this.cache=new kM(Mni)}set(e){this.cache.set(e.id.toString(),e)}get(e){let n=this.cache.get(e.value);if(n)return Nw.fromObject(n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ib=(()=>{class t{_httpClient;_districtCache;_environmentService;_store;constructor(e,n,r){this._httpClient=e,this._districtCache=n,this._environmentService=r,this._store=new zue(this._environmentService)}find(e=new a8){let n=this._store.index();return this._httpClient.get(n,{params:e.toHttpParams()}).pipe(ot(r=>Nw.fromObjectArray(r)))}findAll(e){let n=this._store.index();return this._httpClient.post(n,{administrativeDistrictIds:e.map(r=>r.getNumericValue())}).pipe(ot(r=>{let o={};return Object.keys(r).forEach(a=>o[a]=Nw.fromObject(r[a])),o}))}byAdministrativeDistrictId(e){let n=this._districtCache.get(e),r;if(n)r=$t(n);else{let o=this._store.byAdministrativeDistrictId(e.value);r=this._httpClient.get(o).pipe(ot(a=>Nw.fromObject(a)),ot(a=>(this._districtCache.set(a),a)))}return r}findPostalCodes(e){let n=this._store.postalCodes(),r={administrativeDistrictIds:e.map(o=>o.getNumericValue())};return this._httpClient.post(n,r)}findCenterPoint(e){let n=this._store.centerPoints(),r={administrativeDistrictIds:e.map(o=>o.getNumericValue())};return this._httpClient.post(n,r).pipe(ot(o=>{let a=new Map;return Object.entries(o).forEach(c=>{a.set(io.createFromString(c[0]),c[1])}),a}))}cases(e,n,r,o){if(!r.every(m=>m.codingSystem===n))return console.error(`type of some codes did not match ${n}, returning empty array !`),$t([]);let a=this._store.casesAll(n),c={administrativeDistrictIds:e.map(m=>m.getNumericValue()),codes:r,years:o};return this._httpClient.post(a,c).pipe(ot(m=>m.map(g=>({code:xi.fromObject(g.code),administrativeDistrictId:io.createFromNumber(g.administrativeDistrictId),year:parseInt(g.year,10),count:g.count,agmId:g.agmId}))))}static \u0275fac=function(n){return new(n||t)(ai(no),ai(Fet),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hke=(()=>{class t{_districtService;_cdr;placeholderText="Landkreis suchen";administrativeDistrictSelect=new ve;suggestions=[];constructor(e,n){this._districtService=e,this._cdr=n}onCompleteMethod(e){let n=new a8(e.query);this._districtService.find(n).subscribe(r=>{this.suggestions=r,this._cdr.markForCheck()})}onSelect(e){this.administrativeDistrictSelect.emit(e.value)}static \u0275fac=function(n){return new(n||t)(xe(ib),xe(dn))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-auto-complete",0),te("completeMethod",function(a){return r.onCompleteMethod(a)})("onSelect",function(a){return r.onSelect(a)}),M(),O(2,"label",1),ee(3),M()()),n&2&&(E(),D("suggestions",r.suggestions)("placeholder",r.placeholderText)("showClear",!0)("delay",500),E(2),Pt(r.placeholderText))},dependencies:[Pu,Ho],encapsulation:2})}return t})();var xI=(()=>{class t{_districtService;constructor(e){this._districtService=e}transform(e,...n){return this._districtService.byAdministrativeDistrictId(e).pipe(ks(new Nw(e,"wird geladen..","wird geladen..")))}static \u0275fac=function(n){return new(n||t)(xe(ib,16))};static \u0275pipe=Tu({name:"administrativeDistrict",type:t,pure:!0})}return t})();var Let=(()=>{class t{administrativeDistrictId;remove=new ve;onRemove(){this.remove.emit(!0)}format(e){return e?e.displayName():""}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"span",2),ee(3),Dr(4,"administrativeDistrict"),Dr(5,"async"),M()(),O(6,"div")(7,"button",3),te("click",function(){return r.onRemove()}),O(8,"mat-icon"),ee(9,"delete_outline"),M()()()()),n&2&&(E(3),Pt(r.format(ca(5,3,ca(4,1,r.administrativeDistrictId)))))},dependencies:[so,il,da,zr,Dc,xI],encapsulation:2})}return t})();var Rni=(t,i)=>i.value;function Pni(t,i){if(t&1){let e=qe();O(0,"bd-maps-administrative-district-ids-list-item",4),te("remove",function(){let r=se(e),o=r.$implicit,a=r.$index,c=L(2);return le(c.onRemove(o,a))}),M()}if(t&2){let e=i.$implicit;D("administrativeDistrictId",e)}}function Nni(t,i){if(t&1&&Qo(0,Pni,1,1,"bd-maps-administrative-district-ids-list-item",3,Rni),t&2){let e=L();Zo(e.displayAdministrativeDistrictIds)}}function Fni(t,i){t&1&&(O(0,"div",1),be(1,"bd-message-empty",5),M())}function Lni(t,i){if(t&1){let e=qe();O(0,"mat-paginator",6),te("page",function(r){se(e);let o=L();return le(o.onPageEvent(r))}),M()}if(t&2){let e=L();D("hidePageSize",!0)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("length",e.administrativeDistrictIds.length)}}var NA=(()=>{class t{_cdr;administrativeDistrictIds;administrativeDistrictIdsChange=new ve;displayAdministrativeDistrictIds;pageIndex=0;pageSize=10;constructor(e){this._cdr=e}ngOnChanges(e){e.administrativeDistrictIds&&this._updateDisplayAdministrativeDistricts()}onPageEvent(e){this.pageIndex=e.pageIndex,this._updateDisplayAdministrativeDistricts()}onRemove(e,n){let r=null;this.administrativeDistrictIds.forEach((o,a)=>{o.value===e.value&&(r=a)}),this.administrativeDistrictIds.splice(r,1),this._updateDisplayAdministrativeDistricts(),this.administrativeDistrictIdsChange.emit(this.administrativeDistrictIds.map(o=>io.create(o.value)))}_updateDisplayAdministrativeDistricts(){if(this.administrativeDistrictIds){let e=this.pageIndex*this.pageSize,n=this.pageIndex*this.pageSize+this.pageSize;this.displayAdministrativeDistrictIds=this.administrativeDistrictIds.slice(e,n),this._cdr.markForCheck()}}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({type:t,selectors:[["bd-maps-administrative-district-ids-list"]],inputs:{administrativeDistrictIds:"administrativeDistrictIds"},outputs:{administrativeDistrictIdsChange:"administrativeDistrictIdsChange"},features:[Yt],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(n,r){n&1&&(O(0,"div",0),yt(1,Nni,2,0)(2,Fni,2,0,"div",1),M(),yt(3,Lni,1,4,"mat-paginator",2)),n&2&&(E(),vt(r.administrativeDistrictIds&&r.administrativeDistrictIds.length>0?1:2),E(2),vt((r.administrativeDistrictIds==null?null:r.administrativeDistrictIds.length)>5?3:-1))},dependencies:[Let,ec,Z4,n9],styles:[".administrative-district-ids-list[_ngcontent-%COMP%]{margin:0 24px}"],changeDetection:0})}return t})();var s8=class{displayName;layerId;sourceId;zIndex;geoJsonPropertiesKey="AGS";visible;popup={popupType:"default",messagePrefix:"Anzahl: ",titleFnc:i=>i.properties.GEN,messageFnc:(i,e)=>e?e[i.properties.AGS]:null};constructor(i="Landkreise",e=uC.id,n=n1,r=1){this.displayName=i,this.layerId=e,this.sourceId=n,this.zIndex=r}},l8=class extends Bw{config;_districtService;constructor(i,e,n){super(i,e),this.config=e,this._districtService=n}layer(){return $e(pe({},uC),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:pe({},oF)}}initBounds(){this.bounds=this.data$.asObservable().pipe(yo(()=>console.debug(`[${this.layerControlId}] update bounds`)),On(i=>{let e=Object.keys(i).map(n=>io.createFromString(n));return this._districtService.findCenterPoint(e)}),ot(i=>i.size<3?Array.from(i.values()).map(e=>CB([e.lon,e.lat],15,{units:"kilometers"})):Array.from(i.values()).map(e=>yh([e.lon,e.lat]))),ot(i=>{let e=od(i);return dy.fromBbox(Ov(e),e)}),ot(i=>i.bounds))}};var c8=class extends NE{config;selection=new Jf(!0,[],!0,this.compareFn);possibleSelection$=new hi(1);constructor(i,e){super(i,e),this.config=e}afterInit(i,e){super.afterInit(i,e),this._legendRef.next(new Pm(this.layerControlId,this.displayName,"circle","#6e599f")),i.addLayer(this.highlightLayer()),this.updateSelection(this.selection.selected),this.selection.changed.subscribe(n=>{this.updateSelection(n.source.selected)}),this.possibleSelection$.subscribe(n=>{i.setFilter(this.config.layerId,this.baseFilterExpression(n)),i.setFilter(this.config.highlightLayerId,this.baseFilterExpression([])),this.selection.setSelection()})}updateSelection(i){console.debug(`[${this.layerControlId}] update source`,JSON.stringify(i)),i.length>0?this.mapRef.setFilter(this.config.highlightLayerId,this.baseFilterExpression(i)):this.mapRef.setFilter(this.config.highlightLayerId,this.baseFilterExpression([]))}onChangedBounds(i){this.mapRef.fitBounds(i.bounds),this.mapRef.setFilter(this.config.highlightLayerId,null)}click(i){sF.getFeaturesOnClickedPosition(i.mapEvent,this.config.layerId,2.5).map(n=>this.propertiesToValueFn(n.properties)).forEach(n=>{this.selection.toggle(n)})}};var d8=class extends c8{constructor(i,e){super(i,e)}highlightLayer(){return $e(pe({},V5),{id:this.config.highlightLayerId})}compareFn(i,e){return gr.equals(i,e,()=>i.value===e.value)}baseFilterExpression(i){return["in","AGS",...i.map(e=>e.value)]}propertiesToValueFn(i){return io.create(i.AGS)}layer(){return $e(pe({},uC),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:$e(pe({},oF),{id:this.config.sourceId})}}};var zet=mp(Lw()),Uet=mp(Vet());var u8=class{_environmentService;constructor(i){this._environmentService=i}token(){return this._environmentService.load("BD_MAP_ACCESS_TOKEN_MAPBOX")}};function $ni(t,i){t&1&&(O(0,"div",1),be(1,"mat-progress-bar",3),M())}function qni(t,i){if(t&1&&(O(0,"div",0),yt(1,$ni,2,0,"div",1),be(2,"div",2),M()),t&2){let e=L();E(),vt(e.isLoading?1:-1),E(),D("id",e.mapOptions.container)}}function Yni(t,i){t&1&&(O(0,"div")(1,"div",4)(2,"div",5)(3,"div",6)(4,"span",7),ee(5,"Die Karten Funktionen werden von Ihrem Browser nicht unters\xFCtzt."),M()()()()())}var Kni="mapboxEvent_IsIdle",Ah=(()=>{class t{_environmentService;_cdr;_zone;mapOptions=rg;mapLoaded=new ve;mapClick=new ve;map;isLoading=!1;mapSupported=!0;controls;_loading$=new Sa(!0);constructor(e,n,r){this._environmentService=e,this._cdr=n,this._zone=r,this.mapSupported=(0,Uet.supported)(),this._loading$.pipe(vm()).subscribe(o=>{this.isLoading=o,this._cdr.markForCheck()})}ngOnInit(){let e=new u8(this._environmentService);this.mapOptions=$e(pe({},this.mapOptions),{container:this._randomizeContainerId(this.mapOptions.container),accessToken:e.token()})}ngAfterViewInit(){this.mapSupported&&this._zone.runOutsideAngular(()=>{this.map=new zet.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(Kni,null)),this._loading$.next(!1)})})}ngOnChanges(e){if(e.mapOptions){if(this.mapOptions.style&&this.map&&this.map.getStyle()!==this.mapOptions.style){let n=this.map.getStyle();if(typeof this.mapOptions.style=="string"){let r=jM.fromStyleUrl(n.sprite),o=jM.fromStyleUrl(this.mapOptions.style);r!==o&&this.map.setStyle(this.mapOptions.style)}else 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 Ai,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 n=new Aae(e,this.map,this.controls),r=!0;this.controls.clickHandlers.every(o=>{let a=o.onClick(n);return r=a.propagate,a.propagate}),r&&this.mapClick.emit(n)}_randomizeContainerId(e){let n=Math.round(Math.random()*1e4);return e+"-"+n.toString()}static \u0275fac=function(n){return new(n||t)(xe(xr),xe(dn),xe(Pn))};static \u0275cmp=re({type:t,selectors:[["bd-map"]],inputs:{mapOptions:"mapOptions"},outputs:{mapLoaded:"mapLoaded",mapClick:"mapClick"},features:[Yt],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(n,r){n&1&&yt(0,qni,3,2,"div",0)(1,Yni,6,0,"div"),n&2&&vt(r.mapSupported?0:1)},dependencies:[S8e,x8e],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})();var eri=t=>({background:t});function tri(t,i){t&1&&(O(0,"div",3),ee(1,"-"),M())}function iri(t,i){if(t&1&&(O(0,"div",0)(1,"div"),be(2,"div",1),M(),O(3,"div")(4,"div",2)(5,"div",3)(6,"span",4),ee(7),Dr(8,"number"),M()(),yt(9,tri,2,0,"div",3),O(10,"div",5)(11,"span",4),ee(12),Dr(13,"number"),M()()()()()),t&2){let e=i.$implicit;D("ngClass",e.alignment==="row"?"flex-row items-center gap-2":"flex-col"),E(2),D("ngStyle",Yi(11,eri,e.backgroundExpression)),E(5),Pt(gl(8,5,e.from,"1.0-0")),E(2),vt(e.alignment==="row"?9:-1),E(3),Pt(gl(13,8,e.to,"1.0-0"))}}var $et=(()=>{class t{min=0;max;colorFactory=new r0;ranges=[];ngOnChanges(e){(e.min||e.max||e.colorFactory)&&this._updateColors(this.min,this.max)}_updateColors(e,n){switch(this.colorFactory.type){case"lightness":case"scheme":case"judgement":{let r=[this.colorFactory.getColorForValue(e,e,n)??new ua("#ffffff"),this.colorFactory.getColorForValue(e+(n-e)*.25,e,n)??new ua("#ffffff"),this.colorFactory.getColorForValue(e+(n-e)*.75,e,n)??new ua("#ffffff"),this.colorFactory.getColorForValue(n,e,n)??new ua("#ffffff")],o="90deg";this.ranges=[{from:this.min,to:this.max,alignment:"col",backgroundExpression:`linear-gradient( ${o}, ${r[0]} 0%, ${r[1]} 25%, ${r[2]} 75%, ${r[3]} 100% )`}];break}case"custom":{this.ranges=this.colorFactory.ranges.map(r=>({alignment:"row",from:r.from,to:r.to,backgroundExpression:`linear-gradient(90deg, ${r.color.toString()} 0%, ${r.color.toString()} 100%)`}));break}}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-map-feature-heat-map-color-legend"]],inputs:{min:"min",max:"max",colorFactory:"colorFactory"},features:[Yt],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(n,r){n&1&&Qo(0,iri,14,13,"div",0,ms),n&2&&Zo(r.ranges)},dependencies:[qa,Xs,V_],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 qet=(()=>{class t{ref;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0),be(1,"div")(2,"bd-map-feature-heat-map-color-legend",1),M()),n&2&&(E(2),D("colorFactory",r.ref.colorFactory)("max",r.ref.maxValue)("min",r.ref.minValue))},dependencies:[da,$et],encapsulation:2,changeDetection:0})}return t})();function nri(t,i){t&1&&be(0,"p-skeleton")}function rri(t,i){if(t&1&&(O(0,"mat-icon",4),ee(1),M()),t&2){let e=L(2);D("inline",!0),E(),gn("",e.layerInfo.visible==="visible"?"visibility":"visibility_off"," ")}}function ori(t,i){if(t&1&&be(0,"img",7),t&2){let e=L(3);D("src",e.ref.icon,td)("width",16)}}function ari(t,i){if(t&1&&(O(0,"mat-icon",4),ee(1),M()),t&2){let e=L(3);la("color",e.ref.iconColor),D("inline",!0),E(),gn("",e.ref.icon," ")}}function sri(t,i){if(t&1&&yt(0,ori,1,2,"img",7)(1,ari,2,4,"mat-icon",8),t&2){let e=L(2);vt(e.ref.refType==="image-ref"?0:1)}}function lri(t,i){if(t&1){let e=qe();O(0,"mat-icon",9),te("click",function(){se(e);let r=L(2);return le(r.openActionDialog())}),ee(1,"edit "),M()}t&2&&D("inline",!0)}function cri(t,i){if(t&1&&(O(0,"div",1),be(1,"bd-map-legend-layer-color",10),M()),t&2){let e=L(2);E(),D("ref",e.layerRefAs(e.ref))}}function dri(t,i){if(t&1){let e=qe();O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),te("click",function(){se(e);let r=L();return le(r.onToggleChange())}),yt(4,rri,2,2,"mat-icon",4)(5,sri,2,1),O(6,"span",5),ee(7),M()(),yt(8,lri,2,1,"mat-icon",6),M()(),yt(9,cri,2,1,"div",1),M()}if(t&2){let e=L();E(4),vt(e.hover?4:5),E(2),zn("visibility_off",e.layerInfo.visible==="none"),E(),Pt(e.ref.text),E(),vt(e.hover&&e.ref.legend?8:-1),E(),vt((e.ref==null?null:e.ref.refType)==="color-factory-ref"?9:-1)}}var Yet=(()=>{class t extends Xo{_dialogService;_cdr;layerInfo;visibleChange=new ve;actionChange=new ve;ref;hover=!1;constructor(e,n){super(),this._dialogService=e,this._cdr=n}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=$e(pe({},G2),{header:this.ref.legend.action.title,data:$e(pe({},this.ref.legend.action.data),{commands:this.ref.legend.action.commands})}),n=this._dialogService.open(this.ref.legend.action.component,e).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this.actionChange.emit(r)});this._subs.push(n)}}static \u0275fac=function(n){return new(n||t)(xe(To),xe(dn))};static \u0275cmp=re({type:t,selectors:[["bd-map-legend-layer"]],hostBindings:function(n,r){n&1&&te("mouseenter",function(){return r.mouseover()})("mouseleave",function(){return r.mouseleave()})},inputs:{layerInfo:"layerInfo"},outputs:{visibleChange:"visibleChange",actionChange:"actionChange"},features:[Ii([To]),Tt],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(n,r){n&1&&yt(0,nri,1,0,"p-skeleton")(1,dri,10,6,"div",0),n&2&&vt(r.ref?1:0)},dependencies:[qet,cC,kv,da,zr],styles:[".visibility_off[_ngcontent-%COMP%]{text-decoration:line-through}"]})}return t})();var uri=(t,i)=>i.layerControlId;function pri(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"bd-map-legend-layer",2),te("visibleChange",function(r){let o=se(e).$implicit,a=L();return le(a.onVisibleChange(o.layerControlId,r))})("actionChange",function(r){let o=se(e).$implicit,a=L();return le(a.onActionChange(o.layerControlId,r))}),M()()}if(t&2){let e=i.$implicit;E(),D("layerInfo",e)}}function mri(t,i){if(t&1&&(O(0,"div",1),ee(1),M()),t&2){let e=i.$implicit;E(),Pt(e)}}var b0=(()=>{class t extends Xo{controller;staticInfo=[];layerInfos=[];ngOnInit(){this._subs.push(this.controller.layerControls$.asObservable().pipe(vn(e=>e.action==="ACTIVE"),vn(e=>e.layerControl.legend.showInLegend)).subscribe(e=>{this.layerInfos.some(n=>n.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((n,r)=>r.zIndex-n.zIndex))})),this._subs.push(this.controller.layerControls$.asObservable().pipe(vn(e=>e.action==="NOT_ACTIVE")).subscribe(e=>{this.layerInfos=this.layerInfos.filter(n=>n.layerControlId!==e.layerControl.layerControlId)}))}ngOnDestroy(){this.unsubscribeAll()}onVisibleChange(e,n){this.controller.setVisibility(e,n)}onActionChange(e,n){this.controller.setActionChange(e,n)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["bd-map-legend"]],inputs:{controller:"controller",staticInfo:"staticInfo"},features:[Tt],decls:5,vars:0,consts:[["id","map-legend",1,"flex","flex-col","gap-2"],[1,"flex-1"],[3,"visibleChange","actionChange","layerInfo"]],template:function(n,r){n&1&&(O(0,"div",0),Qo(1,pri,2,1,"div",1,uri),Qo(3,mri,2,1,"div",1,ms),M()),n&2&&(E(),Zo(r.layerInfos),E(2),Zo(r.staticInfo))},dependencies:[Yet],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 Uue=class{_environmentService;constructor(i){this._environmentService=i}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/`}findOne(i){return`${this.index()}${i}`}postalCodes(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/center-points`}};var pg=(()=>{class t{_httpClient;_environmentService;_pluralPipe;_store;_cache={};constructor(e,n,r){this._httpClient=e,this._environmentService=n,this._pluralPipe=r,this._store=new Uue(this._environmentService)}findOne(e,n){let r=this._store.findOne(e);return this._cache[e]?this._cache[e].pipe(ot(o=>this._resolve(o,n))):(this._cache[e]=this._httpClient.get(r).pipe(ot(o=>o[e]),ot(o=>Fw.fromObjectArray(o)),qc(1)),this._cache[e].pipe(ot(o=>this._resolve(o,n))))}find(e=null){let n=this._store.index(),r=new Vo;return e&&(r=r.append("q",e)),this._httpClient.get(n,{params:r}).pipe(ot(o=>Fw.fromObjectArray(o)))}findAll(e,n,r=!0){if(!e||e.length===0)return $t({});let o=this._store.index(),a={postalCodes:e};return this._httpClient.post(o,a).pipe(ot(c=>{let m={};return Object.keys(c).map(g=>{let C=Fw.fromObjectArray(c[g]);r&&(this._cache[g]=$t(C)),m[g]=this._resolve(C,n)}),m}))}findCenterPoint(e){let n=this._store.postalCodes();return this._httpClient.post(n,{postalCodes:e}).pipe(ot(r=>{let o=new Map;return Object.entries(r).forEach(a=>o.set(a[0],a[1])),o}))}administrativeDistrictMapping(){let e=`${this._store.index()}administrative-districts/mappings/`;return this._httpClient.get(e)}_resolve(e,n){switch(n){case"DETAIL":return Fw.fromObject($e(pe({},e[0]),{name:e.sort(r=>r.name===r.otlName?-1:1).map(r=>r.otlName.length>0?r.otlName:r.name).join(", ")}));case"SUMMARY":{let r=e[0],o={"=0":"","=1":"(oder ein weiterer Ortsteil)",other:"(oder einer von weiteren # Ortsteilen)"};return Fw.fromObject($e(pe({},r),{name:`${r.name} ${this._pluralPipe.transform(e.length-1,o)}`}))}case"RAW":return e;default:return e[e.length-1]}}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr),ai(_P))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hri(t,i){if(t&1&&ee(0),t&2){let e=i.$implicit,n=L();gn(" ",n.displayPostalCodeFn(e)," ")}}var Yke=(()=>{class t{_postalCodeService;_cdr;placeholderText="Postleitzahl suchen";postalCodeSelect=new ve;suggestions=[];constructor(e,n){this._postalCodeService=e,this._cdr=n}onCompleteMethod(e){this._postalCodeService.find(e.query).pipe(ot(n=>n.slice(0,20)),ot(n=>n.sort((r,o)=>this._sortPostalCodes(r,o,e.query)))).subscribe(n=>{this.suggestions=n,this._cdr.markForCheck()})}onSelect(e){this.postalCodeSelect.emit(e.value)}displayPostalCodeFn=e=>{if(!e)return null;let n=`${e.postalCode}, `;return e.name===e.otlName||e.otlName.length===0?n.concat(e.name):n.concat(`${e.name}, ${e.otlName}`)};_sortPostalCodes(e,n,r){return e.name===n.name?e.name===e.otlName?-1:n.name===n.otlName?1:0:n.name.toLowerCase().indexOf(r)-e.name.toLowerCase().indexOf(r)}static \u0275fac=function(n){return new(n||t)(xe(pg),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-auto-complete",1),te("completeMethod",function(c){return se(o),le(r.onCompleteMethod(c))})("onSelect",function(c){return se(o),le(r.onSelect(c))}),ie(2,hri,1,1,"ng-template",null,0,di),M(),be(4,"label",2),M()}n&2&&(E(),D("suggestions",r.suggestions)("placeholder",r.placeholderText)("showClear",!0)("delay",500))},dependencies:[Pu,Ho],encapsulation:2})}return t})();var p8=(()=>{class t{_postalCodeService;constructor(e){this._postalCodeService=e}transform(e,...n){return this._postalCodeService.findOne(e,n[0]).pipe(ks(new Fw(e,"wird geladen..",void 0,void 0,void 0)),ot(r=>r.name))}static \u0275fac=function(n){return new(n||t)(xe(pg,16))};static \u0275pipe=Tu({name:"postalCode",type:t,pure:!0})}return t})();var Wet=(()=>{class t{postalCode;postalCodeResolveStrategy="FIRST";remove=new ve;onRemove(){this.remove.emit(!0)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div")(2,"span",1),ee(3),M()(),O(4,"div",2)(5,"span",1),ee(6),Dr(7,"postalCode"),Dr(8,"async"),M()(),O(9,"div")(10,"button",3),te("click",function(){return r.onRemove()}),O(11,"mat-icon"),ee(12,"delete_outline"),M()()()()),n&2&&(E(3),Pt(r.postalCode),E(3),Pt(ca(8,5,gl(7,2,r.postalCode,r.postalCodeResolveStrategy))))},dependencies:[so,il,da,zr,Dc,p8],encapsulation:2})}return t})();function fri(t,i){if(t&1){let e=qe();O(0,"bd-maps-postal-codes-list-item",4),te("remove",function(){let r=se(e),o=r.$implicit,a=r.$index,c=L(2);return le(c.onRemove(o,a))}),M()}if(t&2){let e=i.$implicit,n=L(2);D("postalCode",e)("postalCodeResolveStrategy",n.postalCodeResolveStrategy)}}function gri(t,i){if(t&1&&Qo(0,fri,1,2,"bd-maps-postal-codes-list-item",3,ms),t&2){let e=L();Zo(e.displayPostalCodes)}}function _ri(t,i){t&1&&(O(0,"div",1),be(1,"bd-message-empty",5),M())}function yri(t,i){if(t&1){let e=qe();O(0,"mat-paginator",6),te("page",function(r){se(e);let o=L();return le(o.onPageEvent(r))}),M()}if(t&2){let e=L();D("hidePageSize",!0)("pageSize",e.pageSize)("pageIndex",e.pageIndex)("length",e.postalCodes.length)}}var FA=(()=>{class t{_cdr;postalCodes;postalCodeResolveStrategy="FIRST";postalCodesChange=new ve;displayPostalCodes;pageIndex=0;pageSize=10;constructor(e){this._cdr=e}ngOnChanges(e){e.postalCodes&&this._updateDisplayPostalCodes()}onPageEvent(e){this.pageIndex=e.pageIndex,this._updateDisplayPostalCodes()}onRemove(e,n){let r=this.postalCodes.indexOf(e);this.postalCodes.splice(r,1),this.displayPostalCodes.splice(n,1),this.postalCodesChange.emit(this.postalCodes),this._updateDisplayPostalCodes()}_updateDisplayPostalCodes(){let e=this.pageIndex*this.pageSize,n=this.pageIndex*this.pageSize+this.pageSize;this.displayPostalCodes=this.postalCodes.slice(e,n),this._cdr.markForCheck()}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({type:t,selectors:[["bd-maps-postal-codes-list"]],inputs:{postalCodes:"postalCodes",postalCodeResolveStrategy:"postalCodeResolveStrategy"},outputs:{postalCodesChange:"postalCodesChange"},features:[Yt],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(n,r){n&1&&(O(0,"div",0),yt(1,gri,2,0)(2,_ri,2,0,"div",1),M(),yt(3,yri,1,4,"mat-paginator",2)),n&2&&(E(),vt(r.postalCodes&&r.postalCodes.length>0?1:2),E(2),vt((r.postalCodes==null?null:r.postalCodes.length)>10?3:-1))},dependencies:[Wet,ec,Z4,n9],styles:[".filter-postal-codes-list[_ngcontent-%COMP%]{margin:0 24px}"]})}return t})();function Hue(t,i,e=0,n=t.length-1,r=vri){for(;n>e;){if(n-e>600){let m=n-e+1,g=i-e+1,C=Math.log(m),w=.5*Math.exp(2*C/3),P=.5*Math.sqrt(C*w*(m-w)/m)*(g-m/2<0?-1:1),R=Math.max(e,Math.floor(i-g*w/m+P)),z=Math.min(n,Math.floor(i+(m-g)*w/m+P));Hue(t,i,R,z,r)}let o=t[i],a=e,c=n;for(wQ(t,e,i),r(t[n],o)>0&&wQ(t,e,n);a0;)c--}r(t[e],o)===0?wQ(t,e,c):(c++,wQ(t,c,n)),c<=i&&(e=c+1),i<=c&&(n=c-1)}}function wQ(t,i,e){let n=t[i];t[i]=t[e],t[e]=n}function vri(t,i){return ti?1:0}var EQ=class{constructor(i=9){this._maxEntries=Math.max(4,i),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(i){let e=this.data,n=[];if(!jue(i,e))return n;let r=this.toBBox,o=[];for(;e;){for(let a=0;a=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)}_split(i,e){let n=i[e],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);let a=this._chooseSplitIndex(n,o,r),c=h8(n.children.splice(a,n.children.length-a));c.height=n.height,c.leaf=n.leaf,m8(n,this.toBBox),m8(c,this.toBBox),e?i[e-1].children.push(c):this._splitRoot(n,c)}_splitRoot(i,e){this.data=h8([i,e]),this.data.height=i.height+1,this.data.leaf=!1,m8(this.data,this.toBBox)}_chooseSplitIndex(i,e,n){let r,o=1/0,a=1/0;for(let c=e;c<=n-e;c++){let m=IQ(i,0,c,this.toBBox),g=IQ(i,c,n,this.toBBox),C=wri(m,g),w=Kke(m)+Kke(g);C=e;g--){let C=i.children[g];TQ(c,i.leaf?o(C):C),m+=Gue(c)}return m}_adjustParentBBoxes(i,e,n){for(let r=n;r>=0;r--)TQ(e[r],i)}_condense(i){for(let e=i.length-1,n;e>=0;e--)i[e].children.length===0?e>0?(n=i[e-1].children,n.splice(n.indexOf(i[e]),1)):this.clear():m8(i[e],this.toBBox)}};function bri(t,i,e){if(!e)return i.indexOf(t);for(let n=0;n=t.minX&&i.maxY>=t.minY}function h8(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Qet(t,i,e,n,r){let o=[i,e];for(;o.length;){if(e=o.pop(),i=o.pop(),e-i<=n)continue;let a=i+Math.ceil((e-i)/n/2)*n;Hue(t,a,i,e,r),o.push(i,a,a,e)}}var $ue=class{constructor(i=[],e=(n,r)=>nr?1:0){if(this.data=i,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(i){this.data.push(i),this._up(this.length++)}pop(){if(this.length===0)return;let i=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),i}peek(){return this.data[0]}_up(i){let{data:e,compare:n}=this,r=e[i];for(;i>0;){let o=i-1>>1,a=e[o];if(n(r,a)>=0)break;e[i]=a,i=o}e[i]=r}_down(i){let{data:e,compare:n}=this,r=this.length>>1,o=e[i];for(;i=0)break;e[i]=e[a],i=a}e[i]=o}};var utt=mp(ntt(),1);var bc=11102230246251565e-32,Km=134217729,AQ=(3+8*bc)*bc;function IB(t,i,e,n,r){let o,a,c,m,g=i[0],C=n[0],w=0,P=0;C>g==C>-g?(o=g,g=i[++w]):(o=C,C=n[++P]);let R=0;if(wg==C>-g?(a=g+o,c=o-(a-g),g=i[++w]):(a=C+o,c=o-(a-C),C=n[++P]),o=a,c!==0&&(r[R++]=c);wg==C>-g?(a=o+g,m=a-o,c=o-(a-m)+(g-m),g=i[++w]):(a=o+C,m=a-o,c=o-(a-m)+(C-m),C=n[++P]),o=a,c!==0&&(r[R++]=c);for(;w=rt||-Rt>=rt||(w=t-Ae,c=t-(Ae+w)+(w-r),w=e-ke,g=e-(ke+w)+(w-r),w=i-Qe,m=i-(Qe+w)+(w-o),w=n-we,C=n-(we+w)+(w-o),c===0&&m===0&&g===0&&C===0)||(rt=Eri*a+AQ*Math.abs(Rt),Rt+=Ae*C+we*c-(Qe*g+ke*m),Rt>=rt||-Rt>=rt))return Rt;Te=c*we,P=Km*c,R=P-(P-c),z=c-R,P=Km*we,H=P-(P-we),j=we-H,Ie=z*j-(Te-R*H-z*H-R*j),ye=m*ke,P=Km*m,R=P-(P-m),z=m-R,P=Km*ke,H=P-(P-ke),j=ke-H,fe=z*j-(ye-R*H-z*H-R*j),K=Ie-fe,w=Ie-K,C0[0]=Ie-(K+w)+(w-fe),ne=Te+K,w=ne-Te,me=Te-(ne-w)+(K-w),K=me-ye,w=me-K,C0[1]=me-(K+w)+(w-ye),Re=ne+K,w=Re-ne,C0[2]=ne-(Re-w)+(K-w),C0[3]=Re;let Ze=IB(4,f8,4,C0,rtt);Te=Ae*C,P=Km*Ae,R=P-(P-Ae),z=Ae-R,P=Km*C,H=P-(P-C),j=C-H,Ie=z*j-(Te-R*H-z*H-R*j),ye=Qe*g,P=Km*Qe,R=P-(P-Qe),z=Qe-R,P=Km*g,H=P-(P-g),j=g-H,fe=z*j-(ye-R*H-z*H-R*j),K=Ie-fe,w=Ie-K,C0[0]=Ie-(K+w)+(w-fe),ne=Te+K,w=ne-Te,me=Te-(ne-w)+(K-w),K=me-ye,w=me-K,C0[1]=me-(K+w)+(w-ye),Re=ne+K,w=Re-ne,C0[2]=ne-(Re-w)+(K-w),C0[3]=Re;let Et=IB(Ze,rtt,4,C0,ott);Te=c*C,P=Km*c,R=P-(P-c),z=c-R,P=Km*C,H=P-(P-C),j=C-H,Ie=z*j-(Te-R*H-z*H-R*j),ye=m*g,P=Km*m,R=P-(P-m),z=m-R,P=Km*g,H=P-(P-g),j=g-H,fe=z*j-(ye-R*H-z*H-R*j),K=Ie-fe,w=Ie-K,C0[0]=Ie-(K+w)+(w-fe),ne=Te+K,w=ne-Te,me=Te-(ne-w)+(K-w),K=me-ye,w=me-K,C0[1]=me-(K+w)+(w-ye),Re=ne+K,w=Re-ne,C0[2]=ne-(Re-w)+(K-w),C0[3]=Re;let We=IB(Et,ott,4,C0,att);return att[We-1]}function Qke(t,i,e,n,r,o){let a=(i-o)*(e-r),c=(t-r)*(n-o),m=a-c,g=Math.abs(a+c);return Math.abs(m)>=Iri*g?m:-Ari(t,i,e,n,r,o,g)}var dGr=(7+56*bc)*bc,uGr=(3+28*bc)*bc,pGr=(26+288*bc)*bc*bc,mGr=pr(4),hGr=pr(4),fGr=pr(4),gGr=pr(4),_Gr=pr(4),yGr=pr(4),vGr=pr(4),bGr=pr(4),CGr=pr(4),xGr=pr(8),SGr=pr(8),wGr=pr(8),IGr=pr(4),TGr=pr(8),EGr=pr(8),AGr=pr(8),DGr=pr(12),kGr=pr(192),MGr=pr(192);var PGr=(10+96*bc)*bc,NGr=(4+48*bc)*bc,FGr=(44+576*bc)*bc*bc,LGr=pr(4),BGr=pr(4),VGr=pr(4),zGr=pr(4),UGr=pr(4),HGr=pr(4),GGr=pr(4),jGr=pr(4),$Gr=pr(8),qGr=pr(8),YGr=pr(8),KGr=pr(8),WGr=pr(8),QGr=pr(8),ZGr=pr(8),XGr=pr(8),JGr=pr(8),ejr=pr(4),tjr=pr(4),ijr=pr(4),njr=pr(8),rjr=pr(16),ojr=pr(16),ajr=pr(16),sjr=pr(32),ljr=pr(32),cjr=pr(48),djr=pr(64),ujr=pr(1152),pjr=pr(1152);var gjr=(16+224*bc)*bc,_jr=(5+72*bc)*bc,yjr=(71+1408*bc)*bc*bc,vjr=pr(4),bjr=pr(4),Cjr=pr(4),xjr=pr(4),Sjr=pr(4),wjr=pr(4),Ijr=pr(4),Tjr=pr(4),Ejr=pr(4),Ajr=pr(4),Djr=pr(24),kjr=pr(24),Mjr=pr(24),Ojr=pr(24),Rjr=pr(24),Pjr=pr(24),Njr=pr(24),Fjr=pr(24),Ljr=pr(24),Bjr=pr(24),Vjr=pr(1152),zjr=pr(1152),Ujr=pr(1152),Hjr=pr(1152),Gjr=pr(1152),jjr=pr(2304),$jr=pr(2304),qjr=pr(3456),Yjr=pr(5760),Kjr=pr(8),Wjr=pr(8),Qjr=pr(8),Zjr=pr(16),Xjr=pr(24),Jjr=pr(48),e7r=pr(48),t7r=pr(96),i7r=pr(192),n7r=pr(384),r7r=pr(384),o7r=pr(384),a7r=pr(768);var s7r=pr(96),l7r=pr(96),c7r=pr(96),d7r=pr(1152);function eMe(t,i,e){i=Math.max(0,i===void 0?2:i),e=e||0;let n=Pri(t),r=new EQ(16);r.toBBox=function(P){return{minX:P[0],minY:P[1],maxX:P[0],maxY:P[1]}},r.compareMinX=function(P,R){return P[0]-R[0]},r.compareMinY=function(P,R){return P[1]-R[1]},r.load(t);let o=[],a;for(let P=0;Po||c.push({node:C,dist:w})}for(;c.length&&!c.peek().node.children;){let g=c.pop(),C=g.node,w=Jke(C,i,e),P=Jke(C,n,r);if(g.dist=i.minX&&t[0]<=i.maxX&&t[1]>=i.minY&&t[1]<=i.maxY}function ctt(t,i,e){let n=Math.min(t[0],i[0]),r=Math.min(t[1],i[1]),o=Math.max(t[0],i[0]),a=Math.max(t[1],i[1]),c=e.search({minX:n,minY:r,maxX:o,maxY:a});for(let m=0;m0!=g8(t,i,n)>0&&g8(e,n,t)>0!=g8(e,n,i)>0}function Zke(t){let i=t.p,e=t.next.p;return t.minX=Math.min(i[0],e[0]),t.minY=Math.min(i[1],e[1]),t.maxX=Math.max(i[0],e[0]),t.maxY=Math.max(i[1],e[1]),t}function Pri(t){let i=t[0],e=t[0],n=t[0],r=t[0];for(let c=0;cn[0]&&(n=m),m[1]r[1]&&(r=m)}let o=[i,e,n,r],a=o.slice();for(let c=0;c1?(n=e[0],r=e[1]):c>0&&(n+=o*c,r+=a*c)}return o=t[0]-n,a=t[1]-r,o*o+a*a}function Yue(t,i,e,n,r,o,a,c){let m=e-t,g=n-i,C=a-r,w=c-o,P=t-r,R=i-o,z=m*m+g*g,H=m*C+g*w,j=C*C+w*w,K=m*P+g*R,ne=C*P+w*R,me=z*j-H*H,Te,Ie,ye=me,fe=me;me===0?(Te=0,ye=1,Ie=ne,fe=j):(Te=H*ne-j*K,Ie=z*ne-H*K,Te<0?(Te=0,Ie=ne,fe=j):Te>ye&&(Te=ye,Ie=ne+H,fe=j)),Ie<0?(Ie=0,-K<0?Te=0:-K>z?Te=ye:(Te=-K,ye=z)):Ie>fe&&(Ie=fe,-K+H<0?Te=0:-K+H>z?Te=ye:(Te=-K+H,ye=z));let Re=Te===0?0:Te/ye,Ae=Ie===0?0:Ie/fe,ke=(1-Re)*t+Re*e,Qe=(1-Re)*i+Re*n,we=(1-Ae)*r+Ae*a,Rt=(1-Ae)*o+Ae*c,rt=we-ke,Ze=Rt-Qe;return rt*rt+Ze*Ze}function Nri(t,i){return t[0]===i[0]?t[1]-i[1]:t[0]-i[0]}function Fri(t){t.sort(Nri);let i=[];for(let n=0;n=2&&g8(i[i.length-2],i[i.length-1],t[n])<=0;)i.pop();i.push(t[n])}let e=[];for(let n=t.length-1;n>=0;n--){for(;e.length>=2&&g8(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}return e.pop(),i.pop(),i.concat(e)}function tMe(t,i){i===void 0&&(i={}),i.concavity=i.concavity||1/0;var e=[];if(FE(t,function(r){e.push([r[0],r[1]])}),!e.length)return null;var n=eMe(e,i.concavity);return n.length>3?Sae([n]):null}function Lri(t,i){i===void 0&&(i={});var e=0,n=0,r=0;return FE(t,function(o){e+=o[0],n+=o[1],r++},!0),yh([e/r,n/r],i.properties)}var iMe=Lri;function ptt(t,i){switch(i===void 0&&(i={}),Aet(t)){case"Point":return yh(X6(t),i.properties);case"Polygon":var e=[];FE(t,function(Te){e.push(Te)});var n=iMe(t,{properties:i.properties}),r=n.geometry.coordinates,o=0,a=0,c=0,m,g,C,w,P,R,z,H,j=e.map(function(Te){return[Te[0]-r[0],Te[1]-r[1]]});for(m=0;mt[1]!=g>t[1]&&t[0]<(m-a)*(t[1]-c)/(g-c)+a;w&&(n=!n)}return n}function Bri(t,i){return i[0]<=t[0]&&i[1]<=t[1]&&i[2]>=t[0]&&i[3]>=t[1]}function Vri(t){if(!t)throw new Error("geojson is required");var i=[];return HM(t,function(e){zri(e,i)}),od(i)}function zri(t,i){var e=[],n=t.geometry;if(n!==null){switch(n.type){case"Polygon":e=bB(n);break;case"LineString":e=[bB(n)]}e.forEach(function(r){var o=Uri(r,t.properties);o.forEach(function(a){a.id=i.length,i.push(a)})})}}function Uri(t,i){var e=[];return t.reduce(function(n,r){var o=iq([n,r],i);return o.bbox=Hri(n,r),e.push(o),r}),e}function Hri(t,i){var e=t[0],n=t[1],r=i[0],o=i[1],a=er?e:r,g=n>o?n:o;return[a,c,m,g]}var nMe=Vri;var $tt=mp(Gtt(),1);function Uoi(t,i){var e={},n=[];if(t.type==="LineString"&&(t=_h(t)),i.type==="LineString"&&(i=_h(i)),t.type==="Feature"&&i.type==="Feature"&&t.geometry!==null&&i.geometry!==null&&t.geometry.type==="LineString"&&i.geometry.type==="LineString"&&t.geometry.coordinates.length===2&&i.geometry.coordinates.length===2){var r=jtt(t,i);return r&&n.push(r),od(n)}var o=(0,$tt.default)();return o.load(nMe(i)),H1e(nMe(t),function(a){H1e(o.search(a),function(c){var m=jtt(a,c);if(m){var g=bB(m).join(",");e[g]||(e[g]=!0,n.push(m))}})}),od(n)}function jtt(t,i){var e=bB(t),n=bB(i);if(e.length!==2)throw new Error(" line1 must only contain 2 coordinates");if(n.length!==2)throw new Error(" line2 must only contain 2 coordinates");var r=e[0][0],o=e[0][1],a=e[1][0],c=e[1][1],m=n[0][0],g=n[0][1],C=n[1][0],w=n[1][1],P=(w-g)*(a-r)-(C-m)*(c-o),R=(C-m)*(o-g)-(w-g)*(r-m),z=(a-r)*(o-g)-(c-o)*(r-m);if(P===0)return null;var H=R/P,j=z/P;if(H>=0&&H<=1&&j>=0&&j<=1){var K=r+H*(a-r),ne=o+H*(c-o);return yh([K,ne])}return null}var tpe=Uoi;function ipe(t,i){i===void 0&&(i={});var e=J6(t);switch(!i.properties&&t.type==="Feature"&&(i.properties=t.properties),e.type){case"Polygon":return Hoi(e,i);case"MultiPolygon":return Goi(e,i);default:throw new Error("invalid poly")}}function Hoi(t,i){i===void 0&&(i={});var e=J6(t),n=e.coordinates,r=i.properties?i.properties:t.type==="Feature"?t.properties:{};return qtt(n,r)}function Goi(t,i){i===void 0&&(i={});var e=J6(t),n=e.coordinates,r=i.properties?i.properties:t.type==="Feature"?t.properties:{},o=[];return n.forEach(function(a){o.push(qtt(a,r))}),od(o)}function qtt(t,i){return t.length>1?M$e(t,i):iq(t[0],i)}function joi(t,i){var e=!0;return HM(t,function(n){HM(i,function(r){if(e===!1)return!1;e=$oi(n.geometry,r.geometry)})}),e}function $oi(t,i){switch(t.type){case"Point":switch(i.type){case"Point":return!Woi(t.coordinates,i.coordinates);case"LineString":return!Ytt(i,t);case"Polygon":return!TB(t,i)}break;case"LineString":switch(i.type){case"Point":return!Ytt(t,i);case"LineString":return!qoi(t,i);case"Polygon":return!Ktt(i,t)}break;case"Polygon":switch(i.type){case"Point":return!TB(i,t);case"LineString":return!Ktt(t,i);case"Polygon":return!Yoi(i,t)}}return!1}function Ytt(t,i){for(var e=0;e0}function Ktt(t,i){for(var e=0,n=i.coordinates;e0}function Yoi(t,i){for(var e=0,n=t.coordinates[0];e0}function Koi(t,i,e){var n=e[0]-t[0],r=e[1]-t[1],o=i[0]-t[0],a=i[1]-t[1],c=n*a-r*o;return c!==0?!1:Math.abs(o)>=Math.abs(a)?o>0?t[0]<=e[0]&&e[0]<=i[0]:i[0]<=e[0]&&e[0]<=t[0]:a>0?t[1]<=e[1]&&e[1]<=i[1]:i[1]<=e[1]&&e[1]<=t[1]}function Woi(t,i){return t[0]===i[0]&&t[1]===i[1]}var Wtt=joi;function npe(t,i){var e=!1;return HM(t,function(n){HM(i,function(r){if(e===!0)return!0;e=!Wtt(n.geometry,r.geometry)})}),e}var wI=class extends c8{_mostlyInRange$=new Sa(!0);_bounds$=new hi(1);constructor(i=ng.id,e){super(i,e),Ec([this._bounds$,this._mostlyInRange$]).pipe(yo(n=>super.onChangedBounds(n[0])),On(n=>LG(Eb(this.mapRef,"idle").pipe(ar(1),ot(()=>n)),$t(n).pipe(BG(2e3))))).subscribe(n=>{this._updatePossibleSelectionByInput(n[0],n[1])})}highlightLayer(){return $e(pe({},r1),{id:this.config.highlightLayerId,source:this.config.sourceId})}updateMostlyInRange(i){this._mostlyInRange$.next(i)}compareFn(i,e){return gr.equals(i,e)}baseFilterExpression(i){return["in","plz",...i]}propertiesToValueFn(i){return i.plz}layer(){return $e(pe({},ng),{id:this.config.layerId,source:this.config.sourceId})}source(){return{sourceId:this.config.sourceId,sourceData:pe({},aF)}}onChangedBounds(i){super.onChangedBounds(i),this._bounds$.next(i)}_updatePossibleSelectionByInput(i,e){let o=this.mapRef.queryRenderedFeatures(i.toPointLikeArray(this.mapRef),{layers:[this.config.highlightLayerId]}).filter(a=>{let c=a.geometry,m=i.origin.features.map(C=>C.geometry),g=O$e(m);if(e){let C=mtt(c);return npe(C,g)}else return npe(c,g)}).map(a=>a.properties).map(a=>a.plz);this.possibleSelection$.next(o)}};var EB=class{layerId;sourceId;zIndex;geoJsonPropertiesKey="plz";displayName="Postleitzahlen";popup={popupType:"default",messagePrefix:"Anzahl: ",titleFnc:i=>i.properties.note,messageFnc:(i,e)=>e?e[i.properties.plz]:null};constructor(i=xae,e=Mv,n=1){this.layerId=i,this.sourceId=e,this.zIndex=n}},AB=class extends Bw{config;_postalCodeService;constructor(i,e,n){super(i,e),this.config=e,this._postalCodeService=n}layer(){return $e(pe({},ng),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:$e(pe({},aF),{id:this.config.sourceId})}}initBounds(){this.bounds=this.data$.asObservable().pipe(yo(()=>console.debug(`[${this.layerControlId}] update bounds`)),On(i=>this._postalCodeService.findCenterPoint(Object.keys(i))),ot(i=>Array.from(i.values()).map(e=>yh([e.lon,e.lat]))),ot(i=>dy.fromBbox(Ov(od(i)),od(i))),ot(i=>i.bounds))}};var bMe=(()=>{class t{selectedPostalCodes=[];selectedPostalCodesChange=new ve;mapOptions=rg;mapController=new vh;_handler=new wI(r1.id,{layerId:ng.id,highlightLayerId:r1.id,sourceId:Mv,displayName:"Auswahl Postleitzahlen"});constructor(){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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-maps-postal-codes-map-selection"]],inputs:{selectedPostalCodes:"selectedPostalCodes"},outputs:{selectedPostalCodesChange:"selectedPostalCodesChange"},features:[Yt],decls:3,vars:2,consts:[[1,"map-wrapper"],[3,"mapClick","mapLoaded","mapOptions"],[3,"controller"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"bd-map",1),te("mapClick",function(a){return r.onMapClicked(a)})("mapLoaded",function(a){return r.onMapLoaded(a)}),M(),be(2,"bd-map-legend",2),M()),n&2&&(E(),D("mapOptions",r.mapOptions),E(),D("controller",r.mapController))},dependencies:[Ah,b0],styles:[".map-wrapper[_ngcontent-%COMP%]{height:600px;position:relative}"]})}return t})();var Zoi=mp(Lw());var Xoi=mp(Lw());var CMe=(()=>{class t{selectedAdministrativeDistrictIds=[];selectedAdministrativeDistrictsChange=new ve;mapOptions=rg;mapController=new vh;_layer=new d8("selection",{layerId:uC.id,highlightLayerId:V5.id,sourceId:n1,displayName:"Auswahl Landkreise"});constructor(){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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-maps-administrative-district-ids-map-selection"]],inputs:{selectedAdministrativeDistrictIds:"selectedAdministrativeDistrictIds"},outputs:{selectedAdministrativeDistrictsChange:"selectedAdministrativeDistrictsChange"},features:[Yt],decls:3,vars:2,consts:[[1,"map-wrapper"],[3,"mapClick","mapLoaded","mapOptions"],[3,"controller"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"bd-map",1),te("mapClick",function(a){return r.onMapClicked(a)})("mapLoaded",function(a){return r.onMapLoaded(a)}),M(),be(2,"bd-map-legend",2),M()),n&2&&(E(),D("mapOptions",r.mapOptions),E(),D("controller",r.mapController))},dependencies:[Ah,b0],styles:[".map-wrapper[_ngcontent-%COMP%]{height:600px;position:relative}"]})}return t})();var rpe=class{_envService;constructor(i){this._envService=i}index(){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/`}detail(i){return`${this._envService.load("BD_DISTRICT_URL")}/administrative-regions/${i}`}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 xMe=(()=>{class t{_httpClient;store;constructor(e,n){this._httpClient=e,this.store=new rpe(n)}search(e=""){let n=this.store.index(),r=new Vo().set("q",e);return this._httpClient.get(n,{params:r})}findAll(e){let n=this.store.index();return this._httpClient.post(n,{administrativeRegionIds:e})}findOne(e){let n=this.store.detail(e);return this._httpClient.get(n)}findItsCareServiceAreas(e){let n=this.store.careServiceAreas();return this._httpClient.post(n,{administrativeRegionIds:e})}findItsAdministrativeDistricts(e){let n=this.store.administrativeDistricts();return this._httpClient.post(n,{administrativeRegionIds:e}).pipe(ot(r=>r.map(o=>io.createFromNumber(o))))}findItsPostalCodes(e){let n=this.store.postalCodes();return this._httpClient.post(n,{administrativeRegionIds:e})}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ope=class{_envService;constructor(i){this._envService=i}index(){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/`}details(i){return`${this._envService.load("BD_DISTRICT_URL")}/care-service-areas/${i}`}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 SMe=(()=>{class t{_httpClient;store;constructor(e,n){this._httpClient=e,this.store=new ope(n)}search(e=""){let n=this.store.index(),r=new Vo().set("q",e);return this._httpClient.get(n,{params:r})}findAll(e){let n=this.store.index();return this._httpClient.post(n,{careServiceAreaIds:e})}findOne(e){let n=this.store.details(e);return this._httpClient.get(n)}findItsAdministrativeRegions(e){let n=this.store.administrativeRegions();return this._httpClient.post(n,{careServiceAreaIds:e})}findItsAdministrativeDistricts(e){let n=this.store.administrativeDistricts();return this._httpClient.post(n,{careServiceAreaIds:e}).pipe(ot(r=>r.map(o=>io.createFromNumber(o))))}findItsPostalCodes(e){let n=this.store.postalCodes();return this._httpClient.post(n,{careServiceAreaIds:e})}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function iai(t,i){if(t&1&&(O(0,"span"),ee(1),M()),t&2){let e=i.$implicit;E(),Pt(e.label)}}var ape=(()=>{class t{dialogRef;config;_cdr;loading=!1;loading$=new hi(1);nodes=[];treeSelection=[];_selection=new Set;_possible={};constructor(e,n,r){this.dialogRef=e,this.config=n,this._cdr=r,this.loading$.subscribe(a=>this.loading=a===ni.LOADING),this.loading$.next(ni.LOADING),this.treeSelection=[];let o=PE.map(a=>a.id);this.config.data.stateOptions$(o).subscribe(a=>{this._possible=a,n.data.selection&&n.data.selection.length>0&&Hr(n.data.selection.slice()).pipe(yo(c=>this._selection.add(c)),ps(c=>this.config.data.displayName$(c).pipe(ot(m=>this._createItemNode(c,m))))).subscribe(c=>this._selectNode(c.data,c.label)),this.nodes=PE.filter(c=>this._possible[c.id].length>1).map(c=>({data:c.id,key:`state_${c.id}`,label:c.name,type:"state",selectable:!0,leaf:!1,partialSelected:this._partialSelected(c)})),this._cdr.markForCheck(),this.loading$.next(ni.SUCCESS)})}onSubmit(){this.dialogRef.close({selection:Array.from(this._selection)})}onNodeSelect(e){switch(this.loading$.next(ni.LOADING),e.node.type){case"state":{this.treeSelection.push(e.node);let n=e.node.data;Hr(this._possible[n]).pipe(ps(r=>this.config.data.displayName$(r).pipe(ot(o=>this._createItemNode(r,o))))).subscribe(r=>{this._selectNode(r.data,r.label),this.loading$.next(ni.SUCCESS),this._cdr.markForCheck()});break}case"item":{let n=e.node.data;this._selectNode(n,e.node.label),this.loading$.next(ni.SUCCESS),this._cdr.markForCheck();break}}}onNodeUnselect(e){switch(this.loading$.next(ni.LOADING),e.node.type){case"state":{this.treeSelection=[...this.treeSelection.filter(r=>r.key!==e.node.key)];let n=e.node.data;this._possible[n].forEach(r=>this._deselectNode(r)),this.loading$.next(ni.SUCCESS);break}case"item":{let n=e.node.data;this._deselectNode(n),this._cdr.markForCheck(),this.loading$.next(ni.SUCCESS);break}}}onNodeExpand(e){if(e.node.type,e.node.type==="state"){let n=e.node.data,r=this._possible[n];r&&r.length>0&&(this.loading$.next(ni.LOADING),e.node.children=[],Hr(this._possible[n]).pipe(ps(o=>this.config.data.displayName$(o).pipe(ot(a=>this._createItemNode(o,a))))).subscribe(o=>{e.node.children.push(o),e.node.children.sort((a,c)=>a.data-c.data),this.loading$.next(ni.SUCCESS),this._cdr.markForCheck()}))}}_selectNode(e,n){this._selection.add(e),this.treeSelection=[...this.treeSelection.filter(r=>!(r.type==="item"&&r.data===e)),this._createItemNode(e,n)]}_deselectNode(e){this._selection.delete(e),this.treeSelection=this.treeSelection.filter(n=>!(n.type==="item"&&n.data===e))}_createItemNode(e,n){return{data:e,key:`item_${e}`,type:"item",selectable:!0,label:n}}_partialSelected(e){return this._possible[e.id].some(n=>this._selection.has(n))}static \u0275fac=function(n){return new(n||t)(xe(El),xe(zc),xe(dn))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"div")(3,"p-tree",1),te("onNodeSelect",function(a){return r.onNodeSelect(a)})("onNodeUnselect",function(a){return r.onNodeUnselect(a)})("onNodeExpand",function(a){return r.onNodeExpand(a)}),ie(4,iai,2,1,"ng-template",2),M()()()(),O(5,"div",3)(6,"button",4),te("click",function(){return r.dialogRef.close()}),ee(7,"Abbrechen"),M(),O(8,"button",5),te("click",function(){return r.onSubmit()}),ee(9," \xDCbernehmen "),M()()),n&2&&(E(3),D("value",r.nodes)("loading",r.loading)("selection",r.treeSelection)("propagateSelectionDown",!0)("propagateSelectionUp",!1))},dependencies:[wC,Iy,Tr,Un,so,Kr],encapsulation:2,changeDetection:0})}return t})();var y8=class extends Xo{valid=!0;searching=!0;selectCtrl=new ho(this.emptySelection());placeholderLabel;noEntriesFoundLabel;selectedItemsLabel;errorMessage;allOptions=new hi(1);_onDestroy=new Ai;constructor(){super()}init(i){this.placeholderLabel=`${i.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${i.selectLabel} gefunden`,this.selectedItemsLabel=`{0} ${i.selectLabel} ausgew\xE4hlt`,this.selectCtrl.valueChanges.pipe(ha(this._onDestroy),ot(e=>e||this.emptySelection())).subscribe(e=>this.onSelectionChange(e)),i.valid$&&i.valid$.pipe(ha(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(i,e){this.selectCtrl.setValue(i,e)}};var nai=()=>["searchTerm"];function rai(t,i){if(t&1&&(O(0,"small",2),ee(1),M()),t&2){let e=L();D("id",e.selectConfig.id+"-help"),E(),Pt(e.errorMessage)}}var Yo=(()=>{class t extends y8{config;initialSelection=[];selectOptions=$t([]);selection=new ve;optionsChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};selectConfig={id:"multi-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,valid$:new hi(1)};_initialSelection$=new Bf;constructor(){super(),this._subs.push(Ec([this._initialSelection$.pipe(ar(1),ot(e=>e.map(n=>this.transformToWrapper(n)))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=$e(pe({id:`multi-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new hi(1)},this.config),{option:pe({searchOptionDisplayName:n=>this.config.option.searchOptionAccessor(n)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof qo?this._subs.push(this.initialSelection.subscribe(n=>{this._initialSelection$.next(n),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(n=>n.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(ot(e=>e.map(n=>this.transformToWrapper(n)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((n,r)=>this.selectConfig.option.sortFnc(n.realValue,r.realValue))),this.searching=!1,this.optionsChange.emit(e.map(n=>n.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-ui-multi-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Tt,Yt],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(n,r){n&1&&(O(0,"p-iftalabel"),be(1,"p-multiSelect",0),Dr(2,"async"),O(3,"label",1),ee(4),M(),yt(5,rai,2,2,"small",2),M()),n&2&&(E(),Pe(r.valid?"mb-4":r.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),D("inputId",r.selectConfig.id)("data-test",r.selectConfig.id)("formControl",r.selectCtrl)("options",ca(2,19,r.allOptions))("loading",r.searching)("showClear",!0)("filter",!0)("filterFields",Vr(21,nai))("filterPlaceHolder",r.placeholderLabel)("emptyFilterMessage",r.noEntriesFoundLabel)("emptyMessage",r.noEntriesFoundLabel)("overlayOptions",r.overlayOptions)("maxSelectedLabels",3)("selectedItemsLabel",r.selectedItemsLabel),E(2),D("for",r.selectConfig.id),E(),Pt(r.selectConfig==null?null:r.selectConfig.selectLabel),E(),vt(r.errorMessage?5:-1))},dependencies:[Ho,VM,sy,oa,yr,Mc,fh,Dc],encapsulation:2,changeDetection:0})}return t})();var oai=()=>["searchTerm"];function aai(t,i){if(t&1&&(O(0,"small",2),ee(1),M()),t&2){let e=L();D("id",e.selectConfig.id+"-help"),E(),Pt(e.errorMessage)}}var DO=(()=>{class t extends y8{config;initialSelection=[];selectOptions=$t([]);selection=new ve;optionsChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};selectConfig={id:"multi-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},optionGroup:{uniqueFnc:e=>"",sortFnc:(e,n)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>"",cloneFn:e=>JSON.parse(JSON.stringify(e))},emitEventOnInitialSelection:!1,valid$:new hi(1)};_initialSelection$=new Bf;constructor(){super(),this._subs.push(Ec([this._initialSelection$.pipe(ar(1),ot(e=>e.map(n=>this.transformToWrapper(n)))),this.optionsChange]).subscribe(e=>this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})))}ngOnChanges(e){e.config&&(this.selectConfig=$e(pe({id:`multi-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new hi(1)},this.config),{option:pe({searchOptionDisplayName:n=>this.config.option.searchOptionAccessor(n),cloneFn:n=>JSON.parse(JSON.stringify(n))},this.config.option),optionGroup:pe({searchOptionDisplayName:n=>this.config.optionGroup.searchOptionAccessor(n),cloneFn:n=>JSON.parse(JSON.stringify(n))},this.config.optionGroup)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof qo?this._subs.push(this.initialSelection.subscribe(n=>{this._initialSelection$.next(n),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(n=>n.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(ot(e=>e.map(n=>({realValue:n,dataKey:this.selectConfig.optionGroup.uniqueFnc(n),searchTerm:this.selectConfig.optionGroup.searchOptionAccessor(n),displayName:this.selectConfig.optionGroup.searchOptionDisplayName(n),options:n.options.sort((r,o)=>this.selectConfig.option.sortFnc(r,o)).map(r=>this.transformToWrapper(r))})))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((n,r)=>this.selectConfig.optionGroup.sortFnc(n.realValue,r.realValue))),this.searching=!1,this.optionsChange.emit(e.map(n=>n.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-ui-multi-select-option-group"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Tt,Yt],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(n,r){n&1&&(O(0,"p-iftalabel"),be(1,"p-multiSelect",0),Dr(2,"async"),O(3,"label",1),ee(4),M(),yt(5,aai,2,2,"small",2),M()),n&2&&(E(),Pe(r.valid?"mb-4":r.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),D("inputId",r.selectConfig.id)("data-test",r.selectConfig.id)("formControl",r.selectCtrl)("options",ca(2,20,r.allOptions))("loading",r.searching)("showClear",!0)("filterPlaceHolder",r.placeholderLabel)("emptyFilterMessage",r.noEntriesFoundLabel)("emptyMessage",r.noEntriesFoundLabel)("overlayOptions",r.overlayOptions)("maxSelectedLabels",3)("selectedItemsLabel",r.selectedItemsLabel)("group",!0)("filter",!0)("filterFields",Vr(22,oai)),E(2),D("for",r.selectConfig.id),E(),Pt(r.selectConfig==null?null:r.selectConfig.selectLabel),E(),vt(r.errorMessage?5:-1))},dependencies:[oa,yr,Mc,Ho,sy,fh,Dc],encapsulation:2,changeDetection:0})}return t})();var spe=(()=>{class t{_http;_environmentService;baseUrl;constructor(e,n){this._http=e,this._environmentService=n,this.baseUrl=this._environmentService.load("BD_DISTRICT_URL")}findAdministrativeRegionIds(e){let n=`${this.baseUrl}/states/administrative-regions`;return this._http.post(n,{stateIds:e})}findCareServiceAreaIds(e){let n=`${this.baseUrl}/states/care-service-areas`;return this._http.post(n,{stateIds:e})}findAdministrativeDistrictIds(e){let n=`${this.baseUrl}/states/administrative-districts`;return this._http.post(n,{stateIds:e}).pipe(ot(r=>r.map(o=>io.createFromNumber(o))))}findPostalCodes(e){let n=`${this.baseUrl}/states/postal-codes`;return this._http.post(n,{stateIds:e})}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var IMe=(()=>{class t{_httpClient;_environmentService;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new u8(this._environmentService)}isochrone(e,n){let r=Array.isArray(e)?e:"lng"in e?[e.lat,e.lng]:[e.lat,e.lon],o=`https://api.mapbox.com/isochrone/v1/mapbox/driving/${r[0]}%2C${r[1]}?contours_minutes=${n}&polygons=true&denoise=1&generalize=85&access_token=${this._store.token()}`;return this._httpClient.get(o)}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var OQ=class extends uy{_isochroneService;_bounds$=new hi(1);bounds$=this._bounds$.asObservable();_coordinates$=new Ai;_drivingTime$=new Sa(10);constructor(i,e,n){super(i,e),this._isochroneService=n}updateCoordinates(i){this._coordinates$.next(i)}updateDrivingTime(i){this._drivingTime$.next(i),this._legendRef.next(this.updateLegendRef())}updateLegendRef(){return new Pm(this.layerControlId,`${this.config.displayName} ${this._drivingTime$.value} min`,"public")}afterInit(i,e){Ec([this._coordinates$,this._drivingTime$]).pipe(ot(n=>({coordinates:n[0],drivingTime:n[1]})),On(n=>this._isochroneService.isochrone(n.coordinates,n.drivingTime))).subscribe(n=>{this.updateSource(n),this._bounds$.next(dy.fromBbox(Ov(n),n))})}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 RQ=class extends uy{_bounds$=new hi(1);bounds$=this._bounds$.asObservable();_coordinates$=new hi(1);_radiusInKilometer$=new Sa(25);constructor(i,e){super(i,e)}updateCoordinates(i){this._coordinates$.next(i)}updateRadiusInKilometer(i){this._radiusInKilometer$.next(i),this._legendRef.next(this.updateLegendRef())}updateLegendRef(){return new Pm(this.layerControlId,`${this.config.displayName} ${this._radiusInKilometer$.value} km`,"public")}afterInit(i,e){Ec([this._coordinates$,this._radiusInKilometer$]).pipe(ot(n=>({coordinates:n[0],radiusInKilometer:n[1]})),ot(n=>{let r={type:"Point",coordinates:n.coordinates},o={units:"kilometers",steps:100,properties:{title:`${n.radiusInKilometer} km`}};return CB(r,n.radiusInKilometer,o)})).subscribe(n=>{let r=od([n]);this.updateSource(r),this._bounds$.next(dy.fromBbox(Ov(n),r))})}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 lpe=class t{clinic;staffing;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){let e=$e(pe({},i.clinic),{id:vs.fromObj(i.clinic.id),address:Bu.fromObject(i.clinic.address)}),n=AL.fromObject(i.staffings);return new t(e,n)}constructor(i,e){this.clinic=i,this.staffing=e}},cpe=class t{clinic;caseNumbers;static fromObjArr(i){return i.map(t.fromObj)}static fromObj(i){let e=$e(pe({},i.clinic),{id:vs.fromObj(i.clinic.id),address:Bu.fromObject(i.clinic.address)}),n=i.caseNumber;return new t(e,n)}constructor(i,e){this.clinic=i,this.caseNumbers=e}},dpe=class t{id;name;nameOfOwner;type;size;beds;cmi;address;specialtyDepartments;caseNumbers;staffing;medicalCareLevel;clinicLevel;isInekCalculationLocation;bmgCriteriaOverview;static fromObj(i){return new t(vs.fromObj(i.id),i.name,i.nameOfOwner,i.type,i.size,i.beds,i.cmi,Bu.fromObject(i.address),i.specialtyDepartments,i.caseNumbers,i.staffing,i.medicalCareLevel,i.clinicLevel,i.isInekCalculationLocation,i.bmgCriteriaOverview)}static fromObjArr(i){return i.map(t.fromObj)}constructor(i,e,n,r,o,a,c,m,g,C,w,P,R,z,H){this.id=i,this.name=e,this.nameOfOwner=n,this.type=r,this.size=o,this.beds=a,this.cmi=c,this.address=m,this.specialtyDepartments=g,this.caseNumbers=C,this.staffing=w,this.medicalCareLevel=P,this.clinicLevel=R,this.isInekCalculationLocation=z,this.bmgCriteriaOverview=H}};var upe=class{_baseUrl;_resultUrl;constructor(i,e){this._baseUrl=i,this._resultUrl=e}crud(){return`${this._baseUrl}/`}findById(i){return`${this.crud()}${i}`}result(){return`${this._resultUrl}/`}export(){return`${this._resultUrl}/export`}staffingByClinicsFilter(){return`${this.result()}filter/staffings`}caseNumbersByClinicsFilter(){return`${this.result()}filter/case-numbers`}};var ppe=class{_baseUrl;constructor(i){this._baseUrl=i}crud(){return`${this._baseUrl}/`}byId(i){return`${this.crud()}${i}`}codes(i){return`${this.byId(i)}/codes/`}codesByCodingSystem(i,e){return`${this.byId(i)}/codes/${e}`}};var x0=class extends Ud{_http;_api;constructor(i,e,n,r){super(i,e,n),this._http=r,this._api=new ppe(this.getBaseUrl())}findAll(i,e){let n=this._api.crud(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._http.get(n,{params:r}).pipe(ot(o=>o.map(a=>V6.fromObject(a))))}create(i){let e=this._api.crud();return this._http.post(e,i).pipe(ot(V6.fromObject))}update(i){this.deleteCacheForKey(i.id);let e=this._api.crud();return this._http.put(e,i)}findById(i){let e=this._api.byId(i);return this._cache.cacheObservable(this.key(i),this._http.get(e).pipe(ot(V6.fromObject),qc(1)))}findByIds(i){let e=i.map(n=>this.findById(n));return Ys(e)}getCodesAll(i,e,n=!0){let r=`${this._api.codesByCodingSystem(i,e)}/all`,o=new Vo().append("sorted",n);return this._http.get(r,{params:o}).pipe(ar(1),ot(a=>a.map(aO.fromObject)))}addCodes(i,e,n){let r=this._api.codesByCodingSystem(n,e),a=Ni.chunking(i,1e3).map(c=>this._http.post(r,c));return Ys(a).pipe(ar(1))}removeAllCodes(i,e){let n=this._api.codesByCodingSystem(e,i);return this._http.delete(n).pipe(ar(1))}getCodesPage(i,e,n){let r=this._api.codesByCodingSystem(i,e);return this._http.get(r,{params:X4.toHttpParams(n)}).pipe(ar(1),ot(o=>(o.content=o.content.map(aO.fromObject),o)))}removeCode(i,e){let n=`${this._api.codesByCodingSystem(i,e.codingSystem)}/${e.name}`;return this._http.delete(n)}editCode(i,e){let n=`${this._api.codesByCodingSystem(i,e.codingSystem)}/${e.name}`;return this._http.put(n,e)}};var LA=(()=>{class t extends sue{_codeSpectrumService;_cache={};constructor(e){super(),this._codeSpectrumService=e}resolve(e){let n=e.codeSpectrumIds.map(r=>{let o,a=`${r}_${e.codingSystem}`;return this._cache[a]?o=this._cache[a]:(o=ym(this._codeSpectrumService.getCodesAll(r,e.codingSystem,!1)),this._cache[a]=o),o});return Promise.all(n).then(r=>r.reduce((o,a)=>o.concat(a),[]).filter((o,a,c)=>c.findIndex(m=>m.name===o.name)===a))}static \u0275fac=function(n){return new(n||t)(ai(x0))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var PQr=new Mi("CodeSpectrumFeatureConfig");var v8={codingSystems:["ICD-10-GM","OPS","G-DRG"],codeTypeSpecification:!1,matchingSpecification:!1,codeTypeClassifications:{"ICD-10-GM":W2["ICD-10-GM"][0],OPS:W2.OPS[2],"G-DRG":null},resolveOnSelect:!1,includesExcludesSelection:!1,grouperVersionYear:!1},b8={disableFnc:OE,detailLinkFnc:RE,filterFnc:lC,emptyResourcesText:"Keine Ziffer-Spektra gefunden",resourceNameTitle:"Ziffer-Spektra",selectOnInit:"first",resetOption:!1};var PQ=class{_codeSpectrumSelect;_options;update$=new Ai;_codes;_codeTypeClassificationOptions=[];constructor(i,e){this._codeSpectrumSelect=i,this._options=e,this._codeSpectrumSelect&&this._initCodeTypeClassification()}updateCodeSpectraSelect(i,e){this._codeSpectrumSelect[i]=e,this._initCodeTypeClassification(),i==="codingSystem"&&this._onCodingSystemChange(),i==="codeSpectra"&&(e&&Array.isArray(e)?this._codeSpectrumSelect.codeSpectrumIds=e.map(n=>n.id):this._codeSpectrumSelect.codeSpectrumIds=[]),this._onSelect()}get codes(){return this._codes}get codeTypeClassificationOptions(){return this._codeTypeClassificationOptions}get codeSpectrumSelect(){return this._codeSpectrumSelect}set codeSpectrumSelect(i){this._codeSpectrumSelect=i,this._initCodingSystem(),i.codeTypeClassification?this._codeTypeClassificationOptions=W2[this._codeSpectrumSelect.codingSystem]:this._initCodeTypeClassification(),(i.codeSpectra&&i.codeSpectra.length>0||i.codeSpectrumIds&&i.codeSpectrumIds.length>0)&&i.codingSystem&&this._onSelect()}set options(i){this._options=i,this._codeSpectrumSelect&&!this._codeSpectrumSelect.codeTypeClassification&&this._initCodeTypeClassification()}get options(){return this._options}_onCodingSystemChange(){this._setCodeTypeSpecification(),this._codeSpectrumSelect.codeTypeClassification=this._resetCodeTypeClassification(),this._codeTypeClassificationOptions=W2[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&&this._codeSpectrumSelect.codeTypeSpecification&&!K2[this._codeSpectrumSelect.codingSystem].some(e=>e===this._codeSpectrumSelect.codeTypeSpecification))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 i;return this._options.codeTypeClassifications==="selectable"?i=v8.codeTypeClassifications[this._codeSpectrumSelect?.codingSystem]??W2[this._codeSpectrumSelect?.codingSystem][0]:this._codeSpectrumSelect?.codingSystem==="G-DRG"?i=null:i=this._options.codeTypeClassifications[this._codeSpectrumSelect.codingSystem],i}_initCodeTypeClassification(){let i;this._codeTypeClassificationOptions=W2[this._codeSpectrumSelect?.codingSystem],this._codeSpectrumSelect.codeTypeClassification||(i=this._resetCodeTypeClassification(),this._codeSpectrumSelect.codeTypeClassification=i)}};var Qtt=(()=>{class t{codingSystem;matchingSpecification;codeTypeClassification;codeTypeClassificationOptions;codeTypeClassificationChange=new ve;onCodeTypeClassificationChange(e){this.codeTypeClassificationChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.onCodeTypeClassificationChange(a.value)}),M(),O(2,"label",1),ee(3,"Hierarchieebene"),M()()),n&2&&(E(),D("options",r.codeTypeClassificationOptions)("ngModel",r.codeTypeClassification)("disabled",r.codingSystem==="G-DRG"||r.matchingSpecification==="exact"))},dependencies:[Ho,Us,ra,yr,ya],encapsulation:2})}return t})();var Ztt=(()=>{class t{matchingSpecification;codeTypeSpecification;matchingSpecificationChange=new ve;DISPLAY_NAME={exact:"Exakt",leftAnchored:"Aufl\xF6sen"};options=["exact","leftAnchored"].map(e=>({matchingSpecification:e,displayName:this.DISPLAY_NAME[e]}));ngOnChanges(e){if(e.codeTypeSpecification)if(this.codeTypeSpecification==="skCode"){let n="leftAnchored";this.matchingSpecification=n,this.options=[n].map(r=>({matchingSpecification:r,displayName:this.DISPLAY_NAME[r]})),this.onMatchingSpecificationChange(n)}else this.options=["exact","leftAnchored"].map(n=>({matchingSpecification:n,displayName:this.DISPLAY_NAME[n]}))}onMatchingSpecificationChange(e){this.matchingSpecificationChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-select-inline-matching-specification"]],inputs:{matchingSpecification:"matchingSpecification",codeTypeSpecification:"codeTypeSpecification"},outputs:{matchingSpecificationChange:"matchingSpecificationChange"},features:[Yt],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(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.onMatchingSpecificationChange(a.value)}),M(),O(2,"label",1),ee(3,"Abgleich"),M()()),n&2&&(E(),D("options",r.options)("ngModel",r.matchingSpecification))},dependencies:[Ho,Us,ra,yr,ya],encapsulation:2})}return t})();var Xtt=(()=>{class t{codeTypeSpecification;codingSystem;codeTypeSpecificationChange=new ve;config={selectLabel:"Spezifikation",resetOption:!1,option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.codeTypeSpecification,searchOptionAccessor:e=>e.displayName}};options=dl;initial;ngOnChanges(e){if(e.codeTypeSpecification&&e.codeTypeSpecification.currentValue&&(this.initial={codeTypeSpecification:this.codeTypeSpecification,displayName:bA[this.codeTypeSpecification]}),e.codingSystem){switch(this.codingSystem){case"ICD-10-AT":case"ICD-10-UK":case"ICD-10-GM":{this.options=$t(K2["ICD-10-GM"].map(n=>({codeTypeSpecification:n,displayName:bA[n]})));break}case"OPS":{this.options=$t(K2.OPS.map(n=>({codeTypeSpecification:n,displayName:bA[n]})));break}case"G-DRG":{this.options=$t(K2["G-DRG"].map(n=>({codeTypeSpecification:n,displayName:bA[n]})));break}}this.codeTypeSpecification||this.options.subscribe(n=>{this.initial=n[0],this.onSelectionChanged(n[0])})}}onSelectionChanged(e){this.onCodeTypeSpecificationChange(e.codeTypeSpecification)}onCodeTypeSpecificationChange(e){this.codeTypeSpecificationChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-select-inline-code-type-specification"]],inputs:{codeTypeSpecification:"codeTypeSpecification",codingSystem:"codingSystem"},outputs:{codeTypeSpecificationChange:"codeTypeSpecificationChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onSelectionChanged(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Va],encapsulation:2})}return t})();var mpe=(()=>{class t{includes;includesChange=new ve;options=[{bool:!0,displayName:"Einschlie\xDFend"},{bool:!1,displayName:"Ausschlie\xDFend"}];static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.includesChange.emit(a.value)}),M(),O(2,"label",1),ee(3,"Einschluss Art"),M()()),n&2&&(E(),D("ngModel",r.includes)("options",r.options))},dependencies:[Us,ra,yr,ya,Ho],encapsulation:2,changeDetection:0})}return t})();var Jtt=(()=>{class t{grouperVersionYear;grouperVersionYearChange=new ve;options=[{grouperVersionYear:2024,displayName:"2024"},{grouperVersionYear:-1,displayName:"Grouper-Version des Aufnahme Jahres"}];initial=-1;ngOnChanges(e){this.grouperVersionYear&&(this.initial=this.grouperVersionYear)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-select-inline-grouper-version"]],inputs:{grouperVersionYear:"grouperVersionYear"},outputs:{grouperVersionYearChange:"grouperVersionYearChange"},features:[Yt],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(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.grouperVersionYearChange.emit(a.value)}),M(),O(2,"label",1),ee(3,"Grouper Version"),M()()),n&2&&(E(),D("ngModel",r.initial)("options",r.options))},dependencies:[Ho,Us,ra,yr,ya],encapsulation:2})}return t})();var NQ=class{_environmentService;constructor(i){this._environmentService=i}codingSystem(i){return`${this._codingSystemUrl(i)}/`}children(i){return`${`${this._codingSystemUrl(i)}/`}children/`}codeGroup(i){let e=this._environmentService.load("AYS_CODE_URL");return i==="G-DRG"?`${e}/${i}/mdc-groups/`:i==="ICD-10-GM"||i==="ICD-10-AT"?`${e}/${i}/chapters/`:`${e}/${i}/groups/`}codeByCodeName(i,e){return`${this._codingSystemUrl(i)}/${e}`}codeAgeGroupDistribution(i,e){return`${this._codingSystemUrl(i)}/${e}/cases/agm-id/distribution`}codePrevalence(i,e){return`${this._codingSystemUrl(i)}/${e}/cases/prevalence`}treeParent(i,e){return`${this._codingSystemUrl(i)}/tree/${e}`}treeChildren(i){return`${this._codingSystemUrl(i)}/tree/children`}_codingSystemUrl(i){return`${this._environmentService.load("AYS_CODE_URL")}/${i}`}};var gpe=class{_environmentService;constructor(i){this._environmentService=i}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/base_rates/`}};var tit=(()=>{class t{_httpClient;_environmentService;static _fromObj(e){return{year:parseInt(e.year,10),value:e.baseRate,state:{id:e.stateId,name:z5.find(n=>n.id===e.stateId)?.name??null}}}_baseRates;_store;constructor(e,n){this._httpClient=e,this._environmentService=n,this._store=new gpe(this._environmentService)}index(){let e;return this._baseRates?e=Promise.resolve(this._baseRates):e=ym(this._fetch().pipe(ot(n=>this._parseBaseRatesResponse(n)),yo(n=>this._baseRates=n))),e}_fetch(){let e=this._store.index();return this._httpClient.get(e)}_parseBaseRatesResponse(e){let n={};return Object.keys(e).forEach(r=>{let o=e[r];n[r]=o.map(a=>t._fromObj(a))}),n}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function fai(t,i){if(t&1&&(O(0,"span",11),ee(1),Dr(2,"currency"),M()),t&2){let e=L(2);E(),Pt(K0e(2,1,e.baseRate.value,"EUR","symbol"))}}function gai(t,i){t&1&&(O(0,"span",11),ee(1,"n/a"),M())}function _ai(t,i){if(t&1){let e=qe();O(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",4)(4,"p-iftalabel")(5,"p-select",6),te("onChange",function(r){se(e);let o=L();return le(o.onYearChange(r))}),M(),O(6,"label",7),ee(7,"Jahr"),M()()(),O(8,"div",4)(9,"bd-ui-single-select",8),te("selection",function(r){se(e);let o=L();return le(o.onStateChange(r))}),M()()()(),O(10,"div",4)(11,"div",9)(12,"span",10),ee(13,"Basisfallwert: "),M(),O(14,"div",10),yt(15,fai,3,5,"span",11),yt(16,gai,2,0,"span",11),M()()()()}if(t&2){let e=L();E(5),D("required",!0)("options",e.yearOptions)("ngModel",e.baseRate.year)("invalid",e.invalid),E(4),D("config",e.config)("selectOptions",e.stateOptions)("initialSelection",e.initialState),E(6),vt(e.baseRate.value?15:-1),E(),vt(e.baseRate.value?-1:16)}}var iit=(()=>{class t{_baseRateService;baseRate={};stateSelectOptions={includeBund:!0,resetOption:!1};baseRateChange=new ve;config={selectLabel:"Bundesland",option:{sortFnc:(e,n)=>e.name.localeCompare(n.name),uniqueFnc:e=>e.id.toString(),searchOptionAccessor:e=>e.name},valid$:new hi(1)};loading$=new hi(1);invalid=!1;yearOptions;stateOptions=dl;initialState;baseRateData;constructor(e){this._baseRateService=e,this._fetchBaseRates().then(()=>this._onInputChanges()).then(()=>this.loading$.next(ni.SUCCESS))}ngOnInit(){this.loading$.next(ni.LOADING),this.baseRate&&this.baseRate.state&&(this.initialState=this.baseRate.state),this.stateOptions=$t(this.stateSelectOptions.includeBund?z5:PE)}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(n=>parseInt(n,10)).reverse()})}_onInputChanges(){this.baseRate?this.baseRate.year&&this.baseRate.state?(this.baseRate.value=this._getBaseRateValue(this.baseRate.year,this.baseRate.state.id),this._onValidState()):(this.baseRate.value=null,this._onInvalidState()):(this.baseRate={},this._onInvalidState())}_onValidState(){this.config.valid$.next({errorMessage:"",isValid:!0}),this.baseRateChange.emit(this.baseRate),this.invalid=!1}_onInvalidState(){this.config.valid$.next({errorMessage:"Basisfallwert muss angegeben sein",isValid:!1}),this.invalid=!0}_getBaseRateValue(e,n){let r=this.baseRateData[e.toString()]||null,o=null;return r&&r.forEach(a=>{a.state.id===n&&(o=a.value)}),o}static \u0275fac=function(n){return new(n||t)(xe(tit))};static \u0275cmp=re({type:t,selectors:[["ays-drg-base-rate"]],inputs:{baseRate:"baseRate",stateSelectOptions:"stateSelectOptions"},outputs:{baseRateChange:"baseRateChange"},features:[Yt],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-5",3,"onChange","required","options","ngModel","invalid"],["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(n,r){if(n&1&&(O(0,"div",1),be(1,"bd-loader",2),M(),ie(2,_ai,17,9,"ng-template",null,0,di)),n&2){let o=Oi(3);E(),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,Ho,Us,ra,yr,Bx,ya,Va,Aye],styles:[".base-rate--result[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;margin-right:8px}"]})}return t})();function yai(t,i){if(t&1){let e=qe();O(0,"mat-radio-button",2),te("click",function(){let r=se(e).$implicit,o=L();return le(o.onCodeTypeSelect(r))}),O(1,"span"),ee(2),M()()}if(t&2){let e=i.$implicit;D("value",e)("data-test","code-coding-system-select-"+e),E(2),Pt(e)}}var nit=(()=>{class t{codingSystem;codingSystemOptions=["ICD-10-GM","OPS","G-DRG"];codingSystemChange=new ve;onCodeTypeSelect(e){this.codingSystemChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"mat-radio-group",0),Qo(1,yai,3,3,"mat-radio-button",1,ms),M()),n&2&&(D("value",r.codingSystem),E(),Zo(r.codingSystemOptions))},dependencies:[OQe,eK,h6,fh],encapsulation:2})}return t})();var _pe=(()=>{class t{codingSystem;codingSystemOptions=["ICD-10-GM","OPS","G-DRG"];codingSystemChange=new ve;config={id:"code-coding-system-select",selectLabel:"Kodierung",emitEventOnInitialSelection:!0,option:{sortFnc:(e,n)=>e.localeCompare(n),searchOptionAccessor:e=>e,uniqueFnc:e=>e}};options=dl;ngOnInit(){this.options=$t(this.codingSystemOptions)}onCodingSystemSelect(e){this.codingSystemChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onCodingSystemSelect(a)}),M()),n&2&&D("config",r.config)("initialSelection",r.codingSystem)("selectOptions",r.options)},dependencies:[Va],encapsulation:2})}return t})();var ype=class t{code;year;sum;percentageByAgmId;additionalInformation;static fromObj(i,e){return new t(new xi(e.content.code.name,void 0,i,"specific"),e.content.year,e.content.sum,e.content.percentageByAgmId,e.additionalInformation.text)}constructor(i,e,n,r,o){this.code=i,this.year=e,this.sum=n,this.percentageByAgmId=r,this.additionalInformation=o}};var Wm=(()=>{class t{_httpClient;_environmentService;static toQueryParams(e){function n(r){return`${r.codingSystem}--${r.hierarchyElementType}--${r.name}`}return{codes:e.map(r=>n(r))}}static fromQueryParams(e){return e.has("codes")?e.getAll("codes").map(n=>{let r=n.split("--");return new xi(r[2],void 0,r[0],r[1])}):[]}_codeCache={};_codeStore;constructor(e,n){this._httpClient=e,this._environmentService=n,this._codeStore=new NQ(this._environmentService)}get$(e,n,r=new Vo){if(r.keys().length>0)return this._get(e,n,r);if(this._codeCache[e]){let o=this._codeCache[e][n];if(o)return o.pipe(ot(a=>a.clone()))}else this._codeCache[e]={};return this._codeCache[e][n]=this._get(e,n,r).pipe(ot(o=>o.clone()),qc(1)),this._codeCache[e][n]}getAll(e,n,r=new Vo){let o=this._codeStore.codingSystem(e),a;return e==="G-DRG"?a=this._httpClient.post(o,n,{params:r}).pipe(ot(c=>{let m={};return Object.keys(c).forEach(g=>{let C=c[g];m[g]=new S6(C.drgCode.name,C.drgCode.description,C.drgCode.year,C.mainDepartment)}),m})):a=this._httpClient.post(o,n,{params:r}).pipe(ot(c=>{let m={};return Object.keys(c).forEach(g=>{m[g]=xi.fromObject(c[g])}),m})),a.pipe(yo(c=>{Object.keys(c).forEach(m=>{this._addToCache(e,m,c[m])})})),a}children(e,n,r){let o=this._codeStore.children(e),a={codes:n};return r&&(a={codes:n,numberOfDigits:r}),this._httpClient.post(o,a).pipe(ot(c=>c.map(xi.fromObject)))}find(e,n,r,o,a=new Vo){let c=this._codeStore.codingSystem(e);return n&&(a=a.set("query",n)),r&&(a=a.set("numberOfDigits",r.toString())),o&&(a=a.set("limit",o)),this._httpClient.get(c,{params:a}).pipe(ot(m=>m.map(g=>$e(pe({},g),{codingSystem:e})).map(g=>xi.fromObject(g))),yo(m=>{m.forEach(g=>{this._addToCache(e,g.name,g)})}))}getAgeGroupDistribution(e,n,r=new Vo){let o=this._codeStore.codeAgeGroupDistribution(e,n);return this._httpClient.get(o,{params:r}).pipe(ot(a=>ype.fromObj(e,a)))}prevalence(e,n,r=new Vo){let o=this._codeStore.codePrevalence(e,n);return this._httpClient.get(o,{params:r}).pipe(ot(a=>{let c={additionalInformation:a.additionalInformation,prevalencePerAdId:{}};return Object.keys(a.prevalencePerAdId).forEach(m=>{c.prevalencePerAdId[m]=$e(pe({},a.prevalencePerAdId[m]),{code:xi.fromObject(a.prevalencePerAdId[m].code)})}),c}))}getCasesTimeSeries(e,n,r=new Vo){let o=`${this._codeStore.codeByCodeName(e,n)}/cases/timeseries`;return this._httpClient.get(o,{params:r})}getPatientMigration(e,n,r,o){return this._fetchPatientMigration(e,n,r,o)}treePath(e,n){let r=this._codeStore.treeParent(e,n),o=a=>{let c;return a.hasParent&&a.parent&&(c=o(a.parent)),{type:e,data:Zv.fromObject(a),parent:c,key:a.name,label:a.name,leaf:a.nodeType==="external"}};return this._httpClient.get(r).pipe(ot(a=>o(a)))}treeChildren(e,n,r){let o=n?this._codeStore.treeChildren(e):this._codeStore.codeGroup(e);return n?this._httpClient.post(o,{values:[n],year:r}).pipe(ot(a=>a[n]),ot(a=>a.map(c=>({data:Zv.fromObject(c),type:c.codingSystem,key:c.name,label:`${c.name} - ${c.description}`,leaf:c.nodeType==="external"})))):this._httpClient.get(o).pipe(ot(a=>a.map(c=>({data:Zv.fromObject(c),type:c.codingSystem,key:c.name,label:`${c.name} - ${c.description}`,leaf:c.nodeType==="external"}))))}static reverse(e){return e.parent?(e.parent.children=[e],this.reverse(e.parent)):e}_get(e,n,r){let o=this._codeStore.codeByCodeName(e,n);return this._httpClient.get(o,{params:r}).pipe(ot(a=>Zv.fromObject(a)))}_fetchPatientMigration(e,n,r,o){let a=`${this._codeStore.codingSystem(e)}patient-migration`,c={year:r?.toString(),codes:n.map(m=>({name:m,codingSystem:e,hierarchyElementType:"specific"})),administrativeDistrictIds:o?.map(m=>m.getNumericValue())};return this._httpClient.post(a,c)}_addToCache(e,n,r){this._codeCache[e]||(this._codeCache[e]={}),this._codeCache[e][n]=$t(r)}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cai(t,i){if(t&1){let e=qe();O(0,"div",3)(1,"ays-code-spectrum-select-inline-includes",6),te("includesChange",function(r){se(e);let o=L();return le(o.onFieldChange("includes",r))}),M()()}if(t&2){let e=L();E(),D("includes",e.selectHandler==null?null:e.selectHandler.codeSpectrumSelect.includes)}}function xai(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"ays-code-coding-system-select-inline",7),te("codingSystemChange",function(r){se(e);let o=L();return le(o.onFieldChange("codingSystem",r))}),M()()}if(t&2){let e=L();E(),D("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 Sai(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"ays-code-spectrum-select-inline-code-type-specification",8),te("codeTypeSpecificationChange",function(r){se(e);let o=L();return le(o.onFieldChange("codeTypeSpecification",r))}),M()()}if(t&2){let e=L();E(),D("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 wai(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"ays-code-spectrum-select-inline-grouper-version",9),te("grouperVersionYearChange",function(r){se(e);let o=L();return le(o.onGrouperVersionChange(r))}),M()()}if(t&2){let e=L();E(),D("grouperVersionYear",e.codeSpectrumSelect.grouperVersionYear)}}function Iai(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"ays-code-spectrum-select-inline-matching-specification",10),te("matchingSpecificationChange",function(r){se(e);let o=L();return le(o.onFieldChange("matching",r))}),M()()}if(t&2){let e=L();E(),D("matchingSpecification",e.selectHandler.codeSpectrumSelect.matching)("codeTypeSpecification",e.selectHandler.codeSpectrumSelect.codeTypeSpecification)}}function Tai(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"ays-code-spectrum-select-inline-code-type-classifications",11),te("codeTypeClassificationChange",function(r){se(e);let o=L();return le(o.onFieldChange("codeTypeClassification",r))}),M()()}if(t&2){let e=L();E(),D("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 oit=(()=>{class t extends Xo{codeSpectrumSelect;options=v8;optionsInlineSelect=b8;codeSpectrumSelectChange=new ve;selectHandler=new PQ;codeSpectraSelects=[];resourceName=tn.CODE_SPECTRUM;ngOnInit(){this.selectHandler=new PQ(this.codeSpectrumSelect,this.options);let e=this.selectHandler.update$.subscribe(n=>{this.codeSpectrumSelectChange.emit(n),n.codeSpectrumIds&&n.codeSpectrumIds.length>0?this.codeSpectraSelects=n.codeSpectrumIds.map(r=>({id:r,resource:null})):n.codeSpectra&&n.codeSpectra.length>0?this.codeSpectraSelects=n.codeSpectra.map(r=>({id:r.id,resource:r})):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,n){this.selectHandler.updateCodeSpectraSelect(e,n)}onGrouperVersionChange(e){e===-1?this.onFieldChange("grouperVersionYear",void 0):this.onFieldChange("grouperVersionYear",e)}_onOptionsChange(){this.selectHandler&&(this.selectHandler.options=this.options)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-select-inline-multiple"]],inputs:{codeSpectrumSelect:"codeSpectrumSelect",options:"options",optionsInlineSelect:"optionsInlineSelect"},outputs:{codeSpectrumSelectChange:"codeSpectrumSelectChange"},features:[Tt,Yt],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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2),yt(3,Cai,2,1,"div",3),yt(4,xai,2,2,"div",4),M()(),yt(5,Sai,2,2,"div",1),yt(6,wai,2,1,"div",1),O(7,"div",1)(8,"bd-resources-select-inline-multiple",5),te("resourceSelectChange",function(a){return r.onFieldChange("codeSpectra",a)}),M()(),O(9,"div",2),yt(10,Iai,2,2,"div",4),yt(11,Tai,2,4,"div",1),M()()),n&2&&(E(3),vt(r.options.includesExcludesSelection?3:-1),E(),vt(r.options.codingSystems.length>1?4:-1),E(),vt(r.options.codeTypeSpecification&&r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.codingSystem!=="G-DRG"?5:-1),E(),vt(r.options.grouperVersionYear&&r.selectHandler.codeSpectrumSelect.codingSystem==="G-DRG"?6:-1),E(2),D("resourceName",r.resourceName)("resourceSelects",r.codeSpectraSelects)("config",r.optionsInlineSelect),E(2),vt(r.options.matchingSpecification&&r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.codingSystem!=="G-DRG"?10:-1),E(),vt(r.options.codeTypeClassifications==="selectable"?11:-1))},dependencies:[mpe,Xtt,Ztt,Qtt,Pw,Jtt,_pe],encapsulation:2,changeDetection:0})}return t})();var C8=class extends Ud{_registeredFilter;_httpClient;_codeSpectrumService;_api;constructor(i,e,n,r,o,a){super(i,e,n),this._registeredFilter=r,this._httpClient=o,this._codeSpectrumService=a,this._api=new upe(this.getBaseUrl(),e.load(i.API_TOKENS.RESULT))}static newDefaultClinicFilter(){return new TO(null,null,null,null,null,new x1([]))}findAll(i,e){let n=this._api.crud(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(On(o=>{let a=o.map(c=>Hr(TO.fromObj(c,this._registeredFilter)).pipe(Ac(m=>(console.error(m),$t(null)))));return Ys(a)}),ot(o=>o.filter(a=>!!a)))}findById(i){let e=this._api.findById(i);return this._cache.cacheObservable(this.key(i),this._httpClient.get(e).pipe(On(n=>TO.fromObj(n,this._registeredFilter)),qc(1)))}create(i){let e=this._api.crud();return Hr(i.toRequestFormat({codeSpectra:new LA(this._codeSpectrumService)})).pipe(On(n=>this._httpClient.post(e,n)),On(n=>TO.fromObj(n,this._registeredFilter)))}update(i){this.deleteCacheForKey(i.id);let e=this._api.crud();return Hr(i.toRequestFormat({codeSpectra:new LA(this._codeSpectrumService)})).pipe(On(n=>this._httpClient.put(e,n)),ot(()=>null))}result(i,e=uI){let n=this._api.result(),r=Pa.and(i.expression.clone(),new AC(e));return Hr(r.toCondition({clinicIds:new PA(e),codeSpectra:new LA(this._codeSpectrumService)})).pipe(On(o=>this._httpClient.post(n,o)),ot(o=>o.map(a=>(a.clinic.id=vs.fromObj(a.clinic.id),a.clinic.address=Bu.fromObject(a.clinic.address),a))))}staffingByClinicsFilter(i,e=new Vo,n=uI){let r=this._api.staffingByClinicsFilter(),o=Pa.and(i.expression.clone(),new AC(n));return Hr(o.toCondition({codeSpectra:new LA(this._codeSpectrumService),clinicIds:new PA(n)})).pipe(On(a=>this._httpClient.post(r,a,{params:e})),ot(a=>rE.responseToPage(a,lpe.fromObjArr)))}caseNumbersByClinicsFilter(i,e=new Vo,n=uI){let r=this._api.caseNumbersByClinicsFilter(),o=Pa.and(i.expression.clone(),new AC(n));return Hr(o.toCondition({codeSpectra:new LA(this._codeSpectrumService),clinicIds:new PA(n)})).pipe(On(a=>this._httpClient.post(r,a,{params:e})),ot(a=>rE.responseToPage(a,cpe.fromObjArr)))}export(i,e=uI){let n=this._api.export(),r=Pa.and(i.expression.clone(),new AC(e));return Hr(r.toCondition({codeSpectra:new LA(this._codeSpectrumService),clinicIds:new PA(e)})).pipe(On(o=>this._httpClient.post(n,o)),ot(o=>dpe.fromObjArr(o))).toPromise()}};var vpe=class{_environmentService;constructor(i){this._environmentService=i}indexResource(){return`${this._environmentService.load("AYS_FAB_RESOURCE_URL")}/`}byFabKeyResource(i){return`${this.indexResource()}${i}`}};var FC=(()=>{class t{_http;_environmentService;_store;constructor(e,n){this._http=e,this._environmentService=n,this._store=new vpe(this._environmentService)}index(){let e=this._store.indexResource();return this._http.get(e).pipe(ot(n=>n.map(r=>new _i(r.fabKey,r.name))))}get(e){let n=this._store.byFabKeyResource(e);return this._http.get(n).pipe(ar(1),ot(r=>new _i(r.fabKey,r.name)))}getAll(e){let n=e.map(r=>Hr(this.get(r)).pipe(Ac(()=>$t(null))));return Ys(n).pipe(ot(r=>r.filter(o=>!!o).reduce((o,a)=>(o[a.fabKey]=a,o),{})))}static \u0275fac=function(n){return new(n||t)(ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rs=class{specialityName;specialityId;constructor(i,e){this.specialityName=i,this.specialityId=e}parent(){let i=this.specialityId.slice(0,3).concat("0");return kai.find(e=>e.specialityId===i)}},kai=[new rs("Allgemeinchirurgie","1000"),new rs("Allgemeinmedizin","1100"),new rs("An\xE4sthesiologie","1200"),new rs("Arbeitsmedizin","1300"),new rs("Augenheilkunde","1400"),new rs("Biochemie","1500"),new rs("Diagnostische Radiologie","1600"),new rs("Frauenheilkunde und Geburtshilfe","1700"),new rs("Gef\xE4\xDFchirurgie","1800"),new rs("Hals-Nasen-Ohrenheilkunde","1900"),new rs("Haut- und Geschlechtskrankheiten","2000"),new rs("Herzchirurgie","2100"),new rs("Humangenetik","2200"),new rs("Hygiene und Umweltmedizin","2300"),new rs("Innere Medizin","2400"),new rs("Angiologie","2401"),new rs("Endokrinologie und Diabetologie","2402"),new rs("Gastroenterologie","2403"),new rs("Geriatrie","2404"),new rs("H\xE4matologie und Onkologie","2405"),new rs("Kardiologie","2406"),new rs("Nephrologie","2407"),new rs("Pneumologie","2408"),new rs("Rheumatologie","2409"),new rs("Mund-Kiefer-Gesichtschirurgie","2500"),new rs("Kinderheilkunde / Kinder- und Jugendmedizin","2600"),new rs("Kinderchirurgie","2700"),new rs("Pharmakologie und Toxikologie","2800"),new rs("Laboratoriumsmedizin","2900"),new rs("Mikrobiologie","3000"),new rs("Neurochirurgie","3100"),new rs("Neurologie","3200"),new rs("Neurologie und Psychiatrie","3300"),new rs("Neuropathologie","3400"),new rs("Nuklearmedizin","3500"),new rs("Orthop\xE4die und Unfallchirurgie","3600"),new rs("Pathologie","3700"),new rs("Phoniatrie und P\xE4daudiologie","3800"),new rs("Physikalische und Rehabilitative Medizin","3900"),new rs("Plastische Chirurgie","4000"),new rs("Psychiatrie und Psychotherapie","4100"),new rs("Rechtsmedizin","4200"),new rs("Strahlentherapie","4300"),new rs("Thoraxchirurgie","4400"),new rs("Transfusionsmedizin","4500"),new rs("Urologie","4600"),new rs("Virologie","4700"),new rs("Viszeralchirurgie","4800")];var Qa=class{specialityName;children;level;expandable;specialityId;constructor(i,e,n,r,o){this.specialityName=i,this.children=e,this.level=n,this.expandable=r,this.specialityId=o}},Mai=[new Qa("Allgemeinchirurgie",[],0,!1,"1000"),new Qa("Allgemeinmedizin",[],0,!1,"1100"),new Qa("An\xE4sthesiologie",[],0,!1,"1200"),new Qa("Arbeitsmedizin",[],0,!1,"1300"),new Qa("Augenheilkunde",[],0,!1,"1400"),new Qa("Biochemie",[],0,!1,"1500"),new Qa("Diagnostische Radiologie",[],0,!1,"1600"),new Qa("Frauenheilkunde und Geburtshilfe",[],0,!1,"1700"),new Qa("Gef\xE4\xDFchirurgie",[],0,!1,"1800"),new Qa("Hals-Nasen-Ohrenheilkunde",[],0,!1,"1900"),new Qa("Haut- und Geschlechtskrankheiten",[],0,!1,"2000"),new Qa("Herzchirurgie",[],0,!1,"2100"),new Qa("Humangenetik",[],0,!1,"2200"),new Qa("Hygiene und Umweltmedizin",[],0,!1,"2300"),new Qa("Innere Medizin",[new Qa("Angiologie",[],1,!1,"2401"),new Qa("Endokrinologie und Diabetologie",[],1,!1,"2402"),new Qa("Gastroenterologie",[],1,!1,"2403"),new Qa("Geriatrie",[],1,!1,"2404"),new Qa("H\xE4matologie und Onkologie",[],1,!1,"2405"),new Qa("Kardiologie",[],1,!1,"2406"),new Qa("Nephrologie",[],1,!1,"2407"),new Qa("Pneumologie",[],1,!1,"2408"),new Qa("Rheumatologie",[],1,!1,"2409")],0,!0,"2400"),new Qa("Mund-Kiefer-Gesichtschirurgie",[],0,!1,"2500"),new Qa("Kinderheilkunde / Kinder- und Jugendmedizin",[],0,!1,"2600"),new Qa("Kinderchirurgie",[],0,!1,"2700"),new Qa("Pharmakologie und Toxikologie",[],0,!1,"2800"),new Qa("Laboratoriumsmedizin",[],0,!1,"2900"),new Qa("Mikrobiologie",[],0,!1,"3000"),new Qa("Neurochirurgie",[],0,!1,"3100"),new Qa("Neurologie",[],0,!1,"3200"),new Qa("Neurologie und Psychiatrie",[],0,!1,"3300"),new Qa("Neuropathologie",[],0,!1,"3400"),new Qa("Nuklearmedizin",[],0,!1,"3500"),new Qa("Orthop\xE4die und Unfallchirurgie",[],0,!1,"3600"),new Qa("Pathologie",[],0,!1,"3700"),new Qa("Phoniatrie und P\xE4daudiologie",[],0,!1,"3800"),new Qa("Physikalische und Rehabilitative Medizin",[],0,!1,"3900"),new Qa("Plastische Chirurgie",[],0,!1,"4000"),new Qa("Psychiatrie und Psychotherapie",[],0,!1,"4100"),new Qa("Rechtsmedizin",[],0,!1,"4200"),new Qa("Strahlentherapie",[],0,!1,"4300"),new Qa("Thoraxchirurgie",[],0,!1,"4400"),new Qa("Transfusionsmedizin",[],0,!1,"4500"),new Qa("Urologie",[],0,!1,"4600"),new Qa("Virologie",[],0,!1,"4700"),new Qa("Viszeralchirurgie",[],0,!1,"4800")];function Pai(t,i){if(t&1){let e=qe();O(0,"bd-interval-relative-input",1),te("relativeIntervalChange",function(r){se(e);let o=L();return le(o.onIntervalChange(r))}),M()}if(t&2){let e=L();D("relativeInterval",e.timeSelection==null?null:e.timeSelection.intervalRelative)}}function Nai(t,i){if(t&1){let e=qe();O(0,"bd-interval-relative-input-inline",2),te("relativeIntervalChange",function(r){se(e);let o=L();return le(o.onIntervalChange(r))})("moreOptionsChange",function(){se(e);let r=L();return le(r.moreOptionsChange.emit())}),M()}if(t&2){let e=L();D("relativeInterval",e.timeSelection==null?null:e.timeSelection.intervalRelative)}}var bpe=(()=>{class t{inputType="form";timeSelection;timeSelectionChange=new ve;moreOptionsChange=new ve;onIntervalChange(e){this.timeSelection?this.timeSelection.intervalRelative=e:this.timeSelection=new aE(e),this.timeSelectionChange.emit(this.timeSelection)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(yt(0,Pai,1,1,"bd-interval-relative-input",0),yt(1,Nai,1,1,"bd-interval-relative-input-inline",0)),n&2&&(vt(r.inputType==="form"?0:-1),E(),vt(r.inputType==="inline"?1:-1))},dependencies:[iGe,nGe],encapsulation:2})}return t})();var Cpe=(()=>{class t{timeSelection;timeSelectionChange=new ve;moreOptionsChange=new ve;onIntervalChange(e){this.timeSelection?this.timeSelection.interval=e:this.timeSelection=new Zb(e),this.timeSelectionChange.emit(this.timeSelection)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-interval-calendric-input",0),te("intervalChange",function(a){return r.onIntervalChange(a)})("moreOptionsChange",function(){return r.moreOptionsChange.emit()}),M()),n&2&&D("interval",r.timeSelection==null?null:r.timeSelection.interval)},dependencies:[VHe],encapsulation:2})}return t})();function Fai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-calendric",6),te("timeSelectionChange",function(r){se(e);let o=L();return le(o.onTimeSelectionChange(r))}),M()}if(t&2){let e=L();D("timeSelection",e.timeSelectionAsCalendric(e.timeSelection))}}function Lai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-relative",6),te("timeSelectionChange",function(r){se(e);let o=L();return le(o.onTimeSelectionChange(r))}),M()}if(t&2){let e=L();D("timeSelection",e.timeSelectionAsRelative(e.timeSelection))}}var ait=(()=>{class t{placeholderText="Zeitraum";timeSelection;timeSelectionChange=new ve;typeOptions=[{type:"relative",displayName:"Relativ"},{type:"calendric",displayName:"Kalendarisch"}];onTimeSelectionChange(e){this.timeSelection=e,this.timeSelectionChange.emit(e)}onTimeSelectionTypeChange(e){let n;e==="calendric"?n=new Zb(Mm.byUnit("previous-year")):n=new aE(new ef({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})),this.onTimeSelectionChange(n)}timeSelectionAsCalendric(e){return e}timeSelectionAsRelative(e){return e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"p-iftalabel")(3,"p-select",2),te("onChange",function(a){return r.onTimeSelectionTypeChange(a.value)}),M(),O(4,"label",3),ee(5),M()()(),O(6,"div",4),yt(7,Fai,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",5),yt(8,Lai,1,1,"ays-virtual-clinic-analysis-time-selection-relative",5),M()()),n&2&&(E(3),D("options",r.typeOptions)("ngModel",r.timeSelection==null?null:r.timeSelection.type),E(2),Pt(r.placeholderText),E(2),vt((r.timeSelection==null?null:r.timeSelection.type)==="calendric"?7:-1),E(),vt((r.timeSelection==null?null:r.timeSelection.type)==="relative"?8:-1))},dependencies:[mc,Cpe,bpe,Ho,Us,ra,yr,ya],encapsulation:2})}return t})();function Bai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-dialog-form",11),te("timeSelectionChange",function(r){se(e);let o=L(2);return le(o.onTimeSelectionChange("timeSelectionComparison",r))}),M()}if(t&2){let e=L(2);D("timeSelection",e.config.data.timeSelectionComparison)}}function Vai(t,i){if(t&1){let e=qe();O(0,"div",3),be(1,"mat-divider"),M(),O(2,"div",3)(3,"span",4),ee(4,"Vergleichszeitraum"),M(),yt(5,Bai,1,1,"ays-virtual-clinic-analysis-time-selection-dialog-form",9),M(),O(6,"div",3)(7,"mat-slide-toggle",10),te("change",function(r){se(e);let o=L();return le(o.onShowTimeSelectionComparisonChange(r))}),ee(8," Vergleichszeitraum anzeigen "),M()()}if(t&2){let e=L();E(5),vt(e.config.data.timeSelectionComparison?5:-1),E(2),D("checked",!!e.config.data.timeSelectionComparison)}}function zai(t,i){if(t&1&&(O(0,"div",3),be(1,"mat-divider"),M(),O(2,"div",3)(3,"span",4),ee(4,"Verf\xFCgbarer Zeitraum"),M(),be(5,"bd-loader",12),M()),t&2){let e=L(),n=Oi(17),r=Oi(19);E(5),D("loadItem",e.loadingAvailableDateRangeInfo$)("successTemplate",n)("customLoadingTemplate",r)}}function Uai(t,i){if(t&1){let e=qe();O(0,"div")(1,"button",8),te("click",function(){se(e);let r=L(2);return le(r.useAvailableDateRangeInfo("timeSelectionComparison"))}),ee(2," Als Vergleichszeitraum festlegen "),M()()}}function Hai(t,i){if(t&1){let e=qe();O(0,"div")(1,"div",13)(2,"span",14),ee(3),M(),O(4,"div")(5,"button",8),te("click",function(){se(e);let r=L();return le(r.useAvailableDateRangeInfo("timeSelection"))}),ee(6),M()(),yt(7,Uai,3,0,"div"),M()()}if(t&2){let e=L();E(3),Pt(e.availableDateRangeInfo.toCompactDateString()),E(3),gn(" Als ",e.config.data.timeSelectionComparison?"Analyse Zeitraum":"Zeitraum"," festlegen "),E(),vt(e.config.data.enableTimeSelectionComparison?7:-1)}}function Gai(t,i){t&1&&(O(0,"div",18),be(1,"p-skeleton",17),M())}function jai(t,i){if(t&1&&(O(0,"div",15)(1,"div",13)(2,"div"),be(3,"p-skeleton",16),M(),O(4,"div"),be(5,"p-skeleton",17),M(),yt(6,Gai,2,0,"div",18),M()()),t&2){let e=L();E(6),vt(e.config.data.enableTimeSelectionComparison?6:-1)}}var sit=(()=>{class t{ref;config;loadingAvailableDateRangeInfo$=new hi(1);availableDateRangeInfo;constructor(e,n){this.ref=e,this.config=n}ngOnInit(){this.config.data.availableDateRangeInfo&&(this.loadingAvailableDateRangeInfo$.next(ni.LOADING),this.config.data.availableDateRangeInfo.subscribe({next:e=>{this.availableDateRangeInfo=e,this.loadingAvailableDateRangeInfo$.next(ni.SUCCESS)},error:()=>this.loadingAvailableDateRangeInfo$.next(ni.ERROR)}))}onTimeSelectionChange(e,n){this.config.data[e]=n}onShowTimeSelectionComparisonChange(e){e.checked?this.config.data.timeSelectionComparison=new aE(new ef({temporalUnit:"year",count:1},{temporalUnit:"year",count:1})):this.config.data.timeSelectionComparison=null}useAvailableDateRangeInfo(e){this.onTimeSelectionChange(e,new Zb(this.availableDateRangeInfo))}static \u0275fac=function(n){return new(n||t)(xe(El),xe(zc))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div")(1,"div",2)(2,"div",3)(3,"span",4),ee(4),M(),O(5,"ays-virtual-clinic-analysis-time-selection-dialog-form",5),te("timeSelectionChange",function(c){return se(o),le(r.onTimeSelectionChange("timeSelection",c))}),M()(),yt(6,Vai,9,2),yt(7,zai,6,3),O(8,"div",3)(9,"div",6)(10,"div")(11,"button",7),te("click",function(){return se(o),le(r.ref.close(r.config.data))}),ee(12," Zeitraum \xFCbernehmen "),M()(),O(13,"div")(14,"button",8),te("click",function(){return se(o),le(r.ref.close(null))}),ee(15,"Abbrechen"),M()()()()()(),ie(16,Hai,8,3,"ng-template",null,0,di)(18,jai,7,1,"ng-template",null,1,di)}n&2&&(E(4),Pt(r.config.data.enableTimeSelectionComparison?"Analyse Zeitraum":"Zeitraum"),E(),D("placeholderText",r.config.data.enableTimeSelectionComparison?"Analyse Zeitraum":"Zeitraum")("timeSelection",r.config.data.timeSelection),E(),vt(r.config.data.enableTimeSelectionComparison?6:-1),E(),vt(r.config.data.availableDateRangeInfo?7:-1))},dependencies:[ait,Cp,Id,oGe,rCe,fr,so,Kr,cC,kv],encapsulation:2})}return t})();function $ai(t,i){t&1&&(O(0,"span",2),ee(1,"Analyse Zeitraum"),M())}function qai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-calendric",5),te("timeSelectionChange",function(r){se(e);let o=L();return le(o.onTimeSelectionChange(r))})("moreOptionsChange",function(){se(e);let r=L();return le(r.onOpenSettingsDialog())}),M()}if(t&2){let e=L();D("timeSelection",e.asCalendric(e.timeSelection))}}function Yai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-relative",6),te("timeSelectionChange",function(r){se(e);let o=L();return le(o.onTimeSelectionChange(r))})("moreOptionsChange",function(){se(e);let r=L();return le(r.onOpenSettingsDialog())}),M()}if(t&2){let e=L();D("timeSelection",e.asRelative(e.timeSelection))}}function Kai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-calendric",7),te("timeSelectionChange",function(r){se(e);let o=L();return le(o.onTimeSelectionChange(r))})("moreOptionsChange",function(){se(e);let r=L();return le(r.onOpenSettingsDialog())}),M()}}function Wai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-calendric",5),te("timeSelectionChange",function(r){se(e);let o=L(2);return le(o.onTimeSelectionComparisonChange(r))})("moreOptionsChange",function(){se(e);let r=L(2);return le(r.onOpenSettingsDialog())}),M()}if(t&2){let e=L(2);D("timeSelection",e.asCalendric(e.timeSelectionComparison))}}function Qai(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-analysis-time-selection-relative",6),te("timeSelectionChange",function(r){se(e);let o=L(2);return le(o.onTimeSelectionComparisonChange(r))})("moreOptionsChange",function(){se(e);let r=L(2);return le(r.onOpenSettingsDialog())}),M()}if(t&2){let e=L(2);D("timeSelection",e.asRelative(e.timeSelectionComparison))}}function Zai(t,i){if(t&1&&(O(0,"div",1)(1,"span",2),ee(2,"Vergleichszeitraum"),M(),yt(3,Wai,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",3),yt(4,Qai,1,1,"ays-virtual-clinic-analysis-time-selection-relative",4),M()),t&2){let e=L();E(3),vt((e.timeSelectionComparison==null?null:e.timeSelectionComparison.type)==="calendric"?3:-1),E(),vt((e.timeSelectionComparison==null?null:e.timeSelectionComparison.type)==="relative"?4:-1)}}var lit=(()=>{class t{_dialogService;enableTimeSelectionComparison=!1;timeSelection;timeSelectionComparison;availableDateRangeInfo;timeSelectionChange=new ve;timeSelectionComparisonChange=new ve;constructor(e){this._dialogService=e}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=$e(pe({},Ul),{header:"Zeitraum festlegen",data:{timeSelection:this.timeSelection?.clone(),timeSelectionComparison:this.timeSelectionComparison?.clone(),availableDateRangeInfo:this.availableDateRangeInfo,enableTimeSelectionComparison:this.enableTimeSelectionComparison}});this._dialogService.open(sit,e).onClose.pipe(vn(n=>!!n)).subscribe(n=>{this.onTimeSelectionChange(n?.timeSelection),this.onTimeSelectionComparisonChange(n?.timeSelectionComparison)})}asCalendric(e){return e}asRelative(e){return e}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-time-selection"]],inputs:{enableTimeSelectionComparison:"enableTimeSelectionComparison",timeSelection:"timeSelection",timeSelectionComparison:"timeSelectionComparison",availableDateRangeInfo:"availableDateRangeInfo"},outputs:{timeSelectionChange:"timeSelectionChange",timeSelectionComparisonChange:"timeSelectionComparisonChange"},features:[Ii([Hp,To])],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(n,r){if(n&1&&(O(0,"div",0)(1,"div",1),yt(2,$ai,2,0,"span",2),yt(3,qai,1,1,"ays-virtual-clinic-analysis-time-selection-calendric",3)(4,Yai,1,1,"ays-virtual-clinic-analysis-time-selection-relative",4)(5,Kai,1,0,"ays-virtual-clinic-analysis-time-selection-calendric"),M(),yt(6,Zai,5,2,"div",1),M()),n&2){let o;E(2),vt(r.enableTimeSelectionComparison?2:-1),E(),vt((o=r.timeSelection==null?null:r.timeSelection.type)==="calendric"?3:o==="relative"?4:5),E(3),vt(r.enableTimeSelectionComparison&&r.timeSelectionComparison?6:-1)}},dependencies:[Cpe,bpe,so,da],encapsulation:2})}return t})();var Ar=new Mi("FILTER_REGISTRATION");var x8=new Mi("CubeMapFeatureConfig"),S8=(()=>{let t=class extends Ud{_cubeMapFeatureConfig;_registeredFilter;_permissionService;_httpClient;_api;constructor(e,n,r,o,a,c,m){super(r,c,m),this._cubeMapFeatureConfig=e,this._registeredFilter=n,this._permissionService=o,this._httpClient=a,this._api=new Bue(this.getBaseUrl())}create(e,n){let r=this._api.base();return this._httpClient.post(r,{dashboard:e,changes:n}).pipe(On(o=>Hr(n8.fromObject(o,this._cubeMapFeatureConfig,this._registeredFilter))))}update(e,n){this.deleteCacheForKey(e.id);let r=this._api.base(),o=e.toJSON();console.debug(JSON.stringify(o));let a={dashboard:o,changes:n};return this._httpClient.put(r,a).pipe(ot(()=>null))}children(e){let n=this._api.children(e);return this._httpClient.get(n)}findAll(e,n,r=!0){let o=this._api.base(),a=new Vo;return e&&(a=a.append("minPermission",e)),n&&(a=a.append("maxPermission",n)),a=a.append("includePages",r.toString()),this._httpClient.get(o,{params:a}).pipe(ot(c=>c.map(m=>n8.fromObject(m,this._cubeMapFeatureConfig,this._registeredFilter))),ot(c=>c.map(m=>Hr(m))),On(c=>Ys(c).pipe(P_([]))))}findById(e){return this._findById(e)}_findById(e){let n=this._api.byId(e);return this._httpClient.get(n).pipe(On(r=>Hr(n8.fromObject(r,this._cubeMapFeatureConfig,this._registeredFilter))))}};return t=JNe([Ufe(0,gj(x8)),Ufe(1,gj(Ar)),eFe("design:paramtypes",[Object,Array,Object,Rm,no,xr,Bc])],t),t})();var w8=class{_environmentService;baseUrl;constructor(i){this._environmentService=i,this.baseUrl=this._environmentService.load("AYS_VIRTUAL_CLINIC_ANALYSIS_URL")}availableResultSetOperations(){return`${this.baseUrl}/operating-numbers/result-set-operations/available`}availableGroupBys(){return`${this.baseUrl}/operating-numbers/group-by/available`}availableVirtualClinicOperatingNumbers(){return`${this.baseUrl}/operating-numbers/virtual-clinic-operating-numbers/available`}availableFullyInpatientCaseOperatingNumbers(){return`${this.baseUrl}/operating-numbers/fully-inpatient-case-operating-numbers/available`}groupedOperatingNumbers(){return`${this.baseUrl}/operating-numbers/calculate/grouped`}export(){return`${this.baseUrl}/exports/`}preCalculations(){return`${this.baseUrl}/operating-numbers/precalculations`}};var DB=(()=>{class t{_httpClient;_cache;_api;constructor(e,n,r){this._httpClient=e,this._cache=n,this._api=new w8(r)}availableVirtualClinicOperatingNumbers(){let e=this._api.availableVirtualClinicOperatingNumbers();return this._cache.cacheObservable("availableVirtualClinicOperatingNumbers",this._httpClient.get(e))}availableFullyInpatientCaseOperatingNumbers(){let e=this._api.availableFullyInpatientCaseOperatingNumbers();return this._cache.cacheObservable(e,this._httpClient.get(e))}resolve(e){let n=this._api.groupedOperatingNumbers(),r=Object.keys(e).slice(),o={requests:e};return this._httpClient.post(n,o).pipe(Ac(a=>{let c=this._createErrorResponse(r,"Server Fehler");return a.status===403&&(c=this._createErrorResponse(r,"Keine Berechtigung")),a.status===400&&(c=this._createErrorResponse(r,"Fehlerhafte Anfrage")),$t(c)}))}preCalculation(e){let n=`${this._api.preCalculations()}/${e}/`;return this._httpClient.get(n)}_createErrorResponse(e,n){let r={requests:{}};return e.forEach(o=>{r.requests[o]={statusType:"error",aggregatedValue:null,additionalInformation:null,groupedValues:null,errors:[{text:{de:n}}]}}),r}static \u0275fac=function(n){return new(n||t)(ai(no),ai(Bc),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xpe=class{baseUrl;constructor(i){this.baseUrl=i}virtualClinics(){return`${this.baseUrl}/virtual-clinics/`}virtualClinicById(i){return`${this.baseUrl}/virtual-clinics/${i}/`}specialtyDepartments(i){return`${this.virtualClinicById(i)}specialty-departments/`}specialtyDepartment(i,e){return`${this.specialtyDepartments(i)}${e}/`}leistungsgruppenNrw(){return`${this.baseUrl}/leistungsgruppen/nrw/`}leistungsgruppenKHTG(){return`${this.baseUrl}/leistungsgruppen/khtg/`}fileOfTruth(){return`${this.baseUrl}/intuitive-fot`}address(i){return`${this.virtualClinicById(i)}address`}additionalInfo(i){return`${this.virtualClinicById(i)}additional-info`}annualAccount(i){return`${this.virtualClinicById(i)}annual-account`}caseNumbers(i){return`${this.virtualClinicById(i)}case-number`}fullyInpatientCases(i){return`${this.virtualClinicById(i)}fully-inpatient-cases/paged/`}fullyInpatientCase(i,e){return`${this.virtualClinicById(i)}fully-inpatient-cases/${e}/`}staffing(i){return`${this.virtualClinicById(i)}staffing`}relatedVirtualClinics(i){return`${this.virtualClinicById(i)}related-virtual-clinics`}kostImports(i){return`${this.virtualClinicById(i)}kost-imports`}};var Cc=class extends Ud{_httpClient;_virtualClinicAnalysisService;_postalCodeService;_districtService;_api;constructor(i,e,n,r,o,a,c){super(i,e,n),this._httpClient=r,this._virtualClinicAnalysisService=o,this._postalCodeService=a,this._districtService=c,this._api=new xpe(this.getBaseUrl())}findAll(i,e){let n=this._api.virtualClinics(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(ot(o=>I6.fromObjArr(o)))}findById(i){let e=this._api.virtualClinicById(i);return this._cache.cacheObservable(this.key(i),this._httpClient.get(e).pipe(ot(I6.fromObj),ot(n=>n.clone())))}create(i){let e=this._api.virtualClinics();return this._httpClient.post(e,i).pipe(ot(I6.fromObj))}update(i){this.deleteCacheForKey(i.id);let e=this._api.virtualClinicById(i.id);return this._httpClient.post(e,i).pipe(ot(()=>null))}getSpecialtyDepartments(i,e){let n=this._api.specialtyDepartments(i);return e&&(n=this._api.specialtyDepartment(i,e)),this._httpClient.get(n).pipe(ot(vL.fromObjArr))}khtgLeistungsgruppen(){let i=this._api.leistungsgruppenKHTG();return this._cache.cacheObservable(i,this._httpClient.get(i))}fileOfTruthCategories(){let i=`${this._api.fileOfTruth()}/categories`;return this._cache.cacheObservable("fileOfTruthCategories",this._httpClient.get(i))}fileOfTruthTypeOfEntries(){let i=`${this._api.fileOfTruth()}/type-of-entries`;return this._cache.cacheObservable("fileOfTruthTypeOfEntries",this._httpClient.get(i))}fileOfTruthProcedureSubjects(){let i=`${this._api.fileOfTruth()}/categories/procedure-subjects`;return this._cache.cacheObservable("fileOfTruthProcedureSubjects",this._httpClient.get(i))}fileOfTruthProcedureNames(){let i=`${this._api.fileOfTruth()}/categories/procedure-names`;return this._cache.cacheObservable("fileOfTruthProcedureNames",this._httpClient.get(i))}saveAddress(i,e){let n=this._api.address(i),r=$e(pe({},e),{administrativeDistrictId:e?.administrativeDistrictId?.getNumericValue()});return this._httpClient.post(n,r).pipe(yo(()=>this.deleteCacheForKey(i)),ot(o=>BK.fromObject(o)))}getCaseNumber(i,e,n){let r=this._api.caseNumbers(i);e&&(r=`${this._api.specialtyDepartment(i,e)}case-number`);let o=new Vo;return n&&(o=o.append("year",String(n))),this._httpClient.get(r,{params:o}).pipe(ot(zK.fromObjArr)).toPromise()}saveCaseNumber(i){let e=this._api.caseNumbers(i.virtualClinicId);return this._httpClient.post(e,i).pipe(ot(zK.fromObj)).toPromise()}deleteCaseNumber(i,e){let n=this._api.caseNumbers(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getStaffing(i,e,n){let r=this._api.staffing(i);e&&(r=`${this._api.specialtyDepartment(i,e)}staffing`);let o=new Vo;return n&&(o=o.append("year",String(n))),this._httpClient.get(r,{params:o}).pipe(ot(VK.fromObjArr)).toPromise()}saveStaffing(i){let e=this._api.staffing(i.virtualClinicId);return this._httpClient.post(e,i).pipe(ot(VK.fromObj)).toPromise()}deleteStaffing(i,e){let n=this._api.staffing(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}saveSpecialtyDepartment(i){let e=this._api.specialtyDepartments(i.virtualClinicId);return this._httpClient.post(e,i).pipe(ot(n=>vL.fromObj(n))).toPromise()}deleteSpecialtyDepartment(i,e){let n=this._api.specialtyDepartment(i,e);return this._httpClient.delete(n).toPromise()}getFullyInpatientCases(i,e,n=new Nu){let r=this._api.fullyInpatientCases(i),o={condition:n.toJSON()};return this._httpClient.post(r,o,{params:X4.toHttpParams(e)}).pipe(ot(a=>rE.responseToPage(a,c=>FK.fromObjArr(c))))}getFullyInpatientCase(i,e){let n=this._api.fullyInpatientCase(i,e);return this._httpClient.get(n).pipe(ot(r=>FK.fromObj(r)))}getAnnualAccounts(i,e){let n=this._api.annualAccount(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.get(n,{params:r}).pipe(ot(nde.fromObjArr)).toPromise()}saveAnnualAccount(i){let e=this._api.annualAccount(i.virtualClinicId);return this._httpClient.post(e,i).toPromise()}deleteAnnualAccounts(i,e){let n=this._api.annualAccount(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getAdditionalInfo(i,e){let n=this._api.additionalInfo(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.get(n,{params:r}).pipe(ot(ide.fromObjArr)).toPromise()}saveAdditionalInfo(i){let e=this._api.additionalInfo(i.virtualClinicId);return this._httpClient.post(e,i).toPromise()}deleteAdditionalInfo(i,e){let n=this._api.additionalInfo(i),r=new Vo;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getRelatedVirtualClinics(i){let e=this._api.relatedVirtualClinics(i);return this._httpClient.get(e)}getKoStImports(i){let e=this._api.kostImports(i);return this._httpClient.get(e).pipe(ot(n=>n.map(r=>tde.fromObj(r))))}patientsByAdministrativeDistricts(i,e){let n={type:"VirtualClinicOperatingNumberSingle",virtualClinicId:i,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:n}).pipe(ot(r=>{if(r.requests.REQ.statusType==="error")throw new Error(r.requests.REQ.errors[0].text.de);if(r.requests.REQ.statusType==="warning")throw new Error(r.requests.REQ.warning[0].text.de);return r}),ps(r=>{let o=[],a=[];return r.requests.REQ.groupedValues.forEach(c=>{o.push(c.label.key),c.groupedValues.forEach(m=>{a.push(m.label.key)})}),Ys([this._postalCodeService.findAll(a,"FIRST"),this._districtService.findAll(o.map(c=>io.createFromString(c)))]).pipe(ot(c=>({virtualClinicAnalysisResponse:r,postalCodesMapping:c[0],administrativeDistrictMapping:c[1]})))}),ot(r=>pue.of(r.virtualClinicAnalysisResponse.requests.REQ,r.administrativeDistrictMapping,r.postalCodesMapping)))}};var Jai=t=>["/virtual-clinics",t.id];var esi=()=>!1,kO={detailLinkFnc:Jai,disableFnc:esi,filterFnc:lC,resourceNameTitle:"Virtuelle Klinik",emptyResourcesText:"Keine Virtuellen Kliniken gespeichert",selectOnInit:"first",minPermission:"READ",maxPermission:"CREATOR",resetOption:!1};var AMe=(()=>{class t{virtualClinicId;options=kO;virtualClinicSelect=new ve;resourceName=tn.VIRTUAL_CLINIC;resourceSelect=null;ngOnChanges(e){e.virtualClinicId&&e.virtualClinicId.currentValue&&this.virtualClinicId&&(this.resourceSelect={id:this.virtualClinicId})}onVirtualClinicSelect(e){this.virtualClinicSelect.emit(e?.resource)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-select-inline"]],inputs:{virtualClinicId:"virtualClinicId",options:"options",resourceName:"resourceName"},outputs:{virtualClinicSelect:"virtualClinicSelect"},features:[Yt],decls:1,vars:3,consts:[[3,"resourceSelectChange","resourceSelect","resourceName","config"]],template:function(n,r){n&1&&(O(0,"bd-resources-select-inline-single",0),te("resourceSelectChange",function(a){return r.onVirtualClinicSelect(a)}),M()),n&2&&D("resourceSelect",r.resourceSelect)("resourceName",r.resourceName)("config",r.options)},dependencies:[O1e],encapsulation:2})}return t})();var cit=(()=>{class t{_virtualClinicService;virtualClinicId;selectedSpecialtyDepartmentIds=[];specialtyDepartmentSelect=new ve;config={id:"virtual-clinic-specialty-departments-inline-multiple-select",selectLabel:"Fachabteilungen",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.id,searchOptionAccessor:e=>`${e.fabKey} ${e.name}`,searchOptionDisplayName:e=>e?.name??e.fabKey}};initialSpecialtyDepartments=[];specialtyDepartmentOptions=dl;_newVirtualClinicChange=new Ai;constructor(e){this._virtualClinicService=e}ngOnChanges(e){e.virtualClinicId&&(e.virtualClinicId.currentValue?(this._newVirtualClinicChange.next(e.virtualClinicId.currentValue),this._fetch()):this.specialtyDepartmentOptions=$t([])),e.selectedSpecialtyDepartmentIds&&(this.initialSpecialtyDepartments=this.selectedSpecialtyDepartmentIds.map(n=>new vL(null,n)))}setSpecialtyDepartments(e){this.specialtyDepartmentSelect.emit(e)}_fetch(){this.specialtyDepartmentOptions=LG(Hr(this._virtualClinicService.getSpecialtyDepartments(this.virtualClinicId)),this._newVirtualClinicChange.asObservable()).pipe(On(e=>e instanceof Array?$t(e):$t([])))}sortFnc(e,n){return!!e&&!!n&&e?.name?.localeCompare(n?.name)}static \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-specialty-departments-inline-multiple-select"]],inputs:{virtualClinicId:"virtualClinicId",selectedSpecialtyDepartmentIds:"selectedSpecialtyDepartmentIds"},outputs:{specialtyDepartmentSelect:"specialtyDepartmentSelect"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setSpecialtyDepartments(a)}),M()),n&2&&D("config",r.config)("initialSelection",r.initialSpecialtyDepartments)("selectOptions",r.specialtyDepartmentOptions)},dependencies:[Yo],encapsulation:2})}return t})();var dit=(()=>{class t{virtualClinic;yearSelect=new ve;config={id:"virtual-clinic-structural-select-year",selectLabel:"Jahr",option:{sortFnc:(e,n)=>e-n,uniqueFnc:e=>e.toString(),searchOptionAccessor:e=>e.toString()}};yearOptions=$t([]);initial;ngOnChanges(e){e.virtualClinic&&(e.virtualClinic.currentValue?this._onVirtualClinicChange(e.virtualClinic):(this.initial=null,this.yearOptions=$t([])))}onYearSelect(e){this.initial=e,this.yearSelect.emit(e)}_onVirtualClinicChange(e){if(e.currentValue&&this.virtualClinic.clinicInformation?.dismissalDateRange){let n=this.virtualClinic.clinicInformation.dismissalDateRange.getYears();this.yearOptions=$t(n),this.onYearSelect(this.yearOptions[n.length-1])}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-structural-select-year"]],inputs:{virtualClinic:"virtualClinic"},outputs:{yearSelect:"yearSelect"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onYearSelect(a)}),M()),n&2&&D("config",r.config)("initialSelection",r.initial)("selectOptions",r.yearOptions)},dependencies:[Va],encapsulation:2})}return t})();function tsi(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-specialty-departments-inline-multiple-select",6),te("specialtyDepartmentSelect",function(r){se(e);let o=L(2);return le(o.onSpecialtyDepartmentChange(r))}),M()}if(t&2){let e=L(2);D("virtualClinicId",e.selection.virtualClinic.id)}}function isi(t,i){t&1&&be(0,"p-skeleton",4)}function nsi(t,i){if(t&1&&(O(0,"div",1),yt(1,tsi,1,1,"ays-virtual-clinic-specialty-departments-inline-multiple-select",5)(2,isi,1,0,"p-skeleton",4),M()),t&2){let e=L();E(),vt(e.selection!=null&&e.selection.virtualClinic?1:2)}}function rsi(t,i){if(t&1){let e=qe();O(0,"ays-virtual-clinic-structural-select-year",7),te("yearSelect",function(r){se(e);let o=L();return le(o.onYearChange(r))}),M()}if(t&2){let e=L();D("virtualClinic",e.selection.virtualClinic)}}function osi(t,i){t&1&&be(0,"p-skeleton",4)}var Spe=(()=>{class t{selection;withSpecialtyDepartment=!0;selectionChange=new ve;virtualClinicSelectOptions=$e(pe({},kO),{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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"ays-virtual-clinic-select-inline",2),te("virtualClinicSelect",function(a){return r.onVirtualClinicChange(a)}),M()(),yt(3,nsi,3,1,"div",1),O(4,"div",1),yt(5,rsi,1,1,"ays-virtual-clinic-structural-select-year",3)(6,osi,1,0,"p-skeleton",4),M()()),n&2&&(E(2),D("options",r.virtualClinicSelectOptions),E(),vt(r.withSpecialtyDepartment?3:-1),E(2),vt(r.selection.virtualClinic?5:6))},dependencies:[AMe,cit,dit,cC,kv,rr],encapsulation:2})}return t})();var wpe=class{_baseUrl;_resultUrl;constructor(i,e){this._baseUrl=i,this._resultUrl=e}index(){return`${this._baseUrl}/markets`}byMarketId(i){return`${this.index()}/${i}`}transform(){return`${this._resultUrl}/market/transform`}population(){return`${this._resultUrl}/projection/populations`}detailsTimeSeries(){return`${this._resultUrl}/timeseries/`}};var MO=2024;var zA=class t{id;name;createdDate;modifiedDate;highestPermission;condition;static fromObject(i={},e){let n=i.createdDate?new Date(i.createdDate):null,r=i.modifiedDate?new Date(i.modifiedDate):null,o=Promise.resolve(nb.EMPTY());return i.condition&&(o=Pa.fromConditionJson(i.condition,e)),o.then(a=>new t(i.id,i.name,n,r,i.highestPermission,a))}resourceName=tn.MARKET;constructor(i=null,e=null,n,r,o,a){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o,this.condition=a}equals(i){return gr.equals(this.id,i.id)}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.condition.clone())}toRequestFormat(){return this.condition.toCondition({})?.then(i=>({id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,condition:i}))}},nb=class t extends ky{static TYPES=[{specification:_f.Specification},{specification:ug.Specification},{specification:pf.Specification},{specification:_0.Specification},{specification:y0.Specification},{specification:QL.Specification},{specification:WL.Specification}];static EMPTY(){return new lI([])}constructor(i=t.EMPTY()){super("market-filter",i)}clone(){return new t(this.expression.clone())}overrideClone(i){return new t(this.expression.overrideClone(i))}};var kB={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"},uit={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 Ipe=class t extends ky{static BASE_TYPES=[{specification:_f.Specification},{specification:pf.Specification},{specification:_0.Specification},{specification:y0.Specification},{specification:ug.Specification},{specification:Qv.Specification},{specification:O1.Specification}];static CODING_SYSTEM_TYPES={"ICD-10-GM":[{specification:k1.Specification},{specification:M1.Specification},{specification:DC.Specification}],OPS:[{specification:R1.Specification},{specification:P1.Specification},{specification:MC.Specification},{specification:kC.Specification}],"G-DRG":[{specification:EC.Specification},{specification:D1.Specification},{specification:gf.Specification}]};constructor(i=Pa.EMPTY()){super("projection-analysis-filter",i)}clone(){return new t(this.expression.clone())}overrideClone(i){return new t(this.expression.overrideClone(i))}};var F1=MO;var I8=class t{field;sortOrder;displayTriggerName;displayName;static sort(i,e,n){if(!e&&!n)return 0;let r=0,o=0;if(i.field==="alphabetic")return e.shortDisplayName.localeCompare(n.shortDisplayName);if(r=n.timeSeries[i.field],o=e.timeSeries[i.field],r-o!==0)switch(i.sortOrder){case"desc":return r-o;case"asc":return o-r}if(i.field!=="alphabetic")if(n&&n.shortDisplayName)switch(i.sortOrder){case"desc":return n.shortDisplayName.localeCompare(e.shortDisplayName);case"asc":return e.shortDisplayName.localeCompare(n.shortDisplayName)}else switch(i.sortOrder){case"desc":return n.key.localeCompare(e.key);case"asc":return e.key.localeCompare(n.key)}else return this.sort(new t(i.field,i.sortOrder),e,n)}constructor(i,e,n,r){this.field=i,this.sortOrder=e,this.displayTriggerName=n,this.displayName=r}toString(){return this.field}clone(){return new t(this.field,this.sortOrder,this.displayTriggerName,this.displayName)}};var Tpe=class t{marketIds;groupBy;codingSystem;static defaultGroupBy=[{fieldName:"administrativeDistrictId",sort:new I8(F1.toString(),"desc",`Fallzahlen ${F1}`,`Fallzahlen ${F1}`),parameters:[]}];constructor(i,e,n){this.marketIds=i,this.groupBy=e,this.codingSystem=n}clone(){let i=this.marketIds?this.marketIds.slice():null;return new t(i,JSON.parse(JSON.stringify(this.groupBy)),this.codingSystem)}equals(i){let e=gr.equals(this.codingSystem,i.codingSystem),n=Ni.equals(this.marketIds,i.marketIds),r=Ni.equals(this.groupBy,i.groupBy,(o,a)=>o.fieldName===a.fieldName);return e&&n&&r}isValid(){let i=this.marketIds&&this.marketIds.length>0,e=this.groupBy&&this.groupBy.length>0;return i&&e&&!!this.codingSystem}},Udo=new Tpe([],Tpe.defaultGroupBy,"ICD-10-GM");var T8=class t{groupBy;viewMode;colorFactory;mapboxOptions;static defaultGroupBy={fieldName:"administrativeDistrictId",sort:new I8(F1.toString(),"desc",`Fallzahlen ${F1}`,`Fallzahlen ${F1}`),parameters:[]};static defaultViewMode={name:"10-Jahres-Trend",key:"10years",scope:"trend"};static defaultColorFactory=new y5(new ua("#00ff00"),new ua("#ff0000"));constructor(i,e,n,r){this.groupBy=i,this.viewMode=e,this.colorFactory=n,this.mapboxOptions=r}clone(){return new t(JSON.parse(JSON.stringify(this.groupBy)),this.viewMode,this.colorFactory.clone(),this.mapboxOptions?JSON.parse(JSON.stringify(this.mapboxOptions)):null)}},qdo=new T8(T8.defaultGroupBy,T8.defaultViewMode,T8.defaultColorFactory,null);var pit="peopleCount",asi="peopleChaneRate",Ape=[...Array.from(Array(22).keys()).map(t=>t+1)],Epe=class t{years;static fromObjArr(i){let e=i.map(n=>new DMe(n.year,n.people,n.calculated,n.ageMap));return new t(e)}tBaseYear=null;t20=null;t25=null;t30=null;constructor(i){this.years=i,this.tBaseYear=this._setGrowthRateData(F1.toString()),this.t20=this._setGrowthRateData("2020"),this.t25=this._setGrowthRateData("2025"),this.t30=this._setGrowthRateData("2030")}getYear(i){let e=this.years.filter(n=>n.year===i);return e.length>0?e[0]:null}getChartDataSets(){return[this._getChangeRateDataSet(),this._getRealChartDataSet(),this._getCalculatedChartDataSet()]}getAgeMapChartDataSets(){return Object.keys(kB).map(i=>parseInt(i,10)).map(i=>this._getAgeMapChartDataSet(i))}getLabels(){return this.years.map(i=>i.year)}_setGrowthRateData(i){let e=this.getYear(i),n;return e?n={value:e.people,displayName:e.year}:n={value:null,displayName:i},n}_getCalculatedChartDataSet(){return{data:this._getYears(!0).map(n=>n?n.people:null),label:"Prognose",backgroundColor:"#009179",stack:"1",yAxisID:pit}}_getChangeRateDataSet(){return{type:"line",data:this.years.map((e,n)=>{let r=this.years[n-1];return r?(e.people/r.people-1)*100:null}),label:"\xC4nderungsrate",backgroundColor:"#ffa600",borderColor:"#ffa600",fill:!1,yAxisID:asi}}_getRealChartDataSet(){return{data:this._getYears(!1).map(n=>n?n.people:null),label:"Real",backgroundColor:"#1a5e7d",stack:"1",yAxisID:pit}}_getAgeMapChartDataSet(i){return{data:this.years.map(n=>n.ageMap).map(n=>n[i]||0),label:kB[i],backgroundColor:uit[i],stack:"Stack AgeMap"}}_getYears(i){return this.years.map(e=>e.calculated===i?e:null)}},DMe=class{year;people;calculated;ageMap;constructor(i,e,n,r){this.year=i,this.people=e,this.calculated=n,this.ageMap=r}};var Ap=class extends Ud{_registeredFilter;_httpClient;_api;constructor(i,e,n,r,o){super(i,e,n),this._registeredFilter=r,this._httpClient=o,this._api=new wpe(this.getBaseUrl(),e.load(i.API_TOKENS.RESULT))}findById(i){let e=this._api.byMarketId(i);return this._cache.cacheObservable(this.key(i),this._httpClient.get(e).pipe(On(n=>Hr(zA.fromObject(n,this._registeredFilter))),qc(1)))}findAll(i,e){let n=this._api.index(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(On(o=>Ys(o.map(a=>Hr(zA.fromObject(a,this._registeredFilter)))).pipe(P_([]))))}create(i){let e=this._api.index();return Hr(i.toRequestFormat()).pipe(On(n=>this._httpClient.post(e,n)),On(n=>Hr(zA.fromObject(n,this._registeredFilter))))}update(i){this.deleteCacheForKey(i.id);let e=this._api.byMarketId(i.id);return Hr(i.toRequestFormat()).pipe(On(n=>this._httpClient.put(e,n)))}findByIds(i){let e=i.map(n=>{let r=this._api.byMarketId(n);return this._httpClient.get(r).pipe(On(o=>Hr(zA.fromObject(o,this._registeredFilter))))});return Ys(e)}transform(i,e){let n=this._api.transform(),r={marketIds:i,groupBy:e};return this._httpClient.post(n,r)}detailsTimeSeries(i,e,n,r){let o=this._api.detailsTimeSeries(),a={codingSystem:i,condition:new Nu,baseRate:n,markets:[]};return r&&r.length>0&&a.condition.conditions.push(new H6(r.map(c=>c.fabKey),null)),this.transform([e.id],[{value:"postalCode"}]).pipe(ot(c=>c[e.id]),ot(c=>(a.markets=[{id:e.id,name:e.name,postalCodes:c.map(m=>m.label)}],a)),On(c=>this._httpClient.post(o,c)))}getPopulation(i){let e=this._api.population(),n={market:i};return this._httpClient.post(e,n).pipe(ot(r=>Epe.fromObjArr(r)))}};var ssi=t=>!t,lsi=t=>["/markets",t.id],Dpe={disableFnc:OE,detailLinkFnc:RE,filterFnc:lC,emptyResourcesText:"Keine M\xE4rkte gefunden",resourceNameTitle:"Markt",selectOnInit:"first",resetOption:!0},mit={emptyResourcesText:"Keine M\xE4rkte gefunden",detailLinkFnc:lsi,disableFnc:ssi,filterFnc:lC};var fg=Uint8Array,rb=Uint16Array,NMe=Int32Array,FMe=new fg([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]),LMe=new fg([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]),hit=new fg([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bit=function(t,i){for(var e=new rb(31),n=0;n<31;++n)e[n]=i+=1<>1|(Xc&21845)<<1,UA=(UA&52428)>>2|(UA&13107)<<2,UA=(UA&61680)>>4|(UA&3855)<<4,OMe[Xc]=((UA&65280)>>8|(UA&255)<<8)>>1;var UA,Xc,BQ=function(t,i,e){for(var n=t.length,r=0,o=new rb(i);r>m]=g}else for(c=new rb(n),r=0;r>15-t[r]);return c},MB=new fg(288);for(Xc=0;Xc<144;++Xc)MB[Xc]=8;var Xc;for(Xc=144;Xc<256;++Xc)MB[Xc]=9;var Xc;for(Xc=256;Xc<280;++Xc)MB[Xc]=7;var Xc;for(Xc=280;Xc<288;++Xc)MB[Xc]=8;var Xc,kpe=new fg(32);for(Xc=0;Xc<32;++Xc)kpe[Xc]=5;var Xc,dsi=BQ(MB,9,0);var usi=BQ(kpe,5,0);var Sit=function(t){return(t+7)/8|0},wit=function(t,i,e){return(i==null||i<0)&&(i=0),(e==null||e>t.length)&&(e=t.length),new fg(t.subarray(i,e))};var psi=["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"],Ope=function(t,i,e){var n=new Error(i||psi[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,Ope),!e)throw n;return n};var HA=function(t,i,e){e<<=i&7;var n=i/8|0;t[n]|=e,t[n+1]|=e>>8},FQ=function(t,i,e){e<<=i&7;var n=i/8|0;t[n]|=e,t[n+1]|=e>>8,t[n+2]|=e>>16},kMe=function(t,i){for(var e=[],n=0;nP&&(P=o[n].s);var R=new rb(P+1),z=RMe(e[C-1],R,0);if(z>i){var n=0,H=0,j=z-i,K=1<i)H+=K-(1<>=j;H>0;){var me=o[n].s;R[me]=0&&H;--n){var Te=o[n].s;R[Te]==i&&(--R[Te],++H)}z=i}return{t:new fg(R),l:z}},RMe=function(t,i,e){return t.s==-1?Math.max(RMe(t.l,i,e+1),RMe(t.r,i,e+1)):i[t.s]=e},git=function(t){for(var i=t.length;i&&!t[--i];);for(var e=new rb(++i),n=0,r=t[0],o=1,a=function(m){e[n++]=m},c=1;c<=i;++c)if(t[c]==r&&c!=i)++o;else{if(!r&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(r),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(r);o=1,r=t[c]}return{c:e.subarray(0,n),n:i}},LQ=function(t,i){for(var e=0,n=0;n>8,t[r+2]=t[r]^255,t[r+3]=t[r+1]^255;for(var o=0;o4&&!ke[hit[we-1]];--we);var Rt=g+5<<3,rt=LQ(r,MB)+LQ(o,kpe)+a,Ze=LQ(r,P)+LQ(o,H)+a+14+3*we+LQ(fe,ke)+2*fe[16]+3*fe[17]+7*fe[18];if(m>=0&&Rt<=rt&&Rt<=Ze)return Iit(i,C,t.subarray(m,m+g));var Et,We,bt,st;if(HA(i,C,1+(Ze15&&(HA(i,C,gt[Re]>>5&127),C+=gt[Re]>>12)}}else Et=dsi,We=MB,bt=usi,st=kpe;for(var Re=0;Re255){var ht=li>>18&31;FQ(i,C,Et[ht+257]),C+=We[ht+257],ht>7&&(HA(i,C,li>>23&31),C+=FMe[ht]);var ui=li&31;FQ(i,C,bt[ui]),C+=st[ui],ui>3&&(FQ(i,C,li>>5&8191),C+=LMe[ui])}else FQ(i,C,Et[li]),C+=We[li]}return FQ(i,C,Et[256]),C+We[256]},msi=new NMe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Tit=new fg(0),hsi=function(t,i,e,n,r,o){var a=o.z||t.length,c=new fg(n+a+5*(1+Math.ceil(a/7e3))+r),m=c.subarray(n,c.length-r),g=o.l,C=(o.r||0)&7;if(i){C&&(m[0]=o.r>>3);for(var w=msi[i-1],P=w>>13,R=w&8191,z=(1<7e3||ke>24576)&&(Et>423||!g)){C=_it(t,m,0,Te,Ie,ye,Re,ke,we,Ae-we,C),ke=fe=Re=0,we=Ae;for(var We=0;We<286;++We)Ie[We]=0;for(var We=0;We<30;++We)ye[We]=0}var bt=2,st=0,kt=R,pi=rt-Ze&32767;if(Et>2&&Rt==me(Ae-pi))for(var Kt=Math.min(P,Et)-1,gt=Math.min(32767,Ae),ht=Math.min(258,Et);pi<=gt&&--kt&&rt!=Ze;){if(t[Ae+bt]==t[Ae+bt-pi]){for(var li=0;libt){if(bt=li,st=pi,li>Kt)break;for(var ui=Math.min(pi,li-2),Bi=0,We=0;WeBi&&(Bi=Xn,Ze=wn)}}}rt=Ze,Ze=H[rt],pi+=rt-Ze&32767}if(st){Te[ke++]=268435456|MMe[bt]<<18|fit[st];var Rr=MMe[bt]&31,De=fit[st]&31;Re+=FMe[Rr]+LMe[De],++Ie[257+Rr],++ye[De],Qe=Ae+bt,++fe}else Te[ke++]=t[Ae],++Ie[t[Ae]]}}for(Ae=Math.max(Ae,Qe);Ae=a&&(m[C/8|0]=g,bi=a),C=Iit(m,C+1,t.subarray(Ae,bi))}o.i=a}return wit(c,0,n+Sit(C)+r)},fsi=(function(){for(var t=new Int32Array(256),i=0;i<256;++i){for(var e=i,n=9;--n;)e=(e&1&&-306674912)^e>>>1;t[i]=e}return t})(),gsi=function(){var t=-1;return{p:function(i){for(var e=t,n=0;n>>8;t=e},d:function(){return~t}}};var _si=function(t,i,e,n,r){if(!r&&(r={l:1},i.dictionary)){var o=i.dictionary.subarray(-32768),a=new fg(o.length+t.length);a.set(o),a.set(t,o.length),t=a,r.w=o.length}return hsi(t,i.level==null?6:i.level,i.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+i.mem,e,n,r)},Eit=function(t,i){var e={};for(var n in t)e[n]=t[n];for(var n in i)e[n]=i[n];return e};var hg=function(t,i,e){for(;e;++i)t[i]=e,e>>>=8};function ysi(t,i){return _si(t,i||{},0,0)}var Ait=function(t,i,e,n){for(var r in t){var o=t[r],a=i+r,c=n;Array.isArray(o)&&(c=Eit(n,o[1]),o=o[0]),o instanceof fg?e[a]=[o,c]:(e[a+="/"]=[new fg(0),c],Ait(o,a,e,n))}},yit=typeof TextEncoder<"u"&&new TextEncoder,vsi=typeof TextDecoder<"u"&&new TextDecoder,bsi=0;try{vsi.decode(Tit,{stream:!0}),bsi=1}catch{}function Mpe(t,i){if(i){for(var e=new fg(t.length),n=0;n>1)),a=0,c=function(C){o[a++]=C},n=0;no.length){var m=new fg(a+8+(r-n<<1));m.set(o),o=m}var g=t.charCodeAt(n);g<128||i?c(g):g<2048?(c(192|g>>6),c(128|g&63)):g>55295&&g<57344?(g=65536+(g&1047552)|t.charCodeAt(++n)&1023,c(240|g>>18),c(128|g>>12&63),c(128|g>>6&63),c(128|g&63)):(c(224|g>>12),c(128|g>>6&63),c(128|g&63))}return wit(o,0,a)}var PMe=function(t){var i=0;if(t)for(var e in t){var n=t[e].length;n>65535&&Ope(9),i+=n+4}return i},vit=function(t,i,e,n,r,o,a,c){var m=n.length,g=e.extra,C=c&&c.length,w=PMe(g);hg(t,i,a!=null?33639248:67324752),i+=4,a!=null&&(t[i++]=20,t[i++]=e.os),t[i]=20,i+=2,t[i++]=e.flag<<1|(o<0&&8),t[i++]=r&&8,t[i++]=e.compression&255,t[i++]=e.compression>>8;var P=new Date(e.mtime==null?Date.now():e.mtime),R=P.getFullYear()-1980;if((R<0||R>119)&&Ope(10),hg(t,i,R<<25|P.getMonth()+1<<21|P.getDate()<<16|P.getHours()<<11|P.getMinutes()<<5|P.getSeconds()>>1),i+=4,o!=-1&&(hg(t,i,e.crc),hg(t,i+4,o<0?-o-2:o),hg(t,i+8,e.size)),hg(t,i+12,m),hg(t,i+14,w),i+=16,a!=null&&(hg(t,i,C),hg(t,i+6,e.attrs),hg(t,i+10,a),i+=14),t.set(n,i),i+=m,w)for(var z in g){var H=g[z],j=H.length;hg(t,i,+z),hg(t,i+2,j),t.set(H,i+4),i+=4+j}return C&&(t.set(c,i),i+=C),i},Csi=function(t,i,e,n,r){hg(t,i,101010256),hg(t,i+8,e),hg(t,i+10,e),hg(t,i+12,n),hg(t,i+16,r)};function Dit(t,i){i||(i={});var e={},n=[];Ait(t,"",e,i);var r=0,o=0;for(var a in e){var c=e[a],m=c[0],g=c[1],C=g.level==0?0:8,w=Mpe(a),P=w.length,R=g.comment,z=R&&Mpe(R),H=z&&z.length,j=PMe(g.extra);P>65535&&Ope(11);var K=C?ysi(m,g):m,ne=K.length,me=gsi();me.p(m),n.push(Eit(g,{size:m.length,crc:me.d(),c:K,f:w,m:z,u:P!=a.length||z&&R.length!=H,o:r,compression:C})),r+=30+P+j+ne,o+=76+2*(P+j)+(H||0)+ne}for(var Te=new fg(o+22),Ie=r,ye=o-r,fe=0;fe{class t extends Xo{ref;_cdr;selection=new Jf(!0,[],!0,(e,n)=>gr.equals(e,n,()=>e.value===n.value));selectionCopy=[];csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Landkreis",displayName:"Landkreis",validationFnc:e=>n_.isNumber(e)}]};constructor(e,n,r){super(),this.ref=n,this._cdr=r,this._subs.push(this.selection.changed.subscribe(o=>{this.selectionCopy=[...o.source.selected.map(a=>a.clone())],this._cdr.markForCheck()})),e&&e.data&&e.data.administrativeDistrictIds&&e.data.administrativeDistrictIds.length>0&&this.selection.setSelection(...e.data.administrativeDistrictIds.map(o=>o.clone()))}ngOnDestroy(){this.unsubscribeAll()}onSelectedAdministrativeDistrictsChange(e){let n=[...e.map(r=>r.clone())];Ni.equals(this.selection.selected,n,(r,o)=>gr.equals(r,o,()=>r.value===o.value))||this.selection.setSelection(...n)}onAddAdministrativeDistrict(e){this.selection.select(e.id)}onCsvImport(e){this.selection.select(...e.data.map(n=>n[0]).map(n=>io.createFromString(n)))}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El),xe(dn))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Tt],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 suchen",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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-administrative-district-ids-map-selection",2),te("selectedAdministrativeDistrictsChange",function(a){return r.onSelectedAdministrativeDistrictsChange(a)}),M()(),O(4,"div",1)(5,"div")(6,"div")(7,"div",3)(8,"div",1)(9,"div")(10,"bd-administrative-district-autocomplete",4),te("administrativeDistrictSelect",function(a){return r.onAddAdministrativeDistrict(a)}),M()()(),O(11,"div")(12,"bd-csv-import-file-button",5),te("inputChange",function(a){return r.onCsvImport(a)}),M()()()(),O(13,"div")(14,"bd-maps-administrative-district-ids-list",6),te("administrativeDistrictIdsChange",function(a){return r.onSelectedAdministrativeDistrictsChange(a)}),M()()()()()(),O(15,"div",7)(16,"button",8),te("click",function(){return r.ref.close()}),ee(17,"Abbrechen"),M(),O(18,"button",9),te("click",function(){return r.ref.close(r.selectionCopy)}),ee(19," \xDCbernehmen "),M()()),n&2&&(E(3),D("selectedAdministrativeDistrictIds",r.selectionCopy),E(9),D("config",r.csvImportConfig),E(2),D("administrativeDistrictIds",r.selectionCopy))},dependencies:[CMe,Hke,v6,NA,so,Kr],encapsulation:2})}return t})();var Ssi=["*"];function wsi(t,i){t&1&&Sn(0)}var BMe=(()=>{class t{_elementRef=ae(qn);constructor(){}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}return t})(),VMe=(()=>{class t{template=ae(Bl);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","cdkStepLabel",""]]})}return t})();var OB={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},Isi=new Mi("STEPPER_GLOBAL_OPTIONS"),Rpe=(()=>{class t{_stepperOptions;_stepper=ae(VQ);_displayDefaultIndicatorType;stepLabel;_childForms;content;stepControl;get interacted(){return this._interacted()}set interacted(e){this._interacted.set(e)}_interacted=hr(!1);interactedStream=new ve;label;errorMessage;ariaLabel;ariaLabelledby;get state(){return this._state()}set state(e){this._state.set(e)}_state=hr(void 0);get editable(){return this._editable()}set editable(e){this._editable.set(e)}_editable=hr(!0);optional=!1;get completed(){let e=this._completedOverride(),n=this._interacted();return e??(n&&(!this.stepControl||this.stepControl.valid))}set completed(e){this._completedOverride.set(e)}_completedOverride=hr(null);index=hr(-1);isSelected=Or(()=>this._stepper.selectedIndex===this.index());indicatorType=Or(()=>{let e=this.isSelected(),n=this.completed,r=this._state()??OB.NUMBER,o=this._editable();return this._showError()&&this.hasError&&!e?OB.ERROR:this._displayDefaultIndicatorType?!n||e?OB.NUMBER:o?OB.EDIT:OB.DONE:n&&!e?OB.DONE:n&&e?r:o&&e?OB.EDIT:r});isNavigable=Or(()=>{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=hr(null);_getDefaultError(){return this.interacted&&!!this.stepControl?.invalid}constructor(){let e=ae(Isi,{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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["cdk-step"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,VMe,5),Vt(o,Fx,5)),n&2){let a;ze(a=Ue())&&(r.stepLabel=a.first),ze(a=Ue())&&(r._childForms=a)}},viewQuery:function(n,r){if(n&1&&Xi(Bl,7),n&2){let o;ze(o=Ue())&&(r.content=o.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:[Yt],ngContentSelectors:Ssi,decls:1,vars:0,template:function(n,r){n&1&&(Kn(),VT(0,wsi,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return t})(),VQ=(()=>{class t{_dir=ae(Du,{optional:!0});_changeDetectorRef=ae(dn);_elementRef=ae(qn);_destroyed=new Ai;_keyManager;_steps;steps=new Uf;_stepHeader;_sortedHeaders=new Uf;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=hr(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=ae(Tl).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(ks(this._steps),ha(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(n=>n._stepper===this)),this.steps.forEach((n,r)=>n.index.set(r)),this.steps.notifyOnChanges()})}ngAfterViewInit(){if(this._stepHeader.changes.pipe(ks(this._stepHeader),ha(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((n,r)=>n._elementRef.nativeElement.compareDocumentPosition(r._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new ew(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),this._keyManager.updateActiveItem(this.selectedIndex),(this._dir?this._dir.change:$t()).pipe(ks(this._layoutDirection()),ha(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 n of e)n._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 n=e-this._selectedIndex();return n<0?this._layoutDirection()==="rtl"?"next":"previous":n>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex()}_updateSelectedItemIndex(e){let n=this.steps.toArray(),r=this._selectedIndex();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:r,selectedStep:n[e],previouslySelectedStep:n[r]}),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 n=Au(e),r=e.keyCode,o=this._keyManager;o?.activeItemIndex!=null&&!n&&(r===32||r===13)?(this.selectedIndex=o.activeItemIndex,e.preventDefault()):o?.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(n=>{let r=n.stepControl;return(r?r.invalid||r.pending||!n.interacted:!n.completed)&&!n.optional&&!n._completedOverride()}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,n=Rk();return e===n||e.contains(n)}_isValidIndex(e){return e>-1&&(!this.steps||e{class t{_stepper=ae(VQ);type="submit";constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(n,r){n&1&&te("click",function(){return r._stepper.next()}),n&2&&sa("type",r.type)},inputs:{type:"type"}})}return t})();var Tsi=(t,i,e)=>({index:t,active:i,optional:e});function Esi(t,i){if(t&1&&Li(0,2),t&2){let e=L();D("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",Qu(2,Tsi,e.index,e.active,e.optional))}}function Asi(t,i){if(t&1&&(O(0,"span",7),ee(1),M()),t&2){let e=L(2);E(),Pt(e._getDefaultTextForState(e.state))}}function Dsi(t,i){if(t&1&&(O(0,"span",8),ee(1),M()),t&2){let e=L(3);E(),Pt(e._intl.completedLabel)}}function ksi(t,i){if(t&1&&(O(0,"span",8),ee(1),M()),t&2){let e=L(3);E(),Pt(e._intl.editableLabel)}}function Msi(t,i){if(t&1&&(yt(0,Dsi,2,1,"span",8)(1,ksi,2,1,"span",8),O(2,"mat-icon",7),ee(3),M()),t&2){let e=L(2);vt(e.state==="done"?0:e.state==="edit"?1:-1),E(3),Pt(e._getDefaultTextForState(e.state))}}function Osi(t,i){if(t&1&&yt(0,Asi,2,1,"span",7)(1,Msi,4,2),t&2){let e,n=L();vt((e=n.state)==="number"?0:1)}}function Rsi(t,i){t&1&&(O(0,"div",4),Li(1,9),M()),t&2&&(E(),D("ngTemplateOutlet",i.template))}function Psi(t,i){if(t&1&&(O(0,"div",4),ee(1),M()),t&2){let e=L();E(),Pt(e.label)}}function Nsi(t,i){if(t&1&&(O(0,"div",5),ee(1),M()),t&2){let e=L();E(),Pt(e._intl.optionalLabel)}}function Fsi(t,i){if(t&1&&(O(0,"div",6),ee(1),M()),t&2){let e=L();E(),Pt(e.errorMessage)}}var Rit=["*"];function Lsi(t,i){}function Bsi(t,i){if(t&1&&(Sn(0),ie(1,Lsi,0,0,"ng-template",0)),t&2){let e=L();E(),D("cdkPortalOutlet",e._portal)}}var Vsi=["animatedContainer"],Pit=t=>({step:t});function zsi(t,i){t&1&&Sn(0)}function Usi(t,i){t&1&&be(0,"div",7)}function Hsi(t,i){if(t&1&&(Li(0,6),yt(1,Usi,1,0,"div",7)),t&2){let e=i.$implicit,n=i.$index,r=i.$count;L(2);let o=Oi(4);D("ngTemplateOutlet",o)("ngTemplateOutletContext",Yi(3,Pit,e)),E(),vt(n!==r-1?1:-1)}}function Gsi(t,i){if(t&1&&(O(0,"div",8,1),Li(2,9),M()),t&2){let e=i.$implicit,n=i.$index,r=L(2);Pe("mat-horizontal-stepper-content-"+r._getAnimationDirection(n)),D("id",r._getStepContentId(n)),lt("aria-labelledby",r._getStepLabelId(n))("inert",r.selectedIndex===n?null:""),E(2),D("ngTemplateOutlet",e.content)}}function jsi(t,i){if(t&1&&(O(0,"div",2)(1,"div",3),Qo(2,Hsi,2,5,null,null,ms),M(),O(4,"div",4),Qo(5,Gsi,3,6,"div",5,ms),M()()),t&2){let e=L();E(2),Zo(e.steps),E(3),Zo(e.steps)}}function $si(t,i){if(t&1&&(O(0,"div",10),Li(1,6),O(2,"div",11,1)(4,"div",12)(5,"div",13),Li(6,9),M()()()()),t&2){let e=i.$implicit,n=i.$index,r=i.$index,o=i.$count,a=L(2),c=Oi(4);E(),D("ngTemplateOutlet",c)("ngTemplateOutletContext",Yi(10,Pit,e)),E(),zn("mat-stepper-vertical-line",r!==o-1)("mat-vertical-content-container-active",a.selectedIndex===n),lt("inert",a.selectedIndex===n?null:""),E(2),D("id",a._getStepContentId(n)),lt("aria-labelledby",a._getStepLabelId(n)),E(2),D("ngTemplateOutlet",e.content)}}function qsi(t,i){if(t&1&&Qo(0,$si,7,12,"div",10,ms),t&2){let e=L();Zo(e.steps)}}function Ysi(t,i){if(t&1){let e=qe();O(0,"mat-step-header",14),te("click",function(){let r=se(e).step;return le(r.select())})("keydown",function(r){se(e);let o=L();return le(o._onKeydown(r))}),M()}if(t&2){let e=i.step,n=L();zn("mat-horizontal-stepper-header",n.orientation==="horizontal")("mat-vertical-stepper-header",n.orientation==="vertical"),D("tabIndex",n._getFocusIndex()===e.index()?0:-1)("id",n._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",n._iconOverrides)("disableRipple",n.disableRipple||!e.isNavigable())("color",e.color||n.color),lt("aria-posinset",e.index()+1)("aria-setsize",n.steps.length)("aria-controls",n._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 zMe=(()=>{class t extends VMe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["","matStepLabel",""]],features:[Tt]})}return t})(),Ksi=(()=>{class t{changes=new Ai;optionalLabel="Optional";completedLabel="Completed";editableLabel="Editable";static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Oit=(()=>{class t extends BMe{_intl=ae(Ksi);_focusMonitor=ae(wm);_intlSubscription;state;label;errorMessage;iconOverrides;index;selected;active;optional;disableRipple;color;constructor(){super();let e=ae(pc);e.load(gp),e.load(Nk);let n=ae(dn);this._intlSubscription=this._intl.changes.subscribe(()=>n.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,n){e?this._focusMonitor.focusVia(this._elementRef,e,n):this._elementRef.nativeElement.focus(n)}_stringLabel(){return this.label instanceof zMe?null:this.label}_templateLabel(){return this.label instanceof zMe?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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:4,hostBindings:function(n,r){n&2&&(Pe("mat-"+(r.color||"primary")),zn("mat-step-header-empty-label",r._hasEmptyLabel()))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},features:[Tt],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(n,r){if(n&1&&(be(0,"div",0),O(1,"div")(2,"div",1),yt(3,Esi,1,6,"ng-container",2)(4,Osi,2,1),M()(),O(5,"div",3),yt(6,Rsi,2,1,"div",4)(7,Psi,2,1,"div",4),yt(8,Nsi,2,1,"div",5),yt(9,Fsi,2,1,"div",6),M()),n&2){let o;D("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disableRipple),E(),Pe(Oj("mat-step-icon-state-",r.state," mat-step-icon")),zn("mat-step-icon-selected",r.selected),E(2),vt(r.iconOverrides&&r.iconOverrides[r.state]?3:4),E(2),zn("mat-step-label-active",r.active)("mat-step-label-selected",r.selected)("mat-step-label-error",r.state=="error"),E(),vt((o=r._templateLabel())?6:r._stringLabel()?7:-1,o),E(2),vt(r._hasOptionalLabel()?8:-1),E(),vt(r._hasErrorLabel()?9:-1)}},dependencies:[Wh,Jr,zr],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})(),Wsi=(()=>{class t{templateRef=ae(Bl);name;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:[0,"matStepperIcon","name"]}})}return t})(),Qsi=(()=>{class t{_template=ae(Bl);constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["ng-template","matStepContent",""]]})}return t})(),zQ=(()=>{class t extends Rpe{_errorStateMatcher=ae(LP,{skipSelf:!0});_viewContainerRef=ae($l);_isSelected=Ia.EMPTY;stepLabel=void 0;color;_lazyContent;_portal;ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(On(()=>this._stepper.selectionChange.pipe(ot(e=>e.selectedStep===this),ks(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new Yh(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,n){let r=this._errorStateMatcher.isErrorState(e,n),o=!!(e&&e.invalid&&this.interacted);return r||o}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["mat-step"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,zMe,5),Vt(o,Qsi,5)),n&2){let a;ze(a=Ue())&&(r.stepLabel=a.first),ze(a=Ue())&&(r._lazyContent=a.first)}},hostAttrs:["hidden",""],inputs:{color:"color"},exportAs:["matStep"],features:[Ii([{provide:LP,useExisting:t},{provide:Rpe,useExisting:t}]),Tt],ngContentSelectors:Rit,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(n,r){n&1&&(Kn(),ie(0,Bsi,2,1,"ng-template"))},dependencies:[Gp],encapsulation:2,changeDetection:0})}return t})(),Ppe=(()=>{class t extends VQ{_ngZone=ae(Pn);_renderer=ae(Ma);_animationsDisabled=tl();_cleanupTransition;_isAnimating=hr(!1);_stepHeader=void 0;_animatedContainers;_steps=void 0;steps=new Uf;_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=!ae(_s).isBrowser;constructor(){super();let n=ae(qn).nativeElement.nodeName.toLowerCase();this.orientation=n==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:n})=>this._iconOverrides[e]=n),this.steps.changes.pipe(ha(this._destroyed)).subscribe(()=>this._stateChanged()),this.selectedIndexChange.pipe(ha(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(ks(null),ha(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 n=e.target;if(!n)return;let r=this.orientation==="horizontal"&&e.propertyName==="transform"&&n.classList.contains("mat-horizontal-stepper-content-current"),o=this.orientation==="vertical"&&e.propertyName==="grid-template-rows"&&n.classList.contains("mat-vertical-content-container-active");(r||o)&&this._animatedContainers.find(c=>c.nativeElement===n)&&this._onAnimationDone()};_onAnimationDone(){this._isAnimating.set(!1),this.animationDone.emit()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,zQ,5),Vt(o,Wsi,5)),n&2){let a;ze(a=Ue())&&(r._steps=a),ze(a=Ue())&&(r._icons=a)}},viewQuery:function(n,r){if(n&1&&(Xi(Oit,5),Xi(Vsi,5)),n&2){let o;ze(o=Ue())&&(r._stepHeader=o),ze(o=Ue())&&(r._animatedContainers=o)}},hostAttrs:["role","tablist"],hostVars:15,hostBindings:function(n,r){n&2&&(lt("aria-orientation",r.orientation),la("--mat-stepper-animation-duration",r._getAnimationDuration()),zn("mat-stepper-horizontal",r.orientation==="horizontal")("mat-stepper-vertical",r.orientation==="vertical")("mat-stepper-label-position-end",r.orientation==="horizontal"&&r.labelPosition=="end")("mat-stepper-label-position-bottom",r.orientation==="horizontal"&&r.labelPosition=="bottom")("mat-stepper-header-position-bottom",r.headerPosition==="bottom")("mat-stepper-animating",r._isAnimating()))},inputs:{disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[Ii([{provide:VQ,useExisting:t}]),Tt],ngContentSelectors:Rit,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(n,r){if(n&1&&(Kn(),yt(0,zsi,1,0),yt(1,jsi,7,0,"div",2)(2,qsi,2,0),ie(3,Ysi,1,23,"ng-template",null,0,di)),n&2){let o;vt(r._isServer?0:-1),E(),vt((o=r.orientation)==="horizontal"?1:o==="vertical"?2:-1)}},dependencies:[Jr,Oit],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})(),Npe=(()=>{class t extends Mit{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275dir=hn({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(n,r){n&2&&sa("type",r.type)},features:[Tt]})}return t})();var Nit=mp(Lw());var Zsi=()=>({"min-width":"50rem"}),Xsi=()=>[5,10,20];function Jsi(t,i){t&1&&(O(0,"div",13)(1,"div",14),be(2,"p-skeleton"),M(),O(3,"div",14),be(4,"p-skeleton"),M()())}function eli(t,i){t&1&&(O(0,"tr")(1,"th",21),be(2,"p-tableHeaderCheckbox"),M(),O(3,"th"),ee(4,"Landkreis"),M(),O(5,"th",22),ee(6,"Anzahl F\xE4lle (Anteil)"),M()())}function tli(t,i){if(t&1&&(O(0,"tr")(1,"td"),be(2,"p-tableCheckbox",23),M(),O(3,"td"),ee(4),Dr(5,"administrativeDistrict"),Dr(6,"async"),M(),O(7,"td",22),ee(8),Dr(9,"number"),Dr(10,"percent"),M()()),t&2){let e,n=i.$implicit,r=L(2);E(2),D("value",n),E(2),gn(" ",(e=ca(6,6,ca(5,4,n)))==null?null:e.displayName()," "),E(4),Pd(" ",ca(9,8,r.patientDistributionById(n).count)," (",ca(10,10,r.patientDistributionById(n).percentage),") ")}}function ili(t,i){if(t&1){let e=qe();O(0,"div",13)(1,"div",14)(2,"div",15)(3,"bd-map",16),te("mapLoaded",function(r){se(e);let o=L();return le(o.onMapLoaded(r))})("mapClick",function(r){se(e);let o=L();return le(o.onMapClick(r))}),M(),be(4,"bd-map-legend",17),M()(),O(5,"div",14)(6,"p-table",18),te("selectionChange",function(r){se(e);let o=L();return le(o.onSelectedAdministrativeDistrictsChange(r))}),ie(7,eli,7,0,"ng-template",19)(8,tli,11,12,"ng-template",20),M()()()}if(t&2){let e=L();E(3),D("mapOptions",e.mapOptions),E(),D("controller",e.mapController),E(2),D("value",e.administrativeDistrictIds)("tableStyle",Vr(8,Zsi))("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(9,Xsi))("selection",e.selectionCopy)}}var Fit=(()=>{class t{ref;_cdr;_virtualClinicService;_districtService;mapOptions=$e(pe({},rg),{style:"mapbox://styles/mapbox/light-v11"});loading$=new hi(1);virtualClinicAddress;virtualClinicSelectionCtrl=new ho(null,La.required);administrativeDistrictIds=[];map;mapController=new vh;colorFactory=new rC(new ua("hsl(120, 100%, 50%)"));selection=new Jf(!0,[],!0,(e,n)=>gr.equals(e,n,()=>e.value===n.value));selectionCopy=[];_patientDistribution;_districtLayer;_selectionLayer=new d8("selection",{layerId:uC.id,highlightLayerId:V5.id,sourceId:n1,displayName:"Auswahl"});constructor(e,n,r,o){this.ref=e,this._cdr=n,this._virtualClinicService=r,this._districtService=o;let a=new s8;a.displayName="Anzahl Patienten pro Landkreis",this._districtLayer=new l8("districts",a,this._districtService),this._districtLayer.colorFactory$.next(this.colorFactory),this.mapController.registerLayer(this._districtLayer),this.mapController.registerLayer(this._selectionLayer),this.selection.changed.subscribe(c=>{this._selectionLayer.selection.setSelection(...c.source.selected),this.selectionCopy=[...c.source.selected.map(m=>m.clone())]}),this._selectionLayer.selection.changed.subscribe(c=>{this.onSelectedAdministrativeDistrictsChange(c.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 n=[...e.map(r=>r.clone())];Ni.equals(this.selection.selected,n,(r,o)=>gr.equals(r,o,()=>r.value===o.value))||(this.selection.setSelection(...n),this._cdr.markForCheck())}_applyAddressMarker(){if(this.virtualClinicAddress){let e={lng:this.virtualClinicAddress.location[0],lat:this.virtualClinicAddress.location[1]};this.map.setCenter(e),new Nit.Marker({color:"black"}).setLngLat(e).addTo(this.map)}}_onVirtualClinicSelect(e){e.virtualClinic.address&&e.virtualClinic.address.location?this.virtualClinicAddress=new Bu(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(ni.INIT)}_setPatientsByAdministrativeDistricts(e){this.loading$.next(ni.LOADING),this._virtualClinicService.patientsByAdministrativeDistricts(e.virtualClinic.id,new py([e.year],null)).subscribe({next:n=>{this._patientDistribution=n,this.administrativeDistrictIds=n.data.map(o=>io.create(o.adId));let r={};Object.keys(this._patientDistribution.patientCount).map(o=>{let a=io.createFromString(o);r[a.value]=this._patientDistribution.patientCount[a.getNumericValue()].count}),this._districtLayer.data$.next(r),this.loading$.next(ni.SUCCESS)},error:n=>{console.error(n),this.loading$.next(ni.ERROR)}})}static \u0275fac=function(n){return new(n||t)(xe(El),xe(dn),xe(Cc),xe(ib))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Ii([GT,V_])],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(n,r){if(n&1){let o=qe();O(0,"div")(1,"mat-horizontal-stepper",2),te("selectionChange",function(c){return se(o),le(r.onStepChange(c))}),O(2,"mat-step",3)(3,"div",4)(4,"ays-virtual-clinic-structural-select",5),te("selectionChange",function(c){return se(o),le(r.onVirtualClinicSelectionChange(c))}),M()(),O(5,"div",6)(6,"button",7),ee(7," Landkreise ausw\xE4hlen "),M(),O(8,"button",8),te("click",function(){return se(o),le(r.ref.close())}),ee(9,"Abbrechen"),M()()(),O(10,"mat-step",9)(11,"div",10),be(12,"bd-loader",11),O(13,"div",6)(14,"button",12),te("click",function(){return se(o),le(r.ref.close(r.selectionCopy))}),ee(15," \xDCbernehmen "),M(),O(16,"button",8),te("click",function(){return se(o),le(r.ref.close())}),ee(17,"Abbrechen"),M()()(),ie(18,Jsi,5,0,"ng-template",null,0,di)(20,ili,9,10,"ng-template",null,1,di),M()()()}if(n&2){let o=Oi(19),a=Oi(21);E(),D("linear",!0),E(),D("stepControl",r.virtualClinicSelectionCtrl),E(2),D("withSpecialtyDepartment",!1),E(2),D("disabled",r.virtualClinicSelectionCtrl.invalid),E(6),D("loadItem",r.loading$)("successTemplate",a)("customLoadingTemplate",o)}},dependencies:[Ppe,zQ,oa,Spe,Npe,Kr,Td,rc,Tr,Mw,Ow,fr,cC,kv,Ah,b0,GT,V_,xI,Dc],styles:[".map-wrapper[_ngcontent-%COMP%]{position:relative;height:100%}"]})}return t})();var Lit=(()=>{class t{_dialogService;plugin;pluginValid;pluginChange=new ve;menuItems=[{label:"Von virtueller Klinik importieren",command:()=>this.openVirtualClinicImportDialog()}];administrativeDistrictIds=[];constructor(e){this._dialogService=e}ngOnInit(){this.administrativeDistrictIds=this.plugin.toValue()??[]}openEditDialog(){let e=$e(pe({},Ul),{header:"Landkreise ausw\xE4hlen",data:{administrativeDistrictIds:this.administrativeDistrictIds.slice()}});this._dialogService.open(kit,e).onClose.pipe(ar(1),vn(n=>!!n&&n.length>0)).subscribe(n=>this.onAdministrativeDistrictIdsChange(n))}openVirtualClinicImportDialog(){let e=$e(pe({},Ul),{header:"Landkreise von Virtueller Klinik importieren"});this._dialogService.open(Fit,e).onClose.pipe(ar(1)).subscribe(r=>{r&&r.length>0&&this.onAdministrativeDistrictIdsChange(r)})}onAdministrativeDistrictIdsChange(e){this.administrativeDistrictIds=[...e.map(n=>n.clone())],this.pluginChange.emit(new pf(e))}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-administrative-district-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],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(n,r){n&1&&(O(0,"bd-maps-administrative-district-ids-list",0),te("administrativeDistrictIdsChange",function(a){return r.onAdministrativeDistrictIdsChange(a)}),M(),O(1,"div",1)(2,"p-split-button",2),te("onClick",function(){return r.openEditDialog()}),M()()),n&2&&(D("administrativeDistrictIds",r.administrativeDistrictIds),E(2),D("model",r.menuItems)("outlined",!0))},dependencies:[NA,lL],encapsulation:2})}return t})();function nli(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var Bit=(()=>{class t extends Xo{_cdr;_dialogService;_statesService;_administrativeRegionService;plugin;pluginValid=!0;pluginChange=new ve;selection=[];displayText="";constructor(e,n,r,o){super(),this._cdr=e,this._dialogService=n,this._statesService=r,this._administrativeRegionService=o}ngOnChanges(e){e.plugin&&this._updateSelection(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Regierungsbezirke bearbeiten",data:{selection:this.selection,stateOptions$:r=>this._statesService.findAdministrativeRegionIds(r),displayName$:r=>this._administrativeRegionService.findOne(r).pipe(ot(o=>o.name))}});this._subs.push(this._dialogService.open(ape,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this._updateSelection(r?.selection),this.pluginChange.emit(this.plugin.clone())}))}_updateSelection(e){this.plugin=new _0(e),this.selection=[...e],this.displayText=this.plugin.toText(),this._cdr.markForCheck()}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(To),xe(spe),xe(xMe))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-administrative-region-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Tt,Yt],decls:5,vars:4,consts:[["matInput","","placeholder","Regierungsbezirke",3,"click","value"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.edit(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,nli,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayText),E(3),vt(r.pluginValid?-1:4))},dependencies:[hc,zs,Oa,yp,km,da,zr],encapsulation:2,changeDetection:0})}return t})();var Vit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Aufnahmearten 1",option:{sortFnc:(e,n)=>e.admissionType1.toString().localeCompare(n.admissionType1.toString()),uniqueFnc:e=>e.admissionType1.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};admissionType1Options=$t(Object.keys(Hce).map(e=>({displayName:Hce[e],admissionType1:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({admissionType1:e,displayName:Hce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setAdmissionTypes1(e){this.pluginChange.emit(new gK([...e.map(n=>n.admissionType1)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-admission-type-1"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setAdmissionTypes1(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.admissionType1Options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var zit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Aufnahmearten 2",option:{sortFnc:(e,n)=>e.admissionTypes2.localeCompare(n.admissionTypes2),uniqueFnc:e=>e.admissionTypes2,searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};admissionType2Options=$t(Object.keys(Gce).map(e=>({displayName:Gce[e],admissionTypes2:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({admissionTypes2:e,displayName:Gce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setAdmissionTypes2(e){this.pluginChange.emit(new yK([...e.map(n=>n.admissionTypes2)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-admission-type-2"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setAdmissionTypes2(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.admissionType2Options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Uit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Entlassarten",option:{sortFnc:(e,n)=>e.dismissalType.toString().localeCompare(n.dismissalType.toString()),uniqueFnc:e=>e.dismissalType.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};dismissalTypeOptions=$t(Object.keys(jce).map(e=>({displayName:jce[e],dismissalType:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({dismissalType:e,displayName:jce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setDismissalTypes(e){this.pluginChange.emit(new bK([...e.map(n=>n.dismissalType)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-dismissal-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setDismissalTypes(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.dismissalTypeOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Hit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Fondsrelevanz",option:{sortFnc:(e,n)=>e.fondsrelevanz.localeCompare(n.fondsrelevanz),uniqueFnc:e=>e.fondsrelevanz,searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};fondsrelevanzOptions=$t(Object.keys($ce).map(e=>({displayName:$ce[e],fondsrelevanz:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({fondsrelevanz:e,displayName:$ce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setFondsrelevanz(e){this.pluginChange.emit(new hK([...e.map(n=>n.fondsrelevanz)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-fondsrelevanz"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setFondsrelevanz(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.fondsrelevanzOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Git=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"SAPS3: Chirurgischer Status",option:{sortFnc:(e,n)=>e.value.toString().localeCompare(n.value.toString()),uniqueFnc:e=>e.value.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};options=$t(Object.keys(qce).map(e=>({displayName:qce[e],value:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({value:e,displayName:qce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setSelection(e){this.pluginChange.emit(new xK([...e.map(n=>n.value)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-saps3-chirurgischer-status"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setSelection(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var jit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"SAPS3: Zutransferierung",option:{sortFnc:(e,n)=>e.value.toString().localeCompare(n.value.toString()),uniqueFnc:e=>e.value.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};options=$t(Object.keys(Yce).map(e=>({displayName:Yce[e],value:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({value:e,displayName:Yce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setSelection(e){this.pluginChange.emit(new wK([...e.map(n=>n.value)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-saps3-zutransferierung"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setSelection(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var $it=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"TISS-A: Atemwegszugang",option:{sortFnc:(e,n)=>e.value.toString().localeCompare(n.value.toString()),uniqueFnc:e=>e.value.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};options=$t(Object.keys(Kce).map(e=>({displayName:Kce[e],value:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({value:e,displayName:Kce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setSelection(e){this.pluginChange.emit(new TK([...e.map(n=>n.value)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-tiss-a-atemwegszugang"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setSelection(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var qit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"TISS-A: Atmungsmodus",option:{sortFnc:(e,n)=>e.value.toString().localeCompare(n.value.toString()),uniqueFnc:e=>e.value.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};options=$t(Object.keys(Wce).map(e=>({displayName:Wce[e],value:e})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({value:e,displayName:Wce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}setSelection(e){this.pluginChange.emit(new AK([...e.map(n=>n.value)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-tiss-a-atmungsmodus"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setSelection(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Yit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Behandlungsarten",option:{sortFnc:(e,n)=>e.treatmentType.localeCompare(n.treatmentType),uniqueFnc:e=>e.treatmentType,searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};treatmentTypeOptions=$t(Object.keys(Qce).map(e=>({treatmentType:e,displayName:Qce[e]})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({treatmentType:e,displayName:Qce[e]}))??[]}setTreatmentTypes(e){this.pluginChange.emit(new kK([...e.map(n=>n.treatmentType)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["at-filter-condition-form-treatment-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setTreatmentTypes(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.treatmentTypeOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Kit=(()=>{class t{clinicSizePipe;plugin;pluginValid;pluginChange=new ve;config={id:"clinic-size-select",selectLabel:"Klinik Gr\xF6\xDFe",valid$:new hi(1),option:{sortFnc:(e,n)=>e.clinicSize-n.clinicSize,uniqueFnc:e=>e.clinicSize.toString(),searchOptionAccessor:e=>e.displayName}};options;initial=[];constructor(e){this.clinicSizePipe=e,this.options=$t([{clinicSize:dI.SMALL,displayName:this.clinicSizePipe.transform(dI.SMALL)},{clinicSize:dI.MEDIUM,displayName:this.clinicSizePipe.transform(dI.MEDIUM)},{clinicSize:dI.LARGE,displayName:this.clinicSizePipe.transform(dI.LARGE)},{clinicSize:dI.EXTRA_LARGE,displayName:this.clinicSizePipe.transform(dI.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 TL([...e.map(n=>n.clinicSize)]))}static \u0275fac=function(n){return new(n||t)(xe(Vue))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-clinic-size"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([Vue]),Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSizeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Wit=(()=>{class t{clinicTypePipe;plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Tr\xE4gerart",valid$:new hi(1),option:{sortFnc:(e,n)=>e.clinicType.localeCompare(n.clinicType),uniqueFnc:e=>e.clinicType,searchOptionAccessor:e=>e.displayName}};options;initial=[];constructor(e){this.clinicTypePipe=e,this.options=$t([{clinicType:xA.PUBLIC,displayName:this.clinicTypePipe.transform(xA.PUBLIC)},{clinicType:xA.PRIVATE,displayName:this.clinicTypePipe.transform(xA.PRIVATE)},{clinicType:xA.NONPROFIT,displayName:this.clinicTypePipe.transform(xA.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 CA([...e.map(n=>n.clinicType)]))}static \u0275fac=function(n){return new(n||t)(xe(CQ))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-clinic-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([CQ]),Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onClinicTypeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var UMe=(()=>{class t{plugin;pluginValid;pluginChange=new ve;onTimeSelectionChange(e){this.plugin.toValue().equals(e)||this.pluginChange.emit(new sO(e.clone()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"ays-virtual-clinic-analysis-time-selection",0),te("timeSelectionChange",function(a){return r.onTimeSelectionChange(a)}),M()),n&2&&D("timeSelection",r.plugin.toValue())},dependencies:[lit],encapsulation:2})}return t})();var Qit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Jahr",valid$:new hi(1),option:{sortFnc:(e,n)=>n-e,uniqueFnc:e=>e.toString(),searchOptionAccessor:e=>e.toString()}};options;constructor(){let e=new Date().getFullYear();this.options=$t(new Array(10).fill(null).map((n,r)=>e-r))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChange(e){this.pluginChange.emit(new AC(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-dismissal-year"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onSelectionChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.plugin==null?null:r.plugin.toValue())},dependencies:[Va],encapsulation:2})}return t})();var Zit=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Jahr",valid$:new hi(1),option:{sortFnc:(e,n)=>n-e,uniqueFnc:e=>e.toString(),searchOptionAccessor:e=>e.toString()}};options;constructor(){let e=new Date().getFullYear();this.options=$t(new Array(10).fill(null).map((n,r)=>e-r))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onSelectionChange(e){this.pluginChange.emit(new MW(e))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-dismissal-years"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.plugin==null?null:r.plugin.toValue())},dependencies:[Yo],encapsulation:2})}return t})();function rli(t,i){if(t&1){let e=qe();O(0,"p-tree",5),te("selectionChange",function(r){se(e);let o=L();return le(o.onSelection(r))}),M()}if(t&2){let e=L();D("value",e.nodes)("selection",e.treeSelection)("propagateSelectionUp",!0)("filter",!0)}}var Xit=(()=>{class t{ref;loading$=new hi(1);nodes=[];treeSelection=[];selection=[];constructor(e,n){this.ref=n,this.loading$.next(ni.LOADING),this.selection=e.data.selection,this.treeSelection=e.data.selection.map(r=>({type:"fabKey",key:r})),e.data.options.subscribe(r=>{this.nodes=r.sort((o,a)=>o.sortingIndex-a.sortingIndex).map(o=>{let a=o.options.some(c=>e.data.selection.includes(c.fabKey));return{type:"group",key:o.name,label:o.name,selectable:!1,partialSelected:a,leaf:!1,children:o.options.map(c=>({type:"fabKey",key:c.fabKey,label:`${c.fabKey} - ${c.name}`,leaf:!0,selectable:!0}))}}),this.loading$.next(ni.SUCCESS)})}onSelection(e){Array.isArray(e)?(this.treeSelection=e,this.selection=e.map(n=>n.key)):(this.treeSelection=[e],this.selection=[e.key])}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div"),be(1,"bd-loader",1),M(),O(2,"div",2)(3,"button",3),te("click",function(){return se(o),le(r.ref.close())}),ee(4,"Abbrechen"),M(),O(5,"button",4),te("click",function(){return se(o),le(r.ref.close(r.selection))}),ee(6," \xDCbernehmen "),M()(),ie(7,rli,1,4,"ng-template",null,0,di)}if(n&2){let o=Oi(8);E(),D("loadItem",r.loading$)("successTemplate",o),E(4),D("disabled",!r.selection)}},dependencies:[fr,so,Kr,wC,Iy],encapsulation:2,changeDetection:0})}return t})();var Jit=(()=>{class t{_fabService;_virtualClinicService;generalFabKeyGroups;virtualClinicSpecificFabKeyGroups={};constructor(e,n){this._fabService=e,this._virtualClinicService=n,this.generalFabKeyGroups=this._generalFabKeyGroups().pipe(qc(1))}virtualClinicFabKeyGroup(e){return this.virtualClinicSpecificFabKeyGroups[e]||(this.virtualClinicSpecificFabKeyGroups[e]=this._virtualClinicFabKeyGroup(e).pipe(qc(1))),this.virtualClinicSpecificFabKeyGroups[e]}_generalFabKeyGroups(){return this._fabService.index().pipe(ot(e=>({name:"Allgemein",disabled:!1,options:e.sort((n,r)=>n.fabKey.localeCompare(r.fabKey)),sortingIndex:100})))}_virtualClinicFabKeyGroup(e){return this._virtualClinicService?Ys([this._fabService.index(),this._virtualClinicService.findById(e).pipe(On(n=>Hr(this._virtualClinicService.getSpecialtyDepartments(e)).pipe(ot(r=>({specialtyDepartments:r,virtualClinic:n})))))]).pipe(ot(n=>({generalFabKeys:n[0],virtualClinicObj:n[1]})),ot(n=>{let r=Ni.unique(n.virtualClinicObj.specialtyDepartments,o=>o.fabKey).map(o=>{let a=n.generalFabKeys.find(c=>c.fabKey===o.fabKey);return new _i(o.fabKey,a?.name??o?.name??`Fachabteilung ${o.fabKey}`)}).sort((o,a)=>o.fabKey.localeCompare(a.fabKey));return{name:n.virtualClinicObj.virtualClinic.name,disabled:!1,options:r,sortingIndex:1}})):this._generalFabKeyGroups()}static \u0275fac=function(n){return new(n||t)(ai(FC),ai(Cc,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ali(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var ent=(()=>{class t{_dialogService;_cdr;_fabKeyCacheService;plugin;pluginValid;pluginConfig={virtualClinicIds:[],mode:"AUTOMATIC"};pluginChange=new ve;displayValue="";_fabKeys=[];constructor(e,n,r){this._dialogService=e,this._cdr=n,this._fabKeyCacheService=r}ngOnChanges(e){e.plugin&&(this._fabKeys=this.plugin.toValue(),this._onFabKeysChanged())}openEditDialog(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"\xA7301 Fachabteilungsschl\xFCssel",data:{options:this.fetchOptions(),selection:[...this._fabKeys]}});this._dialogService.open(Xit,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this.onSelectionChange(r)})}onSelectionChange(e){Ni.equals(this._fabKeys,e)||(this._fabKeys=[...e],this._onFabKeysChanged(),this.pluginChange.emit(new gf([...e])))}fetchOptions(){let e=$t([]),n=$t([]);switch(this.pluginConfig.mode){case"ONLY_GENERAL_FAB_KEYS":{n=this._generalFabKeyGroups();break}case"ONLY_VIRTUAL_CLINIC_FAB_KEYS":{e=this._virtualClinicFabKeyGroups();break}default:{e=this._virtualClinicFabKeyGroups(),n=this._generalFabKeyGroups();break}}return Ys([n,e]).pipe(ot(r=>r.reduce((o,a)=>[...o,...a])))}_onFabKeysChanged(){this._fabKeys.length===1?this._fabKeyCacheService.generalFabKeyGroups.pipe(ot(e=>e.options),ot(e=>e.find(n=>n.fabKey===this._fabKeys[0])),ot(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(ot(e=>e.options),ot(e=>e.find(n=>n.fabKey===this._fabKeys[0])),ot(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?Ys(this.pluginConfig.virtualClinicIds.map(e=>this._virtualClinicFabKeyGroup(e))):$t([])}_virtualClinicFabKeyGroup(e){return this._fabKeyCacheService.virtualClinicFabKeyGroup(e)}_generalFabKeyGroups(){return this._fabKeyCacheService.generalFabKeyGroups.pipe(ot(e=>[e]))}static \u0275fac=function(n){return new(n||t)(xe(To),xe(dn),xe(Jit))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-fab-keys"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Yt],decls:5,vars:5,consts:[["matInput","","placeholder","\xA7301 Fachabteilungsschl\xFCssel",3,"click","value","readonly"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.openEditDialog(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,ali,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayValue)("readonly",!0),E(3),vt(r.pluginValid?-1:4))},dependencies:[mc,Oa,yp,km,hc,zs,da,zr],encapsulation:2,changeDetection:0})}return t})();var sli=["*"],tnt=(()=>{class t{_cdr;expression;expressionTitle="";allowedNewCombinations=["or","and"];expressionFn=new ve;items;constructor(e){this._cdr=e,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 x1([e])),this._cdr.markForCheck()}asOrCombination(){this.expressionFn.emit(e=>new lI([e])),this._cdr.markForCheck()}deleteExpression(){this.expression=null,this.expressionFn.emit(()=>null)}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-plugin-wrapper"]],inputs:{expression:"expression",expressionTitle:"expressionTitle",allowedNewCombinations:"allowedNewCombinations"},outputs:{expressionFn:"expressionFn"},ngContentSelectors:sli,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(n,r){if(n&1){let o=qe();Kn(),O(0,"div",2)(1,"div",3)(2,"div",4),ee(3),M(),Sn(4),M(),O(5,"p-button",5,0),te("click",function(c){se(o);let m=Oi(8);return le(m.toggle(c))}),M(),be(7,"p-tieredMenu",6,1),M()}n&2&&(E(3),Pt(r.expressionTitle),E(2),D("rounded",!0)("text",!0),E(2),D("model",r.items)("popup",!0))},dependencies:[KN,Yl],encapsulation:2,changeDetection:0})}return t})();var t_o=new Mi("FILTER_CONDITION_FORM_DATA"),OO=class extends Xo{_formData;expression;possiblePluginTypes=[];expressionConfig={};expressionChange$=new Ai;expressionValueChange$=new Ai;constructor(i){super(),this._formData=i,this.expressionConfig=i.expressionConfig,this.possiblePluginTypes=i.possiblePluginTypes}init(i){this.expression=i}};var int=(()=>{class t{_cdr;expression;possiblePluginTypes=[];typeAdded=new ve;config={selectLabel:"weitere Filter hinzuf\xFCgen",resetOption:!1,optionGroup:{uniqueFnc:e=>e.name,sortFnc:(e,n)=>!e||!n?e?-1:1:e.name.localeCompare(n.name),searchOptionAccessor:e=>e.name},option:{uniqueFnc:e=>e.type,sortFnc:(e,n)=>e.sortingIndex===n.sortingIndex?e.name.localeCompare(n.name):e.sortingIndex-n.sortingIndex,searchOptionAccessor:e=>e.name}};selectOptions;constructor(e){this._cdr=e}ngOnChanges(e){this._updateOptions()}_updateOptions(){let e=this.expression.expression.map(c=>c.type),n=[],r=this.possiblePluginTypes.filter(c=>c.category==="person").filter(c=>this._filterPluginBy(c,e)).map(c=>({name:c.displayName.de,type:c.type,sortingIndex:c.sortingIndex})),o=this.possiblePluginTypes.filter(c=>c.category==="case").filter(c=>this._filterPluginBy(c,e)).map(c=>({name:c.displayName.de,type:c.type,sortingIndex:c.sortingIndex})),a=this.possiblePluginTypes.filter(c=>c.category==="clinic").filter(c=>this._filterPluginBy(c,e)).map(c=>({name:c.displayName.de,type:c.type,sortingIndex:c.sortingIndex}));r.length>0&&n.push({name:"Geografische Merkmale",options:r}),o.length>0&&n.push({name:"Falldaten",options:o}),a.length>0&&n.push({name:"Klinik",options:a}),this.selectOptions=$t(n),this._cdr.markForCheck()}onNewPluginTypeSelected(e){this.typeAdded.emit(e.type)}_filterPluginBy(e,n){return this.expression.kind==="AND"?e.occurrence==="multiple"||!n.includes(e.type):!0}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-add-wizard"]],inputs:{expression:"expression",possiblePluginTypes:"possiblePluginTypes"},outputs:{typeAdded:"typeAdded"},features:[Yt],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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2),ee(3),M(),O(4,"div",3)(5,"bd-ui-single-select-option-group",4),te("selection",function(a){return r.onNewPluginTypeSelected(a)}),M()()()()),n&2&&(E(3),Pt(r.expression.kindToText()),E(2),D("config",r.config)("selectOptions",r.selectOptions))},dependencies:[iEe],encapsulation:2,changeDetection:0})}return t})();function lli(t,i){}function cli(t,i){if(t&1){let e=qe();ie(0,lli,0,0,"ng-template",2),te("attached",function(r){se(e);let o=L();return le(o.onPortalComponentAttached(r))})}if(t&2){let e=L();D("cdkPortalOutlet",e.componentPortal)}}var Fpe=(()=>{class t extends OO{_cdr;loading$=new hi(1);componentPortal=void 0;_ref$=new Ai;constructor(e,n){super(e),this._cdr=n,this.loading$.next(ni.LOADING),this._subs.push(this._ref$.pipe(On(r=>r.expressionChange$)).subscribe(r=>{this.loading$.next(ni.LOADING),r?(this.expression=r.clone(),this._createPortal(pe({},this._formData))):(this.expression=Pa.EMPTY(),this.loading$.next(ni.SUCCESS)),this.expressionChange$.next(r)})),this._subs.push(this._ref$.pipe(On(r=>r.expressionValueChange$)).subscribe(r=>{this.expressionValueChange$.next(r)}))}ngOnInit(){this._createPortal(this._formData)}ngOnDestroy(){this.unsubscribeAll()}onPortalComponentAttached(e){let n=e.instance;n.init(this.expression.clone()),this._ref$.next(n),this._cdr.markForCheck()}_createPortal(e){console.debug("_createPortal",this.expression.type),this.expression.type==="combination"?this.componentPortal=new qh(Lpe,void 0,Ir.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:e}]})):this.componentPortal=new qh(this._formData.pluginFormComponent,void 0,Ir.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:e}]})),this.loading$.next(ni.SUCCESS),this._cdr.markForCheck()}static \u0275fac=function(n){return new(n||t)(xe("FILTER_CONDITION_FORM_DATA"),xe(dn))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Tt],decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"attached","cdkPortalOutlet"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,cli,1,1,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[Vg,Gp,fr],encapsulation:2,changeDetection:0})}return t})();function dli(t,i){}function uli(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"div",3)(2,"div",4),ee(3),M(),O(4,"div",5),ie(5,dli,0,0,"ng-template",6),te("attached",function(r){let o=se(e),a=o.$implicit,c=o.$index,m=L();return le(m.attachChildPortal(r,c,a))}),M()()()}if(t&2){let e=i.$index,n=L();E(3),gn(" ",e===0?"":n.expression.kindToText()," "),E(2),D("cdkPortalOutlet",n.genericChildComponent)}}var Lpe=(()=>{class t extends OO{_filterConditionMapping;_cdr;genericChildComponent;expression={};expressionValid=!0;shadowCopyExpression=[];constructor(e,n,r){super(e),this._filterConditionMapping=n,this._cdr=r,this.genericChildComponent=new qh(Fpe,void 0,Ir.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,n,r){let o=e.instance;o.expression=r,this._subs.push(o.expressionChange$.subscribe(a=>{console.debug("[child] expressionChange",a),this._onChildExpressionChange(n,a),this._cdr.markForCheck()})),this._subs.push(o.expressionValueChange$.subscribe(a=>{console.debug("[child] expressionValueChange",a),this._onChildExpressionValueChange(n,a),this._cdr.markForCheck()}))}onNewPluginTypeSelected(e){let n=this._filterConditionMapping.find(r=>r.filterType===e);n?n.filterConditionPluginSpecification.newInstance().then(r=>{this.expression.expression.push(r),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,n){this.expression.expression[e]=n.clone(),this.expressionValueChange$.next(this.expression.clone()),this._updateValidState(this.expression)}_onChildExpressionChange(e,n){n?this.expression.expression[e]=n.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 \u0275fac=function(n){return new(n||t)(xe("FILTER_CONDITION_FORM_DATA"),xe(Ar),xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-combination-form"]],features:[Tt],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(n,r){n&1&&(O(0,"div",0),Qo(1,uli,6,2,"div",1,ms),O(3,"filter-condition-add-wizard",2),te("typeAdded",function(a){return r.onNewPluginTypeSelected(a)}),M()()),n&2&&(zn("filter-expression-combination-invalid",!r.expressionValid),E(),Zo(r.shadowCopyExpression),E(2),D("expression",r.expression)("possiblePluginTypes",r.possiblePluginTypes))},dependencies:[int,Vg,Gp],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 pli=["container"],nnt=(()=>{class t{_registeredFilter;_cdr;virtualClinicId;expression;possiblePluginTypes=[];expressionConfig={};allowedNewCombinations=["or","and"];expressionChange=new ve;expressionValueChange=new ve;expressionTitle="";expressionValid=!0;vcr=fP("container",{read:$l});_componentRef;_currentExpression=null;constructor(e,n){this._registeredFilter=e,this._cdr=n}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 n=this._getComponentImplementation(),r=Pee(n),o=this.expressionConfig[e.filterType];this._componentRef=this.vcr().createComponent(n),this._componentRef.setInput("plugin",this.expression),this._componentRef.setInput("pluginValid",this.expressionValid),o&&this._componentRef.setInput("pluginConfig",o),this.virtualClinicId&&r.inputs.some(c=>c.propName==="virtualClinicId")&&this._componentRef.setInput("virtualClinicId",this.virtualClinicId),this._componentRef.instance.pluginChange.subscribe(a=>{this.onExpressionValueChange(a),this.expressionValid=a.valid(),this._currentExpression=a.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 Lpe;default:{let e=this._findFilterRegistrationByType(this.expression.type);return e?e.filterConditionComponent:null}}}_findFilterRegistrationByType(e){return this._registeredFilter.filter(n=>this.possiblePluginTypes.some(r=>r.type===n.filterType)).find(n=>n.filterType===e)}static \u0275fac=function(n){return new(n||t)(xe(Ar),xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-common-form"]],viewQuery:function(n,r){n&1&&Ik(r.vcr,pli,5,$l),n&2&&Rb()},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(n,r){if(n&1){let o=qe();O(0,"div",1)(1,"filter-condition-plugin-wrapper",2),te("expressionFn",function(c){return se(o),le(r.onExpressionFn(c))}),Li(2,null,0),M()()}n&2&&(zn("filter-expression-plugin-invalid",!r.expressionValid),E(),D("expression",r.expression)("allowedNewCombinations",r.allowedNewCombinations)("expressionTitle",r.expressionTitle))},dependencies:[tnt],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 mli(t,i){if(t&1&&(O(0,"small",2),ee(1),M()),t&2){let e=L();D("id",e.pluginId),E(),Pt(e.pluginValidationMessage)}}var rnt=(()=>{class t{pluginId="filter-condition-expression-plugin-summary";pluginValid;pluginSummary="";pluginValidationMessage=null;pluginChangeClick=new ve;onEditPlugin(e){e.stopPropagation(),this.pluginChangeClick.emit()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"p-inputgroup")(1,"input",0),te("click",function(a){return r.onEditPlugin(a)}),M(),O(2,"p-inputgroup-addon")(3,"p-button",1),te("onClick",function(a){return r.onEditPlugin(a)}),M()()(),yt(4,mli,2,2,"small",2)),n&2&&(E(),D("id",r.pluginId)("invalid",!r.pluginValid)("ngModel",r.pluginSummary),E(2),D("severity",r.pluginValid?"secondary":"danger"),E(),vt(r.pluginValidationMessage?4:-1))},dependencies:[Yl,Nie,Pie,_p,oa,nd,yr,ra,ya],encapsulation:2})}return t})();var hli=["knob"],fli=["valueIndicatorContainer"];function gli(t,i){if(t&1&&(O(0,"div",2,1)(2,"div",5)(3,"span",6),ee(4),M()()()),t&2){let e=L();E(4),Pt(e.valueIndicatorText)}}var _li=["trackActive"],yli=["*"];function vli(t,i){if(t&1&&be(0,"div"),t&2){let e=i.$implicit,n=i.$index,r=L(3);Pe(e===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),la("transform",r._calcTickMarkTransform(n))}}function bli(t,i){if(t&1&&Qo(0,vli,1,4,"div",8,kj),t&2){let e=L(2);Zo(e._tickMarks)}}function Cli(t,i){if(t&1&&(O(0,"div",6,1),yt(2,bli,2,0),M()),t&2){let e=L();E(2),vt(e._cachedWidth?2:-1)}}function xli(t,i){if(t&1&&be(0,"mat-slider-visual-thumb",7),t&2){let e=L();D("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText)}}var Ps=(function(t){return t[t.START=1]="START",t[t.END=2]="END",t})(Ps||{}),E8=(function(t){return t[t.ACTIVE=0]="ACTIVE",t[t.INACTIVE=1]="INACTIVE",t})(E8||{}),HMe=new Mi("_MatSlider"),ont=new Mi("_MatSliderThumb"),Sli=new Mi("_MatSliderRangeThumb"),ant=new Mi("_MatSliderVisualThumb");var wli=(()=>{class t{_cdr=ae(dn);_ngZone=ae(Pn);_slider=ae(HMe);_renderer=ae(Ma);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=ae(qn).nativeElement;_platform=ae(_s);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 n=this._sliderInputEl,r=this._renderer;this._listenerCleanups=[r.listen(n,"pointermove",this._onPointerMove),r.listen(n,"pointerdown",this._onDragStart),r.listen(n,"pointerup",this._onDragEnd),r.listen(n,"pointerleave",this._onMouseLeave),r.listen(n,"focus",this._onFocus),r.listen(n,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(e=>e())}_onPointerMove=e=>{if(this._sliderInput._isFocused)return;let n=this._hostElement.getBoundingClientRect(),r=this._slider._isCursorOnSliderThumb(e,n);this._isHovered=r,r?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===q_.FADING_IN||e?.state===q_.VISIBLE}_showRipple(e,n){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===Ps.START?Ps.END:Ps.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!n)))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 n=this._getSibling();n._isShowingAnyRipple()||(this._hideValueIndicator(),n._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===Ps.START?Ps.END:Ps.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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(n,r){if(n&1&&(Xi(Wh,5),Xi(hli,5),Xi(fli,5)),n&2){let o;ze(o=Ue())&&(r._ripple=o.first),ze(o=Ue())&&(r._knob=o.first),ze(o=Ue())&&(r._valueIndicatorContainer=o.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[Ii([{provide:ant,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(n,r){n&1&&(yt(0,gli,5,1,"div",2),be(1,"div",3,0)(3,"div",4)),n&2&&(vt(r.discrete?0:-1),E(3),D("matRippleDisabled",!0))},dependencies:[Wh],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})(),Bpe=(()=>{class t{_ngZone=ae(Pn);_cdr=ae(dn);_elementRef=ae(qn);_dir=ae(Du,{optional:!0});_globalRippleOptions=ae(Hk,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(e){this._disabled=e;let n=this._getInput(Ps.END),r=this._getInput(Ps.START);n&&(n.disabled=this._disabled),r&&(r.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 n=e==null||isNaN(e)?this._min:e;this._min!==n&&this._updateMin(n)}_min=0;color;disableRipple=!1;_updateMin(e){let n=this._min;this._min=e,this._isRange?this._updateMinRange({old:n,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange()}_updateMinRange(e){let n=this._getInput(Ps.END),r=this._getInput(Ps.START),o=n.value,a=r.value;r.min=e.new,n.min=Math.max(e.new,r.value),r.max=Math.min(n.max,n.value),r._updateWidthInactive(),n._updateWidthInactive(),e.newe.old?this._onTranslateXChangeBySideEffect(r,n):this._onTranslateXChangeBySideEffect(n,r),o!==n.value&&this._onValueChange(n),a!==r.value&&this._onValueChange(r)}_updateMaxNonRange(e){let n=this._getInput(Ps.END);if(n){let r=n.value;n.max=e,n._updateThumbUIByValue(),this._updateTrackUI(n),r!==n.value&&this._onValueChange(n)}}get step(){return this._step}set step(e){let n=isNaN(e)?this._step:e;this._step!==n&&this._updateStep(n)}_step=1;_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let e=this._getInput(Ps.END),n=this._getInput(Ps.START),r=e.value,o=n.value,a=n.value;e.min=this._min,n.max=this._max,e.step=this._step,n.step=this._step,this._platform.SAFARI&&(e.value=e.value,n.value=n.value),e.min=Math.max(this._min,n.value),n.max=Math.min(this._max,e.value),n._updateWidthInactive(),e._updateWidthInactive(),e.value`${e}`;_tickMarks;_noopAnimations=tl();_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=ae(_s);constructor(){ae(pc).load(gp),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(Ps.END),n=this._getInput(Ps.START);this._isRange=!!e&&!!n,this._cdr.detectChanges();let r=this._getThumb(Ps.END);this._rippleRadius=r._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(e,n):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,n){e.initProps(),e.initUI(),n.initProps(),n.initUI(),e._updateMinMax(),n._updateMinMax(),e._updateStaticStyles(),n._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),n._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(Ps.END),n=this._getInput(Ps.START);e._setIsLeftThumb(),n._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),n.translateX=n._calcTranslateXByValue(),e._updateStaticStyles(),n._updateStaticStyles(),e._updateWidthInactive(),n._updateWidthInactive(),e._updateThumbUIByValue(),n._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(Ps.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(Ps.START)._isActive||this._getThumb(Ps.END)._isActive}_getValue(e=Ps.END){let n=this._getInput(e);return n?n.value:this.min}_skipUpdate(){return!!(this._getInput(Ps.START)?._skipUIUpdate||this._getInput(Ps.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(e){let n=this._trackActive.nativeElement.style;n.left=e.left,n.right=e.right,n.transformOrigin=e.transformOrigin,n.transform=e.transform}_calcTickMarkTransform(e){let n=e*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-n:n}px`}_onTranslateXChange(e){this._hasViewInitialized&&(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e))}_onTranslateXChangeBySideEffect(e,n){this._hasViewInitialized&&(e._updateThumbUIByValue(),n._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(Ps.END),n=this._getInput(Ps.START);e._updateThumbUIByValue(),n._updateThumbUIByValue(),e._updateStaticStyles(),n._updateStaticStyles(),e._updateMinMax(),n._updateMinMax(),e._updateWidthInactive(),n._updateWidthInactive()}else{let e=this._getInput(Ps.END);e&&e._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){let e=this._getInput(Ps.START),n=this._getInput(Ps.END);return!e||!n?!1:n.translateX-e.translateX<20}_updateOverlappingThumbClassNames(e){let n=e.getSibling(),r=this._getThumb(e.thumbPosition);this._getThumb(n.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),r._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 n=this._getThumb(e.thumbPosition===Ps.END?Ps.END:Ps.START);n._hostElement.style.transform=`translateX(${e.translateX}px)`}_updateValueIndicatorUI(e){if(this._skipUpdate())return;let n=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext.set(n):e._hostElement.setAttribute("aria-valuetext",n),this.discrete){e.thumbPosition===Ps.START?this.startValueIndicatorText=n:this.endValueIndicatorText=n;let r=this._getThumb(e.thumbPosition);n.length<3?r._hostElement.classList.add("mdc-slider__thumb--short-value"):r._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let e=this._getInput(Ps.END),n=this._getInput(Ps.START);e&&this._updateValueIndicatorUI(e),n&&this._updateValueIndicatorUI(n)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let e=this._step&&this._step>0?this._step:1,r=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*r}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e))}_updateTrackUIRange(e){let n=e.getSibling();if(!n||!this._cachedWidth)return;let r=Math.abs(n.translateX-e.translateX)/this._cachedWidth;e._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-n.translateX}px`,transformOrigin:"right",transform:`scaleX(${r})`}):this._setTrackActiveStyles({left:`${n.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${r})`})}_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 n=this._getValue(),r=Math.max(Math.round((n-this.min)/e),0)+1,o=Math.max(Math.round((this.max-n)/e),0)-1;this._isRtl?r++:o++,this._tickMarks=Array(r).fill(E8.ACTIVE).concat(Array(o).fill(E8.INACTIVE))}_updateTickMarkUIRange(e){let n=this._getValue(),r=this._getValue(Ps.START),o=Math.max(Math.round((r-this.min)/e),0),a=Math.max(Math.round((n-r)/e)+1,0),c=Math.max(Math.round((this.max-n)/e),0);this._tickMarks=Array(o).fill(E8.INACTIVE).concat(Array(a).fill(E8.ACTIVE),Array(c).fill(E8.INACTIVE))}_getInput(e){if(e===Ps.END&&this._input)return this._input;if(this._inputs?.length)return e===Ps.START?this._inputs.first:this._inputs.last}_getThumb(e){return e===Ps.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,n){let r=n.width/2,o=n.x+r,a=n.y+r,c=e.clientX-o,m=e.clientY-a;return Math.pow(c,2)+Math.pow(m,2)UQ),multi:!0};var UQ=(()=>{class t{_ngZone=ae(Pn);_elementRef=ae(qn);_cdr=ae(dn);_slider=ae(HMe);_platform=ae(_s);_listenerCleanups;get value(){return En(this._hostElement.value,0)}set value(e){e===null&&(e=this._getDefaultValue()),e=isNaN(e)?0:e;let n=e+"";if(!this._hasSetInitialValue){this._initialValue=n;return}this._isActive||this._setValue(n)}_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=Ps.END;get min(){return En(this._hostElement.min,0)}set min(e){this._hostElement.min=e+"",this._cdr.detectChanges()}get max(){return En(this._hostElement.max,0)}set max(e){this._hostElement.max=e+"",this._cdr.detectChanges()}get step(){return En(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=hr("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(e){this._isFocused=e}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new Ai;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){let e=ae(Ma);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 n=this._slider._isCursorOnSliderThumb(e,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=n,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 n=e.clientX-this._slider._cachedLeft,r=this._slider._cachedWidth,o=this._slider.step===0?1:this._slider.step,a=Math.floor((this._slider.max-this._slider.min)/o),c=this._slider._isRtl?1-n/r:n/r,g=Math.round(c*a)/a*(this._slider.max-this._slider.min)+this._slider.min,C=Math.round(g/o)*o,w=this.value;if(C===w){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation});return}this.value=C,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 n=this._tickMarkOffset,r=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(e,r),n)}_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,n){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(n)}_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(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(n,r){n&1&&te("change",function(){return r._onChange()})("input",function(){return r._onInput()})("blur",function(){return r._onBlur()})("focus",function(){return r._onFocus()}),n&2&<("aria-valuetext",r._valuetext())},inputs:{value:[2,"value","value",En]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[Ii([Ili,{provide:ont,useExisting:t}])]})}return t})();var Vpe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[_a,tw]})}return t})();var Tli=["colgroup"],Eli=["caption"],Ali=["header"],Dli=["body"],kli=["footer"],Mli=["summary"],Oli=["emptymessage"],Rli=["paginatorleft"],Pli=["paginatorright"],Nli=["paginatordropdownitem"],Fli=["frozenheader"],Lli=["frozenbody"],Bli=["frozenfooter"],Vli=["frozencolgroup"],zli=["loadingicon"],Uli=["reorderindicatorupicon"],Hli=["reorderindicatordownicon"],Gli=["sorticon"],jli=["checkboxicon"],$li=["headercheckboxicon"],qli=["togglericon"],Yli=["paginatorfirstpagelinkicon"],Kli=["paginatorlastpagelinkicon"],Wli=["paginatorpreviouspagelinkicon"],Qli=["paginatornextpagelinkicon"],Zli=["loader"],Xli=["resizeHelper"],Jli=["reorderIndicatorUp"],eci=["reorderIndicatorDown"],tci=["table"],ici=["scrollableView"],nci=["scrollableFrozenView"],GA=t=>({$implicit:t}),rci=(t,i)=>({left:t,width:i}),oci=(t,i)=>[t,i],aci=t=>({width:t});function sci(t,i){if(t&1&&be(0,"i"),t&2){let e=L(2);Pe(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function lci(t,i){if(t&1&&(Pi(),be(0,"svg",11)),t&2){let e=L(3);Pe(e.cx("loadingIcon")),D("spin",!0)}}function cci(t,i){}function dci(t,i){t&1&&ie(0,cci,0,0,"ng-template")}function uci(t,i){if(t&1&&(O(0,"span"),ie(1,dci,1,0,null,12),M()),t&2){let e=L(3);Pe(e.cx("loadingIcon")),E(),D("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function pci(t,i){if(t&1&&(fi(0),ie(1,lci,1,3,"svg",10)(2,uci,2,3,"span",6),gi()),t&2){let e=L(2);E(),D("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),E(),D("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function mci(t,i){if(t&1&&(O(0,"div")(1,"div"),ie(2,sci,1,2,"i",6)(3,pci,3,2,"ng-container",9),M()()),t&2){let e=L();Pe(e.cx("loading")),E(),Pe(e.cx("mask")),E(),D("ngIf",e.loadingIcon),E(),D("ngIf",!e.loadingIcon)}}function hci(t,i){t&1&&Li(0)}function fci(t,i){if(t&1&&(O(0,"div"),ie(1,hci,1,0,"ng-container",12),M()),t&2){let e=L();Pe(e.cx("header")),E(),D("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function gci(t,i){t&1&&Li(0)}function _ci(t,i){if(t&1&&ie(0,gci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function yci(t,i){t&1&&ie(0,_ci,1,1,"ng-template",14)}function vci(t,i){t&1&&Li(0)}function bci(t,i){if(t&1&&ie(0,vci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Cci(t,i){t&1&&ie(0,bci,1,1,"ng-template",15)}function xci(t,i){t&1&&Li(0)}function Sci(t,i){if(t&1&&ie(0,xci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function wci(t,i){t&1&&ie(0,Sci,1,1,"ng-template",16)}function Ici(t,i){t&1&&Li(0)}function Tci(t,i){if(t&1&&ie(0,Ici,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Eci(t,i){t&1&&ie(0,Tci,1,1,"ng-template",17)}function Aci(t,i){if(t&1){let e=qe();O(0,"p-paginator",13),te("onPageChange",function(r){se(e);let o=L();return le(o.onPageChange(r))}),ie(1,yci,1,0,null,9)(2,Cci,1,0,null,9)(3,wci,1,0,null,9)(4,Eci,1,0,null,9),M()}if(t&2){let e=L();D("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),E(),D("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),E(),D("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),E(),D("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),E(),D("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Dci(t,i){t&1&&Li(0)}function kci(t,i){t&1&&Li(0)}function Mci(t,i){t&1&&Li(0)}function Oci(t,i){if(t&1&&(O(0,"div")(1,"table",18,0),ie(3,Dci,1,0,"ng-container",19),O(4,"thead",20),ie(5,kci,1,0,"ng-container",19),M(),be(6,"tbody",21),O(7,"tfoot",20),ie(8,Mci,1,0,"ng-container",19),M()()()),t&2){let e=L();Pe(e.cx("wrapper")),E(),D("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),E(2),D("ngTemplateOutlet",e.colGroupTemplate||e._colGroupTemplate)("ngTemplateOutletContext",Yi(18,GA,e.columns)),E(),Pe(e.cx("thead")),E(),D("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",Yi(20,GA,e.columns)),E(),Pe(e.cx("tbody")),D("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate??e._bodyTemplate),E(),Pe(e.cx("tfoot")),E(),D("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",Yi(22,GA,e.columns))}}function Rci(t,i){if(t&1&&be(0,"div",24,2),t&2){let e=L(2);D("ngClass",na(5,oci,e.cx("scrollableView"),e.cx("frozenView")))("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",Yi(8,aci,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function Pci(t,i){if(t&1&&(O(0,"div"),ie(1,Rci,2,10,"div",22),be(2,"div",23,1),M()),t&2){let e=L();Pe(e.cx("scrollableWrapper")),E(),D("ngIf",e.frozenColumns||e.frozenBodyTemplate||e._frozenBodyTemplate),E(),Pe(e.cx("scrollableView")),D("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",na(9,rci,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function Nci(t,i){t&1&&Li(0)}function Fci(t,i){if(t&1&&ie(0,Nci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Lci(t,i){t&1&&ie(0,Fci,1,1,"ng-template",14)}function Bci(t,i){t&1&&Li(0)}function Vci(t,i){if(t&1&&ie(0,Bci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function zci(t,i){t&1&&ie(0,Vci,1,1,"ng-template",15)}function Uci(t,i){t&1&&Li(0)}function Hci(t,i){if(t&1&&ie(0,Uci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Gci(t,i){t&1&&ie(0,Hci,1,1,"ng-template",16)}function jci(t,i){t&1&&Li(0)}function $ci(t,i){if(t&1&&ie(0,jci,1,0,"ng-container",12),t&2){let e=L(3);D("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function qci(t,i){t&1&&ie(0,$ci,1,1,"ng-template",17)}function Yci(t,i){if(t&1){let e=qe();O(0,"p-paginator",13),te("onPageChange",function(r){se(e);let o=L();return le(o.onPageChange(r))}),ie(1,Lci,1,0,null,9)(2,zci,1,0,null,9)(3,Gci,1,0,null,9)(4,qci,1,0,null,9),M()}if(t&2){let e=L();D("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),E(),D("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),E(),D("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),E(),D("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),E(),D("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Kci(t,i){t&1&&Li(0)}function Wci(t,i){if(t&1&&(O(0,"div"),ie(1,Kci,1,0,"ng-container",12),M()),t&2){let e=L();Pe(e.cx("footer")),E(),D("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function Qci(t,i){if(t&1&&be(0,"div",null,3),t&2){let e=L();Pe(e.cx("columnResizerHelper")),la("display","none")}}function Zci(t,i){t&1&&(Pi(),be(0,"svg",26))}function Xci(t,i){}function Jci(t,i){t&1&&ie(0,Xci,0,0,"ng-template")}function edi(t,i){if(t&1&&(O(0,"span",null,4),ie(2,Zci,1,0,"svg",25)(3,Jci,1,0,null,12),M()),t&2){let e=L();Pe(e.cx("reorderIndicatorUp")),la("display","none"),E(2),D("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),E(),D("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function tdi(t,i){t&1&&(Pi(),be(0,"svg",28))}function idi(t,i){}function ndi(t,i){t&1&&ie(0,idi,0,0,"ng-template")}function rdi(t,i){if(t&1&&(O(0,"span",null,5),ie(2,tdi,1,0,"svg",27)(3,ndi,1,0,null,12),M()),t&2){let e=L();Pe(e.cx("reorderIndicatorDown")),la("display","none"),E(2),D("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),E(),D("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var odi=["pTreeTableBody",""],adi=(t,i,e,n)=>({$implicit:t,node:i,rowData:e,columns:n}),sdi=(t,i)=>({$implicit:t,frozen:i});function ldi(t,i){t&1&&Li(0)}function cdi(t,i){if(t&1&&(fi(0),ie(1,ldi,1,0,"ng-container",2),gi()),t&2){let e=L().$implicit,n=L();E(),D("ngTemplateOutlet",n.template)("ngTemplateOutletContext",YV(2,adi,e,e.node,e.node.data,n.columns))}}function ddi(t,i){if(t&1&&ie(0,cdi,2,7,"ng-container",1),t&2){let e=i.$implicit;D("ngIf",e.visible)}}function udi(t,i){t&1&&Li(0)}function pdi(t,i){if(t&1&&(fi(0),ie(1,udi,1,0,"ng-container",2),gi()),t&2){let e=L();E(),D("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",na(2,sdi,e.columns,e.frozen))}}var mdi=["scrollHeader"],hdi=["scrollHeaderBox"],fdi=["scrollBody"],gdi=["scrollTable"],_di=["loadingTable"],ydi=["scrollFooter"],vdi=["scrollFooterBox"],bdi=["scrollableAligner"],Cdi=["scroller"],xdi=["ttScrollableView",""],Sdi=t=>({height:t}),lnt=(t,i)=>({$implicit:t,options:i}),wdi=t=>({options:t}),Idi=(t,i)=>({"max-height":t,"overflow-y":i}),Tdi=()=>({});function Edi(t,i){t&1&&Li(0)}function Adi(t,i){t&1&&Li(0)}function Ddi(t,i){t&1&&Li(0)}function kdi(t,i){if(t&1&&ie(0,Ddi,1,0,"ng-container",12),t&2){let e=i.$implicit,n=i.options;L(2);let r=Oi(11);D("ngTemplateOutlet",r)("ngTemplateOutletContext",na(2,lnt,e,n))}}function Mdi(t,i){t&1&&Li(0)}function Odi(t,i){if(t&1&&ie(0,Mdi,1,0,"ng-container",12),t&2){let e=i.options,n=L(3);D("ngTemplateOutlet",n.tt.loaderTemplate||n.tt._loaderTemplate)("ngTemplateOutletContext",Yi(2,wdi,e))}}function Rdi(t,i){t&1&&(fi(0),ie(1,Odi,1,4,"ng-template",null,5,di),gi())}function Pdi(t,i){if(t&1){let e=qe();O(0,"p-scroller",17,3),te("onLazyLoad",function(r){se(e);let o=L();return le(o.tt.onLazyItemLoad(r))}),ie(2,kdi,1,5,"ng-template",null,4,di)(4,Rdi,3,0,"ng-container",15),M()}if(t&2){let e=L();is(Yi(9,Sdi,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),D("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),E(4),D("ngIf",e.tt.loaderTemplate||e.tt._loaderTemplate)}}function Ndi(t,i){t&1&&Li(0)}function Fdi(t,i){if(t&1&&(fi(0),O(1,"div",11,6),ie(3,Ndi,1,0,"ng-container",12),M(),gi()),t&2){let e=L(),n=Oi(11);E(),Pe(e.cx("scrollableBody")),D("ngStyle",na(5,Idi,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),E(2),D("ngTemplateOutlet",n)("ngTemplateOutletContext",na(9,lnt,e.serializedValue,Vr(8,Tdi)))}}function Ldi(t,i){t&1&&Li(0)}function Bdi(t,i){t&1&&be(0,"div",null,8),t&2&&la("background-color","transparent")}function Vdi(t,i){if(t&1&&(O(0,"table",18,7),ie(2,Ldi,1,0,"ng-container",12),be(3,"tbody",19),M(),ie(4,Bdi,2,2,"div",20)),t&2){let e=i.$implicit,n=i.options,r=L();is(n.contentStyle),Pe(r.tt.tableStyleClass),D("ngClass",n.contentStyleClass)("ngStyle",r.tt.tableStyle),E(2),D("ngTemplateOutlet",r.frozen?r.tt.frozenColGroupTemplate||r.tt._frozenColGroupTemplate||r.tt.colGroupTemplate||r.tt._colGroupTemplate:r.tt.colGroupTemplate||r.tt._colGroupTemplate)("ngTemplateOutletContext",Yi(15,GA,r.columns)),E(),Pe(r.cx("tbody")),D("pTreeTableBody",r.columns)("pTreeTableBodyTemplate",r.frozen?r.tt.frozenBodyTemplate||r.tt._frozenBodyTemplate||r.tt.bodyTemplate||r.tt._bodyTemplate:r.tt.bodyTemplate||r.tt._bodyTemplate)("serializedNodes",e)("frozen",r.frozen),E(),D("ngIf",r.frozen)}}function zdi(t,i){t&1&&Li(0)}function Udi(t,i){t&1&&Li(0)}function Hdi(t,i){if(t&1&&(O(0,"div",null,9)(2,"div",null,10)(4,"table",21),ie(5,zdi,1,0,"ng-container",12),O(6,"tfoot",13),ie(7,Udi,1,0,"ng-container",12),M()()()()),t&2){let e=L();Pe(e.cx("scrollableFooter")),E(2),Pe(e.cx("scrollableFooterBox")),E(2),Pe(e.cx("scrollableFooterTable")),D("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),E(),D("ngTemplateOutlet",e.frozen?e.tt.frozenColGroupTemplate||e.tt._frozenColGroupTemplate||e.tt.colGroupTemplate||e.tt._colGroupTemplate:e.tt.colGroupTemplate||e.tt._colGroupTemplate)("ngTemplateOutletContext",Yi(14,GA,e.columns)),E(),Pe(e.cx("tfoot")),E(),D("ngTemplateOutlet",e.frozen?e.tt.frozenFooterTemplate||e.tt._frozenFooterTemplate||e.tt.footerTemplate||e.tt._footerTemplate:e.tt.footerTemplate||e.tt._footerTemplate)("ngTemplateOutletContext",Yi(16,GA,e.columns))}}var Gdi=(t,i)=>({$implicit:t,partialSelected:i});function jdi(t,i){}function $di(t,i){t&1&&ie(0,jdi,0,0,"ng-template")}function qdi(t,i){if(t&1&&ie(0,$di,1,0,null,3),t&2){let e=L(2);D("ngTemplateOutlet",e.tt.checkboxIconTemplate||e.tt._checkboxIconTemplate)("ngTemplateOutletContext",na(2,Gdi,e.checked,e.partialChecked))}}function Ydi(t,i){t&1&&(fi(0),ie(1,qdi,1,5,"ng-template",2),gi())}function Kdi(t,i){t&1&&(Pi(),be(0,"svg",5)),t&2&<("aria-hidden",!0)}function Wdi(t,i){t&1&&(Pi(),be(0,"svg",6)),t&2&<("aria-hidden",!0)}function Qdi(t,i){if(t&1&&(fi(0),ie(1,Kdi,1,1,"svg",3)(2,Wdi,1,1,"svg",4),gi()),t&2){let e=L();E(),D("ngIf",e.rowNode.node.expanded),E(),D("ngIf",!e.rowNode.node.expanded)}}function Zdi(t,i){}function Xdi(t,i){t&1&&ie(0,Zdi,0,0,"ng-template")}var Jdi=` /* 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'); } `,eui={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"},LC=(()=>{class t extends br{name="treetable";theme=Jdi;classes=eui;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var HQ=(()=>{class t{sortSource=new Ai;selectionSource=new Ai;contextMenuSource=new Ai;uiUpdateSource=new Ai;totalRecordsSource=new Ai;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(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),BC=(()=>{class t extends ur{_componentStyle=ae(LC);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,n)=>n;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=ae(Kk);tableService=ae(HQ);zone=ae(Pn);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,n,r,o){if(n&&n.length)for(let a of n){a.parent=e;let c={node:a,parent:e,level:r,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(c),c.visible&&a.expanded&&this.serializeNodes(a,a.children,r+1,c.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let n=this.lazy?0:this.first;for(let r=n;r{let o=Os(n.data,this.sortField),a=Os(r.data,this.sortField),c=null;return o==null&&a!=null?c=-1:o!=null&&a==null?c=1:o==null&&a==null?c=0:typeof o=="string"&&typeof a=="string"?c=o.localeCompare(a,void 0,{numeric:!0}):c=oa?1:0,this.sortOrder*c});for(let n of e)this.sortNodes(n.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((n,r)=>this.multisortField(n,r,this.multiSortMeta,0));for(let n of e)this.sortMultipleNodes(n.children)}}multisortField(e,n,r,o){if(ru(this.multiSortMeta)||ru(r[o]))return 0;let a=Os(e.data,r[o].field),c=Os(n.data,r[o].field),m=null;if(a==null&&c!=null?m=-1:a!=null&&c==null?m=1:a==null&&c==null&&(m=0),typeof a=="string"||a instanceof String){if(a.localeCompare&&a!=c)return r[o].order*a.localeCompare(c,void 0,{numeric:!0})}else m=ao?this.multisortField(e,n,r,o+1):0:r[o].order*m}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let n=0;nthis.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit($e(pe(pe({},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 n=Vx(this.el?.nativeElement).left;this.lastResizerHelperX=e.pageX-n+this.el?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let n=Vx(this.el?.nativeElement).left;nu(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-n+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,n){let r=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,o=n.offsetWidth,a=o+r,c=n.style.minWidth||15;if(o+r>parseInt(c)){if(this.columnResizeMode==="fit"){let m=n.nextElementSibling;for(;!m.offsetParent;)m=m.nextElementSibling;if(m){let g=m.offsetWidth-r,C=m.style.minWidth||15;if(a>15&&g>parseInt(C))if(this.scrollable){let w=this.findParentScrollableView(n),P=$r(w,".p-treetable-scrollable-body table")||$r(w,".p-scroller-viewport table"),R=$r(w,"table.p-treetable-scrollable-header-table"),z=$r(w,"table.p-treetable-scrollable-footer-table"),H=rw(n);this.resizeColGroup(R,H,a,g),this.resizeColGroup(P,H,a,g),this.resizeColGroup(z,H,a,g)}else n.style.width=a+"px",m&&(m.style.width=g+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let m=this.findParentScrollableView(n),g=$r(m,".p-treetable-scrollable-body")||$r(m,".p-scroller-viewport"),C=$r(m,".p-treetable-scrollable-header"),w=$r(m,".p-treetable-scrollable-footer"),P=$r(m,".p-treetable-scrollable-body table")||$r(m,".p-scroller-viewport table"),R=$r(m,"table.p-treetable-scrollable-header-table"),z=$r(m,"table.p-treetable-scrollable-footer-table");P.style.width=P.offsetWidth+r+"px",R.style.width=R.offsetWidth+r+"px",z&&(z.style.width=z.offsetWidth+r+"px");let H=rw(n),j=n?P.offsetWidth+r:a,K=n?R.offsetWidth+r:a,ne=this.el?.nativeElement.offsetWidth>=j,me=(Te,Ie,ye,fe)=>{Te&&Ie&&(Te.style.width=fe?ye+q7(g)+"px":"auto",Ie.style.width=ye+"px")};me(g,P,j,ne),me(C,R,K,ne),me(w,z,K,ne),this.resizeColGroup(R,H,a,null),this.resizeColGroup(P,H,a,null),this.resizeColGroup(z,H,a,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+r+"px",n.style.width=a+"px";let m=this.tableViewChild?.nativeElement.style.width;this.el.nativeElement.style.width=m+"px"}this.onColResize.emit({element:n,delta:r})}this.resizeHelperViewChild.nativeElement.style.display="none",qp(this.el?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let n=e.parentElement;for(;n&&!Cd(n,"p-treetable-scrollable-view");)n=n.parentElement;return n}else return null}resizeColGroup(e,n,r,o){if(e){let a=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(a){let c=a.children[n],m=c.nextElementSibling;c.style.width=r+"px",m&&o&&(m.style.width=o+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,n){this.reorderIconWidth=Cbe(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=bbe(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let r=Vx(this.el?.nativeElement),o=Vx(n);if(this.draggedColumn!=n){let a=o.left-r.left,c=r.top-o.top,m=o.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=o.top-r.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=o.top-r.top+n.offsetHeight+"px",e.pageX>m?(this.reorderIndicatorUpViewChild.nativeElement.style.left=a+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=a+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=a-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=a-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,n){if(e.preventDefault(),this.draggedColumn){let r=eo.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),o=eo.indexWithinGroup(n,"ttreorderablecolumn"),a=r!=o;a&&(o-r==1&&this.dropPosition===-1||r-o==1&&this.dropPosition===1)&&(a=!1),a&&or&&this.dropPosition===-1&&(o=o-1),a&&(r6e(this.columns,r,o),this.onColReorder.emit({dragIndex:r,dropIndex:o,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 n=e.originalEvent.target.nodeName;if(!(n=="INPUT"||n=="BUTTON"||n=="A"||Cd(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let r=e.rowNode,o=this.isSelected(r.node),a=this.rowTouched?!1:this.metaKeySelection,c=this.dataKey?String(Os(r.node.data,this.dataKey)):null;if(a){let m=e.originalEvent,g=m.metaKey||m.ctrlKey;if(o&&g){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let C=this.findIndexInSelection(r.node);this._selection=this.selection.filter((w,P)=>P!=C),this.selectionChange.emit(this.selection),c&&delete this.selectedKeys[c]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:r.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=r.node,this.selectionChange.emit(r.node),c&&(this.selectedKeys={},this.selectedKeys[c]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,r.node],this.selectionChange.emit(this.selection),c&&(this.selectedKeys[c]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:r.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")o?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:r.node,type:"row"})):(this._selection=r.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:r.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys={},this.selectedKeys[c]=1));else if(this.selectionMode==="multiple")if(o){let m=this.findIndexInSelection(r.node);this._selection=this.selection.filter((g,C)=>C!=m),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:r.node,type:"row"}),c&&delete this.selectedKeys[c]}else this._selection=this.selection?[...this.selection,r.node]:[r.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:r.node,type:"row",index:e.rowIndex}),c&&(this.selectedKeys[c]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let n=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:n}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(n);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let r=this.isSelected(n),o=this.dataKey?String(Os(n.data,this.dataKey)):null;r||(this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n)):this.isMultipleSelectionMode()&&(this.selection=[n],this.selectionChange.emit(this.selection)),o&&(this.selectedKeys[o]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:n})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let n=e.rowNode.node;this.isSelected(n)?(this.propagateSelectionDown(n,!1),e.rowNode.parent&&this.propagateSelectionUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown(n,!0),e.rowNode.parent&&this.propagateSelectionUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,n){let r=this.filteredNodes||this.value;this._selection=n&&r?r.slice():[],this.toggleAll(n),n||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n})}toggleAll(e){let n=this.filteredNodes||this.value;if(this.selectionKeys){if(n&&n.length){for(let r of n)this.propagateDown(r,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(n&&n.length)for(let r of n)this.propagateSelectionDown(r,e)}propagateSelectionUp(e,n){if(e.children&&e.children.length){let o=0,a=!1,c=this.dataKey?String(Os(e.data,this.dataKey)):null;for(let m of e.children)this.isSelected(m)?o++:m.partialSelected&&(a=!0);if(n&&o==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,c&&(this.selectedKeys[c]=1);else{if(!n){let m=this.findIndexInSelection(e);m>=0&&(this._selection=this.selection.filter((g,C)=>C!=m),c&&delete this.selectedKeys[c])}a||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let r=e.parent;e.checked=n,r&&this.propagateSelectionUp(r,n)}propagateSelectionDown(e,n){let r=this.findIndexInSelection(e),o=this.dataKey?String(Os(e.data,this.dataKey)):null;if(n&&r==-1?(this._selection=[...this.selection||[],e],o&&(this.selectedKeys[o]=1)):!n&&r>-1&&(this._selection=this.selection.filter((a,c)=>c!=r),o&&delete this.selectedKeys[o]),e.partialSelected=!1,e.checked=n,e.children&&e.children.length)for(let a of e.children)this.propagateSelectionDown(a,n)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[Os(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 Os(e,this.dataKey)||Os(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:n,check:r,originalEvent:o}=e,a=n.node;this.selectionKeys?(this.propagateDown(a,r),a.parent&&this.propagateUp(a.parent,r),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:o,rowNode:n}),this.tableService.onSelectionChange()}propagateDown(e,n){if(n?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let r of e.children)this.propagateDown(r,n)}propagateUp(e,n){let r=0,o=!1;for(let c of e.children)this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].checked?r++:this.selectionKeys[this.nodeKey(c)]&&this.selectionKeys[this.nodeKey(c)].partialChecked&&(o=!0);n&&r===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(n||delete this.selectionKeys[this.nodeKey(e)],o||r>0&&r!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let a=e.parent;a&&this.propagateUp(a,n)}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length){for(let r=0;r{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,n){this.filter(e,"global",n)}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 n;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");n=this.globalFilterFields||this.columns}this.filteredNodes=[];let r=this.filterMode==="strict",o=!1;for(let a of this.value){let c=pe({},a),m=!0,g=!1,C;for(let P in this.filters)if(this.filters.hasOwnProperty(P)&&P!=="global"){let R=this.filters[P],z=P,H=R.value,j=R.matchMode||"startsWith",K=this.filterService.filters[j];if(C={filterField:z,filterValue:H,filterConstraint:K,isStrictMode:r},(r&&!(this.findFilteredNodes(c,C)||this.isFilterMatched(c,C))||!r&&!(this.isFilterMatched(c,C)||this.findFilteredNodes(c,C)))&&(m=!1),!m)break}if(this.filters.global&&!g&&n){let P=pe({},c),R,z=this.filters.global.value,H=this.filterService.filters[this.filters.global.matchMode];C={filterField:R,filterValue:z,filterConstraint:H,isStrictMode:r,globalFilterFieldsArray:n},(r&&(this.findFilteredNodes(P,C)||this.isFilterMatched(P,C))||!r&&(this.isFilterMatched(P,C)||this.findFilteredNodes(P,C)))&&(g=!0,c=P)}let w=m;this.filters.global&&(w=m&&g),w&&this.filteredNodes.push(c),o=o||!m||g||m&&this.filteredNodes.length>0||!g&&this.filteredNodes.length===0}o||(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,n){if(e){let r=!1;if(e.children){let o=[...e.children];e.children=[];for(let a of o){let c=pe({},a);this.isFilterMatched(c,n)&&(r=!0,e.children.push(c))}}if(r)return!0}}isFilterMatched(e,n){let{filterField:r,filterValue:o,filterConstraint:a,isStrictMode:c,globalFilterFieldsArray:m}=n,g=!1,C=w=>a(Os(e.data,w),o,this.filterLocale);return g=m?.length?m.some(w=>C(w.field||w)):C(r),(!g||c&&!this.isNodeLeaf(e))&&(g=this.findFilteredNodes(e,{filterField:r,filterValue:o,filterConstraint:a,isStrictMode:c,globalFilterFieldsArray:m})||g),g}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let n in this.filters)if(this.filters.hasOwnProperty(n)){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,n,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&Yp(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()&&(qp(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(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["p-treeTable"],["p-treetable"],["p-tree-table"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,Tli,4),Vt(o,Eli,4),Vt(o,Ali,4),Vt(o,Dli,4),Vt(o,kli,4),Vt(o,Mli,4),Vt(o,Oli,4),Vt(o,Rli,4),Vt(o,Pli,4),Vt(o,Nli,4),Vt(o,Fli,4),Vt(o,Lli,4),Vt(o,Bli,4),Vt(o,Vli,4),Vt(o,zli,4),Vt(o,Uli,4),Vt(o,Hli,4),Vt(o,Gli,4),Vt(o,jli,4),Vt(o,$li,4),Vt(o,qli,4),Vt(o,Yli,4),Vt(o,Kli,4),Vt(o,Wli,4),Vt(o,Qli,4),Vt(o,Zli,4),Vt(o,Tr,4)),n&2){let a;ze(a=Ue())&&(r._colGroupTemplate=a.first),ze(a=Ue())&&(r._captionTemplate=a.first),ze(a=Ue())&&(r._headerTemplate=a.first),ze(a=Ue())&&(r._bodyTemplate=a.first),ze(a=Ue())&&(r._footerTemplate=a.first),ze(a=Ue())&&(r._summaryTemplate=a.first),ze(a=Ue())&&(r._emptyMessageTemplate=a.first),ze(a=Ue())&&(r._paginatorLeftTemplate=a.first),ze(a=Ue())&&(r._paginatorRightTemplate=a.first),ze(a=Ue())&&(r._paginatorDropdownItemTemplate=a.first),ze(a=Ue())&&(r._frozenHeaderTemplate=a.first),ze(a=Ue())&&(r._frozenBodyTemplate=a.first),ze(a=Ue())&&(r._frozenFooterTemplate=a.first),ze(a=Ue())&&(r._frozenColGroupTemplate=a.first),ze(a=Ue())&&(r._loadingIconTemplate=a.first),ze(a=Ue())&&(r._reorderIndicatorUpIconTemplate=a.first),ze(a=Ue())&&(r._reorderIndicatorDownIconTemplate=a.first),ze(a=Ue())&&(r._sortIconTemplate=a.first),ze(a=Ue())&&(r._checkboxIconTemplate=a.first),ze(a=Ue())&&(r._headerCheckboxIconTemplate=a.first),ze(a=Ue())&&(r._togglerIconTemplate=a.first),ze(a=Ue())&&(r._paginatorFirstPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorLastPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorPreviousPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._paginatorNextPageLinkIconTemplate=a.first),ze(a=Ue())&&(r._loaderTemplate=a.first),ze(a=Ue())&&(r.templates=a)}},viewQuery:function(n,r){if(n&1&&(Xi(Xli,5),Xi(Jli,5),Xi(eci,5),Xi(tci,5),Xi(ici,5),Xi(nci,5)),n&2){let o;ze(o=Ue())&&(r.resizeHelperViewChild=o.first),ze(o=Ue())&&(r.reorderIndicatorUpViewChild=o.first),ze(o=Ue())&&(r.reorderIndicatorDownViewChild=o.first),ze(o=Ue())&&(r.tableViewChild=o.first),ze(o=Ue())&&(r.scrollableViewChild=o.first),ze(o=Ue())&&(r.scrollableFrozenViewChild=o.first)}},hostVars:3,hostBindings:function(n,r){n&2&&(lt("data-scrollselectors",".p-treetable-scrollable-body"),Pe(r.cn(r.cx("root"),r.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",En],first:[2,"first","first",En],pageLinks:[2,"pageLinks","pageLinks",En],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",En],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",En],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",En],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",En],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:[Ii([HQ,LC]),Tt,Yt],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(n,r){n&1&&ie(0,mci,4,6,"div",6)(1,fci,2,3,"div",6)(2,Aci,5,21,"p-paginator",7)(3,Oci,9,24,"div",6)(4,Pci,4,12,"div",6)(5,Yci,5,21,"p-paginator",7)(6,Wci,2,3,"div",6)(7,Qci,2,4,"div",8)(8,edi,4,6,"span",8)(9,rdi,4,6,"span",8),n&2&&(D("ngIf",r.loading&&r.showLoader),E(),D("ngIf",r.captionTemplate||r._captionTemplate),E(),D("ngIf",r.paginator&&(r.paginatorPosition==="top"||r.paginatorPosition=="both")),E(),D("ngIf",!r.scrollable),E(),D("ngIf",r.scrollable),E(),D("ngIf",r.paginator&&(r.paginatorPosition==="bottom"||r.paginatorPosition=="both")),E(),D("ngIf",r.summaryTemplate||r._summaryTemplate),E(),D("ngIf",r.resizableColumns),E(),D("ngIf",r.reorderableColumns),E(),D("ngIf",r.reorderableColumns))},dependencies:()=>[qa,Xr,Jr,Xs,j$,Tr,W_,B4,V4,tui,cnt],encapsulation:2})}return t})(),cnt=(()=>{class t{tt;treeTableService;cd;columns;template;frozen;serializedNodes;scrollerOptions;subscription;constructor(e,n,r){this.tt=e,this.treeTableService=n,this.cd=r,this.subscription=this.tt.tableService.uiUpdateSource$.subscribe(()=>{this.tt.virtualScroll&&this.cd.detectChanges()})}getScrollerOption(e,n){return this.tt.virtualScroll?(n=n||this.scrollerOptions,n?n[e]:null):null}getRowIndex(e){let n=this.getScrollerOption("getItemOptions");return n?n(e).index:e}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(BC),xe(HQ),xe(dn))};static \u0275cmp=re({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:odi,decls:2,vars:3,consts:[["ngFor","",3,"ngForOf","ngForTrackBy"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&ie(0,ddi,1,1,"ng-template",0)(1,pdi,2,5,"ng-container",1),n&2&&(D("ngForOf",r.serializedNodes||r.tt.serializedValue)("ngForTrackBy",r.tt.rowTrackBy),E(),D("ngIf",r.tt.isEmpty()))},dependencies:[Vl,Xr,Jr],encapsulation:2})}return t})(),tui=(()=>{class t extends ur{tt;el;zone;columns;frozen;scrollHeaderViewChild;scrollHeaderBoxViewChild;scrollBodyViewChild;scrollTableViewChild;scrollLoadingTableViewChild;scrollFooterViewChild;scrollFooterBoxViewChild;scrollableAlignerViewChild;scroller;headerScrollListener;bodyScrollListener;footerScrollListener;frozenSiblingBody;totalRecordsSubscription;_scrollHeight;preventBodyScrollPropagation;_componentStyle=ae(LC);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,n,r){super(),this.tt=e,this.el=n,this.zone=r}ngAfterViewInit(){if(super.ngAfterViewInit(),Js(this.platformId)){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=VUe()+"px");else{(this.tt.frozenColumns||this.tt.frozenBodyTemplate||this.tt._frozenBodyTemplate)&&nu(this.el.nativeElement,"p-treetable-unfrozen-view");let e=this.el.nativeElement.previousElementSibling;if(e&&(this.tt.virtualScroll?this.frozenSiblingBody=$r(e,".p-scroller-viewport"):this.frozenSiblingBody=$r(e,".p-treetable-scrollable-body")),this.scrollHeight){let n=q7();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=n+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=n+"px")}}this.bindEvents()}}bindEvents(){Js(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(){Js(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(n){return new(n||t)(xe(BC),xe(qn),xe(Pn))};static \u0275cmp=re({type:t,selectors:[["","ttScrollableView",""]],viewQuery:function(n,r){if(n&1&&(Xi(mdi,5),Xi(hdi,5),Xi(fdi,5),Xi(gdi,5),Xi(_di,5),Xi(ydi,5),Xi(vdi,5),Xi(bdi,5),Xi(Cdi,5)),n&2){let o;ze(o=Ue())&&(r.scrollHeaderViewChild=o.first),ze(o=Ue())&&(r.scrollHeaderBoxViewChild=o.first),ze(o=Ue())&&(r.scrollBodyViewChild=o.first),ze(o=Ue())&&(r.scrollTableViewChild=o.first),ze(o=Ue())&&(r.scrollLoadingTableViewChild=o.first),ze(o=Ue())&&(r.scrollFooterViewChild=o.first),ze(o=Ue())&&(r.scrollFooterBoxViewChild=o.first),ze(o=Ue())&&(r.scrollableAlignerViewChild=o.first),ze(o=Ue())&&(r.scroller=o.first)}},inputs:{columns:[0,"ttScrollableView","columns"],frozen:[2,"frozen","frozen",Je],scrollHeight:"scrollHeight"},standalone:!1,features:[Ii([LC]),Tt],attrs:xdi,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(n,r){n&1&&(O(0,"div",null,0)(2,"div",null,1)(4,"table",11),ie(5,Edi,1,0,"ng-container",12),O(6,"thead",13),ie(7,Adi,1,0,"ng-container",12),M()()()(),ie(8,Pdi,5,11,"p-scroller",14)(9,Fdi,4,12,"ng-container",15)(10,Vdi,5,17,"ng-template",null,2,di)(12,Hdi,8,18,"div",16)),n&2&&(Pe(r.cx("scrollableHeader")),E(2),Pe(r.cx("scrollableHeaderBox")),E(2),Pe(r.cn(r.cx("scrollableHeaderTable"),r.tt.tableStyleClass)),D("ngStyle",r.tt.tableStyle),E(),D("ngTemplateOutlet",r.frozen?r.tt.frozenColGroupTemplate||r.tt._frozenColGroupTemplate||r.tt.colGroupTemplate||r.tt._colGroupTemplate:r.tt.colGroupTemplate||r.tt._colGroupTemplate)("ngTemplateOutletContext",Yi(16,GA,r.columns)),E(),Pe(r.cx("thead")),E(),D("ngTemplateOutlet",r.frozen?r.tt.frozenHeaderTemplate||r.tt._frozenHeaderTemplate||r.tt.headerTemplate||r.tt._headerTemplate:r.tt.headerTemplate||r.tt._headerTemplate)("ngTemplateOutletContext",Yi(18,GA,r.columns)),E(),D("ngIf",r.tt.virtualScroll),E(),D("ngIf",!r.tt.virtualScroll),E(3),D("ngIf",r.tt.footerTemplate||r.tt._footerTemplate))},dependencies:()=>[qa,Xr,Jr,Xs,ey,cnt],encapsulation:2})}return t})();var dnt=(()=>{class t extends ur{tt;tableService;rowNode;ttSelectableRowDisabled;selected;subscription;_componentStyle=ae(LC);constructor(e,n){super(),this.tt=e,this.tableService=n,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(n){return new(n||t)(xe(BC),xe(HQ))};static \u0275dir=hn({type:t,selectors:[["","ttSelectableRow",""]],hostVars:3,hostBindings:function(n,r){n&1&&te("click",function(a){return r.onClick(a)})("keydown",function(a){return r.onKeyDown(a)})("touchend",function(a){return r.onTouchEnd(a)}),n&2&&(lt("aria-checked",r.selected),Pe(r.cx("row")))},inputs:{rowNode:[0,"ttSelectableRow","rowNode"],ttSelectableRowDisabled:[2,"ttSelectableRowDisabled","ttSelectableRowDisabled",Je]},standalone:!1,features:[Ii([LC]),Tt]})}return t})();var A8=(()=>{class t extends ur{tt;tableService;cd;disabled;rowNode;checked;partialChecked;focused;subscription;_componentStyle=ae(LC);constructor(e,n,r){super(),this.tt=e,this.tableService=n,this.cd=r,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 n=!this.checked;this.tt.toggleCheckbox({originalEvent:e,check:n,rowNode:this.rowNode})}else this.tt.toggleNodeWithCheckbox({originalEvent:e,rowNode:this.rowNode});zUe()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)(xe(BC),xe(HQ),xe(dn))};static \u0275cmp=re({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:[Ii([LC]),Tt],decls:2,vars:7,consts:[[3,"onChange","ngModel","binary","disabled","indeterminate","styleClass","tabIndex"],[4,"ngIf"],["pTemplate","icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(O(0,"p-checkbox",0),te("onChange",function(a){return r.onClick(a)}),ie(1,Ydi,2,0,"ng-container",1),M()),n&2&&(D("ngModel",r.checked)("binary",!0)("disabled",r.disabled)("indeterminate",r.partialChecked)("styleClass",r.cx("pcNodeCheckbox"))("tabIndex",-1),E(),D("ngIf",r.tt.checkboxIconTemplate||r.tt._checkboxIconTemplate))},dependencies:()=>[Xr,Jr,Tr,qg,yr,ya],encapsulation:2,changeDetection:0})}return t})();var D8=(()=>{class t extends ur{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=ae(LC);constructor(e,n,r){super(),this.tt=e,this.el=n,this.zone=r}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 n=this.el?.nativeElement?.nextElementSibling;n&&this.focusRowChange(e.currentTarget,n),e.preventDefault()}onArrowUpKey(e){let n=this.el?.nativeElement?.previousElementSibling;n&&this.focusRowChange(e.currentTarget,n),e.preventDefault()}onArrowRightKey(e){let n=e.currentTarget;!($r(n,"button").style.visibility==="hidden")&&!this.expanded&&this.rowNode.node.children&&(this.expand(e),n.tabIndex=-1),e.preventDefault()}onArrowLeftKey(e){let n=this.tt.el?.nativeElement,r=Yp(n,'[aria-expanded="true"]'),o=r[r.length-1];this.expanded&&this.collapse(e),o&&(this.tt.toggleRowIndex=rw(o)),this.restoreFocus(),e.preventDefault()}onHomeKey(e){let n=$r(this.tt.el?.nativeElement,`tr[aria-level="${this.level}"]`);n&&Ba(n),e.preventDefault()}onEndKey(e){let n=Yp(this.tt.el?.nativeElement,`tr[aria-level="${this.level}"]`),r=n[n.length-1];Ba(r),e.preventDefault()}onTabKey(e){let n=this.el.nativeElement?[...Yp(this.el.nativeElement.parentNode,"tr")]:void 0;if(n&&Ro(n)){let r=n.some(o=>Qh(o,"data-p-highlight")||o.getAttribute("aria-checked")==="true");if(n.forEach(o=>{o.tabIndex=-1}),r){let o=n.filter(a=>Qh(a,"data-p-highlight")||a.getAttribute("aria-checked")==="true");o[0].tabIndex=0;return}n[0].tabIndex=0}}expand(e){this.tt.toggleRowIndex=rw(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,n,r){e.tabIndex="-1",n.tabIndex="0",Ba(n)}restoreFocus(e){this.zone.runOutsideAngular(()=>{setTimeout(()=>{let n=this.tt.el?.nativeElement,r=$r(n,".p-treetable-tbody").children[e||this.tt.toggleRowIndex],o=[...Yp(n,"tr")];o&&o.forEach(a=>{r.isSameNode(a)||(a.tabIndex=-1)}),r&&(r.tabIndex=0,r.focus())},25)})}static \u0275fac=function(n){return new(n||t)(xe(BC),xe(qn),xe(Pn))};static \u0275dir=hn({type:t,selectors:[["","ttRow",""]],hostVars:7,hostBindings:function(n,r){n&1&&te("keydown",function(a){return r.onKeyDown(a)}),n&2&&(sa("tabIndex","0")("role",r.row),lt("aria-expanded",r.expanded)("aria-level",r.level)("data-pc-section",r.row),Pe("p-element "+r.styleClass))},inputs:{rowNode:[0,"ttRow","rowNode"]},standalone:!1,features:[Ii([LC]),Tt]})}return t})(),k8=(()=>{class t extends ur{tt;rowNode;_componentStyle=ae(LC);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(n){return new(n||t)(xe(BC))};static \u0275cmp=re({type:t,selectors:[["p-treeTableToggler"],["p-treetabletoggler"],["p-treetable-toggler"]],inputs:{rowNode:"rowNode"},standalone:!1,features:[Ii([LC]),Tt],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(n,r){n&1&&(O(0,"button",0),te("click",function(a){return r.onClick(a)}),ie(1,Qdi,3,2,"ng-container",1)(2,Xdi,1,0,null,2),M()),n&2&&(Pe(r.cx("toggler")),la("visibility",r.rowNode.node.leaf===!1||r.rowNode.node.children&&r.rowNode.node.children.length?"visible":"hidden")("margin-inline-start",r.rowNode.level*16+"px"),lt("data-pc-section","rowtoggler")("data-pc-group-section","rowactionbutton")("aria-label",r.toggleButtonAriaLabel),E(),D("ngIf",!r.tt.togglerIconTemplate&&!r.tt._togglerIconTemplate),E(),D("ngTemplateOutlet",r.tt.togglerIconTemplate||r.tt._togglerIconTemplate)("ngTemplateOutletContext",Yi(12,GA,r.rowNode.node.expanded)))},dependencies:()=>[Xr,Jr,Qc,Dm,Gb],encapsulation:2})}return t})(),M8=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({imports:[rr,tae,ey,W_,B4,V4,X7,e9,J7,H4,Qk,Dm,Gb,qg,Un,ra,Un]})}return t})();var unt=(()=>{class t{drivingTime=10;drivingTimeChange=new ve;onDrivingTimeChange(e){this.drivingTime=e,this.drivingTimeChange.emit(e)}displayWith(e){return`${e}min`}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"span",0),ee(1),M(),O(2,"mat-slider",1)(3,"input",2),te("valueChange",function(a){return r.onDrivingTimeChange(a)}),M()()),n&2&&(E(),gn("Fahrzeit ",r.drivingTime," min"),E(),D("max",60)("step",1)("discrete",!0)("displayWith",r.displayWith),E(),D("ngModel",r.drivingTime))},dependencies:[Vpe,Bpe,UQ,oa,nd,yr,ra,ya],styles:["mat-slider[_ngcontent-%COMP%]{width:80%}"]})}return t})();var pnt=(()=>{class t{coordinates;drivingTime=10;postalCodesSelection=[];mostlyInRange=!1;postalCodesSelectionChange=new ve;possiblePostalCodesChange=new ve;mapController=new vh;_isochroneLayer;_selectionLayer=new wI("selection",{layerId:ng.id,highlightLayerId:r1.id,sourceId:ng.id,displayName:"Auswahl"});constructor(e){this._isochroneLayer=new OQ("isochrone",{sourceId:"isochrone-source",displayName:"Fahrzeit"},e),this.mapController.registerLayer(this._isochroneLayer),this.mapController.registerLayer(this._selectionLayer),this._isochroneLayer.bounds$.subscribe(n=>{this._selectionLayer.onChangedBounds(n)}),this._selectionLayer.possibleSelection$.subscribe(n=>this.possiblePostalCodesChange.emit(n)),this._selectionLayer.selection.changed.subscribe(n=>this.postalCodesSelectionChange.emit(n.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 \u0275fac=function(n){return new(n||t)(xe(IMe))};static \u0275cmp=re({type:t,selectors:[["ays-market-isochrone-selection-postal-codes"]],inputs:{coordinates:"coordinates",drivingTime:"drivingTime",postalCodesSelection:"postalCodesSelection",mostlyInRange:"mostlyInRange"},outputs:{postalCodesSelectionChange:"postalCodesSelectionChange",possiblePostalCodesChange:"possiblePostalCodesChange"},features:[Yt],decls:3,vars:1,consts:[[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"bd-map",1),te("mapLoaded",function(a){return r.onMapLoad(a)})("mapClick",function(a){return r.onMapClick(a)}),M(),be(2,"bd-map-legend",2),M()),n&2&&(E(2),D("controller",r.mapController))},dependencies:[Ah,b0],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}return t})();var mnt=(()=>{class t{coordinates;distanceInKilometer=25;postalCodesSelection=[];mostlyInRange=!1;postalCodesSelectionChange=new ve;possiblePostalCodesChange=new ve;mapController=new vh;_drivingTimeLayer=new RQ("drivingTime",{displayName:"Entfernung",sourceId:"drivingTime"});_selectionLayer=new wI("selection",{layerId:ng.id,highlightLayerId:r1.id,sourceId:Mv,displayName:"Auswahl"});constructor(){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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-geographic-distance-selection"]],inputs:{coordinates:"coordinates",distanceInKilometer:"distanceInKilometer",postalCodesSelection:"postalCodesSelection",mostlyInRange:"mostlyInRange"},outputs:{postalCodesSelectionChange:"postalCodesSelectionChange",possiblePostalCodesChange:"possiblePostalCodesChange"},features:[Yt],decls:3,vars:1,consts:[[1,"map-container"],[3,"mapLoaded","mapClick"],[3,"controller"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"bd-map",1),te("mapLoaded",function(a){return r.onMapLoaded(a)})("mapClick",function(a){return r.onMapClick(a)}),M(),be(2,"bd-map-legend",2),M()),n&2&&(E(2),D("controller",r.mapController))},dependencies:[Ah,b0],styles:[".map-container[_ngcontent-%COMP%]{height:450px;position:relative}"]})}return t})();var iui=()=>({"min-width":"50rem"});function nui(t,i){if(t&1&&(O(0,"th",5),ee(1),M()),t&2){let e=i.$implicit,n=L(3);D("pTooltip",n.getAgeGroupMarketIdClassification(e)),E(),gn(" ",n.getHeaderCellTitle(e)," ")}}function rui(t,i){if(t&1&&(O(0,"tr")(1,"th"),ee(2,"Jahr"),M(),Qo(3,nui,2,2,"th",5,ms),O(5,"th"),ee(6,"Gesamt"),M()()),t&2){let e=L(2);E(3),Zo(e.displayedAgeGroupMarketIds)}}function oui(t,i){if(t&1&&(O(0,"td"),ee(1),Dr(2,"number"),M()),t&2){let e=i.$implicit,n=L().$implicit;E(),Pt(ca(2,1,n.ageMap[e]||0))}}function aui(t,i){if(t&1&&(O(0,"tr")(1,"td"),ee(2),M(),Qo(3,oui,3,3,"td",null,ms),O(5,"td"),ee(6),Dr(7,"number"),M()()),t&2){let e=i.$implicit,n=L(2);E(2),Pt(e.year),E(),Zo(n.displayedAgeGroupMarketIds),E(3),Pt(ca(7,2,e.people))}}function sui(t,i){if(t&1&&(O(0,"div",2)(1,"div",3)(2,"p-table",4),ie(3,rui,7,0,"ng-template",null,0,di)(5,aui,8,4,"ng-template",null,1,di),M()()()),t&2){let e=L();E(2),D("value",e.population.years)("tableStyle",Vr(2,iui))}}var hnt=(()=>{class t{population;displayedAgeGroupMarketIds=[];ageGroupMarketIds=Ape;ngOnInit(){this.displayedAgeGroupMarketIds=this.ageGroupMarketIds.filter(e=>e<21)}getAgeGroupMarketIdClassification(e){return kB[e]}getHeaderCellTitle(e){let n=e*5-5;return n===0&&(n=1),e===21?"95...":e===22?"unbekannt":`< ${n} J`}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&yt(0,sui,7,3,"div",2),n&2&&vt(r.population?0:-1)},dependencies:[Td,rc,tg,V_],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 fnt=(()=>{class t{_sanitizer;watermarkOptions;watermarkImage;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 \u0275fac=function(n){return new(n||t)(xe(vP))};static \u0275cmp=re({type:t,selectors:[["bd-chart-option-watermark"]],inputs:{watermarkOptions:"watermarkOptions"},features:[Yt],decls:1,vars:7,consts:[["alt","Copyright BinDoc GmbH",1,"watermark-container",3,"src"]],template:function(n,r){n&1&&Cr(0,"img",0),n&2&&(is(r.backgroundPositionStyle()),la("height",r.watermarkOptions.config.height)("width",r.watermarkOptions.config.width),sa("src",r.watermarkImage,td))},styles:[".watermark-container[_ngcontent-%COMP%]{opacity:.3;top:40px;position:absolute;height:100px;width:150px}"]})}return t})();var gnt={enabled:!1,config:{background_image:null,background_position:null,background_position_offset:null,height:null,width:null}};var lui=["chartCanvas"];function cui(t,i){if(t&1&&be(0,"bd-chart-option-watermark",2),t&2){let e=L();D("watermarkOptions",e.watermarkOptions)}}var O8=(()=>{class t{canvasId="canvas";chartConfig;watermarkOptions=gnt;chartChange=new ve;chartCanvas;_chart;constructor(){A1.register(...Eet)}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 A1(e,this.chartConfig),this.chartChange.emit(this._chart)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["bd-chart-canvas"]],viewQuery:function(n,r){if(n&1&&Xi(lui,7),n&2){let o;ze(o=Ue())&&(r.chartCanvas=o.first)}},inputs:{canvasId:"canvasId",chartConfig:"chartConfig",watermarkOptions:"watermarkOptions"},outputs:{chartChange:"chartChange"},features:[Yt],decls:4,vars:2,consts:[["chartCanvas",""],[1,"chart-container"],[3,"watermarkOptions"],[3,"contextmenu","id"]],template:function(n,r){if(n&1){let o=qe();O(0,"div",1),yt(1,cui,1,1,"bd-chart-option-watermark",2),O(2,"canvas",3,0),te("contextmenu",function(c){return se(o),le(c.preventDefault())}),M()()}n&2&&(E(),vt(r.watermarkOptions.enabled?1:-1),E(),D("id",r.canvasId))},dependencies:[fnt],styles:[".chart-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"]})}return t})();var _nt=(()=>{class t{_breakpointObserver;population;chartConfig;_chartOptions;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:$e(pe({},A6),{stacked:!0,beginAtZero:!0})},plugins:{tooltip:$e(pe({},Tp),{position:"average"}),legend:{display:!this._breakpointObserver.isMatched([j_.XSmall,j_.Small]),position:this._breakpointObserver.isMatched(j_.Large)?"right":"bottom",reverse:this._breakpointObserver.isMatched(j_.Large)}}}}_onPopulationChange(e){this.chartConfig={type:"bar",data:{labels:e.getLabels(),datasets:e.getAgeMapChartDataSets()},options:this._chartOptions}}static \u0275fac=function(n){return new(n||t)(xe(yv))};static \u0275cmp=re({type:t,selectors:[["ays-market-population-ages-chart"]],inputs:{population:"population"},features:[Yt],decls:2,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(n,r){n&1&&(O(0,"div",0),be(1,"bd-chart-canvas",1),M()),n&2&&(E(),D("chartConfig",r.chartConfig))},dependencies:[O8],styles:[".chart-container[_ngcontent-%COMP%]{height:800px}"]})}return t})();var zpe=class extends jg{_population;ageGroupMarketIds=Ape;constructor(i){super(),this._population=i}getExport(){return Promise.resolve({data:this._population.years.map(i=>this._getDataOfYear(i)),fields:["Jahr"].concat(this.ageGroupMarketIds.map(i=>kB[i]))})}_getDataOfYear(i){let e=[{value:i.year,type:"string"}];return this.ageGroupMarketIds.map(n=>i.ageMap[n]||0).forEach(n=>e.push({value:n,type:"number"})),e}};var ynt=(()=>{class t{population;exportMarketDetailsAges;ngOnInit(){this.exportMarketDetailsAges=new zpe(this.population)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-population-export-ages"]],inputs:{population:"population"},decls:1,vars:1,consts:[["filename","Bev\xF6lkerungsentwicklung-Altersgruppen",3,"data"]],template:function(n,r){n&1&&be(0,"bd-export-as-file",0),n&2&&D("data",r.exportMarketDetailsAges)},dependencies:[C1],encapsulation:2})}return t})();function dui(t,i){if(t&1&&(O(0,"div",0)(1,"div",1)(2,"div",2),be(3,"bd-growth-rate",3),M(),O(4,"div",2),be(5,"bd-growth-rate",3),M()()()),t&2){let e=L();E(3),D("comparator",e.population.t25)("base",e.population.tBaseYear)("config",e.growthRateConfig),E(2),D("comparator",e.population.t30)("base",e.population.tBaseYear)("config",e.growthRateConfig)}}var vnt=(()=>{class t{population;growthRateConfig={type:"relative",labelClass:"mat-title",rateClass:"mat-subheading",format:"1.2-2"};static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&yt(0,dui,6,6,"div",0),n&2&&vt(r.population?0:-1)},dependencies:[tbe],styles:[".growth-info[_ngcontent-%COMP%]{padding:24px 0}"]})}return t})();var Upe=(()=>{class t{population;chartConfig;_chartOptions;constructor(){this._setOptions()}ngOnChanges(e){e.population&&e.population.currentValue&&this._onPopulationChange(e.population.currentValue)}_setOptions(){this._chartOptions={maintainAspectRatio:!1,scales:{peopleCount:$e(pe({},A6),{beginAtZero:!0,title:{display:!0,text:"Bev\xF6lkerung"},axis:"y"}),peopleChaneRate:$e(pe({},A6),{title:{display:!0,text:"\xC4nderungsrate (%)"},position:"right",axis:"y"})},plugins:{tooltip:Tp}}}_onPopulationChange(e){this.chartConfig={type:"bar",data:{labels:e.getLabels(),datasets:e.getChartDataSets()},options:this._chartOptions}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-population-total-chart"]],inputs:{population:"population"},features:[Yt],decls:2,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(n,r){n&1&&(O(0,"div",0),be(1,"bd-chart-canvas",1),M()),n&2&&(E(),D("chartConfig",r.chartConfig))},dependencies:[O8],styles:[".chart-container[_ngcontent-%COMP%]{height:400px}"]})}return t})();var Hpe=class extends jg{_population;constructor(i){super(),this._population=i}getExport(){let i=this._population.years.map(e=>[{value:e.year,type:"string"},{value:e.people,type:"number"}]);return Promise.resolve({data:i,fields:["Jahr","Bev\xF6lkerung"]})}},GQ=class extends jg{view;_transformNodes;_postalCodeService;_districtService;constructor(i,e,n,r){super(),this.view=i,this._transformNodes=e,this._postalCodeService=n,this._districtService=r}getExport(){switch(this.view){case"postalCodes":return ym(this._postalCodeService.findAll(this._transformNodes.map(i=>i.label),"SUMMARY").pipe(ot(i=>({fields:["Postleitzahl","Name"],data:Object.keys(i).map(e=>[{type:"string",value:e},{type:"string",value:i[e].name}])}))));case"administrativeDistricts":return ym(this._districtService.findAll(this._transformNodes.map(i=>i.label).map(i=>io.create(i))).pipe(ot(i=>({fields:["Landkreis","Name"],data:Object.keys(i).map(e=>[{type:"string",value:e},{type:"string",value:i[e].displayName()}])}))))}}};var bnt=(()=>{class t{population;exportMarketPopulation;exportConfig=$e(pe({},i1),{form:{defaultLabels:["Markt"],availableExportTypes:["csv","xlsx"]}});ngOnInit(){this.exportMarketPopulation=new Hpe(this.population)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-population-export"]],inputs:{population:"population"},decls:1,vars:2,consts:[["filename","Bev\xF6lkerungsentwicklung",3,"data","config"]],template:function(n,r){n&1&&be(0,"bd-export-as-file",0),n&2&&D("data",r.exportMarketPopulation)("config",r.exportConfig)},dependencies:[C1],encapsulation:2})}return t})();var pui=t=>["/markets",t];function mui(t,i){if(t&1&&(O(0,"bd-chip-dummy"),ee(1),Dr(2,"administrativeDistrict"),Dr(3,"async"),M()),t&2){let e,n=i.$implicit;E(),gn(" ",(e=ca(3,3,ca(2,1,n)))==null?null:e.displayName()," ")}}function hui(t,i){if(t&1&&(O(0,"mat-option",6),ee(1),Dr(2,"administrativeDistrict"),Dr(3,"async"),M()),t&2){let e,n=i.$implicit;D("value",n),E(),gn(" ",(e=ca(3,4,ca(2,2,n)))==null?null:e.displayName()," ")}}function fui(t,i){if(t&1&&(O(0,"a",12),ee(1," Zur\xFCck zur Prognose "),M()),t&2){let e=L(2);D("routerLink",e.returnToProjectionUrl)}}function gui(t,i){if(t&1&&(O(0,"div",4)(1,"mat-form-field")(2,"mat-label"),ee(3,"Landkreise"),M(),O(4,"mat-select",5)(5,"mat-select-trigger"),Qo(6,mui,4,5,"bd-chip-dummy",null,ms),M(),Qo(8,hui,4,6,"mat-option",6,ms),M()()(),O(10,"div",4)(11,"div",7)(12,"div",8),ee(13,"Bev\xF6lkerungsentwicklung"),M(),O(14,"div"),be(15,"ays-market-population-export",9),M()(),O(16,"div"),be(17,"ays-market-population-total-chart",9),M(),O(18,"div"),be(19,"ays-market-population-total-table",9),M()(),be(20,"mat-divider"),O(21,"div",10)(22,"div",7)(23,"div",8),ee(24,"Altersgruppen"),M(),O(25,"div"),be(26,"ays-market-population-export-ages",9),M()(),O(27,"div"),be(28,"ays-market-population-ages-chart",9),M()(),be(29,"mat-divider"),O(30,"div")(31,"div",4),be(32,"ays-market-population-ages-table",9),M()(),O(33,"div",10)(34,"div",11)(35,"a",12),ee(36," Zur\xFCck zur \xDCbersicht "),M(),yt(37,fui,2,1,"a",12),M()()),t&2){let e=i.$implicit,n=L();E(4),D("formControl",n.selectFormCtrl)("compareWith",n.compareFn)("multiple",!0),E(2),Zo(n.selectFormCtrl.value),E(2),Zo(n.allAdministrativeDistrictIds),E(7),D("population",n.population),E(2),D("population",n.population),E(2),D("population",n.population),E(7),D("population",n.population),E(2),D("population",e),E(4),D("population",e),E(3),D("routerLink",Yi(11,pui,n.market.id)),E(2),vt(n.returnToProjectionUrl?37:-1)}}var Cnt=(()=>{class t{_activatedRoute;_marketService;market;population;allAdministrativeDistrictIds=[];selectFormCtrl=new ho(null,[]);loading$=new Sa(ni.INIT);helpButtonOptions=cae;returnToProjectionUrl;constructor(e,n){this._activatedRoute=e,this._marketService=n}ngOnInit(){this._activatedRoute.params.subscribe(e=>this._onParamsChanged(e)),this._activatedRoute.queryParams.subscribe(e=>{e.projectionUrl&&(this.returnToProjectionUrl=e.projectionUrl)}),this.selectFormCtrl.valueChanges.pipe(Hh(1500)).subscribe(e=>this.onAdministrativeDistrictChange(e))}onAdministrativeDistrictChange(e){this.loading$.next(ni.LOADING),this._fetch(this.market,e).subscribe(n=>{this.population=n.population,this.loading$.next(ni.SUCCESS)})}compareFn(e,n){return!!e&&!!n&&e.value===n.value}_onParamsChanged(e){e.marketId&&(this.loading$.next(ni.LOADING),this._marketService.findById(e.marketId).pipe(yo(n=>this.market=n),On(n=>this._fetch(n))).subscribe(n=>{this.population=n.population,this.allAdministrativeDistrictIds=n.administrativeDistrictIds,this.selectFormCtrl.patchValue(this.allAdministrativeDistrictIds,{emitEvent:!1}),this.loading$.next(ni.SUCCESS)}))}_fetch(e,n){return this.loading$.next(ni.LOADING),this._marketService.transform([e.id],[{value:"administrativeDistrictId"},{value:"postalCode"}]).pipe(ot(r=>r[this.market.id]),On(r=>{let o=r;return n&&(o=r.filter(a=>!!n.find(c=>c.value===io.create(a.label).value))),this._marketService.getPopulation({id:this.market.id,name:this.market.name,postalCodes:o.map(a=>a.children??[]).flat().map(a=>a.label)}).pipe(ot(a=>({population:a,administrativeDistrictIds:r.map(c=>io.create(c.label))})))}))}static \u0275fac=function(n){return new(n||t)(xe(id),xe(Ap))};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span",1),ee(2),M(),be(3,"bd-help-button",2),M(),be(4,"bd-loader",3),ie(5,gui,38,13,"ng-template",null,0,di)),n&2){let o=Oi(6);E(2),gn("Bev\xF6lkerung ",r.market==null?null:r.market.name),E(),D("options",r.helpButtonOptions),E(),D("loadItem",r.loading$)("successTemplate",o)("successTemplateContext",r.population)}},dependencies:[zl,tF,fr,mc,Oa,rd,UP,zP,qbe,$b,oa,yr,Mc,qze,eE,bnt,Upe,vnt,Cp,Id,ynt,_nt,hnt,so,Kr,Ms,xI,Dc],encapsulation:2})}return t})();var Gpe=class extends jg{_rows;constructor(i){super(),this._rows=i}getExport(){let i={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(i)}};function _ui(t,i){t&1&&(O(0,"tr")(1,"th"),ee(2,"Jahr"),M(),O(3,"th"),ee(4,"Anzahl F\xE4lle"),M(),O(5,"th"),ee(6,"Umsatz"),M(),O(7,"th"),ee(8,"Casemix"),M(),O(9,"th"),ee(10,"CMI"),M()())}function yui(t,i){if(t&1&&(O(0,"tr")(1,"td"),ee(2),M(),O(3,"td"),ee(4),Dr(5,"number"),M(),O(6,"td"),ee(7),Dr(8,"number"),M(),O(9,"td"),ee(10),Dr(11,"number"),M(),O(12,"td"),ee(13),Dr(14,"number"),M()()),t&2){let e=i.$implicit;E(2),Pt(e.year),E(2),Pt(gl(5,5,e.count,"1.0-0")),E(3),Pt(gl(8,8,e.amount,"1.0-0")),E(3),Pt(gl(11,11,e.casemix,"1.0-0")),E(3),Pt(gl(14,14,e.cmi,"1.2-2"))}}var xnt=(()=>{class t{market;response;rows;export;exportFileName;exportConfig=$e(pe({},i1),{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(n=>pe({year:n},this.response.entity[n])),this.export=new Gpe(this.rows)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-details-time-series-table"]],inputs:{market:"market",response:"response"},features:[Yt],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(n,r){n&1&&(O(0,"div",0)(1,"div",1),be(2,"bd-export-as-file",2),M()(),O(3,"p-table",3),ie(4,_ui,11,0,"ng-template",4)(5,yui,15,17,"ng-template",5),M()),n&2&&(E(2),D("filename",r.exportFileName)("data",r.export),E(),D("value",r.rows))},dependencies:[C1,Td,rc,Tr,Un,V_],encapsulation:2})}return t})();function vui(t,i){if(t&1&&(O(0,"div",0),be(1,"bd-chart-canvas",1),M()),t&2){let e=i.$implicit,n=L(2);E(),D("chartConfig",n.chartConfigurations[e])}}function bui(t,i){if(t&1&&Qo(0,vui,2,1,"div",0,ms),t&2){let e=L();Zo(e.datasetFields)}}var Snt=(()=>{class t{response;datasetFields=["count","amount","casemix","cmi"];datasetFieldOptions={count:{displayName:"Anzahl F\xE4lle",color:MM[0]},amount:{displayName:"Umsatz",color:MM[1]},casemix:{displayName:"Casemix",color:MM[2]},cmi:{displayName:"CMI",color:MM[3]}};chartConfigurations;ngOnChanges(e){e.response&&this._setChartConfigurations()}_setChartConfigurations(){let e=Object.keys(this.response.entity).sort();this.chartConfigurations=this.datasetFields.reduce((n,r)=>(n[r]={type:"line",data:{labels:e,datasets:[{type:"line",label:this.datasetFieldOptions[r].displayName,data:e.map(o=>this.response.entity[o][r]),borderColor:this.datasetFieldOptions[r].color,pointBackgroundColor:this.datasetFieldOptions[r].color,pointBorderColor:this.datasetFieldOptions[r].color,backgroundColor:this.datasetFieldOptions[r].color}]},options:{plugins:{tooltip:Tp},responsive:!0,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0}}}},n),{})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-market-details-time-series-chart"]],inputs:{response:"response"},features:[Yt],decls:1,vars:1,consts:[[1,"chart-container"],[3,"chartConfig"]],template:function(n,r){n&1&&yt(0,bui,2,0),n&2&&vt(r.chartConfigurations?0:-1)},dependencies:[O8],styles:[".chart-container[_ngcontent-%COMP%]{margin:24px 0;max-height:400px}"]})}return t})();var wnt=(()=>{class t{_fabService;fabs;fabsChange=new ve;multiSelectConfig={selectLabel:"\xA7301 Fachabteilungsschl\xFCssel",option:{uniqueFnc:e=>e.fabKey,sortFnc:(e,n)=>e.fabKey.localeCompare(n.fabKey),searchOptionAccessor:e=>`${e.name} ${e.fabKey}`,searchOptionDisplayName:e=>`${e.fabKey} - ${e.name}`}};fabOptions;constructor(e){this._fabService=e,this.fabOptions=this._fabService.index().pipe(ar(1),ot(n=>{let r=n.findIndex(o=>o.fabKey==="0000");return r>-1&&n.splice(r,1),n}))}static \u0275fac=function(n){return new(n||t)(xe(FC))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.fabsChange.emit(a)}),M()),n&2&&D("config",r.multiSelectConfig)("initialSelection",r.fabs)("selectOptions",r.fabOptions)},dependencies:[Yo],encapsulation:2})}return t})();function Cui(t,i){if(t&1){let e=qe();O(0,"div",3)(1,"div")(2,"span",4),ee(3,"Basisfallwert"),M()(),O(4,"ays-drg-base-rate",8),te("baseRateChange",function(r){se(e);let o=L();return le(o.onBaseRateChange(r))}),M()()}if(t&2){let e=L();E(4),D("baseRate",e.baseRate)}}function xui(t,i){if(t&1&&be(0,"ays-market-details-time-series-chart",9)(1,"ays-market-details-time-series-table",10),t&2){let e=L();D("response",e.response),E(),D("response",e.response)("market",e.market)}}var Int=(()=>{class t{_marketService;_fabService;market;loading$=new Ai;codingSystem="G-DRG";baseRate;fabOptions;response;_fabs=null;constructor(e,n){this._marketService=e,this._fabService=n,this._fabService.index().pipe(ar(1),ot(r=>r.sort((o,a)=>o.fabKey.localeCompare(a.fabKey)))).subscribe(r=>{this.fabOptions=r})}ngOnInit(){let e=8;this.market?this._marketService.transform([this.market.id],[{value:"administrativeDistrictId"}]).pipe(ot(n=>n[this.market.id])).subscribe(n=>{e=n.map(o=>io.create(o.label)).map(o=>o.getStateId()).sort()[0]||8,this.baseRate={state:o1.byId(e),year:NK}}):this.baseRate={state:o1.byId(e),year:NK}}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(ni.LOADING),this._marketService.detailsTimeSeries(this.codingSystem,this.market,this.baseRate.value,this._fabs).pipe(ar(1)).subscribe(e=>{this.response=e,this.loading$.next(ni.SUCCESS)}))}static \u0275fac=function(n){return new(n||t)(xe(Ap),xe(FC))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div",1)(1,"div",2)(2,"div",3)(3,"div")(4,"span",4),ee(5,"Ziffer Typ"),M()(),O(6,"ays-code-coding-system-select",5),te("codingSystemChange",function(c){return se(o),le(r.onCodingSystemChange(c))}),M()(),O(7,"div",3)(8,"div")(9,"span",4),ee(10,"Filter"),M()(),O(11,"ays-market-details-time-series-filter-fab",6),te("fabsChange",function(c){return se(o),le(r.onFabsChange(c))}),M()()(),yt(12,Cui,5,1,"div",3),M(),O(13,"div"),be(14,"bd-loader",7),ie(15,xui,2,3,"ng-template",null,0,di),M(),be(17,"div",1)}if(n&2){let o=Oi(16);E(6),D("codingSystem",r.codingSystem),E(6),vt(r.codingSystem==="G-DRG"?12:-1),E(2),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[wnt,iit,fr,Snt,xnt,nit],encapsulation:2})}return t})();var Tnt=(()=>{class t{_postalCodeService;_administrativeDistrictService;_marketService;market;mapOptions=$e(pe({},rg),{style:"mapbox://styles/mapbox/light-v11",bounds:a1,center:void 0,maxZoom:10});exportConfig=$e(pe({},i1),{form:{defaultLabels:["Markt"],availableExportTypes:["csv","xlsx"]}});view="postalCodes";export;mapController=new vh;_postalCodeLayer;_administrativeDistrictsLayer;_colorFactory=new r0({low:new ua("#452a71"),high:new ua("#452a71")});constructor(e,n,r){this._postalCodeService=e,this._administrativeDistrictService=n,this._marketService=r,this._postalCodeLayer=new AB("postalCodes",new EB,this._postalCodeService),this._postalCodeLayer.colorFactory$.next(this._colorFactory),this._postalCodeLayer.legend={showInLegend:!1},this._administrativeDistrictsLayer=new l8("administrativeDistricts",new s8,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 n={},r=e[this.market.id];this.export=new GQ("postalCodes",r,this._postalCodeService,this._administrativeDistrictService),r.forEach(o=>n[o.label]=1),this._postalCodeLayer.data$.next(n)})}_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 n={},r=e[this.market.id];this.export=new GQ("administrativeDistricts",r,this._postalCodeService,this._administrativeDistrictService),r.forEach(o=>n[io.create(o.label).value]=1),this._administrativeDistrictsLayer.data$.next(n)})}static \u0275fac=function(n){return new(n||t)(xe(pg),xe(ib),xe(Ap))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div"),be(3,"filter-condition-expression-show",2),M()(),O(4,"div",3)(5,"div",4)(6,"div",3)(7,"mat-form-field")(8,"mat-label"),ee(9,"Darstellung"),M(),O(10,"mat-select",5),te("valueChange",function(a){return r.onViewChange(a)}),O(11,"mat-option",6),ee(12,"Markt als Landkreise "),M(),O(13,"mat-option",7),ee(14,"Markt als Postleitzahlen "),M()()()(),O(15,"div"),be(16,"bd-export-as-file",8),M()(),O(17,"div",9)(18,"bd-map",10),te("mapLoaded",function(a){return r.onMapLoaded(a)}),M()()()()),n&2&&(E(3),D("expression",r.market.condition),E(7),D("value",r.view),E(6),D("config",r.exportConfig)("data",r.export),E(2),D("mapOptions",r.mapOptions))},dependencies:[Ah,zP,Oa,$b,rd,C1,jMe],styles:[".market-details-overview-map-container[_ngcontent-%COMP%]{height:500px;position:relative}"]})}return t})();var Ent=(()=>{class t{_permissionResourcesService;_router;market;constructor(e,n){this._permissionResourcesService=e,this._router=n}delete(){this._permissionResourcesService.archive(tn.MARKET,this.market.id).pipe(ar(1)).subscribe(()=>this._router.navigate(["/markets"]))}edit(){this._router.navigate(["/markets",this.market.id,"edit"])}static \u0275fac=function(n){return new(n||t)(xe(Rm),xe(Ws))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-toolbar")(1,"span"),ee(2),M(),be(3,"span",0),O(4,"bd-resources-info-menu",1),te("deleteResource",function(){return r.delete()})("editResource",function(){return r.edit()}),M()()),n&2&&(E(2),Pt(r.market==null?null:r.market.name),E(2),D("resource",r.market))},dependencies:[zl,O5],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var Sui=()=>["/markets"];function wui(t,i){if(t&1){let e=qe();be(0,"ays-market-details-header",5),O(1,"p-tabs",6),jf("valueChange",function(r){se(e);let o=L();return Fg(o.activeTabIndex,r)||(o.activeTabIndex=r),le(r)}),O(2,"p-tablist")(3,"p-tab",7),ee(4,"\xDCbersicht"),M(),O(5,"p-tab",8),ee(6,"Trends"),M(),O(7,"p-tab",9),ee(8,"Bev\xF6lkerung"),M()(),O(9,"p-tabpanels")(10,"p-tabpanel",7)(11,"div",10),be(12,"ays-market-details-overview",5),M()(),O(13,"p-tabpanel",8)(14,"div",10),be(15,"ays-market-details-time-series",5),M()(),O(16,"p-tabpanel",9)(17,"div",2)(18,"div",11),ee(19,"Bev\xF6lkerungsentwicklung"),M(),O(20,"div"),be(21,"ays-market-population-total-chart",12),M(),O(22,"div",3)(23,"a",13),ee(24,"Details"),M()()()()()()}if(t&2){let e=L();D("market",e.market),E(),Gf("value",e.activeTabIndex),E(11),D("market",e.market),E(3),D("market",e.market),E(6),D("population",e.population)}}var Ant=(()=>{class t{_router;_activatedRoute;_marketService;market;population;loading$=new hi(1);activeTabIndex=hr("0");constructor(e,n,r){this._router=e,this._activatedRoute=n,this._marketService=r,Ec([this._activatedRoute.params,this._activatedRoute.queryParams]).pipe(ot(([o,a])=>pe(pe({},o),a))).subscribe(o=>this._onParamsChanged(o)),tu(()=>{let o=this.activeTabIndex();this._router.navigate([],{relativeTo:this._activatedRoute,queryParams:{activeTabIndex:o},queryParamsHandling:"merge"})})}_onParamsChanged(e){e.activeTabIndex&&this.activeTabIndex.set(e.activeTabIndex.toString()),e.marketId&&(this.loading$.next(ni.LOADING),this._marketService.findById(e.marketId).pipe(yo(n=>this._initMarket(n)),On(n=>this._marketService.transform([n.id],[{value:"postalCode"}]).pipe(ot(r=>r[n.id]),ot(r=>$e(pe({},n),{postalCodes:r.map(o=>o.label)})))),On(n=>this._marketService.getPopulation(n))).subscribe(n=>{this.population=n,this.loading$.next(ni.SUCCESS)}))}_initMarket(e){this.market=e}static \u0275fac=function(n){return new(n||t)(xe(Ws),xe(id),xe(Ap))};static \u0275cmp=re({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(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,wui,25,5,"ng-template",null,0,di),O(3,"div",2)(4,"div",3)(5,"button",4),ee(6," \xDCbersicht "),M()()()),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o),E(5),D("routerLink",Vr(3,Sui))}},dependencies:[fr,Ent,pXe,q2,lK,sK,b6,aK,Cp,Tnt,Int,Upe,so,Kr,Ms],encapsulation:2})}return t})();var Dnt=(()=>{class t{filter;filterChange=new ve;possiblePluginTypeDefinition=nb.TYPES;expressionConfig={[gf.Specification.type]:{virtualClinicIds:[],mode:"ONLY_GENERAL_FAB_KEYS"}};onExpressionChange(e){let n=this.filter?this.filter.clone():new nb;n.expression=e?e.clone():nb.EMPTY(),this.filterChange.emit(n)}onExpressionValueChange(e){let n=this.filter?this.filter.clone():new nb;n.expression=e,this.filterChange.emit(n)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"filter-condition-form",0),te("expressionChange",function(a){return r.onExpressionChange(a)})("expressionValueChange",function(a){return r.onExpressionValueChange(a)}),M()),n&2&&D("expression",r.filter.expression)("possiblePluginTypeDefinition",r.possiblePluginTypeDefinition)("expressionConfig",r.expressionConfig)},dependencies:[jpe],encapsulation:2})}return t})();var $pe=(()=>{class t{market;marketChanged=new ve;marketFilter=new nb;ngOnInit(){this.market.condition&&(this.marketFilter=new nb(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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"mat-form-field")(3,"mat-label"),ee(4,"Name"),M(),O(5,"input",1),te("ngModelChange",function(a){return r.onNameChanged(a)}),M()()(),be(6,"mat-divider"),O(7,"div",0)(8,"ays-market-filter-form-filter",2),te("filterChange",function(a){return r.onMarketFilterChange(a)}),M()()()),n&2&&(E(5),D("ngModel",r.market.name),E(3),D("filter",r.marketFilter))},dependencies:[mc,Oa,rd,hc,zs,oa,nd,yr,Bx,ra,ya,Cp,Id,Dnt],encapsulation:2})}return t})();function Iui(t,i){if(t&1){let e=qe();O(0,"ays-market-form",7),te("marketChanged",function(r){se(e);let o=L();return le(o.onMarketChange(r))}),M(),be(1,"mat-divider")}if(t&2){let e=L();D("market",e.market)}}function Tui(t,i){t&1&&(O(0,"div",3),be(1,"bd-message-empty",8),M())}var knt=(()=>{class t{location;_marketService;_router;_activatedRoute;market;loading$=new hi(1);_sub;constructor(e,n,r,o){this.location=e,this._marketService=n,this._router=r,this._activatedRoute=o,this._sub=this._activatedRoute.params.subscribe(a=>this._onParamsChange(a))}ngOnDestroy(){this._sub&&this._sub.unsubscribe()}onMarketChange(e){this.market=e}onSubmit(){this.loading$.next(ni.LOADING),this._marketService.update(this.market).pipe(ar(1)).subscribe({next:()=>{this.loading$.next(ni.SUCCESS),this._router.navigate(["/markets",this.market.id])},error:()=>this.loading$.next(ni.ERROR)})}_onParamsChange(e){let n=e.marketId;n?(this.loading$.next(ni.LOADING),this._marketService.findById(n).pipe(ar(1)).subscribe({next:r=>{this.market=r,this.loading$.next(ni.SUCCESS)},error:()=>this.loading$.next(ni.ERROR)})):this.loading$.next(ni.ERROR)}static \u0275fac=function(n){return new(n||t)(xe(Lg),xe(Ap),xe(Ws),xe(id))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div")(1,"bd-toolbar"),ee(2," Markt bearbeiten"),M(),be(3,"bd-loader",2),O(4,"div",3)(5,"div",4)(6,"button",5),te("click",function(){return se(o),le(r.onSubmit())}),O(7,"span"),ee(8,"Speichern"),M()(),O(9,"button",6),te("click",function(){return se(o),le(r.location.back())}),O(10,"span"),ee(11,"Abbrechen"),M()()()()(),ie(12,Iui,2,1,"ng-template",null,0,di)(14,Tui,2,0,"ng-template",null,1,di)}if(n&2){let o=Oi(13),a=Oi(15);E(3),D("loadItem",r.loading$)("successTemplate",o)("errorTemplate",a),E(3),D("disabled",!(!(r.market==null||r.market.condition==null)&&r.market.condition.valid()))}},dependencies:[zl,fr,so,Kr,$pe,Cp,Id,ec],encapsulation:2})}return t})();var Eui=()=>["/markets"];function Aui(t,i){if(t&1){let e=qe();O(0,"ays-market-form",6),te("marketChanged",function(r){se(e);let o=L();return le(o.onMarketChange(r))}),M(),be(1,"mat-divider")}if(t&2){let e=L();D("market",e.market)}}var Mnt=(()=>{class t{_marketService;_router;loading$=new hi(1);market=new zA(null,null,null,null,null,nb.EMPTY());marketForm=new Mu({nameCtrl:new ho(null,[La.required]),expressionValidCtrl:new ho(!1,[La.requiredTrue])});constructor(e,n){this._marketService=e,this._router=n}onMarketChange(e){this.market=e,this.marketForm.patchValue({nameCtrl:e.name,expressionValidCtrl:e.condition.valid()})}onSubmit(){this.loading$.next(ni.LOADING),this._marketService.create(this.market).pipe(ar(1)).subscribe(e=>{this._router.navigate(["markets",e.id])})}static \u0275fac=function(n){return new(n||t)(xe(Ap),xe(Ws))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"bd-toolbar"),ee(1," Neuen Markt erstellen"),M(),be(2,"bd-loader",1)(3,"mat-divider"),O(4,"div",2)(5,"div",3)(6,"button",4),te("click",function(){return se(o),le(r.onSubmit())}),O(7,"span"),ee(8,"Speichern"),M()(),O(9,"a",5)(10,"span"),ee(11,"Abbrechen"),M()()()(),ie(12,Aui,2,1,"ng-template",null,0,di)}if(n&2){let o=Oi(13);E(2),D("loadItem",r.loading$)("initTemplate",o),E(4),D("disabled",r.marketForm.invalid),E(3),D("routerLink",Vr(4,Eui))}},dependencies:[zl,fr,Cp,Id,so,Kr,Ms,$pe],encapsulation:2})}return t})();var Dui=()=>["/markets","new"];function kui(t,i){if(t&1&&be(0,"bd-resources-list",10),t&2){let e=L();D("resources",e.markets)("options",e.resourceListOptions)}}function Mui(t,i){t&1&&be(0,"bd-resources-list-loading")}function Oui(t,i){t&1&&be(0,"bd-message-empty",11)}var Ont=(()=>{class t{_marketService;helpButtonOptions=cae;resourceListOptions=mit;loading$=new hi(1);markets;constructor(e){this._marketService=e}ngOnInit(){this.loading$.next(ni.LOADING),this._marketService.findAll().subscribe({next:e=>{this.markets=e,this.loading$.next(ni.SUCCESS)},error:()=>{this.loading$.next(ni.ERROR)}})}static \u0275fac=function(n){return new(n||t)(xe(Ap))};static \u0275cmp=re({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(n,r){if(n&1&&(O(0,"bd-toolbar")(1,"span",3),ee(2,"M\xE4rkte"),M(),be(3,"bd-help-button",4),M(),O(4,"div",5),be(5,"bd-loader",6),M(),O(6,"div",7)(7,"div",8)(8,"a",9),ee(9,"Neuen Markt erstellen"),M()()(),ie(10,kui,1,2,"ng-template",null,0,di)(12,Mui,1,0,"ng-template",null,1,di)(14,Oui,1,0,"ng-template",null,2,di)),n&2){let o=Oi(11),a=Oi(13),c=Oi(15);E(3),D("options",r.helpButtonOptions),E(2),D("loadItem",r.loading$)("successTemplate",o)("customLoadingTemplate",a)("errorTemplate",c),E(3),D("routerLink",Vr(6,Dui))}},dependencies:[zl,tF,fr,so,Kr,Ms,Q$,pae,ec],encapsulation:2})}return t})();var Rui=[{path:"new",component:Mnt,data:{pageTitle:bu.title("Markt erstellen")},canActivate:[Rc]},{path:":marketId",children:[{path:"",pathMatch:"full",component:Ant,canActivate:[Rc]},{path:"edit",component:knt,canActivate:[Rc]},{path:"population",component:Cnt,canActivate:[Rc]}]},{path:"",pathMatch:"full",component:Ont,canActivate:[Rc],data:{pageTitle:bu.title("M\xE4rkte")}}],E1o=Yf.forChild(Rui);function Pui(t,i){t&1&&(O(0,"div",21),be(1,"bd-message-empty",22),M())}function Nui(t,i){t&1&&(O(0,"tr"),be(1,"th"),M())}function Fui(t,i){if(t&1&&(ee(0),Dr(1,"administrativeDistrict"),Dr(2,"async")),t&2){let e,n=L().$implicit;gn(" ",((e=ca(2,3,ca(1,1,n.node.data)))==null?null:e.displayName())||n.node.key," ")}}function Lui(t,i){if(t&1&&(ee(0),Dr(1,"postalCode"),Dr(2,"async")),t&2){let e=L().$implicit;Pd(" ",e.node.data," ",ca(2,5,gl(1,2,e.node.data,"FIRST"))," ")}}function Bui(t,i){if(t&1&&(O(0,"tr",26)(1,"td"),be(2,"p-treeTableToggler",27)(3,"p-treeTableCheckbox",28),yt(4,Fui,3,5),yt(5,Lui,3,7),M()()),t&2){let e=i.$implicit;D("ttRow",e),E(2),D("rowNode",e),E(),D("value",e),E(),vt(e.node.type==="administrativeDistrict"?4:-1),E(),vt(e.node.type==="postalCode"?5:-1)}}function Vui(t,i){if(t&1){let e=qe();O(0,"p-treeTable",23),te("selectionKeysChange",function(r){se(e);let o=L();return le(o.onNodeKeySelection(r))}),ie(1,Nui,2,0,"ng-template",24)(2,Bui,6,5,"ng-template",25),M()}if(t&2){let e=L();D("value",e.nodes)("selectionKeys",e.selectionKeys)}}var Rnt=(()=>{class t{dialogRef;_postalCodeService;_cdr;loading$=new hi(1);nodes=[];postalCodesSelection=[];selectionKeys={};clinic;coordinates;radiusInKilometer=25;mostlyInRange=!0;constructor(e,n,r,o){this.dialogRef=n,this._postalCodeService=r,this._cdr=o,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 n={};e.forEach(r=>{let o=this._createPostalCodeNode(r);n[o.key]={checked:!0,partialChecked:!1};let a=this.nodes.find(c=>c.type==="administrativeDistrict"&&c.children.some(m=>m.key===o.key));if(a){let c=a.children.every(m=>Object.keys(this.selectionKeys).includes(m.key));n[a.key]={partialChecked:!c,checked:c}}}),this.selectionKeys=JSON.parse(JSON.stringify(n)),this._cdr.markForCheck()}onQueryPostalCodesChange(e){this._postalCodeService.findAll(e,"FIRST").pipe(ot(n=>{let r={};return Object.keys(n).map(o=>{let a=n[o],c=io.createFromNumber(a.administrativeDistrictId);r[c.value]?r[c.value].push(o):r[c.value]=[o]}),r})).subscribe(n=>{this.nodes=Object.keys(n).map(r=>{let o=this._createDistrictNode(r);return o.children=n[r].map(a=>this._createPostalCodeNode(a)),o}),this.loading$.next(ni.SUCCESS)})}onNodeKeySelection(e){this.postalCodesSelection=Object.keys(e).map(n=>t._keyToNode(n,this.nodes)).filter(n=>n.type==="postalCode").map(n=>n.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(ni.LOADING)}_createDistrictNode(e){return{type:"administrativeDistrict",data:io.createFromString(e),key:`administrativeDistrict_${e}`}}_createPostalCodeNode(e){return{type:"postalCode",data:e,key:`postalCode_${e}`}}static _keyToNode(e,n){let r;return n.forEach(o=>{o.key===e&&(r=o),!r&&o.children&&o.children.length>0&&(r=this._keyToNode(e,o.children))}),r}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El),xe(pg),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"ays-clinic-select",6),te("clinicSelect",function(c){return se(o),le(r.onClinicSelect(c))}),M()(),O(6,"div",7)(7,"div",2)(8,"span",8),ee(9),M(),O(10,"div",3)(11,"mat-slider",9)(12,"input",10),te("valueChange",function(c){return se(o),le(r.onRadiusChange(c))}),M()()()()(),O(13,"div",7)(14,"div",11)(15,"div",3)(16,"mat-checkbox",12),te("change",function(c){return se(o),le(r.onMostlyInRangeChange(c))}),ee(17," Randgebiete ausschlie\xDFen "),M()(),O(18,"div",13)(19,"button",14)(20,"mat-icon"),ee(21,"info"),M()()()()()()(),O(22,"div",3)(23,"div",15)(24,"div",3)(25,"ays-market-geographic-distance-selection",16),te("postalCodesSelectionChange",function(c){return se(o),le(r.onPostalCodesSelectionChange(c))})("possiblePostalCodesChange",function(c){return se(o),le(r.onQueryPostalCodesChange(c))}),M()(),O(26,"div",3),be(27,"bd-loader",17),M()()()()(),O(28,"div",18)(29,"button",19),te("click",function(){return se(o),le(r.dialogRef.close())}),ee(30,"Abbrechen"),M(),O(31,"button",20),te("click",function(){return se(o),le(r.onSubmit())}),ee(32," Importieren "),M()(),ie(33,Pui,2,0,"ng-template",null,0,di)(35,Vui,3,2,"ng-template",null,1,di)}if(n&2){let o=Oi(34),a=Oi(36);E(9),gn("Distanz ",r.radiusInKilometer," km"),E(2),D("max",100)("min",0)("step",1)("discrete",!0),E(),D("ngModel",r.radiusInKilometer),E(4),D("checked",r.mostlyInRange),E(9),D("coordinates",r.coordinates)("distanceInKilometer",r.radiusInKilometer)("postalCodesSelection",r.postalCodesSelection)("mostlyInRange",r.mostlyInRange),E(2),D("loadItem",r.loading$)("successTemplate",a)("initTemplate",o),E(4),D("disabled",!r.postalCodesSelection||r.postalCodesSelection.length===0)}},dependencies:[o8,Vpe,Bpe,UQ,ra,nd,yr,ya,wy,cg,so,Kr,il,Xf,Ld,da,zr,mnt,fr,ec,M8,BC,Tr,k8,D8,A8,xI,p8,Dc],styles:["mat-slider[_ngcontent-%COMP%]{width:80%}"]})}return t})();function zui(t,i){if(t&1&&(O(0,"span",3),ee(1),M(),O(2,"p-accordion",4)(3,"p-accordion-panel")(4,"p-accordion-header"),ee(5),M(),O(6,"p-accordion-content")(7,"div"),be(8,"bd-maps-administrative-district-ids-list",5),M()()(),O(9,"p-accordion-panel")(10,"p-accordion-header"),ee(11),M(),O(12,"p-accordion-content")(13,"div"),be(14,"bd-maps-postal-codes-list",6),M()()()()),t&2){let e=L();E(),Pt(e.displayText),E(),D("multiple",!0),E(3),gn(" ",(e.value==null?null:e.value.administrativeDistricts.length)+" Landkreise"," "),E(3),D("administrativeDistrictIds",e.value.administrativeDistricts),E(3),gn(" ",(e.value==null?null:e.value.postalCodes.length)+" Postleitzahlen"," "),E(3),D("postalCodes",e.value.postalCodes)}}function Uui(t,i){t&1&&be(0,"bd-message-empty",0)}var Pnt=(()=>{class t extends Xo{_dialogService;_cdr;_clinicService;plugin;pluginValid;pluginChange=new ve;displayText;value=null;constructor(e,n,r){super(),this._dialogService=e,this._cdr=n,this._clinicService=r}ngOnChanges(){this.displayText=this.plugin.toText(),this._update(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Bereiche \xFCber Distanz importieren",data:this.value}),r=this._dialogService.open(Rnt,n).onClose.pipe(ar(1),vn(o=>!!o)).subscribe(o=>{this._update(o),this.plugin=new WL(o.coordinate,o.value,o.clinicId.clone(),[...o.administrativeDistricts.map(a=>a.clone())],[...o.postalCodes]),this.pluginChange.emit(this.plugin.clone())});this._subs.push(r)}_update(e){this.value=e,this.value.clinicId?this._clinicService.get(this.value.clinicId).subscribe(n=>{this.displayText=`Auswahl Bereiche um ${n.name} (SN: ${n.id.sn}, ${n.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 \u0275fac=function(n){return new(n||t)(xe(To),xe(dn),xe(tb))};static \u0275cmp=re({type:t,selectors:[["filter-condition-geo-parts-by-distance-around-clinic-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Tt,Yt],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(n,r){n&1&&(yt(0,zui,15,6)(1,Uui,1,0,"bd-message-empty",0),O(2,"div",1)(3,"button",2),te("click",function(a){return r.edit(a)}),ee(4," Distanz bearbeiten "),M()()),n&2&&vt(r.value!=null&&r.value.coordinate?0:1)},dependencies:[xce,aI,yA,cL,dL,NA,FA,Kr,ec],encapsulation:2})}return t})();var Nnt=(()=>{class t{plugin;pluginValid;pluginConfig={inlierTypeOptions:["OUTLIER_SHORT_STAY","INLIER","OUTLIER_LONG_STAY","UNKNOWN"]};pluginChange=new ve;config={selectLabel:"Verweildauer",resetOption:!1,valid$:new hi(1),option:{sortFnc:(e,n)=>e.inlierType.localeCompare(n.inlierType),uniqueFnc:e=>e.inlierType,searchOptionAccessor:e=>e.displayName}};inlierTypeOptions=dl;initial;ngOnInit(){this.plugin&&this.plugin.valid()&&(this.initial={inlierType:this.plugin.toValue(),displayName:cI[this.plugin.toValue()]}),this.pluginConfig&&this.pluginConfig.inlierTypeOptions?this.inlierTypeOptions=$t(this.pluginConfig.inlierTypeOptions.map(e=>({inlierType:e,displayName:cI[e]}))):this.inlierTypeOptions=$t(Object.keys(cI).map(e=>({inlierType:e,displayName:cI[e]})))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onInlierTypeChange(e){this.pluginChange.emit(new zW(e.inlierType))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-inlier-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onInlierTypeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.inlierTypeOptions)("initialSelection",r.initial)},dependencies:[Va],encapsulation:2})}return t})();var Fnt=(()=>{class t{plugin;pluginValid;pluginConfig={inlierTypeOptions:["OUTLIER_SHORT_STAY","INLIER","OUTLIER_LONG_STAY","UNKNOWN"]};pluginChange=new ve;config={selectLabel:"Verweildauer",valid$:new hi(1),option:{sortFnc:(e,n)=>e.inlierType.localeCompare(n.inlierType),uniqueFnc:e=>e.inlierType,searchOptionAccessor:e=>e.displayName}};inlierTypeOptions=dl;initial;ngOnInit(){this.plugin&&this.plugin.valid()&&(this.initial=this.plugin.toValue().map(e=>({inlierType:e,displayName:cI[e]}))),this.pluginConfig&&this.pluginConfig.inlierTypeOptions?this.inlierTypeOptions=$t(this.pluginConfig.inlierTypeOptions.map(e=>({inlierType:e,displayName:cI[e]}))):this.inlierTypeOptions=$t(Object.keys(cI).map(e=>({inlierType:e,displayName:cI[e]})))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onInlierTypeChange(e){this.pluginChange.emit(new G6([...e.map(n=>n.inlierType)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-inlier-types"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onInlierTypeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.inlierTypeOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Lnt=(()=>{class t{_virtualClinicService;_leistungsgruppen$;constructor(e){this._virtualClinicService=e}leistungsgruppen(){return this._leistungsgruppen$||(this._leistungsgruppen$=new hi(1),this._virtualClinicService.khtgLeistungsgruppen().subscribe({next:e=>this._leistungsgruppen$?.next(e),error:e=>this._leistungsgruppen$?.error(e)})),this._leistungsgruppen$.asObservable()}static \u0275fac=function(n){return new(n||t)(ai(Cc))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Gui=()=>["key","displayName.de"];function jui(t,i){if(t&1){let e=qe();O(0,"div",11)(1,"p-iconfield",12)(2,"p-inputicon"),be(3,"i",13),M(),O(4,"input",14),te("input",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.target.value,"contains"))}),M()()()}}function $ui(t,i){t&1&&(O(0,"tr")(1,"th",15),be(2,"p-tableHeaderCheckbox"),M(),O(3,"th"),ee(4,"ID"),M(),O(5,"th"),ee(6,"Name"),M()())}function qui(t,i){if(t&1&&(O(0,"tr")(1,"td"),be(2,"p-tableCheckbox",16),M(),O(3,"td"),ee(4),M(),O(5,"td"),ee(6),M()()),t&2){let e=i.$implicit,n=L(2);E(2),D("value",e),E(2),Pt(e.key),E(2),Pt(e.displayName[n.locale])}}function Yui(t,i){if(t&1){let e=qe();O(0,"p-table",8,1),te("selectionChange",function(r){se(e);let o=L();return le(o.updateSelection(r))}),ie(2,jui,5,0,"ng-template",null,2,di)(4,$ui,7,0,"ng-template",9)(5,qui,7,3,"ng-template",10),M()}if(t&2){let e=L();D("value",e.leistungsgruppen)("selection",e.selectedLeistungsgruppen)("globalFilterFields",Vr(3,Gui))}}var Bnt=(()=>{class t{locale;ref;_leistungsgruppenCache;loading$=new hi(1);selection=[];selectedLeistungsgruppen;leistungsgruppen;constructor(e,n,r,o){this.locale=n,this.ref=r,this._leistungsgruppenCache=o,this.loading$.next(ni.LOADING),this.selection=e.data.selection}ngOnInit(){this._leistungsgruppenCache.leistungsgruppen().pipe(ar(1)).subscribe(e=>{this.leistungsgruppen=e,this.selectedLeistungsgruppen=e.filter(n=>this.selection.includes(n.key)),this.loading$.next(ni.SUCCESS)})}updateSelection(e){this.selectedLeistungsgruppen=e,this.selection=e.map(n=>n.key)}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(xm),xe(El),xe(Lnt))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div",3),be(1,"bd-loader",4),O(2,"div",5)(3,"button",6),te("click",function(){return se(o),le(r.ref.close())}),ee(4,"Abbrechen"),M(),O(5,"button",7),te("click",function(){return se(o),le(r.ref.close(r.selection))}),ee(6," \xDCbernehmen "),M()()(),ie(7,Yui,6,4,"ng-template",null,0,di)}if(n&2){let o=Oi(8);E(),D("loadItem",r.loading$)("successTemplate",o),E(4),D("disabled",!r.selection)}},dependencies:[fr,so,Kr,wC,Tr,Td,rc,Mw,Ow,tM,iM,_p],encapsulation:2})}return t})();function Kui(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var Vnt=(()=>{class t{_dialogService;plugin;pluginValid;pluginChange=new ve;displayValue="";_leistungsgruppen=[];constructor(e){this._dialogService=e}ngOnChanges(e){e.plugin&&(this._leistungsgruppen=this.plugin.toValue(),this.displayValue=this.plugin.toText())}openEditDialog(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"KHTG Leistungsgruppen",data:{selection:[...this._leistungsgruppen]}});this._dialogService.open(Bnt,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this.onSelectionChange(r)})}onSelectionChange(e){Ni.equals(this._leistungsgruppen,e)||(this._leistungsgruppen=[...e],this.plugin=new OA([...e]),this.pluginChange.emit(this.plugin.clone()),this.displayValue=this.plugin.toText())}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-khtg-leistungsgruppen"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Yt],decls:5,vars:5,consts:[["matInput","","placeholder","KHTG Leistungsgruppen",3,"click","value","readonly"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.openEditDialog(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,Kui,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayValue)("readonly",!0),E(3),vt(r.pluginValid?-1:4))},dependencies:[Oa,zr,zs,km,yp],encapsulation:2})}return t})();var znt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Versorgungsstufe",valid$:new hi(1),option:{sortFnc:(e,n)=>e.medicalCareLevel.localeCompare(n.medicalCareLevel),uniqueFnc:e=>e.medicalCareLevel,searchOptionAccessor:e=>e.displayName}};options=$t([{medicalCareLevel:pI.BASIC_REGULAR_PROVIDER,displayName:EL[pI.BASIC_REGULAR_PROVIDER]},{medicalCareLevel:pI.FOCUS_PROVIDER,displayName:EL[pI.FOCUS_PROVIDER]},{medicalCareLevel:pI.SPECIALIZED_HOSPITAL,displayName:EL[pI.SPECIALIZED_HOSPITAL]},{medicalCareLevel:pI.MAXIMUM_PROVIDER,displayName:EL[pI.MAXIMUM_PROVIDER]}]);initial;ngOnInit(){this.initial=this.plugin.toValue().map(e=>({medicalCareLevel:e,displayName:EL[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onMedicalCareLevelChange(e){this.pluginChange.emit(new qK([...e.map(n=>n.medicalCareLevel)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-medical-care-level"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[["data-test","virtual-clinic-analysis-medical-care-level-selection",3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onMedicalCareLevelChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Unt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Universit\xE4ten",valid$:new hi(1),resetOption:!0,option:{sortFnc:(e,n)=>e.clinicUniversityType.localeCompare(n.clinicUniversityType),uniqueFnc:e=>e.clinicUniversityType,searchOptionAccessor:e=>e.displayName}};options=$t([{clinicUniversityType:Xv.WITH_UNIVERSITIES,displayName:E6[Xv.WITH_UNIVERSITIES]},{clinicUniversityType:Xv.WITHOUT_UNIVERSITIES,displayName:E6[Xv.WITHOUT_UNIVERSITIES]},{clinicUniversityType:Xv.ONLY_UNIVERSITIES,displayName:E6[Xv.ONLY_UNIVERSITIES]}]);initial;ngOnChanges(e){e.plugin&&(this.initial=this.plugin&&this.plugin.toValue()?{clinicUniversityType:this.plugin.toValue(),displayName:E6[this.plugin.toValue()]}:void 0),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid,errorMessage:this.plugin.validationToText()})}onUniversityTypeChange(e){this.pluginChange.emit(new zL(e?e.clinicUniversityType:null))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-university-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onUniversityTypeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Va],encapsulation:2})}return t})();var Hnt=(()=>{class t extends OO{_cdr;virtualClinicId;constructor(e,n){super(n),this._cdr=e,this.virtualClinicId=n.virtualClinicId}onExpressionChange(e){this.expressionChange$.next(e)}onExpressionValueChange(e){this.expressionValueChange$.next(e)}static \u0275fac=function(n){return new(n||t)(xe(dn),xe("FILTER_CONDITION_FORM_DATA"))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Tt],decls:1,vars:4,consts:[[3,"expressionChange","expressionValueChange","expression","expressionConfig","possiblePluginTypes","virtualClinicId"]],template:function(n,r){n&1&&(O(0,"filter-condition-common-form",0),te("expressionChange",function(a){return r.onExpressionChange(a)})("expressionValueChange",function(a){return r.onExpressionValueChange(a)}),M()),n&2&&D("expression",r.expression)("expressionConfig",r.expressionConfig)("possiblePluginTypes",r.possiblePluginTypes)("virtualClinicId",r.virtualClinicId)},dependencies:[nnt],encapsulation:2,changeDetection:0})}return t})();function Wui(t,i){}var jpe=(()=>{class t{_authenticationService;_permissionService;_cdr;expression;possiblePluginTypeDefinition=[];expressionConfig={};virtualClinicId;expressionChange=new ve;expressionValueChange=new ve;loading$=new hi(1);portal;pluginFormComponent=Hnt;_initialExpression$=new hi(1);_currentExpression;_possiblePluginTypes$=new hi(1);constructor(e,n,r){this._authenticationService=e,this._permissionService=n,this._cdr=r,Ec([this._initialExpression$.pipe(vm((o,a)=>Pa.equals(o,a)),vn(o=>!Pa.equals(o,this._currentExpression))),this._possiblePluginTypes$]).subscribe(o=>{console.debug("START FILTER SYSTEM",o[0]),this.portal&&this.portal.detach(),this.loading$.next(ni.SUCCESS),this.portal=new qh(Fpe,void 0,Ir.create({providers:[{provide:"FILTER_CONDITION_FORM_DATA",useValue:{expressionConfig:this.expressionConfig,virtualClinicId:this.virtualClinicId,possiblePluginTypes:o[1],pluginFormComponent:this.pluginFormComponent}}]})),this._cdr.markForCheck()})}ngOnInit(){this.loading$.next(ni.LOADING),this._authenticationService.authentication$.pipe(On(e=>e?this._permissionService.getPermissions().pipe(ot(n=>({authenticated:e,permissions:n}))):$t({authenticated:e,permissions:[]}))).subscribe({next:e=>{let n=this.possiblePluginTypeDefinition.filter(r=>r.needsAuthentication?e.authenticated===r.needsAuthentication:!0).filter(r=>r.permissions?r.permissions.every(o=>e.permissions.includes(o)):!0).map(r=>r.specification);this._possiblePluginTypes$.next(n)},error:e=>{console.error("FilterConditionFormComponent",e),this.loading$.next(ni.ERROR)}})}ngOnChanges(e){e.expression&&this._initialExpression$.next(this.expression.clone())}onAttached(e){e.onDestroy(()=>this._currentExpression=null);let n=e.instance;n.init(this.expression.clone()),n.expressionChange$.subscribe(r=>{r?this._currentExpression=r.clone():this._currentExpression=r,this.expressionChange.emit(r)}),n.expressionValueChange$.pipe(Hh(500)).subscribe(r=>{this._currentExpression=r.clone(),this.expressionValueChange.emit(r.clone())})}static \u0275fac=function(n){return new(n||t)(xe(em),xe(WN),xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form"]],inputs:{expression:"expression",possiblePluginTypeDefinition:"possiblePluginTypeDefinition",expressionConfig:"expressionConfig",virtualClinicId:"virtualClinicId"},outputs:{expressionChange:"expressionChange",expressionValueChange:"expressionValueChange"},features:[Yt],decls:3,vars:3,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"attached","cdkPortalOutlet"]],template:function(n,r){if(n&1){let o=qe();be(0,"bd-loader",1),ie(1,Wui,0,0,"ng-template",2,0,di),te("attached",function(c){return se(o),le(r.onAttached(c))})}if(n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o),E(),D("cdkPortalOutlet",r.portal)}},dependencies:[Vg,Gp,fr],encapsulation:2,changeDetection:0})}return t})();var Qui=t=>({expressionText:t,expressionPadding:!1}),Zui=(t,i,e)=>({"pl-4":t,"list-disc":i,"list-none":e}),Gnt=t=>({text:t}),jnt=t=>({expressionText:t,expressionPadding:!0});function Xui(t,i){if(t&1&&ee(0),t&2){let e=L(2).$implicit;gn(" ",e.kind," ")}}function Jui(t,i){if(t&1&&(O(0,"li"),yt(1,Xui,1,1),Li(2,2),M()),t&2){let e=L(),n=e.$implicit,r=e.$index;L(2);let o=Oi(4);E(),vt(r!==0?1:-1),E(),D("ngTemplateOutlet",o)("ngTemplateOutletContext",Yi(3,Gnt,n.expressionText))}}function epi(t,i){t&1&&(O(0,"i"),ee(1,"keine weiteren Filter"),M())}function tpi(t,i){if(t&1&&Li(0,2),t&2){let e=L(3).$implicit;L(2);let n=Oi(4);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,Gnt,e.expressionText[0].expressionText))}}function ipi(t,i){if(t&1&&Li(0,2),t&2){let e=L(3).$implicit;L(2);let n=Oi(2);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,jnt,e.expressionText[0].expressionText))}}function npi(t,i){if(t&1&&yt(0,tpi,1,4,"ng-container",2)(1,ipi,1,4,"ng-container",2),t&2){let e=L(2).$implicit,n=L(2);vt(n.isSimpleText(e.expressionText[0].expressionText)?0:1)}}function rpi(t,i){if(t&1&&Li(0,2),t&2){let e=L(2).$implicit;L(2);let n=Oi(2);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,jnt,e.expressionText))}}function opi(t,i){if(t&1&&(O(0,"li"),ee(1),yt(2,epi,2,0,"i"),yt(3,npi,2,1),yt(4,rpi,1,4,"ng-container",2),M()),t&2){let e=L(),n=e.$implicit,r=e.$index;E(),gn(" ",r!==0?n.kind:null," "),E(),vt(n.expressionText.length===0?2:-1),E(),vt(n.expressionText.length===1?3:-1),E(),vt(n.expressionText.length>1?4:-1)}}function api(t,i){if(t&1&&(yt(0,Jui,3,5,"li"),yt(1,opi,5,4,"li")),t&2){let e=i.$implicit,n=L(2);vt(n.isSimpleText(e.expressionText)?0:-1),E(),vt(n.isSimpleText(e.expressionText)?-1:1)}}function spi(t,i){if(t&1&&(O(0,"ul",3),Qo(1,api,2,2,null,null,ms),M()),t&2){let e=i.expressionText,n=i.expressionPadding;D("ngClass",Qu(1,Zui,n,n,!n)),E(),Zo(e)}}function lpi(t,i){if(t&1&&(O(0,"b"),ee(1),M()),t&2){let e=i.text;E(),Pt(e)}}var jMe=(()=>{class t{_cdr;expression;filterText="";constructor(e){this._cdr=e}ngOnChanges(e){e.expression&&(this.filterText=Pa.formatter(this.expression),this._cdr.markForCheck())}isSimpleText(e){return typeof e=="string"}static \u0275fac=function(n){return new(n||t)(xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-expression-show"]],inputs:{expression:"expression"},features:[Yt],decls:5,vars:4,consts:[["expressionTpl",""],["pluginTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"list-inside",3,"ngClass"]],template:function(n,r){if(n&1&&(Li(0,2),ie(1,spi,3,5,"ng-template",null,0,di)(3,lpi,2,1,"ng-template",null,1,di)),n&2){let o=Oi(2);D("ngTemplateOutlet",o)("ngTemplateOutletContext",Yi(2,Qui,r.filterText))}},dependencies:[Jr,qa,rr],encapsulation:2,changeDetection:0})}return t})();var $nt=(()=>{class t extends Xo{ref;_config;_cdr;selection=new Jf(!0);selectionCopy=[];csvImportConfig={title:"CSV-Datei",columnDefinitions:[{fieldName:"Postleitzahl",displayName:"Postleitzahl",explanation:["5-stellige Postleitzahl"],validationFnc:e=>n_.isNumber(e)}]};constructor(e,n,r){super(),this.ref=e,this._config=n,this._cdr=r,this._subs.push(this.selection.changed.subscribe(o=>{this.selectionCopy=JSON.parse(JSON.stringify(o.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){Ni.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(n=>n[0]))}static \u0275fac=function(n){return new(n||t)(xe(El),xe(zc),xe(dn))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Tt],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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"div",1)(3,"bd-maps-postal-codes-map-selection",2),te("selectedPostalCodesChange",function(a){return r.onSelectedPostalCodesChange(a)}),M()(),O(4,"div",1)(5,"div")(6,"div")(7,"div",3)(8,"div",1)(9,"div")(10,"bd-postal-code-autocomplete",4),te("postalCodeSelect",function(a){return r.onSelectedPostalCode(a)}),M()()(),O(11,"div")(12,"bd-csv-import-file-button",5),te("inputChange",function(a){return r.onCsvImport(a)}),M()()()(),O(13,"div")(14,"bd-maps-postal-codes-list",6),te("postalCodesChange",function(a){return r.onSelectedPostalCodesChange(a)}),M()()()()()(),O(15,"div",7)(16,"button",8),te("click",function(){return r.ref.close()}),ee(17,"Abbrechen"),M(),O(18,"button",9),te("click",function(){return r.ref.close(r.selectionCopy)}),ee(19," \xDCbernehmen "),M()()),n&2&&(E(3),D("selectedPostalCodes",r.selectionCopy),E(9),D("config",r.csvImportConfig),E(2),D("postalCodes",r.selectionCopy))},dependencies:[bMe,Yke,v6,FA,so,Kr],encapsulation:2})}return t})();var qnt=mp(Lw());var cpi=()=>({"min-width":"50rem"}),dpi=()=>[5,10,20];function upi(t,i){t&1&&(O(0,"div",13)(1,"div",14),be(2,"p-skeleton"),M(),O(3,"div",14),be(4,"p-skeleton"),M()())}function ppi(t,i){t&1&&(O(0,"tr"),be(1,"th",21),O(2,"th"),ee(3,"Bereich"),M(),O(4,"th",22),ee(5,"Anzahl F\xE4lle (Anteil)"),M()())}function mpi(t,i){if(t&1&&(O(0,"tr",23)(1,"td",24),be(2,"p-treeTableToggler",25)(3,"p-treeTableCheckbox",26),M(),O(4,"td"),ee(5),M(),O(6,"td",22),ee(7),Dr(8,"number"),Dr(9,"percent"),M()()),t&2){let e=i.$implicit,n=i.rowData;D("ttRow",e)("ttSelectableRow",e),E(2),D("rowNode",e),E(),D("value",e),E(2),gn(" ",n.name," "),E(2),Pd(" ",ca(8,7,n.count)," (",ca(9,9,n.percentage),") ")}}function hpi(t,i){if(t&1){let e=qe();O(0,"div",13)(1,"div",14)(2,"div",15)(3,"bd-map",16),te("mapLoaded",function(r){se(e);let o=L();return le(o.onMapLoaded(r))})("mapClick",function(r){se(e);let o=L();return le(o.onMapClick(r))}),M(),be(4,"bd-map-legend",17),M()(),O(5,"div",14)(6,"p-treeTable",18),te("selectionKeysChange",function(r){se(e);let o=L();return le(o.onTreeTableSelectionChange(r))}),ie(7,ppi,6,0,"ng-template",19)(8,mpi,10,11,"ng-template",20),M()()()}if(t&2){let e=L();E(3),D("mapOptions",e.mapOptions),E(),D("controller",e.mapController),E(2),D("value",e.treeNodes)("tableStyle",Vr(8,cpi))("paginator",!0)("rows",10)("rowsPerPageOptions",Vr(9,dpi))("selectionKeys",e.selectionKeys)}}var Ynt=(()=>{class t{ref;_cdr;_virtualClinicService;_postalCodesService;mapOptions=$e(pe({},rg),{style:"mapbox://styles/mapbox/light-v11"});loading$=new hi(1);virtualClinicAddress;virtualClinicSelectionCtrl=new ho(null,La.required);treeNodes=[];map;mapController=new vh;colorFactory=new rC(new ua("hsl(120, 100%, 50%)"));selection=new Jf(!0,[],!0);selectionKeys={};_postalCodesLayer;_selectionLayer=new wI("selection",{layerId:ng.id,highlightLayerId:r1.id,sourceId:Mv,displayName:"Auswahl"});constructor(e,n,r,o){this.ref=e,this._cdr=n,this._virtualClinicService=r,this._postalCodesService=o;let a=new EB;a.displayName="Anzahl Patienten pro Postleitzahl",this._postalCodesLayer=new AB("postalCodes",a,this._postalCodesService),this._postalCodesLayer.colorFactory$.next(this.colorFactory),this.mapController.registerLayer(this._postalCodesLayer),this.mapController.registerLayer(this._selectionLayer),this.selection.changed.subscribe(c=>{this._selectionLayer.selection.setSelection(...c.source.selected)}),this._selectionLayer.selection.changed.subscribe(c=>{Ni.equals(this.selection.selected,c.source.selected)||(this.selectionKeys={},c.source.selected.forEach(m=>{let g=`p-${m}`,C=this.treeNodes.find(w=>w.children.find(P=>P.key===m));C&&(this.selectionKeys[C.key]={checked:!1,partialChecked:!0}),this.selectionKeys[g]={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(n=>n.startsWith("p")).map(n=>n.slice(2)))}_applyAddressMarker(){if(this.virtualClinicAddress){let e={lng:this.virtualClinicAddress.location[0],lat:this.virtualClinicAddress.location[1]};this.map.setCenter(e),new qnt.Marker({color:"black"}).setLngLat(e).addTo(this.map)}}_onVirtualClinicSelect(e){e.virtualClinic.address&&e.virtualClinic.address.location?this.virtualClinicAddress=new Bu(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(ni.INIT)}_setPatientsByAdministrativeDistricts(e){this.loading$.next(ni.LOADING),this._virtualClinicService.patientsByAdministrativeDistricts(e.virtualClinic.id,new py([e.year],null)).subscribe({next:n=>{let r=n.data.map(o=>o.total).reduce((o,a)=>o+a,0);this.treeNodes=n.data.map(o=>({key:`ad-${o.adId}`,type:"district",data:{dataKey:`ad-${o.adId}`,value:io.create(o.adId),count:n.patientCount[o.adId].count,percentage:n.patientCount[o.adId].percentage,name:o.name},children:o.children?.map(a=>({key:a.postalCode,type:"postalCode",data:{dataKey:`p-${a.postalCode}`,value:a.postalCode,count:n.postalCodeLayerData[a.postalCode],percentage:n.postalCodeLayerData[a.postalCode]/r,name:a.name}}))})),this._postalCodesLayer.data$.next(n.postalCodeLayerData),this.loading$.next(ni.SUCCESS)},error:n=>{console.error(n),this.loading$.next(ni.ERROR)}})}static \u0275fac=function(n){return new(n||t)(xe(El),xe(dn),xe(Cc),xe(pg))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],features:[Ii([GT,V_])],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(n,r){if(n&1){let o=qe();O(0,"div")(1,"mat-horizontal-stepper",2),te("selectionChange",function(c){return se(o),le(r.onStepChange(c))}),O(2,"mat-step",3)(3,"div",4)(4,"ays-virtual-clinic-structural-select",5),te("selectionChange",function(c){return se(o),le(r.onVirtualClinicSelectionChange(c))}),M()(),O(5,"div",6)(6,"button",7),ee(7," Postleitzahlen ausw\xE4hlen "),M(),O(8,"button",8),te("click",function(){return se(o),le(r.ref.close())}),ee(9,"Abbrechen"),M()()(),O(10,"mat-step",9)(11,"div",10),be(12,"bd-loader",11),O(13,"div",6)(14,"button",12),te("click",function(){return se(o),le(r.ref.close(r.selection.selected))}),ee(15," \xDCbernehmen "),M(),O(16,"button",8),te("click",function(){return se(o),le(r.ref.close())}),ee(17,"Abbrechen"),M()()(),ie(18,upi,5,0,"ng-template",null,0,di)(20,hpi,9,10,"ng-template",null,1,di),M()()()}if(n&2){let o=Oi(19),a=Oi(21);E(),D("linear",!0),E(),D("stepControl",r.virtualClinicSelectionCtrl),E(2),D("withSpecialtyDepartment",!1),E(2),D("disabled",r.virtualClinicSelectionCtrl.invalid),E(6),D("loadItem",r.loading$)("successTemplate",a)("customLoadingTemplate",o)}},dependencies:[Ppe,zQ,oa,Spe,Npe,Kr,fr,cC,kv,Tr,Ah,b0,M8,BC,k8,D8,dnt,A8,V_,GT],styles:[".map-wrapper[_ngcontent-%COMP%]{position:relative;height:55vh}"]})}return t})();var Knt=(()=>{class t{_dialogService;plugin;pluginValid;pluginChange=new ve;menuItems=[{label:"Von virtueller Klinik importieren",command:()=>this.openVirtualClinicImportDialog()}];postalCodes=[];constructor(e){this._dialogService=e}ngOnInit(){this.postalCodes=this.plugin.toValue()??[]}openEditDialog(){let e=$e(pe({},Ul),{header:"Postleitzahlen bearbeiten",data:{postalCodes:this.postalCodes.slice()}});this._dialogService.open($nt,e).onClose.pipe(ar(1),vn(n=>!!n&&n.length>0)).subscribe(n=>this.updatePostalCodes(n))}openVirtualClinicImportDialog(){let e=$e(pe({},Ul),{header:"Postleitzahlen von Virtueller Klinik importieren"});this._dialogService.open(Ynt,e).onClose.pipe(ar(1),vn(n=>!!n&&n.length>0)).subscribe(n=>{this.updatePostalCodes(n)})}updatePostalCodes(e){Ni.equals(this.postalCodes,e)||(this.postalCodes=[...e],this.pluginChange.emit(new _f([...e])))}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-postal-codes"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],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(n,r){n&1&&(O(0,"bd-maps-postal-codes-list",0),te("postalCodesChange",function(a){return r.updatePostalCodes(a)}),M(),O(1,"div",1)(2,"p-split-button",2),te("onClick",function(){return r.openEditDialog()}),M()()),n&2&&(D("postalCodes",r.postalCodes.slice()),E(2),D("model",r.menuItems)("outlined",!0))},dependencies:[FA,lL],encapsulation:2})}return t})();function fpi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var Wnt=(()=>{class t extends Xo{_cdr;_dialogService;_statesService;_careServiceAreaService;plugin;pluginValid;pluginChange=new ve;selection=[];displayText="";constructor(e,n,r,o){super(),this._cdr=e,this._dialogService=n,this._statesService=r,this._careServiceAreaService=o}ngOnChanges(e){this.selection=this.plugin.toValue(),this.displayText=this.plugin.toText(),this._cdr.markForCheck()}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Versorgungsgebiete bearbeiten",data:{selection:this.selection,stateOptions$:r=>this._statesService.findCareServiceAreaIds(r),displayName$:r=>this._careServiceAreaService.findOne(r).pipe(ot(o=>o.name))}});this._subs.push(this._dialogService.open(ape,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this.selection=r?.selection,this.plugin=new y0(r?.selection),this.displayText=this.plugin.toText(),this._cdr.markForCheck(),this.pluginChange.emit(this.plugin.clone())}))}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(To),xe(spe),xe(SMe))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-care-service-area-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Tt,Yt],decls:5,vars:4,consts:[["matInput","","placeholder","Versorgungsgebiete",3,"click","value"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.edit(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,fpi,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayText),E(3),vt(r.pluginValid?-1:4))},dependencies:[hc,zs,Oa,yp,km,da,zr],encapsulation:2,changeDetection:0})}return t})();function gpi(t,i){t&1&&(O(0,"div",19),be(1,"bd-message-empty",20),M())}function _pi(t,i){t&1&&(O(0,"tr"),be(1,"th"),M())}function ypi(t,i){if(t&1&&(ee(0),Dr(1,"administrativeDistrict"),Dr(2,"async")),t&2){let e,n=L().$implicit;gn(" ",((e=ca(2,3,ca(1,1,n.node.data)))==null?null:e.displayName())||n.node.key," ")}}function vpi(t,i){if(t&1&&(ee(0),Dr(1,"postalCode"),Dr(2,"async")),t&2){let e=L().$implicit;Pd(" ",e.node.data," ",ca(2,5,gl(1,2,e.node.data,"FIRST"))," ")}}function bpi(t,i){if(t&1&&(O(0,"tr",24)(1,"td"),be(2,"p-treeTableToggler",25)(3,"p-treeTableCheckbox",26),yt(4,ypi,3,5),yt(5,vpi,3,7),M()()),t&2){let e=i.$implicit;D("ttRow",e),E(2),D("rowNode",e),E(),D("value",e),E(),vt(e.node.type==="administrativeDistrict"?4:-1),E(),vt(e.node.type==="postalCode"?5:-1)}}function Cpi(t,i){if(t&1){let e=qe();O(0,"p-treeTable",21),te("selectionKeysChange",function(r){se(e);let o=L();return le(o.onNodeKeySelection(r))}),ie(1,_pi,2,0,"ng-template",22)(2,bpi,6,5,"ng-template",23),M()}if(t&2){let e=L();D("value",e.nodes)("selectionKeys",e.selectionKeys)}}var Qnt=(()=>{class t{ref;_postalCodeService;_cdr;loading$=new hi(1);nodes=[];postalCodesSelection=[];selectionKeys={};clinic;coordinates;drivingTime=10;mostlyInRange=!0;constructor(e,n,r,o){this.ref=n,this._postalCodeService=r,this._cdr=o,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 n={};e.forEach(r=>{let o=this._createPostalCodeNode(r);n[o.key]={checked:!0,partialChecked:!1};let a=this.nodes.find(c=>c.type==="administrativeDistrict"&&c.children.some(m=>m.key===o.key));if(a){let c=a.children.every(m=>Object.keys(this.selectionKeys).includes(m.key));n[a.key]={partialChecked:!c,checked:c}}}),this.selectionKeys=JSON.parse(JSON.stringify(n)),this._cdr.markForCheck()}onNodeKeySelection(e){this.postalCodesSelection=Object.keys(e).map(n=>t._keyToNode(n,this.nodes)).filter(n=>n.type==="postalCode").map(n=>n.data)}onQueryPostalCodes(e){this._postalCodeService.findAll(e,"FIRST").pipe(ot(n=>{let r={};return Object.keys(n).map(o=>{let a=n[o],c=io.createFromNumber(a.administrativeDistrictId);r[c.value]?r[c.value].push(o):r[c.value]=[o]}),r})).subscribe(n=>{this.nodes=Object.keys(n).map(r=>{let o=this._createDistrictNode(r);return o.children=n[r].map(a=>this._createPostalCodeNode(a)),o}),this.loading$.next(ni.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(ni.LOADING)}_createDistrictNode(e){return{type:"administrativeDistrict",data:io.createFromString(e),key:`administrativeDistrict_${e}`}}_createPostalCodeNode(e){return{type:"postalCode",data:e,key:`postalCode_${e}`}}static _keyToNode(e,n){let r;return n.forEach(o=>{o.key===e&&(r=o),!r&&o.children&&o.children.length>0&&(r=this._keyToNode(e,o.children))}),r}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El),xe(pg),xe(dn))};static \u0275cmp=re({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(n,r){if(n&1){let o=qe();O(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"ays-clinic-select",6),te("clinicSelect",function(c){return se(o),le(r.onClinicSelect(c))}),M()(),O(6,"div",7)(7,"ays-market-isochrone-selection-driving-time-selector",8),te("drivingTimeChange",function(c){return se(o),le(r.onDrivingTimeChange(c))}),M()(),O(8,"div",7)(9,"div",9)(10,"div",3)(11,"mat-checkbox",10),te("change",function(c){return se(o),le(r.onMostlyInRangeChange(c))}),ee(12," Randgebiete ausschlie\xDFen "),M()(),O(13,"div",11)(14,"button",12)(15,"mat-icon"),ee(16,"info"),M()()()()()()(),O(17,"div",3)(18,"div",13)(19,"div",3)(20,"ays-market-isochrone-selection-postal-codes",14),te("postalCodesSelectionChange",function(c){return se(o),le(r.onPostalCodesSelectionChange(c))})("possiblePostalCodesChange",function(c){return se(o),le(r.onQueryPostalCodes(c))}),M()(),O(21,"div",3),be(22,"bd-loader",15),M()()()()(),O(23,"div",16)(24,"button",17),te("click",function(){return se(o),le(r.ref.close())}),ee(25,"Abbrechen"),M(),O(26,"button",18),te("click",function(){return se(o),le(r.onSubmit())}),ee(27," Importieren "),M()(),ie(28,gpi,2,0,"ng-template",null,0,di)(30,Cpi,3,2,"ng-template",null,1,di)}if(n&2){let o=Oi(29),a=Oi(31);E(7),D("drivingTime",r.drivingTime),E(4),D("checked",r.mostlyInRange),E(9),D("coordinates",r.coordinates)("drivingTime",r.drivingTime)("mostlyInRange",r.mostlyInRange)("postalCodesSelection",r.postalCodesSelection),E(2),D("loadItem",r.loading$)("successTemplate",a)("initTemplate",o),E(4),D("disabled",!r.postalCodesSelection||r.postalCodesSelection.length===0)}},dependencies:[rr,o8,wy,cg,so,Kr,il,Xf,Ld,da,zr,fr,ec,M8,BC,Tr,k8,D8,A8,pnt,unt,Dc,xI,p8],encapsulation:2})}return t})();function xpi(t,i){if(t&1&&(O(0,"span",3),ee(1),M(),O(2,"p-accordion",4)(3,"p-accordion-panel")(4,"p-accordion-header"),ee(5),M(),O(6,"p-accordion-content")(7,"div"),be(8,"bd-maps-administrative-district-ids-list",5),M()()(),O(9,"p-accordion-panel")(10,"p-accordion-header"),ee(11),M(),O(12,"p-accordion-content")(13,"div"),be(14,"bd-maps-postal-codes-list",6),M()()()()),t&2){let e=L();E(),Pt(e.displayText),E(),D("multiple",!0),E(3),gn(" ",(e.value==null?null:e.value.administrativeDistricts.length)+" Landkreise"," "),E(3),D("administrativeDistrictIds",e.value.administrativeDistricts),E(3),gn(" ",(e.value==null?null:e.value.postalCodes.length)+" Postleitzahlen"," "),E(3),D("postalCodes",e.value.postalCodes)}}function Spi(t,i){t&1&&be(0,"bd-message-empty",0)}var Znt=(()=>{class t extends Xo{_dialogService;_cdr;_clinicService;plugin;pluginValid;pluginChange=new ve;displayText;value=null;constructor(e,n,r){super(),this._dialogService=e,this._cdr=n,this._clinicService=r}ngOnChanges(){this.displayText=this.plugin.toText(),this._update(this.plugin.toValue())}ngOnDestroy(){this.unsubscribeAll()}edit(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Bereiche \xFCber Fahrzeit importieren",data:this.value}),r=this._dialogService.open(Qnt,n).onClose.pipe(ar(1),vn(o=>!!o)).subscribe(o=>{this._update(o),this.plugin=new QL(this.value.coordinate,this.value.value,this.value.clinicId?this.value.clinicId.clone():null,[...this.value.administrativeDistricts.map(a=>a.clone())],[...this.value.postalCodes]),this.pluginChange.emit(this.plugin.clone())});this._subs.push(r)}_update(e){this.value=e,this.value.clinicId?this._clinicService.get(this.value.clinicId).subscribe(n=>{this.displayText=`Auswahl Bereiche um ${n.name} (SN: ${n.id.sn}, ${n.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 \u0275fac=function(n){return new(n||t)(xe(To),xe(dn),xe(tb))};static \u0275cmp=re({type:t,selectors:[["filter-condition-geo-parts-by-driving-time-around-clinic-id"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To]),Tt,Yt],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(n,r){n&1&&(yt(0,xpi,15,6)(1,Spi,1,0,"bd-message-empty",0),O(2,"div",1)(3,"button",2),te("click",function(a){return r.edit(a)}),ee(4," Fahrzeit bearbeiten "),M()()),n&2&&vt(r.value!=null&&r.value.coordinate?0:1)},dependencies:[xce,aI,yA,cL,dL,NA,FA,Kr,ec],encapsulation:2})}return t})();var Xnt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Bundesland",valid$:new hi(1),option:{sortFnc:(e,n)=>e.name.localeCompare(n.name),uniqueFnc:e=>e.id.toString(),searchOptionAccessor:e=>e.name}};options=$t(PE);initial;ngOnInit(){this.initial=this.plugin.toValue().map(e=>o1.byId(e))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onStatesChange(e){let n=e.map(r=>r.id);this.pluginChange.emit(new ug(n).clone())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-state-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onStatesChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var $Me=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Altersgruppe",option:{sortFnc:(e,n)=>e.ageGroupId-n.ageGroupId,uniqueFnc:e=>e.ageGroupId.toString(),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};initial=[];ageGroupOptions=$t(Object.keys(Uce).map(e=>({ageGroupId:parseInt(e,10),displayName:Uce[e]})));ngOnInit(){this.initial=this.plugin.toValue().map(e=>({ageGroupId:e,displayName:Uce[e]}))}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onAgeGroupsSelect(e){this.pluginChange.emit(new Qv([...e.map(n=>n.ageGroupId)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-age-groups"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onAgeGroupsSelect(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.ageGroupOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Jnt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;admissionCauseOptions=["E","Z","N","R","V","A","G","B"];config={selectLabel:"Aufnahmeanlass",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.key,searchOptionAccessor:e=>this.searchOptionAccessor(e)},valid$:new hi(1)};initialSelection=[];selectOptions=$t(this.admissionCauseOptions.map(e=>this.withDescription(e)));_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,n){return!!e&&!!n&&e.key.localeCompare(n.key)}onSelectionChange(e){if(!Ni.equals(this._selection,e.map(n=>n.key))){this._selection=e.map(r=>r.key);let n=new gL([...this._selection]);this.config.valid$?.next({isValid:n.valid(),errorMessage:n.validationToText()}),this.pluginChange.emit(n)}}withDescription(e){return{key:e,description:xXe[e]}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})();var ert=(()=>{class t{ref;nodes;selection;plugin;constructor(e,n){this.ref=n,this.selection=[],e.data.plugin&&e.data.plugin.toValue().length>0&&(this.plugin=e.data.plugin.clone(),this.selection=e.data.plugin.toValue().map(r=>({type:"leaf",key:r}))),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 Y2(e.map(n=>n.key)):this.plugin=new Y2([e.key])}_createNode(e,n){let r=Object.keys(VEe).filter(c=>c.startsWith(e)).map(c=>({type:"leaf",key:c,label:VEe[c]})),a=r.every(c=>this.selection.find(m=>m.key===c.key))?void 0:this.selection.map(c=>c.key).some(c=>c.startsWith(e));return{type:"node",key:e,label:n,children:r,partialSelected:a}}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"p-tree",0),te("selectionChange",function(a){return r.onSelectionChange(a)}),M()(),O(2,"div",1)(3,"button",2),te("click",function(){return r.ref.close()}),ee(4,"Abbrechen"),M(),O(5,"button",3),te("click",function(){return r.ref.close(r.plugin)}),ee(6," \xDCbernehmen "),M()()),n&2&&(E(),D("value",r.nodes)("selectionMode","checkbox")("selection",r.selection)("filter",!0))},dependencies:[wC,Iy,Kr],encapsulation:2})}return t})();function wpi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var trt=(()=>{class t{_dialogService;plugin;pluginValid;pluginChange=new ve;displayValue="";constructor(e){this._dialogService=e}ngOnInit(){this.displayValue=this.plugin.toText()}openEditDialog(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Aufnahmegrund ausw\xE4hlen",data:{plugin:this.plugin}});this._dialogService.open(ert,n).onClose.subscribe(r=>{r&&(this.plugin=r.clone(),this.displayValue=this.plugin.toText(),this.pluginValid=this.plugin.valid(),this.pluginChange.emit(r.clone()))})}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-admission-reason"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],decls:5,vars:4,consts:[["matInput","","placeholder","Aufnahmegrund","readonly","",3,"click","value"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.openEditDialog(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,wpi,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayValue),E(3),vt(r.pluginValid?-1:4))},dependencies:[Oa,zs,zr,km,yp],encapsulation:2,changeDetection:0})}return t})();function Ipi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var irt=(()=>{class t{plugin;pluginValid=!0;pluginChange=new ve;form=new Mu({minValue:new ho(null,[]),maxValue:new ho(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(vn(()=>this.form.valid)).subscribe(e=>{let n=new T6(new _L(e.minValue,e.maxValue));this.pluginValid=n.valid(),this.pluginChange.emit(n)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),ee(5,"Min."),M(),be(6,"input",3),yt(7,Ipi,2,1,"mat-hint"),M()(),O(8,"div",4)(9,"span"),ee(10,"-"),M()(),O(11,"div",2)(12,"mat-form-field")(13,"mat-label"),ee(14,"Max."),M(),be(15,"input",5),M()()()()),n&2&&(D("formGroup",r.form),E(3),zn("custom-invalid",!r.pluginValid),E(4),vt(r.pluginValid?-1:7),E(5),zn("custom-invalid",!r.pluginValid))},dependencies:[oa,Am,nd,YT,yr,Em,Xu,Y_,mc,Oa,rd,yp,hc,zs],encapsulation:2})}return t})();var nrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Entgeltbereich",valid$:new hi(1),option:{sortFnc:(e,n)=>e.localeCompare(n),uniqueFnc:e=>e,searchOptionAccessor:e=>e.toString()}};chargeRealmOptions=$t(["DRG","HYB","PSY","PIA","BWD","BWH","BGD","BGH"]);initial=[];ngOnInit(){this.plugin&&(this.initial=this.plugin.toValue())}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onValueChange(e){let n=new CL(e);this.plugin.equals(n)||(this.plugin=n.clone(),this.pluginChange.emit(n.clone()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-charge-realm"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onValueChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.chargeRealmOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();function Tpi(t,i){t&1&&(O(0,"div",5)(1,"bd-flat-error"),ee(2,"Minimum ist gr\xF6\xDFer als Maximum !"),M()())}var rrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;form=new Mu({fromCtrl:new ho(null,[La.min(0)]),toCtrl:new ho(null,[La.min(0)])},{validators:this._minimumShouldBeLessThenMaximumValidator});constructor(){this.form.valueChanges.pipe(vn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new xL(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 n=e.get("fromCtrl").value,r=e.get("toCtrl").value;return n&&r?n<=r?null:{mismatch:!0}:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),ee(5,"Min."),M(),be(6,"input",3),M()(),O(7,"div",2)(8,"mat-form-field")(9,"mat-label"),ee(10,"Max."),M(),be(11,"input",4),M()(),yt(12,Tpi,3,0,"div",5),M()()),n&2&&(D("formGroup",r.form),E(12),vt(r.form.hasError("mismatch")?12:-1))},dependencies:[N7,mc,Oa,rd,hc,zs,oa,Am,nd,YT,yr,Em,Xu,Y_],styles:[".mat-mdc-form-field-infix{width:100%}"]})}return t})();var ort=(()=>{class t{plugin;pluginValid;pluginChange=new ve;form=new Mu({nrwServiceGroupCtrl:new ho(null,[La.required]),qualificationCtrl:new ho(!0,[La.required])});options=$t(Eh.filter(e=>e.isLeistungsgruppe()));config={selectLabel:"Leistungsgruppe",resetOption:!1,option:{uniqueFnc:e=>e.id,sortFnc:(e,n)=>parseFloat(e.id)-parseFloat(n.id),searchOptionAccessor:e=>e.name,searchOptionDisplayName:e=>`${e.id} ${e.name}`}};constructor(){this.form.valueChanges.pipe(vn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new SL(e.nrwServiceGroupCtrl.id,e.qualificationCtrl))})}ngOnInit(){this.plugin&&this.plugin.toValue().nrwServiceGroupId&&this.form.patchValue({nrwServiceGroupCtrl:Eh.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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"bd-ui-single-select",3),te("selection",function(a){return r.onNrwServiceGroupSelection(a)}),M()(),O(4,"div",4)(5,"mat-checkbox",5),te("change",function(a){return r.onQualificationChange(a)}),ee(6,"Qualifikation erf\xFCllt "),M()()()()),n&2&&(D("formGroup",r.form),E(3),D("selectOptions",r.options)("config",r.config)("initialSelection",r.form.controls.nrwServiceGroupCtrl.value),E(2),D("checked",r.form.controls.qualificationCtrl.value))},dependencies:[oa,Am,Em,Xu,Va,wy,cg],encapsulation:2})}return t})();var art=(()=>{class t{_clinicService;_cdr;helpKey="ays_clinics_filter--clinic_level";helpLinkOptions={color:"accent",mode:"button"};plugin;pluginValid;pluginChange=new ve;clinicLevelOptions=[];informationText;informationDate;clinicLevelIds;constructor(e,n){this._clinicService=e,this._cdr=n,this._clinicService.availableClinicLevels().pipe(ar(1)).subscribe(r=>{this.clinicLevelOptions=Object.values(r.levels).map(o=>({id:o.id,displayName:o.displayName.de})),this.informationText=r.information.information.de,this.informationDate=r.information.date,this._cdr.markForCheck()})}ngOnInit(){this.plugin&&(this.clinicLevelIds=this.plugin.toValue().includes)}onClinicLevelIdsChange(e){Ni.equals(this.clinicLevelIds,e.value)||(this.plugin=new wL(e.value),this.pluginChange.emit(this.plugin.clone()))}static \u0275fac=function(n){return new(n||t)(xe(tb),xe(dn))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",1)(4,"div",0)(5,"span",3),ee(6),Dr(7,"date"),M(),O(8,"span",3),ee(9),M()()(),O(10,"div",4),be(11,"bd-help-button",5),M()()(),O(12,"div",1)(13,"p-iftalabel")(14,"p-multiSelect",6),te("onChange",function(a){return r.onClinicLevelIdsChange(a)}),M(),O(15,"label",7),ee(16),M()()()()),n&2&&(E(6),gn("Informationsstand: ",ca(7,10,r.informationDate)),E(3),Pt(r.informationText),E(2),D("key",r.helpKey)("options",r.helpLinkOptions),E(3),Pe(r.pluginValid?"":"ng-invalid ng-dirty"),D("ngModel",r.clinicLevelIds)("options",r.clinicLevelOptions)("filter",!0),E(2),Pt((r.plugin==null?null:r.plugin.validationToText())??"Versorgungslevel"))},dependencies:[tF,Ho,sy,ra,yr,ya,Hp],encapsulation:2})}return t})();var srt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;form=new Mu({nrwServiceGroupCtrl:new ho(null,[La.required]),availabilityCtrl:new ho(!0,[La.required]),qualificationCtrl:new ho(!0,[La.required])});options=$t(Eh.filter(e=>e.isLeistungsgruppe()));config={selectLabel:"Leistungsgruppe",resetOption:!1,option:{uniqueFnc:e=>e.id,sortFnc:(e,n)=>parseFloat(e.id)-parseFloat(n.id),searchOptionAccessor:e=>e.name,searchOptionDisplayName:e=>`${e.id} ${e.name}`}};constructor(){this.form.valueChanges.pipe(vn(()=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new IL(e.nrwServiceGroupCtrl.id,e.qualificationCtrl,e.availabilityCtrl))})}ngOnInit(){this.plugin&&this.plugin.toValue().nrwServiceGroupId&&this.form.patchValue({nrwServiceGroupCtrl:Eh.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 \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"bd-ui-single-select",3),te("selection",function(a){return r.onNrwServiceGroupSelection(a)}),M()(),O(4,"div",4)(5,"mat-checkbox",5),te("change",function(a){return r.onQualificationChange(a)}),ee(6,"Qualifikation erf\xFCllt "),M()(),O(7,"div",4)(8,"mat-checkbox",5),te("change",function(a){return r.onAvailabilityChange(a)}),ee(9,"Verf\xFCgbarkeit erf\xFCllt "),M()()()()),n&2&&(D("formGroup",r.form),E(3),D("selectOptions",r.options)("config",r.config)("initialSelection",r.form.controls.nrwServiceGroupCtrl.value),E(2),D("checked",r.form.controls.qualificationCtrl.value),E(3),D("checked",r.form.controls.availabilityCtrl.value))},dependencies:[oa,Am,Em,Xu,Va,wy,cg],encapsulation:2})}return t})();var lrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;excludes=[];ngOnInit(){this.plugin&&(this.excludes=this.plugin.toValue().excludes)}onCheckboxChange(e){e.checked?this.excludes.push(99):this.excludes=this.excludes.filter(n=>n!==99),this.pluginChange.emit(new QK(this.excludes))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"mat-checkbox",0),te("change",function(a){return r.onCheckboxChange(a)}),ee(1,"Gesamtberichte (99-Standorte) ausschlie\xDFen "),M()),n&2&&D("checked",r.excludes.includes(99))},dependencies:[wy,cg],encapsulation:2})}return t})();var crt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;pluginConfig=$e(pe({},v8),{resolveOnSelect:!0,codeTypeSpecification:!0,matchingSpecification:!0,codeTypeClassifications:{},includesExcludesSelection:!0,grouperVersionYear:!0});resourceOptions=$e(pe({},b8),{selectOnInit:"none",resetOption:!0});codeSpectrumSelect;ngOnChanges(e){if(e.plugin){let n=this.plugin.clone();this.codeSpectrumSelect={codingSystem:n.codingSystem,codeSpectrumIds:n.codeSpectrumIds,codeTypeSpecification:n.codeTypeSpecification,codeTypeClassification:n.codeTypeClassification,matching:n.matching,includes:n.includes,grouperVersionYear:n.grouperVersionYear}}}onCodeSpectrumSelect(e){let n=new MA(e.codeSpectrumIds,e.codingSystem,e.matching,e.codeTypeSpecification,e.codeTypeClassification,e.includes,e.grouperVersionYear);this.plugin.equals(n)||(this.plugin=n.clone(),this.pluginChange.emit(n.clone()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-codes"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"codeSpectrumSelectChange","codeSpectrumSelect","options","optionsInlineSelect"]],template:function(n,r){n&1&&(O(0,"ays-code-spectrum-select-inline-multiple",0),te("codeSpectrumSelectChange",function(a){return r.onCodeSpectrumSelect(a)}),M()),n&2&&D("codeSpectrumSelect",r.codeSpectrumSelect)("options",r.pluginConfig)("optionsInlineSelect",r.resourceOptions)},dependencies:[oit],encapsulation:2})}return t})();var drt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Entlassgr\xFCnde",valid$:new hi(1),option:{sortFnc:(e,n)=>e.dismissionCause.localeCompare(n.dismissionCause),uniqueFnc:e=>e.dismissionCause,searchOptionAccessor:e=>e.displayName}};dismissionCauseOptions=$t(Object.keys(Zce).map(e=>({dismissionCause:e,displayName:Zce[e]})));initial=[];ngOnInit(){this.initial=this.plugin?.toValue().map(e=>({dismissionCause:e,displayName:Zce[e]}))??[]}setDismissionCauses(e){this.pluginChange.emit(new jL([...e.map(n=>n.dismissionCause)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.setDismissionCauses(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.dismissionCauseOptions)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();function Epi(t,i){if(t&1&&(O(0,"div",3)(1,"div",4)(2,"span",5),ee(3),M()(),O(4,"div",6)(5,"span",7),ee(6),M()()()),t&2){let e=i.$implicit;E(3),Pt(e.name),E(3),Pt(e.description)}}var urt=(()=>{class t extends Xo{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};placeholderText="DRG-Ziffer";selectionCtrl=new ho(void 0);suggestions=[];constructor(e,n){super(),this._cdr=e,this._codeService=n,this._subs.push(this.selectionCtrl.valueChanges.pipe(vn(r=>typeof r=="object"||r===null||r===void 0)).subscribe(r=>this.pluginChange.emit(new EC(r?[r.clone()]:[]))))}ngOnChanges(e){if(e.plugin)if(this.plugin){let n=this.plugin.toValue();n.length===1?this.selectionCtrl.setValue(n[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(n=>{this.suggestions=n,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new EC([]))}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-drg-code"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-autoComplete",1),te("completeMethod",function(c){return se(o),le(r.searchCode(c))})("onClear",function(){return se(o),le(r.onClear())}),ie(2,Epi,7,2,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),Pe(r.pluginValid?"":"ng-invalid ng-dirty"),D("formControl",r.selectionCtrl)("suggestions",r.suggestions)("showClear",!0)("overlayOptions",r.overlayOptions),E(4),Pt(r.placeholderText))},dependencies:[Pu,Ho,oa,yr,Mc],encapsulation:2,changeDetection:0})}return t})();var prt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"DRG-Kapitel",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.name,searchOptionAccessor:e=>this.searchOptionAccessor(e),searchOptionDisplayName:e=>`${e.name} - ${e.description}`},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectOptions=this._codeService.treeChildren("G-DRG").pipe(ot(r=>r.map(o=>o.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onOptionsChange(e){let n=[];e.forEach(o=>{this.selection.indexOf(o.name)>-1&&n.push(o)}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.name))||this.onSelectionChange(n)}onSelectionChange(e){Ni.equals(this.selection,e.map(n=>n.name))||(this.selection=[...e.map(n=>n.name)],this.pluginChange.emit(new D1([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,n){return!e||!n?e?-1:1:e.name.localeCompare(n.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-drg-mdc"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})();var mrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"DRG vorhanden",valid$:new hi(1),option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.displayName,searchOptionAccessor:e=>e.displayName}};options=$t([{bool:!0,displayName:"Ja"},{bool:!1,displayName:"Nein"}]);initial;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 n=new $L(e.bool);this.plugin.equals(n)||(this.plugin=n.clone(),this.pluginChange.emit(n.clone()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-drg-code-exists"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onValueChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Va],encapsulation:2})}return t})();var hrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"Erreichbarkeit innerhalb Fahrzeit",valid$:new hi(1),option:{sortFnc:(e,n)=>e.value.max-n.value.max,uniqueFnc:e=>e.value.max?.toString(),searchOptionAccessor:e=>e.displayName}};options=$t([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 n=e+10;return{displayName:`${e} - ${n} Minuten`,value:{min:e,max:n}}}));inital;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 U6([...e.map(n=>n.value)]),this.pluginChange.emit(this.plugin.clone())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-driving-time"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChanged(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.inital)},dependencies:[Yo],encapsulation:2})}return t})();function Api(t,i){t&1&&(O(0,"div",5)(1,"bd-flat-error"),ee(2,"Minimum ist gr\xF6\xDFer als Maximum !"),M()())}var frt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;form=new Mu({fromCtrl:new ho(null,[La.min(0)]),toCtrl:new ho(null,[La.min(0)])},{validators:this._minimumShouldBeLessThenMaximumValidator});constructor(){this.form.valueChanges.pipe(vn(e=>this.form.valid)).subscribe(e=>{this.pluginChange.emit(new KL(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 n=e.get("fromCtrl").value,r=e.get("toCtrl").value;return n&&r?n<=r?null:{mismatch:!0}:null}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),ee(5,"Min."),M(),be(6,"input",3),M()(),O(7,"div",2)(8,"mat-form-field")(9,"mat-label"),ee(10,"Max."),M(),be(11,"input",4),M()(),yt(12,Api,3,0,"div",5),M()()),n&2&&(D("formGroup",r.form),E(12),vt(r.form.hasError("mismatch")?12:-1))},dependencies:[hc,zs,Oa,rd,oa,Am,nd,YT,yr,Em,Xu,Y_,N7],styles:[".mat-mdc-form-field-infix{width:100%}"]})}return t})();var grt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config=$e(pe({},N5),{resourceNameTitle:"Benchmarking Gruppen"});resourceSelects=[];resourceName=tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP;virtualBenchmarkingGroupIds=[];ngOnInit(){this.resourceSelects=[...this.plugin.toValue().map(e=>({id:e}))]}onVirtualClinicBenchmarkingGroup(e){Ni.equals(this.virtualBenchmarkingGroupIds,e.map(n=>n.id))||(this.virtualBenchmarkingGroupIds=e.map(n=>n.id),this.pluginChange.emit(new uB([...this.virtualBenchmarkingGroupIds])))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-resources-select-inline-multiple",0),te("resourceSelectChange",function(a){return r.onVirtualClinicBenchmarkingGroup(a)}),M()),n&2&&D("resourceSelects",r.resourceSelects)("resourceName",r.resourceName)("config",r.config)},dependencies:[Pw],encapsulation:2})}return t})();var _rt=(()=>{class t{_virtualClinicService;plugin;pluginValid;virtualClinicId;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"Fachabteilung",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.id,searchOptionAccessor:e=>this.searchOptionAccessor(e)},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e){this._virtualClinicService=e}ngOnChanges(e){if(e.plugin&&this._onSpecialtyDepartmentsChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid}),e.virtualClinicId){let n=!e.virtualClinicId.firstChange&&gr.equals(e.virtualClinicId.currentValue,e.virtualClinicId.currentValue);this._onVirtualClinicIdChanged(n)}}onOptionsChange(e){let n=[];e.forEach(o=>{this.selection.indexOf(o.id)>-1&&n.push(o)}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.id))||this.onSelectionChange(n)}onSelectionChange(e){if(!Ni.equals(this.selection,e.map(n=>n.id))){this.selection=[...e.map(r=>r.id)];let n=new dO([...e.map(r=>r.id)]);this.config.valid$.next({isValid:n.valid(),errorMessage:n.validationToText()}),this.pluginChange.emit(n),this.initialSelection=void 0}}searchOptionAccessor(e){return e.name}sortFnc(e,n){return e.fabKey.localeCompare(n.fabKey)}fetchOptions(){return Hr(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 \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-specialty-department"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",virtualClinicId:"virtualClinicId"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})();function Dpi(t,i){if(t&1&&(O(0,"div",3)(1,"div",4)(2,"span",5),ee(3),M()(),O(4,"div",6)(5,"span",7),ee(6),M()()()),t&2){let e=i.$implicit;E(3),Pt(e.name),E(3),Pt(e.description)}}var yrt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};placeholderText="OPS 3-Steller Ziffer";selectionCtrl=new ho(void 0);suggestions=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectionCtrl.valueChanges.pipe(vn(r=>typeof r=="object"||r===null||r===void 0)).subscribe(r=>this.pluginChange.emit(new MC(r?[r.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let n=this.plugin.toValue();n.length===1?this.selectionCtrl.setValue(n[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(n=>{this.suggestions=n,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new MC([]))}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-ops-code-three-digits"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-autoComplete",1),te("completeMethod",function(c){return se(o),le(r.searchCode(c))})("onClear",function(){return se(o),le(r.onClear())}),ie(2,Dpi,7,2,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),Pe(r.pluginValid?"":"ng-invalid ng-dirty"),D("formControl",r.selectionCtrl)("suggestions",r.suggestions)("showClear",!0)("overlayOptions",r.overlayOptions),E(4),Pt(r.placeholderText))},dependencies:[oa,yr,Mc,Pu,Ho],encapsulation:2,changeDetection:0})}return t})();var vrt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"OPS-Gruppe",optionGroup:{sortFnc:(e,n)=>e.code.name.localeCompare(n.code.name),uniqueFnc:e=>e.code.name,searchOptionAccessor:e=>e.code.name},option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.name,searchOptionAccessor:e=>this.searchOptionAccessor(e),searchOptionDisplayName:e=>`${e.name} - ${e.description}`},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectOptions=this._codeService.treeChildren("OPS").pipe(On(r=>Ys(r.map(o=>this._codeService.treeChildren(o.data.codingSystem,o.data.name).pipe(ot(a=>({code:o.data,options:a.map(m=>Zv.fromObject(m.data))})))))))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}onOptionsChange(e){let n=[];e.forEach(o=>{o.options.forEach(a=>{this.selection.indexOf(a.name)>-1&&n.push(a)})}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.name))||this.onSelectionChange(n)}onSelectionChange(e){Ni.equals(this.selection,e.map(n=>n.name))||(this.selection=[...e.map(n=>n.name)],this.pluginChange.emit(new P1([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,n){return e.name.localeCompare(n.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-ops-code-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select-option-group",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[DO],encapsulation:2,changeDetection:0})}return t})();function kpi(t,i){if(t&1&&(O(0,"div",3)(1,"div",4)(2,"span",5),ee(3),M()(),O(4,"div",6)(5,"span",7),ee(6),M()()()),t&2){let e=i.$implicit;E(3),Pt(e.name),E(3),Pt(e.description)}}var brt=(()=>{class t extends Xo{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};placeholderText="OPS 4-Steller Ziffer";selectionCtrl=new ho(void 0);suggestions=[];constructor(e,n){super(),this._cdr=e,this._codeService=n,this.selectionCtrl.valueChanges.pipe(vn(r=>typeof r=="object"||r===null||r===void 0)).subscribe(r=>this.pluginChange.emit(new kC(r?[r.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let n=this.plugin.toValue();n.length===1?this.selectionCtrl.setValue(n[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(n=>{this.suggestions=n,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new kC([]))}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-ops-code-four-digits"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-autoComplete",1),te("completeMethod",function(c){return se(o),le(r.searchCode(c))})("onClear",function(){return se(o),le(r.onClear())}),ie(2,kpi,7,2,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),Pe(r.pluginValid?"":"ng-invalid ng-dirty"),D("formControl",r.selectionCtrl)("suggestions",r.suggestions)("showClear",!0)("overlayOptions",r.overlayOptions),E(4),Pt(r.placeholderText))},dependencies:[oa,yr,Mc,Pu,Ho],encapsulation:2,changeDetection:0})}return t})();var Crt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"OPS-Kapitel",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.name,searchOptionAccessor:e=>this.searchOptionAccessor(e),searchOptionDisplayName:e=>`${e.name} - ${e.description}`},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectOptions=this._codeService.treeChildren("OPS").pipe(ot(r=>r.map(o=>o.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let n=[];e.forEach(o=>{this.selection.indexOf(o.name)>-1&&n.push(o)}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.name))||this.onSelectionChange(n)}onSelectionChange(e){Ni.equals(this.selection,e.map(n=>n.name))||(this.selection=[...e.map(n=>n.name)],this.pluginChange.emit(new R1([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,n){return e.name.localeCompare(n.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-ops-code-chapter"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})();var qpe=(()=>{class t{config;ref;selection=[];nodes=[];treeSelection=[];constructor(e,n){this.config=e,this.ref=n,this.selection=e.data.selection||[],this._initNodes()}onSelection(e){Array.isArray(e)?(this.treeSelection=e,this.selection=e.map(n=>n.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 w6(e,ede[e])).map(e=>({type:e.isLeistungsbereich()?"nrwServiceArea":"nrwServiceGroup",key:e.id,label:`${e.id} ${e.name}`,data:e.id})),this.nodes=Eh.filter(e=>e.isLeistungsbereich()).map(e=>{let n=e.children(),r=!1;return this.selection.length>0&&(r=this.selection.map(o=>new w6(o,ede[o])).filter(o=>o.isLeistungsgruppe()).some(o=>o.parent()?.id===e.id)),{type:"nrwServiceArea",key:e.id,data:e.id,label:`${e.id} ${e.name}`,leaf:!this.config.data.nrwServiceGroupSelectable&&n.length>0,selectable:this.config.data.nrwServiceAreaSelectable,partialSelected:r,children:this.config.data.nrwServiceGroupSelectable?n.map(o=>({type:"nrwServiceGroup",key:o.id,data:o.id,label:`${o.id} ${o.name}`,leaf:!0,selectable:this.config.data.nrwServiceGroupSelectable})):void 0}})}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"div",0)(2,"div")(3,"button",1),te("click",function(){return r.selectAll()}),ee(4," Alle ausw\xE4hlen "),M()(),O(5,"div")(6,"button",1),te("click",function(){return r.clear()}),ee(7," Alle abw\xE4hlen "),M()()(),O(8,"p-tree",2),te("selectionChange",function(a){return r.onSelection(a)}),M()(),O(9,"div",3)(10,"button",4),te("click",function(){return r.ref.close()}),ee(11,"Abbrechen"),M(),O(12,"button",5),te("click",function(){return r.ref.close(r.selection)}),ee(13," \xDCbernehmen "),M()()),n&2&&(E(8),D("value",r.nodes)("selection",r.treeSelection)("propagateSelectionUp",!0),E(4),D("disabled",!r.selection))},dependencies:[so,Kr,wC,Iy],encapsulation:2,changeDetection:0})}return t})();function Mpi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var xrt=(()=>{class t{_dialog;_cdr;plugin;pluginValid;pluginChange=new ve;displayValue="";nrwServiceGroupIds=[];constructor(e,n){this._dialog=e,this._cdr=n}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 n=$e(pe({},Ul),{header:"NRW Leistungsgruppen",data:{selection:[...this.nrwServiceGroupIds],nrwServiceAreaSelectable:!1,nrwServiceGroupSelectable:!0,selectAll:()=>Eh.filter(r=>r.isLeistungsgruppe()).map(r=>r.id)}});this._dialog.open(qpe,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{r=r.map(o=>Eh.find(a=>a.id===o)).filter(o=>o.isLeistungsgruppe()).map(o=>o.id),this._updateDisplayValue(r),this._sendChange(r)})}_updateDisplayValue(e){if(e.length===0){this.displayValue="";return}if(e.length===Eh.filter(r=>r.isLeistungsgruppe()).length){this.displayValue="Alle NRW Leistungsgruppen";return}let n=Eh.find(r=>r.id===e[0]);e.length>1?this.displayValue=`${this._fullNrwServiceGroupName(n)} + ${e.length-1} weitere`:this.displayValue=this._fullNrwServiceGroupName(n),this._cdr.markForCheck()}_fullNrwServiceGroupName(e){return`${e.id} ${e.name}`}_sendChange(e){Ni.equals(this.nrwServiceGroupIds,e)||(this.nrwServiceGroupIds=JSON.parse(JSON.stringify([...e])),this.pluginChange.emit(new bI([...e])))}static \u0275fac=function(n){return new(n||t)(xe(To),xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-nrw-service-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],decls:5,vars:5,consts:[["matInput","","placeholder","NRW Leistungsgruppen",3,"click","value","readonly"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.openEditDialog(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,Mpi,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayValue)("readonly",!0),E(3),vt(r.pluginValid?-1:4))},dependencies:[mc,Oa,yp,km,hc,zs,da,zr],encapsulation:2,changeDetection:0})}return t})();function Opi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var Srt=(()=>{class t{_dialogService;_cdr;plugin;pluginValid;pluginChange=new ve;displayValue="";nrwServiceGroupIds=[];constructor(e,n){this._dialogService=e,this._cdr=n}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 n=$e(pe({},Ul),{header:"NRW Leistungsbereiche",data:{selection:[...this.nrwServiceGroupIds],nrwServiceAreaSelectable:!0,nrwServiceGroupSelectable:!1,selectAll:()=>Eh.filter(r=>r.isLeistungsbereich()).map(r=>r.id)}});this._dialogService.open(qpe,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this._updateDisplayValue(r),this._sendChange(r)})}_updateDisplayValue(e){if(e.length===0){this.displayValue="";return}if(e.length===Eh.filter(r=>r.isLeistungsbereich()).length){this.displayValue="Alle NRW Leistungsbereiche";return}let n=Eh.find(r=>r.id===e[0]);e.length>1?this.displayValue=`${this._fullNrwServiceGroupName(n)} + ${e.length-1} weitere`:this.displayValue=this._fullNrwServiceGroupName(n),this._cdr.markForCheck()}_fullNrwServiceGroupName(e){return`${e.id} ${e.name}`}_sendChange(e){Ni.equals(this.nrwServiceGroupIds,e)||(this.nrwServiceGroupIds=JSON.parse(JSON.stringify([...e])),this.pluginChange.emit(new cO([...e])))}static \u0275fac=function(n){return new(n||t)(xe(To),xe(dn))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-nrw-service-area"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],decls:5,vars:5,consts:[["matInput","","placeholder","NRW Leistungsbereiche",3,"click","value","readonly"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.openEditDialog(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,Opi,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("value",r.displayValue)("readonly",!0),E(3),vt(r.pluginValid?-1:4))},dependencies:[da,zr,hc,zs,Oa,yp,km],encapsulation:2})}return t})();var wrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config=Dpe;resourceName=tn.MARKET;marketSelects=[];ngOnInit(){this.plugin&&(this.marketSelects=this.plugin.toValue().map(e=>({id:e})))}onMarketsSelectionChange(e){Ni.equals(this.marketSelects.map(n=>n.id),e.map(n=>n.id))||this.pluginChange.emit(new qW(e.map(n=>n.id)))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-resources-select-inline-multiple",0),te("resourceSelectChange",function(a){return r.onMarketsSelectionChange(a)}),M()),n&2&&D("resourceName",r.resourceName)("resourceSelects",r.marketSelects)("config",r.config)},dependencies:[Pw],encapsulation:2})}return t})();var Irt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;resourceName=tn.MARKET;config=Dpe;marketSelects=[];ngOnInit(){this.plugin&&(this.marketSelects=this.plugin.toValue().map(e=>({id:e})))}onMarketsSelectionChange(e){this.pluginChange.emit(new $6(e.map(n=>n.id)))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({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(n,r){n&1&&(O(0,"bd-resources-select-inline-multiple",0),te("resourceSelectChange",function(a){return r.onMarketsSelectionChange(a)}),M()),n&2&&D("resourceSelects",r.marketSelects)("resourceName",r.resourceName)("config",r.config)},dependencies:[Pw],encapsulation:2})}return t})();var Trt=(()=>{class t{ref;_config;_marketService;_administrativeDistrictService;_postalCodeService;_cdr;loading=!1;loading$=new hi(1);nodes=[];treeSelection=[];_markets=[];_transformNodes={};_allAdministrativeDistricts={};_allPostalCodes={};constructor(e,n,r,o,a,c){this.ref=e,this._config=n,this._marketService=r,this._administrativeDistrictService=o,this._postalCodeService=a,this._cdr=c,this.loading$.subscribe(m=>this.loading=m===ni.LOADING),this.loading$.next(ni.LOADING),this._initialSelection(),Ys(n.data.availableMarketIds.map(m=>this._marketService.findById(m))).pipe(P_(new Array),yo(m=>this._markets=m),On(m=>this._marketService.transform(m.map(g=>g.id),[{value:"stateId"},{value:"administrativeDistrictId"},{value:"postalCode"}])),yo(m=>this._transformNodes=m),On(m=>{let C=Object.values(m).flat().map(P=>P.children??[]).flat(),w=C.flat().map(P=>P.children??[]).flat();return Ys([this._administrativeDistrictService.findAll(Ni.unique(C.map(P=>P.label).map(P=>io.create(P)),P=>P.value)),this._postalCodeService.findAll(Ni.unique(w.map(P=>P.label),P=>P),"DETAIL")])})).subscribe(m=>{this._allAdministrativeDistricts=m[0],this._allPostalCodes=m[1],this.nodes=Object.keys(this._transformNodes).map(g=>{let C=this._markets.find(P=>P.id===g),w=this._createStateNodes(this._transformNodes[g]);return{type:"market",key:C.id,label:`Markt "${C.name}"`,selectable:!0,children:w,leaf:!!w}}),this.loading$.next(ni.SUCCESS),this._cdr.markForCheck()})}onSelectionChange(e){Array.isArray(e)?this.treeSelection=e:this.treeSelection=[e]}onSubmit(){let e=this.treeSelection.map(n=>this._nodeToResult(n)).reduce((n,r)=>({marketIds:[...n.marketIds,...r.marketIds],stateIds:[...n.stateIds,...r.stateIds],administrativeDistrictIds:[...n.administrativeDistrictIds,...r.administrativeDistrictIds],postalCodes:[...n.postalCodes,...r.postalCodes]}),{marketIds:[],stateIds:[],administrativeDistrictIds:[],postalCodes:[]});this.ref.close(e)}_nodeToResult(e){let n={marketIds:[],stateIds:[],administrativeDistrictIds:[],postalCodes:[]};switch(e.type){case"market":{n.marketIds.push(e.key);break}case"state":{n.stateIds.push(parseInt(e.key,10));break}case"administrativeDistrict":{n.administrativeDistrictIds.push(io.create(e.key));break}case"postalCode":{n.postalCodes.push(e.key);break}}if(e.children){let r=e.children.map(o=>this._nodeToResult(o)).reduce((o,a)=>({marketIds:[...o.marketIds,...a.marketIds],stateIds:[...o.stateIds,...a.stateIds],administrativeDistrictIds:[...o.administrativeDistrictIds,...a.administrativeDistrictIds],postalCodes:[...o.postalCodes,...a.postalCodes]}));n.marketIds=[...n.marketIds,...r.marketIds],n.stateIds=[...n.stateIds,...r.stateIds],n.administrativeDistrictIds=[...n.administrativeDistrictIds,...r.administrativeDistrictIds],n.postalCodes=[...n.postalCodes,...r.postalCodes]}return n}_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(n=>{let r=o1.byId(parseInt(n.label,10)),o;return n.children.length>0&&(o=this._createAdministrativeDistrictIdNodes(n.children,r)),{type:"state",key:r.id.toString(),selectable:!0,label:r.name,children:o,leaf:!!o}})}_createAdministrativeDistrictIdNodes(e,n=void 0){return e.filter(r=>n?io.create(r.label).getStateId()===n.id:!0).map(r=>{let o=io.create(r.label),a;return r.children.length>0&&(a=this._createPostalCodeNodes(r.children,n,o)),{type:"administrativeDistrict",key:o.value,selectable:!0,label:this._allAdministrativeDistricts[o.getNumericValue().toString()].displayName(),children:a,leaf:!!a}})}_createPostalCodeNodes(e,n=void 0,r=void 0){return e.map(o=>o.label).map(o=>this._allPostalCodes[o]).filter(o=>n?io.create(o.administrativeDistrictId)?.getStateId()===n.id:!0).filter(o=>r?o.administrativeDistrictId===r.getNumericValue():!0).map(o=>({type:"postalCode",key:o.postalCode,selectable:!0,label:o.getDisplayName()}))}static \u0275fac=function(n){return new(n||t)(xe(El),xe(zc),xe(Ap),xe(ib),xe(pg),xe(dn))};static \u0275cmp=re({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(n,r){n&1&&(O(0,"div")(1,"p-tree",0),te("selectionChange",function(a){return r.onSelectionChange(a)}),M()(),O(2,"div",1)(3,"button",2),te("click",function(){return r.ref.close()}),ee(4,"Abbrechen"),M(),O(5,"button",3),te("click",function(){return r.onSubmit()}),ee(6," \xDCbernehmen "),M()()),n&2&&(E(),D("value",r.nodes)("loading",r.loading)("selection",r.treeSelection))},dependencies:[wC,Iy,so,Kr],encapsulation:2,changeDetection:0})}return t})();function Rpi(t,i){if(t&1&&(O(0,"mat-hint"),ee(1),M()),t&2){let e=L();E(),Pt(e.plugin==null?null:e.plugin.validationToText())}}var Ert=(()=>{class t{_dialogService;plugin;pluginValid;pluginConfig={availableMarketIds:[]};pluginChange=new ve;displayText="";constructor(e){this._dialogService=e}ngOnInit(){this.displayText=this.plugin.toText()}edit(e){e.stopPropagation();let n=$e(pe({},Ul),{header:"Gebiete ausw\xE4hlen",data:$e(pe({},this.plugin.toValue()),{availableMarketIds:this.pluginConfig.availableMarketIds})});this._dialogService.open(Trt,n).onClose.pipe(vn(r=>!!r)).subscribe(r=>{this.plugin=new O1(r.marketIds,r.stateIds,r.administrativeDistrictIds,r.postalCodes),this.displayText=this.plugin.toText(),this.pluginChange.emit(new O1(r.marketIds,r.stateIds,r.administrativeDistrictIds,r.postalCodes))})}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-market-content-selection"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],decls:5,vars:5,consts:[["matInput","","placeholder","M\xE4rkte",3,"click","readonly","value"],["matSuffix",""]],template:function(n,r){n&1&&(O(0,"mat-form-field")(1,"input",0),te("click",function(a){return r.edit(a)}),M(),O(2,"mat-icon",1),ee(3,"arrow_drop_down"),M(),yt(4,Rpi,2,1,"mat-hint"),M()),n&2&&(zn("custom-invalid",!r.pluginValid),E(),D("readonly",!0)("value",r.displayText),E(3),vt(r.pluginValid?-1:4))},dependencies:[mc,Oa,yp,km,hc,zs,da,zr],encapsulation:2})}return t})();var Art=(()=>{class t{plugin;pluginValid;pluginChange=new ve;initialSelection;config={selectLabel:"Versicherungsart",resetOption:!0,option:{uniqueFnc:e=>e.insuranceType,sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),searchOptionAccessor:e=>e.displayName},valid$:new hi(1)};selectOptions=$t([{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?gr.equals(this.plugin.toValue(),e.insuranceType)||this.pluginChange.emit(new lO(e.insuranceType)):this.pluginChange.emit(new lO(null))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-insurance-type"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onInsuranceTypeChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Va],encapsulation:2})}return t})();var Drt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;config={selectLabel:"InEK Kalkulationskrankenh\xE4user",valid$:new hi(1),resetOption:!1,option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.displayName,searchOptionAccessor:e=>e.displayName}};options=$t([{bool:!0,displayName:"InEK Kalkulationskrankenh\xE4user einbeziehen"},{bool:!1,displayName:"InEK Kalkulationskrankenh\xE4user ausschlie\xDFen"}]);initial;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 eB(e.bool))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-inek-calculation-location"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[["data-test","clinics-filter-form-inek-calculation-location-checkbox",3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onSelectionChanged(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Va],encapsulation:2})}return t})();var krt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"ICD-Gruppe",optionGroup:{sortFnc:(e,n)=>e.code.name.localeCompare(n.code.name),uniqueFnc:e=>e.code.name,searchOptionAccessor:e=>e.code.name},option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.name,searchOptionAccessor:e=>this.searchOptionAccessor(e),searchOptionDisplayName:e=>`${e.name} - ${e.description}`},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectOptions=this._codeService.treeChildren("ICD-10-GM").pipe(On(r=>Ys(r.map(o=>this._codeService.treeChildren(o.data.codingSystem,o.data.name).pipe(ot(a=>({code:o.data,options:a.map(m=>m.data)})))))))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let n=[];e.forEach(o=>{o.options.forEach(a=>{this.selection.indexOf(a.name)>-1&&n.push(a)})}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.name))||this.onSelectionChange(n)}onSelectionChange(e){Ni.equals(this.selection,e.map(n=>n.name))||(this.selection=[...e.map(n=>n.name)],this.pluginChange.emit(new M1([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,n){return!e||!n?e?-1:1:e.name.localeCompare(n.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-icd-10-gm-code-group"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select-option-group",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[DO],encapsulation:2,changeDetection:0})}return t})();var Mrt=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;config={emitEventOnInitialSelection:!1,selectLabel:"ICD-Kapitel",option:{sortFnc:(e,n)=>this.sortFnc(e,n),uniqueFnc:e=>e.name,searchOptionAccessor:e=>this.searchOptionAccessor(e),searchOptionDisplayName:e=>`${e.name} - ${e.description}`},valid$:new hi(1)};selectOptions=dl;initialSelection;selection=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectOptions=this._codeService.treeChildren("ICD-10-GM").pipe(ot(r=>r.map(o=>o.data)))}ngOnChanges(e){e.plugin&&this._onPluginChanged(),e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onOptionsChange(e){let n=[];e.forEach(o=>{this.selection.indexOf(o.name)>-1&&n.push(o)}),this.initialSelection=n,Ni.equals(this.selection,n.map(o=>o.name))||this.onSelectionChange(n)}onSelectionChange(e){Ni.equals(this.selection,e.map(n=>n.name))||(this.selection=[...e.map(n=>n.name)],this.pluginChange.emit(new k1([...e])),this.initialSelection=void 0)}searchOptionAccessor(e){return`${e.name} ${e.description}`}sortFnc(e,n){return!e||!n?e?-1:1:e.name.localeCompare(n.name)}_onPluginChanged(){this.selection=[...this.plugin.toValue().map(e=>e.name)],this.selectOptions.subscribe(e=>{this.onOptionsChange(e),this._cdr.markForCheck()})}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-icd-10-gm-code-chapter"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","optionsChange","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)})("optionsChange",function(a){return r.onOptionsChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.selectOptions)("initialSelection",r.initialSelection)},dependencies:[Yo],encapsulation:2,changeDetection:0})}return t})();function Ppi(t,i){if(t&1&&(O(0,"div",3)(1,"div",4)(2,"span",5),ee(3),M()(),O(4,"div",6)(5,"span",7),ee(6),M()()()),t&2){let e=i.$implicit;E(3),Pt(e.name),E(3),Pt(e.description)}}var Ort=(()=>{class t{_cdr;_codeService;plugin;pluginValid;pluginChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};placeholderText="ICD-Ziffer";selectionCtrl=new ho(void 0);suggestions=[];constructor(e,n){this._cdr=e,this._codeService=n,this.selectionCtrl.valueChanges.pipe(vn(r=>typeof r=="object"||r===null||r===void 0)).subscribe(r=>this.pluginChange.emit(new DC(r?[r.clone()]:[])))}ngOnChanges(e){if(e.plugin)if(this.plugin){let n=this.plugin.toValue();n.length===1?this.selectionCtrl.setValue(n[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(n=>{this.suggestions=n,this._cdr.markForCheck()})}onClear(){this.onRemoveSelection(),this.pluginChange.emit(new DC([]))}static \u0275fac=function(n){return new(n||t)(xe(dn),xe(Wm))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-icd-10-gm-code"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],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(n,r){if(n&1){let o=qe();O(0,"p-iftalabel")(1,"p-autoComplete",1),te("completeMethod",function(c){return se(o),le(r.searchCode(c))})("onClear",function(){return se(o),le(r.onClear())}),ie(2,Ppi,7,2,"ng-template",null,0,di),M(),O(4,"label",2),ee(5),M()()}n&2&&(E(),Pe(r.pluginValid?"":"ng-invalid ng-dirty"),D("formControl",r.selectionCtrl)("suggestions",r.suggestions)("showClear",!0)("overlayOptions",r.overlayOptions),E(4),Pt(r.placeholderText))},dependencies:[Pu,Ho,oa,yr,Mc],encapsulation:2,changeDetection:0})}return t})();var Ype={codingSystem:["ICD-10-AT","PROCEDURE-AT"],codeTypeSpecification:!1,matchingSpecification:!1,resolveOnSelect:!1,includesExcludesSelection:!1},Rrt={disableFnc:OE,detailLinkFnc:RE,filterFnc:lC,emptyResourcesText:"Keine Ziffer-Spektra gefunden",resourceNameTitle:"Ziffer-Spektra",selectOnInit:"first",resetOption:!1};var jQ=class{_codeSpectrumSelect;_options;update$=new Ai;_codes;constructor(i,e){this._codeSpectrumSelect=i,this._options=e}updateCodeSpectraSelect(i,e){this._codeSpectrumSelect[i]=e,i==="codingSystem"?this._onCodingSystemChange():i==="codeSpectra"&&(this._codeSpectrumSelect.codeSpectrumIds=e.map(n=>n.id)),this._onSelect()}get codes(){return this._codes}get codeSpectrumSelect(){return this._codeSpectrumSelect}set codeSpectrumSelect(i){this._codeSpectrumSelect=i,this._initCodingSystem(),(i.codeSpectra&&i.codeSpectra.length>0||i.codeSpectrumIds&&i.codeSpectrumIds.length>0)&&i.codingSystem&&this._onSelect()}set options(i){this._options=i}get options(){return this._options}_onCodingSystemChange(){this._setCodeTypeSpecification()}_onSelect(){this.update$.next(this._codeSpectrumSelect)}_initCodingSystem(){this._codeSpectrumSelect&&!this._codeSpectrumSelect?.codingSystem&&this._options&&(this._codeSpectrumSelect.codingSystem=this._options.codingSystem[0])}_setCodeTypeSpecification(){this._codeSpectrumSelect?.codingSystem==="PROCEDURE-AT"?this._codeSpectrumSelect.codeTypeSpecification=null:this._codeSpectrumSelect.codingSystem==="ICD-10-AT"&&(this._codeSpectrumSelect.codeTypeSpecification="mainDiagnosis")}};var Prt=(()=>{class t{matchingSpecification;matchingSpecificationChange=new ve;config={id:"code-spectrum-at-select-inline-matching-specification-select",selectLabel:"Abgleich",option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.matchingSpecification,searchOptionAccessor:e=>e.displayName}};options=$t([{matchingSpecification:"exact",displayName:"Exakt"},{matchingSpecification:"leftAnchored",displayName:"Aufl\xF6sen"}]);intial;ngOnInit(){this.intial={matchingSpecification:this.matchingSpecification,displayName:""}}onMatchingSpecificationChange(e){this.matchingSpecificationChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-at-select-inline-matching-specification"]],inputs:{matchingSpecification:"matchingSpecification"},outputs:{matchingSpecificationChange:"matchingSpecificationChange"},decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onMatchingSpecificationChange(a==null?null:a.matchingSpecification)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.intial)},dependencies:[Va],encapsulation:2})}return t})();var Nrt=(()=>{class t{codingSystemSpecification;codingSystem;codingSystemSpecificationChange=new ve;config={id:"code-spectrum-at-select-inline-coding-system-specification-select",selectLabel:"Spezifikation",option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.codeTypeSpecification,searchOptionAccessor:e=>e.displayName}};options=dl;initial;ngOnChanges(e){e.codingSystemSpecification&&(this.initial={codeTypeSpecification:this.codingSystemSpecification,displayName:""}),e.codingSystem&&(this.options=$t(K2[this.codingSystem].map(n=>({codeTypeSpecification:n,displayName:bA[n]}))),this.codingSystemSpecification||(this.codingSystemSpecification=this.options[0],this.onCodingSystemSpecificationChange(this.codingSystemSpecification)))}onCodingSystemSpecificationChange(e){this.codingSystemSpecificationChange.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-at-select-inline-coding-system-specification"]],inputs:{codingSystemSpecification:"codingSystemSpecification",codingSystem:"codingSystem"},outputs:{codingSystemSpecificationChange:"codingSystemSpecificationChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(n,r){n&1&&(O(0,"bd-ui-single-select",0),te("selection",function(a){return r.onCodingSystemSpecificationChange(a==null?null:a.codeTypeSpecification)}),M()),n&2&&D("config",r.config)("initialSelection",r.initial)("selectOptions",r.options)},dependencies:[Va],encapsulation:2})}return t})();var Npi=()=>["ICD-10-AT","PROCEDURE-AT"];function Fpi(t,i){if(t&1){let e=qe();O(0,"div",3)(1,"ays-code-spectrum-select-inline-includes",6),te("includesChange",function(r){se(e);let o=L();return le(o.onFieldChange("includes",r))}),M()()}if(t&2){let e=L();E(),D("includes",e.selectHandler.codeSpectrumSelect.includes)}}function Lpi(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"ays-code-coding-system-select-inline",7),te("codingSystemChange",function(r){se(e);let o=L();return le(o.onFieldChange("codingSystem",r))}),M()()}if(t&2){let e=L();E(),D("codingSystemOptions",Vr(2,Npi))("codingSystem",e.selectHandler.codeSpectrumSelect.codingSystem)}}function Bpi(t,i){if(t&1){let e=qe();O(0,"div",1)(1,"ays-code-spectrum-at-select-inline-coding-system-specification",8),te("codingSystemSpecificationChange",function(r){se(e);let o=L();return le(o.onFieldChange("codeTypeSpecification",r))}),M()()}if(t&2){let e=L();E(),D("codingSystem",e.selectHandler.codeSpectrumSelect.codingSystem)("codingSystemSpecification",e.selectHandler.codeSpectrumSelect.codeTypeSpecification)}}function Vpi(t,i){if(t&1){let e=qe();O(0,"div",4)(1,"ays-code-spectrum-at-select-inline-matching-specification",9),te("matchingSpecificationChange",function(r){se(e);let o=L();return le(o.onFieldChange("matching",r))}),M()()}if(t&2){let e=L();E(),D("matchingSpecification",e.selectHandler.codeSpectrumSelect.matching)}}var Frt=(()=>{class t extends Xo{codeSpectrumSelect;options=Ype;optionsInlineSelect=Rrt;codeSpectrumSelectChange=new ve;selectHandler=new jQ;codeSpectraSelects=[];resourceName=tn.AT_CODE_SPECTRUM;ngOnInit(){this.codeSpectrumSelect||(this.codeSpectrumSelect={codingSystem:"ICD-10-AT",codeSpectra:[],codeSpectrumIds:[],matching:"exact",includes:!0,codeTypeSpecification:"mainDiagnosis"}),this.selectHandler=new jQ(this.codeSpectrumSelect,this.options);let e=this.selectHandler.update$.subscribe(n=>{this.codeSpectrumSelectChange.emit(n),n.codeSpectrumIds&&n.codeSpectrumIds.length>0?this.codeSpectraSelects=n.codeSpectrumIds.map(r=>({id:r,resource:null})):n.codeSpectra&&n.codeSpectra.length>0?this.codeSpectraSelects=n.codeSpectra.map(r=>({id:r.id,resource:r})):this.codeSpectraSelects=[]});this.codeSpectrumSelect&&this.selectHandler.update$.next(this.codeSpectrumSelect),this._subs.push(e)}ngOnChanges(e){e.options&&e.options.currentValue&&this._onOptionsChange(this.options),e.codeSpectrumSelect&&e.codeSpectrumSelect.currentValue&&(this.selectHandler.codeSpectrumSelect=this.codeSpectrumSelect)}ngOnDestroy(){this.unsubscribeAll()}onFieldChange(e,n){this.selectHandler.updateCodeSpectraSelect(e,n)}compare(e,n){return n?e===n:e===-1}_onOptionsChange(e){this.selectHandler&&(this.selectHandler.options=this.options)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Gt(t)))(r||t)}})();static \u0275cmp=re({type:t,selectors:[["ays-code-spectrum-at-select-inline-multiple"]],inputs:{codeSpectrumSelect:"codeSpectrumSelect",options:"options",optionsInlineSelect:"optionsInlineSelect"},outputs:{codeSpectrumSelectChange:"codeSpectrumSelectChange"},features:[Tt,Yt],decls:10,vars:7,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","codingSystemOptions","codingSystem"],[3,"codingSystemSpecificationChange","codingSystem","codingSystemSpecification"],[3,"matchingSpecificationChange","matchingSpecification"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2),yt(3,Fpi,2,1,"div",3),yt(4,Lpi,2,3,"div",4),M()(),yt(5,Bpi,2,2,"div",1),O(6,"div",1)(7,"bd-resources-select-inline-multiple",5),te("resourceSelectChange",function(a){return r.onFieldChange("codeSpectra",a)}),M()(),O(8,"div",2),yt(9,Vpi,2,1,"div",4),M()()),n&2&&(E(3),vt(r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.includes&&r.options.includesExcludesSelection?3:-1),E(),vt(r.options.codingSystem.length>1&&r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.codingSystem?4:-1),E(),vt(r.options.codeTypeSpecification&&r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.codingSystem&&r.selectHandler.codeSpectrumSelect.codeTypeSpecification?5:-1),E(2),D("resourceName",r.resourceName)("resourceSelects",r.codeSpectraSelects)("config",r.optionsInlineSelect),E(2),vt(r.options.matchingSpecification&&r.selectHandler&&r.selectHandler.codeSpectrumSelect&&r.selectHandler.codeSpectrumSelect.matching?9:-1))},dependencies:[mpe,Pw,_pe,Nrt,Prt],encapsulation:2,changeDetection:0})}return t})();var Lrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;options=$e(pe({},Ype),{codingSystem:["ICD-10-AT","PROCEDURE-AT"],resolveOnSelect:!0,codeTypeSpecification:!0,matchingSpecification:!0,includesExcludesSelection:!0});resourceOptions=$e(pe({},b8),{selectOnInit:"none",resetOption:!0});codeSpectrumSelect;ngOnChanges(e){if(e.plugin){let n=this.plugin.clone();this.codeSpectrumSelect={codingSystem:n.codingSystem,codeSpectrumIds:n.codeSpectrumIds,codeTypeSpecification:n.codeTypeSpecification,matching:n.matching,includes:n.includes}}}onCodeSpectrumSelect(e){let n=new Lce(e.codeSpectrumIds,e.codingSystem,e.codeTypeSpecification,e.matching,e.includes);this.plugin.equals(n)||(this.plugin=n.clone(),this.pluginChange.emit(n.clone()))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-code-spectrum-at"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"codeSpectrumSelectChange","codeSpectrumSelect","options","optionsInlineSelect"]],template:function(n,r){n&1&&(O(0,"ays-code-spectrum-at-select-inline-multiple",0),te("codeSpectrumSelectChange",function(a){return r.onCodeSpectrumSelect(a)}),M()),n&2&&D("codeSpectrumSelect",r.codeSpectrumSelect)("options",r.options)("optionsInlineSelect",r.resourceOptions)},dependencies:[Frt],encapsulation:2})}return t})();var Brt=(()=>{class t{_clinicService;plugin;pluginValid;pluginChange=new ve;config={id:"filter-condition-special-equipment-select",selectLabel:"Klinik-Ausstattung",valid$:new hi(1),option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),uniqueFnc:e=>e.key,searchOptionAccessor:e=>e.displayName}};options=dl;initialSelection;constructor(e){this._clinicService=e,this.options=this._clinicService.availableSpecialEquipment().pipe(ot(n=>n.map(r=>({key:r.key,displayName:r.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 dB(e.map(n=>n.key)))}static \u0275fac=function(n){return new(n||t)(xe(tb))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChange(a)}),M()),n&2&&D("config",r.config)("initialSelection",r.initialSelection)("selectOptions",r.options)},dependencies:[Yo],encapsulation:2})}return t})();function qMe(t,i){let e=Array(t);for(let n=0;n{class t extends tE{constructor(){super();let e=ae(iE,{optional:!0});this.setLocale(e)}getYear(e){return une(e)}getMonth(e){return dne(e)}getDate(e){return pHe(e)}getDayOfWeek(e){return mHe(e)}getMonthNames(e){let n=zpi[e];return qMe(12,r=>this.format(new Date(2017,r,1),n))}getDateNames(){let e=typeof Intl<"u"?new Intl.DateTimeFormat(this.locale.code,{day:"numeric",timeZone:"utc"}):null;return qMe(31,n=>{if(e){let r=new Date;return r.setUTCFullYear(2017,0,n+1),r.setUTCHours(0,0,0,0),e.format(r).replace(/[\u200e\u200f]/g,"")}return n+""})}getDayOfWeekNames(e){let n=Upi[e];return qMe(7,r=>this.format(new Date(2017,0,r+1),n))}getYearName(e){return this.format(e,"y")}getFirstDayOfWeek(){return this.locale.options?.weekStartsOn??0}getNumDaysInMonth(e){return cne(e)}clone(e){return new Date(e.getTime())}createDate(e,n,r){let o=new Date;return o.setFullYear(e,n,r),o.setHours(0,0,0,0),o.getMonth()!=n,o}today(){return new Date}parse(e,n){if(typeof e=="string"&&e.length>0){let r=Zbe(e);if(this.isValid(r))return r;let o=Array.isArray(n)?n:[n];if(!n.length)throw Error("Formats array must not be empty.");for(let a of o){let c=wHe(e,a,new Date,{locale:this.locale});if(this.isValid(c))return c}return this.invalid()}else{if(typeof e=="number")return new Date(e);if(e instanceof Date)return this.clone(e)}return null}format(e,n){if(!this.isValid(e))throw Error("DateFnsAdapter: Cannot format invalid date.");return uHe(e,n,{locale:this.locale})}addCalendarYears(e,n){return GP(e,n)}addCalendarMonths(e,n){return qx(e,n)}addCalendarDays(e,n){return wv(e,n)}toIso8601(e){return u9(e,{representation:"date"})}deserialize(e){if(typeof e=="string"){if(!e)return null;let n=Zbe(e);if(this.isValid(n))return n}return super.deserialize(e)}isDateInstance(e){return ine(e)}isValid(e){return nne(e)}invalid(){return new Date(NaN)}setTime(e,n,r,o){return EHe(this.clone(e),{hours:n,minutes:r,seconds:o,milliseconds:0})}getHours(e){return fHe(e)}getMinutes(e){return _He(e)}getSeconds(e){return yHe(e)}parseTime(e,n){return this.parse(e,n)}addSeconds(e,n){return tne(e,n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Wpe={parse:{dateInput:"P",timeInput:"p"},display:{dateInput:"P",timeInput:"p",monthYearLabel:"LLL uuuu",dateA11yLabel:"PP",monthYearA11yLabel:"LLLL uuuu",timeOptionLabel:"p"}};function Vrt(t=Wpe){return[{provide:tE,useClass:Kpe,deps:[iE]},{provide:Q4,useValue:t}]}var zrt={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"}}},Qpe=(t,i,e)=>{let n,r=e?.addSuffix?zrt[t].withPreposition:zrt[t].standalone;return typeof r=="string"?n=r:i===1?n=r.one:n=r.other.replace("{{count}}",String(i)),e?.addSuffix?e.comparison&&e.comparison>0?"in "+n:"vor "+n:n};var Hpi={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Gpi={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},jpi={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Zpe={date:eM({formats:Hpi,defaultWidth:"full"}),time:eM({formats:Gpi,defaultWidth:"full"}),dateTime:eM({formats:jpi,defaultWidth:"full"})};var $pi={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},Xpe=(t,i,e,n)=>$pi[t];var qpi={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ypi={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},YMe={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"]},Kpi={narrow:YMe.narrow,abbreviated:["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:YMe.wide},Wpi={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"]},Qpi={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"}},Zpi={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"}},Xpi=t=>Number(t)+".",Urt={ordinalNumber:Xpi,era:Jh({values:qpi,defaultWidth:"wide"}),quarter:Jh({values:Ypi,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Jh({values:YMe,formattingValues:Kpi,defaultWidth:"wide"}),day:Jh({values:Wpi,defaultWidth:"wide"}),dayPeriod:Jh({values:Qpi,defaultWidth:"wide",formattingValues:Zpi,defaultFormattingWidth:"wide"})};var Jpi=/^(\d+)(\.)?/i,emi=/\d+/i,tmi={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},imi={any:[/^v/i,/^n/i]},nmi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},rmi={any:[/1/i,/2/i,/3/i,/4/i]},omi={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},ami={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]},smi={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},lmi={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},cmi={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},dmi={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}},Jpe={ordinalNumber:rne({matchPattern:Jpi,parsePattern:emi,valueCallback:t=>parseInt(t)}),era:Kb({matchPatterns:tmi,defaultMatchWidth:"wide",parsePatterns:imi,defaultParseWidth:"any"}),quarter:Kb({matchPatterns:nmi,defaultMatchWidth:"wide",parsePatterns:rmi,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Kb({matchPatterns:omi,defaultMatchWidth:"wide",parsePatterns:ami,defaultParseWidth:"any"}),day:Kb({matchPatterns:smi,defaultMatchWidth:"wide",parsePatterns:lmi,defaultParseWidth:"any"}),dayPeriod:Kb({matchPatterns:cmi,defaultMatchWidth:"wide",parsePatterns:dmi,defaultParseWidth:"any"})};var Hrt={code:"de",formatDistance:Qpe,formatLong:Zpe,formatRelative:Xpe,localize:Urt,match:Jpe,options:{weekStartsOn:1,firstWeekContainsDate:4}};var umi={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},pmi={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},KMe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["J\xE4n","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["J\xE4nner","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},mmi={narrow:KMe.narrow,abbreviated:["J\xE4n.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:KMe.wide},hmi={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"]},fmi={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"}},gmi={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"}},_mi=t=>Number(t)+".",Grt={ordinalNumber:_mi,era:Jh({values:umi,defaultWidth:"wide"}),quarter:Jh({values:pmi,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Jh({values:KMe,formattingValues:mmi,defaultWidth:"wide"}),day:Jh({values:hmi,defaultWidth:"wide"}),dayPeriod:Jh({values:fmi,defaultWidth:"wide",formattingValues:gmi,defaultFormattingWidth:"wide"})};var jrt={code:"de-AT",formatDistance:Qpe,formatLong:Zpe,formatRelative:Xpe,localize:Grt,match:Jpe,options:{weekStartsOn:1,firstWeekContainsDate:4}};function $rt(){return[Vrt(),{provide:iE,useValue:Hrt},{provide:Q4,useValue:Wpe},{provide:tE,useClass:Kpe,deps:[iE]},{provide:Ar,useValue:{filterType:mL.type,filterConditionId:MEe,filterConditionPluginSpecification:mL,filterConditionComponent:Lit},multi:!0},{provide:Ar,useValue:{filterType:fL.type,filterConditionId:REe,filterConditionPluginSpecification:fL,filterConditionComponent:Bit},multi:!0},{provide:Ar,useValue:{filterType:RK.type,filterConditionId:NEe,filterConditionPluginSpecification:RK,filterConditionComponent:Jnt},multi:!0},{provide:Ar,useValue:{filterType:PK.type,filterConditionId:LEe,filterConditionPluginSpecification:PK,filterConditionComponent:trt},multi:!0},{provide:Ar,useValue:{filterType:vA.type,filterConditionId:Vce,filterConditionPluginSpecification:vA,filterConditionComponent:$Me},multi:!0},{provide:Ar,useValue:{filterType:UK.type,filterConditionId:$Ee,filterConditionPluginSpecification:UK,filterConditionComponent:irt},multi:!0},{provide:Ar,useValue:{filterType:bL.type,filterConditionId:YEe,filterConditionPluginSpecification:bL,filterConditionComponent:Wnt},multi:!0},{provide:Ar,useValue:{filterType:HK.type,filterConditionId:WEe,filterConditionPluginSpecification:HK,filterConditionComponent:nrt},multi:!0},{provide:Ar,useValue:{filterType:GK.type,filterConditionId:ZEe,filterConditionPluginSpecification:GK,filterConditionComponent:rrt},multi:!0},{provide:Ar,useValue:{filterType:jK.type,filterConditionId:JEe,filterConditionPluginSpecification:jK,filterConditionComponent:ort},multi:!0},{provide:Ar,useValue:{filterType:$K.type,filterConditionId:tAe,filterConditionPluginSpecification:$K,filterConditionComponent:art},multi:!0},{provide:Ar,useValue:{filterType:KK.type,filterConditionId:oAe,filterConditionPluginSpecification:KK,filterConditionComponent:srt},multi:!0},{provide:Ar,useValue:{filterType:WK.type,filterConditionId:sAe,filterConditionPluginSpecification:WK,filterConditionComponent:Kit},multi:!0},{provide:Ar,useValue:{filterType:ZK.type,filterConditionId:cAe,filterConditionPluginSpecification:ZK,filterConditionComponent:lrt},multi:!0},{provide:Ar,useValue:{filterType:XK.type,filterConditionId:uAe,filterConditionPluginSpecification:XK,filterConditionComponent:Wit},multi:!0},{provide:Ar,useValue:{filterType:HL.type,filterConditionId:null,filterConditionPluginSpecification:HL,filterConditionComponent:crt},multi:!0},{provide:Ar,useValue:{filterType:GL.type,filterConditionId:null,filterConditionPluginSpecification:GL,filterConditionComponent:UMe},multi:!0},{provide:Ar,useValue:{filterType:kW.type,filterConditionId:null,filterConditionPluginSpecification:kW,filterConditionComponent:Qit},multi:!0},{provide:Ar,useValue:{filterType:OW.type,filterConditionId:nSe,filterConditionPluginSpecification:OW,filterConditionComponent:Zit},multi:!0},{provide:Ar,useValue:{filterType:RW.type,filterConditionId:EDe,filterConditionPluginSpecification:RW,filterConditionComponent:drt},multi:!0},{provide:Ar,useValue:{filterType:UL.type,filterConditionId:IDe,filterConditionPluginSpecification:UL,filterConditionComponent:urt},multi:!0},{provide:Ar,useValue:{filterType:qL.type,filterConditionId:MDe,filterConditionPluginSpecification:qL,filterConditionComponent:prt},multi:!0},{provide:Ar,useValue:{filterType:PW.type,filterConditionId:DDe,filterConditionPluginSpecification:PW,filterConditionComponent:mrt},multi:!0},{provide:Ar,useValue:{filterType:NW.type,filterConditionId:null,filterConditionPluginSpecification:NW,filterConditionComponent:hrt},multi:!0},{provide:Ar,useValue:{filterType:YL.type,filterConditionId:ODe,filterConditionPluginSpecification:YL,filterConditionComponent:ent},multi:!0},{provide:Ar,useValue:{filterType:FW.type,filterConditionId:PDe,filterConditionPluginSpecification:FW,filterConditionComponent:frt},multi:!0},{provide:Ar,useValue:{filterType:LW.type,filterConditionId:LDe,filterConditionPluginSpecification:LW,filterConditionComponent:Pnt},multi:!0},{provide:Ar,useValue:{filterType:BW.type,filterConditionId:zDe,filterConditionPluginSpecification:BW,filterConditionComponent:Znt},multi:!0},{provide:Ar,useValue:{filterType:JL.type,filterConditionId:qDe,filterConditionPluginSpecification:JL,filterConditionComponent:Ort},multi:!0},{provide:Ar,useValue:{filterType:ZL.type,filterConditionId:HDe,filterConditionPluginSpecification:ZL,filterConditionComponent:Mrt},multi:!0},{provide:Ar,useValue:{filterType:XL.type,filterConditionId:jDe,filterConditionPluginSpecification:XL,filterConditionComponent:krt},multi:!0},{provide:Ar,useValue:{filterType:VW.type,filterConditionId:KDe,filterConditionPluginSpecification:VW,filterConditionComponent:Drt},multi:!0},{provide:Ar,useValue:{filterType:UW.type,filterConditionId:WDe,filterConditionPluginSpecification:UW,filterConditionComponent:Nnt},multi:!0},{provide:Ar,useValue:{filterType:GW.type,filterConditionId:null,filterConditionPluginSpecification:GW,filterConditionComponent:Fnt},multi:!0},{provide:Ar,useValue:{filterType:jW.type,filterConditionId:ZDe,filterConditionPluginSpecification:jW,filterConditionComponent:Art},multi:!0},{provide:Ar,useValue:{filterType:j6.type,filterConditionId:JDe,filterConditionPluginSpecification:j6,filterConditionComponent:Vnt},multi:!0},{provide:Ar,useValue:{filterType:$W.type,filterConditionId:null,filterConditionPluginSpecification:$W,filterConditionComponent:Irt},multi:!0},{provide:Ar,useValue:{filterType:oB.type,filterConditionId:null,filterConditionPluginSpecification:oB,filterConditionComponent:Ert},multi:!0},{provide:Ar,useValue:{filterType:YW.type,filterConditionId:nke,filterConditionPluginSpecification:YW,filterConditionComponent:wrt},multi:!0},{provide:Ar,useValue:{filterType:YK.type,filterConditionId:nAe,filterConditionPluginSpecification:YK,filterConditionComponent:znt},multi:!0},{provide:Ar,useValue:{filterType:q6.type,filterConditionId:oke,filterConditionPluginSpecification:q6,filterConditionComponent:Srt},multi:!0},{provide:Ar,useValue:{filterType:Y6.type,filterConditionId:ske,filterConditionPluginSpecification:Y6,filterConditionComponent:xrt},multi:!0},{provide:Ar,useValue:{filterType:aB.type,filterConditionId:cke,filterConditionPluginSpecification:aB,filterConditionComponent:Crt},multi:!0},{provide:Ar,useValue:{filterType:sB.type,filterConditionId:null,filterConditionPluginSpecification:sB,filterConditionComponent:brt},multi:!0},{provide:Ar,useValue:{filterType:lB.type,filterConditionId:uke,filterConditionPluginSpecification:lB,filterConditionComponent:vrt},multi:!0},{provide:Ar,useValue:{filterType:cB.type,filterConditionId:null,filterConditionPluginSpecification:cB,filterConditionComponent:yrt},multi:!0},{provide:Ar,useValue:{filterType:nB.type,filterConditionId:tke,filterConditionPluginSpecification:nB,filterConditionComponent:Knt},multi:!0},{provide:Ar,useValue:{filterType:OC.type,filterConditionId:hke,filterConditionPluginSpecification:OC,filterConditionComponent:_rt},multi:!0},{provide:Ar,useValue:{filterType:tB.type,filterConditionId:eke,filterConditionPluginSpecification:tB,filterConditionComponent:Xnt},multi:!0},{provide:Ar,useValue:{filterType:DW.type,filterConditionId:wDe,filterConditionPluginSpecification:DW,filterConditionComponent:Unt},multi:!0},{provide:Ar,useValue:{filterType:WW.type,filterConditionId:gke,filterConditionPluginSpecification:WW,filterConditionComponent:grt},multi:!0},{provide:Ar,useValue:{filterType:KW.type,filterConditionId:mke,filterConditionPluginSpecification:KW,filterConditionComponent:Brt},multi:!0}]}function qrt(){return[{provide:iE,useValue:jrt},{provide:Q4,useValue:Wpe},{provide:tE,useClass:Kpe,deps:[iE]},{provide:Ar,useValue:{filterType:GL.type,filterConditionId:null,filterConditionPluginSpecification:GL,filterConditionComponent:UMe},multi:!0},{provide:Ar,useValue:{filterType:vA.type,filterConditionId:Vce,filterConditionPluginSpecification:vA,filterConditionComponent:$Me},multi:!0},{provide:Ar,useValue:{filterType:_K.type,filterConditionId:gEe,filterConditionPluginSpecification:_K,filterConditionComponent:Vit},multi:!0},{provide:Ar,useValue:{filterType:vK.type,filterConditionId:yEe,filterConditionPluginSpecification:vK,filterConditionComponent:zit},multi:!0},{provide:Ar,useValue:{filterType:mK.type,filterConditionId:null,filterConditionPluginSpecification:mK,filterConditionComponent:Lrt},multi:!0},{provide:Ar,useValue:{filterType:CK.type,filterConditionId:bEe,filterConditionPluginSpecification:CK,filterConditionComponent:Uit},multi:!0},{provide:Ar,useValue:{filterType:fK.type,filterConditionId:hEe,filterConditionPluginSpecification:fK,filterConditionComponent:Hit},multi:!0},{provide:Ar,useValue:{filterType:MK.type,filterConditionId:kEe,filterConditionPluginSpecification:MK,filterConditionComponent:Yit},multi:!0},{provide:Ar,useValue:{filterType:SK.type,filterConditionId:xEe,filterConditionPluginSpecification:SK,filterConditionComponent:Git},multi:!0},{provide:Ar,useValue:{filterType:IK.type,filterConditionId:wEe,filterConditionPluginSpecification:IK,filterConditionComponent:jit},multi:!0},{provide:Ar,useValue:{filterType:DK.type,filterConditionId:AEe,filterConditionPluginSpecification:DK,filterConditionComponent:qit},multi:!0},{provide:Ar,useValue:{filterType:EK.type,filterConditionId:TEe,filterConditionPluginSpecification:EK,filterConditionComponent:$it},multi:!0}]}var TI=class extends Xo{dataTestPrefix;includeExcludeConfig;includeExcludeOptions=$t([{value:"include",displayName:"Einschlie\xDFend"},{value:"exclude",displayName:"Ausschlie\xDFend"}]);includeExcludeInitial;initial;includeExclude$=new hi(1);pluginContent$=new hi(1);constructor(i){super(),this.dataTestPrefix=i,this._subs.push(Ec({pluginContent:this.pluginContent$,includeExclude:this.includeExclude$}).subscribe(e=>this.onContentChange(e.pluginContent,e.includeExclude))),this.includeExcludeConfig={id:`${this.dataTestPrefix}-include-exclude-select`,selectLabel:"Filterbedingung",option:{sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName),searchOptionAccessor:e=>e.displayName,uniqueFnc:e=>e.value}}}initInitial(i){this.initial=i,this.pluginContent$.next(this.initial)}initAsInclude(){this.includeExclude$.next("include"),this.includeExcludeInitial={value:"include",displayName:""}}initAsExclude(){this.includeExclude$.next("exclude"),this.includeExcludeInitial={value:"exclude",displayName:""}}};var Yrt=(()=>{class t extends TI{_virtualClinicService;plugin;pluginValid;pluginChange=new ve;config={id:"intuitive-file-of-truth-category-select",selectLabel:fB.displayName.de,option:{uniqueFnc:e=>e,searchOptionAccessor:e=>e,sortFnc:(e,n)=>e.localeCompare(n)},valid$:new hi(1)};options=dl;constructor(e){super("intuitive-file-of-truth-category"),this._virtualClinicService=e,this.options=this._virtualClinicService.fileOfTruthCategories()}ngOnInit(){if(this.plugin){let e=this.plugin.toValue();e.excludes?this.initAsExclude():this.initAsInclude(),this.initInitial(e.excludes??e.includes??[])}else this.initInitial([]),this.initAsInclude()}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}ngOnDestroy(){this.unsubscribeAll()}onCategoryChange(e){this.pluginContent$.next(e)}onContentChange(e,n){n==="include"?this.pluginChange.emit(new gO(e,null)):this.pluginChange.emit(new gO(null,e))}static \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-intuitive-file-of-truth-category"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],decls:5,vars:6,consts:[[1,"flex","flex-row","gap-4","items-center"],[1,"flex-1"],[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"bd-ui-multi-select",2),te("selection",function(a){return r.onCategoryChange(a)}),M()(),O(3,"div")(4,"bd-ui-single-select",2),te("selection",function(a){return r.includeExclude$.next(a==null?null:a.value)}),M()()()),n&2&&(E(2),D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial),E(2),D("config",r.includeExcludeConfig)("selectOptions",r.includeExcludeOptions)("initialSelection",r.includeExcludeInitial))},dependencies:[Yo,Va],encapsulation:2})}return t})();var Krt=(()=>{class t extends TI{_virtualClinicService;plugin;pluginValid;pluginChange=new ve;config={id:"intuitive-file-of-truth-procedure-name-select",selectLabel:gB.displayName.de,optionGroup:{uniqueFnc:e=>e.name,searchOptionAccessor:e=>e.name,sortFnc:(e,n)=>e.name.localeCompare(n.name)},option:{uniqueFnc:e=>e,searchOptionAccessor:e=>e,sortFnc:(e,n)=>e.localeCompare(n)},valid$:new hi(1)};options=dl;constructor(e){super("intuitive-file-of-truth-procedure-name"),this._virtualClinicService=e,this.options=this._virtualClinicService.fileOfTruthProcedureNames().pipe(ot(n=>Object.keys(n).map(r=>({name:r,options:n[r]}))))}ngOnInit(){if(this.plugin){let e=this.plugin.toValue();e.excludes?this.initAsExclude():this.initAsInclude(),this.initInitial(e.excludes??e.includes??[])}else this.initInitial([]),this.initAsInclude()}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}ngOnDestroy(){this.unsubscribeAll()}onProcedureNameChange(e){this.pluginContent$.next(e)}onContentChange(e,n){n==="include"?this.pluginChange.emit(new _O(e,null)):this.pluginChange.emit(new _O(null,e))}static \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-intuitive-file-of-truth-procedure-name"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],decls:5,vars:6,consts:[[1,"flex","flex-row","gap-4","items-center"],[1,"flex-1"],[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"bd-ui-multi-select-option-group",2),te("selection",function(a){return r.onProcedureNameChange(a)}),M()(),O(3,"div")(4,"bd-ui-single-select",2),te("selection",function(a){return r.includeExclude$.next(a==null?null:a.value)}),M()()()),n&2&&(E(2),D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial),E(2),D("config",r.includeExcludeConfig)("selectOptions",r.includeExcludeOptions)("initialSelection",r.includeExcludeInitial))},dependencies:[DO,Va],encapsulation:2})}return t})();var Wrt=(()=>{class t extends TI{_virtualClinicService;plugin;pluginValid;pluginChange=new ve;config={id:"intuitive-file-of-truth-procedure-subject-select",selectLabel:_B.displayName.de,optionGroup:{uniqueFnc:e=>e.name,searchOptionAccessor:e=>e.name,sortFnc:(e,n)=>e.name.localeCompare(n.name)},option:{uniqueFnc:e=>e,searchOptionAccessor:e=>e,sortFnc:(e,n)=>e.localeCompare(n)},valid$:new hi(1)};options=dl;constructor(e){super("intuitive-file-of-truth-procedure-subject"),this._virtualClinicService=e,this.options=this._virtualClinicService.fileOfTruthProcedureSubjects().pipe(ot(n=>Object.keys(n).map(r=>({name:r,options:n[r]}))))}ngOnInit(){if(this.plugin){let e=this.plugin.toValue();e.excludes?this.initAsExclude():this.initAsInclude(),this.initInitial(e.excludes??e.includes??[])}else this.initInitial([]),this.initAsInclude()}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}ngOnDestroy(){this.unsubscribeAll()}onProcedureSubjectChange(e){this.pluginContent$.next(e)}onContentChange(e,n){n==="include"?this.pluginChange.emit(new yO(e,null)):this.pluginChange.emit(new yO(null,e))}static \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-intuitive-file-of-truth-procedure-subject"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],decls:5,vars:6,consts:[[1,"flex","flex-row","gap-4","items-center"],[1,"flex-1"],[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"bd-ui-multi-select-option-group",2),te("selection",function(a){return r.onProcedureSubjectChange(a)}),M()(),O(3,"div")(4,"bd-ui-single-select",2),te("selection",function(a){return r.includeExclude$.next(a==null?null:a.value)}),M()()()),n&2&&(E(2),D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial),E(2),D("config",r.includeExcludeConfig)("selectOptions",r.includeExcludeOptions)("initialSelection",r.includeExcludeInitial))},dependencies:[DO,Va],encapsulation:2})}return t})();var Qrt=(()=>{class t extends TI{_virtualClinicService;plugin;pluginValid;pluginChange=new ve;config={id:"intuitive-file-of-truth-type-of-entry-select",selectLabel:yB.displayName.de,option:{uniqueFnc:e=>e,searchOptionAccessor:e=>e,sortFnc:(e,n)=>e.localeCompare(n)},valid$:new hi(1)};options=dl;constructor(e){super("intuitive-file-of-truth-type-of-entry"),this._virtualClinicService=e,this.options=this._virtualClinicService.fileOfTruthTypeOfEntries()}ngOnInit(){if(this.plugin){let e=this.plugin.toValue();e.excludes?this.initAsExclude():this.initAsInclude(),this.initInitial(e.excludes??e.includes??[])}else this.initInitial([]),this.initAsInclude()}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid})}ngOnDestroy(){this.unsubscribeAll()}onTypeOfEntryChange(e){this.pluginContent$.next(e)}onContentChange(e,n){n==="include"?this.pluginChange.emit(new vO(e,null)):this.pluginChange.emit(new vO(null,e))}static \u0275fac=function(n){return new(n||t)(xe(Cc))};static \u0275cmp=re({type:t,selectors:[["filter-condition-form-intuitive-file-of-truth-type-of-entry"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Tt,Yt],decls:5,vars:6,consts:[[1,"flex","flex-row","gap-4","items-center"],[1,"flex-1"],[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"bd-ui-multi-select",2),te("selection",function(a){return r.onTypeOfEntryChange(a)}),M()(),O(3,"div")(4,"bd-ui-single-select",2),te("selection",function(a){return r.includeExclude$.next(a==null?null:a.value)}),M()()()),n&2&&(E(2),D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial),E(2),D("config",r.includeExcludeConfig)("selectOptions",r.includeExcludeOptions)("initialSelection",r.includeExcludeInitial))},dependencies:[Yo,Va],encapsulation:2})}return t})();var xmi=()=>[2025,2024,2023];function Smi(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-iftalabel")(2,"p-select",3),te("onChange",function(r){let o=se(e).$implicit,a=L();return le(a.onFieldChange(o,r.value))}),M(),O(3,"label",4),ee(4),M()()()}if(t&2){let e=i.$implicit,n=L();E(2),Pe(n.pluginValid?"mb-4":"ng-invalid ng-dirty mb-4"),D("inputId","virtual-clinic-analysis-form-select-aop-include-condition-"+e)("options",n.options)("overlayOptions",n.overlayOptions)("ngModel",n.asType(e)),E(),D("for","virtual-clinic-analysis-form-select-aop-include-condition-"+e),E(),Pt(n.includingConditionFieldDisplayNames[e])}}function wmi(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-iftalabel")(2,"p-select",3),te("onChange",function(r){let o=se(e).$implicit,a=L();return le(a.onFieldChange(o,r.value))}),M(),O(3,"label",4),ee(4),M()()()}if(t&2){let e=i.$implicit,n=L();E(2),Pe(n.pluginValid?"mb-4":"ng-invalid ng-dirty mb-4"),D("inputId","virtual-clinic-analysis-form-select-aop-exclude-condition-"+e)("options",n.options)("overlayOptions",n.overlayOptions)("ngModel",n.asType(e)),E(),D("for","virtual-clinic-analysis-form-select-aop-exclude-condition-"+e),E(),Pt(n.excludingConditionFieldDisplayNames[e])}}var Zrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;overlayOptions={mode:"overlay",appendTo:"body"};includingConditionFields=["abschnitt1Oder2"];includingConditionFieldDisplayNames={abschnitt1Oder2:"AOP-Katalog, Abschnitt I oder Abschnitt II"};excludingConditionFields=["icdNichtAmbulant","opsStationaer","funktionseinschraenkungen","pflegegrad","beatmung","altersgrenze","beidseitig","ophthalm"];excludingConditionFieldDisplayNames={icdNichtAmbulant:"ICD (station\xE4r)",opsStationaer:"OPS (station\xE4r)",funktionseinschraenkungen:"Funktionseinschr\xE4nkungen (Barthel-Index)",pflegegrad:"Pflegegrad",beatmung:"Beatmung",altersgrenze:"Altersgrenze (> 1 Jahr)",beidseitig:"Beidseitige Eingriffe",ophthalm:"Ophthalmologische Begleiterkrankungen"};options=[{value:"IGNORE",displayName:"Ignorieren"},{value:"CHECKED",displayName:"Erf\xFCllt"},{value:"NOT_CHECKED",displayName:"Nicht erf\xFCllt"}];ngOnInit(){this.plugin||uO.Specification.newInstance().then(e=>this.plugin=e.toValue())}onFieldYearChange(e){this.plugin.aopVersionYear=e,this.pluginChange.emit(this.plugin.clone())}onFieldChange(e,n){let r;switch(n){case"CHECKED":{r=!0;break}case"NOT_CHECKED":{r=!1;break}default:{r=null;break}}this.plugin[e]=r,this.pluginChange.emit(this.plugin.clone())}asType(e){let n=this.plugin[e],r;return n===!0?r="CHECKED":n===!1?r="NOT_CHECKED":r="IGNORE",r}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-form-select-aop"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:16,vars:6,consts:[["inputId","virtual-clinic-analysis-form-select-aop-year-select","fluid","","variant","filled",3,"onChange","options","overlayOptions","ngModel"],["for","virtual-clinic-analysis-form-select-aop-year-select"],[1,"mat-caption"],["fluid","","variant","filled","optionValue","value","optionLabel","displayName",3,"onChange","inputId","options","overlayOptions","ngModel"],[3,"for"]],template:function(n,r){n&1&&(O(0,"p-iftalabel")(1,"p-select",0),te("onChange",function(a){return r.onFieldYearChange(a.value)}),M(),O(2,"label",1),ee(3,"AOP Jahr"),M()(),O(4,"div")(5,"span",2),ee(6,"Einschlusskriterien"),M()(),O(7,"div"),Qo(8,Smi,5,8,"div",null,ms),M(),O(10,"div")(11,"span",2),ee(12,"Ausschlusskriterien"),M()(),O(13,"div"),Qo(14,wmi,5,8,"div",null,ms),M()),n&2&&(E(),Pe(r.pluginValid?"mb-4":"ng-invalid ng-dirty mb-4"),D("options",Vr(5,xmi))("overlayOptions",r.overlayOptions)("ngModel",r.plugin.aopVersionYear),E(7),Zo(r.includingConditionFields),E(6),Zo(r.excludingConditionFields))},dependencies:[Ho,Us,ra,yr,ya],encapsulation:2})}return t})();function Imi(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-iftalabel")(2,"p-select",3),te("onChange",function(r){let o=se(e).$implicit,a=L();return le(a.onFieldChange(o,r.value))}),M(),O(3,"label",4),ee(4),M()()()}if(t&2){let e=i.$implicit,n=L();E(2),Pe(n.pluginValid?"mb-4":"ng-invalid ng-dirty mb-4"),D("inputId","virtual-clinic-analysis-form-select-aop-exclude-condition-"+e)("options",n.options)("overlayOptions",n.overlayOptions)("ngModel",n.asType(e)),E(),D("for","virtual-clinic-analysis-form-select-aop-exclude-condition-"+e),E(),Pt(n.fields[e])}}var Xrt=(()=>{class t{plugin;pluginValid;pluginChange=new ve;fields={k1DrgStationaer:"Kontextpr\xFCfung I: K1 DRG station\xE4r",k2OpsStationaer:"Kontextpr\xFCfung I: K2 OPS station\xE4r",k3StationaereBehandlungBeatmung:"Kontextpr\xFCfung I: K3 Stat. Behandlung durch Beatmung (OPS 4-Steller)",k5IcdBetreuungsbedarf:"Kontextpr\xFCfung II: K5 ICD mit best. Betreuungsbedarf",k6IcdStationaer:"Kontextpr\xFCfung I: K6 ICD station\xE4r",k7Pccl:"Kontextpr\xFCfung I: K7 PCCL > 3",k6sErhoehterAufwand:"Schweregraddifferenzierung: K6-S ICD erh\xF6hter Aufwand",k8Pflegegrade:"Kontextpr\xFCfung II: K8 Pflegegrade (OPS 5-Steller)",kSharpAlter:"Kontextpr\xFCfung II: K# Alter < 16 oder > 84"};fieldNames=Object.keys(this.fields);options=[{value:"IGNORE",displayName:"Ignorieren"},{value:"CHECKED",displayName:"Erf\xFCllt"},{value:"NOT_CHECKED",displayName:"Nicht erf\xFCllt"}];overlayOptions={mode:"overlay",appendTo:"body"};iges=new mB(null,null,null,null,null,null,null,null,null,null);ngOnInit(){this.plugin.toValue()?this.iges=this.plugin.toValue():this.pluginChange.emit(new pO(this.iges.clone()))}onFieldChange(e,n){let r;switch(n){case"CHECKED":{r=!0;break}case"NOT_CHECKED":{r=!1;break}default:{r=null;break}}this.iges[e]=r,this.pluginChange.emit(new pO(this.iges.clone()))}asType(e){let n=this.iges[e],r;return n===!0?r="CHECKED":n===!1?r="NOT_CHECKED":r="IGNORE",r}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-form-select-iges"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},decls:11,vars:5,consts:[["inputId","virtual-clinic-analysis-form-select-iges-include-condition","fluid","","variant","filled","optionValue","value","optionLabel","displayName",3,"onChange","options","overlayOptions","ngModel"],["for","virtual-clinic-analysis-form-select-iges-include-condition"],[1,"mat-caption"],["fluid","","variant","filled","optionValue","value","optionLabel","displayName",3,"onChange","inputId","options","overlayOptions","ngModel"],[3,"for"]],template:function(n,r){n&1&&(O(0,"div")(1,"p-iftalabel")(2,"p-select",0),te("onChange",function(a){return r.onFieldChange("einschlussKriterien",a.value)}),M(),O(3,"label",1),ee(4,"Einschlusskriterien"),M()()(),O(5,"div")(6,"div")(7,"span",2),ee(8,"Ausschlusskriterien"),M()(),Qo(9,Imi,5,8,"div",null,ms),M()),n&2&&(E(2),Pe(r.pluginValid?"mb-4":"ng-invalid ng-dirty mb-4"),D("options",r.options)("overlayOptions",r.overlayOptions)("ngModel",r.asType("einschlussKriterien")),E(7),Zo(r.fieldNames))},dependencies:[Ho,Us,ra,yr,ya],encapsulation:2})}return t})();var Jrt=(()=>{class t{plugin;pluginValid;pluginConfig={options:[0,1,2,3,4,5,6]};pluginChange=new ve;config={selectLabel:"PCCL",valid$:new hi(1),option:{sortFnc:(e,n)=>e.patientClinicalComplexityLevel-n.patientClinicalComplexityLevel,uniqueFnc:e=>e.patientClinicalComplexityLevel.toString(),searchOptionAccessor:e=>e.displayName}};options=$t(this.pluginConfig.options.map(e=>({patientClinicalComplexityLevel:e,displayName:zce[e]})));initial;ngOnInit(){this.initial=this.plugin.toValue().map(e=>({patientClinicalComplexityLevel:e,displayName:zce[e]}))??[]}ngOnChanges(e){e.pluginValid&&this.config.valid$.next({isValid:this.pluginValid}),e.pluginConfig&&(this.options=$t(this.pluginConfig.options.map(n=>({patientClinicalComplexityLevel:n,displayName:zce[n]}))))}onPatientClinicalComplexityLevelChange(e){this.pluginChange.emit(new hB([...e.map(n=>n.patientClinicalComplexityLevel)]))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-form-select-patient-clinical-complexity-level"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onPatientClinicalComplexityLevelChange(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.initial)},dependencies:[Yo],encapsulation:2})}return t})();var Tmi=()=>[2025,2026],Emi=(t,i)=>i.fieldName;function Ami(t,i){if(t&1){let e=qe();O(0,"div")(1,"p-iftalabel")(2,"p-select",9),te("onChange",function(r){let o=se(e).$implicit,a=L();return le(a.onFieldChange(o.fieldName,r.value))}),M(),O(3,"label",10),ee(4),M()()()}if(t&2){let e=i.$implicit,n=L();E(2),Pe("mb-4"),D("inputId","virtual-clinic-analysis-form-select-hybrid-drg-"+e.fieldName)("options",n.options)("ngModel",e.fieldValue),E(),D("for","virtual-clinic-analysis-form-select-hybrid-drg-"+e.fieldName),E(),Pt(e.fieldPlaceholder)}}var eot=(()=>{class t{ref;FIELDS={2025:{ops_p115f_a1_s1_n2_sgb:"Hauptprozedur \xA7115f Absatz 1 Satz 1",icdNichtAmbulant:"ICD (station\xE4r)",opsStationaer:"OPS (station\xE4r)",funktionseinschraenkungen:"Funktionseinschr\xE4nkungen (Barthel-Index)",pflegegrad:"Pflegegrad",beatmung:"Beatmung",altersgrenze:"Altersgrenze (> 1 Jahr)",beidseitig:"Beidseitige Eingriffe",ophthalm:"Ophthalmologische Begleiterkrankungen",belegungstage_lt_2:"Verweildauer ist ein Behandlungstag",pccl_lt_3:"PCCL < 3",keine_neubildungen:"Ausschluss B\xF6sartige Neubildungen"},2026:{ops_p115f_a1_s1_n2_sgb:"Hauptprozedur \xA7115f Absatz 1 Satz 1",icdNichtAmbulant:"ICD (station\xE4r)",opsStationaer:"OPS (station\xE4r)",funktionseinschraenkungen:"Funktionseinschr\xE4nkungen (Barthel-Index)",pflegegrad:"Pflegegrad",beatmung:"Beatmung",altersgrenze:"Altersgrenze",beidseitig:"Beidseitige Eingriffe",ophthalm:"Ophthalmologische Begleiterkrankungen",belegungstage_lt_2:"Verweildauer von bis zu 2 Tage",pccl_lt_3:"PCCL < 3",keine_neubildungen:"Ausschluss B\xF6sartige Neubildungen",ze_diagnosen:"ZE Diagnosen",ze_prozeduren:"ZE Prozeduren"}};options=[{value:"IGNORE",displayName:"Ignorieren"},{value:"CHECKED",displayName:"Erf\xFCllt"},{value:"NOT_CHECKED",displayName:"Nicht erf\xFCllt"}];hybridDrg;constructor(e,n){this.ref=n,this.hybridDrg=e.data.hybridDrg.clone()}onFieldChange(e,n){let r;switch(n){case"CHECKED":{r=!0;break}case"NOT_CHECKED":{r=!1;break}default:{r=null;break}}this.hybridDrg[e]=r}onYearFieldChange(e){this.hybridDrg.hybridDrgVersionYear=e,e<2025&&(this.hybridDrg.ze_diagnosen=null,this.hybridDrg.ze_prozeduren=null)}fields(){return Object.entries(this.FIELDS[this.hybridDrg.hybridDrgVersionYear]).map(e=>({fieldName:e[0],fieldPlaceholder:e[1],fieldValue:this.asType(e[0])}))}asType(e){let n=this.hybridDrg[e],r;return n===!0?r="CHECKED":n===!1?r="NOT_CHECKED":r="IGNORE",r}submit(){this.ref.close(this.hybridDrg.clone())}static \u0275fac=function(n){return new(n||t)(xe(zc),xe(El))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:13,vars:5,consts:[[1,"flex","flex-col","gap-6"],[1,"flex","flex-col","lg:flex-row","gap-0","lg:gap-4"],[1,"basis-full","lg:basis-1/3","xl:basis-1/2"],["inputId","virtual-clinic-analysis-form-select-hybrid-drg-year-select","fluid","","variant","filled",3,"onChange","options","ngModel"],["for","virtual-clinic-analysis-form-select-hybrid-drg-year-select"],[1,"flex-1"],[1,"flex","flex-row","gap-4","justify-end"],["label","Abbrechen","severity","secondary",3,"onClick"],["label","\xDCbernehmen",3,"onClick"],["fluid","","variant","filled","optionValue","value","optionLabel","displayName",3,"onChange","inputId","options","ngModel"],[3,"for"]],template:function(n,r){n&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"p-iftalabel")(4,"p-select",3),te("onChange",function(a){return r.onYearFieldChange(a.value)}),M(),O(5,"label",4),ee(6,"Jahr"),M()()(),O(7,"div",5),Qo(8,Ami,5,7,"div",null,Emi),M()(),O(10,"div",6)(11,"p-button",7),te("onClick",function(){return r.ref.close()}),M(),O(12,"p-button",8),te("onClick",function(){return r.submit()}),M()()()),n&2&&(E(4),Pe("mb-4"),D("options",Vr(4,Tmi))("ngModel",r.hybridDrg.hybridDrgVersionYear),E(4),Zo(r.fields()))},dependencies:[Ho,Us,ra,yr,ya,Yl],encapsulation:2})}return t})();var tot=(()=>{class t{_dialogService;plugin;pluginValid;pluginChange=new ve;hybridDrg=new hO;constructor(e){this._dialogService=e}ngOnInit(){this.plugin.toValue()&&(this.hybridDrg=this.plugin.toValue())}openDialog(){let e=$e(pe({},Ul),{header:"Hybrid DRG Kriterien",data:{hybridDrg:this.hybridDrg}});this._dialogService.open(eot,e).onClose.pipe(vn(n=>!!n)).subscribe(n=>{this.hybridDrg=n.clone(),this.plugin=new fO(n.clone()),this.pluginChange.emit(new fO(n.clone()))})}static \u0275fac=function(n){return new(n||t)(xe(To))};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-form-select-hybrid-drg"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Ii([To])],decls:1,vars:2,consts:[[3,"pluginChangeClick","pluginSummary","pluginValid"]],template:function(n,r){n&1&&(O(0,"filter-condition-expression-plugin-summary",0),te("pluginChangeClick",function(){return r.openDialog()}),M()),n&2&&D("pluginSummary",r.plugin==null?null:r.plugin.toText())("pluginValid",r.plugin==null?null:r.plugin.valid())},dependencies:[rnt],encapsulation:2})}return t})();var iot=(function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1})(),rme={toTextLines:function(t){var i=[],e;for(t=[].concat(t);t.length;)e=t.pop(),typeof e=="string"?i.unshift.apply(i,e.split(` `)):Array.isArray(e)?t.push.apply(t,e):al(t)||i.unshift(""+e);return i},textSize:function(t,i,e){var n=[].concat(i),r=n.length,o=t.font,a=0,c;for(t.font=e.string,c=0;ce.right&&(n|=oot),ie.bottom&&(n|=aot),n}function Mmi(t,i){for(var e=t.x0,n=t.y0,r=t.x1,o=t.y1,a=eme(e,n,i),c=eme(r,o,i),m,g,C;!(!(a|c)||a&c);)m=a||c,m&sot?(g=e+(r-e)*(i.top-n)/(o-n),C=i.top):m&aot?(g=e+(r-e)*(i.bottom-n)/(o-n),C=i.bottom):m&oot?(C=n+(o-n)*(i.right-e)/(r-e),g=i.right):m&rot&&(C=n+(o-n)*(i.left-e)/(r-e),g=i.left),m===a?(e=g,n=C,a=eme(e,n,i)):(r=g,o=C,c=eme(r,o,i));return{x0:e,x1:r,y0:n,y1:o}}function tme(t,i){var e=i.anchor,n=t,r,o;return i.clamp&&(n=Mmi(n,i.area)),e==="start"?(r=n.x0,o=n.y0):e==="end"?(r=n.x1,o=n.y1):(r=(n.x0+n.x1)/2,o=(n.y0+n.y1)/2),Dmi(r,o,t.vx,t.vy,i.align)}var ime={arc:function(t,i){var e=(t.startAngle+t.endAngle)/2,n=Math.cos(e),r=Math.sin(e),o=t.innerRadius,a=t.outerRadius;return tme({x0:t.x+n*o,y0:t.y+r*o,x1:t.x+n*a,y1:t.y+r*a,vx:n,vy:r},i)},point:function(t,i){var e=WMe(t,i.origin),n=e.x*t.options.radius,r=e.y*t.options.radius;return tme({x0:t.x-n,y0:t.y-r,x1:t.x+n,y1:t.y+r,vx:e.x,vy:e.y},i)},bar:function(t,i){var e=WMe(t,i.origin),n=t.x,r=t.y,o=0,a=0;return t.horizontal?(n=Math.min(t.x,t.base),o=Math.abs(t.base-t.x)):(r=Math.min(t.y,t.base),a=Math.abs(t.base-t.y)),tme({x0:n,y0:r+a,x1:n+o,y1:r,vx:e.x,vy:e.y},i)},fallback:function(t,i){var e=WMe(t,i.origin);return tme({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:e.x,vy:e.y},i)}},jA=rme.rasterize;function Omi(t){var i=t.borderWidth||0,e=t.padding,n=t.size.height,r=t.size.width,o=-r/2,a=-n/2;return{frame:{x:o-e.left-i,y:a-e.top-i,w:r+e.width+i*2,h:n+e.height+i*2},text:{x:o,y:a,w:r,h:n}}}function Rmi(t,i){var e=i.chart.getDatasetMeta(i.datasetIndex).vScale;if(!e)return null;if(e.xCenter!==void 0&&e.yCenter!==void 0)return{x:e.xCenter,y:e.yCenter};var n=e.getBasePixel();return t.horizontal?{x:n,y:null}:{x:null,y:n}}function Pmi(t){return t instanceof wW?ime.arc:t instanceof xDe?ime.point:t instanceof IW?ime.bar:ime.fallback}function Nmi(t,i,e,n,r,o){var a=Math.PI/2;if(o){var c=Math.min(o,r/2,n/2),m=i+c,g=e+c,C=i+n-c,w=e+r-c;t.moveTo(i,g),mn.x+n.w+e*2||t.y>n.y+n.h+e*2)},intersects:function(t){var i=this._points(),e=t._points(),n=[nme(i[0],i[1]),nme(i[0],i[3])],r,o,a;for(this._rotation!==t._rotation&&n.push(nme(e[0],e[1]),nme(e[0],e[3])),r=0;r{class t{plugin;pluginValid;pluginChange=new ve;options;config={selectLabel:"Hartmann Analyse Gruppen",emitEventOnInitialSelection:!1,option:{searchOptionAccessor:e=>e,searchOptionDisplayName:e=>ome[e],uniqueFnc:e=>e,sortFnc:(e,n)=>e.localeCompare(n)},valid$:new hi(1)};selection=[];constructor(){this.options=$t(["clostridioides-difficile","harnwegsinfektion","infektion-nach-eingriff","mre","pneumonie","sonstige-sepsis"])}ngOnInit(){this.selection=this.plugin.toValue()}ngOnChanges(e){e.pluginValid&&this.config.valid$?.next({isValid:this.pluginValid})}onSelectionChanged(e){Ni.equals(this.selection,e)||(this.selection=[...e],this.pluginChange.emit(new pB([...e])))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-filter-condition-form-hartmann-group-ids"]],inputs:{plugin:"plugin",pluginValid:"pluginValid"},outputs:{pluginChange:"pluginChange"},features:[Yt],decls:1,vars:3,consts:[[3,"selection","config","selectOptions","initialSelection"]],template:function(n,r){n&1&&(O(0,"bd-ui-multi-select",0),te("selection",function(a){return r.onSelectionChanged(a)}),M()),n&2&&D("config",r.config)("selectOptions",r.options)("initialSelection",r.selection)},dependencies:[Yo],encapsulation:2})}return t})();var uot=(()=>{class t{plugin;pluginValid;pluginConfig={operatingNumberOptions:[]};pluginChange=new ve;selectConfig={selectLabel:"Kennzahl",resetOption:!1,option:{uniqueFnc:e=>e.operatingNumberId,searchOptionAccessor:e=>e.displayName,sortFnc:(e,n)=>e.displayName.localeCompare(n.displayName)}};overlayOptions={mode:"overlay",appendTo:"body"};compareOptions=[{compareValue:"LESS",displayName:"kleiner"},{compareValue:"LESS_OR_EQUAL",displayName:"kleiner oder gleich"},{compareValue:"EQUAL",displayName:"gleich"},{compareValue:"GREATER_OR_EQUAL",displayName:"gr\xF6\xDFer oder gleich"},{compareValue:"GREATER",displayName:"gr\xF6\xDFer"}];options=dl;form=new Mu({operatingNumberCtrl:new ho(null,[La.required]),comparisonCtrl:new ho("EQUAL",[La.required]),valueCtrl:new ho(null,[La.required,La.pattern("^-?\\d+[.,]?\\d*$")])});constructor(){this.form.valueChanges.pipe(ot(e=>new mO(e.operatingNumberCtrl.operatingNumberId,e.valueCtrl,e.comparisonCtrl)),vn(e=>!this.plugin.equals(e))).subscribe(e=>{this.plugin=e.clone(),this.pluginChange.emit(e.clone())})}ngOnInit(){this.options=$t(this.pluginConfig.operatingNumberOptions),this.plugin&&this.form.patchValue({operatingNumberCtrl:this.pluginConfig.operatingNumberOptions.find(e=>e.operatingNumberId===this.plugin.operatingNumberId),comparisonCtrl:this.plugin.comparison,valueCtrl:this.plugin.value.toString()})}onOptionChange(e){this.form.patchValue({operatingNumberCtrl:e})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["ays-virtual-clinic-analysis-form-select-operating-number-filter"]],inputs:{plugin:"plugin",pluginValid:"pluginValid",pluginConfig:"pluginConfig"},outputs:{pluginChange:"pluginChange"},decls:14,vars:6,consts:[[3,"formGroup"],[1,"flex","flex-wrap","gap-2"],[1,"w-72","flex-grow"],[3,"selection","config","selectOptions","initialSelection"],[1,"w-60"],["inputId","virtual-clinic-analysis-form-select-operating-number-filter-compare-select","formControlName","comparisonCtrl","fluid","","variant","filled","optionValue","compareValue","optionLabel","displayName",1,"mb-4",3,"options","overlayOptions"],["for","virtual-clinic-analysis-form-select-operating-number-filter-compare-select"],[1,"w-24","flex-grow"],["matInput","","formControlName","valueCtrl","type","text"]],template:function(n,r){n&1&&(O(0,"form",0)(1,"div",1)(2,"div",2)(3,"bd-ui-single-select",3),te("selection",function(a){return r.onOptionChange(a)}),M()(),O(4,"div",4)(5,"p-iftalabel"),be(6,"p-select",5),O(7,"label",6),ee(8,"Vergleich"),M()()(),O(9,"div",7)(10,"mat-form-field")(11,"mat-label"),ee(12,"Wert"),M(),be(13,"input",8),M()()()()),n&2&&(D("formGroup",r.form),E(3),D("config",r.selectConfig)("selectOptions",r.options)("initialSelection",r.form.controls.operatingNumberCtrl.value),E(3),D("options",r.compareOptions)("overlayOptions",r.overlayOptions))},dependencies:[Va,oa,Am,nd,yr,Em,Xu,Y_,hc,zs,Oa,rd,Ho,Us],encapsulation:2})}return t})();function pot(){return[{provide:Ar,useValue:{filterType:QW.type,filterConditionId:yke,filterConditionPluginSpecification:QW,filterConditionComponent:Zrt},multi:!0},{provide:Ar,useValue:{filterType:XW.type,filterConditionId:xke,filterConditionPluginSpecification:XW,filterConditionComponent:Xrt},multi:!0},{provide:Ar,useValue:{filterType:JW.type,filterConditionId:wke,filterConditionPluginSpecification:JW,filterConditionComponent:Jrt},multi:!0},{provide:Ar,useValue:{filterType:tQ.type,filterConditionId:Ake,filterConditionPluginSpecification:tQ,filterConditionComponent:tot},multi:!0},{provide:Ar,useValue:{filterType:ZW.type,filterConditionId:bke,filterConditionPluginSpecification:ZW,filterConditionComponent:dot},multi:!0},{provide:Ar,useValue:{filterType:eQ.type,filterConditionId:Tke,filterConditionPluginSpecification:eQ,filterConditionComponent:uot},multi:!0},{provide:Ar,useValue:{filterType:fB.type,filterConditionId:kke,filterConditionPluginSpecification:fB,filterConditionComponent:Yrt},multi:!0},{provide:Ar,useValue:{filterType:gB.type,filterConditionId:Oke,filterConditionPluginSpecification:gB,filterConditionComponent:Krt},multi:!0},{provide:Ar,useValue:{filterType:_B.type,filterConditionId:Pke,filterConditionPluginSpecification:_B,filterConditionComponent:Wrt},multi:!0},{provide:Ar,useValue:{filterType:yB.type,filterConditionId:Fke,filterConditionPluginSpecification:yB,filterConditionComponent:Qrt},multi:!0}]}var hot=(()=>{class t{constructor(e,n,r){n.init(),r.init(),e.init()}static \u0275fac=function(n){return new(n||t)(ai(Nae),ai(bu),ai(Yg))};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:[_P,FC,bu,Yg,{provide:q$,useClass:lSe,multi:!0},{provide:q$,useClass:STe,multi:!0},{provide:hp,useClass:sSe}],imports:[Toe,nie,tre,J9e,rr,Kve,b8e,UP,rr]})}return t})();function fot(t,i){return _t(this,null,function*(){let e=yield Nte.loadFrontendConfig(t,i);return(e.environment==="production"||e.environment==="staging")&&void 0,e})}function got(t){return{provide:Sve,useValue:t}}function Kmi(t){let i=t,e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return e===1&&n===0?1:5}var _ot=["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",Kmi];function yot(t){C4e(_ot);let i=[{provide:xm,useValue:"de"}];return t?.includePaginatorProviders!==!1&&i.push({provide:cw,useClass:Qie}),i}function vot(t){return new Nn(3e3,!1)}function Wmi(){return new Nn(3100,!1)}function Qmi(){return new Nn(3101,!1)}function Zmi(t){return new Nn(3001,!1)}function Xmi(t){return new Nn(3003,!1)}function Jmi(t){return new Nn(3004,!1)}function Cot(t,i){return new Nn(3005,!1)}function xot(){return new Nn(3006,!1)}function Sot(){return new Nn(3007,!1)}function wot(t,i){return new Nn(3008,!1)}function Iot(t){return new Nn(3002,!1)}function Tot(t,i,e,n,r){return new Nn(3010,!1)}function Eot(){return new Nn(3011,!1)}function Aot(){return new Nn(3012,!1)}function Dot(){return new Nn(3200,!1)}function kot(){return new Nn(3202,!1)}function Mot(){return new Nn(3013,!1)}function Oot(t){return new Nn(3014,!1)}function Rot(t){return new Nn(3015,!1)}function Pot(t){return new Nn(3016,!1)}function Not(t,i){return new Nn(3404,!1)}function ehi(t){return new Nn(3502,!1)}function Fot(t){return new Nn(3503,!1)}function Lot(){return new Nn(3300,!1)}function Bot(t){return new Nn(3504,!1)}function Vot(t){return new Nn(3301,!1)}function zot(t,i){return new Nn(3302,!1)}function Uot(t){return new Nn(3303,!1)}function Hot(t,i){return new Nn(3400,!1)}function Got(t){return new Nn(3401,!1)}function jot(t){return new Nn(3402,!1)}function $ot(t,i){return new Nn(3505,!1)}function $A(t){switch(t.length){case 0:return new sw;case 1:return t[0];default:return new NP(t)}}function JMe(t,i,e=new Map,n=new Map){let r=[],o=[],a=-1,c=null;if(i.forEach(m=>{let g=m.get("offset"),C=g==a,w=C&&c||new Map;m.forEach((P,R)=>{let z=R,H=P;if(R!=="offset")switch(z=t.normalizePropertyName(z,r),H){case j4:H=e.get(R);break;case jb:H=n.get(R);break;default:H=t.normalizeStyleValue(R,z,H,r);break}w.set(z,H)}),C||o.push(w),c=w,a=g}),r.length)throw ehi(r);return o}function ame(t,i,e,n){switch(i){case"start":t.onStart(()=>n(e&&QMe(e,"start",t)));break;case"done":t.onDone(()=>n(e&&QMe(e,"done",t)));break;case"destroy":t.onDestroy(()=>n(e&&QMe(e,"destroy",t)));break}}function QMe(t,i,e){let n=e.totalTime,r=!!e.disabled,o=sme(t.element,t.triggerName,t.fromState,t.toState,i||t.phaseName,n??t.totalTime,r),a=t._data;return a!=null&&(o._data=a),o}function sme(t,i,e,n,r="",o=0,a){return{element:t,triggerName:i,fromState:e,toState:n,phaseName:r,totalTime:o,disabled:!!a}}function Oy(t,i,e){let n=t.get(i);return n||t.set(i,n=e),n}function e2e(t){let i=t.indexOf(":"),e=t.substring(1,i),n=t.slice(i+1);return[e,n]}var thi=typeof document>"u"?null:document.documentElement;function lme(t){let i=t.parentNode||t.host||null;return i===thi?null:i}function ihi(t){return t.substring(1,6)=="ebkit"}var PB=null,bot=!1;function qot(t){PB||(PB=nhi()||{},bot=PB.style?"WebkitAppearance"in PB.style:!1);let i=!0;return PB.style&&!ihi(t)&&(i=t in PB.style,!i&&bot&&(i="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in PB.style)),i}function nhi(){return typeof document<"u"?document.body:null}function t2e(t,i){for(;i;){if(i===t)return!0;i=lme(i)}return!1}function i2e(t,i,e){if(e)return Array.from(t.querySelectorAll(i));let n=t.querySelector(i);return n?[n]:[]}var rhi=1e3,n2e="{{",ohi="}}",r2e="ng-enter",cme="ng-leave",qQ="ng-trigger",YQ=".ng-trigger",o2e="ng-animating",dme=".ng-animating";function EI(t){if(typeof t=="number")return t;let i=t.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:ZMe(parseFloat(i[1]),i[2])}function ZMe(t,i){switch(i){case"s":return t*rhi;default:return t}}function KQ(t,i,e){return t.hasOwnProperty("duration")?t:shi(t,i,e)}var ahi=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function shi(t,i,e){let n,r=0,o="";if(typeof t=="string"){let a=t.match(ahi);if(a===null)return i.push(vot(t)),{duration:0,delay:0,easing:""};n=ZMe(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(r=ZMe(parseFloat(c),a[4]));let m=a[5];m&&(o=m)}else n=t;if(!e){let a=!1,c=i.length;n<0&&(i.push(Wmi()),a=!0),r<0&&(i.push(Qmi()),a=!0),a&&i.splice(c,0,vot(t))}return{duration:n,delay:r,easing:o}}function Yot(t){return t.length?t[0]instanceof Map?t:t.map(i=>new Map(Object.entries(i))):[]}function L1(t,i,e){i.forEach((n,r)=>{let o=ume(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=n})}function RO(t,i){i.forEach((e,n)=>{let r=ume(n);t.style[r]=""})}function R8(t){return Array.isArray(t)?t.length==1?t[0]:r8e(t):t}function Kot(t,i,e){let n=i.params||{},r=a2e(t);r.length&&r.forEach(o=>{n.hasOwnProperty(o)||e.push(Zmi(o))})}var XMe=new RegExp(`${n2e}\\s*(.+?)\\s*${ohi}`,"g");function a2e(t){let i=[];if(typeof t=="string"){let e;for(;e=XMe.exec(t);)i.push(e[1]);XMe.lastIndex=0}return i}function P8(t,i,e){let n=`${t}`,r=n.replace(XMe,(o,a)=>{let c=i[a];return c==null&&(e.push(Xmi(a)),c=""),c.toString()});return r==n?t:r}var lhi=/-+([a-z0-9])/g;function ume(t){return t.replace(lhi,(...i)=>i[1].toUpperCase())}function Wot(t,i){return t===0||i===0}function Qot(t,i,e){if(e.size&&i.length){let n=i[0],r=[];if(e.forEach((o,a)=>{n.has(a)||r.push(a),n.set(a,o)}),r.length)for(let o=1;oa.set(c,pme(t,c)))}}return i}function Ry(t,i,e){switch(i.type){case Ss.Trigger:return t.visitTrigger(i,e);case Ss.State:return t.visitState(i,e);case Ss.Transition:return t.visitTransition(i,e);case Ss.Sequence:return t.visitSequence(i,e);case Ss.Group:return t.visitGroup(i,e);case Ss.Animate:return t.visitAnimate(i,e);case Ss.Keyframes:return t.visitKeyframes(i,e);case Ss.Style:return t.visitStyle(i,e);case Ss.Reference:return t.visitReference(i,e);case Ss.AnimateChild:return t.visitAnimateChild(i,e);case Ss.AnimateRef:return t.visitAnimateRef(i,e);case Ss.Query:return t.visitQuery(i,e);case Ss.Stagger:return t.visitStagger(i,e);default:throw Jmi(i.type)}}function pme(t,i){return window.getComputedStyle(t)[i]}var S2e=(()=>{class t{validateStyleProperty(e){return qot(e)}containsElement(e,n){return t2e(e,n)}getParentElement(e){return lme(e)}query(e,n,r){return i2e(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,o,a,c=[],m){return new sw(r,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),FB=class{static NOOP=new S2e},LB=class{};var chi=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"]),_me=class extends LB{normalizePropertyName(i,e){return ume(i)}normalizeStyleValue(i,e,n,r){let o="",a=n.toString().trim();if(chi.has(e)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let c=n.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&r.push(Cot(i,n))}return a+o}};var yme="*";function dhi(t,i){let e=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(n=>uhi(n,e,i)):e.push(t),e}function uhi(t,i,e){if(t[0]==":"){let m=phi(t,e);if(typeof m=="function"){i.push(m);return}t=m}let n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return e.push(Rot(t)),i;let r=n[1],o=n[2],a=n[3];i.push(Zot(r,a));let c=r==yme&&a==yme;o[0]=="<"&&!c&&i.push(Zot(a,r))}function phi(t,i){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}var mme=new Set(["true","1"]),hme=new Set(["false","0"]);function Zot(t,i){let e=mme.has(t)||hme.has(t),n=mme.has(i)||hme.has(i);return(r,o)=>{let a=t==yme||t==r,c=i==yme||i==o;return!a&&e&&typeof r=="boolean"&&(a=r?mme.has(t):hme.has(t)),!c&&n&&typeof o=="boolean"&&(c=o?mme.has(i):hme.has(i)),a&&c}}var sat=":self",mhi=new RegExp(`s*${sat}s*,?`,"g");function lat(t,i,e,n){return new p2e(t).build(i,e,n)}var Xot="",p2e=class{_driver;constructor(i){this._driver=i}build(i,e,n){let r=new m2e(e);return this._resetContextStyleTimingState(r),Ry(this,R8(i),r)}_resetContextStyleTimingState(i){i.currentQuerySelector=Xot,i.collectedStyles=new Map,i.collectedStyles.set(Xot,new Map),i.currentTime=0}visitTrigger(i,e){let n=e.queryCount=0,r=e.depCount=0,o=[],a=[];return i.name.charAt(0)=="@"&&e.errors.push(xot()),i.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==Ss.State){let m=c,g=m.name;g.toString().split(/\s*,\s*/).forEach(C=>{m.name=C,o.push(this.visitState(m,e))}),m.name=g}else if(c.type==Ss.Transition){let m=this.visitTransition(c,e);n+=m.queryCount,r+=m.depCount,a.push(m)}else e.errors.push(Sot())}),{type:Ss.Trigger,name:i.name,states:o,transitions:a,queryCount:n,depCount:r,options:null}}visitState(i,e){let n=this.visitStyle(i.styles,e),r=i.options&&i.options.params||null;if(n.containsDynamicStyles){let o=new Set,a=r||{};n.styles.forEach(c=>{c instanceof Map&&c.forEach(m=>{a2e(m).forEach(g=>{a.hasOwnProperty(g)||o.add(g)})})}),o.size&&e.errors.push(wot(i.name,[...o.values()]))}return{type:Ss.State,name:i.name,style:n,options:r?{params:r}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let n=Ry(this,R8(i.animation),e),r=dhi(i.expr,e.errors);return{type:Ss.Transition,matchers:r,animation:n,queryCount:e.queryCount,depCount:e.depCount,options:NB(i.options)}}visitSequence(i,e){return{type:Ss.Sequence,steps:i.steps.map(n=>Ry(this,n,e)),options:NB(i.options)}}visitGroup(i,e){let n=e.currentTime,r=0,o=i.steps.map(a=>{e.currentTime=n;let c=Ry(this,a,e);return r=Math.max(r,e.currentTime),c});return e.currentTime=r,{type:Ss.Group,steps:o,options:NB(i.options)}}visitAnimate(i,e){let n=_hi(i.timings,e.errors);e.currentAnimateTimings=n;let r,o=i.styles?i.styles:ul({});if(o.type==Ss.Keyframes)r=this.visitKeyframes(o,e);else{let a=i.styles,c=!1;if(!a){c=!0;let g={};n.easing&&(g.easing=n.easing),a=ul(g)}e.currentTime+=n.duration+n.delay;let m=this.visitStyle(a,e);m.isEmptyStep=c,r=m}return e.currentAnimateTimings=null,{type:Ss.Animate,timings:n,style:r,options:null}}visitStyle(i,e){let n=this._makeStyleAst(i,e);return this._validateStyleAst(n,e),n}_makeStyleAst(i,e){let n=[],r=Array.isArray(i.styles)?i.styles:[i.styles];for(let c of r)typeof c=="string"?c===jb?n.push(c):e.errors.push(Iot(c)):n.push(new Map(Object.entries(c)));let o=!1,a=null;return n.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!o)){for(let m of c.values())if(m.toString().indexOf(n2e)>=0){o=!0;break}}}),{type:Ss.Style,styles:n,easing:a,offset:i.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(i,e){let n=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;n&&o>0&&(o-=n.duration+n.delay),i.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,m)=>{let g=e.collectedStyles.get(e.currentQuerySelector),C=g.get(m),w=!0;C&&(o!=r&&o>=C.startTime&&r<=C.endTime&&(e.errors.push(Tot(m,C.startTime,C.endTime,o,r)),w=!1),o=C.startTime),w&&g.set(m,{startTime:o,endTime:r}),e.options&&Kot(c,e.options,e.errors)})})}visitKeyframes(i,e){let n={type:Ss.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(Eot()),n;let r=1,o=0,a=[],c=!1,m=!1,g=0,C=i.steps.map(K=>{let ne=this._makeStyleAst(K,e),me=ne.offset!=null?ne.offset:ghi(ne.styles),Te=0;return me!=null&&(o++,Te=ne.offset=me),m=m||Te<0||Te>1,c=c||Te0&&o{let me=P>0?ne==R?1:P*ne:a[ne],Te=me*j;e.currentTime=z+H.delay+Te,H.duration=Te,this._validateStyleAst(K,e),K.offset=me,n.styles.push(K)}),n}visitReference(i,e){return{type:Ss.Reference,animation:Ry(this,R8(i.animation),e),options:NB(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:Ss.AnimateChild,options:NB(i.options)}}visitAnimateRef(i,e){return{type:Ss.AnimateRef,animation:this.visitReference(i.animation,e),options:NB(i.options)}}visitQuery(i,e){let n=e.currentQuerySelector,r=i.options||{};e.queryCount++,e.currentQuery=i;let[o,a]=hhi(i.selector);e.currentQuerySelector=n.length?n+" "+o:o,Oy(e.collectedStyles,e.currentQuerySelector,new Map);let c=Ry(this,R8(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:Ss.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:c,originalSelector:i.selector,options:NB(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(Mot());let n=i.timings==="full"?{duration:0,delay:0,easing:"full"}:KQ(i.timings,e.errors,!0);return{type:Ss.Stagger,animation:Ry(this,R8(i.animation),e),timings:n,options:null}}};function hhi(t){let i=!!t.split(/\s*,\s*/).find(e=>e==sat);return i&&(t=t.replace(mhi,"")),t=t.replace(/@\*/g,YQ).replace(/@\w+/g,e=>YQ+"-"+e.slice(1)).replace(/:animating/g,dme),[t,i]}function fhi(t){return t?pe({},t):null}var m2e=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(i){this.errors=i}};function ghi(t){if(typeof t=="string")return null;let i=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){let n=e;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let e=t;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function _hi(t,i){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let o=KQ(t,i).duration;return s2e(o,0,"")}let e=t;if(e.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=s2e(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=KQ(e,i);return s2e(r.duration,r.delay,r.easing)}function NB(t){return t?(t=pe({},t),t.params&&(t.params=fhi(t.params))):t={},t}function s2e(t,i,e){return{duration:t,delay:i,easing:e}}function w2e(t,i,e,n,r,o,a=null,c=!1){return{type:1,element:t,keyframes:i,preStyleProps:e,postStyleProps:n,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:c}}var QQ=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},yhi=1,vhi=":enter",bhi=new RegExp(vhi,"g"),Chi=":leave",xhi=new RegExp(Chi,"g");function cat(t,i,e,n,r,o=new Map,a=new Map,c,m,g=[]){return new h2e().buildKeyframes(t,i,e,n,r,o,a,c,m,g)}var h2e=class{buildKeyframes(i,e,n,r,o,a,c,m,g,C=[]){g=g||new QQ;let w=new f2e(i,e,g,r,o,C,[]);w.options=m;let P=m.delay?EI(m.delay):0;w.currentTimeline.delayNextStep(P),w.currentTimeline.setStyles([a],null,w.errors,m),Ry(this,n,w);let R=w.timelines.filter(z=>z.containsAnimation());if(R.length&&c.size){let z;for(let H=R.length-1;H>=0;H--){let j=R[H];if(j.element===e){z=j;break}}z&&!z.allowOnlyTimelineStyles()&&z.setStyles([c],null,w.errors,m)}return R.length?R.map(z=>z.buildKeyframes()):[w2e(e,[],[],[],0,P,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let n=e.subInstructions.get(e.element);if(n){let r=e.createSubContext(i.options),o=e.currentTimeline.currentTime,a=this._visitSubInstructions(n,r,r.options);o!=a&&e.transformIntoNewTimeline(a)}e.previousNode=i}visitAnimateRef(i,e){let n=e.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,n),this.visitReference(i.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,n){for(let r of i){let o=r?.delay;if(o){let a=typeof o=="number"?o:EI(P8(o,r?.params??{},e.errors));n.delayNextStep(a)}}}_visitSubInstructions(i,e,n){let o=e.currentTimeline.currentTime,a=n.duration!=null?EI(n.duration):null,c=n.delay!=null?EI(n.delay):null;return a!==0&&i.forEach(m=>{let g=e.appendInstructionToTimeline(m,a,c);o=Math.max(o,g.duration+g.delay)}),o}visitReference(i,e){e.updateOptions(i.options,!0),Ry(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let n=e.subContextCount,r=e,o=i.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==Ss.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=vme);let a=EI(o.delay);r.delayNextStep(a)}i.steps.length&&(i.steps.forEach(a=>Ry(this,a,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let n=[],r=e.currentTimeline.currentTime,o=i.options&&i.options.delay?EI(i.options.delay):0;i.steps.forEach(a=>{let c=e.createSubContext(i.options);o&&c.delayNextStep(o),Ry(this,a,c),r=Math.max(r,c.currentTimeline.currentTime),n.push(c.currentTimeline)}),n.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(r),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let n=i.strValue,r=e.params?P8(n,e.params,e.errors):n;return KQ(r,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let n=e.currentAnimateTimings=this._visitTiming(i.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());let o=i.style;o.type==Ss.Keyframes?this.visitKeyframes(o,e):(e.incrementTime(n.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=r&&r.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(o):n.setStyles(i.styles,o,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let n=e.currentAnimateTimings,r=e.currentTimeline.duration,o=n.duration,c=e.createSubContext().currentTimeline;c.easing=n.easing,i.styles.forEach(m=>{let g=m.offset||0;c.forwardTime(g*o),c.setStyles(m.styles,m.easing,e.errors,e.options),c.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(c),e.transformIntoNewTimeline(r+o),e.previousNode=i}visitQuery(i,e){let n=e.currentTimeline.currentTime,r=i.options||{},o=r.delay?EI(r.delay):0;o&&(e.previousNode.type===Ss.Style||n==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=vme);let a=n,c=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=c.length;let m=null;c.forEach((g,C)=>{e.currentQueryIndex=C;let w=e.createSubContext(i.options,g);o&&w.delayNextStep(o),g===e.element&&(m=w.currentTimeline),Ry(this,i.animation,w),w.currentTimeline.applyStylesToKeyframe();let P=w.currentTimeline.currentTime;a=Math.max(a,P)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),m&&(e.currentTimeline.mergeTimelineCollectedStyles(m),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let n=e.parentContext,r=e.currentTimeline,o=i.timings,a=Math.abs(o.duration),c=a*(e.currentQueryTotal-1),m=a*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":m=c-m;break;case"full":m=n.currentStaggerTime;break}let C=e.currentTimeline;m&&C.delayNextStep(m);let w=C.currentTime;Ry(this,i.animation,e),e.previousNode=i,n.currentStaggerTime=r.currentTime-w+(r.startTime-n.currentTimeline.startTime)}},vme={},f2e=class t{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=vme;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,n,r,o,a,c,m){this._driver=i,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=o,this.errors=a,this.timelines=c,this.currentTimeline=m||new bme(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let n=i,r=this.options;n.duration!=null&&(r.duration=EI(n.duration)),n.delay!=null&&(r.delay=EI(n.delay));let o=n.params;if(o){let a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=P8(o[c],a,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let n=i.params={};Object.keys(e).forEach(r=>{n[r]=e[r]})}}return i}createSubContext(i=null,e,n){let r=e||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(i),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(i){return this.previousNode=vme,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,n){let r={duration:e??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},o=new g2e(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,r,i.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,n,r,o,a){let c=[];if(r&&c.push(this.element),i.length>0){i=i.replace(bhi,"."+this._enterClassName),i=i.replace(xhi,"."+this._leaveClassName);let m=n!=1,g=this._driver.query(this.element,i,m);n!==0&&(g=n<0?g.slice(g.length+n,g.length):g.slice(0,n)),c.push(...g)}return!o&&c.length==0&&a.push(Oot(e)),c}},bme=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(i,e,n,r){this._driver=i,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,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(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new t(this._driver,i,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+=yhi,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,n]of this._globalTimelineStyles)this._backFill.set(e,n||jb),this._currentKeyframe.set(e,jb);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,n,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},a=Shi(i,this._globalTimelineStyles);for(let[c,m]of a){let g=P8(m,o,n);this._pendingStyles.set(c,g),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??jb),this._updateStyle(c,g)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,n)=>{let r=this._styleSummary.get(n);(!r||e.time>r.time)&&this._updateStyle(n,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((c,m)=>{let g=new Map([...this._backFill,...c]);g.forEach((C,w)=>{C===j4?i.add(w):C===jb&&e.add(w)}),n||g.set("offset",m/this.duration),r.push(g)});let o=[...i.values()],a=[...e.values()];if(n){let c=r[0],m=new Map(c);c.set("offset",0),m.set("offset",1),r=[c,m]}return w2e(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}},g2e=class extends bme{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,n,r,o,a,c=!1){super(i,e,a.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],a=n+e,c=e/a,m=new Map(i[0]);m.set("offset",0),o.push(m);let g=new Map(i[0]);g.set("offset",Jot(c)),o.push(g);let C=i.length-1;for(let w=1;w<=C;w++){let P=new Map(i[w]),R=P.get("offset"),z=e+R*n;P.set("offset",Jot(z/a)),o.push(P)}n=a,e=0,r="",i=o}return w2e(this.element,i,this.preStyleProps,this.postStyleProps,n,e,r,!0)}};function Jot(t,i=3){let e=Math.pow(10,i-1);return Math.round(t*e)/e}function Shi(t,i){let e=new Map,n;return t.forEach(r=>{if(r==="*"){n??=i.keys();for(let o of n)e.set(o,jb)}else for(let[o,a]of r)e.set(o,a)}),e}function eat(t,i,e,n,r,o,a,c,m,g,C,w,P){return{type:0,element:t,triggerName:i,isRemovalTransition:r,fromState:e,fromStyles:o,toState:n,toStyles:a,timelines:c,queriedElements:m,preStyleProps:g,postStyleProps:C,totalTime:w,errors:P}}var l2e={},Cme=class{_triggerName;ast;_stateStyles;constructor(i,e,n){this._triggerName=i,this.ast=e,this._stateStyles=n}match(i,e,n,r){return whi(this.ast.matchers,i,e,n,r)}buildStyles(i,e,n){let r=this._stateStyles.get("*");return i!==void 0&&(r=this._stateStyles.get(i?.toString())||r),r?r.buildStyles(e,n):new Map}build(i,e,n,r,o,a,c,m,g,C){let w=[],P=this.ast.options&&this.ast.options.params||l2e,R=c&&c.params||l2e,z=this.buildStyles(n,R,w),H=m&&m.params||l2e,j=this.buildStyles(r,H,w),K=new Set,ne=new Map,me=new Map,Te=r==="void",Ie={params:dat(H,P),delay:this.ast.options?.delay},ye=C?[]:cat(i,e,this.ast.animation,o,a,z,j,Ie,g,w),fe=0;return ye.forEach(Re=>{fe=Math.max(Re.duration+Re.delay,fe)}),w.length?eat(e,this._triggerName,n,r,Te,z,j,[],[],ne,me,fe,w):(ye.forEach(Re=>{let Ae=Re.element,ke=Oy(ne,Ae,new Set);Re.preStyleProps.forEach(we=>ke.add(we));let Qe=Oy(me,Ae,new Set);Re.postStyleProps.forEach(we=>Qe.add(we)),Ae!==e&&K.add(Ae)}),eat(e,this._triggerName,n,r,Te,z,j,ye,[...K.values()],ne,me,fe))}};function whi(t,i,e,n,r){return t.some(o=>o(i,e,n,r))}function dat(t,i){let e=pe({},i);return Object.entries(t).forEach(([n,r])=>{r!=null&&(e[n]=r)}),e}var _2e=class{styles;defaultParams;normalizer;constructor(i,e,n){this.styles=i,this.defaultParams=e,this.normalizer=n}buildStyles(i,e){let n=new Map,r=dat(i,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,c)=>{a&&(a=P8(a,r,e));let m=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,m,a,e),n.set(c,a)})}),n}};function Ihi(t,i,e){return new y2e(t,i,e)}var y2e=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,n){this.name=i,this.ast=e,this._normalizer=n,e.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new _2e(r.style,o,n))}),tat(this.states,"true","1"),tat(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new Cme(i,r,this.states))}),this.fallbackTransition=Thi(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,n,r){return this.transitionFactories.find(a=>a.match(i,e,n,r))||null}matchStyles(i,e,n){return this.fallbackTransition.buildStyles(i,e,n)}};function Thi(t,i,e){let n=[(a,c)=>!0],r={type:Ss.Sequence,steps:[],options:null},o={type:Ss.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new Cme(t,o,i)}function tat(t,i,e){t.has(i)?t.has(e)||t.set(e,t.get(i)):t.has(e)&&t.set(i,t.get(e))}var Ehi=new QQ,v2e=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,n){this.bodyNode=i,this._driver=e,this._normalizer=n}register(i,e){let n=[],r=[],o=lat(this._driver,e,n,r);if(n.length)throw Fot(n);this._animations.set(i,o)}_buildPlayer(i,e,n){let r=i.element,o=JMe(this._normalizer,i.keyframes,e,n);return this._driver.animate(r,o,i.duration,i.delay,i.easing,[],!0)}create(i,e,n={}){let r=[],o=this._animations.get(i),a,c=new Map;if(o?(a=cat(this._driver,e,o,r2e,cme,new Map,new Map,n,Ehi,r),a.forEach(C=>{let w=Oy(c,C.element,new Map);C.postStyleProps.forEach(P=>w.set(P,null))})):(r.push(Lot()),a=[]),r.length)throw Bot(r);c.forEach((C,w)=>{C.forEach((P,R)=>{C.set(R,this._driver.computeStyle(w,R,jb))})});let m=a.map(C=>{let w=c.get(C.element);return this._buildPlayer(C,new Map,w)}),g=$A(m);return this._playersById.set(i,g),g.onDestroy(()=>this.destroy(i)),this.players.push(g),g}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw Vot(i);return e}listen(i,e,n,r){let o=sme(e,"","","");return ame(this._getPlayer(i),n,o,r),()=>{}}command(i,e,n,r){if(n=="register"){this.register(i,r[0]);return}if(n=="create"){let a=r[0]||{};this.create(i,e,a);return}let o=this._getPlayer(i);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(i);break}}},iat="ng-animate-queued",Ahi=".ng-animate-queued",c2e="ng-animate-disabled",Dhi=".ng-animate-disabled",khi="ng-star-inserted",Mhi=".ng-star-inserted",Ohi=[],uat={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Rhi={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},B1="__ng_removed",ZQ=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let n=i&&i.hasOwnProperty("value"),r=n?i.value:i;if(this.value=Nhi(r),n){let o=i,{value:a}=o,c=O_(o,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let n=this.options.params;Object.keys(e).forEach(r=>{n[r]==null&&(n[r]=e[r])})}}},WQ="void",d2e=new ZQ(WQ),b2e=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,n){this.id=i,this.hostElement=e,this._engine=n,this._hostClassName="ng-tns-"+i,VC(e,this._hostClassName)}listen(i,e,n,r){if(!this._triggers.has(e))throw zot(n,e);if(n==null||n.length==0)throw Uot(e);if(!Fhi(n))throw Hot(n,e);let o=Oy(this._elementListeners,i,[]),a={name:e,phase:n,callback:r};o.push(a);let c=Oy(this._engine.statesByElement,i,new Map);return c.has(e)||(VC(i,qQ),VC(i,qQ+"-"+e),c.set(e,d2e)),()=>{this._engine.afterFlush(()=>{let m=o.indexOf(a);m>=0&&o.splice(m,1),this._triggers.has(e)||c.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw Got(i);return e}trigger(i,e,n,r=!0){let o=this._getTrigger(e),a=new XQ(this.id,e,i),c=this._engine.statesByElement.get(i);c||(VC(i,qQ),VC(i,qQ+"-"+e),this._engine.statesByElement.set(i,c=new Map));let m=c.get(e),g=new ZQ(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&m&&g.absorbOptions(m.options),c.set(e,g),m||(m=d2e),!(g.value===WQ)&&m.value===g.value){if(!Vhi(m.params,g.params)){let H=[],j=o.matchStyles(m.value,m.params,H),K=o.matchStyles(g.value,g.params,H);H.length?this._engine.reportError(H):this._engine.afterFlush(()=>{RO(i,j),L1(i,K)})}return}let P=Oy(this._engine.playersByElement,i,[]);P.forEach(H=>{H.namespaceId==this.id&&H.triggerName==e&&H.queued&&H.destroy()});let R=o.matchTransition(m.value,g.value,i,g.params),z=!1;if(!R){if(!r)return;R=o.fallbackTransition,z=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:R,fromState:m,toState:g,player:a,isFallbackTransition:z}),z||(VC(i,iat),a.onStart(()=>{N8(i,iat)})),a.onDone(()=>{let H=this.players.indexOf(a);H>=0&&this.players.splice(H,1);let j=this._engine.playersByElement.get(i);if(j){let K=j.indexOf(a);K>=0&&j.splice(K,1)}}),this.players.push(a),P.push(a),a}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(r=>r.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let n=this._engine.driver.query(i,YQ,!0);n.forEach(r=>{if(r[B1])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(a=>a.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(i,e,n,r){let o=this._engine.statesByElement.get(i),a=new Map;if(o){let c=[];if(o.forEach((m,g)=>{if(a.set(g,m.value),this._triggers.has(g)){let C=this.trigger(i,g,WQ,r);C&&c.push(C)}}),c.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,a),n&&$A(c).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(e&&n){let r=new Set;e.forEach(o=>{let a=o.name;if(r.has(a))return;r.add(a);let m=this._triggers.get(a).fallbackTransition,g=n.get(a)||d2e,C=new ZQ(WQ),w=new XQ(this.id,a,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:a,transition:m,fromState:g,toState:C,player:w,isFallbackTransition:!0})})}}removeNode(i,e){let n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let r=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(i):[];if(o&&o.length)r=!0;else{let a=i;for(;a=a.parentNode;)if(n.statesByElement.get(a)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(i),r)n.markElementAsRemoved(this.id,i,!1,e);else{let o=i[B1];(!o||o===uat)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,e))}}insertNode(i,e){VC(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let o=n.element,a=this._elementListeners.get(o);a&&a.forEach(c=>{if(c.name==n.triggerName){let m=sme(o,n.triggerName,n.fromState.value,n.toState.value);m._data=i,ame(n.player,c.phase,m,c.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((n,r)=>{let o=n.transition.ast.depCount,a=r.transition.ast.depCount;return o==0||a==0?o-a:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},C2e=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=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,n){this.bodyNode=i,this.driver=e,this._normalizer=n}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,e){let n=new b2e(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,e){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let m=r.get(c);if(m){let g=n.indexOf(m);n.splice(g+1,0,i),a=!0;break}c=this.driver.getParentElement(c)}a||n.unshift(i)}else n.push(i);return r.set(e,i),i}register(i,e){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,e)),n}registerTrigger(i,e,n){let r=this._namespaceLookup[i];r&&r.register(e,n)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,n=this.statesByElement.get(i);if(n){for(let r of n.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}}return e}trigger(i,e,n,r){if(fme(e)){let o=this._fetchNamespace(i);if(o)return o.trigger(e,n,r),!0}return!1}insertNode(i,e,n,r){if(!fme(e))return;let o=e[B1];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(i){let a=this._fetchNamespace(i);a&&a.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),VC(i,c2e)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),N8(i,c2e))}removeNode(i,e,n){if(fme(e)){let r=i?this._fetchNamespace(i):null;r?r.removeNode(e,n):this.markElementAsRemoved(i,e,!1,n);let o=this.namespacesByHostElement.get(e);o&&o.id!==i&&o.removeNode(e,n)}else this._onRemovalComplete(e,n)}markElementAsRemoved(i,e,n,r,o){this.collectedLeaveElements.push(e),e[B1]={namespaceId:i,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(i,e,n,r,o){return fme(e)?this._fetchNamespace(i).listen(e,n,r,o):()=>{}}_buildInstruction(i,e,n,r,o){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,r,i.fromState.options,i.toState.options,e,o)}destroyInnerAnimations(i){let e=this.driver.query(i,YQ,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,dme,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return $A(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[B1];if(e&&e.setForRemoval){if(i[B1]=uat,e.namespaceId){this.destroyInnerAnimations(i);let n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(c2e)&&this.markElementAsDisabled(i,!1),this.driver.query(i,Dhi,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],e.length?$A(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(i){throw jot(i)}_flushAnimations(i,e){let n=new QQ,r=[],o=new Map,a=[],c=new Map,m=new Map,g=new Map,C=new Set;this.disabledNodes.forEach(Et=>{C.add(Et);let We=this.driver.query(Et,Ahi,!0);for(let bt=0;bt{let bt=r2e+H++;z.set(We,bt),Et.forEach(st=>VC(st,bt))});let j=[],K=new Set,ne=new Set;for(let Et=0;EtK.add(st)):ne.add(We))}let me=new Map,Te=oat(P,Array.from(K));Te.forEach((Et,We)=>{let bt=cme+H++;me.set(We,bt),Et.forEach(st=>VC(st,bt))}),i.push(()=>{R.forEach((Et,We)=>{let bt=z.get(We);Et.forEach(st=>N8(st,bt))}),Te.forEach((Et,We)=>{let bt=me.get(We);Et.forEach(st=>N8(st,bt))}),j.forEach(Et=>{this.processLeaveNode(Et)})});let Ie=[],ye=[];for(let Et=this._namespaceList.length-1;Et>=0;Et--)this._namespaceList[Et].drainQueuedTransitions(e).forEach(bt=>{let st=bt.player,kt=bt.element;if(Ie.push(st),this.collectedEnterElements.length){let Bi=kt[B1];if(Bi&&Bi.setForMove){if(Bi.previousTriggersValues&&Bi.previousTriggersValues.has(bt.triggerName)){let wn=Bi.previousTriggersValues.get(bt.triggerName),yn=this.statesByElement.get(bt.element);if(yn&&yn.has(bt.triggerName)){let Xn=yn.get(bt.triggerName);Xn.value=wn,yn.set(bt.triggerName,Xn)}}st.destroy();return}}let pi=!w||!this.driver.containsElement(w,kt),Kt=me.get(kt),gt=z.get(kt),ht=this._buildInstruction(bt,n,gt,Kt,pi);if(ht.errors&&ht.errors.length){ye.push(ht);return}if(pi){st.onStart(()=>RO(kt,ht.fromStyles)),st.onDestroy(()=>L1(kt,ht.toStyles)),r.push(st);return}if(bt.isFallbackTransition){st.onStart(()=>RO(kt,ht.fromStyles)),st.onDestroy(()=>L1(kt,ht.toStyles)),r.push(st);return}let li=[];ht.timelines.forEach(Bi=>{Bi.stretchStartingKeyframe=!0,this.disabledNodes.has(Bi.element)||li.push(Bi)}),ht.timelines=li,n.append(kt,ht.timelines);let ui={instruction:ht,player:st,element:kt};a.push(ui),ht.queriedElements.forEach(Bi=>Oy(c,Bi,[]).push(st)),ht.preStyleProps.forEach((Bi,wn)=>{if(Bi.size){let yn=m.get(wn);yn||m.set(wn,yn=new Set),Bi.forEach((Xn,Rr)=>yn.add(Rr))}}),ht.postStyleProps.forEach((Bi,wn)=>{let yn=g.get(wn);yn||g.set(wn,yn=new Set),Bi.forEach((Xn,Rr)=>yn.add(Rr))})});if(ye.length){let Et=[];ye.forEach(We=>{Et.push($ot(We.triggerName,We.errors))}),Ie.forEach(We=>We.destroy()),this.reportError(Et)}let fe=new Map,Re=new Map;a.forEach(Et=>{let We=Et.element;n.has(We)&&(Re.set(We,We),this._beforeAnimationBuild(Et.player.namespaceId,Et.instruction,fe))}),r.forEach(Et=>{let We=Et.element;this._getPreviousPlayers(We,!1,Et.namespaceId,Et.triggerName,null).forEach(st=>{Oy(fe,We,[]).push(st),st.destroy()})});let Ae=j.filter(Et=>aat(Et,m,g)),ke=new Map;rat(ke,this.driver,ne,g,jb).forEach(Et=>{aat(Et,m,g)&&Ae.push(Et)});let we=new Map;R.forEach((Et,We)=>{rat(we,this.driver,new Set(Et),m,j4)}),Ae.forEach(Et=>{let We=ke.get(Et),bt=we.get(Et);ke.set(Et,new Map([...We?.entries()??[],...bt?.entries()??[]]))});let Rt=[],rt=[],Ze={};a.forEach(Et=>{let{element:We,player:bt,instruction:st}=Et;if(n.has(We)){if(C.has(We)){bt.onDestroy(()=>L1(We,st.toStyles)),bt.disabled=!0,bt.overrideTotalTime(st.totalTime),r.push(bt);return}let kt=Ze;if(Re.size>1){let Kt=We,gt=[];for(;Kt=Kt.parentNode;){let ht=Re.get(Kt);if(ht){kt=ht;break}gt.push(Kt)}gt.forEach(ht=>Re.set(ht,kt))}let pi=this._buildAnimation(bt.namespaceId,st,fe,o,we,ke);if(bt.setRealPlayer(pi),kt===Ze)Rt.push(bt);else{let Kt=this.playersByElement.get(kt);Kt&&Kt.length&&(bt.parentPlayer=$A(Kt)),r.push(bt)}}else RO(We,st.fromStyles),bt.onDestroy(()=>L1(We,st.toStyles)),rt.push(bt),C.has(We)&&r.push(bt)}),rt.forEach(Et=>{let We=o.get(Et.element);if(We&&We.length){let bt=$A(We);Et.setRealPlayer(bt)}}),r.forEach(Et=>{Et.parentPlayer?Et.syncPlayerEvents(Et.parentPlayer):Et.destroy()});for(let Et=0;Et!pi.destroyed);kt.length?Lhi(this,We,kt):this.processLeaveNode(We)}return j.length=0,Rt.forEach(Et=>{this.players.push(Et),Et.onDone(()=>{Et.destroy();let We=this.players.indexOf(Et);this.players.splice(We,1)}),Et.play()}),Rt}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,n,r,o){let a=[];if(e){let c=this.playersByQueriedElement.get(i);c&&(a=c)}else{let c=this.playersByElement.get(i);if(c){let m=!o||o==WQ;c.forEach(g=>{g.queued||!m&&g.triggerName!=r||a.push(g)})}}return(n||r)&&(a=a.filter(c=>!(n&&n!=c.namespaceId||r&&r!=c.triggerName))),a}_beforeAnimationBuild(i,e,n){let r=e.triggerName,o=e.element,a=e.isRemovalTransition?void 0:i,c=e.isRemovalTransition?void 0:r;for(let m of e.timelines){let g=m.element,C=g!==o,w=Oy(n,g,[]);this._getPreviousPlayers(g,C,a,c,e.toState).forEach(R=>{let z=R.getRealPlayer();z.beforeDestroy&&z.beforeDestroy(),R.destroy(),w.push(R)})}RO(o,e.fromStyles)}_buildAnimation(i,e,n,r,o,a){let c=e.triggerName,m=e.element,g=[],C=new Set,w=new Set,P=e.timelines.map(z=>{let H=z.element;C.add(H);let j=H[B1];if(j&&j.removedBeforeQueried)return new sw(z.duration,z.delay);let K=H!==m,ne=Bhi((n.get(H)||Ohi).map(fe=>fe.getRealPlayer())).filter(fe=>{let Re=fe;return Re.element?Re.element===H:!1}),me=o.get(H),Te=a.get(H),Ie=JMe(this._normalizer,z.keyframes,me,Te),ye=this._buildPlayer(z,Ie,ne);if(z.subTimeline&&r&&w.add(H),K){let fe=new XQ(i,c,H);fe.setRealPlayer(ye),g.push(fe)}return ye});g.forEach(z=>{Oy(this.playersByQueriedElement,z.element,[]).push(z),z.onDone(()=>Phi(this.playersByQueriedElement,z.element,z))}),C.forEach(z=>VC(z,o2e));let R=$A(P);return R.onDestroy(()=>{C.forEach(z=>N8(z,o2e)),L1(m,e.toStyles)}),w.forEach(z=>{Oy(r,z,[]).push(R)}),R}_buildPlayer(i,e,n){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,n):new sw(i.duration,i.delay)}},XQ=class{namespaceId;triggerName;element;_player=new sw;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,n){this.namespaceId=i,this.triggerName=e,this.element=n}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,n)=>{e.forEach(r=>ame(i,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){Oy(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}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(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function Phi(t,i,e){let n=t.get(i);if(n){if(n.length){let r=n.indexOf(e);n.splice(r,1)}n.length==0&&t.delete(i)}return n}function Nhi(t){return t??null}function fme(t){return t&&t.nodeType===1}function Fhi(t){return t=="start"||t=="done"}function nat(t,i){let e=t.style.display;return t.style.display=i??"none",e}function rat(t,i,e,n,r){let o=[];e.forEach(m=>o.push(nat(m)));let a=[];n.forEach((m,g)=>{let C=new Map;m.forEach(w=>{let P=i.computeStyle(g,w,r);C.set(w,P),(!P||P.length==0)&&(g[B1]=Rhi,a.push(g))}),t.set(g,C)});let c=0;return e.forEach(m=>nat(m,o[c++])),a}function oat(t,i){let e=new Map;if(t.forEach(c=>e.set(c,[])),i.length==0)return e;let n=1,r=new Set(i),o=new Map;function a(c){if(!c)return n;let m=o.get(c);if(m)return m;let g=c.parentNode;return e.has(g)?m=g:r.has(g)?m=n:m=a(g),o.set(c,m),m}return i.forEach(c=>{let m=a(c);m!==n&&e.get(m).push(c)}),e}function VC(t,i){t.classList?.add(i)}function N8(t,i){t.classList?.remove(i)}function Lhi(t,i,e){$A(e).onDone(()=>t.processLeaveNode(i))}function Bhi(t){let i=[];return pat(t,i),i}function pat(t,i){for(let e=0;er.add(o)):i.set(t,n),e.delete(t),!0}var F8=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,n){this._driver=e,this._normalizer=n,this._transitionEngine=new C2e(i.body,e,n),this._timelineEngine=new v2e(i.body,e,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(i,e,n,r,o){let a=i+"-"+r,c=this._triggerCache[a];if(!c){let m=[],g=[],C=lat(this._driver,o,m,g);if(m.length)throw Not(r,m);c=Ihi(r,C,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,r,c)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,n,r){this._transitionEngine.insertNode(i,e,n,r)}onRemove(i,e,n){this._transitionEngine.removeNode(i,e,n)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,n,r){if(n.charAt(0)=="@"){let[o,a]=e2e(n),c=r;this._timelineEngine.command(o,e,a,c)}else this._transitionEngine.trigger(i,e,n,r)}listen(i,e,n,r,o){if(n.charAt(0)=="@"){let[a,c]=e2e(n);return this._timelineEngine.listen(a,e,c,o)}return this._transitionEngine.listen(i,e,n,r,o)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function zhi(t,i){let e=null,n=null;return Array.isArray(i)&&i.length?(e=u2e(i[0]),i.length>1&&(n=u2e(i[i.length-1]))):i instanceof Map&&(e=u2e(i)),e||n?new Uhi(t,e,n):null}var Uhi=(()=>{class t{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&L1(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(L1(this._element,this._initialStyles),this._endStyles&&(L1(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(RO(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(RO(this._element,this._endStyles),this._endStyles=null),L1(this._element,this._initialStyles),this._state=3)}}return t})();function u2e(t){let i=null;return t.forEach((e,n)=>{Hhi(n)&&(i=i||new Map,i.set(n,e))}),i}function Hhi(t){return t==="display"||t==="position"}var xme=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(i,e,n,r){this.element=i,this.keyframes=e,this.options=n,this._specialStyles=r,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.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(i){let e=[];return i.forEach(n=>{e.push(Object.fromEntries(n))}),e}_triggerWebAnimation(i,e,n){return i.animate(this._convertKeyframesToObject(e),n)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),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(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&i.set(r,this._finished?n:pme(this.element,r))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},Sme=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return t2e(i,e)}getParentElement(i){return lme(i)}query(i,e,n){return i2e(i,e,n)}computeStyle(i,e,n){return pme(i,e)}animate(i,e,n,r,o,a=[]){let c=r==0?"both":"forwards",m={duration:n,delay:r,fill:c};o&&(m.easing=o);let g=new Map,C=a.filter(R=>R instanceof xme);Wot(n,r)&&C.forEach(R=>{R.currentSnapshot.forEach((z,H)=>g.set(H,z))});let w=Yot(e).map(R=>new Map(R));w=Qot(i,w,g);let P=zhi(i,w);return new xme(i,w,m,P)}};var gme="@",mat="@.disabled",wme=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,n,r){this.namespaceId=i,this.delegate=e,this.engine=n,this._onDestroy=r}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,n,r=!0){this.delegate.insertBefore(i,e,n),this.engine.onInsert(this.namespaceId,e,i,r)}removeChild(i,e,n){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,n,r){this.delegate.setAttribute(i,e,n,r)}removeAttribute(i,e,n){this.delegate.removeAttribute(i,e,n)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,n,r){this.delegate.setStyle(i,e,n,r)}removeStyle(i,e,n){this.delegate.removeStyle(i,e,n)}setProperty(i,e,n){e.charAt(0)==gme&&e==mat?this.disableAnimations(i,!!n):this.delegate.setProperty(i,e,n)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,n,r){return this.delegate.listen(i,e,n,r)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},x2e=class extends wme{factory;constructor(i,e,n,r,o){super(e,n,r,o),this.factory=i,this.namespaceId=e}setProperty(i,e,n){e.charAt(0)==gme?e.charAt(1)=="."&&e==mat?(n=n===void 0?!0:!!n,this.disableAnimations(i,n)):this.engine.process(this.namespaceId,i,e.slice(1),n):this.delegate.setProperty(i,e,n)}listen(i,e,n,r){if(e.charAt(0)==gme){let o=Ghi(i),a=e.slice(1),c="";return a.charAt(0)!=gme&&([a,c]=jhi(a)),this.engine.listen(this.namespaceId,o,a,c,m=>{let g=m._data||-1;this.factory.scheduleListenerCallback(g,n,m)})}return this.delegate.listen(i,e,n,r)}};function Ghi(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function jhi(t){let i=t.indexOf("."),e=t.substring(0,i),n=t.slice(i+1);return[e,n]}var Ime=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,n){this.delegate=i,this.engine=e,this._zone=n,e.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(i,e){let r=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let g=this._rendererCache,C=g.get(r);if(!C){let w=()=>g.delete(r);C=new wme("",r,this.engine,w),g.set(r,C)}return C}let o=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,i);let c=g=>{Array.isArray(g)?g.forEach(c):this.engine.registerTrigger(o,a,i,g.name,g)};return e.data.animation.forEach(c),new x2e(this,a,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,n){if(i>=0&&ie(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[a,c]=o;a(c)}),this._animationCallbacksBuffer=[]})}),r.push([e,n])}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(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var qhi=(()=>{class t extends F8{constructor(e,n,r){super(e,n,r)}ngOnDestroy(){this.flush()}static \u0275fac=function(n){return new(n||t)(ai(Gr),ai(FB),ai(LB))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function Yhi(){return new _me}function Khi(t,i,e){return new Ime(t,i,e)}var hat=[{provide:LB,useFactory:Yhi},{provide:F8,useClass:qhi},{provide:Jd,useFactory:Khi,deps:[Kj,F8,Pn]}],Whi=[{provide:FB,useClass:S2e},{provide:xk,useValue:"NoopAnimations"},...hat],I2e=[{provide:FB,useFactory:()=>new Sme},{provide:xk,useFactory:()=>"BrowserAnimations"},...hat],fat=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?Whi:I2e}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=qi({type:t});static \u0275inj=ji({providers:I2e,imports:[Qj]})}return t})();function gat(){return Ob("NgEagerAnimations"),[...I2e]}function _at(t){let i=t?.withAnimations!==!1,e=[KG(hot,Qj,...i?[fat]:[])];return t?.appRoutingModule?e.push(KG(t.appRoutingModule)):t?.routes&&e.push(Cve(t.routes,...t?.routerFeatures??[])),i&&e.push(gat()),e}var Qhi={transitionDuration:"{transition.duration}"},Zhi={borderWidth:"0",borderColor:"{content.border.color}"},Xhi={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"}},Jhi={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.25rem 1.25rem 1.25rem"},efi=` .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'); } `,T2e={root:Qhi,panel:Zhi,header:Xhi,content:Jhi,css:efi};var tfi={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}"},ifi={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},nfi={padding:"{list.padding}",gap:"{list.gap}"},rfi={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}"},ofi={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},afi={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"}},sfi={borderRadius:"{border.radius.sm}"},lfi={padding:"{list.option.padding}"},cfi={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}"}}},dfi=` .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; } `,E2e={root:tfi,overlay:ifi,list:nfi,option:rfi,optionGroup:ofi,dropdown:afi,chip:sfi,emptyMessage:lfi,colorScheme:cfi,css:dfi};var ufi={width:"2rem",height:"2rem",fontSize:"1rem",background:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},pfi={size:"1rem"},mfi={borderColor:"{content.background}",offset:"-0.75rem"},hfi={width:"3rem",height:"3rem",fontSize:"1.5rem",icon:{size:"1.5rem"},group:{offset:"-1rem"}},ffi={width:"4rem",height:"4rem",fontSize:"2rem",icon:{size:"2rem"},group:{offset:"-1.5rem"}};var A2e={root:ufi,icon:pfi,group:mfi,lg:hfi,xl:ffi,css:""};var gfi={borderRadius:"{border.radius.md}",padding:"0 0.5rem",fontSize:"0.75rem",fontWeight:"700",minWidth:"1.5rem",height:"1.5rem"},_fi={size:"0.5rem"},yfi={fontSize:"0.625rem",minWidth:"1.25rem",height:"1.25rem"},vfi={fontSize:"0.875rem",minWidth:"1.75rem",height:"1.75rem"},bfi={fontSize:"1rem",minWidth:"2rem",height:"2rem"},Cfi={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 D2e={root:gfi,dot:_fi,sm:yfi,lg:vfi,xl:bfi,colorScheme:Cfi,css:""};var xfi={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"}},Sfi={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}"}}}}},k2e={primitive:xfi,semantic:Sfi};var wfi={borderRadius:"{content.border.radius}"};var M2e={root:wfi,css:""};var Ifi={padding:"1rem",background:"{content.background}",gap:"0.5rem",transitionDuration:"{transition.duration}"},Tfi={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}"}},Efi={color:"{navigation.item.icon.color}"};var O2e={root:Ifi,item:Tfi,separator:Efi,css:""};var Afi={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}"},Dfi={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}"}}},kfi=` .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'); } `,R2e={root:Afi,colorScheme:Dfi,css:kfi};var Mfi={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)"},Ofi={padding:"1.5rem",gap:"0.75rem"},Rfi={gap:"0.5rem"},Pfi={fontSize:"1.25rem",fontWeight:"500"},Nfi={color:"{text.muted.color}"};var P2e={root:Mfi,body:Ofi,caption:Rfi,title:Pfi,subtitle:Nfi,css:""};var Ffi={transitionDuration:"{transition.duration}"},Lfi={gap:"0.25rem"},Bfi={padding:"1rem",gap:"1rem"},Vfi={width:"1.25rem",height:"1.25rem",borderRadius:"50%",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},zfi={light:{indicator:{background:"{surface.200}",hoverBackground:"{surface.300}",activeBackground:"{primary.color}"}},dark:{indicator:{background:"{surface.700}",hoverBackground:"{surface.600}",activeBackground:"{primary.color}"}}},Ufi=` .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%); } `,N2e={root:Ffi,content:Lfi,indicatorList:Bfi,indicator:Vfi,colorScheme:zfi,css:Ufi};var Hfi={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}"}},Gfi={width:"2.5rem",color:"{form.field.icon.color}"},jfi={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},$fi={padding:"{list.padding}",gap:"{list.gap}",mobileIndent:"1rem"},qfi={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"}},Yfi={color:"{form.field.icon.color}"},Kfi=` .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; } `,F2e={root:Hfi,dropdown:Gfi,overlay:jfi,list:$fi,option:qfi,clearIcon:Yfi,css:Kfi};var Wfi={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"}},Qfi={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"}},Zfi=` .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); } } `,L2e={root:Wfi,icon:Qfi,css:Zfi};var Xfi={borderRadius:"2rem",paddingX:"0.75rem",paddingY:"0.75rem",gap:"0.5rem",transitionDuration:"{transition.duration}"},Jfi={width:"2.25rem",height:"2.25rem"},egi={size:"1rem"},tgi={size:"1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}"}},igi={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 B2e={root:Xfi,image:Jfi,icon:egi,removeIcon:tgi,colorScheme:igi,css:""};var ngi={transitionDuration:"{transition.duration}"},rgi={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}"}},ogi={shadow:"{overlay.popover.shadow}",borderRadius:"{overlay.popover.borderRadius}"},agi={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 V2e={root:ngi,preview:rgi,panel:ogi,colorScheme:agi,css:""};var sgi={size:"2rem",color:"{overlay.modal.color}"},lgi={gap:"1rem"};var z2e={icon:sgi,content:lgi,css:""};var cgi={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"},dgi={padding:"{overlay.popover.padding}",gap:"1rem"},ugi={size:"1.5rem",color:"{overlay.popover.color}"},pgi={gap:"0.5rem",padding:"0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}"};var U2e={root:cgi,content:dgi,icon:ugi,footer:pgi,css:""};var mgi={background:"{content.background}",borderColor:"transparent",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},hgi={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},fgi={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}"}},ggi={mobileIndent:"1rem"},_gi={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},ygi={borderColor:"{content.border.color}"};var H2e={root:mgi,list:hgi,item:fgi,submenu:ggi,submenuIcon:_gi,separator:ygi,css:""};var vgi={transitionDuration:"{transition.duration}"},bgi={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"}},Cgi={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"}},xgi={fontWeight:"600"},Sgi={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}"}},wgi={borderColor:"{datatable.border.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},Igi={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"}},Tgi={fontWeight:"600"},Egi={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"}},Agi={color:"{primary.color}"},Dgi={width:"0.5rem"},kgi={width:"1px",color:"{primary.color}"},Mgi={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},Ogi={size:"2rem"},Rgi={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}"}},Pgi={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}"}},Ngi={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},Fgi={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},Lgi={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}"}}},Bgi=` .p-datatable-header-cell, .p-datatable-tbody > tr { transition: none; } `,G2e={root:vgi,header:bgi,headerCell:Cgi,columnTitle:xgi,row:Sgi,bodyCell:wgi,footerCell:Igi,columnFooter:Tgi,footer:Egi,dropPoint:Agi,columnResizer:Dgi,resizeIndicator:kgi,sortIcon:Mgi,loadingIcon:Ogi,rowToggleButton:Rgi,filter:Pgi,paginatorTop:Ngi,paginatorBottom:Fgi,colorScheme:Lgi,css:Bgi};var Vgi={borderColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0"},zgi={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",borderRadius:"0"},Ugi={background:"{content.background}",color:"{content.color}",borderColor:"transparent",borderWidth:"0",padding:"0",borderRadius:"0"},Hgi={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"1px 0 0 0",padding:"0.75rem 1rem",borderRadius:"0"},Ggi={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},jgi={borderColor:"{content.border.color}",borderWidth:"1px 0 0 0"};var j2e={root:Vgi,header:zgi,content:Ugi,footer:Hgi,paginatorTop:Ggi,paginatorBottom:jgi,css:""};var $gi={transitionDuration:"{transition.duration}"},qgi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.popover.shadow}",padding:"0.5rem"},Ygi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",padding:"0 0 0.5rem 0"},Kgi={gap:"0.5rem",fontWeight:"700"},Wgi={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"}},Qgi={color:"{form.field.icon.color}"},Zgi={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.5rem 0.75rem",borderRadius:"{content.border.radius}"},Xgi={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.5rem 0.75rem",borderRadius:"{content.border.radius}"},Jgi={borderColor:"{content.border.color}",gap:"{overlay.popover.padding}"},e_i={margin:"0.5rem 0 0 0"},t_i={padding:"0.5rem",fontWeight:"700",color:"{content.color}"},i_i={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}"}},n_i={margin:"0.5rem 0 0 0"},r_i={padding:"0.625rem",borderRadius:"{content.border.radius}"},o_i={margin:"0.5rem 0 0 0"},a_i={padding:"0.625rem",borderRadius:"{content.border.radius}"},s_i={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}"},l_i={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}",gap:"0.5rem",buttonGap:"0.25rem"},c_i={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}"}}},d_i=` .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'); } `,$2e={root:$gi,panel:qgi,header:Ygi,title:Kgi,dropdown:Wgi,inputIcon:Qgi,selectMonth:Zgi,selectYear:Xgi,group:Jgi,dayView:e_i,weekDay:t_i,date:i_i,monthView:n_i,month:r_i,yearView:o_i,year:a_i,buttonbar:s_i,timePicker:l_i,colorScheme:c_i,css:d_i};var u_i={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",borderRadius:"{overlay.modal.border.radius}",shadow:"{overlay.modal.shadow}"},p_i={padding:"{overlay.modal.padding}",gap:"0.5rem"},m_i={fontSize:"1.25rem",fontWeight:"600"},h_i={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},f_i={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}",gap:"0.5rem"};var q2e={root:u_i,header:p_i,title:m_i,content:h_i,footer:f_i,css:""};var g_i={borderColor:"{content.border.color}"},__i={background:"{content.background}",color:"{text.color}"},y_i={margin:"1rem 0",padding:"0 1rem",content:{padding:"0 0.5rem"}},v_i={margin:"0 1rem",padding:"0.5rem 0",content:{padding:"0.5rem 0"}};var Y2e={root:g_i,content:__i,horizontal:y_i,vertical:v_i,css:""};var b_i={background:"rgba(255, 255, 255, 0.1)",borderColor:"rgba(255, 255, 255, 0.2)",padding:"0.5rem",borderRadius:"{border.radius.xl}"},C_i={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 K2e={root:b_i,item:C_i,css:""};var x_i={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",shadow:"{overlay.modal.shadow}"},S_i={padding:"{overlay.modal.padding}"},w_i={fontSize:"1.5rem",fontWeight:"600"},I_i={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},T_i={padding:"{overlay.modal.padding}"};var W2e={root:x_i,header:S_i,title:w_i,content:I_i,footer:T_i,css:""};var E_i={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}"},A_i={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},D_i={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}"},k_i={focusBackground:"{list.option.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},M_i={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},O_i=` .p-editor .p-editor-toolbar { padding: 0.75rem } `,Q2e={toolbar:E_i,toolbarItem:A_i,overlay:D_i,overlayOption:k_i,content:M_i,css:O_i};var R_i={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}"},P_i={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"}},N_i={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}"},F_i={padding:"0"},L_i=` .p-fieldset-toggle-button:focus-visible { background: dt('navigation.item.active.background'); } `,Z2e={root:R_i,legend:P_i,toggleIcon:N_i,content:F_i,css:L_i};var B_i={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},V_i={background:"transparent",color:"{text.color}",padding:"1.25rem",borderColor:"unset",borderWidth:"0",borderRadius:"0",gap:"0.5rem"},z_i={highlightBorderColor:"{primary.color}",padding:"0 1.25rem 1.25rem 1.25rem",gap:"1rem"},U_i={padding:"1rem",gap:"1rem",borderColor:"{content.border.color}",info:{gap:"0.5rem"}},H_i={gap:"0.5rem"},G_i={height:"0.25rem"},j_i={gap:"0.5rem"};var X2e={root:B_i,header:V_i,content:z_i,file:U_i,fileList:H_i,progressbar:G_i,basic:j_i,css:""};var $_i={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"}},q_i={active:{top:"-1.25rem"}},Y_i={input:{paddingTop:"1.5rem",paddingBottom:"0.5rem"},active:{top:"0.5rem"}},K_i={borderRadius:"{border.radius.xs}",active:{background:"{form.field.background}",padding:"0 0.125rem"}};var J2e={root:$_i,over:q_i,in:Y_i,on:K_i,css:""};var W_i={borderWidth:"1px",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},Q_i={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}"}},Z_i={size:"1.5rem"},X_i={background:"{content.background}",padding:"1rem 0.25rem"},J_i={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}"}},e0i={size:"1rem"},t0i={background:"rgba(0, 0, 0, 0.5)",color:"{surface.100}",padding:"1rem"},i0i={gap:"0.5rem",padding:"1rem"},n0i={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}"}},r0i={background:"rgba(0, 0, 0, 0.5)"},o0i={background:"rgba(255, 255, 255, 0.4)",hoverBackground:"rgba(255, 255, 255, 0.6)",activeBackground:"rgba(255, 255, 255, 0.9)"},a0i={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}"}},s0i={size:"1.5rem"},l0i={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 eOe={root:W_i,navButton:Q_i,navIcon:Z_i,thumbnailsContent:X_i,thumbnailNavButton:J_i,thumbnailNavButtonIcon:e0i,caption:t0i,indicatorList:i0i,indicatorButton:n0i,insetIndicatorList:r0i,insetIndicatorButton:o0i,closeButton:a0i,closeButtonIcon:s0i,colorScheme:l0i,css:""};var c0i={color:"{form.field.icon.color}"};var tOe={icon:c0i,css:""};var d0i={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"},u0i={paddingTop:"1.5rem",paddingBottom:"0.5rem"};var iOe={root:d0i,input:u0i,css:""};var p0i={transitionDuration:"{transition.duration}"},m0i={icon:{size:"1.5rem"},mask:{background:"{mask.background}",color:"{mask.color}"}},h0i={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"},f0i={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 nOe={root:p0i,preview:m0i,toolbar:h0i,action:f0i,css:""};var g0i={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 rOe={handle:g0i,css:""};var _0i={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",gap:"0.5rem"},y0i={fontWeight:"500"},v0i={size:"1rem"},b0i={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 oOe={root:_0i,text:y0i,icon:v0i,colorScheme:b0i,css:""};var C0i={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}"},x0i={hoverBackground:"{content.hover.background}",hoverColor:"{content.hover.color}"};var aOe={root:C0i,display:x0i,css:""};var S0i={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}"},w0i={borderRadius:"{border.radius.sm}"},I0i={light:{chip:{focusBackground:"{surface.200}",color:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",color:"{surface.0}"}}};var sOe={root:S0i,chip:w0i,colorScheme:I0i,css:""};var T0i={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.icon.color}",borderRadius:"{form.field.border.radius}",padding:"0.75rem",minWidth:"3rem"},E0i=` .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; } `,lOe={addon:T0i,css:E0i};var A0i={transitionDuration:"{transition.duration}"},D0i={width:"3rem",borderRadius:"{form.field.border.radius}",verticalPadding:"{form.field.padding.y}"},k0i={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}"}}},M0i=` .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') } `,cOe={root:A0i,button:D0i,colorScheme:k0i,css:M0i};var O0i={gap:"0.5rem"},R0i={width:"3rem",sm:{width:"2.5rem"},lg:{width:"3.5rem"}};var dOe={root:O0i,input:R0i,css:""};var P0i={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}"}},N0i=` .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; } `,uOe={root:P0i,css:N0i};var F0i={transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},L0i={background:"{primary.color}"},B0i={background:"{content.border.color}"},V0i={color:"{text.muted.color}"};var pOe={root:F0i,value:L0i,range:B0i,text:V0i,css:""};var z0i={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}"},U0i={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},H0i={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}"},G0i={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},j0i={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},$0i={padding:"{list.option.padding}"},q0i={light:{option:{stripedBackground:"{surface.50}"}},dark:{option:{stripedBackground:"{surface.900}"}}},Y0i=` .p-listbox-option { transition: none; } `,mOe={root:z0i,list:U0i,option:H0i,optionGroup:G0i,checkmark:j0i,emptyMessage:$0i,colorScheme:q0i,css:Y0i};var K0i={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}"},W0i={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},Q0i={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}"}},Z0i={padding:"0",background:"{content.background}",borderColor:"transparent",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"{overlay.navigation.shadow}",gap:"0.5rem"},X0i={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},J0i={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background.}",color:"{navigation.submenu.label.color}"},eyi={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},tyi={borderColor:"{content.border.color}"},iyi={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"}},nyi=` .p-megamenu-button:focus-visible { background: dt('navigation.item.active.background'); } `,hOe={root:K0i,baseItem:W0i,item:Q0i,overlay:Z0i,submenu:X0i,submenuLabel:J0i,submenuIcon:eyi,separator:tyi,mobileButton:iyi,css:nyi};var ryi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},oyi={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},ayi={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}"}},syi={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background}",color:"{navigation.submenu.label.color}"},lyi={borderColor:"{content.border.color}"},cyi=` .p-menu-overlay { border-color: transparent; } `,fOe={root:ryi,list:oyi,item:ayi,submenuLabel:syi,separator:lyi,css:cyi};var dyi={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}"},uyi={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},pyi={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}"}},myi={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}"}},hyi={borderColor:"{content.border.color}"},fyi={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"}},gyi=` .p-menubar-button:focus-visible { background: dt('navigation.item.active.background'); } `,gOe={root:dyi,baseItem:uyi,item:pyi,submenu:myi,separator:hyi,mobileButton:fyi,css:gyi};var _yi={borderRadius:"{content.border.radius}",borderWidth:"0",transitionDuration:"{transition.duration}"},yyi={padding:"1rem 1.25rem",gap:"0.5rem",sm:{padding:"0.625rem 0.625rem"},lg:{padding:"0.825rem 0.825rem"}},vyi={fontSize:"1rem",fontWeight:"500",sm:{fontSize:"0.875rem"},lg:{fontSize:"1.125rem"}},byi={size:"1.25rem",sm:{size:"1rem"},lg:{size:"1.5rem"}},Cyi={width:"2rem",height:"2rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},xyi={size:"1rem",sm:{size:"0.875rem"},lg:{size:"1.125rem"}},Syi={root:{borderWidth:"1px"}},wyi={content:{padding:"0"}},Iyi={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 _Oe={root:_yi,content:yyi,text:vyi,icon:byi,closeButton:Cyi,closeIcon:xyi,outlined:Syi,simple:wyi,colorScheme:Iyi,css:""};var Tyi={borderRadius:"{content.border.radius}",gap:"1rem"},Eyi={background:"{content.border.color}",size:"0.5rem"},Ayi={gap:"0.5rem"},Dyi={size:"0.5rem"},kyi={size:"1rem"},Myi={verticalGap:"0.5rem",horizontalGap:"1rem"};var yOe={root:Tyi,meters:Eyi,label:Ayi,labelMarker:Dyi,labelIcon:kyi,labelList:Myi,css:""};var Oyi={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}"}},Ryi={width:"2.5rem",color:"{form.field.icon.color}"},Pyi={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},Nyi={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},Fyi={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"},Lyi={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},Byi={color:"{form.field.icon.color}"},Vyi={borderRadius:"{border.radius.sm}"},zyi={padding:"{list.option.padding}"},Uyi=` .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; } `,vOe={root:Oyi,dropdown:Ryi,overlay:Pyi,list:Nyi,option:Fyi,optionGroup:Lyi,chip:Vyi,clearIcon:Byi,emptyMessage:zyi,css:Uyi};var Hyi={gap:"1.125rem"},Gyi={gap:"0.5rem"};var bOe={root:Hyi,controls:Gyi,css:""};var jyi={gutter:"0.75rem",transitionDuration:"{transition.duration}"},$yi={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}"},qyi={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}"}},Yyi={color:"{content.border.color}",borderRadius:"{content.border.radius}",height:"24px"};var COe={root:jyi,node:$yi,nodeToggleButton:qyi,connector:Yyi,css:""};var Kyi={outline:{width:"2px",color:"{content.background}"}};var xOe={root:Kyi,css:""};var Wyi={padding:"0.5rem 1rem",gap:"0.25rem",borderRadius:"{content.border.radius}",background:"{content.background}",color:"{content.color}",transitionDuration:"{transition.duration}"},Qyi={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}"}},Zyi={color:"{text.muted.color}"},Xyi={maxWidth:"2.5rem"};var SOe={root:Wyi,navButton:Qyi,currentPageReport:Zyi,jumpToPageInput:Xyi,css:""};var Jyi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},evi={background:"transparent",color:"{text.color}",padding:"1.25rem",borderColor:"{content.border.color}",borderWidth:"0",borderRadius:"0"},tvi={padding:"0.5rem 1.25rem"},ivi={fontWeight:"600"},nvi={padding:"0 1.25rem 1.25rem 1.25rem"},rvi={padding:"0 1.25rem 1.25rem 1.25rem"};var wOe={root:Jyi,header:evi,toggleableHeader:tvi,title:ivi,content:nvi,footer:rvi,css:""};var ovi={gap:"0",transitionDuration:"{transition.duration}"},avi={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}"}},svi={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}"}},lvi={indent:"1rem"},cvi={color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}"},dvi=` .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'); } `,IOe={root:ovi,panel:avi,item:svi,submenu:lvi,submenuIcon:cvi,css:dvi};var uvi={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:".75rem"},pvi={color:"{form.field.icon.color}"},mvi={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}"},hvi={gap:"0.5rem"},fvi={light:{strength:{weakBackground:"{red.500}",mediumBackground:"{amber.500}",strongBackground:"{green.500}"}},dark:{strength:{weakBackground:"{red.400}",mediumBackground:"{amber.400}",strongBackground:"{green.400}"}}};var TOe={meter:uvi,icon:pvi,overlay:mvi,content:hvi,colorScheme:fvi,css:""};var gvi={gap:"1.125rem"},_vi={gap:"0.5rem"};var EOe={root:gvi,controls:_vi,css:""};var yvi={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"},vvi={padding:"{overlay.popover.padding}"};var AOe={root:yvi,content:vvi,css:""};var bvi={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:"1rem"},Cvi={background:"{primary.color}"},xvi={color:"{primary.contrast.color}",fontSize:"0.75rem",fontWeight:"600"};var DOe={root:bvi,value:Cvi,label:xvi,css:""};var Svi={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 kOe={colorScheme:Svi,css:""};var wvi={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"}},Ivi={size:"10px",checkedColor:"{primary.color}",checkedHoverColor:"{primary.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"8px"},lg:{size:"12px"}};var MOe={root:wvi,icon:Ivi};var Tvi={gap:"0.5rem",transitionDuration:"{transition.duration}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"}},Evi={size:"1.125rem",color:"{text.muted.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"},Avi=` .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%); } `,OOe={root:Tvi,icon:Evi,css:Avi};var Dvi={light:{root:{background:"rgba(0,0,0,0.1)"}},dark:{root:{background:"rgba(255,255,255,0.3)"}}};var ROe={colorScheme:Dvi,css:""};var kvi={transitionDuration:"{transition.duration}"},Mvi={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}"}},Ovi={light:{bar:{background:"{surface.200}"}},dark:{bar:{background:"{surface.700}"}}};var POe={root:kvi,bar:Mvi,colorScheme:Ovi,css:""};var Rvi={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}"}},Pvi={width:"2.5rem",color:"{form.field.icon.color}"},Nvi={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},Fvi={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},Lvi={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}"},Bvi={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},Vvi={color:"{form.field.icon.color}"},zvi={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},Uvi={padding:"{list.option.padding}"},Hvi=` .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; } `,NOe={root:Rvi,dropdown:Pvi,overlay:Nvi,list:Fvi,option:Lvi,optionGroup:Bvi,clearIcon:Vvi,checkmark:zvi,emptyMessage:Uvi,css:Hvi};var Gvi={borderRadius:"{form.field.border.radius}"},jvi={light:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}},dark:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}}};var FOe={root:Gvi,colorScheme:jvi,css:""};var $vi={borderRadius:"{content.border.radius}"},qvi={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 LOe={root:$vi,colorScheme:qvi,css:""};var Yvi={transitionDuration:"{transition.duration}"},Kvi={background:"{content.border.color}",borderRadius:"{border.radius.xs}",size:"2px"},Wvi={background:"{primary.color}"},Qvi={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"}},Zvi=` .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%); } `,BOe={root:Yvi,track:Kvi,range:Wvi,handle:Qvi,css:Zvi};var Xvi={gap:"0.5rem",transitionDuration:"{transition.duration}"};var VOe={root:Xvi,css:""};var Jvi={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 zOe={root:Jvi,css:""};var ebi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",transitionDuration:"{transition.duration}"},tbi={background:"{content.border.color}"},ibi={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 UOe={root:ebi,gutter:tbi,handle:ibi,css:""};var nbi={transitionDuration:"{transition.duration}"},rbi={background:"{content.border.color}",activeBackground:"{primary.color}",margin:"0 0 0 1.625rem",size:"2px"},obi={padding:"0.5rem",gap:"1rem"},abi={padding:"0.75rem 1rem",borderRadius:"{content.border.radius}",focusRing:{width:"0",style:"none",color:"unset",offset:"0",shadow:"none"},gap:"0.5rem"},sbi={color:"{text.muted.color}",activeColor:"{text.color}",fontWeight:"500"},lbi={activeBackground:"{primary.color}",activeBorderColor:"{primary.color}",activeColor:"{primary.contrast.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"none"},cbi={padding:"0.875rem 0.5rem 1.125rem 0.5rem"},dbi={background:"{content.background}",color:"{content.color}",padding:"0",indent:"1rem"},ubi={light:{stepNumber:{background:"{surface.400}",borderColor:"{surface.400}",color:"{surface.0}"}},dark:{stepNumber:{background:"{surface.200}",borderColor:"{surface.200}",color:"{surface.900}"}}},pbi=` .p-step-header:focus-visible { background: dt('navigation.item.active.background'); } `,HOe={root:nbi,separator:rbi,step:obi,stepHeader:abi,stepTitle:sbi,stepNumber:lbi,steppanels:cbi,steppanel:dbi,colorScheme:ubi,css:pbi};var mbi={transitionDuration:"{transition.duration}"},hbi={background:"{content.border.color}"},fbi={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"},gbi={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},_bi={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 GOe={root:mbi,separator:hbi,itemLink:fbi,itemLabel:gbi,itemNumber:_bi,css:""};var ybi={transitionDuration:"{transition.duration}"},vbi={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},bbi={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}"}},Cbi={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},xbi={height:"1px",bottom:"-1px",background:"{primary.color}"};var jOe={root:ybi,tablist:vbi,item:bbi,itemIcon:Cbi,activeBar:xbi,css:""};var Sbi={transitionDuration:"{transition.duration}"},wbi={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},Ibi={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"}},Tbi={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"}},Ebi={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"}},Abi={height:"2px",bottom:"-1px",background:"{primary.color}"},Dbi=` .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'); } `,$Oe={root:Sbi,tablist:wbi,tab:Ibi,tabpanel:Tbi,navButton:Ebi,activeBar:Abi,css:Dbi};var kbi={transitionDuration:"{transition.duration}"},Mbi={background:"{content.background}",borderColor:"{content.border.color}"},Obi={borderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},Rbi={background:"{content.background}",color:"{content.color}"},Pbi={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}"},Nbi={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 qOe={root:kbi,tabList:Mbi,tab:Obi,tabPanel:Rbi,navButton:Pbi,colorScheme:Nbi,css:""};var Fbi={fontSize:"0.875rem",fontWeight:"700",padding:"0.25rem 0.5rem",gap:"0.25rem",borderRadius:"{content.border.radius}",roundedBorderRadius:"{border.radius.xl}"},Lbi={size:"0.75rem"},Bbi={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 YOe={root:Fbi,icon:Lbi,colorScheme:Bbi,css:""};var Vbi={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}"},zbi={gap:"0.25rem"},Ubi={margin:"2px 0"};var KOe={root:Vbi,prompt:zbi,commandResponse:Ubi,css:""};var Hbi={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}"}},Gbi=` .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')); } `,WOe={root:Hbi,css:Gbi};var jbi={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},$bi={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},qbi={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}"}},Ybi={mobileIndent:"1rem"},Kbi={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},Wbi={borderColor:"{content.border.color}"},Qbi=` .p-tieredmenu-overlay { border-color: transparent; } `,QOe={root:jbi,list:$bi,item:qbi,submenu:Ybi,submenuIcon:Kbi,separator:Wbi,css:Qbi};var Zbi={minHeight:"5rem"},Xbi={eventContent:{padding:"1rem 0"}},Jbi={eventContent:{padding:"0 1rem"}},eCi={size:"1.5rem",borderRadius:"50%",borderWidth:"2px",background:"{primary.color}",content:{borderRadius:"50%",size:"0",background:"{primary.color}",insetShadow:"none"}},tCi={color:"{content.border.color}",size:"2px"},iCi={light:{eventMarker:{borderColor:"{surface.0}"}},dark:{eventMarker:{borderColor:"{surface.900}"}}};var ZOe={event:Zbi,horizontal:Xbi,vertical:Jbi,eventMarker:eCi,eventConnector:tCi,colorScheme:iCi,css:""};var nCi={width:"25rem",borderRadius:"{content.border.radius}",borderWidth:"0",transitionDuration:"{transition.duration}"},rCi={size:"1.25rem"},oCi={padding:"{overlay.popover.padding}",gap:"0.5rem"},aCi={gap:"0.5rem"},sCi={fontWeight:"500",fontSize:"1rem"},lCi={fontWeight:"500",fontSize:"0.875rem"},cCi={width:"2rem",height:"2rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},dCi={size:"1rem"},uCi={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 XOe={root:nCi,icon:rCi,content:oCi,text:aCi,summary:sCi,detail:lCi,closeButton:cCi,closeIcon:dCi,colorScheme:uCi,css:""};var pCi={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"}},mCi={color:"{text.muted.color}",hoverColor:"{text.muted.color}",checkedColor:"{text.muted.color}",disabledColor:"{form.field.disabled.color}"},hCi={checkedBackground:"transparent",checkedShadow:"none",padding:"0",borderRadius:"0",sm:{padding:"0"},lg:{padding:"0"}},fCi={light:{root:{hoverBackground:"{surface.100}",checkedBackground:"{surface.200}"}},dark:{root:{hoverBackground:"{surface.800}",checkedBackground:"{surface.700}"}}},gCi=` .p-togglebutton:focus-visible { background: dt('togglebutton.hover.background'); } `,JOe={root:pCi,icon:mCi,content:hCi,colorScheme:fCi,css:gCi};var _Ci={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"},yCi={borderRadius:"50%",size:"1.5rem"},vCi={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}"}}},bCi=` .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); } `,eRe={root:_Ci,handle:yCi,colorScheme:vCi,css:bCi};var CCi={color:"{content.color}",borderRadius:"{content.border.radius}",gap:"0.5rem",padding:"1rem"},xCi={light:{root:{background:"{surface.100}",borderColor:"{surface.100}"}},dark:{root:{background:"{surface.800}",borderColor:"{surface.800}"}}};var tRe={root:CCi,colorScheme:xCi,css:""};var SCi={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 iRe={root:SCi,css:""};var wCi={background:"{content.background}",color:"{content.color}",padding:"1rem",gap:"2px",indent:"2rem",transitionDuration:"{transition.duration}"},ICi={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"},TCi={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}"},ECi={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}"}},ACi={size:"2rem"},DCi={margin:"0 0 0.75rem 0"},kCi=` .p-tree-node-content { transition: none; } `,nRe={root:wCi,node:ICi,nodeIcon:TCi,nodeToggleButton:ECi,loadingIcon:ACi,filter:DCi,css:kCi};var MCi={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}"}},OCi={width:"2.5rem",color:"{form.field.icon.color}"},RCi={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},PCi={padding:"{list.padding}"},NCi={padding:"{list.option.padding}"},FCi={borderRadius:"{border.radius.sm}"},LCi={color:"{form.field.icon.color}"},BCi=` .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')); } `,rRe={root:MCi,dropdown:OCi,overlay:RCi,tree:PCi,emptyMessage:NCi,chip:FCi,clearIcon:LCi,css:BCi};var VCi={transitionDuration:"{transition.duration}"},zCi={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},UCi={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}"}},HCi={fontWeight:"600"},GCi={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}"}},jCi={borderColor:"{treetable.border.color}",padding:"0.75rem 1rem",gap:"0.5rem"},$Ci={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},qCi={fontWeight:"600"},YCi={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},KCi={width:"0.5rem"},WCi={width:"1px",color:"{primary.color}"},QCi={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},ZCi={size:"2rem"},XCi={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}"}},JCi={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},exi={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},txi={light:{root:{borderColor:"{content.border.color}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},bodyCell:{selectedBorderColor:"{primary.900}"}}};var oRe={root:VCi,header:zCi,headerCell:UCi,columnTitle:HCi,row:GCi,bodyCell:jCi,footerCell:$Ci,columnFooter:qCi,footer:YCi,columnResizer:KCi,resizeIndicator:WCi,sortIcon:QCi,loadingIcon:ZCi,nodeToggleButton:XCi,paginatorTop:JCi,paginatorBottom:exi,colorScheme:txi};var ixi={mask:{background:"{content.background}",color:"{text.muted.color}"},icon:{size:"2rem"}};var aRe={loader:ixi,css:""};var L8=$e(pe({},k2e),{components:{accordion:T2e,autocomplete:E2e,avatar:A2e,badge:D2e,blockui:M2e,breadcrumb:O2e,button:R2e,datepicker:$2e,card:P2e,carousel:N2e,cascadeselect:F2e,checkbox:L2e,chip:B2e,colorpicker:V2e,confirmdialog:z2e,confirmpopup:U2e,contextmenu:H2e,dataview:j2e,datatable:G2e,dialog:q2e,divider:Y2e,dock:K2e,drawer:W2e,editor:Q2e,fieldset:Z2e,fileupload:X2e,iftalabel:iOe,floatlabel:J2e,galleria:eOe,iconfield:tOe,image:nOe,imagecompare:rOe,inlinemessage:oOe,inplace:aOe,inputchips:sOe,inputgroup:lOe,inputnumber:cOe,inputotp:dOe,inputtext:uOe,knob:pOe,listbox:mOe,megamenu:hOe,menu:fOe,menubar:gOe,message:_Oe,metergroup:yOe,multiselect:vOe,orderlist:bOe,organizationchart:COe,overlaybadge:xOe,popover:AOe,paginator:SOe,password:TOe,panel:wOe,panelmenu:IOe,picklist:EOe,progressbar:DOe,progressspinner:kOe,radiobutton:MOe,rating:OOe,ripple:ROe,scrollpanel:POe,select:NOe,selectbutton:FOe,skeleton:LOe,slider:BOe,speeddial:VOe,splitter:UOe,splitbutton:zOe,stepper:HOe,steps:GOe,tabmenu:jOe,tabs:$Oe,tabview:qOe,textarea:WOe,tieredmenu:QOe,tag:YOe,terminal:KOe,timeline:ZOe,togglebutton:JOe,toggleswitch:eRe,tree:nRe,treeselect:rRe,treetable:oRe,toast:XOe,toolbar:tRe,tooltip:iRe,virtualscroller:aRe}});var iXo=P4(L8,{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 yat={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",searchMessage:"Suche..",emptySearchMessage:"Keine Ergebnisse gefunden",emptyFilterMessage:"Keine Ergebnisse gefunden"};var nxi=P4(L8,{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; } `}},css:({dt:t})=>` .noUi-connect { background: ${t("primary.color")};} .noUi-horizontal {height: 2px;} .noUi-horizontal .noUi-handle, .noUi-vertical .noUi-handle { background: ${t("primary.color")}; width: 15px; height: 15px; border-radius: 50%; box-shadow: none; border: none; top: -7px; transition: width .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), height .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), left .2s cubic-bezier(0.215, 0.610, 0.355, 1.000), top .2s cubic-bezier(0.215, 0.610, 0.355, 1.000); } .noUi-target.noUi-horizontal .noUi-tooltip {background-color: ${t("primary.color")};} .noUi-handle:after, .noUi-handle:before { content: none; display: none; position: absolute; height: none; width: none; background: none; left: 0; top: 0; } .noUi-tooltip { display: none; } .noUi-active .noUi-tooltip { display: block; } `}),vat={theme:{preset:nxi,options:{darkModeSelector:".not-existing-dark-mode-selector"}},overlayAppendTo:"body",overlayOptions:{mode:"overlay",appendTo:"body"},inputVariant:"filled",translation:yat};var uXo=P4(L8,{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; } `}}});function bat(t){return b6e(t)}function rxi(t,i){if(t&1){let e=qe();O(0,"bd-administration-resources-list-items",2),te("resourceChange",function(){se(e);let r=L();return le(r.onResourceChanged())}),M()}if(t&2){let e=L();D("resources",e.resources)}}var Cat=(()=>{class t{_permissionsResourcesAdminService;groupId;loading$=new hi(1);resources;constructor(e){this._permissionsResourcesAdminService=e}ngOnInit(){this.onResourceChanged()}onResourceChanged(){this.loading$.next(ni.LOADING),this._permissionsResourcesAdminService.sharedRecordsByGroupId(this.groupId).subscribe(e=>{this.resources=e,this.loading$.next(ni.SUCCESS)})}static \u0275fac=function(n){return new(n||t)(xe(rf))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-groups-details-resources"]],inputs:{groupId:"groupId"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"resourceChange","resources"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,rxi,1,1,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,bce],encapsulation:2})}return t})();function oxi(t,i){if(t&1){let e=qe();O(0,"bd-permissions-users-list-items",2),te("removeUser",function(r){se(e);let o=L();return le(o.removeUserFromGroup(r))}),M(),be(1,"mat-divider"),O(2,"div",3)(3,"bd-administration-users-actions",4),te("addUser",function(r){se(e);let o=L();return le(o.addUser(r))}),M()()}if(t&2){let e=L();D("users",e.users)("options",e.BD_PERMISSIONS_USERS_ITEMS_OPTIONS_GROUP)}}var xat=(()=>{class t{_permissionGroupService;_permissionUserService;groupId;BD_PERMISSIONS_USERS_ITEMS_OPTIONS_GROUP={enableRemoveAction:!0,tooltipRemoveAction:"Nutzer von Gruppe entfernen"};loading$=new hi(1);users;constructor(e,n){this._permissionGroupService=e,this._permissionUserService=n}ngOnInit(){this.loading$.next(ni.LOADING),this._permissionGroupService.getAllUsersByGroupId(this.groupId).pipe(ot(e=>this._loadUsers(e)),$0()).subscribe(e=>{this.users=e,this.loading$.next(ni.SUCCESS)})}addUser(e){this.loading$.next(ni.LOADING),this._permissionGroupService.addUserToGroup(this.groupId,e.oid).pipe(ps(()=>this._permissionGroupService.getAllUsersByGroupId(this.groupId)),ot(n=>this._loadUsers(n)),$0()).subscribe(n=>{this.users=n,this.loading$.next(ni.SUCCESS)})}removeUserFromGroup(e){this.loading$.next(ni.LOADING),this._permissionGroupService.removeUserFromGroup(this.groupId,e).pipe(ps(()=>this._permissionGroupService.getAllUsersByGroupId(this.groupId)),ot(n=>this._loadUsers(n)),$0()).subscribe(n=>{this.users=n,this.loading$.next(ni.SUCCESS)})}_loadUsers(e){return Promise.all(e.map(n=>this._loadUser(n)))}_loadUser(e){return this._permissionUserService.getById(e).pipe(ot(n=>zd.unsafe(e,n)),Ac(()=>$t(zd.ofUnknown(e)))).toPromise()}static \u0275fac=function(n){return new(n||t)(xe(iC),xe($g))};static \u0275cmp=re({type:t,selectors:[["bd-permissions-groups-details-users"]],inputs:{groupId:"groupId"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"removeUser","users","options"],[1,"bd-container"],[3,"addUser"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",1),ie(1,oxi,4,2,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[fr,k5,Id,Oce],encapsulation:2})}return t})();function axi(t,i){if(t&1){let e=qe();O(0,"bd-feature-permissions-list",5),te("enabledPermissionsChange",function(r){se(e);let o=L();return le(o.onEnabledFeaturePermissionChange(r))}),M()}if(t&2){let e=L();D("enabledPermissions",e.enabledFeaturePermissions)}}var Sat=(()=>{class t{_groupAdminService;_featurePermissionService;groupId;loading$=new hi(1);enabledFeaturePermissions;hasChanged=!1;_oldEnabledFeaturePermissions;constructor(e,n){this._groupAdminService=e,this._featurePermissionService=n}ngOnInit(){this.groupId&&(this.loading$.next(ni.LOADING),this._groupAdminService.getAllFeaturePermissionsByGroupId(this.groupId).subscribe(e=>{e.sort(),this.enabledFeaturePermissions=e,this._oldEnabledFeaturePermissions=[...e],this.loading$.next(ni.SUCCESS)}))}onEnabledFeaturePermissionChange(e){this.enabledFeaturePermissions=[...e],this.hasChanged=!Ni.equals(this.enabledFeaturePermissions,this._oldEnabledFeaturePermissions)}save(){this.loading$.next(ni.LOADING);let e=this._arrayDifferences(this.enabledFeaturePermissions,this._oldEnabledFeaturePermissions),n=this._arrayDifferences(this._oldEnabledFeaturePermissions,this.enabledFeaturePermissions),r=e.map(a=>this._groupAdminService.addFeaturePermissionsToGroup(this.groupId,a)),o=n.map(a=>this._groupAdminService.removeFeaturePermissionsFromGroup(this.groupId,a));Ys([...r,...o]).subscribe(()=>{this._oldEnabledFeaturePermissions=[...this.enabledFeaturePermissions],this.hasChanged=!1,this.loading$.next(ni.SUCCESS)})}_arrayDifferences(e,n){let r=[];return e.forEach(o=>{n.indexOf(o)===-1&&r.push(o)}),r}static \u0275fac=function(n){return new(n||t)(xe(iC),xe(f5))};static \u0275cmp=re({type:t,selectors:[["bd-group-feature-permissions"]],inputs:{groupId:"groupId"},decls:8,vars:3,consts:[["successTpl",""],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"click","disabled"],[3,"enabledPermissionsChange","enabledPermissions"]],template:function(n,r){if(n&1){let o=qe();O(0,"div",1),be(1,"bd-loader",2),M(),O(2,"div",3)(3,"div")(4,"button",4),te("click",function(){return se(o),le(r.save())}),ee(5," Speichern "),M()()(),ie(6,axi,1,1,"ng-template",null,0,di)}if(n&2){let o=Oi(7);E(),D("loadItem",r.loading$)("successTemplate",o),E(3),D("disabled",!r.hasChanged)}},dependencies:[fr,Kr,g6],encapsulation:2})}return t})();var wat=t=>["/companies",t];function sxi(t,i){if(t&1&&(fi(0),O(1,"span"),ee(2),M(),gi()),t&2){let e=L();E(2),gn("",e.company==null?null:e.company.name,"\xA0-\xA0")}}function lxi(t,i){if(t&1&&(fi(0),O(1,"div",5)(2,"div",6)(3,"span",7),ee(4,"Kunde"),M()(),O(5,"div",11)(6,"a",12),ee(7),M()()(),gi()),t&2){let e=L();E(6),D("routerLink",Yi(2,wat,e.company==null?null:e.company.id)),E(),Pt(e.company.name)}}function cxi(t,i){if(t&1&&be(0,"bd-group-feature-permissions",20),t&2){let e=L(2);D("groupId",e.groupId)}}function dxi(t,i){if(t&1&&be(0,"bd-permissions-groups-details-users",20),t&2){let e=L(2);D("groupId",e.groupId)}}function uxi(t,i){if(t&1&&be(0,"bd-permissions-groups-details-resources",20),t&2){let e=L(2);D("groupId",e.groupId)}}function pxi(t,i){if(t&1&&(O(0,"div",13)(1,"mat-tab-group")(2,"mat-tab",14),ie(3,cxi,1,1,"ng-template",15),M(),O(4,"mat-tab",16),ie(5,dxi,1,1,"ng-template",15),M(),O(6,"mat-tab",17),ie(7,uxi,1,1,"ng-template",15),M()()(),be(8,"mat-divider"),O(9,"div",13)(10,"div",18)(11,"a",19)(12,"span"),ee(13,"Zum Kunden"),M()()()()),t&2){let e=L();E(11),D("routerLink",Yi(1,wat,e.group.companyId))}}var Iat=(()=>{class t{_router;_activatedRoute;_confirmDialog;_permissionCompanyService;_permissionGroupService;loading$=new Sa(ni.INIT);groupId;company;group;constructor(e,n,r,o,a){this._router=e,this._activatedRoute=n,this._confirmDialog=r,this._permissionCompanyService=o,this._permissionGroupService=a}ngOnInit(){this._activatedRoute.params.subscribe(e=>{this.groupId=e.groupId,this.loading$.next(ni.LOADING),this._permissionGroupService.getById(this.groupId).pipe(yo(n=>this.group=n),ps(n=>this._permissionCompanyService.getById(n.companyId))).subscribe(n=>{this.company=n,this.loading$.next(ni.SUCCESS)})})}onDeleteGroup(){this._confirmDialog.get("Gruppe","M\xF6chten Sie die Gruppe wirklich l\xF6schen").then(e=>{e&&(this.loading$.next(ni.LOADING),this._permissionGroupService.delete(this.groupId).subscribe(()=>{this.loading$.next(ni.SUCCESS),this._router.navigate(["companies",this.group.companyId])}))})}static \u0275fac=function(n){return new(n||t)(xe(Ws),xe(id),xe(Vb),xe(bp),xe(iC))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:23,vars:7,consts:[["content",""],[4,"ngIf"],[1,"toolbar-spacer"],["mat-icon-button","",3,"click"],[1,"bd-container"],[1,"flex","flex-row","gap-6","items-center"],[1,"basis-7"],[1,"mat-caption"],[1,"basis-1/2","lg:basis-1/4","mat-body-2"],["mat-icon-button","","color","accent",3,"cdkCopyToClipboard"],[3,"loadItem","successTemplate"],[1,"flex-1"],["mat-button","",3,"routerLink"],[1,"bd-container-inner"],["label","Feature Berechtigungen"],["matTabContent",""],["label","Nutzer"],["label","Resources"],[1,"flex","flex-row-reverse"],["mat-button","","color","accent",3,"routerLink"],[3,"groupId"]],template:function(n,r){if(n&1){let o=qe();O(0,"bd-toolbar"),ie(1,sxi,3,1,"ng-container",1),O(2,"span"),ee(3),M(),be(4,"span",2),O(5,"button",3),te("click",function(){return se(o),le(r.onDeleteGroup())}),O(6,"mat-icon"),ee(7,"delete"),M()()(),O(8,"div",4)(9,"div",5)(10,"div",6)(11,"span",7),ee(12,"ID"),M()(),O(13,"span",8),ee(14),M(),O(15,"button",9)(16,"mat-icon"),ee(17,"file_copy"),M()()(),ie(18,lxi,8,4,"ng-container",1),M(),be(19,"mat-divider")(20,"bd-loader",10),ie(21,pxi,14,3,"ng-template",null,0,di)}if(n&2){let o=Oi(22);E(),D("ngIf",r.company==null?null:r.company.name),E(2),Pt(r.group==null?null:r.group.name),E(11),Pt(r.groupId),E(),D("cdkCopyToClipboard",r.groupId),E(3),D("ngIf",r.company),E(2),D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[zl,Xr,il,zr,m5,iw,Ms,Id,fr,Sce,iK,tK,Sat,xat,Cat],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var Tat=[{path:"groups",canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"]}},children:[{path:":groupId",component:Iat,canActivate:[Rc,hh],data:{featurePermissionsData:{permissions:["ADMIN:BASE"]}}}]}];function mxi(t,i){if(t&1&&(vo(0,"span"),ee(1),So()),t&2){let e=L();E(),gn("Willkommen zur\xFCck, ",e.accountInfo==null?null:e.accountInfo.name,".")}}function hxi(t,i){t&1&&(vo(0,"span"),ee(1,"Willkommen bei BinDoc Admin App"),So())}var Eat=(()=>{class t{_authenticationService;accountInfo=null;constructor(e){this._authenticationService=e,this._authenticationService.accountInfo$.subscribe(n=>{this.accountInfo=n})}static \u0275fac=function(n){return new(n||t)(xe(em))};static \u0275cmp=re({type:t,selectors:[["ng-component"]],decls:2,vars:2,template:function(n,r){n&1&&(yt(0,mxi,2,1,"span"),yt(1,hxi,2,0,"span")),n&2&&(vt(r.accountInfo?0:-1),E(),vt(r.accountInfo?-1:1))},encapsulation:2})}return t})();var Aat=[...hXe,...Tat,...BZe,...WZe,{path:"home",component:Eat},{path:"**",redirectTo:"home"}];var Tme=class{_baseUrl;_resultUrl;_infoUrl;constructor(i,e,n){this._baseUrl=i,this._resultUrl=e,this._infoUrl=n}userDefinedGroups(){return`${this._baseUrl}/operating-number-groups/clinic/user-defined`}userDefinedGroup(i){return`${this.userDefinedGroups()}/${i}`}predefinedGroups(){return`${this._baseUrl}/operating-number-groups/clinic/pre-defined`}operatingNumberResult(i){return`${this._resultUrl}/operating-numbers/${i}/`}operatingNumberInfo(){return`${this._infoUrl}/`}};var B8=class extends Ud{_httpClient;_permissionResourcesService;_codeSpectrumService;_api;constructor(i,e,n,r,o,a){super(i,e,n),this._httpClient=r,this._permissionResourcesService=o,this._codeSpectrumService=a,this._api=new Tme(this.getBaseUrl(),e.load(i.API_TOKENS.RESULT),e.load(i.API_TOKENS.INFO))}findAll(i="READ",e="CREATOR"){let n=this._api.userDefinedGroups(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(ot(o=>o.map(a=>oO.fromObj(a))))}findById(i){let e=this._api.userDefinedGroup(i);return this._httpClient.get(e).pipe(ot(n=>(n.type="user-defined",oO.fromObj(n))),qc(1))}create(i){let e=this._api.userDefinedGroups();return this._httpClient.post(e,i).pipe(ot(n=>(n.type="user-defined",oO.fromObj(n))))}update(i){this.deleteCacheForKey(i.id);let e=this._api.userDefinedGroups();return this._httpClient.put(e,i).pipe(ot(n=>null))}getPredefinedGroups(){let i=this._api.predefinedGroups();return this._httpClient.get(i).pipe(ot(e=>e.map(n=>(n.type="pre-defined",oO.fromObj(n)))))}getPredefinedGroup(i){let e=`${this._api.predefinedGroups()}${i}/`;return this._httpClient.get(e).pipe(ot(n=>(n.type="pre-defined",n)),ot(n=>oO.fromObj(n))).toPromise()}deleteUserDefinedGroup(i){return this._permissionResourcesService.archive(tn.CLINIC_OPERATING_NUMBER_GROUP,i).toPromise()}getOperatingNumberResult(i,e,n,r=uI){let o=this._api.operatingNumberResult(e);return Hr(i.expression.toCondition({clinicIds:new PA(r),codeSpectra:new LA(this._codeSpectrumService)})).pipe(ot(a=>new Nu([a,new py([r],null)])),On(a=>(n=n||new Vo,this._httpClient.post(o,a,{params:n}))),ot(B6.fromObj)).toPromise()}getOperatingNumberInfo(i){let e=`${this._api.operatingNumberInfo()}${i}/`;return this._httpClient.get(e).pipe(ot(B6.fromObj)).toPromise()}searchOperatingNumbers(i,e){let n=this._api.operatingNumberInfo(),r=e||new Vo;return r=r.set("q",i),this._httpClient.get(n,{params:r}).pipe(ot(o=>o.map(B6.fromObj))).toPromise()}};var Dat=[{provide:B8,deps:[xr,Bc,no,Rm,x0],useFactory:(t,i,e,n,r)=>new B8({API_TOKENS:{BASE:"AYS_OPERATING_NUMBER_GROUPS_URL",RESULT:"AYS_OPERATING_NUMBER_URL",INFO:"AYS_OPERATING_NUMBER_INFO_URL"}},t,i,e,n,r)},{provide:gc,useValue:{resourceName:tn.CLINIC_OPERATING_NUMBER_GROUP,resourceService:B8},multi:!0}];var kat=[{provide:C8,deps:[Ar,no,xr,Bc,x0],useFactory:(t,i,e,n,r)=>new C8({API_TOKENS:{BASE:"AYS_CLINIC_FILTER_STORAGE_URL",RESULT:"AYS_CLINIC_RESOURCE_URL"}},e,n,t,i,r)},{provide:gc,useValue:{resourceName:tn.CLINICS_FILTER,resourceService:C8},multi:!0}];var JQ=class extends x0{},eZ=class extends x0{},Mat=[{provide:x0,deps:[xr,Bc,no],useFactory:(t,i,e)=>new x0({API_TOKENS:{BASE:"AYS_CODE_SPECTRUM_STORAGE_URL"}},t,i,e)},{provide:gc,useValue:{resourceName:tn.CODE_SPECTRUM,resourceService:x0},multi:!0},{provide:JQ,deps:[xr,Bc,no],useFactory:(t,i,e)=>new JQ({API_TOKENS:{BASE:"AT_CODE_SPECTRUM_API_URL"}},t,i,e)},{provide:gc,useValue:{resourceName:tn.AT_CODE_SPECTRUM,resourceService:JQ},multi:!0},{provide:eZ,deps:[xr,Bc,no],useFactory:(t,i,e)=>new eZ({API_TOKENS:{BASE:"UK_CODE_SPECTRUM_API_URL"}},t,i,e)},{provide:gc,useValue:{resourceName:tn.UK_CODE_SPECTRUM,resourceService:eZ},multi:!0}];var Eme=class extends S8{},Oat=[{provide:S8,deps:[x8,Ar,Rm,no,xr,Bc],useFactory:(t,i,e,n,r,o)=>new S8(t,i,{API_TOKENS:{BASE:"CUBE_DASHBOARD_URL"}},e,n,r,o)},{provide:gc,useValue:{resourceName:tn.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD,resourceService:S8},multi:!0},{provide:Eme,deps:[x8,Ar,Rm,no,xr,Bc],useFactory:(t,i,e,n,r,o)=>new S8(t,i,{API_TOKENS:{BASE:"AT_CUBE_DASHBOARD_API_URL"}},e,n,r,o)},{provide:gc,useValue:{resourceName:tn.AT_CUBE_DASHBOARD,resourceService:Eme},multi:!0}];var BB=class{baseUrl;constructor(i){this.baseUrl=i}crud(){return`${this.baseUrl}/scenarios/openclose/`}findOne(i){return`${this.baseUrl}/scenarios/openclose/${i}/`}serviceGroups(){return`${this.baseUrl}/leistungsgruppen/`}vv(){return`${this.baseUrl}/vorhalteverguetung`}soll1Mindestfallzahl(){return`${this.serviceGroups()}soll1-mindestfallzahl/`}clinicAccessibilityAnalysisTravelTimePopulationMatrix(){return`${this.baseUrl}/clinic-accessibility-analysis/calculate/travel-time-population-matrix/`}clinicAccessibilityAnalysisDrivingTimeGrid(){return`${this.baseUrl}/clinic-accessibility-analysis/calculate/driving-time-by-grid-id/1000m/`}clinicAccessibilityAnalysisDrivingTimeGrid10Km(){return`${this.baseUrl}/clinic-accessibility-analysis/calculate/driving-time-by-grid-id/10km/`}clinicAccessibilityAnalysisDrivingTimeDiffGrid(){return`${this.baseUrl}/clinic-accessibility-analysis/calculate/driving-time-by-grid-id/diff/1000m/`}clinicAccessibilityAnalysisDrivingTimeDiffGrid10Km(){return`${this.baseUrl}/clinic-accessibility-analysis/calculate/driving-time-by-grid-id/diff/10km/`}};var V8=class t{id;name;modifiedDate;createdDate;highestPermission;status;sourceId;input;progressEvent;hasError;labels;static fromJsonObject(i,e){let n=i.input.standortConditionWrapper&&i.input.standortConditionWrapper.frontendConditionObject?Pa.fromObject(i.input.standortConditionWrapper.frontendConditionObject,e).then(o=>({standortCondition:i.input.standortConditionWrapper?.standortCondition,frontendConditionObject:o})):Promise.resolve(void 0),r=i.input.zensusGridCellConditionWrapper&&i.input.zensusGridCellConditionWrapper.frontendConditionObject?Pa.fromObject(i.input.zensusGridCellConditionWrapper.frontendConditionObject,e).then(o=>({zensusGridCellCondition:i.input.zensusGridCellConditionWrapper?.zensusGridCellCondition,frontendConditionObject:o})):Promise.resolve(void 0);return Promise.all([n,r]).then(o=>Promise.resolve(new t(i.id,i.name,i.modifiedDate,i.createdDate,i.highestPermission,i.status,i.sourceId,{lgNr:i.input.lgNr,stateIds:i.input.stateIds,cutoffPercentage:i.input.cutoffPercentage,year:i.input.year,clinicIdCaseCountPairs:i.input.clinicIdCaseCountPairs.map(a=>$e(pe({},a),{clinicId:vs.fromObj(a.clinicId)})),standortConditionWrapper:o[0],zensusGridCellConditionWrapper:o[1]},i.progressEvent,i.hasError,i.labels)))}resourceName=tn.SCENARIO_ANALYSIS_OPEN_CLOSE;constructor(i,e,n,r,o,a,c,m,g,C,w){this.id=i,this.name=e,this.modifiedDate=n,this.createdDate=r,this.highestPermission=o,this.status=a,this.sourceId=c,this.input=m,this.progressEvent=g,this.hasError=C,this.labels=w}clone(...i){return new t(this.id,this.name,this.modifiedDate,this.createdDate,this.highestPermission,this.status,this.sourceId,{lgNr:this.input.lgNr,stateIds:this.input.stateIds,cutoffPercentage:this.input.cutoffPercentage,year:this.input.year,clinicIdCaseCountPairs:this.input.clinicIdCaseCountPairs.map(e=>$e(pe({},e),{clinicId:e.clinicId.clone()})),standortConditionWrapper:this.input.standortConditionWrapper?$e(pe({},this.input.standortConditionWrapper),{frontendConditionObject:this.input.standortConditionWrapper.frontendConditionObject.clone()}):void 0,zensusGridCellConditionWrapper:this.input.zensusGridCellConditionWrapper?$e(pe({},this.input.zensusGridCellConditionWrapper),{frontendConditionObject:this.input.zensusGridCellConditionWrapper.frontendConditionObject.clone()}):void 0},this.progressEvent?JSON.parse(JSON.stringify(this.progressEvent)):void 0,this.hasError,this.labels)}};var VB=class extends Ud{_filterRegistrations;_httpClient;_api;constructor(i,e,n,r,o){super(i,e,n),this._filterRegistrations=r,this._httpClient=o,this._api=new BB(this.getBaseUrl())}create(i){return this._httpClient.post(this._api.crud(),i).pipe(On(e=>V8.fromJsonObject(e,this._filterRegistrations)))}findAll(i=void 0,e=void 0){return this._httpClient.get(this._api.crud()).pipe(On(n=>Promise.all(n.map(r=>V8.fromJsonObject(r,this._filterRegistrations)))))}findById(i){return this._httpClient.get(this._api.findOne(i)).pipe(On(e=>V8.fromJsonObject(e,this._filterRegistrations)))}update(i){return this._httpClient.put(this._api.findOne(i.id),i).pipe(ot(()=>{}))}serviceGroups(i){return this._httpClient.post(this._api.serviceGroups(),{sourceId:i})}scopeTooltips(i,e,n,r){return this.soll1Mindestfallzahl(i,e,n,r).pipe(ot(o=>{let a=o.year,c=`<= ${o.caseCount}`;return{ist:`Fallzahl aus dem Berichtsjahr ${a}`,soll1:`Fallzahl aus dem Berichtsjahr ${a} oberhalb der Mindestvorhaltezahl (${c})`,soll2:`Fallzahl aus dem Berichtsjahr ${a} oberhalb der Mindestvorhaltezahl (${c}) und nach Simulation durch Schlie\xDFung/\xD6ffnung`}}))}soll1Mindestfallzahl(i,e,n,r){return this._httpClient.post(this._api.soll1Mindestfallzahl(),{cutoffPercentage:n,lgNr:e,sourceId:i,year:r})}};var sRe=mp(s1e());var z8=class t{id;name;modifiedDate;createdDate;highestPermission;sourceId;input;result;hasError;labels;resourceName=tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE;static fromObject(i){let e=i.result;return new t(i.id,i.name,i.modifiedDate,i.creationDate,i.highestPermission,i.sourceId,$e(pe({},i.input),{clinicIdCaseCountChanges:i.input.clinicIdCaseCountChanges.map(n=>({caseCount:n.caseCount,clinicId:vs.fromObj(n.clinicId)}))}),{resultItems:Object.values(e.resultItemsByStateId).flat().map(n=>$e(pe({},n),{standort:{clinicId:vs.fromObj(n.standort.clinicId),address:Bu.fromObject(n.standort.address),name:n.standort.name,clinicSn:n.standort.clinicSn,sicherstellungsstandort:n.standort.sicherstellungsstandort}}))},i.hasError,i.labels)}constructor(i,e,n,r,o,a,c,m,g,C){this.id=i,this.name=e,this.modifiedDate=n,this.createdDate=r,this.highestPermission=o,this.sourceId=a,this.input=c,this.result=m,this.hasError=g,this.labels=C}clone(...i){return new t(this.id,this.name,this.modifiedDate,this.createdDate,this.highestPermission,this.sourceId,(0,sRe.clone)(this.input),(0,sRe.clone)(this.result),this.hasError,this.labels)}};var zB=class extends Ud{_httpClient;_api;constructor(i,e,n,r){super(i,e,n),this._httpClient=r,this._api=new BB(this.getBaseUrl())}findAll(){let i=`${this._api.vv()}/calculations/`;return this._httpClient.get(i).pipe(ot(e=>e.map(n=>z8.fromObject(n))))}create(i){let e=`${this._api.vv()}/calculations/`;return this._httpClient.post(e,i).pipe(ot(n=>z8.fromObject(n)))}findById(i){let e=`${this._api.vv()}/calculations/${i}/`;return this._httpClient.get(e).pipe(ot(n=>z8.fromObject(n)))}update(i){let e=`${this._api.vv()}/calculations/${i.id}/`;return this._httpClient.put(e,i).pipe(ot(()=>null))}baseCalculation(i){let e=`${this._api.vv()}/base-calculation/`;return this._httpClient.post(e,i).pipe(ot(n=>{let r=[];return Object.values(n.resultItemsByStateId).flat().forEach(o=>{r.push({standort:{clinicId:vs.fromObj(o.standort.clinicId),address:Bu.fromObject(o.standort.address),name:o.standort.name,clinicSn:o.standort.clinicSn,sicherstellungsstandort:o.standort.sicherstellungsstandort},caseInformationVorhalteverguetung:JSON.parse(JSON.stringify(o.caseInformationVorhalteverguetung))})}),{resultItems:r,vorhalteverguetungSum:Object.values(n.vorhalteverguetungSumByStateId).reduce((o,a)=>o+a,0)}}))}};var Rat=[{provide:VB,deps:[xr,Bc,no,Ar],useFactory:(t,i,e,n)=>new VB({API_TOKENS:{BASE:"AYS_DEMAND_ANALYSIS_URL",BASE_FOR_INEK_DATASOURCE:"BMG_DEMAND_ANALYSIS_URL"}},t,i,n,e)},{provide:zB,deps:[xr,Bc,no],useFactory:(t,i,e)=>new zB({API_TOKENS:{BASE:"AYS_DEMAND_ANALYSIS_URL",BASE_FOR_INEK_DATASOURCE:"BMG_DEMAND_ANALYSIS_URL"}},t,i,e)},{provide:gc,useValue:{resourceName:tn.SCENARIO_ANALYSIS_OPEN_CLOSE,resourceService:VB},multi:!0},{provide:gc,useValue:{resourceName:tn.SCENARIO_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE,resourceService:VB},multi:!0},{provide:gc,useValue:{resourceName:tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE,resourceService:zB},multi:!0},{provide:gc,useValue:{resourceName:tn.SCENARIO_VV_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE,resourceService:zB},multi:!0}];var Pat=[{provide:Ap,deps:[Ar,no,xr,Bc],useFactory:(t,i,e,n)=>new Ap({API_TOKENS:{BASE:"AYS_MARKET_STORAGE_URL",RESULT:"BD_DISTRICT_URL"}},e,n,t,i)},{provide:gc,useValue:{resourceName:tn.MARKET,resourceService:Ap},multi:!0}];var U8=class t{id;name;input;status;progressEvent;modifiedDate;createdDate;highestPermission;resourceName=tn.SCENARIO_ANALYSIS;static fromObj(i){return new t(i.id,i.name,i.input,i.status,i.progressEvent,i.modifiedDate,i.createdDate,i.highestPermission)}constructor(i,e,n,r,o,a,c,m){this.id=i,this.name=e,this.input=n,this.status=r,this.progressEvent=o,this.modifiedDate=a,this.createdDate=c,this.highestPermission=m}clone(){return new t(this.id,this.name,this.input,this.status,pe({},this.progressEvent),this.modifiedDate,this.createdDate,this.highestPermission)}};var Ame=class{_baseUrl;constructor(i){this._baseUrl=i}crud(){return`${this._baseUrl}/scenarios/`}groupBy(){return`${this._baseUrl}/scenarios/group-by/available`}detail(i){return`${this._baseUrl}/scenarios/${i}/`}patientOrigin(i){return`${this._baseUrl}/scenarios/${i.id}/result/${i.input.scenarioType}/patient-origin/`}targetClinicLocationOverview(i){return`${this._baseUrl}/scenarios/${i.id}/result/${i.input.scenarioType}/target-clinic-locations/overview/`}targetClinicLocationsDetails(i){return`${this._baseUrl}/scenarios/${i.id}/result/${i.input.scenarioType}/target-clinic-locations/details/`}};var H8=class extends Ud{_httpClient;_api;constructor(i,e,n,r){super(i,e,n),this._httpClient=r,this._api=new Ame(this.getBaseUrl())}create(i){let e=this._api.crud();return this._httpClient.post(e,i).pipe(ot(n=>U8.fromObj(n)))}findAll(i="READ",e="CREATOR"){let n=this._api.crud(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(ot(o=>o.map(a=>U8.fromObj(a))))}findById(i){let e=this._api.detail(i);return this._httpClient.get(e).pipe(ot(n=>U8.fromObj(n)))}update(i,e){}};var Nat=[{provide:H8,deps:[xr,Bc,no],useFactory:(t,i,e)=>new H8({API_TOKENS:{BASE:"AYS_SCENARIO_ANALYSIS_RESOURCE_URL"}},t,i,e)},{provide:gc,useValue:{resourceName:tn.SCENARIO_ANALYSIS,resourceService:H8},multi:!0}];var Fat=[{provide:my,deps:[no,xr,Bc],useFactory:(t,i,e)=>new my({API_TOKENS:{BASE:"BD_FILES_RESOURCE_URL"}},i,e,t)},{provide:gc,useValue:{resourceName:tn.FILE,resourceService:my},multi:!0}];var Dme=class{_baseUrl;constructor(i){this._baseUrl=i}crud(){return`${this._baseUrl}/`}findAll(){return`${this.crud()}all`}findById(i){return`${this.crud()}${i}`}};var UB=class t{id;name;createdDate;modifiedDate;highestPermission;clinicSizes;medicalCareLevels;clinicTypes;virtualClinicIds;universityType;static fromObj(i){return new t(i.id,i.name,i.createdDate,i.modifiedDate,i.highestPermission,i.criteria?i.criteria.clinicSizes:null,i.criteria?i.criteria.medicalCareLevels:null,i.criteria?i.criteria.clinicTypes:null,i.criteria?i.criteria.virtualClinicIds:null,i.criteria?i.criteria.universityType:null)}resourceName=tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP;constructor(i,e,n,r,o,a=null,c=null,m=null,g=null,C=null){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o,this.clinicSizes=a,this.medicalCareLevels=c,this.clinicTypes=m,this.virtualClinicIds=g,this.universityType=C}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.clinicSizes?.slice(),this.medicalCareLevels?.slice(),this.clinicTypes?.slice(),this.virtualClinicIds?.slice(),this.universityType)}toJson(){return{id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,criteria:{clinicSizes:this.clinicSizes,medicalCareLevels:this.medicalCareLevels,clinicTypes:this.clinicTypes,universityType:this.universityType,virtualClinicIds:this.virtualClinicIds}}}};var G8=class extends Ud{_httpClient;_permissionService;_api;constructor(i,e,n,r,o){super(i,e,n),this._httpClient=r,this._permissionService=o,this._api=new Dme(this.getBaseUrl())}create(i){let e=this._api.crud(),n=i.toJson();return this._httpClient.post(e,n).pipe(ot(r=>UB.fromObj(r)))}findAll(i,e){let n=this._api.findAll(),r=new Vo;return i&&(r=r.append("minPermission",i)),e&&(r=r.append("maxPermission",e)),this._httpClient.get(n,{params:r}).pipe(ot(o=>o.map(a=>UB.fromObj(a))))}findById(i){let e=this._api.findById(i);return this._cache.cacheObservable(this.key(i),this._httpClient.get(e).pipe(ot(n=>UB.fromObj(n)),qc(1)))}update(i){this.deleteCacheForKey(i.id);let e=this._api.findById(i.id),n=i.toJson();return this._httpClient.post(e,n).pipe(ot(r=>UB.fromObj(r)),ot(r=>null))}result(i){let e=`${this._api.findById(i.id)}/result`;return this._httpClient.get(e)}};var Lat=[{provide:G8,deps:[xr,Bc,no,Rm],useFactory:(t,i,e,n)=>new G8({API_TOKENS:{BASE:"AYS_BENCHMARKING_GROUP_RESOURCE_URL"}},t,i,e,n)},{provide:gc,useValue:{resourceName:tn.VIRTUAL_CLINIC_BENCHMARKING_GROUP,resourceService:G8},multi:!0}];var kme=class extends Cc{},Mme=class extends Cc{},Bat=[{provide:Cc,deps:[xr,Bc,no,DB,pg,ib],useFactory:(t,i,e,n,r,o)=>new Cc({API_TOKENS:{BASE:"AYS_VIRTUAL_CLINIC_RESOURCE_URL"}},t,i,e,n,r,o)},{provide:gc,useValue:{resourceName:tn.VIRTUAL_CLINIC,resourceService:Cc},multi:!0},{provide:kme,deps:[xr,Bc,no],useFactory:(t,i,e)=>new Cc({API_TOKENS:{BASE:"AT_VIRTUAL_CLINIC_API_URL"}},t,i,e,null,null,null)},{provide:gc,useValue:{resourceName:tn.AT_VIRTUAL_CLINIC,resourceService:kme},multi:!0},{provide:Mme,deps:[xr,Bc,no],useFactory:(t,i,e)=>new Cc({API_TOKENS:{BASE:"CH_VIRTUAL_CLINIC_API_URL"}},t,i,e,null,null,null)},{provide:gc,useValue:{resourceName:tn.CH_VIRTUAL_CLINIC,resourceService:Mme},multi:!0}];var Ome=class{_baseUrl;constructor(i){this._baseUrl=i}virtualClinicReferralsImports(){return`${this._basePath()}/`}virtualClinicReferralsImportDetail(i){return`${this._basePath()}/${i}`}_basePath(){return this._baseUrl+"/referral-imports"}};var j8=class extends Ud{_httpClient;_api;constructor(i,e,n,r){super(i,e,n),this._httpClient=r,this._api=new Ome(this.getBaseUrl())}findAll(){let i=this._api.virtualClinicReferralsImports();return this._httpClient.get(i).pipe(ot(e=>e.map(n=>LK.fromObj(n))))}findById(i){let e=this._api.virtualClinicReferralsImportDetail(i);return this._cache.cacheObservable(e,this._httpClient.get(e).pipe(ot(n=>LK.fromObj(n)),qc(1)))}create(i,e){let n=this._api.virtualClinicReferralsImports(),r=new Vo().set("virtualClinicId",e.virtualClinicId).set("year",e.year),o=Dit({"data.json":Mpe(JSON.stringify(e.referrals))}),a=new FormData;return e.originalFileName.endsWith(".csv")&&(e.originalFileName=e.originalFileName.replace(".csv","")),a.append("file",new Blob([o]),`${e.originalFileName}.zip`),this._httpClient.post(n,a,{params:r})}update(i,e){return NS(()=>new Error("Method not impl"))}};var Vat=[{provide:j8,deps:[no,xr,Bc],useFactory:(t,i,e)=>new j8({API_TOKENS:{BASE:"AYS_VIRTUAL_CLINIC_REFERRAL_IMPORT_RESOURCE_URL"}},i,e,t)},{provide:gc,useValue:{resourceName:tn.VIRTUAL_CLINIC_REFERRAL_IMPORT,resourceService:j8},multi:!0}];var Rme=class{contentType;snippetType;static fromObject(i){throw new Error("Missing override for AppContentSnippet.fromObject")}constructor(i,e){this.contentType=i,this.snippetType=e}},zu=class extends Rme{_content;constructor(i,e){super(i,"node"),this._content=e}getIncludedContentTypes(){return Object.keys(this._content).filter(i=>this._content[i]!==null).reduce((i,e)=>(i=i.concat(this._content[e].getIncludedContentTypes()),i),[]).concat([this.contentType])}get content(){return this._content}},Go=class extends Rme{_value;constructor(i,e){super(i,"value"),this._value=e}getIncludedContentTypes(){return[this.contentType]}set value(i){this._value=i}get value(){return this._value}};var zC=class extends zu{displayName;constructor(i,e,n){super(i,n),this.displayName=e}},Pme=class extends Go{displayName;constructor(i,e,n){super(i,n),this.displayName=e}};var gxi="Landkreise",zat="administrative-district-ids",Nme=class t extends Pme{constructor(i){super(zat,gxi,i)}toDisplayString(){return[this.displayName,[this.value?` ${this.value.length} Landkreise`:"Keine ausgew\xE4hlt"]]}fromObject(i){return new t(i?i.value.map(e=>io.create(e)):null)}toObject(){return{contentType:zat,value:this.value.map(i=>i.value)}}};var _xi="Kartenansicht",Uat="projection-map-view-mode",$8=class{static toDisplayString(i){return[_xi,[i.value?i.value.name:"Keine Kartenansicht ausgew\xE4hlt"]]}static fromObject(i){return new Go(Uat,i.value)}static toObject(i){return{contentType:Uat,value:i.value}}};var yxi="Farbskala",Hat="color-factory",AI=class{static toDisplayString(i){return[yxi,[i.value?f7e[i.value.type]:"Keine Farbskala ausgew\xE4hlt"]]}static fromObject(i){return new Go(Hat,v5.fromObject(i.value))}static toObject(i){return{contentType:Hat,value:i.value.toJSON()}}};var vxi="Gruppierung",Gat="projection-grouping",q8=class{static toDisplayString(i){return[vxi,[i.value.fieldName]]}static fromObject(i){return new Go(Gat,i.value||[])}static toObject(i){return{contentType:Gat,value:i.value}}};var $at=mp(Lw());var bxi="Karten Einstellungen",jat="mapbox-options",Py=class{static toDisplayString(i){let e=[bxi];if(i.value.center){let n=$at.LngLat.convert(i.value.center);e.push([`Mittelpunkt ${n.lng}, ${n.lat}`])}if(i.value.zoom&&e.push([`Zoom ${i.value.zoom}`]),i.value.style&&typeof i.value.style=="string"){let n=jM.fromStyleUrl(i.value.style);e.push([`Kartenstil ${$1e[n]}`])}return e}static fromObject(i){return new Go(jat,i.value)}static toObject(i){return{contentType:jat,value:i.value}}};var Cxi="Karte",qat="potential-analysis-map",Y8=class{static toDisplayName(i){let e=[];return i.content.viewMode&&i.content.viewMode.value&&e.push($8.toDisplayString(i.content.viewMode)),i.content.colorFactory&&i.content.colorFactory.value&&e.push(AI.toDisplayString(i.content.colorFactory)),i.content.grouping&&i.content.grouping.value&&e.push(q8.toDisplayString(i.content.grouping)),i.content.mapboxOptions&&e.push(Py.toDisplayString(i.content.mapboxOptions)),[Cxi,e]}static toObject(i){return{contentType:qat,content:{grouping:i.content.grouping?q8.toObject(i.content.grouping):null,viewMode:i.content.viewMode?$8.toObject(i.content.viewMode):null,colorFactory:i.content.colorFactory?AI.toObject(i.content.colorFactory):null,mapboxOptions:i.content.mapboxOptions?Py.toObject(i.content.mapboxOptions):null}}}static fromObject(i){return _t(this,null,function*(){return new zu(qat,{grouping:i.content.grouping?q8.fromObject(i.content.grouping):null,viewMode:i.content.viewMode?$8.fromObject(i.content.viewMode):null,colorFactory:i.content.colorFactory?AI.fromObject(i.content.colorFactory):null,mapboxOptions:i.content.mapboxOptions?Py.fromObject(i.content.mapboxOptions):null})})}};var xxi="Kodierung",Yat="coding-system",DI=class{static toDisplayString(i){return[xxi,[`${i&&i.value?i.value:"Keine ausgew\xE4hlt"}`]]}static fromObject(i){return new Go(Yat,i.value)}static toObject(i){return{contentType:Yat,value:i.value}}};var Sxi="M\xE4rkte",Kat="market-ids",kI=class{static toDisplayString(i){return[Sxi,[i.value&&i.value.length>0?i.value.length+" ausgew\xE4hlt":"Keine ausgew\xE4hlt"]]}static fromObject(i){return new Go(Kat,i.value)}static toObject(i){return{contentType:Kat,value:i.value}}};var wxi="Gruppierung",Wat="projection-groupings",K8=class{static toDisplayString(i){return[wxi,i.value.map(e=>e.fieldName)]}static fromObject(i){return new Go(Wat,i.value||[])}static toObject(i){return{contentType:Wat,value:i.value}}};var Ixi="Tabelle",Qat="projection-view-state",HB=class{static toDisplayString(i){let e=[Ixi];return i.content.codingSystem&&e.push(DI.toDisplayString(i.content.codingSystem)),i.content.marketIds&&e.push(kI.toDisplayString(i.content.marketIds)),i.content.groupings&&e.push(K8.toDisplayString(i.content.groupings)),e}static fromObject(i){return new zu(Qat,{codingSystem:i.content.codingSystem?DI.fromObject(i.content.codingSystem):null,marketIds:i.content.marketIds?kI.fromObject(i.content.marketIds):null,groupings:i.content.groupings?K8.fromObject(i.content.groupings):null})}static toObject(i){return{contentType:Qat,content:{marketIds:i.content.marketIds?kI.toObject(i.content.marketIds):null,codingSystem:i.content.codingSystem?DI.toObject(i.content.codingSystem):null,groupings:i.content.groupings?K8.toObject(i.content.groupings):null}}}static childrenResources(i){return i.content.marketIds&&i.content.marketIds.value&&i.content.marketIds.value.length>0?{[tn.MARKET]:i.content.marketIds.value}:{}}};var Txi="Filter",Zat="projection-map-filter",GB=class{static toDisplayString(i){let e=[Txi],n=i.value.expression.toText();return n&&e.push([n]),e}static fromObject(i,e){return _t(this,null,function*(){let n=yield Pa.fromObject(i.value.expression,e);return new Go(Zat,new Ipe(n))})}static toObject(i){return{contentType:Zat,value:i.value.toJSON()}}static childrenResources(i){return i.value?i.value.getChildResources():{}}};var lRe="Marktprognose",PO="projection-feature",jB=class{static toDisplayString(i){let e=[lRe];return i.content.viewState&&e.push(HB.toDisplayString(i.content.viewState)),i.content.map&&e.push(Y8.toDisplayName(i.content.map)),i.content.filter&&e.push(GB.toDisplayString(i.content.filter)),e}static fromObject(i,e){return _t(this,null,function*(){let n=i.content.viewState?HB.fromObject(i.content.viewState):null,r=i.content.map?yield Y8.fromObject(i.content.map):null,o=i.content.filter?yield GB.fromObject(i.content.filter,e):null;return new zu(PO,{viewState:n,map:r,filter:o})})}static toObject(i){return{contentType:PO,content:{viewState:i.content.viewState?HB.toObject(i.content.viewState):null,map:i.content.map?Y8.toObject(i.content.map):null,filter:i.content.filter?GB.toObject(i.content.filter):null}}}static childrenResources(i){let e={};return i.content.viewState&&(e=yl.merge(e,HB.childrenResources(i.content.viewState))),i.content.filter&&(e=yl.merge(e,GB.childrenResources(i.content.filter))),e}};var Exi="Ziffern-Spektrum Auswahl",Xat="code-spectrum-select",MI=class{static toDisplayString(i){return[Exi,[i.value&&i.value.codingSystem?"Kodierung "+i.value.codingSystem:"Keine Kodierung ausgew\xE4hlt",i.value&&i.value.codeSpectrumIds?.length>0?`${i.value.codeSpectrumIds.length} ${i.value.codeSpectrumIds.length===1?"Ziffern-Spektrum":"Ziffern-Spektren"} ausgew\xE4hlt`:"Keine Ziffern-Spektren ausgew\xE4hlt"]]}static fromObject(i){return new Go(Xat,i.value)}static toObject(i){return{contentType:Xat,value:i.value}}};var Axi="Modus",Jat="competitors-analysis-form-mode",W8=class{static toDisplayString(i){return[Axi,[i.value?i.value:"Kein Modus ausgew\xE4hlt"]]}static fromObject(i){return new Go(Jat,i.value)}static toObject(i){return{contentType:Jat,value:i.value}}};var Dxi="Klinik",est="clinic-id",OI=class{static toDisplayString(i){return[Dxi,[`${i&&i.value?i.value.toString():"Keine ausgew\xE4hlt"}`]]}static fromObject(i){return new Go(est,i.value?vs.fromObj(i.value):null)}static toObject(i){return{contentType:est,value:i.value}}};var kxi="Klinik-Filter",tst="clinics-filter-ids",Q8=class{static toDisplayString(i){return[kxi,[i.value&&i.value.length>0?i.value.length+" ausgew\xE4hlt":"Keine ausgew\xE4hlt"]]}static fromObject(i){return new Go(tst,i.value)}static toObject(i){return{contentType:tst,value:i.value}}};var Mxi="Jahre",ist="years",Z8=class{static toDisplayString(i){return[Mxi,[i.value&&i.value.length>0?i.value.join(", "):"Keine Jahre ausgew\xE4hlt"]]}static fromObject(i){return new Go(ist,i.value)}static toObject(i){return{contentType:ist,value:i.value}}};var Oxi="Radius",nst="competitors-analysis-form-distance",X8=class{static toDisplayString(i){return[Oxi,[i.value?i.value+" km":"Keine Entfernung ausgew\xE4hlt"]]}static fromObject(i){return new Go(nst,i.value)}static toObject(i){return{contentType:nst,value:i.value}}};var Rxi="Formular",rst="competitors-analysis-form",$B=class{static toDisplayString(i){let e=[];return i.content.mode&&e.push(W8.toDisplayString(i.content.mode)),i.content.clinicId&&e.push(OI.toDisplayString(i.content.clinicId)),i.content.distance&&e.push(X8.toDisplayString(i.content.distance)),i.content.clinicsFilterIds&&e.push(Q8.toDisplayString(i.content.clinicsFilterIds)),i.content.codeSpectrumSelect&&e.push(MI.toDisplayString(i.content.codeSpectrumSelect)),i.content.years&&e.push(Z8.toDisplayString(i.content.years)),[Rxi,e]}static fromObject(i){return new zu(rst,{mode:i.content.mode?W8.fromObject(i.content.mode):null,clinicId:i.content.clinicId?OI.fromObject(i.content.clinicId):null,distance:i.content.distance?X8.fromObject(i.content.distance):null,clinicsFilterIds:i.content.clinicsFilterIds?Q8.fromObject(i.content.clinicsFilterIds):null,codeSpectrumSelect:i.content.codeSpectrumSelect?MI.fromObject(i.content.codeSpectrumSelect):null,years:i.content.years?Z8.fromObject(i.content.years):null})}static toObject(i){return{contentType:rst,content:{mode:i.content.mode?W8.toObject(i.content.mode):null,clinicId:i.content.clinicId?OI.toObject(i.content.clinicId):null,distance:i.content.distance?X8.toObject(i.content.distance):null,clinicsFilterIds:i.content.clinicsFilterIds?Q8.toObject(i.content.clinicsFilterIds):null,codeSpectrumSelect:i.content.codeSpectrumSelect?MI.toObject(i.content.codeSpectrumSelect):null,years:i.content.years?Z8.toObject(i.content.years):null}}}static childrenResources(i){let e={};return i.content.clinicsFilterIds&&i.content.clinicsFilterIds.value&&i.content.clinicsFilterIds.value.length>0&&(e=yl.merge(e,{[tn.CLINICS_FILTER]:i.content.clinicsFilterIds.value})),i.content.codeSpectrumSelect&&i.content.codeSpectrumSelect.value&&i.content.codeSpectrumSelect.value.codeSpectrumIds&&i.content.codeSpectrumSelect.value.codeSpectrumIds.length>0&&(e=yl.merge(e,{[tn.CODE_SPECTRUM]:i.content.codeSpectrumSelect.value.codeSpectrumIds})),e}};var Pxi="Gruppierung",ost="competitors-analysis-map-view-cluster-support",J8=class{static toDisplayString(i){return[`${Pxi}: ${i.value?"Aktiviert":"Deaktiviert"}`]}static fromObject(i){return new Go(ost,i.value)}static toObject(i){return{value:i.value,contentType:ost}}};var Nxi="Karte",ast="competitors-analysis-map-view-state",eH=class{static toDisplayString(i){let e=[Nxi];return i.content.clusterSupport&&e.push(J8.toDisplayString(i.content.clusterSupport)),i.content.mapboxOptions&&e.push(Py.toDisplayString(i.content.mapboxOptions)),e}static fromObject(i){return new zu(ast,{clusterSupport:i.content.clusterSupport?J8.fromObject(i.content.clusterSupport):null,mapboxOptions:i.content.mapboxOptions?Py.fromObject(i.content.mapboxOptions):null})}static toObject(i){return{contentType:ast,content:{clusterSupport:i.content.clusterSupport?J8.toObject(i.content.clusterSupport):null,mapboxOptions:i.content.mapboxOptions?Py.toObject(i.content.mapboxOptions):null}}}};var cRe="Wettbewerbsanalyse",NO="competitors-analysis-feature",qB=class{static toDisplayString(i){let e=[cRe];return i.content.form&&e.push([$B.toDisplayString(i.content.form)]),i.content.mapViewState&&e.push(eH.toDisplayString(i.content.mapViewState)),e}static fromObject(i){return new zu(NO,{form:i.content.form?$B.fromObject(i.content.form):null,mapViewState:i.content.mapViewState?eH.fromObject(i.content.mapViewState):null})}static toObject(i){return{contentType:NO,content:{form:i.content.form?$B.toObject(i.content.form):null,mapViewState:i.content.mapViewState?eH.toObject(i.content.mapViewState):null}}}static childrenResources(i){return i.content.form?$B.childrenResources(i.content.form):{}}};var Fme=class t extends ky{static BASE_TYPES=[{specification:pf.Specification},{specification:_0.Specification},{specification:y0.Specification},{specification:_f.Specification},{specification:ug.Specification},{specification:gf.Specification},{specification:bI.Specification},{specification:cO.Specification},{specification:OA.Specification},{specification:Qv.Specification},{specification:O1.Specification}];static CODING_SYSTEM_TYPES={"ICD-10-GM":[{specification:k1.Specification},{specification:M1.Specification},{specification:DC.Specification}],OPS:[{specification:R1.Specification},{specification:P1.Specification},{specification:MC.Specification},{specification:kC.Specification}],"G-DRG":[{specification:EC.Specification},{specification:D1.Specification}]};constructor(i=Pa.EMPTY()){super("potential-analysis-filter",i)}clone(){return new t(this.expression.clone())}overrideClone(i){return new t(this.expression.overrideClone(i))}};var sst={bindoc:"BinDoc (Standardisiert)",p21:"\xA721-Daten Zuordnung"};var dRe=class t{context;field;sortOrder;displayName;static sort(i,e,n){if(!e&&!n)return 0;let r=0,o=0;switch(i.context){case"marketValue":{o=e.marketValue[i.field],r=n.marketValue[i.field];break}case"key":{o=e.key,r=n.key;break}default:r=n.virtualClinicValue[i.context][i.field],o=e.virtualClinicValue[i.context][i.field]}if(Number(r)){if(r-o!==0)switch(i.sortOrder){case"desc":return r-o;case"asc":return o-r}}else switch(i.sortOrder){case"desc":return r.toString().localeCompare(o.toString());case"asc":return o.toString().localeCompare(r.toString())}if(i.field==="count")if(n&&n.shortDisplayName)switch(i.sortOrder){case"desc":return n.shortDisplayName.localeCompare(e.shortDisplayName);case"asc":return e.shortDisplayName.localeCompare(n.shortDisplayName)}else switch(i.sortOrder){case"desc":return n.key.localeCompare(e.key);case"asc":return e.key.localeCompare(n.key)}else return this.sort(new t(i.context,"count",i.sortOrder),e,n)}constructor(i,e,n,r){this.context=i,this.field=e,this.sortOrder=n,this.displayName=r}toString(){return`${this.field}_${this.context}`}clone(){return new t(this.context,this.field,this.sortOrder,this.displayName)}},lst=new dRe("marketValue","count","desc","F\xE4lle");var Lme=class t{marketIds;marketDataYear;groupBy;codingSystem;codeMapping;baseRate;inekDataYear;virtualClinicIds;virtualClinicYear;static defaultGroupBy=[{fieldName:"administrativeDistrictId",parameters:[],sort:lst.clone()}];constructor(i,e,n,r,o,a,c,m,g){this.marketIds=i,this.marketDataYear=e,this.groupBy=n,this.codingSystem=r,this.codeMapping=o,this.baseRate=a,this.inekDataYear=c,this.virtualClinicIds=m,this.virtualClinicYear=g}clone(){let i=this.marketIds?this.marketIds.slice():null,e=this.virtualClinicIds?this.virtualClinicIds.slice():null;return new t(i,this.marketDataYear,JSON.parse(JSON.stringify(this.groupBy)),this.codingSystem,this.codeMapping,this.baseRate,this.inekDataYear,e,this.virtualClinicYear)}isValid(){let i=!!this.marketIds&&this.marketIds.length>0&&!!this.marketDataYear,e=!0;this.virtualClinicIds&&this.virtualClinicIds.length>0&&(e=e&&!!this.virtualClinicYear);let n=!!this.codingSystem;return this.codingSystem==="G-DRG"&&(n=n&&!!this.baseRate&&!!this.inekDataYear&&!!this.codeMapping),i&&e&&n}},Poa=new Lme([],MO,Lme.defaultGroupBy,"ICD-10-GM","bindoc",null,null,[],null);var FO=class t{groupBy;otherClinicsColor;virtualClinicOptions;colorFactory;potentialMapView;layerOptions;mapboxOptions;static defaultOtherClinicsColor=new ua("blue");static defaultPotentialMapView={source:"count",algorithm:"diff"};static defaultGroupBy={fieldName:"administrativeDistrictId",parameters:[]};static defaultColorFactory=new rC(new ua("red"));static defaultLayerOptions={clinics:{visible:"visible"},postalCode:{visible:"visible"},administrativeDistrictId:{visible:"visible"},clinicShare:{visible:"none"}};constructor(i,e,n,r,o,a,c){this.groupBy=i,this.otherClinicsColor=e,this.virtualClinicOptions=n,this.colorFactory=r,this.potentialMapView=o,this.layerOptions=a,this.mapboxOptions=c}clone(){let i={};return this.virtualClinicOptions&&Object.entries(this.virtualClinicOptions).forEach(([e,n])=>{i[e]={color:n.color.clone()}}),new t(this.groupBy?JSON.parse(JSON.stringify(this.groupBy)):null,this.otherClinicsColor.clone(),i,this.colorFactory?this.colorFactory.clone():void 0,this.potentialMapView?JSON.parse(JSON.stringify(this.potentialMapView)):null,this.layerOptions?JSON.parse(JSON.stringify(this.layerOptions)):null,this.mapboxOptions?JSON.parse(JSON.stringify(this.mapboxOptions)):null)}},saa=new FO(FO.defaultGroupBy,FO.defaultOtherClinicsColor,{},FO.defaultColorFactory,FO.defaultPotentialMapView,FO.defaultLayerOptions,null);var tZ=class{static fromObject(i){let e={};return Object.entries(i).forEach(([n,r])=>{e[n]={color:new ua(r.color)}}),e}static toJSON(i){let e={};return Object.entries(i).forEach(([n,r])=>{e[n]={color:r.color.toHexString()}}),e}};var Fxi="Zuordnung",cst="potential-analysis-form-mapping",tH=class{static toDisplayString(i){return[Fxi,[i.value?sst[i.value]:"Keine Zuordnung ausgew\xE4hlt"]]}static fromObject(i){return new Go(cst,i.value)}static toObject(i){return{contentType:cst,value:i.value}}};var Lxi="Jahr",dst="year",s_=class{static toDisplayString(i){return[Lxi,[i.value?i.value.toString():"Kein Jahr ausgew\xE4hlt"]]}static fromObject(i){return new Go(dst,i.value)}static toObject(i){return{contentType:dst,value:i.value}}};var Bxi="Bundesland",ust="state",iH=class{static toDisplayString(i){return[Bxi,[i.value?i.value.name:"Kein Bundesland ausgew\xE4hlt"]]}static fromObject(i){return new Go(ust,i.value)}static toObject(i){return{contentType:ust,value:i.value}}};var Vxi="Landesbasisfallwert",pst="base-rate",nH=class{static toDisplayString(i){return[Vxi,[s_.toDisplayString(i.content.year),iH.toDisplayString(i.content.state)]]}static fromObject(i){return new zu(pst,{year:s_.fromObject(i.content.year),state:iH.fromObject(i.content.state)})}static toObject(i){return{contentType:pst,content:{year:s_.toObject(i.content.year),state:iH.toObject(i.content.state)}}}};var zxi="Virtuelle Kliniken",mst="virtual-clinic-ids",rH=class{static toDisplayString(i){return[zxi,[i.value&&i.value.length>0?i.value.length+" ausgew\xE4hlt":"Keine ausgew\xE4hlt"]]}static fromObject(i){return new Go(mst,i.value)}static toObject(i){return{contentType:mst,value:i.value}}};var uRe="Formular",hst="potential-analysis-form",YB=class{static toDisplayString(i){let e=[];i.content.codingSystem&&e.push(DI.toDisplayString(i.content.codingSystem));let n=["M\xE4rkte"];i.content.marketIds&&n.push(kI.toDisplayString(i.content.marketIds)),i.content.marketYear&&n.push(s_.toDisplayString(i.content.marketYear)),e.push(n);let r=["Virtuelle Kliniken"];return i.content.virtualClinicIds&&r.push(rH.toDisplayString(i.content.virtualClinicIds)),i.content.virtualClinicYear&&r.push(s_.toDisplayString(i.content.virtualClinicYear)),e.push(r),i.content.baseRate&&e.push(nH.toDisplayString(i.content.baseRate)),i.content.inekDataYear&&e.push(["InEK Datenjahr",s_.toDisplayString(i.content.inekDataYear)]),i.content.mapping&&e.push(...tH.toDisplayString(i.content.mapping)),[uRe,e]}static fromObject(i){return new zu(hst,{codingSystem:i.content.codingSystem?DI.fromObject(i.content.codingSystem):null,marketIds:i.content.marketIds?kI.fromObject(i.content.marketIds):null,marketYear:i.content.marketYear?s_.fromObject(i.content.marketYear):null,virtualClinicIds:i.content.virtualClinicIds?rH.fromObject(i.content.virtualClinicIds):null,virtualClinicYear:i.content.virtualClinicYear?s_.fromObject(i.content.virtualClinicYear):null,baseRate:i.content.baseRate?nH.fromObject(i.content.baseRate):null,inekDataYear:i.content.inekDataYear?s_.fromObject(i.content.inekDataYear):null,mapping:i.content.mapping?tH.fromObject(i.content.mapping):null})}static toObject(i){return{contentType:hst,content:{codingSystem:i.content.codingSystem?DI.toObject(i.content.codingSystem):null,marketIds:i.content.marketIds?kI.toObject(i.content.marketIds):null,marketYear:i.content.marketYear?s_.toObject(i.content.marketYear):null,virtualClinicIds:i.content.virtualClinicIds?rH.toObject(i.content.virtualClinicIds):null,virtualClinicYear:i.content.virtualClinicYear?s_.toObject(i.content.virtualClinicYear):null,baseRate:i.content.baseRate?nH.toObject(i.content.baseRate):null,inekDataYear:i.content.inekDataYear?s_.toObject(i.content.inekDataYear):null,mapping:i.content.mapping?tH.toObject(i.content.mapping):null}}}static childrenResources(i){let e={};return i.content.marketIds&&i.content.marketIds.value&&i.content.marketIds.value.length>0&&(e=yl.merge(e,{[tn.MARKET]:i.content.marketIds.value})),i.content.virtualClinicIds&&i.content.virtualClinicIds.value&&i.content.virtualClinicIds.value.length>0&&(e=yl.merge(e,{[tn.VIRTUAL_CLINIC]:i.content.virtualClinicIds.value})),e}};var Uxi="Gruppierungen",fst="potential-groupings",oH=class{static toDisplayString(i){return[Uxi,i.value.map(e=>e.fieldName)]}static fromObject(i){return new Go(fst,i.value||[])}static toObject(i){return{contentType:fst,value:i.value}}};var Hxi="Farbe",gst="color",qA=class{static toDisplayString(i){return[Hxi,[i.value?i.value.toHexString():"Keine Farbe ausgew\xE4hlt"]]}static fromObject(i){let e=i.value?new ua(i.value):null;return new Go(gst,e)}static toObject(i){return{contentType:gst,value:i.value.toHexString()}}};var Gxi="Virtuelle Klinik Optionen",_st="potential-map-virtual-clinic-options",aH=class{static toDisplayString(i){return[Gxi,Object.keys(i.value).map((e,n)=>[`Virtuelle Klinik ${n+1}`,qA.toDisplayString(qA.fromObject({value:i.value[e].color.toHexString()}))])]}static fromObject(i){return new Go(_st,tZ.fromObject(i.value))}static toObject(i){return{contentType:_st,value:tZ.toJSON(i.value)}}};var jxi="Gruppierung",yst="potential-grouping",sH=class{static toDisplayString(i){return[jxi,[i.value.fieldName]]}static fromObject(i){return new Go(yst,i.value||[])}static toObject(i){return{contentType:yst,value:i.value}}};var $xi="Ansicht",vst="potential-map-view",lH=class{static toDisplayString(i){return[$xi,[`Werte ${i.value.source}`,`Ansicht ${i.value.algorithm}`]]}static fromObject(i){return new Go(vst,i.value||[])}static toObject(i){return{contentType:vst,value:i.value}}};var qxi="Karten-Ebenen",bst="potential-map-layer-options",cH=class{static toDisplayString(i){return[qxi,Object.keys(i.value).map(e=>`Ebene ${e} ${i.value[e].visible==="visible"?"sichtbar":"nicht sichtbar"}`)]}static fromObject(i){return new Go(bst,i.value||null)}static toObject(i){return{contentType:bst,value:i.value}}};var Yxi="Karte",Cst="potential-map-view-state",dH=class{static toDisplayString(i){let e=[];return i.content.grouping&&i.content.grouping.value&&e.push(sH.toDisplayString(i.content.grouping)),i.content.otherClinicsColor&&i.content.otherClinicsColor.value&&e.push(["Farbe f\xFCr andere Kliniken",qA.toDisplayString(i.content.otherClinicsColor)]),i.content.virtualClinicOptions&&i.content.virtualClinicOptions.value&&e.push(aH.toDisplayString(i.content.virtualClinicOptions)),i.content.colorFactory&&i.content.colorFactory.value&&e.push(AI.toDisplayString(i.content.colorFactory)),i.content.potentialMapView&&i.content.potentialMapView.value&&e.push(lH.toDisplayString(i.content.potentialMapView)),i.content.layerOptions&&i.content.layerOptions.value&&e.push(cH.toDisplayString(i.content.layerOptions)),i.content.mapboxOptions&&e.push(Py.toDisplayString(i.content.mapboxOptions)),[Yxi,e]}static fromObject(i){return _t(this,null,function*(){return new zu(Cst,{grouping:i.content.grouping?sH.fromObject(i.content.grouping):null,otherClinicsColor:i.content.otherClinicsColor?qA.fromObject(i.content.otherClinicsColor):null,virtualClinicOptions:i.content.virtualClinicOptions?aH.fromObject(i.content.virtualClinicOptions):null,colorFactory:i.content.colorFactory?AI.fromObject(i.content.colorFactory):null,potentialMapView:i.content.potentialMapView?lH.fromObject(i.content.potentialMapView):null,layerOptions:i.content.layerOptions?cH.fromObject(i.content.layerOptions):null,mapboxOptions:i.content.mapboxOptions?Py.fromObject(i.content.mapboxOptions):null})})}static toObject(i){return{contentType:Cst,content:{grouping:i.content.grouping?sH.toObject(i.content.grouping):null,otherClinicsColor:i.content.otherClinicsColor?qA.toObject(i.content.otherClinicsColor):null,virtualClinicOptions:i.content.virtualClinicOptions?aH.toObject(i.content.virtualClinicOptions):null,colorFactory:i.content.colorFactory?AI.toObject(i.content.colorFactory):null,potentialMapView:i.content.potentialMapView?lH.toObject(i.content.potentialMapView):null,layerOptions:i.content.layerOptions?cH.toObject(i.content.layerOptions):null,mapboxOptions:i.content.mapboxOptions?Py.toObject(i.content.mapboxOptions):null}}}};var Kxi="Filter",xst="potential-filter",uH=class{static toDisplayString(i){return[Kxi,[i.value&&i.value.expression?i.value.expression.toText():"Kein Filter angewendet"]]}static fromObject(i,e){return _t(this,null,function*(){let n=yield Pa.fromObject(i.value.expression,e);return new Go(xst,new Fme(n))})}static toObject(i){return{contentType:xst,value:i.value.toJSON()}}};var Wxi="Potenzialanalyse",LO="potential-analysis-feature",KB=class{static toDisplayString(i){let e=[];return i.content.form&&e.push(YB.toDisplayString(i.content.form)),i.content.groupings&&e.push(oH.toDisplayString(i.content.groupings)),i.content.map&&e.push(dH.toDisplayString(i.content.map)),i.content.filter&&e.push(uH.toDisplayString(i.content.filter)),[Wxi,e]}static fromObject(i,e){return _t(this,null,function*(){return new zu(LO,{form:i.content.form?YB.fromObject(i.content.form):null,groupings:i.content.groupings?oH.fromObject(i.content.groupings):null,map:i.content.map?yield dH.fromObject(i.content.map):null,filter:i.content.filter?yield uH.fromObject(i.content.filter,e):null})})}static toObject(i){return{contentType:LO,content:{form:i.content.form?YB.toObject(i.content.form):null,groupings:i.content.groupings?oH.toObject(i.content.groupings):null,map:i.content.map?dH.toObject(i.content.map):null,filter:i.content.filter&&i.content.filter.value?uH.toObject(i.content.filter):null}}}static childrenResources(i){let e={};return i.content.form&&(e=yl.merge(e,YB.childrenResources(i.content.form))),i.content.filter&&i.content.filter.value&&(e=yl.merge(e,i.content.filter.value.getChildResources())),e}};var Sst="Klinik",Qxi="business-case-target",Bme=class t extends zC{constructor(i){super(Qxi,Sst,i)}toDisplayString(){let i=[];return this.content.clinic&&i.push(OI.toDisplayString(this.content.clinic)),this.content.codeSpectrumSelect&&i.push(MI.toDisplayString(this.content.codeSpectrumSelect)),this.content.administrativeDistrictIds&&i.push(this.content.administrativeDistrictIds.toDisplayString()),[Sst,i]}fromObject(i){let e=i.content.clinic?OI.fromObject(i.content.clinic):null,n=i.content.codeSpectrumSelect?MI.fromObject(i.content.codeSpectrumSelect):null;return new t({clinic:e,administrativeDistrictIds:i.content.administrativeDistrictIds?new Nme(null).fromObject(i.content.administrativeDistrictIds):null,codeSpectrumSelect:n})}toObject(){return{contentType:this.contentType,content:{clinic:OI.toObject(this.content.clinic),codeSpectrumSelect:MI.toObject(this.content.codeSpectrumSelect),administrativeDistrictIds:this.content.administrativeDistrictIds.toObject()}}}};var Vme=class t extends zC{constructor(i){super("business-case-target-drgs","Klinik-DRGs",i)}fromObject(i){return new t({conversionRate:i.content.conversionRate?new Go("business-case-target-conversion-rate",i.content.conversionRate):null,drgCaseCounts:i.content.drgCaseCounts?new Go("business-case-target-drg-case-counts",i.content.drgCaseCounts.map(e=>$e(pe({},e),{drgCode:xi.fromObject(e.drgCode)}))):null})}toDisplayString(){let i=[];return this.content.conversionRate&&this.content.conversionRate.value&&i.push(`Applikationsrate von ${Ru.format(this.content.conversionRate.value,{style:"percent"})}`),this.content.drgCaseCounts&&this.content.drgCaseCounts.value&&i.push(`${this.content.drgCaseCounts.value.length} DRG Ziffern`),[this.displayName,i]}toObject(){return{contentType:this.contentType,content:{conversionRate:this.content.conversionRate.value,drgCaseCounts:this.content.drgCaseCounts.value}}}};var zme=class t extends zC{constructor(i){super("business-case-market-potential","Potenzielle DRGs",i)}fromObject(i){return new t({year:new Go("business-case-market-year",i.content.year),marketShare:new Go("business-case-market-share",i.content.marketShare),potential:new Go("business-case-market-potential-drg-case-counts",i.content.potential.map(e=>$e(pe({},e),{drgCode:xi.fromObject(e.drgCode)})))})}toDisplayString(){let i=[];return this.content.year&&this.content.year.value&&i.push(`Datenjahr ist ${this.content.year.value.toString()}`),this.content.marketShare&&this.content.marketShare.value&&i.push(`Marktanteil pro Jahr von ${Ru.format(this.content.marketShare.value,{style:"percent"})}`),this.content.potential&&this.content.potential.value&&i.push(`${this.content.potential.value.length} DRG Ziffern`),[this.displayName,i]}toObject(){return{contentType:this.contentType,content:{marketShare:this.content.marketShare.value,year:this.content.year.value,potential:this.content.potential.value.map(i=>$e(pe({},i),{drgCode:i.drgCode}))}}}};var Ume={nutzungsdauer:8,wartungskosten:154700,zinssatz:.02,weitereFixkosten:0,weitereVariableKosten:0,kapazitaetsMaximumProJahr:450,restwertFaktor:.1,patientenFaktor:.1,erloesWahlleistungArzt:1e3,erloesWahlleistungZimmerProTag:150,vwdReduzierungInTagen:0,drgCostCategoryRabattImplants:0};var BO=class t{einkaufspreis;restwert;abschreibungen;zinsen;fixkosten;nutzungsdauer;wartungskosten;zinssatz;weitereFixkosten;weitereVariableKosten;anzahlEingriffe;kapazitaetsMaximumProJahr;restwertFaktor;year;startYearExternalCases;patientenFaktor;erloesWahlleistungArzt;erloesWahlleistungZimmerProTag;vwdReduzierungInTagen;drgCostCategoryRabattImplants;constructor(i,e,n,r,o,a,c,m,g,C,w,P,R,z,H,j,K,ne,me,Te){this.einkaufspreis=i,this.restwert=e,this.abschreibungen=n,this.zinsen=r,this.fixkosten=o,this.nutzungsdauer=a,this.wartungskosten=c,this.zinssatz=m,this.weitereFixkosten=g,this.weitereVariableKosten=C,this.anzahlEingriffe=w,this.kapazitaetsMaximumProJahr=P,this.restwertFaktor=R,this.year=z,this.startYearExternalCases=H,this.patientenFaktor=j,this.erloesWahlleistungArzt=K,this.erloesWahlleistungZimmerProTag=ne,this.vwdReduzierungInTagen=me,this.drgCostCategoryRabattImplants=Te}static fromObject(i){return new t(i.einkaufspreis,i.restwert,i.abschreibungen,i.zinsen,i.fixkosten,i.nutzungsdauer,i.wartungskosten,i.zinssatz,i.weitereFixkosten,i.weitereVariableKosten,i.anzahlEingriffe,i.kapazitaetsMaximumProJahr,i.restwertFaktor,i.year,i.startYearExternalCases,i.patientenFaktor,i.erloesWahlleistungArzt,i.erloesWahlleistungZimmerProTag,i.vwdReduzierungInTagen,i.drgCostCategoryRabattImplants)}static of(i,e,n,r=NK,o=1,a=Ume){e=e||t._calculationRestwert(i,a.restwertFaktor);let c=t._calculationAbschreibungen(i,e,a.nutzungsdauer),m=t._calculationZinsen(i,e,a.zinssatz),g=t._calculationFixkosten(c,m,a.wartungskosten);return new t(i,e,c,m,g,a.nutzungsdauer,a.wartungskosten,a.zinssatz,a.weitereFixkosten,a.weitereVariableKosten,n,a.kapazitaetsMaximumProJahr,a.restwertFaktor,r,o,a.patientenFaktor,a.erloesWahlleistungArzt,a.erloesWahlleistungZimmerProTag,a.vwdReduzierungInTagen,a.drgCostCategoryRabattImplants)}static _calculationAbschreibungen(i,e,n){return+((i-e)/n).toFixed(2)}static _calculationZinsen(i,e,n){return+((i+e)/2*n).toFixed(2)}static _calculationFixkosten(i,e,n){return+(i+e+n).toFixed(2)}static _calculationRestwert(i,e){return+(i*e).toFixed(2)}updateCalculation(){this.restwert=t._calculationRestwert(this.einkaufspreis,this.restwertFaktor),this.abschreibungen=t._calculationAbschreibungen(this.einkaufspreis,this.restwert,this.nutzungsdauer),this.zinsen=t._calculationZinsen(this.einkaufspreis,this.restwert,this.zinssatz),this.fixkosten=t._calculationFixkosten(this.abschreibungen,this.zinsen,this.wartungskosten)}clone(){return new t(this.einkaufspreis,this.restwert,this.abschreibungen,this.zinsen,this.fixkosten,this.nutzungsdauer,this.wartungskosten,this.zinssatz,this.weitereFixkosten,this.weitereVariableKosten,this.anzahlEingriffe,this.kapazitaetsMaximumProJahr,this.restwertFaktor,this.year,this.startYearExternalCases,this.patientenFaktor,this.erloesWahlleistungArzt,this.erloesWahlleistungZimmerProTag,this.vwdReduzierungInTagen,this.drgCostCategoryRabattImplants)}};var WB={startYearExternalCases:1,conversionRate:1,marketShare:.25,calculation:{einkaufspreis:1677900,restwert:0,anzahlEingriffe:0}};var Hme=class t{_clinicId;_codeSpectraIds;_administrativeDistrictIds;year;startYearExternalCases;marketShare;conversionRate;config;calculation;_casesConversion=[];_casesPotential=[];constructor(i,e=[],n=[],r=MO,o=WB.startYearExternalCases,a=WB.marketShare,c=WB.conversionRate,m=Ume,g=BO.of(WB.calculation.einkaufspreis,WB.calculation.restwert,WB.calculation.anzahlEingriffe,MO,o,m)){this._clinicId=i,this._codeSpectraIds=e,this._administrativeDistrictIds=n,this.year=r,this.startYearExternalCases=o,this.marketShare=a,this.conversionRate=c,this.config=m,this.calculation=g}get administrativeDistrictIds(){return this._administrativeDistrictIds}set administrativeDistrictIds(i){this._administrativeDistrictIds=i,this._casesConversion=[],this._casesPotential=[]}get clinicId(){return this._clinicId}set clinicId(i){this._clinicId=i,this._casesConversion=[],this._casesPotential=[]}get codeSpectraIds(){return this._codeSpectraIds}set codeSpectraIds(i){this._codeSpectraIds=i,this._casesConversion=[],this._casesPotential=[]}get casesConversion(){return this._casesConversion}set casesConversion(i){this._casesConversion=i,this._casesPotential=[]}get casesPotential(){return this._casesPotential}set casesPotential(i){this._casesPotential=i,this.calculation=BO.of(1677900,0,t._calculateAnzahlEingriffe(this._casesConversion,this._casesPotential),MO,1,this.config)}static fromStorageObject(i){let e=i._administrativeDistrictIds.map(o=>io.createFromString(o.value)),n=new BO(i.calculation.einkaufspreis,i.calculation.restwert,i.calculation.abschreibungen,i.calculation.zinsen,i.calculation.fixkosten,i.calculation.nutzungsdauer,i.calculation.wartungskosten,i.calculation.zinssatz,i.calculation.weitereFixkosten,i.calculation.weitereVariableKosten,i.calculation.anzahlEingriffe,i.calculation.kapazitaetsMaximumProJahr,i.calculation.restwertFaktor,i.calculation.year,i.calculation.startYearExternalCases,i.calculation.patientenFaktor,i.calculation.erloesWahlleistungArzt,i.calculation.erloesWahlleistungZimmerProTag,i.calculation.vwdReduzierungInTagen,i.calculation.drgCostCategoryRabattImplants),r=new t(vs.fromObj(i._clinicId),i._codeSpectraIds??i._codeSpectra.map(o=>o.id),e,i.year,i.startYearExternalCases,i.marketShare,i.conversionRate,i.config,n);return r._casesConversion=i._casesConversion,r._casesPotential=i._casesPotential,r.calculation.anzahlEingriffe=t._calculateAnzahlEingriffe(r._casesConversion,r._casesPotential),r}static _calculateAnzahlEingriffe(i=[],e=[]){let n=i.map(o=>o.countConverted).reduce((o,a)=>o+a,0),r=e.map(o=>o.countPotential).reduce((o,a)=>o+a,0);return n+r}clone(){return new t(this._clinicId?.clone(),this._codeSpectraIds?[...this._codeSpectraIds]:[],this._administrativeDistrictIds?.map(i=>i.clone()),this.year,this.startYearExternalCases,this.marketShare,this.conversionRate,pe({},this.config),this.calculation.clone())}toRequestBody(){let i={},e=new Map;(this._casesPotential||[]).forEach(n=>{e.has(n.code.name)?e.set(n.code.name,$e(pe({},e.get(n.code.name)),{marketCaseCount:n.countMarket,potentialMarketCaseCount:n.countPotential})):e.set(n.code.name,{marketCaseCount:n.countMarket,ownCaseCount:0,potentialMarketCaseCount:n.countPotential,vwdReduzierungInTagen:this.calculation.vwdReduzierungInTagen})}),(this._casesConversion||[]).forEach(n=>{e.has(n.code.name)?e.set(n.code.name,$e(pe({},e.get(n.code.name)),{ownCaseCount:n.countConverted})):e.set(n.code.name,{ownCaseCount:n.countConverted,marketCaseCount:0,potentialMarketCaseCount:0,vwdReduzierungInTagen:this.calculation.vwdReduzierungInTagen})});for(let[n,r]of e.entries())i[n]=$e(pe({},r),{vwdReduzierungInTagen:this.calculation.vwdReduzierungInTagen});return{clinicId:this._clinicId,cases:i,administrativeDistrictIds:this._administrativeDistrictIds.map(n=>n.value),year:this.year,erwarteterMarktanteil:this.marketShare,steigerungsrate:this.conversionRate,startYearExternalCases:this.calculation.startYearExternalCases,einkaufspreis:this.calculation.einkaufspreis,restwert:this.calculation.restwert,wartungskosten:this.calculation.wartungskosten,nutzungsdauer:this.calculation.nutzungsdauer,abschreibungen:this.calculation.abschreibungen,kapazitaetsmaximum:this.calculation.kapazitaetsMaximumProJahr,zinssatz:this.calculation.zinssatz,zinsen:this.calculation.zinsen,weitereFixkosten:this.calculation.weitereFixkosten,weitereVariableKosten:this.calculation.weitereVariableKosten,fixkosten:this.calculation.fixkosten,erloesWahlleistungArzt:this.calculation.erloesWahlleistungArzt,erloesWahlleistungZimmerProTag:this.calculation.erloesWahlleistungZimmerProTag,privatPatientenFaktor:this.calculation.patientenFaktor,drgCostCategoryRabatt:{IMPLANTS:this.calculation.drgCostCategoryRabattImplants}}}};var Gme=class t extends zC{constructor(i){super("business-case-costs","Investitions-Parameter",i)}fromObject(i){return new t({config:new Go("business-case-costs-config",i.content.config),calculation:new Go("business-case-costs-calculation",BO.fromObject(i.content.calculation))})}toDisplayString(){return[this.displayName]}toObject(){return{contentType:this.contentType,content:{config:this.content.config.value,calculation:this.content.calculation.value}}}};var jme="Business Case",pH="business-case-feature",$me=class t extends zC{constructor(i){super(pH,jme,i)}toDisplayString(){let i=[jme];return this.content.target&&i.push(this.content.target.toDisplayString()),this.content.targetDrgCodes&&i.push(this.content.targetDrgCodes.toDisplayString()),this.content.market&&i.push(this.content.market.toDisplayString()),this.content.costs&&i.push(this.content.costs.toDisplayString()),i}fromObject(i){return new t({target:new Bme(null).fromObject(i.content.target),targetDrgCodes:new Vme(null).fromObject(i.content.targetDrgCodes),market:new zme(null).fromObject(i.content.market),costs:new Gme(null).fromObject(i.content.costs)})}toObject(){return{contentType:this.contentType,content:{target:this.content.target.toObject(),targetDrgCodes:this.content.targetDrgCodes.toObject(),market:this.content.market.toObject(),costs:this.content.costs.toObject()}}}toForm(){let i=new Hme(this.content.target.content.clinic?.value,this.content.target.content.codeSpectrumSelect?.value?.codeSpectrumIds,this.content.target.content.administrativeDistrictIds?.value,this.content.market.content.year.value,this.content.costs.content.calculation.value.startYearExternalCases,this.content.market.content.marketShare.value,this.content.targetDrgCodes.content.conversionRate?.value);return i.casesConversion=this.content.targetDrgCodes.content.drgCaseCounts?this.content.targetDrgCodes.content.drgCaseCounts.value.map(e=>({code:e.drgCode,countOriginal:e.countOriginal,countConverted:e.countConverted,count:e.countOriginal})):[],i.casesPotential=this.content.market.content.potential.value.map(e=>({code:e.drgCode,count:e.count,countMarket:e.countMarket,countPotential:e.countPotential})),i}};var YA=class{static getContentTypeDisplayName(i){switch(i){case PO:return lRe;case NO:return cRe;case LO:return uRe;case pH:return jme;default:throw new Error(`Unknown content type: ${i}`)}}static toDisplayString(i){switch(i.contentType){case PO:return jB.toDisplayString(i);case NO:return qB.toDisplayString(i);case LO:return KB.toDisplayString(i);case pH:return i.toDisplayString();default:throw new Error(`Unknown toDisplayString() for content type: ${i.contentType}`)}}static fromObject(i,e){switch(i.contentType){case PO:return jB.fromObject(i,e);case NO:return Promise.resolve(qB.fromObject(i));case LO:return Promise.resolve(KB.fromObject(i,e));case pH:return Promise.resolve(new $me(null).fromObject(i));default:throw new Error(`Unknown fromObject() for content type: ${i.contentType}`)}}static toObject(i){switch(i.contentType){case PO:return jB.toObject(i);case NO:return qB.toObject(i);case LO:return KB.toObject(i);case pH:return i.toObject();default:throw new Error(`Unknown toObject() for content type: ${i.contentType}`)}}static childrenResources(i){switch(i.contentType){case PO:return jB.childrenResources(i);case NO:return qB.childrenResources(i);case LO:return KB.childrenResources(i);default:throw new Error(`Unknown childrenResources() for content type: ${i.contentType}`)}}};var QB=class t{id;name;createdDate;modifiedDate;highestPermission;contentSnippet;static fromObject(i,e){return _t(this,null,function*(){let n=i.createdDate?new Date(i.createdDate):null,r=i.modifiedDate?new Date(i.modifiedDate):null,o=yield YA.fromObject(i.contentSnippet,e);return new t(i.id,i.name,n,r,i.highestPermission,o)})}resourceName=tn.APP_CONTENT_SNIPPET;constructor(i,e,n,r,o,a=null){this.id=i,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=o,this.contentSnippet=a}clone(...i){throw new Error("Method not implemented.")}toJSON(){return{id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,contentSnippet:YA.toObject(this.contentSnippet)}}};var qme=class{_environmentService;constructor(i){this._environmentService=i}findAll(i){let e=`${this._basePath()}/resource`;return i&&(e+=`?contentType=${i}`),e}findById(i){return`${this._basePath()}/resource/${i}`}save(){return`${this._basePath()}/resource`}_basePath(){return`${this._environmentService.load("APP_CONTENT_SNIPPET_RESOURCE_BASE_URL")}`}};var VO=(()=>{class t{_registeredFilter;_httpClient;_store;constructor(e,n,r){this._registeredFilter=e,this._httpClient=n,this._store=new qme(r)}create(e){let n=this._store.save();return this._httpClient.post(n,e.toJSON()).pipe(On(r=>QB.fromObject(r,this._registeredFilter)))}update(e){let n=this._store.save();return this._httpClient.put(n,e.toJSON()).pipe(ot(()=>null))}findAll(e,n,r=null){let o=this._store.findAll(r);return this._httpClient.get(o).pipe(On(a=>Promise.all(a.map(c=>QB.fromObject(c,this._registeredFilter)))))}findById(e){let n=this._store.findById(e);return this._httpClient.get(n).pipe(On(r=>QB.fromObject(r,this._registeredFilter)))}children(e){return this.findById(e).pipe(ot(n=>YA.childrenResources(n.contentSnippet)))}static \u0275fac=function(n){return new(n||t)(ai(Ar),ai(no),ai(xr))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Kme=t=>({$implicit:t});function Zxi(t,i){t&1&&be(0,"bd-message-empty",3)}function Xxi(t,i){t&1&&Li(0)}function Jxi(t,i){if(t&1&&(O(0,"ul",4),ie(1,Xxi,1,0,"ng-container",5),M()),t&2){let e=L(),n=Oi(3);E(),D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,Kme,e.displayData))}}function e1i(t,i){t&1&&Li(0)}function t1i(t,i){if(t&1&&ie(0,e1i,1,0,"ng-container",5),t&2){let e=L().$implicit;L();let n=Oi(5);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,Kme,e))}}function i1i(t,i){t&1&&Li(0)}function n1i(t,i){if(t&1&&ie(0,i1i,1,0,"ng-container",5),t&2){let e=L().$implicit;L();let n=Oi(7);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,Kme,e))}}function r1i(t,i){if(t&1&&yt(0,t1i,1,4,"ng-container")(1,n1i,1,4,"ng-container"),t&2){let e=i.$implicit,n=L();vt(n.isArray(e)?0:1)}}function o1i(t,i){t&1&&Li(0)}function a1i(t,i){if(t&1&&ie(0,o1i,1,0,"ng-container",5),t&2){let e=i.$implicit;L(2);let n=Oi(3);D("ngTemplateOutlet",n)("ngTemplateOutletContext",Yi(2,Kme,e))}}function s1i(t,i){if(t&1&&(O(0,"ul",6),Qo(1,a1i,1,4,"ng-container",null,ms),M()),t&2){let e=i.$implicit;E(),Zo(e)}}function l1i(t,i){if(t&1&&(O(0,"li")(1,"span",7),ee(2),M()()),t&2){let e=i.$implicit;E(2),Pt(e)}}var pRe=(()=>{class t{snippet;displayData;ngOnChanges(e){e.snippet&&(this.displayData=this.snippet?YA.toDisplayString(this.snippet):[])}isArray(e){return Array.isArray(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["app-content-snippet-display"]],inputs:{snippet:"snippet"},features:[Yt],decls:8,vars:1,consts:[["itemTpl",""],["listTpl",""],["valueTpl",""],["message","Kein Inhalt vorhanden."],[1,"list-disc"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"list-disc","ml-4"],[1,"mat-body-1"]],template:function(n,r){n&1&&(yt(0,Zxi,1,0,"bd-message-empty",3)(1,Jxi,2,4,"ul",4),ie(2,r1i,2,1,"ng-template",null,0,di)(4,s1i,3,0,"ng-template",null,1,di)(6,l1i,3,1,"ng-template",null,2,di)),n&2&&vt(r.displayData?1:0)},dependencies:[ec,Jr],encapsulation:2})}return t})();var d1i=()=>["/app-content-snippet-resources"];function u1i(t,i){if(t&1&&be(0,"app-content-snippet-display",7),t&2){let e=L();D("snippet",e.appContentSnippetResource.contentSnippet)}}var wst=(()=>{class t{_appContentSnippetResourceService;_activatedRoute;_permissionResourcesService;_router;resourceInfoMenuConfig={showDeleteButton:!0,showEditButton:!1};loading$=new hi;appContentSnippetResource;constructor(e,n,r,o){this._appContentSnippetResourceService=e,this._activatedRoute=n,this._permissionResourcesService=r,this._router=o,this._activatedRoute.params.subscribe(a=>{a.appContentSnippetResourceId&&(this.loading$.next(ni.LOADING),this._appContentSnippetResourceService.findById(a.appContentSnippetResourceId).pipe(ar(1)).subscribe(c=>{this.appContentSnippetResource=c,this.loading$.next(ni.SUCCESS)}))})}delete(){this._permissionResourcesService.archive(tn.APP_CONTENT_SNIPPET,this.appContentSnippetResource.id).pipe(ar(1)).subscribe(()=>this._router.navigate(["/app-content-snippet-resources"]))}static \u0275fac=function(n){return new(n||t)(xe(VO),xe(id),xe(Rm),xe(Ws))};static \u0275cmp=re({type:t,selectors:[["app-content-snippet-resource-details"]],decls:13,vars:7,consts:[["successTpl",""],[1,"toolbar-spacer"],[3,"deleteResource","resource","config"],[1,"bd-container"],[3,"loadItem","successTemplate"],[1,"flex","flex-row","justify-end"],["mat-button","","color","accent",3,"routerLink"],[3,"snippet"]],template:function(n,r){if(n&1){let o=qe();O(0,"bd-toolbar")(1,"span"),ee(2),M(),be(3,"span",1),O(4,"bd-resources-info-menu",2),te("deleteResource",function(){return se(o),le(r.delete())}),M()(),O(5,"div",3),be(6,"bd-loader",4),M(),O(7,"div",3)(8,"div",5)(9,"a",6),ee(10," Zur \xDCbersicht "),M()()(),ie(11,u1i,1,1,"ng-template",null,0,di)}if(n&2){let o=Oi(12);E(2),Pt(r.appContentSnippetResource==null?null:r.appContentSnippetResource.name),E(2),D("resource",r.appContentSnippetResource)("config",r.resourceInfoMenuConfig),E(2),D("loadItem",r.loading$)("successTemplate",o),E(3),D("routerLink",Vr(6,d1i))}},dependencies:[zl,O5,pRe,so,Kr,Ms,fr],styles:[".toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]})}return t})();var p1i=["mat-menu-item",""],m1i=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],h1i=["mat-icon, [matMenuItemIcon]","*"];function f1i(t,i){t&1&&(Pi(),O(0,"svg",2),be(1,"polygon",3),M())}var g1i=["*"];function _1i(t,i){if(t&1){let e=qe();vo(0,"div",0),Aee("click",function(){se(e);let r=L();return le(r.closed.emit("click"))})("animationstart",function(r){se(e);let o=L();return le(o._onAnimationStart(r.animationName))})("animationend",function(r){se(e);let o=L();return le(o._onAnimationDone(r.animationName))})("animationcancel",function(r){se(e);let o=L();return le(o._onAnimationDone(r.animationName))}),vo(1,"div",1),Sn(2),So()()}if(t&2){let e=L();Pe(e._classList),zn("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating),sa("id",e.panelId),lt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var hRe=new Mi("MAT_MENU_PANEL"),iZ=(()=>{class t{_elementRef=ae(qn);_document=ae(Gr);_focusMonitor=ae(wm);_parentMenu=ae(hRe,{optional:!0});_changeDetectorRef=ae(dn);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new Ai;_focused=new Ai;_highlighted=!1;_triggersSubmenu=!1;constructor(){ae(pc).load(gp),this._parentMenu?.addItem?.(this)}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,n):this._getHostElement().focus(n),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),n=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r{class t{_elementRef=ae(qn);_changeDetectorRef=ae(dn);_injector=ae(Ir);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=tl();_allItems;_directDescendantItems=new Uf;_classList={};_panelAnimationState="void";_animationDone=new Ai;_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 n=this._previousPanelClass,r=pe({},this._classList);n&&n.length&&n.split(" ").forEach(o=>{r[o]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(o=>{r[o]=!0}),this._elementRef.nativeElement.className=""),this._classList=r}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new ve;close=this.closed;panelId=ae(Tl).getId("mat-menu-panel-");constructor(){let e=ae(v1i);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 ew(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ks(this._directDescendantItems),On(e=>Vp(...e.map(n=>n._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let n=this._keyManager;if(this._panelAnimationState==="enter"&&n.activeItem?._hasFocus()){let r=e.toArray(),o=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[o]&&!r[o].disabled?n.setActiveItem(o):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(ks(this._directDescendantItems),On(n=>Vp(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let n=e.keyCode,r=this._keyManager;switch(n){case 27:Au(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:(n===38||n===40)&&r.setFocusOrigin("keyboard"),r.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Rd(()=>{let n=this._resolvePanel();if(!n||!n.contains(document.activeElement)){let r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&n&&n.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,n=this.yPosition){this._classList=$e(pe({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":n==="above","mat-menu-below":n==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let n=e===Wme;(n||e===mRe)&&(n&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(n?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(e){(e===mRe||e===Wme)&&(this._isAnimating=!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let n=this._resolvePanel();n&&(n.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Wme),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?mRe:Wme)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(ks(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(n=>n._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(n){return new(n||t)};static \u0275cmp=re({type:t,selectors:[["mat-menu"]],contentQueries:function(n,r,o){if(n&1&&(Vt(o,y1i,5),Vt(o,iZ,5),Vt(o,iZ,4)),n&2){let a;ze(a=Ue())&&(r.lazyContent=a.first),ze(a=Ue())&&(r._allItems=a),ze(a=Ue())&&(r.items=a)}},viewQuery:function(n,r){if(n&1&&Xi(Bl,5),n&2){let o;ze(o=Ue())&&(r.templateRef=o.first)}},hostVars:3,hostBindings:function(n,r){n&2&<("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:[Ii([{provide:hRe,useExisting:t}])],ngContentSelectors:g1i,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(n,r){n&1&&(Kn(),VT(0,_1i,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})(),C1i=new Mi("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=ae(Ir);return()=>G_(t)}});var mH=new WeakMap,x1i=(()=>{class t{_canHaveBackdrop;_element=ae(qn);_viewContainerRef=ae($l);_menuItemInstance=ae(iZ,{optional:!0,self:!0});_dir=ae(Du,{optional:!0});_focusMonitor=ae(wm);_ngZone=ae(Pn);_injector=ae(Ir);_scrollStrategy=ae(C1i);_changeDetectorRef=ae(dn);_animationsDisabled=tl();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Ia.EMPTY;_menuCloseSubscription=Ia.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(n=>{this._destroyMenu(n),(n==="click"||n==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal;constructor(e){this._canHaveBackdrop=e;let n=ae(hRe,{optional:!0});this._parentMaterialMenu=n instanceof hH?n:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&mH.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 n=this._menu;if(this._menuOpen||!n)return;this._pendingRemoval?.unsubscribe();let r=mH.get(n);mH.set(n,this),r&&r!==this&&r._closeMenu();let o=this._createOverlay(n),a=o.getConfig(),c=a.positionStrategy;this._setPosition(n,c),this._canHaveBackdrop?a.hasBackdrop=n.hasBackdrop==null?!this._triggersSubmenu():n.hasBackdrop:a.hasBackdrop=!1,o.hasAttached()||(o.attach(this._getPortal(n)),n.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),n.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,e&&n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),n instanceof hH&&(n._setIsOpen(!0),n._directDescendantItems.changes.pipe(ha(n.close)).subscribe(()=>{c.withLockedPosition(!1).reapplyLastPosition(),c.withLockedPosition(!0)}))}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}_destroyMenu(e){let n=this._overlayRef,r=this._menu;!n||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),r instanceof hH&&this._ownsMenu(r)?(this._pendingRemoval=r._animationDone.pipe(ar(1)).subscribe(()=>{n.detach(),mH.has(r)||r.lazyContent?.detach()}),r._setIsOpen(!1)):(n.detach(),r?.lazyContent?.detach()),r&&this._ownsMenu(r)&&mH.delete(r),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 n=this._getOverlayConfig(e);this._subscribeToPositions(e,n.positionStrategy),this._overlayRef=Bb(this._injector,n),this._overlayRef.keydownEvents().subscribe(r=>{this._menu instanceof hH&&this._menu._handleKeydown(r)})}return this._overlayRef}_getOverlayConfig(e){return new Lb({positionStrategy:Vk(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,n){e.setPositionClasses&&n.positionChanges.subscribe(r=>{this._ngZone.run(()=>{let o=r.connectionPair.overlayX==="start"?"after":"before",a=r.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(o,a)})})}_setPosition(e,n){let[r,o]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[m,g]=[a,c],[C,w]=[r,o],P=0;if(this._triggersSubmenu()){if(w=r=e.xPosition==="before"?"start":"end",o=C=r==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let R=this._parentMaterialMenu.items.first;this._parentInnerPadding=R?R._getHostElement().offsetTop:0}P=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(m=a==="top"?"bottom":"top",g=c==="top"?"bottom":"top");n.withPositions([{originX:r,originY:m,overlayX:C,overlayY:a,offsetY:P},{originX:o,originY:m,overlayX:w,overlayY:a,offsetY:P},{originX:r,originY:g,overlayX:C,overlayY:c,offsetY:-P},{originX:o,originY:g,overlayX:w,overlayY:c,offsetY:-P}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),n=this._overlayRef.detachments(),r=this._parentMaterialMenu?this._parentMaterialMenu.closed:$t(),o=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(vn(a=>this._menuOpen&&a!==this._menuItemInstance)):$t();return Vp(e,r,o,n)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Yh(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return mH.get(e)===this}static \u0275fac=function(n){Ij()};static \u0275dir=hn({type:t})}return t})(),Ist=(()=>{class t extends x1i{_cleanupTouchstart;_hoverSubscription=Ia.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=ae(Ma);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",n=>{EP(n)||(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){TP(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let n=e.keyCode;(n===13||n===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(n===39&&this.dir==="ltr"||n===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(n){return new(n||t)};static \u0275dir=hn({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,r){n&1&&te("click",function(a){return r._handleClick(a)})("mousedown",function(a){return r._handleMousedown(a)})("keydown",function(a){return r._handleKeydown(a)}),n&2&<("aria-haspopup",r.menu?"menu":null)("aria-expanded",r.menuOpen)("aria-controls",r.menuOpen?r.menu==null?null:r.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:[Tt]})}return t})();var Tst={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:{}}},mua=Tst.fadeInItems,hua=Tst.transformMenu;var S1i=()=>[25,50,100],w1i=()=>["name","labels","modifiedDate"];function I1i(t,i){if(t&1){let e=qe();O(0,"div")(1,"mat-form-field")(2,"input",9),te("input",function(r){se(e),L();let o=Oi(1);return le(o.filterGlobal(r.target.value,"contains"))}),M()()()}}function T1i(t,i){t&1&&(O(0,"tr")(1,"th",10),ee(2," Name "),be(3,"p-sortIcon",11),M(),O(4,"th",12),ee(5," Letzte \xC4nderung "),be(6,"p-sortIcon",13),M(),O(7,"th",14),ee(8,"Link"),M(),be(9,"th",14),M())}function E1i(t,i){if(t&1){let e=qe();O(0,"tr",15)(1,"td"),ee(2),M(),O(3,"td"),ee(4),Dr(5,"date"),M(),O(6,"td",14)(7,"button",16),te("click",function(){let r=se(e).$implicit,o=L(2);return le(o.onRowSelect(r))}),O(8,"mat-icon"),ee(9,"open_in_new"),M()()(),O(10,"td",14)(11,"button",17)(12,"mat-icon"),ee(13,"more_vert"),M()(),O(14,"mat-menu",null,2)(16,"button",18),te("click",function(){let r=se(e).$implicit,o=L(2);return le(o.onArchive(r))}),ee(17," L\xF6schen "),M()()()()}if(t&2){let e=i.$implicit,n=Oi(15);D("pSelectableRow",e),E(2),Pt(e.name),E(2),Pt(gl(5,4,e.modifiedDate,"short")),E(7),D("matMenuTriggerFor",n)}}function A1i(t,i){t&1&&(O(0,"tr")(1,"td",19),ee(2,"Keine Eintr\xE4ge vorhanden"),M()())}function D1i(t,i){if(t&1){let e=qe();O(0,"p-table",4,1),te("selectionChange",function(r){se(e);let o=L();return le(o.onRowSelect(r))}),ie(2,I1i,3,0,"ng-template",5)(3,T1i,10,0,"ng-template",6)(4,E1i,18,7,"ng-template",7)(5,A1i,3,0,"ng-template",8),M()}if(t&2){let e=L();D("value",e.appContentSnippetResources)("paginator",!0)("rows",25)("sortField","modifiedDate")("sortOrder",-1)("rowsPerPageOptions",Vr(7,S1i))("globalFilterFields",Vr(8,w1i))}}var Est=(()=>{class t{_appContentSnippetResourceService;_permissionService;contentType;loading$=new Sa(ni.INIT);appContentSnippetResourceSelect=new ve;appContentSnippetResources;constructor(e,n){this._appContentSnippetResourceService=e,this._permissionService=n}ngOnInit(){this.loading$.next(ni.LOADING),this._appContentSnippetResourceService.findAll(void 0,void 0,this.contentType).subscribe(e=>{this.appContentSnippetResources=e,this.loading$.next(ni.SUCCESS)})}onRowSelect(e){this.appContentSnippetResourceSelect.emit(e)}onArchive(e){this.loading$.next(ni.LOADING),this._permissionService.archive(e.resourceName,e.id).subscribe(()=>this.ngOnInit())}static \u0275fac=function(n){return new(n||t)(xe(VO),xe(Rm))};static \u0275cmp=re({type:t,selectors:[["app-content-snippet-resource-list"]],inputs:{contentType:"contentType"},outputs:{appContentSnippetResourceSelect:"appContentSnippetResourceSelect"},decls:3,vars:2,consts:[["successTpl",""],["resourcesTable",""],["menu","matMenu"],[3,"loadItem","successTemplate"],["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","Suchen",3,"input"],["pSortableColumn","name"],["field","name"],["pSortableColumn","modifiedDate"],["field","modifiedDate"],[1,"w-12"],[3,"pSelectableRow"],["mat-icon-button","","color","accent",3,"click"],["mat-icon-button","","aria-label","button with a menu",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["colspan","4"]],template:function(n,r){if(n&1&&(be(0,"bd-loader",3),ie(1,D1i,6,9,"ng-template",null,0,di)),n&2){let o=Oi(2);D("loadItem",r.loading$)("successTemplate",o)}},dependencies:[so,il,mc,Oa,da,zr,hc,zs,Td,rc,Tr,aC,nae,sC,hH,iZ,Ist,fr,Hp],encapsulation:2})}return t})();var k1i=[{path:"",pathMatch:"full",component:Est,canActivate:[Rc],data:{pageTitle:bu.title("App Snippets")}},{path:":appContentSnippetResourceId",component:wst,canActivate:[Rc],data:{pageTitle:bu.title("App Snippets")}}],Hua=Yf.forChild(k1i);var M1i=[{provide:x8,useFactory:()=>{let t=new Fue,i=new Lue;return $e(pe({},t),{sourceMapping:pe(pe({},t.sourceMapping),i.sourceMapping),layerMapping:pe(pe({},t.layerMapping),i.layerMapping)})}},qrt(),$rt(),pot(),{provide:Ar,useValue:{filterType:SQ.type,filterConditionId:Cae,filterConditionPluginSpecification:SQ,filterConditionComponent:null},multi:!0}];fot(yXe,_Xe).then(t=>{zye(gXe,{providers:[...yot(),bat(vat),...Uje(t),..._at({routes:Aat}),got(t),Q9e(t),...Dat,...kat,...Mat,...Oat,...Rat,...Pat,...Nat,...Fat,...Lat,...Bat,...Vat,{provide:gc,useValue:{resourceName:tn.APP_CONTENT_SNIPPET,resourceService:VO},multi:!0},...M1i]})}).catch(t=>console.error("Error",t));