import{a as ve,b as gt,c as M2,d as Lp,e as mu,f as Wu,g as fu,h as a7,i as tt}from"./chunk-J4ERDEQQ.js";var bfe=mu((vfe,ZW)=>{"use strict";(function(t){typeof vfe=="object"&&typeof ZW<"u"?ZW.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return(function t(n,e,i){function o(p,f){if(!e[p]){if(!n[p]){var x=typeof M2=="function"&&M2;if(!f&&x)return x(p,!0);if(r)return r(p,!0);var I=new Error("Cannot find module '"+p+"'");throw I.code="MODULE_NOT_FOUND",I}var D=e[p]={exports:{}};n[p][0].call(D.exports,function(P){var R=n[p][1][P];return o(R||P)},D,D.exports,t,n,e,i)}return e[p].exports}for(var r=typeof M2=="function"&&M2,a=0;a>2,D=(3&p)<<4|f>>4,P=1>6:64,R=2>4,f=(15&I)<<4|(D=r.indexOf(a.charAt(R++)))>>2,x=(3&D)<<6|(P=r.indexOf(a.charAt(R++))),W[j++]=p,D!==64&&(W[j++]=f),P!==64&&(W[j++]=x);return W}},{"./support":30,"./utils":32}],2:[function(t,n,e){"use strict";var i=t("./external"),o=t("./stream/DataWorker"),r=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function p(f,x,I,D,P){this.compressedSize=f,this.uncompressedSize=x,this.crc32=I,this.compression=D,this.compressedContent=P}p.prototype={getContentWorker:function(){var f=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),x=this;return f.on("end",function(){if(this.streamInfo.data_length!==x.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},p.createWorkerFrom=function(f,x,I){return f.pipe(new r).pipe(new a("uncompressedSize")).pipe(x.compressWorker(I)).pipe(new a("compressedSize")).withStreamInfo("compression",x)},n.exports=p},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,e){"use strict";var i=t("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},e.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,e){"use strict";var i=t("./utils"),o=(function(){for(var r,a=[],p=0;p<256;p++){r=p;for(var f=0;f<8;f++)r=1&r?3988292384^r>>>1:r>>>1;a[p]=r}return a})();n.exports=function(r,a){return r!==void 0&&r.length?i.getTypeOf(r)!=="string"?(function(p,f,x,I){var D=o,P=I+x;p^=-1;for(var R=I;R>>8^D[255&(p^f[R])];return-1^p})(0|a,r,r.length,0):(function(p,f,x,I){var D=o,P=I+x;p^=-1;for(var R=I;R>>8^D[255&(p^f.charCodeAt(R))];return-1^p})(0|a,r,r.length,0):0}},{"./utils":32}],5:[function(t,n,e){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(t,n,e){"use strict";var i=null;i=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:i}},{lie:37}],7:[function(t,n,e){"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),r=t("./utils"),a=t("./stream/GenericWorker"),p=i?"uint8array":"array";function f(x,I){a.call(this,"FlateWorker/"+x),this._pako=null,this._pakoAction=x,this._pakoOptions=I,this.meta={}}e.magic="\b\0",r.inherits(f,a),f.prototype.processChunk=function(x){this.meta=x.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(p,x.data),!1)},f.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var x=this;this._pako.onData=function(I){x.push({data:I,meta:x.meta})}},e.compressWorker=function(x){return new f("Deflate",x)},e.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,e){"use strict";function i(D,P){var R,j="";for(R=0;R>>=8;return j}function o(D,P,R,j,$,W){var Q,se,ge=D.file,Re=D.compression,Se=W!==p.utf8encode,fe=r.transformTo("string",W(ge.name)),be=r.transformTo("string",p.utf8encode(ge.name)),je=ge.comment,st=r.transformTo("string",W(je)),Fe=r.transformTo("string",p.utf8encode(je)),ht=be.length!==ge.name.length,ue=Fe.length!==je.length,Pt="",ki="",zt="",Bi=ge.dir,qt=ge.date,en={crc32:0,compressedSize:0,uncompressedSize:0};P&&!R||(en.crc32=D.crc32,en.compressedSize=D.compressedSize,en.uncompressedSize=D.uncompressedSize);var _t=0;P&&(_t|=8),Se||!ht&&!ue||(_t|=2048);var St=0,Ei=0;Bi&&(St|=16),$==="UNIX"?(Ei=798,St|=(function(zi,vn){var Gn=zi;return zi||(Gn=vn?16893:33204),(65535&Gn)<<16})(ge.unixPermissions,Bi)):(Ei=20,St|=(function(zi){return 63&(zi||0)})(ge.dosPermissions)),Q=qt.getUTCHours(),Q<<=6,Q|=qt.getUTCMinutes(),Q<<=5,Q|=qt.getUTCSeconds()/2,se=qt.getUTCFullYear()-1980,se<<=4,se|=qt.getUTCMonth()+1,se<<=5,se|=qt.getUTCDate(),ht&&(ki=i(1,1)+i(f(fe),4)+be,Pt+="up"+i(ki.length,2)+ki),ue&&(zt=i(1,1)+i(f(st),4)+Fe,Pt+="uc"+i(zt.length,2)+zt);var qi="";return qi+=` \0`,qi+=i(_t,2),qi+=Re.magic,qi+=i(Q,2),qi+=i(se,2),qi+=i(en.crc32,4),qi+=i(en.compressedSize,4),qi+=i(en.uncompressedSize,4),qi+=i(fe.length,2),qi+=i(Pt.length,2),{fileRecord:x.LOCAL_FILE_HEADER+qi+fe+Pt,dirRecord:x.CENTRAL_FILE_HEADER+i(Ei,2)+qi+i(st.length,2)+"\0\0\0\0"+i(St,4)+i(j,4)+fe+Pt+st}}var r=t("../utils"),a=t("../stream/GenericWorker"),p=t("../utf8"),f=t("../crc32"),x=t("../signature");function I(D,P,R,j){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=P,this.zipPlatform=R,this.encodeFileName=j,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(I,a),I.prototype.push=function(D){var P=D.meta.percent||0,R=this.entriesCount,j=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,a.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:R?(P+100*(R-j-1))/R:100}}))},I.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var P=this.streamFiles&&!D.file.dir;if(P){var R=o(D,P,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:R.fileRecord,meta:{percent:0}})}else this.accumulate=!0},I.prototype.closedSource=function(D){this.accumulate=!1;var P=this.streamFiles&&!D.file.dir,R=o(D,P,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(R.dirRecord),P)this.push({data:(function(j){return x.DATA_DESCRIPTOR+i(j.crc32,4)+i(j.compressedSize,4)+i(j.uncompressedSize,4)})(D),meta:{percent:100}});else for(this.push({data:R.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},I.prototype.flush=function(){for(var D=this.bytesWritten,P=0;P=this.index;a--)p=(p<<8)+this.byteAt(a);return this.index+=r,p},readString:function(r){return i.transformTo("string",this.readData(r))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var r=this.readInt(4);return new Date(Date.UTC(1980+(r>>25&127),(r>>21&15)-1,r>>16&31,r>>11&31,r>>5&63,(31&r)<<1))}},n.exports=o},{"../utils":32}],19:[function(t,n,e){"use strict";var i=t("./Uint8ArrayReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.readData=function(r){this.checkOffset(r);var a=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,a},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,e){"use strict";var i=t("./DataReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.byteAt=function(r){return this.data.charCodeAt(this.zero+r)},o.prototype.lastIndexOfSignature=function(r){return this.data.lastIndexOf(r)-this.zero},o.prototype.readAndCheckSignature=function(r){return r===this.readData(4)},o.prototype.readData=function(r){this.checkOffset(r);var a=this.data.slice(this.zero+this.index,this.zero+this.index+r);return this.index+=r,a},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,n,e){"use strict";var i=t("./ArrayReader");function o(r){i.call(this,r)}t("../utils").inherits(o,i),o.prototype.readData=function(r){if(this.checkOffset(r),r===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+r);return this.index+=r,a},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,e){"use strict";var i=t("../utils"),o=t("../support"),r=t("./ArrayReader"),a=t("./StringReader"),p=t("./NodeBufferReader"),f=t("./Uint8ArrayReader");n.exports=function(x){var I=i.getTypeOf(x);return i.checkSupport(I),I!=="string"||o.uint8array?I==="nodebuffer"?new p(x):o.uint8array?new f(i.transformTo("uint8array",x)):new r(i.transformTo("array",x)):new a(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,e){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,e){"use strict";var i=t("./GenericWorker"),o=t("../utils");function r(a){i.call(this,"ConvertWorker to "+a),this.destType=a}o.inherits(r,i),r.prototype.processChunk=function(a){this.push({data:o.transformTo(this.destType,a.data),meta:a.meta})},n.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,e){"use strict";var i=t("./GenericWorker"),o=t("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(r,i),r.prototype.processChunk=function(a){this.streamInfo.crc32=o(a.data,this.streamInfo.crc32||0),this.push(a)},n.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(a){o.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}i.inherits(r,o),r.prototype.processChunk=function(a){if(a){var p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+a.data.length}o.prototype.processChunk.call(this,a)},n.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./GenericWorker");function r(a){o.call(this,"DataWorker");var p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(f){p.dataIsReady=!0,p.data=f,p.max=f&&f.length||0,p.type=i.getTypeOf(f),p.isPaused||p._tickAndRepeat()},function(f){p.error(f)})}i.inherits(r,o),r.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,p=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,p);break;case"uint8array":a=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":a=this.data.slice(this.index,p)}return this.index=p,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,e){"use strict";function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,r){return this._listeners[o].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,r){if(this._listeners[o])for(var a=0;a "+o:o}},n.exports=i},{}],29:[function(t,n,e){"use strict";var i=t("../utils"),o=t("./ConvertWorker"),r=t("./GenericWorker"),a=t("../base64"),p=t("../support"),f=t("../external"),x=null;if(p.nodestream)try{x=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function I(P,R){return new f.Promise(function(j,$){var W=[],Q=P._internalType,se=P._outputType,ge=P._mimeType;P.on("data",function(Re,Se){W.push(Re),R&&R(Se)}).on("error",function(Re){W=[],$(Re)}).on("end",function(){try{var Re=(function(Se,fe,be){switch(Se){case"blob":return i.newBlob(i.transformTo("arraybuffer",fe),be);case"base64":return a.encode(fe);default:return i.transformTo(Se,fe)}})(se,(function(Se,fe){var be,je=0,st=null,Fe=0;for(be=0;be"u")e.blob=!1;else{var i=new ArrayBuffer(0);try{e.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),e.blob=o.getBlob("application/zip").size===0}catch{e.blob=!1}}}try{e.nodestream=!!t("readable-stream").Readable}catch{e.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,e){"use strict";for(var i=t("./utils"),o=t("./support"),r=t("./nodejsUtils"),a=t("./stream/GenericWorker"),p=new Array(256),f=0;f<256;f++)p[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;p[254]=p[254]=1;function x(){a.call(this,"utf-8 decode"),this.leftOver=null}function I(){a.call(this,"utf-8 encode")}e.utf8encode=function(D){return o.nodebuffer?r.newBufferFrom(D,"utf-8"):(function(P){var R,j,$,W,Q,se=P.length,ge=0;for(W=0;W>>6:(j<65536?R[Q++]=224|j>>>12:(R[Q++]=240|j>>>18,R[Q++]=128|j>>>12&63),R[Q++]=128|j>>>6&63),R[Q++]=128|63&j);return R})(D)},e.utf8decode=function(D){return o.nodebuffer?i.transformTo("nodebuffer",D).toString("utf-8"):(function(P){var R,j,$,W,Q=P.length,se=new Array(2*Q);for(R=j=0;R>10&1023,se[j++]=56320|1023&$)}return se.length!==j&&(se.subarray?se=se.subarray(0,j):se.length=j),i.applyFromCharCode(se)})(D=i.transformTo(o.uint8array?"uint8array":"array",D))},i.inherits(x,a),x.prototype.processChunk=function(D){var P=i.transformTo(o.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(o.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 j=(function(W,Q){var se;for((Q=Q||W.length)>W.length&&(Q=W.length),se=Q-1;0<=se&&(192&W[se])==128;)se--;return se<0||se===0?Q:se+p[W[se]]>Q?se:Q})(P),$=P;j!==P.length&&(o.uint8array?($=P.subarray(0,j),this.leftOver=P.subarray(j,P.length)):($=P.slice(0,j),this.leftOver=P.slice(j,P.length))),this.push({data:e.utf8decode($),meta:D.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=x,i.inherits(I,a),I.prototype.processChunk=function(D){this.push({data:e.utf8encode(D.data),meta:D.meta})},e.Utf8EncodeWorker=I},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,e){"use strict";var i=t("./support"),o=t("./base64"),r=t("./nodejsUtils"),a=t("./external");function p(R){return R}function f(R,j){for(var $=0;$>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var P,R,j,$=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<$;)P=D.readInt(2),R=D.readInt(2),j=D.readData(R),this.extraFields[P]={id:P,length:R,value:j};D.setIndex($)},handleUTF8:function(){var D=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=p.utf8decode(this.fileName),this.fileCommentStr=p.utf8decode(this.fileComment);else{var P=this.findExtraFieldUnicodePath();if(P!==null)this.fileNameStr=P;else{var R=o.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(R)}var j=this.findExtraFieldUnicodeComment();if(j!==null)this.fileCommentStr=j;else{var $=o.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName($)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var P=i(D.value);return P.readInt(1)!==1||a(this.fileName)!==P.readInt(4)?null:p.utf8decode(P.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var P=i(D.value);return P.readInt(1)!==1||a(this.fileComment)!==P.readInt(4)?null:p.utf8decode(P.readData(D.length-5))}return null}},n.exports=I},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,e){"use strict";function i(P,R,j){this.name=P,this.dir=j.dir,this.date=j.date,this.comment=j.comment,this.unixPermissions=j.unixPermissions,this.dosPermissions=j.dosPermissions,this._data=R,this._dataBinary=j.binary,this.options={compression:j.compression,compressionOptions:j.compressionOptions}}var o=t("./stream/StreamHelper"),r=t("./stream/DataWorker"),a=t("./utf8"),p=t("./compressedObject"),f=t("./stream/GenericWorker");i.prototype={internalStream:function(P){var R=null,j="string";try{if(!P)throw new Error("No output type specified.");var $=(j=P.toLowerCase())==="string"||j==="text";j!=="binarystring"&&j!=="text"||(j="string"),R=this._decompressWorker();var W=!this._dataBinary;W&&!$&&(R=R.pipe(new a.Utf8EncodeWorker)),!W&&$&&(R=R.pipe(new a.Utf8DecodeWorker))}catch(Q){(R=new f("error")).error(Q)}return new o(R,j,"")},async:function(P,R){return this.internalStream(P).accumulate(R)},nodeStream:function(P,R){return this.internalStream(P||"nodebuffer").toNodejsStream(R)},_compressWorker:function(P,R){if(this._data instanceof p&&this._data.compression.magic===P.magic)return this._data.getCompressedWorker();var j=this._decompressWorker();return this._dataBinary||(j=j.pipe(new a.Utf8EncodeWorker)),p.createWorkerFrom(j,P,R)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof f?this._data:new r(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],I=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D>>6:(D<65536?I[j++]=224|D>>>12:(I[j++]=240|D>>>18,I[j++]=128|D>>>12&63),I[j++]=128|D>>>6&63),I[j++]=128|63&D);return I},e.buf2binstring=function(x){return f(x,x.length)},e.binstring2buf=function(x){for(var I=new i.Buf8(x.length),D=0,P=I.length;D>10&1023,W[P++]=56320|1023&R)}return f(W,P)},e.utf8border=function(x,I){var D;for((I=I||x.length)>x.length&&(I=x.length),D=I-1;0<=D&&(192&x[D])==128;)D--;return D<0||D===0?I:D+a[x[D]]>I?D:I}},{"./common":41}],43:[function(t,n,e){"use strict";n.exports=function(i,o,r,a){for(var p=65535&i|0,f=i>>>16&65535|0,x=0;r!==0;){for(r-=x=2e3>>1:o>>>1;r[a]=o}return r})();n.exports=function(o,r,a,p){var f=i,x=p+a;o^=-1;for(var I=p;I>>8^f[255&(o^r[I])];return-1^o}},{}],46:[function(t,n,e){"use strict";var i,o=t("../utils/common"),r=t("./trees"),a=t("./adler32"),p=t("./crc32"),f=t("./messages"),x=0,I=4,D=0,P=-2,R=-1,j=4,$=2,W=8,Q=9,se=286,ge=30,Re=19,Se=2*se+1,fe=15,be=3,je=258,st=je+be+1,Fe=42,ht=113,ue=1,Pt=2,ki=3,zt=4;function Bi(pe,Qt){return pe.msg=f[Qt],Qt}function qt(pe){return(pe<<1)-(4pe.avail_out&&(Wt=pe.avail_out),Wt!==0&&(o.arraySet(pe.output,Qt.pending_buf,Qt.pending_out,Wt,pe.next_out),pe.next_out+=Wt,Qt.pending_out+=Wt,pe.total_out+=Wt,pe.avail_out-=Wt,Qt.pending-=Wt,Qt.pending===0&&(Qt.pending_out=0))}function St(pe,Qt){r._tr_flush_block(pe,0<=pe.block_start?pe.block_start:-1,pe.strstart-pe.block_start,Qt),pe.block_start=pe.strstart,_t(pe.strm)}function Ei(pe,Qt){pe.pending_buf[pe.pending++]=Qt}function qi(pe,Qt){pe.pending_buf[pe.pending++]=Qt>>>8&255,pe.pending_buf[pe.pending++]=255&Qt}function zi(pe,Qt){var Wt,at,Ze=pe.max_chain_length,Dt=pe.strstart,Si=pe.prev_length,Li=pe.nice_match,Zt=pe.strstart>pe.w_size-st?pe.strstart-(pe.w_size-st):0,sn=pe.window,bn=pe.w_mask,nn=pe.prev,Sn=pe.strstart+je,Fo=sn[Dt+Si-1],Yo=sn[Dt+Si];pe.prev_length>=pe.good_match&&(Ze>>=2),Li>pe.lookahead&&(Li=pe.lookahead);do if(sn[(Wt=Qt)+Si]===Yo&&sn[Wt+Si-1]===Fo&&sn[Wt]===sn[Dt]&&sn[++Wt]===sn[Dt+1]){Dt+=2,Wt++;do;while(sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&sn[++Dt]===sn[++Wt]&&DtZt&&--Ze!=0);return Si<=pe.lookahead?Si:pe.lookahead}function vn(pe){var Qt,Wt,at,Ze,Dt,Si,Li,Zt,sn,bn,nn=pe.w_size;do{if(Ze=pe.window_size-pe.lookahead-pe.strstart,pe.strstart>=nn+(nn-st)){for(o.arraySet(pe.window,pe.window,nn,nn,0),pe.match_start-=nn,pe.strstart-=nn,pe.block_start-=nn,Qt=Wt=pe.hash_size;at=pe.head[--Qt],pe.head[Qt]=nn<=at?at-nn:0,--Wt;);for(Qt=Wt=nn;at=pe.prev[--Qt],pe.prev[Qt]=nn<=at?at-nn:0,--Wt;);Ze+=nn}if(pe.strm.avail_in===0)break;if(Si=pe.strm,Li=pe.window,Zt=pe.strstart+pe.lookahead,sn=Ze,bn=void 0,bn=Si.avail_in,sn=be)for(Dt=pe.strstart-pe.insert,pe.ins_h=pe.window[Dt],pe.ins_h=(pe.ins_h<=be&&(pe.ins_h=(pe.ins_h<=be)if(at=r._tr_tally(pe,pe.strstart-pe.match_start,pe.match_length-be),pe.lookahead-=pe.match_length,pe.match_length<=pe.max_lazy_match&&pe.lookahead>=be){for(pe.match_length--;pe.strstart++,pe.ins_h=(pe.ins_h<=be&&(pe.ins_h=(pe.ins_h<=be&&pe.match_length<=pe.prev_length){for(Ze=pe.strstart+pe.lookahead-be,at=r._tr_tally(pe,pe.strstart-1-pe.prev_match,pe.prev_length-be),pe.lookahead-=pe.prev_length-1,pe.prev_length-=2;++pe.strstart<=Ze&&(pe.ins_h=(pe.ins_h<pe.pending_buf_size-5&&(Wt=pe.pending_buf_size-5);;){if(pe.lookahead<=1){if(vn(pe),pe.lookahead===0&&Qt===x)return ue;if(pe.lookahead===0)break}pe.strstart+=pe.lookahead,pe.lookahead=0;var at=pe.block_start+Wt;if((pe.strstart===0||pe.strstart>=at)&&(pe.lookahead=pe.strstart-at,pe.strstart=at,St(pe,!1),pe.strm.avail_out===0)||pe.strstart-pe.block_start>=pe.w_size-st&&(St(pe,!1),pe.strm.avail_out===0))return ue}return pe.insert=0,Qt===I?(St(pe,!0),pe.strm.avail_out===0?ki:zt):(pe.strstart>pe.block_start&&(St(pe,!1),pe.strm.avail_out),ue)}),new An(4,4,8,4,Gn),new An(4,5,16,8,Gn),new An(4,6,32,32,Gn),new An(4,4,16,16,Wi),new An(8,16,32,32,Wi),new An(8,16,128,128,Wi),new An(8,32,128,256,Wi),new An(32,128,258,1024,Wi),new An(32,258,258,4096,Wi)],e.deflateInit=function(pe,Qt){return gr(pe,Qt,W,15,8,0)},e.deflateInit2=gr,e.deflateReset=Lo,e.deflateResetKeep=Fn,e.deflateSetHeader=function(pe,Qt){return pe&&pe.state?pe.state.wrap!==2?P:(pe.state.gzhead=Qt,D):P},e.deflate=function(pe,Qt){var Wt,at,Ze,Dt;if(!pe||!pe.state||5>8&255),Ei(at,at.gzhead.time>>16&255),Ei(at,at.gzhead.time>>24&255),Ei(at,at.level===9?2:2<=at.strategy||at.level<2?4:0),Ei(at,255&at.gzhead.os),at.gzhead.extra&&at.gzhead.extra.length&&(Ei(at,255&at.gzhead.extra.length),Ei(at,at.gzhead.extra.length>>8&255)),at.gzhead.hcrc&&(pe.adler=p(pe.adler,at.pending_buf,at.pending,0)),at.gzindex=0,at.status=69):(Ei(at,0),Ei(at,0),Ei(at,0),Ei(at,0),Ei(at,0),Ei(at,at.level===9?2:2<=at.strategy||at.level<2?4:0),Ei(at,3),at.status=ht);else{var Si=W+(at.w_bits-8<<4)<<8;Si|=(2<=at.strategy||at.level<2?0:at.level<6?1:at.level===6?2:3)<<6,at.strstart!==0&&(Si|=32),Si+=31-Si%31,at.status=ht,qi(at,Si),at.strstart!==0&&(qi(at,pe.adler>>>16),qi(at,65535&pe.adler)),pe.adler=1}if(at.status===69)if(at.gzhead.extra){for(Ze=at.pending;at.gzindex<(65535&at.gzhead.extra.length)&&(at.pending!==at.pending_buf_size||(at.gzhead.hcrc&&at.pending>Ze&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),_t(pe),Ze=at.pending,at.pending!==at.pending_buf_size));)Ei(at,255&at.gzhead.extra[at.gzindex]),at.gzindex++;at.gzhead.hcrc&&at.pending>Ze&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),at.gzindex===at.gzhead.extra.length&&(at.gzindex=0,at.status=73)}else at.status=73;if(at.status===73)if(at.gzhead.name){Ze=at.pending;do{if(at.pending===at.pending_buf_size&&(at.gzhead.hcrc&&at.pending>Ze&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),_t(pe),Ze=at.pending,at.pending===at.pending_buf_size)){Dt=1;break}Dt=at.gzindexZe&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),Dt===0&&(at.gzindex=0,at.status=91)}else at.status=91;if(at.status===91)if(at.gzhead.comment){Ze=at.pending;do{if(at.pending===at.pending_buf_size&&(at.gzhead.hcrc&&at.pending>Ze&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),_t(pe),Ze=at.pending,at.pending===at.pending_buf_size)){Dt=1;break}Dt=at.gzindexZe&&(pe.adler=p(pe.adler,at.pending_buf,at.pending-Ze,Ze)),Dt===0&&(at.status=103)}else at.status=103;if(at.status===103&&(at.gzhead.hcrc?(at.pending+2>at.pending_buf_size&&_t(pe),at.pending+2<=at.pending_buf_size&&(Ei(at,255&pe.adler),Ei(at,pe.adler>>8&255),pe.adler=0,at.status=ht)):at.status=ht),at.pending!==0){if(_t(pe),pe.avail_out===0)return at.last_flush=-1,D}else if(pe.avail_in===0&&qt(Qt)<=qt(Wt)&&Qt!==I)return Bi(pe,-5);if(at.status===666&&pe.avail_in!==0)return Bi(pe,-5);if(pe.avail_in!==0||at.lookahead!==0||Qt!==x&&at.status!==666){var Li=at.strategy===2?(function(Zt,sn){for(var bn;;){if(Zt.lookahead===0&&(vn(Zt),Zt.lookahead===0)){if(sn===x)return ue;break}if(Zt.match_length=0,bn=r._tr_tally(Zt,0,Zt.window[Zt.strstart]),Zt.lookahead--,Zt.strstart++,bn&&(St(Zt,!1),Zt.strm.avail_out===0))return ue}return Zt.insert=0,sn===I?(St(Zt,!0),Zt.strm.avail_out===0?ki:zt):Zt.last_lit&&(St(Zt,!1),Zt.strm.avail_out===0)?ue:Pt})(at,Qt):at.strategy===3?(function(Zt,sn){for(var bn,nn,Sn,Fo,Yo=Zt.window;;){if(Zt.lookahead<=je){if(vn(Zt),Zt.lookahead<=je&&sn===x)return ue;if(Zt.lookahead===0)break}if(Zt.match_length=0,Zt.lookahead>=be&&0Zt.lookahead&&(Zt.match_length=Zt.lookahead)}if(Zt.match_length>=be?(bn=r._tr_tally(Zt,1,Zt.match_length-be),Zt.lookahead-=Zt.match_length,Zt.strstart+=Zt.match_length,Zt.match_length=0):(bn=r._tr_tally(Zt,0,Zt.window[Zt.strstart]),Zt.lookahead--,Zt.strstart++),bn&&(St(Zt,!1),Zt.strm.avail_out===0))return ue}return Zt.insert=0,sn===I?(St(Zt,!0),Zt.strm.avail_out===0?ki:zt):Zt.last_lit&&(St(Zt,!1),Zt.strm.avail_out===0)?ue:Pt})(at,Qt):i[at.level].func(at,Qt);if(Li!==ki&&Li!==zt||(at.status=666),Li===ue||Li===ki)return pe.avail_out===0&&(at.last_flush=-1),D;if(Li===Pt&&(Qt===1?r._tr_align(at):Qt!==5&&(r._tr_stored_block(at,0,0,!1),Qt===3&&(en(at.head),at.lookahead===0&&(at.strstart=0,at.block_start=0,at.insert=0))),_t(pe),pe.avail_out===0))return at.last_flush=-1,D}return Qt!==I?D:at.wrap<=0?1:(at.wrap===2?(Ei(at,255&pe.adler),Ei(at,pe.adler>>8&255),Ei(at,pe.adler>>16&255),Ei(at,pe.adler>>24&255),Ei(at,255&pe.total_in),Ei(at,pe.total_in>>8&255),Ei(at,pe.total_in>>16&255),Ei(at,pe.total_in>>24&255)):(qi(at,pe.adler>>>16),qi(at,65535&pe.adler)),_t(pe),0=Wt.w_size&&(Dt===0&&(en(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),sn=new o.Buf8(Wt.w_size),o.arraySet(sn,Qt,bn-Wt.w_size,Wt.w_size,0),Qt=sn,bn=Wt.w_size),Si=pe.avail_in,Li=pe.next_in,Zt=pe.input,pe.avail_in=bn,pe.next_in=0,pe.input=Qt,vn(Wt);Wt.lookahead>=be;){for(at=Wt.strstart,Ze=Wt.lookahead-(be-1);Wt.ins_h=(Wt.ins_h<>>=be=fe>>>24,Q-=be,(be=fe>>>16&255)===0)Pt[f++]=65535&fe;else{if(!(16&be)){if((64&be)==0){fe=se[(65535&fe)+(W&(1<>>=be,Q-=be),Q<15&&(W+=ue[a++]<>>=be=fe>>>24,Q-=be,!(16&(be=fe>>>16&255))){if((64&be)==0){fe=ge[(65535&fe)+(W&(1<>>=be,Q-=be,(be=f-x)>3,W&=(1<<(Q-=je<<3))-1,i.next_in=a,i.next_out=f,i.avail_in=a>>24&255)+(Fe>>>8&65280)+((65280&Fe)<<8)+((255&Fe)<<24)}function W(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Q(Fe){var ht;return Fe&&Fe.state?(ht=Fe.state,Fe.total_in=Fe.total_out=ht.total=0,Fe.msg="",ht.wrap&&(Fe.adler=1&ht.wrap),ht.mode=P,ht.last=0,ht.havedict=0,ht.dmax=32768,ht.head=null,ht.hold=0,ht.bits=0,ht.lencode=ht.lendyn=new i.Buf32(R),ht.distcode=ht.distdyn=new i.Buf32(j),ht.sane=1,ht.back=-1,I):D}function se(Fe){var ht;return Fe&&Fe.state?((ht=Fe.state).wsize=0,ht.whave=0,ht.wnext=0,Q(Fe)):D}function ge(Fe,ht){var ue,Pt;return Fe&&Fe.state?(Pt=Fe.state,ht<0?(ue=0,ht=-ht):(ue=1+(ht>>4),ht<48&&(ht&=15)),ht&&(ht<8||15=zt.wsize?(i.arraySet(zt.window,ht,ue-zt.wsize,zt.wsize,0),zt.wnext=0,zt.whave=zt.wsize):(Pt<(ki=zt.wsize-zt.wnext)&&(ki=Pt),i.arraySet(zt.window,ht,ue-Pt,ki,zt.wnext),(Pt-=ki)?(i.arraySet(zt.window,ht,ue-Pt,Pt,0),zt.wnext=Pt,zt.whave=zt.wsize):(zt.wnext+=ki,zt.wnext===zt.wsize&&(zt.wnext=0),zt.whave>>8&255,ue.check=r(ue.check,Dt,2,0),St=_t=0,ue.mode=2;break}if(ue.flags=0,ue.head&&(ue.head.done=!1),!(1&ue.wrap)||(((255&_t)<<8)+(_t>>8))%31){Fe.msg="incorrect header check",ue.mode=30;break}if((15&_t)!=8){Fe.msg="unknown compression method",ue.mode=30;break}if(St-=4,pe=8+(15&(_t>>>=4)),ue.wbits===0)ue.wbits=pe;else if(pe>ue.wbits){Fe.msg="invalid window size",ue.mode=30;break}ue.dmax=1<>8&1),512&ue.flags&&(Dt[0]=255&_t,Dt[1]=_t>>>8&255,ue.check=r(ue.check,Dt,2,0)),St=_t=0,ue.mode=3;case 3:for(;St<32;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>8&255,Dt[2]=_t>>>16&255,Dt[3]=_t>>>24&255,ue.check=r(ue.check,Dt,4,0)),St=_t=0,ue.mode=4;case 4:for(;St<16;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>8),512&ue.flags&&(Dt[0]=255&_t,Dt[1]=_t>>>8&255,ue.check=r(ue.check,Dt,2,0)),St=_t=0,ue.mode=5;case 5:if(1024&ue.flags){for(;St<16;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>8&255,ue.check=r(ue.check,Dt,2,0)),St=_t=0}else ue.head&&(ue.head.extra=null);ue.mode=6;case 6:if(1024&ue.flags&&(qt<(zi=ue.length)&&(zi=qt),zi&&(ue.head&&(pe=ue.head.extra_len-ue.length,ue.head.extra||(ue.head.extra=new Array(ue.head.extra_len)),i.arraySet(ue.head.extra,Pt,zt,zi,pe)),512&ue.flags&&(ue.check=r(ue.check,Pt,zi,zt)),qt-=zi,zt+=zi,ue.length-=zi),ue.length))break e;ue.length=0,ue.mode=7;case 7:if(2048&ue.flags){if(qt===0)break e;for(zi=0;pe=Pt[zt+zi++],ue.head&&pe&&ue.length<65536&&(ue.head.name+=String.fromCharCode(pe)),pe&&zi>9&1,ue.head.done=!0),Fe.adler=ue.check=0,ue.mode=12;break;case 10:for(;St<32;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>=7&St,St-=7&St,ue.mode=27;break}for(;St<3;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>=1)){case 0:ue.mode=14;break;case 1:if(je(ue),ue.mode=20,ht!==6)break;_t>>>=2,St-=2;break e;case 2:ue.mode=17;break;case 3:Fe.msg="invalid block type",ue.mode=30}_t>>>=2,St-=2;break;case 14:for(_t>>>=7&St,St-=7&St;St<32;){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>16^65535)){Fe.msg="invalid stored block lengths",ue.mode=30;break}if(ue.length=65535&_t,St=_t=0,ue.mode=15,ht===6)break e;case 15:ue.mode=16;case 16:if(zi=ue.length){if(qt>>=5,St-=5,ue.ndist=1+(31&_t),_t>>>=5,St-=5,ue.ncode=4+(15&_t),_t>>>=4,St-=4,286>>=3,St-=3}for(;ue.have<19;)ue.lens[Si[ue.have++]]=0;if(ue.lencode=ue.lendyn,ue.lenbits=7,Wt={bits:ue.lenbits},Qt=p(0,ue.lens,0,19,ue.lencode,0,ue.work,Wt),ue.lenbits=Wt.bits,Qt){Fe.msg="invalid code lengths set",ue.mode=30;break}ue.have=0,ue.mode=19;case 19:for(;ue.have>>16&255,Vn=65535&Ze,!((Wi=Ze>>>24)<=St);){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>=Wi,St-=Wi,ue.lens[ue.have++]=Vn;else{if(Vn===16){for(at=Wi+2;St>>=Wi,St-=Wi,ue.have===0){Fe.msg="invalid bit length repeat",ue.mode=30;break}pe=ue.lens[ue.have-1],zi=3+(3&_t),_t>>>=2,St-=2}else if(Vn===17){for(at=Wi+3;St>>=Wi)),_t>>>=3,St-=3}else{for(at=Wi+7;St>>=Wi)),_t>>>=7,St-=7}if(ue.have+zi>ue.nlen+ue.ndist){Fe.msg="invalid bit length repeat",ue.mode=30;break}for(;zi--;)ue.lens[ue.have++]=pe}}if(ue.mode===30)break;if(ue.lens[256]===0){Fe.msg="invalid code -- missing end-of-block",ue.mode=30;break}if(ue.lenbits=9,Wt={bits:ue.lenbits},Qt=p(f,ue.lens,0,ue.nlen,ue.lencode,0,ue.work,Wt),ue.lenbits=Wt.bits,Qt){Fe.msg="invalid literal/lengths set",ue.mode=30;break}if(ue.distbits=6,ue.distcode=ue.distdyn,Wt={bits:ue.distbits},Qt=p(x,ue.lens,ue.nlen,ue.ndist,ue.distcode,0,ue.work,Wt),ue.distbits=Wt.bits,Qt){Fe.msg="invalid distances set",ue.mode=30;break}if(ue.mode=20,ht===6)break e;case 20:ue.mode=21;case 21:if(6<=qt&&258<=en){Fe.next_out=Bi,Fe.avail_out=en,Fe.next_in=zt,Fe.avail_in=qt,ue.hold=_t,ue.bits=St,a(Fe,qi),Bi=Fe.next_out,ki=Fe.output,en=Fe.avail_out,zt=Fe.next_in,Pt=Fe.input,qt=Fe.avail_in,_t=ue.hold,St=ue.bits,ue.mode===12&&(ue.back=-1);break}for(ue.back=0;An=(Ze=ue.lencode[_t&(1<>>16&255,Vn=65535&Ze,!((Wi=Ze>>>24)<=St);){if(qt===0)break e;qt--,_t+=Pt[zt++]<>Fn)])>>>16&255,Vn=65535&Ze,!(Fn+(Wi=Ze>>>24)<=St);){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>=Fn,St-=Fn,ue.back+=Fn}if(_t>>>=Wi,St-=Wi,ue.back+=Wi,ue.length=Vn,An===0){ue.mode=26;break}if(32&An){ue.back=-1,ue.mode=12;break}if(64&An){Fe.msg="invalid literal/length code",ue.mode=30;break}ue.extra=15&An,ue.mode=22;case 22:if(ue.extra){for(at=ue.extra;St>>=ue.extra,St-=ue.extra,ue.back+=ue.extra}ue.was=ue.length,ue.mode=23;case 23:for(;An=(Ze=ue.distcode[_t&(1<>>16&255,Vn=65535&Ze,!((Wi=Ze>>>24)<=St);){if(qt===0)break e;qt--,_t+=Pt[zt++]<>Fn)])>>>16&255,Vn=65535&Ze,!(Fn+(Wi=Ze>>>24)<=St);){if(qt===0)break e;qt--,_t+=Pt[zt++]<>>=Fn,St-=Fn,ue.back+=Fn}if(_t>>>=Wi,St-=Wi,ue.back+=Wi,64&An){Fe.msg="invalid distance code",ue.mode=30;break}ue.offset=Vn,ue.extra=15&An,ue.mode=24;case 24:if(ue.extra){for(at=ue.extra;St>>=ue.extra,St-=ue.extra,ue.back+=ue.extra}if(ue.offset>ue.dmax){Fe.msg="invalid distance too far back",ue.mode=30;break}ue.mode=25;case 25:if(en===0)break e;if(zi=qi-en,ue.offset>zi){if((zi=ue.offset-zi)>ue.whave&&ue.sane){Fe.msg="invalid distance too far back",ue.mode=30;break}vn=zi>ue.wnext?(zi-=ue.wnext,ue.wsize-zi):ue.wnext-zi,zi>ue.length&&(zi=ue.length),Gn=ue.window}else Gn=ki,vn=Bi-ue.offset,zi=ue.length;for(enSe?(be=vn[Gn+j[ht]],St[Ei+j[ht]]):(be=96,0),W=1<>Bi)+(Q-=W)]=fe<<24|be<<16|je|0,Q!==0;);for(W=1<>=1;if(W!==0?(_t&=W-1,_t+=W):_t=0,ht++,--qi[Fe]==0){if(Fe===Pt)break;Fe=x[I+j[ht]]}if(ki>>7)]}function Ei(Ze,Dt){Ze.pending_buf[Ze.pending++]=255&Dt,Ze.pending_buf[Ze.pending++]=Dt>>>8&255}function qi(Ze,Dt,Si){Ze.bi_valid>$-Si?(Ze.bi_buf|=Dt<>$-Ze.bi_valid,Ze.bi_valid+=Si-$):(Ze.bi_buf|=Dt<>>=1,Si<<=1,0<--Dt;);return Si>>>1}function Gn(Ze,Dt,Si){var Li,Zt,sn=new Array(j+1),bn=0;for(Li=1;Li<=j;Li++)sn[Li]=bn=bn+Si[Li-1]<<1;for(Zt=0;Zt<=Dt;Zt++){var nn=Ze[2*Zt+1];nn!==0&&(Ze[2*Zt]=vn(sn[nn]++,nn))}}function Wi(Ze){var Dt;for(Dt=0;Dt>1;1<=Si;Si--)Fn(Ze,sn,Si);for(Zt=Sn;Si=Ze.heap[1],Ze.heap[1]=Ze.heap[Ze.heap_len--],Fn(Ze,sn,1),Li=Ze.heap[1],Ze.heap[--Ze.heap_max]=Si,Ze.heap[--Ze.heap_max]=Li,sn[2*Zt]=sn[2*Si]+sn[2*Li],Ze.depth[Zt]=(Ze.depth[Si]>=Ze.depth[Li]?Ze.depth[Si]:Ze.depth[Li])+1,sn[2*Si+1]=sn[2*Li+1]=Zt,Ze.heap[1]=Zt++,Fn(Ze,sn,1),2<=Ze.heap_len;);Ze.heap[--Ze.heap_max]=Ze.heap[1],(function(Yo,ha){var cd,rs,oa,Es,Uc,wd,Bl=ha.dyn_tree,lh=ha.max_code,Cs=ha.stat_desc.static_tree,rl=ha.stat_desc.has_stree,o_=ha.stat_desc.extra_bits,ch=ha.stat_desc.extra_base,gc=ha.stat_desc.max_length,dh=0;for(Es=0;Es<=j;Es++)Yo.bl_count[Es]=0;for(Bl[2*Yo.heap[Yo.heap_max]+1]=0,cd=Yo.heap_max+1;cd>=7;Zt>>=1)if(1&Fo&&nn.dyn_ltree[2*Sn]!==0)return o;if(nn.dyn_ltree[18]!==0||nn.dyn_ltree[20]!==0||nn.dyn_ltree[26]!==0)return r;for(Sn=32;Sn>>3,(sn=Ze.static_len+3+7>>>3)<=Zt&&(Zt=sn)):Zt=sn=Si+5,Si+4<=Zt&&Dt!==-1?at(Ze,Dt,Si,Li):Ze.strategy===4||sn===Zt?(qi(Ze,2+(Li?1:0),3),Lo(Ze,st,Fe)):(qi(Ze,4+(Li?1:0),3),(function(nn,Sn,Fo,Yo){var ha;for(qi(nn,Sn-257,5),qi(nn,Fo-1,5),qi(nn,Yo-4,4),ha=0;ha>>8&255,Ze.pending_buf[Ze.d_buf+2*Ze.last_lit+1]=255&Dt,Ze.pending_buf[Ze.l_buf+Ze.last_lit]=255&Si,Ze.last_lit++,Dt===0?Ze.dyn_ltree[2*Si]++:(Ze.matches++,Dt--,Ze.dyn_ltree[2*(ue[Si]+x+1)]++,Ze.dyn_dtree[2*St(Dt)]++),Ze.last_lit===Ze.lit_bufsize-1},e._tr_align=function(Ze){qi(Ze,2,3),zi(Ze,Q,st),(function(Dt){Dt.bi_valid===16?(Ei(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)})(Ze)}},{"../utils/common":41}],53:[function(t,n,e){"use strict";n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,e){(function(i){(function(o,r){"use strict";if(!o.setImmediate){var a,p,f,x,I=1,D={},P=!1,R=o.document,j=Object.getPrototypeOf&&Object.getPrototypeOf(o);j=j&&j.setTimeout?j:o,a={}.toString.call(o.process)==="[object process]"?function(se){process.nextTick(function(){W(se)})}:(function(){if(o.postMessage&&!o.importScripts){var se=!0,ge=o.onmessage;return o.onmessage=function(){se=!1},o.postMessage("","*"),o.onmessage=ge,se}})()?(x="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",Q,!1):o.attachEvent("onmessage",Q),function(se){o.postMessage(x+se,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(se){W(se.data)},function(se){f.port2.postMessage(se)}):R&&"onreadystatechange"in R.createElement("script")?(p=R.documentElement,function(se){var ge=R.createElement("script");ge.onreadystatechange=function(){W(se),ge.onreadystatechange=null,p.removeChild(ge),ge=null},p.appendChild(ge)}):function(se){setTimeout(W,0,se)},j.setImmediate=function(se){typeof se!="function"&&(se=new Function(""+se));for(var ge=new Array(arguments.length-1),Re=0;Re"u"?i===void 0?this:i:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var lR=mu((YW,QW)=>{"use strict";(function(t,n){typeof define=="function"&&define.amd?define([],n):typeof YW<"u"?n():(n(),t.FileSaver={})})(YW,function(){"use strict";function t(p,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(p.type)?new Blob(["\uFEFF",p],{type:p.type}):p}function n(p,f,x){var I=new XMLHttpRequest;I.open("GET",p),I.responseType="blob",I.onload=function(){a(I.response,f,x)},I.onerror=function(){console.error("could not download file")},I.send()}function e(p){var f=new XMLHttpRequest;f.open("HEAD",p,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(p){try{p.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),p.dispatchEvent(f)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,r=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!r?function(p,f,x){var I=o.URL||o.webkitURL,D=document.createElement("a");f=f||p.name||"download",D.download=f,D.rel="noopener",typeof p=="string"?(D.href=p,D.origin===location.origin?i(D):e(D.href)?n(p,f,x):i(D,D.target="_blank")):(D.href=I.createObjectURL(p),setTimeout(function(){I.revokeObjectURL(D.href)},4e4),setTimeout(function(){i(D)},0))}:"msSaveOrOpenBlob"in navigator?function(p,f,x){if(f=f||p.name||"download",typeof p!="string")navigator.msSaveOrOpenBlob(t(p,x),f);else if(e(p))n(p,f,x);else{var I=document.createElement("a");I.href=p,I.target="_blank",setTimeout(function(){i(I)})}}:function(p,f,x,I){if(I=I||open("","_blank"),I&&(I.document.title=I.document.body.innerText="downloading..."),typeof p=="string")return n(p,f,x);var D=p.type==="application/octet-stream",P=/constructor/i.test(o.HTMLElement)||o.safari,R=/CriOS\/[\d]+/.test(navigator.userAgent);if((R||D&&P||r)&&typeof FileReader<"u"){var j=new FileReader;j.onloadend=function(){var Q=j.result;Q=R?Q:Q.replace(/^data:[^;]*;/,"data:attachment/file;"),I?I.location.href=Q:location=Q,I=null},j.readAsDataURL(p)}else{var $=o.URL||o.webkitURL,W=$.createObjectURL(p);I?I.location=W:location.href=W,I=null,setTimeout(function(){$.revokeObjectURL(W)},4e4)}});o.saveAs=a.saveAs=a,typeof QW<"u"&&(QW.exports=a)})});var EK=mu((IK,TK)=>{"use strict";((t,n)=>{typeof define=="function"&&define.amd?define([],n):typeof TK=="object"&&typeof IK<"u"?TK.exports=n():t.Papa=n()})(IK,function t(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},e,i=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,r={},a=0,p={};function f(fe){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(be){var je=ge(be);je.chunkSize=parseInt(je.chunkSize),be.step||be.chunk||(je.chunkSize=null),this._handle=new R(je),(this._handle.streamer=this)._config=je}.call(this,fe),this.parseChunk=function(be,je){var st=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview),o)n.postMessage({results:Fe,workerId:p.WORKER_ID,finished:st});else if(Se(this._config.chunk)&&!je){if(this._config.chunk(Fe,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=Fe=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Fe.data),this._completeResults.errors=this._completeResults.errors.concat(Fe.errors),this._completeResults.meta=Fe.meta),this._completed||!st||!Se(this._config.complete)||Fe&&Fe.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),st||Fe&&Fe.meta.paused||this._nextChunk(),Fe}this._halted=!0},this._sendError=function(be){Se(this._config.error)?this._config.error(be):o&&this._config.error&&n.postMessage({workerId:p.WORKER_ID,error:be,finished:!1})}}function x(fe){var be;(fe=fe||{}).chunkSize||(fe.chunkSize=p.RemoteChunkSize),f.call(this,fe),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(je){this._input=je,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(be=new XMLHttpRequest,this._config.withCredentials&&(be.withCredentials=this._config.withCredentials),i||(be.onload=Re(this._chunkLoaded,this),be.onerror=Re(this._chunkError,this)),be.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var je,st=this._config.downloadRequestHeaders;for(je in st)be.setRequestHeader(je,st[je])}var Fe;this._config.chunkSize&&(Fe=this._start+this._config.chunkSize-1,be.setRequestHeader("Range","bytes="+this._start+"-"+Fe));try{be.send(this._config.downloadRequestBody)}catch(ht){this._chunkError(ht.message)}i&&be.status===0&&this._chunkError()}},this._chunkLoaded=function(){be.readyState===4&&(be.status<200||400<=be.status?this._chunkError():(this._start+=this._config.chunkSize||be.responseText.length,this._finished=!this._config.chunkSize||this._start>=(je=>(je=je.getResponseHeader("Content-Range"))!==null?parseInt(je.substring(je.lastIndexOf("/")+1)):-1)(be),this.parseChunk(be.responseText)))},this._chunkError=function(je){je=be.statusText||je,this._sendError(new Error(je))}}function I(fe){(fe=fe||{}).chunkSize||(fe.chunkSize=p.LocalChunkSize),f.call(this,fe);var be,je,st=typeof FileReader<"u";this.stream=function(Fe){this._input=Fe,je=Fe.slice||Fe.webkitSlice||Fe.mozSlice,st?((be=new FileReader).onload=Re(this._chunkLoaded,this),be.onerror=Re(this._chunkError,this)):be=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(Fe.target.result)},this._chunkError=function(){this._sendError(be.error)}}function D(fe){var be;f.call(this,fe=fe||{}),this.stream=function(je){return be=je,this._nextChunk()},this._nextChunk=function(){var je,st;if(!this._finished)return je=this._config.chunkSize,be=je?(st=be.substring(0,je),be.substring(je)):(st=be,""),this._finished=!be,this.parseChunk(st)}}function P(fe){f.call(this,fe=fe||{});var be=[],je=!0,st=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Fe){this._input=Fe,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){st&&be.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),be.length?this.parseChunk(be.shift()):je=!0},this._streamData=Re(function(Fe){try{be.push(typeof Fe=="string"?Fe:Fe.toString(this._config.encoding)),je&&(je=!1,this._checkIsFinished(),this.parseChunk(be.shift()))}catch(ht){this._streamError(ht)}},this),this._streamError=Re(function(Fe){this._streamCleanUp(),this._sendError(Fe)},this),this._streamEnd=Re(function(){this._streamCleanUp(),st=!0,this._streamData("")},this),this._streamCleanUp=Re(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function R(fe){var be,je,st,Fe,ht=Math.pow(2,53),ue=-ht,Pt=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,ki=/^((\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)))$/,zt=this,Bi=0,qt=0,en=!1,_t=!1,St=[],Ei={data:[],errors:[],meta:{}};function qi(Wi){return fe.skipEmptyLines==="greedy"?Wi.join("").trim()==="":Wi.length===1&&Wi[0].length===0}function zi(){if(Ei&&st&&(Gn("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+p.DefaultDelimiter+"'"),st=!1),fe.skipEmptyLines&&(Ei.data=Ei.data.filter(function(Lo){return!qi(Lo)})),vn()){let Lo=function(gr,pe){Se(fe.transformHeader)&&(gr=fe.transformHeader(gr,pe)),St.push(gr)};var Fn=Lo;if(Ei)if(Array.isArray(Ei.data[0])){for(var Wi=0;vn()&&Wi(Si=>(fe.dynamicTypingFunction&&fe.dynamicTyping[Si]===void 0&&(fe.dynamicTyping[Si]=fe.dynamicTypingFunction(Si)),(fe.dynamicTyping[Si]||fe.dynamicTyping)===!0))(Ze)?Dt==="true"||Dt==="TRUE"||Dt!=="false"&&Dt!=="FALSE"&&((Si=>{if(Pt.test(Si)&&(Si=parseFloat(Si),ue=St.length?"__parsed_extra":St[Qt]:Wt,at=fe.transform?fe.transform(at,Wt):at);Wt==="__parsed_extra"?(pe[Wt]=pe[Wt]||[],pe[Wt].push(at)):pe[Wt]=at}return fe.header&&(Qt>St.length?Gn("FieldMismatch","TooManyFields","Too many fields: expected "+St.length+" fields but parsed "+Qt,qt+gr):Qtfe.preview?je.abort():(Ei.data=Ei.data[0],Fe(Ei,zt))))}),this.parse=function(Wi,An,Vn){var Fn=fe.quoteChar||'"',Fn=(fe.newline||(fe.newline=this.guessLineEndings(Wi,Fn)),st=!1,fe.delimiter?Se(fe.delimiter)&&(fe.delimiter=fe.delimiter(Wi),Ei.meta.delimiter=fe.delimiter):((Fn=((Lo,gr,pe,Qt,Wt)=>{var at,Ze,Dt,Si;Wt=Wt||[","," ","|",";",p.RECORD_SEP,p.UNIT_SEP];for(var Li=0;Li=Vn.length/2?`\r `:"\r"}}function j(fe){return fe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $(fe){var be=(fe=fe||{}).delimiter,je=fe.newline,st=fe.comments,Fe=fe.step,ht=fe.preview,ue=fe.fastMode,Pt=null,ki=!1,zt=fe.quoteChar==null?'"':fe.quoteChar,Bi=zt;if(fe.escapeChar!==void 0&&(Bi=fe.escapeChar),(typeof be!="string"||-1=ht)return bn(!0);break}Vn.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:An.length,index:qt}),Ze++}}else if(st&&Fn.length===0&&_t.substring(qt,qt+Gn)===st){if(Wt===-1)return bn();qt=Wt+vn,Wt=_t.indexOf(je,qt),Qt=_t.indexOf(be,qt)}else if(Qt!==-1&&(Qt=ht)return bn(!0)}return Zt();function Si(Sn){An.push(Sn),Lo=qt}function Li(Sn){var Fo=0;return Fo=Sn!==-1&&(Sn=_t.substring(Ze+1,Sn))&&Sn.trim()===""?Sn.length:Fo}function Zt(Sn){return Ei||(Sn===void 0&&(Sn=_t.substring(qt)),Fn.push(Sn),qt=qi,Si(Fn),Wi&&nn()),bn()}function sn(Sn){qt=Sn,Si(Fn),Fn=[],Wt=_t.indexOf(je,qt)}function bn(Sn){if(fe.header&&!St&&An.length&&!ki){var Fo=An[0],Yo=Object.create(null),ha=new Set(Fo);let cd=!1;for(let rs=0;rsst.charCodeAt(0)!==65279?st:st.slice(1))(fe),je=new(be.download?x:D)(be)):fe.readable===!0&&Se(fe.read)&&Se(fe.on)?je=new P(be):(n.File&&fe instanceof File||fe instanceof Object)&&(je=new I(be)),je.stream(fe);(je=(()=>{var st;return!!p.WORKERS_SUPPORTED&&(st=(()=>{var Fe=n.URL||n.webkitURL||null,ht=t.toString();return p.BLOB_URL||(p.BLOB_URL=Fe.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; ","(",ht,")();"],{type:"text/javascript"})))})(),(st=new n.Worker(st)).onmessage=W,st.id=a++,r[st.id]=st)})()).userStep=be.step,je.userChunk=be.chunk,je.userComplete=be.complete,je.userError=be.error,be.step=Se(be.step),be.chunk=Se(be.chunk),be.complete=Se(be.complete),be.error=Se(be.error),delete be.worker,je.postMessage({input:fe,config:be,workerId:je.id})},p.unparse=function(fe,be){var je=!1,st=!0,Fe=",",ht=`\r `,ue='"',Pt=ue+ue,ki=!1,zt=null,Bi=!1,qt=((()=>{if(typeof be=="object"){if(typeof be.delimiter!="string"||p.BAD_DELIMITERS.filter(function(St){return be.delimiter.indexOf(St)!==-1}).length||(Fe=be.delimiter),typeof be.quotes!="boolean"&&typeof be.quotes!="function"&&!Array.isArray(be.quotes)||(je=be.quotes),typeof be.skipEmptyLines!="boolean"&&typeof be.skipEmptyLines!="string"||(ki=be.skipEmptyLines),typeof be.newline=="string"&&(ht=be.newline),typeof be.quoteChar=="string"&&(ue=be.quoteChar),typeof be.header=="boolean"&&(st=be.header),Array.isArray(be.columns)){if(be.columns.length===0)throw new Error("Option columns is empty");zt=be.columns}be.escapeChar!==void 0&&(Pt=be.escapeChar+ue),be.escapeFormulae instanceof RegExp?Bi=be.escapeFormulae:typeof be.escapeFormulae=="boolean"&&be.escapeFormulae&&(Bi=/^[=+\-@\t\r].*$/)}})(),new RegExp(j(ue),"g"));if(typeof fe=="string"&&(fe=JSON.parse(fe)),Array.isArray(fe)){if(!fe.length||Array.isArray(fe[0]))return en(null,fe,ki);if(typeof fe[0]=="object")return en(zt||Object.keys(fe[0]),fe,ki)}else if(typeof fe=="object")return typeof fe.data=="string"&&(fe.data=JSON.parse(fe.data)),Array.isArray(fe.data)&&(fe.fields||(fe.fields=fe.meta&&fe.meta.fields||zt),fe.fields||(fe.fields=Array.isArray(fe.data[0])?fe.fields:typeof fe.data[0]=="object"?Object.keys(fe.data[0]):[]),Array.isArray(fe.data[0])||typeof fe.data[0]=="object"||(fe.data=[fe.data])),en(fe.fields||[],fe.data||[],ki);throw new Error("Unable to serialize unrecognized input");function en(St,Ei,qi){var zi="",vn=(typeof St=="string"&&(St=JSON.parse(St)),typeof Ei=="string"&&(Ei=JSON.parse(Ei)),Array.isArray(St)&&0{for(var Wi=0;Wi{"use strict";(function(t,n){typeof OY=="object"&&typeof PY<"u"?PY.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.mapboxgl=n())})(OY,function(){"use strict";var t,n,e;function i(r,a){if(!t)t=a;else if(!n)n=a;else{var p="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+t+")(sharedChunk); ("+n+")(sharedChunk); self.onerror = null;",f={};t(f),e=a(f),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(e.workerUrl=window.URL.createObjectURL(new Blob([p],{type:"text/javascript"})))}}i(["exports"],function(r){var a=1e-6,p=typeof Float32Array<"u"?Float32Array:Array;function f(d,s){var c=s[0],h=s[1],m=s[2],y=s[3],v=c*y-m*h;return v?(d[0]=y*(v=1/v),d[1]=-h*v,d[2]=-m*v,d[3]=c*v,d):null}function x(){var d=new p(9);return p!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[5]=0,d[6]=0,d[7]=0),d[0]=1,d[4]=1,d[8]=1,d}function I(d,s){var c=s[0],h=s[1],m=s[2],y=s[3],v=s[4],w=s[5],T=s[6],A=s[7],M=s[8];return d[0]=v*M-w*A,d[1]=m*A-h*M,d[2]=h*w-m*v,d[3]=w*T-y*M,d[4]=c*M-m*T,d[5]=m*y-c*w,d[6]=y*A-v*T,d[7]=h*T-c*A,d[8]=c*v-h*y,d}function D(d,s,c){var h=s[0],m=s[1],y=s[2],v=s[3],w=s[4],T=s[5],A=s[6],M=s[7],O=s[8],N=c[0],H=c[1],G=c[2],ee=c[3],te=c[4],ie=c[5],he=c[6],me=c[7],ye=c[8];return d[0]=N*h+H*v+G*A,d[1]=N*m+H*w+G*M,d[2]=N*y+H*T+G*O,d[3]=ee*h+te*v+ie*A,d[4]=ee*m+te*w+ie*M,d[5]=ee*y+te*T+ie*O,d[6]=he*h+me*v+ye*A,d[7]=he*m+me*w+ye*M,d[8]=he*y+me*T+ye*O,d}function P(){var d=new p(16);return p!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=0,d[12]=0,d[13]=0,d[14]=0),d[0]=1,d[5]=1,d[10]=1,d[15]=1,d}function R(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d}function j(d,s){var c=s[0],h=s[1],m=s[2],y=s[3],v=s[4],w=s[5],T=s[6],A=s[7],M=s[8],O=s[9],N=s[10],H=s[11],G=s[12],ee=s[13],te=s[14],ie=s[15],he=c*w-h*v,me=c*T-m*v,ye=c*A-y*v,ze=h*T-m*w,Ve=h*A-y*w,qe=m*A-y*T,Ye=M*ee-O*G,it=M*te-N*G,Ut=M*ie-H*G,pt=O*te-N*ee,Gt=O*ie-H*ee,ti=N*ie-H*te,$t=he*ti-me*Gt+ye*pt+ze*Ut-Ve*it+qe*Ye;return $t?(d[0]=(w*ti-T*Gt+A*pt)*($t=1/$t),d[1]=(m*Gt-h*ti-y*pt)*$t,d[2]=(ee*qe-te*Ve+ie*ze)*$t,d[3]=(N*Ve-O*qe-H*ze)*$t,d[4]=(T*Ut-v*ti-A*it)*$t,d[5]=(c*ti-m*Ut+y*it)*$t,d[6]=(te*ye-G*qe-ie*me)*$t,d[7]=(M*qe-N*ye+H*me)*$t,d[8]=(v*Gt-w*Ut+A*Ye)*$t,d[9]=(h*Ut-c*Gt-y*Ye)*$t,d[10]=(G*Ve-ee*ye+ie*he)*$t,d[11]=(O*ye-M*Ve-H*he)*$t,d[12]=(w*it-v*pt-T*Ye)*$t,d[13]=(c*pt-h*it+m*Ye)*$t,d[14]=(ee*me-G*ze-te*he)*$t,d[15]=(M*ze-O*me+N*he)*$t,d):null}function $(d,s,c){var h=s[0],m=s[1],y=s[2],v=s[3],w=s[4],T=s[5],A=s[6],M=s[7],O=s[8],N=s[9],H=s[10],G=s[11],ee=s[12],te=s[13],ie=s[14],he=s[15],me=c[0],ye=c[1],ze=c[2],Ve=c[3];return d[0]=me*h+ye*w+ze*O+Ve*ee,d[1]=me*m+ye*T+ze*N+Ve*te,d[2]=me*y+ye*A+ze*H+Ve*ie,d[3]=me*v+ye*M+ze*G+Ve*he,d[4]=(me=c[4])*h+(ye=c[5])*w+(ze=c[6])*O+(Ve=c[7])*ee,d[5]=me*m+ye*T+ze*N+Ve*te,d[6]=me*y+ye*A+ze*H+Ve*ie,d[7]=me*v+ye*M+ze*G+Ve*he,d[8]=(me=c[8])*h+(ye=c[9])*w+(ze=c[10])*O+(Ve=c[11])*ee,d[9]=me*m+ye*T+ze*N+Ve*te,d[10]=me*y+ye*A+ze*H+Ve*ie,d[11]=me*v+ye*M+ze*G+Ve*he,d[12]=(me=c[12])*h+(ye=c[13])*w+(ze=c[14])*O+(Ve=c[15])*ee,d[13]=me*m+ye*T+ze*N+Ve*te,d[14]=me*y+ye*A+ze*H+Ve*ie,d[15]=me*v+ye*M+ze*G+Ve*he,d}function W(d,s,c){var h,m,y,v,w,T,A,M,O,N,H,G,ee=c[0],te=c[1],ie=c[2];return s===d?(d[12]=s[0]*ee+s[4]*te+s[8]*ie+s[12],d[13]=s[1]*ee+s[5]*te+s[9]*ie+s[13],d[14]=s[2]*ee+s[6]*te+s[10]*ie+s[14],d[15]=s[3]*ee+s[7]*te+s[11]*ie+s[15]):(m=s[1],y=s[2],v=s[3],w=s[4],T=s[5],A=s[6],M=s[7],O=s[8],N=s[9],H=s[10],G=s[11],d[0]=h=s[0],d[1]=m,d[2]=y,d[3]=v,d[4]=w,d[5]=T,d[6]=A,d[7]=M,d[8]=O,d[9]=N,d[10]=H,d[11]=G,d[12]=h*ee+w*te+O*ie+s[12],d[13]=m*ee+T*te+N*ie+s[13],d[14]=y*ee+A*te+H*ie+s[14],d[15]=v*ee+M*te+G*ie+s[15]),d}function Q(d,s,c){var h=c[0],m=c[1],y=c[2];return d[0]=s[0]*h,d[1]=s[1]*h,d[2]=s[2]*h,d[3]=s[3]*h,d[4]=s[4]*m,d[5]=s[5]*m,d[6]=s[6]*m,d[7]=s[7]*m,d[8]=s[8]*y,d[9]=s[9]*y,d[10]=s[10]*y,d[11]=s[11]*y,d[12]=s[12],d[13]=s[13],d[14]=s[14],d[15]=s[15],d}function se(d,s,c){var h=Math.sin(c),m=Math.cos(c),y=s[4],v=s[5],w=s[6],T=s[7],A=s[8],M=s[9],O=s[10],N=s[11];return s!==d&&(d[0]=s[0],d[1]=s[1],d[2]=s[2],d[3]=s[3],d[12]=s[12],d[13]=s[13],d[14]=s[14],d[15]=s[15]),d[4]=y*m+A*h,d[5]=v*m+M*h,d[6]=w*m+O*h,d[7]=T*m+N*h,d[8]=A*m-y*h,d[9]=M*m-v*h,d[10]=O*m-w*h,d[11]=N*m-T*h,d}function ge(d,s,c){var h=Math.sin(c),m=Math.cos(c),y=s[0],v=s[1],w=s[2],T=s[3],A=s[8],M=s[9],O=s[10],N=s[11];return s!==d&&(d[4]=s[4],d[5]=s[5],d[6]=s[6],d[7]=s[7],d[12]=s[12],d[13]=s[13],d[14]=s[14],d[15]=s[15]),d[0]=y*m-A*h,d[1]=v*m-M*h,d[2]=w*m-O*h,d[3]=T*m-N*h,d[8]=y*h+A*m,d[9]=v*h+M*m,d[10]=w*h+O*m,d[11]=T*h+N*m,d}function Re(d,s,c){var h=Math.sin(c),m=Math.cos(c),y=s[0],v=s[1],w=s[2],T=s[3],A=s[4],M=s[5],O=s[6],N=s[7];return s!==d&&(d[8]=s[8],d[9]=s[9],d[10]=s[10],d[11]=s[11],d[12]=s[12],d[13]=s[13],d[14]=s[14],d[15]=s[15]),d[0]=y*m+A*h,d[1]=v*m+M*h,d[2]=w*m+O*h,d[3]=T*m+N*h,d[4]=A*m-y*h,d[5]=M*m-v*h,d[6]=O*m-w*h,d[7]=N*m-T*h,d}function Se(d,s){return d[0]=s[0],d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=s[1],d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=s[2],d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d}function fe(d,s,c){var h,m,y,v=c[0],w=c[1],T=c[2],A=Math.sqrt(v*v+w*w+T*T);return A0&&(y=1/Math.sqrt(y)),d[0]=s[0]*y,d[1]=s[1]*y,d[2]=s[2]*y,d}function Gn(d,s){return d[0]*s[0]+d[1]*s[1]+d[2]*s[2]}function Wi(d,s,c){var h=s[0],m=s[1],y=s[2],v=c[0],w=c[1],T=c[2];return d[0]=m*T-y*w,d[1]=y*v-h*T,d[2]=h*w-m*v,d}function An(d,s,c,h){var m=s[0],y=s[1],v=s[2];return d[0]=m+h*(c[0]-m),d[1]=y+h*(c[1]-y),d[2]=v+h*(c[2]-v),d}function Vn(d,s,c){var h=s[0],m=s[1],y=s[2],v=c[3]*h+c[7]*m+c[11]*y+c[15];return d[0]=(c[0]*h+c[4]*m+c[8]*y+c[12])/(v=v||1),d[1]=(c[1]*h+c[5]*m+c[9]*y+c[13])/v,d[2]=(c[2]*h+c[6]*m+c[10]*y+c[14])/v,d}function Fn(d,s,c){var h=s[0],m=s[1],y=s[2];return d[0]=h*c[0]+m*c[3]+y*c[6],d[1]=h*c[1]+m*c[4]+y*c[7],d[2]=h*c[2]+m*c[5]+y*c[8],d}function Lo(d,s,c){var h=c[0],m=c[1],y=c[2],v=c[3],w=s[0],T=s[1],A=s[2],M=m*A-y*T,O=y*w-h*A,N=h*T-m*w;return d[0]=w+v*(M+=M)+m*(N+=N)-y*(O+=O),d[1]=T+v*O+y*M-h*N,d[2]=A+v*N+h*O-m*M,d}function gr(d){return d[0]=0,d[1]=0,d[2]=0,d}function pe(d,s){return d[0]===s[0]&&d[1]===s[1]&&d[2]===s[2]}var Qt=zt,Wt=Bi,at=ht;function Ze(){var d=new p(4);return p!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0,d[3]=0),d}function Dt(d,s,c){return d[0]=s[0]*c,d[1]=s[1]*c,d[2]=s[2]*c,d[3]=s[3]*c,d}function Si(d,s){var c=s[0],h=s[1],m=s[2],y=s[3],v=c*c+h*h+m*m+y*y;return v>0&&(v=1/Math.sqrt(v)),d[0]=c*v,d[1]=h*v,d[2]=m*v,d[3]=y*v,d}function Li(d,s,c){var h=s[0],m=s[1],y=s[2],v=s[3];return d[0]=c[0]*h+c[4]*m+c[8]*y+c[12]*v,d[1]=c[1]*h+c[5]*m+c[9]*y+c[13]*v,d[2]=c[2]*h+c[6]*m+c[10]*y+c[14]*v,d[3]=c[3]*h+c[7]*m+c[11]*y+c[15]*v,d}function Zt(){var d=new p(4);return p!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d[3]=1,d}function sn(d){return d[0]=0,d[1]=0,d[2]=0,d[3]=1,d}function bn(d,s,c){c*=.5;var h=s[0],m=s[1],y=s[2],v=s[3],w=Math.sin(c),T=Math.cos(c);return d[0]=h*T+v*w,d[1]=m*T+y*w,d[2]=y*T-m*w,d[3]=v*T-h*w,d}function nn(d,s,c){c*=.5;var h=s[0],m=s[1],y=s[2],v=s[3],w=Math.sin(c),T=Math.cos(c);return d[0]=h*T-y*w,d[1]=m*T+v*w,d[2]=y*T+h*w,d[3]=v*T-m*w,d}st(),Ze();var Sn,Fo,Yo,ha=Si,cd=(Sn=st(),Fo=ue(1,0,0),Yo=ue(0,1,0),function(d,s,c){var h=Gn(s,c);return h<-.999999?(Wi(Sn,Fo,s),at(Sn)<1e-6&&Wi(Sn,Yo,s),vn(Sn,Sn),(function(m,y,v){v*=.5;var w=Math.sin(v);m[0]=w*y[0],m[1]=w*y[1],m[2]=w*y[2],m[3]=Math.cos(v)})(d,Sn,Math.PI),d):h>.999999?(d[0]=0,d[1]=0,d[2]=0,d[3]=1,d):(Wi(Sn,s,c),d[0]=Sn[0],d[1]=Sn[1],d[2]=Sn[2],d[3]=1+h,ha(d,d))});function rs(){var d=new p(2);return p!=Float32Array&&(d[0]=0,d[1]=0),d}function oa(d,s){var c=new p(2);return c[0]=d,c[1]=s,c}function Es(d,s,c){return d[0]=s,d[1]=c,d}function Uc(d,s,c){return d[0]=s[0]+c[0],d[1]=s[1]+c[1],d}function wd(d,s,c){return d[0]=s[0]-c[0],d[1]=s[1]-c[1],d}function Bl(d,s,c){return d[0]=s[0]*c,d[1]=s[1]*c,d}function lh(d){var s=d[0],c=d[1];return Math.sqrt(s*s+c*c)}function Cs(d,s){var c=s[0],h=s[1],m=c*c+h*h;return m>0&&(m=1/Math.sqrt(m)),d[0]=s[0]*m,d[1]=s[1]*m,d}function rl(d,s){return d[0]*s[0]+d[1]*s[1]}Zt(),Zt(),x();var o_,ch,gc=wd;function dh(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}rs();var Ub=(function(){if(ch)return o_;function d(s,c,h,m){this.cx=3*s,this.bx=3*(h-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(m-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=c,this.p2x=h,this.p2y=m}return ch=1,o_=d,d.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,c){if(c===void 0&&(c=1e-6),s<0)return 0;if(s>1)return 1;for(var h=s,m=0;m<8;m++){var y=this.sampleCurveX(h)-s;if(Math.abs(y)y?w=h:T=h,h=.5*(T-w)+w;return h},solve:function(s,c){return this.sampleCurveY(this.solveCurveX(s,c))}},o_})(),tw=dh(Ub);function ai(d,s){this.x=d,this.y=s}function Zh(d,s){if(Array.isArray(d)){if(!Array.isArray(s)||d.length!==s.length)return!1;for(let c=0;c=1)return 1;let s=d*d,c=s*d;return 4*(d<.5?c:3*(d-s)+c-.75)}function We(d,s,c,h){let m=new tw(d,s,c,h);return function(y){return m.solve(y)}}let He=We(.25,.1,.25,1);function Ue(d,s,c){return Math.min(c,Math.max(s,d))}function Tt(d,s,c){return(c=Ue((c-d)/(s-d),0,1))*c*(3-2*c)}function ot(d,s,c){let h=c-s,m=((d-s)%h+h)%h+s;return m===s?c:m}function Et(d,s,c){if(!d.length)return c(null,[]);let h=d.length,m=new Array(d.length),y=null;d.forEach((v,w)=>{s(v,(T,A)=>{T&&(y=T),m[w]=A,--h==0&&c(y,m)})})}let hi=1;function Xt(){return hi++}function pn(d){return d<=1?1:Math.pow(2,Math.ceil(Math.log2(d)))}function Pn(d,s){d.forEach(c=>{s[c]&&(s[c]=s[c].bind(s))})}function Hn(d,s,c){let h={};for(let m in d)h[m]=s.call(this,d[m],m,d);return h}function Mo(d,s,c){let h={};for(let m in d)s.call(this,d[m],m,d)&&(h[m]=d[m]);return h}function xo(d){return Array.isArray(d)?d.map(xo):typeof d=="object"&&d?Hn(d,xo):d}function No(d,s){for(let c=0;c=0)return!0;return!1}let Xr={};function Ro(d){Xr[d]||(typeof console<"u"&&console.warn(d),Xr[d]=!0)}function Zs(d,s,c){return(c.y-d.y)*(s.x-d.x)>(s.y-d.y)*(c.x-d.x)}function La(d){let s=0;for(let c,h,m=0,y=d.length,v=y-1;m@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(c,h,m,y)=>{let v=m||y;return s[h]=!v||v.toLowerCase(),""}),s["max-age"]){let c=parseInt(s["max-age"],10);isNaN(c)?delete s["max-age"]:s["max-age"]=c}return s}let js=null;function Gs(d,s){return[d[4*s],d[4*s+1],d[4*s+2],d[4*s+3]]}function us(d,s,c,h){for(;s>1;d[m]>1;d[m]<=h?s=m+1:c=m}return s}function Hc(d){return d>0?1/(1.001-d):1+d}function tu(d){return d>0?1-1/(1.001-d):-d}function Yh(d,s,c){return(d-s.min)*(c.max-c.min)/(s.max-s.min)+c.min}let _c={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(!_c.API_URL)return null;try{let d=new URL(_c.API_URL);return d.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":d.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 ey(d){return _c.API_URL_REGEX.test(d)}function bL(d){return _c.API_SPRITE_REGEX.test(d)}let pf,ty,Hb,jb,hf,Gb;function NA(){return pf==null&&(pf=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),pf}let uh={now:()=>jb!==void 0?jb:performance.now(),setNow(d){jb=d},restoreNow(){jb=void 0},frame(d){let s=requestAnimationFrame(d);return{cancel:()=>cancelAnimationFrame(s)}},getImageData(d,s=0){let{width:c,height:h}=d;hf||(hf=document.createElement("canvas"));let m=hf.getContext("2d",{willReadFrequently:!0});if(!m)throw new Error("failed to create canvas 2d context");return(c>hf.width||h>hf.height)&&(hf.width=c,hf.height=h),m.clearRect(-s,-s,c+2*s,h+2*s),m.drawImage(d,0,0,c,h),m.getImageData(-s,-s,c+2*s,h+2*s)},resolveURL:d=>(ty||(ty=document.createElement("a")),ty.href=d,ty.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Hb==null&&(Hb=window.matchMedia("(prefers-reduced-motion: reduce)")),Hb.matches)},hasCanvasFingerprintNoise(){if(Gb!==void 0)return Gb;if(!NA())return Gb=!1,!1;let d=new OffscreenCanvas(85,1),s=d.getContext("2d",{willReadFrequently:!0}),c=0;for(let m=0;m0?`?${y}`:""}`}let iu="mapbox-tiles",wp=500,Qh=50,Sp=["language","worldview","jobid"],jc,r_;function zA(){try{return caches}catch{}}function $b(){let d=zA();d&&jc==null&&(jc=d.open(iu))}let mf=1/0,qb={supported:!1,testSupport:function(d){!nu&&iy&&(VA?ny(d):Wb=d)}},Wb,iy,nu=!1,VA=!1,nw=typeof self<"u"?self:{};function ny(d){let s=d.createTexture();d.bindTexture(d.TEXTURE_2D,s);try{if(d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,iy),d.isContextLost())return;qb.supported=!0}catch{}d.deleteTexture(s),nu=!0}nw.document&&(iy=nw.document.createElement("img"),iy.onload=function(){Wb&&ny(Wb),Wb=null,VA=!0},iy.onerror=function(){nu=!0,Wb=null},iy.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");let ow={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(ow);class UA extends Error{constructor(s,c,h){c===401&&ey(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=c,this.url=h}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}let rw=qr()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,Go=function(d,s){if(!(/^file:/.test(c=d.url)||/^file:/.test(rw())&&!/^\w+:/.test(c))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return(function(h,m){let y=new AbortController,v=new Request(h.url,{method:h.method||"GET",body:h.body,credentials:h.credentials,headers:h.headers,referrer:rw(),referrerPolicy:h.referrerPolicy,signal:y.signal}),w=!1,T=!1,A=(M=v.url).indexOf("sku=")>0&&ey(M);var M;h.type==="json"&&v.headers.set("Accept","application/json");let O=(H,G,ee)=>{if(T)return;if(H&&H.message!=="SecurityError"&&Ro(H.toString()),G&&ee)return N(G);let te=Date.now();fetch(v).then(ie=>{if(ie.ok){let he=A?ie.clone():null;return N(ie,he,te)}return m(new UA(ie.statusText,ie.status,h.url))}).catch(ie=>{ie.name!=="AbortError"&&m(new Error(`${ie.message} ${h.url}`))})},N=(H,G,ee)=>{(h.type==="arrayBuffer"?H.arrayBuffer():h.type==="json"?H.json():H.text()).then(te=>{T||(G&&ee&&(function(ie,he,me){if($b(),jc==null)return;let ye=_r(he.headers.get("Cache-Control")||"");if(ye["no-store"])return;let ze={status:he.status,statusText:he.statusText,headers:new Headers};he.headers.forEach((Ye,it)=>ze.headers.set(it,Ye)),ye["max-age"]&&ze.headers.set("Expires",new Date(me+1e3*ye["max-age"]).toUTCString());let Ve=ze.headers.get("Expires");if(!Ve||new Date(Ve).getTime()-me<42e4)return;let qe=iw(ie.url,{persistentParams:Sp});if(he.status===206){let Ye=ie.headers.get("Range");if(!Ye)return;ze.status=200,qe=BA(qe,{range:Ye})}(function(Ye,it){if(r_===void 0)try{new Response(new ReadableStream),r_=!0}catch{r_=!1}r_?it(Ye.body):Ye.blob().then(it).catch(Ut=>Ro(Ut.message))})(he,Ye=>{let it=new Response((Ut=he.status)!==200&&Ut!==404&&[101,103,204,205,304].includes(Ut)?null:Ye,ze);var Ut;$b(),jc?.then(pt=>pt.put(qe,it)).catch(pt=>Ro(pt.message))})})(v,G,ee),w=!0,m(null,te,H.headers.get("Cache-Control"),H.headers.get("Expires")))}).catch(te=>{T||m(new Error(te.message))})};return A?(function(H,G){if($b(),jc==null)return G(null);jc.then(ee=>{let te=iw(H.url,{persistentParams:Sp}),ie=H.headers.get("Range");ie&&(te=BA(te,{range:ie})),ee.match(te).then(he=>{let me=(function(ye){if(!ye)return!1;let ze=new Date(ye.headers.get("Expires")||0),Ve=_r(ye.headers.get("Cache-Control")||"");return Number(ze)>Date.now()&&!Ve["no-cache"]})(he);ee.delete(te).catch(G),me&&ee.put(te,he.clone()).catch(G),G(null,he,me)}).catch(G)}).catch(G)})(v,O):O(null,null),{cancel:()=>{T=!0,w||y.abort()}}})(d,s);if(qr(self)&&self.worker.actor)return self.worker.actor.send("getResource",d,s,void 0,!0)}var c;return(function(h,m){let y=new XMLHttpRequest;y.open(h.method||"GET",h.url,!0),h.type==="arrayBuffer"&&(y.responseType="arraybuffer");for(let v in h.headers)y.setRequestHeader(v,h.headers[v]);return h.type==="json"&&(y.responseType="text",y.setRequestHeader("Accept","application/json")),y.withCredentials=h.credentials==="include",y.onerror=()=>{m(new Error(y.statusText))},y.onload=()=>{if((y.status>=200&&y.status<300||y.status===0)&&y.response!==null){let v=y.response;if(h.type==="json")try{v=JSON.parse(y.response)}catch(w){return m(w)}m(null,v,y.getResponseHeader("Cache-Control"),y.getResponseHeader("Expires"))}else m(new UA(y.statusText,y.status,h.url))},y.send(h.body),{cancel:()=>y.abort()}})(d,s)},oy=function(d,s){return Go(Object.assign(d,{type:"arrayBuffer"}),s)};function xL(d){let s=document.createElement("a");return s.href=d,s.protocol===location.protocol&&s.host===location.host}let CL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",sw,ff;sw=[],ff=0;let ry=function(d,s){if(qb.supported&&(d.headers||(d.headers={}),d.headers.accept="image/webp,*/*"),ff>=_c.MAX_PARALLEL_IMAGE_REQUESTS){let y={requestParameters:d,callback:s,cancelled:!1,cancel(){this.cancelled=!0}};return sw.push(y),y}ff++;let c=!1,h=()=>{if(!c)for(c=!0,ff--;sw.length&&ff<_c.MAX_PARALLEL_IMAGE_REQUESTS;){let y=sw.shift(),{requestParameters:v,callback:w,cancelled:T}=y;T||(y.cancel=ry(v,w).cancel)}},m=oy(d,(y,v,w,T)=>{h(),y?s(y):v&&(self.createImageBitmap?(function(A,M){let O=new Blob([new Uint8Array(A)],{type:"image/png"});createImageBitmap(O).then(N=>{M(null,N)}).catch(N=>{M(new Error(`Could not load image because of ${N.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})})(v,(A,M)=>s(A,M,w,T)):(function(A,M){let O=new Image;O.onload=()=>{M(null,O),URL.revokeObjectURL(O.src),O.onload=null,requestAnimationFrame(()=>{O.src=CL})},O.onerror=()=>M(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 N=new Blob([new Uint8Array(A)],{type:"image/png"});O.src=A.byteLength?URL.createObjectURL(N):CL})(v,(A,M)=>s(A,M,w,T)))});return{cancel:()=>{m.cancel(),h()}}};var Kb,aw,wL,s_={exports:{}},SL={exports:{}},HA={exports:{}},sy=(function(){if(wL)return s_.exports;wL=1;var d=(Kb||(Kb=1,SL.exports=function(c,h){var m,y,v,w,T,A,M,O;for(y=c.length-(m=3&c.length),v=h,T=3432918353,A=461845907,O=0;O>>16)*T&65535)<<16)&4294967295)<<15|M>>>17))*A+(((M>>>16)*A&65535)<<16)&4294967295)<<13|v>>>19))+((5*(v>>>16)&65535)<<16)&4294967295))+((58964+(w>>>16)&65535)<<16);switch(M=0,m){case 3:M^=(255&c.charCodeAt(O+2))<<16;case 2:M^=(255&c.charCodeAt(O+1))<<8;case 1:v^=M=(65535&(M=(M=(65535&(M^=255&c.charCodeAt(O)))*T+(((M>>>16)*T&65535)<<16)&4294967295)<<15|M>>>17))*A+(((M>>>16)*A&65535)<<16)&4294967295}return v^=c.length,v=2246822507*(65535&(v^=v>>>16))+((2246822507*(v>>>16)&65535)<<16)&4294967295,v=3266489909*(65535&(v^=v>>>13))+((3266489909*(v>>>16)&65535)<<16)&4294967295,(v^=v>>>16)>>>0}),SL.exports),s=(aw||(aw=1,HA.exports=function(c,h){for(var m,y=c.length,v=h^y,w=0;y>=4;)m=1540483477*(65535&(m=255&c.charCodeAt(w)|(255&c.charCodeAt(++w))<<8|(255&c.charCodeAt(++w))<<16|(255&c.charCodeAt(++w))<<24))+((1540483477*(m>>>16)&65535)<<16),v=1540483477*(65535&v)+((1540483477*(v>>>16)&65535)<<16)^(m=1540483477*(65535&(m^=m>>>24))+((1540483477*(m>>>16)&65535)<<16)),y-=4,++w;switch(y){case 3:v^=(255&c.charCodeAt(w+2))<<16;case 2:v^=(255&c.charCodeAt(w+1))<<8;case 1:v=1540483477*(65535&(v^=255&c.charCodeAt(w)))+((1540483477*(v>>>16)&65535)<<16)}return v=1540483477*(65535&(v^=v>>>13))+((1540483477*(v>>>16)&65535)<<16),(v^=v>>>15)>>>0}),HA.exports);return s_.exports=d,s_.exports.murmur3=d,s_.exports.murmur2=s,s_.exports})(),lw=dh(sy);class Ip{constructor(s,...c){Object.assign(this,c[0]||{}),this.type=s}}class Zb extends Ip{constructor(s,c={}){super("error",Object.assign({error:s},c))}}function cw(d,s,c){c[d]&&c[d].indexOf(s)!==-1||(c[d]=c[d]||[],c[d].push(s))}function ou(d,s,c){if(c&&c[d]){let h=c[d].indexOf(s);h!==-1&&c[d].splice(h,1)}}class a_{on(s,c){return this._listeners=this._listeners||{},cw(s,c,this._listeners),this}off(s,c){return ou(s,c,this._listeners),ou(s,c,this._oneTimeListeners),this}once(s,c){return c?(this._oneTimeListeners=this._oneTimeListeners||{},cw(s,c,this._oneTimeListeners),this):new Promise(h=>{this.once(s,h)})}fire(s,c){let h=typeof s=="string"?new Ip(s,c):s,m=h.type;if(this.listens(m)){h.target=this;let y=this._listeners&&this._listeners[m]?this._listeners[m].slice():[];for(let T of y)T.call(this,h);let v=this._oneTimeListeners&&this._oneTimeListeners[m]?this._oneTimeListeners[m].slice():[];for(let T of v)ou(m,T,this._oneTimeListeners),T.call(this,h);let w=this._eventedParent;if(w){let T=typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData;Object.assign(h,T),w.fire(h)}}else h instanceof Zb&&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,c){return this._eventedParent=s,this._eventedParentData=c,this}}class ru{constructor(s){typeof s=="string"?this.name=s:(this.name=s.name,this.iconsetId=s.iconsetId)}static from(s){return new ru(s)}static toString(s){return s.iconsetId?`${s.name}${s.iconsetId}`:s.name}static parse(s){let[c,h]=s.split("");return new ru({name:c,iconsetId:h})}static isEqual(s,c){return s.name===c.name&&s.iconsetId===c.iconsetId}toString(){return ru.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var jA,dw={},GA=(function(){if(jA)return dw;jA=1;var d={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(y){return(y=Math.round(y))<0?0:y>255?255:y}function c(y){return s(y[y.length-1]==="%"?parseFloat(y)/100*255:parseInt(y))}function h(y){return(v=y[y.length-1]==="%"?parseFloat(y)/100:parseFloat(y))<0?0:v>1?1:v;var v}function m(y,v,w){return w<0?w+=1:w>1&&(w-=1),6*w<1?y+(v-y)*w*6:2*w<1?v:3*w<2?y+(v-y)*(2/3-w)*6:y}try{dw.parseCSSColor=function(y){var v,w=y.replace(/ /g,"").toLowerCase();if(w in d)return d[w].slice();if(w[0]==="#")return w.length===4?(v=parseInt(w.substr(1),16))>=0&&v<=4095?[(3840&v)>>4|(3840&v)>>8,240&v|(240&v)>>4,15&v|(15&v)<<4,1]:null:w.length===7&&(v=parseInt(w.substr(1),16))>=0&&v<=16777215?[(16711680&v)>>16,(65280&v)>>8,255&v,1]:null;var T=w.indexOf("("),A=w.indexOf(")");if(T!==-1&&A+1===w.length){var M=w.substr(0,T),O=w.substr(T+1,A-(T+1)).split(","),N=1;switch(M){case"rgba":if(O.length!==4)return null;N=h(O.pop());case"rgb":return O.length!==3?null:[c(O[0]),c(O[1]),c(O[2]),N];case"hsla":if(O.length!==4)return null;N=h(O.pop());case"hsl":if(O.length!==3)return null;var H=(parseFloat(O[0])%360+360)%360/360,G=h(O[1]),ee=h(O[2]),te=ee<=.5?ee*(G+1):ee+G-ee*G,ie=2*ee-te;return[s(255*m(ie,te,H+1/3)),s(255*m(ie,te,H)),s(255*m(ie,te,H-1/3)),N];default:return null}}return null}}catch{}return dw})();class Cr{constructor(s,c,h,m=1){this.r=s,this.g=c,this.b=h,this.a=m}static parse(s){if(!s)return;if(s instanceof Cr)return s;if(typeof s!="string")return;let c=GA.parseCSSColor(s);return c?new Cr(c[0]/255,c[1]/255,c[2]/255,c[3]):void 0}toString(){let[s,c,h,m]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*s)},${Math.round(255*c)},${Math.round(255*h)},${m})`}toNonPremultipliedRenderColor(s){let{r:c,g:h,b:m,a:y}=this;return new IL(s,c,h,m,y)}toPremultipliedRenderColor(s){let{r:c,g:h,b:m,a:y}=this;return new uw(s,c*y,h*y,m*y,y)}clone(){return new Cr(this.r,this.g,this.b,this.a)}}class $A{constructor(s,c,h,m,y,v=!1){if(this.premultiplied=!1,this.premultiplied=v,s){let w=s.image.height,T=w*w;this.premultiplied?(c=y===0?0:c/y*(w-1),h=y===0?0:h/y*(w-1),m=y===0?0:m/y*(w-1)):(c*=w-1,h*=w-1,m*=w-1);let A=Math.floor(c),M=Math.floor(h),O=Math.floor(m),N=Math.ceil(c),H=Math.ceil(h),G=Math.ceil(m),ee=c-A,te=h-M,ie=m-O,he=s.image.data,me=4*(A+M*T+O*w),ye=4*(A+M*T+G*w),ze=4*(A+H*T+O*w),Ve=4*(A+H*T+G*w),qe=4*(N+M*T+O*w),Ye=4*(N+M*T+G*w),it=4*(N+H*T+O*w),Ut=4*(N+H*T+G*w);if(me<0||Ut>=he.length)throw new Error("out of range");this.r=En(En(En(he[me],he[ye],ie),En(he[ze],he[Ve],ie),te),En(En(he[qe],he[Ye],ie),En(he[it],he[Ut],ie),te),ee)/255*(this.premultiplied?y:1),this.g=En(En(En(he[me+1],he[ye+1],ie),En(he[ze+1],he[Ve+1],ie),te),En(En(he[qe+1],he[Ye+1],ie),En(he[it+1],he[Ut+1],ie),te),ee)/255*(this.premultiplied?y:1),this.b=En(En(En(he[me+2],he[ye+2],ie),En(he[ze+2],he[Ve+2],ie),te),En(En(he[qe+2],he[Ye+2],ie),En(he[it+2],he[Ut+2],ie),te),ee)/255*(this.premultiplied?y:1),this.a=y}else this.r=c,this.g=h,this.b=m,this.a=y}toArray(){let{r:s,g:c,b:h,a:m}=this;return[255*s,255*c,255*h,m]}toHslaArray(){let{r:s,g:c,b:h,a:m}=this;if(this.premultiplied){if(m===0)return[0,0,0,0];let G=1/m;s*=G,c*=G,h*=G}let y=Math.min(Math.max(s,0),1),v=Math.min(Math.max(c,0),1),w=Math.min(Math.max(h,0),1),T=Math.min(y,v,w),A=Math.max(y,v,w),M=A-T,O=.5*(T+A);if(M===0)return[0,0,100*O,m];let N=O>.5?M/(2-A-T):M/(A+T),H;switch(A){case y:H=60*((v-w)/M+(vEn(h,s[m],c))}Cr.black=new Cr(0,0,0,1),Cr.white=new Cr(1,1,1,1),Cr.transparent=new Cr(0,0,0,0),Cr.red=new Cr(1,0,0,1),Cr.blue=new Cr(0,0,1,1);var su=Object.freeze({__proto__:null,array:qA,color:function(d,s,c){return new Cr(En(d.r,s.r,c),En(d.g,s.g,c),En(d.b,s.b,c),En(d.a,s.a,c))},number:En});class Tp extends Error{constructor(s,c){super(c),this.message=c,this.key=s}}class pw{constructor(s,c=[]){this.parent=s,this.bindings={};for(let[h,m]of c)this.bindings[h]=m}concat(s){return new pw(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 ph={kind:"null"},cn={kind:"number"},wr={kind:"string"},Ar={kind:"boolean"},Sd={kind:"color"},l_={kind:"object"},ur={kind:"value"},hw={kind:"collator"},gf={kind:"formatted"},Yb={kind:"resolvedImage"};function yc(d,s){return{kind:"array",itemType:d,N:s}}function Na(d){if(d.kind==="array"){let s=Na(d.itemType);return typeof d.N=="number"?`array<${s}, ${d.N}>`:d.itemType.kind==="value"?"array":`array<${s}>`}return d.kind}let l8=[ph,cn,wr,Ar,Sd,gf,l_,yc(ur),Yb];function Qb(d,s){if(s.kind==="error")return null;if(d.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!Qb(d.itemType,s.itemType))&&(typeof d.N!="number"||d.N===s.N))return null}else{if(d.kind===s.kind)return null;if(d.kind==="value"){for(let c of l8)if(!Qb(c,s))return null}}return`Expected ${Na(d)} but found ${Na(s)} instead.`}function WA(d,s){return s.some(c=>c.kind===d.kind)}function Xb(d,s){return s.some(c=>c==="null"?d===null:c==="array"?Array.isArray(d):c==="object"?d&&!Array.isArray(d)&&typeof d=="object":c===typeof d)}function Jb(d,s){return d.kind==="array"&&s.kind==="array"?d.N===s.N&&Jb(d.itemType,s.itemType):d.kind===s.kind}class _f{constructor(s,c,h){this.sensitivity=s?c?"variant":"case":c?"accent":"base",this.locale=h,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(s,c){return this.collator.compare(s,c)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class mw{constructor(s,c,h,m,y){this.text=s.normalize?s.normalize():s,this.image=c,this.scale=h,this.fontStack=m,this.textColor=y}}class Gc{constructor(s){this.sections=s}static fromString(s){return new Gc([new mw(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 Gc?s:Gc.fromString(s)}toString(){return this.sections.length===0?"":this.sections.map(s=>s.text).join("")}serialize(){let s=["format"];for(let c of this.sections){if(c.image){let m=c.image.getPrimary().id.toString();s.push(["image",m]);continue}s.push(c.text);let h={};c.fontStack&&(h["text-font"]=["literal",c.fontStack.split(",")]),c.scale&&(h["font-scale"]=c.scale),c.textColor&&(h["text-color"]=["rgba"].concat(c.textColor.toNonPremultipliedRenderColor(null).toArray())),s.push(h)}return s}}class Ep{constructor(s,c={}){if(this.id=ru.from(s),this.options=Object.assign({},c),c.transform){let{a:h,b:m,c:y,d:v,e:w,f:T}=c.transform;this.options.transform=new DOMMatrix([h,m,y,v,w,T])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){let{a:s,b:c,c:h,d:m,e:y,f:v}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a:s,b:c,c:h,d:m,e:y,f:v}})}static parse(s){let c,h,m,y;try{({name:c,iconsetId:h,params:m,transform:y}=JSON.parse(s)||{})}catch{return null}if(!c)return null;let{a:v,b:w,c:T,d:A,e:M,f:O}=y||{};return new Ep({name:c,iconsetId:h},{params:m,transform:new DOMMatrix([v,w,T,A,M,O])})}scaleSelf(s,c){return this.options.transform.scaleSelf(s,c),this}}class dd{constructor(s,c,h,m,y=!1){this.primaryId=ru.from(s),this.primaryOptions=c,h&&(this.secondaryId=ru.from(h)),this.secondaryOptions=m,this.available=y}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Ep(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Ep(this.secondaryId,this.secondaryOptions):null}static from(s){return typeof s=="string"?dd.build({name:s}):s}static build(s,c,h,m){return!s||typeof s=="object"&&!("name"in s)?null:new dd(s,h,c,m)}}function TL(d,s,c,h){return typeof d=="number"&&d>=0&&d<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof c=="number"&&c>=0&&c<=255?h===void 0||typeof h=="number"&&h>=0&&h<=1?null:`Invalid rgba value [${[d,s,c,h].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof h=="number"?[d,s,c,h]:[d,s,c]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ay(d){if(d===null||typeof d=="string"||typeof d=="boolean"||typeof d=="number"||d instanceof Cr||d instanceof _f||d instanceof Gc||d instanceof dd)return!0;if(Array.isArray(d)){for(let s of d)if(!ay(s))return!1;return!0}if(typeof d=="object"){for(let s in d)if(!ay(d[s]))return!1;return!0}return!1}function sl(d){if(d===null)return ph;if(typeof d=="string")return wr;if(typeof d=="boolean")return Ar;if(typeof d=="number")return cn;if(d instanceof Cr)return Sd;if(d instanceof _f)return hw;if(d instanceof Gc)return gf;if(d instanceof dd)return Yb;if(Array.isArray(d)){let s=d.length,c;for(let h of d){let m=sl(h);if(c){if(c===m)continue;c=ur;break}c=m}return yc(c||ur,s)}return l_}function ud(d){let s=typeof d;return d===null?"":s==="string"||s==="number"||s==="boolean"?String(d):d instanceof Gc||d instanceof dd||d instanceof Cr?d.toString():JSON.stringify(d)}class so{constructor(s,c){this.type=s,this.value=c}static parse(s,c){if(s.length!==2)return c.error(`'literal' expression requires exactly one argument, but found ${s.length-1} instead.`);if(!ay(s[1]))return c.error("invalid value");let h=s[1],m=sl(h),y=c.expectedType;return m.kind!=="array"||m.N!==0||!y||y.kind!=="array"||typeof y.N=="number"&&y.N!==0||(m=y),new so(m,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 Cr?["rgba"].concat(this.value.toNonPremultipliedRenderColor(null).toArray()):this.value instanceof Gc?this.value.serialize():this.value}}class Vi{constructor(s){this.name="ExpressionEvaluationError",this.message=s}toJSON(){return this.message}}let ex={string:wr,number:cn,boolean:Ar,object:l_};class Mn{constructor(s,c){this.type=s,this.args=c}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");let h,m=1,y=s[0];if(y==="array"){let w,T;if(s.length>2){let A=s[1];if(typeof A!="string"||!(A in ex)||A==="object")return c.error('The item type argument of "array" must be one of string, number, boolean',1);w=ex[A],m++}else w=ur;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return c.error('The length argument to "array" must be a positive integer literal',2);T=s[2],m++}h=yc(w,T)}else h=ex[y];let v=[];for(;ms.outputDefined())}serialize(){let s=this.type,c=[s.kind];if(s.kind==="array"){let h=s.itemType;if(h.kind==="string"||h.kind==="number"||h.kind==="boolean"){c.push(h.kind);let m=s.N;(typeof m=="number"||this.args.length>1)&&c.push(m)}}return c.concat(this.args.map(h=>h.serialize()))}}class c_{constructor(s){this.type=gf,this.sections=s}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");let h=s[1];if(!Array.isArray(h)&&typeof h=="object")return c.error("First argument must be an image or text section.");let m=[],y=!1;for(let v=1;v<=s.length-1;++v){let w=s[v];if(y&&typeof w=="object"&&!Array.isArray(w)){y=!1;let T=null;if(w["font-scale"]&&(T=c.parseObjectValue(w["font-scale"],v,"font-scale",cn),!T))return null;let A=null;if(w["text-font"]&&(A=c.parseObjectValue(w["text-font"],v,"text-font",yc(wr)),!A))return null;let M=null;if(w["text-color"]&&(M=c.parseObjectValue(w["text-color"],v,"text-color",Sd),!M))return null;let O=m[m.length-1];O.scale=T,O.font=A,O.textColor=M}else{let T=c.parse(s[v],v,ur);if(!T)return null;let A=T.type.kind;if(A!=="string"&&A!=="value"&&A!=="null"&&A!=="resolvedImage")return c.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");y=!0,m.push({content:T,scale:null,font:null,textColor:null})}}return new c_(m)}evaluate(s){return new Gc(this.sections.map(c=>{let h=c.content.evaluate(s);return Jb(sl(h),Yb)?new mw("",h,null,null,null):new mw(ud(h),null,c.scale?c.scale.evaluate(s):null,c.font?c.font.evaluate(s).join(","):null,c.textColor?c.textColor.evaluate(s):null)}))}eachChild(s){for(let c of this.sections)s(c.content),c.scale&&s(c.scale),c.font&&s(c.font),c.textColor&&s(c.textColor)}outputDefined(){return!1}serialize(){let s=["format"];for(let c of this.sections){s.push(c.content.serialize());let h={};c.scale&&(h["font-scale"]=c.scale.serialize()),c.font&&(h["text-font"]=c.font.serialize()),c.textColor&&(h["text-color"]=c.textColor.serialize()),s.push(h)}return s}}class ly{constructor(s,c,h,m){this._imageWarnHistory={},this.type=Yb,this.namePrimary=s,this.nameSecondary=c,h&&(this.paramsPrimary=h.params,this.iconsetIdPrimary=h.iconset?h.iconset.id:void 0),m&&(this.paramsSecondary=m.params,this.iconsetIdSecondary=m.iconset?m.iconset.id:void 0)}static parse(s,c){if(s.length<2)return c.error("Expected two or more arguments.");let h=1,m=[];function y(){if(hru.isEqual(v,y)),m.available){let v=m.getSecondary()?m.getSecondary().id:null;v&&(m.available=s.availableImages.some(w=>ru.isEqual(w,v)))}}return m}eachChild(s){if(s(this.namePrimary),this.paramsPrimary)for(let c in this.paramsPrimary)this.paramsPrimary[c]&&s(this.paramsPrimary[c]);if(this.nameSecondary&&(s(this.nameSecondary),this.paramsSecondary))for(let c in this.paramsSecondary)this.paramsSecondary[c]&&s(this.paramsSecondary[c])}outputDefined(){return!1}serializeOptions(s,c){let h={};if(c&&(h.iconset={id:c}),s){h.params={};for(let m in s)s[m]&&(h.params[m]=s[m].serialize())}return Object.keys(h).length>0?h:void 0}serialize(){let s=["image",this.namePrimary.serialize()];if(this.paramsPrimary||this.iconsetIdPrimary){let c=this.serializeOptions(this.paramsPrimary,this.iconsetIdPrimary);c&&s.push(c)}if(this.nameSecondary&&(s.push(this.nameSecondary.serialize()),this.paramsSecondary||this.iconsetIdSecondary)){let c=this.serializeOptions(this.paramsSecondary,this.iconsetIdSecondary);c&&s.push(c)}return s}}function Ln(d){return tx(d)?"string":ix(d)?"number":ZA(d)?"boolean":Array.isArray(d)?"array":d===null?"null":KA(d)?"object":typeof d}function KA(d){return d!=null&&!Array.isArray(d)&&typeof d!="function"&&!(d instanceof String||d instanceof Number||d instanceof Boolean)&&typeof d=="object"}function tx(d){return typeof d=="string"||d instanceof String}function ix(d){return typeof d=="number"||d instanceof Number}function ZA(d){return typeof d=="boolean"||d instanceof Boolean}let fw={"to-boolean":Ar,"to-color":Sd,"to-number":cn,"to-string":wr};class ma{constructor(s,c){this.type=s,this.args=c}static parse(s,c){if(s.length<2)return c.error("Expected at least one argument.");let h=s[0],m=[],y=ph;if(h==="to-array"){if(!Array.isArray(s[1]))return null;let v=s[1].length;if(c.expectedType){if(c.expectedType.kind!=="array")return c.error(`Expected ${c.expectedType.kind} but found array.`);y=yc(c.expectedType.itemType,v)}else{if(!(v>0&&ay(s[1][0])))return null;y=yc(sl(s[1][0]),v)}for(let w=0;w4?`Invalid rbga value ${JSON.stringify(c)}: expected an array containing either three or four numeric values.`:TL(c[0],c[1],c[2],c[3]),!h))return new Cr(c[0]/255,c[1]/255,c[2]/255,c[3])}throw new Vi(h||`Could not parse color from value '${typeof c=="string"?c:String(JSON.stringify(c))}'`)}if(this.type.kind==="number"){let c=null;for(let h of this.args){if(c=h.evaluate(s),c===null)return 0;let m=Number(c);if(!isNaN(m))return m}throw new Vi(`Could not convert ${JSON.stringify(c)} to number.`)}return this.type.kind==="formatted"?Gc.fromString(ud(this.args[0].evaluate(s))):this.type.kind==="resolvedImage"?dd.build(ud(this.args[0].evaluate(s))):this.type.kind==="array"?this.args.map(c=>c.evaluate(s)):ud(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 c_([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new ly(this.args[0]).serialize();let s=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(c=>{s.push(c.serialize())}),s}}let YA=["Unknown","Point","LineString","Polygon"];class Xh{constructor(s,c,h){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.scope=s,this.options=c,this.iconImageUseTheme=h}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?YA[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,c=this.featureDistanceData.scale,{x:h,y:m}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(h*c-s[0])+this.featureDistanceData.bearing[1]*(m*c-s[1])}return 0}parseColor(s){let c=this._parseColorCache[s];return c||(c=this._parseColorCache[s]=Cr.parse(s)),c}getConfig(s){return this.options?this.options.get(s):null}}class $c{constructor(s,c,h,m,y){this.name=s,this.type=c,this._evaluate=h,this.args=m,this._overloadIndex=y}evaluate(s){if(!this._evaluate){let c=$c.definitions[this.name];this._evaluate=Array.isArray(c)?c[2]:c.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,c){let h=s[0],m=$c.definitions[h];if(!m)return c.error(`Unknown expression "${h}". If you wanted a literal array, use ["literal", [...]].`,0);let y=Array.isArray(m)?m[0]:m.type,v=Array.isArray(m)?[[m[1],m[2]]]:m.overloads,w=[],T=null,A=-1;for(let[M,O]of v){if(Array.isArray(M)&&M.length!==s.length-1)continue;w.push(M),A++,T=new kw(c.registry,c.path,null,c.scope,void 0,c._scope,c.options,c.iconImageUseTheme);let N=[],H=!1;for(let G=1;GN)).map(yf).join(" | "),O=[];for(let N=1;Nc;){if(h-c>600){let T=h-c+1,A=s-c+1,M=Math.log(T),O=.5*Math.exp(2*M/3),N=.5*Math.sqrt(M*O*(T-O)/T)*(A-T/2<0?-1:1);EL(d,s,Math.max(c,Math.floor(s-A*O/T+N)),Math.min(h,Math.floor(s+(T-A)*O/T+N)),m)}let y=d[s],v=c,w=h;for(nx(d,c,s),m(d[h],y)>0&&nx(d,c,h);v0;)w--}m(d[c],y)===0?nx(d,c,w):(w++,nx(d,w,h)),w<=s&&(c=w+1),s<=w&&(h=w-1)}}function nx(d,s,c){let h=d[s];d[s]=d[c],d[c]=h}function c8(d,s){return ds?1:0}function gw(d){let s=0;for(let c,h,m=0,y=d.length,v=y-1;m=s[2]||d[1]<=s[1]||d[3]>=s[3])}function d8(d,s,c){let h=d[0]-s[0],m=d[1]-s[1],y=d[0]-c[0],v=d[1]-c[1];return h*v-y*m==0&&h*y<=0&&m*v<=0}function dy(d,s,c=!1){let h=!1;for(let w=0,T=s.length;w(m=d)[1]!=(v=G)[1]>m[1]&&m[0]<(v[0]-y[0])*(m[1]-y[1])/(v[1]-y[1])+y[0]&&(h=!h)}}var m,y,v;return h}function AL(d,s,c,h){let m=h[0]-c[0],y=h[1]-c[1],v=(d[0]-c[0])*y-m*(d[1]-c[1]),w=(s[0]-c[0])*y-m*(s[1]-c[1]);return v>0&&w<0||v<0&&w>0}function _w(d,s,c,h){return(m=[h[0]-c[0],h[1]-c[1]])[0]*(y=[s[0]-d[0],s[1]-d[1]])[1]-m[1]*y[0]!=0&&!(!AL(d,s,c,h)||!AL(c,h,d,s));var m,y}function yw(d){let s=new ai(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new ai(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(let h of d[0])s.x>h.x&&(s.x=h.x),s.y>h.y&&(s.y=h.y),c.xc[2]){let m=.5*h,y=d[0]-c[0]>m?-h:c[0]-d[0]>m?h:0;y===0&&(y=d[0]-c[2]>m?-h:c[2]-d[0]>m?h:0),d[0]+=y}cy(s,d)}function ML(d,s,c,h){let m=Math.pow(2,h.z)*vf,y=[h.x*vf,h.y*vf],v=[];if(!d)return v;for(let w of d)for(let T of w){let A=[T.x+y[0],T.y+y[1]];kL(A,s,c,m),v.push(A)}return v}function RL(d,s,c,h){let m=Math.pow(2,h.z)*vf,y=[h.x*vf,h.y*vf],v=[];if(!d)return v;for(let T of d){let A=[];for(let M of T){let O=[M.x+y[0],M.y+y[1]];cy(s,O),A.push(O)}v.push(A)}if(s[2]-s[0]<=m/2){(w=s)[0]=w[1]=1/0,w[2]=w[3]=-1/0;for(let T of v)for(let A of T)kL(A,s,c,m)}var w;return v}class u_{constructor(s,c){this.type=Ar,this.geojson=s,this.geometries=c}static parse(s,c){if(s.length!==2)return c.error(`'within' expression requires exactly one argument, but found ${s.length-1} instead.`);if(ay(s[1])){let h=s[1];if(h.type==="FeatureCollection")for(let m=0;mc)return xw(y,v,(c-(h-w))/w)}return s[s.length-1]}pointToSegmentDistance(s,c,h){let[m,y]=c,v=au(h[0]-m)*this.kx,w=(h[1]-y)*this.ky;if(v!==0||w!==0){let T=(au(s[0]-m)*this.kx*v+(s[1]-y)*this.ky*w)/(v*v+w*w);T>1?(m=h[0],y=h[1]):T>0&&(m+=v/this.kx*T,y+=w/this.ky*T)}return v=au(s[0]-m)*this.kx,w=(s[1]-y)*this.ky,Math.sqrt(v*v+w*w)}pointOnLine(s,c){let h=1/0,m=s[0][0],y=s[0][1],v=0,w=0;for(let T=0;T1?(A=s[T+1][0],M=s[T+1][1]):H>0&&(A+=O/this.kx*H,M+=N/this.ky*H)),O=au(c[0]-A)*this.kx,N=(c[1]-M)*this.ky;let G=O*O+N*N;Gy.index||m.index===y.index&&m.t>y.t){let A=m;m=y,y=A}let v=[m.point],w=m.index+1,T=y.index;!JA(h[w],v[0])&&w<=T&&v.push(h[w]);for(let A=w+1;A<=T;A++)v.push(h[A]);return JA(h[T],y.point)||v.push(y.point),v}lineSliceAlong(s,c,h){let m=0,y=[];for(let v=0;vs&&y.length===0&&y.push(xw(w,T,(s-(m-A))/A)),m>=c)return y.push(xw(w,T,(c-(m-A))/A)),y;m>s&&y.push(T)}return y}bufferPoint(s,c){let h=c/this.ky,m=c/this.kx;return[s[0]-m,s[1]-h,s[0]+m,s[1]+h]}bufferBBox(s,c){let h=c/this.ky,m=c/this.kx;return[s[0]-m,s[1]-h,s[2]+m,s[3]+h]}insideBBox(s,c){return au(s[0]-c[0])>=0&&au(s[0]-c[2])<=0&&s[1]>=c[1]&&s[1]<=c[3]}}function JA(d,s){return d[0]===s[0]&&d[1]===s[1]}function xw(d,s,c){let h=au(s[0]-d[0]);return[d[0]+h*c,d[1]+(s[1]-d[1])*c]}function au(d){for(;d<-180;)d+=360;for(;d>180;)d-=360;return d}class Cw{constructor(s=[],c=(h,m)=>hm?1:0){if(this.data=s,this.length=this.data.length,this.compare=c,this.length>0)for(let h=(this.length>>1)-1;h>=0;h--)this._down(h)}push(s){this.data.push(s),this._up(this.length++)}pop(){if(this.length===0)return;let s=this.data[0],c=this.data.pop();return--this.length>0&&(this.data[0]=c,this._down(0)),s}peek(){return this.data[0]}_up(s){let{data:c,compare:h}=this,m=c[s];for(;s>0;){let y=s-1>>1,v=c[y];if(h(m,v)>=0)break;c[s]=v,s=y}c[s]=m}_down(s){let{data:c,compare:h}=this,m=this.length>>1,y=c[s];for(;s=0)break;c[s]=c[v],s=v}c[s]=y}}var fi=8192;function eD(d,s){return s.dist-d.dist}let hy=100,my=50;function rx(d){let s=[1/0,1/0,-1/0,-1/0];if(s.length!==d.length)return!1;for(let c=0;c=d[0]&&d[1]d[1])return[null,null];let c=sx(d);if(s){if(c===2)return[d,null];let h=Math.floor(c/2);return[[d[0],d[0]+h],[d[0]+h,d[1]]]}{if(c===1)return[d,null];let h=Math.floor(c/2)-1;return[[d[0],d[0]+h],[d[0]+h+1,d[1]]]}}function $u(d,s){let c=[1/0,1/0,-1/0,-1/0];if(!hh(s,d.length))return c;for(let h=s[0];h<=s[1];++h)cy(c,d[h]);return c}function Oo(d){let s=[1/0,1/0,-1/0,-1/0];for(let c=0;cs[2]&&(h=d[0]-s[2]),d[1]>s[3]&&(m=d[1]-s[3]),d[3]=h)return h;if(Ap(m,y)){if(PL(d,s))return 0}else if(PL(s,d))return 0;let v=h;for(let w of d)for(let T=0,A=w.length,M=A-1;T=y)continue;let M=A.range1;if(sx(M)<=w){if(!hh(M,d.length))return NaN;if(s){let O=v8(d,M,c,h);if((y=Math.min(y,O))===0)return y}else for(let O=M[0];O<=M[1];++O){let N=y8(d[O],c,h);if((y=Math.min(y,N))===0)return y}}else{let O=ww(M,s);if(O[0]!==null){let N=fy($u(d,O[0]),T,h);N=v)continue;let O=M.range1,N=M.range2;if(sx(O)<=T&&sx(N)<=A){if(!hh(O,d.length)||!hh(N,c.length))return NaN;if(s&&h?v=Math.min(v,g8(d,O,c,N,m)):s||h?s&&!h?v=Math.min(v,OL(c,N,d,O,m)):!s&&h&&(v=Math.min(v,OL(d,O,c,N,m))):v=Math.min(v,_8(d,O,c,N,m)),v===0)return v}else{let H=ww(O,s),G=ww(N,h);Iw(w,v,m,d,c,H[0],G[0]),Iw(w,v,m,d,c,H[0],G[1]),Iw(w,v,m,d,c,H[1],G[0]),Iw(w,v,m,d,c,H[1],G[1])}}return v}function iD(d,s,c,h,m=1/0){let y=m,v=$u(d,[0,d.length-1]);for(let w of c)if(!(y!==1/0&&fy(v,$u(w,[0,w.length-1]),h)>=y)&&(y=Math.min(y,LL(d,s,w,!0,h,y)),y===0))return y;return y}function Tw(d,s,c,h,m=1/0){let y=m,v=$u(d,[0,d.length-1]);for(let w of c){if(y!==1/0&&fy(v,Oo(w),h)>=y)continue;let T=x8(d,s,w,h,y);if(isNaN(T))return T;if((y=Math.min(y,T))===0)return y}return y}function nD(d){return d==="Point"||d==="MultiPoint"||d==="LineString"||d==="MultiLineString"||d==="Polygon"||d==="MultiPolygon"}class p_{constructor(s,c){this.type=cn,this.geojson=s,this.geometries=c}static parse(s,c){if(s.length!==2)return c.error(`'distance' expression requires either one argument, but found ' ${s.length-1} instead.`);if(ay(s[1])){let h=s[1];if(h.type==="FeatureCollection"){for(let m=0;m{s&&!gy(c)&&(s=!1)}),s}function Ew(d){if(d instanceof $c&&d.name==="feature-state")return!1;let s=!0;return d.eachChild(c=>{s&&!Ew(c)&&(s=!1)}),s}function Aw(d){if(d instanceof yy)return new Set([d.key]);let s=new Set;return d.eachChild(c=>{s=new Set([...s,...Aw(c)])}),s}function _y(d,s){if(d instanceof $c&&s.indexOf(d.name)>=0)return!1;let c=!0;return d.eachChild(h=>{c&&!_y(h,s)&&(c=!1)}),c}function FL(d,s,c){return[d,s,c].filter(Boolean).join("")}function oD(d,s){switch(d){case"string":return ud(s);case"number":return+s;case"boolean":return!!s;case"color":return Cr.parse(s);case"formatted":return Gc.fromString(ud(s));case"resolvedImage":return dd.build(ud(s))}return s}function NL(d,s,c,h){return h!==void 0&&(d=h*Math.round(d/h)),s!==void 0&&dc&&(d=c),d}class yy{constructor(s,c,h,m=!1){this.type=s,this.key=c,this.scope=h,this.featureConstant=m}static parse(s,c){let h=c.expectedType;if(h==null&&(h=ur),s.length<2||s.length>3)return c.error("Invalid number of arguments for 'config' expression.");let m=c.parse(s[1],1);if(!(m instanceof so))return c.error("Key name of 'config' expression must be a string literal.");let y,v=!0,w=ud(m.value);if(s.length>=3){let T=c.parse(s[2],2);if(!(T instanceof so))return c.error("Scope of 'config' expression must be a string literal.");y=ud(T.value)}if(c.options){let T=FL(w,y,c._scope),A=c.options.get(T);A&&(v=gy(A.value||A.default))}return new yy(h,w,y,v)}evaluate(s){let c=FL(this.key,this.scope,s.scope),h=s.getConfig(c);if(!h)return null;let{type:m,value:y,values:v,minValue:w,maxValue:T,stepValue:A}=h,M=h.default.evaluate(s),O=M;if(y){let N=s.scope;s.scope=(N||"").split("").slice(1).join(""),O=y.evaluate(s),s.scope=N}return m&&(O=oD(m,O)),O===void 0||w===void 0&&T===void 0&&A===void 0||(typeof O=="number"?O=NL(O,w,T,A):Array.isArray(O)&&(O=O.map(N=>typeof N=="number"?NL(N,w,T,A):N))),y!==void 0&&O!==void 0&&v&&!v.includes(O)&&(O=M,m&&(O=oD(m,O))),(m&&m!==this.type||O!==void 0&&!Jb(sl(O),this.type))&&(O=oD(this.type.kind,O)),O}eachChild(){}outputDefined(){return!1}serialize(){let s=["config",this.key];return this.scope&&s.concat(this.scope),s}}class Dw{constructor(s,c){this.type=c.type,this.name=s,this.boundExpression=c}static parse(s,c){if(s.length!==2||typeof s[1]!="string")return c.error("'var' expression requires exactly one string literal argument.");let h=s[1];return c.scope.has(h)?new Dw(h,c.scope.get(h)):c.error(`Unknown variable "${h}". Make sure "${h}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(s){return this.boundExpression.evaluate(s)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class kw{constructor(s,c=[],h,m=new pw,y=[],v,w,T){this.registry=s,this.path=c,this.key=c.map(A=>typeof A=="string"?`['${A}']`:`[${A}]`).join(""),this.scope=m,this.errors=y,this.expectedType=h,this._scope=v,this.options=w,this.iconImageUseTheme=T}parse(s,c,h,m,y={}){return c||h?this.concat(c,null,h,m)._parse(s,y):this._parse(s,y)}parseObjectValue(s,c,h,m,y,v={}){return this.concat(c,h,m,y)._parse(s,v)}_parse(s,c){function h(m,y,v){return v==="assert"?new Mn(y,[m]):v==="coerce"?new ma(y,[m]):m}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 m=typeof s[0]=="string"?this.registry[s[0]]:void 0;if(m){let y=m.parse(s,this);if(!y)return null;if(this.expectedType){let v=this.expectedType,w=y.type;if(v.kind!=="string"&&v.kind!=="number"&&v.kind!=="boolean"&&v.kind!=="object"&&v.kind!=="array"||w.kind!=="value")if(v.kind!=="color"&&v.kind!=="formatted"&&v.kind!=="resolvedImage"||w.kind!=="value"&&w.kind!=="string"){if(this.checkSubtype(v,w))return null}else y=h(y,v,c.typeAnnotation||"coerce");else y=h(y,v,c.typeAnnotation||"assert")}if(!(y instanceof so)&&y.type.kind!=="resolvedImage"&&rD(y)){let v=new Xh(this._scope,this.options,this.iconImageUseTheme);try{y=new so(y.type,y.evaluate(v))}catch(w){return this.error(w.message),null}}return y}return ma.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,c,h,m){let y=typeof s=="number"?this.path.concat(s):this.path;y=typeof c=="string"?y.concat(c):y;let v=m?this.scope.concat(m):this.scope;return new kw(this.registry,y,h||null,v,this.errors,this._scope,this.options,this.iconImageUseTheme)}error(s,...c){let h=`${this.key}${c.map(m=>`[${m}]`).join("")}`;this.errors.push(new Tp(h,s))}checkSubtype(s,c){let h=Qb(s,c);return h&&this.error(h),h}}function rD(d){if(d instanceof Dw)return rD(d.boundExpression);if(d instanceof $c&&d.name==="error"||d instanceof Vl||d instanceof u_||d instanceof p_||d instanceof yy)return!1;let s=d instanceof ma||d instanceof Mn,c=!0;return d.eachChild(h=>{c=s?c&&rD(h):c&&h instanceof so}),!!c&&gy(d)&&_y(d,["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 Mw(d,s){let c=d.length-1,h,m,y=0,v=c,w=0;for(;y<=v;)if(w=Math.floor((y+v)/2),h=d[w],m=d[w+1],h<=s){if(w===c||ss))throw new Vi("Input is not a number.");v=w-1}return 0}class ax{constructor(s,c,h){this.type=s,this.input=c,this.labels=[],this.outputs=[];for(let[m,y]of h)this.labels.push(m),this.outputs.push(y)}static parse(s,c){if(s.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return c.error("Expected an even number of arguments.");let h=c.parse(s[1],1,cn);if(!h)return null;let m=[],y=null;c.expectedType&&c.expectedType.kind!=="value"&&(y=c.expectedType);for(let v=1;v=w)return c.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',A);let O=c.parse(T,M,y);if(!O)return null;y=y||O.type,m.push([w,O])}return new ax(y,h,m)}evaluate(s){let c=this.labels,h=this.outputs;if(c.length===1)return h[0].evaluate(s);let m=this.input.evaluate(s);if(m<=c[0])return h[0].evaluate(s);let y=c.length;return m>=c[y-1]?h[y-1].evaluate(s):h[Mw(c,m)].evaluate(s)}eachChild(s){s(this.input);for(let c of this.outputs)s(c)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}serialize(){let s=["step",this.input.serialize()];for(let c=0;c0&&s.push(this.labels[c]),s.push(this.outputs[c].serialize());return s}}let BL=.95047,zL=1.08883,VL=4/29,bf=6/29,UL=3*bf*bf,HL=bf*bf*bf,C8=Math.PI/180,w8=180/Math.PI;function sD(d){return d>HL?Math.pow(d,1/3):d/UL+VL}function Rw(d){return d>bf?d*d*d:UL*(d-VL)}function Ow(d){return 255*(d<=.0031308?12.92*d:1.055*Math.pow(d,1/2.4)-.055)}function xf(d){return(d/=255)<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4)}function aD(d){let s=xf(d.r),c=xf(d.g),h=xf(d.b),m=sD((.4124564*s+.3575761*c+.1804375*h)/BL),y=sD((.2126729*s+.7151522*c+.072175*h)/1);return{l:116*y-16,a:500*(m-y),b:200*(y-sD((.0193339*s+.119192*c+.9503041*h)/zL)),alpha:d.a}}function lD(d){let s=(d.l+16)/116,c=isNaN(d.a)?s:s+d.a/500,h=isNaN(d.b)?s:s-d.b/200;return s=1*Rw(s),c=BL*Rw(c),h=zL*Rw(h),new Cr(Ow(3.2404542*c-1.5371385*s-.4985314*h),Ow(-.969266*c+1.8760108*s+.041556*h),Ow(.0556434*c-.2040259*s+1.0572252*h),d.alpha)}function S8(d,s,c){let h=s-d;return d+c*(h>180||h<-180?h-360*Math.round(h/360):h)}let h_={forward:aD,reverse:lD,interpolate:function(d,s,c){return{l:En(d.l,s.l,c),a:En(d.a,s.a,c),b:En(d.b,s.b,c),alpha:En(d.alpha,s.alpha,c)}}},m_={forward:function(d){let{l:s,a:c,b:h}=aD(d),m=Math.atan2(h,c)*w8;return{h:m<0?m+360:m,c:Math.sqrt(c*c+h*h),l:s,alpha:d.a}},reverse:function(d){let s=d.h*C8,c=d.c;return lD({l:d.l,a:Math.cos(s)*c,b:Math.sin(s)*c,alpha:d.alpha})},interpolate:function(d,s,c){return{h:S8(d.h,s.h,c),c:En(d.c,s.c,c),l:En(d.l,s.l,c),alpha:En(d.alpha,s.alpha,c)}}};var jL=Object.freeze({__proto__:null,hcl:m_,lab:h_});class lu{constructor(s,c,h,m,y){this.type=s,this.operator=c,this.interpolation=h,this.input=m,this.labels=[],this.outputs=[];for(let[v,w]of y)this.labels.push(v),this.outputs.push(w)}static interpolationFactor(s,c,h,m){let y=0;if(s.name==="exponential")y=Pw(c,s.base,h,m);else if(s.name==="linear")y=Pw(c,1,h,m);else if(s.name==="cubic-bezier"){let v=s.controlPoints;y=new tw(v[0],v[1],v[2],v[3]).solve(Pw(c,1,h,m))}return y}static parse(s,c){let[h,m,y,...v]=s;if(!Array.isArray(m)||m.length===0)return c.error("Expected an interpolation type expression.",1);if(m[0]==="linear")m={name:"linear"};else if(m[0]==="exponential"){let A=m[1];if(typeof A!="number")return c.error("Exponential interpolation requires a numeric base.",1,1);m={name:"exponential",base:A}}else{if(m[0]!=="cubic-bezier")return c.error(`Unknown interpolation type ${String(m[0])}`,1,0);{let A=m.slice(1);if(A.length!==4||A.some(M=>typeof M!="number"||M<0||M>1))return c.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);m={name:"cubic-bezier",controlPoints:A}}}if(s.length-1<4)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length-1>3&&(s.length-1)%2!=0)return c.error("Expected an even number of arguments.");if(y=c.parse(y,2,cn),!y)return null;let w=[],T=null;h==="interpolate-hcl"||h==="interpolate-lab"?T=Sd:c.expectedType&&c.expectedType.kind!=="value"&&(T=c.expectedType);for(let A=0;A=M)return c.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',N);let G=c.parse(O,H,T);if(!G)return null;T=T||G.type,w.push([M,G])}return T.kind==="number"||T.kind==="color"||T.kind==="array"&&T.itemType.kind==="number"&&typeof T.N=="number"?new lu(T,h,m,y,w):c.error(`Type ${Na(T)} is not interpolatable.`)}evaluate(s){let c=this.labels,h=this.outputs;if(c.length===1)return h[0].evaluate(s);let m=this.input.evaluate(s);if(m<=c[0])return h[0].evaluate(s);let y=c.length;if(m>=c[y-1])return h[y-1].evaluate(s);let v=Mw(c,m),w=lu.interpolationFactor(this.interpolation,m,c[v],c[v+1]),T=h[v].evaluate(s),A=h[v+1].evaluate(s);return this.operator==="interpolate"?su[this.type.kind.toLowerCase()](T,A,w):this.operator==="interpolate-hcl"?m_.reverse(m_.interpolate(m_.forward(T),m_.forward(A),w)):h_.reverse(h_.interpolate(h_.forward(T),h_.forward(A),w))}eachChild(s){s(this.input);for(let c of this.outputs)s(c)}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 c=[this.operator,s,this.input.serialize()];for(let h=0;hQb(m,w.type));return new lx(v?ur:h,y)}evaluate(s){let c,h=null,m=0;for(let y of this.args){if(m++,h=y.evaluate(s),h&&h instanceof dd&&!h.available&&(c||(c=h),h=null,m===this.args.length))return c;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(c=>{s.push(c.serialize())}),s}}class Lw{constructor(s,c){this.type=c.type,this.bindings=[].concat(s),this.result=c}evaluate(s){return this.result.evaluate(s)}eachChild(s){for(let c of this.bindings)s(c[1]);s(this.result)}static parse(s,c){if(s.length<4)return c.error(`Expected at least 3 arguments, but found ${s.length-1} instead.`);let h=[];for(let y=1;y=h.length)throw new Vi("Array index out of bounds: index exceeds array size");if(c!==Math.floor(c))throw new Vi("Array index must be an integer. Use at-interpolated for fractional indices");return h[c]}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class dD{constructor(s,c,h){this.type=s,this.index=c,this.input=h}static parse(s,c){if(s.length!==3)return c.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=c.parse(s[1],1,cn),m=c.parse(s[2],2,yc(c.expectedType||ur));return h&&m?new dD(m.type.itemType,h,m):null}evaluate(s){let c=this.index.evaluate(s),h=this.input.evaluate(s);if(c<0)throw new Vi(`Array index out of bounds: ${c} < 0.`);if(c>h.length-1)throw new Vi(`Array index out of bounds: ${c} > ${h.length-1}.`);if(c===Math.floor(c))return h[c];let m=Math.floor(c),y=Math.ceil(c),v=h[m],w=h[y];if(typeof v!="number"||typeof w!="number")throw new Vi(`Cannot interpolate between non-number values at index ${c}.`);let T=c-m;return v*(1-T)+w*T}eachChild(s){s(this.index),s(this.input)}outputDefined(){return!1}serialize(){return["at-interpolated",this.index.serialize(),this.input.serialize()]}}class Fw{constructor(s,c){this.type=Ar,this.needle=s,this.haystack=c}static parse(s,c){if(s.length!==3)return c.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=c.parse(s[1],1,ur),m=c.parse(s[2],2,ur);return h&&m?WA(h.type,[Ar,wr,cn,ph,ur])?new Fw(h,m):c.error(`Expected first argument to be of type boolean, string, number or null, but found ${Na(h.type)} instead`):null}evaluate(s){let c=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(h==null)return!1;if(!Xb(c,["boolean","string","number","null"]))throw new Vi(`Expected first argument to be of type boolean, string, number or null, but found ${Na(sl(c))} instead.`);if(!Xb(h,["string","array"]))throw new Vi(`Expected second argument to be of type array or string, but found ${Na(sl(h))} instead.`);return h.indexOf(c)>=0}eachChild(s){s(this.needle),s(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class cx{constructor(s,c,h){this.type=cn,this.needle=s,this.haystack=c,this.fromIndex=h}static parse(s,c){if(s.length<=2||s.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);let h=c.parse(s[1],1,ur),m=c.parse(s[2],2,ur);if(!h||!m)return null;if(!WA(h.type,[Ar,wr,cn,ph,ur]))return c.error(`Expected first argument to be of type boolean, string, number or null, but found ${Na(h.type)} instead`);if(s.length===4){let y=c.parse(s[3],3,cn);return y?new cx(h,m,y):null}return new cx(h,m)}evaluate(s){let c=this.needle.evaluate(s),h=this.haystack.evaluate(s);if(!Xb(c,["boolean","string","number","null"]))throw new Vi(`Expected first argument to be of type boolean, string, number or null, but found ${Na(sl(c))} instead.`);if(!Xb(h,["string","array"]))throw new Vi(`Expected second argument to be of type array or string, but found ${Na(sl(h))} instead.`);if(this.fromIndex){let m=this.fromIndex.evaluate(s);return h.indexOf(c,m)}return h.indexOf(c)}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 vy{constructor(s,c,h,m,y,v){this.inputType=s,this.type=c,this.input=h,this.cases=m,this.outputs=y,this.otherwise=v}static parse(s,c){if(s.length<5)return c.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length%2!=1)return c.error("Expected an even number of arguments.");let h,m;c.expectedType&&c.expectedType.kind!=="value"&&(m=c.expectedType);let y={},v=[];for(let A=2;ANumber.MAX_SAFE_INTEGER)return N.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof G=="number"&&Math.floor(G)!==G)return N.error("Numeric branch labels must be integer values.");if(h){if(N.checkSubtype(h,sl(G)))return null}else h=sl(G);if(y[String(G)]!==void 0)return N.error("Branch labels must be unique.");y[String(G)]=v.length}let H=c.parse(O,A,m);if(!H)return null;m=m||H.type,v.push(H)}let w=c.parse(s[1],1,ur);if(!w)return null;let T=c.parse(s[s.length-1],s.length-1,m);return T?w.type.kind!=="value"&&c.concat(1).checkSubtype(h,w.type)?null:new vy(h,m,w,y,v,T):null}evaluate(s){let c=this.input.evaluate(s);return(Jb(sl(c),this.inputType)&&this.outputs[this.cases[c]]||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()],c=Object.keys(this.cases).sort(),h=[],m={};for(let v of c){let w=m[this.cases[v]];w===void 0?(m[this.cases[v]]=h.length,h.push([this.cases[v],[v]])):h[w][1].push(v)}let y=v=>this.inputType.kind==="number"?Number(v):v;for(let[v,w]of h)s.push(w.length===1?y(w[0]):w.map(y)),s.push(this.outputs[v].serialize());return s.push(this.otherwise.serialize()),s}}class uD{constructor(s,c,h){this.type=s,this.branches=c,this.otherwise=h}static parse(s,c){if(s.length<4)return c.error(`Expected at least 3 arguments, but found only ${s.length-1}.`);if(s.length%2!=0)return c.error("Expected an odd number of arguments.");let h;c.expectedType&&c.expectedType.kind!=="value"&&(h=c.expectedType);let m=[];for(let v=1;vc.outputDefined())&&this.otherwise.outputDefined()}serialize(){let s=["case"];return this.eachChild(c=>{s.push(c.serialize())}),s}}class dx{constructor(s,c,h,m){this.type=s,this.input=c,this.beginIndex=h,this.endIndex=m}static parse(s,c){if(s.length<=2||s.length>=5)return c.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);let h=c.parse(s[1],1,ur),m=c.parse(s[2],2,cn);if(!h||!m)return null;if(!WA(h.type,[yc(ur),wr,ur]))return c.error(`Expected first argument to be of type array or string, but found ${Na(h.type)} instead`);if(s.length===4){let y=c.parse(s[3],3,cn);return y?new dx(h.type,h,m,y):null}return new dx(h.type,h,m)}evaluate(s){let c=this.input.evaluate(s),h=this.beginIndex.evaluate(s);if(!Xb(c,["string","array"]))throw new Vi(`Expected first argument to be of type array or string, but found ${Na(sl(c))} instead.`);if(this.endIndex){let m=this.endIndex.evaluate(s);return c.slice(h,m)}return c.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 pD{constructor(s,c){this.type=yc(wr),this.str=s,this.delimiter=c}static parse(s,c){if(s.length!==3)return c.error(`Expected 2 arguments, but found ${s.length-1} instead.`);let h=c.parse(s[1],1,wr),m=c.parse(s[2],2,wr);return h&&m?new pD(h,m):void 0}evaluate(s){let c=this.str.evaluate(s),h=this.delimiter.evaluate(s);return c.split(h)}eachChild(s){s(this.str),s(this.delimiter)}outputDefined(){return!1}serialize(){return["split",this.str.serialize(),this.delimiter.serialize()]}}function GL(d,s){return d==="=="||d==="!="?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 hD(d,s,c,h){return h.compare(s,c)===0}function f_(d,s,c){let h=d!=="=="&&d!=="!=";return class W0e{constructor(y,v,w){this.type=Ar,this.lhs=y,this.rhs=v,this.collator=w,this.hasUntypedArgument=y.type.kind==="value"||v.type.kind==="value"}static parse(y,v){if(y.length!==3&&y.length!==4)return v.error("Expected two or three arguments.");let w=y[0],T=v.parse(y[1],1,ur);if(!T)return null;if(!GL(w,T.type))return v.concat(1).error(`"${w}" comparisons are not supported for type '${Na(T.type)}'.`);let A=v.parse(y[2],2,ur);if(!A)return null;if(!GL(w,A.type))return v.concat(2).error(`"${w}" comparisons are not supported for type '${Na(A.type)}'.`);if(T.type.kind!==A.type.kind&&T.type.kind!=="value"&&A.type.kind!=="value")return v.error(`Cannot compare types '${Na(T.type)}' and '${Na(A.type)}'.`);h&&(T.type.kind==="value"&&A.type.kind!=="value"?T=new Mn(A.type,[T]):T.type.kind!=="value"&&A.type.kind==="value"&&(A=new Mn(T.type,[A])));let M=null;if(y.length===4){if(T.type.kind!=="string"&&A.type.kind!=="string"&&T.type.kind!=="value"&&A.type.kind!=="value")return v.error("Cannot use collator to compare non-string types.");if(M=v.parse(y[3],3,hw),!M)return null}return new W0e(T,A,M)}evaluate(y){let v=this.lhs.evaluate(y),w=this.rhs.evaluate(y);if(h&&this.hasUntypedArgument){let T=sl(v),A=sl(w);if(T.kind!==A.kind||T.kind!=="string"&&T.kind!=="number")throw new Vi(`Expected arguments for "${d}" to be (string, string) or (number, number), but found (${T.kind}, ${A.kind}) instead.`)}if(this.collator&&!h&&this.hasUntypedArgument){let T=sl(v),A=sl(w);if(T.kind!=="string"||A.kind!=="string")return s(y,v,w)}return this.collator?c(y,v,w,this.collator.evaluate(y)):s(y,v,w)}eachChild(y){y(this.lhs),y(this.rhs),this.collator&&y(this.collator)}outputDefined(){return!0}serialize(){let y=[d];return this.eachChild(v=>{y.push(v.serialize())}),y}}}let I8=f_("==",function(d,s,c){return s===c},hD),T8=f_("!=",function(d,s,c){return s!==c},function(d,s,c,h){return!hD(0,s,c,h)}),E8=f_("<",function(d,s,c){return s",function(d,s,c){return s>c},function(d,s,c,h){return h.compare(s,c)>0}),A8=f_("<=",function(d,s,c){return s<=c},function(d,s,c,h){return h.compare(s,c)<=0}),D8=f_(">=",function(d,s,c){return s>=c},function(d,s,c,h){return h.compare(s,c)>=0});class mD{constructor(s,c,h,m,y,v){this.type=wr,this.number=s,this.locale=c,this.currency=h,this.unit=m,this.minFractionDigits=y,this.maxFractionDigits=v}static parse(s,c){if(s.length!==3)return c.error("Expected two arguments.");let h=c.parse(s[1],1,cn);if(!h)return null;let m=s[2];if(typeof m!="object"||Array.isArray(m))return c.error("NumberFormat options argument must be an object.");let y=null;if(m.locale&&(y=c.parseObjectValue(m.locale,2,"locale",wr),!y))return null;let v=null;if(m.currency&&(v=c.parseObjectValue(m.currency,2,"currency",wr),!v))return null;let w=null;if(m.unit&&(w=c.parseObjectValue(m.unit,2,"unit",wr),!w))return null;let T=null;if(m["min-fraction-digits"]&&(T=c.parseObjectValue(m["min-fraction-digits"],2,"min-fraction-digits",cn),!T))return null;let A=null;return m["max-fraction-digits"]&&(A=c.parseObjectValue(m["max-fraction-digits"],2,"max-fraction-digits",cn),!A)?null:new mD(h,y,v,w,T,A)}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 fD{constructor(s){this.type=cn,this.input=s}static parse(s,c){if(s.length!==2)return c.error(`Expected 1 argument, but found ${s.length-1} instead.`);let h=c.parse(s[1],1);return h?h.type.kind!=="array"&&h.type.kind!=="string"&&h.type.kind!=="value"?c.error(`Expected argument of type string or array, but found ${Na(h.type)} instead.`):new fD(h):null}evaluate(s){let c=this.input.evaluate(s);if(typeof c=="string"||Array.isArray(c))return c.length;throw new Vi(`Expected value to be of type string or array, but found ${Na(sl(c))} instead.`)}eachChild(s){s(this.input)}outputDefined(){return!1}serialize(){let s=["length"];return this.eachChild(c=>{s.push(c.serialize())}),s}}function gD(d){return function(){d=1831565813+(d|=0)|0;let s=Math.imul(d^d>>>15,1|d);return s=s+Math.imul(s^s>>>7,61|s)^s,((s^s>>>14)>>>0)/4294967296}}let by={"==":I8,"!=":T8,">":Nw,"<":E8,">=":D8,"<=":A8,array:Mn,at:cD,"at-interpolated":dD,boolean:Mn,case:uD,coalesce:lx,collator:Vl,format:c_,image:ly,in:Fw,"index-of":cx,interpolate:lu,"interpolate-hcl":lu,"interpolate-lab":lu,length:fD,let:Lw,literal:so,match:vy,number:Mn,"number-format":mD,object:Mn,slice:dx,step:ax,string:Mn,"to-boolean":ma,"to-color":ma,"to-number":ma,"to-string":ma,var:Dw,within:u_,distance:p_,config:yy,split:pD};function $L(d,[s,c,h,m]){s=s.evaluate(d),c=c.evaluate(d),h=h.evaluate(d);let y=m?m.evaluate(d):1,v=TL(s,c,h,y);if(v)throw new Vi(v);return new Cr(s/255,c/255,h/255,y)}function _D(d,[s,c,h,m]){s=s.evaluate(d),c=c.evaluate(d),h=h.evaluate(d);let y=m?m.evaluate(d):1,v=(function(A,M,O,N){return typeof A=="number"&&A>=0&&A<=360?typeof M=="number"&&M>=0&&M<=100&&typeof O=="number"&&O>=0&&O<=100?N===void 0||typeof N=="number"&&N>=0&&N<=1?null:`Invalid hsla value [${[A,M,O,N].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof N=="number"?[A,M,O,N]:[A,M,O]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof N=="number"?[A,M,O,N]:[A,M,O]).join(", ")}]: 'h' must be between 0 and 360.`})(s,c,h,y);if(v)throw new Vi(v);let w=`hsla(${s}, ${c}%, ${h}%, ${y})`,T=Cr.parse(w);if(!T)throw new Vi(`Failed to parse HSLA color: ${w}`);return T}function yD(d,s){return d in s}function Bw(d,s){let c=s[d];return c===void 0?null:c}function g_(d){return{type:d}}function __(d){return{result:"success",value:d}}function Cf(d){return{result:"error",value:d}}function vD(d,s){return!!d&&!!d.parameters&&d.parameters.indexOf(s)>-1}function zw(d){return d["property-type"]==="data-driven"}function bD(d){return vD(d.expression,"measure-light")}function xD(d){return vD(d.expression,"zoom")}function Vw(d){return!!d.expression&&d.expression.interpolated}function Uw(d){return typeof d=="object"&&d!==null&&!Array.isArray(d)}function CD(d){return d}function Hw(d,s){let c=s.type==="color",h=d.stops&&typeof d.stops[0][0]=="object",m=h||!(h||d.property!==void 0),y=d.type||(Vw(s)?"exponential":"interval");if(c&&((d=Object.assign({},d)).stops&&(d.stops=d.stops.map(A=>[A[0],Cr.parse(A[1])])),d.default=Cr.parse(d.default?d.default:s.default)),d.colorSpace&&d.colorSpace!=="rgb"&&!jL[d.colorSpace])throw new Error(`Unknown color space: ${d.colorSpace}`);let v,w,T;if(y==="exponential")v=WL;else if(y==="interval")v=qL;else if(y==="categorical"){v=k8,w=Object.create(null);for(let A of d.stops)w[A[0]]=A[1];T=typeof d.stops[0][0]}else{if(y!=="identity")throw new Error(`Unknown function type "${y}"`);v=M8}if(h){let A={},M=[];for(let H=0;HH[0]),evaluate:({zoom:H},G)=>WL({stops:O,base:d.base},s,H).evaluate(H,G)}}if(m){let A=y==="exponential"?{name:"exponential",base:d.base!==void 0?d.base:1}:null;return{kind:"camera",interpolationType:A,interpolationFactor:lu.interpolationFactor.bind(void 0,A),zoomStops:d.stops.map(M=>M[0]),evaluate:({zoom:M})=>v(d,s,M,w,T)}}return{kind:"source",evaluate(A,M){let O=M&&M.properties?M.properties[d.property]:void 0;return O===void 0?xy(d.default,s.default):v(d,s,O,w,T)}}}function xy(d,s,c){return d!==void 0?d:s!==void 0?s:c!==void 0?c:void 0}function k8(d,s,c,h,m){return xy(typeof c===m?h[c]:void 0,d.default,s.default)}function qL(d,s,c){if(!ix(c))return xy(d.default,s.default);let h=d.stops.length;if(h===1||c<=d.stops[0][0])return d.stops[0][1];if(c>=d.stops[h-1][0])return d.stops[h-1][1];let m=Mw(d.stops.map(y=>y[0]),c);return d.stops[m][1]}function WL(d,s,c){let h=d.base!==void 0?d.base:1;if(!ix(c))return xy(d.default,s.default);let m=d.stops.length;if(m===1||c<=d.stops[0][0])return d.stops[0][1];if(c>=d.stops[m-1][0])return d.stops[m-1][1];let y=Mw(d.stops.map(M=>M[0]),c),v=(function(M,O,N,H){let G=H-N,ee=M-N;return G===0?0:O===1?ee/G:(Math.pow(O,ee)-1)/(Math.pow(O,G)-1)})(c,h,d.stops[y][0],d.stops[y+1][0]),w=d.stops[y][1],T=d.stops[y+1][1],A=su[s.type]||CD;if(d.colorSpace&&d.colorSpace!=="rgb"){let M=jL[d.colorSpace];A=(O,N)=>M.reverse(M.interpolate(M.forward(O),M.forward(N),v))}return typeof w.evaluate=="function"?{evaluate(...M){let O=w.evaluate.apply(void 0,M),N=T.evaluate.apply(void 0,M);if(O!==void 0&&N!==void 0)return A(O,N,v)}}:A(w,T,v)}function M8(d,s,c){return s.type==="color"?c=Cr.parse(c):s.type==="formatted"?c=Gc.fromString(c.toString()):s.type==="resolvedImage"?c=dd.build(c.toString()):Ln(c)===s.type||s.type==="enum"&&s.values[c]||(c=void 0),xy(c,d.default,s.default)}$c.register(by,{error:[{kind:"error"},[wr],(d,[s])=>{throw new Vi(s.evaluate(d))}],typeof:[wr,[ur],(d,[s])=>Na(sl(s.evaluate(d)))],"to-rgba":[yc(cn,4),[Sd],(d,[s])=>s.evaluate(d).toNonPremultipliedRenderColor(null).toArray()],"to-hsla":[yc(cn,4),[Sd],(d,[s])=>s.evaluate(d).toNonPremultipliedRenderColor(null).toHslaArray()],rgb:[Sd,[cn,cn,cn],$L],rgba:[Sd,[cn,cn,cn,cn],$L],hsl:[Sd,[cn,cn,cn],_D],hsla:[Sd,[cn,cn,cn,cn],_D],has:{type:Ar,overloads:[[[wr],(d,[s])=>yD(s.evaluate(d),d.properties())],[[wr,l_],(d,[s,c])=>yD(s.evaluate(d),c.evaluate(d))]]},get:{type:ur,overloads:[[[wr],(d,[s])=>Bw(s.evaluate(d),d.properties())],[[wr,l_],(d,[s,c])=>Bw(s.evaluate(d),c.evaluate(d))]]},"feature-state":[ur,[wr],(d,[s])=>Bw(s.evaluate(d),d.featureState||{})],properties:[l_,[],d=>d.properties()],"geometry-type":[wr,[],d=>d.geometryType()],worldview:[wr,[],d=>d.globals.worldview||""],id:[ur,[],d=>d.id()],zoom:[cn,[],d=>d.globals.zoom],pitch:[cn,[],d=>d.globals.pitch||0],"distance-from-center":[cn,[],d=>d.distanceFromCenter()],"measure-light":[cn,[wr],(d,[s])=>d.measureLight(s.evaluate(d))],"heatmap-density":[cn,[],d=>d.globals.heatmapDensity||0],"line-progress":[cn,[],d=>d.globals.lineProgress||0],"raster-value":[cn,[],d=>d.globals.rasterValue||0],"raster-particle-speed":[cn,[],d=>d.globals.rasterParticleSpeed||0],"sky-radial-progress":[cn,[],d=>d.globals.skyRadialProgress||0],accumulated:[ur,[],d=>d.globals.accumulated===void 0?null:d.globals.accumulated],"+":[cn,g_(cn),(d,s)=>{let c=0;for(let h of s)c+=h.evaluate(d);return c}],"*":[cn,g_(cn),(d,s)=>{let c=1;for(let h of s)c*=h.evaluate(d);return c}],"-":{type:cn,overloads:[[[cn,cn],(d,[s,c])=>s.evaluate(d)-c.evaluate(d)],[[cn],(d,[s])=>-s.evaluate(d)]]},"/":[cn,[cn,cn],(d,[s,c])=>s.evaluate(d)/c.evaluate(d)],"%":[cn,[cn,cn],(d,[s,c])=>s.evaluate(d)%c.evaluate(d)],ln2:[cn,[],()=>Math.LN2],pi:[cn,[],()=>Math.PI],e:[cn,[],()=>Math.E],"^":[cn,[cn,cn],(d,[s,c])=>Math.pow(s.evaluate(d),c.evaluate(d))],sqrt:[cn,[cn],(d,[s])=>Math.sqrt(s.evaluate(d))],log10:[cn,[cn],(d,[s])=>Math.log(s.evaluate(d))/Math.LN10],ln:[cn,[cn],(d,[s])=>Math.log(s.evaluate(d))],log2:[cn,[cn],(d,[s])=>Math.log2(s.evaluate(d))],sin:[cn,[cn],(d,[s])=>Math.sin(s.evaluate(d))],cos:[cn,[cn],(d,[s])=>Math.cos(s.evaluate(d))],tan:[cn,[cn],(d,[s])=>Math.tan(s.evaluate(d))],asin:[cn,[cn],(d,[s])=>Math.asin(s.evaluate(d))],acos:[cn,[cn],(d,[s])=>Math.acos(s.evaluate(d))],atan:[cn,[cn],(d,[s])=>Math.atan(s.evaluate(d))],min:[cn,g_(cn),(d,s)=>Math.min(...s.map(c=>c.evaluate(d)))],max:[cn,g_(cn),(d,s)=>Math.max(...s.map(c=>c.evaluate(d)))],abs:[cn,[cn],(d,[s])=>Math.abs(s.evaluate(d))],round:[cn,[cn],(d,[s])=>{let c=s.evaluate(d);return c<0?-Math.round(-c):Math.round(c)}],floor:[cn,[cn],(d,[s])=>Math.floor(s.evaluate(d))],ceil:[cn,[cn],(d,[s])=>Math.ceil(s.evaluate(d))],"filter-==":[Ar,[wr,ur],(d,[s,c])=>d.properties()[s.value]===c.value],"filter-id-==":[Ar,[ur],(d,[s])=>d.id()===s.value],"filter-type-==":[Ar,[wr],(d,[s])=>d.geometryType()===s.value],"filter-<":[Ar,[wr,ur],(d,[s,c])=>{let h=d.properties()[s.value],m=c.value;return typeof h==typeof m&&h{let c=d.id(),h=s.value;return typeof c==typeof h&&c":[Ar,[wr,ur],(d,[s,c])=>{let h=d.properties()[s.value],m=c.value;return typeof h==typeof m&&h>m}],"filter-id->":[Ar,[ur],(d,[s])=>{let c=d.id(),h=s.value;return typeof c==typeof h&&c>h}],"filter-<=":[Ar,[wr,ur],(d,[s,c])=>{let h=d.properties()[s.value],m=c.value;return typeof h==typeof m&&h<=m}],"filter-id-<=":[Ar,[ur],(d,[s])=>{let c=d.id(),h=s.value;return typeof c==typeof h&&c<=h}],"filter->=":[Ar,[wr,ur],(d,[s,c])=>{let h=d.properties()[s.value],m=c.value;return typeof h==typeof m&&h>=m}],"filter-id->=":[Ar,[ur],(d,[s])=>{let c=d.id(),h=s.value;return typeof c==typeof h&&c>=h}],"filter-has":[Ar,[ur],(d,[s])=>s.value in d.properties()],"filter-has-id":[Ar,[],d=>d.id()!==null&&d.id()!==void 0],"filter-type-in":[Ar,[yc(wr)],(d,[s])=>s.value.indexOf(d.geometryType())>=0],"filter-id-in":[Ar,[yc(ur)],(d,[s])=>s.value.indexOf(d.id())>=0],"filter-in-small":[Ar,[wr,yc(ur)],(d,[s,c])=>c.value.indexOf(d.properties()[s.value])>=0],"filter-in-large":[Ar,[wr,yc(ur)],(d,[s,c])=>(function(h,m,y,v){for(;y<=v;){let w=y+v>>1;if(m[w]===h)return!0;m[w]>h?v=w-1:y=w+1}return!1})(d.properties()[s.value],c.value,0,c.value.length-1)],all:{type:Ar,overloads:[[[Ar,Ar],(d,[s,c])=>s.evaluate(d)&&c.evaluate(d)],[g_(Ar),(d,s)=>{for(let c of s)if(!c.evaluate(d))return!1;return!0}]]},any:{type:Ar,overloads:[[[Ar,Ar],(d,[s,c])=>s.evaluate(d)||c.evaluate(d)],[g_(Ar),(d,s)=>{for(let c of s)if(c.evaluate(d))return!0;return!1}]]},"!":[Ar,[Ar],(d,[s])=>!s.evaluate(d)],"is-supported-script":[Ar,[wr],(d,[s])=>{let c=d.globals&&d.globals.isSupportedScript;return!c||c(s.evaluate(d))}],upcase:[wr,[wr],(d,[s])=>s.evaluate(d).toUpperCase()],downcase:[wr,[wr],(d,[s])=>s.evaluate(d).toLowerCase()],concat:[wr,g_(ur),(d,s)=>s.map(c=>ud(c.evaluate(d))).join("")],"resolved-locale":[wr,[hw],(d,[s])=>s.evaluate(d).resolvedLocale()],random:[cn,[cn,cn,ur],(d,s)=>{let[c,h,m]=s.map(v=>v.evaluate(d));if(c>h||c===h)return c;let y;if(typeof m=="string")y=(function(v){let w=0;if(v.length===0)return w;for(let T=0;TJSON.stringify(O)).join(", ")}, but found ${JSON.stringify(M)} instead.`);return M}catch(M){return this._warningHistory[M.message]||(this._warningHistory[M.message]=!0,typeof console<"u"&&console.warn(`Failed to evaluate expression "${JSON.stringify(this.expression.serialize())}". ${M.message}`)),this._defaultValue}}}function wD(d){return Array.isArray(d)&&d.length>0&&typeof d[0]=="string"&&d[0]in by}function mh(d,s,c,h,m){let y=new kw(by,[],s?(function(w){let T={color:Sd,string:wr,number:cn,enum:wr,boolean:Ar,formatted:gf,resolvedImage:Yb};return w.type==="array"?yc(T[w.value]||ur,w.length):T[w.type]})(s):void 0,void 0,void 0,c,h,m),v=y.parse(d,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return v?__(new jw(v,s,c,h,m)):Cf(y.errors)}class ux{constructor(s,c,h,m){this.kind=s,this._styleExpression=c,this.isLightConstant=h,this.isLineProgressConstant=m,this.isStateDependent=s!=="constant"&&!Ew(c.expression),this.configDependencies=Aw(c.expression)}evaluateWithoutErrorHandling(s,c,h,m,y,v){return this._styleExpression.evaluateWithoutErrorHandling(s,c,h,m,y,v)}evaluate(s,c,h,m,y,v,w){return this._styleExpression.evaluate(s,c,h,m,y,v,void 0,void 0,w)}}class wf{constructor(s,c,h,m,y,v){this.kind=s,this.zoomStops=h,this._styleExpression=c,this.isStateDependent=s!=="camera"&&!Ew(c.expression),this.isLightConstant=y,this.isLineProgressConstant=v,this.configDependencies=Aw(c.expression),this.interpolationType=m}evaluateWithoutErrorHandling(s,c,h,m,y,v){return this._styleExpression.evaluateWithoutErrorHandling(s,c,h,m,y,v)}evaluate(s,c,h,m,y,v){return this._styleExpression.evaluate(s,c,h,m,y,v)}interpolationFactor(s,c,h){return this.interpolationType?lu.interpolationFactor(this.interpolationType,s,c,h):0}}function SD(d,s,c,h,m){if((d=mh(d,s,c,h,m)).result==="error")return d;let y=d.value.expression,v=gy(y);if(!v&&!zw(s))return Cf([new Tp("","data expressions not supported")]);let w=_y(y,["zoom","pitch","distance-from-center"]);if(!w&&!xD(s))return Cf([new Tp("","zoom expressions not supported")]);let T=_y(y,["measure-light"]);if(!T&&!bD(s))return Cf([new Tp("","measure-light expression not supported")]);let A=_y(y,["line-progress"]);if(!A&&!(function(N){return vD(N.expression,"line-progress")})(s))return Cf([new Tp("","line-progress expression not supported")]);let M=s.expression&&s.expression.relaxZoomRestriction,O=$w(y);return O||w||M?O instanceof Tp?Cf([O]):O instanceof lu&&!Vw(s)?Cf([new Tp("",'"interpolate" expressions cannot be used with this property')]):__(O?new wf(v&&A?"camera":"composite",d.value,O.labels,O instanceof lu?O.interpolation:void 0,T,A):new ux(v&&A?"constant":"source",d.value,T,A)):Cf([new Tp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class Gw{constructor(s,c){this._parameters=s,this._specification=c,Object.assign(this,Hw(this._parameters,this._specification))}static deserialize(s){return new Gw(s._parameters,s._specification)}static serialize(s){return{_parameters:s._parameters,_specification:s._specification}}}function $w(d){let s=null;if(d instanceof Lw)s=$w(d.result);else if(d instanceof lx){for(let c of d.args)if(s=$w(c),s)break}else(d instanceof ax||d instanceof lu)&&d.input instanceof $c&&d.input.name==="zoom"&&(s=d);return s instanceof Tp||d.eachChild(c=>{let h=$w(c);h instanceof Tp?s=h:s&&h&&s!==h&&(s=new Tp("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),s}var px,qw,KL=(function(){if(qw)return px;qw=1,px=s;var d=3;function s(c,h,m){var y=this.cells=[];if(c instanceof ArrayBuffer){this.arrayBuffer=c;var v=new Int32Array(this.arrayBuffer);c=v[0],this.d=(h=v[1])+2*(m=v[2]);for(var w=0;w=N[ee+0]&&y>=N[ee+1])?(T[G]=!0,w.push(O[G])):T[G]=!1}}},s.prototype._forEachCell=function(c,h,m,y,v,w,T,A){for(var M=this._convertToCellCoord(c),O=this._convertToCellCoord(h),N=this._convertToCellCoord(m),H=this._convertToCellCoord(y),G=M;G<=N;G++)for(var ee=O;ee<=H;ee++){var te=this.d*ee+G;if((!A||A(this._convertFromCellCoord(G),this._convertFromCellCoord(ee),this._convertFromCellCoord(G+1),this._convertFromCellCoord(ee+1)))&&v.call(this,c,h,m,y,te,w,T,A))return}},s.prototype._convertFromCellCoord=function(c){return(c-this.padding)/this.scale},s.prototype._convertToCellCoord=function(c){return Math.max(0,Math.min(this.d-1,Math.floor(c*this.scale)+this.padding))},s.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var c=this.cells,h=d+this.cells.length+1+1,m=0,y=0;y=0||(m[y]=Sf(d[y],s)));d instanceof Error&&(m.message=d.message)}if(m.$name)throw new Error("$name property is reserved for worker serialization logic.");return h!=="Object"&&(m.$name=h),m}throw new Error("can't serialize object of type "+typeof d)}function If(d){if(d==null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d instanceof Boolean||d instanceof Number||d instanceof String||d instanceof Date||d instanceof RegExp||ID(d)||Jh(d)||ArrayBuffer.isView(d)||d instanceof ImageData)return d;if(Array.isArray(d))return d.map(If);if(typeof d=="object"){let s=d.$name||"Object";if(s==="Map"){let m=d.entries||[],y=new Map;for(let v=0;vd>=128&&d<=255,Arabic:d=>d>=1536&&d<=1791,"Arabic Supplement":d=>d>=1872&&d<=1919,"Arabic Extended-A":d=>d>=2208&&d<=2303,"Hangul Jamo":d=>d>=4352&&d<=4607,"Unified Canadian Aboriginal Syllabics":d=>d>=5120&&d<=5759,Khmer:d=>d>=6016&&d<=6143,"Unified Canadian Aboriginal Syllabics Extended":d=>d>=6320&&d<=6399,"General Punctuation":d=>d>=8192&&d<=8303,"Letterlike Symbols":d=>d>=8448&&d<=8527,"Number Forms":d=>d>=8528&&d<=8591,"Miscellaneous Technical":d=>d>=8960&&d<=9215,"Control Pictures":d=>d>=9216&&d<=9279,"Optical Character Recognition":d=>d>=9280&&d<=9311,"Enclosed Alphanumerics":d=>d>=9312&&d<=9471,"Geometric Shapes":d=>d>=9632&&d<=9727,"Miscellaneous Symbols":d=>d>=9728&&d<=9983,"Miscellaneous Symbols and Arrows":d=>d>=11008&&d<=11263,"CJK Radicals Supplement":d=>d>=11904&&d<=12031,"Kangxi Radicals":d=>d>=12032&&d<=12255,"Ideographic Description Characters":d=>d>=12272&&d<=12287,"CJK Symbols and Punctuation":d=>d>=12288&&d<=12351,Hiragana:d=>d>=12352&&d<=12447,Katakana:d=>d>=12448&&d<=12543,Bopomofo:d=>d>=12544&&d<=12591,"Hangul Compatibility Jamo":d=>d>=12592&&d<=12687,Kanbun:d=>d>=12688&&d<=12703,"Bopomofo Extended":d=>d>=12704&&d<=12735,"CJK Strokes":d=>d>=12736&&d<=12783,"Katakana Phonetic Extensions":d=>d>=12784&&d<=12799,"Enclosed CJK Letters and Months":d=>d>=12800&&d<=13055,"CJK Compatibility":d=>d>=13056&&d<=13311,"CJK Unified Ideographs Extension A":d=>d>=13312&&d<=19903,"Yijing Hexagram Symbols":d=>d>=19904&&d<=19967,"CJK Unified Ideographs":d=>d>=19968&&d<=40959,"Yi Syllables":d=>d>=40960&&d<=42127,"Yi Radicals":d=>d>=42128&&d<=42191,"Hangul Jamo Extended-A":d=>d>=43360&&d<=43391,"Hangul Syllables":d=>d>=44032&&d<=55215,"Hangul Jamo Extended-B":d=>d>=55216&&d<=55295,"Private Use Area":d=>d>=57344&&d<=63743,"CJK Compatibility Ideographs":d=>d>=63744&&d<=64255,"Arabic Presentation Forms-A":d=>d>=64336&&d<=65023,"Vertical Forms":d=>d>=65040&&d<=65055,"CJK Compatibility Forms":d=>d>=65072&&d<=65103,"Small Form Variants":d=>d>=65104&&d<=65135,"Arabic Presentation Forms-B":d=>d>=65136&&d<=65279,"Halfwidth and Fullwidth Forms":d=>d>=65280&&d<=65519,Osage:d=>d>=66736&&d<=66815,"CJK Unified Ideographs Extension B":d=>d>=131072&&d<=173791};function TD(d){for(let s of d)if(Kw(s.charCodeAt(0)))return!0;return!1}function ZL(d){for(let s of d)if(!Ww(s.charCodeAt(0)))return!1;return!0}function Ww(d){return!(Tn.Arabic(d)||Tn["Arabic Supplement"](d)||Tn["Arabic Extended-A"](d)||Tn["Arabic Presentation Forms-A"](d)||Tn["Arabic Presentation Forms-B"](d))}function Kw(d){return!(d!==746&&d!==747&&(d<4352||!(Tn["Bopomofo Extended"](d)||Tn.Bopomofo(d)||Tn["CJK Compatibility Forms"](d)&&!(d>=65097&&d<=65103)||Tn["CJK Compatibility Ideographs"](d)||Tn["CJK Compatibility"](d)||Tn["CJK Radicals Supplement"](d)||Tn["CJK Strokes"](d)||!(!Tn["CJK Symbols and Punctuation"](d)||d>=12296&&d<=12305||d>=12308&&d<=12319||d===12336)||Tn["CJK Unified Ideographs Extension A"](d)||Tn["CJK Unified Ideographs"](d)||Tn["Enclosed CJK Letters and Months"](d)||Tn["Hangul Compatibility Jamo"](d)||Tn["Hangul Jamo Extended-A"](d)||Tn["Hangul Jamo Extended-B"](d)||Tn["Hangul Jamo"](d)||Tn["Hangul Syllables"](d)||Tn.Hiragana(d)||Tn["Ideographic Description Characters"](d)||Tn.Kanbun(d)||Tn["Kangxi Radicals"](d)||Tn["Katakana Phonetic Extensions"](d)||Tn.Katakana(d)&&d!==12540||!(!Tn["Halfwidth and Fullwidth Forms"](d)||d===65288||d===65289||d===65293||d>=65306&&d<=65310||d===65339||d===65341||d===65343||d>=65371&&d<=65503||d===65507||d>=65512&&d<=65519)||!(!Tn["Small Form Variants"](d)||d>=65112&&d<=65118||d>=65123&&d<=65126)||Tn["Unified Canadian Aboriginal Syllabics"](d)||Tn["Unified Canadian Aboriginal Syllabics Extended"](d)||Tn["Vertical Forms"](d)||Tn["Yijing Hexagram Symbols"](d)||Tn["Yi Syllables"](d)||Tn["Yi Radicals"](d))))}function Zw(d){return!(Kw(d)||(function(s){return!!(Tn["Latin-1 Supplement"](s)&&(s===167||s===169||s===174||s===177||s===188||s===189||s===190||s===215||s===247)||Tn["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)||Tn["Letterlike Symbols"](s)||Tn["Number Forms"](s)||Tn["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)||Tn["Control Pictures"](s)&&s!==9251||Tn["Optical Character Recognition"](s)||Tn["Enclosed Alphanumerics"](s)||Tn["Geometric Shapes"](s)||Tn["Miscellaneous Symbols"](s)&&!(s>=9754&&s<=9759)||Tn["Miscellaneous Symbols and Arrows"](s)&&(s>=11026&&s<=11055||s>=11088&&s<=11097||s>=11192&&s<=11243)||Tn["CJK Symbols and Punctuation"](s)||Tn.Katakana(s)||Tn["Private Use Area"](s)||Tn["CJK Compatibility Forms"](s)||Tn["Small Form Variants"](s)||Tn["Halfwidth and Fullwidth Forms"](s)||s===8734||s===8756||s===8757||s>=9984&&s<=10087||s>=10102&&s<=10131||s===65532||s===65533)})(d))}function R8(d){return Tn.Arabic(d)||Tn["Arabic Supplement"](d)||Tn["Arabic Extended-A"](d)||Tn["Arabic Presentation Forms-A"](d)||Tn["Arabic Presentation Forms-B"](d)}function YL(d){return d>=1424&&d<=2303||Tn["Arabic Presentation Forms-A"](d)||Tn["Arabic Presentation Forms-B"](d)}function O8(d,s){return!(!s&&YL(d)||d>=2304&&d<=3583||d>=3840&&d<=4255||Tn.Khmer(d))}function P8(d){for(let s of d)if(YL(s.charCodeAt(0)))return!0;return!1}let Id={unavailable:"unavailable",deferred:"deferred",loading:"loading",parsing:"parsing",parsed:"parsed",loaded:"loaded",error:"error"},ED=null,qc=Id.unavailable,Tf=null,QL=function(d){d&&typeof d=="string"&&d.indexOf("NetworkError")>-1&&(qc=Id.error),ED&&ED(d)};function AD(){DD.fire(new Ip("pluginStateChange",{pluginStatus:qc,pluginURL:Tf}))}let DD=new a_,Yw=function(){return qc},v_=function(){if(qc!==Id.deferred||!Tf)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");qc=Id.loading,AD(),Tf&&oy({url:Tf},d=>{d?QL(d):(qc=Id.loaded,AD())})},fh={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>qc===Id.loaded||fh.applyArabicShaping!=null,isLoading:()=>qc===Id.loading,setState(d){qc=d.pluginStatus,Tf=d.pluginURL},isParsing:()=>qc===Id.parsing,isParsed:()=>qc===Id.parsed,getPluginURL:()=>Tf};class es{constructor(s,c){this.zoom=s,c?(this.now=c.now,this.fadeDuration=c.fadeDuration,this.transition=c.transition,this.pitch=c.pitch,this.brightness=c.brightness,this.worldview=c.worldview):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0,this.brightness=0)}isSupportedScript(s){return(function(c,h){for(let m of c)if(!O8(m.charCodeAt(0),h))return!1;return!0})(s,fh.isLoaded())}}class b_{constructor(s,c,h,m,y){this.property=s,this.value=c,this.expression=(function(v,w,T,A,M){if(Uw(v))return new Gw(v,w);if(wD(v)||Array.isArray(v)&&v.length>0){let O=SD(v,w,T,A,M);if(O.result==="error")throw new Error(O.value.map(N=>`${N.key}: ${N.message}`).join(", "));return O.value}{let O=v;return typeof v=="string"&&w.type==="color"&&(O=Cr.parse(v)),{kind:"constant",configDependencies:new Set,evaluate:()=>O}}})(c===void 0?s.specification.default:c,s.specification,h,m,y)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(s,c,h,m){return this.property.possiblyEvaluate(this,s,c,h,m)}}class kD{constructor(s,c,h,m){this.property=s,this.value=new b_(s,void 0,c,h,m)}transitioned(s,c){return new em(this.property,this.value,c,Object.assign({},s.transition,this.transition),s.now)}untransitioned(){return new em(this.property,this.value,null,{},0)}}class XL{constructor(s,c,h,m){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues),this._scope=c,this._options=h,this._iconImageUseTheme=m,this.configDependencies=new Set}getValue(s){return xo(this._values[s].value.value)}setValue(s,c){this._values.hasOwnProperty(s)||(this._values[s]=new kD(this._values[s].property,this._scope,this._options,this._iconImageUseTheme)),this._values[s].value=new b_(this._values[s].property,c===null?void 0:xo(c),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,c){c&&(this._options=c);let h=this._properties.properties;if(s)for(let m in s){let y=s[m];if(m.endsWith("-transition")){let v=m.slice(0,-11);h[v]&&this.setTransition(v,y)}else h.hasOwnProperty(m)&&this.setValue(m,y)}}getTransition(s){return xo(this._values[s].transition)}setTransition(s,c){this._values.hasOwnProperty(s)||(this._values[s]=new kD(this._values[s].property)),this._values[s].transition=xo(c)||void 0}serialize(){let s={};for(let c of Object.keys(this._values)){let h=this.getValue(c);h!==void 0&&(s[c]=h);let m=this.getTransition(c);m!==void 0&&(s[`${c}-transition`]=m)}return s}transitioned(s,c){let h=new MD(this._properties);for(let m of Object.keys(this._values))h._values[m]=this._values[m].transitioned(s,c._values[m]);return h}untransitioned(){let s=new MD(this._properties);for(let c of Object.keys(this._values))s._values[c]=this._values[c].untransitioned();return s}}class em{constructor(s,c,h,m,y){let v=m.delay||0,w=m.duration||0;y=y||0,this.property=s,this.value=c,this.begin=y+v,this.end=this.begin+w,s.specification.transition&&(m.delay||m.duration)&&(this.prior=h)}possiblyEvaluate(s,c,h){let m=s.now||0,y=this.value.possiblyEvaluate(s,c,h),v=this.prior;if(v){if(m>this.end)return this.prior=null,y;if(this.value.isDataDriven())return this.prior=null,y;if(m":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 Qw(d){return d instanceof Number||d instanceof String||d instanceof Boolean?d.valueOf():d}function S_(d){if(Array.isArray(d))return d.map(S_);if(d instanceof Object&&!(d instanceof Number||d instanceof String||d instanceof Boolean)){let s={};for(let c in d)s[c]=S_(d[c]);return s}return Qw(d)}function Xw(d){if(d===!0||d===!1)return!0;if(!Array.isArray(d)||d.length===0)return!1;switch(d[0]){case"has":return d.length>=2&&d[1]!=="$id"&&d[1]!=="$type";case"in":return d.length>=3&&(typeof d[1]!="string"||Array.isArray(d[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return d.length!==3||Array.isArray(d[1])||Array.isArray(d[2]);case"any":case"all":for(let s of d.slice(1))if(!Xw(s)&&typeof s!="boolean")return!1;return!0;default:return!0}}function hx(d,s="",c=null,h="fill"){if(d==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Xw(d)||(d=Jw(d));let m=d,y=!0;try{y=(function(M){if(!Sy(M))return M;let O=S_(M);return Dp(O),O=JL(O),O})(m)}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(m,null,2)} `)}let v=null,w=null;if(h!=="background"&&h!=="sky"&&h!=="slot"){w=ut[`filter_${h}`];let M=mh(y,w,s,c);if(M.result==="error")throw new Error(M.value.map(O=>`${O.key}: ${O.message}`).join(", "));v=(O,N,H)=>M.value.evaluate(O,N,{},H)}let T=null,A=null;if(y!==m){let M=mh(m,w,s,c);if(M.result==="error")throw new Error(M.value.map(O=>`${O.key}: ${O.message}`).join(", "));T=(O,N,H,G,ee)=>M.value.evaluate(O,N,{},H,void 0,void 0,G,ee),A=!gy(M.value.expression)}return{filter:v,dynamicFilter:T||void 0,needGeometry:tF(y),needFeature:!!A}}function JL(d){if(!Array.isArray(d))return d;let s=(function(c){if(eF.has(c[0])){for(let h=1;hJL(c))}function Dp(d){let s=!1,c=[];if(d[0]==="case"){for(let h=1;h",">=","<","<=","to-boolean"]);function L8(d,s){return ds?1:0}function tF(d){if(!Array.isArray(d))return!1;if(d[0]==="within"||d[0]==="distance")return!0;for(let s=1;s"||s==="<="||s===">="?RD(d[1],d[2],s):s==="any"?(c=d.slice(1),["any"].concat(c.map(Jw))):s==="all"?["all"].concat(d.slice(1).map(Jw)):s==="none"?["all"].concat(d.slice(1).map(Jw).map(eS)):s==="in"?iF(d[1],d.slice(2)):s==="!in"?eS(iF(d[1],d.slice(2))):s==="has"?nF(d[1]):s!=="!has"||eS(nF(d[1]));var c}function RD(d,s,c){switch(d){case"$type":return[`filter-type-${c}`,s];case"$id":return[`filter-id-${c}`,s];default:return[`filter-${c}`,d,s]}}function iF(d,s){if(s.length===0)return!1;switch(d){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(c=>typeof c!=typeof s[0])?["filter-in-large",d,["literal",s.sort(L8)]]:["filter-in-small",d,["literal",s]]}}function nF(d){switch(d){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",d]}}function eS(d){return["!",d]}let mx="";function Iy(d,s){return s?`${d}${mx}${s}`:d}let OD,oF=()=>OD||(OD=new Bs({"icon-size":new Ti(ut.layout_symbol["icon-size"]),"icon-image":new Ti(ut.layout_symbol["icon-image"]),"icon-rotate":new Ti(ut.layout_symbol["icon-rotate"]),"icon-offset":new Ti(ut.layout_symbol["icon-offset"])}));class F8{constructor(s,c,h,m,y,v){let w=mh(s,ut.appearance.condition);if(w.result==="success"&&(this.condition=w.value),this.name=c,h){this.properties=new w_(oF()),this.unevaluatedLayout=new x_(oF(),m,y,v);for(let T in h)this.unevaluatedLayout.setValue(T,h[T])}}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 rF="-transition",sF=new Set(["fill","line","background","hillshade","raster"]);class vc extends a_{constructor(s,c,h,m,y,v){if(super(),this.id=s.id,this.fqid=Iy(this.id,h),this.type=s.type,this.scope=h,this.lut=m,this.options=y,this.iconImageUseTheme=v,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 w=mh(this.filter,ut[`filter_${s.type}`]);w.result!=="error"&&(this.configDependencies=new Set([...this.configDependencies,...w.value.configDependencies]))}if(s.slot&&(this.slot=s.slot),s.appearances&&s.appearances.forEach(w=>{this.appearances.push(new F8(w.condition,w.name,w.properties,this.scope,y,this.iconImageUseTheme))}),c.layout&&(this._unevaluatedLayout=new x_(c.layout,this.scope,y,this.iconImageUseTheme),this.configDependencies=new Set([...this.configDependencies,...this._unevaluatedLayout.configDependencies])),c.paint){this._transitionablePaint=new XL(c.paint,this.scope,y);for(let w in s.paint)this.setPaintProperty(w,s.paint[w]);for(let w in s.layout)this.setLayoutProperty(w,s.layout[w]);this.configDependencies=new Set([...this.configDependencies,...this._transitionablePaint.configDependencies]),this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new w_(c.paint)}}}onAdd(s){}onRemove(s){}isDraped(s){return!this.is3D(!0)&&sF.has(this.type)}getLayoutProperty(s){return s==="visibility"?this.visibility:this._unevaluatedLayout.getValue(s)}setLayoutProperty(s,c){if(this.type==="custom"&&s==="visibility")return void(this.visibility=c);let h=this._unevaluatedLayout;h._properties.properties[s]&&(h.setValue(s,c),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(rF)?this._transitionablePaint.getTransition(s.slice(0,-11)):this._transitionablePaint.getValue(s)}setPaintProperty(s,c){let h=this._transitionablePaint,m=h._properties.properties;if(s.endsWith(rF)){let O=s.slice(0,-11);return m[O]&&h.setTransition(O,c||void 0),!1}if(!m[s])return!1;let y=h._values[s],v=y.value.isDataDriven(),w=y.value;h.setValue(s,c),this.configDependencies=new Set([...this.configDependencies,...h.configDependencies]),this._handleSpecialPaintPropertyUpdate(s);let T=h._values[s].value,A=T.isDataDriven(),M=s.endsWith("pattern")||s==="line-dasharray";return A||v||M||this._handleOverridablePaintPropertyUpdate(s,w,T)}_handleSpecialPaintPropertyUpdate(s){}getProgramIds(){return null}getDefaultProgramParams(s,c,h){return null}_handleOverridablePaintPropertyUpdate(s,c,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,c){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(s,void 0,c,this.iconImageUseTheme)),this.paint=this._transitioningPaint.possiblyEvaluate(s,void 0,c)}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(c=>c.serialize())),Mo(s,(c,h)=>!(c===void 0||h==="layout"&&!Object.keys(c).length||h==="paint"&&!Object.keys(c).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 c=this.paint.get(s);if(c instanceof C_&&zw(c.property.specification)&&(c.value.kind==="source"||c.value.kind==="composite")&&c.value.isStateDependent)return!0}return!1}compileFilter(s){this._filterCompiled||(this._featureFilter=hx(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,c,h,m,y,v,w,T,A){}}let Ef={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ty{constructor(s,c){this._structArray=s,this._pos1=c*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ps{constructor(){this.capacity=-1,this.resize(0)}static serialize(s,c){return s._trim(),c&&c.add(s.arrayBuffer),{length:s.length,arrayBuffer:s.arrayBuffer}}static deserialize(s){let c=Object.create(this.prototype);return c.arrayBuffer=s.arrayBuffer,c.length=s.length,c.capacity=s.arrayBuffer.byteLength/c.bytesPerElement,c._refreshViews(),c}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(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 c=this.uint8;this._refreshViews(),c&&this.uint8.set(c)}}_refreshViews(){throw new Error("StructArray#_refreshViews() must be implemented by each concrete StructArray layout")}emplace(...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 Po(d,s=1){let c=0,h=0;return{members:d.map(m=>{let y=Ef[m.type].BYTES_PER_ELEMENT,v=c=aF(c,Math.max(s,y)),w=m.components||1;return h=Math.max(h,y),c+=y*w,{name:m.name,type:m.type,components:w,offset:v}}),size:aF(c,Math.max(h,s)),alignment:s}}function aF(d,s){return Math.ceil(d/s)*s}class Af extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c){let h=this.length;return this.resize(h+1),this.emplace(h,s,c)}emplace(s,c,h){let m=2*s;return this.int16[m+0]=c,this.int16[m+1]=h,s}}Af.prototype.bytesPerElement=4,Ui(Af,"StructArrayLayout2i4");class I_ extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h){let m=this.length;return this.resize(m+1),this.emplace(m,s,c,h)}emplace(s,c,h,m){let y=3*s;return this.int16[y+0]=c,this.int16[y+1]=h,this.int16[y+2]=m,s}}I_.prototype.bytesPerElement=6,Ui(I_,"StructArrayLayout3i6");class T_ extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h,m){let y=this.length;return this.resize(y+1),this.emplace(y,s,c,h,m)}emplace(s,c,h,m,y){let v=4*s;return this.int16[v+0]=c,this.int16[v+1]=h,this.int16[v+2]=m,this.int16[v+3]=y,s}}T_.prototype.bytesPerElement=8,Ui(T_,"StructArrayLayout4i8");class Df extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s){let c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.float32[1*s+0]=c,s}}Df.prototype.bytesPerElement=4,Ui(Df,"StructArrayLayout1f4");class PD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h){let m=this.length;return this.resize(m+1),this.emplace(m,s,c,h)}emplace(s,c,h,m){let y=4*s,v=2*s;return this.int16[y+0]=c,this.int16[y+1]=h,this.float32[v+1]=m,s}}PD.prototype.bytesPerElement=8,Ui(PD,"StructArrayLayout2i1f8");class tS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h){let m=this.length;return this.resize(m+1),this.emplace(m,s,c,h)}emplace(s,c,h,m){let y=4*s;return this.int16[y+0]=c,this.int16[y+1]=h,this.int16[y+2]=m,s}}tS.prototype.bytesPerElement=8,Ui(tS,"StructArrayLayout3i8");class LD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y){let v=this.length;return this.resize(v+1),this.emplace(v,s,c,h,m,y)}emplace(s,c,h,m,y,v){let w=5*s;return this.int16[w+0]=c,this.int16[w+1]=h,this.int16[w+2]=m,this.int16[w+3]=y,this.int16[w+4]=v,s}}LD.prototype.bytesPerElement=10,Ui(LD,"StructArrayLayout5i10");class iS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w){let T=this.length;return this.resize(T+1),this.emplace(T,s,c,h,m,y,v,w)}emplace(s,c,h,m,y,v,w,T){let A=6*s,M=12*s,O=3*s;return this.int16[A+0]=c,this.int16[A+1]=h,this.uint8[M+4]=m,this.uint8[M+5]=y,this.uint8[M+6]=v,this.uint8[M+7]=w,this.float32[O+2]=T,s}}iS.prototype.bytesPerElement=12,Ui(iS,"StructArrayLayout2i4ub1f12");class pd extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h){let m=this.length;return this.resize(m+1),this.emplace(m,s,c,h)}emplace(s,c,h,m){let y=3*s;return this.float32[y+0]=c,this.float32[y+1]=h,this.float32[y+2]=m,s}}pd.prototype.bytesPerElement=12,Ui(pd,"StructArrayLayout3f12");class kf extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y){let v=this.length;return this.resize(v+1),this.emplace(v,s,c,h,m,y)}emplace(s,c,h,m,y,v){let w=6*s,T=3*s;return this.uint16[w+0]=c,this.uint16[w+1]=h,this.uint16[w+2]=m,this.uint16[w+3]=y,this.float32[T+2]=v,s}}kf.prototype.bytesPerElement=12,Ui(kf,"StructArrayLayout4ui1f12");class Ey extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,h,m){let y=this.length;return this.resize(y+1),this.emplace(y,s,c,h,m)}emplace(s,c,h,m,y){let v=4*s;return this.uint16[v+0]=c,this.uint16[v+1]=h,this.uint16[v+2]=m,this.uint16[v+3]=y,s}}Ey.prototype.bytesPerElement=8,Ui(Ey,"StructArrayLayout4ui8");class nS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v){let w=this.length;return this.resize(w+1),this.emplace(w,s,c,h,m,y,v)}emplace(s,c,h,m,y,v,w){let T=6*s;return this.int16[T+0]=c,this.int16[T+1]=h,this.int16[T+2]=m,this.int16[T+3]=y,this.int16[T+4]=v,this.int16[T+5]=w,s}}nS.prototype.bytesPerElement=12,Ui(nS,"StructArrayLayout6i12");class FD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w,T,A,M,O,N){let H=this.length;return this.resize(H+1),this.emplace(H,s,c,h,m,y,v,w,T,A,M,O,N)}emplace(s,c,h,m,y,v,w,T,A,M,O,N,H){let G=12*s;return this.int16[G+0]=c,this.int16[G+1]=h,this.int16[G+2]=m,this.int16[G+3]=y,this.uint16[G+4]=v,this.uint16[G+5]=w,this.uint16[G+6]=T,this.uint16[G+7]=A,this.int16[G+8]=M,this.int16[G+9]=O,this.int16[G+10]=N,this.int16[G+11]=H,s}}FD.prototype.bytesPerElement=24,Ui(FD,"StructArrayLayout4i4ui4i24");class ND extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v){let w=this.length;return this.resize(w+1),this.emplace(w,s,c,h,m,y,v)}emplace(s,c,h,m,y,v,w){let T=10*s,A=5*s;return this.int16[T+0]=c,this.int16[T+1]=h,this.int16[T+2]=m,this.float32[A+2]=y,this.float32[A+3]=v,this.float32[A+4]=w,s}}ND.prototype.bytesPerElement=20,Ui(ND,"StructArrayLayout3i3f20");class kp extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m){let y=this.length;return this.resize(y+1),this.emplace(y,s,c,h,m)}emplace(s,c,h,m,y){let v=4*s;return this.float32[v+0]=c,this.float32[v+1]=h,this.float32[v+2]=m,this.float32[v+3]=y,s}}kp.prototype.bytesPerElement=16,Ui(kp,"StructArrayLayout4f16");class Ay extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(s){let c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.uint32[1*s+0]=c,s}}Ay.prototype.bytesPerElement=4,Ui(Ay,"StructArrayLayout1ul4");class Ba extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c){let h=this.length;return this.resize(h+1),this.emplace(h,s,c)}emplace(s,c,h){let m=2*s;return this.uint16[m+0]=c,this.uint16[m+1]=h,s}}Ba.prototype.bytesPerElement=4,Ui(Ba,"StructArrayLayout2ui4");class Dy extends ps{_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,c,h,m,y,v,w,T,A,M,O,N,H){let G=this.length;return this.resize(G+1),this.emplace(G,s,c,h,m,y,v,w,T,A,M,O,N,H)}emplace(s,c,h,m,y,v,w,T,A,M,O,N,H,G){let ee=20*s,te=10*s;return this.int16[ee+0]=c,this.int16[ee+1]=h,this.int16[ee+2]=m,this.int16[ee+3]=y,this.int16[ee+4]=v,this.float32[te+3]=w,this.float32[te+4]=T,this.float32[te+5]=A,this.float32[te+6]=M,this.int16[ee+14]=O,this.uint32[te+8]=N,this.uint16[ee+18]=H,this.uint16[ee+19]=G,s}}Dy.prototype.bytesPerElement=40,Ui(Dy,"StructArrayLayout5i4f1i1ul2ui40");class oS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w){let T=this.length;return this.resize(T+1),this.emplace(T,s,c,h,m,y,v,w)}emplace(s,c,h,m,y,v,w,T){let A=8*s;return this.int16[A+0]=c,this.int16[A+1]=h,this.int16[A+2]=m,this.int16[A+4]=y,this.int16[A+5]=v,this.int16[A+6]=w,this.int16[A+7]=T,s}}oS.prototype.bytesPerElement=16,Ui(oS,"StructArrayLayout3i2i2i16");class BD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y){let v=this.length;return this.resize(v+1),this.emplace(v,s,c,h,m,y)}emplace(s,c,h,m,y,v){let w=4*s,T=8*s;return this.float32[w+0]=c,this.float32[w+1]=h,this.float32[w+2]=m,this.int16[T+6]=y,this.int16[T+7]=v,s}}BD.prototype.bytesPerElement=16,Ui(BD,"StructArrayLayout2f1f2i16");class zD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v){let w=this.length;return this.resize(w+1),this.emplace(w,s,c,h,m,y,v)}emplace(s,c,h,m,y,v,w){let T=20*s,A=5*s;return this.uint8[T+0]=c,this.uint8[T+1]=h,this.float32[A+1]=m,this.float32[A+2]=y,this.float32[A+3]=v,this.float32[A+4]=w,s}}zD.prototype.bytesPerElement=20,Ui(zD,"StructArrayLayout2ub4f20");class Za extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,h){let m=this.length;return this.resize(m+1),this.emplace(m,s,c,h)}emplace(s,c,h,m){let y=3*s;return this.uint16[y+0]=c,this.uint16[y+1]=h,this.uint16[y+2]=m,s}}Za.prototype.bytesPerElement=6,Ui(Za,"StructArrayLayout3ui6");class fx extends ps{_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,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze){let Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze)}emplace(s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze,Ve){let qe=30*s,Ye=15*s,it=60*s;return this.int16[qe+0]=c,this.int16[qe+1]=h,this.int16[qe+2]=m,this.float32[Ye+2]=y,this.float32[Ye+3]=v,this.uint16[qe+8]=w,this.uint16[qe+9]=T,this.uint32[Ye+5]=A,this.uint32[Ye+6]=M,this.uint32[Ye+7]=O,this.uint16[qe+16]=N,this.uint16[qe+17]=H,this.uint16[qe+18]=G,this.float32[Ye+10]=ee,this.float32[Ye+11]=te,this.uint8[it+48]=ie,this.uint8[it+49]=he,this.uint8[it+50]=me,this.uint32[Ye+13]=ye,this.int16[qe+28]=ze,this.uint8[it+58]=Ve,s}}fx.prototype.bytesPerElement=60,Ui(fx,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class VD extends ps{_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,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze,Ve,qe,Ye,it,Ut,pt,Gt,ti,$t,Yt,si,Nt){let Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze,Ve,qe,Ye,it,Ut,pt,Gt,ti,$t,Yt,si,Nt)}emplace(s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me,ye,ze,Ve,qe,Ye,it,Ut,pt,Gt,ti,$t,Yt,si,Nt,Jt){let It=20*s,xt=40*s,li=80*s;return this.float32[It+0]=c,this.float32[It+1]=h,this.int16[xt+4]=m,this.int16[xt+5]=y,this.int16[xt+6]=v,this.int16[xt+7]=w,this.int16[xt+8]=T,this.int16[xt+9]=A,this.int16[xt+10]=M,this.int16[xt+11]=O,this.int16[xt+12]=N,this.uint16[xt+13]=H,this.uint16[xt+14]=G,this.uint16[xt+15]=ee,this.uint16[xt+16]=te,this.uint16[xt+17]=ie,this.uint16[xt+18]=he,this.uint16[xt+19]=me,this.uint16[xt+20]=ye,this.uint16[xt+21]=ze,this.uint16[xt+22]=Ve,this.uint16[xt+23]=qe,this.uint16[xt+24]=Ye,this.uint16[xt+25]=it,this.uint16[xt+26]=Ut,this.uint16[xt+27]=pt,this.uint32[It+14]=Gt,this.float32[It+15]=ti,this.float32[It+16]=$t,this.float32[It+17]=Yt,this.float32[It+18]=si,this.uint8[li+76]=Nt,this.uint16[xt+39]=Jt,s}}VD.prototype.bytesPerElement=80,Ui(VD,"StructArrayLayout2f9i15ui1ul4f1ub1ui80");class gx extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v){let w=this.length;return this.resize(w+1),this.emplace(w,s,c,h,m,y,v)}emplace(s,c,h,m,y,v,w){let T=6*s;return this.float32[T+0]=c,this.float32[T+1]=h,this.float32[T+2]=m,this.float32[T+3]=y,this.float32[T+4]=v,this.float32[T+5]=w,s}}gx.prototype.bytesPerElement=24,Ui(gx,"StructArrayLayout6f24");class E_ extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y){let v=this.length;return this.resize(v+1),this.emplace(v,s,c,h,m,y)}emplace(s,c,h,m,y,v){let w=5*s;return this.float32[w+0]=c,this.float32[w+1]=h,this.float32[w+2]=m,this.float32[w+3]=y,this.float32[w+4]=v,s}}E_.prototype.bytesPerElement=20,Ui(E_,"StructArrayLayout5f20");class UD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w){let T=this.length;return this.resize(T+1),this.emplace(T,s,c,h,m,y,v,w)}emplace(s,c,h,m,y,v,w,T){let A=7*s;return this.float32[A+0]=c,this.float32[A+1]=h,this.float32[A+2]=m,this.float32[A+3]=y,this.float32[A+4]=v,this.float32[A+5]=w,this.float32[A+6]=T,s}}UD.prototype.bytesPerElement=28,Ui(UD,"StructArrayLayout7f28");class rS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w,T,A,M,O){let N=this.length;return this.resize(N+1),this.emplace(N,s,c,h,m,y,v,w,T,A,M,O)}emplace(s,c,h,m,y,v,w,T,A,M,O,N){let H=11*s;return this.float32[H+0]=c,this.float32[H+1]=h,this.float32[H+2]=m,this.float32[H+3]=y,this.float32[H+4]=v,this.float32[H+5]=w,this.float32[H+6]=T,this.float32[H+7]=A,this.float32[H+8]=M,this.float32[H+9]=O,this.float32[H+10]=N,s}}rS.prototype.bytesPerElement=44,Ui(rS,"StructArrayLayout11f44");class _x extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w,T,A){let M=this.length;return this.resize(M+1),this.emplace(M,s,c,h,m,y,v,w,T,A)}emplace(s,c,h,m,y,v,w,T,A,M){let O=9*s;return this.float32[O+0]=c,this.float32[O+1]=h,this.float32[O+2]=m,this.float32[O+3]=y,this.float32[O+4]=v,this.float32[O+5]=w,this.float32[O+6]=T,this.float32[O+7]=A,this.float32[O+8]=M,s}}_x.prototype.bytesPerElement=36,Ui(_x,"StructArrayLayout9f36");class ky extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c){let h=this.length;return this.resize(h+1),this.emplace(h,s,c)}emplace(s,c,h){let m=2*s;return this.float32[m+0]=c,this.float32[m+1]=h,s}}ky.prototype.bytesPerElement=8,Ui(ky,"StructArrayLayout2f8");class sS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,c,h,m){let y=this.length;return this.resize(y+1),this.emplace(y,s,c,h,m)}emplace(s,c,h,m,y){let v=6*s;return this.uint32[3*s+0]=c,this.uint16[v+2]=h,this.uint16[v+3]=m,this.uint16[v+4]=y,s}}sS.prototype.bytesPerElement=12,Ui(sS,"StructArrayLayout1ul3ui12");class aS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s){let c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.uint16[1*s+0]=c,s}}aS.prototype.bytesPerElement=2,Ui(aS,"StructArrayLayout1ui2");class HD extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te){let ie=this.length;return this.resize(ie+1),this.emplace(ie,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te)}emplace(s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie){let he=16*s;return this.float32[he+0]=c,this.float32[he+1]=h,this.float32[he+2]=m,this.float32[he+3]=y,this.float32[he+4]=v,this.float32[he+5]=w,this.float32[he+6]=T,this.float32[he+7]=A,this.float32[he+8]=M,this.float32[he+9]=O,this.float32[he+10]=N,this.float32[he+11]=H,this.float32[he+12]=G,this.float32[he+13]=ee,this.float32[he+14]=te,this.float32[he+15]=ie,s}}HD.prototype.bytesPerElement=64,Ui(HD,"StructArrayLayout16f64");class My extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,c,h,m,y,v,w){let T=this.length;return this.resize(T+1),this.emplace(T,s,c,h,m,y,v,w)}emplace(s,c,h,m,y,v,w,T){let A=10*s,M=5*s;return this.uint16[A+0]=c,this.uint16[A+1]=h,this.uint16[A+2]=m,this.uint16[A+3]=y,this.float32[M+2]=v,this.float32[M+3]=w,this.float32[M+4]=T,s}}My.prototype.bytesPerElement=20,Ui(My,"StructArrayLayout4ui3f20");class Ry extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s){let c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.int16[1*s+0]=c,s}}Ry.prototype.bytesPerElement=2,Ui(Ry,"StructArrayLayout1i2");class lS extends ps{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer)}emplaceBack(s){let c=this.length;return this.resize(c+1),this.emplace(c,s)}emplace(s,c){return this.uint8[1*s+0]=c,s}}lS.prototype.bytesPerElement=1,Ui(lS,"StructArrayLayout1ub1");class lF extends Ty{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]}}lF.prototype.size=40;class jD extends Dy{get(s){return new lF(this,s)}}Ui(jD,"CollisionBoxArray");class cF extends Ty{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}}cF.prototype.size=60;class cS extends fx{get(s){return new cF(this,s)}}Ui(cS,"PlacedSymbolArray");class dF extends Ty{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]}}dF.prototype.size=80;class uF extends VD{get(s){return new dF(this,s)}}Ui(uF,"SymbolInstanceArray");class pF extends Df{getoffsetX(s){return this.float32[1*s+0]}}Ui(pF,"GlyphOffsetArray");class hF extends Af{getx(s){return this.int16[2*s+0]}gety(s){return this.int16[2*s+1]}}Ui(hF,"SymbolLineVertexArray");class GD extends Ty{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]}}GD.prototype.size=12;class mF extends sS{get(s){return new GD(this,s)}}Ui(mF,"FeatureIndexArray");class fF extends Ba{geta_centroid_pos0(s){return this.uint16[2*s+0]}geta_centroid_pos1(s){return this.uint16[2*s+1]}}Ui(fF,"FillExtrusionCentroidArray");class gF extends Ty{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]}}gF.prototype.size=6;class _F extends I_{get(s){return new gF(this,s)}}Ui(_F,"FillExtrusionWallArray");let N8=Po([{name:"a_pos",components:2,type:"Int16"}],4),B8=Po([{name:"a_circle_z_offset",components:1,type:"Float32"}],4),z8=Po([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class Ds{constructor(s=[]){this.segments=s}_prepareSegment(s,c,h,m){let y=this.segments[this.segments.length-1];return s>Ds.MAX_VERTEX_ARRAY_LENGTH&&Ro(`Max vertices per segment is ${Ds.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${s}`),(!y||y.vertexLength+s>Ds.MAX_VERTEX_ARRAY_LENGTH||y.sortKey!==m)&&(y={vertexOffset:c,primitiveOffset:h,vertexLength:0,primitiveLength:0},m!==void 0&&(y.sortKey=m),this.segments.push(y)),y}prepareSegment(s,c,h,m){return this._prepareSegment(s,c.length,h.length,m)}get(){return this.segments}destroy(){for(let s of this.segments)for(let c in s.vaos)s.vaos[c].destroy()}static simpleSegment(s,c,h,m){return new Ds([{vertexOffset:s,primitiveOffset:c,vertexLength:h,primitiveLength:m,vaos:{},sortKey:0}])}}function yx(d,s){return 256*(d=Ue(Math.floor(d),0,255))+Ue(Math.floor(s),0,255)}Ds.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ui(Ds,"SegmentVector");let V8=Po([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),U8=Po([{name:"a_pattern_b",components:4,type:"Uint16"}]),dS=Po([{name:"a_dash",components:4,type:"Uint16"}]);class vx{constructor(){this.ids=[],this.uniqueIds=[],this.positions=[],this.indexed=!1}add(s,c,h,m){this.ids.push($D(s)),this.positions.push(c,h,m)}eachPosition(s,c){let h=$D(s),m=0,y=this.ids.length-1;for(;m>1;this.ids[v]>=h?y=v:m=v+1}for(;this.ids[m]===h;)c(this.positions[3*m],this.positions[3*m+1],this.positions[3*m+2]),m++}static serialize(s,c){let h=new Float64Array(s.ids),m=new Uint32Array(s.positions);return qD(h,m,0,h.length-1),c&&(c.add(h.buffer),c.add(m.buffer)),{ids:h,positions:m}}static deserialize(s){let c=new vx,h;c.ids=s.ids,c.positions=s.positions;for(let m of c.ids)m!==h&&c.uniqueIds.push(m),h=m;return c.indexed=!0,c}}function $D(d){let s=+d;return Number.isSafeInteger(s)?s:lw(String(d))}function qD(d,s,c,h){for(;c>1],y=c-1,v=h+1;for(;;){do y++;while(d[y]m);if(y>=v)break;bx(d,y,v),bx(s,3*y,3*v),bx(s,3*y+1,3*v+1),bx(s,3*y+2,3*v+2)}v-c`u_${y}`),this.type=h,this.context=m}setUniform(s,c,h,m,y){let v=m.constantOr(this.value);c.set(s,y,v instanceof Cr?v.toPremultipliedRenderColor(this.lutExpression&&this.lutExpression.kind==="constant"&&this.lutExpression.value==="none"?null:this.context.lut):v)}getBinding(s,c){return this.type==="color"?new yF(s):new ca(s)}}class A_{constructor(s,c){this.uniformNames=c.map(h=>`u_${h}`),this.pattern=null,this.patternTransition=null,this.pixelRatio=1}setConstantPatternPositions(s,c){this.pixelRatio=s.pixelRatio||1,this.pattern=s.tl.concat(s.br),this.patternTransition=c?c.tl.concat(c.br):this.pattern}setUniform(s,c,h,m,y){let v=null;y!=="u_pattern"&&y!=="u_dash"||(v=this.pattern),y==="u_pattern_b"&&(v=this.patternTransition),y==="u_pixel_ratio"&&(v=this.pixelRatio),v&&c.set(s,y,v)}getBinding(s,c){return c==="u_pattern"||c==="u_pattern_b"||c==="u_dash"?new wx(s):new ca(s)}}class Mf{constructor(s,c,h,m){this.expression=s,this.type=h,this.maxValue=0,this.paintVertexAttributes=c.map(y=>({name:`a_${y}`,type:"Float32",components:h==="color"?2:1,offset:0})),this.paintVertexArray=new m}populatePaintArray(s,c,h,m,y,v,w,T){let A=this.paintVertexArray.length,M=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate(new es(0,{brightness:v,worldview:T}),c,{},y,m,w):this.expression.kind==="constant"&&this.expression.value,O=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new es(0,{brightness:v,worldview:T}),c,{},y,m,w):this.lutExpression.value)==="none";this.paintVertexArray.resize(s),this._setPaintValue(A,s,M,O?null:this.context.lut)}updatePaintArray(s,c,h,m,y,v,w,T){let A=this.expression.kind==="composite"||this.expression.kind==="source"?this.expression.evaluate({zoom:0,brightness:w,worldview:T},h,m,void 0,y):this.expression.kind==="constant"&&this.expression.value,M=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new es(0,{brightness:w,worldview:T}),h,m,void 0,y):this.lutExpression.value)==="none";this._setPaintValue(s,c,A,M?null:this.context.lut)}_setPaintValue(s,c,h,m){if(this.type==="color"){let y=Ix(h.toPremultipliedRenderColor(m));for(let v=s;v`u_${w}_t`),this.type=h,this.useIntegerZoom=m,this.context=y,this.maxValue=0,this.paintVertexAttributes=c.map(w=>({name:`a_${w}`,type:"Float32",components:h==="color"?4:2,offset:0})),this.paintVertexArray=new v}populatePaintArray(s,c,h,m,y,v,w,T){let A=this.expression.evaluate(new es(this.context.zoom,{brightness:v,worldview:T}),c,{},y,m,w),M=this.expression.evaluate(new es(this.context.zoom+1,{brightness:v,worldview:T}),c,{},y,m,w),O=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new es(0,{brightness:v,worldview:T}),c,{},y,m,w):this.lutExpression.value)==="none",N=this.paintVertexArray.length;this.paintVertexArray.resize(s),this._setPaintValue(N,s,A,M,O?null:this.context.lut)}updatePaintArray(s,c,h,m,y,v,w,T){let A=this.expression.evaluate({zoom:this.context.zoom,brightness:w,worldview:T},h,m,void 0,y),M=this.expression.evaluate({zoom:this.context.zoom+1,brightness:w,worldview:T},h,m,void 0,y),O=!!this.lutExpression&&(this.lutExpression.kind==="composite"||this.lutExpression.kind==="source"?this.lutExpression.evaluate(new es(0,{brightness:w,worldview:T}),h,m,void 0,y):this.lutExpression.value)==="none";this._setPaintValue(s,c,A,M,O?null:this.context.lut)}_setPaintValue(s,c,h,m,y){if(this.type==="color"){let v=Ix(h.toPremultipliedRenderColor(y)),w=Ix(h.toPremultipliedRenderColor(y));for(let T=s;T!0){this.binders={},this._buffers=[],this.context=c;let m=[];for(let y in s.paint._values){let v=s.paint.get(y);if(y.endsWith("-use-theme")||!h(y)||!(v instanceof C_&&zw(v.property.specification)))continue;let w=AJ(y,s.type),T=v.value,A=v.property.specification.type,M=!!v.property.useIntegerZoom,O=y==="line-dasharray"||y.endsWith("pattern"),N=s.paint.get(`${y}-use-theme`),H=y==="line-dasharray"&&s.layout.get("line-cap").value.kind!=="constant"||N&&N.value.kind!=="constant";if(T.kind!=="constant"||H)if(T.kind==="source"||H||O){let G=u(y,A,"source");this.binders[y]=O?new im(T,w,A,G,s.id):new Mf(T,w,A,G),m.push(`/a_${y}`)}else{let G=u(y,A,"composite");this.binders[y]=new tm(T,w,A,M,c,G),m.push(`/z_${y}`)}else this.binders[y]=O?new A_(T.value,w):new cu(T.value,w,A,c),m.push(`/u_${y}`);N&&(this.binders[y].lutExpression=N.value)}this.cacheKey=m.sort().join("")}getMaxValue(s){let c=this.binders[s];return c instanceof Mf||c instanceof tm?c.maxValue:0}populatePaintArrays(s,c,h,m,y,v,w,T){for(let A in this.binders){let M=this.binders[A];M.context=this.context,(M instanceof Mf||M instanceof tm||M instanceof im)&&M.populatePaintArray(s,c,h,m,y,v,w,T)}}setConstantPatternPositions(s,c){for(let h in this.binders){let m=this.binders[h];m instanceof A_&&m.setConstantPatternPositions(s,c)}}getPatternTransitionVertexBuffer(s){let c=this.binders[s];return c instanceof im?c.paintTransitionVertexBuffer:null}updatePaintArrays(s,c,h,m,y,v,w,T,A,M){let O=!1,N=Object.keys(s),H=N.length!==0&&!T,G=H?N:c.uniqueIds;this.context.lut=y.lut;for(let ee in this.binders){let te=this.binders[ee];if(te.context=this.context,(te instanceof Mf||te instanceof tm||te instanceof im)&&te.expression&&te.expression.kind&&te.expression.kind!=="constant"&&(te.expression.isStateDependent===!0||te.expression.isLightConstant===!1)){let ie=y.paint.get(ee);te.expression=ie.value;for(let he of G){let me=s[he.toString()];c.eachPosition(he,(ye,ze,Ve)=>{let qe=m.feature(ye);te.updatePaintArray(ze,Ve,qe,me,v,w,A,M)})}if(!H)for(let he of h.uniqueIds){let me=s[he.toString()];h.eachPosition(he,(ye,ze,Ve)=>{let qe=m.feature(ye);te.updatePaintArray(ze,Ve,qe,me,v,w,A,M)})}O=!0}}return O}defines(){let s=[];for(let c in this.binders){let h=this.binders[c];(h instanceof cu||h instanceof A_)&&s.push(...h.uniformNames.map(m=>`#define HAS_UNIFORM_${m}`))}return s}getPaintVertexBuffers(){return this._buffers}getUniforms(s){let c=[];for(let h in this.binders){let m=this.binders[h];if(m instanceof cu||m instanceof A_||m instanceof tm)for(let y of m.uniformNames)c.push({name:y,property:h,binding:m.getBinding(s,y)})}return c}setUniforms(s,c,h,m,y){for(let{name:v,property:w,binding:T}of h)this.binders[w].setUniform(s,T,y,m.get(w),v)}updatePaintBuffers(){this._buffers=[];for(let s in this.binders){let c=this.binders[s];(c instanceof Mf||c instanceof tm||c instanceof im)&&c.paintVertexBuffer&&this._buffers.push(c.paintVertexBuffer),c instanceof im&&c.paintTransitionVertexBuffer&&this._buffers.push(c.paintTransitionVertexBuffer)}}upload(s){for(let c in this.binders){let h=this.binders[c];(h instanceof Mf||h instanceof tm||h instanceof im)&&h.upload(s)}this.updatePaintBuffers()}destroy(){for(let s in this.binders){let c=this.binders[s];(c instanceof Mf||c instanceof tm||c instanceof im)&&c.destroy()}}}class Mp{constructor(s,c,h=()=>!0){this.programConfigurations={};for(let m of s)this.programConfigurations[m.id]=new D_(m,c,h);this.needsUpload=!1,this._featureMap=new vx,this._featureMapWithoutIds=new vx,this._bufferOffset=0,this._idlessCounter=0}populatePaintArrays(s,c,h,m,y,v,w,T,A){for(let M in this.programConfigurations)this.programConfigurations[M].populatePaintArrays(s,c,m,y,v,w,T,A);c.id!==void 0?this._featureMap.add(c.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,c,h,m,y,v,w,T){for(let A of h)this.needsUpload=this.programConfigurations[A.id].updatePaintArrays(s,this._featureMap,this._featureMapWithoutIds,c,A,m,y,v,w||0,T)||this.needsUpload}get(s){return this.programConfigurations[s]}upload(s){if(this.needsUpload){for(let c in this.programConfigurations)this.programConfigurations[c].upload(s);this.needsUpload=!1}}destroy(){for(let s in this.programConfigurations)this.programConfigurations[s].destroy()}}let vF={"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 AJ(d,s){return vF[d]||[d.replace(`${s}-`,"").replace(/-/g,"_")]}let _={"line-pattern":{source:kf,composite:kf},"fill-pattern":{source:kf,composite:kf},"fill-extrusion-pattern":{source:kf,composite:kf},"line-dasharray":{source:Ey,composite:Ey}},l={color:{source:ky,composite:kp},number:{source:Df,composite:ky}};function u(d,s,c){let h=_[d];return h&&h[c]||l[s][c]}Ui(cu,"ConstantBinder"),Ui(A_,"PatternConstantBinder"),Ui(Mf,"SourceExpressionBinder"),Ui(im,"PatternCompositeBinder"),Ui(tm,"CompositeExpressionBinder"),Ui(D_,"ProgramConfiguration",{omit:["_buffers"]}),Ui(Mp,"ProgramConfigurationSet");let g=fi/Math.PI/2,b=5,C=6,S=16383,E=64,k=[E,32,16],F=-g,z=g;function q(d,s,c,h=g){return c=dt(c),[d*Math.sin(c)*h,-s*h,d*Math.cos(c)*h]}function U(d,s,c){return q(Math.cos(dt(d)),Math.sin(dt(d)),s,c)}let Y=63710088e-1,X=2*Math.PI*Y;class J{constructor(s,c){if(isNaN(s)||isNaN(c))throw new Error(`Invalid LngLat object: (${s}, ${c})`);if(this.lng=+s,this.lat=+c,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new J(ot(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(s){let c=Math.PI/180,h=this.lat*c,m=s.lat*c,y=Math.sin(h)*Math.sin(m)+Math.cos(h)*Math.cos(m)*Math.cos((s.lng-this.lng)*c);return Y*Math.acos(Math.min(y,1))}toBounds(s=0){let c=360*s/40075017,h=c/Math.cos(Math.PI/180*this.lat);return new ae({lng:this.lng-h,lat:this.lat-c},{lng:this.lng+h,lat:this.lat+c})}toEcef(s){return U(this.lat,this.lng,g+s*g/Y)}static convert(s){if(s instanceof J)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new J(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new J(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 ae{constructor(s,c){s&&(c?this.setSouthWest(s).setNorthEast(c):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 J?new J(s.lng,s.lat):J.convert(s),this}setSouthWest(s){return this._sw=s instanceof J?new J(s.lng,s.lat):J.convert(s),this}extend(s){let c=this._sw,h=this._ne,m,y;if(s instanceof J)m=s,y=s;else{if(!(s instanceof ae))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(ae.convert(s)):this.extend(J.convert(s)):typeof s=="object"&&s!==null&&s.hasOwnProperty("lat")&&(s.hasOwnProperty("lon")||s.hasOwnProperty("lng"))?this.extend(J.convert(s)):this;if(m=s._sw,y=s._ne,!m||!y)return this}return c||h?(c.lng=Math.min(m.lng,c.lng),c.lat=Math.min(m.lat,c.lat),h.lng=Math.max(y.lng,h.lng),h.lat=Math.max(y.lat,h.lat)):(this._sw=new J(m.lng,m.lat),this._ne=new J(y.lng,y.lat)),this}getCenter(){return new J((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 J(this.getWest(),this.getNorth())}getSouthEast(){return new J(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:c,lat:h}=J.convert(s),m=this._sw.lng<=c&&c<=this._ne.lng;return this._sw.lng>this._ne.lng&&(m=this._sw.lng>=c&&c>=this._ne.lng),this._sw.lat<=h&&h<=this._ne.lat&&m}static convert(s){if(s)return s instanceof ae?s:new ae(s)}}let ne=0,ce=25.5;function _e(d){return X*Math.cos(d*Math.PI/180)}function xe(d){return(180+d)/360}function Pe(d){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+d*Math.PI/360)))/360}function ke(d,s){return d/_e(s)}function Ne(d){return 360*d-180}function Me(d){return 360/Math.PI*Math.atan(Math.exp((180-360*d)*Math.PI/180))-90}function De(d,s){return d*_e(Me(s))}let Be=85.051129;function bt(d){return Math.cos(dt(Ue(d,-Be,Be)))}function nt(d,s){let c=Ue(s,ne,ce),h=Math.pow(2,c);return bt(d)*X/(512*h)}function kt(d){return 1/Math.cos(d*Math.PI/180)}function ft(d,s=0){let c=Math.exp(Math.PI*(1-(d.y+s/fi)/(1<=T?(pi(d,s,c,A,M,y,O,w,T),pi(d,A,M,h,m,O,v,w,T)):d.push(v)}function vt(d,s,c){let h=d[0],m=h.x,y=h.y;s(h);let v=[h];for(let w=1;wd.x+1||hd.y+1)&&Ro("Geometry exceeds allowed extent, reduce your vector tile buffer size"),d}function Ai(d,s,c){let h=d.loadGeometry(),m=d.extent,y=fi/m;if(s&&c&&c.projection.isReprojectedInTileSpace){let v=1<{let H=Ne((s.x+N.x/m)/v),G=Me((s.y+N.y/m)/v),ee=M.project(H,G);N.x=(ee.x*w-T)*m,N.y=(ee.y*w-A)*m};for(let N=0;N=m||G.y<0||G.y>=m||(O(G),H.push(G));h[N]=H}}for(let v of h)for(let w of v)di(w,y);return h}function ri(d,s){return{type:d.type,id:d.id,properties:d.properties,geometry:s?Ai(d):[]}}class ei{constructor(s,c,h,m,y){this.properties={},this.extent=h,this.type=0,this.id=void 0,this._pbf=s,this._geometry=-1,this._keys=m,this._values=y,s.readFields(an,this,c)}loadGeometry(){let s=this._pbf;s.pos=this._geometry;let c=s.readVarint()+s.pos,h=[],m,y=1,v=0,w=0,T=0;for(;s.pos>3}if(v--,y===1||y===2)w+=s.readSVarint(),T+=s.readSVarint(),y===1&&(m&&h.push(m),m=[]),m&&m.push(new ai(w,T));else{if(y!==7)throw new Error(`unknown command ${y}`);m&&m.push(m[0].clone())}}return m&&h.push(m),h}bbox(){let s=this._pbf;s.pos=this._geometry;let c=s.readVarint()+s.pos,h=1,m=0,y=0,v=0,w=1/0,T=-1/0,A=1/0,M=-1/0;for(;s.pos>3}if(m--,h===1||h===2)y+=s.readSVarint(),v+=s.readSVarint(),yT&&(T=y),vM&&(M=v);else if(h!==7)throw new Error(`unknown command ${h}`)}return[w,A,T,M]}toGeoJSON(s,c,h){let m=this.extent*Math.pow(2,h),y=this.extent*s,v=this.extent*c,w=this.loadGeometry();function T(N){return[360*(N.x+y)/m-180,360/Math.PI*Math.atan(Math.exp((1-2*(N.y+v)/m)*Math.PI))-90]}function A(N){return N.map(T)}let M;if(this.type===1){let N=[];for(let G of w)N.push(G[0]);let H=A(N);M=N.length===1?{type:"Point",coordinates:H[0]}:{type:"MultiPoint",coordinates:H}}else if(this.type===2){let N=w.map(A);M=N.length===1?{type:"LineString",coordinates:N[0]}:{type:"MultiLineString",coordinates:N}}else{if(this.type!==3)throw new Error("unknown feature type");{let N=(function(G){let ee=G.length;if(ee<=1)return[G];let te=[],ie,he;for(let me=0;me=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];let c=this._pbf.readVarint()+this._pbf.pos;return new ei(this._pbf,c,this.extent,this._keys,this._values)}}function Yi(d,s,c){d===15?s.version=c.readVarint():d===1?s.name=c.readString():d===5?s.extent=c.readVarint():d===2?s._features.push(c.pos):d===3?s._keys.push(c.readString()):d===4&&s._values.push((function(h){let m=null,y=h.readVarint()+h.pos;for(;h.pos>3;m=v===1?h.readString():v===2?h.readFloat():v===3?h.readDouble():v===4?h.readVarint64():v===5?h.readVarint():v===6?h.readSVarint():v===7?h.readBoolean():null}if(m==null)throw new Error("unknown feature value");return m})(c))}class Nn{constructor(s,c){this.layers=s.readFields(no,{},c)}}function no(d,s,c){if(d===3){let h=new tn(c,c.readVarint()+c.pos);h.length&&(s[h.name]=h)}}let lo="3d_elevation_id",Sr="level";class $n{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,c){return this._valid&&s(c(this._geometry)),this}require(s,c,h){return this.get(s,!0,c,h)}optional(s,c,h){return this.get(s,!1,c,h)}success(){return this._valid}get(s,c,h,m){let y=this.feature.properties.hasOwnProperty(s)?+this.feature.properties[s]:void 0;return this._valid&&y!==void 0&&!Number.isNaN(y)?h(m?m(y):y):c&&(this._valid=!1),this}}class Qo{constructor(s,c){this.featureFunc=s,this.vertexFunc=c}parseFeature(s,c,h){return this.featureFunc(s,c,h)}parseVertex(s,c,h){return this.vertexFunc(s,c,h)}}let yr=new Qo((d,s,c)=>d.reset(s).require(lo,h=>{c.id=h}).optional("fixed_height_relative",h=>{c.constantHeight=h},oo.decodeRelativeHeight).geometry(h=>{c.bounds=h},yw).success(),(d,s,c)=>d.reset(s).require(lo,h=>{c.id=h}).require("elevation_idx",h=>{c.idx=h}).require("extent",h=>{c.extent=h}).require("height_relative",h=>{c.height=h},oo.decodeRelativeHeight).geometry(h=>{c.position=h},oo.getPoint).success()),hs=new Qo((d,s,c)=>d.reset(s).require(lo,h=>{c.id=h}).optional("fixed_height",h=>{c.constantHeight=h},oo.decodeMetricHeight).geometry(h=>{c.bounds=h},yw).success(),(d,s,c)=>d.reset(s).require(lo,h=>{c.id=h}).require("elevation_idx",h=>{c.idx=h}).require("extent",h=>{c.extent=h}).require("height",h=>{c.height=h},oo.decodeMetricHeight).geometry(h=>{c.position=h},oo.getPoint).success());class oo{static getPoint(s){return oa(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"?hs:void 0:yr}static parse(s){let c=[],h=[],m=s.length,y=new $n;for(let v=0;v=0);if(y===0)return 0;y!==s.length&&(c=!1)}return c?2:1}function al(d,s){for(let c of d.projections){let h=vs(s,d.points[0],c.axis);if(c.projection[1]h[1])return 0}return 1}function bs(d,s){let c=0,h=[0,0,0,0];for(let v=0;v=0&&c++;var m,y;return c}class co{constructor(s,c){this.points=s||new Array(8).fill([0,0,0]),this.planes=c||new Array(6).fill([0,0,0,0]),this.bounds=Rn.fromPoints(this.points),this.projections=[],this.frustumEdges=[Qt([],this.points[2],this.points[3]),Qt([],this.points[0],this.points[3]),Qt([],this.points[4],this.points[0]),Qt([],this.points[5],this.points[1]),Qt([],this.points[6],this.points[2]),Qt([],this.points[7],this.points[3])];for(let h of this.frustumEdges){let m=[0,-h[2],h[1]],y=[h[2],0,-h[0]];this.projections.push({axis:m,projection:vs(this.points,this.points[0],m)}),this.projections.push({axis:y,projection:vs(this.points,this.points[0],y)})}}static fromInvProjectionMatrix(s,c,h,m){let y=Math.pow(2,h),v=[[-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(A=>{let M=Li([],A,s),O=1/M[3]/c*y;return(N=M)[0]=(H=M)[0]*(G=[O,O,m?1/M[3]:O,O])[0],N[1]=H[1]*G[1],N[2]=H[2]*G[2],N[3]=H[3]*G[3],N;var N,H,G}),w=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(A=>{let M=vn([],Wi([],Qt([],v[A[0]],v[A[1]]),Qt([],v[A[2]],v[A[1]]))),O=-Gn(M,v[A[1]]);return M.concat(O)}),T=[];for(let A=0;AA[1]||A[0]>T[1])return 0}return 1}containsPoint(s){for(let c of this.planes){let h=c[3];if(Gn([c[0],c[1],c[2]],s)+h<0)return!1}return!0}}class Rn{static fromPoints(s){let c=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let m of s)qt(c,c,m),en(h,h,m);return new Rn(c,h)}static fromTileIdAndHeight(s,c,h){let m=1<s.max[c]||s.min[c]>this.max[c])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 c=0;c<3;c++)this.min[c]=Math.min(this.min[c],s.min[c]),this.max[c]=Math.max(this.max[c],s.max[c])}encapsulatePoint(s){for(let c=0;c<3;c++)this.min[c]=Math.min(this.min[c],s[c]),this.max[c]=Math.max(this.max[c],s[c])}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])]}}Ui(Rn,"Aabb");class Ir{constructor(s,c){this.feature=s,this.metersToTile=c,this.index=0}get(){let s=this.feature.vertices[this.index],c=this.feature.vertexProps[this.index].dir,h=c[1],m=-c[0],y=(s.extent+1)*this.metersToTile;return[new ai(Math.trunc(s.position[0]+h*y),Math.trunc(s.position[1]+m*y)),new ai(Math.trunc(s.position[0]-h*y),Math.trunc(s.position[1]-m*y))]}next(){this.index++}valid(){return this.index{return w.a0?_t(T,T,1/A):Pt(T,0,0,1)}getSafeArea(){return this.safeArea}isTunnel(){return this.heightRange.max<=-5}getClosestEdge(s){if(this.edges.length===0)return;let c=0,h=Number.POSITIVE_INFINITY,m=0,[y,v,w,T,A,M,O]=this._tmpVec2;Es(O,s.x,s.y);let N=new ar(O,null);for(let H=0;H0?rl(T,w)/ye:0,Ve=Ue(ze,0,1),qe=Math.abs((ze-Ve)*this.edgeProps[H].len);wd(A,O,te),Es(M,ee[1],-ee[0]);let Ye=qe+Math.abs(rl(A,M));Ye=0;--v){let w=this.edges[v].a,T=this.edges[v].b,{position:A,height:M,extent:O}=this.vertices[w],{position:N,height:H,extent:G}=this.vertices[T],ee=this.vertexProps[w].dir,te=this.vertexProps[T].dir;if(Pt(c,A[0]/s,A[1]/s,M),Pt(h,N[0]/s,N[1]/s,H),Pt(m,ee[1],-ee[0],0),_t(m,m,O),Pt(y,te[1],-te[0],0),_t(y,y,G),this.distSqLines(ue(c[0]+.5*m[0],c[1]+.5*m[1],c[2]+.5*m[2]),ue(h[0]-.5*y[0],h[1]-.5*y[1],h[2]-.5*y[2]),ue(c[0]-.5*m[0],c[1]-.5*m[1],c[2]-.5*m[2]),ue(h[0]+.5*y[0],h[1]+.5*y[1],h[2]+.5*y[2]))<=.0025000000000000005)continue;let ie=this.vertices.length,he=Uc(rs(),A,N);this.vertices.push({position:Bl(he,he,.5),height:.5*(M+H),extent:.5*(O+G)});let me=Uc(rs(),ee,te);this.vertexProps.push({dir:Cs(me,me)}),this.edges.splice(v,1),this.edgeProps.splice(v,1),this.edges.push({a:w,b:ie}),this.edges.push({a:ie,b:T});let ye=wd(rs(),this.vertices[ie].position,A),ze=lh(ye),Ve={vec:ye,dir:Bl(rs(),ye,1/ze),len:ze};this.edgeProps.push(Ve),this.edgeProps.push(Ve)}}distSqLines(s,c,h,m){let y=zt(st(),c,s),v=zt(st(),m,h),w=zt(st(),s,h),T=Gn(y,y),A=Gn(y,v),M=Gn(y,w),O=Gn(v,v),N=Gn(v,w),H=T*O-A*A;if(H===0)return Ei(An(y,h,m,Gn(w,v)/Gn(v,v)),s);let G=(T*N-A*M)/H;return Ei(An(y,s,c,(A*N-M*O)/H),An(v,h,m,G))}}class ws{static parseFrom(s,c){let h=oo.parse(s);if(!h)return[];let{vertices:m,features:y}=h,v=1/ft(c);y.sort((M,O)=>M.id-O.id),m.sort((M,O)=>M.id-O.id||M.idx-O.idx),m=m.filter((M,O,N)=>O===N.findIndex(H=>H.id===M.id&&H.idx===M.idx));let w=new Array,T=0,A=m.length;for(let M of y){if(M.constantHeight){w.push(new zs(M.id,M.bounds,M.constantHeight));continue}for(;T!==A&&m[T].idm.id===h)}}class fa{constructor(s,c){this.zScale=1,this.xOffset=0,this.yOffset=0,s.equals(c)||(this.zScale=Math.pow(2,c.z-s.z),this.xOffset=(s.x*this.zScale-c.x)*fi,this.yOffset=(s.y*this.zScale-c.y)*fi)}constantElevation(s,c){if(s.constantHeight!=null)return this.computeBiasedHeight(s.constantHeight,c)}pointElevation(s,c,h){let m=this.constantElevation(c,h);return m??(s.x=s.x*this.zScale+this.xOffset,s.y=s.y*this.zScale+this.yOffset,this.computeBiasedHeight(c.pointElevation(s),h))}computeBiasedHeight(s,c){return c<=0?s:s+c*Tt(0,c,s>=0?s:Math.abs(.5*s))}}Ui(zs,"ElevationFeature");class Al{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=s.index,this.hasPattern=!1,this.projection=s.projection,this.layoutVertexArray=new Af,this.indexArray=new Za,this.segments=new Ds,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut}),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.elevationMode=this.layers[0].layout.get("circle-elevation-reference"),this.hasElevation=!1,this.elevationMode!=="none"&&(this.elevatedLayoutVertexArray=new Df),this.worldview=s.worldview}updateFootprints(s,c){}populate(s,c,h,m){let y=this.layers[0],v=[],w=null;y.type==="circle"&&(w=y.layout.get("circle-sort-key"));for(let{feature:A,id:M,index:O,sourceLayerIndex:N}of s){let H=this.layers[0]._featureFilter.needGeometry,G=ri(A,H);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),G,h))continue;let ee=w?w.evaluate(G,{},h):void 0,te={id:M,properties:A.properties,type:A.type,sourceLayerIndex:N,index:O,geometry:H?G.geometry:Ai(A,h,m),patterns:{},sortKey:ee};v.push(te)}w&&v.sort((A,M)=>A.sortKey-M.sortKey);let T=null;m.projection.name==="globe"&&(this.globeExtVertexArray=new nS,T=m.projection);for(let A of v){let{geometry:M,index:O,sourceLayerIndex:N}=A,H=s[O].feature;this.addFeature(A,M,O,c.availableImages,h,T,c.brightness,c.elevationFeatures),c.featureIndex.insert(H,M,O,N,this.index)}this.hasElevation||(this.elevatedLayoutVertexArray=void 0)}update(s,c,h,m,y,v,w){this.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,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,N8.members),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=s.createVertexBuffer(this.globeExtVertexArray,z8.members)),this.elevatedLayoutVertexArray&&(this.elevatedLayoutVertexBuffer=s.createVertexBuffer(this.elevatedLayoutVertexArray,B8.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,c,h,m,y,v,w,T){let A;this.elevationMode!=="none"&&(A=ws.getElevationFeature(s,T));for(let M of c)for(let O of M){let N=O.x,H=O.y;if(N<0||N>=fi||H<0||H>=fi)continue;if(v){let te=v.projectTilePoint(N,H,y),ie=v.upVector(y,N,H);this.addGlobeExtVertex(te,ie),this.addGlobeExtVertex(te,ie),this.addGlobeExtVertex(te,ie),this.addGlobeExtVertex(te,ie)}let G=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,s.sortKey),ee=G.vertexLength;if(this.addCircleVertex(N,H,-1,-1),this.addCircleVertex(N,H,1,-1),this.addCircleVertex(N,H,1,1),this.addCircleVertex(N,H,-1,1),this.elevationMode!=="none"){let te=A?A.pointElevation(new ai(N,H)):0;this.hasElevation=this.hasElevation||te!==0;for(let ie=0;ie<4;ie++)this.elevatedLayoutVertexArray.emplaceBack(te)}this.indexArray.emplaceBack(ee,ee+1,ee+2),this.indexArray.emplaceBack(ee,ee+2,ee+3),G.vertexLength+=4,G.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,h,{},m,y,w,void 0,this.worldview)}addCircleVertex(s,c,h,m){this.layoutVertexArray.emplaceBack(2*s+(h+1)/2,2*c+(m+1)/2)}addGlobeExtVertex(s,c){this.globeExtVertexArray.emplaceBack(s.x,s.y,s.z,c[0]*16384,c[1]*16384,c[2]*16384)}}function du(d,s){for(let c=0;c1){if(Wc(d,s))return!0;for(let h=0;h1?c:c.sub(s)._mult(m)._add(s))}function za(d,s){let c,h,m,y=!1;for(let v=0;vs.y!=m.y>s.y&&s.x<(m.x-h.x)*(s.y-h.y)/(m.y-h.y)+h.x&&(y=!y)}return y}function ll(d,s){let c=!1;for(let h=0,m=d.length-1;hs.y!=v.y>s.y&&s.x<(v.x-y.x)*(s.y-y.y)/(v.y-y.y)+y.x&&(c=!c)}return c}function da(d,s,c,h,m){for(let v of d)if(s<=v.x&&c<=v.y&&h>=v.x&&m>=v.y)return!0;let y=[new ai(s,c),new ai(s,m),new ai(h,m),new ai(h,c)];if(d.length>2){for(let v of y)if(ll(d,v))return!0}for(let v=0;vm.x&&s.x>m.x||d.ym.y&&s.y>m.y)return!1;let y=Zs(d,s,c[0]);return y!==Zs(d,s,c[1])||y!==Zs(d,s,c[2])||y!==Zs(d,s,c[3])}function yh(d,s,c,h,m,y){let v=s.y-d.y,w=d.x-s.x;if(y=y||0){let T=v*v+w*w;if(T===0)return!0;let A=Math.sqrt(T);v/=A,w/=A}return!((c.x-d.x)*v+(c.y-d.y)*w-y<0||(h.x-d.x)*v+(h.y-d.y)*w-y<0||(m.x-d.x)*v+(m.y-d.y)*w-y<0)}function nm(d,s,c,h,m,y,v){return!(yh(d,s,h,m,y,v)||yh(s,c,h,m,y,v)||yh(c,d,h,m,y,v)||yh(h,m,d,s,c,v)||yh(m,y,d,s,c,v)||yh(y,h,d,s,c,v))}function Op(d,s,c){let h=s.paint.get(d).value;return h.kind==="constant"?h.value:c.programConfigurations.get(s.id).getMaxValue(d)}function Rf(d){return Math.sqrt(d[0]*d[0]+d[1]*d[1])}function Of(d,s,c,h,m){if(!s[0]&&!s[1])return d;let y=ai.convert(s)._mult(m);c==="viewport"&&y._rotate(-h);let v=[];for(let w=0;w>c&&s.y===this.y>>c}url(s,c){let h=(function(y,v,w){var T=bh(256*y,256*(v=Math.pow(2,w)-v-1),w),A=bh(256*(y+1),256*(v+1),w);return T[0]+","+T[1]+","+A[0]+","+A[1]})(this.x,this.y,this.z),m=(function(y,v,w){let T,A="";for(let M=y;M>0;M--)T=1<this.canonical.z?new Kc(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Kc(s,this.wrap,s,this.canonical.x>>c,this.canonical.y>>c)}calculateScaledKey(s,c=!0){if(this.overscaledZ===s&&c)return this.key;if(s>this.canonical.z)return hS(this.wrap*+c,s,this.canonical.z,this.canonical.x,this.canonical.y);{let h=this.canonical.z-s;return hS(this.wrap*+c,s,s,this.canonical.x>>h,this.canonical.y>>h)}}isChildOf(s){if(s.wrap!==this.wrap)return!1;let c=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ>c&&s.canonical.y===this.canonical.y>>c}children(s){if(this.overscaledZ>=s)return[new Kc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let c=this.canonical.z+1,h=2*this.canonical.x,m=2*this.canonical.y;return[new Kc(c,this.wrap,c,h,m),new Kc(c,this.wrap,c,h+1,m),new Kc(c,this.wrap,c,h,m+1),new Kc(c,this.wrap,c,h+1,m+1)]}isLessThan(s){return this.wraps.wrap)&&(this.overscaledZs.overscaledZ)&&(this.canonical.xs.canonical.x)&&this.canonical.y{let s=d.canonical.x-1,c=d.wrap;return s<0&&(s=(1<{let s=d.canonical.x+1,c=d.wrap;return s===1<new Kc(d.overscaledZ,d.wrap,d.canonical.z,d.canonical.x,(d.canonical.y===0?1<new Kc(d.overscaledZ,d.wrap,d.canonical.z,d.canonical.x,d.canonical.y===(1<1?null:(function(h,m,y,v){let w=Math.sin(y);return h*(Math.sin((1-v)*y)/w)+m*(Math.sin(v*y)/w)})(d.a[s],d.b[s],d.angle,Ue(c,0,1))+d.center[s]}function Pf(d){if(d.z<=1)return owe[d.z+2*d.y+d.x];let s=q8(CF(d));return Rn.fromPoints(s)}function k_(d,s,c){return _t(d,d,1-c),St(d,d,s,c)}function MJ(d,s,c){for(let h of d)Vn(h,h,s),_t(h,h,c)}function RJ(d,s,c,h){let m=s/d.worldSize,y=d.globeMatrix;if(c.z<=1){let it=Pf(c).getCorners();return MJ(it,y,m),Rn.fromPoints(it)}let v=CF(c,h),w=q8(v,g+xF(d._tileCoverLift));MJ(w,y,m);let T=Number.MAX_VALUE,A=[-T,-T,-T],M=[T,T,T];if(v.contains(d.center)){for(let pt of w)qt(M,M,pt),en(A,A,pt);A[2]=0;let it=d.point,Ut=[it.x*m,it.y*m,0];return qt(M,M,Ut),en(A,A,Ut),new Rn(M,A)}if(d._tileCoverLift>0){for(let it of w)qt(M,M,it),en(A,A,it);return new Rn(M,A)}let O=[y[12]*m,y[13]*m,y[14]*m],N=v.getCenter(),H=Ue(d.center.lat,-Be,Be),G=Ue(N.lat,-Be,Be),ee=xe(d.center.lng),te=Pe(H),ie=ee-xe(N.lng),he=te-Pe(G);ie>.5?ie-=1:ie<-.5&&(ie+=1);let me=0;Math.abs(ie)>Math.abs(he)?me=ie>=0?1:3:(me=he>=0?0:2,St(O,O,[y[4]*m,y[5]*m,y[6]*m],-Math.sin(dt(he>=0?v.getSouth():v.getNorth()))*g));let ye=w[me],ze=w[(me+1)%4],Ve=new rwe(ye,ze,O),qe=[$8(Ve,0)||ye[0],$8(Ve,1)||ye[1],$8(Ve,2)||ye[2]],Ye=Py(d.zoom);if(Ye>0){let it=(function({x:pt,y:Gt,z:ti},$t,Yt,si,Nt){let Jt=1/(1<.5?dn=-1:Fi<-.5&&(dn=1),It=((It+dn)*$t-(si*=$t))*Yt+si,xt=((xt+dn)*$t-si)*Yt+si,li=(li*$t-(Nt*=$t))*Yt+Nt,ni=(ni*$t-Nt)*Yt+Nt,[[It,ni,0],[xt,ni,0],[xt,li,0],[It,li,0]]})(c,s,d._pixelsPerMercatorPixel,ee,te);for(let pt=0;ptMath.PI/2*1.01}let NJ=dt(85),swe=Math.cos(NJ),awe=Math.sin(NJ),lwe=P(),BJ=d=>{let s=[];return d.paint.get("circle-pitch-alignment")==="map"&&s.push("PITCH_WITH_MAP"),d.paint.get("circle-pitch-scale")==="map"&&s.push("SCALE_WITH_MAP"),s};function zJ(d,s,c,h,m,y,v,w,T){if(y&&d.queryGeometry.isAboveHorizon)return!1;y&&(T*=d.pixelToTileUnitsFactor);let A=d.tileID.canonical,M=c.projection.upVectorScale(A,c.center.lat,c.worldSize).metersToTile;for(let O of s)for(let N of O){let H=N.add(w),G=m&&c.elevation?c.elevation.exaggeration()*m.getElevationAt(H.x,H.y,!0):0,ee=c.projection.projectTilePoint(H.x,H.y,A);if(G>0){let me=c.projection.upVector(A,H.x,H.y);ee.x+=me[0]*M*G,ee.y+=me[1]*M*G,ee.z+=me[2]*M*G}let te=y?H:cwe(ee.x,ee.y,ee.z,h),ie=y?d.tilespaceRays.map(me=>uwe(me,G)):d.queryGeometry.screenGeometry,he=Li([],[ee.x,ee.y,ee.z,1],h);if(!v&&y?T*=he[3]/c.cameraToCenterDistance:v&&!y&&(T*=c.cameraToCenterDistance/he[3]),y){let me=Me((N.y/fi+A.y)/(1<d.width||m.height>d.height||c.x>d.width-m.width||c.y>d.height-m.height)throw new RangeError("out of range source coordinates for image copy");if(m.width>s.width||m.height>s.height||h.x>s.width-m.width||h.y>s.height-m.height)throw new RangeError("out of range destination coordinates for image copy");let T=d.data,A=s.data,M=y===4&&w;for(let O=0;O{s[d.evaluationKey]=T;let A=d.expression.evaluate(s),M=A?A.toNonPremultipliedRenderColor(null):null;M&&(m.data[v+w+0]=Math.floor(255*M.r),m.data[v+w+1]=Math.floor(255*M.g),m.data[v+w+2]=Math.floor(255*M.b),m.data[v+w+3]=Math.floor(255*M.a))};if(d.clips)for(let v=0,w=0;v80*c){w=d[0],T=d[1];let M=w,O=T;for(let N=c;NM&&(M=H),G>O&&(O=G)}A=Math.max(M-w,O-T),A=A!==0?32767/A:0}return ZD(y,v,c,w,T,A,0),v}function ZJ(d,s,c,h,m){let y;if(m===(function(v,w,T,A){let M=0;for(let O=w,N=T-A;O0)for(let v=s;v=s;v-=h)y=JJ(v/h|0,d[v],d[v+1],y);return y&&fS(y,y.next)&&(XD(y),y=y.next),y}function Tx(d,s){if(!d)return d;s||(s=d);let c,h=d;do if(c=!1,h.steiner||!fS(h,h.next)&&_l(h.prev,h,h.next)!==0)h=h.next;else{if(XD(h),h=s=h.prev,h===h.next)break;c=!0}while(c||h!==s);return s}function ZD(d,s,c,h,m,y,v){if(!d)return;!v&&y&&(function(T,A,M,O){let N=T;do N.z===0&&(N.z=Q8(N.x,N.y,A,M,O)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next;while(N!==T);N.prevZ.nextZ=null,N.prevZ=null,(function(H){let G,ee=1;do{let te,ie=H;H=null;let he=null;for(G=0;ie;){G++;let me=ie,ye=0;for(let Ve=0;Ve0||ze>0&&me;)ye!==0&&(ze===0||!me||ie.z<=me.z)?(te=ie,ie=ie.nextZ,ye--):(te=me,me=me.nextZ,ze--),he?he.nextZ=te:H=te,te.prevZ=he,he=te;ie=me}he.nextZ=null,ee*=2}while(G>1)})(N)})(d,h,m,y);let w=d;for(;d.prev!==d.next;){let T=d.prev,A=d.next;if(y?_we(d,h,m,y):gwe(d))s.push(T.i,d.i,A.i),XD(d),d=A.next,w=A.next;else if((d=A)===w){v?v===1?ZD(d=ywe(Tx(d),s),s,c,h,m,y,2):v===2&&vwe(d,s,c,h,m,y):ZD(Tx(d),s,c,h,m,y,1);break}}}function gwe(d){let s=d.prev,c=d,h=d.next;if(_l(s,c,h)>=0)return!1;let m=s.x,y=c.x,v=h.x,w=s.y,T=c.y,A=h.y,M=Math.min(m,y,v),O=Math.min(w,T,A),N=Math.max(m,y,v),H=Math.max(w,T,A),G=h.next;for(;G!==s;){if(G.x>=M&&G.x<=N&&G.y>=O&&G.y<=H&&YD(m,w,y,T,v,A,G.x,G.y)&&_l(G.prev,G,G.next)>=0)return!1;G=G.next}return!0}function _we(d,s,c,h){let m=d.prev,y=d,v=d.next;if(_l(m,y,v)>=0)return!1;let w=m.x,T=y.x,A=v.x,M=m.y,O=y.y,N=v.y,H=Math.min(w,T,A),G=Math.min(M,O,N),ee=Math.max(w,T,A),te=Math.max(M,O,N),ie=Q8(H,G,s,c,h),he=Q8(ee,te,s,c,h),me=d.prevZ,ye=d.nextZ;for(;me&&me.z>=ie&&ye&&ye.z<=he;){if(me.x>=H&&me.x<=ee&&me.y>=G&&me.y<=te&&me!==m&&me!==v&&YD(w,M,T,O,A,N,me.x,me.y)&&_l(me.prev,me,me.next)>=0||(me=me.prevZ,ye.x>=H&&ye.x<=ee&&ye.y>=G&&ye.y<=te&&ye!==m&&ye!==v&&YD(w,M,T,O,A,N,ye.x,ye.y)&&_l(ye.prev,ye,ye.next)>=0))return!1;ye=ye.nextZ}for(;me&&me.z>=ie;){if(me.x>=H&&me.x<=ee&&me.y>=G&&me.y<=te&&me!==m&&me!==v&&YD(w,M,T,O,A,N,me.x,me.y)&&_l(me.prev,me,me.next)>=0)return!1;me=me.prevZ}for(;ye&&ye.z<=he;){if(ye.x>=H&&ye.x<=ee&&ye.y>=G&&ye.y<=te&&ye!==m&&ye!==v&&YD(w,M,T,O,A,N,ye.x,ye.y)&&_l(ye.prev,ye,ye.next)>=0)return!1;ye=ye.nextZ}return!0}function ywe(d,s){let c=d;do{let h=c.prev,m=c.next.next;!fS(h,m)&&QJ(h,c,c.next,m)&&QD(h,m)&&QD(m,h)&&(s.push(h.i,c.i,m.i),XD(c),XD(c.next),c=d=m),c=c.next}while(c!==d);return Tx(c)}function vwe(d,s,c,h,m,y){let v=d;do{let w=v.next.next;for(;w!==v.prev;){if(v.i!==w.i&&Swe(v,w)){let T=XJ(v,w);return v=Tx(v,v.next),T=Tx(T,T.next),ZD(v,s,c,h,m,y,0),void ZD(T,s,c,h,m,y,0)}w=w.next}v=v.next}while(v!==d)}function bwe(d,s){let c=d.x-s.x;return c===0&&(c=d.y-s.y,c===0)&&(c=(d.next.y-d.y)/(d.next.x-d.x)-(s.next.y-s.y)/(s.next.x-s.x)),c}function xwe(d,s){let c=(function(m,y){let v=y,w=m.x,T=m.y,A,M=-1/0;if(fS(m,v))return v;do{if(fS(m,v.next))return v.next;if(T<=v.y&&T>=v.next.y&&v.next.y!==v.y){let ee=v.x+(T-v.y)*(v.next.x-v.x)/(v.next.y-v.y);if(ee<=w&&ee>M&&(M=ee,A=v.x=v.x&&v.x>=N&&w!==v.x&&YJ(TA.x||v.x===A.x&&Cwe(A,v)))&&(A=v,G=ee)}v=v.next}while(v!==O);return A})(d,s);if(!c)return s;let h=XJ(c,d);return Tx(h,h.next),Tx(c,c.next)}function Cwe(d,s){return _l(d.prev,d,s.prev)<0&&_l(s.next,d,d.next)<0}function Q8(d,s,c,h,m){return(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-c)*m|0)|d<<8))|d<<4))|d<<2))|d<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=(s-h)*m|0)|s<<8))|s<<4))|s<<2))|s<<1))<<1}function wwe(d){let s=d,c=d;do(s.x=(d-v)*(y-w)&&(d-v)*(h-w)>=(c-v)*(s-w)&&(c-v)*(y-w)>=(m-v)*(h-w)}function YD(d,s,c,h,m,y,v,w){return!(d===v&&s===w)&&YJ(d,s,c,h,m,y,v,w)}function Swe(d,s){return d.next.i!==s.i&&d.prev.i!==s.i&&!(function(c,h){let m=c;do{if(m.i!==c.i&&m.next.i!==c.i&&m.i!==h.i&&m.next.i!==h.i&&QJ(m,m.next,c,h))return!0;m=m.next}while(m!==c);return!1})(d,s)&&(QD(d,s)&&QD(s,d)&&(function(c,h){let m=c,y=!1,v=(c.x+h.x)/2,w=(c.y+h.y)/2;do m.y>w!=m.next.y>w&&m.next.y!==m.y&&v<(m.next.x-m.x)*(w-m.y)/(m.next.y-m.y)+m.x&&(y=!y),m=m.next;while(m!==c);return y})(d,s)&&(_l(d.prev,d,s.prev)||_l(d,s.prev,s))||fS(d,s)&&_l(d.prev,d,d.next)>0&&_l(s.prev,s,s.next)>0)}function _l(d,s,c){return(s.y-d.y)*(c.x-s.x)-(s.x-d.x)*(c.y-s.y)}function fS(d,s){return d.x===s.x&&d.y===s.y}function QJ(d,s,c,h){let m=TF(_l(d,s,c)),y=TF(_l(d,s,h)),v=TF(_l(c,h,d)),w=TF(_l(c,h,s));return m!==y&&v!==w||!(m!==0||!IF(d,c,s))||!(y!==0||!IF(d,h,s))||!(v!==0||!IF(c,d,h))||!(w!==0||!IF(c,s,h))}function IF(d,s,c){return s.x<=Math.max(d.x,c.x)&&s.x>=Math.min(d.x,c.x)&&s.y<=Math.max(d.y,c.y)&&s.y>=Math.min(d.y,c.y)}function TF(d){return d>0?1:d<0?-1:0}function QD(d,s){return _l(d.prev,d,d.next)<0?_l(d,s,d.next)>=0&&_l(d,d.prev,s)>=0:_l(d,s,d.prev)<0||_l(d,d.next,s)<0}function XJ(d,s){let c=X8(d.i,d.x,d.y),h=X8(s.i,s.x,s.y),m=d.next,y=s.prev;return d.next=s,s.prev=d,c.next=m,m.prev=c,h.next=c,c.prev=h,y.next=h,h.prev=y,h}function JJ(d,s,c,h){let m=X8(d,s,c);return h?(m.next=h.next,m.prev=h,h.next.prev=m,h.next=m):(m.prev=m,m.next=m),m}function XD(d){d.next.prev=d.prev,d.prev.next=d.next,d.prevZ&&(d.prevZ.nextZ=d.nextZ),d.nextZ&&(d.nextZ.prevZ=d.prevZ)}function X8(d,s,c){return{i:d,x:s,y:c,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function JD(d,s){let c=d.length;if(c<=1)return[d];let h=[],m,y;for(let v=0;v1)for(let v=0;v=fi&&c>=fi}static evaluate(s){if(s.length===0)return new M_;let c=[];for(let T of s)c.push(...T.portals);if(c.length===0)return new M_;for(let T of c){let A=T.va,M=T.vb;(M_.isOnBorder(A.x,M.x)||M_.isOnBorder(A.y,M.y))&&(T.type="border")}let h=c.filter(T=>T.type!=="unevaluated"),m=c.filter(T=>T.type==="unevaluated");if(m.length===0)return new M_;m.sort((T,A)=>T.hash===A.hash?T.isTunnel===A.isTunnel?0:T.isTunnel?-1:1:T.hashT.hashy!=="fill-tunnel-structure-color"),this.tunnelProgramConfigurations=new Mp(c,{zoom:h,lut:m},y=>y!=="fill-bridge-guard-rail-color")}addVertices(s,c){let h=this.unevalVertices.length;for(let m=0;m=y.min.x&&O.x<=y.max.x&&O.y>=y.min.y&&O.y<=y.max.y||N.x>=y.min.x&&N.x<=y.max.x&&N.y>=y.min.y&&N.y<=y.max.y||tc(O,N,w))||this.isOnBorder(O.x,N.x)||this.isOnBorder(O.y,N.y))continue;let H=pu.computeEdgeHash(this.unevalVertices[A],this.unevalVertices[M]),G,ee=this.vertexHashLookup.get(pu.computePosHash(O));ee!=null?G=ee.next:(ee=this.vertexHashLookup.get(pu.computePosHash(N)),G=ee!=null?ee.prev:H),this.unevalEdges.push({polygonIdx:s,a:A,b:M,hash:H,portalHash:G,isTunnel:m,type:"unevaluated",featureInfo:v})}}addPortalCandidates(s,c,h,m,y){if(c.length===0)return;this.portalPolygons.add(s,{geometry:c,zLevel:y});let v=c[0];this.vertexHashLookup.clear();let w=pu.computeEdgeHash(v[v.length-2],v[v.length-1]);for(let T=0;T({vertexOffset:0,primitiveOffset:this.indexArray.length}),h=N=>{N.primitiveLength=this.indexArray.length-N.primitiveOffset},m=new Twe(this.vertexPositions,this.vertexNormals,this.indexArray);this.prepareEdges(s.portals,this.unevalEdges);let y=c(),v=c(),w=c(),T=(N,H)=>{N.sort((ee,te)=>ee.type===H&&te.type!==H?-1:ee.type!==H&&te.type===H?1:0);let G=N.findIndex(ee=>ee.type!==H);return G>=0?G:N.length},A=0;this.unevalEdges.length>0&&(A=T(this.unevalEdges,"none"),this.constructBridgeStructures(m,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:A},this.tileToMeters)),h(w);let M=c(),O=c();if(this.unevalEdges.length>0){let N=this.unevalEdges.splice(A),H=T(N,"tunnel")+A;this.unevalEdges.push(...N),this.constructTunnelStructures(m,this.unevalVertices,this.unevalHeights,this.unevalEdges,{min:0,max:A},{min:A,max:H})}h(M),m.addTriangles(this.unevalTriangles,this.unevalVertices,this.unevalHeights),h(O),m.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,this.unevalHeights),h(v),m.addTriangles(this.unevalTunnelTriangles,this.unevalVertices,[-.1]),h(y),this.maskSegments=Ds.simpleSegment(0,O.primitiveOffset,0,O.primitiveLength),this.depthSegments=Ds.simpleSegment(0,v.primitiveOffset,0,v.primitiveLength),this.renderableBridgeSegments=Ds.simpleSegment(0,w.primitiveOffset,0,w.primitiveLength),this.renderableTunnelSegments=Ds.simpleSegment(0,M.primitiveOffset,0,M.primitiveLength),this.shadowCasterSegments=Ds.simpleSegment(0,y.primitiveOffset,0,y.primitiveLength)}update(s,c,h,m,y,v,w,T){this.bridgeProgramConfigurations.updatePaintArrays(s,c,y,h,m,v,w,T),this.tunnelProgramConfigurations.updatePaintArrays(s,c,y,h,m,v,w,T)}upload(s){this.vertexBuffer||this.vertexPositions.length===0||this.vertexNormals.length===0||this.indexArray.length===0||(this.vertexBuffer=s.createVertexBuffer(this.vertexPositions,mwe.members),this.vertexBufferNormal=s.createVertexBuffer(this.vertexNormals,fwe.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,c,h,m,y){let v=(w,T)=>{for(let A=0;APt(Yt,c[si].x,c[si].y,h[si]*T),O=st(),N=st(),H=st(),G=st(),ee=st(),te=(Yt,si)=>{let Nt=w.get(pu.computePosHash(c[si])),Jt=Nt.from,It=Nt.to;if(!Jt||!It)return;M(O,Jt),M(N,si),M(H,It),gr(G),pe(O,N)||(Qt(ee,N,O),vn(G,ee)),pe(H,N)||(Qt(ee,H,N),ki(G,G,vn(ee,ee)));let xt=at(G);return xt>0?_t(Yt,G,1/xt):void 0},ie=Number.POSITIVE_INFINITY;this.sortSubarray(m,y.min,y.max,(Yt,si)=>Yt.featureInfo.featureIndex-si.featureInfo.featureIndex);let he=st(),me=st(),ye=st(),ze=st(),Ve=st(),qe=st(),Ye=st(),it=st(),Ut=st(),pt=[st(),st(),st(),st()],Gt=[st(),st(),st(),st()],ti=[{coord:new ai(0,0),height:0},{coord:new ai(0,0),height:0}],$t=(Yt,si)=>Yt>si;for(let Yt=y.min;Ytie.featureInfo.featureIndex-he.featureInfo.featureIndex;this.sortSubarray(m,y.min,y.max,T),this.sortSubarray(m,v.min,v.max,T);let A=ie=>vn(ie,ie),M=[{coord:new ai(0,0),height:0},{coord:new ai(0,0),height:0}],O=(ie,he)=>iew.hash===T.hash?T.polygonIdx-w.polygonIdx:T.hash>w.hash?1:-1);let h=0,m=0,y=0,v=c[h].polygonIdx;do m++,(m===c.length||c[h].hash!==c[m].hash)&&((m-h==1||c[m-1].polygonIdx!==v)&&(yA.portalHashM.hash?w++:M.hash>A.portalHash?T++:(A.type=M.type,w++)}}}isOnBorder(s,c){return s<=0&&c<=0||s>=fi&&c>=fi}addFeatureSection(s,c,h,m){return s!==c&&(c=s,h.push({featureIndex:s,vertexStart:m.getVertexCount()}),m.clearVertexLookup()),c}sortSubarray(s,c,h,m){let y=s.slice(c,h);y.sort(m),s.splice(c,y.length,...y)}static computeEdgeHash(s,c){return(s.y===c.y&&s.x>c.x||s.y>c.y)&&([s,c]=[c,s]),BigInt(pu.computePosHash(s))<<32n|BigInt(pu.computePosHash(c))}static computePosHash(s){return((65535&s.x)<<16|65535&s.y)>>>0}}var iee,nee={exports:{}},oee=(iee||(iee=1,(function(d,s){(function(c){function h(we,Ie){return we>Ie?1:we0){var ji=Vt+Math.floor(bi/2),gn={key:Ie[ji],data:wt[ji],parent:we};return gn.left=v(gn,Ie,wt,Vt,ji),gn.right=v(gn,Ie,wt,ji+1,Ci),gn}return null}function w(we,Ie,wt,Vt,Ci){if(!(wt>=Vt)){for(var bi=we[wt+Vt>>1],ji=wt-1,gn=Vt+1;;){do ji++;while(Ci(we[ji],bi)<0);do gn--;while(Ci(we[gn],bi)>0);if(ji>=gn)break;var yo=we[ji];we[ji]=we[gn],we[gn]=yo,yo=Ie[ji],Ie[ji]=Ie[gn],Ie[gn]=yo}w(we,Ie,wt,gn,Ci),w(we,Ie,gn+1,Vt,Ci)}}m.prototype.rotateLeft=function(we){var Ie=we.right;Ie&&(we.right=Ie.left,Ie.left&&(Ie.left.parent=we),Ie.parent=we.parent),we.parent?we===we.parent.left?we.parent.left=Ie:we.parent.right=Ie:this._root=Ie,Ie&&(Ie.left=we),we.parent=Ie},m.prototype.rotateRight=function(we){var Ie=we.left;Ie&&(we.left=Ie.right,Ie.right&&(Ie.right.parent=we),Ie.parent=we.parent),we.parent?we===we.parent.left?we.parent.left=Ie:we.parent.right=Ie:this._root=Ie,Ie&&(Ie.right=we),we.parent=Ie},m.prototype._splay=function(we){for(;we.parent;){var Ie=we.parent;Ie.parent?Ie.left===we&&Ie.parent.left===Ie?(this.rotateRight(Ie.parent),this.rotateRight(Ie)):Ie.right===we&&Ie.parent.right===Ie?(this.rotateLeft(Ie.parent),this.rotateLeft(Ie)):Ie.left===we&&Ie.parent.right===Ie?(this.rotateRight(Ie),this.rotateLeft(Ie)):(this.rotateLeft(Ie),this.rotateRight(Ie)):Ie.left===we?this.rotateRight(Ie):this.rotateLeft(Ie)}},m.prototype.splay=function(we){for(var Ie,wt,Vt,Ci,bi;we.parent;)(wt=(Ie=we.parent).parent)&&wt.parent?((Vt=wt.parent).left===wt?Vt.left=we:Vt.right=we,we.parent=Vt):(we.parent=null,this._root=we),Ci=we.left,bi=we.right,we===Ie.left?(wt&&(wt.left===Ie?(Ie.right?(wt.left=Ie.right,wt.left.parent=wt):wt.left=null,Ie.right=wt,wt.parent=Ie):(Ci?(wt.right=Ci,Ci.parent=wt):wt.right=null,we.left=wt,wt.parent=we)),bi?(Ie.left=bi,bi.parent=Ie):Ie.left=null,we.right=Ie,Ie.parent=we):(wt&&(wt.right===Ie?(Ie.left?(wt.right=Ie.left,wt.right.parent=wt):wt.right=null,Ie.left=wt,wt.parent=Ie):(bi?(wt.left=bi,bi.parent=wt):wt.left=null,we.right=wt,wt.parent=we)),Ci?(Ie.right=Ci,Ci.parent=Ie):Ie.right=null,we.left=Ie,Ie.parent=we)},m.prototype.replace=function(we,Ie){we.parent?we===we.parent.left?we.parent.left=Ie:we.parent.right=Ie:this._root=Ie,Ie&&(Ie.parent=we.parent)},m.prototype.minNode=function(we){if(we===void 0&&(we=this._root),we)for(;we.left;)we=we.left;return we},m.prototype.maxNode=function(we){if(we===void 0&&(we=this._root),we)for(;we.right;)we=we.right;return we},m.prototype.insert=function(we,Ie){var wt=this._root,Vt=null,Ci=this._compare;if(this._noDuplicates)for(;wt;){if(Vt=wt,Ci(wt.key,we)===0)return;wt=Ci(wt.key,we)<0?wt.right:wt.left}else for(;wt;)Vt=wt,wt=Ci(wt.key,we)<0?wt.right:wt.left;return wt={key:we,data:Ie,left:null,right:null,parent:Vt},Vt?Ci(Vt.key,wt.key)<0?Vt.right=wt:Vt.left=wt:this._root=wt,this.splay(wt),this._size++,wt},m.prototype.find=function(we){for(var Ie=this._root,wt=this._compare;Ie;){var Vt=wt(Ie.key,we);if(Vt<0)Ie=Ie.right;else{if(!(Vt>0))return Ie;Ie=Ie.left}}return null},m.prototype.contains=function(we){for(var Ie=this._root,wt=this._compare;Ie;){var Vt=wt(we,Ie.key);if(Vt===0)return!0;Ie=Vt<0?Ie.left:Ie.right}return!1},m.prototype.remove=function(we){var Ie=this.find(we);if(!Ie)return!1;if(this.splay(Ie),Ie.left)if(Ie.right){var wt=this.minNode(Ie.right);wt.parent!==Ie&&(this.replace(wt,wt.right),wt.right=Ie.right,wt.right.parent=wt),this.replace(Ie,wt),wt.left=Ie.left,wt.left.parent=wt}else this.replace(Ie,Ie.left);else this.replace(Ie,Ie.right);return this._size--,!0},m.prototype.removeNode=function(we){if(!we)return!1;if(this.splay(we),we.left)if(we.right){var Ie=this.minNode(we.right);Ie.parent!==we&&(this.replace(Ie,Ie.right),Ie.right=we.right,Ie.right.parent=Ie),this.replace(we,Ie),Ie.left=we.left,Ie.left.parent=Ie}else this.replace(we,we.left);else this.replace(we,we.right);return this._size--,!0},m.prototype.erase=function(we){var Ie=this.find(we);if(Ie){this.splay(Ie);var wt=Ie.left,Vt=Ie.right,Ci=null;wt&&(wt.parent=null,Ci=this.maxNode(wt),this.splay(Ci),this._root=Ci),Vt&&(wt?Ci.right=Vt:this._root=Vt,Vt.parent=Ci),this._size--}},m.prototype.pop=function(){var we=this._root,Ie=null;if(we){for(;we.left;)we=we.left;Ie={key:we.key,data:we.data},this.remove(we.key)}return Ie},m.prototype.next=function(we){var Ie=we;if(Ie)if(Ie.right)for(Ie=Ie.right;Ie&&Ie.left;)Ie=Ie.left;else for(Ie=we.parent;Ie&&Ie.right===we;)we=Ie,Ie=Ie.parent;return Ie},m.prototype.prev=function(we){var Ie=we;if(Ie)if(Ie.left)for(Ie=Ie.left;Ie&&Ie.right;)Ie=Ie.right;else for(Ie=we.parent;Ie&&Ie.left===we;)we=Ie,Ie=Ie.parent;return Ie},m.prototype.forEach=function(we){for(var Ie=this._root,wt=[],Vt=!1,Ci=0;!Vt;)Ie?(wt.push(Ie),Ie=Ie.left):wt.length>0?(we(Ie=wt.pop(),Ci++),Ie=Ie.right):Vt=!0;return this},m.prototype.range=function(we,Ie,wt,Vt){for(var Ci=[],bi=this._compare,ji=this._root;Ci.length!==0||ji;)if(ji)Ci.push(ji),ji=ji.left;else{if(bi((ji=Ci.pop()).key,Ie)>0)break;if(bi(ji.key,we)>=0&&wt.call(Vt,ji))return this;ji=ji.right}return this},m.prototype.keys=function(){for(var we=this._root,Ie=[],wt=[],Vt=!1;!Vt;)we?(Ie.push(we),we=we.left):Ie.length>0?(we=Ie.pop(),wt.push(we.key),we=we.right):Vt=!0;return wt},m.prototype.values=function(){for(var we=this._root,Ie=[],wt=[],Vt=!1;!Vt;)we?(Ie.push(we),we=we.left):Ie.length>0?(we=Ie.pop(),wt.push(we.data),we=we.right):Vt=!0;return wt},m.prototype.at=function(we){for(var Ie=this._root,wt=[],Vt=!1,Ci=0;!Vt;)if(Ie)wt.push(Ie),Ie=Ie.left;else if(wt.length>0){if(Ie=wt.pop(),Ci===we)return Ie;Ci++,Ie=Ie.right}else Vt=!0;return null},m.prototype.load=function(we,Ie,wt){if(we===void 0&&(we=[]),Ie===void 0&&(Ie=[]),wt===void 0&&(wt=!1),this._size!==0)throw new Error("bulk-load: tree is not empty");var Vt=we.length;return wt&&w(we,Ie,0,Vt-1,this._compare),this._root=v(null,we,Ie,0,Vt),this._size=Vt,this},m.prototype.min=function(){var we=this.minNode(this._root);return we?we.key:null},m.prototype.max=function(){var we=this.maxNode(this._root);return we?we.key:null},m.prototype.isEmpty=function(){return this._root===null},y.size.get=function(){return this._size},m.createTree=function(we,Ie,wt,Vt,Ci){return new m(wt,Ci).load(we,Ie,Vt)},Object.defineProperties(m.prototype,y);var T=0,A=1,M=2,O=3,N=0,H=1,G=2,ee=3;function te(we,Ie,wt){Ie===null?(we.inOut=!1,we.otherInOut=!0):(we.isSubject===Ie.isSubject?(we.inOut=!Ie.inOut,we.otherInOut=Ie.otherInOut):(we.inOut=!Ie.otherInOut,we.otherInOut=Ie.isVertical()?!Ie.inOut:Ie.inOut),Ie&&(we.prevInResult=!ie(Ie,wt)||Ie.isVertical()?Ie.prevInResult:Ie));var Vt=ie(we,wt);we.resultTransition=Vt?(function(Ci,bi){var ji,gn=!Ci.inOut,yo=!Ci.otherInOut;switch(bi){case N:ji=gn&&yo;break;case H:ji=gn||yo;break;case ee:ji=gn^yo;break;case G:ji=Ci.isSubject?gn&&!yo:yo&&!gn}return ji?1:-1})(we,wt):0}function ie(we,Ie){switch(we.type){case T:switch(Ie){case N:return!we.otherInOut;case H:return we.otherInOut;case G:return we.isSubject&&we.otherInOut||!we.isSubject&&!we.otherInOut;case ee:return!0}break;case M:return Ie===N||Ie===H;case O:return Ie===G;case A:return!1}return!1}var he=function(we,Ie,wt,Vt,Ci){this.left=Ie,this.point=we,this.otherEvent=wt,this.isSubject=Vt,this.type=Ci||T,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.resultTransition=0,this.otherPos=-1,this.outputContourId=-1,this.isExteriorRing=!0},me={inResult:{configurable:!0}};function ye(we,Ie){return we[0]===Ie[0]&&we[1]===Ie[1]}he.prototype.isBelow=function(we){var Ie=this.point,wt=this.otherEvent.point;return this.left?(Ie[0]-we[0])*(wt[1]-we[1])-(wt[0]-we[0])*(Ie[1]-we[1])>0:(wt[0]-we[0])*(Ie[1]-we[1])-(Ie[0]-we[0])*(wt[1]-we[1])>0},he.prototype.isAbove=function(we){return!this.isBelow(we)},he.prototype.isVertical=function(){return this.point[0]===this.otherEvent.point[0]},me.inResult.get=function(){return this.resultTransition!==0},he.prototype.clone=function(){var we=new he(this.point,this.left,this.otherEvent,this.isSubject,this.type);return we.contourId=this.contourId,we.resultTransition=this.resultTransition,we.prevInResult=this.prevInResult,we.isExteriorRing=this.isExteriorRing,we.inOut=this.inOut,we.otherInOut=this.otherInOut,we},Object.defineProperties(he.prototype,me);var ze=11102230246251565e-32,Ve=134217729,qe=(3+8*ze)*ze;function Ye(we,Ie,wt,Vt,Ci){var bi,ji,gn,yo,vo=Ie[0],ho=Vt[0],Tr=0,xs=0;ho>vo==ho>-vo?(bi=vo,vo=Ie[++Tr]):(bi=ho,ho=Vt[++xs]);var uo=0;if(Trvo==ho>-vo?(gn=bi-((ji=vo+bi)-vo),vo=Ie[++Tr]):(gn=bi-((ji=ho+bi)-ho),ho=Vt[++xs]),bi=ji,gn!==0&&(Ci[uo++]=gn);Trvo==ho>-vo?(gn=bi-((ji=bi+vo)-(yo=ji-bi))+(vo-yo),vo=Ie[++Tr]):(gn=bi-((ji=bi+ho)-(yo=ji-bi))+(ho-yo),ho=Vt[++xs]),bi=ji,gn!==0&&(Ci[uo++]=gn);for(;Tr0!=Tr>0)return xs;var uo=Math.abs(ho+Tr);return Math.abs(xs)>=Ut*uo?xs:-(function(ts,Or,nr,ss,as,Jr,is){var Pr,bo,Nr,ks,On,$o,ls,Vs,ms,Va,Hr,Ea,Ad,nc,Ul,Dd,Nf,Ua,cl=ts-as,oc=nr-as,Zc=Or-Jr,bc=ss-Jr;ti[0]=(Ul=(Vs=cl-(ls=($o=Ve*cl)-($o-cl)))*(Va=bc-(ms=($o=Ve*bc)-($o-bc)))-((nc=cl*bc)-ls*ms-Vs*ms-ls*Va))-((Hr=Ul-(Nf=(Vs=Zc-(ls=($o=Ve*Zc)-($o-Zc)))*(Va=oc-(ms=($o=Ve*oc)-($o-oc)))-((Dd=Zc*oc)-ls*ms-Vs*ms-ls*Va)))+(On=Ul-Hr))+(On-Nf),ti[1]=(Ad=nc-((Ea=nc+Hr)-(On=Ea-nc))+(Hr-On))-((Hr=Ad-Dd)+(On=Ad-Hr))+(On-Dd),ti[2]=Ea-((Ua=Ea+Hr)-(On=Ua-Ea))+(Hr-On),ti[3]=Ua;var Hy=(function(Mmt,yne){for(var vne=yne[0],s7=1;s7<4;s7++)vne+=yne[s7];return vne})(0,ti),k2=pt*is;if(Hy>=k2||-Hy>=k2||(Pr=ts-(cl+(On=ts-cl))+(On-as),Nr=nr-(oc+(On=nr-oc))+(On-as),bo=Or-(Zc+(On=Or-Zc))+(On-Jr),ks=ss-(bc+(On=ss-bc))+(On-Jr),Pr===0&&bo===0&&Nr===0&&ks===0)||(k2=Gt*is+qe*Math.abs(Hy),(Hy+=cl*ks+bc*Pr-(Zc*Nr+oc*bo))>=k2||-Hy>=k2))return Hy;Nt[0]=(Ul=(Vs=Pr-(ls=($o=Ve*Pr)-($o-Pr)))*(Va=bc-(ms=($o=Ve*bc)-($o-bc)))-((nc=Pr*bc)-ls*ms-Vs*ms-ls*Va))-((Hr=Ul-(Nf=(Vs=bo-(ls=($o=Ve*bo)-($o-bo)))*(Va=oc-(ms=($o=Ve*oc)-($o-oc)))-((Dd=bo*oc)-ls*ms-Vs*ms-ls*Va)))+(On=Ul-Hr))+(On-Nf),Nt[1]=(Ad=nc-((Ea=nc+Hr)-(On=Ea-nc))+(Hr-On))-((Hr=Ad-Dd)+(On=Ad-Hr))+(On-Dd),Nt[2]=Ea-((Ua=Ea+Hr)-(On=Ua-Ea))+(Hr-On),Nt[3]=Ua;var kTe=Ye(4,ti,4,Nt,$t);Nt[0]=(Ul=(Vs=cl-(ls=($o=Ve*cl)-($o-cl)))*(Va=ks-(ms=($o=Ve*ks)-($o-ks)))-((nc=cl*ks)-ls*ms-Vs*ms-ls*Va))-((Hr=Ul-(Nf=(Vs=Zc-(ls=($o=Ve*Zc)-($o-Zc)))*(Va=Nr-(ms=($o=Ve*Nr)-($o-Nr)))-((Dd=Zc*Nr)-ls*ms-Vs*ms-ls*Va)))+(On=Ul-Hr))+(On-Nf),Nt[1]=(Ad=nc-((Ea=nc+Hr)-(On=Ea-nc))+(Hr-On))-((Hr=Ad-Dd)+(On=Ad-Hr))+(On-Dd),Nt[2]=Ea-((Ua=Ea+Hr)-(On=Ua-Ea))+(Hr-On),Nt[3]=Ua;var MTe=Ye(kTe,$t,4,Nt,Yt);Nt[0]=(Ul=(Vs=Pr-(ls=($o=Ve*Pr)-($o-Pr)))*(Va=ks-(ms=($o=Ve*ks)-($o-ks)))-((nc=Pr*ks)-ls*ms-Vs*ms-ls*Va))-((Hr=Ul-(Nf=(Vs=bo-(ls=($o=Ve*bo)-($o-bo)))*(Va=Nr-(ms=($o=Ve*Nr)-($o-Nr)))-((Dd=bo*Nr)-ls*ms-Vs*ms-ls*Va)))+(On=Ul-Hr))+(On-Nf),Nt[1]=(Ad=nc-((Ea=nc+Hr)-(On=Ea-nc))+(Hr-On))-((Hr=Ad-Dd)+(On=Ad-Hr))+(On-Dd),Nt[2]=Ea-((Ua=Ea+Hr)-(On=Ua-Ea))+(Hr-On),Nt[3]=Ua;var RTe=Ye(MTe,Yt,4,Nt,si);return si[RTe-1]})(Ci,bi,ji,gn,yo,vo,uo)})(we[0],we[1],Ie[0],Ie[1],wt[0],wt[1]);return Vt>0?-1:Vt<0?1:0}function It(we,Ie){var wt=we.point,Vt=Ie.point;return wt[0]>Vt[0]?1:wt[0]Vt[1]?1:-1:(function(Ci,bi,ji,gn){return Ci.left!==bi.left?Ci.left?1:-1:Jt(ji,Ci.otherEvent.point,bi.otherEvent.point)!==0?Ci.isBelow(bi.otherEvent.point)?-1:1:!Ci.isSubject&&bi.isSubject?1:-1})(we,Ie,wt)}function xt(we,Ie,wt){var Vt=new he(Ie,!1,we,we.isSubject),Ci=new he(Ie,!0,we.otherEvent,we.isSubject);return ye(we.point,we.otherEvent.point)&&console.warn("what is that, a collapsed segment?",we),Vt.contourId=Ci.contourId=we.contourId,It(Ci,we.otherEvent)>0&&(we.otherEvent.left=!0,Ci.left=!1),we.otherEvent.otherEvent=Ci,we.otherEvent=Vt,wt.push(Ci),wt.push(Vt),wt}function li(we,Ie){return we[0]*Ie[1]-we[1]*Ie[0]}function ni(we,Ie){return we[0]*Ie[0]+we[1]*Ie[1]}function dn(we,Ie,wt){var Vt=(function(yo,vo,ho,Tr,xs){var uo=[vo[0]-yo[0],vo[1]-yo[1]],ts=[Tr[0]-ho[0],Tr[1]-ho[1]];function Or($o,ls,Vs){return[$o[0]+ls*Vs[0],$o[1]+ls*Vs[1]]}var nr=[ho[0]-yo[0],ho[1]-yo[1]],ss=li(uo,ts),as=ss*ss,Jr=ni(uo,uo);if(as>0){var is=li(nr,ts)/ss;if(is<0||is>1)return null;var Pr=li(nr,uo)/ss;return Pr<0||Pr>1?null:is===0||is===1?[Or(yo,is,uo)]:Pr===0||Pr===1?[Or(ho,Pr,ts)]:[Or(yo,is,uo)]}if((as=(ss=li(nr,uo))*ss)>0)return null;var bo=ni(uo,nr)/Jr,Nr=bo+ni(uo,ts)/Jr,ks=Math.min(bo,Nr),On=Math.max(bo,Nr);return ks<=1&&On>=0?ks===1?[Or(yo,ks>0?ks:0,uo)]:On===0?[Or(yo,On<1?On:1,uo)]:[Or(yo,ks>0?ks:0,uo),Or(yo,On<1?On:1,uo)]:null})(we.point,we.otherEvent.point,Ie.point,Ie.otherEvent.point),Ci=Vt?Vt.length:0;if(Ci===0||Ci===1&&(ye(we.point,Ie.point)||ye(we.otherEvent.point,Ie.otherEvent.point))||Ci===2&&we.isSubject===Ie.isSubject)return 0;if(Ci===1)return ye(we.point,Vt[0])||ye(we.otherEvent.point,Vt[0])||xt(we,Vt[0],wt),ye(Ie.point,Vt[0])||ye(Ie.otherEvent.point,Vt[0])||xt(Ie,Vt[0],wt),1;var bi=[],ji=!1,gn=!1;return ye(we.point,Ie.point)?ji=!0:It(we,Ie)===1?bi.push(Ie,we):bi.push(we,Ie),ye(we.otherEvent.point,Ie.otherEvent.point)?gn=!0:It(we.otherEvent,Ie.otherEvent)===1?bi.push(Ie.otherEvent,we.otherEvent):bi.push(we.otherEvent,Ie.otherEvent),ji&&gn||ji?(Ie.type=A,we.type=Ie.inOut===we.inOut?M:O,ji&&!gn&&xt(bi[1].otherEvent,bi[0].point,wt),2):gn?(xt(bi[0],bi[1].point,wt),3):bi[0]!==bi[3].otherEvent?(xt(bi[0],bi[1].point,wt),xt(bi[1],bi[2].point,wt),3):(xt(bi[0],bi[1].point,wt),xt(bi[3].otherEvent,bi[2].point,wt),3)}function Fi(we,Ie){if(we===Ie)return 0;if(Jt(we.point,we.otherEvent.point,Ie.point)!==0||Jt(we.point,we.otherEvent.point,Ie.otherEvent.point)!==0)return ye(we.point,Ie.point)?we.isBelow(Ie.otherEvent.point)?-1:1:we.point[0]===Ie.point[0]?we.point[1]Ie.contourId?1:-1:It(we,Ie)===1?1:-1}var Zi=function(){this.points=[],this.holeIds=[],this.holeOf=null,this.depth=null};function mi(we,Ie,wt,Vt){var Ci,bi=we+1,ji=Ie[we].point,gn=Ie.length;for(biVt;)bi--;return bi}Zi.prototype.isExterior=function(){return this.holeOf==null};var ln=wi,Bn=wi;function wi(we,Ie){if(!(this instanceof wi))return new wi(we,Ie);if(this.data=we||[],this.length=this.data.length,this.compare=Ie||Ji,this.length>0)for(var wt=(this.length>>1)-1;wt>=0;wt--)this._down(wt)}function Ji(we,Ie){return weIe?1:0}wi.prototype={push:function(we){this.data.push(we),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var we=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),we}},peek:function(){return this.data[0]},_up:function(we){for(var Ie=this.data,wt=this.compare,Vt=Ie[we];we>0;){var Ci=we-1>>1,bi=Ie[Ci];if(wt(Vt,bi)>=0)break;Ie[we]=bi,we=Ci}Ie[we]=Vt},_down:function(we){for(var Ie=this.data,wt=this.compare,Vt=this.length>>1,Ci=Ie[we];we=0)break;Ie[we]=gn,we=bi}Ie[we]=Ci}},ln.default=Bn;var Dn=Math.max,Kn=Math.min,_o=0;function io(we,Ie,wt,Vt,Ci,bi){var ji,gn,yo,vo,ho,Tr;for(ji=0,gn=we.length-1;ji0?Tr.left=!0:ho.left=!0;var xs=yo[0],uo=yo[1];Ci[0]=Kn(Ci[0],xs),Ci[1]=Kn(Ci[1],uo),Ci[2]=Dn(Ci[2],xs),Ci[3]=Dn(Ci[3],uo),Vt.push(ho),Vt.push(Tr)}}var $i=[];function Xn(we,Ie,wt){typeof we[0][0][0]=="number"&&(we=[we]),typeof Ie[0][0][0]=="number"&&(Ie=[Ie]);var Vt=(function(uo,ts,Or){var nr=null;return uo.length*ts.length==0&&(Or===N?nr=$i:Or===G?nr=uo:Or!==H&&Or!==ee||(nr=uo.length===0?ts:uo)),nr})(we,Ie,wt);if(Vt)return Vt===$i?null:Vt;var Ci=[1/0,1/0,-1/0,-1/0],bi=[1/0,1/0,-1/0,-1/0],ji=(function(uo,ts,Or,nr,ss){var as,Jr,is,Pr,bo,Nr,ks=new ln(null,It);for(is=0,Pr=uo.length;isnr[2]||nr[0]>Or[2]||Or[1]>nr[3]||nr[1]>Or[3])&&(ss===N?as=$i:ss===G?as=uo:ss!==H&&ss!==ee||(as=uo.concat(ts))),as})(we,Ie,Ci,bi,wt))return Vt===$i?null:Vt;for(var gn=(function(uo){var ts,Or,nr=(function(is){var Pr,bo,Nr,ks,On=[];for(bo=0,Nr=is.length;bo0){var Hr=$o[Va];if(Hr.holeOf!=null){var Ea=Hr.holeOf;$o[Ea].holeIds.push(ls),Vs.holeOf=Ea,Vs.depth=$o[Va].depth}else $o[Va].holeIds.push(ls),Vs.holeOf=Va,Vs.depth=$o[Va].depth+1}else Vs.holeOf=null,Vs.depth=$o[Va].depth}else Vs.holeOf=null,Vs.depth=0;return Vs})(nr[ts],as,is),bo=function(On){ss[On]=!0,On=nr.length)&&nr[Nr];);as.push(Pr)}};for(ts=0,Or=nr.length;tsks||as===G&&On.point[0]>nr[2])break;if(On.left){is=Jr=bo.insert(On),Jr=Jr!==(Pr=bo.minNode())?bo.prev(Jr):null,is=bo.next(is);var $o=Jr?Jr.key:null;if(te(On,$o,as),is&&dn(On,is.key,uo)===2&&(te(On,$o,as),te(is.key,On,as)),Jr&&dn(Jr.key,On,uo)===2){var ls=Jr;te($o,(ls=ls!==Pr?bo.prev(ls):null)?ls.key:null,as),te(On,$o,as)}}else is=Jr=bo.find(On=On.otherEvent),Jr&&is&&(Jr=Jr!==Pr?bo.prev(Jr):null,is=bo.next(is),bo.remove(On),is&&Jr&&dn(Jr.key,is.key,uo))}return Nr})(ji,0,0,Ci,bi,wt)),yo=[],vo=0;vo{v.push(new ai(O,T+(O-w)/(A-w)*(M-T)))}:(v,w,T,A,M,O)=>{v.push(new ai(w+(O-T)/(M-T)*(A-w),O))};for(let v of d){let w=[];for(let T of v){if(T.length<=2)continue;let A=[];for(let N=0;Ns&&y(A,H,G,ee,te,s):ie>c?he=s&&y(A,H,G,ee,te,s),he>c&&ie<=c&&y(A,H,G,ee,te,c)}let M=T[T.length-1],O=h===0?M.x:M.y;O>=s&&O<=c&&A.push(M),A.length&&(M=A[A.length-1],A[0].x===M.x&&A[0].y===M.y||A.push(A[0]),w.push(A))}w.length&&m.push(w)}return m}function Ewe(d,s){let c=tH(d),h=tH([s]),m=oee.intersection(c,h);return m==null?[]:ree(m)}function Awe(d,s){let h=tH(d,65536),m=[];for(;s.valid();s.next()){let[y,v]=s.get(),w=y.x*65536,T=y.y*65536,A=v.x*65536,M=v.y*65536,O=A-w,N=M-T,H=Math.hypot(O,N);if(H===0)continue;let G=Math.trunc(N/H*3),ee=-Math.trunc(O/H*3);m.push([[[w,T],[A,M],[A+G,M+ee],[w+G,T+ee],[w,T]]])}return m.length>0&&(h=oee.diff(h,m)),ree(h,1/65536)}function tH(d,s=1){return[d.map(c=>c.map(h=>[h.x*s,h.y*s]))]}function ree(d,s=1){return d.map(c=>c.map((h,m)=>{let y=h.map(v=>new ai(v[0]*s,v[1]*s).round());return m>0&&y.reverse(),y}))}class iH{constructor(s,c){this.layoutVertexArray=new Af,this.indexArray=new Za,this.lineIndexArray=new Ba,this.triangleSegments=new Ds,this.lineSegments=new Ds,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut}),this.uploaded=!1,c&&(this.elevatedLayoutVertexArray=new Df)}update(s,c,h,m,y,v,w,T){this.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,T)}isEmpty(){return this.layoutVertexArray.length===0}needsUpload(){return this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,pwe.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,hwe.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,c,h,m,y,v,w){this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,c,h,m,y,v,void 0,w)}}class nH{constructor(s){this.zoom=s.zoom,this.pixelRatio=s.pixelRatio,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.lut=s.lut,this.bufferData=new iH(s,!1),this.elevationBufferData=new iH(s,!0),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.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,c){}populate(s,c,h,m){this.hasPattern=J8("fill",this.layers,this.pixelRatio,c);let y=this.layers[0].layout.get("fill-sort-key"),v=[];for(let{feature:w,id:T,index:A,sourceLayerIndex:M}of s){let O=this.layers[0]._featureFilter.needGeometry,N=ri(w,O);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),N,h))continue;let H=y?y.evaluate(N,{},h,c.availableImages):void 0,G={id:T,properties:w.properties,type:w.type,sourceLayerIndex:M,index:A,geometry:O?N.geometry:Ai(w,h,m),patterns:{},sortKey:H};v.push(G)}y&&v.sort((w,T)=>w.sortKey-T.sortKey);for(let w of v){let{geometry:T,index:A,sourceLayerIndex:M}=w;if(this.hasPattern){let O=eH("fill",this.layers,w,this.zoom,this.pixelRatio,c);this.patternFeatures.push(O)}else this.addFeature(w,T,A,h,{},c.availableImages,c.brightness,c.elevationFeatures);c.featureIndex.insert(s[A].feature,T,A,M,this.index)}}update(s,c,h,m,y,v,w){this.bufferData.update(s,c,h,m,y,v,w,this.worldview),this.elevationBufferData.update(s,c,h,m,y,v,w,this.worldview),this.elevatedStructures&&this.elevatedStructures.update(s,c,h,m,y,v,w,this.worldview)}addFeatures(s,c,h,m,y,v){for(let w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,c,h,m,v,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,c,h,m,y,v=[],w,T){let A=JD(c,500);this.elevationMode!=="none"?this.addElevatedRoadFeature(s,A,m,h,T):this.addGeometry(A,this.bufferData),this.bufferData.populatePaintArrays(s,h,y,v,m,w,this.worldview),this.elevationBufferData.populatePaintArrays(s,h,y,v,m,w,this.worldview)}getUnevaluatedPortalGraph(){return this.elevatedStructures?this.elevatedStructures.unevaluatedPortals:void 0}getElevationPolygons(){return this.elevatedStructures?this.elevatedStructures.portalPolygons:void 0}setEvaluatedPortalGraph(s,c,h,m,y){this.elevatedStructures&&(this.elevatedStructures.construct(s),this.elevatedStructures.populatePaintArrays(c,h,m,y,this.worldview))}addElevatedRoadFeature(s,c,h,m,y){let v=new Array,w=ws.getElevationFeature(s,y);if(!w)return void this.addGeometry(c,this.bufferData);{let A=this.clipPolygonsToTile(c,1);A.length>0&&v.push({polygons:A,elevationFeature:w,elevationTileID:h})}let T={guardRailEnabled:this.layers[0].layout.get("fill-construct-bridge-guard-rail").evaluate(s,{},h),featureIndex:m};for(let A of v)if(A.elevationFeature){if(this.elevationMode==="hd-road-base"){this.elevatedStructures||(this.elevatedStructures=new pu(A.elevationTileID,this.layers,this.zoom,this.lut));let O=A.elevationFeature.isTunnel(),N=0;s.properties.hasOwnProperty(Sr)&&(N=+s.properties[Sr]);for(let H of A.polygons)this.elevatedStructures.addPortalCandidates(A.elevationFeature.id,H,O,A.elevationFeature,N)}A.elevationFeature.constantHeight==null&&(A.polygons=this.prepareElevatedPolygons(A.polygons,A.elevationFeature,A.elevationTileID));let M=new fa(h,A.elevationTileID);this.addElevatedGeometry(A.polygons,M,A.elevationFeature,this.elevationMode==="hd-road-base"?0:.05,m,T)}}addElevatedGeometry(s,c,h,m,y,v){let w={elevation:h,elevationSampler:c,bias:m,index:y,featureInfo:v},[T,A]=this.addGeometry(s,this.elevationBufferData,w);this.elevationBufferData.heightRange==null?this.elevationBufferData.heightRange={min:T,max:A}:(this.elevationBufferData.heightRange.min=Math.min(this.elevationBufferData.heightRange.min,T),this.elevationBufferData.heightRange.max=Math.max(this.elevationBufferData.heightRange.max,A))}addGeometry(s,c,h){let m=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,v=null;h&&(v=h.elevationSampler.constantElevation(h.elevation,h.bias),v!=null&&(m=v,y=v));let w=(T,A,M)=>{if(h!=null)if(A.push(T),v!=null)c.elevatedLayoutVertexArray.emplaceBack(v),M.push(v);else{let O=h.elevationSampler.pointElevation(T,h.elevation,h.bias);c.elevatedLayoutVertexArray.emplaceBack(O),M.push(O),m=Math.min(m,O),y=Math.max(y,O)}};for(let T of s){let A=0;for(let me of T)A+=me.length;let M=c.triangleSegments.prepareSegment(A,c.layoutVertexArray,c.indexArray),O=M.vertexLength,N=[],H=[],G=[],ee=[],te=[],ie=c.layoutVertexArray.length;for(let me of T){if(me.length===0)continue;me!==T[0]&&H.push(N.length/2);let ye=c.lineSegments.prepareSegment(me.length,c.layoutVertexArray,c.lineIndexArray),ze=ye.vertexLength;h&&te.push(c.layoutVertexArray.length-ie),w(me[0],G,ee),c.layoutVertexArray.emplaceBack(me[0].x,me[0].y),c.lineIndexArray.emplaceBack(ze+me.length-1,ze),N.push(me[0].x),N.push(me[0].y);for(let Ve=1;Ve0&&h&&this.elevationMode==="hd-road-base"){let me=h.elevation.isTunnel(),ye=h.elevation.safeArea,ze=this.elevatedStructures.addVertices(G,ee);this.elevatedStructures.addTriangles(he,ze,me);let Ve=te.length;if(Ve>0){for(let qe=0;qe=h&&H.max.x<=y&&H.min.y>=m&&H.max.y<=v?T:A).push(N)}if(T.length===s.length)return s;let M=[new ai(h,m),new ai(y,m),new ai(y,v),new ai(h,v),new ai(h,m)],O=T;for(let N of A)O.push(...Ewe(N,M));return O}}let see,aee,lee,cee;Ui(nH,"FillBucket",{omit:["layers","patternFeatures"]}),Ui(iH,"FillBufferData"),Ui(pu,"ElevatedStructures");class AF{constructor(s,c,h,m){if(this.triangleCount=c.length/3,this.min=new ai(0,0),this.max=new ai(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[y,v]=[s[0].clone(),s[0].clone()];for(let O=1;OO.cellIdx-N.cellIdx||O.triIdx-N.triIdx);let M=0;for(;Mthis.max.x||this.min.x>s.x||s.y>this.max.y||this.min.y>s.y)return;let h=Lf(s.x-this.min.x,this.xScale,this.cellsX),m=Lf(s.y-this.min.y,this.yScale,this.cellsY),y=this.cells[m*this.cellsX+h];if(y){this._lazyInitLookup();for(let v=0;vthis.max.x||this.min.x>c.x||s.y>this.max.y||this.min.y>c.y)return;this._lazyInitLookup();let m=Lf(s.x-this.min.x,this.xScale,this.cellsX),y=Lf(c.x-this.min.x,this.xScale,this.cellsX),v=Lf(s.y-this.min.y,this.yScale,this.cellsY),w=Lf(c.y-this.min.y,this.yScale,this.cellsY);for(let T=v;T<=w;T++)for(let A=m;A<=y;A++){let M=this.cells[T*this.cellsX+A];if(M)for(let O=0;Oc.fqid),this.index=s.index,this.hasPattern=!1,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.footprints=[],this.worldview=s.worldview}updateFootprints(s,c){for(let h of this.footprints)c.push({footprint:h,id:s})}populate(s,c,h,m){let y=[];for(let{feature:v,id:w,index:T,sourceLayerIndex:A}of s){let M=this.layers[0]._featureFilter.needGeometry,O=ri(v,M);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),O,h))continue;let N={id:w,properties:v.properties,type:v.type,sourceLayerIndex:A,index:T,geometry:M?O.geometry:Ai(v,h,m),patterns:{}};y.push(N)}for(let v of y){let{geometry:w,index:T,sourceLayerIndex:A}=v;this.addFeature(v,w,T,h,{},c.availableImages,c.brightness),c.featureIndex.insert(s[T].feature,w,T,A,this.index)}}isEmpty(){return this.footprints.length===0}uploadPending(){return!1}upload(s){}update(s,c,h,m,y,v,w){}destroy(){}addFeature(s,c,h,m,y,v=[],w){for(let T of JD(c,2)){let A=[],M=[],O=[],N=new ai(1/0,1/0),H=new ai(-1/0,-1/0);for(let te of T)if(te.length!==0){te!==T[0]&&O.push(M.length/2);for(let ie=0;iev===m)===void 0})(h,d.clipScope)}function DF(d,s){return d.x-s.x||d.y-s.y}function hee(d,s){return DF(d.min,s.min)===0&&DF(d.max,s.max)===0}function oH(d,s){return!(d.min.x>s.max.x||d.max.xs.max.y||d.max.ynew ai((T.x+y.x*fi)*w-v.x*fi,(T.y+y.y*fi)*w-v.y*fi))}return rH(c,m,d.indices,0,d.indices.length,0,0)}function gee(d,s,c,h){let m=Math.pow(2,h.z-c.z);return new ai((d+c.x*fi)*m-h.x*fi,(s+c.y*fi)*m-h.y*fi)}function sH(d,s){let c=[];s.grid.queryPoint(d,c);let h=s.indices,m=s.vertices;for(let y=0;y0&&(h.length>1&&c.push(h),h=[])}return h.length>1&&c.push(h),c}let lH=ei.types,Nwe=["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"],Bwe=["fill-extrusion-flood-light-ground-radius"],zwe=Math.pow(2,13),Vwe=Math.pow(2,15)-1,yee=new ai(0,1),Fy=2147483648;function t2(d,s,c,h,m,y,v,w){d.emplaceBack((s<<1)+v,(c<<1)+y,(Math.floor(h*zwe)<<1)+m,Math.round(w))}function i2(d,s,c){d.emplaceBack(s.x*fi,s.y*fi,c?1:0)}function MF(d,s,c,h,m,y){d.emplaceBack(s.x,s.y,(c.x<<1)+h,(c.y<<1)+m,y)}function n2(d,s,c){d.emplaceBack(s.x,s.y,s.z,c[0]*16384,c[1]*16384,c[2]*16384)}class vee{constructor(){this.vertexOffset=0,this.vertexCount=0,this.indexOffset=0,this.indexCount=0}}class bee{constructor(){this.centroidXY=new ai(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 ai(Number.MAX_VALUE,Number.MAX_VALUE),this.max=new ai(-Number.MAX_VALUE,-Number.MAX_VALUE),this.height=0,this.buildingId=0}span(){return new ai(this.max.x-this.min.x,this.max.y-this.min.y)}}class xee{constructor(){this.acc=new ai(0,0),this.accCount=0,this.centroidDataIndex=0}startRing(s,c){s.min.x===Number.MAX_VALUE&&(s.min.x=s.max.x=c.x,s.min.y=s.max.y=c.y)}appendEdge(s,c,h){this.accCount++,this.acc._add(c);let m=!!this.borders;c.xs.max.x&&(s.max.x=c.x,m=!0),c.ys.max.y&&(s.max.y=c.y,m=!0),((c.x===0||c.x===fi)&&c.x===h.x)!=((c.y===0||c.y===fi)&&c.y===h.y)&&this.processBorderOverlap(c,h),m&&this.checkBorderIntersection(c,h)}checkBorderIntersection(s,c){c.x<0!=s.x<0&&this.addBorderIntersection(0,En(c.y,s.y,(0-c.x)/(s.x-c.x))),c.x>fi!=s.x>fi&&this.addBorderIntersection(1,En(c.y,s.y,(fi-c.x)/(s.x-c.x))),c.y<0!=s.y<0&&this.addBorderIntersection(2,En(c.x,s.x,(0-c.y)/(s.y-c.y))),c.y>fi!=s.y>fi&&this.addBorderIntersection(3,En(c.x,s.x,(fi-c.y)/(s.y-c.y)))}addBorderIntersection(s,c){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);let h=this.borders[s];ch[1]&&(h[1]=c)}processBorderOverlap(s,c){if(s.x===c.x){if(s.y===c.y)return;let h=s.x===0?0:1;this.addBorderIntersection(h,c.y),this.addBorderIntersection(h,s.y)}else{let h=s.y===0?2:3;this.addBorderIntersection(h,c.x),this.addBorderIntersection(h,s.x)}}centroid(){return this.accCount===0?new ai(0,0):new ai(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,c)=>s+ +(c[0]!==Number.MAX_VALUE),0):0}}function Cee(d,s){let c=d.add(s)._unit(),h=Ue(d.x*c.x+d.y*c.y,-1,1);var m,y,v;return m=Math.acos(h),Math.min(4,Math.max(-4,Math.tan(m)))/4*Vwe*((y=d).x*(v=s).y-y.y*v.x<0?-1:1)}let Uwe=[d=>d.x<0,d=>d.x>fi,d=>d.y<0,d=>d.y>fi];function Hwe(d,s,c,h){let m=[4];if(h===0)return m;c._mult(h);let y=d.sub(c),v=s.sub(c),w=[d,s,y,v];for(let T=0;T<4;T++)for(let A of w)if(Uwe[T](A)){m.push(T);break}return m}class cH{constructor(s){this.vertexArray=new LD,this.indexArray=new Za,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut},c=>Bwe.includes(c)),this._segments=new Ds,this.hiddenByLandmarkVertexArray=new lS,this._segmentToGroundQuads={},this._segmentToGroundQuads[0]=[],this._segmentToRegionTriCounts={},this._segmentToRegionTriCounts[0]=[0,0,0,0,0],this.regionSegments={},this.regionSegments[4]=new Ds}getDefaultSegment(){return this.regionSegments[4]}hasData(){return this.vertexArray.length!==0}addData(s,c,h,m=!1){let y=s.length;if(y>2){let v=Math.max(0,this._segments.get().length-1),w=this._segments._prepareSegment(4*y,this.vertexArray.length,2*this._segmentToGroundQuads[v].length),T;v!==this._segments.get().length-1&&(v++,this._segmentToGroundQuads[v]=[],this._segmentToRegionTriCounts[v]=[0,0,0,0,0]);{let A=s[0],M=s[1];T=Cee(A.sub(s[y-1])._perp()._unit(),M.sub(A)._perp()._unit())}for(let A=0;Am.region-y.region);for(let h=0;hT+A,0);let w=0;for(let T=0;T<=4;T++){let A=v[T];if(A!==0){let M=this.regionSegments[T];M||(M=this.regionSegments[T]=new Ds);let O={vertexOffset:y.vertexOffset,primitiveOffset:y.primitiveOffset+w,vertexLength:y.vertexLength,primitiveLength:A};M.get().push(O)}w+=A}for(let T=0;T0?this.hiddenByLandmarkVertexBuffer=s.createVertexBuffer(this.hiddenByLandmarkVertexArray,Owe.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 c=this.regionSegments[s];c&&c.destroy()}}}}class RF{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(c=>c.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 Za,this.footprintVertices=new Af,this.footprintSegments=[],this.layoutVertexArray=new T_,this.centroidVertexArray=new fF,this.wallVertexArray=new _F,this.indexArray=new Za,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut},c=>Nwe.includes(c)),this.segments=new Ds,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.groundEffect=new cH(s),this.maxHeight=0,this.partLookup={},this.triangleSubSegments=[],this.polygonSegments=[],this.worldview=s.worldview}updateFootprints(s,c){}populate(s,c,h,m){this.features=[],this.hasPattern=J8("fill-extrusion",this.layers,this.pixelRatio,c),this.featuresOnBorder=[],this.borderFeatureIndices=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.selfDEMTileTimestamp=Number.MAX_VALUE,this.borderDEMTileTimestamp=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],this.tileToMeter=ft(h),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter,this.wallMode=this.layers[0].paint.get("fill-extrusion-line-width").constantOr(1)!==0;for(let{feature:y,id:v,index:w,sourceLayerIndex:T}of s){let A=this.layers[0]._featureFilter.needGeometry,M=ri(y,A);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),M,h))continue;let O={id:v,sourceLayerIndex:T,index:w,geometry:A?M.geometry:Ai(y,h,m),properties:y.properties,type:y.type,patterns:{}},N=this.layoutVertexArray.length,H=lH[O.type]==="Polygon";if(this.hasPattern)this.features.push({featureId:y.id,feature:eH("fill-extrusion",this.layers,O,this.zoom,this.pixelRatio,c)});else if(this.wallMode)for(let G of O.geometry)for(let ee of _ee(G,H))this.addFeature(y.id,O,[ee],w,h,{},c.availableImages,m,c.brightness);else this.addFeature(y.id,O,O.geometry,w,h,{},c.availableImages,m,c.brightness);c.featureIndex.insert(y,O.geometry,w,T,this.index,N)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles(),this.groundEffect.prepareBorderSegments(),this.polygonSegments.length=0}addFeatures(s,c,h,m,y,v){for(let{featureId:w,feature:T}of this.features){let A=lH[T.type]==="Polygon",{geometry:M}=T;if(this.wallMode)for(let O of M)for(let N of _ee(O,A))this.addFeature(w,T,[N],T.index,c,h,m,y,v);else this.addFeature(w,T,M,T.index,c,h,m,y,v)}this.sortBorders(),this.projection.name==="mercator"&&this.splitToSubtiles()}update(s,c,h,m,y,v,w){this.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,this.worldview),this.groundEffect.update(s,c,y,h,m,v,w,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,Lwe),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.wallVertexBuffer=s.createVertexBuffer(this.wallVertexArray,Rwe.members),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=s.createVertexBuffer(this.layoutVertexExtArray,Pwe.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,Mwe.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,c,h,m,y,v,w,T,A){let M=this.layers[0].paint.get("fill-extrusion-flood-light-ground-radius").evaluate(c,{})/this.tileToMeter,O=[new ai(0,0),new ai(fi,fi)],N=T.projection,H=N.name==="globe",G=this.wallMode||lH[c.type]==="Polygon",ee=new xee;ee.centroidDataIndex=this.centroidData.length;let te=new bee;te.buildingId=s,c.properties&&c.properties.hasOwnProperty("building_id")&&(te.buildingId=c.properties.building_id);let ie=this.layers[0].paint.get("fill-extrusion-base").evaluate(c,{},y)<=0,he=this.layers[0].paint.get("fill-extrusion-height").evaluate(c,{},y),me;if(te.height=he,te.vertexArrayOffset=this.layoutVertexArray.length,te.groundVertexArrayOffset=this.groundEffect.vertexArray.length,H&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new nS),this.wallMode){if(H)return void Ro("Non zero fill-extrusion-line-width is not yet supported on globe.");if(h.length!==1)return;me=(function(pt){let Gt=pt[0].x===pt[pt.length-1].x&&pt[0].y===pt[pt.length-1].y;(function(mi){let ln=0,Bn=mi.length;for(let wi=0;wi=0})(pt)||(pt=pt.reverse());let $t={geometry:[],joinNormals:[],indices:[]},Yt=[],si=[],Nt=[],Jt=pt.length;for(;Jt>=2&&pt[Jt-1].equals(pt[Jt-2]);)Jt--;if(Jt<(Gt?3:2))return $t;let It,xt,li,ni,dn,Fi=0;for(;Fi0,Dn="miter",Kn=2;Dn==="miter"&&wi>Kn&&(Dn="bevel"),Dn==="bevel"&&(wi>100&&(Dn="flipbevel"),wi{let we=new ai(io.x,io.y),Ie=new ai(io.x,io.y);we.x+=$i.x*zo,we.y+=$i.y*zo,Ie.x-=$i.x*Math.max(Xn,1),Ie.y-=$i.y*Math.max(Xn,1),Nt.push($i),Yt.push(we),si.push(Ie)};if(Dn==="miter")ln._mult(wi),_o(It,ln,0,0);else if(Dn==="flipbevel")ln=dn.mult(-1),_o(It,ln,0,0),_o(It,ln.mult(-1),0,0);else{let io=-Math.sqrt(wi*wi-1),$i=Ji?io:0,Xn=Ji?0:io;xt&&_o(It,ni,$i,Xn),li&&_o(It,dn,$i,Xn)}}$t.geometry=[...Yt,...si.reverse(),Yt[0]],$t.joinNormals=[...Nt,...Nt.reverse(),Nt[Nt.length-1]];let Zi=$t.geometry.length-1;for(let mi=0;mipt<(Gt.length-1)/2||pt===Gt.length-1,ze=this.wallMode?[h]:JD(h,500);for(let pt=ze.length-1;pt>=0;pt--){let Gt=ze[pt];(Gt.length===0||(Ve=Gt[0]).every(ti=>ti.x<=0)||Ve.every(ti=>ti.x>=fi)||Ve.every(ti=>ti.y<=0)||Ve.every(ti=>ti.y>=fi))&&ze.splice(pt,1)}var Ve;let qe;if(H)qe=Dee(ze,O,y);else{qe=[];for(let pt of ze)qe.push({polygon:pt,bounds:O})}let Ye=G?this.edgeRadius:0,it=Ye>0&&this.zoom<17,Ut=(pt,Gt)=>{if(pt.length===0)return!1;let ti=pt[pt.length-1];return Gt.x===ti.x&&Gt.y===ti.y};for(let{polygon:pt,bounds:Gt}of qe){let ti=0,$t=0;for(let Jt of pt)G&&!Jt[0].equals(Jt[Jt.length-1])&&Jt.push(Jt[0]),$t+=G?Jt.length-1:Jt.length;let Yt=this.segments.prepareSegment((G?5:4)*$t,this.layoutVertexArray,this.indexArray);te.footprintSegIdx<0&&(te.footprintSegIdx=this.footprintSegments.length),te.polygonSegIdx<0&&(te.polygonSegIdx=this.polygonSegments.length);let si={triangleArrayOffset:this.indexArray.length,triangleCount:0,triangleSegIdx:this.segments.segments.length-1},Nt=new vee;if(Nt.vertexOffset=this.footprintVertices.length,Nt.indexOffset=3*this.footprintIndices.length,Nt.ringIndices=[],G){let Jt=[],It=[];ti=Yt.vertexLength;for(let li=0;li4&&Tee(It[It.length-2],It[0],It[1]),li=Ye?jwe(It[It.length-2],It[0],It[1],Ye):0,ni=[],dn,Fi,Zi;Fi=It[1].sub(It[0])._perp()._unit();let mi=!0;for(let ln=1,Bn=0;ln0?1:0,$i=wi.dist(Ji);if(Bn+$i>32768&&(Bn=0),Ye){Zi=Dn.sub(Ji)._perp()._unit();let Ie=See(wi,Ji,Dn,wee(Fi,Zi),Ye);isNaN(Ie)&&(Ie=0);let wt=Ji.sub(wi)._unit();wi=wi.add(wt.mult(li))._round(),Ji=Ji.add(wt.mult(-Ie))._round(),li=Ie,Fi=Zi,ie&&this.zoom>=17&&(Ut(ni,wi)||ni.push(wi),Ut(ni,Ji)||ni.push(Ji))}let Xn=Yt.vertexLength,zo=It.length>4&&Tee(wi,Ji,Dn),we=Eee(Bn,xt,mi);if(t2(this.layoutVertexArray,wi.x,wi.y,_o,io,0,0,we),t2(this.layoutVertexArray,wi.x,wi.y,_o,io,0,1,we),this.wallMode){let Ie=ye(ln-1,It),wt=me.joinNormals[ln-1];i2(this.wallVertexArray,wt,Ie),i2(this.wallVertexArray,wt,Ie)}if(Bn+=$i,we=Eee(Bn,zo,!mi),xt=zo,t2(this.layoutVertexArray,Ji.x,Ji.y,_o,io,0,0,we),t2(this.layoutVertexArray,Ji.x,Ji.y,_o,io,0,1,we),this.wallMode){let Ie=ye(ln,It),wt=me.joinNormals[ln];i2(this.wallVertexArray,wt,Ie),i2(this.wallVertexArray,wt,Ie)}if(Yt.vertexLength+=4,this.indexArray.emplaceBack(Xn+0,Xn+1,Xn+2),this.indexArray.emplaceBack(Xn+1,Xn+3,Xn+2),Yt.primitiveLength+=2,Ye){let Ie=ti+(ln===1?It.length-2:ln-2),wt=ln===1?ti:Ie+1;if(this.indexArray.emplaceBack(Xn+1,Ie,Xn+3),this.indexArray.emplaceBack(Ie,wt,Xn+3),Yt.primitiveLength+=2,dn===void 0&&(dn=Xn),!dH(Dn,It[ln],Gt)){let Vt=ln===It.length-1?dn:Yt.vertexLength;this.indexArray.emplaceBack(Xn+2,Xn+3,Vt),this.indexArray.emplaceBack(Xn+3,Vt+1,Vt),this.indexArray.emplaceBack(Xn+3,wt,Vt+1),Yt.primitiveLength+=3}mi=!mi}if(H){let Ie=this.layoutVertexExtArray,wt=N.projectTilePoint(wi.x,wi.y,y),Vt=N.projectTilePoint(Ji.x,Ji.y,y),Ci=N.upVector(y,wi.x,wi.y),bi=N.upVector(y,Ji.x,Ji.y);n2(Ie,wt,Ci),n2(Ie,wt,Ci),n2(Ie,Vt,bi),n2(Ie,Vt,bi)}}G&&(ti+=It.length-1),ie&&Ye&&this.zoom>=17&&(ni.length!==0&&Ut(ni,ni[0])&&ni.pop(),this.groundEffect.addData(ni,Gt,M,Ye>0))}this.footprintSegments.push(Nt),si.triangleCount=this.indexArray.length-si.triangleArrayOffset,this.polygonSegments.push(si),++te.footprintSegLen,++te.polygonSegLen}if(te.vertexCount=this.layoutVertexArray.length-te.vertexArrayOffset,te.groundVertexCount=this.groundEffect.vertexArray.length-te.groundVertexArrayOffset,te.vertexCount!==0){if(te.centroidXY=ee.borders?yee:this.encodeCentroid(ee,te),this.centroidData.push(te),ee.borders){this.featuresOnBorder.push(ee);let pt=this.featuresOnBorder.length-1;for(let Gt=0;Gtthis.featuresOnBorder[c].borders[s][0]-this.featuresOnBorder[h].borders[s][0])}splitToSubtiles(){let s=[];for(let w=0;wfi),M=2*A+(+(T.min.x+T.max.x>fi)^A);for(let O=0;Ow.triangleSegmentIdx===T.triangleSegmentIdx?w.subtile-T.subtile:w.triangleSegmentIdx-T.triangleSegmentIdx);let h=0,m=0,y=0;for(let w of s){if(w.triangleSegmentIdx!==h)break;y++}let v=s.length;for(;m!==s.length;){h=s[m].triangleSegmentIdx;let w=0,T=m,A=m;for(let M=T;M0&&this.triangleSubSegments.push({segment:H,min:O,max:N}),T=A;for(let G=T;G[ee[0]*(1-ie[0])+te[0]*ie[0],ee[1]*(1-ie[1])+te[1]*ie[1]],H=[],G=[];for(let ee of this.triangleSubSegments){H[0]=ee.min.x/fi,H[1]=ee.min.y/fi,G[0]=ee.max.x/fi,G[1]=ee.max.y/fi;let te=N(M,O,H),ie=N(M,O,G);if(new Rn([te[0],te[1],y],[ie[0],ie[1],v]).intersectsPrecise(h)===0){A&&(m.segments.push(A),A=void 0);continue}let he=ee.segment;A&&A.vertexOffset!==he.vertexOffset&&(m.segments.push(A),A=void 0),A?(A.vertexLength+=he.vertexLength,A.primitiveLength+=he.primitiveLength):A={vertexOffset:he.vertexOffset,primitiveLength:he.primitiveLength,vertexLength:he.vertexLength,primitiveOffset:he.primitiveOffset,sortKey:void 0,vaos:{}}}return A&&m.segments.push(A),m}encodeCentroid(s,c){let h=s.centroid(),m=c.span(),y=Math.min(7,Math.round(m.x*this.tileToMeter/10)),v=Math.min(7,Math.round(m.y*this.tileToMeter/10));return new ai(Ue(h.x,1,fi-1)<<3|y,Ue(h.y,1,fi-1)<<3|v)}encodeBorderCentroid(s){if(!s.borders)return new ai(0,0);let c=s.borders,h=Number.MAX_VALUE;if(c[0][0]!==h||c[1][0]!==h){let m=c[0][0]!==h?0:1;return new ai(6|(c[0][0]!==h?0:65528),(c[m][0]+c[m][1])/2<<3|6)}{let m=c[2][0]!==h?2:3;return new ai((c[m][0]+c[m][1])/2<<3|6,6|(c[2][0]!==h?0:65528))}}showCentroid(s){let c=this.centroidData[s.centroidDataIndex];c.flags&=2147483647,c.centroidXY.x=0,c.centroidXY.y=0,this.writeCentroidToBuffer(c)}writeCentroidToBuffer(s){this.groundEffect.updateHiddenByLandmark(s);let c=s.vertexArrayOffset,h=s.vertexCount+s.vertexArrayOffset,m=s.flags&Fy?yee:s.centroidXY,y=this.centroidVertexArray.geta_centroid_pos0(c);if(this.centroidVertexArray.geta_centroid_pos1(c)!==m.y||y!==m.x){for(let v=c;vT.max.x||T.min.x>v.max.x||v.min.y>T.max.y||T.min.y>v.max.y))for(let A=0;Ac!=H>c&&s<(this.footprintVertices.int16[2*(M+v.vertexOffset)+0]-O)*(c-N)/(H-N)+O&&(m=!m)}w=T}}return m}getHeightAtTileCoord(s,c){let h=Number.NEGATIVE_INFINITY,m=!0,y=4*(s+fi)*fi+(c+fi);if(this.partLookup.hasOwnProperty(y)){let v=this.partLookup[y];return v?{height:v.height,hidden:!!(v.flags&Fy)}:void 0}for(let v of this.centroidData)s>v.max.x||v.min.x>s||c>v.max.y||v.min.y>c||v.height<=h||this.footprintContainsPoint(s,c,v)&&(h=v.height,this.partLookup[y]=v,m=!!(v.flags&Fy));if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:m};this.partLookup[y]=void 0}}function wee(d,s){let c=d.add(s)._unit();return d.x*c.x+d.y*c.y}function jwe(d,s,c,h){let m=s.sub(d)._perp()._unit(),y=c.sub(s)._perp()._unit();return See(d,s,c,wee(m,y),h)}function See(d,s,c,h,m){let y=Math.sqrt(1-h*h);return Math.min(d.dist(s)/3,s.dist(c)/3,m*y/h)}function dH(d,s,c){return d.xc[1].x&&s.x>c[1].x||d.yc[1].y&&s.y>c[1].y}function Iee(d,s){return d.xs[1].x||d.ys[1].y}function Tee(d,s,c){if(d.x<0||d.x>=fi||s.x<0||s.x>=fi||c.x<0||c.x>=fi)return!1;let h=c.sub(s),m=h.perp(),y=d.sub(s);return(h.x*y.x+h.y*y.y)/Math.sqrt((h.x*h.x+h.y*h.y)*(y.x*y.x+y.y*y.y))>-.866&&m.x*y.x+m.y*y.y<0}function Eee(d,s,c){let h=s?2|d:-3&d;return c?1|h:-2&h}function Aee(){let d=Math.PI/32,s=Math.tan(d),c=Y;return c*Math.sqrt(1+2*s*s)-c}function Dee(d,s,c){let h=1<{for(let Ye of Ve)G.push({polygon:Ye,bounds:qe})},te=Math.ceil(Math.log2(M)),ie=Math.ceil(Math.log2(O)),he=te-ie,me=[];for(let Ve=0;Ve0?0:1);for(let Ve=0;Veqe+1?ze.push({polygons:$t,bounds:si,depth:qe+1}):ee($t,si)}if(Yt.length){let si=[new ai(Ye===0?ti:it.x,Ye===1?ti:it.y),Ut];me.length>qe+1?ze.push({polygons:Yt,bounds:si,depth:qe+1}):ee(Yt,si)}}return G})(d,s,Math.ceil((y-m)/11.25),Math.ceil((v-w)/11.25),1,(T,A,M)=>{if(T===0)return .5*(A+M);{let O=Me((c.y+A/fi)/h);return(Pe(.5*(Me((c.y+M/fi)/h)+O))*h-c.y)*fi}})}function Gwe(d,s,c,h,m,y){let v=Math.pow(2,h.z-m.z);for(let w=0;w=T[v]&&(w=s,T=d),w[v]m&&Oee(w,T,v,m),w[v]y&&Oee(T,w,v,y)}}function OF(d,s,c,h,m,y){let v=[];for(let w=0;w=h&&G.x>=h||(H.x>=h?H=new ai(h,H.y+(h-H.x)/(G.x-H.x)*(G.y-H.y))._round():G.x>=h&&(G=new ai(h,H.y+(h-H.x)/(G.x-H.x)*(G.y-H.y))._round()),H.y>=m&&G.y>=m||(H.y>=m?H=new ai(H.x+(m-H.y)/(G.y-H.y)*(G.x-H.x),m)._round():G.y>=m&&(G=new ai(H.x+(m-H.y)/(G.y-H.y)*(G.x-H.x),m)._round()),A&&H.equals(A[A.length-1])||(A=[H],v.push(A),y&&y.push({progress:{min:te+Lee(ie,he,H)*ee,max:1},parentIndex:w,prevPoint:ie,nextPoint:he})),A.push(G),y&&(y[y.length-1].progress.max=te+Lee(ie,he,G)*ee,y[y.length-1].nextPoint=he)))))}if(y&&O>0)for(let N=M;NA.t-M.t);let v=0,w=0,T=[];for(h.push(T);v!==d.length;){if(w===y.length){for(;v!==d.length;)T.length!==0&&T[T.length-1].equals(d[v])||T.push(d[v]),v++;break}y[w].t<=v?(T.length!==0&&T[T.length-1].equals(y[w].point)||T.push(y[w].point),Math.trunc(y[w].t),w++):(T.length!==0&&T[T.length-1].equals(d[v])||T.push(d[v]),v++)}}function Lee(d,s,c){return d.x!==s.x?(c.x-d.x)/(s.x-d.x):d.y!==s.y?(c.y-d.y)/(s.y-d.y):0}function o2(d,s){return d.x*s.x+d.y*s.y}function Fee(d,s){if(d.length===1){let c=0,h=s[c++],m;for(;!m||h.equals(m);)if(m=s[c++],!m)return 1/0;for(;c{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=()=>{}}}class Wwe{constructor(){this.tasks={},this.taskQueue=[],Pn(["process"],this),this.invoker=new qwe(this.process),this.nextId=0}add(s,c){let h=this.nextId++,m=(function({type:y,isSymbolTile:v,zoom:w}){return w=w||0,y==="message"?0:y!=="maybePrepare"||v?y!=="parseTile"||v?y==="parseTile"&&v?300-w:y==="maybePrepare"&&v?400-w:500:200-w:100-w})(c);if(m===0){try{s()}finally{}return null}return this.tasks[h]={fn:s,metadata:c,priority:m,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 c=this.tasks[s];if(delete this.tasks[s],this.taskQueue.length&&this.invoker.trigger(),!c)return;c.fn()}finally{}}pick(){let s=null,c=1/0;for(let m=0;m{h&&delete this.callbacks[w],this.target.postMessage({id:w,type:"",targetMapId:m,sourceMapId:this.mapId})}}}receive(s){let c=s.data;if(!c)return;let h=c.id;if(h&&(!c.targetMapId||this.mapId===c.targetMapId))if(c.type===""){let m=this.cancelCallbacks[h];delete this.cancelCallbacks[h],m&&m.cancel()}else if(c.mustQueue||qr(self)){let m=this.callbacks[h],y=this.scheduler.add(()=>this.processTask(h,c),m&&m.metadata||{type:"message"});y&&(this.cancelCallbacks[h]=y)}else this.processTask(h,c)}processTask(s,c){if(delete this.cancelCallbacks[s],c.type===""){let h=this.callbacks[s];delete this.callbacks[s],h&&(c.error?h(If(c.error)):h(null,If(c.data)))}else{let h=new Set,m=c.hasCallback?(v,w)=>{this.target.postMessage({id:s,type:"",sourceMapId:this.mapId,error:v?Sf(v):null,data:Sf(w,h)},h)}:()=>{},y=If(c.data);if(this.parent[c.type])this.parent[c.type](c.sourceMapId,y,m);else if(this.parent.getWorkerSource){let v=c.type.split("."),{source:w,scope:T}=y;this.parent.getWorkerSource(c.sourceMapId,v[0],w,T)[v[1]](y,m)}else m(new Error(`Could not find function ${c.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}}var r2={workerUrl:"",workerClass:null,workerParams:void 0};let uH="mapboxgl_preloaded_worker_pool",PF=(()=>{class d{constructor(){this.active={}}acquire(c,h=d.workerCount){if(!this.workers)for(this.workers=[];this.workers.length{h.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[uH]}numActive(){return Object.keys(this.active).length}}return d.workerCount=2,d})();class gS{constructor(s,c,h="Worker",m=PF.workerCount){this.workerPool=s,this.actors=[],this.currentActor=0,this.id=Xt();let y=this.workerPool.acquire(this.id,m);for(let v=0;v{this.ready=!0})}broadcast(s,c,h){Et(this.actors,(m,y)=>{m.send(s,c,y)},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 s2,pH;function LF(){return s2||(s2=new PF),s2}gS.Actor=Bee;class Kwe{constructor(s){this.module=s}createIntArray(s){let c=new Int32Array(s),h=this.module.malloc(c.length*c.BYTES_PER_ELEMENT);return this.module.heap32.set(c,h/c.BYTES_PER_ELEMENT),h}createFloatArray(s){let c=new Float32Array(s),h=this.module.malloc(c.length*c.BYTES_PER_ELEMENT);return this.module.heapF32.set(c,h/c.BYTES_PER_ELEMENT),h}createStringBuffer(s){let c=this.module.malloc(s.length+1);for(let h=0;hm.arrayBuffer()).then(m=>{s.buffers[c]=m})}function qee(d,s){let c=d.json.bufferViews[s];return new Uint8Array(d.buffers[c.buffer],c.byteOffset||0,c.byteLength)}function eSe(d,s,c,h){if(d.uri){let m=$ee(d.uri,h);return fetch(m).then(y=>y.blob()).then(y=>createImageBitmap(y)).then(y=>{s.images[c]=y})}if(d.bufferView!==void 0){let m=qee(s,d.bufferView),y=new Blob([m],{type:d.mimeType});return createImageBitmap(y).then(v=>{s.images[c]=v})}}function Wee(d,s=0,c){let h={json:null,images:[],buffers:[]};if(new Uint32Array(d,s,1)[0]===jee){let M=new Uint32Array(d,s),O=2,N=(M[O++]>>2)-3,H=M[O++]>>2;if(O++,h.json=JSON.parse(Gee.decode(M.subarray(O,O+H))),O+=H,O{let M=[],O=w&&w.includes(fH),N=w&&w.includes(BF);if(O&&M.push((function(){if(!sm)return a2??(a2=(function(H){let G,ee=null;function te(){G=new Uint8Array(ee.buffer)}function ie(){throw new Error("Unexpected Draco error.")}let he={a:{a:ie,d:function(me,ye,ze){return G.copyWithin(me,ye,ye+ze)},c:function(me){let ye=G.length,ze=Math.max(me>>>0,Math.ceil(1.2*ye)),Ve=Math.ceil((ze-ye)/65536);try{return ee.grow(Ve),te(),!0}catch{return!1}},b:ie}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(H,he):H.then(me=>me.arrayBuffer()).then(me=>WebAssembly.instantiate(me,he))).then(me=>{let{Rb:ye,Qb:ze,P:Ve,T:qe,X:Ye,Ja:it,La:Ut,Qa:pt,Va:Gt,Wa:ti,eb:$t,jb:Yt,f:si,e:Nt,yb:Jt,zb:It,Ab:xt,Bb:li,Db:ni,Gb:dn}=me.instance.exports;ee=Nt;let Fi=(()=>{let Zi=0,mi=0,ln=0,Bn=0;return wi=>{ln&&(ye(Bn),ye(Zi),mi+=ln,ln=Zi=0),Zi||(mi+=128,Zi=ze(mi));let Ji=wi.length+7&-8,Dn=Zi;Ji>=mi&&(ln=Ji,Dn=Bn=ze(Ji));for(let Kn=0;Kn{sm=H,a2=void 0}))})()),N&&M.push((function(){if(mH)return;let H=(function(G){let ee,te=WebAssembly.instantiateStreaming(G,{}).then(me=>{ee=me.instance,ee.exports.__wasm_call_ctors()}),ie={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},he={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:te,supported:!0,decodeGltfBuffer(me,ye,ze,Ve,qe,Ye){(function(it,Ut,pt,Gt,ti,$t,Yt){let si=it.exports.sbrk,Nt=Gt+3&-4,Jt=si(Nt*ti),It=si($t.length),xt=new Uint8Array(it.exports.memory.buffer);xt.set($t,It);let li=Ut(Jt,Gt,ti,It,$t.length);if(li===0&&Yt&&Yt(Jt,Nt,ti),pt.set(xt.subarray(Jt,Jt+Gt*ti)),si(Jt-si(0)),li!==0)throw new Error(`Malformed buffer data: ${li}`)})(ee,ee.exports[he[qe]],me,ye,ze,Ve,ee.exports[ie[Ye]])}}})(fetch(Uee()));return H.ready.then(()=>{mH=H})})()),y)for(let H=0;H{if(O&&v)for(let{primitives:H}of v)for(let G of H)Qwe(G,h);if(N&&v&&T)for(let H of T)Xwe(H,h);return h})})}function gH(d){switch(d){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 _H(d){switch(d){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 yH{constructor(s,c,h,m){this.context=s,this.format=h,this.useMipmap=m&&m.useMipmap,this.texture=s.gl.createTexture(),this.update(c,{premultiply:m&&m.premultiply})}update(s,c){let h=s&&s instanceof HTMLVideoElement&&s.width===0?s.videoWidth:s.width,m=s&&s instanceof HTMLVideoElement&&s.height===0?s.videoHeight:s.height,{context:y}=this,{gl:v}=y,{x:w,y:T}=c&&c.position?c.position:{x:0,y:0},A=w+h,M=T+m;!this.size||this.size[0]===A&&this.size[1]===M||(v.bindTexture(v.TEXTURE_2D,null),v.deleteTexture(this.texture),this.texture=v.createTexture(),this.size=null),v.bindTexture(v.TEXTURE_2D,this.texture),y.pixelStoreUnpackFlipY.set(!1),y.pixelStoreUnpack.set(1),y.pixelStoreUnpackPremultiplyAlpha.set(this.format===v.RGBA8&&(!c||c.premultiply!==!1));let O=s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||ImageBitmap&&s instanceof ImageBitmap;if(!this.size&&A>0&&M>0){let N=this.useMipmap?Math.floor(Math.log2(Math.max(A,M)))+1:1;v.texStorage2D(v.TEXTURE_2D,N,this.format,A,M),this.size=[A,M]}this.size&&(O?v.texSubImage2D(v.TEXTURE_2D,0,w,T,gH(this.format),_H(this.format),s):"data"in s&&s.data&&v.texSubImage2D(v.TEXTURE_2D,0,w,T,h,m,gH(this.format),_H(this.format),s.data)),this.useMipmap&&v.generateMipmap(v.TEXTURE_2D)}bind(s,c,h=!1){let{context:m}=this,{gl:y}=m;y.bindTexture(y.TEXTURE_2D,this.texture),s!==this.minFilter&&(y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,s),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,this.useMipmap&&!h?s===y.NEAREST?y.NEAREST_MIPMAP_NEAREST:y.LINEAR_MIPMAP_LINEAR:s),this.minFilter=s),c!==this.wrapS&&(y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,c),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,c),this.wrapS=c)}bindExtraParam(s,c,h,m,y){let{context:v}=this,{gl:w}=v;w.bindTexture(w.TEXTURE_2D,this.texture),c!==this.magFilter&&(w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,c),this.magFilter=c),s!==this.minFilter&&(w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,this.useMipmap?s===w.NEAREST?w.NEAREST_MIPMAP_NEAREST:w.LINEAR_MIPMAP_LINEAR:s),this.minFilter=s),h!==this.wrapS&&(w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_S,h),this.wrapS=h),m!==this.wrapT&&(w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_T,m),this.wrapT=m),y!==this.compareMode&&(y?(w.texParameteri(w.TEXTURE_2D,w.TEXTURE_COMPARE_MODE,w.COMPARE_REF_TO_TEXTURE),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_COMPARE_FUNC,y)):w.texParameteri(w.TEXTURE_2D,w.TEXTURE_COMPARE_MODE,w.NONE),this.compareMode=y)}destroy(){let{gl:s}=this.context;s.deleteTexture(this.texture),this.texture=null}}class c2{constructor(s,c){this.context=s,this.texture=c}bind(s,c){let{context:h}=this,{gl:m}=h;m.bindTexture(m.TEXTURE_2D,this.texture),s!==this.minFilter&&(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,s),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,s),this.minFilter=s),c!==this.wrapS&&(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,c),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,c),this.wrapS=c)}}let tSe=Po([{name:"a_pos_3f",components:3,type:"Float32"}]),iSe=Po([{name:"a_color_3f",components:3,type:"Float32"}]),nSe=Po([{name:"a_color_4f",components:4,type:"Float32"}]),oSe=Po([{name:"a_uv_2f",components:2,type:"Float32"}]),rSe=Po([{name:"a_normal_3f",components:3,type:"Float32"}]),sSe=Po([{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"}]),aSe=Po([{name:"a_pbr",components:4,type:"Uint16"},{name:"a_heightBasedEmissiveStrength",components:3,type:"Float32"}]);function Kee(d,s){let c=zF(d.projection,d.zoom,d.width,d.height),h=(function(y,v,w,T,A){let M=new J(w.lng-180*Ny,w.lat),O=new J(w.lng+180*Ny,w.lat),N=y.project(M.lng,M.lat),H=y.project(O.lng,O.lat),G=-Math.atan2(H.y-N.y,H.x-N.x),ee=At.fromLngLat(w);ee.y=Ue(ee.y,-1+Ny,1-Ny);let te=ee.toLngLat(),ie=y.project(te.lng,te.lat),he=At.fromLngLat(te);he.x+=Ny;let me=he.toLngLat(),ye=y.project(me.lng,me.lat),ze=Yee(ye.x-ie.x,ye.y-ie.y,G),Ve=At.fromLngLat(te);Ve.y+=Ny;let qe=Ve.toLngLat(),Ye=y.project(qe.lng,qe.lat),it=Yee(Ye.x-ie.x,Ye.y-ie.y,G),Ut=Math.abs(ze.x)/Math.abs(it.y),pt=R([]);Re(pt,pt,-G*(1-(A?0:T)));let Gt=R([]);return Q(Gt,Gt,[1,1-(1-Ut)*T,1]),Gt[4]=-it.x/it.y*T,Re(Gt,Gt,G),$(Gt,pt,Gt),Gt})(d.projection,0,d.center,c,s),m=Zee(d);return Q(h,h,[m,m,1]),h}function Zee(d){let s=d.projection,c=zF(d.projection,d.zoom,d.width,d.height),h=vH(s,d.center),m=vH(s,J.convert(s.center));return Math.pow(2,h*c+(1-c)*m)}function zF(d,s,c,h,m=1/0){let y=d.range;if(!y)return 0;let v=Math.min(m,Math.max(c,h)),w=Math.log2(v/1024);return Tt(y[0]+w,y[1]+w,s)}let Ny=1/4e4;function vH(d,s){let c=Ue(s.lat,-Be,Be),h=new J(s.lng-180*Ny,c),m=new J(s.lng+180*Ny,c),y=d.project(h.lng,c),v=d.project(m.lng,c),w=At.fromLngLat(h),T=At.fromLngLat(m),A=v.x-y.x,M=v.y-y.y,O=T.x-w.x,N=T.y-w.y,H=Math.sqrt((O*O+N*N)/(A*A+M*M));return Math.log2(H)}function Yee(d,s,c){let h=Math.cos(c),m=Math.sin(c);return{x:d*h-s*m,y:d*m+s*h}}function Qee(d,s,c){R(d),Re(d,d,dt(s[2])),se(d,d,dt(s[0])),ge(d,d,dt(s[1])),Q(d,d,c),$(d,d,[1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1])}function VF(d,s,c,h,m,y,v,w){let T=[c[0]-s[0],c[1]-s[1],0],A=[h[0]-s[0],h[1]-s[1],0];if(ht(T)<1e-12||ht(A)<1e-12)return sn(d);let M=Wi([],T,A);vn(M,M),zt(A,h,s),T[2]=(y-m)*w,A[2]=(v-m)*w;let O=T;return Wi(O,T,A),vn(O,O),cd(d,M,O)}function bH(d,s,c=!1){let h=Py(s.zoom),m=(function(y,v,w){let T=v.worldSize,A=[y[12],y[13],y[14]],M=Me(A[1]/T),O=Ne(A[0]/T),N=R([]),H=ke(1,M)*T,G=ke(1,0)*T*nt(M,v.zoom),ee=1/K8(T),te=G*ee;if(w){let ye=zF(v.projection,v.zoom,v.width,v.height,1024);te=ee*v.projection.pixelSpaceConversion(v.center.lat,T,ye)}let ie=U(M,O);ki(ie,ie,_t([],vn([],ie),H*te*A[2]));let he=(function(ye){let ze=[ye[0],ye[1],ye[2]],Ve=[0,1,0],qe=Wi([],Ve,ze);return Wi(Ve,ze,qe),qi(Ve)===0&&(Ve=[0,1,0],Wi(qe,ze,Ve)),vn(qe,qe),vn(Ve,Ve),vn(ze,ze),[qe[0],qe[1],qe[2],0,Ve[0],Ve[1],Ve[2],0,ze[0],ze[1],ze[2],0,ye[0],ye[1],ye[2],1]})(ie);Q(N,N,[te,te,te*H]),W(N,N,[-A[0],-A[1],-A[2]]);let me=$([],v.globeMatrix,he);return $(me,me,N),$(me,me,y),me})(d,s,c);if(h>0){let y=(function(v,w){let T=w.worldSize,A=ke(1,0)*T*nt(w.center.lat,w.zoom)/K8(T),M=ke(1,w.center.lat)*T,O=R([]);ge(O,O,dt(w.center.lng)),se(O,O,dt(w.center.lat)),W(O,O,[0,0,g]),Q(O,O,[A,A,A*M]);let N=w.point;return W(O,O,[-N.x,-N.y,0]),$(O,O,v),$(O,w.globeMatrix,O)})(d,s);return(function(v,w,T){let A=(G,ee,te)=>{let ie=ht(G),he=ht(ee),me=k_(G,ee,te);return _t(me,me,1/ht(me)*En(ie,he,te))},M=A([v[0],v[1],v[2]],[w[0],w[1],w[2]],T),O=A([v[4],v[5],v[6]],[w[4],w[5],w[6]],T),N=A([v[8],v[9],v[10]],[w[8],w[9],w[10]],T),H=k_([v[12],v[13],v[14]],[w[12],w[13],w[14]],T);return[M[0],M[1],M[2],0,O[0],O[1],O[2],0,N[0],N[1],N[2],0,H[0],H[1],H[2],1]})(m,y,h)}return m}function Xee(d,s,c,h){let m=Rn.projectAabbCorners(h,c),y=Number.MAX_VALUE,v=-1;for(let A=0;Anew ai(m[A][0],m[A][1]),T;switch(v){case 0:case 6:T=[w(1),w(5),w(4),w(7),w(3),w(2),w(1)];break;case 1:case 7:T=[w(0),w(4),w(5),w(6),w(2),w(3),w(0)];break;case 3:case 5:T=[w(1),w(0),w(4),w(7),w(6),w(2),w(1)];break;default:T=[w(1),w(5),w(6),w(7),w(3),w(0),w(1)]}if(du(d,T))return y}let Ax=64,bS={CoordinateSpaceTile:1,HasMapboxMeshFeatures:4,HasMeshoptCompression:8};function Jee(d,s,c,h,m,y,v,w,T,A=!1){let M=c.zoom,O=c.project(h),N=nt(h.lat,M),H=1/N;R(d),W(d,d,[O.x+v[0]*H,O.y+v[1]*H,v[2]]);let G=1,ee=1,te=c.worldSize;if(A){if(c.projection.name==="mercator"){let ye=0;c.elevation&&(ye=c.elevation.getAtPointOrZero(new At(O.x/te,O.y/te),0));let ze=Li([],[O.x,O.y,ye,1],c.projMatrix)[3]/c.cameraToCenterDistance;G=ze,ee=ze*nt(c.center.lat,M)}else if(c.projection.name==="globe"){let ye=bH(d,c),ze=[0,0,0,1];Li(ze,ze,$([],c.projMatrix,ye));let Ve=ze[3]/c.cameraToCenterDistance,qe=Py(M),Ye=c.projection.pixelsPerMeter(h.lat,te)*nt(h.lat,M),it=c.projection.pixelsPerMeter(c.center.lat,te)*nt(c.center.lat,M);G=Ve/En(Ye,bt(c.center.lat),qe),ee=Ve*N/Ye,G*=it,ee*=it}}else G=H;Q(d,d,[G,G,ee]);let ie=[...d],he=s.orientation,me=[];if(Qee(me,[he[0]+m[0],he[1]+m[1],he[2]+m[2]],y),$(d,ie,me),w&&c.elevation){let ye=0,ze=[];if(T&&c.elevation){ye=(function(qe,Ye,it,Ut,pt){let Gt=Ye.elevation;if(!Gt)return 0;let ti=Rn.projectAabbCorners(it,Ut),$t=ke(1,pt.lat)*Ye.worldSize,Yt=(function(mi,ln){let Bn=[0,0,1],wi=[{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 Ji of wi){let Dn=mi[Ji.corners[0]],Kn=mi[Ji.corners[1]],_o=mi[Ji.corners[2]],io=[Kn[0]-Dn[0],Kn[1]-Dn[1],ln*(Kn[2]-Dn[2])],$i=Wi(io,io,[_o[0]-Dn[0],_o[1]-Dn[1],ln*(_o[2]-Dn[2])]);vn($i,$i),Ji.dotProductWithUp=Gn($i,Bn)}return wi.sort((Ji,Dn)=>Ji.dotProductWithUp-Dn.dotProductWithUp),wi[0].corners})(ti,$t),si=ti[Yt[0]],Nt=ti[Yt[1]],Jt=ti[Yt[2]],It=ti[Yt[3]],xt=Gt.getAtPointOrZero(new At(si[0]/Ye.worldSize,si[1]/Ye.worldSize),0),li=Gt.getAtPointOrZero(new At(Nt[0]/Ye.worldSize,Nt[1]/Ye.worldSize),0),ni=Gt.getAtPointOrZero(new At(Jt[0]/Ye.worldSize,Jt[1]/Ye.worldSize),0),dn=Gt.getAtPointOrZero(new At(It[0]/Ye.worldSize,It[1]/Ye.worldSize),0),Fi=(xt+dn)/2,Zi=(li+ni)/2;return Fi>Zi?li=s.gl.NEAREST_MIPMAP_NEAREST}),d.uploaded=!0,d.image=null)}function lSe(d,s,c){d.indexBuffer=s.createIndexBuffer(d.indexArray,!1,!0),d.vertexBuffer=s.createVertexBuffer(d.vertexArray,tSe.members,!1,!0),d.normalArray&&(d.normalBuffer=s.createVertexBuffer(d.normalArray,rSe.members,!1,!0)),d.texcoordArray&&(d.texcoordBuffer=s.createVertexBuffer(d.texcoordArray,oSe.members,!1,!0)),d.colorArray&&(d.colorBuffer=s.createVertexBuffer(d.colorArray,(d.colorArray.bytesPerElement===12?iSe:nSe).members,!1,!0)),d.featureArray&&(d.pbrBuffer=s.createVertexBuffer(d.featureArray,aSe.members,!0)),d.segments=Ds.simpleSegment(0,0,d.vertexArray.length,d.indexArray.length);let h=d.material;h.pbrMetallicRoughness.baseColorTexture&&d2(h.pbrMetallicRoughness.baseColorTexture,s),h.pbrMetallicRoughness.metallicRoughnessTexture&&d2(h.pbrMetallicRoughness.metallicRoughnessTexture,s),h.normalTexture&&d2(h.normalTexture,s),h.occlusionTexture&&d2(h.occlusionTexture,s,c),h.emissionTexture&&d2(h.emissionTexture,s)}function xH(d,s,c){if(d.meshes)for(let h of d.meshes)lSe(h,s,c);if(d.children)for(let h of d.children)xH(h,s,c)}function UF(d){if(d.meshes)for(let s of d.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(d.children)for(let s of d.children)UF(s)}function CH(d){if(d.meshes)for(let c of d.meshes)c.vertexBuffer&&(c.vertexBuffer.destroy(),c.indexBuffer.destroy(),c.normalBuffer&&c.normalBuffer.destroy(),c.texcoordBuffer&&c.texcoordBuffer.destroy(),c.colorBuffer&&c.colorBuffer.destroy(),c.pbrBuffer&&c.pbrBuffer.destroy(),c.segments.destroy(),c.material&&((s=c.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(d.children)for(let c of d.children)CH(c)}function Dx(d,s){let c=d.json.bufferViews[s.bufferView],h=NF[s.componentType];return new h(d.buffers[c.buffer],(s.byteOffset||0)+(c.byteOffset||0),s.count*(c.byteStride&&c.byteStride!==l2[s.type]*h.BYTES_PER_ELEMENT?c.byteStride/h.BYTES_PER_ELEMENT:l2[s.type]))}function wH(d,s,c,h){let m=NF[s.componentType],y=(function(M){switch(M){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:return 1}})(m),v=d.json.bufferViews[s.bufferView],w=v.byteStride?v.byteStride/m.BYTES_PER_ELEMENT:l2[s.type],T=c.float32,A=T.length/c.capacity;for(let M=0,O=0;M0){for(let te=0;te0){y.texcoordArray=new ky;let N=s.json.accessors[m.TEXCOORD_0];y.texcoordArray.resize(N.count);let H=Dx(s,N);wH(s,N,y.texcoordArray,H)}if(m._FEATURE_ID_RGBA4444!==void 0){let N=s.json.accessors[m._FEATURE_ID_RGBA4444];s.json.extensionsUsed&&s.json.extensionsUsed.includes("EXT_meshopt_compression")&&(y.featureData=Dx(s,N))}m._FEATURE_RGBA4444!==void 0&&(y.featureData=new Uint32Array(Dx(s,s.json.accessors[m._FEATURE_RGBA4444]).buffer));let O=d.material;return y.material=(function(N,H){let{emissiveFactor:G=[0,0,0],alphaMode:ee="OPAQUE",alphaCutoff:te=.5,normalTexture:ie,occlusionTexture:he,emissiveTexture:me,doubleSided:ye}=N,{baseColorFactor:ze=[1,1,1,1],metallicFactor:Ve=1,roughnessFactor:qe=1,baseColorTexture:Ye,metallicRoughnessTexture:it}=N.pbrMetallicRoughness||{},Ut=he?H[he.index]:void 0;if(he&&he.extensions&&he.extensions.KHR_texture_transform&&Ut){let pt=he.extensions.KHR_texture_transform;Ut.offsetScale=[pt.offset[0],pt.offset[1],pt.scale[0],pt.scale[1]]}return{pbrMetallicRoughness:{baseColorFactor:new Cr(...ze),metallicFactor:Ve,roughnessFactor:qe,baseColorTexture:Ye?H[Ye.index]:void 0,metallicRoughnessTexture:it?H[it.index]:void 0},doubleSided:ye,emissiveFactor:new Cr(...G),alphaMode:ee,alphaCutoff:te,normalTexture:ie?H[ie.index]:void 0,occlusionTexture:Ut,emissionTexture:me?H[me.index]:void 0,defined:N.defined===void 0}})(O!==void 0?s.json.materials[O]:{defined:!1},c),y}function ete(d,s,c){let{matrix:h,rotation:m,translation:y,scale:v,mesh:w,extras:T,children:A}=d,M={};if(M.matrix=h||(function(O,N,H,G){var ee=N[0],te=N[1],ie=N[2],he=N[3],me=ee+ee,ye=te+te,ze=ie+ie,Ve=ee*me,qe=ee*ye,Ye=ee*ze,it=te*ye,Ut=te*ze,pt=ie*ze,Gt=he*me,ti=he*ye,$t=he*ze,Yt=G[0],si=G[1],Nt=G[2];return O[0]=(1-(it+pt))*Yt,O[1]=(qe+$t)*Yt,O[2]=(Ye-ti)*Yt,O[3]=0,O[4]=(qe-$t)*si,O[5]=(1-(Ve+pt))*si,O[6]=(Ut+Gt)*si,O[7]=0,O[8]=(Ye+ti)*Nt,O[9]=(Ut-Gt)*Nt,O[10]=(1-(Ve+it))*Nt,O[11]=0,O[12]=H[0],O[13]=H[1],O[14]=H[2],O[15]=1,O})([],m||[0,0,0,1],y||[0,0,0],v||[1,1,1]),w!==void 0){M.meshes=c[w];let O=M.anchor=[0,0];for(let N of M.meshes){let{min:H,max:G}=N.aabb;O[0]+=H[0]+G[0],O[1]+=H[1]+G[1]}O[0]=Math.floor(O[0]/M.meshes.length/2),O[1]=Math.floor(O[1]/M.meshes.length/2)}if(T&&(T.id&&(M.id=T.id),T.lights&&(M.lights=(function(O){if(!O.length)return[];let N=(function(ie){let he=atob(ie),me=new Uint8Array(he.length);for(let ye=0;ye1&&h[h.length-1].equals(h[0])&&h.pop();let m=0;for(let v=0;v0&&h.reverse();let y=mS(h.flatMap(v=>[v.x,v.y]),[]);return y.length===0?null:{vertices:h,indices:y}}function pSe(d,s){let c=[],h=[],m=0,y=[];for(let v of d){m=c.length;let w=v.vertexArray.float32,T=v.indexArray.uint16;for(let A=0;A0&&([h[v+1],h[v+2]]=[h[v+2],h[v+1]])}return{vertices:c,indices:h}}function tte(d){let s=(function(T,A){let M=[],O=WebGL2RenderingContext;if(T.json.textures)for(let N of T.json.textures){let H={magFilter:O.LINEAR,minFilter:O.NEAREST,wrapS:O.REPEAT,wrapT:O.REPEAT};N.sampler!==void 0&&Object.assign(H,T.json.samplers[N.sampler]),M.push({image:A[N.source],sampler:H,uploaded:!1})}return M})(d,d.images),c=(function(T,A){let M=[];for(let O of T.json.meshes){let N=[];for(let H of O.primitives)N.push(cSe(H,T,A));M.push(N)}return M})(d,s),{scenes:h,scene:m,nodes:y}=d.json,v=h?h[m||0].nodes:[...y.keys()],w=[];for(let T of v)w.push(ete(y[T],d,c));return(function(T,A,M){let O={},N=new Set;for(let H=0;H0){let H=Array.from(N.values()).sort((G,ee)=>G-ee);for(let G=H.length-1;G>=0;G--)T.splice(H[G],1)}})(w,v,d.json.nodes),w}function hSe(d){d.heightmap=new Float32Array(4096),d.heightmap.fill(-1);let s=d.vertexArray.float32,c=d.aabb.min[0]-1,h=d.aabb.min[1]-1,m=Ax/(d.aabb.max[0]-c+2),y=Ax/(d.aabb.max[1]-h+2);for(let v=0;vd.heightmap[A*Ax+T]&&(d.heightmap[A*Ax+T]=w)}}function ite(d,s,c,h,m){c.reserve(c.length+4*d.length),h.reserve(h.length+10*d.length),m.reserve(m.length+10*d.length);let y=h.length;for(let v of d){let w=Math.min(10,Math.max(4,1.3*v.height))*s,T=[-v.normal[1],v.normal[0],0],A=Math.min(.29,.1*v.width/v.depth),M=v.width-2*v.depth*s*(A+.01),O=St([],v.pos,T,M/2),N=St([],v.pos,T,-M/2),H=[O[0],O[1],O[2]+v.height],G=[N[0],N[1],N[2]+v.height],ee=St([],v.normal,T,A);_t(ee,ee,w);let te=St([],v.normal,T,-A);_t(te,te,w),ki(ee,O,ee),ki(te,N,te),O[2]+=.1,N[2]+=.1,h.emplaceBack(ee[0],ee[1],ee[2]),h.emplaceBack(te[0],te[1],te[2]),h.emplaceBack(O[0],O[1],O[2]),h.emplaceBack(N[0],N[1],N[2]),h.emplaceBack(H[0],H[1],H[2]),h.emplaceBack(G[0],G[1],G[2]),h.emplaceBack(O[0],O[1],O[2]),h.emplaceBack(N[0],N[1],N[2]),h.emplaceBack(ee[0],ee[1],ee[2]),h.emplaceBack(te[0],te[1],te[2]);let ie=M/w/2;m.emplaceBack(-ie-A,-1,ie,.8),m.emplaceBack(ie+A,-1,ie,.8),m.emplaceBack(-ie,0,ie,1.3),m.emplaceBack(ie,0,ie,1.3),m.emplaceBack(ie+A,-.8,ie,.7),m.emplaceBack(ie+A,-.8,ie,.7),m.emplaceBack(0,0,ie,1.3),m.emplaceBack(0,0,ie,1.3),m.emplaceBack(ie+A,-1.2,ie,.8),m.emplaceBack(ie+A,-1.2,ie,.8),c.emplaceBack(6+y,4+y,8+y),c.emplaceBack(7+y,9+y,5+y),c.emplaceBack(0+y,1+y,2+y),c.emplaceBack(1+y,3+y,2+y),y+=10}}function mSe(d,s){let c={};c.indexArray=new Za,c.vertexArray=new pd,c.colorArray=new kp,ite(d,s,c.indexArray,c.vertexArray,c.colorArray);let h={defined:!0};h.emissiveFactor=Cr.black;let m={};return m.baseColorFactor=Cr.white,h.pbrMetallicRoughness=m,c.material=h,c.aabb=new Rn([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),c}let nte=Po([{name:"a_pos_3f",components:3,type:"Float32"}]),fSe=Po([{name:"a_normal_3",components:3,type:"Int16"}]),gSe=Po([{name:"a_centroid_3",components:3,type:"Int16"}]),ote=Po([{name:"a_part_color_emissive",components:2,type:"Uint16"}]),_Se=Po([{name:"a_faux_facade_color_emissive",components:2,type:"Uint16"}]),ySe=Po([{name:"a_faux_facade_data",components:4,type:"Uint16"}]),vSe=Po([{name:"a_faux_facade_vertical_range",components:2,type:"Uint16"}]),bSe=Po([{name:"a_bloom_attenuation",components:4,type:"Float32"}]),rte=ei.types,SH=32767;function xSe(d,s){let c=fi+s;for(let h of d)for(let m of h)if(m.x<-s||m.x>c||m.y<-s||m.y>c)return!1;return!0}class ste{constructor(){this.layoutVertexArray=new pd,this.layoutAttenuationArray=new kp,this.layoutColorArray=new Ba,this.indexArray=new Za,this.indexArrayForConflation=new Za,this.segmentsBucket=new Ds}}class IH{constructor(){this.layoutVertexArray=new pd,this.layoutNormalArray=new I_,this.layoutCentroidArray=new I_,this.layoutColorArray=new Ba,this.layoutFacadePaintArray=null,this.layoutFacadeDataArray=null,this.layoutFacadeVerticalRangeArray=null,this.layoutAOArray=[],this.indexArray=new Za,this.indexArrayForConflation=new Za,this.segmentsBucket=new Ds,this.entranceBloom=new ste}}class ate{constructor(s){this.colorBufferUploaded=!1,this.maxHeight=0,this.replacementUpdateTime=0,this.activeReplacements=[],this.footprints=[],this.featuresOnBorder=[],this.buildingFeatures=[],this.buildingWithoutFacade=new IH,this.buildingWithFacade=new IH,this.indexArrayForConflationUploaded=!1,this.footprintLookup={},this.zoom=s.zoom,this.canonical=s.canonical,this.layers=s.layers,this.layerIds=this.layers.map(c=>c.fqid),this.index=s.index,this.hasPattern=!1,this.worldview=s.worldview,this.lut=s.lut,this.buildingWithFacade.layoutFacadePaintArray=new Ba,this.buildingWithFacade.layoutFacadeDataArray=new Ey,this.buildingWithFacade.layoutFacadeVerticalRangeArray=new Ba,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut}),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.projection=s.projection,this.groundEffect=new cH(s)}updateFootprints(s,c){for(let h of this.footprints)c.push({footprint:h,id:s})}prepare(){return(function(){if(FF!=null||zee!=null)return null;if(vS!=null)return vS;let s=fetch(_c.BUILDING_GEN_URL);return vS=(function(c){let h,m,y,v;function w(){h=new Uint8Array(v.buffer),m=new Int32Array(v.buffer),y=new Float32Array(v.buffer)}function T(){throw new Error("Unexpected BuildingGen error.")}let A=()=>{},M={a:{a:T,f:function(O){let N=h.length,H=Math.max(O>>>0,Math.ceil(1.2*N)),G=Math.ceil((H-N)/65536);try{return v.grow(G),w(),!0}catch{return!1}},g:T,b:A,c:A,d:A,e:A}};return(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(c,M):c.then(O=>O.arrayBuffer()).then(O=>WebAssembly.instantiate(O,M))).then(O=>{let N=O.instance.exports;return(0,N.g)(),v=N.f,w(),new Kwe({setStyle:N.h,setAOOptions:N.i,setMetricOptions:N.j,setStructuralOptions:N.k,setFacadeOptions:N.l,setFauxFacadeOptions:N.m,setFacadeClassifierOptions:N.n,addFeature:N.o,addFacade:N.p,generateMesh:N.q,getLastError:N.r,getOuterRingLength:N.s,getMeshCount:N.t,getPositionsPtr:N.u,getPositionsLength:N.v,getNormalsPtr:N.w,getNormalsLength:N.x,getColorsPtr:N.y,getColorsLength:N.z,getAOPtr:N.A,getAOLength:N.B,getUVPtr:N.C,getUVLength:N.D,getFauxFacadePtr:N.E,getFauxFacadeLength:N.F,getIndicesPtr:N.G,getIndicesLength:N.H,getBuildingPart:N.I,getRingCount:N.J,getRingPtr:N.K,getRingLength:N.L,free:N.M,malloc:N.N,heapU8:h,heap32:m,heapF32:y})})})(s).then(c=>(vS=null,FF=c,FF)).catch(c=>{Ro("Could not load building-gen"),vS=null,zee=c}),vS})()}populate(s,c,h,m){let y=Zwe();if(!y)return;let v=ft(h);this.tileToMeter=v,this.brightness=c.brightness,y.setStyle({convertToMeters:!1,entranceColorRgb:[1,1,1],facadeGlazingColorRgb:[.5607843137254902,.6745098039215687,.7215686274509804],normalScale:[1,-1,v],ridgeHeight:3,roofColorRgb:[.886274516,.784313738,.713725507],tileToMeters:v,tileZoom:16,wallColorRgb:[.988235294,.933333337,.811764717]}),y.setAOOptions(!1,.3),y.setMetricOptions(!1,16),y.setStructuralOptions(!0),y.setFacadeClassifierOptions(3);let w=new Map;for(let{feature:T}of s){if(rte[T.type]!=="LineString")continue;let A=this.layers[0]._featureFilter.needGeometry,M=ri(T,A);if(!this.layers[0]._featureFilter.filter(new es(this.zoom),M,h))continue;let O=A?M.geometry:Ai(T,h,m),N=[];for(let te of O)for(let ie of te)N.push({x:ie.x,y:ie.y});let H={coordinates:N,crossPerc:T.properties.cross_perc,distanceToRoad:T.properties.distance_to_road,entrances:T.properties.entrances,sourceId:0},G=T.properties.source_id,ee=w.get(G);ee||(ee=[],w.set(G,ee)),ee.push(H)}this.maxHeight=0;for(let{feature:T,index:A}of s){if(rte[T.type]==="LineString")continue;let M=this.layers[0]._featureFilter.needGeometry,O=ri(T,M);if(!this.layers[0]._featureFilter.filter(new es(this.zoom),O,h))continue;let N=M?O.geometry:Ai(T,h,m),H=JD(N,500);if(!xSe(N,163))continue;let G=this.layers[0],ee=G.layout.get("building-base").evaluate(T,{},h),te=G.layout.get("building-height").evaluate(T,{},h),ie=G.layout.get("building-roof-shape").evaluate(T,{},h),he=G.paint.get("building-ambient-occlusion-intensity"),me=G.paint.get("building-ambient-occlusion-ground-radius")/this.tileToMeter;if(ie==="flat")continue;let ye=G.layout.get("building-facade").evaluate(T,{},h);y.setFacadeOptions(4,!0),y.setFauxFacadeOptions(ye,!1,1);let ze=T.properties.source_id,Ve;Ve=w.has(ze)?w.get(ze):[];let qe=0,Ye=0,it=0,Ut=0,pt=0,Gt=0;if(ye){let $i=Math.round(G.layout.get("building-facade-floors").evaluate(T,{},h));if(ee===0){$i=Math.max(1,$i-(Ve.length>0?1:0));let zo=4;if(te>100){let we=[10,13,15];zo=we[T.id?T.id%we.length:0],y.setFacadeOptions(zo,!0)}pt=1.6803*zo/v}else pt=ee/v;Gt=te/v,pt=Math.min(pt,Gt),it=G.layout.get("building-facade-unit-width").evaluate(T,{},h)/v,Ut=(Gt-pt)/$i,y.setFauxFacadeOptions(!0,!0,it);let Xn=G.layout.get("building-facade-window").evaluate(T,{},h);qe=Xn[0],Ye=Xn[1]}let ti=[],$t=new ai(1/0,1/0),Yt=new ai(-1/0,-1/0),si=new ai(0,0),Nt=0;for(let $i of H)if($i.length>0){let Xn=[];for(let zo of $i){let we=[];for(let Ie=zo.length-1;Ie>=0;Ie--){let wt=zo[Ie];we.push({x:wt.x,y:wt.y}),$t.x=Math.min($t.x,wt.x),$t.y=Math.min($t.y,wt.y),Yt.x=Math.max(Yt.x,wt.x),Yt.y=Math.max(Yt.y,wt.y),si.x+=wt.x,si.y+=wt.y,Nt++}Xn.push(we)}ti.push({id:T.id?T.id:0,height:te,minHeight:ee,sourceId:0,roofType:ie,coordinates:Xn})}si.x/=Nt||1,si.y/=Nt||1;let Jt=y.generateMesh(ti,Ve);if(typeof Jt=="string"){Ro(`Unable to generate building ${T.id}: ${Jt}`);continue}if(Jt.meshes.length===0||Jt.modifiedPolygonRings.length===0)continue;let It=0;for(let $i of Jt.meshes)It+=$i.positions.length/3;let xt=ye?this.buildingWithFacade:this.buildingWithoutFacade,li=xt.segmentsBucket.prepareSegment(It,xt.layoutVertexArray,xt.indexArray),ni=[],dn=null,Fi=0,Zi=-1,mi=xt.indexArray.length,ln=0;for(let $i of Jt.meshes){let Xn=xt.layoutVertexArray.length;if($i.buildingPart==="entrance"){let Vt=new Array;for(let gn=0;gn<$i.indices.length;gn+=12){let yo=$i.positions[gn+0],vo=$i.positions[gn+1],ho=$i.positions[gn+3],Tr=$i.positions[gn+4],xs=$i.positions[gn+2],uo=$i.positions[gn+8]-xs,ts=1,Or=ho-yo,nr=Tr-vo,ss=Math.hypot(Or,nr);Vt.push({pos:[yo+.5*Or,vo+.5*nr,xs],normal:[nr/ss,-Or/ss,0],width:ss,height:uo,depth:ts,points:[yo,vo,ho,Tr]})}let Ci=xt.entranceBloom.segmentsBucket.prepareSegment(10*Vt.length,xt.entranceBloom.layoutVertexArray,xt.entranceBloom.indexArray),bi=xt.entranceBloom.layoutVertexArray.length;Fi=xt.entranceBloom.indexArray.length,ite(Vt,.5/this.tileToMeter,xt.entranceBloom.indexArray,xt.entranceBloom.layoutVertexArray,xt.entranceBloom.layoutAttenuationArray);let ji=xt.entranceBloom.layoutVertexArray.length-bi;Zi=xt.entranceBloom.indexArray.length-Fi;for(let gn=0;gnfi||$t.y<0||Yt.y>fi)&&this.featuresOnBorder.push({featureId:T.id,footprintIndex:this.footprints.length});{let $i=mS(wi,null,2),Xn=new AF(Ji,$i,8,256),zo=T.id;T.properties&&T.properties.hasOwnProperty("building_id")&&(zo=T.properties.building_id),this.footprints.push({vertices:Ji,indices:$i,grid:Xn,min:Dn,max:Kn,buildingId:zo,hiddenFlags:0,indicesOffset:mi,indicesLength:Bn,bloomIndicesOffset:Fi,bloomIndicesLength:Zi,groundEffectVertexOffset:_o,groundEffectVertexLength:io,hasFauxFacade:ye,segment:li,height:ln})}this.programConfigurations.populatePaintArrays(xt.layoutVertexArray.length,T,A,{},c.availableImages,h,c.brightness),this.groundEffect.addPaintPropertiesData(T,A,{},c.availableImages,h,c.brightness)}this.groundEffect.prepareBorderSegments(),this.evaluate(this.layers[0],{})}update(s,c,h,m,y,v,w){this.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w),this.groundEffect.update(s,c,y,h,m,v,w),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 c=h=>{h.layoutVertexBuffer=s.createVertexBuffer(h.layoutVertexArray,nte.members),h.layoutNormalBuffer=s.createVertexBuffer(h.layoutNormalArray,fSe.members),h.layoutCentroidBuffer=s.createVertexBuffer(h.layoutCentroidArray,gSe.members),h.layoutFacadeDataArray&&h.layoutFacadeDataArray.length&&(h.layoutFacadeDataBuffer=s.createVertexBuffer(h.layoutFacadeDataArray,ySe.members)),h.layoutFacadeVerticalRangeArray&&h.layoutFacadeVerticalRangeArray.length&&(h.layoutFacadeVerticalRangeBuffer=s.createVertexBuffer(h.layoutFacadeVerticalRangeArray,vSe.members)),h.entranceBloom.layoutVertexArray.length&&(h.entranceBloom.layoutVertexBuffer=s.createVertexBuffer(h.entranceBloom.layoutVertexArray,nte.members),h.entranceBloom.layoutAttenuationBuffer=s.createVertexBuffer(h.entranceBloom.layoutAttenuationArray,bSe.members)),this.uploadUpdatedColorBuffer(s),this.uploadUpdatedIndexBuffer(s)};this.uploaded||(c(this.buildingWithoutFacade),c(this.buildingWithFacade),this.groundEffect.upload(s)),this.groundEffect.uploadPaintProperties(s),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){let s=c=>{c.layoutVertexBuffer&&(c.layoutVertexBuffer.destroy(),c.layoutNormalBuffer.destroy(),c.layoutColorBuffer.destroy(),c.segmentsBucket.destroy(),c.indexBuffer&&c.indexBuffer.destroy(),c.entranceBloom.layoutVertexBuffer&&(c.entranceBloom.layoutVertexBuffer.destroy(),c.entranceBloom.layoutColorBuffer.destroy(),c.entranceBloom.layoutAttenuationBuffer.destroy(),c.entranceBloom.indexBuffer.destroy(),c.entranceBloom.segmentsBucket.destroy()))};s(this.buildingWithoutFacade),s(this.buildingWithFacade),this.groundEffect.destroy(),this.programConfigurations.destroy()}updateFootprintHiddenFlags(s,c,h=!0){let m=!1,y=h?c:0,v=0|(h?-1:~c);this.groundEffect.hiddenByLandmarkVertexArray.length===0&&this.groundEffect.hiddenByLandmarkVertexArray.resize(this.groundEffect.vertexArray.length);for(let w of s){let T=this.footprints[w],A=T.hiddenFlags&v|y;T.hiddenFlags!==A&&(T.hiddenFlags=A,m=!0,this.groundEffect.updateHiddenByLandmarkRange(T.groundEffectVertexOffset,T.groundEffectVertexLength,T.hiddenFlags!==0))}return m&&(this.indexArrayForConflationUploaded=!1),m}uploadUpdatedIndexBuffer(s){if(this.groundEffect.uploadHiddenByLandmark(s),this.indexArrayForConflationUploaded)return;let c=m=>{m.indexArray.length!==0&&(m.indexArrayForConflation.resize(m.indexArray.length),m.indexArrayForConflation.uint16.set(m.indexArray.uint16),m.entranceBloom.indexArrayForConflation.resize(m.entranceBloom.indexArray.length),m.entranceBloom.indexArrayForConflation.uint16.set(m.entranceBloom.indexArray.uint16))};c(this.buildingWithoutFacade),c(this.buildingWithFacade);for(let m of this.footprints){let y=m.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade,v=m.indicesOffset+m.indicesLength;if(m.hiddenFlags!==0){for(let T=m.indicesOffset;T{m.indexArray.length!==0&&(m.indexBuffer?m.indexBuffer.updateData(m.indexArrayForConflation):m.indexBuffer=s.createIndexBuffer(m.indexArrayForConflation,!0),m.entranceBloom.indexBuffer?m.entranceBloom.indexBuffer.updateData(m.entranceBloom.indexArrayForConflation):m.entranceBloom.indexBuffer=s.createIndexBuffer(m.entranceBloom.indexArrayForConflation,!0))};h(this.buildingWithoutFacade),h(this.buildingWithFacade),this.indexArrayForConflationUploaded=!0}uploadUpdatedColorBuffer(s){let c=h=>{h.layoutColorBuffer?h.layoutColorBuffer.updateData(h.layoutColorArray):h.layoutColorBuffer=s.createVertexBuffer(h.layoutColorArray,ote.members,!0),h.layoutFacadePaintArray&&(h.layoutFacadePaintBuffer?h.layoutFacadePaintBuffer.updateData(h.layoutFacadePaintArray):h.layoutFacadePaintBuffer=s.createVertexBuffer(h.layoutFacadePaintArray,_Se.members,!0)),h.entranceBloom.layoutColorBuffer?h.entranceBloom.layoutColorBuffer.updateData(h.entranceBloom.layoutColorArray):h.entranceBloom.layoutColorBuffer=s.createVertexBuffer(h.entranceBloom.layoutColorArray,ote.members,!0)};c(this.buildingWithoutFacade),c(this.buildingWithFacade),this.colorBufferUploaded=!0}evaluate(s,c){let h=s.paint.get("building-ambient-occlusion-intensity");for(let m of this.buildingFeatures){let y=c[m.feature.id],v=m.feature;v.properties["building-part"]="roof";let w=s.paint.get("building-color").evaluate(v,y,this.canonical).toPremultipliedRenderColor(this.lut),T=s.paint.get("building-emissive-strength").evaluate(v,y,this.canonical);v.properties["building-part"]="wall";let A=s.paint.get("building-color").evaluate(v,y,this.canonical).toPremultipliedRenderColor(this.lut),M=s.paint.get("building-emissive-strength").evaluate(v,y,this.canonical);v.properties["building-part"]="window";let O=s.paint.get("building-color").evaluate(v,y,this.canonical).toPremultipliedRenderColor(this.lut),N=s.paint.get("building-emissive-strength").evaluate(v,y,this.canonical);v.properties["building-part"]="door";let H=s.paint.get("building-color").evaluate(v,y,this.canonical).toPremultipliedRenderColor(this.lut),G=s.paint.get("building-emissive-strength").evaluate(v,y,this.canonical),ee=m.hasFauxFacade?this.buildingWithFacade:this.buildingWithoutFacade;for(let ie of m.parts){let he,me=w;ie.part==="roof"?(me=w,he=T):ie.part==="wall"?(me=A,he=M):ie.part==="facade_glazing"?(me=O,he=N):ie.part==="entrance"&&(me=H,he=G),he=Ue(he,0,1);for(let ye=0;yev.max.x||T.max.xv.max.y||T.max.yw.max.x||w.min.x>s||c>w.max.y||w.min.y>c||w.height<=h||sH(v,w)&&(h=w.height,this.footprintLookup[y]=w,m=w.hiddenFlags!==0);if(h!==Number.NEGATIVE_INFINITY)return{height:h,hidden:m};this.footprintLookup[y]=void 0}}function CSe(d,s,c,h,m,y){let v=Math.pow(2,h.z-m.z);for(let w=0;w1&&(T=s[++w]);let M=Math.abs(A-T.left),O=Math.abs(A-T.right),N=Math.min(M,O),H,G=y/h*(m+1);if(T.isDash){let ee=m-Math.abs(G);H=Math.sqrt(N*N+ee*ee)}else H=m-Math.sqrt(N*N+G*G);this.image.data[v+A]=Math.max(0,Math.min(255,H+128))}}}addRegularDash(s,c){for(let T=s.length-1;T>=0;--T){let A=s[T],M=s[T+1];A.zeroLength?s.splice(T,1):M&&M.isDash===A.isDash&&(M.left=A.left,s.splice(T,1))}let h=s[0],m=s[s.length-1];h.isDash===m.isDash&&(h.left=m.left-this.width,m.right=h.right+this.width);let y=this.width*this.nextRow,v=0,w=s[v];for(let T=0;T1&&(w=s[++v]);let A=Math.abs(T-w.left),M=Math.abs(T-w.right),O=Math.min(A,M);this.image.data[y+T]=Math.max(0,Math.min(255,(w.isDash?O:-O)+c+128))}}addDash(s,c){let h=this.getKey(s,c);if(this.positions[h])return this.positions[h];let m=c==="round",y=m?7:0,v=2*y+1;if(this.nextRow+v>this.height)return Ro("LineAtlas out of space"),null;s.length===0&&s.push(1);let w=0;for(let M=0;Mc.fqid),this.index=s.index,this.projection=s.projection,this.hasPattern=!1,this.hasCrossSlope=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(c=>{this.gradients[c.id]={}}),this.layoutVertexArray=new iS,this.layoutVertexArray2=new pd,this.patternVertexArray=new pd,this.indexArray=new Za,this.programConfigurations=new Mp(s.layers,{zoom:s.zoom,lut:s.lut}),this.segments=new Ds,this.maxLineLength=0,this.zOffsetVertexArray=new pd,this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.tessellationStep=s.tessellationStep?s.tessellationStep:fi/64,this.worldview=s.worldview}updateFootprints(s,c){}populate(s,c,h,m){this.hasPattern=J8("line",this.layers,this.pixelRatio,c);let y=this.layers[0].layout.get("line-sort-key");this.tileToMeter=ft(h);let v=this.layers[0].layout.get("line-elevation-reference");if(v==="hd-road-markup")this.elevationType="road";else{let N=this.layers[0].layout.get("line-z-offset"),H=N.isConstant()&&!N.constantOr(0);this.elevationType=v!=="sea"&&v!=="ground"&&H?"none":"offset",this.elevationType==="offset"&&v==="none"&&Ro(`line-elevation-reference: ground is used for the layer ${this.layerIds[0]} because non-zero line-z-offset value was found.`)}let w=this.layers[0].layout.get("line-cross-slope");this.hasCrossSlope=this.elevationType==="offset"&&w!==void 0;let T=[];for(let{feature:N,id:H,index:G,sourceLayerIndex:ee}of s){let te=this.layers[0]._featureFilter.needGeometry,ie=ri(N,te);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),ie,h))continue;let he=y?y.evaluate(ie,{},h):void 0,me={id:H,properties:N.properties,type:N.type,sourceLayerIndex:ee,index:G,geometry:te?ie.geometry:Ai(N,h,m),patterns:{},sortKey:he};T.push(me)}y&&T.sort((N,H)=>N.sortKey-H.sortKey);let{lineAtlas:A,featureIndex:M}=c,O=this.addConstantDashes(A);for(let N of T){let{geometry:H,index:G,sourceLayerIndex:ee}=N;if(O&&this.addFeatureDashes(N,A),this.hasPattern){let te=eH("line",this.layers,N,this.zoom,this.pixelRatio,c);this.patternFeatures.push(te)}else this.addFeature(N,H,G,h,A.positions,c.availableImages,c.brightness,c.elevationFeatures);M.insert(s[G].feature,H,G,ee,this.index)}}addConstantDashes(s){let c=!1;for(let h of this.layers){let m=h.paint.get("line-dasharray").value,y=h.layout.get("line-cap").value;if(m.kind!=="constant"||y.kind!=="constant")c=!0;else{let v=y.value,w=m.value;if(!w)continue;s.addDash(w,v)}}return c}addFeatureDashes(s,c){let h=this.zoom;for(let m of this.layers){let y=m.paint.get("line-dasharray").value,v=m.layout.get("line-cap").value;if(y.kind==="constant"&&v.kind==="constant")continue;let w,T;if(y.kind==="constant"){if(w=y.value,!w)continue}else w=y.evaluate({zoom:h},s);T=v.kind==="constant"?v.value:v.evaluate({zoom:h},s),c.addDash(w,T),s.patterns[m.id]=[c.getKey(w,T)]}}update(s,c,h,m,y,v,w,T){this.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,T)}addFeatures(s,c,h,m,y,v){for(let w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,c,h,m,v)}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,ESe)),this.patternVertexArray.length!==0&&(this.patternVertexBuffer=s.createVertexBuffer(this.patternVertexArray,DSe)),!this.zOffsetVertexBuffer&&this.zOffsetVertexArray.length>0&&(this.zOffsetVertexBuffer=s.createVertexBuffer(this.zOffsetVertexArray,SSe.members,!0)),this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,ISe),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,c){let h,m;if(c&&c>0?(h=`mapbox_clip_start_${c}`,m=`mapbox_clip_end_${c}`):(h="mapbox_clip_start",m="mapbox_clip_end"),s.properties&&s.properties.hasOwnProperty(h)&&s.properties.hasOwnProperty(m))return{start:+s.properties[h],end:+s.properties[m]}}addFeature(s,c,h,m,y,v,w,T){let A=this.layers[0].layout,M=A.get("line-join").evaluate(s,{}),O=A.get("line-cap").evaluate(s,{}),N=A.get("line-miter-limit"),H=A.get("line-round-limit");this.lineClips=this.lineFeatureClips(s),this.lineFeature=s;let G=!(!s.properties||!s.properties.hasOwnProperty("mapbox_line_metrics"))&&s.properties.mapbox_line_metrics;this.zOffsetValue=A.get("line-z-offset").value;let ee=this.layers[0].paint.get("line-width").value;if(ee.kind!=="constant"&&ee.isLineProgressConstant===!1&&(this.variableWidthValue=ee),this.elevationType==="road"){let te=this.layoutVertexArray.length;if(!this.addElevatedRoadFeature(s,c,m,T,M,O,N,H)){let[ie,he]=this.clipRuntimeLinesToTile(c,1);for(let me=0;me0?ze.parentIndex:null)}this.fillNonElevatedRoadSegment(te)}}else for(let te=0;te0?te:null);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,h,y,v,m,w,void 0,this.worldview)}computeSegNextDir(s,c){return s.nextPoint.sub(c.at(-2)).unit()}computeSegPrevDir(s,c){return c[1].sub(s.prevPoint).unit()}clipLinesToTile(s,c){return OF(s,-c,-c,fi+c,fi+c)}clipRuntimeLinesToTile(s,c){let h=[];return[OF(s,-c,-c,fi+c,fi+c,h),h]}addElevatedRoadFeature(s,c,h,m,y,v,w,T){let A=[],M=ws.getElevationFeature(s,m);if(M){let O=this.clipLinesToTile(c,1),N=this.prepareElevatedLines(O,M,h);for(let H of N)A.push({geometry:H,elevation:M,elevationTileID:h,segment:{progress:{min:0,max:1},nextDir:void 0,prevDir:void 0}})}if(A.length===0)return!1;for(let O of A){let N=this.layoutVertexArray.length;this.addLine(O.geometry,s,h,y,v,w,T);let H=new fa(h,O.elevationTileID);if(O.elevation)for(let G=N;G>1,this.layoutVertexArray.int16[6*G+1]>>1),te=H.pointElevation(ee,O.elevation,.05);this.updateHeightRange(te),this.zOffsetVertexArray.emplaceBack(te,0,0)}else this.fillNonElevatedRoadSegment(N)}return!0}prepareElevatedLines(s,c,h){if(c.constantHeight!=null)return s;let m=[],y=1/ft(h);for(let v of s)$we(v,new Ir(c,y),0,m);return m}fillNonElevatedRoadSegment(s){for(let c=s;c0,N=T&&T.progress.max<1;if(this.lineClips){let it={min:this.lineClips.start,max:this.lineClips.end},Ut=1;if(T){let ti=this.lineClips.end-this.lineClips.start;it=(function($t,Yt,si){return{min:Yh($t.min,Yt,si),max:Yh($t.max,Yt,si)}})(T.progress,{min:0,max:1},it),ti>0&&(Ut=(it.max-it.min)/ti)}let pt=+c.properties.mapbox_clip_feature_len,Gt=+c.properties.mapbox_clip_seg_len;if(Number.isNaN(pt)||Number.isNaN(Gt)){for(let $t=0;$t=2&&s[G-1].equals(s[G-2]);)G--;let ee=0;for(;ee0,It=this.overscaling<=16?15*fi/(512*this.overscaling):0;if(Ut&&pt==="round"){if(Ytv&&(pt="bevel"),pt==="bevel"&&(Yt>2&&(pt="flipbevel"),Yt2*It){let ni=ie.sub(ie.sub(he)._mult(It/xt)._round());this.updateDistance(he,ni),this.addCurrentVertex(ni,ye,0,0,te,Ye),he=ni}this.updateDistance(he,ie),ti._mult(Yt),this.addCurrentVertex(ie,ti,0,0,te,Ye);let li=ie.dist(me);if(li>2*It){let ni=ie.add(me.sub(ie)._mult(It/li)._round());this.updateDistance(ie,ni),this.addCurrentVertex(ni,ze,0,0,te,Ye),ie=ni}}else ti._mult(Yt),this.addCurrentVertex(ie,ti,0,0,te,Ye);else if(pt==="flipbevel"){if(Yt>100)ti=ze.mult(-1);else{let xt=Yt*ye.add(ze).mag()/ye.sub(ze).mag();ti._perp()._mult(xt*(Jt?-1:1))}this.addCurrentVertex(ie,ti,0,0,te,Ye),this.addCurrentVertex(ie,ti.mult(-1),0,0,te,Ye)}else if(pt==="bevel"||pt==="fakeround"){Ye!=null&&he&&this.addCurrentVertex(ie,qe||ye,-1,-1,te,Ye);let xt=ie.dist(he)<=2*It&&pt!=="bevel",li=ti.mult(Jt?1:-1);li._mult(Yt);let ni=ze.mult(Jt?-1:1),dn=ye.mult(Jt?-1:1),Fi=this.evaluateLineProgressFeatures(this.distance);if(Ye==null&&(this.addHalfVertex(ie,li.x,li.y,!1,!Jt,0,te,Fi),xt||this.addHalfVertex(ie,li.x+2*dn.x,li.y+2*dn.y,!1,Jt,0,te,Fi)),pt==="fakeround"){let Zi=Math.round(180*si/Math.PI/20);this.addHalfVertex(ie,dn.x,dn.y,!1,Jt,0,te,Fi);for(let mi=0;mi1){this.lineSoFar=s.w;let ee=(c.x-s.x)/O,te=(c.y-s.y)/O,ie=(c.z-s.z)/O,he=(c.w-s.w)/O;for(let me=1;me=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,M),T.primitiveLength++),v?this.e2=M:this.e1=M,A!=null&&this.zOffsetVertexArray.emplaceBack(A.zOffset,A.variableWidth,A.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,c){this.prevDistance=this.distance,this.distance+=s.dist(c),this.updateScaledDistance()}}function EH(d,s,c){return d.xc||d.yc}let ute,pte;function hte(d,s,c){return s*(fi/(d.tileSize*Math.pow(2,c-d.tileID.overscaledZ)))}Ui(TH,"LineBucket",{omit:["layers","patternFeatures","currentVertex","currentVertexIsOutside"]});let mte=(d,s,c)=>(1-c)*d+c*s;function fte(d,s){return 1/hte(d,1,s.tileZoom)}function gte(d,s,c,h){return d.translatePosMatrix(h||s.tileID.projMatrix,s,c.paint.get("line-translate"),c.paint.get("line-translate-anchor"))}let _te=d=>{let s=[];yte(d)&&s.push("RENDER_LINE_DASH"),d.paint.get("line-gradient")&&s.push("RENDER_LINE_GRADIENT");let c=d.paint.get("line-trim-offset");c[0]===0&&c[1]===0||s.push("RENDER_LINE_TRIM_OFFSET"),d.paint.get("line-border-width").constantOr(1)!==0&&s.push("RENDER_LINE_BORDER");let h=d.layout.get("line-join").constantOr("miter")==="none",m=!!d.paint.get("line-pattern").constantOr(1);return h&&m&&s.push("LINE_JOIN_NONE"),s};function yte(d){let s=d.paint.get("line-dasharray").value;return s.kind!=="constant"||s.value}let AH,vte=()=>AH||(AH={layout:ute||(ute=new Bs({"line-cap":new Ti(ut.layout_line["line-cap"]),"line-join":new Ti(ut.layout_line["line-join"]),"line-miter-limit":new ci(ut.layout_line["line-miter-limit"]),"line-round-limit":new ci(ut.layout_line["line-round-limit"]),"line-sort-key":new Ti(ut.layout_line["line-sort-key"]),"line-z-offset":new Ti(ut.layout_line["line-z-offset"]),"line-elevation-reference":new ci(ut.layout_line["line-elevation-reference"]),"line-cross-slope":new ci(ut.layout_line["line-cross-slope"]),visibility:new ci(ut.layout_line.visibility),"line-width-unit":new ci(ut.layout_line["line-width-unit"])})),paint:pte||(pte=new Bs({"line-opacity":new Ti(ut.paint_line["line-opacity"]),"line-color":new Ti(ut.paint_line["line-color"]),"line-translate":new ci(ut.paint_line["line-translate"]),"line-translate-anchor":new ci(ut.paint_line["line-translate-anchor"]),"line-width":new Ti(ut.paint_line["line-width"]),"line-gap-width":new Ti(ut.paint_line["line-gap-width"]),"line-offset":new Ti(ut.paint_line["line-offset"]),"line-blur":new Ti(ut.paint_line["line-blur"]),"line-dasharray":new Ti(ut.paint_line["line-dasharray"]),"line-pattern":new Ti(ut.paint_line["line-pattern"]),"line-pattern-cross-fade":new ci(ut.paint_line["line-pattern-cross-fade"]),"line-gradient":new wy(ut.paint_line["line-gradient"]),"line-trim-offset":new ci(ut.paint_line["line-trim-offset"]),"line-trim-fade-range":new ci(ut.paint_line["line-trim-fade-range"]),"line-trim-color":new ci(ut.paint_line["line-trim-color"]),"line-emissive-strength":new ci(ut.paint_line["line-emissive-strength"]),"line-border-width":new Ti(ut.paint_line["line-border-width"]),"line-border-color":new Ti(ut.paint_line["line-border-color"]),"line-occlusion-opacity":new ci(ut.paint_line["line-occlusion-opacity"]),"line-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"line-gradient-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"line-trim-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"line-border-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"})}))},AH);class OSe extends Ti{possiblyEvaluate(s,c){return c=new es(Math.floor(c.zoom),{now:c.now,fadeDuration:c.fadeDuration,transition:c.transition,worldview:c.worldview}),super.possiblyEvaluate(s,c)}evaluate(s,c,h,m){return c=Object.assign({},c,{zoom:Math.floor(c.zoom)}),super.evaluate(s,c,h,m)}}let u2;function bte(d,s){return s>0?s+2*d:d}let PSe=Po([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),LSe=Po([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),FSe=Po([{name:"a_projected_pos",components:4,type:"Float32"}],4);Po([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let NSe=Po([{name:"a_auto_z_offset",components:1,type:"Float32"}],4),BSe=Po([{name:"a_x_axis",components:3,type:"Float32"},{name:"a_y_axis",components:3,type:"Float32"}]),zSe=Po([{name:"a_texb",components:2,type:"Uint16"}]),VSe=Po([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_elevation_from_sea",components:2,type:"Float32"}]),USe=Po([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"},{name:"a_auto_z_offset",components:1,type:"Float32"}]);Po([{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 xte=Po([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),HSe=Po([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Po([{name:"triangle",components:3,type:"Uint16"}]),Po([{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"}]),Po([{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"}]),Po([{type:"Float32",name:"offsetX"}]),Po([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var Dl=24;function jSe(d,s,c){return d.sections.forEach(h=>{h.text=(function(m,y,v){let w=y.layout.get("text-transform").evaluate(v,{});return w==="uppercase"?m=m.toLocaleUpperCase():w==="lowercase"&&(m=m.toLocaleLowerCase()),fh.applyArabicShaping&&(m=fh.applyArabicShaping(m)),m})(h.text,s,c)}),d}let p2={"!":"\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 GSe(d){return d==="\uFE36"||d==="\uFE48"||d==="\uFE38"||d==="\uFE44"||d==="\uFE42"||d==="\uFE3E"||d==="\uFE3C"||d==="\uFE3A"||d==="\uFE18"||d==="\uFE40"||d==="\uFE10"||d==="\uFE13"||d==="\uFE14"||d==="\uFF40"||d==="\uFFE3"||d==="\uFE11"||d==="\uFE12"}function $Se(d){return d==="\uFE35"||d==="\uFE47"||d==="\uFE37"||d==="\uFE43"||d==="\uFE41"||d==="\uFE3D"||d==="\uFE3B"||d==="\uFE39"||d==="\uFE17"||d==="\uFE3F"}let DH=4294967296,Cte=1/DH,wte=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),HF=class{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,s,c=this.length){for(;this.pos>3,y=this.pos;this.type=7&h,d(m,s,this),this.pos===y&&this.skip(h)}return s}readMessage(d,s){return this.readFields(d,s,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*DH;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*DH;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let s=this.buf,c,h;return h=s[this.pos++],c=127&h,h<128?c:(h=s[this.pos++],c|=(127&h)<<7,h<128?c:(h=s[this.pos++],c|=(127&h)<<14,h<128?c:(h=s[this.pos++],c|=(127&h)<<21,h<128?c:(h=s[this.pos],c|=(15&h)<<28,(function(m,y,v){let w=v.buf,T,A;if(A=w[v.pos++],T=(112&A)>>4,A<128||(A=w[v.pos++],T|=(127&A)<<3,A<128)||(A=w[v.pos++],T|=(127&A)<<10,A<128)||(A=w[v.pos++],T|=(127&A)<<17,A<128)||(A=w[v.pos++],T|=(127&A)<<24,A<128)||(A=w[v.pos++],T|=(1&A)<<31,A<128))return xS(m,T,y);throw new Error("Expected varint not more than 10 bytes")})(c,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,s=this.pos;return this.pos=d,d-s>=12&&wte?wte.decode(this.buf.subarray(s,d)):(function(c,h,m){let y="",v=h;for(;v239?4:w>223?3:w>191?2:1;if(v+N>m)break;N===1?w<128&&(O=w):N===2?(T=c[v+1],(192&T)==128&&(O=(31&w)<<6|63&T,O<=127&&(O=null))):N===3?(T=c[v+1],A=c[v+2],(192&T)==128&&(192&A)==128&&(O=(15&w)<<12|(63&T)<<6|63&A,(O<=2047||O>=55296&&O<=57343)&&(O=null))):N===4&&(T=c[v+1],A=c[v+2],M=c[v+3],(192&T)==128&&(192&A)==128&&(192&M)==128&&(O=(15&w)<<18|(63&T)<<12|(63&A)<<6|63&M,(O<=65535||O>=1114112)&&(O=null))),O===null?(O=65533,N=1):O>65535&&(O-=65536,y+=String.fromCharCode(O>>>10&1023|55296),O=56320|1023&O),y+=String.fromCharCode(O),v+=N}return y})(this.buf,s,d)}readBytes(){let d=this.readVarint()+this.pos,s=this.buf.subarray(this.pos,d);return this.pos=d,s}readPackedVarint(d=[],s){let c=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(d,s){this.writeVarint(d<<3|s)}realloc(d){let s=this.length||16;for(;s268435455||d<0?(function(s,c){let h,m;if(s>=0?(h=s%4294967296|0,m=s/4294967296|0):(h=~(-s%4294967296),m=~(-s/4294967296),4294967295^h?h=h+1|0:(h=0,m=m+1|0)),s>=18446744073709552e3||s<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");c.realloc(10),(function(y,v,w){w.buf[w.pos++]=127&y|128,y>>>=7,w.buf[w.pos++]=127&y|128,y>>>=7,w.buf[w.pos++]=127&y|128,y>>>=7,w.buf[w.pos++]=127&y|128,w.buf[w.pos]=127&(y>>>=7)})(h,0,c),(function(y,v){let w=(7&y)<<4;v.buf[v.pos++]|=w|((y>>>=3)?128:0),y&&(v.buf[v.pos++]=127&y|((y>>>=7)?128:0),y&&(v.buf[v.pos++]=127&y|((y>>>=7)?128:0),y&&(v.buf[v.pos++]=127&y|((y>>>=7)?128:0),y&&(v.buf[v.pos++]=127&y|((y>>>=7)?128:0),y&&(v.buf[v.pos++]=127&y)))))})(m,c)})(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let s=this.pos;this.pos=(function(h,m,y){for(let v,w,T=0;T55295&&v<57344){if(!w){v>56319||T+1===m.length?(h[y++]=239,h[y++]=191,h[y++]=189):w=v;continue}if(v<56320){h[y++]=239,h[y++]=191,h[y++]=189,w=v;continue}v=w-55296<<10|v-56320|65536,w=null}else w&&(h[y++]=239,h[y++]=191,h[y++]=189,w=null);v<128?h[y++]=v:(v<2048?h[y++]=v>>6|192:(v<65536?h[y++]=v>>12|224:(h[y++]=v>>18|240,h[y++]=v>>12&63|128),h[y++]=v>>6&63|128),h[y++]=63&v|128)}return y})(this.buf,d,this.pos);let c=this.pos-s;c>=128&&Ste(s,c,this),this.pos=s-1,this.writeVarint(c),this.pos+=c}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let s=d.length;this.writeVarint(s),this.realloc(s);for(let c=0;c=128&&Ste(c,h,this),this.pos=c-1,this.writeVarint(h),this.pos+=h}writeMessage(d,s,c){this.writeTag(d,2),this.writeRawMessage(s,c)}writePackedVarint(d,s){s.length&&this.writeMessage(d,qSe,s)}writePackedSVarint(d,s){s.length&&this.writeMessage(d,WSe,s)}writePackedBoolean(d,s){s.length&&this.writeMessage(d,YSe,s)}writePackedFloat(d,s){s.length&&this.writeMessage(d,KSe,s)}writePackedDouble(d,s){s.length&&this.writeMessage(d,ZSe,s)}writePackedFixed32(d,s){s.length&&this.writeMessage(d,QSe,s)}writePackedSFixed32(d,s){s.length&&this.writeMessage(d,XSe,s)}writePackedFixed64(d,s){s.length&&this.writeMessage(d,JSe,s)}writePackedSFixed64(d,s){s.length&&this.writeMessage(d,eIe,s)}writeBytesField(d,s){this.writeTag(d,2),this.writeBytes(s)}writeFixed32Field(d,s){this.writeTag(d,5),this.writeFixed32(s)}writeSFixed32Field(d,s){this.writeTag(d,5),this.writeSFixed32(s)}writeFixed64Field(d,s){this.writeTag(d,1),this.writeFixed64(s)}writeSFixed64Field(d,s){this.writeTag(d,1),this.writeSFixed64(s)}writeVarintField(d,s){this.writeTag(d,0),this.writeVarint(s)}writeSVarintField(d,s){this.writeTag(d,0),this.writeSVarint(s)}writeStringField(d,s){this.writeTag(d,2),this.writeString(s)}writeFloatField(d,s){this.writeTag(d,5),this.writeFloat(s)}writeDoubleField(d,s){this.writeTag(d,1),this.writeDouble(s)}writeBooleanField(d,s){this.writeVarintField(d,+s)}};function xS(d,s,c){return c?4294967296*s+(d>>>0):4294967296*(s>>>0)+(d>>>0)}function Ste(d,s,c){let h=s<=16383?1:s<=2097151?2:s<=268435455?3:Math.floor(Math.log(s)/(7*Math.LN2));c.realloc(h);for(let m=c.pos-1;m>=d;m--)c.buf[m+h]=c.buf[m]}function qSe(d,s){for(let c=0;c=0&&h>=s&&jF[this.text.charCodeAt(h)];h--)c--;this.text=this.text.substring(s,c),this.sectionIndex=this.sectionIndex.slice(s,c)}substring(s,c){let h=new CS;return h.text=this.text.substring(s,c),h.sectionIndex=this.sectionIndex.slice(s,c),h.sections=this.sections,h}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((s,c)=>Math.max(s,this.sections[c].scale),0)}addTextSection(s,c){this.text+=s.text,this.sections.push(h2.forText(s.scale,s.fontStack||c));let h=this.sections.length-1;for(let m=0;m=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function MH(d,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee=1){let te=CS.fromFeature(d,m,ee);O===hu.vertical&&te.verticalizePunctuation(N);let ie=[],he=(function(qe,Ye,it,Ut,pt,Gt){if(!qe)return[];let ti=[],$t=(function(Jt,It,xt,li,ni,dn){let Fi=0;for(let Zi=0;Zi=0,si=0;for(let Jt=0;Jt0&&ts>io&&(io=ts)}else{let xs=it[Ie.fontStack];if(!xs)continue;xs[Vt]&&(ji=xs[Vt]);let uo=Ye[Ie.fontStack];if(!uo)continue;let ts=uo.glyphs[Vt];if(!ts)continue;if(bi=ts.metrics,yo=Vt!==8203?Dl:0,dn){let Or=uo.ascender!==void 0?Math.abs(uo.ascender):0,nr=uo.descender!==void 0?Math.abs(uo.descender):0,ss=(Or+nr)*Ci;$i-c/2;){if(v--,v<0)return!1;w-=d[v].dist(y),y=d[v]}w+=d[v].dist(d[v+1]),v++;let T=[],A=0;for(;wh;)A-=T.shift().angleDelta;if(A>m)return!1;v++,w+=M.dist(O)}return!0}function Bte(d){let s=0;for(let c=0;cA){let G=(A-T)/H,ee=En(O.x,N.x,G),te=En(O.y,N.y,G),ie=new R_(ee,te,0,N.angleTo(O),M);return!v||Nte(d,ie,w,v,s)?ie:void 0}T+=H}}function lIe(d,s,c,h,m,y,v,w,T){let A=zte(h,y,v),M=Vte(h,m),O=M*v,N=d[0].x===0||d[0].x===T||d[0].y===0||d[0].y===T;return s-O=0&&ye=0&&ze=0&&N+A<=M){let Ve=new R_(ye,ze,0,he,G);h&&!Nte(d,Ve,y,h,m)||H.push(Ve)}}O+=ie}return w||H.length||v||(H=Ute(d,O/2,c,h,m,y,v,!0,T)),H}function Hte(d){let s=0,c=0;for(let v of d)s+=v.w*v.h,c=Math.max(c,v.w);d.sort((v,w)=>w.h-v.h);let h=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(s/.95)),c),h:1/0}],m=0,y=0;for(let v of d)for(let w=h.length-1;w>=0;w--){let T=h[w];if(!(v.w>T.w||v.h>T.h)){if(v.x=T.x,v.y=T.y,y=Math.max(y,v.y+v.h),m=Math.max(m,v.x+v.w),v.w===T.w&&v.h===T.h){let A=h.pop();A&&w1?G-1:G,ic.copy(O.data,A,{x:0,y:0},{x:ee,y:te},O.data,h),ic.copy(O.data,A,{x:0,y:he-G},{x:ee,y:te-G},{width:ie,height:G},h),ic.copy(O.data,A,{x:0,y:0},{x:ee,y:te+he},{width:ie,height:G},h),ic.copy(O.data,A,{x:ie-G,y:0},{x:ee-G,y:te},{width:G,height:he},h),ic.copy(O.data,A,{x:0,y:0},{x:ee+ie,y:te},{width:G,height:he},h),ic.copy(O.data,A,{x:ie-G,y:he-G},{x:ee-G,y:te-G},{width:G,height:G},h),ic.copy(O.data,A,{x:0,y:he-G},{x:ee+ie,y:te-G},{width:G,height:G},h),ic.copy(O.data,A,{x:0,y:0},{x:ee+ie,y:te+he},{width:G,height:G},h),ic.copy(O.data,A,{x:ie-G,y:0},{x:ee-G,y:te+he},{width:G,height:G},h)}this.lut=h,this.image=A,this.iconPositions=m,this.patternPositions=y}addImages(s,c,h,m){for(let[y,v]of s.entries()){let{bin:w,imagePosition:T,imageVariant:A}=PH(y,v,h);c.set(y,T),m.push(w),v.hasRenderCallback&&this.haveRenderCallbacks.push(A.id)}}patchUpdatedImages(s,c,h){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(m=>s.hasImage(m,h)),s.dispatchRenderCallbacks(this.haveRenderCallbacks,h);for(let m of s.getUpdatedImages(h)){for(let y of this.iconPositions.keys()){let v=Ep.parse(y);if(ru.isEqual(v.id,m)){let w=s.getImage(m,h);this.patchUpdatedImage(this.iconPositions.get(y),w,c,null)}}for(let y of this.patternPositions.keys()){let v=Ep.parse(y);if(ru.isEqual(v.id,m)){let w=s.getImage(m,h);this.patchUpdatedImage(this.patternPositions.get(y),w,c,this.lut)}}}}patchUpdatedImage(s,c,h,m=null){if(!s||!c||s.version===c.version)return;s.version=c.version;let[y,v]=s.tl,w=s.sdf;if(this.lut||w){let T={width:c.data.width,height:c.data.height},A=new ic(T);ic.copy(c.data,A,{x:0,y:0},{x:0,y:0},T,m,w),h.update(A,{position:{x:y,y:v}})}else h.update(c.data,{position:{x:y,y:v}})}}Ui(f2,"ImagePosition"),Ui(jte,"ImageAtlas");let g2=1e20;function Gte(d,s,c,h,m,y,v,w,T){for(let A=s;A-1);T++,y[T]=w,v[T]=A,v[T+1]=g2}for(let w=0,T=0;w{let T=this.entries[y];T||(T=this.entries[y]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let A=T.glyphs[v];if(A!==void 0)return void w(null,{stack:y,id:v,glyph:A});if(A=this._tinySDF(T,y,v),A)return T.glyphs[v]=A,void w(null,{stack:y,id:v,glyph:A});let M=Math.floor(v/256);if(256*M>65535)return Ro("glyphs > 65535 not supported"),void w(null,{stack:y,id:v,glyph:A});if(T.ranges[M])return void w(null,{stack:y,id:v,glyph:A});let O=T.requests[M];O||(O=T.requests[M]=[],wS.loadGlyphRange(y,M,m,this.requestManager,(N,H)=>{if(H){T.ascender=H.ascender,T.descender=H.descender;for(let G in H.glyphs)this._doesCharSupportLocalGlyph(+G)||(T.glyphs[+G]=H.glyphs[+G]);T.ranges[M]=!0}for(let G of O)G(N,H);delete T.requests[M]})),O.push((N,H)=>{N?w(N):H&&w(null,{stack:y,id:v,glyph:H.glyphs[v]||null})})},(y,v)=>{if(y)c(y);else if(v){let w={};for(let{stack:T,id:A,glyph:M}of v)w[T]===void 0&&(w[T]={}),w[T].glyphs===void 0&&(w[T].glyphs={}),w[T].glyphs[A]=M&&{id:M.id,bitmap:M.bitmap.clone(),metrics:M.metrics},w[T].ascender=this.entries[T].ascender,w[T].descender=this.entries[T].descender;c(null,w)}})}_doesCharSupportLocalGlyph(s){return this.localGlyphMode!==LH.none&&(this.localGlyphMode===LH.all?!!this.localFontFamily:!!this.localFontFamily&&(Tn["CJK Unified Ideographs"](s)||Tn["Hangul Syllables"](s)||Tn.Hiragana(s)||Tn.Katakana(s)||Tn["CJK Symbols and Punctuation"](s)||Tn["CJK Unified Ideographs Extension A"](s)||Tn["CJK Unified Ideographs Extension B"](s)||Tn.Osage(s)))}_tinySDF(s,c,h){let m=this.localFontFamily;if(!m||!this._doesCharSupportLocalGlyph(h))return;let y=s.tinySDF;if(!y){let ee="400";/bold/i.test(c)?ee="900":/medium/i.test(c)?ee="500":/light/i.test(c)&&(ee="200"),y=s.tinySDF=new wS.TinySDF({fontFamily:m,fontWeight:ee,fontSize:24*am,buffer:3*am,radius:8*am}),y.fontWeight=ee}if(this.localGlyphs[y.fontWeight][h])return this.localGlyphs[y.fontWeight][h];let v=String.fromCodePoint(h),{data:w,width:T,height:A,glyphWidth:M,glyphHeight:O,glyphLeft:N,glyphTop:H,glyphAdvance:G}=y.draw(v);return this.localGlyphs[y.fontWeight][h]={id:h,bitmap:new Ly({width:T,height:A},w),metrics:{width:M/am,height:O/am,left:N/am,top:H/am-27,advance:G/am,localGlyph:!0}}}}wS.loadGlyphRange=function(d,s,c,h,m){let y=256*s,v=y+255,w=h.transformRequest(h.normalizeGlyphsURL(c).replace("{fontstack}",d).replace("{range}",`${y}-${v}`),ow.Glyphs);oy(w,(T,A)=>{if(T)m(T);else if(A){let M={},O=(function(N){return new HF(N).readFields(tIe,{})})(A);for(let N of O.glyphs)M[N.id]=N;m(null,{glyphs:M,ascender:O.ascender,descender:O.descender})}})},wS.TinySDF=class{constructor({fontSize:d=24,buffer:s=3,radius:c=8,cutoff:h=.25,fontFamily:m="sans-serif",fontWeight:y="normal",fontStyle:v="normal",lang:w=null}={}){this.buffer=s,this.cutoff=h,this.radius=c,this.lang=w;let T=this.size=d+4*s,A=this._createCanvas(T),M=this.ctx=A.getContext("2d",{willReadFrequently:!0});M.font=`${v} ${y} ${d}px ${m}`,M.textBaseline="alphabetic",M.textAlign="left",M.fillStyle="black",this.gridOuter=new Float64Array(T*T),this.gridInner=new Float64Array(T*T),this.f=new Float64Array(T),this.z=new Float64Array(T+1),this.v=new Uint16Array(T)}_createCanvas(d){let s=document.createElement("canvas");return s.width=s.height=d,s}draw(d){let{width:s,actualBoundingBoxAscent:c,actualBoundingBoxDescent:h,actualBoundingBoxLeft:m,actualBoundingBoxRight:y}=this.ctx.measureText(d),v=Math.ceil(c),w=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(y-m))),T=Math.min(this.size-this.buffer,v+Math.ceil(h)),A=w+2*this.buffer,M=T+2*this.buffer,O=Math.max(A*M,0),N=new Uint8ClampedArray(O),H={data:N,width:A,height:M,glyphWidth:w,glyphHeight:T,glyphTop:v,glyphLeft:0,glyphAdvance:s};if(w===0||T===0)return H;let{ctx:G,buffer:ee,gridInner:te,gridOuter:ie}=this;this.lang&&(G.lang=this.lang),G.clearRect(ee,ee,w,T),G.fillText(d,ee,ee+v);let he=G.getImageData(ee,ee,w,T);ie.fill(g2,0,O),te.fill(0,0,O);for(let me=0;me0?qe*qe:0,te[Ve]=qe<0?qe*qe:0}}Gte(ie,0,0,A,M,A,this.f,this.v,this.z),Gte(te,ee,ee,w,T,A,this.f,this.v,this.z);for(let me=0;me{let Yt=$F(pt.stretch-he,me,M,d.left*m),si=qF(pt.fixed-Ve,qe,pt.stretch,G),Nt=$F(Gt.stretch-ye,ze,O,d.top*m),Jt=qF(Gt.fixed-Ye,it,Gt.stretch,ee),It=$F(ti.stretch-he,me,M,d.left*m),xt=qF(ti.fixed-Ve,qe,ti.stretch,G),li=$F($t.stretch-ye,ze,O,d.top*m),ni=qF($t.fixed-Ye,it,$t.stretch,ee),dn=new ai(Yt,Nt),Fi=new ai(It,Nt),Zi=new ai(It,li),mi=new ai(Yt,li),ln=new ai(si/w,Jt/w),Bn=new ai(xt/w,ni/w),wi=s*Math.PI/180;if(wi){let $i=Math.sin(wi),Xn=Math.cos(wi),zo=[Xn,-$i,$i,Xn];dn._matMult(zo),Fi._matMult(zo),mi._matMult(zo),Zi._matMult(zo)}let Ji=pt.stretch+pt.fixed,Dn=ti.stretch+ti.fixed,Kn=Gt.stretch+Gt.fixed,_o=$t.stretch+$t.fixed,io=d.imageSecondary;return{tl:dn,tr:Fi,bl:mi,br:Zi,texPrimary:{x:v.paddedRect.x+By+Ji,y:v.paddedRect.y+By+Kn,w:Dn-Ji,h:_o-Kn},texSecondary:io?{x:io.paddedRect.x+By+Ji,y:io.paddedRect.y+By+Kn,w:Dn-Ji,h:_o-Kn}:void 0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ln,pixelOffsetBR:Bn,minFontScaleX:qe/w/M,minFontScaleY:it/w/O,isSDF:c}};if(h&&(v.stretchX||v.stretchY)){let pt=Kte(N,te,G),Gt=Kte(H,ie,ee);for(let ti=0;tiy)&&(y=G.x),(!H||G.y>v)&&(v=G.y)}let T=Math.min(y-h,v-m),A=T/2,M=new Cw([],uIe);if(T===0)return new ai(h,m);for(let H=h;HO.d||!O.d)&&(O=H,c&&console.log("found best %d after %d probes",Math.round(1e4*H.d)/1e4,N)),H.max-O.d<=s||(A=H.h/2,M.push(new SS(H.p.x-A,H.p.y-A,A,d)),M.push(new SS(H.p.x+A,H.p.y-A,A,d)),M.push(new SS(H.p.x-A,H.p.y+A,A,d)),M.push(new SS(H.p.x+A,H.p.y+A,A,d)),N+=4)}return c&&(console.log(`num probes: ${N}`),console.log(`best distance: ${O.d}`)),O.p}function uIe(d,s){return s.max-d.max}class SS{constructor(s,c,h,m){this.p=new ai(s,c),this.h=h,this.d=(function(y,v){let w=!1,T=1/0;for(let A=0;Ay.y!=ee.y>y.y&&y.x<(ee.x-G.x)*(y.y-G.y)/(ee.y-G.y)+G.x&&(w=!w),T=Math.min(T,Ss(y,G,ee))}}return(w?1:-1)*Math.sqrt(T)})(this.p,m),this.max=this.d+this.h*Math.SQRT2}}let pIe=Object.keys,FH=Number.POSITIVE_INFINITY,hIe=Math.sqrt(2);function Zte(d,[s,c]){let h=0,m=0;if(c===FH){s<0&&(s=0);let y=s/hIe;switch(d){case"top-right":case"top-left":m=y-7;break;case"bottom-right":case"bottom-left":m=7-y;break;case"bottom":m=7-s;break;case"top":m=s-7}switch(d){case"top-right":case"bottom-right":h=-y;break;case"top-left":case"bottom-left":h=y;break;case"left":h=s;break;case"right":h=-s}}else{switch(s=Math.abs(s),c=Math.abs(c),d){case"top-right":case"top-left":case"top":m=c-7;break;case"bottom-right":case"bottom-left":case"bottom":m=7-c}switch(d){case"top-right":case"bottom-right":case"right":h=-s;break;case"top-left":case"bottom-left":case"left":h=s}}return[h,m]}function WF(d,s,c,h,m,y,v,w,T){if(!s||!s.usvg)return;let A=Lte(h),M=Lte(m),O=y!=="both"&&y!=="width"||!Ote(h)?1:M.width/A.width,N=y!=="both"&&y!=="height"||!Pte(h)?1:M.height/A.height;c.scaleSelf(O,N);let H=c.toString();v.set(H,c),w.set(H,s);let{imagePosition:G}=PH(H,s,kx);T.set(H,G)}function Yte(d,s,c,h,m,y,v,w,T){if(!d)return;let A=(function(M,O,N,H,G,ee){if(M.kind==="camera")return M.maxSize;if(M.kind==="composite"){let te=O.possiblyEvaluate(new es(M.maxZoom,{worldview:ee}),N).evaluate(G,{},N),ie=O.possiblyEvaluate(new es(M.minZoom,{worldview:ee}),N).evaluate(G,{},N);return Math.max(te,ie)}return O.possiblyEvaluate(new es(H,{worldview:ee})).evaluate(G,{},N)})(s,c,h,m,y,T);return d.scaleSelf(A*w*v)}function Qte(d,s,c,h,m,y,v,w,T){return{iconPrimary:Yte(d.getPrimary(),s,c,h,m,y,v,w,T),iconSecondary:Yte(d.getSecondary(),s,c,h,m,y,v,w,T)}}function mIe(d,s,c){if(!s)return;let h=c.get(d.toString()),m=c.get(s.toString());h&&m&&(h.paddedRect.w===m.paddedRect.w&&h.paddedRect.h===m.paddedRect.h||Ro(`Mismatch in icon variant sizes: ${d.toString()} and ${s.toString()}`),h.usvg!==m.usvg&&Ro(`Mismatch in icon variant image types: ${d.id} and ${s.id}`))}function Xte(d,s,c,h){if(!d)return;let m=s.get(c.toString());if(d.imagePrimary=m,h){let y=s.get(h.toString());d.imageSecondary=y}}function fIe(d,s){for(let c in d.horizontal)Jte(d.horizontal[c],s);Jte(d.vertical,s)}function Jte(d,s){if(d){for(let c of d.positionedLines)for(let h of c.positionedGlyphs)if(h.image!==null){let m=h.image.toString();h.rect=s.get(m).paddedRect}}}function NH(d){switch(d){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function gIe(d,s,c,h,m,y,v,w,T){let A=BH(y.horizontal)||y.vertical,M=c.get("icon-text-fit-padding").evaluate(h,{},m),O,N=s;return s&&T!=="none"&&(d.allowVerticalPlacement&&y.vertical&&(O=Rte(s,y.vertical,T,M,w,v)),A&&(N=Rte(s,A,T,M,w,v))),{defaultShapedIcon:N,verticallyShapedIcon:O}}function _Ie(d,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie,he,me){let ye=v.textMaxSize.evaluate(s,{},N);ye===void 0?ye=w*v.textScaleFactor:ye*=v.textScaleFactor;let ze=d.layers[0].layout,Ve=BH(c.horizontal)||c.vertical,qe=H.name==="globe",Ye=Dl,it=d.tilePixelRatio*ye/Ye,Ut=(si=d.overscaling,d.zoom>18&&si>2&&(si>>=1),Math.max(fi/(512*si),1)*ze.get("symbol-spacing")),pt=ze.get("text-padding")*d.tilePixelRatio,Gt=ze.get("icon-padding")*d.tilePixelRatio,ti=dt(ze.get("text-max-angle")),$t=ze.get("icon-rotation-alignment")==="map"&&me!=="point",Yt=Ut/2;var si;d.hasAnyIconTextFit===!1&&te!=="none"&&(d.hasAnyIconTextFit=!0);let Nt=s.properties?+s.properties[lo]:null,Jt=Nt&&d.elevationFeatureIdToIndex?d.elevationFeatureIdToIndex.get(Nt):65535,It=(xt,li,ni)=>{if(li.x<0||li.x>=fi||li.y<0||li.y>=fi)return;let dn=null;if(qe){let{x:Fi,y:Zi,z:mi}=H.projectTilePoint(li.x,li.y,ni);dn={anchor:new R_(Fi,Zi,mi,0,void 0),up:H.upVector(ni,li.x,li.y)}}(function(Fi,Zi,mi,ln,Bn,wi,Ji,Dn,Kn,_o,io,$i,Xn,zo,we,Ie,wt,Vt,Ci,bi,ji,gn,yo,vo,ho,Tr,xs,uo,ts){let Or=Fi.addToLineVertexArray(Zi,ln),nr,ss,as,Jr,is,Pr,bo,Nr=0,ks=0,On=0,$o=0,ls=-1,Vs=-1,ms={},Va=lw(""),Hr=mi?mi.anchor:Zi,Ea=uo!=="none",Ad=0,nc=0;if(Kn._unevaluatedLayout.getValue("text-radial-offset")===void 0){let Ua=Kn.layout.get("text-offset").evaluate(ji,{},ho);Ad=Ua[0]*Dl,nc=Ua[1]*Dl}else Ad=Kn.layout.get("text-radial-offset").evaluate(ji,{},ho)*Dl,nc=FH;if(Fi.allowVerticalPlacement&&Bn.vertical){let Ua=Bn.vertical;if(we)Pr=zH(Ua),Dn&&(bo=zH(Dn));else{let cl=Kn.layout.get("text-rotate").evaluate(ji,{},ho)+90;as=KF(_o,Hr,Zi,io,$i,Xn,Ua,zo,cl,Ie),Dn&&(Jr=KF(_o,Hr,Zi,io,$i,Xn,Dn,Vt,cl))}}if(wi){let Ua=Fi.iconSizeData,cl=Kn.layout.get("icon-rotate").evaluate(ji,{},ho),oc=Wte(wi,cl,yo,Ea,gn.iconScaleFactor),Zc=Dn?Wte(Dn,cl,yo,Ea,gn.iconScaleFactor):void 0;ss=KF(_o,Hr,Zi,io,$i,Xn,wi,Vt,cl,null),Nr=4*oc.length;let bc=null;Ua.kind==="source"?(bc=[Ff*Kn.layout.get("icon-size").evaluate(ji,{},ho)*gn.iconScaleFactor],bc[0]>zy&&Ro(`${Fi.layerIds[0]}: Value for "icon-size" is >= ${_2}. Reduce your "icon-size".`)):Ua.kind==="composite"&&(bc=[Ff*gn.compositeIconSizes[0].evaluate(ji,{},ho)*gn.iconScaleFactor,Ff*gn.compositeIconSizes[1].evaluate(ji,{},ho)*gn.iconScaleFactor],(bc[0]>zy||bc[1]>zy)&&Ro(`${Fi.layerIds[0]}: Value for "icon-size" is >= ${_2}. Reduce your "icon-size".`)),Fi.addSymbols(Fi.icon,oc,bc,bi,Ci,ji,void 0,mi,Zi,Or.lineStartIndex,Or.lineLength,-1,vo,ho,Tr,xs),ls=Fi.icon.placedSymbolArray.length-1,Zc&&(ks=4*Zc.length,Fi.addSymbols(Fi.icon,Zc,bc,bi,Ci,ji,hu.vertical,mi,Zi,Or.lineStartIndex,Or.lineLength,-1,vo,ho,Tr,xs),Vs=Fi.icon.placedSymbolArray.length-1)}for(let Ua in Bn.horizontal){let cl=Ua,oc=Bn.horizontal[cl];nr||(Va=lw(oc.text),we?is=zH(oc):nr=KF(_o,Hr,Zi,io,$i,Xn,oc,zo,Kn.layout.get("text-rotate").evaluate(ji,{},ho),Ie));let Zc=oc.positionedLines.length===1;if(On+=eie(Fi,mi,Zi,oc,Ji,Kn,we,ji,Ie,Or,Bn.vertical?hu.horizontal:hu.horizontalOnly,Zc?pIe(Bn.horizontal):[cl],ms,ls,gn,vo,ho,Tr),Zc)break}Bn.vertical&&($o+=eie(Fi,mi,Zi,Bn.vertical,Ji,Kn,we,ji,Ie,Or,hu.vertical,["vertical"],ms,Vs,gn,vo,ho,Tr));let Ul=-1,Dd=(Ua,cl)=>Ua?Math.max(Ua,cl):cl;Ul=Dd(is,Ul),Ul=Dd(Pr,Ul),Ul=Dd(bo,Ul);let Nf=Ul>-1?1:0;Fi.glyphOffsetArray.length>=65535&&Ro("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ji.sortKey!==void 0&&Fi.addToSortKeyRanges(Fi.symbolInstances.length,ji.sortKey),Fi.symbolInstances.emplaceBack(Zi.x,Zi.y,Hr.x,Hr.y,Hr.z,ms.right>=0?ms.right:-1,ms.center>=0?ms.center:-1,ms.left>=0?ms.left:-1,ms.vertical>=0?ms.vertical:-1,ls,Vs,Va,nr!==void 0?nr:Fi.collisionBoxArray.length,nr!==void 0?nr+1:Fi.collisionBoxArray.length,as!==void 0?as:Fi.collisionBoxArray.length,as!==void 0?as+1:Fi.collisionBoxArray.length,ss!==void 0?ss:Fi.collisionBoxArray.length,ss!==void 0?ss+1:Fi.collisionBoxArray.length,Jr||Fi.collisionBoxArray.length,Jr?Jr+1:Fi.collisionBoxArray.length,io,On,$o,Nr,ks,Nf,0,Ad,nc,Ul,0,Ea?1:0,ts)})(d,li,dn,xt,c,h,y,m,d.layers[0],d.collisionBoxArray,s.index,s.sourceLayerIndex,d.index,pt,he,A,0,Gt,$t,ie,s,v,M,O,N,G,ee,te,Jt)};if(me==="line")for(let xt of OF(s.geometry,0,0,fi,fi)){let li=lIe(xt,Ut,ti,c.vertical||Ve,h,Ye,it,d.overscaling,fi);for(let ni of li)Ve&&yIe(d,Ve.text,Yt,ni)||It(xt,ni,N)}else if(me==="line-center"){for(let xt of s.geometry)if(xt.length>1){let li=aIe(xt,ti,c.vertical||Ve,h,Ye,it);li&&It(xt,li,N)}}else if(s.type==="Polygon")for(let xt of JD(s.geometry,0)){let li=dIe(xt,16);It(xt[0],new R_(li.x,li.y,0,0,void 0),N)}else if(s.type==="LineString")for(let xt of s.geometry)It(xt,new R_(xt[0].x,xt[0].y,0,0,void 0),N);else if(s.type==="Point")for(let xt of s.geometry)for(let li of xt)It([li],new R_(li.x,li.y,0,0,void 0),N)}let _2=255,zy=_2*Ff;function eie(d,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te,ie){let he=(function(ze,Ve,qe,Ye,it,Ut,pt,Gt){let ti=[];if(Ve.positionedLines.length===0)return ti;let $t=Ye.layout.get("text-rotate").evaluate(Ut,{})*Math.PI/180,Yt=(function(xt){let li=xt[0],ni=xt[1],dn=li*ni;return dn>0?[li,-ni]:dn<0?[-li,ni]:li===0?[ni,li]:[ni,-li]})(qe),si=Math.abs(Ve.top-Ve.bottom);for(let xt of Ve.positionedLines)si-=xt.lineOffset;let Nt=Ve.positionedLines.length,Jt=si/Nt,It=Ve.top-qe[1];for(let xt=0;xtzy&&Ro(`${d.layerIds[0]}: Value for "text-size" is >= ${_2}. Reduce your "text-size".`)):me.kind==="composite"&&(ye=[Ff*G.compositeTextSizes[0].evaluate(w,{},te)*G.textScaleFactor,Ff*G.compositeTextSizes[1].evaluate(w,{},te)*G.textScaleFactor],(ye[0]>zy||ye[1]>zy)&&Ro(`${d.layerIds[0]}: Value for "text-size" is >= ${_2}. Reduce your "text-size".`)),d.addSymbols(d.text,he,ye,T,v,w,M,s,c,A.lineStartIndex,A.lineLength,H,ee,te,ie,!1);for(let ze of O)N[ze]=d.text.placedSymbolArray.length-1;return 4*he.length}function BH(d){for(let s in d)return d[s];return null}function KF(d,s,c,h,m,y,v,w,T,A){let M=v.top,O=v.bottom,N=v.left,H=v.right;if(Mte(v)&&v.collisionPadding){let G=v.collisionPadding;N-=G[0],M-=G[1],H+=G[2],O+=G[3]}if(T){let G=new ai(N,M),ee=new ai(H,M),te=new ai(N,O),ie=new ai(H,O),he=dt(T),me=new ai(0,0);A&&(me=new ai(A[0],A[1])),G._rotateAround(he,me),ee._rotateAround(he,me),te._rotateAround(he,me),ie._rotateAround(he,me),N=Math.min(G.x,ee.x,te.x,ie.x),H=Math.max(G.x,ee.x,te.x,ie.x),M=Math.min(G.y,ee.y,te.y,ie.y),O=Math.max(G.y,ee.y,te.y,ie.y)}return d.emplaceBack(s.x,s.y,s.z,c.x,c.y,N,M,H,O,w,h,m,y),d.length-1}function zH(d){Mte(d)&&d.collisionPadding&&(d.top-=d.collisionPadding[1],d.bottom+=d.collisionPadding[3]);let s=d.bottom-d.top;return s>0?Math.max(10,s):null}function yIe(d,s,c,h){let m=d.compareText;if(s in m){let y=m[s];for(let v=y.length-1;v>=0;v--)if(h.dist(y[v])me&&(ye(Ve,$t,Ye,it,Gt,ti),ye($t,qe,Gt,ti,Ut,pt))}ye(O,N,h,y,m,y),ye(N,H,m,y,m,v),ye(H,G,m,v,h,v),ye(G,O,h,v,h,y),ee-=me,te-=me,ie+=me,he+=me;let ze=1/Math.max(ie-ee,he-te);return{scale:ze,x:ee*ze,y:te*ze,x2:ie*ze,y2:he*ze,projection:s}}function iie(d,{x:s,y:c},h=0){return new ai(((s-h)*d.scale-d.x)*fi,(c*d.scale-d.y)*fi)}let vIe=R(new Float32Array(16));class Vy{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,c){return{x:0,y:0,z:0}}unproject(s,c){return new J(0,0)}projectTilePoint(s,c,h){return{x:s,y:c,z:0}}locationPoint(s,c,h,m=!0){return s._coordinatePoint(s.locationCoordinate(c,h),m)}pixelsPerMeter(s,c){return ke(1,s)*c}pixelSpaceConversion(s,c,h){return 1}farthestPixelDistance(s){return tie(s,s.pixelsPerMeter)}pointCoordinate(s,c,h,m){let y=s.horizonLineFromTop(!1),v=new ai(c,Math.max(y,h));return s.rayIntersectionCoordinate(s.pointRayIntersection(v,m))}pointCoordinate3D(s,c,h){let m=new ai(c,h);if(s.elevation)return s.elevation.pointCoordinate(m);{let y=this.pointCoordinate(s,m.x,m.y,0);return[y.x,y.y,y.z]}}isPointAboveHorizon(s,c){if(s.elevation&&s.elevation.visibleDemTiles.length)return!this.pointCoordinate3D(s,c.x,c.y);let h=s.horizonLineFromTop();return c.y0?c<-IS+h&&(c=-IS+h):c>IS-h&&(c=IS-h);let v=y/Math.pow(YF(c),m),w=v*Math.sin(m*s),T=y-v*Math.cos(m*s);return w=.5*(w/Math.PI+.5),T=.5*(T/Math.PI+.5),{x:w,y:this.southernCenter?T:1-T,z:0}}unproject(s,c){s=(2*s-.5)*Math.PI,this.southernCenter&&(c=1-c),c=(2*(1-c)-.5)*Math.PI;let{n:h,f:m}=this,y=m-c,v=Math.sign(y),w=Math.sign(h)*Math.sqrt(s*s+y*y),T=Math.atan2(s,Math.abs(y))*v;y*h<0&&(T-=Math.PI*Math.sign(s)*v);let A=Ue(oe(T/h)+this.center[0],-180,180),M=Ue(oe(2*Math.atan(Math.pow(m/w,1/h))-IS),-Be,Be);return new J(A,this.southernCenter?-M:M)}}class nie extends Vy{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,c){return{x:xe(s),y:Pe(c),z:0}}unproject(s,c){let h=Ne(s),m=Me(c);return new J(h,m)}}let oie=dt(Be);class SIe extends Vy{project(s,c){let h=(c=dt(c))*c,m=h*h;return{x:.5*((s=dt(s))*(.8707-.131979*h+m*(m*(.003971*h-.001529*m)-.013791))/Math.PI+.5),y:1-.5*(c*(1.007226+h*(.015085+m*(.028874*h-.044475-.005916*m)))/Math.PI+1),z:0}}unproject(s,c){s=(2*s-.5)*Math.PI;let h=c=(2*(1-c)-1)*Math.PI,m=25,y=0,v=h*h;do{v=h*h;let A=v*v;y=(h*(1.007226+v*(.015085+A*(.028874*v-.044475-.005916*A)))-c)/(1.007226+v*(.045255+A*(.259866*v-.311325-.005916*11*A))),h=Ue(h-y,-oie,oie)}while(Math.abs(y)>1e-6&&--m>0);v=h*h;let w=Ue(oe(s/(.8707+v*(v*(v*v*v*(.003971-.001529*v)-.013791)-.131979))),-180,180),T=oe(h);return new J(w,T)}}let rie=dt(Be);class IIe extends Vy{project(s,c){c=dt(c),s=dt(s);let h=Math.cos(c),m=2/Math.PI,y=Math.acos(h*Math.cos(s/2)),v=Math.sin(y)/y,w=.5*(s*m+2*h*Math.sin(s/2)/v)||0,T=.5*(c+Math.sin(c)/v)||0;return{x:.5*(w/Math.PI+.5),y:1-.5*(T/Math.PI+1),z:0}}unproject(s,c){let h=s=(2*s-.5)*Math.PI,m=c=(2*(1-c)-1)*Math.PI,y=25,v=1e-6,w=0,T=0;do{let A=Math.cos(m),M=Math.sin(m),O=2*M*A,N=M*M,H=A*A,G=Math.cos(h/2),ee=Math.sin(h/2),te=2*G*ee,ie=ee*ee,he=1-H*G*G,me=he?1/he:0,ye=he?Math.acos(A*G)*Math.sqrt(1/he):0,ze=.5*(2*ye*A*ee+2*h/Math.PI)-s,Ve=.5*(ye*M+m)-c,qe=.5*me*(H*ie+ye*A*G*N)+1/Math.PI,Ye=me*(te*O/4-ye*M*ee),it=.125*me*(O*ee-ye*M*H*te),Ut=.5*me*(N*G+ye*ie*A)+.5,pt=Ye*it-Ut*qe;w=(Ve*Ye-ze*Ut)/pt,T=(ze*it-Ve*qe)/pt,h=Ue(h-w,-Math.PI,Math.PI),m=Ue(m-T,-rie,rie)}while((Math.abs(w)>v||Math.abs(T)>v)&&--y>0);return new J(oe(h),oe(m))}}class sie extends Vy{constructor(s){super(s),this.center=s.center||[0,0],this.parallels=s.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(dt(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(s,c){let{scale:h,cosPhi:m}=this;return{x:dt(s)*m*h+.5,y:-Math.sin(dt(c))/m*h+.5,z:0}}unproject(s,c){let{scale:h,cosPhi:m}=this,y=-(c-.5)/h,v=Ue(oe((s-.5)/h)/m,-180,180),w=Math.asin(Ue(y*m,-1,1)),T=Ue(oe(w),-Be,Be);return new J(v,T)}}class TIe extends nie{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,c,h){let m=WD(s,c,h);return Vn(m,m,SF(Pf(h))),{x:m[0],y:m[1],z:m[2]}}locationPoint(s,c,h){let m=U(c.lat,c.lng),y=vn([],m),v=h?s._centerAltitude+h:s.elevation?s.elevation.getAtPointOrZero(s.locationCoordinate(c),s._centerAltitude):s._centerAltitude;St(m,m,y,ke(1,0)*fi*v);let w=R(new Float64Array(16));return $(w,s.pixelMatrix,s.globeMatrix),Vn(m,m,w),new ai(m[0],m[1])}pixelsPerMeter(s,c){return ke(1,0)*c}pixelSpaceConversion(s,c,h){let m=ke(1,s)*c,y=En(ke(1,45)*c,m,h);return this.pixelsPerMeter(s,c)/y}createTileMatrix(s,c,h){let m=W8(Pf(h.canonical));return $(new Float64Array(16),s.globeMatrix,m)}createInversionMatrix(s,c){let{center:h}=s,m=SF(Pf(c));return ge(m,m,dt(h.lng)),se(m,m,dt(h.lat)),Q(m,m,[s._pixelsPerMercatorPixel,s._pixelsPerMercatorPixel,1]),Float32Array.from(m)}pointCoordinate(s,c,h,m){return kJ(s,c,h,!0)||new At(0,0)}pointCoordinate3D(s,c,h){let m=this.pointCoordinate(s,c,h,0);return[m.x,m.y,m.z]}isPointAboveHorizon(s,c){return!kJ(s,c.x,c.y,!1)}farthestPixelDistance(s){let c=(function(m,y){let v=m.cameraToCenterDistance,w=m._centerAltitude*y,T=m._camera,A=m._camera.forward(),M=ki([],_t([],A,-v),[0,0,w]),O=m.worldSize/(2*Math.PI),N=[0,0,-O],H=m.width/m.height,G=Math.tan(m.fovAboveCenter),ee=_t([],T.up(),G),te=_t([],T.right(),G*H),ie=vn([],ki([],ki([],A,ee),te)),he=[],me;if(new ir(M,ie).closestPointOnSphere(N,O,he)){let ye=ki([],he,N),ze=Qt([],ye,M);me=Math.cos(m.fovAboveCenter)*ht(ze)}else{let ye=Qt([],M,N),ze=Qt([],N,M);vn(ze,ze);let Ve=ht(ye)-O;me=Math.sqrt(Ve*(Ve+2*O));let qe=Math.acos(me/(O+Ve))-Math.acos(Gn(A,ze));me*=Math.cos(qe)}return 1.01*me})(s,this.pixelsPerMeter(s.center.lat,s.worldSize)),h=Py(s.zoom);if(h>0){let m=tie(s,ke(1,s.center.lat)*s.worldSize),y=s.worldSize/(2*Math.PI),v=Math.max(s.width,s.height)/s.worldSize*Math.PI;return En(c,m+y*(1-Math.cos(v)),Math.pow(h,10))}return c}upVector(s,c,h){return WD(c,h,s,1)}upVectorScale(s){return{metersToTile:xF(wF(Pf(s)))}}}function aie(d){let s=d.parallels,c=!!s&&Math.abs(s[0]+s[1])<.01;switch(d.name){case"mercator":return new nie(d);case"equirectangular":return new CIe(d);case"naturalEarth":return new SIe(d);case"equalEarth":return new xIe(d);case"winkelTripel":return new IIe(d);case"albers":return c?new sie(d):new bIe(d);case"lambertConformalConic":return c?new sie(d):new wIe(d);case"globe":return new TIe(d)}throw new Error(`Invalid projection name: ${d.name}`)}let EIe=ei.types,AIe=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function QF(d,s,c,h,m,y,v,w,T,A,M,O,N){let H=w?Math.min(zy,Math.round(w[0])):0,G=w?Math.min(zy,Math.round(w[1])):0;d.emplaceBack(s,c,Math.round(32*h),Math.round(32*m),y,v,(H<<1)+(T?1:0),G,16*A,16*M,256*O,256*N)}function XF(d,s,c){d.emplaceBack(s,c)}function JF(d,s,c,h,m,y,v){d.emplaceBack(s,c,h,m,y,v)}let eN=(d,s,c,h)=>{for(let m=0;m0&&(this.iconTransitioningVertexBuffer=s.createVertexBuffer(this.iconTransitioningVertexArray,zSe.members,!0)),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=s.createVertexBuffer(this.globeExtVertexArray,LSe.members,!0)),!this.zOffsetVertexBuffer&&(this.zOffsetVertexArray.length>0||y)&&(this.zOffsetVertexBuffer=s.createVertexBuffer(this.zOffsetVertexArray,NSe.members,!0)),!this.orientationVertexBuffer&&this.orientationVertexArray&&this.orientationVertexArray.length>0&&(this.orientationVertexBuffer=s.createVertexBuffer(this.orientationVertexArray,BSe.members,!0)),this.opacityVertexBuffer.itemSize=1),(h||m)&&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())}}Ui(VH,"SymbolBuffers");class UH{constructor(s,c,h){this.layoutVertexArray=new s,this.layoutAttributes=c,this.indexArray=new h,this.segments=new Ds,this.collisionVertexArray=new zD,this.collisionVertexArrayExt=new kp}upload(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=s.createVertexBuffer(this.collisionVertexArray,VSe.members,!0),this.collisionVertexBufferExt=s.createVertexBuffer(this.collisionVertexArrayExt,USe.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Ui(UH,"CollisionBuffers");class iN{constructor(s){this.collisionBoxArray=s.collisionBoxArray,this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(v=>v.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 c=this.layers[0]._unevaluatedLayout._values;this.worldview=s.worldview,this.textSizeData=Fte(this.zoom,c["text-size"],this.worldview),this.iconSizeData=Fte(this.zoom,c["icon-size"],this.worldview);let h=this.layers[0].layout,m=h.get("symbol-sort-key"),y=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=y!=="viewport-y"&&m.constantOr(1)!==void 0,this.sortFeaturesByY=(y==="viewport-y"||y==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=h.get("text-writing-mode").map(v=>hu[v]),this.stateDependentLayerIds=this.layers.filter(v=>v.isStateDependent()).map(v=>v.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 VH(new Mp(this.layers,{zoom:this.zoom,lut:this.lut},s=>s.startsWith("text")||s.startsWith("symbol"))),this.icon=new VH(new Mp(this.layers,{zoom:this.zoom,lut:this.lut},s=>s.startsWith("icon")||s.startsWith("symbol"))),this.glyphOffsetArray=new pF,this.lineVertexArray=new hF,this.symbolInstances=new uF}calculateGlyphDependencies(s,c,h,m,y){for(let v of s){let w=v.codePointAt(0);if(w===void 0)break;if(c[w]=!0,m&&y&&w<=65535){let T=p2[v];T&&(c[T.charCodeAt(0)]=!0)}}}updateFootprints(s,c){}updateReplacement(s,c){if(c.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=c.updateTime;let h=c.getReplacementRegionsForTile(s.toUnwrapped(),!0);return!kF(this.activeReplacements,h)&&(this.activeReplacements=h,!0)}populate(s,c,h,m){let y=this.layers[0],v=y.layout,w=this.projection.name==="globe",T=v.get("text-font"),A=v.get("text-field"),M=v.get("icon-image"),[O,N]=v.get("icon-size-scale-range"),H=Ue(c.scaleFactor||1,O,N),G=(A.value.kind!=="constant"||A.value.value instanceof Gc&&!A.value.value.isEmpty()||A.value.value.toString().length>0)&&(T.value.kind!=="constant"||T.value.value.length>0),ee=M.value.kind!=="constant"||!!M.value.value||Object.keys(M.parameters).length>0,te=v.get("symbol-sort-key");if(this.features=[],!G&&!ee)return;let ie=c.iconDependencies,he=c.glyphDependencies,me=c.availableImages,ye=new es(this.zoom,{worldview:this.worldview});for(let{feature:ze,id:Ve,index:qe,sourceLayerIndex:Ye}of s){let it=y._featureFilter.needGeometry,Ut=ri(ze,it);if(!y._featureFilter.filter(ye,Ut,h))continue;if(it||(Ut.geometry=Ai(ze,h,m)),w&&ze.type!==1&&h.z<=5){let Yt=Ut.geometry,si=.98078528056,Nt=(Jt,It)=>Gn(WD(Jt.x,Jt.y,h,1),WD(It.x,It.y,h,1))=0;for(let Nt of pt.sections)if(Nt.image){let Jt=Nt.image.getPrimary().scaleSelf(this.pixelRatio),It=Jt.id.toString(),xt=ie.get(It)||[];xt.push(Jt),ie.set(It,xt)}else{let Jt=TD(pt.toString()),It=Nt.fontStack||Yt,xt=he[It]=he[It]||{};this.calculateGlyphDependencies(Nt.text,xt,si,this.allowVerticalPlacement,Jt)}}}if(v.get("symbol-placement")==="line"&&(this.features=(function(ze){let Ve={},qe={},Ye=[],it=0;function Ut($t){Ye.push(ze[$t]),it++}function pt($t,Yt,si){let Nt=qe[$t];return delete qe[$t],qe[Yt]=Nt,Ye[Nt].geometry[0].pop(),Ye[Nt].geometry[0]=Ye[Nt].geometry[0].concat(si[0]),Nt}function Gt($t,Yt,si){let Nt=Ve[Yt];return delete Ve[Yt],Ve[$t]=Nt,Ye[Nt].geometry[0].shift(),Ye[Nt].geometry[0]=si[0].concat(Ye[Nt].geometry[0]),Nt}function ti($t,Yt,si){let Nt=si?Yt[0][Yt[0].length-1]:Yt[0][0];return`${$t}:${Nt.x}:${Nt.y}`}for(let $t=0;$t$t.geometry)})(this.features)),v.get("symbol-elevation-reference")==="hd-road-markup"){if(this.elevationType="road",c.elevationFeatures){!this.elevationFeatures&&c.elevationFeatures.length>0&&(this.elevationFeatures=[],this.elevationFeatureIdToIndex=new Map);for(let ze of c.elevationFeatures)this.elevationFeatureIdToIndex.set(ze.id,this.elevationFeatures.length),this.elevationFeatures.push(ze)}}else v.get("symbol-z-elevate")&&(this.elevationType="offset");this.elevationType!=="none"&&(this.zOffsetBuffersNeedUpload=!0),this.sortFeaturesByKey&&this.features.sort((ze,Ve)=>ze.sortKey-Ve.sortKey)}update(s,c,h,m,y,v,w){this.text.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,this.worldview),this.icon.programConfigurations.updatePaintArrays(s,c,y,h,m,v,w,this.worldview)}updateRoadElevation(s){if(this.elevationType!=="road"||!this.elevationFeatures||this.elevationStateComplete)return;this.elevationStateComplete=!0,this.hasAnyZOffset=!1;let c=!1,h=ft(s),m=1/h,y=!1,v=!1;for(let w=0;w0||N>0,te=H>0,ie=this.elevationFeatures[T.elevationFeatureIndex];if(ie){let he=new ai(T.tileAnchorX,T.tileAnchorY),me=.075+ie.pointElevation(he);T.zOffset!==me&&(c=!0,T.zOffset=me);let ye=ie.computeSlopeNormal(he,m),ze=cd(Zt(),ue(0,0,1),ye);Lo(A,A,ze),Lo(M,M,ze),A[2]*=h,M[2]*=h,A[0]===1&&A[1]===0&&A[2]===0&&M[0]===0&&M[1]===1&&M[2]===0||(y=y||ee,v=v||te)}if(ee&&(eN(this.text.orientationVertexArray,O,A,M),eN(this.text.orientationVertexArray,N,A,M)),te){let{placedIconSymbolIndex:he,verticalPlacedIconSymbolIndex:me}=T;he>=0&&eN(this.icon.orientationVertexArray,H,A,M),me>=0&&eN(this.icon.orientationVertexArray,G,A,M)}}y||(this.text.orientationVertexArray=void 0),v||(this.icon.orientationVertexArray=void 0),c&&(this.zOffsetBuffersNeedUpload=!0,this.zOffsetSortDirty=!0)}updateZOffset(){let s=(y,v,w)=>{h+=v,h>y.length&&y.resize(h);for(let T=-v;T<0;T++)y.emplace(T+h,w)},c=(y,v,w)=>{m+=v,m>y.length&&y.resize(m);for(let T=-v;T<0;T++)y.emplace(T+m,w)};if(!this.zOffsetBuffersNeedUpload)return;this.zOffsetBuffersNeedUpload=!1;let h=0,m=0;for(let y=0;y0;if((w>0||T>0)&&(s(this.text.zOffsetVertexArray,w,M),s(this.text.zOffsetVertexArray,T,M)),O){let{placedIconSymbolIndex:N,verticalPlacedIconSymbolIndex:H}=v;N>=0&&c(this.icon.zOffsetVertexArray,A,M),H>=0&&c(this.icon.zOffsetVertexArray,v.numVerticalIconVertices,M)}}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=aie(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(s,c){let h=this.lineVertexArray.length;if(s.segment!==void 0)for(let{x:m,y}of c)this.lineVertexArray.emplaceBack(m,y);return{lineStartIndex:h,lineLength:this.lineVertexArray.length-h}}addSymbols(s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee,te){let ie=s.indexArray,he=s.layoutVertexArray,me=s.globeExtVertexArray,ye=s.segments.prepareSegment(4*c.length,he,ie,this.canOverlap?v.sortKey:void 0),ze=this.glyphOffsetArray.length,Ve=ye.vertexLength,qe=this.allowVerticalPlacement&&w===hu.vertical?Math.PI/2:0,Ye=v.text&&v.text.sections;for(let Ut=0;Ut=0?c.rightJustifiedTextSymbolIndex:c.centerJustifiedTextSymbolIndex>=0?c.centerJustifiedTextSymbolIndex:c.leftJustifiedTextSymbolIndex>=0?c.leftJustifiedTextSymbolIndex:c.verticalPlacedTextSymbolIndex>=0?c.verticalPlacedTextSymbolIndex:m),v=OH(this.textSizeData,s,y)/Dl;return this.tilePixelRatio*v}getSymbolInstanceIconSize(s,c,h){let m=this.icon.placedSymbolArray.get(h),y=OH(this.iconSizeData,s,m);return this.tilePixelRatio*y}_commitDebugCollisionVertexUpdate(s,c,h,m){s.emplaceBack(c,-h,-h,m),s.emplaceBack(c,h,-h,m),s.emplaceBack(c,h,h,m),s.emplaceBack(c,-h,h,m)}_updateTextDebugCollisionBoxes(s,c,h,m,y,v,w){for(let T=m;T0}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,c){let h=s.placedSymbolArray.get(c),m=h.vertexStartIndex+4*h.numGlyphs;for(let y=h.vertexStartIndex;ym[w]-m[T]||y[T]-y[w]),v}getSortedIndexesByZOffset(){if(!this.zOffsetSortDirty)return this.symbolInstanceIndexesSortedZOffset;if(!this.symbolInstanceIndexesSortedZOffset){this.symbolInstanceIndexesSortedZOffset=[];for(let s=0;sthis.symbolInstances.get(c).zOffset-this.symbolInstances.get(s).zOffset)}addToSortKeyRanges(s,c){let h=this.sortKeyRanges[this.sortKeyRanges.length-1];h&&h.sortKey===c?h.symbolInstanceEnd=s+1:this.sortKeyRanges.push({sortKey:c,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 c of this.symbolInstanceIndexes){let h=this.symbolInstances.get(c);this.featureSortOrder.push(h.featureIndex);let{rightJustifiedTextSymbolIndex:m,centerJustifiedTextSymbolIndex:y,leftJustifiedTextSymbolIndex:v,verticalPlacedTextSymbolIndex:w,placedIconSymbolIndex:T,verticalPlacedIconSymbolIndex:A}=h;m>=0&&this.addIndicesForPlacedSymbol(this.text,m),y>=0&&y!==m&&this.addIndicesForPlacedSymbol(this.text,y),v>=0&&v!==y&&v!==m&&this.addIndicesForPlacedSymbol(this.text,v),w>=0&&this.addIndicesForPlacedSymbol(this.text,w),T>=0&&this.addIndicesForPlacedSymbol(this.icon,T),A>=0&&this.addIndicesForPlacedSymbol(this.icon,A)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let lie,cie,HH;Ui(iN,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),iN.addDynamicAttributes=tN;class die{constructor(s){this.type=s.property.overrides?s.property.overrides.runtimeType:ph,this.defaultValue=s}evaluate(s){if(s.formattedSection){let c=this.defaultValue.property.overrides;if(c&&c.hasOverride(s.formattedSection))return c.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}}Ui(die,"FormatSectionOverride",{omit:["defaultValue"]});let jH=()=>HH||(HH={layout:lie||(lie=new Bs({"symbol-placement":new ci(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new ci(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ci(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ti(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ci(ut.layout_symbol["symbol-z-order"]),"symbol-z-elevate":new ci(ut.layout_symbol["symbol-z-elevate"]),"symbol-elevation-reference":new ci(ut.layout_symbol["symbol-elevation-reference"]),"icon-allow-overlap":new ci(ut.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ci(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new ci(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ci(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ti(ut.layout_symbol["icon-size"]),"icon-size-scale-range":new ci(ut.layout_symbol["icon-size-scale-range"]),"icon-text-fit":new Ti(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ti(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ti(ut.layout_symbol["icon-image"]),"icon-image-use-theme":new ci({type:"string",default:"default","property-type":"data-constant"}),"icon-rotate":new Ti(ut.layout_symbol["icon-rotate"]),"icon-padding":new ci(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new ci(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new Ti(ut.layout_symbol["icon-offset"]),"icon-anchor":new Ti(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ci(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ci(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ci(ut.layout_symbol["text-rotation-alignment"]),"text-field":new Ti(ut.layout_symbol["text-field"]),"text-font":new Ti(ut.layout_symbol["text-font"]),"text-size":new Ti(ut.layout_symbol["text-size"]),"text-size-scale-range":new ci(ut.layout_symbol["text-size-scale-range"]),"text-max-width":new Ti(ut.layout_symbol["text-max-width"]),"text-line-height":new Ti(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new Ti(ut.layout_symbol["text-letter-spacing"]),"text-justify":new Ti(ut.layout_symbol["text-justify"]),"text-radial-offset":new Ti(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ci(ut.layout_symbol["text-variable-anchor"]),"text-anchor":new Ti(ut.layout_symbol["text-anchor"]),"text-max-angle":new ci(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new ci(ut.layout_symbol["text-writing-mode"]),"text-rotate":new Ti(ut.layout_symbol["text-rotate"]),"text-padding":new ci(ut.layout_symbol["text-padding"]),"text-keep-upright":new ci(ut.layout_symbol["text-keep-upright"]),"text-transform":new Ti(ut.layout_symbol["text-transform"]),"text-offset":new Ti(ut.layout_symbol["text-offset"]),"text-allow-overlap":new ci(ut.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ci(ut.layout_symbol["text-ignore-placement"]),"text-optional":new ci(ut.layout_symbol["text-optional"]),visibility:new ci(ut.layout_symbol.visibility)})),paint:cie||(cie=new Bs({"icon-opacity":new Ti(ut.paint_symbol["icon-opacity"]),"icon-occlusion-opacity":new Ti(ut.paint_symbol["icon-occlusion-opacity"]),"icon-emissive-strength":new Ti(ut.paint_symbol["icon-emissive-strength"]),"text-emissive-strength":new Ti(ut.paint_symbol["text-emissive-strength"]),"icon-color":new Ti(ut.paint_symbol["icon-color"]),"icon-halo-color":new Ti(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ti(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ti(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new ci(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new ci(ut.paint_symbol["icon-translate-anchor"]),"icon-image-cross-fade":new ci(ut.paint_symbol["icon-image-cross-fade"]),"text-opacity":new Ti(ut.paint_symbol["text-opacity"]),"text-occlusion-opacity":new Ti(ut.paint_symbol["text-occlusion-opacity"]),"text-color":new Ti(ut.paint_symbol["text-color"],{runtimeType:Sd,getOverride:d=>d.textColor,hasOverride:d=>!!d.textColor}),"text-halo-color":new Ti(ut.paint_symbol["text-halo-color"]),"text-halo-width":new Ti(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new Ti(ut.paint_symbol["text-halo-blur"]),"text-translate":new ci(ut.paint_symbol["text-translate"]),"text-translate-anchor":new ci(ut.paint_symbol["text-translate-anchor"]),"icon-color-saturation":new ci(ut.paint_symbol["icon-color-saturation"]),"icon-color-contrast":new ci(ut.paint_symbol["icon-color-contrast"]),"icon-color-brightness-min":new ci(ut.paint_symbol["icon-color-brightness-min"]),"icon-color-brightness-max":new ci(ut.paint_symbol["icon-color-brightness-max"]),"symbol-z-offset":new Ti(ut.paint_symbol["symbol-z-offset"]),"icon-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"icon-halo-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"text-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"}),"text-halo-color-use-theme":new Ti({type:"string",default:"default","property-type":"data-driven"})}))},HH);class nN extends vc{constructor(s,c,h,m){super(s,jH(),c,h,m,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,c){super.recalculate(s,c),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));let h=this.layout.get("text-writing-mode");if(h){let m=[];for(let y of h)m.indexOf(y)<0&&m.push(y);this.layout._values["text-writing-mode"]=m}else this.layout._values["text-writing-mode"]=this.layout.get("symbol-placement")==="point"?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getColorAdjustmentMatrix(s,c,h,m){return this._saturation===s&&this._contrast===c&&this._brightnessMin===h&&this._brightnessMax===m||(this._colorAdjustmentMatrix=(function(y,v,w,T){y=tu(y),v=Hc(v);let A=P(),M=y/3,O=1-2*M,N=[O,M,M,0,M,O,M,0,M,M,O,0,0,0,0,1],H=.5-.5*v,G=T-w;return $(A,[G,0,0,0,0,G,0,0,0,0,G,0,w,w,w,1],[v,0,0,0,0,v,0,0,0,0,v,0,H,H,H,1]),$(A,A,N),A})(s,c,h,m),this._saturation=s,this._contrast=c,this._brightnessMin=h,this._brightnessMax=m),this._colorAdjustmentMatrix}getValueAndResolveTokens(s,c,h,m){let y=this.layout.get(s).evaluate(c,{},h,m),v=this._unevaluatedLayout._values[s];return v.isDataDriven()||wD(v.value)||!y?y:(function(w,T){return T.replace(/{([^{}]+)}/g,(A,M)=>M in w?String(w[M]):"")})(c.properties,y)}createBucket(s){return new iN(s)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(let s of jH().paint.overridableProperties){if(!nN.hasPaintOverride(this.layout,s))continue;let c=this.paint.get(s),h=new die(c),m=new jw(h,c.property.specification,this.scope,this.options,this.layout.get("icon-image-use-theme")),y=null;y=c.value.kind==="constant"||c.value.kind==="source"?new ux("source",m):new wf("composite",m,c.value.zoomStops,c.value.interpolationType),this.paint._values[s]=new C_(c.property,y,c.parameters)}}_handleOverridablePaintPropertyUpdate(s,c,h){return!(!this.layout||c.isDataDriven()||h.isDataDriven())&&nN.hasPaintOverride(this.layout,s)}static hasPaintOverride(s,c){let h=s.get("text-field"),m=jH().paint.properties[c],y=!1,v=w=>{for(let T of w)if(m.overrides&&m.overrides.hasOverride(T))return void(y=!0)};if(h.value.kind==="constant"&&h.value.value instanceof Gc)v(h.value.value.sections);else if(h.value.kind==="source"){let w=A=>{y||(A instanceof so&&sl(A.value)===gf?v(A.value.sections):A instanceof c_?v(A.sections):A.eachChild(w))},T=h.value;T._styleExpression&&w(T._styleExpression.expression)}return y}getProgramIds(){return["symbol"]}getDefaultProgramParams(s,c,h){return{config:new D_(this,{zoom:c,lut:h}),overrideFog:!1}}hasElevation(){return this.layout&&this.layout.get("symbol-elevation-reference")==="hd-road-markup"}}let uie,pie,hie,mie;var GH=Po([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);function oN(d,s,c,h,m,y,v,w){let T=[d,s,1,c,h,1,m,y,1],A=[v,w,1],M=I([],T),[O,N,H]=Fn(A,A,M);return D(T,T,[O,0,0,0,N,0,0,0,H])}function fie(d,s,c,h,m,y,v,w){let T=(function(A,M,O,N,H,G,ee,te){let ie=oN(0,0,1,0,1,1,0,1),he=oN(A,M,O,N,H,G,ee,te);return D(he,he,I([],ie))})(d,s,c,h,m,y,v,w);return[T[2]/T[8]/fi,T[5]/T[8]/fi]}function rN(d){return[d[0],Math.min(Math.max(d[1],-Be),Be)]}class gie extends a_{constructor(s,c,h,m){super(),this.id=s,this.dispatcher=h,this.coordinates=c.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.onNorthPole=!1,this.onSouthPole=!1,this.setEventedParent(m),this.options=c,this._dirty=!1}load(s,c){if(this._loaded=c||!1,this.fire(new Ip("dataloading",{dataType:"source"})),this.url=this.options.url,!this.url)return s&&(this.coordinates=s),this._loaded=!0,void this._finishLoading();this._imageRequest=ry(this.map._requestManager.transformRequest(this.url,ow.Image),(h,m)=>{this._imageRequest=null,this._loaded=!0,h?this.fire(new Zb(h)):m&&(this.image=m instanceof HTMLImageElement?uh.getImageData(m):m,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 c2(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 Ip("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 c2||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 c=s[0][1],h=s[0][1];for(let y of s)y[1]>h&&(h=y[1]),y[1]Be?this.onNorthPole=!0:m<-Be&&(this.onSouthPole=!0),!this.onNorthPole&&!this.onSouthPole){let y=s.map(At.fromLngLat);this.tileID=(function(v){let w=1/0,T=1/0,A=-1/0,M=-1/0;for(let ee of v)w=Math.min(w,ee.x),T=Math.min(T,ee.y),A=Math.max(A,ee.x),M=Math.max(M,ee.y);let O=Math.max(A-w,M-T),N=Math.max(0,Math.floor(-Math.log2(O))),H=Math.pow(2,N),G=Math.floor((w+A)/2*H);return G>1&&(G-=1),new rm(N,G,Math.floor((T+M)/2*H))})(y),this.minzoom=this.maxzoom=this.tileID.z}return this.fire(new Ip("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){!this.texture||this.texture instanceof c2||(this.texture.destroy(),this._dirty=!0),this.texture=null,this._boundsArray=void 0,this._unsupportedCoords=!1}_prepareData(s){for(let ie in this.tiles){let he=this.tiles[ie];he.state!=="loaded"&&(he.state="loaded",he.texture=this.texture)}if(this._boundsArray||this.onNorthPole||this.onSouthPole||this._unsupportedCoords)return;let c=y2(new rm(0,0,0),this.map.transform.projection),h=[c.projection.project(this.coordinates[0][0],this.coordinates[0][1]),c.projection.project(this.coordinates[1][0],this.coordinates[1][1]),c.projection.project(this.coordinates[2][0],this.coordinates[2][1]),c.projection.project(this.coordinates[3][0],this.coordinates[3][1])];if(!(function(ie){let he=ie[1].x-ie[0].x,me=ie[1].y-ie[0].y,ye=ie[2].x-ie[1].x,ze=ie[2].y-ie[1].y,Ve=ie[3].x-ie[2].x,qe=ie[3].y-ie[2].y,Ye=ie[0].x-ie[3].x,it=ie[0].y-ie[3].y,Ut=he*ze-ye*me,pt=ye*qe-Ve*ze,Gt=Ve*it-Ye*qe,ti=Ye*me-he*it;return Ut>0&&pt>0&&Gt>0&&ti>0||Ut<0&&pt<0&&Gt<0&&ti<0})(h))return console.warn("Image source coordinates are defining non-convex area in the Mercator projection"),void(this._unsupportedCoords=!0);let m=y2(this.tileID,this.map.transform.projection),[y,v,w,T]=this.coordinates.map(ie=>{let he=m.projection.project(ie[0],ie[1]);return iie(m,he)._round()});this.perspectiveTransform=fie(y.x,y.y,v.x,v.y,w.x,w.y,T.x,T.y);let A=this._boundsArray=new T_;A.emplaceBack(y.x,y.y,0,0),A.emplaceBack(v.x,v.y,fi,0),A.emplaceBack(T.x,T.y,0,fi),A.emplaceBack(w.x,w.y,fi,fi),this.boundsBuffer&&(this.boundsBuffer.destroy(),this.elevatedGlobeVertexBuffer&&this.elevatedGlobeVertexBuffer.destroy(),this.elevatedGlobeIndexBuffer&&this.elevatedGlobeIndexBuffer.destroy()),this.boundsBuffer=s.createVertexBuffer(A,GH.members),this.boundsSegments=Ds.simpleSegment(0,0,4,2);let M=[],O=[rN((N=this.coordinates)[0]),rN(N[1]),rN(N[2]),rN(N[3])];var N;let[H,G,ee,te]=(function(ie){let he=ie[0][0],me=he,ye=ie[0][1],ze=ye;for(let Ve=1;Veme&&(me=ie[Ve][0]),ie[Ve][1]ze&&(ze=ie[Ve][1]);return[he,ye,me-he,ze-ye]})(O);{let ie=new T_,[he,me,ye,ze]=(function(Nt){let Jt=Nt[0].x,It=Jt,xt=Nt[0].y,li=xt;for(let ni=1;niIt&&(It=Nt[ni].x),Nt[ni].yli&&(li=Nt[ni].y);return[Jt,xt,It-Jt,li-xt]})(h),Ve=Nt=>[(Nt.x-he)/ye,(Nt.y-me)/ze],[qe,Ye,it,Ut]=h.map(Ve),pt=(function(Nt,Jt,It,xt,li,ni,dn,Fi){let Zi=oN(0,0,1,0,1,1,0,1);return D(Zi,Zi,I([],oN(Nt,Jt,It,xt,li,ni,dn,Fi)))})(qe[0],qe[1],Ye[0],Ye[1],it[0],it[1],Ut[0],Ut[1]);this.elevatedGlobePerspectiveTransform=fie(qe[0],qe[1],Ye[0],Ye[1],it[0],it[1],Ut[0],Ut[1]);let Gt=(Nt,Jt)=>{M.push(Nt.lng);let It=Math.round((Nt.lng-H)/ee*fi),xt=Math.round((Nt.lat-G)/te*fi),li=Ve(Jt),ni=Fn([],[li[0],li[1],1],pt),dn=Math.round(ni[0]/ni[2]*fi),Fi=Math.round(ni[1]/ni[2]*fi);ie.emplaceBack(It,xt,dn,Fi)},ti=h[3].x-h[0].x,$t=h[3].y-h[0].y,Yt=h[2].x-h[1].x,si=h[2].y-h[1].y;for(let Nt=0;Nt<65;Nt++){let Jt=Nt/64,It=[h[0].x+Jt*ti,h[0].y+Jt*$t],xt=[h[1].x+Jt*Yt,h[1].y+Jt*si],li=xt[0]-It[0],ni=xt[1]-It[1];for(let dn=0;dn<65;dn++){let Fi=dn/64,Zi={x:It[0]+li*Fi,y:It[1]+ni*Fi};Gt(c.projection.unproject(Zi.x,Zi.y),Zi)}}this.elevatedGlobeVertexBuffer=s.createVertexBuffer(ie,GH.members)}{this.maxLongitudeTriangleSize=0;let ie=[],he=new Za,me=(ye,ze,Ve)=>{he.emplaceBack(ye,ze,Ve);let qe=M[ye],Ye=M[ze],it=M[Ve],Ut=Math.min(Math.min(qe,Ye),it),pt=Math.max(Math.max(qe,Ye),it)-Ut;pt>this.maxLongitudeTriangleSize&&(this.maxLongitudeTriangleSize=pt),ie.push(Ut+pt/2)};for(let ye=0;ye<64;ye++)for(let ze=0;ze<64;ze++){let Ve=65*ye+ze,qe=Ve+1,Ye=Ve+65,it=Ye+1;me(Ve,Ye,qe),me(qe,Ye,it)}[ie,he]=(function(ye,ze){let Ve=Array.from({length:ye.length},(it,Ut)=>Ut);Ve.sort((it,Ut)=>ye[it]-ye[Ut]);let qe=[],Ye=new Za;for(let it=0;it{v.segments.push({vertexOffset:0,primitiveOffset:O,vertexLength:c.segments[0].vertexLength,primitiveLength:N,sortKey:void 0,vaos:{}})},T=.51*this.maxLongitudeTriangleSize;if(Math.abs(h[0]-m)<=T){let O=zl(h,0,h.length,m+T);return O===h.length||w(O,us(h,O+1,h.length,m+360-T)-O),v}mc.fqid),this.projection=s.projection,this.index=s.index,this.worldview=s.worldview,this.hasZoomDependentProperties=this.layers[0].isZoomDependent(),this.stateDependentLayerIds=this.layers.filter(c=>c.isStateDependent()).map(c=>c.id),this.hasPattern=!1,this.instancesPerModel={},this.validForExaggeration=0,this.maxVerticalOffset=0,this.maxScale=0,this.maxHeight=0,this.lookupDim=this.zoom>this.canonical.z+1?0:this.zoom>this.canonical.z?256:this.zoom>15?75:100,this.instanceCount=0,this.terrainElevationMin=0,this.terrainElevationMax=0,this.validForDEMTile={id:null,timestamp:0},this.modelUris=[],this.modelsRequested=!1,this.activeReplacements=[],this.replacementUpdateTime=0,this.styleDefinedModelURLs=s.styleDefinedModelURLs}updateFootprints(s,c){}populate(s,c,h,m){this.tileToMeter=ft(h);let y=this.layers[0]._featureFilter.needGeometry;this.lookup=new Uint8Array(this.lookupDim*this.lookupDim);for(let{feature:v,id:w,index:T,sourceLayerIndex:A}of s){let M=w??(v.properties&&v.properties.hasOwnProperty("id")?v.properties.id:void 0),O=ri(v,y);if(!this.layers[0]._featureFilter.filter(new es(this.zoom,{worldview:this.worldview}),O,h))continue;let N={id:M,sourceLayerIndex:A,index:T,geometry:y?O.geometry:Ai(v,h,m),properties:v.properties,type:v.type,patterns:{}},H=this.addFeature(N,N.geometry,O);H&&c.featureIndex.insert(v,N.geometry,T,A,this.index,this.instancesPerModel[H].instancedDataArray.length,fi/32)}this.lookup=null}update(s,c,h,m){for(let y in this.instancesPerModel){let v=this.instancesPerModel[y];for(let w in s)v.idToFeaturesIndex.hasOwnProperty(w)&&(this.evaluate(v.features[v.idToFeaturesIndex[w]],s[w],v,!0),this.uploaded=!1)}this.maxHeight=0}updateZoomBasedPaintProperties(){if(!this.hasZoomDependentProperties)return!1;let s=!1;for(let c in this.instancesPerModel){let h=this.instancesPerModel[c];for(let m of h.features){let y=this.layers[0],v=m.feature,w=this.canonical,T=y.paint.get("model-rotation").evaluate(v,{},w),A=y.paint.get("model-scale").evaluate(v,{},w),M=y.paint.get("model-translation").evaluate(v,{},w);pe(m.rotation,T)&&pe(m.scale,A)&&pe(m.translation,M)||(this.evaluate(m,m.featureStates,h,!0),s=!0)}}return s}updateReplacement(s,c,h,m){if(c.updateTime===this.replacementUpdateTime)return!1;this.replacementUpdateTime=c.updateTime;let y=c.getReplacementRegionsForTile(s.toUnwrapped(),!0);if(kF(this.activeReplacements,y))return!1;this.activeReplacements=y;let v=!1;for(let w in this.instancesPerModel){let T=this.instancesPerModel[w],A=T.instancedDataArray;for(let M of T.features){let O=M.instancedDataOffset,N=M.instancedDataCount;for(let H=0;Hfi;ee=te?ee-fi:ee;let ie=Math.floor(ee),he=A.float32[G+1],me=!1;for(let ye of this.activeReplacements)if(!pee(ye,h,Sie.Model,m)&&!(ye.min.x>ie||ie>ye.max.x||ye.min.y>he||he>ye.max.y)&&(me=sH(gee(ie,he,s.canonical,ye.footprintTileId.canonical),ye.footprint),me))break;A.float32[G]=me?ee+fi:ee,v=v||me!==te}}}return v}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 c in this.instancesPerModel){let h=this.instancesPerModel[c];h.instancedDataArray.length<0||h.instancedDataArray.length===0||(h.instancedDataBuffer?h.instancedDataBuffer.updateData(h.instancedDataArray):h.instancedDataBuffer=s.createVertexBuffer(h.instancedDataArray,sSe.members,!0,void 0,this.instanceCount))}this.uploaded=!0}destroy(){for(let c in this.instancesPerModel){let h=this.instancesPerModel[c];h.instancedDataArray.length!==0&&h.instancedDataBuffer&&h.instancedDataBuffer.destroy()}let s=this.layers[0].modelManager;if(s&&this.modelUris&&this.modelsRequested)for(let c of this.modelUris)s.removeModel(c,"",!0)}addFeature(s,c,h){let m=this.layers[0],y=m.layout.get("model-id").evaluate(h,{},this.canonical);if(!y)return Ro(`modelId is not evaluated for layer ${m.id} and it is not going to get rendered.`),y;(qH(y,!1)||this.styleDefinedModelURLs[y]!==void 0)&&(this.modelUris.includes(y)||this.modelUris.push(y)),this.instancesPerModel[y]||(this.instancesPerModel[y]=new Tie);let v=this.instancesPerModel[y],w=v.instancedDataArray,T=new Iie(h,w.length);for(let A of c)for(let M of A){if(M.x<0||M.x>=fi||M.y<0||M.y>=fi)continue;if(this.lookupDim!==0){let N=(this.lookupDim-1)/fi,H=this.lookupDim*(M.y*N|0)+M.x*N|0;if(this.lookup){if(this.lookup[H]!==0)continue;this.lookup[H]=1}}this.instanceCount++;let O=w.length;w.resize(O+1),v.instancesEvaluatedElevation.push(0),w.float32[16*O]=M.x,w.float32[16*O+1]=M.y}return T.instancedDataCount=v.instancedDataArray.length-T.instancedDataOffset,T.instancedDataCount>0&&(s.id&&(v.idToFeaturesIndex[s.id]=v.features.length),v.features.push(T),this.evaluate(T,{},v,!1)),y}getModelUris(){return this.modelUris}evaluate(s,c,h,m){let y=this.layers[0],v=s.feature,w=this.canonical,T=s.rotation=y.paint.get("model-rotation").evaluate(v,c,w),A=s.scale=y.paint.get("model-scale").evaluate(v,c,w),M=s.translation=y.paint.get("model-translation").evaluate(v,c,w),O=y.paint.get("model-color").evaluate(v,c,w);O.a=y.paint.get("model-color-mix-intensity").evaluate(v,c,w);let N=[];this.maxVerticalOffset10?this.tileToMeter:ft(w,me)),ie[te+4]=M[0],ie[te+5]=M[1],ie[te+6]=M[2]+he,ie[te+7]=N[0],ie[te+8]=N[1],ie[te+9]=N[2],ie[te+10]=N[4],ie[te+11]=N[5],ie[te+12]=N[6],ie[te+13]=N[8],ie[te+14]=N[9],ie[te+15]=N[10],h.instancesEvaluatedElevation[ee]=M[2]}}}let Eie,Aie;Ui(WH,"ModelBucket",{omit:["layers"]}),Ui(Tie,"PerModelAttributes"),Ui(Iie,"ModelFeature");class TS{constructor(s,c,h){this._demTile=s,this._dem=this._demTile.dem,this._scale=c,this._offset=h}static create(s,c,h){let m=h||s.findDEMTileFor(c);if(!m||!m.dem)return;let y=m.dem,v=m.tileID,w=1<A.fqid),this.stateDependentLayerIds=this.layers.filter(A=>A.isStateDependent()).map(A=>A.id),this.modelTraits|=bS.CoordinateSpaceTile,this.uploaded=!1,this.hasPattern=!1,m&&(this.modelTraits|=bS.HasMapboxMeshFeatures),y&&(this.modelTraits|=bS.HasMeshoptCompression),this.zoom=-1,this.terrainExaggeration=1,this.projection={name:"mercator"},this.replacementUpdateTime=0,this.elevationReadFromZ=255,this.brightness=v,this.worldview=T,this.dirty=!0,this.needsUpload=!1,this.filter=null,this.nodesInfo=[];for(let A of c)this.nodesInfo.push(new Rie(A)),kie(A,w.featureIndexArray.length,w.grid),w.featureIndexArray.emplaceBack(this.nodesInfo.length-1,0,w.bucketLayerIDs.length-1,0);this.states={}}updateFootprints(s,c){for(let h of this.getNodesInfo()){let m=h.node;m.footprint&&c.push({footprint:m.footprint,id:s})}}update(s){let c=Object.keys(s).length!==0;if(c&&!this.stateDependentLayers.length)return;let h=c?this.stateDependentLayers:this.layers;if(!Zh(s,this.states))for(let m of h)this.evaluate(m,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 c=this.getNodesInfo();for(let h of c){let m=h.node;this.uploaded?this.updatePbrBuffer(m):xH(m,s,!0)}for(let h of c)UF(h.node);this.uploaded=!0,this.needsUpload=!1}updatePbrBuffer(s){let c=!1;if(!s.meshes)return c;for(let h of s.meshes)h.pbrBuffer&&(h.pbrBuffer.updateData(h.featureArray),c=!0);return c}needsReEvaluation(s,c,h){let m=s.transform.projectionOptions,y=s.style.getBrightness(),v=this.brightness!==y;if(!this.uploaded||this.dirty||m.name!==this.projection.name||w2(h.paint.get("model-color").value,v)||w2(h.paint.get("model-color-mix-intensity").value,v)||w2(h.paint.get("model-roughness").value,v)||w2(h.paint.get("model-emissive-strength").value,v)||w2(h.paint.get("model-height-based-emissive-strength-multiplier").value,v)){this.projection=m,this.brightness=y;let w=this.getNodesInfo();for(let T of w)T.state=null;return!0}return!1}evaluateTransform(s,c){if(s.transform.zoom===this.zoom)return;this.zoom=s.transform.zoom;let h=this.getNodesInfo(),m=this.id.canonical;for(let y of h){let v=y.feature;y.evaluatedTranslation=c.paint.get("model-translation").evaluate(v,{},m),y.evaluatedScale=c.paint.get("model-scale").evaluate(v,{},m)}}evaluate(s,c){let h=this.getNodesInfo();for(let m of h){if(!m.node.meshes)continue;let y=m.feature,v=c&&c[y.id];if(Zh(v,m.state))continue;m.state=structuredClone(v);let w=m.node.meshes&&m.node.meshes[0].featureData,T=m.evaluatedColor[2],A=m.evaluatedRMEA[2],M=this.id.canonical;if(m.hasTranslucentParts=!1,w){for(let O=0;O=Ve)continue;let Nt=KH[si],Jt=Math.abs(Nt);Jt>pt&&(Ut=Nt,pt=Jt,Gt=Yt,ti=$t)}if(pt>.1){let $t=1-(Ve+.5*Math.abs(Gt*ti))/G,Yt=c._dem.get(Ye,qe)+Ut*$t,si=c._dem.get(Ye+Gt,qe+ti),Nt=c._dem.get(Ye-Gt,qe-ti,!0);(Yt-si)*(Yt-Nt)>0&&(Yt=(si+Nt)/2),KH[it]=c._dem.set(Ye,qe,Yt),Mx[it]=Ve}}}}}w&&(c._demTile.needsDEMTextureUpload=!0,c._dem._timestamp=uh.now())}setFilter(s){this.filter=s?hx(s):null}getNodesInfo(){return this.filter?this.nodesInfo.filter(s=>this.filter.filter(new es(this.id.overscaledZ,{worldview:this.worldview}),s.feature,this.id.canonical)):this.nodesInfo}destroy(){let s=this.getNodesInfo();for(let c of s)UF(c.node),CH(c.node)}isEmpty(){return!this.nodesInfo.length}updateReplacement(s,c){if(c.updateTime===this.replacementUpdateTime)return;this.replacementUpdateTime=c.updateTime;let h=c.getReplacementRegionsForTile(s.toUnwrapped());for(let m of this.getNodesInfo()){let y=m.node.footprint;m.hiddenByReplacement=!!y&&!h.find(v=>v.footprint===y)}}getHeightAtTileCoord(s,c){let h=[],m=[0,0,0],y=R([]);for(let v of this.getNodesInfo()){let w=v.node.meshes[0],T=w.transformedAabb;if(sT.max[0]||c>T.max[1])continue;if(v.node.hidden===!0)return{height:1/0,maxHeight:v.feature.properties.height,hidden:!1,verticalScale:v.evaluatedScale[2]};j(y,v.node.matrix),m[0]=s,m[1]=c,Vn(m,m,y);let A=(m[0]-w.aabb.min[0])/(w.aabb.max[0]-w.aabb.min[0])*Ax|0,M=Math.min(63,(m[1]-w.aabb.min[1])/(w.aabb.max[1]-w.aabb.min[1])*Ax|0)*Ax+Math.min(63,A),O=w.heightmap[M];if(!(O<0&&v.node.footprint))return v.hiddenByReplacement?void 0:{height:O,maxHeight:v.feature.properties.height,hidden:!1,verticalScale:v.evaluatedScale[2]};if(v.node.footprint.grid.query(new ai(s,c),new ai(s,c),h),h.length>0)return{height:void 0,maxHeight:v.feature.properties.height,hidden:v.hiddenByReplacement,verticalScale:v.evaluatedScale[2]}}}}function w2(d,s){return d instanceof ux&&!d.isLightConstant&&s}function RIe(d,s,c,h,m,y,v,w){let T=(61440&s|(61440&s)>>4)>>8,A=(3840&s|(3840&s)>>4)>>4,M=240&s|(240&s)>>4;c[3]>0&&(T=En(T,255*c[0],c[3]),A=En(A,255*c[1],c[3]),M=En(M,255*c[2],c[3]));let O=T<<8|A,N=M<<8|Math.floor(255*h[3]),H=(function(Ve){let qe=Ue(Ve,0,2);return Math.min(Math.round(.5*qe*255),255)})(h[2])<<8|15*h[0]<<4|15*h[1],G=Ue(m[0],0,1),ee=Ue(m[1],0,1),te=Ue(m[2],0,1),ie=Ue(m[3],0,1),he,me,ye,ze;if(G!==ee&&v!==y&&ee!==G){let Ve=v-y;me=1/(Ve*(ee-G)),ye=-(y+Ve*G)/(Ve*(ee-G));let qe=Ue(m[4],-1,1);ze=Math.pow(10,qe),he=255*te<<8|255*ie}else he=65535,me=0,ye=1,ze=1;if(d.emplaceBack(O,N,H,he,me,ye,ze),w){let Ve=w.length;w.clear();for(let qe=0;qe>16&65535,M=y?T>>16&65535:65535&T,O=(15&M)<8?15&M:0,N=d.evaluatedRMEA[O],H=d.evaluatedColor[O],G=d.emissionHeightBasedParams[O],ee;if(w&&O===2&&h.lights&&(ee=new My,ee.resize(10*h.lights.length)),RIe(v.featureArray,A,H,N,G,v.aabb.min[2],v.aabb.max[2],ee),ee&&w){w=!1;let te=h.meshes[h.lightMeshIndex];te.featureArray=ee,te.featureArray._trim()}}v.featureArray._trim(),m++}}function Oie(d,s,c,h){let m=1<ye.polygon).flat());let te=H?w:null,[ie,he]=(function(ye,ze,Ve,qe,Ye,it,Ut,pt,Gt,ti,$t){return ye.projection.name==="globe"?(function(Yt,si,Nt,Jt,It,xt,li,ni,dn,Fi,Zi){let mi=[],ln=[],Bn=Yt.projection.upVectorScale(Zi,Yt.center.lat,Yt.worldSize).metersToTile,wi=[0,0,0,1],Ji=[0,0,0,1],Dn=(_o,io,$i,Xn)=>{_o[0]=io,_o[1]=$i,_o[2]=Xn,_o[3]=1},Kn=Aee();Nt>0&&(Nt+=Kn),Jt+=Kn;for(let _o of si){let io=[],$i=[];for(let Xn of _o){let zo=Xn.x+It.x,we=Xn.y+It.y,Ie=Yt.projection.projectTilePoint(zo,we,Zi),wt=Yt.projection.upVector(Zi,Xn.x,Xn.y),Vt=Nt,Ci=Jt;if(li){let bi=Nee(zo,we,Nt,Jt,li,ni,dn,Fi);Vt+=bi.base,Ci+=bi.top}Nt!==0?Dn(wi,Ie.x+wt[0]*Bn*Vt,Ie.y+wt[1]*Bn*Vt,Ie.z+wt[2]*Bn*Vt):Dn(wi,Ie.x,Ie.y,Ie.z),Dn(Ji,Ie.x+wt[0]*Bn*Ci,Ie.y+wt[1]*Bn*Ci,Ie.z+wt[2]*Bn*Ci),Vn(wi,wi,xt),Vn(Ji,Ji,xt),io.push(new Ex(wi[0],wi[1],wi[2])),$i.push(new Ex(Ji[0],Ji[1],Ji[2]))}mi.push(io),ln.push($i)}return[mi,ln]})(ye,ze,Ve,qe,Ye,it,Ut,pt,Gt,ti,$t):Ut?(function(Yt,si,Nt,Jt,It,xt,li,ni,dn){let Fi=[],Zi=[],mi=[0,0,0,1];for(let ln of Yt){let Bn=[],wi=[];for(let Ji of ln){let Dn=Ji.x+Jt.x,Kn=Ji.y+Jt.y,_o=Nee(Dn,Kn,si,Nt,xt,li,ni,dn);mi[0]=Dn,mi[1]=Kn,mi[2]=_o.base,mi[3]=1,Li(mi,mi,It),mi[3]=Math.max(mi[3],1e-5);let io=new Ex(mi[0]/mi[3],mi[1]/mi[3],mi[2]/mi[3]);mi[0]=Dn,mi[1]=Kn,mi[2]=_o.top,mi[3]=1,Li(mi,mi,It),mi[3]=Math.max(mi[3],1e-5);let $i=new Ex(mi[0]/mi[3],mi[1]/mi[3],mi[2]/mi[3]);Bn.push(io),wi.push($i)}Fi.push(Bn),Zi.push(wi)}return[Fi,Zi]})(ze,Ve,qe,Ye,it,Ut,pt,Gt,ti):(function(Yt,si,Nt,Jt,It){let xt=[],li=[],ni=It[8]*si,dn=It[9]*si,Fi=It[10]*si,Zi=It[11]*si,mi=It[8]*Nt,ln=It[9]*Nt,Bn=It[10]*Nt,wi=It[11]*Nt;for(let Ji of Yt){let Dn=[],Kn=[];for(let _o of Ji){let io=_o.x+Jt.x,$i=_o.y+Jt.y,Xn=It[0]*io+It[4]*$i+It[12],zo=It[1]*io+It[5]*$i+It[13],we=It[2]*io+It[6]*$i+It[14],Ie=It[3]*io+It[7]*$i+It[15],wt=Xn+ni,Vt=zo+dn,Ci=we+Fi,bi=Math.max(Ie+Zi,1e-5),ji=Xn+mi,gn=zo+ln,yo=we+Bn,vo=Math.max(Ie+wi,1e-5);Dn.push(new Ex(wt/bi,Vt/bi,Ci/bi)),Kn.push(new Ex(ji/vo,gn/vo,yo/vo))}xt.push(Dn),li.push(Kn)}return[xt,li]})(ze,Ve,qe,Ye,it)})(y,h,O,M,A,v,te,N,G,y.center.lat,d.tileID.canonical),me=d.queryGeometry;return(function(ye,ze,Ve){let qe=1/0;Td(Ve,ze)&&(qe=Fee(Ve,ze[0]));for(let Ye=0;Ye{if(u2)return u2;let c=vte();return u2=new OSe(c.paint.properties["line-width"].specification),u2.useIntegerZoom=!0,u2})().possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new TH(d)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getDefaultProgramParams(d,s,c){let h=_te(this);return{config:new D_(this,{zoom:s,lut:c}),defines:h,overrideFog:!1}}queryRadius(d){let s=d,c=bte(Op("line-width",this,s),Op("line-gap-width",this,s)),h=Op("line-offset",this,s);return c/2+Math.abs(h)+Rf(this.paint.get("line-translate"))}queryIntersectsFeature(d,s,c,h,m,y){if(d.queryGeometry.isAboveHorizon)return!1;let v=Of(d.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),y.angle,d.pixelToTileUnitsFactor),w=d.pixelToTileUnitsFactor/2*bte(this.paint.get("line-width").evaluate(s,c),this.paint.get("line-gap-width").evaluate(s,c)),T=this.paint.get("line-offset").evaluate(s,c);return T&&(h=(function(A,M){let O=[],N=new ai(0,0);for(let H=0;H=3){for(let G=0;G>16&255)/255,(d>>8&255)/255,(255&d)/255,1)}function KIe(d,s,c){d===1?(s.rgb_color=uN(c.readVarint()),s.paint="rgb_color"):d===2?(s.linear_gradient_idx=c.readVarint(),s.paint="linear_gradient_idx"):d===3?(s.radial_gradient_idx=c.readVarint(),s.paint="radial_gradient_idx"):d===5?c.readPackedFloat(s.dasharray):d===6?s.dashoffset=c.readFloat():d===7?s.miterlimit=c.readFloat():d===8?s.opacity=c.readVarint():d===9?s.width=c.readFloat():d===10?s.linecap=c.readVarint():d===11&&(s.linejoin=c.readVarint())}function ZIe(d,s,c){d===1?s.transform=dN(c,c.readVarint()+c.pos):d===2?s.spread_method=c.readVarint():d===3?s.stops.push(Nie(c,c.readVarint()+c.pos)):d===4?s.x1=c.readFloat():d===5?s.y1=c.readFloat():d===6?s.x2=c.readFloat():d===7&&(s.y2=c.readFloat())}function Nie(d,s){return d.readFields(YIe,{offset:0,opacity:255,rgb_color:ZH},s)}function YIe(d,s,c){d===1?s.offset=c.readFloat():d===2?s.opacity=c.readVarint():d===3&&(s.rgb_color=uN(c.readVarint()))}function QIe(d,s,c){d===1?s.transform=dN(c,c.readVarint()+c.pos):d===2?s.spread_method=c.readVarint():d===3?s.stops.push(Nie(c,c.readVarint()+c.pos)):d===4?s.cx=c.readFloat():d===5?s.cy=c.readFloat():d===6?s.r=c.readFloat():d===7?s.fx=c.readFloat():d===8?s.fy=c.readFloat():d===9&&(s.fr=c.readFloat())}function XIe(d,s,c){d===1?s.transform=dN(c,c.readVarint()+c.pos):d===2?s.clip_path_idx=c.readVarint():d===3&&s.children.push(cN(c,c.readVarint()+c.pos))}function JIe(d,s,c){d===1?s.left=s.top=c.readFloat():d===2?s.width=s.height=c.readFloat():d===3?s.top=c.readFloat():d===4?s.height=c.readFloat():d===5?s.mask_type=c.readVarint():d===6?s.mask_idx=c.readVarint():d===7&&s.children.push(cN(c,c.readVarint()+c.pos))}class eTe{static calculate(s={},c=[]){let h=new Map,m=new Map;if(Object.keys(s).length===0)return h;c.forEach(y=>{m.set(y.name,y.rgb_color||new Cr(0,0,0))});for(let[y,v]of Object.entries(s))m.has(y)?h.set(m.get(y).toString(),v):console.warn(`Ignoring unknown image variable "${y}"`);return h}}function ES(d,s=255,c){let h=s/255,m=d.toString(),y=c.has(m)?c.get(m).clone():d.clone();return y.a*=h,y.toString()}function I2(d,s){if(!NA()){let c=document.createElement("canvas");return c.width=d,c.height=s,c}return new OffscreenCanvas(d,s)}function tTe(d,s){let c=eTe.calculate(s.params,d.metadata?d.metadata.variables:[]),h=d.usvg_tree,m=h.width,y=h.height,v=s.transform?s.transform:new DOMMatrix,w=Math.max(1,Math.round(m*v.a)),T=Math.max(1,Math.round(y*v.d)),A=new DOMMatrix([w/m,0,0,T/y,0,0]),M=I2(w,T).getContext("2d");return XH(M,A,h,h,c),M.getImageData(0,0,w,T)}function XH(d,s,c,h,m){for(let y of h.children)Bie(d,s,c,y,m)}function Bie(d,s,c,h,m){h.group?(d.save(),(function(y,v,w,T,A){let M=T.mask_idx!=null?w.masks[T.mask_idx]:null,O=T.clip_path_idx!=null?w.clip_paths[T.clip_path_idx]:null;if(T.transform&&(v=AS(T.transform).preMultiplySelf(v)),!(function(G,ee,te){return G.opacity!==255||ee||te})(T,O!=null,M!=null))return void XH(y,v,w,T,A);let N=I2(y.canvas.width,y.canvas.height),H=N.getContext("2d");XH(H,v,w,T,A),O&&$ie(H,v,w,O),M&&qie(H,v,w,M,A),y.globalAlpha=T.opacity/255,y.drawImage(N,0,0)})(d,s,c,h.group,m),d.restore()):h.path&&(d.save(),(function(y,v,w,T,A){y.setTransform(v),T.paint_order===FIe.PAINT_ORDER_FILL_AND_STROKE?(zie(y,w,T,A),Uie(y,w,T,A)):(Uie(y,w,T,A),zie(y,w,T,A))})(d,s,c,h.path,m),d.restore())}function zie(d,s,c,h){let m=c.fill;if(!m)return;let y=m.opacity/255;switch(d.save(),d.beginPath(),Wie(c,d),m.paint){case"rgb_color":d.fillStyle=ES(m.rgb_color,m.opacity,h);break;case"linear_gradient_idx":{let v=s.linear_gradients[m.linear_gradient_idx];v.transform&&d.setTransform(AS(v.transform).preMultiplySelf(d.getTransform())),d.fillStyle=Hie(d,v,y,h);break}case"radial_gradient_idx":{let v=s.radial_gradients[m.radial_gradient_idx];v.transform&&d.setTransform(AS(v.transform).preMultiplySelf(d.getTransform())),d.fillStyle=jie(d,v,y,h)}}d.fill(Vie(c)),d.restore()}function Vie(d){return d.rule===YH.PATH_RULE_NON_ZERO?"nonzero":d.rule===YH.PATH_RULE_EVEN_ODD?"evenodd":void 0}function Uie(d,s,c,h){let m=c.stroke;if(!m)return;let y=Kie(c);d.lineWidth=m.width,d.miterLimit=m.miterlimit,d.setLineDash(m.dasharray),d.lineDashOffset=m.dashoffset;let v=m.opacity/255;switch(m.paint){case"rgb_color":d.strokeStyle=ES(m.rgb_color,m.opacity,h);break;case"linear_gradient_idx":d.strokeStyle=Hie(d,s.linear_gradients[m.linear_gradient_idx],v,h,!0);break;case"radial_gradient_idx":d.strokeStyle=jie(d,s.radial_gradients[m.radial_gradient_idx],v,h,!0)}switch(m.linejoin){case lN.LINE_JOIN_MITER_CLIP:case lN.LINE_JOIN_MITER:d.lineJoin="miter";break;case lN.LINE_JOIN_ROUND:d.lineJoin="round";break;case lN.LINE_JOIN_BEVEL:d.lineJoin="bevel"}switch(m.linecap){case QH.LINE_CAP_BUTT:d.lineCap="butt";break;case QH.LINE_CAP_ROUND:d.lineCap="round";break;case QH.LINE_CAP_SQUARE:d.lineCap="square"}d.stroke(y)}function Hie(d,s,c,h,m=!1){if(s.stops.length===1){let N=s.stops[0];return ES(N.rgb_color,N.opacity*c,h)}let{x1:y,y1:v,x2:w,y2:T}=s,A=new DOMPoint(y,v),M=new DOMPoint(w,T);if(m){let N=AS(s.transform);A=N.transformPoint(A),M=N.transformPoint(M)}let O=d.createLinearGradient(A.x,A.y,M.x,M.y);for(let N of s.stops)O.addColorStop(N.offset,ES(N.rgb_color,N.opacity*c,h));return O}function jie(d,s,c,h,m=!1){if(s.stops.length===1){let ie=s.stops[0];return ES(ie.rgb_color,ie.opacity*c,h)}let y=AS(s.transform),{fx:v,fy:w,fr:T,cx:A,cy:M,r:O}=s,N=new DOMPoint(v,w),H=new DOMPoint(A,M),G=T,ee=O;if(m){N=y.transformPoint(N),H=y.transformPoint(H);let ie=(y.a+y.d)/2;G=T*ie,ee=s.r*ie}let te=d.createRadialGradient(N.x,N.y,G,H.x,H.y,ee);for(let ie of s.stops)te.addColorStop(ie.offset,ES(ie.rgb_color,ie.opacity*c,h));return te}function Gie(d,s,c,h){let m=h.transform?AS(h.transform).preMultiplySelf(s):s,y=I2(d.canvas.width,d.canvas.height),v=y.getContext("2d");for(let T of h.children)if(T.group)Gie(v,m,c,T.group);else if(T.path){let A=T.path,M=new Path2D;M.addPath(Kie(A),m),v.fill(M,Vie(A))}let w=h.clip_path_idx!=null?c.clip_paths[h.clip_path_idx]:null;w&&$ie(v,m,c,w),d.globalCompositeOperation="source-over",d.drawImage(y,0,0)}function $ie(d,s,c,h){let m=I2(d.canvas.width,d.canvas.height);Gie(m.getContext("2d"),s,c,h),d.globalCompositeOperation="destination-in",d.drawImage(m,0,0)}function qie(d,s,c,h,m){if(h.children.length===0)return;let y=h.mask_idx!=null?c.masks[h.mask_idx]:null;y&&qie(d,s,c,y,m);let v=d.canvas.width,w=d.canvas.height,T=I2(v,w),A=T.getContext("2d"),M=h.width,O=h.height,N=h.left,H=h.top,G=new Path2D,ee=new Path2D;ee.rect(N,H,M,O),G.addPath(ee,s),A.clip(G);for(let he of h.children)Bie(A,s,c,he,m);let te=A.getImageData(0,0,v,w),ie=te.data;if(h.mask_type===Pie.MASK_TYPE_LUMINANCE)for(let he=0;hes[v])return null}else{let w=1/h[v],T=(d[v]-c[v])*w,A=(s[v]-c[v])*w;if(T>A){let M=T;T=A,A=M}if(T>m&&(m=T),Ay)return null}return m}function Qie(d,s,c,h,m,y,v,w,T,A,M){let O=h-d,N=m-s,H=y-c,G=v-d,ee=w-s,te=T-c,ie=M[1]*te-M[2]*ee,he=M[2]*G-M[0]*te,me=M[0]*ee-M[1]*G,ye=O*ie+N*he+H*me;if(Math.abs(ye)<1e-15)return null;let ze=1/ye,Ve=A[0]-d,qe=A[1]-s,Ye=A[2]-c,it=(Ve*ie+qe*he+Ye*me)*ze;if(it<0||it>1)return null;let Ut=qe*H-Ye*N,pt=Ye*O-Ve*H,Gt=Ve*N-qe*O,ti=(M[0]*Ut+M[1]*pt+M[2]*Gt)*ze;return ti<0||it+ti>1?null:(G*Ut+ee*pt+te*Gt)*ze}function Xie(d,s,c){return(d-s)/(c-s)}function Jie(d,s,c,h,m,y,v,w,T){let A=1<{let he=te?1:0,me=(H+1)*ee-he,ye=G*ee,ze=(G+1)*ee-he;ie[0]=H*ee,ie[1]=ye,ie[2]=me,ie[3]=ze},O=new Zie(T),N=[];for(let H=0;H=1;T/=2){let H=w[w.length-1];O=new Zie(T);for(let G=0;G0;){let{idx:G,t:ee,nodex:te,nodey:ie,depth:he}=H.pop();if(this.leaves[G]){Jie(te,ie,he,s,c,h,m,O,N);let ye=1<=si[2])return ee}continue}let me=0;for(let ye=0;ye=A[M[Ye]]&&(M.splice(Ye,0,ye),qe=!0);qe||(M[me]=ye),me++}}for(let ye=0;ye=this.dim+1||c<-1||c>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(c+1)*this.stride+(s+1)}static pack(s,c){let h=[0,0,0,0],m=hN.getUnpackVector(c),y=Math.floor((s+m[3])/m[2]);return h[2]=y%256,y=Math.floor(y/256),h[1]=y%256,y=Math.floor(y/256),h[0]=y,h}getPixels(){return new KJ({width:this.stride,height:this.stride},this.pixels)}backfillBorder(s,c,h){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");let m=c*this.dim,y=c*this.dim+this.dim,v=h*this.dim,w=h*this.dim+this.dim;switch(c){case-1:m=y-1;break;case 1:y=m+1}switch(h){case-1:v=w-1;break;case 1:w=v+1}let T=-c*this.dim,A=-h*this.dim;for(let M=v;M=1;h--){let m=h===1?1:0,y=h===2?1:0;for(let v=0;v>>1^-(1&d[s]);return d}function fTe(d,s){switch(s){case"uint32":return d;case"uint16":for(let c=0;c>4|(61440&h)>>8|(240&m)<<4|61440&m,d[c+1]=15&h|(3840&h)>>4|(15&m)<<8|(3840&m)<<4}return d;case"uint8":for(let c=0;c>6|(192&m)>>4|(192&y)>>2|192&v,d[c+1]=(48&h)>>4|(48&m)>>2|48&y|(48&v)<<2,d[c+2]=(12&h)>>2|12&m|(12&y)<<2|(12&v)<<4,d[c+3]=3&h|(3&m)<<2|(3&y)<<4|(3&v)<<6}return d;default:throw new Error(`Invalid pixel format, "${s}"`)}}Ui(hN,"DEMData"),Ui(ene,"DemMinMaxQuadTree",{omit:["dem"]});var Pp=Uint8Array,T2=Uint16Array,gTe=Int32Array,ine=new Pp([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]),nne=new Pp([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]),_Te=new Pp([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),one=function(d,s){for(var c=new T2(31),h=0;h<31;++h)c[h]=s+=1<>1|(21845&Ya)<<1;ane[Ya]=((65280&(DS=(61680&(DS=(52428&DS)>>2|(13107&DS)<<2))>>4|(3855&DS)<<4))>>8|(255&DS)<<8)>>1}var E2=function(d,s,c){for(var h=d.length,m=0,y=new T2(s);m>T]=A;return v},A2=new Pp(288);for(Ya=0;Ya<144;++Ya)A2[Ya]=8;for(Ya=144;Ya<256;++Ya)A2[Ya]=9;for(Ya=256;Ya<280;++Ya)A2[Ya]=7;for(Ya=280;Ya<288;++Ya)A2[Ya]=8;var lne=new Pp(32);for(Ya=0;Ya<32;++Ya)lne[Ya]=5;var bTe=E2(A2,9),xTe=E2(lne,5),e7=function(d){for(var s=d[0],c=1;cs&&(s=d[c]);return s},lm=function(d,s,c){var h=s/8|0;return(d[h]|d[h+1]<<8)>>(7&s)&c},t7=function(d,s){var c=s/8|0;return(d[c]|d[c+1]<<8|d[c+2]<<16)>>(7&s)},CTe=["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"],cm=function(d,s,c){var h=new Error(s||CTe[d]);if(h.code=d,Error.captureStackTrace&&Error.captureStackTrace(h,cm),!c)throw h;return h},wTe=new Pp(0),STe=typeof TextDecoder<"u"&&new TextDecoder;try{STe.decode(wTe,{stream:!0})}catch{}let ITe={gzip_data:"gzip"};class xh extends Error{constructor(s){super(s),this.name="MRTError"}}let TTe={0:"uint32",1:"uint32",2:"uint16",3:"uint8"},cne={uint32:1,uint16:2,uint8:4},ETe={uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array},i7;class mN{constructor(s=5){this.x=NaN,this.y=NaN,this.z=NaN,this.layers={},this._cacheSize=s}getLayer(s){let c=this.layers[s];if(!c)throw new xh(`Layer '${s}' not found`);return c}getHeaderLength(s){let c=new Uint8Array(s),h=new DataView(s);if(c[0]!==13)throw new xh("File is not a valid MRT.");return h.getUint32(1,!0)}parseHeader(s){let c=new Uint8Array(s),h=this.getHeaderLength(s);if(c.length= ${h} but got buffer of length ${c.length}`);let m=new i7(c.subarray(0,h)).readFields(rTe,{headerLength:0,x:0,y:0,z:0,layers:[]},void 0);if(!isNaN(this.x)&&(this.x!==m.x||this.y!==m.y||this.z!==m.z))throw new xh(`Invalid attempt to parse header ${m.z}/${m.x}/${m.y} for tile ${this.z}/${this.x}/${this.y}`);this.x=m.x,this.y=m.y,this.z=m.z;for(let y of m.layers)this.layers[y.name]=new dne(y,{cacheSize:this._cacheSize});return this}createDecodingTask(s){let c=[],h=this.getLayer(s.layerName);for(let m of s.blockIndices){let y=h.dataIndex[m],v=y.firstByte-s.firstByte,w=y.lastByte-s.firstByte;if(h._blocksInProgress.has(m))continue;let T={layerName:h.name,firstByte:v,lastByte:w,pixelFormat:h.pixelFormat,blockIndex:m,blockShape:[y.bands.length].concat(h.bandShape),buffer:h.buffer,codec:y.codec.codec,filters:y.filters.map(A=>A.filter)};h._blocksInProgress.add(m),c.push(T)}return new une(c,()=>{c.forEach(m=>h._blocksInProgress.delete(m.blockIndex))},(m,y)=>{if(c.forEach(v=>h._blocksInProgress.delete(v.blockIndex)),m)throw m;y.forEach(v=>{this.getLayer(v.layerName).processDecodedData(v)})})}}class dne{constructor({version:s,name:c,units:h,tileSize:m,pixelFormat:y,buffer:v,dataIndex:w},T){if(this.version=s,this.version!==1)throw new xh(`Cannot parse raster layer encoded with MRT version ${s}`);this.name=c,this.units=h,this.tileSize=m,this.buffer=v,this.pixelFormat=TTe[y],this.dataIndex=w,this.bandShape=[m+2*v,m+2*v,cne[this.pixelFormat]],this._decodedBlocks=new pN(T?T.cacheSize:5),this._blocksInProgress=new Set}get dimension(){return cne[this.pixelFormat]}get cacheSize(){return this._decodedBlocks.capacity}getBandList(){return this.dataIndex.map(({bands:s})=>s).flat()}processDecodedData(s){let c=s.blockIndex.toString();this._decodedBlocks.get(c)||this._decodedBlocks.put(c,s.data)}getBlockForBand(s){let c=0;switch(typeof s){case"string":for(let[h,m]of this.dataIndex.entries()){for(let[y,v]of m.bands.entries())if(v===s)return{bandIndex:c+y,blockIndex:h,blockBandIndex:y};c+=m.bands.length}break;case"number":for(let[h,m]of this.dataIndex.entries()){if(s>=c&&sthis.cacheSize)throw new xh(`Number of blocks to decode (${y.size}) exceeds cache size (${this.cacheSize}).`);return{layerName:this.name,firstByte:c,lastByte:h,blockIndices:m}}hasBand(s){let{blockIndex:c}=this.getBlockForBand(s);return c>=0}hasDataForBand(s){let{blockIndex:c}=this.getBlockForBand(s);return c>=0&&!!this._decodedBlocks.get(c.toString())}getBandView(s){let{blockIndex:c,blockBandIndex:h}=this.getBlockForBand(s);if(c<0)throw new xh(`Band not found: ${JSON.stringify(s)}`);let m=this._decodedBlocks.get(c.toString());if(!m)throw new xh(`Data for band ${JSON.stringify(s)} of layer "${this.name}" not decoded.`);let y=this.dataIndex[c],v=this.bandShape.reduce((A,M)=>A*M,1),w=h*v,T=m.subarray(w,w+v);return{data:T,bytes:new Uint8Array(T.buffer).subarray(T.byteOffset,T.byteOffset+T.byteLength),tileSize:this.tileSize,buffer:this.buffer,pixelFormat:this.pixelFormat,dimension:this.dimension,offset:y.offset,scale:y.scale}}}mN.setPbf=function(d){i7=d};class une{constructor(s,c,h){this.tasks=s,this._onCancel=c,this._onComplete=h,this._finalized=!1}cancel(){this._finalized||(this._onCancel(),this._finalized=!0)}complete(s,c){this._finalized||(this._onComplete(s,c),this._finalized=!0)}}mN.performDecoding=function(d,s){let c=new Uint8Array(d);return Promise.all(s.tasks.map(h=>{let{layerName:m,firstByte:y,lastByte:v,pixelFormat:w,blockShape:T,blockIndex:A,filters:M,codec:O}=h,N=c.subarray(y,v+1),H=new Uint32Array(T[0]*T[1]*T[2]),G;if(O!=="gzip_data")throw new xh(`Unhandled codec: ${O}`);return G=(function(ee,te){if(!globalThis.DecompressionStream&&te==="gzip_data")return Promise.resolve(((ye=(function(qe){qe[0]==31&&qe[1]==139&&qe[2]==8||cm(6,"invalid gzip data");var Ye=qe[3],it=10;4&Ye&&(it+=2+(qe[10]|qe[11]<<8));for(var Ut=(Ye>>3&1)+(Ye>>4&1);Ut>0;Ut-=!qe[it++]);return it+(2&Ye)})(me=ee))+8>me.length&&cm(6,"invalid gzip data"),(function(qe,Ye,it,Ut){var pt=qe.length;if(!pt||Ye.f&&!Ye.l)return it||new Pp(0);var Gt=!it,ti=Gt||Ye.i!=2,$t=Ye.i;Gt&&(it=new Pp(3*pt));var Yt,si,Nt=function(ss){var as=it.length;if(ss>as){var Jr=new Pp(Math.max(2*as,ss));Jr.set(it),it=Jr}},Jt=Ye.f||0,It=Ye.p||0,xt=Ye.b||0,li=Ye.l,ni=Ye.d,dn=Ye.m,Fi=Ye.n,Zi=8*pt;do{if(!li){Jt=lm(qe,It,1);var mi=lm(qe,It+1,3);if(It+=3,!mi){var ln=qe[(we=4+((It+7)/8|0))-4]|qe[we-3]<<8,Bn=we+ln;if(Bn>pt){$t&&cm(0);break}ti&&Nt(xt+ln),it.set(qe.subarray(we,Bn),xt),Ye.b=xt+=ln,Ye.p=It=8*Bn,Ye.f=Jt;continue}if(mi==1)li=bTe,ni=xTe,dn=9,Fi=5;else if(mi==2){var wi=lm(qe,It,31)+257,Ji=lm(qe,It+10,15)+4,Dn=wi+lm(qe,It+5,31)+1;It+=14;for(var Kn=new Pp(Dn),_o=new Pp(19),io=0;io>4)<16)Kn[io++]=we;else{var wt=0,Vt=0;for(we==16?(Vt=3+lm(qe,It,3),It+=2,wt=Kn[io-1]):we==17?(Vt=3+lm(qe,It,7),It+=3):we==18&&(Vt=11+lm(qe,It,127),It+=7);Vt--;)Kn[io++]=wt}}var Ci=Kn.subarray(0,wi),bi=Kn.subarray(wi);dn=e7(Ci),Fi=e7(bi),li=E2(Ci,dn),ni=E2(bi,Fi)}else cm(1);if(It>Zi){$t&&cm(0);break}}ti&&Nt(xt+131072);for(var ji=(1<>4;if((It+=15&wt)>Zi){$t&&cm(0);break}if(wt||cm(2),vo<256)it[xt++]=vo;else{if(vo==256){yo=It,li=null;break}var ho=vo-254;vo>264&&(ho=lm(qe,It,(1<<(uo=ine[io=vo-257]))-1)+sne[io],It+=uo);var Tr=ni[t7(qe,It)&gn],xs=Tr>>4;if(Tr||cm(3),It+=15&Tr,bi=vTe[xs],xs>3){var uo=nne[xs];bi+=t7(qe,It)&(1<Zi){$t&&cm(0);break}ti&&Nt(xt+131072);var ts=xt+ho;if(xtYt.length)&&(si=Yt.length),new Pp(Yt.subarray(0,si))):it.subarray(0,xt)})(me.subarray(ye,-8),{i:2},new Pp(((ie=me)[(he=ie.length)-4]|ie[he-3]<<8|ie[he-2]<<16|ie[he-1]<<24)>>>0))));var ie,he,me,ye;let ze=ITe[te];if(!ze)throw new Error(`Unhandled codec: ${te}`);let Ve=new globalThis.DecompressionStream(ze);return new Response(new Blob([ee]).stream().pipeThrough(Ve)).arrayBuffer().then(qe=>new Uint8Array(qe))})(N,O).then(ee=>((function(te,ie){te.readFields(uTe,ie)})(new i7(ee),H),new ETe[w](H.buffer))),G.then(ee=>{for(let te=M.length-1;te>=0;te--)switch(M[te]){case"delta_filter":hTe(ee,T);break;case"zigzag_filter":mTe(ee);break;case"bitshuffle_filter":fTe(ee,w);break;default:throw new xh(`Unhandled filter "${M[te]}"`)}return{layerName:m,blockIndex:A,data:ee}}).catch(ee=>{throw ee})}))},Ui(une,"MRTDecodingBatch",{omit:["_onCancel","_onComplete"]}),Ui(mN,"MapboxRasterTile"),Ui(dne,"MapboxRasterLayer",{omit:["_blocksInProgress"]});class pne{constructor(s){this._stringToNumber={},this._numberToString=[];for(let c=0;c=0&&N[3]>=0&&A.insert(T,N[0],N[1],N[2],N[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new Nn(new HF(this.rawTileData)).layers,this.sourceLayerCoder=new pne(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(let s in this.vtLayers)this.vtFeatures[s]=[]}return this.vtLayers}query(s,c){let{tilespaceGeometry:h,transform:m,tileTransform:y,pixelPosMatrix:v,availableImages:w,worldview:T}=c;this.loadVTLayers(),this.serializedLayersCache.clear();let A=h.bufferedTilespaceBounds,M=this.grid.query(A.min.x,A.min.y,A.max.x,A.max.y,(G,ee,te,ie)=>da(h.bufferedTilespaceGeometry,G,ee,te,ie));M.sort(DTe);let O=null;m.elevation&&M.length>0&&(O=TS.create(m.elevation,this.tileID));let N={},H;for(let G=0;G(ie||(ie=Ai(he,this.tileID.canonical,y)),me.queryIntersectsFeature(h,he,ye,ie,this.z,m,v,O,ze)))}return N}loadMatchingFeature(s,c,h,m,y,v){let{featureIndex:w,bucketIndex:T,sourceLayerIndex:A,layoutVertexArrayOffset:M}=c,O=this.bucketLayerIDs[T],N=h.layers,H=Object.keys(N);if(H.length&&!No(H,O))return;let G=h.sourceCache,ee=this.sourceLayerCoder.decode(A),te=this.vtLayers[ee].feature(w),ie=this.getId(te,ee);for(let he=0;he`${w.key}: ${w.message}`).join(", ");return void Ro(`Failed to create expression for promoteId: ${v}`)}this.promoteIdExpression=y.value}this.promoteIdExpression._evaluator||(this.promoteIdExpression._evaluator=new Xh),h=this.promoteIdExpression.evaluate({zoom:0},s)}else h=s.properties[m];typeof h=="boolean"&&(h=Number(h))}return h}}function mne(d,s,c,h,m){return Hn(d,(y,v)=>{let w=s instanceof w_?s.get(v):null;return w&&w.evaluate?w.evaluate(c,h,void 0,m):w})}function DTe(d,s){return s-d}Ui(hne,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});let fne=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class n7{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[c,h]=new Uint8Array(s,0,2);if(c!==219)throw new Error("Data does not appear to be in a KDBush format.");let m=h>>4;if(m!==1)throw new Error(`Got v${m} data when expected v1.`);let y=fne[15&h];if(!y)throw new Error("Unrecognized array type.");let[v]=new Uint16Array(s,2,1),[w]=new Uint32Array(s,4,1);return new n7(w,v,y,s)}constructor(s,c=64,h=Float64Array,m){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+c,2),65535),this.ArrayType=h,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;let y=fne.indexOf(this.ArrayType),v=2*s*this.ArrayType.BYTES_PER_ELEMENT,w=s*this.IndexArrayType.BYTES_PER_ELEMENT,T=(8-w%8)%8;if(y<0)throw new Error(`Unexpected typed array class: ${h}.`);m&&m instanceof ArrayBuffer?(this.data=m,this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+w+T,2*s),this._pos=2*s,this._finished=!0):(this.data=new ArrayBuffer(8+v+w+T),this.ids=new this.IndexArrayType(this.data,8,s),this.coords=new this.ArrayType(this.data,8+w+T,2*s),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+y]),new Uint16Array(this.data,2,1)[0]=c,new Uint32Array(this.data,4,1)[0]=s)}add(s,c){let h=this._pos>>1;return this.ids[h]=h,this.coords[this._pos++]=s,this.coords[this._pos++]=c,h}finish(){let s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return o7(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,c,h,m){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:y,coords:v,nodeSize:w}=this,T=[0,y.length-1,0],A=[];for(;T.length;){let M=T.pop()||0,O=T.pop()||0,N=T.pop()||0;if(O-N<=w){for(let te=N;te<=O;te++){let ie=v[2*te],he=v[2*te+1];ie>=s&&ie<=h&&he>=c&&he<=m&&A.push(y[te])}continue}let H=N+O>>1,G=v[2*H],ee=v[2*H+1];G>=s&&G<=h&&ee>=c&&ee<=m&&A.push(y[H]),(M===0?s<=G:c<=ee)&&(T.push(N),T.push(H-1),T.push(1-M)),(M===0?h>=G:m>=ee)&&(T.push(H+1),T.push(O),T.push(1-M))}return A}within(s,c,h){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:m,coords:y,nodeSize:v}=this,w=[0,m.length-1,0],T=[],A=h*h;for(;w.length;){let M=w.pop()||0,O=w.pop()||0,N=w.pop()||0;if(O-N<=v){for(let te=N;te<=O;te++)_ne(y[2*te],y[2*te+1],s,c)<=A&&T.push(m[te]);continue}let H=N+O>>1,G=y[2*H],ee=y[2*H+1];_ne(G,ee,s,c)<=A&&T.push(m[H]),(M===0?s-h<=G:c-h<=ee)&&(w.push(N),w.push(H-1),w.push(1-M)),(M===0?s+h>=G:c+h>=ee)&&(w.push(H+1),w.push(O),w.push(1-M))}return T}}function o7(d,s,c,h,m,y){if(m-h<=c)return;let v=h+m>>1;gne(d,s,v,h,m,y),o7(d,s,c,h,v-1,1-y),o7(d,s,c,v+1,m,1-y)}function gne(d,s,c,h,m,y){for(;m>h;){if(m-h>600){let A=m-h+1,M=c-h+1,O=Math.log(A),N=.5*Math.exp(2*O/3),H=.5*Math.sqrt(O*N*(A-N)/A)*(M-A/2<0?-1:1);gne(d,s,c,Math.max(h,Math.floor(c-M*N/A+H)),Math.min(m,Math.floor(c+(A-M)*N/A+H)),y)}let v=s[2*c+y],w=h,T=m;for(D2(d,s,h,c),s[2*m+y]>v&&D2(d,s,h,m);wv;)T--}s[2*h+y]===v?D2(d,s,h,T):(T++,D2(d,s,T,m)),T<=c&&(h=T+1),c<=T&&(m=T-1)}}function D2(d,s,c,h){r7(d,c,h),r7(s,2*c,2*h),r7(s,2*c+1,2*h+1)}function r7(d,s,c){let h=d[s];d[s]=d[c],d[c]=h}function _ne(d,s,c,h){let m=d-c,y=s-h;return m*m+y*y}r.$=ZA,r.A=Ep,r.B=Iy,r.C=2,r.D=gS,r.E=a_,r.F=f2,r.G=Hte,r.H=KA,r.I=ru,r.J=Qw,r.K=Ln,r.L=ix,r.M=Vw,r.N=zw,r.O=xD,r.P=ai,r.Q=wD,r.R=ow,r.S=S_,r.T=yH,r.U=mh,r.V=sN,r.W=SD,r.X=_y,r.Y=gy,r.Z=Ew,r._=$c,r.a=function(d){return _c.API_CDN_URL_REGEX.test(d)},r.a$=Me,r.a0=tx,r.a1=GA,r.a2=Xw,r.a3=class extends sN{},r.a4=Uw,r.a5=bD,r.a6=ut,r.a7=function(d){let s=d.value;return s?tx(s)?qH(s,!0)?[]:[new sN(d.key,s,`invalid url "${s}"`)]:[new sN(d.key,s,`string expected, "${Ln(s)}" found`)]:[]},r.a8=XL,r.a9=Bs,r.aA=Ue,r.aB=$,r.aC=Li,r.aD=g,r.aE=ll,r.aF=xe,r.aG=vt,r.aH=function(d,s){let c={};for(let h=0;h{h(y,v)},s):h(y,v),()=>{}}return m.callbacks.push(h),m.cancel||(m.cancel=c((y,v)=>{m.result=[y,v];for(let w of m.callbacks)this.scheduler?this.scheduler.add(()=>{w(y,v)},s):w(y,v);setTimeout(()=>delete this.entries[d],3e3)})),()=>{m.result||(m.callbacks=m.callbacks.filter(y=>y!==h),m.callbacks.length||(m.cancel(),delete this.entries[d]))}}},r.aL=function(d,s,c){let h=JSON.stringify(d.request);return d.data&&(this.deduped.entries[h]={result:[null,d.data]}),this.deduped.request(h,{type:"parseTile",isSymbolTile:d.isSymbolTile,zoom:d.tileZoom},m=>{let y=oy(d.request,(v,w,T,A)=>{v?m(v):w&&m(null,{vectorTile:c?void 0:new Nn(new HF(w)),rawData:w,cacheControl:T,expires:A})});return()=>{y.cancel(),m()}},s)},r.aM=function(d){mf++,mf>Qh&&(d.getActor().send("enforceCacheSizeLimit",wp),mf=0)},r.aN=function(d){return d<=1?1:Math.pow(2,Math.floor(Math.log2(d)))},r.aO=Kc,r.aP=_ie,r.aQ=wie,r.aR=J,r.aS=gie,r.aT=function(d,s){let c=document.createElement("video");c.muted=!0,c.onloadstart=function(){s(null,c)};for(let h=0;h{}}},r.aU=c2,r.aV=function(d){return fetch(d).then(s=>s.arrayBuffer()).then(s=>Wee(s,0,d))},r.aW=tte,r.aX=class{constructor(d,s,c,h){this.id=d,this.position=s!=null?new J(s[0],s[1]):new J(0,0),this.orientation=c??[0,0,0],this.nodes=h,this.uploaded=!1,this.aabb=new Rn([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),this.matrix=[]}_applyTransformations(d,s){if($(d.matrix,s,d.matrix),d.meshes)for(let c of d.meshes){let h=Rn.applyTransformFast(c.aabb,d.matrix);this.aabb.encapsulate(h)}if(d.children)for(let c of d.children)this._applyTransformations(c,d.matrix)}computeBoundsAndApplyParent(){let d=R([]);for(let s of this.nodes)this._applyTransformations(s,d)}computeModelMatrix(d,s,c,h,m,y,v=!1){Jee(this.matrix,this,d.transform,this.position,s,c,h,m,y,v)}upload(d){if(!this.uploaded){for(let s of this.nodes)xH(s,d);for(let s of this.nodes)UF(s);this.uploaded=!0}}destroy(){for(let d of this.nodes)CH(d)}},r.aY=Pn,r.aZ=y2,r.a_=Ne,r.aa=ci,r.ab=class{constructor(d){this.specification=d}possiblyEvaluate(d,s){return Fa(d.expression.evaluate(s))}interpolate(d,s,c){return{x:En(d.x,s.x,c),y:En(d.y,s.y,c),z:En(d.z,s.z,c),azimuthal:En(d.azimuthal,s.azimuthal,c),polar:En(d.polar,s.polar,c)}}},r.ac=es,r.ad=wf,r.ae=At,r.af=Vn,r.ag=ht,r.ah=Tt,r.ai=w_,r.aj=Py,r.ak=En,r.al=fi,r.am=qA,r.an=dt,r.ao=Cr,r.ap=class{constructor(d){this.specification=d}possiblyEvaluate(d,s){return(function([c,h]){let m=Fa([1,c,h]);return{x:m.x,y:m.y,z:m.z}})(d.expression.evaluate(s))}interpolate(d,s,c){return{x:En(d.x,s.x,c),y:En(d.y,s.y,c),z:En(d.z,s.z,c)}}},r.aq=function(d,s,c=0,h=!0){let m=new ai(c,c),y=d.sub(m),v=s.add(m),w=[y,new ai(v.x,y.y),v,new ai(y.x,v.y)];return h&&w.push(y.clone()),w},r.ar=function(d,s){let c=[];for(let h=0;h0&&c[0]<=d.width&&c[1]>0&&c[1]<=d.height&&!Z8(d,new J(d.center.lat,90)),h[0]>0&&h[0]<=d.width&&h[1]>0&&h[1]<=d.height&&!Z8(d,new J(d.center.lat,-90))]},r.cM=function(d,s){let{scale:c}=d.tileTransform,h=c*fi/(d.tileSize*Math.pow(2,s.zoom-d.tileID.overscaledZ+d.tileID.canonical.z));return(function(m,y,v){var w=y[1],T=y[2],A=y[3],M=v[0],O=v[1];return m[0]=y[0]*M,m[1]=w*M,m[2]=T*O,m[3]=A*O,m})(new Float32Array(4),s.inverseAdjustmentMatrix,[h,h])},r.cN=zF,r.cO=je,r.cP=Kee,r.cQ=function(d){let s=Kee(d,!0);return f([],[s[0],s[1],s[4],s[5]])},r.cR=Q,r.cS=pr,r.cT=se,r.cU=function(d){let{x:s,y:c}=d.point,{lng:h,lat:m}=d._center;return LJ(s,c,d.worldSize,h,m)},r.cV=Bi,r.cW=oe,r.cX=hS,r.cY=tc,r.cZ=b,r.c_=function(d,s,c){let h=0;for(let m=0;m<2;++m)d[m]>0&&(h+=(d[m]-0)*(d[m]-0)),s[m]<0&&(h+=(0-s[m])*(0-s[m]));return h},r.ca=function(d,s){return d[0]=-s[0],d[1]=-s[1],d[2]=-s[2],d[3]=s[3],d},r.cb=be,r.cc=function(d,s,c,h,m){var y=1/Math.tan(s/2);if(d[0]=y/c,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=y,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=-1,d[12]=0,d[13]=0,d[15]=0,m!=null&&m!==1/0){var v=1/(h-m);d[10]=(m+h)*v,d[14]=2*m*h*v}else d[10]=-1,d[14]=-2*h;return d},r.cd=function(d,s,c,h,m,y,v){var w=1/(s-c),T=1/(h-m),A=1/(y-v);return d[0]=-2*w,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=-2*T,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=2*A,d[11]=0,d[12]=(s+c)*w,d[13]=(m+h)*T,d[14]=(v+y)*A,d[15]=1,d},r.ce=ke,r.cf=function(d,s,c){d[4*s+0]=c[0],d[4*s+1]=c[1],d[4*s+2]=c[2],d[4*s+3]=c[3]},r.cg=xx,r.ch=Cx,r.ci=ca,r.cj=_h,r.ck=Sx,r.cl=aie,r.cm=function(){var d=new p(4);return p!=Float32Array&&(d[1]=0,d[2]=0),d[0]=1,d[3]=1,d},r.cn=function(d,s,c){var h=s[0],m=s[1],y=s[2],v=s[3],w=Math.sin(c),T=Math.cos(c);return d[0]=h*T+y*w,d[1]=m*T+v*w,d[2]=h*-w+y*T,d[3]=m*-w+v*T,d},r.co=function(d,s){return d[0]===s[0]&&d[1]===s[1]&&d[2]===s[2]&&d[3]===s[3]},r.cp=pe,r.cq=function(d){var s=d[0],c=d[1],h=d[2],m=d[3];return Math.sqrt(s*s+c*c+h*h+m*m)},r.cr=ha,r.cs=Lo,r.ct=pS,r.cu=3,r.cv=2,r.cw=7,r.cx=6,r.cy=An,r.cz=st,r.d=function(d){return _c.API_TILEJSON_REGEX.test(d)},r.d$=_te,r.d0=_e,r.d1=45,r.d2=wx,r.d3=function(d,s,c){let h=Math.sqrt(d*d+s*s+c*c),m=h>0?Math.acos(c/h)*J0:0,y=d!==0||s!==0?Math.atan2(-s,-d)*J0+90:0;return y<0&&(y+=360),[h,y,m]},r.d4=ue,r.d5=Fa,r.d6=ft,r.d7=ki,r.d8=Rn,r.d9=zt,r.dA=function(d,s,c){let h=Py(c.zoom),m=d.style.map._antialias,y=d.terrain&&d.terrain.exaggeration()>0;return h===0&&!m&&!y},r.dB=function(d){let s=d.pixelsPerMeter,c=s/ke(1,d.center.lat),h=R(new Float64Array(16));return W(h,h,[d.point.x,d.point.y,0]),Q(h,h,[c,c,s]),Float32Array.from(h)},r.dC=CF,r.dD=function(d){let s=Be-5;d=Ue(d,-s,s)/s*90;let c=Math.pow(Math.abs(Math.sin(dt(d))),3);return Math.round(c*(k.length-1))},r.dE=function(d,s,c,h){let m=s.getNorth(),y=s.getSouth(),v=s.getWest(),w=s.getEast(),T=1<0){let G=180/h;D(H,H,[G/A+1,0,0,0,G/M+1,0,-.5*G/O,.5*G/N,1])}return H[2]=T,H[5]=d.x,H[8]=d.y,H},r.dF=Pf,r.dG=function(d,s,c){let h=R(new Float64Array(16)),m=(s/(1<1)return!1;let c=s.getSource().maxzoom,h=1<1)return s;let m=h.getSource().maxzoom,y=1<{let y=this.getAtTileOffset(d,m.x,m.y),v=h.upVector(d.canonical,m.x,m.y);return _t(v,v,y*h.upVectorScale(d.canonical,s,c).metersToTile),v}}getForTilePoints(d,s,c,h){if(this.isUsingMockSource())return!1;let m=TS.create(this,d,h);return!!m&&(s.forEach(y=>{y[2]=this.exaggeration()*m.getElevationAt(y[0],y[1],c)}),!0)}getMinMaxForTile(d){if(this.isUsingMockSource())return null;let s=this.findDEMTileFor(d);if(!s||!s.dem)return null;let c=s.dem.tree,h=s.tileID,m=1<({u_matrix:new Sx(d),u_texsize:new _h(d),u_pixels_to_tile_units:new uS(d),u_device_pixel_ratio:new ca(d),u_width_scale:new ca(d),u_floor_width_scale:new ca(d),u_image:new xx(d),u_units_to_pixels:new _h(d),u_tile_units_to_pixels:new ca(d),u_alpha_discard_threshold:new ca(d),u_trim_offset:new _h(d),u_trim_fade_range:new _h(d),u_trim_color:new wx(d),u_emissive_strength:new ca(d),u_zbias_factor:new ca(d),u_tile_to_meter:new ca(d),u_ground_shadow_factor:new Cx(d),u_pattern_transition:new ca(d)}),r.dU=d=>({u_matrix:new Sx(d),u_pixels_to_tile_units:new uS(d),u_device_pixel_ratio:new ca(d),u_width_scale:new ca(d),u_floor_width_scale:new ca(d),u_units_to_pixels:new _h(d),u_dash_image:new xx(d),u_gradient_image:new xx(d),u_image_height:new ca(d),u_texsize:new _h(d),u_tile_units_to_pixels:new ca(d),u_alpha_discard_threshold:new ca(d),u_trim_offset:new _h(d),u_trim_fade_range:new _h(d),u_trim_color:new wx(d),u_emissive_strength:new ca(d),u_zbias_factor:new ca(d),u_tile_to_meter:new ca(d),u_ground_shadow_factor:new Cx(d)}),r.dV=d=>({u_camera_to_center_distance:new ca(d),u_extrude_scale:new uS(d),u_device_pixel_ratio:new ca(d),u_matrix:new Sx(d),u_inv_rot_matrix:new Sx(d),u_merc_center:new _h(d),u_tile_id:new Cx(d),u_zoom_transition:new ca(d),u_up_dir:new Cx(d),u_emissive_strength:new ca(d)}),r.dW=BD,r.dX=HSe,r.dY=class{constructor(d,s,c,h){this.context=d,this.format=h,this.size=c,this.texture=d.gl.createTexture();let[m,y,v]=this.size,{gl:w}=d;w.bindTexture(w.TEXTURE_3D,this.texture),d.pixelStoreUnpackFlipY.set(!1),d.pixelStoreUnpack.set(1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),"data"in s&&s.data&&w.texImage3D(w.TEXTURE_3D,0,this.format,m,y,v,0,gH(this.format),_H(this.format),s.data)}bind(d,s){let{context:c}=this,{gl:h}=c;h.bindTexture(h.TEXTURE_3D,this.texture),d!==this.minFilter&&(h.texParameteri(h.TEXTURE_3D,h.TEXTURE_MAG_FILTER,d),h.texParameteri(h.TEXTURE_3D,h.TEXTURE_MIN_FILTER,d),this.minFilter=d),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:d}=this.context;d.deleteTexture(this.texture),this.texture=null}},r.dZ=BJ,r.d_=(d,s,c,h,m,y)=>{let v=d.transform,w=v.projection.name==="globe",T;if(y.paint.get("circle-pitch-alignment")==="map")if(w){let M=PJ(v.zoom,s.canonical)*v._pixelsPerMercatorPixel;T=Float32Array.from([M,0,0,M])}else T=v.calculatePixelsToTileUnitsMatrix(c);else T=new Float32Array([v.pixelsToGLUnits[0],0,0,v.pixelsToGLUnits[1]]);let A={u_camera_to_center_distance:d.transform.getCameraToCenterDistance(v.projection),u_matrix:d.translatePosMatrix(s.projMatrix,c,y.paint.get("circle-translate"),y.paint.get("circle-translate-anchor")),u_device_pixel_ratio:uh.devicePixelRatio,u_extrude_scale:T,u_inv_rot_matrix:lwe,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0],u_emissive_strength:y.paint.get("circle-emissive-strength")};if(w){A.u_inv_rot_matrix=h,A.u_merc_center=m,A.u_tile_id=[s.canonical.x,s.canonical.y,1<=0?d.slice(0,s):d},r.dm=function(d){return d.indexOf(mx)>=0},r.dn=function(d){let s=d.lastIndexOf(mx);return s>=0?d.slice(s+1):""},r.dp=function(d){let s=[],c=d.id;return c===void 0&&s.push({message:`layers.${c}: missing required property "id"`}),d.render===void 0&&s.push({message:`layers.${c}: missing required method "render"`}),d.renderingMode&&d.renderingMode!=="2d"&&d.renderingMode!=="3d"&&s.push({message:`layers.${c}: property "renderingMode" must be either "2d" or "3d"`}),s},r.dq=function(d,s,c,h){return d.type==="custom"?new MIe(d,s):new LIe[d.type](d,s,c,h)},r.dr=Mo,r.ds=function(d){let s=d.indexOf(mx);return s>=0?d.slice(s+1):""},r.dt=class extends kS{constructor(d,s){super(d._vectorTileFeature,d._z,d._x,d._y,d.id),d.state&&(this.state=Object.assign({},d.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=d.source,this.sourceLayer=d.sourceLayer,this.layer=d.layer)}toJSON(){let d=super.toJSON();return d.target=this.target,d.namespace=this.namespace,d}},r.du=DD,r.dv=Go,r.dw=function(d){return d({pluginStatus:qc,pluginURL:Tf}),DD.on("pluginStateChange",d),d},r.dx=yF,r.dy=class extends gh{constructor(d){super(d),this.current=j8}set(d,s,c){if(this.fetchUniformLocation(d,s)){for(let h=0;h<9;h++)if(c[h]!==this.current[h]){this.current=c,this.gl.uniformMatrix3fv(this.location,!1,c);break}}}},r.dz=Te,r.e=_c,r.e$=function(){let d=s2;d&&(d.isPreloaded()&&d.numActive()===1?(d.release(uH),s2=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},r.e0=dd,r.e1=(d,s,c,h,m,y,v,w,T,A)=>{let M=d.transform,O=M.pitch<15?mte(.07,.7,Ue((14-M.zoom)/5,0,1)):.07,N=c.paint.get("line-trim-color-use-theme").constantOr("default")==="none";return{u_matrix:gte(d,s,c,h),u_texsize:s.imageAtlasTexture?s.imageAtlasTexture.size:[0,0],u_pixels_to_tile_units:M.calculatePixelsToTileUnitsMatrix(s),u_device_pixel_ratio:m,u_width_scale:y,u_floor_width_scale:v,u_image:0,u_tile_units_to_pixels:fte(s,M),u_units_to_pixels:[1/M.pixelsToGLUnits[0],1/M.pixelsToGLUnits[1]],u_alpha_discard_threshold:0,u_trim_offset:w,u_trim_fade_range:c.paint.get("line-trim-fade-range"),u_trim_color:c.paint.get("line-trim-color").toPremultipliedRenderColor(N?null:c.lut).toArray01(),u_emissive_strength:c.paint.get("line-emissive-strength"),u_zbias_factor:O,u_tile_to_meter:ft(s.tileID.canonical,0),u_ground_shadow_factor:T,u_pattern_transition:A}},r.e2=(d,s,c,h,m,y,v,w,T,A)=>{let M=d.transform,O=M.calculatePixelsToTileUnitsMatrix(s),N=c.paint.get("line-trim-color-use-theme").constantOr("default")==="none",H=M.pitch<15?mte(.07,.7,Ue((14-M.zoom)/5,0,1)):.07;return{u_matrix:gte(d,s,c,h),u_pixels_to_tile_units:O,u_device_pixel_ratio:y,u_width_scale:v,u_floor_width_scale:w,u_units_to_pixels:[1/M.pixelsToGLUnits[0],1/M.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:m,u_texsize:yte(c)&&s.lineAtlasTexture?s.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:fte(s,d.transform),u_alpha_discard_threshold:0,u_trim_offset:T,u_trim_fade_range:c.paint.get("line-trim-fade-range"),u_trim_color:c.paint.get("line-trim-color").toPremultipliedRenderColor(N?null:c.lut).toArray01(),u_emissive_strength:c.paint.get("line-emissive-strength"),u_zbias_factor:H,u_tile_to_meter:ft(s.tileID.canonical,0),u_ground_shadow_factor:A}},r.e3=pn,r.e4=KD,r.e5=De,r.e6=twe,r.e7=RF,r.e8=Aee,r.e9=Fy,r.eA=Ba,r.eB=ky,r.eC=function(d,s,c,h,m,y,v,w,T,A,M,O,N,H,G,ee){var te=new p(16);return te[0]=d,te[1]=s,te[2]=c,te[3]=h,te[4]=m,te[5]=y,te[6]=v,te[7]=w,te[8]=T,te[9]=A,te[10]=M,te[11]=O,te[12]=N,te[13]=H,te[14]=G,te[15]=ee,te},r.eD=Y,r.eE=_x,r.eF=rS,r.eG=class{constructor(){this._updateTime=0,this._sourceIds=[],this._activeRegions=[],this._prevRegions=[],this._globalClipBounds={min:new ai(1/0,1/0),max:new ai(-1/0,-1/0)}}clear(){this._activeRegions.length>0&&++this._updateTime,this._activeRegions=[],this._prevRegions=[]}get updateTime(){return this._updateTime}getReplacementRegionsForTile(d,s=!1){let c=mee(new ai(0,0),new ai(fi,fi),d),h=[];if(s&&!oH(c,this._globalClipBounds))return h;for(let m of this._activeRegions){if(m.hiddenByOverlap||!oH(c,m))continue;let y=Fwe(m.min,m.max,d);h.push({min:y.min,max:y.max,sourceId:this._sourceIds[m.priority],footprint:m.footprint,footprintTileId:m.tileId,order:m.order,clipMask:m.clipMask,clipScope:m.clipScope})}return h}setSources(d){this._setSources(d.map(s=>({getSourceId:()=>s.cache.id,getFootprints:()=>{let c=[];for(let h of s.cache.getVisibleCoordinates()){let m=s.cache.getTile(h).buckets[s.layer];m&&m.updateFootprints(h.toUnwrapped(),c)}return c},getOrder:()=>s.order,getClipMask:()=>s.clipMask,getClipScope:()=>s.clipScope})))}_addSource(d){let s=d.getFootprints();if(s.length===0)return;let c=d.getOrder(),h=d.getClipMask(),m=d.getClipScope();for(let y of s){if(!y.footprint)continue;let v=mee(y.footprint.min,y.footprint.max,y.id);this._activeRegions.push({min:v.min,max:v.max,hiddenByOverlap:!1,priority:this._sourceIds.length,tileId:y.id,footprint:y.footprint,order:c,clipMask:h,clipScope:m})}this._sourceIds.push(d.getSourceId())}_computeReplacement(){this._activeRegions.sort((s,c)=>s.priority-c.priority||DF(s.min,c.min)||DF(s.max,c.max)||s.order-c.order||s.clipMask-c.clipMask||(function(h,m){let y=(v,w)=>v+w;return h.length-m.length||h.reduce(y,"").localeCompare(m.reduce(y,""))})(s.clipScope,c.clipScope));let d=this._activeRegions.length!==this._prevRegions.length;if(!d){let s=0;for(;!d&&s!==this._activeRegions.length;){let c=this._activeRegions[s],h=this._prevRegions[s];d=c.priority!==h.priority||!hee(c,h)||c.order!==h.order||c.clipMask!==h.clipMask||!Zh(c.clipScope,h.clipScope),++s}}if(d){++this._updateTime;for(let c of this._activeRegions)c.order!==e2&&(this._globalClipBounds.min.x=Math.min(this._globalClipBounds.min.x,c.min.x),this._globalClipBounds.min.y=Math.min(this._globalClipBounds.min.y,c.min.y),this._globalClipBounds.max.x=Math.max(this._globalClipBounds.max.x,c.max.x),this._globalClipBounds.max.y=Math.max(this._globalClipBounds.max.y,c.max.y));let s=c=>{let h=this._activeRegions;if(c>=h.length)return c;let m=h[c].priority;for(;c1){let c=0,h=s(c);for(;c!==h;){let m=c,y=c;for(;m!==h;){let v=this._activeRegions[m];v.hiddenByOverlap=!1;for(let w=0;w=0;s--)this._addSource(d[s]);this._computeReplacement()}},r.eH=e2,r.eI=class{constructor(d){this._createGrid(d),this._createPoles(d)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(let d of this._poleSegments)d.destroy();for(let d of this._gridSegments)d.withSkirts.destroy(),d.withoutSkirts.destroy()}_fillGridMeshWithLods(d,s){let c=new Af,h=new Za,m=[],y=d+1+2,v=s[0]+1,w=s[0]+1+(1+s.length),T=(A,M,O)=>{let N=A===y-1?A-2:A===0?A:A-1;return N+=O?24575:0,[N,M]};for(let A=0;AString.fromCharCode(+("0x"+c))))},r.f0=function(){LF().acquire(uH)},r.f1=Yw,r.f2=function(d,s,c=!1){if(qc===Id.deferred||qc===Id.loading||qc===Id.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Tf=uh.resolveURL(d),qc=Id.deferred,ED=s,AD(),c||v_()},r.f3=function(d){_S=uh.resolveURL(d),yS||(yS=new gS(LF(),new a_)),yS.broadcast("setMeshoptUrl",_S)},r.f4=Uee,r.f5=function(d){hH=uh.resolveURL(d),yS||(yS=new gS(LF(),new a_)),yS.broadcast("setDracoUrl",hH)},r.f6=Vee,r.f7=r2,r.f8=function(d){let s=zA();if(!s)return;let c=s.delete(iu);d&&c.then(()=>d()).catch(d)},r.f9=PF,r.fA=function(d){$b(),jc?.then(s=>{s.keys().then(c=>{for(let h=0;hRo(m.message))}).catch(c=>Ro(c.message))}).catch(s=>Ro(s.message))},r.fa=Ui,r.fb=Ly,r.fc=am,r.fd=pne,r.fe=hne,r.ff=dte,r.fg=lo,r.fh="hd_road_elevation",r.fi=ws,r.fj=Hn,r.fk=M_,r.fl=PH,r.fm=kx,r.fn=function(d,s,c,h,m,y,v,w=1,T,A,M){d.createArrays(),d.tilePixelRatio=fi/(512*d.overscaling),d.compareText={},d.iconsNeedLinear=!1;let O=d.layers[0].layout,N=d.layers[0]._unevaluatedLayout._values,H={};H.scaleFactor=w,H.textSizeScaleRange=O.get("text-size-scale-range"),H.iconSizeScaleRange=O.get("icon-size-scale-range");let[G,ee]=H.textSizeScaleRange,[te,ie]=H.iconSizeScaleRange;H.textScaleFactor=Ue(H.scaleFactor,G,ee),H.iconScaleFactor=Ue(H.scaleFactor,te,ie);let he=N["text-size"],me=N["icon-size"];if(d.textSizeData.kind==="composite"){let{minZoom:it,maxZoom:Ut}=d.textSizeData;H.compositeTextSizes=[he.possiblyEvaluate(new es(it,{worldview:M}),y),he.possiblyEvaluate(new es(Ut,{worldview:M}),y)]}if(d.iconSizeData.kind==="composite"){let{minZoom:it,maxZoom:Ut}=d.iconSizeData;H.compositeIconSizes=[me.possiblyEvaluate(new es(it,{worldview:M}),y),me.possiblyEvaluate(new es(Ut,{worldview:M}),y)]}H.layoutTextSize=he.possiblyEvaluate(new es(v+1,{worldview:M}),y),H.layoutIconSize=me.possiblyEvaluate(new es(v+1,{worldview:M}),y),H.textMaxSize=he.possiblyEvaluate(new es(18,{worldview:M}),y);let ye=O.get("symbol-placement"),ze=O.get("text-rotation-alignment")==="map"&&ye!=="point",Ve=O.get("text-size"),qe=!1,Ye=[];for(let it of d.features){let Ut=O.get("text-font").evaluate(it,{},y).join(","),pt=Ve.evaluate(it,{},y)*H.textScaleFactor,Gt=H.layoutTextSize.evaluate(it,{},y)*H.textScaleFactor,ti=H.layoutIconSize.evaluate(it,{},y)*H.iconScaleFactor,$t={horizontal:{},vertical:void 0},Yt=it.text,si,Nt=[0,0];if(Yt){let Ji=Yt.toString(),Dn=O.get("text-letter-spacing").evaluate(it,{},y)*Dl,Kn=O.get("text-line-height").evaluate(it,{},y)*Dl,_o=ZL(Ji)?Dn:0,io=O.get("text-anchor").evaluate(it,{},y),$i=O.get("text-variable-anchor");if(!$i){let wt=O.get("text-radial-offset").evaluate(it,{},y);if(wt)Nt=Zte(io,[wt*Dl,FH]);else{let Vt=O.get("text-offset").evaluate(it,{},y);Nt=[Vt[0]*Dl,Vt[1]*Dl]}}let Xn=ze?"center":O.get("text-justify").evaluate(it,{},y),zo=ye==="point",we=zo?O.get("text-max-width").evaluate(it,{},y)*Dl:1/0,Ie=wt=>{d.allowVerticalPlacement&&TD(Ji)&&($t.vertical=MH(Yt,s,c,m,Ut,we,Kn,io,wt,_o,Nt,hu.vertical,!0,Gt,pt,T))};if(!ze&&$i){let wt=Xn==="auto"?$i.map(Ci=>NH(Ci)):[Xn],Vt=!1;for(let Ci=0;Ci=0||!TD(Ji)){let wt=MH(Yt,s,c,m,Ut,we,Kn,io,Xn,_o,Nt,hu.horizontal,!1,Gt,pt,T);wt&&($t.horizontal[Xn]=wt)}Ie(zo?"left":Xn)}}let Jt,It,xt,li,ni,dn,Fi=!1,Zi=O.get("icon-text-fit").evaluate(it,{},y);if(it.icon&&it.icon.hasPrimary()){let Ji=Qte(it.icon,d.iconSizeData,N["icon-size"],y,d.zoom,it,T,H.iconScaleFactor,M);Jt=Ji.iconPrimary,xt=Ji.iconSecondary;let Dn=Jt.toString();if(It=h.get(Dn),It&&(ni=O.get("icon-offset").evaluate(it,{},y),dn=O.get("icon-anchor").evaluate(it,{},y),si=sIe(m.get(Dn),xt?m.get(xt.toString()):void 0,ni,dn),Fi=It.sdf,d.sdfIcons===void 0?d.sdfIcons=It.sdf:d.sdfIcons!==It.sdf&&Ro("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(It.pixelRatio!==d.pixelRatio||O.get("icon-rotate").constantOr(1)!==0)&&(d.iconsNeedLinear=!0)),xt){let Kn=xt.toString();li=h.get(Kn)}}qe=qe||!(!it.icon||!it.icon.hasSecondary());let mi=BH($t.horizontal)||$t.vertical;d.iconsInText||(d.iconsInText=!!mi&&mi.iconsInText);let ln=Gt*H.textScaleFactor/Dl,{defaultShapedIcon:Bn,verticallyShapedIcon:wi}=gIe(d,si,O,it,y,$t,ln,ni,Zi);Zi!=="none"&&si&&(Ote(si)||Pte(si))&&(WF(0,It,Jt,si,Bn,Zi,A,h,m),WF(0,li,xt,si,Bn,Zi,A,h,m),wi&&(WF(0,It,Jt,si,wi,Zi,A,h,m),WF(0,li,xt,si,wi,Zi,A,h,m))),si=Bn,Ye.push({feature:it,shapedTextOrientations:$t,shapedText:mi,shapedIcon:si,iconPrimary:Jt,iconSecondary:xt,iconOffset:ni,iconAnchor:dn,verticallyShapedIcon:wi,layoutTextSize:Gt,layoutIconSize:ti,textOffset:Nt,isSDFIcon:Fi,iconTextFit:Zi})}return{featureData:Ye,sizes:H,hasAnySecondaryIcon:qe,textAlongLine:ze,symbolPlacement:ye}},r.fo=jte,r.fp=function(d,s,c,h,m,y,v,w,T,A){let{featureData:M,hasAnySecondaryIcon:O,sizes:N,textAlongLine:H,symbolPlacement:G}=s;for(let ee of M){let{shapedIcon:te,verticallyShapedIcon:ie,feature:he,shapedTextOrientations:me,shapedText:ye,layoutTextSize:ze,textOffset:Ve,isSDFIcon:qe,iconPrimary:Ye,iconSecondary:it,iconTextFit:Ut,iconOffset:pt}=ee;Xte(te,A.iconPositions,Ye,it),Xte(ie,A.iconPositions,Ye,it),fIe(me,A.iconPositions),mIe(Ye,it,A.iconPositions),(ye||te)&&_Ie(d,he,me,te,ie,T,N,ze,0,Ve,qe,h,m,v,w,O,Ut,pt,H,G)}c&&d.generateCollisionDebugBuffers(y,d.collisionBoxArray,N.textScaleFactor)},r.fq=Nn,r.fr=hN,r.fs=ei,r.ft=function(d){let s=0;if(new Uint32Array(d,0,1)[0]!==jee){let c=new Uint32Array(d,0,7),[,,h,m,y,v]=c;s=c.byteLength+m+y+v+y,(h!==d.byteLength||s>=d.byteLength)&&Ro("Invalid b3dm header information.")}return Wee(d,s)},r.fu=function(d,s){let c=tte(d);for(let h of c){for(let m of h.meshes)hSe(m);h.lights&&(h.lightMeshIndex=h.meshes.length,h.meshes.push(mSe(h.lights,s)))}return c},r.fv=aN,r.fw=qr,r.fx=Bee,r.fy=fh,r.fz=Id,r.g=function(d,s){return Go(Object.assign(d,{method:"GET"}),s)},r.h=function(d){return d.indexOf("mapbox:")===0},r.i=function(d){return _c.API_STYLE_REGEX.test(d)&&!bL(d)},r.j=ey,r.k=qb,r.l=function(d){return decodeURIComponent(atob(d).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join(""))},r.m=function(d,s){return Go(Object.assign(d,{type:"json"}),s)},r.n=ry,r.o=uh,r.p=function(d,s){return Go(Object.assign(d,{method:"POST"}),s)},r.q=ic,r.r=NA,r.s=function(d){try{let s=self[d];return s.setItem("_mapbox_test_",1),s.removeItem("_mapbox_test_"),!0}catch{return!1}},r.t=function(){return pH||(pH=new PF),pH},r.u=function(){return(function d(s){return s?(s^Math.random()*(16>>s/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,d)})()},r.v=function(d){return!!d&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(d)},r.w=Ro,r.x=JH,r.y=Zb,r.z=Ip}),i(["./shared"],function(r){function a(dt){let oe=dt?dt.url.toString():void 0;return oe?performance.getEntriesByName(oe):[]}function p(dt){if(typeof dt=="number"||typeof dt=="boolean"||typeof dt=="string"||dt==null)return JSON.stringify(dt);if(Array.isArray(dt)){let de="[";for(let Te of dt)de+=`${p(Te)},`;return`${de}]`}let oe="{";for(let de of Object.keys(dt).sort())oe+=`${de}:${p(dt[de])},`;return`${oe}}`}function f(dt){let oe="";for(let de of r.bx)oe+=`/${p(dt[de])}`;return oe}class x{constructor(oe){this.keyCache={},this._layers={},this._layerConfigs={},oe&&this.replace(oe)}replace(oe,de){this._layerConfigs={},this._layers={},this.update(oe,[],de)}update(oe,de,Te){this._options=Te;for(let He of oe)this._layerConfigs[He.id]=He,(this._layers[He.id]=r.dq(He,this.scope,null,this._options)).compileFilter(Te),this.keyCache[He.id]&&delete this.keyCache[He.id];for(let He of de)delete this.keyCache[He],delete this._layerConfigs[He],delete this._layers[He];this.familiesBySource={};let We=(function(He,Ue){let Tt={};for(let Et=0;Etthis._layers[pn.id]),Tt=Ue[0];if(Tt.visibility==="none")continue;let ot=Tt.source||"",Et=this.familiesBySource[ot];Et||(Et=this.familiesBySource[ot]={});let hi=Tt.sourceLayer||"_geojsonTileLayer",Xt=Et[hi];Xt||(Xt=Et[hi]=[]),Xt.push(Ue)}}}let I=1*r.fc;class D{constructor(oe){let de={},Te=[];for(let Tt in oe){let ot=oe[Tt],Et=de[Tt]={};for(let hi in ot.glyphs){let Xt=ot.glyphs[+hi];if(!Xt||Xt.bitmap.width===0||Xt.bitmap.height===0)continue;let pn=Xt.metrics.localGlyph?I:1,Pn={x:0,y:0,w:Xt.bitmap.width+2*pn,h:Xt.bitmap.height+2*pn};Te.push(Pn),Et[hi]=Pn}}let{w:We,h:He}=r.G(Te),Ue=new r.fb({width:We||1,height:He||1});for(let Tt in oe){let ot=oe[Tt];for(let Et in ot.glyphs){let hi=ot.glyphs[+Et];if(!hi||hi.bitmap.width===0||hi.bitmap.height===0)continue;let Xt=de[Tt][Et],pn=hi.metrics.localGlyph?I:1;r.fb.copy(hi.bitmap,Ue,{x:0,y:0},{x:Xt.x+pn,y:Xt.y+pn},hi.bitmap)}}this.image=Ue,this.positions=de}}r.fa(D,"GlyphAtlas");class P{constructor(oe){this.tileID=new r.aO(oe.tileID.overscaledZ,oe.tileID.wrap,oe.tileID.canonical.z,oe.tileID.canonical.x,oe.tileID.canonical.y),this.tileZoom=oe.tileZoom,this.uid=oe.uid,this.zoom=oe.zoom,this.lut=oe.lut,this.canonical=oe.tileID.canonical,this.pixelRatio=oe.pixelRatio,this.tileSize=oe.tileSize,this.source=oe.source,this.scope=oe.scope,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=oe.showCollisionBoxes,this.collectResourceTiming=!!oe.request&&oe.request.collectResourceTiming,this.promoteId=oe.promoteId,this.isSymbolTile=oe.isSymbolTile,this.tileTransform=r.aZ(oe.tileID.canonical,oe.projection),this.projection=oe.projection,this.worldview=oe.worldview,this.localizableLayerIds=oe.localizableLayerIds,this.brightness=oe.brightness,this.extraShadowCaster=!!oe.extraShadowCaster,this.tessellationStep=oe.tessellationStep,this.scaleFactor=oe.scaleFactor,this.worldview=oe.worldview}parse(oe,de,Te,We,He,Ue){this.status="parsing",this.data=oe,this.collisionBoxArray=new r.b3;let Tt=new r.fd(Object.keys(oe.layers).sort()),ot=new r.fe(this.tileID,this.promoteId);ot.bucketLayerIDs=[];let Et={},hi=new r.ff(256,256),Xt={featureIndex:ot,iconDependencies:new Map,patternDependencies:new Map,glyphDependencies:{},lineAtlas:hi,availableImages:Te,brightness:this.brightness,scaleFactor:this.scaleFactor,elevationFeatures:void 0},pn=[],Pn=de.familiesBySource[this.source];for(let Mo in Pn){let xo=oe.layers[Mo];if(!xo)continue;let No=!1,Xr=!1,Ro=!1;for(let qr of Pn[Mo])qr[0].type==="symbol"?No=!0:Xr=!0,qr[0].is3D()&&qr[0].type!=="model"&&(Ro=!0);if(this.extraShadowCaster&&!Ro||this.isSymbolTile===!0&&!No||this.isSymbolTile===!1&&!Xr)continue;xo.version===1&&r.w(`Vector tile source "${this.source}" layer "${Mo}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Zs=Tt.encode(Mo),La=[],Fa=!1;for(let qr=0,_r=0;qr=_r.maxzoom||_r.visibility==="none")continue;R(qr,this.zoom,Xt.brightness,Te,this.worldview);let js=Et[_r.id]=_r.createBucket({index:ot.bucketLayerIDs.length,layers:qr,zoom:this.zoom,lut:this.lut,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Zs,sourceID:this.source,projection:this.projection.spec,tessellationStep:this.tessellationStep,styleDefinedModelURLs:We,worldview:this.worldview});ot.bucketLayerIDs.push(qr.map(us=>r.B(us.id,us.scope)));let Gs=js.prepare?js.prepare():null;Gs!=null?(Gs=Gs.then(()=>js.populate(La,Xt,this.tileID.canonical,this.tileTransform)),pn.push(Gs)):js.populate(La,Xt,this.tileID.canonical,this.tileTransform)}}let Hn=()=>{let Mo,xo,No,Xr,Ro,Zs;hi.trim();let La={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},Fa=()=>{if(Mo)return this.status="done",Ue(Mo);if(this.extraShadowCaster)this.status="done",Ue(null,{buckets:Object.values(Et).filter(_r=>!_r.isEmpty()),featureIndex:ot,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:Xt.brightness,glyphMap:null,iconMap:null,glyphPositions:null});else if(xo&&No&&Xr){let _r=new D(xo),js=new Map;for(let[zl,Hc]of No.entries()){let{imagePosition:tu}=r.fl(zl,Hc,r.fm);js.set(zl,tu)}let Gs={};for(let zl in Et){let Hc=Et[zl];Hc instanceof r.b4&&(R(Hc.layers,this.zoom,Xt.brightness,Te,this.worldview),Gs[zl]=r.fn(Hc,xo,_r.positions,No,js,this.tileID.canonical,this.tileZoom,this.scaleFactor,this.pixelRatio,Ro,this.worldview))}let us={iconsPending:!0,patternsPending:!0};this.rasterizeIfNeeded(He,No,Ro,()=>{us.iconsPending=!1,qr(Gs,_r,us)}),this.rasterizeIfNeeded(He,Xr,Zs,()=>{us.patternsPending=!1,qr(Gs,_r,us)})}},qr=(_r,js,Gs,us)=>{if(Gs.iconsPending||Gs.patternsPending)return;let zl=new r.fo(No,Xr,this.lut);for(let Hc in Et){let tu=Et[Hc];if(Hc in _r)r.fp(tu,_r[Hc],this.showCollisionBoxes,Te,this.tileID.canonical,this.tileZoom,this.projection,this.brightness,No,zl);else if(tu.hasPattern&&(tu instanceof r.ba||tu instanceof r.bb||tu instanceof r.e7)){R(tu.layers,this.zoom,Xt.brightness,Te,this.worldview);let Yh=Object.fromEntries(zl.patternPositions);tu.addFeatures(Xt,this.tileID.canonical,Yh,Te,this.tileTransform,this.brightness)}}this.status="done",Ue(null,{buckets:Object.values(Et).filter(Hc=>!Hc.isEmpty()),featureIndex:ot,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:js.image,lineAtlas:hi,imageAtlas:zl,brightness:Xt.brightness})};if(!this.extraShadowCaster){let _r=r.fj(Xt.glyphDependencies,us=>Object.keys(us).map(Number));Object.keys(_r).length?He.send("getGlyphs",{uid:this.uid,stacks:_r},(us,zl)=>{Mo||(Mo=us,xo=zl,Fa())},void 0,!1,La):xo={};let js=Array.from(Xt.iconDependencies.keys()).map(us=>r.I.parse(us));js.length?He.send("getImages",{images:js,source:this.source,scope:this.scope,tileID:this.tileID,type:"icons"},(us,zl)=>{Mo||(Mo=us,No=new Map,Ro=this.updateImageMapAndGetImageTaskQueue(No,zl,Xt.iconDependencies),Fa())},void 0,!1,La):(No=new Map,Ro=new Map);let Gs=Array.from(Xt.patternDependencies.keys()).map(us=>r.I.parse(us));Gs.length?He.send("getImages",{images:Gs,source:this.source,scope:this.scope,tileID:this.tileID,type:"patterns"},(us,zl)=>{Mo||(Mo=us,Xr=new Map,Zs=this.updateImageMapAndGetImageTaskQueue(Xr,zl,Xt.patternDependencies),Fa())},void 0,!1,La):(Xr=new Map,Zs=new Map)}if(Xt.elevationFeatures&&Xt.elevationFeatures.length>0){let _r=[];for(let Gs of Object.values(Et))if(Gs instanceof r.bb){let us=Gs.getUnevaluatedPortalGraph();us&&_r.push(us)}let js=r.fk.evaluate(_r);for(let Gs of Object.values(Et))if(Gs instanceof r.bb){let us=oe.layers[Tt.decode(Gs.sourceLayerIndex)];Gs.setEvaluatedPortalGraph(js,us,this.tileID.canonical,Xt.availableImages,Xt.brightness)}}Fa()};pn.length>0?Promise.allSettled(pn).then(Hn).catch(Ue):Hn()}rasterizeIfNeeded(oe,de,Te,We){Array.from(de.values()).some(He=>He.usvg)?this.rasterize(oe,de,Te,We):We()}updateImageMapAndGetImageTaskQueue(oe,de,Te){let We=new Map;for(let He of de.keys()){let Ue=Te.get(He)||[];for(let Tt of Ue){let ot=Tt.toString(),Et=de.get(Tt.id.toString());Et.usvg?We.has(ot)||(We.set(ot,Tt),oe.set(ot,Object.assign({},Et))):oe.set(ot,Et)}}return We}rasterize(oe,de,Te,We){this.rasterizeTask=oe.send("rasterizeImages",{scope:this.scope,tasks:Te},(He,Ue)=>{if(!He)for(let[Tt,ot]of Ue.entries()){let Et=Object.assign(de.get(Tt),{data:ot});de.set(Tt,Et)}We()})}cancelRasterize(){this.rasterizeTask&&this.rasterizeTask.cancel()}}function R(dt,oe,de,Te,We){let He=new r.ac(oe,{brightness:de,worldview:We});for(let Ue of dt)Ue.recalculate(He,Te)}class j extends r.E{constructor(oe,de,Te,We,He,Ue,Tt){super(),this.actor=oe,this.layerIndex=de,this.availableImages=Te,this.availableModels=We,this.loadVectorData=Ue||r.aL,this.loading={},this.loaded={},this.deduped=new r.aK(oe.scheduler),this.isSpriteLoaded=He,this.scheduler=oe.scheduler,this.brightness=Tt}loadTile(oe,de){let Te=oe.uid,We=oe&&oe.request,He=We&&We.collectResourceTiming,Ue=this.loading[Te]=new P(oe);Ue.abort=this.loadVectorData(oe,(Tt,ot)=>{let Et=!this.loading[Te];if(delete this.loading[Te],Ue.cancelRasterize(),Et||Tt||!ot)return Ue.status="done",Et||(this.loaded[Te]=Ue),de(Tt);let hi=ot.rawData,Xt={};ot.expires&&(Xt.expires=ot.expires),ot.cacheControl&&(Xt.cacheControl=ot.cacheControl),Ue.vectorTile=ot.vectorTile||new r.fq(new r.bt(hi));let pn=()=>{Ue.parse(Ue.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,(Pn,Hn)=>{if(Pn||!Hn)return de(Pn);let Mo={};if(He){let xo=a(We);xo.length>0&&(Mo.resourceTiming=JSON.parse(JSON.stringify(xo)))}de(null,Object.assign({rawTileData:hi.slice(0)},Hn,Xt,Mo))})};this.isSpriteLoaded?pn():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(pn,{type:"parseTile",isSymbolTile:oe.isSymbolTile,zoom:oe.tileZoom}):pn()}),this.loaded=this.loaded||{},this.loaded[Te]=Ue})}reloadTile(oe,de){let Te=this.loaded,We=oe.uid;if(Te&&Te[We]){let He=Te[We];He.scaleFactor=oe.scaleFactor,He.showCollisionBoxes=oe.showCollisionBoxes,He.projection=oe.projection,He.brightness=oe.brightness,He.tileTransform=r.aZ(oe.tileID.canonical,oe.projection),He.extraShadowCaster=oe.extraShadowCaster,He.lut=oe.lut,He.worldview=oe.worldview;let Ue=(Tt,ot)=>{let Et=He.reloadCallback;Et&&(delete He.reloadCallback,He.parse(He.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,Et)),de(Tt,ot)};He.status==="parsing"?He.reloadCallback=Ue:He.status==="done"&&(He.vectorTile?He.parse(He.vectorTile,this.layerIndex,this.availableImages,this.availableModels,this.actor,Ue):Ue())}else de(null,void 0)}abortTile(oe,de){let Te=oe.uid,We=this.loading[Te];We&&(We.abort&&We.abort(),delete this.loading[Te]),de()}removeTile(oe,de){let Te=this.loaded,We=oe.uid;Te&&Te[We]&&delete Te[We],de()}}class ${loadTile(oe,de){let{uid:Te,encoding:We,rawImageData:He,padding:Ue}=oe,Tt=ImageBitmap&&He instanceof ImageBitmap?this.getImageData(He,Ue):He;de(null,new r.fr(Te,Tt,We,Ue<1))}reloadTile(oe,de){de(null,null)}abortTile(oe,de){de()}removeTile(oe,de){de()}getImageData(oe,de){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(oe.width,oe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=oe.width,this.offscreenCanvas.height=oe.height,this.offscreenCanvasContext.drawImage(oe,0,0,oe.width,oe.height);let Te=this.offscreenCanvasContext.getImageData(-de,-de,oe.width+2*de,oe.height+2*de);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),Te}}r.bs.setPbf(r.bt);class W{constructor(oe){this._mrt=new r.bs(oe.partial?30:1/0),this._isHeaderLoaded=!1,this.uid=oe.uid,this.tileID=oe.tileID,this.source=oe.source}parse(oe,de){let Te=this._mrt;this.status="parsing",this._entireBuffer=oe;try{Te.parseHeader(oe),this._isHeaderLoaded=!0;let We=[];for(let He in Te.layers){let Ue=Te.getLayer(He),Tt=Ue.getDataRange(Ue.getBandList()),ot=Te.createDecodingTask(Tt),Et=oe.slice(Tt.firstByte,Tt.lastByte+1),hi=r.bs.performDecoding(Et,ot).then(Xt=>ot.complete(null,Xt)).catch(Xt=>ot.complete(Xt,null));We.push(hi)}Promise.allSettled(We).then(()=>de(null,Te)).catch(He=>de(He))}catch(We){de(We)}}}class Q{constructor(oe){this.actor=oe,this.loading={},this.loaded={}}loadTile(oe,de){let Te=oe.uid,We=oe.request,He=this.loading[Te]=new W(oe),{cancel:Ue}=r.bu(We,(Tt,ot,Et,hi)=>{let Xt=!this.loading[Te];if(delete this.loading[Te],Xt||Tt||!ot)return He.status="done",Xt||(this.loaded[Te]=He),de(Tt);He.parse(ot,(pn,Pn)=>{if(pn||!Pn)return de(pn);de(null,Pn,Et,hi)}),this.loaded[Te]=He});He.abort=Ue}reloadTile(oe,de){de(null,void 0)}abortTile(oe,de){let Te=oe.uid,We=this.loading[Te];We&&(We.abort&&We.abort(),delete this.loading[Te]),de()}removeTile(oe,de){let Te=oe.uid;this.loaded[Te]&&delete this.loaded[Te],de()}decodeRasterArray(oe,de){r.bs.performDecoding(oe.buffer,oe.task).then(Te=>de(null,Te)).catch(Te=>de(Te))}}let se=r.fs.prototype.toGeoJSON;class ge{constructor(oe){this._feature=oe,this.extent=r.al,this.type=oe.type,this.properties=oe.tags,"id"in oe&&!isNaN(oe.id)&&(this.id=parseInt(oe.id,10))}loadGeometry(){if(this._feature.type===1){let oe=[];for(let de of this._feature.geometry)oe.push([new r.P(de[0],de[1])]);return oe}{let oe=[];for(let de of this._feature.geometry){let Te=[];for(let We of de)Te.push(new r.P(We[0],We[1]));oe.push(Te)}return oe}}toGeoJSON(oe,de,Te){return se.call(this,oe,de,Te)}}class Re{constructor(oe,de){this.name=oe,this.extent=r.al,this.length=de.length,this._jsonFeatures=de}feature(oe){return new ge(this._jsonFeatures[oe])}}class Se{constructor(oe){this.layers={},this.extent=r.al;for(let de of Object.keys(oe))this.layers[de]=new Re(de,oe[de])}}let fe=64/4096,be=128;class je{constructor(){this.features=new Map}clear(){this.features.clear()}load(oe=[],de){for(let Te of oe){let We=Te.id;if(We==null)continue;let He=this.features.get(We);He&&this.updateCache(He,de),Te.geometry?(He=Fe(Te),this.updateCache(He,de),this.features.set(We,He)):this.features.delete(We),this.updateCache(He,de)}}updateCache(oe,de){for(let{canonical:Te,uid:We}of Object.values(de)){let{z:He,x:Ue,y:Tt}=Te;st(oe,Math.pow(2,He),Ue,Tt)&&delete de[We]}}getTile(oe,de,Te){let We=Math.pow(2,oe),He=[];for(let Ue of this.features.values())st(Ue,We,de,Te)&&He.push(ki(Ue,We,de,Te));return{features:He}}getFeatures(){return[...this.features.values()]}}function st({minX:dt,minY:oe,maxX:de,maxY:Te},We,He,Ue){return dt<(He+1+fe)/We&&oe<(Ue+1+fe)/We&&de>(He-fe)/We&&Te>(Ue-fe)/We}function Fe(dt){let{id:oe,geometry:de,properties:Te}=dt;if(!de)return;if(de.type==="GeometryCollection")throw new Error("GeometryCollection not supported in dynamic mode.");let{type:We,coordinates:He}=de,Ue={id:oe,type:1,geometry:[],tags:Te,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},Tt=Ue.geometry;if(We==="Point")ht(He,Tt,Ue);else if(We==="MultiPoint")for(let ot of He)ht(ot,Tt,Ue);else if(We==="LineString")Ue.type=2,ue(He,Tt,Ue);else if(We==="MultiLineString")Ue.type=2,Pt(He,Tt,Ue);else if(We==="Polygon")Ue.type=3,Pt(He,Tt,Ue,!0);else{if(We!=="MultiPolygon")throw new Error("Input data is not a valid GeoJSON object.");Ue.type=3;for(let ot of He)Pt(ot,Tt,Ue,!0)}return Ue}function ht([dt,oe],de,Te){let We=r.aF(dt),He=r.aJ(oe);He=He<0?0:He>1?1:He,de.push(We,He),Te.minX=Math.min(Te.minX,We),Te.minY=Math.min(Te.minY,He),Te.maxX=Math.max(Te.maxX,We),Te.maxY=Math.max(Te.maxY,He)}function ue(dt,oe,de,Te=!1,We=!1){let He=[];for(let Ue of dt)ht(Ue,He,de);oe.push(He),Te&&(function(Ue,Tt){let ot=0;for(let Et=0,hi=Ue.length,Xt=hi-2;Et0===Tt)for(let Et=0,hi=Ue.length;Et=Ue&&Xt>=Ue||(Et>=Ue?(hi+=Math.round(Hn*((Ue-Et)/Pn)),Et=Ue):Xt>=Ue&&(pn=hi+Math.round(Hn*((Ue-Et)/Pn)),Xt=Ue),hi>=Ue&&pn>=Ue||(hi>=Ue?(Et+=Math.round(Pn*((Ue-hi)/Hn)),hi=Ue):pn>=Ue&&(Xt=Et+Math.round(Pn*((Ue-hi)/Hn)),pn=Ue),Tt&&Et===Tt[Tt.length-1][0]&&hi===Tt[Tt.length-1][1]||(Tt=[[Et,hi]],We.push(Tt)),Tt.push([Xt,pn])))))}}function Bi({name:dt,features:oe},de){de.writeStringField(1,dt),de.writeVarintField(5,r.al);let Te=new Map,We=new Map,He={keys:Te,values:We,feature:null};for(let Ue of oe)He.feature=Ue,de.writeMessage(2,qt,He);for(let Ue of Te.keys())de.writeStringField(3,Ue);for(let Ue of We.keys())de.writeMessage(4,qi,Ue)}function qt(dt,oe){let de=dt.feature;de.id!==void 0&&Number.isSafeInteger(+de.id)&&oe.writeVarintField(1,+de.id),de.tags&&oe.writeMessage(2,en,dt),oe.writeVarintField(3,de.type),oe.writeMessage(4,Ei,de)}function en({keys:dt,values:oe,feature:de},Te){for(let We of Object.keys(de.tags)){let He=de.tags[We];if(He===null)continue;let Ue=dt.get(We);Ue===void 0&&(Ue=dt.size,dt.set(We,Ue)),Te.writeVarint(Ue);let Tt=typeof He;Tt!=="string"&&Tt!=="boolean"&&Tt!=="number"&&(He=JSON.stringify(He));let ot=oe.get(He);ot===void 0&&(ot=oe.size,oe.set(He,ot)),Te.writeVarint(ot)}}function _t(dt,oe){return(oe<<3)+(7&dt)}function St(dt){return dt<<1^dt>>31}function Ei(dt,oe){let{geometry:de,type:Te}=dt,We=0,He=0;if(Te===1){oe.writeVarint(_t(1,de.length));for(let Ue of de){let Tt=Ue[0]-We,ot=Ue[1]-He;oe.writeVarint(St(Tt)),oe.writeVarint(St(ot)),We+=Tt,He+=ot}}else for(let Ue of de){oe.writeVarint(_t(1,1));let Tt=Ue.length-(Te===3?1:0);for(let ot=0;otdt},vn=Math.fround||(Gn=new Float32Array(1),dt=>(Gn[0]=+dt,Gn[0]));var Gn;let Wi=3,An=5,Vn=6;class Fn{constructor(oe){this.options=Object.assign(Object.create(zi),oe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(oe){let{log:de,minZoom:Te,maxZoom:We}=this.options;de&&console.time("total time");let He=`prepare ${oe.length} points`;de&&console.time(He),this.points=oe;let Ue=[];for(let ot=0;ot=Te;ot--){let Et=+Date.now();Tt=this.trees[ot]=this._createTree(this._cluster(Tt,ot)),de&&console.log("z%d: %d clusters in %dms",ot,Tt.numItems,+Date.now()-Et)}return de&&console.timeEnd("total time"),this}getClusters(oe,de){let Te=((oe[0]+180)%360+360)%360-180,We=Math.max(-90,Math.min(90,oe[1])),He=oe[2]===180?180:((oe[2]+180)%360+360)%360-180,Ue=Math.max(-90,Math.min(90,oe[3]));if(oe[2]-oe[0]>=360)Te=-180,He=180;else if(Te>He){let Xt=this.getClusters([Te,We,180,Ue],de),pn=this.getClusters([-180,We,He,Ue],de);return Xt.concat(pn)}let Tt=this.trees[this._limitZoom(de)],ot=Tt.range(pe(Te),Qt(Ue),pe(He),Qt(We)),Et=Tt.data,hi=[];for(let Xt of ot){let pn=this.stride*Xt;hi.push(Et[pn+An]>1?Lo(Et,pn,this.clusterProps):this.points[Et[pn+Wi]])}return hi}getChildren(oe){let de=this._getOriginId(oe),Te=this._getOriginZoom(oe),We="No cluster with the specified id.",He=this.trees[Te];if(!He)throw new Error(We);let Ue=He.data;if(de*this.stride>=Ue.length)throw new Error(We);let Tt=this.options.radius/(this.options.extent*Math.pow(2,Te-1)),ot=He.within(Ue[de*this.stride],Ue[de*this.stride+1],Tt),Et=[];for(let hi of ot){let Xt=hi*this.stride;Ue[Xt+4]===oe&&Et.push(Ue[Xt+An]>1?Lo(Ue,Xt,this.clusterProps):this.points[Ue[Xt+Wi]])}if(Et.length===0)throw new Error(We);return Et}getLeaves(oe,de,Te){let We=[];return this._appendLeaves(We,oe,de=de||10,Te=Te||0,0),We}getTile(oe,de,Te){let We=this.trees[this._limitZoom(oe)],He=Math.pow(2,oe),{extent:Ue,radius:Tt}=this.options,ot=Tt/Ue,Et=(Te-ot)/He,hi=(Te+1+ot)/He,Xt={features:[]};return this._addTileFeatures(We.range((de-ot)/He,Et,(de+1+ot)/He,hi),We.data,de,Te,He,Xt),de===0&&this._addTileFeatures(We.range(1-ot/He,Et,1,hi),We.data,He,Te,He,Xt),de===He-1&&this._addTileFeatures(We.range(0,Et,ot/He,hi),We.data,-1,Te,He,Xt),Xt.features.length?Xt:null}getClusterExpansionZoom(oe){let de=this._getOriginZoom(oe)-1;for(;de<=this.options.maxZoom;){let Te=this.getChildren(oe);if(de++,Te.length!==1)break;oe=Te[0].properties.cluster_id}return de}_appendLeaves(oe,de,Te,We,He){let Ue=this.getChildren(de);for(let Tt of Ue){let ot=Tt.properties;if(ot&&ot.cluster?He+ot.point_count<=We?He+=ot.point_count:He=this._appendLeaves(oe,ot.cluster_id,Te,We,He):He1,hi,Xt,pn;if(Et)hi=gr(de,ot,this.clusterProps),Xt=de[ot],pn=de[ot+1];else{let Mo=this.points[de[ot+Wi]];hi=Mo.properties;let[xo,No]=Mo.geometry.coordinates;Xt=pe(xo),pn=Qt(No)}let Pn={type:1,geometry:[[Math.round(this.options.extent*(Xt*He-Te)),Math.round(this.options.extent*(pn*He-We))]],tags:hi},Hn;Hn=Et||this.options.generateId?de[ot+Wi]:this.points[de[ot+Wi]].id,Hn!==void 0&&(Pn.id=Hn),Ue.features.push(Pn)}}_limitZoom(oe){return Math.max(this.options.minZoom,Math.min(Math.floor(+oe),this.options.maxZoom+1))}_cluster(oe,de){let{radius:Te,extent:We,reduce:He,minPoints:Ue}=this.options,Tt=Te/(We*Math.pow(2,de)),ot=oe.data,Et=[],hi=this.stride;for(let Xt=0;Xtde&&(xo+=ot[Xr+An])}if(xo>Mo&&xo>=Ue){let No,Xr=pn*Mo,Ro=Pn*Mo,Zs=-1,La=(Xt/hi<<5)+(de+1)+this.points.length;for(let Fa of Hn){let qr=Fa*hi;if(ot[qr+2]<=de)continue;ot[qr+2]=de;let _r=ot[qr+An];Xr+=ot[qr]*_r,Ro+=ot[qr+1]*_r,ot[qr+4]=La,He&&(No||(No=this._map(ot,Xt,!0),Zs=this.clusterProps.length,this.clusterProps.push(No)),He(No,this._map(ot,qr)))}ot[Xt+4]=La,Et.push(Xr/xo,Ro/xo,1/0,La,-1,xo),He&&Et.push(Zs)}else{for(let No=0;No1)for(let No of Hn){let Xr=No*hi;if(!(ot[Xr+2]<=de)){ot[Xr+2]=de;for(let Ro=0;Ro>5}_getOriginZoom(oe){return(oe-this.points.length)%32}_map(oe,de,Te){if(oe[de+An]>1){let Ue=this.clusterProps[oe[de+Vn]];return Te?Object.assign({},Ue):Ue}let We=this.points[oe[de+Wi]].properties,He=this.options.map(We);return Te&&He===We?Object.assign({},He):He}}function Lo(dt,oe,de){return{type:"Feature",id:dt[oe+Wi],properties:gr(dt,oe,de),geometry:{type:"Point",coordinates:[(Te=dt[oe],360*(Te-.5)),Wt(dt[oe+1])]}};var Te}function gr(dt,oe,de){let Te=dt[oe+An],We=Te>=1e4?`${Math.round(Te/1e3)}k`:Te>=1e3?Math.round(Te/100)/10+"k":Te,He=dt[oe+Vn],Ue=He===-1?{}:Object.assign({},de[He]);return Object.assign(Ue,{cluster:!0,cluster_id:dt[oe+Wi],point_count:Te,point_count_abbreviated:We})}function pe(dt){return dt/360+.5}function Qt(dt){let oe=Math.sin(dt*Math.PI/180),de=.5-.25*Math.log((1+oe)/(1-oe))/Math.PI;return de<0?0:de>1?1:de}function Wt(dt){let oe=(180-360*dt)*Math.PI/180;return 360*Math.atan(Math.exp(oe))/Math.PI-90}function at(dt,oe,de,Te){let We=Te,He=oe+(de-oe>>1),Ue,Tt=de-oe,ot=dt[oe],Et=dt[oe+1],hi=dt[de],Xt=dt[de+1];for(let pn=oe+3;pnWe)Ue=pn,We=Pn;else if(Pn===We){let Hn=Math.abs(pn-He);HnTe&&(Ue-oe>3&&at(dt,oe,Ue,Te),dt[Ue+2]=We,de-Ue>3&&at(dt,Ue,de,Te))}function Ze(dt,oe,de,Te,We,He){let Ue=We-de,Tt=He-Te;if(Ue!==0||Tt!==0){let ot=((dt-de)*Ue+(oe-Te)*Tt)/(Ue*Ue+Tt*Tt);ot>1?(de=We,Te=He):ot>0&&(de+=Ue*ot,Te+=Tt*ot)}return Ue=dt-de,Tt=oe-Te,Ue*Ue+Tt*Tt}function Dt(dt,oe,de,Te){let We={id:dt??null,type:oe,geometry:de,tags:Te,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(oe==="Point"||oe==="MultiPoint"||oe==="LineString")Si(We,de);else if(oe==="Polygon")Si(We,de[0]);else if(oe==="MultiLineString")for(let He of de)Si(We,He);else if(oe==="MultiPolygon")for(let He of de)Si(We,He[0]);return We}function Si(dt,oe){for(let de=0;de0&&(Ue+=Te?(We*hi-Et*He)/2:Math.sqrt(Math.pow(Et-We,2)+Math.pow(hi-He,2))),We=Et,He=hi}let Tt=oe.length-3;oe[2]=1,at(oe,0,Tt,de),oe[Tt+2]=1,oe.size=Math.abs(Ue),oe.start=0,oe.end=oe.size}function bn(dt,oe,de,Te){for(let We=0;We1?1:de}function Fo(dt,oe,de,Te,We,He,Ue,Tt){if(Te/=oe,He>=(de/=oe)&&Ue=Te)return null;let ot=[];for(let Et of dt){let hi=Et.geometry,Xt=Et.type,pn=We===0?Et.minX:Et.minY,Pn=We===0?Et.maxX:Et.maxY;if(pn>=de&&Pn=Te)continue;let Hn=[];if(Xt==="Point"||Xt==="MultiPoint")Yo(hi,Hn,de,Te,We);else if(Xt==="LineString")ha(hi,Hn,de,Te,We,!1,Tt.lineMetrics);else if(Xt==="MultiLineString")rs(hi,Hn,de,Te,We,!1);else if(Xt==="Polygon")rs(hi,Hn,de,Te,We,!0);else if(Xt==="MultiPolygon")for(let Mo of hi){let xo=[];rs(Mo,xo,de,Te,We,!0),xo.length&&Hn.push(xo)}if(Hn.length){if(Tt.lineMetrics&&Xt==="LineString"){for(let Mo of Hn)ot.push(Dt(Et.id,Xt,Mo,Et.tags));continue}Xt!=="LineString"&&Xt!=="MultiLineString"||(Hn.length===1?(Xt="LineString",Hn=Hn[0]):Xt="MultiLineString"),Xt!=="Point"&&Xt!=="MultiPoint"||(Xt=Hn.length===3?"Point":"MultiPoint"),ot.push(Dt(Et.id,Xt,Hn,Et.tags))}}return ot.length?ot:null}function Yo(dt,oe,de,Te,We){for(let He=0;He=de&&Ue<=Te&&oa(oe,dt[He],dt[He+1],dt[He+2])}}function ha(dt,oe,de,Te,We,He,Ue){let Tt=cd(dt),ot=We===0?Es:Uc,Et,hi,Xt=dt.start;for(let xo=0;xode&&(hi=ot(Tt,No,Xr,Zs,La,de),Ue&&(Tt.start=Xt+Et*hi)):Fa>Te?qr=de&&(hi=ot(Tt,No,Xr,Zs,La,de),_r=!0),qr>Te&&Fa<=Te&&(hi=ot(Tt,No,Xr,Zs,La,Te),_r=!0),!He&&_r&&(Ue&&(Tt.end=Xt+Et*hi),oe.push(Tt),Tt=cd(dt)),Ue&&(Xt+=Et)}let pn=dt.length-3,Pn=dt[pn],Hn=dt[pn+1],Mo=We===0?Pn:Hn;Mo>=de&&Mo<=Te&&oa(Tt,Pn,Hn,dt[pn+2]),pn=Tt.length-3,He&&pn>=3&&(Tt[pn]!==Tt[0]||Tt[pn+1]!==Tt[1])&&oa(Tt,Tt[0],Tt[1],Tt[2]),Tt.length&&oe.push(Tt)}function cd(dt){let oe=[];return oe.size=dt.size,oe.start=dt.start,oe.end=dt.end,oe}function rs(dt,oe,de,Te,We,He){for(let Ue of dt)ha(Ue,oe,de,Te,We,He,!1)}function oa(dt,oe,de,Te){dt.push(oe,de,Te)}function Es(dt,oe,de,Te,We,He){let Ue=(He-oe)/(Te-oe);return oa(dt,He,de+(We-de)*Ue,1),Ue}function Uc(dt,oe,de,Te,We,He){let Ue=(He-de)/(We-de);return oa(dt,oe+(Te-oe)*Ue,He,1),Ue}function wd(dt,oe){let de=[];for(let Te=0;Te0&&oe.size<(We?Ue:Te))return void(de.numPoints+=oe.length/3);let Tt=[];for(let ot=0;otUe)&&(de.numSimplified++,Tt.push(oe[ot],oe[ot+1])),de.numPoints++;We&&(function(ot,Et){let hi=0;for(let Xt=0,pn=ot.length,Pn=pn-2;Xt0===Et)for(let Xt=0,pn=ot.length;Xt24)throw new Error("maxZoom should be in the 0-24 range");if(de.promoteId&&de.generateId)throw new Error("promoteId and generateId cannot be used together.");let We=(function(He,Ue){let Tt=[];if(He.type==="FeatureCollection")for(let ot=0;ot1&&console.time("creation"),Pn=this.tiles[pn]=rl(oe,de,Te,We,Et),this.tileCoords.push({z:de,x:Te,y:We}),hi)){hi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",de,Te,We,Pn.numFeatures,Pn.numPoints,Pn.numSimplified),console.timeEnd("creation"));let _r=`z${de}`;this.stats[_r]=(this.stats[_r]||0)+1,this.total++}if(Pn.source=oe,He==null){if(de===Et.indexMaxZoom||Pn.numPoints<=Et.indexMaxPoints)continue}else{if(de===Et.maxZoom||de===He)continue;if(He!=null){let _r=He-de;if(Te!==Ue>>_r||We!==Tt>>_r)continue}}if(Pn.source=null,oe.length===0)continue;hi>1&&console.time("clipping");let Hn=.5*Et.buffer/Et.extent,Mo=.5-Hn,xo=.5+Hn,No=1+Hn,Xr=null,Ro=null,Zs=null,La=null,Fa=Fo(oe,Xt,Te-Hn,Te+xo,0,Pn.minX,Pn.maxX,Et),qr=Fo(oe,Xt,Te+Mo,Te+No,0,Pn.minX,Pn.maxX,Et);oe=null,Fa&&(Xr=Fo(Fa,Xt,We-Hn,We+xo,1,Pn.minY,Pn.maxY,Et),Ro=Fo(Fa,Xt,We+Mo,We+No,1,Pn.minY,Pn.maxY,Et),Fa=null),qr&&(Zs=Fo(qr,Xt,We-Hn,We+xo,1,Pn.minY,Pn.maxY,Et),La=Fo(qr,Xt,We+Mo,We+No,1,Pn.minY,Pn.maxY,Et),qr=null),hi>1&&console.timeEnd("clipping"),ot.push(Xr||[],de+1,2*Te,2*We),ot.push(Ro||[],de+1,2*Te,2*We+1),ot.push(Zs||[],de+1,2*Te+1,2*We),ot.push(La||[],de+1,2*Te+1,2*We+1)}}getTile(oe,de,Te){oe=+oe,de=+de,Te=+Te;let We=this.options,{extent:He,debug:Ue}=We;if(oe<0||oe>24)return null;let Tt=1<1&&console.log("drilling down to z%d-%d-%d",oe,de,Te);let Et,hi=oe,Xt=de,pn=Te;for(;!Et&&hi>0;)hi--,Xt>>=1,pn>>=1,Et=this.tiles[Ub(hi,Xt,pn)];return Et&&Et.source?(Ue>1&&(console.log("found parent tile z%d-%d-%d",hi,Xt,pn),console.time("drilling down")),this.splitTile(Et.source,hi,Xt,pn,oe,de,Te),Ue>1&&console.timeEnd("drilling down"),this.tiles[ot]?lh(this.tiles[ot],He):null):null}}function Ub(dt,oe,de){return 32*((1<Et.tags&&"3d_elevation_id"in Et.tags&&"source"in Et.tags&&Et.tags.source==="elevation",He=Te.features.filter(Et=>We(Et)),Ue={_geojsonTileLayer:Te.features};He.length>0&&(Ue={_geojsonTileLayer:Te.features.filter(Et=>!We(Et)),hd_road_elevation:He});let Tt=new Se(Ue),ot=(function(Et){let hi=new r.bt;for(let Xt of Object.keys(Et))hi.writeMessage(3,Bi,{name:Xt,features:Et[Xt]});return hi.finish()})(Ue).buffer;oe(null,{vectorTile:Tt,rawData:ot})}class ai extends j{constructor(oe,de,Te,We,He,Ue,Tt){super(oe,de,Te,We,He,tw,Tt),Ue&&(this.loadGeoJSON=Ue),this._dynamicIndex=new je}loadData(oe,de){let Te=oe&&oe.request,We=Te&&Te.collectResourceTiming;this._geoJSONIndex=null,this.loadGeoJSON(oe,(He,Ue)=>{if(He||!Ue)return de(He);if(typeof Ue!="object")return de(new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`));{try{if(oe.filter){let ot=r.U(oe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ot.result==="error")throw new Error(ot.value.map(Et=>`${Et.key}: ${Et.message}`).join(", "));Ue.features=Ue.features.filter(Et=>ot.value.evaluate({zoom:0},Et))}oe.dynamic?(Ue.type==="Feature"&&(Ue={type:"FeatureCollection",features:[Ue]}),oe.append||(this._dynamicIndex.clear(),this.loaded={}),this._dynamicIndex.load(Ue.features,this.loaded),oe.cluster&&(Ue.features=this._dynamicIndex.getFeatures())):this.loaded={},this._geoJSONIndex=oe.cluster?new Fn((function({superclusterOptions:ot,clusterProperties:Et}){if(!Et||!ot)return ot;let hi={},Xt={},pn={accumulated:null,zoom:0},Pn={properties:null},Hn=Object.keys(Et);for(let Mo of Hn){let[xo,No]=Et[Mo],Xr=r.U(No),Ro=r.U(typeof xo=="string"?[xo,["accumulated"],["get",Mo]]:xo);hi[Mo]=Xr.value,Xt[Mo]=Ro.value}return ot.map=Mo=>{Pn.properties=Mo;let xo={};for(let No of Hn)xo[No]=hi[No].evaluate(pn,Pn);return xo},ot.reduce=(Mo,xo)=>{Pn.properties=xo;for(let No of Hn)pn.accumulated=Mo[No],Mo[No]=Xt[No].evaluate(pn,Pn)},ot})(oe)).load(Ue.features):oe.dynamic?this._dynamicIndex:(function(ot,Et){return new dh(ot,Et)})(Ue,oe.geojsonVtOptions)}catch(ot){return de(ot)}let Tt={};if(We){let ot=a(Te);ot&&(Tt.resourceTiming={},Tt.resourceTiming[oe.source]=JSON.parse(JSON.stringify(ot)))}de(null,Tt)}})}reloadTile(oe,de){let Te=this.loaded;return Te&&Te[oe.uid]?oe.partial?de(null,void 0):super.reloadTile(oe,de):this.loadTile(oe,de)}loadGeoJSON(oe,de){if(oe.request)r.m(oe.request,de);else{if(typeof oe.data!="string")return de(new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`));setTimeout(()=>{try{return de(null,JSON.parse(oe.data))}catch{return de(new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`))}},0)}}getClusterExpansionZoom(oe,de){try{de(null,this._geoJSONIndex.getClusterExpansionZoom(oe.clusterId))}catch(Te){de(Te)}}getClusterChildren(oe,de){try{de(null,this._geoJSONIndex.getChildren(oe.clusterId))}catch(Te){de(Te)}}getClusterLeaves(oe,de){try{de(null,this._geoJSONIndex.getLeaves(oe.clusterId,oe.limit,oe.offset))}catch(Te){de(Te)}}}class Zh{constructor(oe,de,Te){this.tileID=new r.aO(oe.tileID.overscaledZ,oe.tileID.wrap,oe.tileID.canonical.z,oe.tileID.canonical.x,oe.tileID.canonical.y),this.tileZoom=oe.tileZoom,this.uid=oe.uid,this.zoom=oe.zoom,this.canonical=oe.tileID.canonical,this.pixelRatio=oe.pixelRatio,this.tileSize=oe.tileSize,this.source=oe.source,this.overscaling=this.tileID.overscaleFactor(),this.projection=oe.projection,this.brightness=de,this.worldview=Te}parse(oe,de,Te,We){this.status="parsing";let He=new r.aO(Te.tileID.overscaledZ,Te.tileID.wrap,Te.tileID.canonical.z,Te.tileID.canonical.x,Te.tileID.canonical.y),Ue=[],Tt=de.familiesBySource[Te.source],ot=new r.fe(He,Te.promoteId);ot.bucketLayerIDs=[],ot.is3DTile=!0,r.ft(oe).then(Et=>{if(!Et)return We(new Error("Could not parse tile"));let hi=Et.json.extensionsUsed&&Et.json.extensionsUsed.includes("MAPBOX_mesh_features")||Et.json.asset.extras&&Et.json.asset.extras.MAPBOX_mesh_features,Xt=Et.json.extensionsUsed&&Et.json.extensionsUsed.includes("EXT_meshopt_compression"),pn=new r.ac(this.zoom,{brightness:this.brightness,worldview:this.worldview});for(let Pn in Tt)for(let Hn of Tt[Pn]){let Mo=Hn[0];ot.bucketLayerIDs.push(Hn.map(Xr=>r.B(Xr.id,Xr.scope))),Mo.recalculate(pn,[]);let xo=r.fu(Et,1/r.d6(Te.tileID.canonical)),No=new r.fv(Hn,xo,He,hi,Xt,this.brightness,ot,this.worldview);hi||(No.needsUpload=!0),Ue.push(No),No.evaluate(Mo)}this.status="done",We(null,{buckets:Ue,featureIndex:ot,collisionBoxArray:null,glyphAtlasImage:null,lineAtlas:null,imageAtlas:null,brightness:null})}).catch(Et=>We(new Error(Et.message)))}}class FA{constructor(oe,de,Te,We,He,Ue,Tt,ot){this.actor=oe,this.layerIndex=de,this.availableImages=Te,this.availableModels=We,this.brightness=Tt,this.loading={},this.loaded={},this.worldview=ot}loadTile(oe,de){let Te=oe.uid,We=this.loading[Te]=new Zh(oe,this.brightness,this.worldview);r.bu(oe.request,(He,Ue)=>{let Tt=!this.loading[Te];return delete this.loading[Te],Tt||He?(We.status="done",Tt||(this.loaded[Te]=We),de(He)):Ue&&Ue.byteLength!==0?void We.parse(Ue,this.layerIndex,oe,(ot,Et)=>{We.status="done",this.loaded=this.loaded||{},this.loaded[Te]=We,ot||!Et?de(ot):de(null,Et)}):(We.status="done",this.loaded[Te]=We,de())})}reloadTile(oe,de){let Te=this.loaded,We=oe.uid;if(Te&&Te[We]){let He=Te[We];He.projection=oe.projection,He.brightness=oe.brightness;let Ue=(Tt,ot)=>{He.reloadCallback&&(delete He.reloadCallback,this.loadTile(oe,de)),de(Tt,ot)};He.status==="parsing"?He.reloadCallback=Ue:He.status==="done"&&this.loadTile(oe,de)}}abortTile(oe,de){let Te=oe.uid;this.loading[Te]&&delete this.loading[Te],de()}removeTile(oe,de){let Te=this.loaded,We=oe.uid;Te&&Te[We]&&delete Te[We],de()}}class J0{constructor(oe){this.self=oe,this.actor=new r.fx(oe,this),this.layerIndexes={},this.availableImages={},this.availableModels={},this.isSpriteLoaded={},this.imageRasterizer=new r.x,this.rtlPluginParsingListeners=[],this.projections={},this.defaultProjection=r.cl({name:"mercator"}),this.workerSourceTypes={vector:j,geojson:ai,"raster-dem":$,"raster-array":Q,"batched-model":FA},this.workerSources={},this.self.registerWorkerSource=(de,Te)=>{if(this.workerSourceTypes[de])throw new Error(`Worker source with name "${de}" already registered.`);this.workerSourceTypes[de]=Te},this.self.registerRTLTextPlugin=de=>{if(r.fy.isParsed())throw new Error("RTL text plugin already registered.");r.fy.setState({pluginStatus:r.fz.parsed,pluginURL:r.fy.getPluginURL()}),r.fy.applyArabicShaping=de.applyArabicShaping,r.fy.processBidirectionalText=de.processBidirectionalText,r.fy.processStyledBidirectionalText=de.processStyledBidirectionalText;for(let Te of this.rtlPluginParsingListeners)Te(null,!0);this.rtlPluginParsingListeners=[]}}clearCaches(oe,de,Te){delete this.layerIndexes[oe],delete this.availableImages[oe],delete this.availableModels[oe],delete this.workerSources[oe],Te()}checkIfReady(oe,de,Te){Te()}setReferrer(oe,de){this.referrer=de}spriteLoaded(oe,de){this.isSpriteLoaded[oe]||(this.isSpriteLoaded[oe]={});let{scope:Te,isLoaded:We}=de;if(this.isSpriteLoaded[oe][Te]=We,this.workerSources[oe]&&this.workerSources[oe][Te])for(let He in this.workerSources[oe][Te]){let Ue=this.workerSources[oe][Te][He];for(let Tt in Ue){let ot=Ue[Tt];ot instanceof j&&(ot.isSpriteLoaded=We,ot.fire(new r.z("isSpriteLoaded")))}}}setImages(oe,de,Te){this.availableImages[oe]||(this.availableImages[oe]={});let{scope:We,images:He}=de;if(this.availableImages[oe][We]=He,this.workerSources[oe]&&this.workerSources[oe][We]){for(let Ue in this.workerSources[oe][We]){let Tt=this.workerSources[oe][We][Ue];for(let ot in Tt)Tt[ot].availableImages=He}Te()}else Te()}setModels(oe,{scope:de,models:Te},We){if(this.availableModels[oe]||(this.availableModels[oe]={}),this.availableModels[oe][de]=Te,this.workerSources[oe]&&this.workerSources[oe][de]){for(let He in this.workerSources[oe][de]){let Ue=this.workerSources[oe][de][He];for(let Tt in Ue)Ue[Tt].availableModels=Te}We()}else We()}setProjection(oe,de){this.projections[oe]=r.cl(de)}setBrightness(oe,de,Te){this.brightness=de,Te()}setWorldview(oe,de,Te){this.worldview=de,Te()}setLayers(oe,de,Te){this.getLayerIndex(oe,de.scope).replace(de.layers,de.options),Te()}updateLayers(oe,de,Te){this.getLayerIndex(oe,de.scope).update(de.layers,de.removedIds,de.options),Te()}loadTile(oe,de,Te){de.projection=this.projections[oe]||this.defaultProjection,this.getWorkerSource(oe,de.type,de.source,de.scope).loadTile(de,Te)}decodeRasterArray(oe,de,Te){this.getWorkerSource(oe,de.type,de.source,de.scope).decodeRasterArray(de,Te)}reloadTile(oe,de,Te){de.projection=this.projections[oe]||this.defaultProjection,this.getWorkerSource(oe,de.type,de.source,de.scope).reloadTile(de,Te)}abortTile(oe,de,Te){this.getWorkerSource(oe,de.type,de.source,de.scope).abortTile(de,Te)}removeTile(oe,de,Te){this.getWorkerSource(oe,de.type,de.source,de.scope).removeTile(de,Te)}removeSource(oe,de,Te){if(!(this.workerSources[oe]&&this.workerSources[oe][de.scope]&&this.workerSources[oe][de.scope][de.type]&&this.workerSources[oe][de.scope][de.type][de.source]))return;let We=this.workerSources[oe][de.scope][de.type][de.source];delete this.workerSources[oe][de.scope][de.type][de.source],We.removeSource!==void 0?We.removeSource(de,Te):Te()}loadWorkerSource(oe,de,Te){try{this.self.importScripts(de.url),Te()}catch(We){Te(We.toString())}}syncRTLPluginState(oe,de,Te){if(r.fy.isParsed())Te(null,!0);else if(r.fy.isParsing())this.rtlPluginParsingListeners.push(Te);else try{r.fy.setState(de);let We=r.fy.getPluginURL();!r.fy.isLoaded()||r.fy.isParsed()||r.fy.isParsing()||We==null||(r.fy.setState({pluginStatus:r.fz.parsing,pluginURL:r.fy.getPluginURL()}),this.self.importScripts(We),r.fy.isParsed()?Te(null,!0):this.rtlPluginParsingListeners.push(Te))}catch(We){Te(We.toString())}}setDracoUrl(oe,de){this.dracoUrl=de}getAvailableImages(oe,de){this.availableImages[oe]||(this.availableImages[oe]={});let Te=this.availableImages[oe][de];return Te||(Te=[]),Te}getAvailableModels(oe,de){this.availableModels[oe]||(this.availableModels[oe]={});let Te=this.availableModels[oe][de];return Te||(Te={}),Te}getLayerIndex(oe,de){this.layerIndexes[oe]||(this.layerIndexes[oe]={});let Te=this.layerIndexes[oe][de];return Te||(Te=this.layerIndexes[oe][de]=new x,Te.scope=de),Te}getWorkerSource(oe,de,Te,We){let He=this.workerSources;return He[oe]||(He[oe]={}),He[oe][We]||(He[oe][We]={}),He[oe][We][de]||(He[oe][We][de]={}),this.isSpriteLoaded[oe]||(this.isSpriteLoaded[oe]={}),He[oe][We][de][Te]||(He[oe][We][de][Te]=new this.workerSourceTypes[de]({send:(Ue,Tt,ot,Et,hi,Xt)=>this.actor.send(Ue,Tt,ot,oe,hi,Xt),scheduler:this.actor.scheduler},this.getLayerIndex(oe,We),this.getAvailableImages(oe,We),this.getAvailableModels(oe,We),this.isSpriteLoaded[oe][We],void 0,this.brightness,this.worldview)),He[oe][We][de][Te]}rasterizeImagesWorker(oe,de,Te){let We=new Map;for(let[He,{image:Ue,imageVariant:Tt}]of de.tasks.entries()){let ot=this.imageRasterizer.rasterize(Tt,Ue,de.scope,oe);We.set(He,ot)}Te(void 0,We)}removeRasterizedImages(oe,de,Te){this.imageRasterizer.removeImagesFromCacheByIds(de.imageIds,de.scope,oe),Te()}enforceCacheSizeLimit(oe,de){r.fA(de)}getWorkerPerformanceMetrics(oe,de,Te){Te(void 0,void 0)}}return r.fw(self)&&(self.worker=new J0(self)),J0}),i(["./shared"],function(r){var a="3.15.0";let p={create:"create",load:"load",fullLoad:"fullLoad"},f={mark(_){performance.mark(_)},measure(_,l,u){performance.measure(_,l,u)}};function x(_){let l=_.name.split("?")[0];return r.a(l)&&l.includes("mapbox-gl.js")?"javascript":r.a(l)&&l.includes("mapbox-gl.css")?"css":r.b(l)?"fontRange":r.c(l)?"sprite":r.i(l)?"style":r.d(l)?"tilejson":"other"}var I,D={},P=(function(){if(I)return D;function _(g){return!l(g)}function l(g){return typeof window>"u"||typeof document>"u"?"not a browser":(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var C,S,E=new Blob([""],{type:"text/javascript"}),k=URL.createObjectURL(E);try{S=new Worker(k),C=!0}catch{C=!1}return S&&S.terminate(),URL.revokeObjectURL(k),C})()?(function(){var C=document.createElement("canvas");C.width=C.height=1;var S=C.getContext("2d");if(!S)return!1;var E=S.getImageData(0,0,1,1);return E&&E.width===C.width})()?(u[b=g&&g.failIfMajorPerformanceCaveat]===void 0&&(u[b]=(function(C){var S,E=(function(k){var F=document.createElement("canvas"),z=Object.create(_.webGLContextAttributes);return z.failIfMajorPerformanceCaveat=k,F.getContext("webgl2",z)})(C);if(!E)return!1;try{S=E.createShader(E.VERTEX_SHADER)}catch{return!1}return!(!S||E.isContextLost())&&(E.shaderSource(S,"void main() {}"),E.compileShader(S),E.getShaderParameter(S,E.COMPILE_STATUS)===!0)})(b)),u[b]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL2 support"):"insufficient Canvas/getImageData support":"insufficient worker support";var b}I=1,D.supported=_,D.notSupportedReason=l;var u={};return _.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0},D})();function R(_,l,u){let g=document.createElement(_);return l!=null&&(g.className=l),u&&u.appendChild(g),g}function j(_,l,u){let g=document.createElementNS("http://www.w3.org/2000/svg",_);for(let b of Object.keys(l))g.setAttributeNS(null,b,String(l[b]));return u&&u.appendChild(g),g}let $=typeof document<"u"?document.documentElement&&document.documentElement.style:null,W=$&&$.userSelect!==void 0?"userSelect":"WebkitUserSelect",Q;function se(){$&&W&&(Q=$[W],$[W]="none")}function ge(){$&&W&&($[W]=Q)}function Re(_){_.preventDefault(),_.stopPropagation(),window.removeEventListener("click",Re,!0)}function Se(){window.addEventListener("click",Re,!0),window.setTimeout(()=>{window.removeEventListener("click",Re,!0)},0)}function fe(_,l){let u=_.getBoundingClientRect();return st(_,u,l)}function be(_,l){let u=_.getBoundingClientRect(),g=[];for(let b=0;bthis._skuTokenExpiresAt}transformRequest(l,u){return this._transformRequestFn&&this._transformRequestFn(l,u)||{url:l}}normalizeStyleURL(l,u){if(!r.h(l))return l;let g=ki(l);return g.params.push(`sdk=js-${a}`),g.path=`/styles/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||u)}normalizeGlyphsURL(l,u){if(!r.h(l))return l;let g=ki(l);return g.path=`/fonts/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||u)}normalizeModelURL(l,u){if(!r.h(l))return l;let g=ki(l);return g.path=`/models/v1${g.path}`,this._makeAPIURL(g,this._customAccessToken||u)}normalizeSourceURL(l,u,g,b){if(!r.h(l))return l;let C=ki(l);return C.path=`/v4/${C.authority}.json`,C.params.push("secure"),g&&C.params.push(`language=${g}`),b&&C.params.push(`worldview=${b}`),this._makeAPIURL(C,this._customAccessToken||u)}normalizeIconsetURL(l,u){let g=ki(l);return r.h(l)?(g.path=`/styles/v1${g.path}/iconset.pbf`,this._makeAPIURL(g,this._customAccessToken||u)):zt(g)}normalizeSpriteURL(l,u,g,b){let C=ki(l);return r.h(l)?(C.path=`/styles/v1${C.path}/sprite${u}${g}`,this._makeAPIURL(C,this._customAccessToken||b)):(C.path+=`${u}${g}`,zt(C))}normalizeTileURL(l,u,g){if(this._isSkuTokenExpired()&&this._createSkuToken(),l&&!r.h(l))return l;let b=ki(l);b.path=b.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${u||g&&b.authority!=="raster"&&g===512?"@2x":""}${r.k.supported?".webp":"$1"}`),b.authority==="raster"?b.path=`/${r.e.RASTER_URL_PREFIX}${b.path}`:b.authority==="rasterarrays"?b.path=`/${r.e.RASTERARRAYS_URL_PREFIX}${b.path}`:b.authority==="3dtiles"?b.path=`/${r.e.TILES3D_URL_PREFIX}${b.path}`:(b.path=b.path.replace(/^.+\/v4\//,"/"),b.path=`/${r.e.TILE_URL_VERSION}${b.path}`);let C=this._customAccessToken||(function(S){for(let E of S){let k=E.match(/^access_token=(.*)$/);if(k)return k[1]}return null})(b.params)||r.e.ACCESS_TOKEN;return r.e.REQUIRE_ACCESS_TOKEN&&C&&this._skuToken&&b.params.push(`sku=${this._skuToken}`),this._makeAPIURL(b,C)}canonicalizeTileURL(l,u){let g=ki(l);if(!g.path.match(/^(\/v4\/|\/(raster|rasterarrays)\/v1\/)/)||!g.path.match(/\.[\w]+$/))return l;let b="mapbox://";g.path.match(/^\/raster\/v1\//)?b+=`raster/${g.path.replace(`/${r.e.RASTER_URL_PREFIX}/`,"")}`:g.path.match(/^\/rasterarrays\/v1\//)?b+=`rasterarrays/${g.path.replace(`/${r.e.RASTERARRAYS_URL_PREFIX}/`,"")}`:b+=`tiles/${g.path.replace(`/${r.e.TILE_URL_VERSION}/`,"")}`;let C=g.params;return u&&(C=C.filter(S=>!S.match(/^access_token=/))),C.length&&(b+=`?${C.join("&")}`),b}canonicalizeTileset(l,u){let g=!!u&&r.h(u),b=[];for(let C of l.tiles||[])r.j(C)?b.push(this.canonicalizeTileURL(C,g)):b.push(C);return b}_makeAPIURL(l,u){let g="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",b=ki(r.e.API_URL);if(l.protocol=b.protocol,l.authority=b.authority,l.protocol==="http"){let C=l.params.indexOf("secure");C>=0&&l.params.splice(C,1)}if(b.path!=="/"&&(l.path=`${b.path}${l.path}`),!r.e.REQUIRE_ACCESS_TOKEN)return zt(l);if(u=u||r.e.ACCESS_TOKEN,!this._silenceAuthErrors){if(!u)throw new Error(`An API access token is required to use Mapbox GL. ${g}`);if(u[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${g}`)}return l.params=l.params.filter(C=>C.indexOf("access_token")===-1),l.params.push(`access_token=${u||""}`),zt(l)}}let Pt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ki(_){let l=_.match(Pt);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 zt(_){let l=_.params.length?`?${_.params.join("&")}`:"";return`${_.protocol}://${_.authority}${_.path}${l}`}let Bi="mapbox.eventData";function qt(_){if(!_)return null;let l=_.split(".");if(!l||l.length!==3)return null;try{return JSON.parse(r.l(l[1]))}catch{return null}}class en{constructor(l){this.type=l,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(l){let u=qt(r.e.ACCESS_TOKEN),g="";return g=u&&u.u?r.f(u.u):r.e.ACCESS_TOKEN||"",l?`${Bi}.${l}:${g}`:`${Bi}:${g}`}fetchEventData(){let l=r.s("localStorage"),u=this.getStorageKey(),g=this.getStorageKey("uuid");if(l)try{let b=localStorage.getItem(u);b&&(this.eventData=JSON.parse(b));let C=localStorage.getItem(g);C&&(this.anonId=C)}catch{r.w("Unable to read from LocalStorage")}}saveEventData(){let l=r.s("localStorage"),u=this.getStorageKey(),g=this.getStorageKey("uuid"),b=this.anonId;if(l&&b)try{localStorage.setItem(g,b),Object.keys(this.eventData).length>=1&&localStorage.setItem(u,JSON.stringify(this.eventData))}catch{r.w("Unable to write to LocalStorage")}}processRequests(l){}postEvent(l,u,g,b){if(!r.e.EVENTS_URL)return;let C=ki(r.e.EVENTS_URL);C.params.push(`access_token=${b||r.e.ACCESS_TOKEN||""}`);let S={event:this.type,created:new Date(l).toISOString()},E=u?Object.assign(S,u):S,k={url:zt(C),headers:{"Content-Type":"text/plain"},body:JSON.stringify([E])};this.pendingRequest=r.p(k,F=>{this.pendingRequest=null,g(F),this.saveEventData(),this.processRequests(b)})}queueRequest(l,u){this.queue.push(l),this.processRequests(u)}}let _t=new class extends en{constructor(_){super("appUserTurnstile"),this._customAccessToken=_}postTurnstileEvent(_,l){r.e.EVENTS_URL&&r.e.ACCESS_TOKEN&&Array.isArray(_)&&_.some(u=>r.h(u)||r.j(u))&&this.queueRequest(Date.now(),l)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();let l=qt(r.e.ACCESS_TOKEN),u=l?l.u:r.e.ACCESS_TOKEN,g=u!==this.eventData.tokenU;r.v(this.anonId)||(this.anonId=r.u(),g=!0);let b=this.queue.shift();if(this.eventData.lastSuccess){let C=new Date(this.eventData.lastSuccess),S=new Date(b),E=(b-this.eventData.lastSuccess)/864e5;g=g||E>=1||E<-1||C.getDate()!==S.getDate()}else g=!0;g?this.postEvent(b,{sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:Fe,"enabled.telemetry":!1,userId:this.anonId},C=>{C||(this.eventData.lastSuccess=b,this.eventData.tokenU=u)},_):this.processRequests()}},St=_t.postTurnstileEvent.bind(_t),Ei=new class extends en{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(_,l,u,g){this.skuToken=l,this.errorCb=g,r.e.EVENTS_URL&&(u||r.e.ACCESS_TOKEN?this.queueRequest({id:_,timestamp:Date.now()},u):this.errorCb(new Error(ht)))}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{id:l,timestamp:u}=this.queue.shift();l&&this.success[l]||(this.anonId||this.fetchEventData(),r.v(this.anonId)||(this.anonId=r.u()),this.postEvent(u,{sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:Fe,skuToken:this.skuToken,userId:this.anonId},g=>{g?this.errorCb(g):l&&(this.success[l]=!0)},_))}remove(){this.errorCb=null}},qi=Ei.postMapLoadEvent.bind(Ei),zi=new class extends en{constructor(){super("style.load"),this.eventIdPerMapInstanceMap=new Map,this.mapInstanceIdMap=new WeakMap}getMapInstanceId(_){let l=this.mapInstanceIdMap.get(_);return l||(l=r.u(),this.mapInstanceIdMap.set(_,l)),l}getEventId(_){let l=this.eventIdPerMapInstanceMap.get(_)||0;return this.eventIdPerMapInstanceMap.set(_,l+1),l}postStyleLoadEvent(_,l){let{map:u,style:g,importedStyles:b}=l;if(!r.e.EVENTS_URL||!_&&!r.e.ACCESS_TOKEN)return;let C=this.getMapInstanceId(u),S={mapInstanceId:C,eventId:this.getEventId(C),style:g};b.length&&(S.importedStyles=b),this.queueRequest({timestamp:Date.now(),payload:S},_)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,payload:u}=this.queue.shift();this.postEvent(l,u,()=>{},_)}},vn=zi.postStyleLoadEvent.bind(zi),Gn=new class extends en{constructor(){super("gljs.performance")}postPerformanceEvent(_,l){r.e.EVENTS_URL&&(_||r.e.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:l},_)}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{timestamp:l,performanceData:u}=this.queue.shift(),g=(function(b){let C=performance.getEntriesByType("resource"),S=performance.getEntriesByType("mark"),E=(function(Y){let X={};if(Y){for(let J in Y)if(J!=="other")for(let ae of Y[J]){let ne=`${J}ResolveRangeMin`,ce=`${J}ResolveRangeMax`,_e=`${J}RequestCount`,xe=`${J}RequestCachedCount`;X[ne]=Math.min(X[ne]||1/0,ae.startTime),X[ce]=Math.max(X[ce]||-1/0,ae.responseEnd);let Pe=ke=>{X[ke]===void 0&&(X[ke]=0),++X[ke]};ae.transferSize!==void 0&&ae.transferSize===0&&Pe(xe),Pe(_e)}}return X})((function(Y,X){let J={};if(Y)for(let ae of Y){let ne=X(ae);J[ne]===void 0&&(J[ne]=[]),J[ne].push(ae)}return J})(C,x)),k=window.devicePixelRatio,F=navigator.connection||navigator.mozConnection||navigator.webkitConnection,z=F?F.effectiveType:void 0,q={counters:[],metadata:[],attributes:[]},U=(Y,X,J)=>{J!=null&&Y.push({name:X,value:J.toString()})};for(let Y in E)U(q.counters,Y,E[Y]);if(b.interactionRange[0]!==1/0&&b.interactionRange[1]!==-1/0&&(U(q.counters,"interactionRangeMin",b.interactionRange[0]),U(q.counters,"interactionRangeMax",b.interactionRange[1])),S)for(let Y of Object.keys(p)){let X=p[Y],J=S.find(ae=>ae.name===X);J&&U(q.counters,X,J.startTime)}return U(q.counters,"visibilityHidden",b.visibilityHidden),U(q.attributes,"style",(function(Y){if(Y)for(let X of Y){let J=X.name.split("?")[0];if(r.i(J)){let ae=J.split("/").slice(-2);if(ae.length===2)return`mapbox://styles/${ae[0]}/${ae[1]}`}}})(C)),U(q.attributes,"terrainEnabled",b.terrainEnabled?"true":"false"),U(q.attributes,"fogEnabled",b.fogEnabled?"true":"false"),U(q.attributes,"projection",b.projection),U(q.attributes,"zoom",b.zoom),U(q.metadata,"devicePixelRatio",k),U(q.metadata,"connectionEffectiveType",z),U(q.metadata,"navigatorUserAgent",navigator.userAgent),U(q.metadata,"screenWidth",window.screen.width),U(q.metadata,"screenHeight",window.screen.height),U(q.metadata,"windowWidth",window.innerWidth),U(q.metadata,"windowHeight",window.innerHeight),U(q.metadata,"mapWidth",b.width/k),U(q.metadata,"mapHeight",b.height/k),U(q.metadata,"webglRenderer",b.renderer),U(q.metadata,"webglVendor",b.vendor),U(q.metadata,"sdkVersion",a),U(q.metadata,"sdkIdentifier","mapbox-gl-js"),q})(u);for(let b of g.metadata);for(let b of g.counters);for(let b of g.attributes);this.postEvent(l,g,()=>{},_)}},Wi=Gn.postPerformanceEvent.bind(Gn),An=new class extends en{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(_,l,u,g){if(!r.e.API_URL||!r.e.SESSION_PATH)return;let b=ki(r.e.API_URL+r.e.SESSION_PATH);b.params.push(`sku=${l||""}`),b.params.push(`access_token=${g||r.e.ACCESS_TOKEN||""}`);let C={url:zt(b),headers:{"Content-Type":"text/plain"}};this.pendingRequest=r.g(C,S=>{this.pendingRequest=null,u(S),this.saveEventData(),this.processRequests(g)})}getSessionAPI(_,l,u,g){this.skuToken=l,this.errorCb=g,r.e.SESSION_PATH&&r.e.API_URL&&(u||r.e.ACCESS_TOKEN?this.queueRequest({id:_,timestamp:Date.now()},u):this.errorCb(new Error(ht)))}processRequests(_){if(this.pendingRequest||this.queue.length===0)return;let{id:l,timestamp:u}=this.queue.shift();l&&this.success[l]||this.getSession(u,this.skuToken,g=>{g?this.errorCb(g):l&&(this.success[l]=!0)},_)}remove(){this.errorCb=null}},Vn=An.getSessionAPI.bind(An),Fn=new Set;function Lo(_,l){l?Fn.add(_):Fn.delete(_)}class gr{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,u){this._updatedSourceCaches[l]=u,this.setDirty()}discardSourceCacheUpdate(l){delete this._updatedSourceCaches[l]}updateLayer(l){let u=l.scope;this._updatedLayers[u]=this._updatedLayers[u]||new Set,this._updatedLayers[u].add(l.id),this.setDirty()}removeLayer(l){let u=l.scope;this._removedLayers[u]=this._removedLayers[u]||{},this._updatedLayers[u]=this._updatedLayers[u]||new Set,this._removedLayers[u][l.id]=l,this._updatedLayers[u].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 u in this._updatedLayers)l[u]=l[u]||{},l[u].updatedIds=Array.from(this._updatedLayers[u].values());for(let u in this._removedLayers)l[u]=l[u]||{},l[u].removedIds=Object.keys(this._removedLayers[u]);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,u){this._updatedImages[u]=this._updatedImages[u]||new Set,this._updatedImages[u].add(r.I.toString(l)),this.setDirty()}resetUpdatedImages(l){this._updatedImages[l]&&this._updatedImages[l].clear()}reset(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSourceCaches={},this._updatedPaintProps.clear(),this._updatedImages={}}}function pe(_){let{userImage:l}=_;return!!(l&&l.render&&l.render())&&(_.data.replace(new Uint8Array(l.data.buffer)),!0)}class Qt extends r.E{constructor(l){super(),this.imageProviders=new Map,this.images=new Map,this.updatedImages=new Map,this.callbackDispatchedThisFrame=new Map,this.loaded=new Map,this.requestors=[],this.patterns=new Map,this.patternsInFlight=new Set,this.atlasImage=new Map,this.atlasTexture=new Map,this.dirty=!0,this.spriteFormat=l,l!=="raster"&&r.r()&&(this.imageRasterizerDispatcher=new r.D(r.t(),this,"Image Rasterizer Worker",1))}addScope(l){this.loaded.set(l,!1),this.imageProviders.set(l,new Map),this.images.set(l,new Map),this.updatedImages.set(l,new Set),this.callbackDispatchedThisFrame.set(l,new Set),this.patterns.set(l,new Map),this.atlasImage.set(l,new r.q({width:1,height:1}))}removeScope(l){this.loaded.delete(l),this.imageProviders.delete(l),this.images.delete(l),this.updatedImages.delete(l),this.callbackDispatchedThisFrame.delete(l),this.patterns.delete(l),this.atlasImage.delete(l);let u=this.atlasTexture.get(l);u&&(u.destroy(),this.atlasTexture.delete(l))}addImageProvider(l,u){this.imageProviders.has(u)||this.imageProviders.set(u,new Map),this.imageProviders.get(u).set(l.id,l)}removeImageProvider(l,u){this.imageProviders.has(u)&&this.imageProviders.get(u).delete(l)}getPendingImageProviders(){let l=[];for(let u of this.imageProviders.values())for(let g of u.values())g.hasPendingRequests()&&l.push(g);return l}get imageRasterizer(){return this._imageRasterizer||(this._imageRasterizer=new r.x),this._imageRasterizer}isLoaded(){for(let l of this.loaded.keys())if(!this.loaded.get(l))return!1;return!0}setLoaded(l,u){if(this.loaded.get(u)!==l&&(this.loaded.set(u,l),l)){for(let{ids:g,callback:b}of this.requestors)this._notify(g,u,b);this.requestors=[]}}hasImage(l,u){return!!this.getImage(l,u)}getImage(l,u){return this.images.get(u).get(l.toString())}addImage(l,u,g){this._validate(l,g)&&this.images.get(u).set(l.toString(),g)}_validate(l,u){let g=!0;return this._validateStretch(u.stretchX,u.data&&u.data.width)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "stretchX" value`))),g=!1),this._validateStretch(u.stretchY,u.data&&u.data.height)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "stretchY" value`))),g=!1),this._validateContent(u.content,u)||(this.fire(new r.y(new Error(`Image "${l.name}" has invalid "content" value`))),g=!1),g}_validateStretch(l,u){if(!l)return!0;let g=0;for(let b of l){if(b[0]r.I.from(u))}getImages(l,u,g){let b=[],C=[],S=this.imageProviders.get(u);for(let z of l){if(!z.iconsetId){b.push(z);continue}let q=S.get(z.iconsetId);q&&(this.getImage(z,u)?C.push(z):q.addPendingRequest(z))}if(b.length===0)return void this._notify(C,u,g);let E=!0,k=!!this.loaded.get(u),F=this.images.get(u);if(!k)for(let z of b)F.has(z.toString())||(E=!1);k||E?this._notify(b,u,g):this.requestors.push({ids:b,scope:u,callback:g})}rasterizeImages(l,u){let g=new Map,{tasks:b,scope:C}=l;for(let[S,E]of b.entries()){let k=this.getImage(E.id,C);k&&g.set(S,{image:k,imageVariant:E})}this._rasterizeImages(C,g,u)}_rasterizeImages(l,u,g){if(r.r())this.imageRasterizerDispatcher.getActor().send("rasterizeImagesWorker",{tasks:u,scope:l},g);else{let b=new Map;for(let[C,{image:S,imageVariant:E}]of u.entries())b.set(C,this.imageRasterizer.rasterize(E,S,l,0));g(void 0,b)}}getUpdatedImages(l){return this.updatedImages.get(l)||new Set}_notify(l,u,g){let b=this.images.get(u),C=new Map;for(let S of l){if(!b.get(S.toString())){if(S.iconsetId)continue;this.fire(new r.z("styleimagemissing",{id:S.name}))}let E=b.get(S.toString());if(!E){r.w(`Image "${S.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 k={data:E.usvg?null:E.data.clone(),pixelRatio:E.pixelRatio,sdf:E.sdf,usvg:E.usvg,version:E.version,stretchX:E.stretchX,stretchY:E.stretchY,content:E.content,hasRenderCallback:!!(E.userImage&&E.userImage.render)};E.usvg&&Object.assign(k,{width:E.icon.usvg_tree.width,height:E.icon.usvg_tree.height}),C.set(r.I.toString(S),k)}g(null,C)}getPixelSize(l){let{width:u,height:g}=this.atlasImage.get(l);return{width:u,height:g}}getPattern(l,u,g){let b=l.toString(),C=this.patterns.get(u),S=C.get(b),E=this.getImage(l,u);if(!E)return null;if(S){if(S.position.version===E.version)return S.position;S.position.version=E.version}else{if(E.usvg&&!E.data){let k=this.getPatternInFlightId(b,u);if(this.patternsInFlight.has(k))return null;this.patternsInFlight.add(k);let F=new r.A(l).scaleSelf(r.o.devicePixelRatio),z=new Map([[F.toString(),{image:E,imageVariant:F}]]);return this._rasterizeImages(u,z,(q,U)=>this.storePatternImage(F,u,E,g,U)),null}this.storePattern(l,u,E)}return this._updatePatternAtlas(u,g),C.get(b).position}getPatternInFlightId(l,u){return r.B(l,u)}hasPatternsInFlight(){return this.patternsInFlight.size!==0}storePatternImage(l,u,g,b,C){let S=l.toString(),E=C?C.get(S):void 0;E&&(g.data=E,this.storePattern(l.id,u,g),this._updatePatternAtlas(u,b),this.patternsInFlight.delete(this.getPatternInFlightId(l.id.toString(),u)))}storePattern(l,u,g){let b={w:g.data.width+2*r.C,h:g.data.height+2*r.C,x:0,y:0},C=new r.F(b,g,r.C);this.patterns.get(u).set(l.toString(),{bin:b,position:C})}destroyAtlasTextures(){for(let l of this.atlasTexture.values())l&&l.destroy();this.atlasTexture.clear()}bind(l,u){let g=l.gl,b=this.atlasTexture.get(u);b?this.dirty&&(b.update(this.atlasImage.get(u)),this.dirty=!1):(b=new r.T(l,this.atlasImage.get(u),g.RGBA8),this.atlasTexture.set(u,b)),b.bind(g.LINEAR,g.CLAMP_TO_EDGE)}_updatePatternAtlas(l,u){let g=this.patterns.get(l),b=Array.from(g.values()).map(({bin:F})=>F),{w:C,h:S}=r.G(b),E=this.atlasImage.get(l);E.resize({width:C||1,height:S||1});let k=this.images.get(l);for(let[F,{bin:z,position:q}]of g.entries()){let U=q.padding,Y=z.x+U,X=z.y+U,J=k.get(F).data,ae=J.width,ne=J.height;U=U>1?U-1:U,r.q.copy(J,E,{x:0,y:0},{x:Y,y:X},{width:ae,height:ne},u),r.q.copy(J,E,{x:0,y:ne-U},{x:Y,y:X-U},{width:ae,height:U},u),r.q.copy(J,E,{x:0,y:0},{x:Y,y:X+ne},{width:ae,height:U},u),r.q.copy(J,E,{x:ae-U,y:0},{x:Y-U,y:X},{width:U,height:ne},u),r.q.copy(J,E,{x:0,y:0},{x:Y+ae,y:X},{width:U,height:ne},u),r.q.copy(J,E,{x:ae-U,y:ne-U},{x:Y-U,y:X-U},{width:U,height:U},u),r.q.copy(J,E,{x:0,y:ne-U},{x:Y+ae,y:X-U},{width:U,height:U},u),r.q.copy(J,E,{x:0,y:0},{x:Y+ae,y:X+ne},{width:U,height:U},u),r.q.copy(J,E,{x:ae-U,y:0},{x:Y-U,y:X+ne},{width:U,height:U},u)}this.dirty=!0}beginFrame(){for(let l of this.images.keys())this.callbackDispatchedThisFrame.set(l,new Set)}dispatchRenderCallbacks(l,u){let g=this.images.get(u);for(let b of l){if(this.callbackDispatchedThisFrame.get(u).has(b.toString()))continue;this.callbackDispatchedThisFrame.get(u).add(b.toString());let C=g.get(b.toString());pe(C)&&this.updateImage(b,u,C)}}destroy(){this.imageRasterizerDispatcher&&this.imageRasterizerDispatcher.remove()}}function Wt(_){let l=_.value,u=_.valueSpec,g=_.style,b=_.styleSpec,C=_.key,S=_.arrayElementValidator||Cs;if(!Array.isArray(l))return[new r.V(C,l,`array expected, ${r.K(l)} found`)];if(u.length&&l.length!==u.length)return[new r.V(C,l,`array length ${u.length} expected, length ${l.length} found`)];if(u["min-length"]&&l.lengthb)return[new r.V(l,u,`${u} is greater than the maximum value ${b}`)]}return[]}function Ze(_){let l=_.key,u=_.value;if(!r.H(u))return[new r.V(l,u,`object expected, ${r.K(u)} found`)];let g=_.valueSpec,b=r.J(u.type),C,S,E,k={},F=b!=="categorical"&&u.property===void 0,z=!F,q=(function(J){let ae=J.stops;return Array.isArray(ae)&&Array.isArray(ae[0])&&r.H(ae[0][0])})(u),U=rl({key:_.key,value:_.value,valueSpec:_.styleSpec.function,style:_.style,styleSpec:_.styleSpec,objectElementValidators:{stops:function(J){if(b==="identity")return[new r.V(J.key,J.value,'identity function may not have a "stops" property')];let ae=[],ne=J.value;return ae=ae.concat(Wt({key:J.key,value:ne,valueSpec:J.valueSpec,style:J.style,styleSpec:J.styleSpec,arrayElementValidator:Y})),Array.isArray(ne)&&ne.length===0&&ae.push(new r.V(J.key,ne,"array must have at least one stop")),ae},default:function(J){return Cs({key:J.key,value:J.value,valueSpec:g,style:J.style,styleSpec:J.styleSpec})}}});return b==="identity"&&F&&U.push(new r.V(_.key,_.value,'missing required property "property"')),b==="identity"||u.stops||U.push(new r.V(_.key,_.value,'missing required property "stops"')),b==="exponential"&&g.expression&&!r.M(g)&&U.push(new r.V(_.key,_.value,"exponential functions not supported")),_.styleSpec.$version>=8&&(z&&!r.N(g)?U.push(new r.V(_.key,_.value,"property functions not supported")):F&&!r.O(g)&&U.push(new r.V(_.key,_.value,"zoom functions not supported"))),b!=="categorical"&&!q||u.property!==void 0||U.push(new r.V(_.key,_.value,'"property" property is required')),U;function Y(J){let ae=[],ne=J.value,ce=J.key;if(!Array.isArray(ne))return[new r.V(ce,ne,`array expected, ${r.K(ne)} found`)];if(ne.length!==2)return[new r.V(ce,ne,`array length 2 expected, length ${ne.length} found`)];if(q){if(!r.H(ne[0]))return[new r.V(ce,ne,`object expected, ${r.K(ne[0])} found`)];let _e=ne[0];if(_e.zoom===void 0)return[new r.V(ce,ne,"object stop key must have zoom")];if(_e.value===void 0)return[new r.V(ce,ne,"object stop key must have value")];let xe=r.J(_e.zoom);if(typeof xe!="number")return[new r.V(ce,_e.zoom,"stop zoom values must be numbers")];if(E&&E>xe)return[new r.V(ce,_e.zoom,"stop zoom values must appear in ascending order")];xe!==E&&(E=xe,S=void 0,k={}),ae=ae.concat(rl({key:`${ce}[0]`,value:ne[0],valueSpec:{zoom:{}},style:J.style,styleSpec:J.styleSpec,objectElementValidators:{zoom:at,value:X}}))}else ae=ae.concat(X({key:`${ce}[0]`,value:ne[0],style:J.style,styleSpec:J.styleSpec},ne));return r.Q(r.S(ne[1]))?ae.concat([new r.V(`${ce}[1]`,ne[1],"expressions are not allowed in function stops.")]):ae.concat(Cs({key:`${ce}[1]`,value:ne[1],valueSpec:g,style:J.style,styleSpec:J.styleSpec}))}function X(J,ae){let ne=r.K(J.value),ce=r.J(J.value),_e=J.value!==null?J.value:ae;if(C){if(ne!==C)return[new r.V(J.key,_e,`${ne} stop domain type must match previous stop domain type ${C}`)]}else C=ne;if(ne!=="number"&&ne!=="string"&&ne!=="boolean"&&typeof ce!="number"&&typeof ce!="string"&&typeof ce!="boolean")return[new r.V(J.key,_e,"stop domain value must be a number, string, or boolean")];if(ne!=="number"&&b!=="categorical"){let xe=`number expected, ${ne} found`;return r.N(g)&&b===void 0&&(xe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new r.V(J.key,_e,xe)]}return b!=="categorical"||ne!=="number"||typeof ce=="number"&&isFinite(ce)&&Math.floor(ce)===ce?b!=="categorical"&&ne==="number"&&typeof ce=="number"&&typeof S=="number"&&S!==void 0&&cenew r.V(`${_.key}${g.key}`,_.value,g.message));let u=l.value.expression||l.value._styleExpression.expression;if(_.expressionContext==="property"&&_.propertyKey==="text-font"&&!u.outputDefined())return[new r.V(_.key,_.value,`Invalid data expression for "${_.propertyKey}". Output values must be contained as literals within the expression.`)];if(_.expressionContext==="property"&&_.propertyType==="layout"&&!r.Z(u))return[new r.V(_.key,_.value,'"feature-state" data expressions are not supported with layout properties.')];if(_.expressionContext==="filter")return Si(u,_);if(_.expressionContext==="appearance")return Li(u,_);if(_.expressionContext&&_.expressionContext.indexOf("cluster")===0){if(!r.X(u,["zoom","feature-state"]))return[new r.V(_.key,_.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(_.expressionContext==="cluster-initial"&&!r.Y(u))return[new r.V(_.key,_.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Si(_,l){let u=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(l.valueSpec&&l.valueSpec.expression)for(let b of l.valueSpec.expression.parameters)u.delete(b);if(u.size===0)return[];let g=[];return _ instanceof r._&&u.has(_.name)?[new r.V(l.key,l.value,`["${_.name}"] expression is not supported in a filter for a ${l.object.type} layer with id: ${l.object.id}`)]:(_.eachChild(b=>{g.push(...Si(b,l))}),g)}function Li(_,l){let u=new Set;if(l.valueSpec&&l.valueSpec.expression)for(let b of l.valueSpec.expression.parameters)u.add(b);if(u.size===0)return[];let g=[];return _ instanceof r._&&!u.has(_.name)?[new r.V(l.key,l.value,`["${_.name}"] is not an allowed parameter`)]:(_.eachChild(b=>{g.push(...Li(b,l))}),g)}function Zt(_){let l=_.key,u=_.value,g=_.valueSpec,b=[];return Array.isArray(g.values)?g.values.indexOf(r.J(u))===-1&&b.push(new r.V(l,u,`expected one of [${g.values.join(", ")}], ${JSON.stringify(u)} found`)):Object.keys(g.values).indexOf(r.J(u))===-1&&b.push(new r.V(l,u,`expected one of [${Object.keys(g.values).join(", ")}], ${JSON.stringify(u)} found`)),b}function sn(_){return r.a2(r.S(_.value))?Dt(Object.assign({},_,{expressionContext:"filter",valueSpec:_.styleSpec[`filter_${_.layerType||"fill"}`]})):bn(_)}function bn(_){let l=_.value,u=_.key;if(!Array.isArray(l))return[new r.V(u,l,`array expected, ${r.K(l)} found`)];if(l.length<1)return[new r.V(u,l,"filter array must have at least 1 element")];let g=_.styleSpec,b=Zt({key:`${u}[0]`,value:l[0],valueSpec:g.filter_operator});switch(r.J(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&r.J(l[1])==="$type"&&b.push(new r.V(u,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&b.push(new r.V(u,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(r.a0(l[1])||b.push(new r.V(`${u}[1]`,l[1],`string expected, ${r.K(l[1])} found`)));for(let C=2;C{F in u&&l.push(new r.V(g,u[F],`"${F}" is prohibited for ref layers`))}),b.layers.forEach(F=>{r.J(F.id)===E&&(k=F)}),k?k.ref?l.push(new r.V(g,u.ref,"ref cannot reference another ref layer")):S=r.J(k.type):typeof E=="string"&&l.push(new r.V(g,u.ref,`ref layer "${E}" not found`))}else if(S!=="background"&&S!=="sky"&&S!=="slot")if(u.source)if(r.a0(u.source)){let k=b.sources&&b.sources[u.source],F=k&&r.J(k.type);k?F==="vector"&&S==="raster"?l.push(new r.V(g,u.source,`layer "${u.id}" requires a raster source`)):F==="raster"&&S!=="raster"?l.push(new r.V(g,u.source,`layer "${u.id}" requires a vector source`)):F!=="vector"||u["source-layer"]?F==="raster-dem"&&S!=="hillshade"?l.push(new r.V(g,u.source,"raster-dem source can only be used with layer type 'hillshade'.")):F!=="raster-array"||["raster","raster-particle"].includes(S)?S==="line"&&u.paint&&(u.paint["line-gradient"]||u.paint["line-trim-offset"])&&F==="geojson"&&!k.lineMetrics?l.push(new r.V(g,u,`layer "${u.id}" specifies a line-gradient, which requires the GeoJSON source to have \`lineMetrics\` enabled.`)):S==="raster-particle"&&F!=="raster-array"&&l.push(new r.V(g,u.source,`layer "${u.id}" requires a 'raster-array' source.`)):l.push(new r.V(g,u.source,"raster-array source can only be used with layer type 'raster'.")):l.push(new r.V(g,u,`layer "${u.id}" must specify a "source-layer"`)):l.push(new r.V(g,u.source,`source "${u.source}" not found`))}else l.push(new r.V(`${g}.source`,u.source,'"source" must be a string'));else l.push(new r.V(g,u,'missing required property "source"'));return l=l.concat(rl({key:g,value:u,valueSpec:C.layer,style:_.style,styleSpec:_.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Cs({key:`${g}.type`,value:u.type,valueSpec:C.layer.type,style:_.style,styleSpec:_.styleSpec,object:u,objectKey:"type"}),filter:k=>sn(Object.assign({layerType:S},k)),layout:k=>rl({layer:u,key:k.key,value:k.value,valueSpec:{},style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":F=>Fo(Object.assign({layerType:S},F))}}),paint:k=>rl({layer:u,key:k.key,value:k.value,valueSpec:{},style:k.style,styleSpec:k.styleSpec,objectElementValidators:{"*":F=>Sn(Object.assign({layerType:S,layer:u},F))}}),appearances(k){let F=Wt({key:k.key,value:k.value,valueSpec:k.valueSpec,style:k.style,styleSpec:k.styleSpec,arrayElementValidator:U=>(function(Y){let{key:X,layer:J,layerType:ae}=Y,ne=r.J(Y.value),ce=r.J(ne.name),_e=r.J(ne.condition),xe=rl({key:X,value:ne,valueSpec:Y.styleSpec.appearance,style:Y.style,styleSpec:Y.styleSpec,objectElementValidators:{condition:Pe=>(function(ke){let Ne=[];return Ne.push(...Dt({key:ke.key,value:ke.object.condition,valueSpec:r.a6.appearance.condition,expressionContext:"appearance"})),Ne})(Object.assign({layer:J,layerType:ae},Pe)),properties:Pe=>(function(ke){let Ne=[],{styleSpec:Me,layer:De,layerType:Be}=ke,bt=Me[`paint_${Be}`],nt=Me[`layout_${Be}`],kt=ke.object[ke.objectKey];for(let ft in kt){let At=ft in bt?"paint":ft in nt?"layout":void 0;if(!At){Ne.push(new r.V(ke.key,ft,`unknown property "${ft}" for layer type "${Be}"`));continue}let pi=Object.assign({},ke,{key:`${ke.key}.${ft}`,object:kt,objectKey:ft,layer:De,layerType:Be,value:kt[ft],valueSpec:At==="paint"?bt[ft]:nt[ft]});Ne.push(...nn(pi,At))}return Ne})(Object.assign({layer:J,layerType:ae},Pe))}});return ce==="hidden"||_e||xe.push(new r.V(Y.key,"name",'Appearance with name different than "hidden" must have a condition')),xe})(Object.assign({layerType:S,layer:u},U))}),z=Array.isArray(k.value)?k.value:[],q=new Set;return z.forEach((U,Y)=>{let X=r.J(U.name);if(X)if(q.has(X)){let J=r.J(u.id);F.push(new r.V(k.key,X,`Duplicated appearance name "${X}" for layer "${J}"`))}else q.add(X)}),F}}})),l}function ha({key:_,value:l}){return r.a0(l)?[]:[new r.V(_,l,`string expected, ${r.K(l)} found`)]}let cd={promoteId:function _({key:l,value:u}){if(r.a0(u))return ha({key:l,value:u});if(Array.isArray(u)){let b=[],C=r.S(u),S=r.U(C);return S.result==="error"&&S.value.forEach(E=>{b.push(new r.V(`${l}${E.key}`,null,`${E.message}`))}),r.X(S.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"])||b.push(new r.V(`${l}`,null,"promoteId expression should be only feature dependent")),b}if(!r.H(u))return[new r.V(l,u,`string, expression or object expected, "${r.K(u)}" found`)];let g=[];for(let b in u)g.push(..._({key:`${l}.${b}`,value:u[b]}));return g}};function rs(_){let l=_.value,u=_.key,g=_.styleSpec,b=_.style;if(!r.H(l))return[new r.V(u,l,`object expected, ${r.K(l)} found`)];if(!("type"in l))return[new r.V(u,l,'"type" is required')];let C=r.J(l.type),S=[];switch(["vector","raster","raster-dem","raster-array"].includes(C)&&("url"in l||"tiles"in l||S.push(new r.a3(u,l,'Either "url" or "tiles" is required.'))),C){case"vector":case"raster":case"raster-dem":case"raster-array":return S=S.concat(rl({key:u,value:l,valueSpec:g[`source_${C.replace("-","_")}`],style:_.style,styleSpec:g,objectElementValidators:cd})),S;case"geojson":if(S=rl({key:u,value:l,valueSpec:g.source_geojson,style:b,styleSpec:g,objectElementValidators:cd}),"cluster"in l&&"clusterProperties"in l){if(!r.H(l.clusterProperties))return[new r.V(`${u}.clusterProperties`,l,`object expected, ${r.K(l)} found`)];for(let E in l.clusterProperties){let k=l.clusterProperties[E];if(!Array.isArray(k))return[new r.V(`${u}.clusterProperties.${E}`,k,"array expected")];let[F,z]=k,q=typeof F=="string"?[F,["accumulated"],["get",E]]:F;S.push(...Dt({key:`${u}.${E}.map`,value:z,expressionContext:"cluster-map"})),S.push(...Dt({key:`${u}.${E}.reduce`,value:q,expressionContext:"cluster-reduce"}))}}return S;case"video":return rl({key:u,value:l,valueSpec:g.source_video,style:b,styleSpec:g});case"image":return rl({key:u,value:l,valueSpec:g.source_image,style:b,styleSpec:g});case"canvas":return[new r.V(u,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Zt({key:`${u}.type`,value:l.type,valueSpec:{values:oa(g)}})}}function oa(_){return _.source.reduce((l,u)=>{let g=_[u];return g.type.type==="enum"&&(l=l.concat(Object.keys(g.type.values))),l},[])}function Es(_){let l=_.value,u=_.styleSpec,g=u.light,b=_.style;if(l===void 0)return[];if(!r.H(l))return[new r.V("light",l,`object expected, ${r.K(l)} found`)];let C=[];for(let S in l){let E=S.match(/^(.*)-transition$/),k=S.match(/^(.*)-use-theme$/);C=C.concat(k&&g[k[1]]?Cs({key:S,value:l[S],valueSpec:{type:"string"},style:b,styleSpec:u}):E&&g[E[1]]&&g[E[1]].transition?Cs({key:S,value:l[S],valueSpec:u.transition,style:b,styleSpec:u}):g[S]?Cs({key:S,value:l[S],valueSpec:g[S],style:b,styleSpec:u}):[new r.V(S,l[S],`unknown property "${S}"`)])}return C}function Uc(_){let l=_.value;if(!l)return[];let u=_.key;if(!r.H(l))return[new r.V(u,l,`object expected, ${r.K(l)} found`)];let g=[],b=_.styleSpec,C=b["light-3d"],S=_.style,E=_.style.lights;for(let z of["type","id"])if(!(z in l))return g=g.concat([new r.V(u,l,`missing property "${z}"`)]),g;if(!r.a0(l.type))return g=g.concat([new r.V(`${u}.type`,l.type,"string expected")]),g;if(E)for(let z=0;z<_.arrayIndex;z++){let q=r.J(l.type),U=E[z];r.J(U.type)===q&&g.push(new r.V(u,l.id,`duplicate light type "${l.type}", previously defined at line ${U.id.__line__}`))}let k=`properties_light_${l.type}`;if(!(k in b))return g=g.concat([new r.V(`${u}.type`,l,`Invalid light type ${l.type}`)]),g;let F=b[k];for(let z in l)if(z==="properties"){let q=l[z];if(!r.H(q))return g=g.concat([new r.V("properties",q,`object expected, ${r.K(q)} found`)]),g;for(let U in q){let Y=U.match(/^(.*)-transition$/),X=U.match(/^(.*)-use-theme$/);g=g.concat(X&&F[X[1]]?Cs({key:z,value:q[U],valueSpec:{type:"string"},style:S,styleSpec:b}):Y&&F[Y[1]]&&F[Y[1]].transition?Cs({key:z,value:l[z],valueSpec:b.transition,style:S,styleSpec:b}):F[U]?Cs({key:U,value:q[U],valueSpec:F[U],style:S,styleSpec:b}):[new r.a3(_.key,q[U],`unknown property "${U}"`)])}}else g=g.concat(C[z]?Cs({key:z,value:l[z],valueSpec:C[z],style:S,styleSpec:b}):[new r.a3(z,l[z],`unknown property "${z}"`)]);return g}function wd(_){let l=_.value,u=_.key,g=_.style,b=_.styleSpec,C=b.terrain;if(l==null)return[];if(!r.H(l))return[new r.V("terrain",l,`object expected, ${r.K(l)} found`)];let S=[];for(let E in l){let k=E.match(/^(.*)-transition$/),F=E.match(/^(.*)-use-theme$/);S=S.concat(F&&C[F[1]]?Cs({key:E,value:l[E],valueSpec:{type:"string"},style:g,styleSpec:b}):k&&C[k[1]]&&C[k[1]].transition?Cs({key:E,value:l[E],valueSpec:b.transition,style:g,styleSpec:b}):C[E]?Cs({key:E,value:l[E],valueSpec:C[E],style:g,styleSpec:b}):[new r.a3(E,l[E],`unknown property "${E}"`)])}if(l.source)if(r.a0(l.source)){let E=g.sources&&g.sources[l.source],k=E&&r.J(E.type);E?k!=="raster-dem"&&S.push(new r.V(`${u}.source`,l.source,`terrain cannot be used with a source of type ${k}, it only be used with a "raster-dem" source type`)):S.push(new r.V(`${u}.source`,l.source,`source "${l.source}" not found`))}else S.push(new r.V(`${u}.source`,l.source,"source must be a string"));else S.push(new r.V(u,l,'terrain is missing required property "source"'));return S}function Bl(_){let l=_.value,u=_.style,g=_.styleSpec,b=g.fog;if(l===void 0)return[];if(!r.H(l))return[new r.V("fog",l,`object expected, ${r.K(l)} found`)];let C=[];for(let S in l){let E=S.match(/^(.*)-transition$/),k=S.match(/^(.*)-use-theme$/);C=C.concat(k&&b[k[1]]?Cs({key:S,value:l[S],valueSpec:{type:"string"},style:u,styleSpec:g}):E&&b[E[1]]&&b[E[1]].transition?Cs({key:S,value:l[S],valueSpec:g.transition,style:u,styleSpec:g}):b[S]?Cs({key:S,value:l[S],valueSpec:b[S],style:u,styleSpec:g}):[new r.a3(S,l[S],`unknown property "${S}"`)])}return C}let lh={"*":()=>[],array:Wt,boolean:function(_){let l=_.value,u=_.key;return r.$(l)?[]:[new r.V(u,l,`boolean expected, ${r.K(l)} found`)]},number:at,color:function({key:_,value:l}){return r.a0(l)?r.a1.parseCSSColor(l)===null?[new r.V(_,l,`color expected, "${l}" found`)]:[]:[new r.V(_,l,`color expected, ${r.K(l)} found`)]},enum:Zt,filter:sn,function:Ze,layer:Yo,object:rl,source:rs,model:r.a7,light:Es,"light-3d":Uc,terrain:wd,fog:Bl,string:ha,formatted:function(_){return ha(_).length===0?[]:Dt(_)},resolvedImage:function(_){return ha(_).length===0?[]:Dt(_)},projection:function(_){let l=_.value,u=_.styleSpec,g=u.projection,b=_.style;if(r.H(l)){let C=[];for(let S in l)C=C.concat(Cs({key:S,value:l[S],valueSpec:g[S],style:b,styleSpec:u}));return C}return r.a0(l)?[]:[new r.V("projection",l,`object or string expected, ${r.K(l)} found`)]},import:function(_){let l=_.key,{value:u,styleSpec:g}=_;if(!r.H(u))return[new r.V(l,u,"import must be an object")];let E=u,{data:b}=E,C=Lp(E,["data"]);Object.defineProperty(C,"__line__",{value:u.__line__,enumerable:!1});let S=rl(Object.assign({},_,{value:C,valueSpec:g.import}));return r.J(C.id)===""&&S.push(new r.V(`${_.key}.id`,C,"import id can't be an empty string")),b&&(S=S.concat(ch(b,g,{key:`${_.key}.data`}))),S},iconset:function(_){let l=_.value,u=_.key,g=_.styleSpec,b=_.style;if(!r.H(l))return[new r.V(u,l,"object expected")];if(!l.type)return[new r.V(u,l,'"type" is required')];let C=r.J(l.type),S=[];if(S=S.concat(rl({key:u,value:l,valueSpec:g[`iconset_${C}`],style:b,styleSpec:g})),(function(E,k){return!(E!=="source"||!k.source)})(C,l)){let E=b.sources&&b.sources[l.source],k=E&&r.J(E.type);E?k!=="raster-array"&&S.push(new r.V(u,l.source,`iconset cannot be used with a source of type ${String(k)}, it only be used with a "raster-array" source type`)):S.push(new r.V(u,l.source,`source "${l.source}" not found`))}return S}};function Cs(_,l=!1){let u=_.value,g=_.valueSpec,b=_.styleSpec;if(g.expression){if(r.a4(r.J(u)))return Ze(_);if(r.Q(r.S(u)))return Dt(_)}if(g.type&&lh[g.type]){let C=lh[g.type](_);return l===!0&&C.length>0&&Array.isArray(_.value)?Dt(_):C}return rl(Object.assign({},_,{valueSpec:g.type?b[g.type]:g}))}function rl(_){let l=_.key,u=_.value,g=_.valueSpec||{},b=_.objectElementValidators||{},C=_.style,S=_.styleSpec;if(!r.H(u))return[new r.V(l,u,`object expected, ${r.K(u)} found`)];let E=[];for(let k in u){let F=k.split(".")[0],z;b[F]?z=b[F]:g[F]?z=Cs:b["*"]?z=b["*"]:g["*"]&&(z=Cs),z?E=E.concat(z({key:(l&&`${l}.`)+k,value:u[k],valueSpec:g[F]||g["*"],style:C,styleSpec:S,object:u,objectKey:k},u)):E.push(new r.a3(l,u[k],`unknown property "${k}"`))}for(let k in g)b[k]||g[k].required&&g[k].default===void 0&&u[k]===void 0&&E.push(new r.V(l,u,`missing required property "${k}"`));return E}function o_({key:_,value:l}){let u=ha({key:_,value:l});if(u.length)return u;let g=l;return g.indexOf("{fontstack}")===-1&&u.push(new r.V(_,l,'"glyphs" url must include a "{fontstack}" token')),g.indexOf("{range}")===-1&&u.push(new r.V(_,l,'"glyphs" url must include a "{range}" token')),u}function ch(_,l=r.a6,u={}){return rl({key:u.key||"",value:_,valueSpec:Object.assign(l.$root,{"*":{type:"*"}}),styleSpec:l,style:_,objectElementValidators:{glyphs:o_}})}function gc(_,l=r.a6){return He(ch(_,l))}let dh=_=>He(rs(_)),Ub=_=>He(Es(_)),tw=_=>He(Uc(_)),ai=_=>He(wd(_)),Zh=_=>He(Bl(_)),FA=_=>He((function(l){let u=l.value,g=l.style,b=l.styleSpec,C=b.snow;if(u===void 0)return[];if(!r.H(u))return[new r.V("snow",u,`object expected, ${r.K(u)} found`)];let S=[];for(let E in u){let k=E.match(/^(.*)-transition$/);S=S.concat(k&&C[k[1]]&&C[k[1]].transition?Cs({key:E,value:u[E],valueSpec:b.transition,style:g,styleSpec:b}):C[E]?Cs({key:E,value:u[E],valueSpec:C[E],style:g,styleSpec:b}):[new r.a3(E,u[E],`unknown property "${E}"`)])}return S})(_)),J0=_=>He((function(l){let u=l.value,g=l.style,b=l.styleSpec,C=b.rain;if(u===void 0)return[];if(!r.H(u))return[new r.V("rain",u,`object expected, ${r.K(u)} found`)];let S=[];for(let E in u){let k=E.match(/^(.*)-transition$/);S=S.concat(k&&C[k[1]]&&C[k[1]].transition?Cs({key:E,value:u[E],valueSpec:b.transition,style:g,styleSpec:b}):C[E]?Cs({key:E,value:u[E],valueSpec:C[E],style:g,styleSpec:b}):[new r.a3(E,u[E],`unknown property "${E}"`)])}return S})(_)),dt=_=>He(Yo(_)),oe=_=>He(sn(_)),de=_=>He(Sn(_)),Te=_=>He(Fo(_)),We=_=>He(r.a7(_));function He(_){return _.slice().sort((l,u)=>l.line&&u.line?l.line-u.line:0)}function Ue(_,l){let u=!1;if(l&&l.length)for(let g of l)g instanceof r.a3?r.w(g.message):(_.fire(new r.y(new Error(g.message))),u=!0);return u}let Tt;class ot extends r.E{constructor(l,u="flat"){super(),this._transitionable=new r.a8(Tt||(Tt=new r.a9({anchor:new r.aa(r.a6.light.anchor),position:new r.ab(r.a6.light.position),color:new r.aa(r.a6.light.color),intensity:new r.aa(r.a6.light.intensity)}))),this.setLight(l,u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,u,g={}){this._validate(Ub,l,g)||(this._transitionable.setTransitionOrValue(l),this.id=u)}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,u,g){return(!g||g.validate!==!1)&&Ue(this,l.call(gc,Object.assign({value:u,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}}let Et=class extends r.E{constructor(_,l,u,g,b){super(),this.scope=u,this._transitionable=new r.a8(new r.a9({source:new r.aa(r.a6.terrain.source),exaggeration:new r.aa(r.a6.terrain.exaggeration)}),u,g),this._transitionable.setTransitionOrValue(_,g),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=l,this.worldview=b}get(){return this._transitionable.serialize()}set(_,l){this._transitionable.setTransitionOrValue(_,l)}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}getExaggeration(_){return this._transitioning.possiblyEvaluate(new r.ac(_,{worldview:this.worldview})).get("exaggeration")}getAttenuationRange(){if(!this.isZoomDependent())return null;let _=this._transitionable._values.exaggeration;if(!_)return null;let l=_.value.expression;if(!l)return null;let u=-1,g=-1,b=1;for(let C of l.zoomStops)b=l.evaluate(new r.ac(C,{worldview:this.worldview})),b>.01?(u=C,g=-1):g=C;return b<.01&&u>0&&g>u?[u,g]:null}isZoomDependent(){let _=this._transitionable._values.exaggeration;return _!=null&&_.value!=null&&_.value.expression!=null&&_.value.expression instanceof r.ad}},hi=45,Xt=65,pn=.05;function Pn(_,l,u,g){let b=r.ah(hi,Xt,u),[C,S]=Hn(_,g),E=1-Math.min(1,Math.exp((l-C)/(S-C)*-6));return E*=E*E,E=Math.min(1,1.00747*E),E*b*_.alpha}function Hn(_,l){let u=.5/Math.tan(.5*l);return[_.range[0]+u,_.range[1]+u]}function Mo(_,l,u,g,b){let C=r.af([],[l,u,g],b.mercatorFogMatrix);return Pn(_,r.ag(C),b.pitch,b._fov)}function xo(_,l,u,g,b,C,S){let E=[[u,g,0],[b,g,0],[b,C,0],[u,C,0]],k=Number.MAX_VALUE,F=-Number.MAX_VALUE;for(let z of E){let q=r.af([],z,l),U=r.ag(q);k=Math.min(k,U),F=Math.max(F,U)}return[Pn(_,k,S.pitch,S._fov),Pn(_,F,S.pitch,S._fov)]}class No extends r.E{constructor(l,u,g,b){super();let C=new r.a9({range:new r.aa(r.a6.fog.range),color:new r.aa(r.a6.fog.color),"color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"high-color":new r.aa(r.a6.fog["high-color"]),"high-color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"space-color":new r.aa(r.a6.fog["space-color"]),"space-color-use-theme":new r.aa({type:"string","property-type":"data-constant",default:"default"}),"horizon-blend":new r.aa(r.a6.fog["horizon-blend"]),"star-intensity":new r.aa(r.a6.fog["star-intensity"]),"vertical-range":new r.aa(r.a6.fog["vertical-range"])});this._transitionable=new r.a8(C,g,new Map(b)),this.set(l,b),this._transitioning=this._transitionable.untransitioned(),this._transform=u,this.properties=new r.ai(C),this.scope=g}get state(){let l=this._transform,u=l.projection.name==="globe",g=r.aj(l.zoom),b=this.properties.get("range"),C=[.5,3];return{range:u?[r.ak(C[0],b[0],g),r.ak(C[1],b[1],g)]:b,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(l,u,g={}){if(this._validate(Zh,l,g))return;let b=Object.assign({},l);for(let C of Object.keys(r.a6.fog))b[C]===void 0&&(b[C]=r.a6.fog[C].default);this._options=b,this._transitionable.setTransitionOrValue(this._options,u)}getOpacity(l){if(!this._transform.projection.supportsFog)return 0;let u=this.properties&&this.properties.get("color")||1;return(this._transform.projection.name==="globe"?1:r.ah(hi,Xt,l))*u.a}getOpacityAtLatLng(l,u){return this._transform.projection.supportsFog?(function(g,b,C){let S=r.ae.fromLngLat(b),E=C.elevation?C.elevation.getAtPointOrZero(S):0;return Mo(g,S.x,S.y,E,C)})(this.state,l,u):0}getOpacityForTile(l){if(!this._transform.projection.supportsFog)return[1,1];let u=this._transform.calculateFogTileMatrix(l.toUnwrapped());return xo(this.state,u,0,0,r.al,r.al,this._transform)}getOpacityForBounds(l,u,g,b,C){return this._transform.projection.supportsFog?xo(this.state,l,u,g,b,C,this._transform):[1,1]}getFovAdjustedRange(l){return this._transform.projection.supportsFog?Hn(this.state,l):[0,1]}isVisibleOnFrustum(l){if(!this._transform.projection.supportsFog)return!1;let u=[4,5,6,7];for(let g of u){let b=l.points[g],C;if(b[2]>=0)C=b;else{let S=l.points[g-4];C=r.am(S,b,S[2]/(S[2]-b[2]))}if(Mo(this.state,C[0],C[1],0,this._transform)>=pn)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,u,g){return(!g||g.validate!==!1)&&Ue(this,l.call(gc,Object.assign({value:u,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}}let Xr,Ro,Zs,La,Fa=class extends r.E{constructor(_,l,u,g){super();let b=Xr||(Xr=new r.a9({density:new r.aa(r.a6.snow.density),intensity:new r.aa(r.a6.snow.intensity),color:new r.aa(r.a6.snow.color),opacity:new r.aa(r.a6.snow.opacity),vignette:new r.aa(r.a6.snow.vignette),"vignette-color":new r.aa(r.a6.snow["vignette-color"]),"center-thinning":new r.aa(r.a6.snow["center-thinning"]),direction:new r.aa(r.a6.snow.direction),"flake-size":new r.aa(r.a6.snow["flake-size"])}));this._transitionable=new r.a8(b,u,new Map(g)),this.set(_,g),this._transitioning=this._transitionable.untransitioned(),this.properties=new r.ai(b),this.scope=u}get state(){let _=this.properties.get("opacity"),l=this.properties.get("color"),u=this.properties.get("direction"),g=r.an(u[0]),b=-Math.max(r.an(u[1]),.01),C=[Math.cos(g)*Math.cos(b),Math.sin(g)*Math.cos(b),Math.sin(b)],S=this.properties.get("vignette"),E=this.properties.get("vignette-color");return E.a=S,{density:this.properties.get("density"),intensity:this.properties.get("intensity"),color:new r.ao(l.r,l.g,l.b,l.a*_),direction:C,centerThinning:this.properties.get("center-thinning"),flakeSize:this.properties.get("flake-size"),vignetteColor:E}}get(){return this._transitionable.serialize()}set(_,l,u={}){if(this._validate(FA,_,u))return;let g=Object.assign({},_);for(let b of Object.keys(r.a6.snow))g[b]===void 0&&(g[b]=r.a6.snow[b].default);this._options=g,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(_){this._transitionable.setTransitionOrValue(this._options,new Map(_))}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}_validate(_,l,u){return(!u||u.validate!==!1)&&Ue(this,_.call(gc,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}},qr=class extends r.E{constructor(_,l,u,g){super();let b=Ro||(Ro=new r.a9({density:new r.aa(r.a6.rain.density),intensity:new r.aa(r.a6.rain.intensity),color:new r.aa(r.a6.rain.color),opacity:new r.aa(r.a6.rain.opacity),vignette:new r.aa(r.a6.rain.vignette),"vignette-color":new r.aa(r.a6.rain["vignette-color"]),"center-thinning":new r.aa(r.a6.rain["center-thinning"]),direction:new r.aa(r.a6.rain.direction),"droplet-size":new r.aa(r.a6.rain["droplet-size"]),"distortion-strength":new r.aa(r.a6.rain["distortion-strength"])}));this._transitionable=new r.a8(b,u,new Map(g)),this.set(_,g),this._transitioning=this._transitionable.untransitioned(),this.properties=new r.ai(b),this.scope=u}get state(){let _=this.properties.get("opacity"),l=this.properties.get("color"),u=this.properties.get("direction"),g=r.an(u[0]),b=-Math.max(r.an(u[1]),.01),C=[Math.cos(g)*Math.cos(b),Math.sin(g)*Math.cos(b),Math.sin(b)],S=this.properties.get("vignette-color");return S.a=this.properties.get("vignette"),{density:this.properties.get("density"),intensity:this.properties.get("intensity"),color:new r.ao(l.r,l.g,l.b,l.a*_),direction:C,centerThinning:this.properties.get("center-thinning"),dropletSize:this.properties.get("droplet-size"),distortionStrength:this.properties.get("distortion-strength"),vignetteColor:S}}get(){return this._transitionable.serialize()}set(_,l,u={}){if(this._validate(J0,_,u))return;let g=Object.assign({},_);for(let b of Object.keys(r.a6.rain))g[b]===void 0&&(g[b]=r.a6.rain[b].default);this._options=g,this._transitionable.setTransitionOrValue(this._options,l)}updateConfig(_){this._transitionable.setTransitionOrValue(this._options,new Map(_))}updateTransitions(_){this._transitioning=this._transitionable.transitioned(_,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(_){this.properties=this._transitioning.possiblyEvaluate(_)}_validate(_,l,u){return(!u||u.validate!==!1)&&Ue(this,_.call(gc,Object.assign({value:l,style:{glyphs:!0,sprite:!0},styleSpec:r.a6})))}};class _r extends r.E{constructor(l,u,g,b){super(),this.scope=g,this._options=l,this.properties=new r.ai(u),this._transitionable=new r.a8(u,g,new Map(b)),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,u){this._options=l,this._transitionable.setTransitionOrValue(l.properties,u)}shadowsEnabled(){return!!this.properties&&this.properties.get("cast-shadows")===!0}}class js{constructor(l,u,g){this.screenBounds=l,this.cameraPoint=g.getCameraPoint(),this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=u,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,g)}static createFromScreenPoints(l,u){let g,b;if(l instanceof r.P||typeof l[0]=="number"){let C=r.P.convert(l);g=[C],b=u.isPointAboveHorizon(C)}else{let C=r.P.convert(l[0]),S=r.P.convert(l[1]),E=C.add(S)._div(2);g=[C,S],b=r.aq(C,S).every(k=>u.isPointAboveHorizon(k))&&u.isPointAboveHorizon(E)}return new js(g,b,u)}isPointQuery(){return this.screenBounds.length===1}bufferedScreenGeometry(l){return r.aq(this.screenBounds[0],this.screenBounds.length===1?this.screenBounds[0]:this.screenBounds[1],l)}bufferedCameraGeometry(l){let u=this.screenBounds[0],g=this.screenBounds.length===1?this.screenBounds[0].add(new r.P(1,1)):this.screenBounds[1],b=r.aq(u,g,0,!1);return this.cameraPoint.y>g.y&&(this.cameraPoint.x>u.x&&this.cameraPoint.x=g.x?b[2]=this.cameraPoint:this.cameraPoint.x<=u.x&&(b[3]=this.cameraPoint)),r.ar(b,l)}bufferedCameraGeometryGlobe(l){let u=this.screenBounds[0],g=this.screenBounds.length===1?this.screenBounds[0].add(new r.P(1,1)):this.screenBounds[1],b=r.aq(u,g,l),C=this.cameraPoint.clone();switch(3*((C.y>u.y)+(C.y>g.y))+((C.x>u.x)+(C.x>g.x))){case 0:b[0]=C,b[4]=C.clone();break;case 1:b.splice(1,0,C);break;case 2:b[1]=C;break;case 3:b.splice(4,0,C);break;case 5:b.splice(2,0,C);break;case 6:b[3]=C;break;case 7:b.splice(3,0,C);break;case 8:b[2]=C}return b}containsTile(l,u,g,b=0){let C=l.queryPadding/u._pixelsPerMercatorPixel+1,S=g?this._bufferedCameraMercator(C,u):this._bufferedScreenMercator(C,u),E=l.tileID.wrap+(S.unwrapped?b:0),k=S.polygon.map(ae=>r.as(l.tileTransform,ae,E));if(!r.at(k,0,0,r.al,r.al))return;E=l.tileID.wrap+(this.screenGeometryMercator.unwrapped?b:0);let F=this.screenGeometryMercator.polygon.map(ae=>r.au(l.tileTransform,ae,E)),z=F.map(ae=>new r.P(ae[0],ae[1])),q=u.getFreeCameraOptions().position||new r.ae(0,0,0),U=r.au(l.tileTransform,q,E),Y=F.map(ae=>{let ne=r.av(ae,ae,U);return r.aw(ne,ne),new r.ax(U,ne)}),X=r.ay(l,1,u.zoom)*u._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:z,tilespaceRays:Y,bufferedTilespaceGeometry:k,bufferedTilespaceBounds:(J=r.az(k),J.min.x=r.aA(J.min.x,0,r.al),J.min.y=r.aA(J.min.y,0,r.al),J.max.x=r.aA(J.max.x,0,r.al),J.max.y=r.aA(J.max.y,0,r.al),J),tile:l,tileID:l.tileID,pixelToTileUnitsFactor:X};var J}_bufferedScreenMercator(l,u){let g=zl(l);if(this._screenRaycastCache[g])return this._screenRaycastCache[g];{let b;return b=u.projection.name==="globe"?this._projectAndResample(this.bufferedScreenGeometry(l),u):{polygon:this.bufferedScreenGeometry(l).map(C=>u.pointCoordinate3D(C)),unwrapped:!0},this._screenRaycastCache[g]=b,b}}_bufferedCameraMercator(l,u){let g=zl(l);if(this._cameraRaycastCache[g])return this._cameraRaycastCache[g];{let b;return b=u.projection.name==="globe"?this._projectAndResample(this.bufferedCameraGeometryGlobe(l),u):{polygon:this.bufferedCameraGeometry(l).map(C=>u.pointCoordinate3D(C)),unwrapped:!0},this._cameraRaycastCache[g]=b,b}}_projectAndResample(l,u){let g=(function(C,S){let E=r.aB([],S.pixelMatrix,S.globeMatrix),k=[0,-r.aD,0,1],F=[0,r.aD,0,1],z=[0,0,0,1];r.aC(k,k,E),r.aC(F,F,E),r.aC(z,z,E);let q=new r.P(k[0]/k[3],k[1]/k[3]),U=new r.P(F[0]/F[3],F[1]/F[3]),Y=r.aE(C,q)&&k[3]1?Gs(C.slice(0,ae),S):[],_e=aenew r.P(us(Ne.x),Ne.y)),_e=_e.map(Ne=>new r.P(us(Ne.x),Ne.y));let xe=[...ce];xe.length===0&&xe.push(_e[_e.length-1]);let Pe=r.ak(xe[xe.length-1].y,(_e.length===0?ce[0]:_e[0]).y,ne),ke;return ke=Y?[new r.P(0,Pe),new r.P(0,0),new r.P(1,0),new r.P(1,Pe)]:[new r.P(1,Pe),new r.P(1,1),new r.P(0,1),new r.P(0,Pe)],xe.push(...ke),_e.length===0?xe.push(ce[0]):xe.push(..._e),{polygon:xe.map(Ne=>new r.ae(Ne.x,Ne.y)),unwrapped:!1}})(l,u);if(g)return g;let b=(function(C,S){let E=!1,k=-1/0,F=0;for(let q=0;qk&&(k=C[q].x,F=q);for(let q=0;q.5&&(Y.x{q.x-=1}),{polygon:C,unwrapped:E}})(Gs(l,u).map(C=>new r.P(us(C.x),C.y)),u);return{polygon:b.polygon.map(C=>new r.ae(C.x,C.y)),unwrapped:b.unwrapped}}}function Gs(_,l){return r.aG(_,u=>{let g=l.pointCoordinate3D(u);u.x=g.x,u.y=g.y},1/256)}function us(_){return _<0?1+_%1:_%1}function zl(_){return 100*_|0}function Hc(_,l,u,g,b){let C=function(E,k){if(E)return b(E);if(k){if(_.url&&k.tiles&&_.tiles&&delete _.tiles,k.variants){if(!Array.isArray(k.variants))return b(new Error("variants must be an array"));for(let z of k.variants){if(z==null||typeof z!="object"||z.constructor!==Object)return b(new Error("variant must be an object"));if(!Array.isArray(z.capabilities))return b(new Error("capabilities must be an array"));if(z.capabilities.length===1&&z.capabilities[0]==="meshopt"){k=Object.assign(k,z);break}}}let F=r.aH(Object.assign({},k,_),["tilejson","tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","extra_bounds","scheme","tileSize","encoding","vector_layers","raster_layers","worldview_options","worldview_default","worldview"]);F.tiles=l.canonicalizeTileset(F,_.url),b(null,F)}},S=(function(E,k,F){if(!E)return null;if(!k&&!F)return E;F=F||E.worldview_default;let z=Object.values(E.language||{});if(z.length===0)return null;let q=Object.values(E.worldview||{});if(q.length===0)return null;let U=z.every(X=>X===k),Y=q.every(X=>X===F);return U&&Y?E:k in(E.language_options||{})||F in(E.worldview_options||{})?null:E.language_options&&E.worldview_options?E:null})(_.data,u,g);return S?r.o.frame(()=>C(null,S)):_.url?r.m(l.transformRequest(l.normalizeSourceURL(_.url,null,u,g),r.R.Source),C):r.o.frame(()=>{let F=_,{data:E}=F,k=Lp(F,["data"]);C(null,k)})}function tu(_,l){let u=Math.pow(2,l.z),g=Math.floor(r.aF(_.getWest())*u),b=Math.floor(r.aJ(_.getNorth())*u),C=Math.ceil(r.aF(_.getEast())*u),S=Math.ceil(r.aJ(_.getSouth())*u);return l.x>=g&&l.x=b&&l.ythis.maxzoom||l.z{if(this._tileJSONRequest=null,this._loaded=!0,b)u&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${u}`),g&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${g}`),this.fire(new r.y(b));else if(C){if(Object.assign(this,C),this.hasWorldviews=!!C.worldview_options,C.worldview_default&&(this.worldviewDefault=C.worldview_default),C.vector_layers){this.vectorLayers=C.vector_layers,this.vectorLayerIds=[],this.localizableLayerIds=new Set;for(let S of C.vector_layers)this.vectorLayerIds.push(S.id),C.worldview&&C.worldview[S.source]&&this.localizableLayerIds.add(S.id)}this.tileBounds=Yh.fromTileJSON(C),St(C.tiles,this.map._requestManager._customAccessToken),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}l&&l(b)})}loaded(){return this._loaded}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest();let l=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(l))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(l){this.cancelTileJSONRequest()}serialize(){return Object.assign({},this._options)}loadTile(l,u){let g=l.tileID.canonical.url(this.tiles,this.scheme),b=this.map._requestManager.normalizeTileURL(g),C=this.map._requestManager.transformRequest(b,r.R.Tile),S=this.map.style?this.map.style.getLut(this.scope):null,E=S?{image:S.image.clone()}:null,k={request:C,data:void 0,uid:l.uid,tileID:l.tileID,tileZoom:l.tileZoom,zoom:l.tileID.overscaledZ,maxZoom:this.maxzoom,lut:E,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,pixelRatio:r.o.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:l.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:l.isExtraShadowCaster,tessellationStep:this.map._tessellationStep,scaleFactor:this.map.getScaleFactor(),worldview:this.map.getWorldview()||this.worldviewDefault};if(this.hasWorldviews&&r.h(g)&&(k.localizableLayerIds=this.localizableLayerIds),k.request.collectResourceTiming=this._collectResourceTiming,l.actor&&l.state!=="expired")l.state==="loading"?l.reloadCallback=u:l.request=l.actor.send("reloadTile",k,F.bind(this));else if(l.actor=this._tileWorkers[b]=this._tileWorkers[b]||this.dispatcher.getActor(),this.dispatcher.ready)l.request=l.actor.send("loadTile",k,F.bind(this),void 0,!0);else{let z=r.aL.call({deduped:this._deduped},k,(q,U)=>{q||!U?F.call(this,q):(k.data={cacheControl:U.cacheControl,expires:U.expires,rawData:U.rawData.slice(0)},l.actor&&l.actor.send("loadTile",k,F.bind(this),void 0,!0))},!0);l.request={cancel:z}}function F(z,q){return delete l.request,l.aborted?u(null):z&&z.status!==404?u(z):(q&&q.resourceTiming&&(l.resourceTiming=q.resourceTiming),this.map._refreshExpiredTiles&&q&&l.setExpiryData(q),l.loadVectorData(q,this.map.painter),r.aM(this.dispatcher),u(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,u){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 ey extends r.E{constructor(l,u,g,b){super(),this.id=l,this.dispatcher=g,this.setEventedParent(b),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"},u),Object.assign(this,r.aH(u,["url","scheme","tileSize"]))}load(l){this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"}));let u=this.map.getWorldview();this._tileJSONRequest=Hc(this._options,this.map._requestManager,null,u,(g,b)=>{this._tileJSONRequest=null,this._loaded=!0,g?this.fire(new r.y(g)):b&&(Object.assign(this,b),b.raster_layers&&(this.rasterLayers=b.raster_layers,this.rasterLayerIds=this.rasterLayers.map(C=>C.id)),this.tileBounds=Yh.fromTileJSON(b),St(b.tiles),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))),l&&l(g)})}loaded(){return this._loaded}onAdd(l){this.map=l,this.load()}reload(){this.cancelTileJSONRequest();let l=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(l))}setTiles(l){return this._options.tiles=l,this.reload(),this}setUrl(l){return this.url=l,this._options.url=l,this.reload(),this}onRemove(l){this.cancelTileJSONRequest()}serialize(){return Object.assign({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l,u){let g=r.o.devicePixelRatio>=2,b=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),g,this.tileSize);l.request=r.n(this.map._requestManager.transformRequest(b,r.R.Tile),(C,S,E,k)=>(delete l.request,l.aborted?(l.state="unloaded",u(null)):C?(l.state="errored",u(C)):S?(this.map._refreshExpiredTiles&&l.setExpiryData({cacheControl:E,expires:k}),l.setTexture(S,this.map.painter),l.state="loaded",r.aM(this.dispatcher),void u(null)):u(null)))}abortTile(l,u){l.request&&(l.request.cancel(),delete l.request),u&&u()}unloadTile(l,u){l.texture&&l.texture instanceof r.T?(l.destroy(!0),l.texture&&l.texture instanceof r.T&&this.map.painter.saveTileTexture(l.texture)):l.destroy(),u&&u()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function bL([_,l],u,g,{scaled:b=!0}={}){let{tileSize:C,buffer:S}=g,{x:E,y:k,z:F}=u;if(!isFinite(E)||!isFinite(k)||!isFinite(F))throw new Error("Invalid MRT header");let z=2**F,q=z*r.aF(_),U=z*r.aJ(l);return(function([Y,X],J,{scaled:ae=!0}={}){if(!J)throw new Error("bandView is undefined");let{data:ne,tileSize:ce,buffer:_e,offset:xe,scale:Pe,dimension:ke}=J;if(Y<-_e||Y>ce+_e||X<-_e||X>ce+_e)throw new Error(`Point (${Y}, ${X}) out of bounds for tileSize=${ce}, buffer=${_e}`);let Ne=(X+_e)*(ce+2*_e)+(Y+_e);if(new Uint32Array(ne.buffer)[Ne]===4294967295)return null;let Me=[];Me=ae?[]:new J.data.constructor(ke);for(let De=0;De{if(delete l.request,l.aborted)return l.state="unloaded",u(null);if(E)return E.name==="AbortError"?void 0:(l.state="errored",u(E));if(this.map._refreshExpiredTiles&&k&&l.setExpiryData({cacheControl:F,expires:z}),this.partial&&l.state!=="expired")l.state="empty";else if(!this.partial){if(!k)return u(null);l.state="loaded",l._isHeaderLoaded=!0,l._mrt=k}u(null)};l.request=this.partial?l.fetchHeader(void 0,S.bind(this)):l.actor.send("loadTile",C,S.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,u){let g=l.texturePerLayer;if(l.flushAllQueues(),g.size){l.destroy(!0);for(let b of g.values())this.map.painter.saveTileTexture(b)}else l.destroy()}prepareTile(l,u,g,b){l._isHeaderLoaded&&(l.state!=="empty"&&(l.state="reloading"),l.fetchBandForRender(u,g,b,(C,S)=>{if(C)return l.state="errored",this.fire(new r.y(C)),void this.triggerRepaint(l);S&&(l._isHeaderLoaded=!0,l.setTexturePerLayer(g,S,this.map.painter),l.state="loaded",this.triggerRepaint(l))}))}getInitialBand(l){if(!this.rasterLayers)return 0;let u=this.rasterLayers.find(({id:C})=>C===l),g=u&&u.fields,b=g&&g.bands&&g.bands;return b?b[0]:0}getTextureDescriptor(l,u,g){if(!l)return;let b=u.sourceLayer||this.rasterLayerIds&&this.rasterLayerIds[0];if(!b)return;let C=null;u instanceof r.aP?C=u.paint.get("raster-array-band"):u instanceof r.aQ&&(C=u.paint.get("raster-particle-array-band"));let S=C||this.getInitialBand(b);if(S==null)return;if(!l.textureDescriptorPerLayer.get(u.id))return void this.prepareTile(l,b,u.id,S);if(l.updateNeeded(u.id,S)&&!g)return;let E=l.textureDescriptorPerLayer.get(u.id);return Object.assign({},E,{texture:l.texturePerLayer.get(u.id)})}getImages(l,u){let g=new Map;for(let b of l)for(let C of u){let[S,E]=C.split("/"),k=b.getLayer(S);if(!k||!k.hasBand(E)||!k.hasDataForBand(E))continue;let{bytes:F,tileSize:z,buffer:q}=k.getBandView(E),U=z+2*q,Y={data:new r.q({width:U,height:U},F),pixelRatio:2,sdf:!1,usvg:!1,version:0};g.set(C,Y)}return g}queryRasterArrayValueByBandId(l,u,g){let b=u._mrt;return new Promise(C=>{let S={},E=new Set;for(let[k,F]of Object.entries(b.layers)){if(g.layerName&&k!==g.layerName)continue;let z={};S[k]=z;for(let{bands:q}of F.dataIndex)for(let U of q)g.bands&&!g.bands.includes(U)||(E.add(r.B(k,U)),u.fetchBand(k,null,U,Y=>{r.o.frame(()=>{z[U]=Y?null:bL([l.lng,l.lat],b,F.getBandView(U)),E.delete(r.B(k,U)),E.size===0&&C(S)})},!1))}E.size===0&&C(S)})}_loadTileForQuery(l,u){if(this._loadTileLoaded[l.uid])return void u(null,l._mrt);if(this._loadTilePending[l.uid])return void this._loadTilePending[l.uid].push(u);this._loadTilePending[l.uid]=[u];let g=this.map._requestManager.normalizeTileURL(l.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize),b=this.map._requestManager.transformRequest(g,r.R.Tile);l.actor.send("loadTile",{request:b,uid:l.uid,tileID:l.tileID,type:this.type,source:this.id,scope:this.scope,partial:!1},(C,S,E,k)=>C?(this._loadTilePending[l.uid].forEach(F=>F(C,null)),void delete this._loadTilePending[l.uid]):S?(this.map._refreshExpiredTiles&&S&&l.setExpiryData({cacheControl:E,expires:k}),l._mrt=S,l._isHeaderLoaded=!0,l.state="loaded",this._loadTilePending[l.uid].forEach(F=>F(null,S)),this._loadTileLoaded[l.uid]=!0,void delete this._loadTilePending[l.uid]):(this._loadTilePending[l.uid].forEach(F=>F(null,null)),void delete this._loadTilePending[l.uid]),void 0,!0)}queryRasterArrayValueByAllBands(l,u,g){return new Promise((b,C)=>{this._loadTileForQuery(u,(S,E)=>{S?C(S):b(E?this.queryRasterArrayValueByBandId(l,u,g):null)})})}queryRasterArrayValue(l,u){let g=r.aR.convert(l),b=this.findLoadedParent(g);return b&&b._mrt?u.bands||!this.partial?this.queryRasterArrayValueByBandId(g,b,u):this.queryRasterArrayValueByAllBands(g,b,u):Promise.resolve(null)}findLoadedParent(l){let u=r.ae.fromLngLat(l,this.map.transform.tileSize),g=this.maxzoom+1,b=1<0&&(E[new r.aO(_.overscaledZ,b,l.z,g,l.y-1).key]={backfilled:!1},E[new r.aO(_.overscaledZ,_.wrap,l.z,l.x,l.y-1).key]={backfilled:!1},E[new r.aO(_.overscaledZ,S,l.z,C,l.y-1).key]={backfilled:!1}),l.y+1{if(this._loaded=!0,this._pendingLoad=null,g)this.fire(new r.y(g));else{let C={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&b&&b.resourceTiming&&b.resourceTiming[this.id]&&(C.resourceTiming=b.resourceTiming[this.id]),_&&(this._partialReload=!0),this.fire(new r.z("data",C)),this._partialReload=!1,this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(_),this._coalesce=!1)})}loaded(){return this._loaded}reload(){let _=r.B(this.id,this.scope);this.map.style.clearSource(_),this._updateWorkerData()}loadTile(_,l){let u=_.actor?"reloadTile":"loadTile";_.actor=this.actor;let g=this.map.style?this.map.style.getLut(this.scope):null,b=g?{image:g.image.clone()}:null,C=this._partialReload,S={type:this.type,uid:_.uid,tileID:_.tileID,tileZoom:_.tileZoom,zoom:_.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,lut:b,scope:this.scope,pixelRatio:r.o.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,brightness:this.map.style&&this.map.style.getBrightness()||0,extraShadowCaster:_.isExtraShadowCaster,scaleFactor:this.map.getScaleFactor(),partial:C,worldview:this.map.getWorldview()};_.request=this.actor.send(u,S,(E,k)=>C&&!k?(_.state="loaded",l(null)):(delete _.request,_.destroy(),_.aborted?l(null):E?l(E):(_.loadVectorData(k,this.map.painter,u==="reloadTile"),l(null))),void 0,u==="loadTile")}abortTile(_){_.request&&(_.request.cancel(),delete _.request),_.aborted=!0}unloadTile(_,l){this.actor.send("removeTile",{uid:_.uid,type:this.type,source:this.id,scope:this.scope}),_.destroy()}onRemove(_){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return Object.assign({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends r.aS{constructor(_,l,u,g){super(_,l,u,g),this.roundZoom=!0,this.type="video",this.options=l}load(){this._loaded=!1;let _=this.options;this.urls=[];for(let l of _.urls)this.urls.push(this.map._requestManager.transformRequest(l,r.R.Source).url);r.aT(this.urls,(l,u)=>{this._loaded=!0,l?this.fire(new r.y(l)):u&&(this.video=u,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(_){if(this.video){let l=this.video.seekable;_l.end(0)?this.fire(new r.y(new r.V(`sources.${this.id}`,null,`Playback for this video can be set only between the ${l.start(0)} and ${l.end(0)}-second mark.`))):this.video.currentTime=_}}getVideo(){return this.video}onAdd(_){this.map||(this.map=_,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let _=this.map.painter.context,l=_.gl;this.texture?this.video.paused||(this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),l.texSubImage2D(l.TEXTURE_2D,0,0,0,l.RGBA,l.UNSIGNED_BYTE,this.video)):(this.texture=new r.T(_,this.video,l.RGBA8),this.texture.bind(l.LINEAR,l.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(_)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:r.aS,model:class extends r.E{constructor(_,l,u,g){super(),this.id=_,this.type="model",this.models=[],this._loaded=!1,this._options=l}load(){let _=[];for(let l in this._options.models){let u=this._options.models[l],g=r.aV(this.map._requestManager.transformRequest(u.uri,r.R.Model).url).then(b=>{if(!b)return;let C=r.aW(b),S=new r.aX(l,u.position,u.orientation,C);S.computeBoundsAndApplyParent(),this.models.push(S)}).catch(b=>{this.fire(new r.y(new Error(`Could not load model ${l} from ${u.uri}: ${b.message}`)))});_.push(g)}Promise.allSettled(_).then(()=>{this._loaded=!0,this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"}))}).catch(l=>{this._loaded=!0,this.fire(new r.y(new Error(`Could not load models: ${l.message}`)))})}onAdd(_){this.map=_,this.load()}hasTransition(){return!1}loaded(){return this._loaded}getModels(){return this.models}loadTile(_,l){}serialize(){return this._options}},"batched-model":class extends r.E{constructor(_,l,u,g){super(),this.type="batched-model",this.id=_,this.tileSize=512,this._options=l,this.tiles=this._options.tiles,this.maxzoom=l.maxzoom||19,this.minzoom=l.minzoom||0,this.roundZoom=!0,this.usedInConflation=!0,this.dispatcher=u,this.reparseOverscaled=!1,this.scheme="xyz",this._loaded=!1,this.setEventedParent(g)}onAdd(_){this.map=_,this.load()}reload(){this.cancelTileJSONRequest();let _=r.B(this.id,this.scope);this.load(()=>this.map.style.clearSource(_))}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}load(_){this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"}));let l=Array.isArray(this.map._language)?this.map._language.join():this.map._language,u=this.map.getWorldview();this._tileJSONRequest=Hc(this._options,this.map._requestManager,l,u,(g,b)=>{this._tileJSONRequest=null,this._loaded=!0,g?(l&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${l}`),u&&u.length!==2&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${u}`),this.fire(new r.y(g))):b&&(Object.assign(this,b),b.bounds&&(this.tileBounds=new Yh(b.bounds,this.minzoom,this.maxzoom)),St(b.tiles,this.map._requestManager._customAccessToken),this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))),_&&_(g)})}hasTransition(){return!1}hasTile(_){return!this.tileBounds||this.tileBounds.contains(_.canonical)}loaded(){return this._loaded}loadTile(_,l){let u=this.map._requestManager.normalizeTileURL(_.tileID.canonical.url(this.tiles,this.scheme)),g={request:this.map._requestManager.transformRequest(u,r.R.Tile),data:void 0,uid:_.uid,tileID:_.tileID,tileZoom:_.tileZoom,zoom:_.tileID.overscaledZ,tileSize:this.tileSize*_.tileID.overscaleFactor(),type:this.type,source:this.id,scope:this.scope,showCollisionBoxes:this.map.showCollisionBoxes,isSymbolTile:_.isSymbolTile,brightness:this.map.style&&this.map.style.getBrightness()||0,pixelRatio:r.o.devicePixelRatio,promoteId:this.promoteId};if(_.actor&&_.state!=="expired")if(_.state==="loading")_.reloadCallback=l;else{if(_.buckets){let C=Object.values(_.buckets);for(let S of C)S.dirty=!0;return void(_.state="loaded")}_.request=_.actor.send("reloadTile",g,b.bind(this))}else _.actor=this.dispatcher.getActor(),_.request=_.actor.send("loadTile",g,b.bind(this),void 0,!0);function b(C,S){return _.aborted?l(null):C&&C.status!==404?l(C):(this.map._refreshExpiredTiles&&S&&_.setExpiryData(S),_.loadModelData(S,this.map.painter),_.state="loaded",void l(null))}}serialize(){return Object.assign({},this._options)}},canvas:class extends r.aS{constructor(_,l,u,g){super(_,l,u,g),l.coordinates?Array.isArray(l.coordinates)&&l.coordinates.length===4&&!l.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(C=>typeof C!="number"))||this.fire(new r.y(new r.V(`sources.${_}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.y(new r.V(`sources.${_}`,null,'missing required property "coordinates"'))),l.animate&&typeof l.animate!="boolean"&&this.fire(new r.y(new r.V(`sources.${_}`,null,'optional "animate" property must be a boolean value'))),l.canvas?typeof l.canvas=="string"||l.canvas instanceof HTMLCanvasElement||this.fire(new r.y(new r.V(`sources.${_}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new r.y(new r.V(`sources.${_}`,null,'missing required property "canvas"'))),this.options=l,this.animate=l.animate===void 0||l.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.y(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(_){this.map=_,this.load(),this.canvas&&this.animate&&this.play()}onRemove(_){this.pause()}prepare(){let _=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,_=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,_=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let l=this.map.painter.context;this.texture?!_&&!this._playing||this.texture instanceof r.aU||this.texture.update(this.canvas,{premultiply:!0}):this.texture=new r.T(l,this.canvas,l.gl.RGBA8,{premultiply:!0}),this._prepareData(l)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let _ of[this.canvas.width,this.canvas.height])if(isNaN(_)||_<=0)return!0;return!1}},custom:class extends r.E{constructor(_,l,u,g){super(),this.id=_,this.type="custom",this._dataType="raster",this._dispatcher=u,this._implementation=l,this.setEventedParent(g),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new r.y(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new r.y(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new Yh(this._implementation.bounds,this.minzoom,this.maxzoom)),l.update=this._update.bind(this),l.clearTiles=this._clearTiles.bind(this),l.coveringTiles=this._coveringTiles.bind(this),Object.assign(this,r.aH(l,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return r.aH(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new r.z("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(_){this.map=_,this._loaded=!1,this.fire(new r.z("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(_),this.load()}onRemove(_){this._implementation.onRemove&&this._implementation.onRemove(_)}hasTile(_){if(this._implementation.hasTile){let{x:l,y:u,z:g}=_.canonical;return this._implementation.hasTile({x:l,y:u,z:g})}return!this.tileBounds||this.tileBounds.contains(_.canonical)}loadTile(_,l){let{x:u,y:g,z:b}=_.tileID.canonical,C=new AbortController;_.request=Promise.resolve(this._implementation.loadTile({x:u,y:g,z:b},{signal:C.signal})).then(function(S){return delete _.request,_.aborted?(_.state="unloaded",l(null)):S===void 0?(_.state="errored",l(null)):S===null?(this.loadTileData(_,{width:this.tileSize,height:this.tileSize,data:null}),_.state="loaded",l(null)):(function(E){return E instanceof ImageData||E instanceof HTMLCanvasElement||E instanceof ImageBitmap||E instanceof HTMLImageElement})(S)?(this.loadTileData(_,S),_.state="loaded",void l(null)):(_.state="errored",l(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch(S=>{S.name!=="AbortError"&&(_.state="errored",l(S))}),_.request.cancel=()=>C.abort()}loadTileData(_,l){_.setTexture(l,this.map.painter)}unloadTile(_,l){if(_.texture&&_.texture instanceof r.T?(_.destroy(!0),_.texture&&_.texture instanceof r.T&&this.map.painter.saveTileTexture(_.texture)):_.destroy(),this._implementation.unloadTile){let{x:u,y:g,z:b}=_.tileID.canonical;this._implementation.unloadTile({x:u,y:g,z:b})}l&&l()}abortTile(_,l){_.request&&_.request.cancel&&(_.request.cancel(),delete _.request),l&&l()}hasTransition(){return!1}_coveringTiles(){return this.map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(_=>({x:_.canonical.x,y:_.canonical.y,z:_.canonical.z}))}_clearTiles(){let _=r.B(this.id,this.scope);this.map.style.clearSource(_)}_update(){this.fire(new r.z("data",{dataType:"source",sourceDataType:"content"}))}}},Hb=function(_,l,u,g){let b=new ty[l.type](_,l,u,g);if(b.id!==_)throw new Error(`Expected Source id to be ${_} instead of ${b.id}`);return r.aY(["load","abort","unload","serialize","prepare"],b),b};function jb(_,l,u=""){return`${u}:${l.id||""}:${l.layer.id}:${(function(g){if("layerId"in g)return`layer:${g.layerId}`;{let{featuresetId:b,importId:C}=g;return`featureset:${b}${C?`:import:${C}`:""}`}})(_.target)}`}function hf(_,l,u,g=""){if(_.uniqueFeatureID){let b=jb(_,l,g);if(u.has(b))return!0;u.add(b)}return!1}function Gb(_,l,u,g,b=!1){let C=l.sourceCache.transform,S=l.sourceCache.tilesIn(_,l.has3DLayers,b);S.sort(BA);let E=[];for(let k of S){let F=k.tile.queryRenderedFeatures(l,k,u,g,C,b);Object.keys(F).length&&E.push({wrappedTileID:k.tile.tileID.wrapped().key,queryResults:F})}return E.length===0?{}:(function(k){let F={},z={};for(let q of k){let U=q.queryResults,Y=q.wrappedTileID,X=z[Y]=z[Y]||{};for(let J in U){let ae=U[J],ne=X[J]=X[J]||{},ce=F[J]=F[J]||[];for(let _e of ae)ne[_e.featureIndex]||(ne[_e.featureIndex]=!0,ce.push(_e))}}return F})(E)}function NA(_,l,u,g,b,C){let S={},E=g.queryRenderedSymbols(_),k=[];for(let F of Object.keys(E).map(Number))k.push(b[F]);k.sort(BA);for(let F of k){let z=F.featureIndex.lookupSymbolFeatures(E[F.bucketInstanceId],F.bucketIndex,F.sourceLayerIndex,l,u,C);for(let q in z){let U=S[q]=S[q]||[],Y=z[q];Y.sort((X,J)=>{let ae=F.featureSortOrder;if(ae){let ne=ae.indexOf(X.featureIndex);return ae.indexOf(J.featureIndex)-ne}return J.featureIndex-X.featureIndex});for(let X of Y)U.push(X)}}return S}function uh(_,l){let u=_.getRenderableIds().map(C=>_.getTileByID(C)),g=[],b={};for(let C=0;Cl.getLayer(C)).filter(Boolean);if(b.length!==0){g.layers=b,g.stateDependentLayerIds&&(g.stateDependentLayers=g.stateDependentLayerIds.map(C=>b.filter(S=>S.id===C)[0]));for(let C of b)u[C.fqid]=g}}return u}let iu=32,wp=33,Qh=new Uint16Array(8184);for(let _=0;_<2046;_++){let l=_+2,u=0,g=0,b=0,C=0,S=0,E=0;for(1&l?b=C=S=iu:u=g=E=iu;(l>>=1)>1;){let F=u+b>>1,z=g+C>>1;1&l?(b=u,C=g,u=S,g=E):(u=b,g=C,b=S,C=E),S=F,E=z}let k=4*_;Qh[k+0]=u,Qh[k+1]=g,Qh[k+2]=b,Qh[k+3]=C}let Sp=new Uint16Array(2178),jc=new Uint8Array(1089),r_=new Uint16Array(1089);function zA(_){return _===0?-.03125:_===32?.03125:0}let $b={type:2,extent:r.al,loadGeometry:()=>[[new r.P(0,0),new r.P(r.al+1,0),new r.P(r.al+1,r.al+1),new r.P(0,r.al+1),new r.P(0,0)]]};class mf{constructor(l,u,g,b,C,S){this.tileID=l,this.uid=r.b2(),this.uses=0,this.tileSize=u,this.tileZoom=g,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=C,b&&b.style&&(this._lastUpdatedBrightness=b.style.getBrightness()),this.expiredRequestCount=0,this.state="loading",b&&b.transform&&(this.projection=b.transform.projection),this.worldview=S}registerFadeDuration(l){let u=l+this.timeAdded;ug)b=!1;else if(u)if(this.expirationTime0&&!u;(X&&E.stateDependentLayers.length!==0||u)&&E.update(U,z,b,Y,X?E.stateDependentLayers:E.layers,u,C),(E instanceof r.ba||E instanceof r.bb)&&l._terrain&&l._terrain.enabled&&q&&E.uploadPending()&&l._terrain._clearRenderCacheForTile(q.id,this.tileID);let J=l&&l.style&&l.style.getOwnLayer(S);J&&(this.queryPadding=Math.max(this.queryPadding,J.queryRadius(E)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil=0;ae--){let ne=4*ae,ce=Qh[ne+0],_e=Qh[ne+1],xe=Qh[ne+2],Pe=Qh[ne+3],ke=ce+xe>>1,Ne=_e+Pe>>1,Me=ke+Ne-_e,De=Ne+ce-ke,Be=_e*wp+ce,bt=Pe*wp+xe,nt=Ne*wp+ke,kt=Math.hypot((Sp[2*Be+0]+Sp[2*bt+0])/2-Sp[2*nt+0],(Sp[2*Be+1]+Sp[2*bt+1])/2-Sp[2*nt+1])>=16;jc[nt]=jc[nt]||(kt?1:0),ae<1022&&(jc[nt]=jc[nt]||jc[(_e+De>>1)*wp+(ce+Me>>1)]||jc[(Pe+De>>1)*wp+(xe+Me>>1)])}let q=new r.b0,U=new r.b1,Y=0;function X(ae,ne){let ce=ne*wp+ae;return r_[ce]===0&&(q.emplaceBack(Sp[2*ce+0],Sp[2*ce+1],ae*r.al/iu,ne*r.al/iu),r_[ce]=++Y),r_[ce]-1}function J(ae,ne,ce,_e,xe,Pe){let ke=ae+ce>>1,Ne=ne+_e>>1;if(Math.abs(ae-xe)+Math.abs(ne-Pe)>1&&jc[Ne*wp+ke])J(xe,Pe,ae,ne,ke,Ne),J(ce,_e,xe,Pe,ke,Ne);else{let Me=X(ae,ne),De=X(ce,_e),Be=X(xe,Pe);U.emplaceBack(Me,De,Be)}}return J(0,0,iu,iu,iu,0),J(iu,iu,0,0,0,iu),{vertices:q,indices:U}})(this.tileID.canonical,u);b=S.vertices,C=S.indices}else{b=new r.b0,C=new r.b1;for(let{x:E,y:k}of g)b.emplaceBack(E,k,0,0);let S=r.bh(b.int16.subarray(0,4*b.length),void 0,4);for(let E=0;E0&&(k=r.bl(new Float64Array(16),u.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(l,b,u,S,k,E),this._makeGlobeTileDebugTextBuffer(l,b,u,S,k,E)}_globePoint(l,u,g,b,C,S,E){let k=r.bm(l,u,g);if(S){let F=1<.5?Y=-1:U<-.5&&(Y=1);let X=(l/r.al+g.x)/F+Y,J=(u/r.al+g.y)/F;X=(X-z)*b._pixelsPerMercatorPixel+z,J=(J-q)*b._pixelsPerMercatorPixel+q;let ae=[X*b.worldSize,J*b.worldSize,0];r.af(ae,ae,S),k=r.bn(k,ae,E)}return r.af(k,k,C)}_makeGlobeTileDebugBorderBuffer(l,u,g,b,C,S){let E=new r.bd,k=new r.be,F=new r.bo,z=(U,Y,X,J,ae)=>{let ne=(X-U)/(ae-1),ce=(J-Y)/(ae-1),_e=E.length;for(let xe=0;xeq*Y+X;for(let Y=0;Y{if(C)u(C);else try{let F=g.getHeaderLength(S);if(F>l)return void(this.request=this.fetchHeader(F,u));g.parseHeader(S),this._isHeaderLoaded=!0;let z=0;for(let q of Object.values(g.layers))z=Math.max(z,q.dataIndex[q.dataIndex.length-1].lastByte);S.byteLength>=z&&(this.entireBuffer=S),u(null,this.entireBuffer||S,E,k)}catch(F){u(F)}}),this.request}fetchBandForRender(l,u,g,b){this.fetchBand(l,u,g,C=>{if(C)return void b(C);this.updateTextureDescriptor(l,u,g);let S=this.textureDescriptorPerLayer.get(u);b(null,S?S.img:null)})}fetchBand(l,u,g,b,C=!0){let S=this._mrt;if(!this._isHeaderLoaded||!S)return void b(new Error("Tile header is not ready"));let E=this.actor;if(!E)return void b(new Error("Can't fetch tile band without an actor"));let k,F=r.B(String(g),r.B(this.tileID.key,l)),z=this._taskQueue.get(F);z?z.add(b):(z=new Set,z.add(b),this._taskQueue.set(F,z));let q=(J,ae)=>{k.complete(J,ae),J?b(J):(z.values().forEach(ne=>ne(null,ae)),this._taskQueue.delete(F))},U=(J,ae)=>{if(J)return b(J);let ne=E.send("decodeRasterArray",{type:"raster-array",source:this.source,scope:this.scope,tileID:this.tileID,uid:this.uid,buffer:ae,task:k},q,void 0,!0);if(u!==null){let ce=this._workQueuePerLayer.get(u)||[];ce.push(()=>{ne&&ne.cancel(),k.cancel()}),this._workQueuePerLayer.has(u)||this._workQueuePerLayer.set(u,ce)}},Y;try{Y=S.getLayer(l)}catch(J){if(this.state==="reloading")return;throw J}if(!Y)return void b(new Error(`Unknown sourceLayer "${l}"`));if(Y.hasDataForBand(g))return z.values().forEach(J=>J(null,null)),void this._taskQueue.delete(F);let X=Y.getDataRange([g]);if(k=S.createDecodingTask(X),!k||k.tasks.length)if(u!==null&&this.flushQueues(u),this.entireBuffer)U(null,this.entireBuffer.slice(X.firstByte,X.lastByte+1));else{let J=Object.assign({},this.requestParams,{headers:{Range:`bytes=${X.firstByte}-${X.lastByte}`}}),ae=r.bu(J,U);if(u!==null){let ne=this._fetchQueuePerLayer.get(u)||[];ne.push(()=>{ae.cancel(),k.cancel()}),this._fetchQueuePerLayer.has(u)||this._fetchQueuePerLayer.set(u,ne)}}}updateNeeded(l,u){return(!this.textureDescriptorPerLayer.get(l)||this.textureDescriptorPerLayer.get(l).band!==u||this.refreshedUponExpiration)&&this.state!=="errored"}updateTextureDescriptor(l,u,g){if(!this._mrt)return;let b=this._mrt.getLayer(l);if(!b||!b.hasBand(g)||!b.hasDataForBand(g))return;let{bytes:C,tileSize:S,buffer:E,offset:k,scale:F}=b.getBandView(g),z=S+2*E,q=new r.q({width:z,height:z},C),U=this.texturePerLayer.get(u);U&&U instanceof r.T&&U.update(q,{premultiply:!1}),this.textureDescriptorPerLayer.set(u,{layer:l,band:g,img:q,buffer:E,offset:k,tileSize:S,format:b.pixelFormat,mix:[F,256*F,65536*F,16777216*F]})}destroy(l=!1){if(super.destroy(l),delete this._mrt,!l)for(let u of this.texturePerLayer.values())u&&u instanceof r.T&&u.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 Wb{constructor(l,u){this.max=l,this.onRemove=u,this.reset()}reset(){for(let l in this.data)for(let u of this.data[l])u.timeout&&clearTimeout(u.timeout),this.onRemove(u.value);return this.data={},this.order=[],this}add(l,u,g){let b=l.wrapped().key;this.data[b]===void 0&&(this.data[b]=[]);let C={value:u,timeout:void 0};if(g!==void 0&&(C.timeout=setTimeout(()=>{this.remove(l,C)},g)),this.data[b].push(C),this.order.push(b),this.order.length>this.max){let S=this._getAndRemoveByKey(this.order[0]);S&&this.onRemove(S)}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 u=this.data[l].shift();return u.timeout&&clearTimeout(u.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),u.value}getByKey(l){let u=this.data[l];return u?u[0].value:null}get(l){return this.has(l)?this.data[l.wrapped().key][0].value:null}remove(l,u){if(!this.has(l))return this;let g=l.wrapped().key,b=u===void 0?0:this.data[g].indexOf(u),C=this.data[g][b];return this.data[g].splice(b,1),C.timeout&&clearTimeout(C.timeout),this.data[g].length===0&&delete this.data[g],this.onRemove(C.value),this.order.splice(this.order.indexOf(g),1),this}setMaxSize(l){for(this.max=l;this.order.length>this.max;){let u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}filter(l){let u=[];for(let g in this.data)for(let b of this.data[g])l(b.value)||u.push(b);for(let g of u)this.remove(g.value.tileID,g)}}class iy{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,u,g){let b=String(u);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][b]=this.stateChanges[l][b]||{},Object.assign(this.stateChanges[l][b],g),this.deletedStates[l]===null){this.deletedStates[l]={};for(let C in this.state[l])C!==b&&(this.deletedStates[l][C]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][b]===null){this.deletedStates[l][b]={};for(let C in this.state[l][b])g[C]||(this.deletedStates[l][b][C]=null)}else for(let C in g)this.deletedStates[l]&&this.deletedStates[l][b]&&this.deletedStates[l][b][C]===null&&delete this.deletedStates[l][b][C]}removeFeatureState(l,u,g){if(this.deletedStates[l]===null)return;let b=String(u);if(this.deletedStates[l]=this.deletedStates[l]||{},g&&u!==void 0)this.deletedStates[l][b]!==null&&(this.deletedStates[l][b]=this.deletedStates[l][b]||{},this.deletedStates[l][b][g]=null);else if(u!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][b])for(g in this.deletedStates[l][b]={},this.stateChanges[l][b])this.deletedStates[l][b][g]=null;else this.deletedStates[l][b]=null;else this.deletedStates[l]=null}getState(l,u){let g=this.state[l]||{},b=this.stateChanges[l]||{},C=this.deletedStates[l];if(C===null)return{};if(u!==void 0){let E=String(u),k=Object.assign({},g[E],b[E]);if(C){let F=C[u];if(F===null)return{};for(let z in F)delete k[z]}return k}let S=Object.assign({},g,b);if(C)for(let E in C)delete S[E];return S}initializeTileState(l,u){l.refreshFeatureState(u)}coalesceChanges(l,u){let g={};for(let b in this.stateChanges){this.state[b]=this.state[b]||{};let C={};for(let S in this.stateChanges[b])this.state[b][S]||(this.state[b][S]={}),Object.assign(this.state[b][S],this.stateChanges[b][S]),C[S]=this.state[b][S];g[b]=C}for(let b in this.deletedStates){this.state[b]=this.state[b]||{};let C={};if(this.deletedStates[b]===null)for(let S in this.state[b])C[S]={},this.state[b][S]={};else for(let S in this.deletedStates[b]){if(this.deletedStates[b][S]===null)this.state[b][S]={};else if(this.state[b][S])for(let E of Object.keys(this.deletedStates[b][S]))delete this.state[b][S][E];C[S]=this.state[b][S]}g[b]=g[b]||{},Object.assign(g[b],C)}if(this.stateChanges={},this.deletedStates={},Object.keys(g).length!==0)for(let b in l)l[b].refreshFeatureState(u)}}class nu extends r.E{constructor(l,u,g){super(),this.id=l,this._onlySymbols=g,u.on("data",b=>{b.dataType==="source"&&b.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&b.dataType==="source"&&b.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform))}),u.on("error",()=>{this._sourceErrored=!0}),this._source=u,this._tiles={},this._cache=new Wb(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=u.minTileCacheSize,this._maxTileCacheSize=u.maxTileCacheSize,this._loadedParentTiles={},this.castsShadows=!1,this.tileCoverLift=0,this._coveredTiles={},this._shadowCasterTiles={},this._state=new iy,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,u){return l.isSymbolTile=this._onlySymbols,l.isExtraShadowCaster=this._shadowCasterTiles[l.tileID.key],this._source.loadTile(l,u)}_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 u in this._tiles){let g=this._tiles[u];g.upload(l),g.prepare(this.map.style.imageManager,this.map?this.map.painter:null,this._source.scope)}}getIds(){return Object.values(this._tiles).map(l=>l.tileID).sort(VA).map(l=>l.key)}getRenderableIds(l,u){let g=[];for(let b in this._tiles)this._isIdRenderable(+b,l,u)&&g.push(this._tiles[b]);return l?g.sort((b,C)=>{let S=b.tileID,E=C.tileID,k=new r.P(S.canonical.x,S.canonical.y)._rotate(this.transform.angle),F=new r.P(E.canonical.x,E.canonical.y)._rotate(this.transform.angle);return S.overscaledZ-E.overscaledZ||F.y-k.y||F.x-k.x}).map(b=>b.tileID.key):g.map(b=>b.tileID).sort(VA).map(b=>b.key)}hasRenderableParent(l){let u=this.findLoadedParent(l,0);return!!u&&this._isIdRenderable(u.tileID.key)}_isIdRenderable(l,u,g){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(u||!this._tiles[l].holdingForFade())&&(g||!this._shadowCasterTiles[l])}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let l in this._tiles)this._tiles[l].state!=="errored"&&this._reloadTile(+l,"reloading")}}_reloadTile(l,u){let g=this._tiles[l];g&&(g.state!=="loading"&&(g.state=u),this._loadTile(g,this._tileLoaded.bind(this,g,l,u)))}_tileLoaded(l,u,g,b){if(b)if(l.state="errored",b.status!==404)this._source.fire(new r.y(b,{tile:l}));else{if(this._source.fire(new r.z("data",{dataType:"source",sourceDataType:"error",sourceId:this._source.id,tile:l})),!(l.tileID.key in this._loadedParentTiles))return;if(this._source.type==="raster-dem"&&this.usedForTerrain&&this.map.painter.terrain){let C=this.map.painter.terrain;this.update(this.transform,C.getScaledDemTileSize(),!0),C.resetTileLookupCache(this.id)}else this.update(this.transform)}else l.timeAdded=r.o.now(),g==="expired"&&(l.refreshedUponExpiration=!0),this._setTileReloadTimer(u,l),this._source.type==="raster-dem"&&l.dem&&this._backfillDEM(l),this._state.initializeTileState(l,this.map?this.map.painter:null),this._source.fire(new r.z("data",{dataType:"source",tile:l,coord:l.tileID,sourceCacheId:this.id}))}_backfillDEM(l){let u=this.getRenderableIds();for(let b=0;b1||(Math.abs(S)>1&&(Math.abs(S+k)===1?S+=k:Math.abs(S-k)===1&&(S-=k)),C.dem&&b.dem&&(b.dem.backfillBorder(C.dem,S,E),b.neighboringTiles&&b.neighboringTiles[F]&&(b.neighboringTiles[F].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,u,g,b){for(let C in this._tiles){let S=this._tiles[C];if(b[C]||!S.hasData()||S.tileID.overscaledZ<=u||S.tileID.overscaledZ>g)continue;let E=S.tileID;for(;S&&S.tileID.overscaledZ>u+1;){let F=S.tileID.scaledTo(S.tileID.overscaledZ-1);S=this._tiles[F.key],S&&S.hasData()&&(E=F)}let k=E;for(;k.overscaledZ>u;)if(k=k.scaledTo(k.overscaledZ-1),l[k.key]){b[E.key]=E;break}}}findLoadedParent(l,u){if(l.key in this._loadedParentTiles){let g=this._loadedParentTiles[l.key];return g&&g.tileID.overscaledZ>=u?g:null}for(let g=l.overscaledZ-1;g>=u;g--){let b=l.scaledTo(g),C=this._getLoadedTile(b);if(C)return C}}_getLoadedTile(l){let u=this._tiles[l.key];return u&&u.hasData()?u:this._cache.getByKey(this._source.reparseOverscaled?l.wrapped().key:l.canonical.key)}updateCacheSize(l,u){u=u||this._source.tileSize;let g=Math.ceil(l.width/u)+1,b=Math.ceil(l.height/u)+1,C=Math.floor(g*b*5),S=typeof this._minTileCacheSize=="number"?Math.max(this._minTileCacheSize,C):C,E=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,S):S;this._cache.setMaxSize(E)}handleWrapJump(l){let u=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,u){let g={};for(let b in this._tiles){let C=this._tiles[b];C.tileID=C.tileID.unwrapTo(C.tileID.wrap+u),g[C.tileID.key]=C}this._tiles=g;for(let b in this._timers)clearTimeout(this._timers[b]),delete this._timers[b];for(let b in this._tiles)this._setTileReloadTimer(+b,this._tiles[b])}}update(l,u,g,b,C){if(this.transform=l,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!g)return;this.updateCacheSize(l,u),this.transform.projection.name!=="globe"&&this.handleWrapJump(this.transform.center.lng),this._shadowCasterTiles={},this._coveredTiles={};let S=this._source.type==="batched-model",E,k=this._source.maxzoom,F=this.map&&this.map.painter?this.map.painter._terrain:null;if(F&&F.sourceCache===this&&F.attenuationRange()){let U=F.attenuationRange()[0],Y=Math.floor(U)-Math.log2(F.getDemUpscale());k>Y&&(k=Y)}if(this.used||this.usedForTerrain){if(this._source.tileID)E=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(U=>new r.aO(U.canonical.z,U.wrap,U.canonical.z,U.canonical.x,U.canonical.y));else if(this.tileCoverLift!==0){let U=l.clone();U.tileCoverLift=this.tileCoverLift,E=U.coveringTiles({tileSize:u||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:k,roundZoom:this._source.roundZoom&&!g,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:S}),this._source.minzoom<=1&&l.projection.name==="globe"&&(E.push(new r.aO(1,0,1,0,0)),E.push(new r.aO(1,0,1,1,0)),E.push(new r.aO(1,0,1,0,1)),E.push(new r.aO(1,0,1,1,1)))}else if(E=l.coveringTiles({tileSize:u||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:k,roundZoom:this._source.roundZoom&&!g,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain,calculateQuadrantVisibility:S}),this._source.hasTile){let U=this._source.hasTile.bind(this._source);E=E.filter(Y=>U(Y))}}else E=[];if(E.length>0&&this.transform.projection.name!=="globe"&&!this.usedForTerrain&&!nw(this._source.type)){let U=l.coveringZoomLevel({tileSize:u||this._source.tileSize,roundZoom:this._source.roundZoom&&!g}),Y=Math.min(U,this._source.maxzoom);if(S){let X=l.extendTileCover(E,Y);for(let J of X)E.push(J)}else if(C){let X=l.extendTileCoverToNearPlane(E,this.transform.getFrustum(Y),Y);for(let J of X)E.push(J)}else if(this.castsShadows&&b){let X=l.extendTileCover(E,Y,b);for(let J of X)this._shadowCasterTiles[J.key]=!0,E.push(J)}}let z=this._updateRetainedTiles(E);if(nw(this._source.type)&&E.length!==0){let U={},Y={},X=Object.keys(z);for(let ae of X){let ne=z[ae],ce=this._tiles[ae];if(!ce||ce.fadeEndTime&&ce.fadeEndTime<=r.o.now())continue;let _e=this.findLoadedParent(ne,Math.max(ne.overscaledZ-nu.maxOverzooming,this._source.minzoom));_e&&(this._addTile(_e.tileID),U[_e.tileID.key]=_e.tileID),Y[ae]=ne}let J=E[E.length-1].overscaledZ;for(let ae in this._tiles){let ne=this._tiles[ae];if(z[ae]||!ne.hasData())continue;let ce=ne.tileID;for(;ce.overscaledZ>J;){ce=ce.scaledTo(ce.overscaledZ-1);let _e=this._tiles[ce.key];if(_e&&_e.hasData()&&Y[ce.key]){z[ae]=ne.tileID;break}}}for(let ae in U)z[ae]||(this._coveredTiles[ae]=!0,z[ae]=U[ae])}for(let U in z)this._tiles[U].clearFadeHold();let q=r.bv(this._tiles,z);for(let U of q){let Y=this._tiles[U];Y.hasSymbolBuckets&&!Y.holdingForFade()?Y.setHoldDuration(this.map._fadeDuration):Y.hasSymbolBuckets&&!Y.symbolFadeFinished()||this._removeTile(+U)}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 u={};if(l.length===0)return u;let g={},b=l.reduce((F,z)=>Math.min(F,z.overscaledZ),1/0),C=l[0].overscaledZ,S=Math.max(C-nu.maxOverzooming,this._source.minzoom),E=Math.max(C+nu.maxUnderzooming,this._source.minzoom),k={};for(let F of l){let z=this._addTile(F);u[F.key]=F,z.hasData()||b=this._source.maxzoom){let U=F.children(this._source.maxzoom)[0],Y=this.getTile(U);if(Y&&Y.hasData()){u[U.key]=U;continue}}else{let U=F.children(this._source.maxzoom);if(u[U[0].key]&&u[U[1].key]&&u[U[2].key]&&u[U[3].key])continue}let q=z.wasRequested();for(let U=F.overscaledZ-1;U>=S;--U){let Y=F.scaledTo(U);if(g[Y.key]||(g[Y.key]=!0,z=this.getTile(Y),!z&&q&&(z=this._addTile(Y)),z&&(u[Y.key]=Y,q=z.wasRequested(),z.hasData())))break}}return u}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let l in this._tiles){let u=[],g,b=this._tiles[l].tileID;for(;b.overscaledZ>0;){if(b.key in this._loadedParentTiles){g=this._loadedParentTiles[b.key];break}u.push(b.key);let C=b.scaledTo(b.overscaledZ-1);if(g=this._getLoadedTile(C),g)break;b=C}for(let C of u)this._loadedParentTiles[C]=g}}_addTile(l){let u=this._tiles[l.key];if(u)return u.isExtraShadowCaster!==!0||this._shadowCasterTiles[l.key]||this._reloadTile(l.key,"reloading"),u;u=this._cache.getAndRemove(l),u&&(this._setTileReloadTimer(l.key,u),u.tileID=l,this._state.initializeTileState(u,this.map?this.map.painter:null),this._cacheTimers[l.key]&&(clearTimeout(this._cacheTimers[l.key]),delete this._cacheTimers[l.key],this._setTileReloadTimer(l.key,u)));let g=!!u;if(!g){let b=this.map?this.map.painter:null,C=this._source.tileSize*l.overscaleFactor();u=this._source.type==="raster-array"?new qb(l,C,this.transform.tileZoom,b,this._isRaster):new mf(l,C,this.transform.tileZoom,b,this._isRaster,this._source.worldview),this._loadTile(u,this._tileLoaded.bind(this,u,l.key,u.state))}return u.uses++,this._tiles[l.key]=u,g||this._source.fire(new r.z("dataloading",{tile:u,coord:u.tileID,dataType:"source"})),u}_setTileReloadTimer(l,u){l in this._timers&&(clearTimeout(this._timers[l]),delete this._timers[l]);let g=u.getExpiryTimeout();g&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},g))}_removeTile(l){let u=this._tiles[l];u&&(u.uses--,delete this._tiles[l],this._timers[l]&&(clearTimeout(this._timers[l]),delete this._timers[l]),u.uses>0||(u.hasData()&&u.state!=="reloading"||u.state==="empty"?this._cache.add(u.tileID,u,u.getExpiryTimeout()):(u.aborted=!0,this._abortTile(u),this._unloadTile(u))))}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,u,g){let b=[],C=this.transform;if(!C)return b;let S=C.projection.name==="globe",E=r.aF(C.center.lng);for(let k in this._tiles){let F=this._tiles[k];if(g&&F.clearQueryDebugViz(),F.holdingForFade())continue;let z;if(S){let q=F.tileID.canonical;if(q.z===0){let U=[Math.abs(r.aA(E,...ny(q,-1))-E),Math.abs(r.aA(E,...ny(q,1))-E)];z=[0,2*U.indexOf(Math.min(...U))-1]}else{let U=[Math.abs(r.aA(E,...ny(q,-1))-E),Math.abs(r.aA(E,...ny(q,0))-E),Math.abs(r.aA(E,...ny(q,1))-E)];z=[U.indexOf(Math.min(...U))-1]}}else z=[0];for(let q of z){let U=l.containsTile(F,C,u,q);U&&b.push(U)}}return b}getShadowCasterCoordinates(){return this._getRenderableCoordinates(!1,!0)}getVisibleCoordinates(l){return this._getRenderableCoordinates(l)}_getRenderableCoordinates(l,u){let g=this.getRenderableIds(l,u).map(C=>this._tiles[C].tileID),b=this.transform.projection.name==="globe";for(let C of g)C.projMatrix=this.transform.calculateProjMatrix(C.toUnwrapped()),C.expandedProjMatrix=b?this.transform.calculateProjMatrix(C.toUnwrapped(),!1,!0):C.projMatrix;return g}sortCoordinatesByDistance(l){let u=l.slice(),g=this.transform._camera.position,b=this.transform._camera.forward(),C={};for(let S of u){let E=1/(1<C[S.key]-C[E.key]),u}hasTransition(){if(this._source.hasTransition())return!0;if(nw(this._source.type))for(let l in this._tiles){let u=this._tiles[l];if(u.fadeEndTime!==void 0&&u.fadeEndTime>=r.o.now())return!0}return!1}setFeatureState(l,u,g){this._state.updateState(l=l||"_geojsonTileLayer",u,g)}removeFeatureState(l,u,g){this._state.removeFeatureState(l=l||"_geojsonTileLayer",u,g)}getFeatureState(l,u){return this._state.getState(l=l||"_geojsonTileLayer",u)}setDependencies(l,u,g){let b=this._tiles[l];b&&b.setDependencies(u,g)}reloadTilesForDependencies(l,u){for(let g in this._tiles)this._tiles[g].hasDependency(l,u)&&this._reloadTile(+g,"reloading");this._cache.filter(g=>!g.hasDependency(l,u))}_preloadTiles(l,u){if(!this._sourceLoaded){let k=()=>{this._sourceLoaded&&(this._source.off("data",k),this._preloadTiles(l,u))};return void this._source.on("data",k)}let g=new Map,b=Array.isArray(l)?l:[l],C=this.map.painter.terrain,S=this.usedForTerrain&&C?C.getScaledDemTileSize():this._source.tileSize;for(let k of b){let F=k.coveringTiles({tileSize:S,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(let z of F)g.set(z.key,z);this.usedForTerrain&&k.updateElevation(!1)}let E=Array.from(g.values());r.bw(E,(k,F)=>{let z=new mf(k,this._source.tileSize*k.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster,this._source.worldview);this._loadTile(z,q=>{this._source.type==="raster-dem"&&z.dem&&this._backfillDEM(z),F(q,z)})},u)}}function VA(_,l){let u=Math.abs(2*_.wrap)-+(_.wrap<0),g=Math.abs(2*l.wrap)-+(l.wrap<0);return _.overscaledZ-l.overscaledZ||g-u||l.canonical.y-_.canonical.y||l.canonical.x-_.canonical.x}function nw(_){return _==="raster"||_==="image"||_==="video"||_==="custom"}function ny(_,l){let u=1<<_.z;return[_.x/u+l,(_.x+1)/u+l]}nu.maxOverzooming=10,nu.maxUnderzooming=3;class ow{constructor(l){this.style=l,this.layersGotHidden=!1,this.layers=[]}processLayersChanged(){this.layers=[];let l=!1,u=!1;for(let g in this.style._mergedLayers){let b=this.style._mergedLayers[g];if(b.type==="fill-extrusion"||b.type==="building")this.layers.push({layer:b,visible:l,visibilityChanged:u});else if(b.type==="model"){let C=this.style.getLayerSource(b);C&&C.type==="batched-model"&&this.layers.push({layer:b,visible:l,visibilityChanged:u})}}}onNewFrame(l){this.layersGotHidden=!1;for(let u of this.layers){let g=u.layer,b=!1;g.type==="fill-extrusion"?b=!g.isHidden(l)&&g.paint.get("fill-extrusion-opacity")>0:g.type==="building"?b=!g.isHidden(l)&&g.paint.get("building-opacity")>0:g.type==="model"&&(b=!g.isHidden(l)&&g.paint.get("model-opacity").constantOr(1)>0),this.layersGotHidden=this.layersGotHidden||!b&&u.visible,u.visible=b}}updateZOffset(l,u){this.currentBuildingBuckets=[];for(let b of this.layers){let C=b.layer,S=this.style.getLayerSourceCache(C),E=1;C.type==="fill-extrusion"?E=b.visible?C.paint.get("fill-extrusion-vertical-scale"):0:C.type==="building"&&(E=b.visible?C.paint.get("building-vertical-scale"):0);let k=S?S.getTile(u):null;if(!k&&S)for(let F in S._tiles){let z=S._tiles[F];if(u.canonical.isChildOf(z.tileID.canonical)){k=z;break}}this.currentBuildingBuckets.push({bucket:k?k.getBucket(C):null,tileID:k?k.tileID:u,verticalScale:E})}l.hasAnyZOffset=!1;let g=!1;for(let b=0;b{g in l&&(u[g]=l[g])}),u}function rw(_){_=_.slice();let l=Object.create(null);for(let u=0;u<_.length;u++)l[_[u].id]=_[u];for(let u=0;u<_.length;u++)"ref"in _[u]&&(_[u]=UA(_[u],l[_[u].ref]));return _}let Go={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setSlot:"setSlot",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog",setSnow:"setSnow",setRain:"setRain",setCamera:"setCamera",setLights:"setLights",setProjection:"setProjection",addImport:"addImport",removeImport:"removeImport",updateImport:"updateImport",addIconset:"addIconset",removeIconset:"removeIconset"};function oy(_,l,u){u.push({command:Go.addSource,args:[_,l[_]]})}function xL(_,l,u){l.push({command:Go.removeSource,args:[_]}),u[_]=!0}function CL(_,l,u,g){xL(_,u,g),oy(_,l,u)}function sw(_,l,u){let g;for(g in _[u])if(_[u].hasOwnProperty(g)&&g!=="data"&&!r.by(_[u][g],l[u][g]))return!1;for(g in l[u])if(l[u].hasOwnProperty(g)&&g!=="data"&&!r.by(_[u][g],l[u][g]))return!1;return!0}function ff(_,l,u,g,b,C){let S;for(S in l=l||{},_=_||{})_.hasOwnProperty(S)&&(r.by(_[S],l[S])||u.push({command:C,args:[g,S,l[S],b]}));for(S in l)l.hasOwnProperty(S)&&!_.hasOwnProperty(S)&&(r.by(_[S],l[S])||u.push({command:C,args:[g,S,l[S],b]}))}function ry(_){return _.id}function Kb(_,l){return _[l.id]=l,_}function aw(_,l,u){let g=l.createTileMatrix(_,_.worldSize,u.toUnwrapped());return r.aB(new Float32Array(16),_.projMatrix,g)}function wL(_,l,u){if(l.projection.name===u.projection.name)return _.projMatrix;let g=u.clone();return g.setProjection(l.projection),aw(g,l.getProjection(),_)}function s_(_,l,u){return l.name===u.projection.name?_.projMatrix:aw(u,l,_)}class SL{constructor(l,u){this.reset(l,u)}reset(l,u){this.points=l||[],this._distances=[0];for(let g=1;g0?(b-S)/E:0;return this.points[C].mult(1-k).add(this.points[u].mult(k))}}class HA{constructor(l,u,g){let b=this.boxCells=[],C=this.circleCells=[];this.xCellCount=Math.ceil(l/g),this.yCellCount=Math.ceil(u/g);for(let S=0;Sthis.width||b<0||u>this.height)return!C&&[];let E=[];if(l<=0&&u<=0&&this.width<=g&&this.height<=b){if(C)return!0;for(let k=0;k0:E}_queryCircle(l,u,g,b,C){let S=l-g,E=l+g,k=u-g,F=u+g;if(E<0||S>this.width||F<0||k>this.height)return!b&&[];let z=[];return this._forEachCell(S,k,E,F,this._queryCellCircle,z,{hitTest:b,circle:{x:l,y:u,radius:g},seenUids:{box:{},circle:{}}},C),b?z.length>0:z}query(l,u,g,b,C){return this._query(l,u,g,b,!1,C)}hitTest(l,u,g,b,C){return this._query(l,u,g,b,!0,C)}hitTestCircle(l,u,g,b){return this._queryCircle(l,u,g,!0,b)}_queryCell(l,u,g,b,C,S,E,k){let F=E.seenUids,z=this.boxCells[C];if(z!==null){let U=this.bboxes;for(let Y of z)if(!F.box[Y]){F.box[Y]=!0;let X=4*Y;if(l<=U[X+2]&&u<=U[X+3]&&g>=U[X+0]&&b>=U[X+1]&&(!k||k(this.boxKeys[Y]))){if(E.hitTest)return S.push(!0),!0;S.push({key:this.boxKeys[Y],x1:U[X],y1:U[X+1],x2:U[X+2],y2:U[X+3]})}}}let q=this.circleCells[C];if(q!==null){let U=this.circles;for(let Y of q)if(!F.circle[Y]){F.circle[Y]=!0;let X=3*Y;if(this._circleAndRectCollide(U[X],U[X+1],U[X+2],l,u,g,b)&&(!k||k(this.circleKeys[Y]))){if(E.hitTest)return S.push(!0),!0;{let J=U[X],ae=U[X+1],ne=U[X+2];S.push({key:this.circleKeys[Y],x1:J-ne,y1:ae-ne,x2:J+ne,y2:ae+ne})}}}}}_queryCellCircle(l,u,g,b,C,S,E,k){let F=E.circle,z=E.seenUids,q=this.boxCells[C];if(q!==null){let Y=this.bboxes;for(let X of q)if(!z.box[X]){z.box[X]=!0;let J=4*X;if(this._circleAndRectCollide(F.x,F.y,F.radius,Y[J+0],Y[J+1],Y[J+2],Y[J+3])&&(!k||k(this.boxKeys[X])))return S.push(!0),!0}}let U=this.circleCells[C];if(U!==null){let Y=this.circles;for(let X of U)if(!z.circle[X]){z.circle[X]=!0;let J=3*X;if(this._circlesCollide(Y[J],Y[J+1],Y[J+2],F.x,F.y,F.radius)&&(!k||k(this.circleKeys[X])))return S.push(!0),!0}}}_forEachCell(l,u,g,b,C,S,E,k){let F=this._convertToXCellCoord(l),z=this._convertToYCellCoord(u),q=this._convertToXCellCoord(g),U=this._convertToYCellCoord(b);for(let Y=F;Y<=q;Y++)for(let X=z;X<=U;X++)if(C.call(this,l,u,g,b,this.xCellCount*X+Y,S,E,k))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,u,g,b,C,S){let E=b-l,k=C-u,F=g+S;return F*F>E*E+k*k}_circleAndRectCollide(l,u,g,b,C,S,E){let k=(S-b)/2,F=Math.abs(l-(b+k));if(F>k+g)return!1;let z=(E-C)/2,q=Math.abs(u-(C+z));if(q>z+g)return!1;if(F<=k||q<=z)return!0;let U=F-k,Y=q-z;return U*U+Y*Y<=g*g}}let sy={unknown:0,flipRequired:1,flipNotRequired:2},lw=Math.tan(85*Math.PI/180);function Ip(_,l,u,g,b,C,S){let E=r.bC();if(u)if(C.name==="globe"){let k=r.bD(b,l);r.aB(E,E,k)}else{let k=r.bE([],S);E[0]=k[0],E[1]=k[1],E[4]=k[2],E[5]=k[3],g||r.bB(E,E,b.angle)}else r.aB(E,b.labelPlaneMatrix,_);return E}function Zb(_,l,u,g,b,C,S){let E=Ip(_,l,u,g,b,C,S);return C.name==="globe"&&u||(E[2]=E[6]=E[10]=E[14]=0),E}function cw(_,l,u,g,b,C,S){if(u){if(C.name==="globe"){let E=Ip(_,l,u,g,b,C,S);return r.bl(E,E),r.aB(E,_,E),E}{let E=r.bz(_),k=r.bA([]);return k[0]=S[0],k[1]=S[1],k[4]=S[2],k[5]=S[3],r.aB(E,E,k),g||r.bB(E,E,-b.angle),E}}return b.glCoordMatrix}function ou(_,l,u,g){let b=[_,l,u,1];u?r.aC(b,b,g):qA(b,b,g);let C=b[3];return b[0]/=C,b[1]/=C,b[2]/=C,b}function a_(_,l){return Math.min(.5+_/l*.5,1.5)}function ru(_,l){let u=_[0]/_[3],g=_[1]/_[3];return u>=-l[0]&&u<=l[0]&&g>=-l[1]&&g<=l[1]}function jA(_,l,u,g,b,C,S,E,k,F){let z=u.transform,q=g?_.textSizeData:_.iconSizeData,U=r.bK(q,u.transform.zoom),Y=z.projection.name==="globe",X=[256/u.width*2+1,256/u.height*2+1],J=g?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;J.clear();let ae=null;Y&&(ae=g?_.text.globeExtVertexArray:_.icon.globeExtVertexArray);let ne=_.lineVertexArray,ce=g?_.text.placedSymbolArray:_.icon.placedSymbolArray,_e=u.transform.width/u.transform.height,xe,Pe=!1;for(let ke=0;keMath.abs(u)?{useVertical:!0}:_===r.bL.vertical?g>0?{needsFlipping:!0}:null:l!==sy.unknown&&(function(b,C){return b===0||Math.abs(C/b)>lw})(u,g)?l===sy.flipRequired?{needsFlipping:!0}:null:u<0?{needsFlipping:!0}:null}function Cr(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne,ce,_e){let xe=l/24,Pe=_.lineOffsetX*xe,ke=_.lineOffsetY*xe,{lineStartIndex:Ne,glyphStartIndex:Me,numGlyphs:De,segment:Be,writingMode:bt,flipState:nt}=_,kt=Ne+_.lineLength,ft=At=>{if(z){let[Ot,Ct,Kt]=At.up,di=F.length;r.bN(z,di+0,Ot,Ct,Kt),r.bN(z,di+1,Ot,Ct,Kt),r.bN(z,di+2,Ot,Ct,Kt),r.bN(z,di+3,Ot,Ct,Kt)}let[pi,vt,Ke]=At.point;r.bO(F,pi,vt,Ke,At.angle)};if(De>1){let At=dw(xe,E,Pe,ke,u,q,U,_,k,C,Y,J,!1,ae,ne,ce,_e);if(!At)return{notEnoughRoom:!0};if(g&&!u){let[pi,vt,Ke]=At.first.point,[Ot,Ct,Kt]=At.last.point;[pi,vt]=ou(pi,vt,Ke,S),[Ot,Ct]=ou(Ot,Ct,Kt,S);let di=GA(bt,nt,(Ot-pi)*X,Ct-vt);if(_.flipState=di&&di.needsFlipping?sy.flipRequired:sy.flipNotRequired,di)return di}ft(At.first);for(let pi=Me+1;pi0?Ot:IL(U,Ke,pi,1,b,void 0,ae,ne.canonical),Kt=GA(bt,nt,(Ct[0]-pi[0])*X,Ct[1]-pi[1]);if(_.flipState=Kt&&Kt.needsFlipping?sy.flipRequired:sy.flipNotRequired,Kt)return Kt}let At=uw(xe*E.getoffsetX(Me),Pe,ke,u,q,U,Be,Ne,kt,k,C,Y,J,!1,!1,ae,ne,ce,_e);if(!At)return{notEnoughRoom:!0};ft(At)}return{}}function $A(_,l,u,g,b){let{x:C,y:S,z:E}=g.projectTilePoint(_.x,_.y,l);if(!b)return ou(C,S,E,u);let[k,F,z]=b(_);return ou(C+k,S+F,E+z,u)}function IL(_,l,u,g,b,C,S,E){let k=$A(_.sub(l)._unit()._add(_),E,b,S,C);return r.av(k,u,k),r.aw(k,k),r.bH(k,u,k,g)}function uw(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne,ce){let _e=g?_-l:_+l,xe=_e>0?1:-1,Pe=0;g&&(xe*=-1,Pe=Math.PI),xe<0&&(Pe+=Math.PI);let ke=E+S+(xe>0?0:1)|0,Ne=b,Me=b,De=0,Be=0,bt=Math.abs(_e),nt=[],kt=[],ft=C,At=ft,pi=r.bF([]),vt=()=>IL(At,ft,Me,bt-De+1,z,U,J,ae.canonical);for(;De+Be<=bt;){if(ke+=xe,ke=k)return null;if(Me=Ne,At=ft,nt.push(Me),Y&&kt.push(At),ft=new r.P(F.getx(ke),F.gety(ke)),Ne=q[ke],!Ne){let Xi=$A(ft,ae.canonical,z,J,U);Ne=Xi[3]>0?q[ke]=Xi:vt()}De+=Be;let ei=r.av([],Ne,Me),an=r.bG(Me,Ne);if(u&&an>0&&Be>0&&r.bJ(pi,ei)/(Be*an)0,_e),Ne=F*ke.perspectiveRatio,Me=(g.x1*u+E.x-g.padding)*Ne+ke.point.x,De=(g.y1*u+E.y-g.padding)*Ne+ke.point.y,Be=(g.x2*u+E.x+g.padding)*Ne+ke.point.x,bt=(g.y2*u+E.y+g.padding)*Ne+ke.point.y,nt=ke.perspectiveRatio<=.55||ke.occluded;return!this.isInsideGrid(Me,De,Be,bt)||!k&&this.grid.hitTest(Me,De,Be,bt,q)||nt?{box:[],offscreen:!1,occluded:ke.occluded}:{box:[Me,De,Be,bt],offscreen:this.isOffscreen(Me,De,Be,bt),occluded:!1}}placeCollisionCircles(l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J){let ae=[],ne=this.transform.elevation,ce=l.getProjection(),_e=ne?ne.getAtTileOffsetFunc(J,this.transform.center.lat,this.transform.worldSize,ce):null,xe=new r.P(g.tileAnchorX,g.tileAnchorY),{x:Pe,y:ke,z:Ne}=ce.projectTilePoint(xe.x,xe.y,J.canonical);if(_e){let[Kt,di,Ai]=_e(xe);Pe+=Kt,ke+=di,Ne+=Ai}let Me=ce.name==="globe",De=this.projectAndGetPerspectiveRatio(E,Pe,ke,Ne,J,Me||!!ne||this.transform.pitch>0,ce),{perspectiveRatio:Be}=De,bt=(q?S/Be:S*Be)/r.bX,nt=ou(Pe,ke,Ne,k),kt=g.lineOffsetX*bt,ft=g.lineOffsetY*bt,At=r.an(l.layers[0].layout.get("text-max-angle")),pi=Math.cos(At),vt=De.signedDistanceFromCamera>0?dw(bt,C,kt,ft,!1,nt,xe,g,b,k,{},ne&&!q?_e:null,q&&!!ne,ce,J,q,pi):null,Ke=!1,Ot=!1,Ct=!0;if(vt&&!De.occluded){let Kt=.5*Y*Be+X,di=new r.P(-100,-100),Ai=new r.P(this.screenRightBoundary,this.screenBottomBoundary),ri=new SL,{first:ei,last:an}=vt,Xi=ei.path.length,tn=[];for(let no=Xi-1;no>=1;no--)tn.push(ei.path[no]);for(let no=1;no(_e&&!Me&&(Sr=_e($nno[3]<=0)&&(tn=[]));let Nn=[];if(tn.length>0){let no=1/0,lo=-1/0,Sr=1/0,$n=-1/0;for(let Qo of tn)no=Math.min(no,Qo[0]),Sr=Math.min(Sr,Qo[1]),lo=Math.max(lo,Qo[0]),$n=Math.max($n,Qo[1]);lo>=di.x&&no<=Ai.x&&$n>=di.y&&Sr<=Ai.y&&(Nn=[tn.map(Qo=>new r.P(Qo[0],Qo[1]))],(noAi.x||SrAi.y)&&(Nn=r.bV(Nn,di.x,di.y,Ai.x,Ai.y)))}for(let no of Nn){ri.reset(no,.25*Kt);let lo=0;lo=ri.length<=.5*Kt?1:Math.ceil(ri.paddedLength/Yi)+1;for(let Sr=0;Sr0?(r.aC(k,k,l),this.fogState&&C&&E.name!=="globe"&&(F=(function(U,Y,X,J,ae,ne){let ce=ne.calculateFogTileMatrix(ae),_e=[Y,X,J];return r.af(_e,_e,ce),Pn(U,r.ag(_e),ne.pitch,ne._fov)})(this.fogState,u,g,b,C.toUnwrapped(),this.transform)>.9)):qA(k,k,l);let z=k[3];return{point:new r.P((k[0]/z+1)/2*this.transform.width+su,(-k[1]/z+1)/2*this.transform.height+su),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(E)/z*.5,1.5),signedDistanceFromCamera:z,occluded:S&&k[2]>z||F}}isOffscreen(l,u,g,b){return g=this.screenRightBoundary||bthis.screenBottomBoundary}isInsideGrid(l,u,g,b){return g>=0&&l=0&&ug.collisionGroupID===u}}return this.collisionGroups[l]}}function l_(_,l,u,g,b){let{horizontalAlign:C,verticalAlign:S}=r.c0(_),E=-(C-.5)*l,k=-(S-.5)*u,F=r.c1(_,g);return new r.P(E+F[0]*b,k+F[1]*b)}function ur(_,l,u,g,b){let C=new r.P(_,l);return u&&C._rotate(g?b:-b),C}class hw{constructor(l,u,g,b,C,S){this.transform=l.clone(),this.projection=l.projection.name,this.collisionIndex=new Tp(this.transform,C),this.buildingIndex=S,this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=u,this.retainedQueryData={},this.collisionGroups=new Sd(g),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(l,u,g,b,C=1){let S=g.getBucket(u),E=g.latestFeatureIndex;if(!S||!E||u.fqid!==S.layerIds[0])return;let k=S.layers[0].layout,F=S.layers[0].paint,z=g.collisionBoxArray,q=Math.pow(2,this.transform.zoom-g.tileID.overscaledZ),U=g.tileSize/r.al,Y=g.tileID.toUnwrapped();this.transform.setProjection(S.projection);let X=(J=g.tileID,ae=S.getProjection(),ne=this.transform,ae.name===this.projection?ne.calculateProjMatrix(J.toUnwrapped()):aw(ne,ae,J));var J,ae,ne;let ce=k.get("text-pitch-alignment")==="map",_e=k.get("text-rotation-alignment")==="map";u.compileFilter(u.options);let xe=u.dynamicFilter(),Pe=u.dynamicFilterNeedsFeature(),ke=this.transform.calculatePixelsToTileUnitsMatrix(g),Ne=Zb(X,g.tileID.canonical,ce,_e,this.transform,S.getProjection(),ke),Me=null,De=S.getProjection().createInversionMatrix(this.transform,g.tileID.canonical);if(ce){let Ke=cw(X,g.tileID.canonical,ce,_e,this.transform,S.getProjection(),ke);Me=r.aB([],this.transform.labelPlaneMatrix,Ke)}let Be=null;xe&&g.latestFeatureIndex&&(Be={unwrappedTileID:Y,dynamicFilter:xe,dynamicFilterNeedsFeature:Pe}),this.retainedQueryData[S.bucketInstanceId]=new Ar(S.bucketInstanceId,E,S.sourceLayerIndex,S.index,g.tileID);let[bt,nt]=S.layers[0].layout.get("text-size-scale-range"),kt=r.aA(C,bt,nt),[ft,At]=k.get("icon-size-scale-range"),pi=r.aA(C,ft,At),vt={bucket:S,layout:k,paint:F,posMatrix:X,invMatrix:De,mercatorCenter:[r.aF(this.transform.center.lng),r.aJ(this.transform.center.lat)],textLabelPlaneMatrix:Ne,labelToScreenMatrix:Me,clippingData:Be,scale:q,textPixelRatio:U,holdingForFade:g.holdingForFade(),collisionBoxArray:z,partiallyEvaluatedTextSize:r.bK(S.textSizeData,this.transform.zoom,kt),partiallyEvaluatedIconSize:r.bK(S.iconSizeData,this.transform.zoom,pi),collisionGroup:this.collisionGroups.get(S.sourceID),latestFeatureIndex:g.latestFeatureIndex};if(b)for(let Ke of S.sortKeyRanges){let{sortKey:Ot,symbolInstanceStart:Ct,symbolInstanceEnd:Kt}=Ke;l.push({sortKey:Ot,symbolInstanceStart:Ct,symbolInstanceEnd:Kt,parameters:vt})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:S.symbolInstances.length,parameters:vt})}attemptAnchorPlacement(l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne,ce,_e,xe,Pe){let{textOffset0:ke,textOffset1:Ne,crossTileID:Me}=J,De=[ke,Ne],Be=l_(l,S,E,De,k),bt=this.collisionIndex.placeCollisionBox(ne,k,u,g,b,C,ur(Be.x,Be.y,F,z,this.transform.angle),X,q,U,Y.predicate);if(_e){let nt=ne.getSymbolInstanceIconSize(Pe,this.transform.zoom,J.placedIconSymbolIndex);if(this.collisionIndex.placeCollisionBox(ne,nt,_e,g,b,C,ur(Be.x,Be.y,F,z,this.transform.angle),X,q,U,Y.predicate).box.length===0)return}if(bt.box.length>0){let nt;return this.prevPlacement&&this.prevPlacement.variableOffsets[Me]&&this.prevPlacement.placements[Me]&&this.prevPlacement.placements[Me].text&&(nt=this.prevPlacement.variableOffsets[Me].anchor),this.variableOffsets[Me]={textOffset:De,width:S,height:E,anchor:l,textScale:k,prevAnchor:nt},this.markUsedJustification(ne,l,J,ce),ne.allowVerticalPlacement&&(this.markUsedOrientation(ne,ce,J),this.placedOrientations[Me]=ce),{shift:Be,placedGlyphBoxes:bt}}}placeLayerBucketPart(l,u,g,b,C=1){let{bucket:S,layout:E,paint:k,posMatrix:F,textLabelPlaneMatrix:z,labelToScreenMatrix:q,clippingData:U,textPixelRatio:Y,mercatorCenter:X,invMatrix:J,holdingForFade:ae,collisionBoxArray:ne,partiallyEvaluatedTextSize:ce,partiallyEvaluatedIconSize:_e,collisionGroup:xe,latestFeatureIndex:Pe}=l.parameters,ke=E.get("text-optional"),Ne=E.get("icon-optional"),Me=E.get("text-allow-overlap"),De=E.get("icon-allow-overlap"),Be=E.get("text-rotation-alignment")==="map",bt=E.get("icon-rotation-alignment")==="map",nt=E.get("text-pitch-alignment")==="map",kt=k.get("symbol-z-offset"),ft=E.get("symbol-elevation-reference")==="sea",At=E.get("symbol-placement"),[pi,vt]=E.get("text-size-scale-range"),[Ke,Ot]=E.get("icon-size-scale-range"),Ct=r.aA(C,pi,vt),Kt=r.aA(C,Ke,Ot),di=E.get("text-variable-anchor"),Ai=Be&&At!=="point",ri=bt&&At!=="point",ei=di&&S.hasTextData(),an=S.hasIconTextFit()&&ei&&S.hasIconData();this.transform.setProjection(S.projection);let Xi=ei||Ai,tn=ri||an,Yi=Me&&(De||!S.hasIconData()||Ne),Nn=De&&(Me||!S.hasTextData()||ke),no=!kt.isConstant();!S.collisionArrays&&ne&&S.deserializeCollisionBoxes(ne),g&&b&&S.updateCollisionDebugBuffers(this.transform.zoom,ne,Ct,Kt);let lo=($n,Qo,yr)=>{let{crossTileID:hs,numVerticalGlyphVertices:oo}=$n,ar=null;if(U&&U.dynamicFilterNeedsFeature||no){let $s=this.retainedQueryData[S.bucketInstanceId];ar=Pe.loadFeature({featureIndex:$n.featureIndex,bucketIndex:$s.bucketIndex,sourceLayerIndex:$s.sourceLayerIndex,layoutVertexArrayOffset:0})}if(U&&!(0,U.dynamicFilter)({zoom:this.transform.zoom,pitch:this.transform.pitch},ar,this.retainedQueryData[S.bucketInstanceId].tileID.canonical,new r.P($n.tileAnchorX,$n.tileAnchorY),this.transform.calculateDistanceTileData(U.unwrappedTileID)))return this.placements[hs]=new cn(!1,!1,!1,!0),void u.add(hs);let ir=kt.evaluate(ar,{});if(u.has(hs))return;if(ae)return void(this.placements[hs]=new cn(!1,!1,!1));let pr=!1,vs=!1,Ys=!0,al=!1,bs=!1,co=null,Rn={box:null,offscreen:null,occluded:null},Ir={box:null},zs=null,ws=null,fa=null,Al=0,du=0,uu=0;yr.textFeatureIndex?Al=yr.textFeatureIndex:$n.useRuntimeCollisionCircles&&(Al=$n.featureIndex),yr.verticalTextFeatureIndex&&(du=yr.verticalTextFeatureIndex);let Td=$s=>{$s.tileID=this.retainedQueryData[S.bucketInstanceId].tileID;let Qs=this.transform.elevation;$s.elevation=ft?ir:ir+(Qs?Qs.getAtTileOffset($s.tileID,$s.tileAnchorX,$s.tileAnchorY):0),$s.elevation+=$n.zOffset},Ed=yr.textBox;if(Ed){Td(Ed);let $s=Ss=>{let za=r.bL.horizontal;if(S.allowVerticalPlacement&&!Ss&&this.prevPlacement){let ll=this.prevPlacement.placedOrientations[hs];ll&&(this.placedOrientations[hs]=ll,za=ll,this.markUsedOrientation(S,za,$n))}return za},Qs=(Ss,za)=>{if(S.allowVerticalPlacement&&oo>0&&yr.verticalTextBox){for(let ll of S.writingModes)if(ll===r.bL.vertical?(Rn=za(),Ir=Rn):Rn=Ss(),Rn&&Rn.box&&Rn.box.length)break}else Rn=Ss()};if(di){let Ss=di;if(this.prevPlacement&&this.prevPlacement.variableOffsets[hs]){let da=this.prevPlacement.variableOffsets[hs];Ss.indexOf(da.anchor)>0&&(Ss=Ss.filter(tc=>tc!==da.anchor),Ss.unshift(da.anchor))}let za=(da,tc,yh)=>{let nm=S.getSymbolInstanceTextSize(ce,$n,this.transform.zoom,Qo),Op=(da.x2-da.x1)*nm+2*da.padding,Rf=(da.y2-da.y1)*nm+2*da.padding,Of=$n.hasIconTextFit&&!De?tc:null;Of&&Td(Of);let vh={box:[],offscreen:!1,occluded:!1},Oy=Me?2*Ss.length:Ss.length;for(let om=0;om=Ss.length,$n,Qo,S,yh,Of,ce,_e);if(bh&&(vh=bh.placedGlyphBoxes,vh&&vh.box&&vh.box.length)){pr=!0,co=bh.shift;break}}return vh};Qs(()=>za(Ed,yr.iconBox,r.bL.horizontal),()=>{let da=yr.verticalTextBox;return da&&Td(da),S.allowVerticalPlacement&&!(Rn&&Rn.box&&Rn.box.length)&&oo>0&&da?za(da,yr.verticalIconBox,r.bL.vertical):{box:null,offscreen:null,occluded:null}}),Rn&&(pr=Rn.box,Ys=Rn.offscreen,al=Rn.occluded);let ll=$s(!(!Rn||!Rn.box));if(!pr&&this.prevPlacement){let da=this.prevPlacement.variableOffsets[hs];da&&(this.variableOffsets[hs]=da,this.markUsedJustification(S,da.anchor,$n,ll))}}else{let Ss=(za,ll)=>{let da=S.getSymbolInstanceTextSize(ce,$n,this.transform.zoom,Qo),tc=this.collisionIndex.placeCollisionBox(S,da,za,X,J,Xi,new r.P(0,0),Me,Y,F,xe.predicate);return tc&&tc.box&&tc.box.length&&(this.markUsedOrientation(S,ll,$n),this.placedOrientations[hs]=ll),tc};Qs(()=>Ss(Ed,r.bL.horizontal),()=>{let za=yr.verticalTextBox;return S.allowVerticalPlacement&&oo>0&&za?(Td(za),Ss(za,r.bL.vertical)):{box:null,offscreen:null,occluded:null}}),$s(!!(Rn&&Rn.box&&Rn.box.length))}}if(zs=Rn,pr=zs&&zs.box&&zs.box.length>0,Ys=zs&&zs.offscreen,al=zs&&zs.occluded,$n.useRuntimeCollisionCircles){let $s=S.text.placedSymbolArray.get($n.centerJustifiedTextSymbolIndex>=0?$n.centerJustifiedTextSymbolIndex:$n.verticalPlacedTextSymbolIndex),Qs=r.bM(S.textSizeData,ce,$s),Ss=E.get("text-padding");ws=this.collisionIndex.placeCollisionCircles(S,Me,$s,S.lineVertexArray,S.glyphOffsetArray,Qs,F,z,q,g,nt,xe.predicate,$n.collisionCircleDiameter*Qs/r.bX,Ss,this.retainedQueryData[S.bucketInstanceId].tileID),pr=Me||ws.circles.length>0&&!ws.collisionDetected,Ys=Ys&&ws.offscreen,al=ws.occluded}if(yr.iconFeatureIndex&&(uu=yr.iconFeatureIndex),yr.iconBox){let $s=Qs=>{Td(Qs);let Ss=$n.hasIconTextFit&&co?ur(co.x,co.y,Be,nt,this.transform.angle):new r.P(0,0),za=S.getSymbolInstanceIconSize(_e,this.transform.zoom,$n.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(S,za,Qs,X,J,tn,Ss,De,Y,F,xe.predicate)};Ir&&Ir.box&&Ir.box.length&&yr.verticalIconBox?(fa=$s(yr.verticalIconBox),vs=fa.box.length>0):(fa=$s(yr.iconBox),vs=fa.box.length>0),Ys=Ys&&fa.offscreen,bs=fa.occluded}let Wc=ke||$n.numHorizontalGlyphVertices===0&&oo===0,qu=Ne||$n.numIconVertices===0;if(Wc||qu?qu?Wc||(vs=vs&&pr):pr=vs&&pr:vs=pr=vs&&pr,pr&&zs&&zs.box&&this.collisionIndex.insertCollisionBox(zs.box,E.get("text-ignore-placement"),S.bucketInstanceId,Ir&&Ir.box&&du?du:Al,xe.ID),vs&&fa&&this.collisionIndex.insertCollisionBox(fa.box,E.get("icon-ignore-placement"),S.bucketInstanceId,uu,xe.ID),ws&&(pr&&this.collisionIndex.insertCollisionCircles(ws.circles,E.get("text-ignore-placement"),S.bucketInstanceId,Al,xe.ID),g)){let $s=S.bucketInstanceId,Qs=this.collisionCircleArrays[$s];Qs===void 0&&(Qs=this.collisionCircleArrays[$s]=new wr);for(let Ss=0;Ss=0;--Qo){let yr=$n[Qo];lo(S.symbolInstances.get(yr),yr,S.collisionArrays[yr])}S.hasAnyZOffset&&r.w(`${S.layerIds[0]} layer symbol-z-elevate: symbols are not sorted by elevation if symbol-z-order is evaluated to viewport-y`)}else if(S.hasAnyZOffset){let $n=S.getSortedIndexesByZOffset();for(let Qo=0;Qo<$n.length;++Qo){let yr=$n[Qo];lo(S.symbolInstances.get(yr),yr,S.collisionArrays[yr])}}else for(let $n=l.symbolInstanceStart;$n=0&&(l.text.placedSymbolArray.get(C).crossTileID=q>=0&&C!==q?0:F),S>=0&&(l.text.placedSymbolArray.get(S).crossTileID=q>=0&&S!==q?0:F),E>=0&&(l.text.placedSymbolArray.get(E).crossTileID=q>=0&&E!==q?0:F),k>=0&&(l.text.placedSymbolArray.get(k).crossTileID=q>=0&&k!==q?0:F)}markUsedOrientation(l,u,g){let b=u===r.bL.horizontal||u===r.bL.horizontalOnly?u:0,C=u===r.bL.vertical?u:0,{leftJustifiedTextSymbolIndex:S,centerJustifiedTextSymbolIndex:E,rightJustifiedTextSymbolIndex:k,verticalPlacedTextSymbolIndex:F}=g,z=l.text.placedSymbolArray;S>=0&&(z.get(S).placedOrientation=b),E>=0&&(z.get(E).placedOrientation=b),k>=0&&(z.get(k).placedOrientation=b),F>=0&&(z.get(F).placedOrientation=C)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;let u=this.prevPlacement,g=!1;this.prevZoomAdjustment=u?u.zoomAdjustment(this.transform.zoom):0;let b=u?u.symbolFadeChange(l):1,C=u?u.opacities:{},S=u?u.variableOffsets:{},E=u?u.placedOrientations:{};for(let k in this.placements){let F=this.placements[k],z=C[k];z?(this.opacities[k]=new ph(z,b,F.text,F.icon,null,F.clipped),g=g||F.text!==z.text.placed||F.icon!==z.icon.placed):(this.opacities[k]=new ph(null,b,F.text,F.icon,F.skipFade,F.clipped),g=g||F.text||F.icon)}for(let k in C){let F=C[k];if(!this.opacities[k]){let z=new ph(F,b,!1,!1);z.isHidden()||(this.opacities[k]=z,g=g||F.text.placed||F.icon.placed)}}for(let k in S)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=S[k]);for(let k in E)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=E[k]);g?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=u?u.lastPlacementChangeTime:l)}updateLayerOpacities(l,u,g,b){let C=new Set;for(let S of u){let E=S.getBucket(l);E&&S.latestFeatureIndex&&l.fqid===E.layerIds[0]&&(this.updateBucketOpacities(E,C,S,S.collisionBoxArray,g,b,S.tileID,l.scope),E.elevationType==="offset"&&this.buildingIndex&&this.buildingIndex.updateZOffset(E,S.tileID),E.elevationType==="road"&&E.updateRoadElevation(S.tileID.canonical),E.updateZOffset())}}updateBucketOpacities(l,u,g,b,C,S,E,k){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 F=l.layers[0].layout,z=l.layers[0].paint,q=!!l.layers[0].dynamicFilter(),U=new ph(null,0,!1,!1,!0),Y=F.get("text-allow-overlap"),X=F.get("icon-allow-overlap"),J=F.get("text-variable-anchor"),ae=F.get("text-rotation-alignment")==="map",ne=F.get("text-pitch-alignment")==="map",ce=z.get("symbol-z-offset"),_e=F.get("symbol-elevation-reference")==="sea",xe=!ce.isConstant(),Pe=new ph(null,0,Y&&(X||!l.hasIconData()||F.get("icon-optional")),X&&(Y||!l.hasTextData()||F.get("text-optional")),!0);!l.collisionArrays&&b&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(b);let ke=(Me,De,Be)=>{for(let bt=0;bt0||bt>0,di=kt>0,Ai=this.placedOrientations[nt],ri=Ai===r.bL.vertical,ei=Ai===r.bL.horizontal||Ai===r.bL.horizontalOnly;!Kt&&!di||Ct.isHidden()||Ne++;let an=!1;if((Kt||di)&&S)for(let Xi of l.activeReplacements){if(r.bY(Xi,C,r.bZ.Symbol,k)||Xi.min.x>ft||ft>Xi.max.x||Xi.min.y>At||At>Xi.max.y)continue;let tn=r.b_(ft,At,E.canonical,Xi.footprintTileId.canonical);if(an=r.b$(tn,Xi.footprint),an)break}if(Kt){let Xi=an?_f:Jb(Ct.text);ke(l.text,Be,ri?_f:Xi),ke(l.text,bt,ei?_f:Xi);let tn=Ct.text.isHidden(),{leftJustifiedTextSymbolIndex:Yi,centerJustifiedTextSymbolIndex:Nn,rightJustifiedTextSymbolIndex:no,verticalPlacedTextSymbolIndex:lo}=De,Sr=l.text.placedSymbolArray,$n=tn||ri?1:0;Yi>=0&&(Sr.get(Yi).hidden=$n),Nn>=0&&(Sr.get(Nn).hidden=$n),no>=0&&(Sr.get(no).hidden=$n),lo>=0&&(Sr.get(lo).hidden=tn||ei?1:0);let Qo=this.variableOffsets[nt];Qo&&this.markUsedJustification(l,Qo.anchor,De,Ai);let yr=this.placedOrientations[nt];yr&&(this.markUsedJustification(l,"left",De,yr),this.markUsedOrientation(l,yr,De))}if(di){let Xi=an?_f:Jb(Ct.icon),{placedIconSymbolIndex:tn,verticalPlacedIconSymbolIndex:Yi}=De,Nn=l.icon.placedSymbolArray,no=Ct.icon.isHidden()?1:0;tn>=0&&(ke(l.icon,kt,ri?_f:Xi),Nn.get(tn).hidden=no),Yi>=0&&(ke(l.icon,De.numVerticalIconVertices,ei?_f:Xi),Nn.get(Yi).hidden=no)}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){let Xi=l.collisionArrays[Me];if(Xi){let tn=new r.P(0,0),Yi=!0;if(Xi.textBox||Xi.verticalTextBox){if(J){let no=this.variableOffsets[nt];no?(tn=l_(no.anchor,no.width,no.height,no.textOffset,no.textScale),ae&&tn._rotate(ne?this.transform.angle:-this.transform.angle)):Yi=!1}q&&(Yi=!Ct.clipped),Xi.textBox&&gf(l.textCollisionBox.collisionVertexArray,Ct.text.placed,!Yi||ri,Ke,_e,tn.x,tn.y),Xi.verticalTextBox&&gf(l.textCollisionBox.collisionVertexArray,Ct.text.placed,!Yi||ei,Ke,_e,tn.x,tn.y)}let Nn=Yi&&!!(!ei&&Xi.verticalIconBox);Xi.iconBox&&gf(l.iconCollisionBox.collisionVertexArray,Ct.icon.placed,Nn,Ke,_e,De.hasIconTextFit?tn.x:0,De.hasIconTextFit?tn.y:0),Xi.verticalIconBox&&gf(l.iconCollisionBox.collisionVertexArray,Ct.icon.placed,!Nn,Ke,_e,De.hasIconTextFit?tn.x:0,De.hasIconTextFit?tn.y:0)}}}if(l.fullyClipped=Ne===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 Me=this.collisionCircleArrays[l.bucketInstanceId];l.placementInvProjMatrix=Me.invProjMatrix,l.placementViewportMatrix=Me.viewportMatrix,l.collisionCircleArray=Me.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 gf(_,l,u,g,b,C,S){_.emplaceBack(l?1:0,u?1:0,C||0,S||0,g,b?1:0),_.emplaceBack(l?1:0,u?1:0,C||0,S||0,g,b?1:0),_.emplaceBack(l?1:0,u?1:0,C||0,S||0,g,b?1:0),_.emplaceBack(l?1:0,u?1:0,C||0,S||0,g,b?1:0)}let Yb=Math.pow(2,25),yc=Math.pow(2,24),Na=Math.pow(2,17),l8=Math.pow(2,16),Qb=Math.pow(2,9),WA=Math.pow(2,8),Xb=Math.pow(2,1);function Jb(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;let l=_.placed?1:0,u=Math.floor(127*_.opacity);return u*Yb+l*yc+u*Na+l*l8+u*Qb+l*WA+u*Xb+l}let _f=0;class mw{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,u,g,b,C,S){let E=this._bucketParts;for(;this._currentTileIndexk.sortKey-F.sortKey));this._currentPartIndex{let k=r.o.now()-S;return!this._forceFullPlacement&&k>2};for(;this._currentPlacementIndex>=0;){let k=u[l[this._currentPlacementIndex]],F=this.placement.collisionIndex.transform.zoom;if(k.type==="symbol"&&(!k.minzoom||k.minzoom<=F)&&(!k.maxzoom||k.maxzoom>F)){let z=k,q=z.layout.get("symbol-z-elevate"),U=z.layout.get("symbol-sort-key").constantOr(1)!==void 0,Y=z.layout.get("symbol-z-order"),X=Y==="viewport-y"||Y==="auto"&&!(Y!=="viewport-y"&&U),J=z.layout.get("text-allow-overlap")||z.layout.get("icon-allow-overlap")||z.layout.get("text-ignore-placement")||z.layout.get("icon-ignore-placement"),ae=X&&J,ne=this._inProgressLayer=this._inProgressLayer||new mw(z),ce=r.B(k.source,k.scope);if(ne.continuePlacement(q||ae?b[ce]:g[ce],this.placement,this._showCollisionBoxes,k,E,C))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}let Ep=512/r.al/2;class dd{constructor(l,u,g){this.tileID=l,this.bucketInstanceId=g,this.index=new r.c3(u.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];let b=l.canonical.x*r.al,C=l.canonical.y*r.al;for(let S=0;Sae-ne);for(let ae of J){let ne=this.crossTileIDs[ae];if(this.keys[ae]===z&&!g.has(ne)){g.add(ne),F.crossTileID=ne;break}}}}}class TL{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ay{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){let u=Math.round((l-this.lng)/360);if(u!==0)for(let g in this.indexes){let b=this.indexes[g],C={};for(let S in b){let E=b[S];E.tileID=E.tileID.unwrapTo(E.tileID.wrap+u),C[E.tileID.key]=E}this.indexes[g]=C}this.lng=l}addBucket(l,u,g){if(this.indexes[l.overscaledZ]&&this.indexes[l.overscaledZ][l.key]){if(this.indexes[l.overscaledZ][l.key].bucketInstanceId===u.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(l.overscaledZ,this.indexes[l.overscaledZ][l.key])}for(let C=0;Cl.overscaledZ)for(let E in S){let k=S[E];k.tileID.isChildOf(l)&&k.findMatches(u.symbolInstances,l,b)}else{let E=S[l.scaledTo(Number(C)).key];E&&E.findMatches(u.symbolInstances,l,b)}}for(let C=0;C{u[g]=!0});for(let g in this.layerIndexes)u[g]||delete this.layerIndexes[g]}}let ud=771;class so{constructor(l,u,g,b){this.blendFunction=l,this.blendColor=u.toNonPremultipliedRenderColor(null),this.mask=g,this.blendEquation=b}}so.Replace=[1,0,1,0],so.disabled=new so(so.Replace,r.ao.transparent,[!1,!1,!1,!1]),so.unblended=new so(so.Replace,r.ao.transparent,[!0,!0,!0,!0]),so.alphaBlended=new so([1,ud,1,ud],r.ao.transparent,[!0,!0,!0,!0]),so.alphaBlendedNonPremultiplied=new so([770,ud,770,ud],r.ao.transparent,[!0,!0,!0,!0]),so.multiply=new so([774,0,774,0],r.ao.transparent,[!0,!0,!0,!0]);class Vi{constructor(l,u,g){this.func=l,this.mask=u,this.range=g}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let ex=7680;class Mn{constructor(l,u,g,b,C,S){this.test=l,this.ref=u,this.mask=g,this.fail=b,this.depthFail=C,this.pass=S}}Mn.disabled=new Mn({func:519,mask:0},0,0,ex,ex,ex);let c_=1029,ly=2305;class Ln{constructor(l,u,g){this.enable=l,this.mode=u,this.frontFace=g}}function KA(_,l){let u=r.c9(_,3);r.cb(_,l),r.cf(_,3,u)}function tx(_,l){let u=r.c6([]);return r.c7(u,u,-l),r.c8(u,u,-_),u}function ix(_,l){let u=[_[0],_[1],0],g=[l[0],l[1],0];if(r.ag(u)>=1e-15){let S=r.aw([],u);r.c4(g,S,r.bJ(g,S)),l[0]=g[0],l[1]=g[1]}let b=r.bI([],l,_);if(r.c5(b)<1e-15)return null;let C=Math.atan2(-b[1],b[0]);return tx(Math.atan2(Math.sqrt(_[0]*_[0]+_[1]*_[1]),-_[2]),C)}Ln.disabled=new Ln(!1,c_,ly),Ln.backCCW=new Ln(!0,c_,ly),Ln.backCW=new Ln(!0,c_,2304),Ln.frontCW=new Ln(!0,1028,2304),Ln.frontCCW=new Ln(!0,1028,ly);class ZA{constructor(l,u){this.position=l,this.orientation=u}get position(){return this._position}set position(l){if(l){let u=l instanceof r.ae?l:new r.ae(l[0],l[1],l[2]);this._renderWorldCopies&&(u.x=r.bT(u.x,0,1)),this._position=u}else this._position=null}lookAtPoint(l,u){if(this.orientation=null,!this.position)return;let g=this.position,b=this._elevation?this._elevation.getAtPointOrZero(r.ae.fromLngLat(l)):0,C=r.ae.fromLngLat(l,b),S=[C.x-g.x,C.y-g.y,C.z-g.z];u||(u=[0,0,1]),u[2]=Math.abs(u[2]),this.orientation=ix(S,u)}setPitchBearing(l,u){this.orientation=tx(r.an(l),r.an(-u))}}class fw{constructor(l,u){this._transform=r.bA([]),this.orientation=u,this.position=l}get mercatorPosition(){let l=this.position;return new r.ae(l[0],l[1],l[2])}get position(){let l=r.c9(this._transform,3);return[l[0],l[1],l[2]]}set position(l){var u;l&&r.cf(this._transform,3,[(u=l)[0],u[1],u[2],1])}get orientation(){return this._orientation}set orientation(l){this._orientation=l||r.c6([]),l&&KA(this._transform,this._orientation)}getPitchBearing(){let l=this.forward(),u=this.right();return{bearing:Math.atan2(-u[1],u[0]),pitch:Math.atan2(Math.sqrt(l[0]*l[0]+l[1]*l[1]),-l[2])}}setPitchBearing(l,u){this._orientation=tx(l,u),KA(this._transform,this._orientation)}forward(){let l=r.c9(this._transform,2);return[-l[0],-l[1],-l[2]]}up(){let l=r.c9(this._transform,1);return[-l[0],-l[1],-l[2]]}right(){let l=r.c9(this._transform,0);return[l[0],l[1],l[2]]}getCameraToWorld(l,u){let g=new Float64Array(16);return r.bl(g,this.getWorldToCamera(l,u)),g}getCameraToWorldMercator(){return this._transform}getWorldToCameraPosition(l,u,g){let b=this.position;r.c4(b,b,-l);let C=new Float64Array(16);return r.bq(C,[g,g,g]),r.br(C,C,b),C[10]*=u,C}getWorldToCamera(l,u){let g=new Float64Array(16),b=new Float64Array(4),C=this.position;return r.ca(b,this._orientation),r.c4(C,C,-l),r.cb(g,b),r.br(g,g,C),g[1]*=-1,g[5]*=-1,g[9]*=-1,g[13]*=-1,g[8]*=u,g[9]*=u,g[10]*=u,g[11]*=u,g}getCameraToClipPerspective(l,u,g,b){let C=new Float64Array(16);return r.cc(C,l,u,g,b),C}getCameraToClipOrthographic(l,u,g,b,C,S){let E=new Float64Array(16);return r.cd(E,l,u,g,b,C,S),E}getDistanceToElevation(l,u=!1){let g=l===0?0:r.ce(l,u?r.a$(this.position[1]):this.position[1]),b=this.forward();return(g-this.position[2])/b[2]}clone(){return new fw([...this.position],[...this.orientation])}}let ma={BaseColor:5,MetallicRoughness:6,Normal:7,Occlusion:8,Emission:9,LUT:10,ShadowMap0:11};class YA{constructor(l=0,u=0,g=0,b=0){if(isNaN(l)||l<0||isNaN(u)||u<0||isNaN(g)||g<0||isNaN(b)||b<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=u,this.left=g,this.right=b}interpolate(l,u,g){return u.top!=null&&l.top!=null&&(this.top=r.ak(l.top,u.top,g)),u.bottom!=null&&l.bottom!=null&&(this.bottom=r.ak(l.bottom,u.bottom,g)),u.left!=null&&l.left!=null&&(this.left=r.ak(l.left,u.left,g)),u.right!=null&&l.right!=null&&(this.right=r.ak(l.right,u.right,g)),this}getCenter(l,u){let g=r.aA((this.left+l-this.right)/2,0,l),b=r.aA((this.top+u-this.bottom)/2,0,u);return new r.P(g,b)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new YA(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Xh=15;class $c{constructor(l,u,g,b,C,S,E){this.tileSize=512,this._renderWorldCopies=C===void 0||C,this._minZoom=l||0,this._maxZoom=u||22,this._minPitch=g??0,this._maxPitch=b??60,this.setProjection(S),this.setMaxBounds(E),this.width=0,this.height=0,this._center=new r.aR(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new YA,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._expandedProjMatrixCache={},this._distanceTileDataCache={},this._camera=new fw,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 $c(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&&(!u||!this._centerAltitude))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);let g=this._elevation;u||this._centerAltitude&&this._centerAltitudeValidForExaggeration&&g.exaggeration()&&this._centerAltitudeValidForExaggeration!==g.exaggeration()?(this._centerAltitude=this._centerAltitude/this._centerAltitudeValidForExaggeration*g.exaggeration(),this._centerAltitudeValidForExaggeration=g.exaggeration()):(this._centerAltitude=l||0,this._centerAltitudeValidForExaggeration=g.exaggeration()),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){if(this._centerAltitudeValidForExaggeration===void 0)return;let l=Math.max(0,(this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize);this._seaLevelZoom=this._zoomFromMercatorZ(l)}sampleAverageElevation(){if(!this._elevation)return 0;let l=this._elevation,u=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],g=this.horizonLineFromTop(),b=0,C=0;for(let S=0;S{let J=r.cX(q,z,U,Y,X);E.has(J)||(b.push(new r.aO(z,q,U,Y,X)),E.add(J))};for(let z=0;z0,ce=U.y+10,xe=q.wrap-(ne?0:1),Pe=q.wrap+(ae?0:1),ke=ne?U.x-1:J-1,Ne=ae?U.x+1:0;if(C)g[0]<0?(k(Y,Pe,U.z,Ne,U.y),g[1]<0&&ce&&(k(Y,X,U.z,U.x,U.y+1),k(Y,Pe,U.z,Ne,U.y+1)),g[1]>0&&_e&&(k(Y,X,U.z,U.x,U.y-1),k(Y,Pe,U.z,Ne,U.y-1))):g[0]>0?(k(Y,xe,U.z,ke,U.y),g[1]<0&&ce&&(k(Y,X,U.z,U.x,U.y+1),k(Y,xe,U.z,ke,U.y+1)),g[1]>0&&_e&&(k(Y,X,U.z,U.x,U.y-1),k(Y,xe,U.z,ke,U.y-1))):g[1]<0&&ce?k(Y,X,U.z,U.x,U.y+1):_e&&k(Y,X,U.z,U.x,U.y-1);else{let Me=q.visibleQuadrants;1&Me&&(k(Y,xe,U.z,ke,U.y),_e&&(k(Y,X,U.z,U.x,U.y-1),k(Y,xe,U.z,ke,U.y-1))),2&Me&&(k(Y,Pe,U.z,Ne,U.y),_e&&(k(Y,X,U.z,U.x,U.y-1),k(Y,Pe,U.z,Ne,U.y-1))),4&Me&&(k(Y,xe,U.z,ke,U.y),ce&&(k(Y,X,U.z,U.x,U.y+1),k(Y,xe,U.z,ke,U.y+1))),8&Me&&(k(Y,Pe,U.z,Ne,U.y),ce&&(k(Y,X,U.z,U.x,U.y+1),k(Y,Pe,U.z,Ne,U.y+1)))}}let F=[];for(let z of b)b.some(q=>z.isChildOf(q))||F.push(z);if(b=F.filter(z=>!l.some(q=>!!(z.overscaledZ{let ae=J.canonical.x+.5-U[0],ne=J.canonical.y+.5-U[1];return ae*ae+ne*ne{let Ne=r.cX(_e,ce,xe,Pe,ke);C.has(Ne)||(b.push(new r.aO(ce,_e,xe,Pe,ke)),C.add(Ne))},E=l.reduce((ce,_e)=>Math.max(ce,_e.overscaledZ),g),k=1<{let xe=Math.floor(ce[0]),Pe=Math.floor(ce[1]),ke=(ce[0]-xe)*r.al,Ne=(ce[1]-Pe)*r.al,Me=Math.floor(_e[0]),De=Math.floor(_e[1]),Be=(_e[0]-Me)*r.al,bt=(_e[1]-De)*r.al;for(let nt=-1;nt<=1;nt++){let kt=xe+nt;if(!(kt<0||kt>=k)){z.x=ke-nt*r.al,q.x=Be-(kt-Me)*r.al;for(let ft=-1;ft<=1;ft++){let At=Pe+ft;z.y=Ne-ft*r.al,q.y=bt-(At-De)*r.al,r.cY(z,q,F)&&S(E,0,g,kt,At)}}}},Y=u.points,X=Y[r.cu],J=Y[r.cv],ae=this._projectToGround(X,Y[r.cw]),ne=this._projectToGround(J,Y[r.cx]);return U(X,ae),U(J,ne),b}_projectToGround(l,u){return r.cy(r.cz(),l,u,l[2]/(l[2]-u[2]))}coveringTiles(l){let u=this.coveringZoomLevel(l),g=u,b=this.elevation&&this.elevation.exaggeration(),C=b&&!l.isTerrainDEM,S=this.projection.name==="mercator";if(l.minzoom!==void 0&&ul.maxzoom&&(u=l.maxzoom);let E=this.locationCoordinate(this.center),k=this.center.lat,F=1<{let Ct=new r.ae(Ke.x+25e-6,Ke.y,Ke.z),Kt=new r.ae(Ke.x,Ke.y+25e-6,Ke.z),di=Ke.toLngLat(),Ai=Ct.toLngLat(),ri=Kt.toLngLat(),ei=this.locationCoordinate(di),an=this.locationCoordinate(Ai),Xi=this.locationCoordinate(ri),tn=Math.hypot(an.x-ei.x,an.y-ei.y),Yi=Math.hypot(Xi.x-ei.x,Xi.y-ei.y);return Math.sqrt(tn*Yi)*Ne/25e-6},De=Ke=>{let Ot=Pe,Ct=ke;return{aabb:r.cE(this,F,0,0,0,Ke,Ct,Ot,this.projection),zoom:0,x:0,y:0,minZ:Ct,maxZ:Ot,wrap:Ke,fullyVisible:!1}},Be=[],bt=[],nt=u,kt=l.reparseOverscaled?g:u,ft=(ae-this._centerAltitude)*J,At=Ke=>{if(!this._elevation||!Ke.tileID||!S)return;let Ot=this._elevation.getMinMaxForTile(Ke.tileID),Ct=Ke.aabb;Ot?(Ct.min[2]=Ot.min,Ct.max[2]=Ot.max,Ct.center[2]=(Ct.min[2]+Ct.max[2])/2):(Ke.shouldSplit=vt(Ke),Ke.shouldSplit||(Ct.min[2]=Ct.max[2]=Ct.center[2]=this._centerAltitude))},pi=(Ke,Ot)=>{if(.707*Ot{if(Ke.zoom=.9)return!0}else if(C&&(Kt=Ke.aabb.distanceZ(ne)*J),this.projection.isReprojectedInTileSpace&&g<=5){let Yi=Math.pow(2,Ke.zoom),Nn=Me(new r.ae((Ke.x+.5)/Yi,(Ke.y+.5)/Yi));di=Nn>.85?1:Nn}if(!S){let Yi=Math.sqrt(Ot*Ot+Ct*Ct+Kt*Kt),Nn=(1<0;){let Ke=Be.pop(),Ot=Ke.x,Ct=Ke.y,Kt=Ke.fullyVisible,di=()=>this.projection.name==="globe"&&(Ke.y===0||Ke.y===(1<>1),an={aabb:S?Ke.aabb.quadrant(Ai):r.cE(this,F,Ke.zoom+1,ri,ei,Ke.wrap,Ke.minZ,Ke.maxZ,this.projection),zoom:Ke.zoom+1,x:ri,y:ei,wrap:Ke.wrap,fullyVisible:Kt,tileID:void 0,shouldSplit:void 0,minZ:Ke.minZ,maxZ:Ke.maxZ};C&&!q&&(an.tileID=new r.aO(Ke.zoom+1===nt?kt:Ke.zoom+1,Ke.wrap,Ke.zoom+1,ri,ei),At(an)),Be.push(an)}else{let Ai=Ke.zoom===nt?kt:Ke.zoom;if(l.minzoom&&l.minzoom>Ai)continue;let ri=0;if(!Kt){let tn=ce?Ke.aabb.intersectsPrecise(Y):Ke.aabb.intersectsPreciseFlat(Y);if(tn===0&&di()){let Yi=new r.cC(Ke.zoom,Ot,Ct);tn=r.cD(this,F,Yi,!0).intersectsPrecise(Y)}if(tn===0)continue;if(l.calculateQuadrantVisibility)if(Y.containsPoint(Ke.aabb.center))ri=15;else for(let Yi=0;Yi<4;Yi++)Ke.aabb.quadrant(Yi).intersects(Y)!==0&&(ri|=1<{let Kt=[0,0,0,1],di=[r.al,r.al,0,1],Ai=this.calculateFogTileMatrix(Ct.tileID.toUnwrapped());r.aC(Kt,Kt,Ai),r.aC(di,di,Ai);let ri=r.cF([],Kt,di),ei=r.cG([],Kt,di),an=r.c_(ri,ei);if(an===0)return!0;let Xi=!1,tn=this._elevation;if(tn&&an>Ke&&Ot!==0){let Yi=this.calculateProjMatrix(Ct.tileID.toUnwrapped()),Nn;l.isTerrainDEM||(Nn=tn.getMinMaxForTile(Ct.tileID)),Nn||(Nn={min:ke,max:Pe});let no=r.cH(this.rotation),lo=[no[0]*r.al,no[1]*r.al,Nn.max];r.af(lo,lo,Yi),Xi=(1-lo[1])*this.height*.5Ke.distanceSq-Ot.distanceSq).map(Ke=>Ke.tileID)}resize(l,u){this.width=l,this.height=u,this.pixelsToGLUnits=[2/l,-2/u],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 u=r.aA(l.lat,-r.cI,r.cI),g=this.projection.project(l.lng,u);return new r.P(g.x*this.worldSize,g.y*this.worldSize)}unproject(l){return this.projection.unproject(l.x/this.worldSize,l.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/r.ce(1,this.center.lat)/this.worldSize}setLocationAtPoint(l,u){let g,b,C=this.centerPoint;if(this.projection.name==="globe"){let E=this.worldSize;g=(u.x-C.x)/E,b=(u.y-C.y)/E}else{let E=this.pointCoordinate(u),k=this.pointCoordinate(C);g=E.x-k.x,b=E.y-k.y}let S=this.locationCoordinate(l);this.setLocation(new r.ae(S.x-g,S.y-b))}setLocation(l){this.center=this.coordinateLocation(l),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(l,u){return this.projection.locationPoint(this,l,u)}locationPoint3D(l,u){return this.projection.locationPoint(this,l,u,!0)}pointLocation(l){return this.coordinateLocation(this.pointCoordinate(l))}pointLocation3D(l,u){return this.coordinateLocation(this.pointCoordinate3D(l,u))}locationCoordinate(l,u){let g=u?r.ce(u,l.lat):void 0,b=this.projection.project(l.lng,l.lat);return new r.ae(b.x,b.y,g)}coordinateLocation(l){return this.projection.unproject(l.x,l.y)}pointRayIntersection(l,u){let g=u??this._centerAltitude,b=[l.x,l.y,0,1],C=[l.x,l.y,1,1];r.aC(b,b,this.pixelMatrixInverse),r.aC(C,C,this.pixelMatrixInverse);let S=C[3];r.cJ(b,b,1/b[3]),r.cJ(C,C,1/S);let E=b[2],k=C[2];return{p0:b,p1:C,t:E===k?0:(g-E)/(k-E)}}screenPointToMercatorRay(l){let u=[l.x,l.y,0,1],g=[l.x,l.y,1,1];return r.aC(u,u,this.pixelMatrixInverse),r.aC(g,g,this.pixelMatrixInverse),r.cJ(u,u,1/u[3]),r.cJ(g,g,1/g[3]),u[2]=r.ce(u[2],this._center.lat)*this.worldSize,g[2]=r.ce(g[2],this._center.lat)*this.worldSize,r.cJ(u,u,1/this.worldSize),r.cJ(g,g,1/this.worldSize),new r.ax([u[0],u[1],u[2]],r.aw([],r.av([],g,u)))}rayIntersectionCoordinate(l){let{p0:u,p1:g,t:b}=l,C=r.ce(u[2],this._center.lat),S=r.ce(g[2],this._center.lat);return new r.ae(r.ak(u[0],g[0],b)/this.worldSize,r.ak(u[1],g[1],b)/this.worldSize,r.ak(C,S,b))}pointCoordinate(l,u=this._centerAltitude){return this.projection.pointCoordinate(this,l.x,l.y,u)}pointCoordinate3D(l,u){if(!this.elevation)return this.pointCoordinate(l,u);let g=this.projection.pointCoordinate3D(this,l.x,l.y);if(g)return new r.ae(g[0],g[1],g[2]);let b=0,C=this.horizonLineFromTop();if(l.y>C)return this.pointCoordinate(l,u);let S=.02*C,E=l.clone();for(let k=0;k<10&&C-b>S;k++){E.y=r.ak(b,C,.66);let F=this.projection.pointCoordinate3D(this,E.x,E.y);F?(C=E.y,g=F):b=E.y}return g?new r.ae(g[0],g[1],g[2]):this.pointCoordinate(l)}isPointAboveHorizon(l){return this.projection.isPointAboveHorizon(this,l)}isPointOnSurface(l){if(l.y<0||l.y>this.height||l.x<0||l.x>this.width)return!1;if(this.elevation||this.zoom>=r.cK)return!this.isPointAboveHorizon(l);let u=this.pointCoordinate(l);return u.y>=0&&u.y<=1}_coordinatePoint(l,u){let g=u&&this.elevation?this.elevation.getAtPointOrZero(l,this._centerAltitude):this._centerAltitude,b=[l.x*this.worldSize,l.y*this.worldSize,g+l.toAltitude(),1];return r.aC(b,b,this.pixelMatrix),b[3]>0?new r.P(b[0]/b[3],b[1]/b[3]):new r.P(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){let{top:l,left:u}=this._edgeInsets,g=this.height-this._edgeInsets.bottom,b=this.width-this._edgeInsets.right,C=this.pointLocation3D(new r.P(u,l)),S=this.pointLocation3D(new r.P(b,l)),E=this.pointLocation3D(new r.P(b,g)),k=this.pointLocation3D(new r.P(u,g)),F=Math.min(C.lng,S.lng,E.lng,k.lng),z=Math.max(C.lng,S.lng,E.lng,k.lng),q=Math.min(C.lat,S.lat,E.lat,k.lat),U=Math.max(C.lat,S.lat,E.lat,k.lat),Y=Math.pow(2,-this.zoom)/16*270,X=this.projection.name==="globe"?1:4,J=(ae,ne,ce,_e,xe)=>{let Pe=(ae+ce)/2,ke=(ne+_e)/2,Ne=new r.P(Pe,ke),{lng:Me,lat:De}=this.pointLocation3D(Ne),Be=Math.max(0,F-Me,q-De,Me-z,De-U);F=Math.min(F,Me),z=Math.max(z,Me),q=Math.min(q,De),U=Math.max(U,De),(xeY)&&(J(ae,ne,Pe,ke,xe+1),J(Pe,ke,ce,_e,xe+1))};if(J(u,l,b,l,1),J(b,l,b,g,1),J(b,g,u,g,1),J(u,g,u,l,1),this.projection.name==="globe"){let[ae,ne]=r.cL(this);ae?(U=90,z=180,F=-180):ne&&(q=-90,z=180,F=-180)}return new r.aI(new r.aR(F,q),new r.aR(z,U))}_getBoundsRectangular(l,u){let{top:g,left:b}=this._edgeInsets,C=this.height-this._edgeInsets.bottom,S=this.width-this._edgeInsets.right,E=new r.P(b,g),k=new r.P(S,g),F=new r.P(S,C),z=new r.P(b,C),q=this.pointCoordinate(E,l),U=this.pointCoordinate(k,l),Y=this.pointCoordinate(F,u),X=this.pointCoordinate(z,u),J=(ae,ne)=>(ne.y-ae.y)/(ne.x-ae.x);return q.y>1&&U.y>=0?q=new r.ae((1-X.y)/J(X,q)+X.x,1):q.y<0&&U.y<=1&&(q=new r.ae(-X.y/J(X,q)+X.x,0)),U.y>1&&q.y>=0?U=new r.ae((1-Y.y)/J(Y,U)+Y.x,1):U.y<0&&q.y<=1&&(U=new r.ae(-Y.y/J(Y,U)+Y.x,0)),new r.aI().extend(this.coordinateLocation(q)).extend(this.coordinateLocation(U)).extend(this.coordinateLocation(X)).extend(this.coordinateLocation(Y))}_getBoundsRectangularTerrain(){let l=this.elevation;if(!l.visibleDemTiles.length||l.isUsingMockSource())return this._getBoundsRectangular(0,0);let u=l.visibleDemTiles.reduce((g,b)=>{if(b.dem){let C=b.dem.tree;g.min=Math.min(g.min,C.minimums[0]),g.max=Math.max(g.max,C.maximums[0])}return g},{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(u.min*l.exaggeration(),u.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 u=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))-this.centerOffset.y,g=this.height/2-u*(1-this._horizonShift);return l?Math.max(0,g):g}getMaxBounds(){return this.maxBounds}setMaxBounds(l){this.maxBounds=l,this.minLat=-r.cI,this.maxLat=r.cI,this.minLng=-180,this.maxLng=180,l&&(this.minLat=l.getSouth(),this.maxLat=l.getNorth(),this.minLng=l.getWest(),this.maxLng=l.getEast(),this.maxLngq&&(E=q-F),q-zY&&(S=Y-k),Y-U{for(let vt=0;vt<16;vt++)kt[vt]=r.ak(ft[vt],At[vt],pi)})(E,E,k,r.c$(this.pitch>=Xh?1:this.pitch/Xh))}else E=k;let F=r.cO([],k,S),z=r.cO([],E,S);if(this.projection.isReprojectedInTileSpace){let De=this.locationCoordinate(this.center),Be=r.bA([]);r.br(Be,Be,[De.x*this.worldSize,De.y*this.worldSize,0]),r.aB(Be,Be,r.cP(this)),r.br(Be,Be,[-De.x*this.worldSize,-De.y*this.worldSize,0]),r.aB(z,z,Be),r.aB(F,F,Be),this.inverseAdjustmentMatrix=r.cQ(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];if(this.mercatorMatrix=r.cR([],z,[this.worldSize,this.worldSize,this.worldSize/C,1]),this.projMatrix=z,this.invProjMatrix=r.bl(new Float64Array(16),this.projMatrix),u){let De=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,1/0);De[8]=2*-l.x/this.width,De[9]=2*l.y/this.height,this.expandedFarZProjMatrix=r.cO([],De,S)}else this.expandedFarZProjMatrix=this.projMatrix;let q=r.bl([],E);this.frustumCorners=r.cS.fromInvProjectionMatrix(q,this.horizonLineFromTop(),this.height),this.cameraFrustum=r.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,0,!u);let U=new Float32Array(16);r.bA(U),r.cR(U,U,[1,-1,1]),r.cT(U,U,this._pitch),r.bB(U,U,this.angle);let Y=r.cc(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ);this.starsProjMatrix=r.bz(Y);let X=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;Y[8]=2*-l.x/this.width,Y[9]=2*(l.y+X)/this.height,this.skyboxMatrix=r.aB(U,Y,U);let J=this.point,ae=J.x,ne=J.y,ce=this.width%2/2,_e=this.height%2/2,xe=Math.cos(this.angle),Pe=Math.sin(this.angle),ke=ae-Math.round(ae)+xe*ce+Pe*_e,Ne=ne-Math.round(ne)+xe*_e+Pe*ce,Me=new Float64Array(z);if(r.br(Me,Me,[ke>.5?ke-1:ke,Ne>.5?Ne-1:Ne,0]),this.alignedProjMatrix=Me,z=r.bC(),r.cR(z,z,[this.width/2,-this.height/2,1]),r.br(z,z,[1,-1,0]),this.labelPlaneMatrix=z,z=r.bC(),r.cR(z,z,[1,-1,1]),r.br(z,z,[-1,-1,0]),r.cR(z,z,[2/this.width,2/this.height,1]),this.glCoordMatrix=z,this.pixelMatrix=r.aB(new Float64Array(16),this.labelPlaneMatrix,F),this._calcFogMatrices(),this._distanceTileDataCache={},z=r.bl(new Float64Array(16),this.pixelMatrix),!z)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=z,this.projection.name==="globe"||this.mercatorFromTransition){this.globeMatrix=r.cU(this);let De=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=r.af(De,De,S),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=z;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={},this._expandedProjMatrixCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};let l=this.cameraWorldSizeForFog,u=this.cameraPixelsPerMeter,g=this._camera.position,b=1/this.height/this._pixelsPerMercatorPixel,C=[l,l,u];r.c4(C,C,b),r.c4(g,g,-1),r.cV(g,g,C);let S=r.bC();r.br(S,S,g),r.cR(S,S,C),this.mercatorFogMatrix=S,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(l,u,b)}_computeCameraPosition(l){let u=(l=l||this.pixelsPerMeter)/this.pixelsPerMeter,g=this._camera.forward(),b=this.point,C=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*u-l/this.worldSize*this._centerAltitude;return[b.x/this.worldSize-g[0]*C,b.y/this.worldSize-g[1]*C,l/this.worldSize*this._centerAltitude-g[2]*C]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(l){let u=this._maxCameraBoundsDistance()*Math.cos(this._pitch),g=this._camera.position[2],b=l[2],C=1;this.projection.wrap&&(this.center=this.center.wrap()),b>0&&(C=Math.min((u-g)/b,1)),this._camera.position=r.bH([],this._camera.position,l,C),this._updateStateFromCamera()}_updateStateFromCamera(){let l=this._camera.position,u=this._camera.forward(),{pitch:g,bearing:b}=this._camera.getPitchBearing(),C=r.ce(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,S=this._mercatorZfromZoom(this._maxZoom)*Math.cos(r.an(this._maxPitch)),E=Math.max((l[2]-C)/Math.cos(g),S),k=this._zoomFromMercatorZ(E);r.bH(l,l,u,E),this._pitch=r.aA(g,r.an(this.minPitch),r.an(this.maxPitch)),this.angle=r.bT(b,-Math.PI,Math.PI),this._setZoom(r.aA(k,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new r.ae(l[0],l[1],l[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(l){return Math.pow(2,l)*this.tileSize}_mercatorZfromZoom(l){return this.cameraToCenterDistance/this._worldSizeFromZoom(l)}_minimumHeightOverTerrain(){let l=Math.min(this._seaLevelZoom!=null?this._seaLevelZoom:this._zoom,this._maxZoom)+4;return this._mercatorZfromZoom(l)}_zoomFromMercatorZ(l){return this.scaleZoom(this.cameraToCenterDistance/(Math.max(0,l)*this.tileSize))}zoomFromMercatorZAdjusted(l){let u=0,g=r.cK,b=0,C=1/0;for(;g-u>1e-6&&g>u;){let S=u+.5*(g-u),E=this.tileSize*Math.pow(2,S),k=this.getCameraToCenterDistance(this.projection,S,E),F=this.scaleZoom(k/(Math.max(0,l)*this.tileSize)),z=Math.abs(S-F);zF||U.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+r.cW(this.fovAboveCenter)>88||this.anyCornerOffEdge(new r.P(0,0),new r.P(this.width,this.height))}zoomDeltaToMovement(l,u){let g=r.ag(r.av([],this._camera.position,l)),b=this._zoomFromMercatorZ(g)+u;return g-this._mercatorZfromZoom(b)}getCameraPoint(){if(this.projection.name==="globe"){let l=(function([u,g,b],C){let S=[u,g,b,1];r.aC(S,S,C);let E=S[3]=Math.max(S[3],1e-6);return S[0]/=E,S[1]/=E,S[2]/=E,S})([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new r.P(l[0],l[1])}{let l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,l))}}getCameraToCenterDistance(l,u=this.zoom,g=this.worldSize){let b=r.cN(l,u,this.width,this.height,1024),C=l.pixelSpaceConversion(this.center.lat,g,b),S=.5/Math.tan(.5*this._fov)*this.height*C;return this.isOrthographic&&(S=r.ak(1,S,r.c$(this.pitch>=Xh?1:this.pitch/Xh))),S}getWorldToCameraMatrix(){let l=this._camera.getWorldToCamera(this.worldSize,this.projection.zAxisUnit==="meters"?this.pixelsPerMeter:1);return this.projection.name==="globe"&&r.aB(l,l,this.globeMatrix),l}getFrustum(l){return r.cA.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,l,this.projection.zAxisUnit==="meters")}}let yf=(_,l)=>{if(l>0&&_.terrain&&r.w("Cutoff is currently disabled on terrain"),l<=0||_.terrain)return{shouldRenderCutoff:!1,uniformValues:{u_cutoff_params:[0,0,0,1]}};let u=_.transform,g=Math.max(Math.abs(u._zoom-(_.minCutoffZoom-1)),1),b=u.isLODDisabled(!1)?r.ah(60,45,u.pitch):r.ah(30,15,u.pitch),C=u._farZ-u._nearZ,S=l*u.height,E=((1-(k=b))*u.cameraToCenterDistance+k*(u._farZ+S))*g;var k;return{shouldRenderCutoff:b<1,uniformValues:{u_cutoff_params:[u._nearZ,u._farZ,(E-u._nearZ)/C,(E-S-u._nearZ)/C]}}},Vl={cascadeCount:2,normalOffset:3,shadowMapResolution:2048};class EL{constructor(l,u){this.aabb=l,this.lastCascade=u}}class nx{add(l,u){let g=this.receivers[l.key];g!==void 0?(g.aabb.min[0]=Math.min(g.aabb.min[0],u.min[0]),g.aabb.min[1]=Math.min(g.aabb.min[1],u.min[1]),g.aabb.min[2]=Math.min(g.aabb.min[2],u.min[2]),g.aabb.max[0]=Math.max(g.aabb.max[0],u.max[0]),g.aabb.max[1]=Math.max(g.aabb.max[1],u.max[1]),g.aabb.max[2]=Math.max(g.aabb.max[2],u.max[2])):this.receivers[l.key]=new EL(u,null)}clear(){this.receivers={}}get(l){return this.receivers[l.key]}computeRequiredCascades(l,u,g){let b=r.d8.fromPoints(l.points),C=0;for(let S in this.receivers){let E=this.receivers[S];if(!E||!b.intersectsAabb(E.aabb))continue;E.aabb.min=b.closestPoint(E.aabb.min),E.aabb.max=b.closestPoint(E.aabb.max);let k=E.aabb.getCorners();for(let F=0;F1||U[1]<-1||U[1]>1){z=!1;break}}if(E.lastCascade=F,C=Math.max(C,F),z)break}}return C+1}}class c8{constructor(l){this.painter=l,this._enabled=!1,this._shadowLayerCount=0,this._numCascadesToRender=0,this._cascades=[],this._groundShadowTiles=[],this._receivers=new nx,this._depthMode=new Vi(l.context.gl.LEQUAL,Vi.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(Vl,["Shadows"],"cascadeCount",{min:1,max:2,step:1}),l.tp.registerParameter(Vl,["Shadows"],"normalOffset",{min:0,max:10,step:.05}),l.tp.registerParameter(Vl,["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,u){let g=this.painter;if(this._enabled=!1,this._shadowLayerCount=0,this._receivers.clear(),!u||!u.properties)return;let b=u.properties.get("shadow-intensity");if(!u.shadowsEnabled()||b<=0||(this._shadowLayerCount=g.style.order.reduce((X,J)=>{let ae=g.style._mergedLayers[J];return X+(ae.hasShadowPass()&&!ae.isHidden(l.zoom)?1:0)},0),this._enabled=this._shadowLayerCount>0,!this.enabled))return;let C=g.context,S=Vl.shadowMapResolution,E=Vl.shadowMapResolution;if(this._cascades.length===0||Vl.shadowMapResolution!==this._cascades[0].texture.size[0]){this._cascades=[];for(let X=0;Xae.dem).forEach(ae=>{let ne=ae.dem.tree;J[0]=Math.min(J[0],ne.minimums[0]),J[1]=Math.max(J[1],ne.maximums[0])}),J[0]!==1e4&&(k=(J[1]-J[0])*X.exaggeration())}let F=1.5*l.cameraToCenterDistance,z=3*F,q=new Float64Array(16);for(let X=0;X=0)return{};let C=(function(k,F,z){let q=z/(1<0&&(r.d7(C[1],C[1],[b[0]*S,0,0]),r.d7(C[2],C[2],[b[0]*S,0,0])),b[1]<0?(r.d7(C[0],C[0],[0,b[1]*S,0]),r.d7(C[1],C[1],[0,b[1]*S,0])):b[1]>0&&(r.d7(C[2],C[2],[0,b[1]*S,0]),r.d7(C[3],C[3],[0,b[1]*S,0]));let E={};return E.vertices=C,E.planes=[gw(C[1],C[0],C[4]),gw(C[2],C[1],C[5]),gw(C[3],C[2],C[6]),gw(C[0],C[3],C[7])],E}addShadowReceiver(l,u,g){this._receivers.add(l,r.d8.fromTileIdAndHeight(l,u,g))}getMaxCascadeForTile(l){let u=this._receivers.get(l);return u&&u.lastCascade?u.lastCascade:0}}function gw(_,l,u){let g=r.av([],u,l),b=r.av([],_,l),C=r.bI([],g,b),S=r.ag(C);return S===0?[0,0,1,0]:(r.c4(C,C,1/S),[C[0],C[1],C[2],-r.bJ(C,l)])}function cy(_){let l=_.properties.get("direction"),u=r.d3(l.x,l.y,l.z);u[2]=r.aA(u[2],0,75);let g=r.d5([u[0],u[1],u[2]]);return r.d4(g.x,g.y,g.z)}function Ap(_,l,u){let g=l.properties.get("color-use-theme")==="none",b=l.properties.get("color"),C=l.properties.get("intensity"),S=l.properties.get("direction"),E=[S.x,S.y,S.z],k=u.properties.get("color-use-theme")==="none",F=u.properties.get("color"),z=u.properties.get("intensity"),q=Math.max(r.bJ([0,0,1],E),0),U=[0,0,0];r.c4(U,F.toPremultipliedRenderColor(k?null:_.getLut(l.scope)).toArray01Linear().slice(0,3),z);let Y=[0,0,0];return r.c4(Y,b.toPremultipliedRenderColor(g?null:_.getLut(u.scope)).toArray01Linear().slice(0,3),q*C),r.da([U[0]>0?U[0]/(U[0]+Y[0]):0,U[1]>0?U[1]/(U[1]+Y[1]):0,U[2]>0?U[2]/(U[2]+Y[2]):0])}function d8(_,l,u,g,b,C){let S=_.zoom,E=_.scale,k=_.worldSize,F=1/k,z=_.aspect,q=Math.sqrt(1+z*z)*Math.tan(.5*_.fovX),U=q*q,Y=g-u,X=g+u,J,ae;U>Y/X?(J=g,ae=g*q):(J=.5*X*(1+U),ae=.5*Math.sqrt(Y*Y+2*(g*g+u*u)*U+X*X*U*U));let ne=_.projection.pixelsPerMeter(_.center.lat,k),ce=_._camera.getCameraToWorldMercator(),_e=[0,0,-J*F];r.af(_e,_e,ce);let xe=ae*F,Pe=_._edgeInsets;if(!(Pe.left===0&&Pe.top===0&&Pe.right===0&&Pe.bottom===0||Pe.left===Pe.right&&Pe.top===Pe.bottom)){let Kt=_._camera.getWorldToCamera(_.worldSize,_.projection.zAxisUnit==="meters"?ne:1),di=_._camera.getCameraToClipPerspective(_._fov,_.width/_.height,u,g);di[8]=2*-_.centerOffset.x/_.width,di[9]=2*_.centerOffset.y/_.height;let Ai=new Float64Array(16);r.cO(Ai,di,Kt);let ri=new Float64Array(16);r.bl(ri,Ai);let ei=r.cA.fromInvProjectionMatrix(ri,k,S,!0);for(let an of ei.points){let Xi=((ke=an)[0]/=E,ke[1]/=E,ke[2]=r.ce(ke[2],_._center.lat),ke);xe=Math.max(xe,r.c5(r.d9([],_e,Xi)))}}var ke;xe*=b/(b-1);let Ne=Math.acos(l[2]),Me=Math.atan2(-l[0],-l[1]),De=new fw;De.position=_e,De.setPitchBearing(Ne,Me);let Be=De.getWorldToCamera(k,ne),bt=xe*k,nt=Math.min(_._mercatorZfromZoom(17)*k*-2,-2*bt),kt=De.getCameraToClipOrthographic(-bt,bt,-bt,bt,nt,(bt+C*ne)/l[2]),ft=new Float64Array(16);r.aB(ft,kt,Be);let At=r.d4(Math.floor(1e6*_e[0])/1e6*k,Math.floor(1e6*_e[1])/1e6*k,0),pi=.5*b,vt=[0,0,0];r.af(vt,At,ft),r.c4(vt,vt,pi);let Ke=[Math.floor(vt[0]),Math.floor(vt[1]),Math.floor(vt[2])],Ot=[0,0,0];r.av(Ot,vt,Ke),r.c4(Ot,Ot,-1/pi);let Ct=new Float64Array(16);return r.bA(Ct),r.br(Ct,Ct,Ot),r.aB(ft,Ct,ft),[ft,bt]}class dy extends r.E{constructor(l){super(),this.requestManager=l,this.models={"":{}},this.modelUris={"":{}},this.modelByURL={},this.numModelsLoading={}}loadModel(l,u){return r.aV(this.requestManager.transformRequest(u,r.R.Model).url).then(g=>{if(!g)return;let b=r.aW(g),C=new r.aX(l,void 0,void 0,b);return C.computeBoundsAndApplyParent(),C}).catch(g=>{if(g&&g.status===404)return null;this.fire(new r.y(new Error(`Could not load model ${l} from ${u}: ${g.message}`)))})}load(l,u,g={forceReload:!1}){this.models[u]||(this.models[u]={});let b=Object.keys(l),C=[],S=[];for(let E of b){let k=l[E];this.hasURLBeenRequested(k)&&!g.forceReload||(this.modelByURL[k]={modelId:E,scope:u},C.push(this.loadModel(E,k)),S.push(E)),this.models[u][E]||(this.models[u][E]={model:null,numReferences:1})}this.numModelsLoading[u]=(this.numModelsLoading[u]||0)+S.length,Promise.allSettled(C).then(E=>{for(let k=0;k{this.fire(new r.y(new Error(`Could not load models: ${E.message}`)))})}isLoaded(){for(let l in this.numModelsLoading)if(this.numModelsLoading[l]>0)return!1;return!0}hasModel(l,u,g={exactIdMatch:!1}){return!!(g.exactIdMatch?this.getModel(l,u):this.getModelByURL(this.modelUris[u][l]))}getModel(l,u){return this.models[u]||(this.models[u]={}),this.models[u][l]?this.models[u][l].model:void 0}getModelByURL(l){if(!l)return null;let u=this.modelByURL[l];return u?this.models[u.scope][u.modelId].model:null}hasModelBeenAdded(l,u){return this.models[u]&&this.models[u][l]!==void 0}getModelURIs(l){return this.modelUris[l]||{}}addModel(l,u,g){this.models[g]||(this.models[g]={}),this.modelUris[g]||(this.modelUris[g]={});let b=this.requestManager.normalizeModelURL(u);if((this.hasModel(l,g,{exactIdMatch:!0})||this.hasModelBeenAdded(l,g))&&this.modelUris[g][l]===b)this.models[g][l].numReferences++;else if(this.hasURLBeenRequested(b)){let{scope:C,modelId:S}=this.modelByURL[b];this.models[C][S].numReferences++}else this.modelUris[g][l]=b,this.load({[l]:this.modelUris[g][l]},g)}addModelURLs(l,u){this.models[u]||(this.models[u]={}),this.modelUris[u]||(this.modelUris[u]={});let g=this.modelUris[u];for(let b in l)g[b]=this.requestManager.normalizeModelURL(l[b])}reloadModels(l){this.load(this.modelUris[l],l,{forceReload:!0})}addModelsFromBucket(l,u){this.models[u]||(this.models[u]={}),this.modelUris[u]||(this.modelUris[u]={});let g={};for(let b of l)this.hasModel(b,u,{exactIdMatch:!0})||this.hasURLBeenRequested(b)?this.models[u][b].numReferences++:this.modelUris[u][b]&&!this.hasURLBeenRequested(b)?g[b]=this.modelUris[u][b]:!this.hasURLBeenRequested(b)&&r.db(b,!1)&&(this.modelUris[u][b]=this.requestManager.normalizeModelURL(b),g[b]=this.modelUris[u][b]);this.load(g,u)}hasURLBeenRequested(l){return this.modelByURL[l]!==void 0}removeModel(l,u,g=!1,b=!1){if(this.models[u]&&this.models[u][l]&&(this.models[u][l].numReferences--,this.models[u][l].numReferences===0||b)){let C=this.modelUris[u][l];g||delete this.modelUris[u][l],delete this.modelByURL[C];let S=this.models[u][l].model;if(!S)return;delete this.models[u][l],S.destroy()}}destroy(){for(let l of Object.keys(this.models))for(let u of Object.keys(this.models[l])){let g=this.models[l][u].model;delete this.models[l][u],g&&g.destroy()}this.models={"":{}},this.modelUris={"":{}},this.modelByURL={},this.numModelsLoading={}}listModels(l){return this.models[l]||(this.models[l]={}),Object.keys(this.models[l])}upload(l,u){this.models[u]||(this.models[u]={});for(let g in this.models[u])this.models[u][g].model&&this.models[u][g].model.upload(l.context)}}let AL=new r.a9({data:new r.aa(r.a6.colorTheme.data)});function _w(_){if(!_.metadata||!_.metadata.content_area)return;let l=r.o.devicePixelRatio,{left:u,top:g,width:b,height:C}=_.metadata.content_area,S=u*l,E=g*l;return[S,E,S+b*l,E+C*l]}function yw(_){if(_)return _.map(([l,u])=>[l*r.o.devicePixelRatio,u*r.o.devicePixelRatio])}class vf{constructor(l,u,g){this.id=l,this.scope=u,this.sourceCache=g,this.pendingRequests=new Set,this.missingRequests=new Set}addPendingRequest(l){this.missingRequests.has(l.name)||this.pendingRequests.has(l.name)||this.pendingRequests.add(l.name)}hasPendingRequests(){return this.pendingRequests.size>0}resolvePendingRequests(){let l=new Map;if(!this.sourceCache.loaded())return l;let u=this.sourceCache.getVisibleCoordinates();if(u.length===0)return l;let g=this.sourceCache.getSource();if(!(g instanceof pf))return l;let b=u.map(S=>this.sourceCache.getTile(S)),C=g.getImages(b,Array.from(this.pendingRequests));for(let[S,E]of C)l.set(r.I.from({name:S,iconsetId:this.id}),E),this.pendingRequests.delete(S);for(let S of this.pendingRequests)this.missingRequests.add(S);return this.pendingRequests.clear(),l}}let d_=(_,l)=>Ue(_,l&&l.filter(u=>u.identifier!=="source.canvas")),u8=r.aH(Go,["addLayer","removeLayer","setLights","setPaintProperty","setLayoutProperty","setSlot","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setSnow","setRain","setProjection","setCamera","addImport","removeImport","updateImport","addIconset","removeIconset"]),p8=r.aH(Go,["setCenter","setZoom","setBearing","setPitch"]),vw=new Set(["background","sky","slot","custom"]),DL={version:8,layers:[],sources:{}},bw={duration:300,delay:0};class Gu extends r.E{constructor(l,u={}){super(),this.map=l,this.scope=u.scope||"",this.globalId=null,this.fragments=[],this.importDepth=u.importDepth||0,this.importsCache=u.importsCache||new Map,this.resolvedImports=u.resolvedImports||new Set,this.transition=Object.assign({},bw),this._buildingIndex=new ow(this),this.crossTileSymbolIndex=new sl,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=u.styleChanges||new gr,this.dispatcher=u.dispatcher?u.dispatcher:new r.D(r.dd(),this),u.imageManager?this.imageManager=u.imageManager:(this.imageManager=new Qt(this.map._spriteFormat),this.imageManager.setEventedParent(this)),this.imageManager.addScope(this.scope),this.glyphManager=u.glyphManager?u.glyphManager:new r.de(l._requestManager,u.localFontFamily?r.df.all:u.localIdeographFontFamily?r.df.ideographs:r.df.none,u.localFontFamily||u.localIdeographFontFamily),u.modelManager?this.modelManager=u.modelManager:(this.modelManager=new dy(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=u.configOptions?u.configOptions:new Map,this._configDependentLayers=u.configDependentLayers?u.configDependentLayers:new Set,this._config=u.config,this._styleColorTheme={lut:null,lutLoading:!1,lutLoadingCorrelationID:0,colorTheme:null,colorThemeOverride:u.colorThemeOverride},this._styleColorThemeForScope={},this._initialConfig=u.initialConfig,this.dispatcher.broadcast("setReferrer",r.dg());let g=this;this._rtlTextPluginCallback=Gu.registerForPluginStateChange(b=>{g.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:b.pluginStatus,pluginURL:b.pluginURL},(C,S)=>{if(r.dh(C),S&&S.every(E=>E))for(let E in g._sourceCaches){let k=g._sourceCaches[E],F=k.getSource().type;F!=="vector"&&F!=="geojson"||k.reload()}})}),this.on("data",b=>{if(b.dataType!=="source"||b.sourceDataType!=="metadata")return;let C=this.getOwnSource(b.sourceId);if(C&&C.vectorLayerIds)for(let S in this._layers){let E=this._layers[S];E.source===C.id&&this._validateLayer(E)}})}load(l){return l?(typeof l=="string"?this.loadURL(l):this.loadJSON(l),this):this}_getGlobalId(l){if(!l)return null;if(typeof l=="string"){if(r.h(l))return l;let u=r.di(l);if(!u.startsWith("http"))try{return new URL(u,location.href).toString()}catch{return u}return u}return`json://${r.dj(JSON.stringify(l))}`}_diffStyle(l,u,g){this.globalId=this._getGlobalId(l);let b=(C,S)=>{try{S(null,this.setState(C,g))}catch(E){S(E,!1)}};if(typeof l=="string"){let C=this.map._requestManager.normalizeStyleURL(l),S=this.map._requestManager.transformRequest(C,r.R.Style);r.m(S,(E,k)=>{E?this.fire(new r.y(E)):k&&b(k,u)})}else typeof l=="object"&&b(l,u)}loadURL(l,u={}){this.fire(new r.z("dataloading",{dataType:"style"}));let g=typeof u.validate=="boolean"?u.validate:!r.h(l);this.globalId=this._getGlobalId(l),l=this.map._requestManager.normalizeStyleURL(l,u.accessToken),this.resolvedImports.add(l);let b=this.importsCache.get(l);if(b)return this._load(b,g);let C=this.map._requestManager.transformRequest(l,r.R.Style);this._request=r.m(C,(S,E)=>{if(this._request=null,S)this.fire(new r.y(S));else if(E)return this.importsCache.set(l,E),this._load(E,g)})}loadJSON(l,u={}){this.fire(new r.z("dataloading",{dataType:"style"})),this.globalId=this._getGlobalId(l),this._request=r.o.frame(()=>{this._request=null,this._load(l,u.validate!==!1)})}loadEmpty(){this.fire(new r.z("dataloading",{dataType:"style"})),this._load(DL,!1)}_loadImports(l,u,g){if(this.importDepth>=4)return r.w("Style doesn't support nesting deeper than 5"),Promise.resolve();let b=[];for(let C of l){let S=this._createFragmentStyle(C),E=new Promise(z=>{S.once("style.import.load",z),S.once("error",z)}).then(()=>this.mergeAll());if(b.push(E),this.resolvedImports.has(C.url)){S.loadEmpty();continue}let k=C.data||this.importsCache.get(C.url);k?(S.loadJSON(k,{validate:u}),this._isInternalStyle(k)&&(S.globalId=null)):C.url?S.loadURL(C.url,{validate:u}):S.loadEmpty();let F={style:S,id:C.id,config:C.config};if(g){let z=this.fragments.findIndex(({id:q})=>q===g);this.fragments=this.fragments.slice(0,z).concat(F).concat(this.fragments.slice(z))}else this.fragments.push(F)}return Promise.allSettled(b)}getImportGlobalIds(l=this,u=new Set){for(let g of l.fragments)g.style.globalId&&u.add(g.style.globalId),this.getImportGlobalIds(g.style,u);return[...u.values()]}_createFragmentStyle(l){let u=this.scope?r.B(l.id,this.scope):l.id,g,b=this._initialConfig&&this._initialConfig[u];(l.config||b)&&(g=Object.assign({},l.config,b));let C=new Gu(this.map,{scope:u,styleChanges:this._changes,importDepth:this.importDepth+1,importsCache:this.importsCache,resolvedImports:new Set(this.resolvedImports),dispatcher:this.dispatcher,imageManager:this.imageManager,glyphManager:this.glyphManager,modelManager:this.modelManager,config:g,configOptions:this.options,colorThemeOverride:l["color-theme"],configDependentLayers:this._configDependentLayers});return C.setEventedParent(this.map,{style:C}),C}_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,u){if(this._isInternalStyle(l)){let C=Object.assign({},DL,{imports:[{id:"basemap",data:l,url:""}]});return void this._load(C,u)}if(this.updateConfig(this._config,l.schema),u&&d_(this,gc(l)))return;this._loaded=!0,this.stylesheet=r.dk(l);let g=()=>{for(let k in l.sources)this.addSource(k,l.sources[k],{validate:!1,isInitialLoad:!0});if(l.iconsets)for(let k in l.iconsets)this.addIconset(k,l.iconsets[k]);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 C=rw(this.stylesheet.layers);if(this._order=C.map(k=>k.id),this.stylesheet.light&&r.w("The `light` root property is deprecated, prefer using `lights` with `flat` light type instead."),this.stylesheet.lights)if(this.stylesheet.lights.length===1&&this.stylesheet.lights[0].type==="flat"){let k=this.stylesheet.lights[0];this.light=new ot(k.properties,k.id)}else this.setLights(this.stylesheet.lights);this.light||(this.light=new ot(this.stylesheet.light)),this._layers={};for(let k of C){let F=r.dq(k,this.scope,this._styleColorTheme.lut,this.options);F.configDependencies.size!==0&&this._configDependentLayers.add(F.fqid),F.setEventedParent(this,{layer:{id:F.id}}),this._layers[F.id]=F;let z=this.getOwnLayerSourceCache(F),q=!!this.directionalLight&&this.directionalLight.shadowsEnabled();z&&F.canCastShadows()&&q&&(z.castsShadows=!0)}this.stylesheet.featuresets&&this.setFeaturesetSelectors(this.stylesheet.featuresets),this.stylesheet.models&&this.addModelURLs(this.stylesheet.models);let S=this.stylesheet.terrain;S&&(this.checkCanvasFingerprintNoise(),this.disableElevatedTerrain||this.terrainSetForDrapingOnly()||this._createTerrain(S,1)),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this.stylesheet.snow&&this._createSnow(this.stylesheet.snow),this.stylesheet.rain&&this._createRain(this.stylesheet.rain),this.stylesheet.transition&&this.setTransition(this.stylesheet.transition),this.fire(new r.z("data",{dataType:"style"}));let E=this.isRootStyle();l.imports?this._loadImports(l.imports,u).then(()=>{this._reloadImports(),this.fire(new r.z(E?"style.load":"style.import.load"))}).catch(k=>{this.fire(new r.y(new Error("Failed to load imports",k))),this.fire(new r.z(E?"style.load":"style.import.load"))}):(this._reloadImports(),this.fire(new r.z(E?"style.load":"style.import.load")))};this._styleColorTheme.colorTheme=this.stylesheet["color-theme"];let b=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(b){let C=this._evaluateColorThemeData(b);this._loadColorTheme(C).then(()=>{g()}).catch(S=>{r.w(`Couldn't load color theme from the stylesheet: ${S}`),g()})}else this._styleColorTheme.lut=null,g()}isRootStyle(){return this.importDepth===0}mergeAll(){let l,u,g,b,C,S,E,k,F,z,q={};this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle(U=>{if(U.stylesheet){if(U.light!=null&&(l=U.light),U.stylesheet.lights)for(let Y of U.stylesheet.lights)Y.type==="ambient"&&U.ambientLight!=null&&(u=U.ambientLight),Y.type==="directional"&&U.directionalLight!=null&&(g=U.directionalLight);b=this._prioritizeTerrain(b,U.terrain,U.stylesheet.terrain),U.stylesheet.fog&&U.fog!=null&&(C=U.fog),U.stylesheet.snow&&U.snow!=null&&(S=U.snow),U.stylesheet.rain&&U.rain!=null&&(E=U.rain),U.stylesheet.camera!=null&&(z=U.stylesheet.camera),U.stylesheet.projection!=null&&(k=U.stylesheet.projection),U.stylesheet.transition!=null&&(F=U.stylesheet.transition),q[U.scope]=U._styleColorTheme}}),this.light=l,this.ambientLight=u,this.directionalLight=g,this.fog=C,this.snow=S,this.rain=E,this._styleColorThemeForScope=q,b===null?delete this.terrain:this.terrain=b,this.camera=z||{"camera-projection":"perspective"},this.projection=k||{name:"mercator"},this.transition=Object.assign({},bw,F),this.mergeSources(),this.mergeLayers()}forEachFragmentStyle(l){let u=g=>{for(let b of g.fragments)u(b.style);l(g)};u(this)}_prioritizeTerrain(l,u,g){let b=l&&l.drapeRenderMode===0;return g===null?u&&u.drapeRenderMode===0?u:b?l:null:u!=null&&(!l||b||u&&u.drapeRenderMode===1)?u:l}mergeTerrain(){let l;this.terrain&&this.terrain.scope!==this.scope&&delete this.terrain,this.forEachFragmentStyle(u=>{l=this._prioritizeTerrain(l,u.terrain,u.stylesheet.terrain)}),l===null?delete this.terrain:this.terrain=l}mergeProjection(){let l;this.forEachFragmentStyle(u=>{u.stylesheet.projection!=null&&(l=u.stylesheet.projection)}),this.projection=l||{name:"mercator"}}mergeSources(){let l={},u={},g={};this.forEachFragmentStyle(b=>{for(let C in b._sourceCaches){let S=r.B(C,b.scope);l[S]=b._sourceCaches[C]}for(let C in b._otherSourceCaches){let S=r.B(C,b.scope);u[S]=b._otherSourceCaches[C]}for(let C in b._symbolSourceCaches){let S=r.B(C,b.scope);g[S]=b._symbolSourceCaches[C]}}),this._mergedSourceCaches=l,this._mergedOtherSourceCaches=u,this._mergedSymbolSourceCaches=g}mergeLayers(){let l={},u=[],g={};this._mergedSlots=[],this._has3DLayers=!1,this._hasCircleLayers=!1,this._hasSymbolLayers=!1,this.forEachFragmentStyle(S=>{for(let E of S._order){let k=S._layers[E];if(k.type==="slot"){let F=r.dl(E);if(l[F])continue;l[F]=[]}k.slot&&l[k.slot]?l[k.slot].push(k):u.push(k)}}),this._mergedOrder=[];let b=-1,C=(S=[])=>{for(let E of S)if(E.type==="slot"){let k=r.dl(E.id);l[k]&&C(l[k]),this._mergedSlots.push(k)}else{let k=r.B(E.id,E.scope);this._mergedOrder.push(k),g[k]=E,E.is3D(!!this.terrain)&&(this._has3DLayers=!0,b=this._mergedOrder.length-1),E.type==="circle"&&(this._hasCircleLayers=!0),E.type==="symbol"&&(this._hasSymbolLayers=!0),E.type==="clip"&&(this._clipLayerPresent=!0)}};if(C(u),this._has3DLayers){let S={};for(let E=0;ES[E]-S[k])}this._mergedLayers=g,this.updateDrapeFirstLayers(),this._buildingIndex.processLayersChanged()}terrainSetForDrapingOnly(){return!!this.terrain&&this.terrain.drapeRenderMode===0}getCamera(){return this.stylesheet.camera}setCamera(l){return this.stylesheet.camera=Object.assign({},this.stylesheet.camera,l),this.camera=this.stylesheet.camera,this}_evaluateColorThemeData(l){return l.data?(function(u,g,b,C){let S=Object.assign({},g);for(let k of Object.keys(r.a6.colorTheme))S[k]===void 0&&(S[k]=r.a6.colorTheme[k].default);let E=new r.a8(AL,u,new Map(b));return E.setTransitionOrValue(S,b),E.untransitioned().possiblyEvaluate(new r.ac(0,{worldview:void 0}))})(this.scope,l,this.options).get("data"):null}_loadColorTheme(l){this._styleColorTheme.lutLoading=!0,this._styleColorTheme.lutLoadingCorrelationID+=1;let u=this._styleColorTheme.lutLoadingCorrelationID;return new Promise((g,b)=>{let C="data:image/png;base64,";if(!l||l.length===0)return this._styleColorTheme.lut=null,this._styleColorTheme.lutLoading=!1,void g();let S=l;S.startsWith(C)||(S=C+S);let E=r.I.from("mapbox-reserved-lut"),k=new Image;k.src=S,k.onerror=()=>{this._styleColorTheme.lutLoading=!1,b(new Error("Failed to load image data"))},k.onload=()=>{if(this._styleColorTheme.lutLoadingCorrelationID!==u)return void g();this._styleColorTheme.lutLoading=!1;let{width:F,height:z,data:q}=r.o.getImageData(k);if(z>32)return void b(new Error("The height of the image must be less than or equal to 32 pixels."));if(F!==z*z)return void b(new Error("The width of the image must be equal to the height squared."));this.getImage(E)&&this.removeImage(E),this.addImage(E,{data:new r.q({width:F,height:z},q),pixelRatio:1,sdf:!1,usvg:!1,version:0});let U=this.imageManager.getImage(E,this.scope);U?(this._styleColorTheme.lut={image:U.data,data:l},g()):b(new Error("Missing LUT image."))}})}getLut(l){let u=this._styleColorThemeForScope[l];return u?u.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(u,g,b){let C,S,E,k=r.o.devicePixelRatio>1?"@2x":"",F=r.m(g.transformRequest(g.normalizeSpriteURL(u,k,".json"),r.R.SpriteJSON),(U,Y)=>{F=null,E||(E=U,C=Y,q())}),z=r.n(g.transformRequest(g.normalizeSpriteURL(u,k,".png"),r.R.SpriteImage),(U,Y)=>{z=null,E||(E=U,S=Y,q())});function q(){if(E)b(E);else if(C&&S){let U=r.o.getImageData(S),Y={};for(let X in C){let{width:J,height:ae,x:ne,y:ce,sdf:_e,pixelRatio:xe,stretchX:Pe,stretchY:ke,content:Ne}=C[X],Me=new r.q({width:J,height:ae});r.q.copy(U,Me,{x:ne,y:ce},{x:0,y:0},{width:J,height:ae},null),Y[X]={data:Me,pixelRatio:xe!==void 0?xe:1,sdf:_e!==void 0&&_e,stretchX:Pe,stretchY:ke,content:Ne,usvg:!1,version:0}}b(null,Y)}}return{cancel(){F&&(F.cancel(),F=null),z&&(z.cancel(),z=null)}}})(l,this.map._requestManager,(u,g)=>{if(this._spriteRequest=null,u)this.fire(new r.y(u));else if(g){let b=new Map;for(let C in g)b.set(r.I.from(C),g[C]);this.addImages(b)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new r.z("data",{dataType:"style"}))})}addIconset(l,u){if(u.type==="sprite")return void this._loadSprite(u.url);let g=this.getOwnSourceCache(u.source);if(!g)return void this.fire(new r.y(new Error(`Source "${u.source}" as specified by iconset "${l}" does not exist and cannot be used as an iconset source`)));let b=g.getSource();if(b.type!=="raster-array")return void this.fire(new r.y(new Error(`Source "${u.source}" as specified by iconset "${l}" is not a "raster-array" source and cannot be used as an iconset source`)));b.partial=!1;let C=new vf(l,this.scope,g);this.imageManager.addImageProvider(C,this.scope)}removeIconset(l){this.imageManager.removeImageProvider(l,this.scope)}_loadIconset(l){if(!r.h(l)&&this.map._spriteFormat!=="icon_set"||this.map._spriteFormat==="raster")return void this._loadSprite(l);let u=this.map._spriteFormat==="auto";var g,b;this._spriteRequest=(b=(C,S)=>{if(this._spriteRequest=null,C)u?this._loadSprite(l):this.fire(new r.y(C));else if(S){let E=new Map;for(let k in S)E.set(r.I.from(k),S[k]);this.addImages(E)}this.imageManager.setLoaded(!0,this.scope),this.dispatcher.broadcast("spriteLoaded",{scope:this.scope,isLoaded:!0}),this.fire(new r.z("data",{dataType:"style"}))},r.bu((g=this.map._requestManager).transformRequest(g.normalizeIconsetURL(l),r.R.Iconset),(C,S)=>{if(C)return void b(C);let E={},k=r.dc(new r.bt(S));for(let F of k.icons){let z={version:1,pixelRatio:r.o.devicePixelRatio,content:_w(F),stretchX:F.metadata?yw(F.metadata.stretch_x_areas):void 0,stretchY:F.metadata?yw(F.metadata.stretch_y_areas):void 0,sdf:!1,usvg:!0,icon:F};E[F.name]=z}b(null,E)}))}_validateLayer(l){let u=this.getOwnSource(l.source);if(!u)return;let g=l.sourceLayer;g&&(u.type==="geojson"||u.vectorLayerIds&&u.vectorLayerIds.indexOf(g)===-1)&&this.fire(new r.y(new Error(`Source layer "${g}" does not exist on source "${u.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,u)=>{let g=this.fragments[u];return g&&g.style&&(l.data=g.style.serialize()),l})}_serializeSources(){let l={};for(let u in this._sourceCaches){let g=this._sourceCaches[u].getSource();l[g.id]||(l[g.id]=g.serialize())}return l}_serializeLayers(l){let u=[];for(let g of l){let b=this._layers[g];b&&b.type!=="custom"&&u.push(b.serialize())}return u}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 u=this.getOwnLayer(l);if(u)return u;this.fire(new r.y(new Error(`The layer '${l}' does not exist in the map's style.`)))}_checkSource(l){let u=this.getOwnSource(l);if(u)return u;this.fire(new r.y(new Error(`The source '${l}' does not exist in the map's style.`)))}precompilePrograms(l,u){let g=this.map.painter;if(g)for(let b=l.minzoom||0;b<(l.maxzoom||25.5);b++){let C=l.getProgramIds();if(C)for(let S of C){let E=l.getDefaultProgramParams(S,u.zoom,this._styleColorTheme.lut);E&&(g.style=this,this.fog&&(g._fogVisible=!0,E.overrideFog=!0,g.getOrCreateProgram(S,E)),g._fogVisible=!1,E.overrideFog=!1,g.getOrCreateProgram(S,E),(this.stylesheet.terrain||this.stylesheet.projection&&this.stylesheet.projection.name==="globe")&&(E.overrideRtt=!0,g.getOrCreateProgram(S,E)))}}}update(l){if(!this._loaded)return;this.ambientLight&&this.ambientLight.recalculate(l),this.directionalLight&&this.directionalLight.recalculate(l);let u=this.calculateLightsBrightness();l.brightness=u||0,u!==this._brightness&&(this._brightness=u,this.dispatcher.broadcast("setBrightness",u)),l.worldview!==this._worldview&&(this._worldview=l.worldview,this.dispatcher.broadcast("setWorldview",this._worldview));let g=this._changes.isDirty(),b=!1;if(this._changes.isDirty()){let E=this._changes.getLayerUpdatesByScope();for(let k in E){let{updatedIds:F,removedIds:z}=E[k];(F||z)&&(this._updateWorkerLayers(k,F,z),b=!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 C={};for(let E in this._mergedSourceCaches){let k=this._mergedSourceCaches[E];C[E]=k.used,k.used=!1,k.tileCoverLift=0}for(let E of this._mergedOrder){let k=this._mergedLayers[E];if(k.recalculate(l,this._availableImages),!k.isHidden(l.zoom)){let F=this.getLayerSourceCache(k);F&&(F.used=!0,F.tileCoverLift=Math.max(F.tileCoverLift,k.tileCoverLift()))}!this._precompileDone&&this._shouldPrecompile&&("requestIdleCallback"in window?requestIdleCallback(()=>{this.precompilePrograms(k,l)}):this.precompilePrograms(k,l))}this._shouldPrecompile&&(this._precompileDone=!0),this.terrain&&b&&this.mergeLayers();let S=this.imageManager.getPendingImageProviders();for(let E of S)E.sourceCache.used=!0;for(let E in C){let k=this._mergedSourceCaches[E];C[E]!==k.used&&k.getSource().fire(new r.z("data",{sourceDataType:"visibility",dataType:"source",sourceId:k.getSource().id}))}this.light&&this.light.recalculate(l),this.terrain&&this.terrain.recalculate(l),this.fog&&this.fog.recalculate(l),this.snow&&this.snow.recalculate(l),this.rain&&this.rain.recalculate(l),this.z=l.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),this.imageManager.clearUpdatedImages(this.scope),g&&this.fire(new r.z("data",{dataType:"style"}))}updateImageProviders(){let l=this.imageManager.getPendingImageProviders();for(let u of l){let g=u.resolvePendingRequests(),b=this.getFragmentStyle(u.scope);b&&b.addImages(g)}}_updateTilesForChangedImages(){let l={};for(let u in this._mergedSourceCaches){let g=this._mergedSourceCaches[u].getSource().scope;l[g]=l[g]||this._changes.getUpdatedImages(g),l[g].length!==0&&this._mergedSourceCaches[u].reloadTilesForDependencies(["icons","patterns"],l[g])}for(let u in l)this._changes.resetUpdatedImages(u)}_updateWorkerLayers(l,u,g){let b=this.getFragmentStyle(l);b&&this.dispatcher.broadcast("updateLayers",{layers:u?b._serializeLayers(u):[],scope:l,removedIds:g||[],options:b.options})}setState(l,u){if(this._checkLoaded(),d_(this,gc(l)))return!1;(l=r.dk(l)).layers=rw(l.layers);let g=(function(S,E){if(!S)return[{command:Go.setStyle,args:[E]}];let k=[];try{if(!r.by(S.version,E.version))return[{command:Go.setStyle,args:[E]}];if(r.by(S.center,E.center)||k.push({command:Go.setCenter,args:[E.center]}),r.by(S.zoom,E.zoom)||k.push({command:Go.setZoom,args:[E.zoom]}),r.by(S.bearing,E.bearing)||k.push({command:Go.setBearing,args:[E.bearing]}),r.by(S.pitch,E.pitch)||k.push({command:Go.setPitch,args:[E.pitch]}),r.by(S.sprite,E.sprite)||k.push({command:Go.setSprite,args:[E.sprite]}),r.by(S.glyphs,E.glyphs)||k.push({command:Go.setGlyphs,args:[E.glyphs]}),r.by(S.imports,E.imports)||(function(Y=[],X=[],J){X=X||[];let ae=(Y=Y||[]).map(ry),ne=X.map(ry),ce=Y.reduce(Kb,{}),_e=X.reduce(Kb,{}),xe=ae.slice(),Pe,ke,Ne,Me;for(Pe=0,ke=0;Pe{Y.source&&F[Y.source]?k.push({command:Go.removeLayer,args:[Y.id]}):q.push(Y)});let U=S.terrain;U&&F[U.source]&&(k.push({command:Go.setTerrain,args:[void 0]}),U=void 0),k=k.concat(z),r.by(U,E.terrain)||k.push({command:Go.setTerrain,args:[E.terrain]}),(function(Y,X,J){X=X||[];let ae=(Y=Y||[]).map(ry),ne=X.map(ry),ce=Y.reduce(Kb,{}),_e=X.reduce(Kb,{}),xe=ae.slice(),Pe=Object.create(null),ke,Ne,Me,De,Be,bt,nt;for(ke=0,Ne=0;ke!(S.command in p8));if(g.length===0)return!1;let b=g.filter(S=>!(S.command in u8));if(b.length>0)throw new Error(`Unimplemented: ${b.map(S=>S.command).join(", ")}.`);let C=[];return g.forEach(S=>{C.push(this[S.command](...S.args))}),u&&Promise.all(C).then(u).catch(u),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[u,g]of l.entries()){if(this.getImage(u))return this.fire(new r.y(new Error(`An image with the name "${u.name}" already exists.`)));this.imageManager.addImage(u,this.scope,g),this._changes.updateImage(u,this.scope)}return this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this}addImage(l,u){return this.getImage(l)?this.fire(new r.y(new Error(`An image with the name "${l.name}" already exists.`))):(this.imageManager.addImage(l,this.scope,u),this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this)}updateImage(l,u,g=!1){this.imageManager.updateImage(l,this.scope,u),g&&(this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})))}getImage(l){return this.imageManager.getImage(l,this.scope)}removeImage(l){return this.getImage(l)?(this.imageManager.removeImage(l,this.scope),this._changes.updateImage(l,this.scope),this._updateWorkerImages(),this.fire(new r.z("data",{dataType:"style"})),this):this.fire(new r.y(new Error("No image with this name exists.")))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addModelURLs(l){return this.modelManager.addModelURLs(l,this.scope),this._updateWorkerModels(),this.fire(new r.z("data",{dataType:"style"})),this}addModel(l,u,g={}){return this._checkLoaded(),this._validate(We,`models.${l}`,u,null,g)||(this.modelManager.addModel(l,u,this.scope),this.fire(new r.z("data",{dataType:"style"}))),this}hasModel(l){return this.modelManager.hasModel(l,this.scope)}removeModel(l){return this.hasModel(l)?(this.modelManager.removeModel(l,this.scope,!1,!0),this.fire(new r.z("data",{dataType:"style"})),this):this.fire(new r.y(new Error("No model with this ID exists.")))}listModels(){return this._checkLoaded(),this.modelManager.listModels(this.scope)}addSource(l,u,g={}){if(this._checkLoaded(),this.getOwnSource(l)!==void 0)throw new Error(`There is already a source with ID "${l}".`);if(!u.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(u).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(u.type)>=0&&this._validate(dh,`sources.${l}`,u,null,g))return;this.map&&this.map._collectResourceTiming&&(u.collectResourceTiming=!0);let b=Hb(l,u,this.dispatcher,this);b.scope=this.scope,b.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(b.id),source:b.serialize(),sourceId:b.id}));let C=S=>{let E=(S?"symbol:":"other:")+b.id,k=r.B(E,this.scope),F=this._sourceCaches[E]=new nu(k,b,S);(S?this._symbolSourceCaches:this._otherSourceCaches)[b.id]=F,F.onAdd(this.map)};C(!1),u.type!=="vector"&&u.type!=="geojson"||C(!0),b.onAdd&&b.onAdd(this.map),g.isInitialLoad||(this.mergeSources(),this._changes.setDirty())}removeSource(l){this._checkLoaded();let u=this.getOwnSource(l);if(!u)throw new Error("There is no source with this ID");for(let b in this._layers)if(this._layers[b].source===l)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while layer "${b}" is using it.`)));if(this.terrain&&this.terrain.scope===this.scope&&this.terrain.get().source===l)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while terrain is using it.`)));if(this.stylesheet.iconsets){let b=Object.entries(this.stylesheet.iconsets).find(([C,S])=>S.type==="source"&&S.source===l);if(b)return this.fire(new r.y(new Error(`Source "${l}" cannot be removed while iconset "${b[0]}" is using it.`)))}let g=this.getOwnSourceCaches(l);for(let b of g){let C=r.dl(b.id);delete this._sourceCaches[C],this._changes.discardSourceCacheUpdate(b.id),b.fire(new r.z("data",{sourceDataType:"metadata",dataType:"source",sourceId:b.getSource().id})),b.setEventedParent(null),b.clearTiles()}return delete this._otherSourceCaches[l],delete this._symbolSourceCaches[l],this.mergeSources(),u.setEventedParent(null),u.onRemove&&u.onRemove(this.map),this._changes.setDirty(),this}setGeoJSONSourceData(l,u){this._checkLoaded(),this.getOwnSource(l).setData(u),this._changes.setDirty()}getOwnSource(l){let u=this.getOwnSourceCache(l);return u&&u.getSource()}getOwnSources(){let l=[];for(let u in this._otherSourceCaches){let g=this.getOwnSourceCache(u);g&&l.push(g.getSource())}return l}areTilesLoaded(){let l=this._mergedSourceCaches;for(let u in l){let g=l[u]._tiles;for(let b in g){let C=g[b];if(C.state!=="loaded"&&C.state!=="errored")return!1}}return!0}setLights(l){if(this._checkLoaded(),!l)return delete this.ambientLight,void delete this.directionalLight;let u=this._getTransitionParameters();for(let C of l){if(this._validate(tw,"lights",C))return;switch(C.type){case"ambient":if(this.ambientLight){let S=this.ambientLight;S.set(C),S.updateTransitions(u)}else this.ambientLight=new _r(C,Zs||(Zs=new r.a9({color:new r.aa(r.a6.properties_light_ambient.color),"color-use-theme":new r.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new r.aa(r.a6.properties_light_ambient.intensity)})),this.scope,this.options);break;case"directional":if(this.directionalLight){let S=this.directionalLight;S.set(C),S.updateTransitions(u)}else this.directionalLight=new _r(C,La||(La=new r.a9({direction:new r.ap(r.a6.properties_light_directional.direction),color:new r.aa(r.a6.properties_light_directional.color),"color-use-theme":new r.aa({type:"string",default:"default","property-type":"data-constant"}),intensity:new r.aa(r.a6.properties_light_directional.intensity),"cast-shadows":new r.aa(r.a6.properties_light_directional["cast-shadows"]),"shadow-quality":new r.aa(r.a6.properties_light_directional["shadow-quality"]),"shadow-intensity":new r.aa(r.a6.properties_light_directional["shadow-intensity"])})),this.scope,this.options)}}let g=Object.assign(u,{worldview:this.map.getWorldview()}),b=new r.ac(this.z||0,g);this.ambientLight&&this.ambientLight.recalculate(b),this.directionalLight&&this.directionalLight.recalculate(b),this._brightness=this.calculateLightsBrightness(),this.dispatcher.broadcast("setBrightness",this._brightness)}calculateLightsBrightness(){let l=this.directionalLight,u=this.ambientLight;if(!l||!u)return;let g=U=>.2126*(U[0]<=.03928?U[0]/12.92:Math.pow((U[0]+.055)/1.055,2.4))+.7152*(U[1]<=.03928?U[1]/12.92:Math.pow((U[1]+.055)/1.055,2.4))+.0722*(U[2]<=.03928?U[2]/12.92:Math.pow((U[2]+.055)/1.055,2.4)),b=l.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),C=l.properties.get("intensity"),S=l.properties.get("direction"),E=1-r.d3(S.x,S.y,S.z)[2]/90,k=g(b)*C*E,F=u.properties.get("color").toNonPremultipliedRenderColor(null).toArray01(),z=u.properties.get("intensity"),q=g(F)*z;return Number(((k+q)/2).toFixed(6))}getBrightness(){return this._brightness}getLights(){if(!this.enable3dLights())return null;let l=[];return this.directionalLight&&l.push(this.directionalLight.get()),this.ambientLight&&l.push(this.ambientLight.get()),l}enable3dLights(){return!!this.ambientLight&&!!this.directionalLight}getFragmentStyle(l){if(l==null||l===""&&this.isRootStyle())return this;if(r.dm(l)){let u=r.dn(l),g=this.fragments.find(({id:C})=>C===u);if(!g)return;let b=r.dl(l);return g.style.getFragmentStyle(b)}{let u=this.fragments.find(({id:g})=>g===l);return u?u.style:void 0}}setFeaturesetSelectors(l){if(!l)return;let u={},g=(b,C="")=>`${b}::${C}`;this._featuresetSelectors={};for(let b in l){let C=this._featuresetSelectors[b]=[];for(let S of l[b].selectors){if(S.featureNamespace){let k=this.getOwnLayer(S.layer);if(!k){r.w(`Layer is undefined for selector: ${S.layer}`);continue}let F=g(k.source,k.sourceLayer);if(F in u&&u[F]!==S.featureNamespace){r.w(`"featureNamespace ${S.featureNamespace} of featureset ${b}'s selector is not associated to the same source, skip this selector`);continue}u[F]=S.featureNamespace}let E;if(S.properties)for(let k in S.properties){let F=r.U(S.properties[k]);F.result==="success"&&(E=E||{},E[k]=F.value)}C.push({layerId:S.layer,namespace:S.featureNamespace,properties:E,uniqueFeatureID:S._uniqueFeatureID})}}}getFeaturesetDescriptors(l){let u=this.getFragmentStyle(l);if(!u||!u.stylesheet.featuresets)return[];let g=[];for(let b in u.stylesheet.featuresets)g.push({featuresetId:b,importId:u.scope?u.scope:void 0});return g}getFeaturesetLayers(l,u){let g=this.getFragmentStyle(u),b=g.stylesheet.featuresets;if(!b||!b[l])return this.fire(new r.y(new Error(`The featureset '${l}' does not exist in the map's style and cannot be queried.`))),[];let C=[];for(let S of b[l].selectors){let E=g.getOwnLayer(S.layer);E&&C.push(E)}return C}getConfigProperty(l,u){let g=this.getFragmentStyle(l);if(!g)return null;let b=r.B(u,g.scope),C=g.options.get(b),S=C?C.value||C.default:null;return S?S.serialize():null}setConfigProperty(l,u,g){let b=this.getFragmentStyle(l);if(!b)return;let C=b.stylesheet.schema;if(!C||!C[u])return;let S=r.U(g);if(S.result!=="success")return void d_(this,S.value);let E=S.value.expression,k=r.B(u,b.scope),F=b.options.get(k);if(!F)return;let z,{minValue:q,maxValue:U,stepValue:Y,type:X,values:J}=C[u],ae=r.U(C[u].default);ae.result==="success"&&(z=ae.value.expression),z?(this.options.set(k,Object.assign({},F,{value:E,default:z,minValue:q,maxValue:U,stepValue:Y,type:X,values:J})),this.updateConfigDependencies(u)):this.fire(new r.y(new Error(`No schema defined for the config option "${u}" in the "${l}" fragment.`)))}getConfig(l){let u=this.getFragmentStyle(l);if(!u)return null;let g=u.stylesheet.schema;if(!g)return null;let b={};for(let C in g){let S=r.B(C,u.scope),E=u.options.get(S),k=E?E.value||E.default:null;b[C]=k?k.serialize():null}return b}setConfig(l,u){let g=this.getFragmentStyle(l);g&&(g.updateConfig(u,g.stylesheet.schema),this.updateConfigDependencies())}getSchema(l){let u=this.getFragmentStyle(l);return u?u.stylesheet.schema:null}setSchema(l,u){let g=this.getFragmentStyle(l);g&&(g.stylesheet.schema=u,g.updateConfig(g._config,u),this.updateConfigDependencies())}updateConfig(l,u){if(this._config=l,l||u)if(u)for(let g in u){let b,C,S=r.U(u[g].default);if(S.result==="success"&&(b=S.value.expression),l&&l[g]!==void 0){let U=r.U(l[g]);U.result==="success"&&(C=U.value.expression)}let{minValue:E,maxValue:k,stepValue:F,type:z,values:q}=u[g];if(b){let U=r.B(g,this.scope);this.options.set(U,{default:b,value:C,minValue:E,maxValue:k,stepValue:F,type:z,values:q})}else this.fire(new r.y(new Error(`No schema defined for config option "${g}".`)))}else this.fire(new r.y(new Error("Attempting to set config for a style without schema.")))}updateConfigDependencies(l){for(let u of this._configDependentLayers){let g=this.getLayer(u);if(g){if(l&&!g.configDependencies.has(l))continue;g.possiblyEvaluateVisibility(),this._updateLayer(g)}}this.ambientLight&&this.ambientLight.updateConfig(this.options),this.directionalLight&&this.directionalLight.updateConfig(this.options),this.fog&&this.fog.updateConfig(this.options),this.snow&&this.snow.updateConfig(this.options),this.rain&&this.rain.updateConfig(this.options),this.forEachFragmentStyle(u=>{let g=u._styleColorTheme.colorThemeOverride?u._styleColorTheme.colorThemeOverride:u._styleColorTheme.colorTheme;if(g){let b=u._evaluateColorThemeData(g);(!u._styleColorTheme.lut&&b!==""||u._styleColorTheme.lut&&b!==u._styleColorTheme.lut.data)&&u.setColorTheme(g)}}),this._changes.setDirty()}addLayer(l,u,g={}){this._checkLoaded();let b=l.id;if(this._layers[b])return void this.fire(new r.y(new Error(`Layer with id "${b}" already exists on this map`)));let C;if(l.type==="custom"){if(d_(this,r.dp(l)))return;C=r.dq(l,this.scope,this._styleColorTheme.lut,this.options)}else{if(typeof l.source=="object"&&(this.addSource(b,l.source),l=r.dk(l),l=Object.assign(l,{source:b})),this._validate(dt,`layers.${b}`,l,{arrayIndex:-1},g))return;C=r.dq(l,this.scope,this._styleColorTheme.lut,this.options),this._validateLayer(C),C.setEventedParent(this,{layer:{id:b}})}C.configDependencies.size!==0&&this._configDependentLayers.add(C.fqid);let S=this._order.length;if(u){let z=this._order.indexOf(u);if(z===-1)return void this.fire(new r.y(new Error(`Layer with id "${u}" does not exist on this map.`)));C.slot===this._layers[u].slot?S=z:r.w(`Layer with id "${u}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(S,0,b),this._layerOrderChanged=!0,this._layers[b]=C;let E=this.getOwnLayerSourceCache(C),k=!!this.directionalLight&&this.directionalLight.shadowsEnabled();E&&C.canCastShadows()&&k&&(E.castsShadows=!0);let F=this._changes.getRemovedLayer(C);if(F&&C.source&&E&&C.type!=="custom"){this._changes.discardLayerRemoval(C);let z=r.B(C.source,C.scope);F.type!==C.type?this._changes.updateSourceCache(z,"clear"):(this._changes.updateSourceCache(z,"reload"),E.pause())}this._updateLayer(C),C.onAdd&&C.onAdd(this.map),C.scope=this.scope,this.mergeLayers()}moveLayer(l,u){this._checkLoaded();let g=this._checkLayer(l);if(!g||l===u)return;let b=this._order.indexOf(l);this._order.splice(b,1);let C=this._order.length;if(u){let S=this._order.indexOf(u);if(S===-1)return void this.fire(new r.y(new Error(`Layer with id "${u}" does not exist on this map.`)));g.slot===this._layers[u].slot?C=S:r.w(`Layer with id "${u}" has a different slot. Layers can only be rearranged within the same slot.`)}this._order.splice(C,0,l),this._changes.setDirty(),this._layerOrderChanged=!0,this.mergeLayers()}removeLayer(l){this._checkLoaded();let u=this._checkLayer(l);if(!u)return;u.setEventedParent(null);let g=this._order.indexOf(l);this._order.splice(g,1),delete this._layers[l],this._changes.setDirty(),this._layerOrderChanged=!0,this._configDependentLayers.delete(u.fqid),this._changes.removeLayer(u);let b=this.getOwnLayerSourceCache(u);if(b&&b.castsShadows){let C=!1;for(let S in this._layers)if(this._layers[S].source===u.source&&this._layers[S].canCastShadows()){C=!0;break}b.castsShadows=C}u.onRemove&&u.onRemove(this.map),this.mergeLayers()}getOwnLayer(l){return this._layers[l]}hasLayer(l){return l in this._mergedLayers}hasLayerType(l){for(let u in this._layers)if(this._layers[u].type===l)return!0;return!1}setLayerZoomRange(l,u,g){this._checkLoaded();let b=this._checkLayer(l);b&&(b.minzoom===u&&b.maxzoom===g||(u!=null&&(b.minzoom=u),g!=null&&(b.maxzoom=g),this._updateLayer(b)))}getSlots(){return this._checkLoaded(),this._mergedSlots}setSlot(l,u){this._checkLoaded();let g=this._checkLayer(l);g&&g.slot!==u&&(g.slot=u,this._updateLayer(g))}setFilter(l,u,g={}){this._checkLoaded();let b=this._checkLayer(l);if(b&&!r.by(b.filter,u))return u==null?(b.filter=void 0,void this._updateLayer(b)):void(this._validate(oe,`layers.${b.id}.filter`,u,{layerType:b.type},g)||(b.filter=r.dk(u),this._updateLayer(b)))}getFilter(l){let u=this._checkLayer(l);if(u)return r.dk(u.filter)}setLayoutProperty(l,u,g,b={}){this._checkLoaded();let C=this._checkLayer(l);if(C&&!r.by(C.getLayoutProperty(u),g)){if(g!=null&&(!b||b.validate!==!1)&&d_(C,Te.call(gc,{key:`layers.${l}.layout.${u}`,layerType:C.type,objectKey:u,value:g,styleSpec:r.a6,style:{glyphs:!0,sprite:!0}})))return;C.setLayoutProperty(u,g),C.configDependencies.size!==0&&this._configDependentLayers.add(C.fqid),this._updateLayer(C)}}getLayoutProperty(l,u){let g=this._checkLayer(l);if(g)return g.getLayoutProperty(u)}setPaintProperty(l,u,g,b={}){this._checkLoaded();let C=this._checkLayer(l);if(!C||r.by(C.getPaintProperty(u),g)||g!=null&&(!b||b.validate!==!1)&&d_(C,de.call(gc,{key:`layers.${l}.paint.${u}`,layerType:C.type,objectKey:u,value:g,styleSpec:r.a6})))return;let S=C.setPaintProperty(u,g);C.configDependencies.size!==0&&this._configDependentLayers.add(C.fqid),S&&this._updateLayer(C),this._changes.updatePaintProperties(C)}getPaintProperty(l,u){let g=this._checkLayer(l);if(g)return g.getPaintProperty(u)}setFeatureState(l,u){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:k,importId:F}=l.target,z=this.getFragmentStyle(F),q=z.getFeaturesetLayers(k);for(let{source:U,sourceLayer:Y}of q)z.setFeatureState({id:l.id,source:U,sourceLayer:Y},u)}else if("layerId"in l.target){let{layerId:k}=l.target,F=this.getLayer(k);this.setFeatureState({id:l.id,source:F.source,sourceLayer:F.sourceLayer},u)}return}let g=l.source,b=l.sourceLayer,C=this._checkSource(g);if(!C)return;let S=C.type;if(S==="geojson"&&b)return void this.fire(new r.y(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if(S==="vector"&&!b)return void this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")));l.id===void 0&&this.fire(new r.y(new Error("The feature id parameter must be provided.")));let E=this.getOwnSourceCaches(g);for(let k of E)k.setFeatureState(b,l.id,u)}removeFeatureState(l,u){if(this._checkLoaded(),"target"in l){if("featuresetId"in l.target){let{featuresetId:k,importId:F}=l.target,z=this.getFragmentStyle(F),q=z.getFeaturesetLayers(k);for(let{source:U,sourceLayer:Y}of q)z.removeFeatureState({id:l.id,source:U,sourceLayer:Y},u)}else if("layerId"in l.target){let{layerId:k}=l.target,F=this.getLayer(k);this.removeFeatureState({id:l.id,source:F.source,sourceLayer:F.sourceLayer},u)}return}let g=l.source,b=this._checkSource(g);if(!b)return;let C=b.type,S=C==="vector"?l.sourceLayer:void 0;if(C==="vector"&&!S)return void this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")));if(u&&typeof l.id!="string"&&typeof l.id!="number")return void this.fire(new r.y(new Error("A feature id is required to remove its specific state property.")));let E=this.getOwnSourceCaches(g);for(let k of E)k.removeFeatureState(S,l.id,u)}getFeatureState(l){if(this._checkLoaded(),"target"in l){let C;if("featuresetId"in l.target){let{featuresetId:S,importId:E}=l.target,k=this.getFragmentStyle(E),F=k.getFeaturesetLayers(S);for(let{source:z,sourceLayer:q}of F){let U=k.getFeatureState({id:l.id,source:z,sourceLayer:q});if(U&&!C)C=U;else if(!r.by(C,U))return void this.fire(new r.y(new Error("The same feature id exists in multiple sources in the featureset, but their feature states are not consistent through the sources.")))}}else if("layerId"in l.target){let{layerId:S}=l.target,E=this.getLayer(S);C=this.getFeatureState({id:l.id,source:E.source,sourceLayer:E.sourceLayer})}return C}let u=l.source,g=l.sourceLayer,b=this._checkSource(u);if(b){if(b.type!=="vector"||g)return l.id===void 0&&this.fire(new r.y(new Error("The feature id parameter must be provided."))),this.getOwnSourceCaches(u)[0].getFeatureState(g,l.id);this.fire(new r.y(new Error("The sourceLayer parameter must be provided for vector source types.")))}}setTransition(l){return this.stylesheet.transition=Object.assign({},this.stylesheet.transition,l),this.transition=this.stylesheet.transition,this}getTransition(){return Object.assign({},this.stylesheet.transition)}serialize(){this._checkLoaded();let l=this.getTerrain(),u=l&&this.terrain&&this.terrain.scope===this.scope?l:this.stylesheet.terrain;return r.dr({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,fragment:this.stylesheet.fragment,iconsets:this.stylesheet.iconsets,imports:this._serializeImports(),schema:this.stylesheet.schema,camera:this.stylesheet.camera,light:this.stylesheet.light,lights:this.stylesheet.lights,terrain:u,fog:this.stylesheet.fog,snow:this.stylesheet.snow,rain:this.stylesheet.rain,center:this.stylesheet.center,"color-theme":this.stylesheet["color-theme"],zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:this._serializeSources(),layers:this._serializeLayers(this._order)},g=>g!==void 0)}_updateFilteredLayers(l){for(let u of Object.values(this._mergedLayers))l(u)&&this._updateLayer(u)}_updateLayer(l){this._changes.updateLayer(l);let u=this.getLayerSourceCache(l),g=r.B(l.source,l.scope),b=this._changes.getUpdatedSourceCaches();l.source&&!b[g]&&u&&u.getSource().type!=="raster"&&(this._changes.updateSourceCache(g,"reload"),u.pause()),l.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(l){let u=E=>this._mergedLayers[E].is3D(!!this.terrain),g=this.order,b={},C=[];for(let E=g.length-1;E>=0;E--){let k=g[E];if(u(k)){b[k]=E;for(let F of l){let z=F[k];if(z)for(let q of z)C.push(q)}}}C.sort((E,k)=>k.intersectionZ-E.intersectionZ);let S=[];for(let E=g.length-1;E>=0;E--){let k=g[E];if(u(k))for(let F=C.length-1;F>=0;F--){let z=C[F].feature;if(z.layer&&b[z.layer.id]{if(vw.has(z.type))return;let q=this.getOwnLayerSourceCache(z),U=C[q.id]=C[q.id]||{sourceCache:q,layers:{},has3DLayers:!1};z.is3D(!!this.terrain)&&(U.has3DLayers=!0),U.layers[z.fqid]=U.layers[z.fqid]||{styleLayer:z,targets:[]},U.layers[z.fqid].targets.push({filter:b})};if(u&&u.layers){if(!Array.isArray(u.layers))return this.fire(new r.y(new Error("parameters.layers must be an Array."))),[];for(let z of u.layers){let q=this._layers[z];if(!q)return this.fire(new r.y(new Error(`The layer '${z}' does not exist in the map's style and cannot be queried for features.`))),[];S(q)}}else for(let z in this._layers)S(this._layers[z]);let E=this._queryRenderedFeatures(l,C,g),k=this._flattenAndSortRenderedFeatures(E),F=[];for(let z of k)r.ds(z.layer.id)===this.scope&&F.push(z);return F}queryRenderedFeatureset(l,u,g){let b;u&&!Array.isArray(u)&&u.filter&&(this._validate(oe,"queryRenderedFeatures.filter",u.filter,null,u),b=r.b6(u.filter));let C="mock",S=[];if(u&&u.target)S.push(Object.assign({},u,{targetId:C,filter:b}));else{let z=this.getFeaturesetDescriptors();for(let q of z)S.push({targetId:C,filter:b,target:q});for(let{style:q}of this.fragments){let U=q.getFeaturesetDescriptors();for(let Y of U)S.push({targetId:C,filter:b,target:Y})}}let E=this.queryRenderedTargets(l,S,g),k=[],F=new Set;for(let z of E)for(let q of z.variants[C])hf(q,z,F)||k.push(new r.dt(z,q));return k}queryRenderedTargets(l,u,g){let b={},C=(E,k,F,z)=>{let q=b[k.id]=b[k.id]||{sourceCache:k,layers:{},has3DLayers:!1};if(q.layers[E.fqid]=q.layers[E.fqid]||{styleLayer:E,targets:[]},E.is3D(!!this.terrain)&&(q.has3DLayers=!0),!z)return F.uniqueFeatureID=!1,void q.layers[E.fqid].targets.push(F);q.layers[E.fqid].targets.push(Object.assign({},F,{namespace:z.namespace,properties:z.properties,uniqueFeatureID:z.uniqueFeatureID}))};for(let E of u)if("featuresetId"in E.target){let{featuresetId:k,importId:F}=E.target,z=this.getFragmentStyle(F);if(!z||!z._featuresetSelectors)continue;let q=z._featuresetSelectors[k];if(!q){this.fire(new r.y(new Error(`The featureset '${k}' does not exist in the map's style and cannot be queried for features.`)));continue}for(let U of q){let Y=z.getOwnLayer(U.layerId);Y&&!vw.has(Y.type)&&C(Y,z.getOwnLayerSourceCache(Y),E,U)}}else if("layerId"in E.target){let{layerId:k}=E.target,F=this.getLayer(k);if(!F||vw.has(F.type))continue;C(F,this.getLayerSourceCache(F),E)}let S=this._queryRenderedFeatures(l,b,g);return this._flattenAndSortRenderedFeatures(S)}_queryRenderedFeatures(l,u,g){let b=[],C=!!this.map._showQueryGeometry,S=js.createFromScreenPoints(l,g);for(let E in u){let k=Gb(S,u[E],this._availableImages,g,C);Object.keys(k).length&&b.push(k)}if(this.placement)for(let E in u){if(!u[E].sourceCache._onlySymbols)continue;let k=NA(S.screenGeometry,u[E],this._availableImages,this.placement.collisionIndex,this.placement.retainedQueryData,this.map.getWorldview());Object.keys(k).length&&b.push(k)}return b}querySourceFeatures(l,u){let g=u&&u.filter;g&&this._validate(oe,"querySourceFeatures.filter",g,null,u);let b=[],C=this.getOwnSourceCaches(l);for(let S of C)b=b.concat(uh(S,u));return b}addSourceType(l,u,g){return Gu.getSourceType(l)?g(new Error(`A source type called "${l}" already exists.`)):(Gu.setSourceType(l,u),u.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:l,url:u.workerSourceURL},g):g(null,null))}getFlatLight(){return this.light.getLight()}setFlatLight(l,u,g={}){this._checkLoaded();let b=this.light.getLight(),C=!1;for(let E in l)if(!r.by(l[E],b[E])){C=!0;break}if(!C)return;let S=this._getTransitionParameters();this.light.setLight(l,u,g),this.light.updateTransitions(S)}getTerrain(){return this.terrain&&this.terrain.drapeRenderMode===1?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}checkCanvasFingerprintNoise(){this.disableElevatedTerrain===void 0&&(this.disableElevatedTerrain=r.o.hasCanvasFingerprintNoise(),this.disableElevatedTerrain&&r.w("Terrain and hillshade are disabled because of Canvas2D limitations when fingerprinting protection is enabled (e.g. in private browsing mode)."))}setTerrain(l,u=1){if(this._checkLoaded(),!l)return this.terrainSetForDrapingOnly()||(delete this.terrain,this.map.transform.projection.requiresDraping&&this.setTerrainForDraping()),u===0&&delete this.terrain,l===null?this.stylesheet.terrain=null:delete this.stylesheet.terrain,this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);this.checkCanvasFingerprintNoise();let g=l,b=l.source==null;if(u===1){if(this.disableElevatedTerrain)return;if(typeof g.source=="object"){let E="terrain-dem-src";this.addSource(E,g.source),g=r.dk(g),g=Object.assign(g,{source:E})}let C=Object.assign({},g),S={};if(this.terrain&&b){C.source=this.terrain.get().source;let E=this.terrain?this.getFragmentStyle(this.terrain.scope):null;E&&(S.style=E.serialize())}if(this._validate(ai,"terrain",C,S))return}if(!this.terrain||this.terrain.scope!==this.scope&&!b||this.terrain&&u!==this.terrain.drapeRenderMode){if(!g)return;this._createTerrain(g,u),this.fire(new r.z("data",{dataType:"style"}))}else{let C=this.terrain,S=C.get();for(let E of Object.keys(r.a6.terrain))!g.hasOwnProperty(E)&&r.a6.terrain[E].default&&(g[E]=r.a6.terrain[E].default);for(let E in l)if(!r.by(l[E],S[E])){C.set(l,this.options),this.stylesheet.terrain=l;let k=this._getTransitionParameters({duration:0});C.updateTransitions(k),this.fire(new r.z("data",{dataType:"style"}));break}}this.mergeTerrain(),this.updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(l){let u=this.fog=new No(l,this.map.transform,this.scope,this.options);this.stylesheet.fog=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}_createSnow(l){let u=this.snow=new Fa(l,this.map.transform,this.scope,this.options);this.stylesheet.snow=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}_createRain(l){let u=this.rain=new qr(l,this.map.transform,this.scope,this.options);this.stylesheet.rain=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}_updateMarkersOpacity(){this.map._markers.length!==0&&this.map._requestDomTask(()=>{for(let l of this.map._markers)l._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(l){if(this._checkLoaded(),!l)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){let u=this.fog;if(!r.by(u.get(),l)){u.set(l,this.options),this.stylesheet.fog=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}}else this._createFog(l);this._markersNeedUpdate=!0}getSnow(){return this.snow?this.snow.get():null}setSnow(l){if(this._checkLoaded(),!l)return delete this.snow,void delete this.stylesheet.snow;if(this.snow){let u=this.snow;if(!r.by(u.get(),l)){u.set(l,this.options),this.stylesheet.snow=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}}else this._createSnow(l);this._markersNeedUpdate=!0}getRain(){return this.rain?this.rain.get():null}setRain(l){if(this._checkLoaded(),!l)return delete this.rain,void delete this.stylesheet.rain;if(this.rain){let u=this.rain;if(!r.by(u.get(),l)){u.set(l,this.options),this.stylesheet.rain=u.get();let g=this._getTransitionParameters({duration:0});u.updateTransitions(g)}}else this._createRain(l);this._markersNeedUpdate=!0}_reloadColorTheme(){let l=()=>{for(let b in this._layers)this._layers[b].lut=this._styleColorTheme.lut;for(let b in this._sourceCaches)this._sourceCaches[b].clearTiles()},u=this._styleColorTheme.colorThemeOverride?this._styleColorTheme.colorThemeOverride:this._styleColorTheme.colorTheme;if(!u)return this._styleColorTheme.lut=null,void l();let g=this._evaluateColorThemeData(u);this._loadColorTheme(g).then(()=>{this.fire(new r.z("colorthemeset")),l()}).catch(b=>{r.w(`Couldn't set color theme: ${b}`)})}setColorTheme(l){this._checkLoaded(),this._styleColorTheme.colorThemeOverride&&r.w("Note: setColorTheme is called on a style with a color-theme override, the passed color-theme won't be visible."),this._styleColorTheme.colorTheme=l,this._reloadColorTheme()}setImportColorTheme(l,u){let g=this.getFragmentStyle(l);g&&(g._styleColorTheme.colorThemeOverride=u,g._reloadColorTheme())}_getTransitionParameters(l){return{now:r.o.now(),transition:Object.assign(this.transition,l)}}updateDrapeFirstLayers(){if(!this.terrain)return;let l=[],u=[];for(let g of this._mergedOrder)this.isLayerDraped(this._mergedLayers[g])?l.push(g):u.push(g);this._drapedFirstOrder=[],this._drapedFirstOrder.push(...l),this._drapedFirstOrder.push(...u)}_createTerrain(l,u){let g=this.terrain=new Et(l,u,this.scope,this.options,this.map.getWorldview());u===1&&(this.stylesheet.terrain=l),this.mergeTerrain(),this.updateDrapeFirstLayers(),this._force3DLayerUpdate();let b=this._getTransitionParameters({duration:0});g.updateTransitions(b)}_force3DLayerUpdate(){for(let l in this._layers){let u=this._layers[l];u.type==="fill-extrusion"&&this._updateLayer(u)}}_forceSymbolLayerUpdate(){for(let l in this._layers){let u=this._layers[l];u.type==="symbol"&&this._updateLayer(u)}}_validate(l,u,g,b,C={}){if(C&&C.validate===!1)return!1;let S=Object.assign({},this.serialize());return d_(this,l.call(gc,Object.assign({key:u,style:S,value:g,styleSpec:r.a6},b)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),r.du.off("pluginStateChange",this._rtlTextPluginCallback);for(let l in this._mergedLayers)this._mergedLayers[l].setEventedParent(null);for(let l in this._mergedSourceCaches)this._mergedSourceCaches[l].clearTiles(),this._mergedSourceCaches[l].setEventedParent(null);this.imageManager.removeScope(this.scope),this.setEventedParent(null),delete this.fog,delete this.snow,delete this.rain,delete this.terrain,delete this.ambientLight,delete this.directionalLight,this.isRootStyle()&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.modelManager.setEventedParent(null),this.modelManager.destroy(),this.dispatcher.remove())}clearSource(l){let u=this.getSourceCaches(l);for(let g of u)g.clearTiles()}clearSources(){for(let l in this._mergedSourceCaches)this._mergedSourceCaches[l].clearTiles()}clearLayers(){for(let l in this._mergedLayers){let u=this._mergedLayers[l];u._clear&&u._clear()}}reloadSource(l){let u=this.getSourceCaches(l);for(let g of u)g.resume(),g.reload()}reloadSources(){for(let l of this.getSources())l.reload&&l.reload()}reloadModels(){this.modelManager.reloadModels(""),this.forEachFragmentStyle(l=>{l.modelManager.reloadModels(l.scope)})}updateSources(l){let u;this.directionalLight&&(u=cy(this.directionalLight));let g=new Set;for(let b in this._mergedLayers){let C=this._mergedLayers[b];C.hasElevation()&&!g.has(C.source)&&g.add(C.source)}for(let b in this._mergedSourceCaches){let C=this._mergedSourceCaches[b],S=g.has(C._source.id);C.update(l,void 0,void 0,u,S)}}_generateCollisionBoxes(){for(let l in this._sourceCaches){let u=this._sourceCaches[l];u.resume(),u.reload()}}_updatePlacement(l,u,g,b,C,S,E=!1){let k=!1,F=!1,z={},q={};for(let U of this._mergedOrder){let Y=this._mergedLayers[U];if(Y.type!=="symbol")continue;let X=r.B(Y.source,Y.scope),J=z[X];if(!J){let ne=this.getLayerSourceCache(Y);if(!ne)continue;let ce=ne.getRenderableIds(!0).map(_e=>ne.getTileByID(_e));q[X]=ce.slice(),J=z[X]=ce.sort((_e,xe)=>xe.tileID.overscaledZ-_e.tileID.overscaledZ||(_e.tileID.isLessThan(xe.tileID)?-1:1))}let ae=this.crossTileSymbolIndex.addLayer(Y,J,u.center.lng,u.projection);k=k||ae}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._mergedOrder),E=E||this._layerOrderChanged||b===0,this._layerOrderChanged&&this.fire(new r.z("neworder")),(E||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(r.o.now(),u.zoom))&&(this.pauseablePlacement=new Gc(u,this._mergedOrder,E,g,b,C,this.placement,this.fog&&u.projection.supportsFog?this.fog.state:null,this._buildingIndex),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._mergedOrder,this._mergedLayers,z,q,this.map.painter.scaleFactor),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(r.o.now()),F=!0),k&&this.pauseablePlacement.placement.setStale()),F||k){this._buildingIndex.onNewFrame(u.zoom);for(let U=0;UC===l.id)!==-1)return void this.fire(new r.y(new Error(`Import with id '${l.id}' already exists in the map's style.`)));if(!u)return g.push(l),this._loadImports([l],!0);let b=g.findIndex(({id:C})=>C===u);return b===-1&&this.fire(new r.y(new Error(`Import with id "${u}" does not exist on this map.`))),this.stylesheet.imports=g.slice(0,b).concat(l).concat(g.slice(b)),this._loadImports([l],!0,u)}updateImport(l,u){this._checkLoaded();let g=this.stylesheet.imports||[],b=this.getImportIndex(l);return b===-1?this:typeof u=="string"?(this.setImportUrl(l,u),this):(u.url&&u.url!==g[b].url&&this.setImportUrl(l,u.url),r.by(u.config,g[b].config)||this.setImportConfig(l,u.config,u.data.schema),r.by(u.data,g[b].data)||this.setImportData(l,u.data),this)}moveImport(l,u){this._checkLoaded();let g=this.stylesheet.imports||[],b=this.getImportIndex(l);if(b===-1)return this;let C=this.getImportIndex(u);if(C===-1)return this;let S=g[b],E=this.fragments[b];return g=g.filter(({id:k})=>k!==l),this.fragments=this.fragments.filter(({id:k})=>k!==l),this.stylesheet.imports=g.slice(0,C).concat(S).concat(g.slice(C)),this.fragments=this.fragments.slice(0,C).concat(E).concat(this.fragments.slice(C)),this.mergeLayers(),this}setImportUrl(l,u){this._checkLoaded();let g=this.stylesheet.imports||[],b=this.getImportIndex(l);if(b===-1)return this;g[b].url=u;let C=this.fragments[b];return C.style=this._createFragmentStyle(g[b]),C.style.on("style.import.load",()=>this.mergeAll()),C.style.loadURL(u),this}setImportData(l,u){this._checkLoaded();let g=this.getImportIndex(l),b=this.stylesheet.imports||[];return g===-1?this:u?(this.fragments[g].style.setState(u),this._reloadImports(),this):(delete b[g].data,this.setImportUrl(l,b[g].url))}setImportConfig(l,u,g){this._checkLoaded();let b=this.getImportIndex(l),C=this.stylesheet.imports||[];if(b===-1)return this;u?C[b].config=u:delete C[b].config;let S=this.fragments[b];g&&S.style.stylesheet&&(S.style.stylesheet.schema=g);let E=S.style.stylesheet&&S.style.stylesheet.schema;return S.config=u,S.style.updateConfig(u,E),this.updateConfigDependencies(),this}removeImport(l){this._checkLoaded();let u=this.stylesheet.imports||[],g=this.getImportIndex(l);g!==-1&&(u.splice(g,1),this.fragments[g].style._remove(),this.fragments.splice(g,1),this._reloadImports())}getImportIndex(l){let u=(this.stylesheet.imports||[]).findIndex(g=>g.id===l);return u===-1&&this.fire(new r.y(new Error(`Import '${l}' does not exist in the map's style and cannot be updated.`))),u}getLayer(l){return this._mergedLayers[l]}getSources(){let l=[];for(let u in this._mergedOtherSourceCaches){let g=this._mergedOtherSourceCaches[u];g&&l.push(g.getSource())}return l}getSource(l,u){let g=this.getSourceCache(l,u);return g&&g.getSource()}getLayerSource(l){let u=this.getLayerSourceCache(l);return u&&u.getSource()}getSourceCache(l,u){let g=r.B(l,u);return this._mergedOtherSourceCaches[g]}getLayerSourceCache(l){let u=r.B(l.source,l.scope);return l.type==="symbol"?this._mergedSymbolSourceCaches[u]:this._mergedOtherSourceCaches[u]}getSourceCaches(l){if(l==null)return Object.values(this._mergedSourceCaches);let u=[];return this._mergedOtherSourceCaches[l]&&u.push(this._mergedOtherSourceCaches[l]),this._mergedSymbolSourceCaches[l]&&u.push(this._mergedSymbolSourceCaches[l]),u}updateSourceCaches(){let l=this._changes.getUpdatedSourceCaches();for(let u in l){let g=l[u];g==="reload"?this.reloadSource(u):g==="clear"&&this.clearSource(u)}}updateLayers(l){let u=this._changes.getUpdatedPaintProperties();for(let g of u){let b=this.getLayer(g);b&&b.updateTransitions(l)}}getGlyphsUrl(){return this.stylesheet.glyphs}setGlyphsUrl(l){this.stylesheet.glyphs=l,this.glyphManager.setURL(l)}getImages(l,u,g){this.imageManager.getImages(u.images,u.scope,g),this._updateTilesForChangedImages();let b=S=>{if(S){let E=u.images.map(k=>r.I.toString(k));S.setDependencies(u.tileID.key,u.type,E)}},C=r.B(u.source,u.scope);b(this._mergedOtherSourceCaches[C]),b(this._mergedSymbolSourceCaches[C]),u.images.some(S=>S.iconsetId)&&this.fire(new r.z("data",{dataType:"style"}))}rasterizeImages(l,u,g){this.imageManager.rasterizeImages(u,g)}getGlyphs(l,u,g){this.glyphManager.getGlyphs(u.stacks,g)}getResource(l,u,g){return r.dv(u,g)}getOwnSourceCache(l){return this._otherSourceCaches[l]}getOwnLayerSourceCache(l){return l.type==="symbol"?this._symbolSourceCaches[l.source]:this._otherSourceCaches[l.source]}getOwnSourceCaches(l){let u=[];return this._otherSourceCaches[l]&&u.push(this._otherSourceCaches[l]),this._symbolSourceCaches[l]&&u.push(this._symbolSourceCaches[l]),u}_isSourceCacheLoaded(l){let u=this.getOwnSourceCaches(l);return u.length===0?(this.fire(new r.y(new Error(`There is no source with ID '${l}'`))),!1):u.every(g=>g.loaded())}has3DLayers(){return this._has3DLayers}hasSymbolLayers(){return this._hasSymbolLayers}hasCircleLayers(){return this._hasCircleLayers}isLayerClipped(l,u){if(!this._clipLayerPresent&&l.type!=="fill-extrusion"&&l.type!=="building")return!1;let g=l.type==="fill-extrusion"&&(l.sourceLayer==="building"||l.sourceLayer==="procedural_buildings"),b=l.type==="building";if(l.is3D(!!this.terrain)){if(g||b||u&&u.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)}}Gu.getSourceType=function(_){return ty[_]},Gu.setSourceType=function(_,l){ty[_]=l},Gu.registerForPluginStateChange=r.dw;class kL{execute(l){let u=this._makeBuildingsQueryArea(l),g=this._makeFloorsQueryArea(l),b=l.queryRenderedFeatures(u).reduce((F,z)=>{let q=z.properties.id;return z.properties.type!=="building"||F.some(U=>U.properties.id===q)||F.push(z),F},[]),C=l.queryRenderedFeatures(g).reduce((F,z)=>{let q=z.properties.id;return z.properties.type!=="floor"||F.some(U=>U.properties.id===q)||F.push(z),F},[]),S=[l.getCenter().lng,l.getCenter().lat],E=this._findBuildingAtCenter(S,b),k=b.length>0?b[0]:null;return{floors:C.map(F=>({id:F.properties.id,name:F.properties.name,isDefault:F.properties.is_default,zIndex:F.properties.z_index,connectedFloorIds:F.properties.connected_floor_ids,conflictedFloorIds:F.properties.conflicted_floor_ids,buildingIds:F.properties.building_ids})),building:E?{id:E.properties.id,name:E.properties.name}:{id:k.properties.id,name:k.properties.name}}}_makeBuildingsQueryArea(l){let u=l.transform.width,g=l.transform.height,b=Math.min(u,g)*(1/8),C=.5*(u-b),S=.5*(g-b);return[new r.P(C,S),new r.P(C+b,S+b)]}_makeFloorsQueryArea(l){let u=l.transform.width,g=l.transform.height;return[new r.P(0,0),new r.P(u,g)]}_findBuildingAtCenter(l,u){for(let g of u)if(g.geometry.type==="Polygon"&&this._pointInPolygon(l,g.geometry.coordinates[0]))return g;return null}_pointInPolygon(l,u){let g=!1;for(let b=0,C=u.length-1;bl[1]!=k>l[1]&&l[0]<(u[C][0]-S)*(l[1]-E)/(k-E)+S&&(g=!g)}return g}}class ML{constructor(){this._floors=new Map,this._buildings=new Map}append(l){let u=l.building,g=!1;if(u){let b=u.id;b&&(this._buildings.set(b,u),g||this._buildings.has(b)||(g=!0))}return l.floors.forEach(b=>{let C=b.id;g||this._floors.has(C)||(g=!0),this._floors.set(C,b)}),g}clear(){this._floors.clear(),this._buildings.clear()}getFloors(l=null){let u=Array.from(this._floors.values());return l?u.filter(g=>{let b=g.buildingIds;return!!b&&b.split(";").includes(l)}):u}}class RL{constructor(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage=new ML}setIndoorData(l){let u=this._featuresStorage.append(l);return this._selectedBuildingId=l.building?l.building.id:null,u}setFloorId(l){let u=this._selectedFloorId!==l;return u&&(this._selectedFloorId=l),u}getCurrentBuildingSelection(){if(!this._selectedBuildingId)return{selectedFloorId:null,floors:[]};let l=this._featuresStorage.getFloors(this._selectedBuildingId),u=this.getActiveFloors().find(g=>{let b=g.buildingIds;if(!b)return!1;let C=b.split(";");return!!this._selectedBuildingId&&C.includes(this._selectedBuildingId)});return{selectedFloorId:u?u.id:null,floors:l}}getActiveFloors(l=!1){let u=this._featuresStorage.getFloors(),g=u.find(k=>k.id===this._selectedFloorId),b=u.filter(k=>k.isDefault===!0),C=[];if(g)return C=this._calculateCurrentActiveFloors(u,g,b,l),C;if(b.length===0){let k=this._featuresStorage.getFloors(this._selectedBuildingId);C=k.length>0?[k[0]]:[]}else C=b;let S=this._getNonConflictingLastActiveFloors(C),E=[...C,...S];return this._lastActiveFloors=E,E}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,u,g,b){if(!u)return this._getNonConflictingDefaultFloors(this._lastActiveFloors,g);let C=this._getConnectedFloors(u,l);return b?this._buildExplicitSelectionFloors(u,C,g):this._buildImplicitSelectionFloors(C,g)}_getConnectedFloors(l,u){let g=l.connectedFloorIds;if(!g)return[];let b=new Set(g.split(";"));return u.filter(C=>b.has(C.id))}_buildExplicitSelectionFloors(l,u,g){let b=[l,...u],C=this._getNonConflictingLastActiveFloors(b),S=[...b,...C],E=this._deduplicateFloors(S),k=this._getConflictingFloorIdsFrom(E),F=g.filter(q=>!k.has(q.id)),z=[...E,...F];return this._lastActiveFloors=z,z}_buildImplicitSelectionFloors(l,u){let g=this._getConflictingFloorIdsFrom(this._lastActiveFloors),b=u.filter(S=>!g.has(S.id)),C=this._deduplicateFloors([...this._lastActiveFloors,...b]);return this._lastActiveFloors=C,C}_getNonConflictingDefaultFloors(l,u){let g=this._getConflictingFloorIdsFrom(l),b=u.filter(S=>!g.has(S.id)),C=this._deduplicateFloors([...l,...b]);return this._lastActiveFloors=C,C}_deduplicateFloors(l){let u=new Set;return l.filter(g=>{let b=g.id;return!u.has(b)&&(u.add(b),!0)})}_getConflictingFloorIdsFrom(l){let u=new Set;return l.forEach(g=>{let b=g.conflictedFloorIds;b&&b.split(";").forEach(C=>u.add(C))}),u}_getNonConflictingLastActiveFloors(l){if(!this._lastActiveFloors||this._lastActiveFloors.length===0)return[];let u=new Set(l.map(b=>b.id)),g=this._getConflictingFloorIdsFrom(l);return this._lastActiveFloors.filter(b=>{let C=b.id;return!u.has(C)&&!g.has(C)})}_isFloorConflicted(l,u){let g=l.id;return u.some(b=>{let C=b.conflictedFloorIds;return!!C&&C.split(";").includes(g)})}reset(){this._selectedFloorId=null,this._selectedBuildingId=null,this._lastActiveFloors=[],this._featuresStorage.clear()}}class u_ extends r.E{constructor(l){super(),r.aY(["_onLoad","_onMove"],this),this._map=l,this._floorSelectionState=new RL,this._queryIndoor(),this._map.on("load",this._onLoad),this._map.on("move",this._onMove)}destroy(){this._map.off("load",this._onLoad),this._map.off("move",this._onMove),this._map=null,this._floorSelectionState=null}selectFloor(l){this._floorSelectionState.setFloorId(l)&&this._updateIndoorConfig(!0)}_onLoad(){this._map.style.forEachFragmentStyle(l=>{l.stylesheet.indoor&&(this._indoorDataQuery?this.fire(new r.y(new Error("Multiple indoor map styles detected, simultaneous usage is not allowed currently."))):(this._scope=l.scope,this._indoorDataQuery=new kL))}),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(),u=l.floors.map(g=>({id:g.id,name:g.name,shortName:g.zIndex.toString(),levelOrder:g.zIndex}));this.fire(new r.z("indoorupdate",{selectedFloorId:l.selectedFloorId,floors:u}))}_updateIndoorConfig(l=!1){let u=this._floorSelectionState.getActiveFloors(l).map(g=>g.id)||[];this._map.setConfigProperty(this._scope,"activeFloors",["literal",u])}}var ox=` #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`,QA=` 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;}`,XA=` #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);}`,uy="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;}",py=` #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`,JA=`#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`,xw=`#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`,au=`#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`,Cw=`#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;}`,fi=`#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`,eD=`#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 hy=[];$u(ox,hy),$u(XA,hy),$u(QA,hy);let my={"_prelude_fog.vertex.glsl":JA,"_prelude_terrain.vertex.glsl":py,"_prelude_shadow.vertex.glsl":fi,"_prelude_fog.fragment.glsl":xw,"_prelude_shadow.fragment.glsl":eD,"_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":au,"_prelude_raster_particle.glsl":Cw},rx={};Oo("",py),Oo(xw,JA),Oo(eD,fi),Oo(au,""),Oo(Cw,"");let sx=Oo(QA,XA),hh=ox;var ww={background:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`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:Oo(`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:Oo(`#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:Oo("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:Oo(`#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:Oo(`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:Oo("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:Oo("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:Oo("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:Oo(`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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`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:Oo(`#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:Oo(`#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:Oo(`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:Oo(`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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`#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:Oo("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:Oo("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:Oo(`#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:Oo(`#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:Oo(`#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:Oo("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:Oo(`#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 }`,uy),skyboxGradient:Oo(`#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 }`,uy),skyboxCapture:Oo(` 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:Oo(`#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:Oo(`#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:Oo(`#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:Oo(`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:Oo(`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:Oo("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:Oo("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:Oo("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:Oo("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 $u(_,l){let u=_.replace(/\s*\/\/[^\n]*\n/g,` `).split(` `);for(let g of u)if(g=g.trim(),g[0]==="#"&&g.includes("if")&&!g.includes("endif")){g=g.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();let b=g.split(" ");for(let C of b)l.includes(C)||l.push(C)}}function Oo(_,l){let u=/#include\s+"([^"]+)"/g,g=/#pragma mapbox: ([\w\-]+) ([\w]+) ([\w]+) ([\w]+)/g,b={},C=[],S=[];if(_=_.replace(u,(k,F)=>(S.push(F),"")),(l=l.replace(u,(k,F)=>(C.push(F),""))).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 E=[...hy];$u(_,E),$u(l,E);for(let k of[...C,...S])my[k]||console.error(`Undefined include: ${k}`),rx[k]||(rx[k]=[],$u(my[k],rx[k])),E=[...E,...rx[k]];return{fragmentSource:_=_.replace(g,(k,F,z,q,U)=>(b[U]=!0,F==="define"?` #ifndef HAS_UNIFORM_u_${U} in ${z} ${q} ${U}; #else uniform ${z} ${q} u_${U}; #endif `:F==="initialize"?` #ifdef HAS_UNIFORM_u_${U} ${z} ${q} ${U} = u_${U}; #endif `:F==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${U} in ${z} ${q} ${U}; #endif `:F==="initialize-attribute"?"":void 0)),vertexSource:l=l.replace(g,(k,F,z,q,U)=>{let Y=q==="float"?"vec2":q,X=U.match(/color/)?"color":Y;return F==="define-attribute-vertex-shader-only"?` #ifdef HAS_ATTRIBUTE_a_${U} in ${z} ${q} a_${U}; #endif `:b[U]?F==="define"?` #ifndef HAS_UNIFORM_u_${U} uniform lowp float u_${U}_t; in ${z} ${Y} a_${U}; out ${z} ${q} ${U}; #else uniform ${z} ${q} u_${U}; #endif `:F==="initialize"?X==="vec4"?` #ifndef HAS_UNIFORM_u_${U} ${U} = a_${U}; #else ${z} ${q} ${U} = u_${U}; #endif `:` #ifndef HAS_UNIFORM_u_${U} ${U} = unpack_mix_${X}(a_${U}, u_${U}_t); #else ${z} ${q} ${U} = u_${U}; #endif `:F==="define-attribute"?` #ifdef HAS_ATTRIBUTE_a_${U} in ${z} ${q} a_${U}; out ${z} ${q} ${U}; #endif `:F==="initialize-attribute"?` #ifdef HAS_ATTRIBUTE_a_${U} ${U} = a_${U}; #endif `:void 0:F==="define"?` #ifndef HAS_UNIFORM_u_${U} uniform lowp float u_${U}_t; in ${z} ${Y} a_${U}; #else uniform ${z} ${q} u_${U}; #endif `:F==="define-instanced"?X==="mat4"?` #ifdef INSTANCED_ARRAYS in vec4 a_${U}0; in vec4 a_${U}1; in vec4 a_${U}2; in vec4 a_${U}3; #else uniform ${z} ${q} u_${U}; #endif `:` #ifdef INSTANCED_ARRAYS in ${z} ${Y} a_${U}; #else uniform ${z} ${q} u_${U}; #endif `:F==="initialize-attribute-custom"?` #ifdef HAS_ATTRIBUTE_a_${U} ${z} ${q} ${U} = a_${U}; #endif `:X==="vec4"?` #ifndef HAS_UNIFORM_u_${U} ${z} ${q} ${U} = a_${U}; #else ${z} ${q} ${U} = u_${U}; #endif `:` #ifndef HAS_UNIFORM_u_${U} ${z} ${q} ${U} = unpack_mix_${X}(a_${U}, u_${U}_t); #else ${z} ${q} ${U} = u_${U}; #endif `}),usedDefines:E,vertexIncludes:C,fragmentIncludes:S}}class fy{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(l,u,g,b,C,S,E,k){this.context=l;let F=this.boundPaintVertexBuffers.length!==b.length;for(let q=0;!F&&q{let xe=ce.paint.get("hillshade-shadow-color"),Pe=ce.paint.get("hillshade-shadow-color-use-theme").constantOr("default")==="none",ke=ce.paint.get("hillshade-highlight-color"),Ne=ce.paint.get("hillshade-highlight-color-use-theme").constantOr("default")==="none",Me=ce.paint.get("hillshade-accent-color"),De=ce.paint.get("hillshade-accent-color-use-theme").constantOr("default")==="none",Be=ce.paint.get("hillshade-emissive-strength"),bt=r.an(ce.paint.get("hillshade-illumination-direction"));if(ce.paint.get("hillshade-illumination-anchor")==="viewport")bt-=ae.transform.angle;else if(ae.style&&ae.style.enable3dLights()&&ae.style.directionalLight){let kt=ae.style.directionalLight.properties.get("direction"),ft=r.d3(kt.x,kt.y,kt.z);bt=r.an(ft[1])}let nt=!ae.options.moving;return{u_matrix:_e||ae.transform.calculateProjMatrix(ne.tileID.toUnwrapped(),nt),u_image:0,u_latrange:h8(0,ne.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),bt],u_shadow:xe.toPremultipliedRenderColor(Pe?null:ce.lut),u_highlight:ke.toPremultipliedRenderColor(Ne?null:ce.lut),u_emissive_strength:Be,u_accent:Me.toPremultipliedRenderColor(De?null:ce.lut)}})(_,u,g,_.terrain?l.projMatrix:null);_.uploadCommonUniforms(E,q,l.toUnwrapped());let{tileBoundsBuffer:Y,tileBoundsIndexBuffer:X,tileBoundsSegments:J}=_.getTileBoundsBuffers(u);q.draw(_,k.TRIANGLES,b,C,S,Ln.disabled,U,g.id,Y,X,J)}function Sw(_,l,u){if(!l.needsDEMTextureUpload)return;let g=_.context,b=g.gl;g.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||_.getTileTexture(u.stride);let C=u.getPixels();l.demTexture?l.demTexture.update(C,{premultiply:!1}):l.demTexture=new r.T(g,C,b.R32F,{premultiply:!1}),l.needsDEMTextureUpload=!1}function f8(_,l,u){let g=_.context,b=g.gl;if(!l.dem)return;let C=l.dem;if(g.activeTexture.set(b.TEXTURE1),Sw(_,l,C),!l.demTexture)return;l.demTexture.bind(b.NEAREST,b.CLAMP_TO_EDGE);let S=C.dim;g.activeTexture.set(b.TEXTURE0);let E=l.hillshadeFBO;if(!E){let U=new r.T(g,{width:S,height:S,data:null},b.RGBA8);U.bind(b.LINEAR,b.CLAMP_TO_EDGE),E=l.hillshadeFBO=g.createFramebuffer(S,S,!0,"renderbuffer"),E.colorAttachment.set(U.texture)}g.bindFramebuffer.set(E.framebuffer),g.viewport.set([0,0,S,S]);let{tileBoundsBuffer:k,tileBoundsIndexBuffer:F,tileBoundsSegments:z}=_.getMercatorTileBoundsBuffers(),q=[];_.linearFloatFilteringSupported()&&q.push("TERRAIN_DEM_FLOAT_FORMAT"),_.getOrCreateProgram("hillshadePrepare",{defines:q}).draw(_,b.TRIANGLES,Vi.disabled,Mn.disabled,so.unblended,Ln.disabled,((U,Y)=>{let X=Y.stride,J=r.bC();return r.cd(J,0,r.al,-r.al,0,0,1),r.br(J,J,[0,-r.al,0]),{u_matrix:J,u_image:1,u_dimension:[X,X],u_zoom:U.overscaledZ}})(l.tileID,C),u.id,k,F,z),l.needsHillshadePrepare=!1}class As{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 OL extends As{getDefault(){return r.ao.transparent.toNonPremultipliedRenderColor(null)}set(l){let u=this.current;(l.r!==u.r||l.g!==u.g||l.b!==u.b||l.a!==u.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class tD extends As{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class g8 extends As{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class _8 extends As{getDefault(){return[!0,!0,!0,!0]}set(l){let u=this.current;(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2]||l[3]!==u[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class y8 extends As{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class v8 extends As{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class PL extends As{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){let u=this.current;(l.func!==u.func||l.ref!==u.ref||l.mask!==u.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class b8 extends As{getDefault(){let l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){let u=this.current;(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Iw extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;l?u.enable(u.STENCIL_TEST):u.disable(u.STENCIL_TEST),this.current=l,this.dirty=!1}}class x8 extends As{getDefault(){return[0,1]}set(l){let u=this.current;(l[0]!==u[0]||l[1]!==u[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class LL extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;l?u.enable(u.DEPTH_TEST):u.disable(u.DEPTH_TEST),this.current=l,this.dirty=!1}}class iD extends As{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class Tw extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;l?u.enable(u.BLEND):u.disable(u.BLEND),this.current=l,this.dirty=!1}}class nD extends As{getDefault(){let l=this.gl;return[l.ONE,l.ZERO,l.ONE,l.ZERO]}set(l){let u=this.current;(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2]||l[3]!==u[3]||this.dirty)&&(this.gl.blendFuncSeparate(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class p_ extends As{getDefault(){return r.ao.transparent.toNonPremultipliedRenderColor(null)}set(l){let u=this.current;(l.r!==u.r||l.g!==u.g||l.b!==u.b||l.a!==u.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class gy extends As{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 Ew extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;l?u.enable(u.CULL_FACE):u.disable(u.CULL_FACE),this.current=l,this.dirty=!1}}class Aw extends As{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class _y extends As{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}let FL=class extends As{getDefault(){return null}set(_){(_!==this.current||this.dirty)&&(this.gl.useProgram(_),this.current=_,this.dirty=!1)}};class oD extends As{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class NL extends As{getDefault(){let l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){let u=this.current;(l[0]!==u[0]||l[1]!==u[1]||l[2]!==u[2]||l[3]!==u[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class yy extends As{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.bindFramebuffer(u.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class Dw extends As{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.bindRenderbuffer(u.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class kw extends As{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.bindTexture(u.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class rD extends As{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.bindBuffer(u.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Mw extends As{getDefault(){return null}set(l){let u=this.gl;u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class ax extends As{getDefault(){return null}set(l){this.gl&&(l!==this.current||this.dirty)&&(this.gl.bindVertexArray(l),this.current=l,this.dirty=!1)}}class BL extends As{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.pixelStorei(u.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class zL extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class VL extends As{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;let u=this.gl;u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class bf extends As{constructor(l,u){super(l),this.context=l,this.parent=u}getDefault(){return null}}class UL extends bf{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let u=this.gl;u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class HL extends bf{attachment(){return this.gl.DEPTH_ATTACHMENT}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let u=this.gl;u.framebufferRenderbuffer(u.FRAMEBUFFER,this.attachment(),u.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class C8 extends bf{attachment(){return this.gl.DEPTH_ATTACHMENT}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let u=this.gl;u.framebufferTexture2D(u.FRAMEBUFFER,this.attachment(),u.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class w8 extends HL{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}let sD=(_,l,u)=>({u_matrix:_,u_image0:0,u_skirt_height:l,u_ground_shadow_factor:u}),Rw=(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J)=>({u_proj_matrix:Float32Array.from(_),u_globe_matrix:l,u_normalize_matrix:Float32Array.from(g),u_merc_matrix:u,u_zoom_transition:b,u_merc_center:C,u_image0:0,u_frustum_tl:S,u_frustum_tr:E,u_frustum_br:k,u_frustum_bl:F,u_globe_pos:z,u_globe_radius:q,u_viewport:U,u_grid_matrix:J?Float32Array.from(J):new Float32Array(9),u_skirt_height:Y,u_far_z_cutoff:X});function Ow(_,l){return _!=null&&l!=null&&!(!_.hasData()||!l.hasData())&&_.demTexture!=null&&l.demTexture!=null&&_.tileID.key!==l.tileID.key}let xf=new class{constructor(){this.operations={}}newMorphing(_,l,u,g,b){if(_ in this.operations){let C=this.operations[_];C.to.tileID.key!==u.tileID.key&&(C.queued=u)}else this.operations[_]={startTime:g,phase:0,duration:b,from:l,to:u,queued:null}}getMorphValuesForProxy(_){if(!(_ in this.operations))return null;let l=this.operations[_];return{from:l.from,to:l.to,phase:l.phase}}update(_){for(let l in this.operations){let u=this.operations[l];for(u.phase=(_-u.startTime)/u.duration;u.phase>=1||!this._validOp(u);)if(!this._nextOp(u,_)){delete this.operations[l];break}}}_nextOp(_,l){return!!_.queued&&(_.from=_.to,_.to=_.queued,_.queued=null,_.phase=0,_.startTime=l,!0)}_validOp(_){return _.from.hasData()&&_.to.hasData()}},aD={0:null,1:"TERRAIN_VERTEX_MORPHING"};function lD(_,l,u){if(l===0)return 0;let g=l<1&&u===514?.25/l:1;return 6*Math.pow(1.5,22-_)*Math.max(l,1)*g}function S8(_,l){let u=1<<_.z;return!l&&(_.x===0||_.x===u-1)||_.y===0||_.y===u-1}let h_=_=>({u_matrix:_});function m_(_,l,u,g,b){if(b>0){let C=r.o.now(),S=(C-_.timeAdded)/b,E=l?(C-l.timeAdded)/b:-1,k=u.getSource(),F=g.coveringZoomLevel({tileSize:k.tileSize,roundZoom:k.roundZoom}),z=!l||Math.abs(l.tileID.overscaledZ-F)>Math.abs(_.tileID.overscaledZ-F),q=z&&_.refreshedUponExpiration?1:r.aA(z?S:1-E,0,1);return l?{opacity:1,mix:1-q,isFading:S<1}:{opacity:q,mix:0,isFading:S<1}}return{opacity:1,mix:0,isFading:!1}}class jL extends nu{constructor(l){let u=Hb("mock-dem",{type:"raster-dem",maxzoom:l.transform.maxZoom},l.style.dispatcher,l.style);super("mock-dem",u,!1),u.setEventedParent(this),this._sourceLoaded=!0}_loadTile(l,u){l.state="loaded",u(null)}}class lu extends nu{constructor(l){let u=Hb("proxy",{type:"geojson",maxzoom:l.transform.maxZoom},l.style.dispatcher,l.style);super("proxy",u,!1),u.setEventedParent(this),this.map=this.getSource().map=l,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(l,u,g){if(l.freezeTileCoverage)return;this.transform=l;let b=l.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((C,S)=>{if(C[S.key]="",!this._tiles[S.key]){let E=new mf(S,this._source.tileSize*S.overscaleFactor(),l.tileZoom,void 0,void 0,this._source.worldview);E.state="loaded",this._tiles[S.key]=E}return C},{});for(let C in this._tiles)C in b||(this.freeFBO(C),this._tiles[C].unloadVectorData(),delete this._tiles[C])}freeFBO(l){let u=this.proxyCachedFBO[l];if(u!==void 0){let g=Object.values(u);this.renderCachePool.push(...g),delete this.proxyCachedFBO[l]}}deallocRenderCache(){this.renderCache.forEach(l=>l.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Pw extends r.aO{constructor(l,u,g){super(l.overscaledZ,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y),this.proxyTileKey=u,this.projMatrix=g}}class lx extends r.dH{constructor(l,u){super(),this._debugParams={sortTilesHiZFirst:!0,disableRenderCache:!1},l.tp.registerParameter(this._debugParams,["Terrain"],"sortTilesHiZFirst",{},()=>{this._style.map.triggerRepaint()}),l.tp.registerParameter(this._debugParams,["Terrain"],"disableRenderCache",{},()=>{this._style.map.triggerRepaint()}),l.tp.registerButton(["Terrain"],"Invalidate Render Cache",()=>{this.invalidateRenderCache=!0,this._style.map.triggerRepaint()}),this.painter=l,this.terrainTileForTile={},this.prevTerrainTileForTile={};let[g,b,C]=(function(k){let F=new r.bd,z=new r.b1,q=131;F.reserve(17161),z.reserve(33800);let U=r.al/128,Y=r.al+U/2,X=Y+U;for(let ae=-U;aeY||ae<0||ae>Y?24575:0,_e=r.aA(Math.round(ne),0,r.al),xe=r.aA(Math.round(ae),0,r.al);F.emplaceBack(_e+ce,xe)}let J=(ae,ne)=>{let ce=ne*q+ae;z.emplaceBack(ce+1,ce,ce+q),z.emplaceBack(ce+q,ce+q+1,ce+1)};for(let ae=1;ae<129;ae++)for(let ne=1;ne<129;ne++)J(ne,ae);return[0,129].forEach(ae=>{for(let ne=0;ne<130;ne++)J(ne,ae),J(ae,ne)}),[F,z,32768]})(),S=l.context;this.gridBuffer=S.createVertexBuffer(g,r.bf.members),this.gridIndexBuffer=S.createIndexBuffer(b),this.gridSegments=r.bg.simpleSegment(0,0,g.length,b.length),this.gridNoSkirtSegments=r.bg.simpleSegment(0,0,g.length,C),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new lu(u.map),this.orthoMatrix=r.bC(),r.cd(this.orthoMatrix,this.painter.transform.projection.name==="globe"?.015:0,r.al,0,r.al,0,1);let E=S.gl;this._overlapStencilMode=new Mn({func:E.GEQUAL,mask:255},0,255,E.KEEP,E.KEEP,E.REPLACE),this._previousZoom=l.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=u,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new jL(u.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,u,g){if(l&&l.terrain){this._style!==l&&(this.style=l,this._evaluationZoom=void 0);let b=l.terrain.properties,C=l.terrain.drapeRenderMode===0,S=l.terrain.isZoomDependent();this._previousUpdateTimestamp=this.enabled?this._updateTimestamp:void 0,this._updateTimestamp=r.o.now();let E=l.terrain&&l.terrain.scope,k=b.get("source"),F=C?this._mockSourceCache:l.getSourceCache(k,E);if(!F)return void r.w(`Couldn't find terrain source "${k}".`);if(this.sourceCache=F,this._attenuationRange=l.terrain.getAttenuationRange(),this._exaggeration=S?this.calculateExaggeration(u):b.get("exaggeration"),!u.projection.requiresDraping&&S&&this._exaggeration===0)return void this._disable();this.enabled=!0;let z=()=>{this.sourceCache.used&&r.w(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source. This leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);let q=this.getScaledDemTileSize();this.sourceCache.update(u,q,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,z(),this._initializing=!0),z(),u.updateElevation(!0,g),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(u),this._emptyDEMTextureDirty=!0,this._previousZoom=u.zoom}else this._disable()}calculateExaggeration(l){if(this._attenuationRange&&l.zoom>=Math.ceil(this._attenuationRange[1]))return this._style.terrain.getExaggeration(l.zoom);let u=this._previousCameraAltitude,g=l.getFreeCameraOptions().position.z/l.pixelsPerMeter*l.worldSize;this._previousCameraAltitude=g;let b=u!=null?g-u:Number.MAX_VALUE;if(Math.abs(b)<2)return this._exaggeration;let C=l.zoom,S=this._style.terrain;if(!this._previousUpdateTimestamp)return S.getExaggeration(C);let E=C-this._previousZoom,k=this._previousUpdateTimestamp,F=C;this._evaluationZoom!=null&&(F=this._evaluationZoom,Math.abs(C-F)>.5&&(E=.5*(C-F+E)),E*b<0&&(F+=E)),this._evaluationZoom=F;let z=S.getExaggeration(F),q=z===S.getExaggeration(Math.max(0,F-.1));if(q&&Math.abs(z-this._exaggeration)<.01)return z;let U=Math.min(.1,.00375*(this._updateTimestamp-k));return(q||z<.1||Math.abs(E)<1e-4)&&(U=Math.min(.2,4*U)),r.ak(this._exaggeration,z,U)}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 u=this.proxySourceCache,g=this.painter.transform;this._initializing&&(this._initializing=g._centerAltitude===0&&this.getAtPointOrZero(r.ae.fromLngLat(g.center),-1)===-1,this._emptyDEMTextureDirty=!this._initializing);let b=this.proxyCoords=u.getIds().map(k=>{let F=u.getTileByID(k).tileID;return F.projMatrix=g.calculateProjMatrix(F.toUnwrapped()),F});(function(k,F){let z=F.transform.pointCoordinate(F.transform.getCameraPoint()),q=new r.P(z.x,z.y);k.sort((U,Y)=>{if(Y.overscaledZ-U.overscaledZ)return Y.overscaledZ-U.overscaledZ;let X=new r.P(U.canonical.x+(1<{this.proxyToSource[k.key]={}}),this.terrainTileForTile={};let S=this._style._mergedSourceCaches;for(let k in S){let F=S[k];if(!F.used||(F!==this.sourceCache&&this.resetTileLookupCache(F.id),this._setupProxiedCoordsForOrtho(F,l[k],C),F.usedForTerrain))continue;let z=l[k];F.getSource().reparseOverscaled&&this._assignTerrainTiles(z)}this.proxiedCoords[u.id]=b.map(k=>new Pw(k,k.key,this.orthoMatrix)),this._assignTerrainTiles(b),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(C),this.renderingToTexture=!1;let E={};this._visibleDemTiles=[];for(let k of this.proxyCoords){let F=this.terrainTileForTile[k.key];if(!F)continue;let z=F.tileID.key;z in E||(this._visibleDemTiles.push(F),E[z]=z)}}_assignTerrainTiles(l){this._initializing||l.forEach(u=>{if(this.terrainTileForTile[u.key])return;let g=this._findTileCoveringTileID(u,this.sourceCache);g&&(this.terrainTileForTile[u.key]=g)})}_prepareDEMTextures(){let l=this.painter.context,u=l.gl;for(let g in this.terrainTileForTile){let b=this.terrainTileForTile[g],C=b.dem;!C||b.demTexture&&!b.needsDEMTextureUpload||(l.activeTexture.set(u.TEXTURE1),Sw(this.painter,b,C))}}_prepareDemTileUniforms(l,u,g,b){if(!u||u.demTexture==null)return!1;let C=l.tileID.canonical,S=Math.pow(2,u.tileID.canonical.z-C.z),E=b||"";return g[`u_dem_tl${E}`]=[C.x*S%1,C.y*S%1],g[`u_dem_scale${E}`]=S,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}_getLoadedAreaMinimum(){if(!this.enabled)return 0;let l=0,u=this._visibleDemTiles.reduce((g,b)=>{if(!b.dem)return g;let C=b.dem.tree.minimums[0];return C>0&&l++,g+C},0);return l?u/l:0}_updateEmptyDEMTexture(){let l=this.painter.context,u=l.gl;l.activeTexture.set(u.TEXTURE2);let g=this._getLoadedAreaMinimum(),b=new r.dI({width:1,height:1},new Float32Array([g]));this._emptyDEMTextureDirty=!1;let C=this._emptyDEMTexture;return C?C.update(b,{premultiply:!1}):C=this._emptyDEMTexture=new r.T(l,b,u.R32F,{premultiply:!1}),C}setupElevationDraw(l,u,g){let b=this.painter.context,C=b.gl,S={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};S.u_exaggeration=this.exaggeration();let E=null,k=null,F=1;if(g&&g.morphing&&this._useVertexMorphing){let Y=g.morphing.srcDemTile,X=g.morphing.dstDemTile;F=g.morphing.phase,Y&&X&&(this._prepareDemTileUniforms(l,Y,S,"_prev")&&(k=Y),this._prepareDemTileUniforms(l,X,S)&&(E=X))}let z=Y=>Y&&Y.demTexture&&this.painter.linearFloatFilteringSupported()?C.LINEAR:C.NEAREST,q=null;var U;if(this.enabled?k&&E?(q=E.demTexture,b.activeTexture.set(C.TEXTURE4),k.demTexture.bind(z(k),C.CLAMP_TO_EDGE),S.u_dem_lerp=F):(E=this.terrainTileForTile[l.tileID.key],q=this._prepareDemTileUniforms(l,E,S)?E.demTexture:this.emptyDEMTexture):q=this.emptyDEMTexture,b.activeTexture.set(C.TEXTURE2),q&&(S.u_dem_size=(U=q).size[0]===1?1:U.size[0]-2,q.bind(z(E),C.CLAMP_TO_EDGE)),this.painter.setupDepthForOcclusion(g&&g.useDepthForOcclusion,u,S),g&&g.useMeterToDem&&E){let Y=(1<{if(ne===ft)return;let At=[aD[ft],"PROJECTION_GLOBE_VIEW"];_e&&At.push("CUSTOM_ANTIALIASING");let pi=F.isTileAffectedByFog(kt);ae=F.getOrCreateProgram("globeRaster",{defines:At,overrideFog:pi}),ne=ft},Pe=F.colorModeForRenderPass(),ke=new Vi(J.LEQUAL,Vi.ReadWrite,F.depthRangeFor3D);xf.update(Y);let Ne=r.dB(ce),Me=[r.aF(ce.center.lng),r.aJ(ce.center.lat)],De=F.globeSharedBuffers,Be=[ce.width*r.o.devicePixelRatio,ce.height*r.o.devicePixelRatio],bt=Float32Array.from(ce.globeMatrix),nt={useDenormalizedUpVectorScale:!0};{let kt=F.transform,ft=lD(kt.zoom,z.exaggeration(),z.sourceCache._source.tileSize);ne=-1;let At=J.TRIANGLES;for(let pi of U){let vt=q.getTile(pi),Ke=Mn.disabled,Ot=z.prevTerrainTileForTile[pi.key],Ct=z.terrainTileForTile[pi.key];Ow(Ot,Ct)&&xf.newMorphing(pi.key,Ot,Ct,Y,250),X.activeTexture.set(J.TEXTURE0),vt.texture&&vt.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE);let Kt=xf.getMorphValuesForProxy(pi.key),di=Kt?1:0;Kt&&Object.assign(nt,{morphing:{srcDemTile:Kt.from,dstDemTile:Kt.to,phase:r.dz(Kt.phase)}});let Ai=r.dC(pi.canonical),ri=r.dD(Ai.getCenter().lat),ei=r.dE(pi.canonical,Ai,ri,kt.worldSize/kt._pixelsPerMercatorPixel),an=r.bk(r.dF(pi.canonical)),Xi=Rw(kt.expandedFarZProjMatrix,bt,Ne,an,r.aj(kt.zoom),Me,kt.frustumCorners.TL,kt.frustumCorners.TR,kt.frustumCorners.BR,kt.frustumCorners.BL,kt.globeCenterInViewSpace,kt.globeRadius,Be,ft,kt._farZ,ei);if(xe(pi,di),ae&&(z.setupElevationDraw(vt,ae,nt),F.uploadCommonUniforms(X,ae,pi.toUnwrapped()),De)){let[tn,Yi,Nn]=De.getGridBuffers(ri,ft!==0);ae.draw(F,At,ke,Ke,Pe,Ln.backCCW,Xi,"globe_raster",tn,Yi,Nn)}}}if(De&&(F.renderDefaultNorthPole||F.renderDefaultSouthPole)){let kt=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];_e&&kt.push("CUSTOM_ANTIALIASING"),ae=F.getOrCreateProgram("globeRaster",{defines:kt});for(let ft of U){let{x:At,y:pi,z:vt}=ft.canonical,Ke=pi===0,Ot=pi===(1<tn.draw(F,J.TRIANGLES,ke,Mn.disabled,Pe,Ln.disabled,Rw(ce.expandedFarZProjMatrix,ei,ei,an,0,Me,ce.frustumCorners.TL,ce.frustumCorners.TR,ce.frustumCorners.BR,ce.frustumCorners.BL,ce.globeCenterInViewSpace,ce.globeRadius,Be,0,ce._farZ),"globe_pole_raster",Yi,di,Ai);z.setupElevationDraw(ri,ae,nt),F.uploadCommonUniforms(X,ae,ft.toUnwrapped()),Ke&&F.renderDefaultNorthPole&&Xi(ae,Ct),Ot&&F.renderDefaultSouthPole&&(ei=r.cR(r.bC(),ei,[1,-1,1]),Xi(ae,Kt))}}}})(b,C,S,E,k);else{let F=b.context,z=F.gl,q,U,Y=b.shadowRenderer,X=yf(b,b.longestCutoffRange),J=Pe=>{if(U===Pe)return;let ke=[];ke.push(aD[Pe]),X.shouldRenderCutoff&&ke.push("RENDER_CUTOFF"),Y&&(ke.push("RENDER_SHADOWS","DEPTH_TEXTURE"),Y.useNormalOffset&&ke.push("NORMAL_OFFSET")),q=b.getOrCreateProgram("terrainRaster",{defines:ke}),U=Pe},ae=b.colorModeForRenderPass(),ne=new Vi(z.LEQUAL,Vi.ReadWrite,b.depthRangeFor3D);xf.update(k);let ce=b.transform,_e=lD(ce.zoom,C.exaggeration(),C.sourceCache._source.tileSize),xe=[0,0,0];if(Y){let Pe=b.style.directionalLight,ke=b.style.ambientLight;Pe&&ke&&(xe=Ap(b.style,Pe,ke))}{U=-1;let Pe=z.TRIANGLES,[ke,Ne]=[C.gridIndexBuffer,C.gridSegments];for(let Me of E){let De=S.getTile(Me),Be=Mn.disabled,bt=C.prevTerrainTileForTile[Me.key],nt=C.terrainTileForTile[Me.key];Ow(bt,nt)&&xf.newMorphing(Me.key,bt,nt,k,250),F.activeTexture.set(z.TEXTURE0),De.texture&&De.texture.bind(z.LINEAR,z.CLAMP_TO_EDGE);let kt=xf.getMorphValuesForProxy(Me.key),ft=kt?1:0,At;kt&&(At={morphing:{srcDemTile:kt.from,dstDemTile:kt.to,phase:r.dz(kt.phase)}});let pi=sD(Me.projMatrix,S8(Me.canonical,ce.renderWorldCopies)?_e/10:_e,xe);if(J(ft),!q)continue;C.setupElevationDraw(De,q,At);let vt=Me.toUnwrapped();Y&&Y.setupShadows(vt,q),b.uploadCommonUniforms(F,q,vt,null,X),q.draw(b,Pe,ne,Be,ae,Ln.backCCW,pi,"terrain_raster",C.gridBuffer,ke,Ne)}}}})(u,this,this.proxySourceCache,l,this._updateTimestamp),this.renderingToTexture=!0,u.gpuTimingDeferredRenderEnd(),l.splice(0,l.length))}renderBatch(l){if(this._drapedRenderBatches.length===0)return l+1;this.renderingToTexture=!0;let u=this.painter,g=this.painter.context,b=this.proxySourceCache,C=this.proxiedCoords[b.id],S=this._drapedRenderBatches.shift(),E=u.style.order,k=[],F=0;for(let z of C){let q=b.getTileByID(z.proxyTileKey),U=b.proxyCachedFBO[z.key]?b.proxyCachedFBO[z.key][l]:void 0,Y=U!==void 0?b.renderCache[U]:this.pool[F++],X=U!==void 0;if(q.texture=Y.tex,X&&!Y.dirty){k.push(q.tileID);continue}let J;g.bindFramebuffer.set(Y.fb.framebuffer),this.renderedToTile=!1,Y.dirty&&(g.clear({color:r.ao.transparent,stencil:0}),Y.dirty=!1);for(let ae=S.start;ae<=S.end;++ae){let ne=u.style._mergedLayers[E[ae]];if(ne.isHidden(u.transform.zoom))continue;let ce=u.style.getLayerSourceCache(ne),_e=ce?this.proxyToSource[z.key][ce.id]:[z];if(!_e)continue;let xe=_e;g.viewport.set([0,0,Y.fb.width,Y.fb.height]),J!==(ce?ce.id:null)&&(this._setupStencil(Y,_e,ne,ce),J=ce?ce.id:null),u.renderLayer(u,ce,ne,xe)}if(this._drapedRenderBatches.length===0)for(let ae of this._pendingGroundEffectLayers){let ne=u.style._mergedLayers[E[ae]];if(ne.isHidden(u.transform.zoom))continue;let ce=u.style.getLayerSourceCache(ne),_e=ce?this.proxyToSource[z.key][ce.id]:[z];if(!_e)continue;let xe=_e;g.viewport.set([0,0,Y.fb.width,Y.fb.height]),J!==(ce?ce.id:null)&&(this._setupStencil(Y,_e,ne,ce),J=ce?ce.id:null),u.renderLayer(u,ce,ne,xe)}this.renderedToTile?(Y.dirty=!0,k.push(q.tileID)):X||--F,F===5&&(F=0,this.renderToBackBuffer(k))}return this.renderToBackBuffer(k),this.renderingToTexture=!1,g.bindFramebuffer.set(null),g.viewport.set([0,0,u.width,u.height]),S.end+1}postRender(){}isLayerOrderingCorrect(l){let u=l.order.length,g=-1,b=u;for(let C=0;Cg}getMinElevationBelowMSL(){let l=0;return this._visibleDemTiles.filter(u=>u.dem).forEach(u=>{l=Math.min(l,u.dem.tree.minimums[0])}),l===0?l:(l-30)*this._exaggeration}raycast(l,u,g){if(!this._visibleDemTiles)return null;let b=this._visibleDemTiles.filter(C=>C.dem).map(C=>{let S=C.tileID,E=1<(C.t!==null?C.t:Number.MAX_VALUE)-(S.t!==null?S.t:Number.MAX_VALUE));for(let C of b){if(C.t==null)return null;let S=C.tile.dem.tree.raycast(C.minx,C.miny,C.maxx,C.maxy,l,u,g);if(S!=null)return S}return null}_createFBO(){let l=this.painter.context,u=l.gl,g=this.drapeBufferSize;l.activeTexture.set(u.TEXTURE0);let b=new r.T(l,{width:g[0],height:g[1],data:null},u.RGBA8);b.bind(u.LINEAR,u.CLAMP_TO_EDGE);let C=l.createFramebuffer(g[0],g[1],!0,null);return C.colorAttachment.set(b.texture),C.depthAttachment=new w8(l,C.framebuffer),this._sharedDepthStencil===void 0?(this._sharedDepthStencil=l.createRenderbuffer(l.gl.DEPTH_STENCIL,g[0],g[1]),this._stencilRef=0,C.depthAttachment.set(this._sharedDepthStencil),l.clear({stencil:0})):C.depthAttachment.set(this._sharedDepthStencil),l.extTextureFilterAnisotropic&&u.texParameterf(u.TEXTURE_2D,l.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,l.extTextureFilterAnisotropicMax),{fb:C,tex:b,dirty:!1}}_initFBOPool(){for(;this.pool.length{let u=this._style._mergedLayers[l],g=u.isHidden(this.painter.transform.zoom);return u.type==="hillshade"||u.type==="custom"?!g&&u.shouldRedrape():!g&&u.hasTransition()})}_clearLineLayersFromRenderCache(){let l=!1;for(let g of this._style.getSources())if(g instanceof _c){l=!0;break}if(!l)return;let u={};for(let g=0;gk>E.end)||r.w("fill-extrusion with flood lighting and/or ground ambient occlusion should be moved to be on top of all draped layers.")}this._drapedRenderBatches=g}_setupRenderCache(l){let u=this.proxySourceCache;if(this._shouldDisableRenderCache()||this.invalidateRenderCache){if(this.invalidateRenderCache=!1,u.renderCache.length>u.renderCachePool.length){let S=Object.values(u.proxyCachedFBO);u.proxyCachedFBO={};for(let E=0;E=0;S--){let E=g[S];if(u.getTileByID(E.key),u.proxyCachedFBO[E.key]!==void 0){let k=l[E.key],F=this.proxyToSource[E.key],z=0;for(let q in F){let U=F[q],Y=k[q];if(!Y||Y.length!==U.length||U.some((X,J)=>X!==Y[J]||b[q]&&b[q].hasOwnProperty(X.key))){z=-1;break}++z}for(let q in u.proxyCachedFBO[E.key])u.renderCache[u.proxyCachedFBO[E.key][q]].dirty=z<0||z!==Object.values(k).length}}let C=[...this._drapedRenderBatches];C.sort((S,E)=>E.end-E.start-(S.end-S.start));for(let S of C)for(let E of g){if(u.proxyCachedFBO[E.key])continue;let k=u.renderCachePool.pop();k===void 0&&u.renderCache.length<50&&(k=u.renderCache.length,u.renderCache.push(this._createFBO())),k!==void 0&&(u.proxyCachedFBO[E.key]={},u.proxyCachedFBO[E.key][S.start]=k,u.renderCache[k].dirty=!0)}this._tilesDirty={}}_setupStencil(l,u,g,b){if(!b||!this._sourceTilesOverlap[b.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));let C=this.painter.context,S=C.gl;if(u.length<=1)return void(this._overlapStencilType=!1);let E;if(g.isTileClipped())E=u.length,this._overlapStencilMode.test={func:S.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(u[0].overscaledZ>u[u.length-1].overscaledZ))return void(this._overlapStencilType=!1);E=1,this._overlapStencilMode.test={func:S.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+E>255&&(C.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=E,this._overlapStencilMode.ref=this._stencilRef,g.isTileClipped()&&this._renderTileClippingMasks(u,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):Mn.disabled}_renderTileClippingMasks(l,u){let g=this.painter,b=this.painter.context,C=b.gl;g._tileClippingMaskIDs={},b.setColorMode(so.disabled),b.setDepthMode(Vi.disabled);let S=g.getOrCreateProgram("clippingMask");for(let E of l){let k=g._tileClippingMaskIDs[E.key]=--u;S.draw(g,C.TRIANGLES,Vi.disabled,new Mn({func:C.ALWAYS,mask:0},k,255,C.KEEP,C.KEEP,C.REPLACE),so.disabled,Ln.disabled,h_(E.projMatrix),"$clipping",g.tileExtentBuffer,g.quadTriangleIndexBuffer,g.tileExtentSegments)}}pointCoordinate(l){let u=this.painter.transform;if(l.x<0||l.x>u.width||l.y<0||l.y>u.height)return null;let g=[l.x,l.y,1,1];r.aC(g,g,u.pixelMatrixInverse),r.cJ(g,g,1/g[3]),g[0]/=u.worldSize,g[1]/=u.worldSize;let b=u._camera.position,C=r.ce(1,u.center.lat),S=[b[0],b[1],b[2]/C,0],E=r.d9([],g.slice(0,3),S);r.aw(E,E);let k=this.raycast(S,E,this._exaggeration);return k!==null&&k?(r.bH(S,S,E,k),S[3]=S[2],S[2]*=C,S):null}_setupProxiedCoordsForOrtho(l,u,g){if(l.getSource()instanceof r.aS)return this._setupProxiedCoordsForImageSource(l,u,g);this._findCoveringTileCache[l.id]=this._findCoveringTileCache[l.id]||{};let b=this.proxiedCoords[l.id]=[],C=this.proxyCoords;for(let k=0;kz.overscaledZ-F.overscaledZ)}_setupProxiedCoordsForImageSource(l,u,g){if(!l.getSource().loaded())return;let b=this.proxiedCoords[l.id]=[],C=this.proxyCoords,S=l.getSource(),E=S.tileID;if(!E)return;let k=new r.P(E.x,E.y)._div(1<(q.min.x=Math.min(q.min.x,U.x-k.x),q.min.y=Math.min(q.min.y,U.y-k.y),q.max.x=Math.max(q.max.x,U.x-k.x),q.max.y=Math.max(q.max.y,U.y-k.y),q),{min:new r.P(Number.MAX_VALUE,Number.MAX_VALUE),max:new r.P(-Number.MAX_VALUE,-Number.MAX_VALUE)}),z=(q,U)=>{let Y=q.wrap+q.canonical.x/(1<ae+F.max.x||X+Jne+F.max.y};for(let q=0;qS.key===u.tileID.key);if(C)return C}if(u.tileID.key!==l.key){let C=l.canonical.z-u.tileID.canonical.z,S,E,k;b=r.bC();let F=u.tileID.wrap-l.wrap<0?(S=r.al>>C,E=S*((u.tileID.canonical.x<=q){let U=l.canonical.z-q;u.getSource().reparseOverscaled?(E=Math.max(l.canonical.z+2,u.transform.tileZoom),S=new r.aO(E,l.wrap,q,l.canonical.x>>U,l.canonical.y>>U)):U!==0&&(E=q,S=new r.aO(E,l.wrap,q,l.canonical.x>>U,l.canonical.y>>U))}S.key!==l.key&&(F.push(S.key),g=u.getTile(S))}let z=q=>{F.forEach(U=>{b[U]=q}),F.length=0};for(E-=1;E>=k&&(!g||!g.hasData());E--){g&&z(g.tileID.key);let q=S.calculateScaledKey(E);if(g=u.getTileByID(q),g&&g.hasData())break;let U=b[q];if(U===null)break;U===void 0?F.push(q):g=u.getTileByID(U)}return z(g?g.tileID.key:null),g&&g.hasData()?g:null}findDEMTileFor(l){return this.enabled?this._findTileCoveringTileID(l,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(l,u){let g=this._tilesDirty[l];g||(g=this._tilesDirty[l]={}),g[u.key]=!0}}function Lw(_,l,u){let g=(function(E,k,F){let z=r.bJ(k,E),q=r.bJ(F,[.2126,.7152,.0722]),U=(X,J,ae)=>(1-ae)*X+ae*J,Y=U(1-.3*Math.min(q,1),1,Math.min(z+1,1));return U(.92,1,Math.asin(r.aA(k[2],-1,1))/Math.PI+.5)*Y})(_,[0,0,1],l),b=[0,0,0];r.c4(b,u.slice(0,3),g);let C=[0,0,0];r.c4(C,l.slice(0,3),_[2]);let S=[0,0,0];return r.d7(S,b,C),r.da(S)}let cD=["fill","fillOutline","fillPattern","line","linePattern","background","backgroundPattern","hillshade","raster"],dD=["stars","rainParticle","snowParticle","fillExtrusion","fillExtrusionGroundEffect","elevatedStructures","model","symbol"];class Fw{static cacheKey(l,u,g,b){let C=`${u}${b?b.cacheKey:""}`;for(let S of g)l.usedDefines.includes(S)&&(C+=`/${S}`);return C}constructor(l,u,g,b,C,S){let E=l.gl;this.program=E.createProgram(),this.configuration=b,this.name=u,this.fixedDefines=[...S];let k=b?b.defines():[];k=k.concat(S.map(X=>`#define ${X}`));let F=`#version 300 es `,z=F+k.concat("precision mediump float;",hh,sx.fragmentSource).join(` `);for(let X of g.fragmentIncludes)z+=` ${my[X]}`;z+=` ${g.fragmentSource}`;let q=F+k.concat("precision highp float;",hh,sx.vertexSource).join(` `);for(let X of g.vertexIncludes)q+=` ${my[X]}`;this.forceManualRenderingForInstanceIDShaders=l.forceManualRenderingForInstanceIDShaders&&g.vertexSource.indexOf("gl_InstanceID")!==-1,this.forceManualRenderingForInstanceIDShaders&&(q+=` uniform int u_instanceID; `),q+=` ${g.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(q=q.replaceAll("gl_InstanceID","u_instanceID"));let U=E.createShader(E.FRAGMENT_SHADER);if(E.isContextLost())return void(this.failedToCreate=!0);E.shaderSource(U,z),E.compileShader(U),E.attachShader(this.program,U);let Y=E.createShader(E.VERTEX_SHADER);E.isContextLost()?this.failedToCreate=!0:(E.shaderSource(Y,q),E.compileShader(Y),E.attachShader(this.program,Y),this.attributes={},E.linkProgram(this.program),E.deleteShader(Y),E.deleteShader(U),this.fixedUniforms=C(l),this.binderUniforms=b?b.getUniforms(l):[],this.forceManualRenderingForInstanceIDShaders&&(this.instancingUniforms=(X=>({u_instanceID:new r.cg(X)}))(l)),(S.includes("TERRAIN")||u.indexOf("symbol")!==-1||u.indexOf("circle")!==-1)&&(this.terrainUniforms=(X=>({u_dem:new r.cg(X),u_dem_prev:new r.cg(X),u_dem_tl:new r.cj(X),u_dem_scale:new r.ci(X),u_dem_tl_prev:new r.cj(X),u_dem_scale_prev:new r.ci(X),u_dem_size:new r.ci(X),u_dem_lerp:new r.ci(X),u_exaggeration:new r.ci(X),u_depth:new r.cg(X),u_depth_size_inv:new r.cj(X),u_depth_range_unpack:new r.cj(X),u_occluder_half_size:new r.ci(X),u_occlusion_depth_offset:new r.ci(X),u_meter_to_dem:new r.ci(X),u_label_plane_matrix_inv:new r.ck(X)}))(l)),S.includes("GLOBE")&&(this.globeUniforms=(X=>({u_tile_tl_up:new r.ch(X),u_tile_tr_up:new r.ch(X),u_tile_br_up:new r.ch(X),u_tile_bl_up:new r.ch(X),u_tile_up_scale:new r.ci(X)}))(l)),S.includes("FOG")&&(this.fogUniforms=(X=>({u_fog_matrix:new r.ck(X),u_fog_range:new r.cj(X),u_fog_color:new r.d2(X),u_fog_horizon_blend:new r.ci(X),u_fog_vertical_limit:new r.cj(X),u_fog_temporal_offset:new r.ci(X),u_frustum_tl:new r.ch(X),u_frustum_tr:new r.ch(X),u_frustum_br:new r.ch(X),u_frustum_bl:new r.ch(X),u_globe_pos:new r.ch(X),u_globe_radius:new r.ci(X),u_globe_transition:new r.ci(X),u_is_globe:new r.cg(X),u_viewport:new r.cj(X)}))(l)),S.includes("RENDER_CUTOFF")&&(this.cutoffUniforms=(X=>({u_cutoff_params:new r.d2(X)}))(l)),S.includes("LIGHTING_3D_MODE")&&(this.lightsUniforms=(X=>({u_lighting_ambient_color:new r.ch(X),u_lighting_directional_dir:new r.ch(X),u_lighting_directional_color:new r.ch(X),u_ground_radiance:new r.ch(X)}))(l)),S.includes("RENDER_SHADOWS")&&(this.shadowUniforms=(X=>({u_light_matrix_0:new r.ck(X),u_light_matrix_1:new r.ck(X),u_fade_range:new r.cj(X),u_shadow_normal_offset:new r.ch(X),u_shadow_intensity:new r.ci(X),u_shadow_texel_size:new r.ci(X),u_shadow_map_resolution:new r.ci(X),u_shadow_direction:new r.ch(X),u_shadow_bias:new r.ch(X),u_shadowmap_0:new r.cg(X),u_shadowmap_1:new r.cg(X)}))(l)))}getAttributeLocation(l,u){let g=this.attributes[u];return g===void 0&&(g=this.attributes[u]=l.getAttribLocation(this.program,u)),g}setTerrainUniformValues(l,u){if(!this.terrainUniforms)return;let g=this.terrainUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let b in u)g[b]&&g[b].set(this.program,b,u[b])}}setGlobeUniformValues(l,u){if(!this.globeUniforms)return;let g=this.globeUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let b in u)g[b]&&g[b].set(this.program,b,u[b])}}setFogUniformValues(l,u){if(!this.fogUniforms)return;let g=this.fogUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let b in u)g[b].set(this.program,b,u[b])}}setCutoffUniformValues(l,u){if(!this.cutoffUniforms)return;let g=this.cutoffUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let b in u)g[b].set(this.program,b,u[b])}}setLightsUniformValues(l,u){if(!this.lightsUniforms)return;let g=this.lightsUniforms;if(!this.failedToCreate){l.program.set(this.program);for(let b in u)g[b].set(this.program,b,u[b])}}setShadowUniformValues(l,u){if(this.failedToCreate||!this.shadowUniforms)return;let g=this.shadowUniforms;l.program.set(this.program);for(let b in u)g[b].set(this.program,b,u[b])}_drawDebugWireframe(l,u,g,b,C,S,E,k,F,z){let q=l.options.wireframe;if(q.terrain===!1&&q.layers2D===!1&&q.layers3D===!1)return;let U=l.context;if(!(!(!q.terrain||this.name!=="terrainRaster"&&this.name!=="globeRaster")||!(!q.layers2D||l._terrain&&l._terrain.renderingToTexture||!cD.includes(this.name))||!(!q.layers3D||!dD.includes(this.name))))return;let Y=U.gl,X=l.wireframeDebugCache.getLinesFromTrianglesBuffer(l.frameCounter,C,U);if(!X)return;let J=[...this.fixedDefines];J.push("DEBUG_WIREFRAME");let ae=l.getOrCreateProgram(this.name,{config:this.configuration,defines:J});U.program.set(ae.program);let ne=(xe,Pe,ke)=>{if(Pe[xe]&&ke[xe])for(let Ne in Pe[xe])ke[xe][Ne]&&ke[xe][Ne].set(ke.program,Ne,Pe[xe][Ne].current)};F&&F.setUniforms(ae.program,U,ae.binderUniforms,E,{zoom:k}),ne("fixedUniforms",this,ae),ne("terrainUniforms",this,ae),ne("globeUniforms",this,ae),ne("fogUniforms",this,ae),ne("lightsUniforms",this,ae),ne("shadowUniforms",this,ae),X.bind(),U.setColorMode(new so([Y.ONE,Y.ONE_MINUS_SRC_ALPHA,Y.ZERO,Y.ONE],r.ao.transparent,[!0,!0,!0,!1])),U.setDepthMode(new Vi(u.func===Y.LESS?Y.LEQUAL:u.func,Vi.ReadOnly,u.range)),U.setStencilMode(Mn.disabled);let ce=3*S.primitiveLength*2,_e=3*S.primitiveOffset*2*2;if(this.forceManualRenderingForInstanceIDShaders){let xe=z||1;for(let Pe=0;Pe1?Y.drawElementsInstanced(Y.LINES,ce,Y.UNSIGNED_SHORT,_e,z):Y.drawElements(Y.LINES,ce,Y.UNSIGNED_SHORT,_e);C.bind(),U.program.set(this.program),U.setDepthMode(u),U.setStencilMode(g),U.setColorMode(b)}checkUniforms(l,u,g){if(this.fixedDefines.includes(u)){for(let b of Object.keys(g))if(!g[b].initialized)throw new Error(`Program '${this.name}', from draw '${l}': uniform ${b} not set but required by ${u} being defined`)}}draw(l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae){let ne=l.context,ce=ne.gl;if(this.failedToCreate)return;ne.program.set(this.program),ne.setDepthMode(g),ne.setStencilMode(b),ne.setColorMode(C),ne.setCullFace(S);for(let Pe of Object.keys(this.fixedUniforms))this.fixedUniforms[Pe].set(this.program,Pe,E[Pe]);X&&X.setUniforms(this.program,ne,this.binderUniforms,U,{zoom:Y});let _e={[ce.POINTS]:1,[ce.LINES]:2,[ce.TRIANGLES]:3,[ce.LINE_STRIP]:1}[u];this.checkUniforms(k,"RENDER_SHADOWS",this.shadowUniforms);let xe=ae&&ae>0?1:void 0;for(let Pe of q.get()){let ke=Pe.vaos||(Pe.vaos={});if((ke[k]||(ke[k]=new fy)).bind(ne,this,F,X?X.getPaintVertexBuffers():[],z,Pe.vertexOffset,J||[],xe),this.forceManualRenderingForInstanceIDShaders){let Ne=ae||1;for(let Me=0;Me1?ce.drawElementsInstanced(u,Pe.primitiveLength*_e,ce.UNSIGNED_SHORT,Pe.primitiveOffset*_e*2,ae):z?ce.drawElements(u,Pe.primitiveLength*_e,ce.UNSIGNED_SHORT,Pe.primitiveOffset*_e*2):ce.drawArrays(u,Pe.vertexOffset,Pe.vertexLength);u===ce.TRIANGLES&&z&&this._drawDebugWireframe(l,g,b,C,z,Pe,U,Y,X,ae)}}}function cx(_,l,u=0){let g=Math.pow(2,l.tileID.overscaledZ),b=l.tileSize*Math.pow(2,_.transform.tileZoom)/g,C=b*(l.tileID.canonical.x+l.tileID.wrap*g),S=b*l.tileID.canonical.y;return{u_image:0,u_texsize:l.imageAtlasTexture?l.imageAtlasTexture.size:[0,0],u_tile_units_to_pixels:1/r.ay(l,1,_.transform.tileZoom),u_pixel_coord_upper:[C>>16,S>>16],u_pixel_coord_lower:[65535&C,65535&S],u_pattern_transition:u}}let vy={terrain:0,flat:1},uD=r.bC(),dx=(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne)=>{let ce=l.style.light,_e=ce.properties.get("position"),xe=[_e.x,_e.y,_e.z],Pe=r.dL();ce.properties.get("anchor")==="viewport"&&(r.dM(Pe,-l.transform.angle),r.dN(xe,xe,Pe));let ke=ce.properties.get("color").toPremultipliedRenderColor(null),Ne=l.transform,Me={u_matrix:_,u_lightpos:xe,u_lightintensity:ce.properties.get("intensity"),u_lightcolor:[ke.r,ke.g,ke.b],u_vertical_gradient:+u,u_opacity:g,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:uD,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_height_type:vy[F],u_base_type:vy[z],u_ao:b,u_edge_radius:C,u_width_scale:S,u_flood_light_color:X,u_vertical_scale:J,u_flood_light_intensity:ae,u_ground_shadow_factor:ne};return Ne.projection.name==="globe"&&(Me.u_tile_id=[E.canonical.x,E.canonical.y,1<({u_matrix:_,u_edge_radius:l,u_width_scale:u,u_vertical_scale:g,u_height_type:vy[b],u_base_type:vy[C]}),GL=(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne)=>{let ce=dx(_,l,u,g,b,C,S,E,F,z,q,U,Y,X,J,ae,1,[0,0,0]),_e={u_height_factor:-Math.pow(2,E.overscaledZ)/k.tileSize/8};return Object.assign(ce,cx(l,k,ne),_e)},hD=(_,l,u)=>({u_matrix:_,u_emissive_strength:l,u_ground_shadow_factor:u}),f_=(_,l,u,g,b,C=0)=>Object.assign(hD(_,l,b),cx(u,g,C)),I8=(_,l,u,g)=>({u_matrix:_,u_world:u,u_emissive_strength:l,u_ground_shadow_factor:g}),T8=(_,l,u,g,b,C,S=0)=>Object.assign(f_(_,l,u,g,C,S),{u_world:b}),E8=(_,l)=>({u_matrix:_,u_ground_shadow_factor:l}),Nw=(_,l,u,g,b)=>({u_matrix:_,u_camera_pos:[l[0],l[1],l[2]],u_depth_bias:u,u_height_scale:g,u_reset_depth:b}),A8=(_,l,u,g,b,C,S)=>({u_matrix:_,u_normal_matrix:l,u_opacity:u,u_faux_facade_ao_intensity:g,u_camera_pos:b,u_tile_to_meter:C,u_facade_emissive_chance:S}),D8=_=>({u_matrix:_}),mD=_=>({u_matrix:_}),fD=(_,l,u,g,b,C,S,E)=>{let k=r.al/C.tileSize;return{u_matrix:_,u_inv_rot_matrix:l,u_camera_to_center_distance:u.getCameraToCenterDistance(E),u_extrude_scale:[u.pixelsToGLUnits[0]/k,u.pixelsToGLUnits[1]/k],u_zoom_transition:g,u_tile_id:S,u_merc_center:b}},gD=(_,l,u=1)=>({u_matrix:_,u_color:l,u_overlay:0,u_overlay_scale:u}),by=r.bC(),$L=(_,l,u,g,b,C,S)=>{let E=_.transform,k=E.projection.name==="globe",F=k?r.dO(E.zoom,l.canonical)*E._pixelsPerMercatorPixel:r.ay(u,1,C),z={u_matrix:l.projMatrix,u_extrude_scale:F,u_intensity:S,u_inv_rot_matrix:by,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(k){z.u_inv_rot_matrix=g,z.u_merc_center=b,z.u_tile_id=[l.canonical.x,l.canonical.y,1<({u_matrix:_,u_normalize_matrix:l,u_globe_matrix:u,u_merc_matrix:g,u_grid_matrix:b,u_tl_parent:C,u_scale_parent:F,u_fade_t:z.mix,u_opacity:z.opacity*q.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:q.paint.get("raster-brightness-min"),u_brightness_high:q.paint.get("raster-brightness-max"),u_saturation_factor:r.dQ(q.paint.get("raster-saturation")),u_contrast_factor:r.dP(q.paint.get("raster-contrast")),u_spin_weights:g_(q.paint.get("raster-hue-rotate")),u_perspective_transform:U,u_raster_elevation:Y,u_zoom_transition:S,u_merc_center:E,u_cutoff_params:k,u_colorization_mix:_D(r.dR,J,ne),u_colorization_offset:yD(r.dR,ae,ne),u_color_ramp:X,u_texture_offset:[_e/(ce+2*_e),ce/(ce+2*_e)],u_texture_res:[ce+2*_e,ce+2*_e],u_emissive_strength:xe});function g_(_){_*=Math.PI/180;let l=Math.sin(_),u=Math.cos(_);return[(2*u+1)/3,(-Math.sqrt(3)*l-u+1)/3,(Math.sqrt(3)*l-u+1)/3]}let __=.05,Cf=(_,l,u,g,b,C,S,E,k,F,z,q)=>({u_matrix:_,u_normalize_matrix:l,u_globe_matrix:u,u_merc_matrix:g,u_grid_matrix:b,u_tl_parent:C,u_scale_parent:F,u_fade_t:z.mix,u_opacity:z.opacity,u_image0:0,u_image1:1,u_raster_elevation:q,u_zoom_transition:S,u_merc_center:E,u_cutoff_params:k}),vD=(_,l,u,g,b,C,S,E,k,F)=>({u_particle_texture:_,u_particle_texture_side_len:l,u_tile_offset:u,u_velocity:g,u_color_ramp:C,u_velocity_res:b,u_max_speed:S,u_uv_offset:E,u_data_scale:[255*k[0],255*k[1]],u_data_offset:F,u_particle_pos_scale:1.1,u_particle_pos_offset:[__,__]}),zw=(_,l,u,g,b,C,S,E,k,F)=>({u_particle_texture:_,u_particle_texture_side_len:l,u_velocity:u,u_velocity_res:g,u_max_speed:b,u_speed_factor:C,u_reset_rate:S,u_rand_seed:Math.random(),u_uv_offset:E,u_data_scale:[255*k[0],255*k[1]],u_data_offset:F,u_particle_pos_scale:1.1,u_particle_pos_offset:[__,__]}),bD=r.bC(),xD=(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne,ce,_e,xe,Pe,ke,Ne)=>{let Me=b.transform,De={u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:Me.getCameraToCenterDistance(ce),u_rotate_symbol:+u,u_aspect_ratio:Me.width/Me.height,u_fade_change:b.options.fadeDuration?b.symbolFadeChange:1,u_matrix:C,u_label_plane_matrix:S,u_coord_matrix:E,u_is_text:+F,u_elevation_from_sea:k?1:0,u_pitch_with_map:+g,u_texsize:z,u_texsize_icon:q,u_texture:0,u_texture_icon:1,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:bD,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:bD,u_up_vector:[0,-1,0],u_color_adj_mat:Pe,u_icon_transition:ke||0,u_gamma_scale:g?b.transform.getCameraToCenterDistance(ce)*Math.cos(b.terrain?0:b.transform._pitch):1,u_device_pixel_ratio:r.o.devicePixelRatio,u_is_halo:1,u_scale_factor:Ne||1,u_ground_shadow_factor:_e,u_inv_matrix:r.bl(r.bC(),S),u_normal_scale:xe,u_lutTexture:ma.LUT};return ce.name==="globe"&&(De.u_tile_id=[Y.canonical.x,Y.canonical.y,1<({u_matrix:_,u_emissive_strength:l,u_opacity:u,u_color:g}),Uw=(_,l,u,g,b,C,S,E,k)=>Object.assign((function(F,z,q,U,Y,X){let{width:J,height:ae}=U.imageManager.getPixelSize(z),ne=Math.pow(2,X.tileID.overscaledZ),ce=X.tileSize*Math.pow(2,U.transform.tileZoom)/ne,_e=ce*(X.tileID.canonical.x+X.tileID.wrap*ne),xe=ce*X.tileID.canonical.y;return{u_image:0,u_pattern_tl:q.tl,u_pattern_br:q.br,u_texsize:[J,ae],u_pattern_size:q.displaySize,u_pattern_units_to_pixels:Y?[U.transform.width,-1*U.transform.height]:[1/r.ay(X,1,U.transform.tileZoom),1/r.ay(X,1,U.transform.tileZoom)],u_pixel_coord_upper:[_e>>16,xe>>16],u_pixel_coord_lower:[65535&_e,65535&xe]}})(0,C,S,g,E,k),{u_matrix:_,u_emissive_strength:l,u_opacity:u}),CD=new Float32Array(r.bA([])),Hw=(_,l,u,g,b,C,S,E,k,F,z,q,U,Y=[0,0,0],X)=>{let J=b.style.light,ae=J.properties.get("position"),ne=[-ae.x,-ae.y,ae.z],ce=r.dL();J.properties.get("anchor")==="viewport"&&(r.dM(ce,-b.transform.angle),r.dN(ne,ne,ce));let _e=z.alphaMode==="MASK",xe=J.properties.get("color").toNonPremultipliedRenderColor(null),Pe=U.paint.get("model-ambient-occlusion-intensity"),ke=U.paint.get("model-color").constantOr(r.ao.white).toNonPremultipliedRenderColor(null);return ke.a=U.paint.get("model-color-mix-intensity").constantOr(0),{u_matrix:_,u_lighting_matrix:l,u_normal_matrix:u,u_node_matrix:g||CD,u_lightpos:ne,u_lightintensity:J.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_camera_pos:Y,u_opacity:C,u_baseTextureIsAlpha:0,u_alphaMask:+_e,u_alphaCutoff:z.alphaCutoff,u_baseColorFactor:S.toNonPremultipliedRenderColor(null).toArray01(),u_emissiveFactor:E.toNonPremultipliedRenderColor(null).toArray01(),u_metallicFactor:k,u_roughnessFactor:F,u_baseColorTexture:ma.BaseColor,u_metallicRoughnessTexture:ma.MetallicRoughness,u_normalTexture:ma.Normal,u_occlusionTexture:ma.Occlusion,u_emissionTexture:ma.Emission,u_lutTexture:ma.LUT,u_color_mix:ke.toArray01(),u_aoIntensity:Pe,u_emissive_strength:q,u_occlusionTextureTransform:X||[0,0,0,0]}},xy=(_,l=CD,u=CD)=>({u_matrix:_,u_instance:l,u_node_matrix:u}),k8={fillExtrusion:_=>({u_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_vertical_gradient:new r.ci(_),u_opacity:new r.ci(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_ao:new r.cj(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_up_dir:new r.ch(_),u_height_lift:new r.ci(_),u_flood_light_color:new r.ch(_),u_vertical_scale:new r.ci(_),u_flood_light_intensity:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),fillExtrusionDepth:_=>({u_matrix:new r.ck(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_vertical_scale:new r.ci(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_)}),fillExtrusionPattern:_=>({u_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_vertical_gradient:new r.ci(_),u_height_factor:new r.ci(_),u_edge_radius:new r.ci(_),u_width_scale:new r.ci(_),u_ao:new r.cj(_),u_height_type:new r.cg(_),u_base_type:new r.cg(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_up_dir:new r.ch(_),u_height_lift:new r.ci(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_opacity:new r.ci(_),u_pattern_transition:new r.ci(_)}),fillExtrusionGroundEffect:_=>({u_matrix:new r.ck(_),u_opacity:new r.ci(_),u_ao_pass:new r.ci(_),u_meter_to_tile:new r.ci(_),u_ao:new r.cj(_),u_flood_light_intensity:new r.ci(_),u_flood_light_color:new r.ch(_),u_attenuation:new r.ci(_),u_edge_radius:new r.ci(_),u_fb:new r.cg(_),u_fb_size:new r.ci(_),u_dynamic_offset:new r.ci(_)}),fill:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),fillPattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_pattern_transition:new r.ci(_)}),fillOutline:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_world:new r.cj(_),u_ground_shadow_factor:new r.ch(_)}),fillOutlinePattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_world:new r.cj(_),u_image:new r.cg(_),u_texsize:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_tile_units_to_pixels:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_pattern_transition:new r.ci(_)}),building:_=>({u_matrix:new r.ck(_),u_normal_matrix:new r.ck(_),u_opacity:new r.ci(_),u_faux_facade_ao_intensity:new r.ci(_),u_camera_pos:new r.ch(_),u_tile_to_meter:new r.ci(_),u_facade_emissive_chance:new r.ci(_)}),buildingBloom:_=>({u_matrix:new r.ck(_)}),buildingDepth:_=>({u_matrix:new r.ck(_)}),elevatedStructuresDepth:_=>({u_matrix:new r.ck(_),u_depth_bias:new r.ci(_)}),elevatedStructures:_=>({u_matrix:new r.ck(_),u_ground_shadow_factor:new r.ch(_)}),elevatedStructuresDepthReconstruct:_=>({u_matrix:new r.ck(_),u_camera_pos:new r.ch(_),u_depth_bias:new r.ci(_),u_height_scale:new r.ci(_),u_reset_depth:new r.ci(_)}),circle:r.dV,collisionBox:_=>({u_matrix:new r.ck(_),u_inv_rot_matrix:new r.ck(_),u_camera_to_center_distance:new r.ci(_),u_extrude_scale:new r.cj(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_tile_id:new r.ch(_)}),collisionCircle:_=>({u_matrix:new r.ck(_),u_inv_matrix:new r.ck(_),u_camera_to_center_distance:new r.ci(_),u_viewport_size:new r.cj(_)}),debug:_=>({u_color:new r.dx(_),u_matrix:new r.ck(_),u_overlay:new r.cg(_),u_overlay_scale:new r.ci(_)}),clippingMask:_=>({u_matrix:new r.ck(_)}),heatmap:_=>({u_extrude_scale:new r.ci(_),u_intensity:new r.ci(_),u_matrix:new r.ck(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_up_dir:new r.ch(_)}),heatmapTexture:_=>({u_image:new r.cg(_),u_color_ramp:new r.cg(_),u_opacity:new r.ci(_)}),hillshade:_=>({u_matrix:new r.ck(_),u_image:new r.cg(_),u_latrange:new r.cj(_),u_light:new r.cj(_),u_shadow:new r.dx(_),u_highlight:new r.dx(_),u_emissive_strength:new r.ci(_),u_accent:new r.dx(_)}),hillshadePrepare:_=>({u_matrix:new r.ck(_),u_image:new r.cg(_),u_dimension:new r.cj(_),u_zoom:new r.ci(_)}),line:r.dU,linePattern:r.dT,raster:_=>({u_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_grid_matrix:new r.dy(_),u_tl_parent:new r.cj(_),u_scale_parent:new r.ci(_),u_fade_t:new r.ci(_),u_opacity:new r.ci(_),u_image0:new r.cg(_),u_image1:new r.cg(_),u_brightness_low:new r.ci(_),u_brightness_high:new r.ci(_),u_saturation_factor:new r.ci(_),u_contrast_factor:new r.ci(_),u_spin_weights:new r.ch(_),u_perspective_transform:new r.cj(_),u_raster_elevation:new r.ci(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_cutoff_params:new r.d2(_),u_colorization_mix:new r.d2(_),u_colorization_offset:new r.ci(_),u_color_ramp:new r.cg(_),u_texture_offset:new r.cj(_),u_texture_res:new r.cj(_),u_emissive_strength:new r.ci(_)}),rasterParticle:_=>({u_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_grid_matrix:new r.dy(_),u_tl_parent:new r.cj(_),u_scale_parent:new r.ci(_),u_fade_t:new r.ci(_),u_opacity:new r.ci(_),u_image0:new r.cg(_),u_image1:new r.cg(_),u_raster_elevation:new r.ci(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_cutoff_params:new r.d2(_)}),rasterParticleTexture:_=>({u_texture:new r.cg(_),u_opacity:new r.ci(_)}),rasterParticleDraw:_=>({u_particle_texture:new r.cg(_),u_particle_texture_side_len:new r.ci(_),u_tile_offset:new r.cj(_),u_velocity:new r.cg(_),u_color_ramp:new r.cg(_),u_velocity_res:new r.cj(_),u_max_speed:new r.ci(_),u_uv_offset:new r.cj(_),u_data_scale:new r.cj(_),u_data_offset:new r.ci(_),u_particle_pos_scale:new r.ci(_),u_particle_pos_offset:new r.cj(_)}),rasterParticleUpdate:_=>({u_particle_texture:new r.cg(_),u_particle_texture_side_len:new r.ci(_),u_velocity:new r.cg(_),u_velocity_res:new r.cj(_),u_max_speed:new r.ci(_),u_speed_factor:new r.ci(_),u_reset_rate:new r.ci(_),u_rand_seed:new r.ci(_),u_uv_offset:new r.cj(_),u_data_scale:new r.cj(_),u_data_offset:new r.ci(_),u_particle_pos_scale:new r.ci(_),u_particle_pos_offset:new r.cj(_)}),symbol:_=>({u_is_size_zoom_constant:new r.cg(_),u_is_size_feature_constant:new r.cg(_),u_size_t:new r.ci(_),u_size:new r.ci(_),u_camera_to_center_distance:new r.ci(_),u_rotate_symbol:new r.cg(_),u_aspect_ratio:new r.ci(_),u_fade_change:new r.ci(_),u_matrix:new r.ck(_),u_label_plane_matrix:new r.ck(_),u_coord_matrix:new r.ck(_),u_is_text:new r.cg(_),u_elevation_from_sea:new r.cg(_),u_pitch_with_map:new r.cg(_),u_texsize:new r.cj(_),u_texsize_icon:new r.cj(_),u_texture:new r.cg(_),u_texture_icon:new r.cg(_),u_gamma_scale:new r.ci(_),u_device_pixel_ratio:new r.ci(_),u_tile_id:new r.ch(_),u_zoom_transition:new r.ci(_),u_inv_rot_matrix:new r.ck(_),u_merc_center:new r.cj(_),u_camera_forward:new r.ch(_),u_tile_matrix:new r.ck(_),u_up_vector:new r.ch(_),u_ecef_origin:new r.ch(_),u_is_halo:new r.cg(_),u_icon_transition:new r.ci(_),u_color_adj_mat:new r.ck(_),u_scale_factor:new r.ci(_),u_ground_shadow_factor:new r.ch(_),u_inv_matrix:new r.ck(_),u_normal_scale:new r.ci(_),u_lutTexture:new r.cg(_)}),background:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_opacity:new r.ci(_),u_color:new r.dx(_)}),backgroundPattern:_=>({u_matrix:new r.ck(_),u_emissive_strength:new r.ci(_),u_opacity:new r.ci(_),u_image:new r.cg(_),u_pattern_tl:new r.cj(_),u_pattern_br:new r.cj(_),u_texsize:new r.cj(_),u_pattern_size:new r.cj(_),u_pixel_coord_upper:new r.cj(_),u_pixel_coord_lower:new r.cj(_),u_pattern_units_to_pixels:new r.cj(_)}),terrainRaster:_=>({u_matrix:new r.ck(_),u_image0:new r.cg(_),u_skirt_height:new r.ci(_),u_ground_shadow_factor:new r.ch(_)}),skybox:_=>({u_matrix:new r.ck(_),u_sun_direction:new r.ch(_),u_cubemap:new r.cg(_),u_opacity:new r.ci(_),u_temporal_offset:new r.ci(_)}),skyboxGradient:_=>({u_matrix:new r.ck(_),u_color_ramp:new r.cg(_),u_center_direction:new r.ch(_),u_radius:new r.ci(_),u_opacity:new r.ci(_),u_temporal_offset:new r.ci(_)}),skyboxCapture:_=>({u_matrix_3f:new r.dy(_),u_sun_direction:new r.ch(_),u_sun_intensity:new r.ci(_),u_color_tint_r:new r.d2(_),u_color_tint_m:new r.d2(_),u_luminance:new r.ci(_)}),globeRaster:_=>({u_proj_matrix:new r.ck(_),u_globe_matrix:new r.ck(_),u_normalize_matrix:new r.ck(_),u_merc_matrix:new r.ck(_),u_zoom_transition:new r.ci(_),u_merc_center:new r.cj(_),u_image0:new r.cg(_),u_grid_matrix:new r.dy(_),u_skirt_height:new r.ci(_),u_far_z_cutoff:new r.ci(_),u_frustum_tl:new r.ch(_),u_frustum_tr:new r.ch(_),u_frustum_br:new r.ch(_),u_frustum_bl:new r.ch(_),u_globe_pos:new r.ch(_),u_globe_radius:new r.ci(_),u_viewport:new r.cj(_)}),globeAtmosphere:_=>({u_frustum_tl:new r.ch(_),u_frustum_tr:new r.ch(_),u_frustum_br:new r.ch(_),u_frustum_bl:new r.ch(_),u_horizon:new r.ci(_),u_transition:new r.ci(_),u_fadeout_range:new r.ci(_),u_atmosphere_fog_color:new r.d2(_),u_high_color:new r.d2(_),u_space_color:new r.d2(_),u_temporal_offset:new r.ci(_),u_horizon_angle:new r.ci(_)}),model:_=>({u_matrix:new r.ck(_),u_lighting_matrix:new r.ck(_),u_normal_matrix:new r.ck(_),u_node_matrix:new r.ck(_),u_lightpos:new r.ch(_),u_lightintensity:new r.ci(_),u_lightcolor:new r.ch(_),u_camera_pos:new r.ch(_),u_opacity:new r.ci(_),u_baseColorFactor:new r.d2(_),u_emissiveFactor:new r.d2(_),u_metallicFactor:new r.ci(_),u_roughnessFactor:new r.ci(_),u_baseTextureIsAlpha:new r.cg(_),u_alphaMask:new r.cg(_),u_alphaCutoff:new r.ci(_),u_baseColorTexture:new r.cg(_),u_metallicRoughnessTexture:new r.cg(_),u_normalTexture:new r.cg(_),u_occlusionTexture:new r.cg(_),u_emissionTexture:new r.cg(_),u_lutTexture:new r.cg(_),u_color_mix:new r.d2(_),u_aoIntensity:new r.ci(_),u_emissive_strength:new r.ci(_),u_occlusionTextureTransform:new r.d2(_)}),modelDepth:_=>({u_matrix:new r.ck(_),u_instance:new r.ck(_),u_node_matrix:new r.ck(_)}),groundShadow:_=>({u_matrix:new r.ck(_),u_ground_shadow_factor:new r.ch(_)}),stars:_=>({u_matrix:new r.ck(_),u_up:new r.ch(_),u_right:new r.ch(_),u_intensity_multiplier:new r.ci(_)}),snowParticle:_=>({u_modelview:new r.ck(_),u_projection:new r.ck(_),u_time:new r.ci(_),u_cam_pos:new r.ch(_),u_velocityConeAperture:new r.ci(_),u_velocity:new r.ci(_),u_horizontalOscillationRadius:new r.ci(_),u_horizontalOscillationRate:new r.ci(_),u_boxSize:new r.ci(_),u_billboardSize:new r.ci(_),u_simpleShapeParameters:new r.cj(_),u_screenSize:new r.cj(_),u_thinningCenterPos:new r.cj(_),u_thinningShape:new r.ch(_),u_thinningAffectedRatio:new r.ci(_),u_thinningParticleOffset:new r.ci(_),u_particleColor:new r.d2(_),u_direction:new r.ch(_)}),rainParticle:_=>({u_modelview:new r.ck(_),u_projection:new r.ck(_),u_time:new r.ci(_),u_cam_pos:new r.ch(_),u_texScreen:new r.cg(_),u_velocityConeAperture:new r.ci(_),u_velocity:new r.ci(_),u_boxSize:new r.ci(_),u_rainDropletSize:new r.cj(_),u_distortionStrength:new r.ci(_),u_rainDirection:new r.ch(_),u_color:new r.d2(_),u_screenSize:new r.cj(_),u_thinningCenterPos:new r.cj(_),u_thinningShape:new r.ch(_),u_thinningAffectedRatio:new r.ci(_),u_thinningParticleOffset:new r.ci(_),u_shapeDirectionalPower:new r.ci(_),u_shapeNormalPower:new r.ci(_),u_mode:new r.ci(_)}),vignette:_=>({u_vignetteShape:new r.ch(_),u_vignetteColor:new r.d2(_)}),occlusion:_=>({u_matrix:new r.ck(_),u_anchorPos:new r.ch(_),u_screenSizePx:new r.cj(_),u_occluderSizePx:new r.cj(_),u_color:new r.d2(_)})},qL=(()=>{class _{constructor(u,g,b,C){this.id=_.uniqueIdxCounter,_.uniqueIdxCounter++,this.context=u;let S=u.gl;this.buffer=S.createBuffer(),this.dynamicDraw=!!b,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),S.bufferData(S.ELEMENT_ARRAY_BUFFER,g.arrayBuffer,this.dynamicDraw?S.DYNAMIC_DRAW:S.STATIC_DRAW),this.dynamicDraw||C||g.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){this.id=_.uniqueIdxCounter,_.uniqueIdxCounter++;let g=this.context.gl;this.context.unbindVAO(),this.bind(),g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}return _.uniqueIdxCounter=0,_})(),WL={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class M8{constructor(l,u,g,b,C,S){this.length=u.length,this.attributes=g,this.itemSize=u.bytesPerElement,this.dynamicDraw=b,this.instanceCount=S,this.context=l;let E=l.gl;this.buffer=E.createBuffer(),l.bindVertexBuffer.set(this.buffer),E.bufferData(E.ARRAY_BUFFER,u.arrayBuffer,this.dynamicDraw?E.DYNAMIC_DRAW:E.STATIC_DRAW),this.dynamicDraw||C||u.destroy()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){let u=this.context.gl;this.bind(),u.bufferSubData(u.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,u){for(let g=0;g0&&l.vertexAttribDivisor(C,g)}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class jw{constructor(l,u,g,b,C){this.context=l,this.width=u,this.height=g;let S=this.framebuffer=l.gl.createFramebuffer();b&&(this.colorAttachment=new UL(l,S)),C&&(this.depthAttachmentType=C,this.depthAttachment=C==="renderbuffer"?new HL(l,S):new C8(l,S))}destroy(){let l=this.context.gl;if(this.colorAttachment){let u=this.colorAttachment.get();u&&l.deleteTexture(u)}if(this.depthAttachment&&this.depthAttachmentType)if(this.depthAttachmentType==="renderbuffer"){let u=this.depthAttachment.get();u&&l.deleteRenderbuffer(u)}else{let u=this.depthAttachment.get();u&&l.deleteTexture(u)}l.deleteFramebuffer(this.framebuffer)}}class wD{constructor(l,u){this.gl=l,this.clearColor=new OL(this),this.clearDepth=new tD(this),this.clearStencil=new g8(this),this.colorMask=new _8(this),this.depthMask=new y8(this),this.stencilMask=new v8(this),this.stencilFunc=new PL(this),this.stencilOp=new b8(this),this.stencilTest=new Iw(this),this.depthRange=new x8(this),this.depthTest=new LL(this),this.depthFunc=new iD(this),this.blend=new Tw(this),this.blendFunc=new nD(this),this.blendColor=new p_(this),this.blendEquation=new gy(this),this.cullFace=new Ew(this),this.cullFaceSide=new Aw(this),this.frontFace=new _y(this),this.program=new FL(this),this.activeTexture=new oD(this),this.viewport=new NL(this),this.bindFramebuffer=new yy(this),this.bindRenderbuffer=new Dw(this),this.bindTexture=new kw(this),this.bindVertexBuffer=new rD(this),this.bindElementBuffer=new Mw(this),this.bindVertexArrayOES=new ax(this),this.pixelStoreUnpack=new BL(this),this.pixelStoreUnpackPremultiplyAlpha=new zL(this),this.pixelStoreUnpackFlipY=new VL(this),this.options=u?Object.assign({},u):{},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=u&&!!u.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,u,g){return new qL(this,l,u,g)}createVertexBuffer(l,u,g,b,C){return new M8(this,l,u,g,b,C)}createRenderbuffer(l,u,g){let b=this.gl,C=b.createRenderbuffer();return this.bindRenderbuffer.set(C),b.renderbufferStorage(b.RENDERBUFFER,l,u,g),this.bindRenderbuffer.set(null),C}createFramebuffer(l,u,g,b){return new jw(this,l,u,g,b)}clear({color:l,depth:u,stencil:g,colorMask:b}){let C=this.gl,S=0;l&&(S|=C.COLOR_BUFFER_BIT,this.clearColor.set(l.toNonPremultipliedRenderColor(null)),this.colorMask.set(b||[!0,!0,!0,!0])),u!==void 0&&(S|=C.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(u),this.depthMask.set(!0)),g!==void 0&&(S|=C.STENCIL_BUFFER_BIT,this.clearStencil.set(g),this.stencilMask.set(255)),C.clear(S)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){r.by(l.blendFunction,so.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 mh;function ux(_,l,u,g,b,C,S){let E=_.context,k=E.gl,F=_.transform,z=[r.aF(F.center.lng),r.aJ(F.center.lat)],q=u.layout.get("symbol-placement"),U=u.layout.get("text-variable-anchor"),Y=u.layout.get("icon-rotation-alignment")==="map",X=u.layout.get("text-rotation-alignment")==="map",J=q!=="point",ae=[],ne=0,ce=0;for(let De=0;De0){let tn=r.bC(),Yi=ri;r.cO(tn,nt.placementInvProjMatrix,F.glCoordMatrix),r.cO(tn,tn,nt.placementViewportMatrix),ae.push({circleArray:an,circleOffset:ce,transform:Yi,invTransform:tn,projection:nt.getProjection()}),ne+=an.length/4,ce=ne}if(!ei)continue;_.terrain&&_.terrain.setupElevationDraw(bt,Ai);let Xi=Kt?[Be.canonical.x,Be.canonical.y,1<=0&&(Y[_e.associatedIconIndex]={x:bt,y:nt,z:kt,angle:Ke})}else En(ke,q)}if(F){U.clear();let ce=_.icon.placedSymbolArray;for(let _e=0;_e{let co=[0,0,0];if(bs){let Rn=_.style.directionalLight,Ir=_.style.ambientLight;Rn&&Ir&&(co=Ap(_.style,Rn,Ir))}return co},Qo=bs=>{De.depthOcclusionForSymbolsAndCircles&&(u.hasOcclusionOpacityProperties||_.terrain)&&(bs.push("DEPTH_D24"),bs.push("DEPTH_OCCLUSION"))},yr=bs=>{u.lut&&!ke&&(u.lut.texture||(u.lut.texture=new r.dY(_.context,u.lut.image,[u.lut.image.height,u.lut.image.height,u.lut.image.height],Ne.gl.RGBA8)),Ne.activeTexture.set(Ne.gl.TEXTURE0+ma.LUT),u.lut.texture&&u.lut.texture.bind(Ne.gl.LINEAR,Ne.gl.CLAMP_TO_EDGE),bs.push("APPLY_LUT_ON_GPU"))},hs=()=>{let bs=Be&&u.layout.get("symbol-placement")!=="point",co=[];Qo(co),yr(co);let Rn=bs||no,Ir=ei.elevationType==="road",zs=_.shadowRenderer,ws=Ir&&nt&&!!zs&&zs.enabled,fa=$n(ws),Al=Ir&&nt&&!_.terrain?vt:pi,du=u.paint.get("icon-image-cross-fade");_.terrainRenderModeElevated()&&nt&&co.push("PITCH_WITH_MAP_TERRAIN"),an&&(co.push("PROJECTION_GLOBE_VIEW"),Rn&&co.push("PROJECTED_POS_ON_VIEWPORT")),du>0&&ei.hasAnySecondaryIcon&&co.push("ICON_TRANSITION"),!ei.icon.zOffsetVertexBuffer||Ir&&_.terrain||co.push("Z_OFFSET"),ne===0&&ce===0&&_e===0&&xe===1||co.push("COLOR_ADJUSTMENT"),ei.sdfIcons&&co.push("RENDER_SDF"),ws&&co.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),Ir&&nt&&!_.terrain&&ei.icon.orientationVertexBuffer&&co.push("ELEVATED_ROADS");let uu=ei.icon.programConfigurations.get(u.id),Td=_.getOrCreateProgram("symbol",{config:uu,defines:co}),Ed=ri.imageAtlasTexture?ri.imageAtlasTexture.size:[0,0],Wc=ei.iconSizeData,qu=r.bK(Wc,De.zoom),Rp=nt||!De.isOrthographic,$s=Ip(tn,ri.tileID.canonical,nt,Be,De,ei.getProjection(),Yi),Qs=cw(tn,ri.tileID.canonical,nt,Be,De,ei.getProjection(),Yi),Ss=_.translatePosMatrix(Qs,ri,E,F,!0),za=_.translatePosMatrix(tn,ri,E,F),ll=Rn?wf:$s,da=Be&&!nt&&!bs,tc=di;!Ct&&!De.mercatorFromTransition||Be||(tc=SD(De));let yh=an?tc:di,nm=u.getColorAdjustmentMatrix(ne,ce,_e,xe),Op=xD(Wc.kind,qu,da,nt,_,za,ll,Ss,Pe,!1,Ed,[0,0],0,Ai,Xi,Ke,lo,yh,ei.getProjection(),fa,Sr,nm,du,null),Rf=ri.imageAtlasTexture?ri.imageAtlasTexture:null,Of=u.layout.get("icon-size").constantOr(0)!==1||ei.iconsNeedLinear,vh=ei.sdfIcons||_.options.rotating||_.options.zooming||Of||Rp?Me.LINEAR:Me.NEAREST,Oy=ei.sdfIcons&&u.paint.get("icon-halo-width").constantOr(1)!==0,om=_.terrain&&nt&&bs?r.bl(r.bC(),$s):wf;if(bs&&ei.icon){let bh=De.elevation,rm=bh?bh.getAtTileOffsetFunc(Ai,De.center.lat,De.worldSize,ei.getProjection()):null,pS=Zb(tn,ri.tileID.canonical,nt,Be,De,ei.getProjection(),Yi);jA(ei,tn,_,!1,pS,Qs,nt,J,rm,Ai)}return{program:Td,buffers:ei.icon,uniformValues:Op,atlasTexture:Rf,atlasTextureIcon:null,atlasInterpolation:vh,atlasInterpolationIcon:null,isSDF:ei.sdfIcons,hasHalo:Oy,depthMode:Al,tile:ri,renderWithShadows:ws,labelPlaneMatrixInv:om}},oo=()=>{let bs=bt&&u.layout.get("symbol-placement")!=="point",co=[],Rn=bs||Ot||no,Ir=ei.elevationType==="road",zs=_.shadowRenderer,ws=Ir&&kt&&!!zs&&zs.enabled,fa=$n(ws),Al=Ir&&kt&&!_.terrain?vt:pi;_.terrainRenderModeElevated()&&kt&&co.push("PITCH_WITH_MAP_TERRAIN"),an&&(co.push("PROJECTION_GLOBE_VIEW"),Rn&&co.push("PROJECTED_POS_ON_VIEWPORT")),!ei.text.zOffsetVertexBuffer||Ir&&_.terrain||co.push("Z_OFFSET"),ei.iconsInText&&co.push("RENDER_TEXT_AND_SYMBOL"),co.push("RENDER_SDF"),ws&&co.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),Ir&&kt&&!_.terrain&&ei.text.orientationVertexBuffer&&co.push("ELEVATED_ROADS"),Qo(co);let du=ei.text.programConfigurations.get(u.id),uu=_.getOrCreateProgram("symbol",{config:du,defines:co}),Td,Ed=[0,0],Wc=null,qu=ei.textSizeData;ei.iconsInText&&(Ed=ri.imageAtlasTexture?ri.imageAtlasTexture.size:[0,0],Wc=ri.imageAtlasTexture?ri.imageAtlasTexture:null,Td=kt||!De.isOrthographic||_.options.rotating||_.options.zooming||qu.kind==="composite"||qu.kind==="camera"?Me.LINEAR:Me.NEAREST);let Rp=ri.glyphAtlasTexture?ri.glyphAtlasTexture.size:[0,0],$s=u.layout.get("text-size-scale-range"),Qs=r.aA(_.scaleFactor,$s[0],$s[1]),Ss=r.bK(qu,De.zoom,Qs),za=Ip(tn,ri.tileID.canonical,kt,bt,De,ei.getProjection(),Yi),ll=cw(tn,ri.tileID.canonical,kt,bt,De,ei.getProjection(),Yi),da=_.translatePosMatrix(ll,ri,k,z,!0),tc=_.translatePosMatrix(tn,ri,k,z),yh=Rn?wf:za,nm=bt&&!kt&&!bs,Op=di;!Ct&&!De.mercatorFromTransition||bt||(Op=SD(De));let Rf=xD(qu.kind,Ss,nm,kt,_,tc,yh,da,Pe,!0,Rp,Ed,0,Ai,Xi,Ke,lo,an?Op:di,ei.getProjection(),fa,Sr,null,null,Qs),Of=ri.glyphAtlasTexture?ri.glyphAtlasTexture:null,vh=Me.LINEAR,Oy=u.paint.get("text-halo-width").constantOr(1)!==0,om=_.terrain&&kt&&bs?r.bl(r.bC(),za):wf;if(bs&&ei.text){let bh=De.elevation,rm=bh?bh.getAtTileOffsetFunc(Ai,De.center.lat,De.worldSize,ei.getProjection()):null,pS=Zb(tn,ri.tileID.canonical,kt,bt,De,ei.getProjection(),Yi);jA(ei,tn,_,!0,pS,ll,kt,ae,rm,Ai)}return{program:uu,buffers:ei.text,uniformValues:Rf,atlasTexture:Of,atlasTextureIcon:Wc,atlasInterpolation:vh,atlasInterpolationIcon:Td,isSDF:!0,hasHalo:Oy,depthMode:Al,tile:ri,renderWithShadows:ws,labelPlaneMatrixInv:om}},ar=ei.icon.segments.get().length,ir=ei.text.segments.get().length,pr=ar&&!S.onlyText?hs():null,vs=ir&&!S.onlyIcons?oo():null,Ys=u.paint.get("icon-opacity").constantOr(1),al=u.paint.get("text-opacity").constantOr(1);if(ft&&ei.canOverlap){At=!0;let bs=Ys&&!S.onlyText?ei.icon.segments.get():[],co=al&&!S.onlyIcons?ei.text.segments.get():[];for(let Rn of bs)Kt.push({segments:new r.bg([Rn]),sortKey:Rn.sortKey,state:pr});for(let Rn of co)Kt.push({segments:new r.bg([Rn]),sortKey:Rn.sortKey,state:vs})}else S.onlyText||Kt.push({segments:Ys?ei.icon.segments:new r.bg([]),sortKey:0,state:pr}),S.onlyIcons||Kt.push({segments:al?ei.text.segments:new r.bg([]),sortKey:0,state:vs})}At&&Kt.sort((Ai,ri)=>Ai.sortKey-ri.sortKey);for(let Ai of Kt){let ri=Ai.state;if(ri)if(_.terrain?_.terrain.setupElevationDraw(ri.tile,ri.program,{useDepthForOcclusion:De.depthOcclusionForSymbolsAndCircles,labelPlaneMatrixInv:ri.labelPlaneMatrixInv}):_.setupDepthForOcclusion(De.depthOcclusionForSymbolsAndCircles,ri.program),Ne.activeTexture.set(Me.TEXTURE0),ri.atlasTexture&&ri.atlasTexture.bind(ri.atlasInterpolation,Me.CLAMP_TO_EDGE,!0),ri.atlasTextureIcon&&(Ne.activeTexture.set(Me.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Me.CLAMP_TO_EDGE,!0)),ri.renderWithShadows&&_.shadowRenderer.setupShadows(ri.tile.tileID.toUnwrapped(),ri.program,"vector-tile"),_.uploadCommonLightUniforms(_.context,ri.program),ri.hasHalo){let ei=ri.uniformValues;ei.u_is_halo=1,qw(ri.buffers,Ai.segments,u,_,ri.program,ri.depthMode,b,C,ei,2),ei.u_is_halo=0}else{if(ri.isSDF){let ei=ri.uniformValues;ri.hasHalo&&(ei.u_is_halo=1,qw(ri.buffers,Ai.segments,u,_,ri.program,ri.depthMode,b,C,ei,1)),ei.u_is_halo=0}qw(ri.buffers,Ai.segments,u,_,ri.program,ri.depthMode,b,C,ri.uniformValues,1)}}}function qw(_,l,u,g,b,C,S,E,k,F){let z=[_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer,_.iconTransitioningVertexBuffer,_.globeExtVertexBuffer,_.zOffsetVertexBuffer,_.orientationVertexBuffer];b.draw(g,g.context.gl.TRIANGLES,C,S,E,Ln.disabled,k,u.id,_.layoutVertexBuffer,_.indexBuffer,l,u.paint,g.transform.zoom,_.programConfigurations.get(u.id),z,F)}function KL(_,l){let u=1<<_.canonical.z,g=(l.x*u-_.canonical.x-_.wrap*u)*r.al,b=(l.y*u-_.canonical.y)*r.al,C=r.e5(l.z,l.y);return r.d4(g,b,C)}function y_(_,l,u,g,b){if(!u.layout||u.layout.get("fill-elevation-reference")==="none")return;let C=_.context.gl,S=new Vi(_.context.gl.LEQUAL,Vi.ReadWrite,_.depthRangeFor3D),E=new Vi(_.context.gl.GREATER,Vi.ReadWrite,_.depthRangeFor3D),k=(function(Y){let X=.01;return Y.isOrthographic&&(X=r.ak(1e-4,X,r.c$(Y.pitch>=Xh?1:Y.pitch/Xh))),2*X})(_.transform),F=_.transform.getFreeCameraOptions().position,z="elevatedStructuresDepthReconstruct",q=_.getOrCreateProgram(z,{defines:["DEPTH_RECONSTRUCTION"]}),U=_.getOrCreateProgram(z);for(let Y of g){let X=l.getTile(Y),J=X.getBucket(u);if(!J)continue;let ae=J.elevatedStructures;if(!ae)continue;let ne=J.elevationBufferData.heightRange,ce=KL(Y.toUnwrapped(),F),_e=_.translatePosMatrix(Y.projMatrix,X,u.paint.get("fill-translate"),u.paint.get("fill-translate-anchor")),xe,Pe,ke,Ne;if(b==="initialize"){if(!ne||ne.min>=1||ae.depthSegments.segments[0].primitiveLength===0)continue;xe=Nw(_e,ce,k,1,0),Pe=S,ke=ae.depthSegments,Ne=q}else if(b==="reset"){if(!ne||ne.min>=0||ae.maskSegments.segments[0].primitiveLength===0)continue;xe=Nw(_e,ce,0,0,1),Pe=E,ke=ae.maskSegments,Ne=q}else if(b==="geometry"){if(ae.depthSegments.segments[0].primitiveLength===0)continue;xe=Nw(_e,ce,k,1,0),Pe=S,ke=ae.depthSegments,Ne=U}Ne.draw(_,C.TRIANGLES,Pe,Mn.disabled,so.disabled,Ln.disabled,xe,u.id,ae.vertexBuffer,ae.indexBuffer,ke,u.paint,_.transform.zoom)}}function Cy(_,l,u){let{painter:g,sourceCache:b,layer:C,coords:S,colorMode:E,elevationType:k,terrainEnabled:F,pass:z}=_,q=g.context.gl,U=C.paint.get("fill-pattern"),Y=C.paint.get("fill-pattern-cross-fade"),X=U.constantOr(null),J=k;k!=="road"||l&&!F||(J="none");let ae=J==="road",ne=_.painter.shadowRenderer,ce=ae&&!!ne&&ne.enabled,_e=new Vi(g.context.gl.LEQUAL,Vi.ReadOnly,g.depthRangeFor3D),xe=[0,0,0];if(ce){let Ne=g.style.directionalLight,Me=g.style.ambientLight;Ne&&Me&&(xe=Ap(g.style,Ne,Me))}let Pe=U&&U.constantOr(1),ke=(Ne,Me)=>{let De,Be,bt,nt,kt;Me?(De=Pe&&!C.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",bt=q.LINES):(De=Pe?"fillPattern":"fill",bt=q.TRIANGLES);for(let ft of S){let At=b.getTile(ft);if(Pe&&!At.patternsLoaded())continue;let pi=At.getBucket(C);if(!pi)continue;let vt=l?pi.elevationBufferData:pi.bufferData;if(vt.isEmpty())continue;g.prepareDrawTile();let Ke=vt.programConfigurations.get(C.id),Ot=g.isTileAffectedByFog(ft),Ct=[],Kt=[];ae&&(Ct.push("ELEVATED_ROADS"),Kt.push(vt.elevatedLayoutVertexBuffer)),ce&&Ct.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET"),Pe&&(g.context.activeTexture.set(q.TEXTURE0),At.imageAtlasTexture&&At.imageAtlasTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE),Ke.updatePaintBuffers());let di=!1;if(X&&At.imageAtlas){let Xi=At.imageAtlas,tn=r.e0.from(X),Yi=tn.getPrimary().scaleSelf(r.o.devicePixelRatio).toString(),Nn=tn.getSecondary(),no=Xi.patternPositions.get(Yi),lo=Nn?Xi.patternPositions.get(Nn.scaleSelf(r.o.devicePixelRatio).toString()):null;di=!!no&&!!lo,no&&Ke.setConstantPatternPositions(no,lo)}Y>0&&(di||Ke.getPatternTransitionVertexBuffer("fill-pattern"))&&Ct.push("FILL_PATTERN_TRANSITION");let Ai=g.getOrCreateProgram(De,{config:Ke,overrideFog:Ot,defines:Ct}),ri=g.translatePosMatrix(ft.projMatrix,At,C.paint.get("fill-translate"),C.paint.get("fill-translate-anchor"));ce&&ne.setupShadows(At.tileID.toUnwrapped(),Ai,"vector-tile");let ei=C.paint.get("fill-emissive-strength");if(Me){nt=vt.lineIndexBuffer,kt=vt.lineSegments;let Xi=g.terrain&&g.terrain.renderingToTexture?g.terrain.drapeBufferSize:[q.drawingBufferWidth,q.drawingBufferHeight];Be=De==="fillOutlinePattern"&&Pe?T8(ri,ei,g,At,Xi,xe,Y):I8(ri,ei,Xi,xe)}else nt=vt.indexBuffer,kt=vt.triangleSegments,Be=Pe?f_(ri,ei,g,At,xe,Y):hD(ri,ei,xe);g.uploadCommonUniforms(g.context,Ai,ft.toUnwrapped());let an=Ne;(k==="road"&&!F||k==="offset")&&(an=_e),Ai.draw(g,bt,an,u||g.stencilModeForClipping(ft),E,Ln.disabled,Be,C.id,vt.layoutVertexBuffer,nt,kt,C.paint,g.transform.zoom,Ke,Kt)}};g.renderPass===z&&ke(g.depthModeForSublayer(1,g.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly),!1),J==="none"&&g.renderPass==="translucent"&&C.paint.get("fill-antialias")&&ke(g.depthModeForSublayer(C.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly),!0)}function Ui(_,l,u,g,b,C,S,E){u.resetLayerRenderingStats(_);let k=_.context,F=k.gl,z=_.transform,q=u.paint.get("fill-extrusion-pattern"),U=u.paint.get("fill-extrusion-pattern-cross-fade"),Y=q.constantOr(null),X=q.constantOr(1),J=u.paint.get("fill-extrusion-opacity"),ae=_.style.enable3dLights(),ne=u.paint.get(ae&&!X?"fill-extrusion-ambient-occlusion-wall-radius":"fill-extrusion-ambient-occlusion-radius"),ce=[u.paint.get("fill-extrusion-ambient-occlusion-intensity"),ne],_e=u.layout.get("fill-extrusion-edge-radius"),xe=_e>0&&!u.paint.get("fill-extrusion-rounded-roof"),Pe=xe?0:_e,ke=z.projection.name==="globe"?r.e8():0,Ne=z.projection.name==="globe",Me=Ne?r.aj(z.zoom):0,De=[r.aF(z.center.lng),r.aJ(z.center.lat)],Be=u.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",bt=u.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(Be?null:u.lut).toArray01().slice(0,3),nt=u.paint.get("fill-extrusion-flood-light-intensity"),kt=u.paint.get("fill-extrusion-vertical-scale"),ft=u.paint.get("fill-extrusion-line-width").constantOr(1)!==0,At=u.paint.get("fill-extrusion-height-alignment"),pi=u.paint.get("fill-extrusion-base-alignment"),vt=yf(_,u.paint.get("fill-extrusion-cutoff-fade-range")),Ke=[],Ot;Ne&&Ke.push("PROJECTION_GLOBE_VIEW"),ce[0]>0&&Ke.push("FAUX_AO"),xe&&Ke.push("ZERO_ROOF_RADIUS"),E&&Ke.push("HAS_CENTROID"),nt>0&&Ke.push("FLOOD_LIGHT"),vt.shouldRenderCutoff&&Ke.push("RENDER_CUTOFF"),ft&&Ke.push("RENDER_WALL_MODE");let Ct=_.renderPass==="shadow",Kt=_.shadowRenderer,di=Ct&&!!Kt,Ai=Ct?Ln.disabled:Ln.backCCW;_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!0);let ri=[0,0,0];if(Kt){let Xi=_.style.directionalLight,tn=_.style.ambientLight;Xi&&tn&&(ri=Ap(_.style,Xi,tn)),Ct||(Ke.push("RENDER_SHADOWS","DEPTH_TEXTURE"),Kt.useNormalOffset&&Ke.push("NORMAL_OFFSET")),Ot=Ke.concat(["SHADOWS_SINGLE_CASCADE"])}let ei=di?"fillExtrusionDepth":X?"fillExtrusionPattern":"fillExtrusion",an=u.getLayerRenderingStats();for(let Xi of g){let tn=l.getTile(Xi),Yi=tn.getBucket(u);if(!Yi||Yi.projection.name!==z.projection.name)continue;let Nn=!1;Kt&&(Nn=Kt.getMaxCascadeForTile(Xi.toUnwrapped())===0);let no=_.isTileAffectedByFog(Xi),lo=Yi.programConfigurations.get(u.id),Sr=!1;if(Y&&tn.imageAtlas){let ir=tn.imageAtlas,pr=r.e0.from(Y),vs=pr.getPrimary().scaleSelf(r.o.devicePixelRatio).toString(),Ys=pr.getSecondary(),al=ir.patternPositions.get(vs),bs=Ys?ir.patternPositions.get(Ys.scaleSelf(r.o.devicePixelRatio).toString()):null;Sr=!!al&&!!bs,al&&lo.setConstantPatternPositions(al,bs)}U>0&&(Sr||lo.getPatternTransitionVertexBuffer("fill-extrusion-pattern"))&&Ke.push("FILL_EXTRUSION_PATTERN_TRANSITION");let $n=_.getOrCreateProgram(ei,{config:lo,defines:Nn?Ot:Ke,overrideFog:no});if(_.terrain&&_.terrain.setupElevationDraw(tn,$n,{useMeterToDem:!0}),!Yi.centroidVertexBuffer){let ir=$n.getAttributeLocation(F,"a_centroid_pos");ir!==-1&&F.vertexAttrib2f(ir,0,0)}!Ct&&Kt&&Kt.setupShadows(tn.tileID.toUnwrapped(),$n,"vector-tile"),X&&(_.context.activeTexture.set(F.TEXTURE0),tn.imageAtlasTexture&&tn.imageAtlasTexture.bind(F.LINEAR,F.CLAMP_TO_EDGE),lo.updatePaintBuffers());let Qo=u.paint.get("fill-extrusion-vertical-gradient"),yr=1/Yi.tileToMeter,hs;if(Ct&&Kt){if(ZL(tn.tileID,Yi.maxHeight,_))continue;let ir=Kt.calculateShadowPassMatrixFromTile(tn.tileID.toUnwrapped());hs=pD(ir,Pe,yr,kt,At,pi)}else{let ir=_.translatePosMatrix(Xi.expandedProjMatrix,tn,u.paint.get("fill-extrusion-translate"),u.paint.get("fill-extrusion-translate-anchor")),pr=z.projection.createInversionMatrix(z,Xi.canonical);hs=X?GL(ir,_,Qo,J,ce,Pe,yr,Xi,tn,ke,At,pi,Me,De,pr,bt,kt,U):dx(ir,_,Qo,J,ce,Pe,yr,Xi,ke,At,pi,Me,De,pr,bt,kt,nt,ri)}_.uploadCommonUniforms(k,$n,Xi.toUnwrapped(),null,vt);let oo=Yi.segments;if(z.projection.name==="mercator"&&!Ct&&(oo=Yi.getVisibleSegments(tn.tileID,_.terrain,_.transform.getFrustum(0)),!oo.get().length))continue;if(an)if(Ct)for(let ir of oo.get())an.numRenderedVerticesInShadowPass+=ir.primitiveLength;else for(let ir of oo.get())an.numRenderedVerticesInTransparentPass+=ir.primitiveLength;let ar=[];(_.terrain||E)&&ar.push(Yi.centroidVertexBuffer),Ne&&ar.push(Yi.layoutVertexExtBuffer),ft&&ar.push(Yi.wallVertexBuffer),$n.draw(_,k.gl.TRIANGLES,b,C,S,Ai,hs,u.id,Yi.layoutVertexBuffer,Yi.indexBuffer,oo,u.paint,_.transform.zoom,lo,ar)}_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!1)}class ID{constructor(){this.translate=[0,0],this.translateAnchor="map",this.edgeRadius=0,this.cutoffFadeRange=0}}function Jh(_,l,u,g,b,C,S,E,k,F,z,q,U,Y,X,J,ae,ne,ce,_e){let xe=l.context,Pe=xe.gl,ke=l.transform,Ne=l.transform.zoom,Me=[],De=_.translate,Be=_.translateAnchor,bt=_.edgeRadius,nt=yf(l,_.cutoffFadeRange);z==="clear"?(Me.push("CLEAR_SUBPASS"),_e&&(Me.push("CLEAR_FROM_TEXTURE"),xe.activeTexture.set(Pe.TEXTURE0),_e.bind(Pe.LINEAR,Pe.CLAMP_TO_EDGE))):z==="sdf"&&Me.push("SDF_SUBPASS"),ne&&Me.push("HAS_CENTROID"),nt.shouldRenderCutoff&&Me.push("RENDER_CUTOFF");let kt=(ft,At,pi,vt,Ke)=>{let Ot=At.programConfigurations.get(g.id),Ct=l.isTileAffectedByFog(ft),Kt=l.getOrCreateProgram("fillExtrusionGroundEffect",{config:Ot,defines:Me,overrideFog:Ct}),di=((ri,ei,an,Xi,tn,Yi,Nn,no,lo,Sr,$n)=>({u_matrix:ei,u_opacity:an,u_ao_pass:Xi?1:0,u_meter_to_tile:tn,u_ao:Yi,u_flood_light_intensity:Nn,u_flood_light_color:no,u_attenuation:lo,u_edge_radius:Sr,u_fb:0,u_fb_size:$n,u_dynamic_offset:1}))(0,vt,q,F,Ke,[U,Y*Ke],X,J,ae,Ne>=17?0:bt*Ke,_e?_e.size[0]:0),Ai=[];ne&&Ai.push(At.hiddenByLandmarkVertexBuffer),l.uploadCommonUniforms(xe,Kt,ft.toUnwrapped(),null,nt),Kt.draw(l,xe.gl.TRIANGLES,C,S,E,k,di,g.id,At.vertexBuffer,At.indexBuffer,pi,g.paint,Ne,Ot,Ai)};for(let ft of b){let At=u.getTile(ft),pi=At.getBucket(g);if(!pi||pi.projection.name!==ke.projection.name||!pi.groundEffect||pi.groundEffect&&!pi.groundEffect.hasData())continue;let vt=pi.groundEffect,Ke=1/pi.tileToMeter;{let Ot=l.translatePosMatrix(ft.projMatrix,At,De,Be),Ct=vt.getDefaultSegment();kt(ft,vt,Ct,Ot,Ke)}if(ce)for(let Ot=0;Ot<4;Ot++){let Ct=r.e6[Ot](ft),Kt=u.getTile(Ct);if(!Kt)continue;let di=Kt.getBucket(g);if(!di||di.projection.name!==ke.projection.name||!di.groundEffect||di.groundEffect&&!di.groundEffect.hasData())continue;let Ai=di.groundEffect,ri,ei;Ot===0?(ri=[-r.al,0,0],ei=1):Ot===1?(ri=[r.al,0,0],ei=0):Ot===2?(ri=[0,-r.al,0],ei=3):(ri=[0,r.al,0],ei=2);let an=Ai.regionSegments[ei];if(!an)continue;let Xi=new Float32Array(16);r.br(Xi,ft.projMatrix,ri),kt(ft,Ai,an,l.translatePosMatrix(Xi,At,De,Be),Ke)}}}function Sf(_,l,u,g,b,C,S){g.centroidVertexArray.length===0&&g.createCentroidsBuffer();let E=C?C.findDEMTileFor(u):null;if(!(E&&E.dem||S))return;C&&E&&E.dem&&g.selfDEMTileTimestamp!==E.dem._timestamp&&(g.borderDoneWithNeighborZ=[-1,-1,-1,-1],g.selfDEMTileTimestamp=E.dem._timestamp);let k=ne=>new r.P(Math.ceil((ne+r.ea)*r.eb),0),F=ne=>{let ce=l.getSource().minzoom,_e=Pe=>{let ke=l.getTileByID(Pe);if(ke&&ke.hasData())return ke.getBucket(b)},xe=[0,-1,1];for(let Pe of xe){if(ne.overscaledZ+Pe(z[0]=Math.min(ne.min.y,ce.min.y),z[1]=Math.max(ne.max.y,ce.max.y),z[2]=r.al-ce.min.x>ne.max.x?ce.min.x-r.al:ne.max.x,z),U=(ne,ce)=>(z[0]=Math.min(ne.min.x,ce.min.x),z[1]=Math.max(ne.max.x,ce.max.x),z[2]=r.al-ce.min.y>ne.max.y?ce.min.y-r.al:ne.max.y,z),Y=[(ne,ce)=>q(ne,ce),(ne,ce)=>q(ce,ne),(ne,ce)=>U(ne,ce),(ne,ce)=>U(ce,ne)],X=(ne,ce,_e,xe,Pe,ke,Ne)=>{if(!C)return 0;let Me=[[ke?_e:ne,ke?ne:_e,0],[ke?_e:ce,ke?ce:_e,0]],De=Ne<0?r.al+Ne:Ne,Be=[ke?De:(ne+ce)/2,ke?(ne+ce)/2:De,0];return _e===0&&Ne<0||_e!==0&&Ne>0?C.getForTilePoints(Pe,[Be],!0,xe):Me.push(Be),C.getForTilePoints(u,Me,!0,E),Math.max(Me[0][2],Me[1][2],Be[2])/C.exaggeration()};for(let ne=0;ne<4;ne++){let ce=g.borderFeatureIndices[ne];if(ce.length===0)continue;let _e=r.e6[ne](u),xe=F(_e);if(!(xe&&xe instanceof r.e7))continue;let Pe=C?C.findDEMTileFor(_e):null;if(!(Pe&&Pe.dem||S)||(C&&Pe&&Pe.dem&&g.borderDEMTileTimestamp[ne]!==Pe.dem._timestamp&&(g.borderDoneWithNeighborZ[ne]=-1,g.borderDEMTileTimestamp[ne]=Pe.dem._timestamp),g.borderDoneWithNeighborZ[ne]===xe.canonical.z))continue;xe.centroidVertexArray.length===0&&xe.createCentroidsBuffer();let ke=(ne<2?1:5)-ne,Ne=xe.borderDoneWithNeighborZ[ke]!==g.canonical.z,Me=xe.borderFeatureIndices[ke],De=0;if(g.canonical.z!==xe.canonical.z){for(let Be of ce)g.showCentroid(g.featuresOnBorder[Be]);if(Ne)for(let Be of Me)xe.showCentroid(xe.featuresOnBorder[Be]);g.borderDoneWithNeighborZ[ne]=xe.canonical.z,xe.borderDoneWithNeighborZ[ke]=g.canonical.z}for(let Be of ce){let bt=g.featuresOnBorder[Be],nt=g.centroidData[bt.centroidDataIndex],kt=bt.borders[ne],ft;for(;Dekt[0]+3||At[0]>kt[0]-3)break;xe.showCentroid(ft),De++}if(ft&&Dekt[1]-3)&&(pi++,++De!==Me.length);)ft=xe.featuresOnBorder[Me[De]];ft=xe.featuresOnBorder[Me[At]];let vt=!1;if(pi>=1){let Ct=ft.borders[ke];Math.abs(kt[0]-Ct[0])<3&&Math.abs(kt[1]-Ct[1])<3&&(pi=1,vt=!0,De=At+1)}else if(pi===0){g.showCentroid(bt);continue}let Ke=xe.centroidData[ft.centroidDataIndex];S&&vt&&(((J=nt).flags|(ae=Ke).flags)&r.e9?(J.flags|=r.e9,ae.flags|=r.e9):(J.flags&=~r.e9,ae.flags&=~r.e9));let Ot=bt.intersectsCount()>1||ft.intersectsCount()>1;if(pi>1)De=At,nt.centroidXY=Ke.centroidXY=new r.P(0,0);else if(Pe&&Pe.dem&&!Ot){let Ct=Y[ne](nt,Ke),Kt=ne%2?r.al-1:0,di=X(Ct[0],Math.min(r.al-1,Ct[1]),Kt,Pe,_e,ne<2,Ct[2]);nt.centroidXY=Ke.centroidXY=k(di)}else Ot?nt.centroidXY=Ke.centroidXY=new r.P(0,0):(nt.centroidXY=g.encodeBorderCentroid(bt),Ke.centroidXY=xe.encodeBorderCentroid(ft));g.writeCentroidToBuffer(nt),xe.writeCentroidToBuffer(Ke)}else g.showCentroid(bt)}g.borderDoneWithNeighborZ[ne]=xe.canonical.z,xe.borderDoneWithNeighborZ[ke]=g.canonical.z}var J,ae;(g.needsCentroidUpdate||!g.centroidVertexBuffer&&g.centroidVertexArray.length!==0)&&g.uploadCentroid(_)}let If=[1,0,0],Tn=[0,1,0],TD=[0,0,1];function ZL(_,l,u){let g=u.transform,b=u.shadowRenderer;if(!b)return!0;let C=_.toUnwrapped(),S=g.tileSize*b._cascades[u.currentShadowCascade].scale,E=l;if(g.elevation){let J=g.elevation.getMinMaxForTile(_);J&&(E+=J.max)}let k=[...b.shadowDirection];k[2]=-k[2];let F=b.computeSimplifiedTileShadowVolume(C,E,S,k);if(!F)return!1;let z=[If,Tn,TD,k,[k[0],0,k[2]],[0,k[1],k[2]]],q=g.projection.name==="globe",U=g.scaleZoom(S),Y=r.cA.fromInvProjectionMatrix(g.invProjMatrix,g.worldSize,U,!q),X=b.getCurrentCascadeFrustum();return Y.intersectsPrecise(F.vertices,F.planes,z)===0||X.intersectsPrecise(F.vertices,F.planes,z)===0}function Ww(_){let{painter:l,source:u,layer:g,coords:b}=_,C=_.defines,S=l.context,E=l.renderPass==="shadow",k=l.renderPass==="light-beam",F=l.shadowRenderer,z=r.ec(l.transform.center.lat,l.transform.zoom),q=yf(l,g.paint.get("building-cutoff-fade-range"));q.shouldRenderCutoff&&(C=C.concat("RENDER_CUTOFF"));for(let U of b){let Y=u.getTile(U),X=Y.getBucket(g);if(!X)continue;F&&F.getMaxCascadeForTile(U.toUnwrapped())===0&&(C=C.concat("SHADOWS_SINGLE_CASCADE"));let J=X.programConfigurations.get(g.id),ae,ne,ce,_e=l.translatePosMatrix(U.expandedProjMatrix,Y,[0,0],"map");if(_e=r.cR(r.bC(),_e,[1,1,_.verticalScale]),E&&F){if(ZL(Y.tileID,X.maxHeight*z,l))continue;let Pe=F.calculateShadowPassMatrixFromTile(Y.tileID.toUnwrapped());Pe=r.cR(r.bC(),Pe,[1,1,_.verticalScale]),ce=mD(Pe),ae=ne=l.getOrCreateProgram("buildingDepth",{config:J,defines:C,overrideFog:!1})}else if(k)ae=ne=l.getOrCreateProgram("buildingBloom",{config:J,defines:C,overrideFog:!1}),ce=D8(_e);else{let Pe=l.transform.calculatePosMatrix(U.toUnwrapped(),l.transform.worldSize);r.cR(Pe,Pe,[1,1,_.verticalScale]);let ke=r.bC();r.cR(ke,Pe,[1,-1,1/z]),r.bl(ke,ke),r.ed(ke,ke);let Ne=l.transform.getFreeCameraOptions().position,Me=1<{if(k){let Ne=Pe.entranceBloom;ke.draw(l,S.gl.TRIANGLES,_.depthMode,Mn.disabled,_.blendMode,Ln.disabled,ce,g.id,Ne.layoutVertexBuffer,Ne.indexBuffer,Ne.segmentsBucket,g.paint,l.transform.zoom,J,[Ne.layoutAttenuationBuffer,Ne.layoutColorBuffer])}else{let Ne=Pe.segmentsBucket,Me=[Pe.layoutNormalBuffer,Pe.layoutCentroidBuffer,Pe.layoutColorBuffer];Pe.layoutFacadePaintBuffer&&(Me=Me.concat([Pe.layoutFacadeDataBuffer,Pe.layoutFacadeVerticalRangeBuffer,Pe.layoutFacadePaintBuffer])),ke.draw(l,S.gl.TRIANGLES,_.depthMode,Mn.disabled,_.blendMode,E?Ln.disabled:Ln.backCW,ce,g.id,Pe.layoutVertexBuffer,Pe.indexBuffer,Ne,g.paint,l.transform.zoom,J,Me)}};l.uploadCommonUniforms(S,ne,U.toUnwrapped(),null,q),X.buildingWithoutFacade&&xe(X.buildingWithoutFacade,ne),ae!==ne&&l.uploadCommonUniforms(S,ae,U.toUnwrapped(),null,q),X.buildingWithFacade&&xe(X.buildingWithFacade,ae)}}function Kw(_){return[_[0]*r.ee,_[1]*r.ee,_[2]*r.ee,0]}function Zw(_,l,u,g,b,C,S,E,k){let F=g.getSource(),z=u.globeSharedBuffers;if(!z)return;let q,U,Y;if(l&&(q=g.getTile(l)),F instanceof r.aS?(U=F.texture,Y=r.dG(0,0,u.transform)):q&&l&&(U=q.texture,Y=r.dG(l.canonical.z,l.canonical.x,u.transform)),!U||!Y)return;_||(Y=r.cR(r.bC(),Y,[1,-1,1]));let X=u.context,J=X.gl,ae=b.paint.get("raster-resampling")==="nearest"?J.NEAREST:J.LINEAR,ne=u.colorModeForDrapableLayerRenderPass(C),ce=S.defines;ce.push("GLOBE_POLES");let _e=new Vi(J.LEQUAL,Vi.ReadWrite,u.depthRangeFor3D),xe=Float32Array.from(u.transform.expandedFarZProjMatrix),Pe=Float32Array.from(r.bk(r.dF(new r.cC(0,0,0))));u.terrain&&u.terrain.prepareDrawTile(),X.activeTexture.set(J.TEXTURE0),U.bind(ae,J.CLAMP_TO_EDGE),X.activeTexture.set(J.TEXTURE1),U.bind(ae,J.CLAMP_TO_EDGE),"useMipmap"in U&&X.extTextureFilterAnisotropic&&u.transform.pitch>20&&J.texParameterf(J.TEXTURE_2D,X.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,X.extTextureFilterAnisotropicMax);let[ke,Ne,Me,De]=l?z.getPoleBuffers(l.canonical.z,!1):z.getPoleBuffers(0,!0),Be=b.paint.get("raster-elevation"),bt;_?(bt=ke,u.renderDefaultNorthPole=Be!==0):(bt=Ne,u.renderDefaultSouthPole=Be!==0);let nt=Kw(S.mix),kt=((At,pi,vt,Ke,Ot,Ct,Kt,di,Ai,ri,ei,an,Xi)=>Bw(At,pi,vt,new Float32Array(16),new Float32Array(9),[0,0],Ke,[0,0],[0,0,0,0],1,{opacity:1,mix:0},Ct,[0,0],di,2,ri,ei,an,1,0,Xi))(xe,Pe,Y,r.aj(u.transform.zoom),0,b,0,Be,0,nt,S.offset,S.range,C),ft=u.getOrCreateProgram("raster",{defines:ce});u.uploadCommonUniforms(X,ft,null),ft.draw(u,J.TRIANGLES,_e,k,ne,E,kt,b.id,bt,Me,De)}function R8(_){let l=_._nearZ,u=_.projection.farthestPixelDistance(_),g=u-l,b=.2*_.height,C=l+b;return[l,u,(C-b-l)/g,(C-l)/g]}function YL(_,l,u,g){if(_)return l instanceof pf&&_ instanceof qb?l.getTextureDescriptor(_,u,!0):{texture:_.texture,mix:Kw(g.mix),offset:g.offset,buffer:0,tileSize:1}}var O8=r.ef([{name:"a_index",type:"Int16",components:1}]);class P8{constructor(l,u,g,b){let C={width:g[0],height:g[1],data:null},S=l.gl;this.targetColorTexture=new r.T(l,C,S.RGBA8,{useMipmap:!1}),this.backgroundColorTexture=new r.T(l,C,S.RGBA8,{useMipmap:!1}),this.context=l,this.updateParticleTexture(u,b),this.lastInvalidatedAt=0}updateParticleTexture(l,u){if(this.particleTextureDimension===u.width)return;(this.particleTexture0||this.particleTexture1||this.particleIndexBuffer||this.particleSegment)&&(this.particleTexture0.destroy(),this.particleTexture1.destroy(),this.particleIndexBuffer.destroy(),this.particleSegment.destroy());let g=this.context.gl,b=u.width*u.height;this.particleTexture0=new r.T(this.context,u,g.RGBA8,{premultiply:!1,useMipmap:!1}),this.particleTexture1=new r.T(this.context,u,g.RGBA8,{premultiply:!1,useMipmap:!1});let C=new r.eg;C.reserve(b);for(let S=0;S0){let nt=r.bj(u.canonical,k),kt=r.ei(nt);U=r.aB(new Float32Array(16),k.globeMatrix,kt),r.aB(U,k.projMatrix,U)}let Y=r.bC();Y[12]+=2*b/(r.o.devicePixelRatio*k.width),Y[13]+=2*C/(r.o.devicePixelRatio*k.height),r.aB(U,Y,U);let X=_.getOrCreateProgram("debug",{defines:q}),J=l.getTileByID(u.key);_.terrain&&_.terrain.setupElevationDraw(J,X);let ae=Vi.disabled,ne=Mn.disabled,ce=_.colorModeForRenderPass(),_e="$debug";E.activeTexture.set(F.TEXTURE0),_.emptyTexture.bind(F.LINEAR,F.CLAMP_TO_EDGE),z?J._makeGlobeTileDebugBuffers(_.context,k):J._makeDebugTileBoundsBuffers(_.context,k.projection);let xe=J._tileDebugBuffer||_.debugBuffer,Pe=J._tileDebugIndexBuffer||_.debugIndexBuffer,ke=J._tileDebugSegments||_.debugSegments;if(X.draw(_,F.LINE_STRIP,ae,ne,ce,Ln.disabled,gD(U,g.toPremultipliedRenderColor(null)),_e,xe,Pe,ke,null,null,null,[J._globeTileDebugBorderBuffer]),S){let nt=J.latestRawTileData,kt=Math.floor((nt&&nt.byteLength||0)/1024),ft=u.canonical.toString();u.overscaledZ!==u.canonical.z&&(ft+=` => ${u.overscaledZ}`),ft+=` ${J.state}`,ft+=` ${kt}kb`,(function(At,pi){At.initDebugOverlayCanvas();let vt=At.debugOverlayCanvas,Ke=At.context.gl,Ot=At.debugOverlayCanvas.getContext("2d");Ot.clearRect(0,0,vt.width,vt.height),Ot.shadowColor="white",Ot.shadowBlur=2,Ot.lineWidth=1.5,Ot.strokeStyle="white",Ot.textBaseline="top",Ot.font="bold 36px Open Sans, sans-serif",Ot.fillText(pi,5,5),Ot.strokeText(pi,5,5),At.debugOverlayTexture.update(vt),At.debugOverlayTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE)})(_,ft)}let Ne=l.getTile(u).tileSize,Me=512/Math.min(Ne,512)*(u.overscaledZ/k.zoom)*.5,De=J._tileDebugTextBuffer||_.debugBuffer,Be=J._tileDebugTextIndexBuffer||_.quadTriangleIndexBuffer,bt=J._tileDebugTextSegments||_.debugSegments;X.draw(_,F.TRIANGLES,ae,ne,so.alphaBlended,Ln.disabled,gD(U,r.ao.transparent.toPremultipliedRenderColor(null),Me),_e,De,Be,bt,null,null,null,[J._globeTileDebugTextBuffer])}function fh(_,l,u,g){b_(_,0,l+u/2,_.transform.width,u,g)}function es(_,l,u,g){b_(_,l-u/2,0,u,_.transform.height,g)}function b_(_,l,u,g,b,C){let S=_.context,E=S.gl;E.enable(E.SCISSOR_TEST),E.scissor(l*r.o.devicePixelRatio,u*r.o.devicePixelRatio,g*r.o.devicePixelRatio,b*r.o.devicePixelRatio),S.clear({color:C}),E.disable(E.SCISSOR_TEST)}let kD=r.ef([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:XL}=kD;function em(_,l,u,g){_.emplaceBack(l,u,g)}class MD{constructor(l){this.vertexArray=new r.ej,this.indices=new r.b1,em(this.vertexArray,-1,-1,1),em(this.vertexArray,1,-1,1),em(this.vertexArray,-1,1,1),em(this.vertexArray,1,1,1),em(this.vertexArray,-1,-1,-1),em(this.vertexArray,1,-1,-1),em(this.vertexArray,-1,1,-1),em(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,XL),this.indexBuffer=l.createIndexBuffer(this.indices),this.segment=r.bg.simpleSegment(0,0,36,12)}}function x_(_,l,u,g,b,C){let S=_.context.gl,E=l.paint.get("sky-atmosphere-color"),k=l.paint.get("sky-atmosphere-halo-color"),F=l.paint.get("sky-atmosphere-sun-intensity"),z=((q,U,Y,X,J)=>({u_matrix_3f:q,u_sun_direction:U,u_sun_intensity:Y,u_color_tint_r:[X.r,X.g,X.b,X.a],u_color_tint_m:[J.r,J.g,J.b,J.a],u_luminance:5e-5}))(r.el(r.dL(),g),b,F,E.toPremultipliedRenderColor(null),k.toPremultipliedRenderColor(null));S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_CUBE_MAP_POSITIVE_X+C,l.skyboxTexture,0),u.draw(_,S.TRIANGLES,Vi.disabled,Mn.disabled,so.unblended,Ln.frontCW,z,"skyboxCapture",l.skyboxGeometry.vertexBuffer,l.skyboxGeometry.indexBuffer,l.skyboxGeometry.segment)}let C_=r.ef([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class w_{constructor(l){let u=new r.em;u.emplaceBack(-1,1,1,0,0),u.emplaceBack(1,1,1,1,0),u.emplaceBack(1,-1,1,1,1),u.emplaceBack(-1,-1,1,0,1);let g=new r.b1;g.emplaceBack(0,1,2),g.emplaceBack(2,3,0),this.vertexBuffer=l.createVertexBuffer(u,C_.members),this.indexBuffer=l.createIndexBuffer(g),this.segments=r.bg.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}let ci=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_size_scale",components:1},{type:"Float32",name:"a_fade_opacity",components:1}]);class Ti{constructor(){this.starsCount=16e3,this.sizeMultiplier=.15,this.sizeRange=100,this.intensityRange=200}}class wy{constructor(l){this.colorModeAlphaBlendedWriteRGB=new so([1,ud,1,ud],r.ao.transparent,[!0,!0,!0,!1]),this.colorModeWriteAlpha=new so([1,0,1,0],r.ao.transparent,[!1,!1,!1,!0]),this.params=new Ti,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 u=l.context;if(!this.atmosphereBuffer||this.updateNeeded){this.updateNeeded=!1,this.atmosphereBuffer=new w_(u);let g=this.params.sizeRange,b=this.params.intensityRange,C=(function(z){let q=r.eo(30),U=[];for(let Y=0;Y{let Me=C.projection.name==="globe"?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"];Ne&&Me.push("ALPHA_PASS");let De=l.getOrCreateProgram("globeAtmosphere",{defines:Me}),Be=((nt,kt,ft,At,pi,vt,Ke,Ot,Ct,Kt,di,Ai)=>({u_frustum_tl:nt,u_frustum_tr:kt,u_frustum_br:ft,u_frustum_bl:At,u_horizon:pi,u_transition:vt,u_fadeout_range:Ke,u_atmosphere_fog_color:Ot.toArray01(),u_high_color:Ct.toArray01(),u_space_color:Kt.toArray01(),u_temporal_offset:di,u_horizon_angle:Ai}))(C.frustumCorners.TL,C.frustumCorners.TR,C.frustumCorners.BR,C.frustumCorners.BL,C.frustumCorners.horizon,E,ae,z,U,X,ce,Pe);l.uploadCommonUniforms(g,De);let bt=this.atmosphereBuffer;bt&&De.draw(l,b.TRIANGLES,S,Mn.disabled,Ne?this.colorModeWriteAlpha:this.colorModeAlphaBlendedWriteRGB,Ln.backCW,Be,Ne?"atmosphere_glow_alpha":"atmosphere_glow",bt.vertexBuffer,bt.indexBuffer,bt.segments)};ke(!1),ke(!0)}drawStars(l,u){let g=r.aA(u.properties.get("star-intensity"),0,1);if(g===0)return;let b=l.context,C=b.gl,S=l.transform,E=l.getOrCreateProgram("stars"),k=r.c6([]);r.c8(k,k,-S._pitch),r.c7(k,k,-S.angle),r.c8(k,k,r.an(S._center.lat)),r.eq(k,k,-r.an(S._center.lng));let F=r.cb(new Float32Array(16),k),z=r.aB([],S.starsProjMatrix,F),q=r.el([],F),U=r.er([],q),Y=[0,1,0];r.dN(Y,Y,U),r.c4(Y,Y,this.params.sizeMultiplier);let X=[1,0,0];r.dN(X,X,U),r.c4(X,X,this.params.sizeMultiplier);let J=(ae=Y,ne=X,ce=g,{u_matrix:Float32Array.from(z),u_up:ae,u_right:ne,u_intensity_multiplier:ce});var ae,ne,ce;l.uploadCommonUniforms(b,E),this.starsVx&&this.starsIdx&&E.draw(l,C.TRIANGLES,Vi.disabled,Mn.disabled,this.colorModeAlphaBlendedWriteRGB,Ln.disabled,J,"atmosphere_stars",this.starsVx,this.starsIdx,this.starsSegments)}}class Bs{constructor(){this.visibleTiles=[]}updateBorders(l,u){let g=[],b=[],C=l._getRenderableCoordinates(!1,!0);for(let k of C){let F=l.getTile(k);if(!F.hasData())continue;let z=F.getBucket(u);z&&(z.isEmpty()||(g.push(k.key),b.push({bucket:z,tileID:k.canonical})))}let S=g.length!==this.visibleTiles.length;if(!S){g.sort();for(let k=0;kk.tileID.z-F.tileID.z||k.tileID.x-F.tileID.x||k.tileID.y-F.tileID.y);for(let k of b){let F=new Array,z=new Array,q=k.bucket;for(let U of q.featuresOnBorder)E.has(U.featureId)?z.push(U.footprintIndex):(E.add(U.featureId),F.push(U.footprintIndex));q.updateFootprintHiddenFlags(F,r.es,!1),q.updateFootprintHiddenFlags(z,r.es,!0)}}}function ut(_,l){let u=[..._],g=l.cameraWorldSizeForFog/l.worldSize,b=r.bA([]);return r.cR(b,b,[g,g,1]),r.aB(u,b,u),r.aB(u,l.worldToFogMatrix,u),u}function Qw(_,l,u,g,b){let C=u.material,S=g.context,{baseColorTexture:E,metallicRoughnessTexture:k}=C.pbrMetallicRoughness,{normalTexture:F,occlusionTexture:z,emissionTexture:q}=C;function U(X,J,ae){if(X&&(_.push(J),S.activeTexture.set(S.gl.TEXTURE0+ae),X.gfxTexture)){let{minFilter:ne,magFilter:ce,wrapS:_e,wrapT:xe}=X.sampler;X.gfxTexture.bindExtraParam(ne,ce,_e,xe)}}U(E,"HAS_TEXTURE_u_baseColorTexture",ma.BaseColor),U(k,"HAS_TEXTURE_u_metallicRoughnessTexture",ma.MetallicRoughness),U(F,"HAS_TEXTURE_u_normalTexture",ma.Normal),U(z,"HAS_TEXTURE_u_occlusionTexture",ma.Occlusion),U(q,"HAS_TEXTURE_u_emissionTexture",ma.Emission),b&&(b.texture||(b.texture=new r.dY(g.context,b.image,[b.image.height,b.image.height,b.image.height],S.gl.RGBA8)),S.activeTexture.set(S.gl.TEXTURE0+ma.LUT),b.texture&&b.texture.bind(S.gl.LINEAR,S.gl.CLAMP_TO_EDGE),_.push("APPLY_LUT_ON_GPU")),u.texcoordBuffer&&(_.push("HAS_ATTRIBUTE_a_uv_2f"),l.push(u.texcoordBuffer)),u.colorBuffer&&(_.push(u.colorBuffer.itemSize===12?"HAS_ATTRIBUTE_a_color_3f":"HAS_ATTRIBUTE_a_color_4f"),l.push(u.colorBuffer)),u.normalBuffer&&(_.push("HAS_ATTRIBUTE_a_normal_3f"),l.push(u.normalBuffer)),u.pbrBuffer&&(_.push("HAS_ATTRIBUTE_a_pbr"),_.push("HAS_ATTRIBUTE_a_heightBasedEmissiveStrength"),l.push(u.pbrBuffer)),C.alphaMode!=="OPAQUE"&&C.alphaMode!=="MASK"||_.push("UNPREMULT_TEXTURE_IN_SHADER"),C.defined||_.push("DIFFUSE_SHADED");let Y=g.shadowRenderer;Y&&(_.push("RENDER_SHADOWS","DEPTH_TEXTURE"),Y.useNormalOffset&&_.push("NORMAL_OFFSET"))}function S_(_,l,u,g,b,C){let S=u.paint.get("model-opacity").constantOr(1),E=l.context,k=new Vi(l.context.gl.LEQUAL,Vi.ReadWrite,l.depthRangeFor3D),F=l.transform,z=_.mesh,q=z.material,U=q.pbrMetallicRoughness,Y=l.style.fog,X;X=l.transform.projection.zAxisUnit==="pixels"?[..._.nodeModelMatrix]:r.aB([],g.zScaleMatrix,_.nodeModelMatrix),r.aB(X,g.negCameraPosMatrix,X);let J=r.bl([],X);r.ed(J,J);let ae=u.paint.get("model-color-use-theme").constantOr("default")==="none",ne=u.paint.get("model-emissive-strength").constantOr(0),ce=Hw(new Float32Array(_.worldViewProjection),new Float32Array(X),new Float32Array(J),null,l,S,U.baseColorFactor,q.emissiveFactor,U.metallicFactor,U.roughnessFactor,q,ne,u),_e={defines:[]},xe=[],Pe=l.shadowRenderer;Pe&&(Pe.useNormalOffset=!1),Qw(_e.defines,xe,z,l,ae?null:u.lut);let ke=null;if(Y){let De=ut(_.nodeModelMatrix,l.transform);if(ke=new Float32Array(De),F.projection.name!=="globe"){let Be=z.aabb.min,bt=z.aabb.max,[nt,kt]=Y.getOpacityForBounds(De,Be[0],Be[1],bt[0],bt[1]);_e.overrideFog=nt>=pn||kt>=pn}}let Ne=yf(l,u.paint.get("model-cutoff-fade-range"));Ne.shouldRenderCutoff&&_e.defines.push("RENDER_CUTOFF");let Me=l.getOrCreateProgram("model",_e);l.uploadCommonUniforms(E,Me,null,ke,Ne),l.renderPass!=="shadow"&&Pe&&Pe.setupShadowsFromMatrix(_.nodeModelMatrix,Me),Me.draw(l,E.gl.TRIANGLES,k,b,C,z.material.doubleSided?Ln.disabled:Ln.backCCW,ce,u.id,z.vertexBuffer,z.indexBuffer,z.segments,u.paint,l.transform.zoom,void 0,xe)}function Xw(_,l,u,g,b,C,S){let E;E=_.projection.name==="globe"?r.eu(u,_):[...u],r.aB(E,E,l.matrix);let k=r.aB([],g,E);if(l.meshes)for(let F of l.meshes){if(F.material.alphaMode!=="BLEND"){S.push({mesh:F,depth:0,modelIndex:b,worldViewProjection:k,nodeModelMatrix:E});continue}let z=r.af([],F.centroid,k);!_.isOrthographic&&z[2]<=0||C.push({mesh:F,depth:z[2],modelIndex:b,worldViewProjection:k,nodeModelMatrix:E})}if(l.children)for(let F of l.children)Xw(_,F,u,g,b,C,S)}function hx(_,l,u,g){let b=u.shadowRenderer;if(!b)return;let C=b.getShadowPassDepthMode(),S=b.getShadowPassColorMode(),E=b.calculateShadowPassMatrixFromMatrix(l),k=xy(E);u.getOrCreateProgram("modelDepth",{defines:u._shadowMapDebug?[]:["DEPTH_TEXTURE"]}).draw(u,u.context.gl.TRIANGLES,C,Mn.disabled,S,Ln.backCCW,k,g.id,_.vertexBuffer,_.indexBuffer,_.segments,g.paint,u.transform.zoom,void 0,void 0)}function JL(_,l,u){let g=l.updateZoomBasedPaintProperties(),b=(function(C,S,E){let k,F,z,q=C.terrain?C.terrain.exaggeration():0;if(C.terrain&&q>0){let U=C.terrain,Y=U.findDEMTileFor(E);Y&&Y.dem?k=r.ew.create(U,E,Y):q=0}if(q===0&&(S.terrainElevationMin=0,S.terrainElevationMax=0),q===S.validForExaggeration&&(q===0||k&&k._demTile&&k._demTile.tileID===S.validForDEMTile.id&&k._dem._timestamp===S.validForDEMTile.timestamp))return!1;for(let U in S.instancesPerModel){let Y=S.instancesPerModel[U];for(let X=0;XF&&(F=Y.max)}let z=r.aA(g.x,C,S)-g.x,q=r.aA(g.y,E,k)-g.y,U=r.ce(F,l.center.lat)-g.z;return l._zoomFromMercatorZ(Math.sqrt(z*z+q*q+U*U))}function eF(_,l,u,g,b,C,S){let E=_.context,k=_.renderPass==="shadow",F=_.shadowRenderer,z=k&&F?F.getShadowPassDepthMode():new Vi(E.gl.LEQUAL,Vi.ReadWrite,_.depthRangeFor3D),q=_.isTileAffectedByFog(C);if(u.meshes)for(let U of u.meshes){let Y=["MODEL_POSITION_ON_GPU"],X=[],J,ae,ne;g.instancedDataArray.length>20&&Y.push("INSTANCED_ARRAYS");let ce=yf(_,l.paint.get("model-cutoff-fade-range"));if(ce.shouldRenderCutoff&&Y.push("RENDER_CUTOFF"),k&&F)J=_.getOrCreateProgram("modelDepth",{defines:Y}),ae=xy(S.shadowTileMatrix,S.shadowTileMatrix,Float32Array.from(u.matrix)),ne=F.getShadowPassColorMode();else{Qw(Y,X,U,_,l.paint.get("model-color-use-theme").constantOr("default")==="none"?null:l.lut),J=_.getOrCreateProgram("model",{defines:Y,overrideFog:q});let xe=U.material,Pe=xe.pbrMetallicRoughness,ke=l.paint.get("model-opacity").constantOr(1),Ne=l.paint.get("model-emissive-strength").constantOr(0);ae=Hw(C.expandedProjMatrix,Float32Array.from(u.matrix),new Float32Array(16),null,_,ke,Pe.baseColorFactor,xe.emissiveFactor,Pe.metallicFactor,Pe.roughnessFactor,xe,Ne,l,b),F&&(S.shadowUniformsInitialized?J.setShadowUniformValues(E,F.getShadowUniformValues()):(F.setupShadows(C.toUnwrapped(),J,"model-tile"),S.shadowUniformsInitialized=!0)),ne=ce.shouldRenderCutoff||ke<1||xe.alphaMode!=="OPAQUE"?so.alphaBlended:so.unblended}_.uploadCommonUniforms(E,J,C.toUnwrapped(),null,ce);let _e=U.material.doubleSided?Ln.disabled:Ln.backCCW;if(g.instancedDataArray.length>20)X.push(g.instancedDataBuffer),J.draw(_,E.gl.TRIANGLES,z,Mn.disabled,ne,_e,ae,l.id,U.vertexBuffer,U.indexBuffer,U.segments,l.paint,_.transform.zoom,void 0,X,g.instancedDataArray.length);else{let xe=k?"u_instance":"u_normal_matrix";for(let Pe=0;Pek[1]?S:k,C[0]=u.max[0],S=r.aC(r.ex(),C,b),E=S[1]k[1]?S:k,C[1]=u.min[1],S=r.aC(r.ex(),C,b),E=S[1]k[1]?S:k;let F=r.aA(g[0],0,1),z=100*l.pixelsPerMeter*r.aA(g[1],0,1),q=r.aA(g[2],0,1),U=r.ey(r.ex(),E,k,F),Y=Math.tan(.5*l.fovX),X=-U[2]*Y;if(z===0)return U[1]<-Math.abs(X)?q:1;let J=(-Math.abs(X)-U[1])/z,ae=(ce,_e,xe)=>(1-xe)*ce+xe*_e,ne=r.aA(ae(1,q,J),q,1);return ae(1,ne,r.aA((l.pitch-20)/20,0,1))}class iF{}class nF{constructor(){this._storage=new Map}getLinesFromTrianglesBuffer(l,u,g){{let q=this._storage.get(u.id);if(q)return q.lastUsedFrameIdx=l,q.buf}let b=g.gl,C=b.getBufferParameter(b.ELEMENT_ARRAY_BUFFER,b.BUFFER_SIZE),S=new ArrayBuffer(C),E=new Int16Array(S);b.getBufferSubData(b.ELEMENT_ARRAY_BUFFER,0,new Int16Array(S));let k=new r.eA;for(let q=0;q30&&(g.buf.destroy(),this._storage.delete(u))}destroy(){for(let[l,u]of this._storage)u.buf.destroy(),this._storage.delete(l)}}class eS{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 mx=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_rainParticleData",components:4}]);class Iy{registerParameter(){}registerButton(){}registerBinding(){}refreshUI(){}}class OD{constructor(l,u){this.revealStart=11,this.revealRange=2,l.registerParameter(this,[...u,"Reveal"],"revealStart",{min:0,max:17,step:.05}),l.registerParameter(this,[...u,"Reveal"],"revealRange",{min:.1,max:5.1,step:.05})}}let oF=r.ef([{type:"Float32",name:"a_pos_2f",components:2}]);class F8{destroy(){this.vignetteVx&&this.vignetteVx.destroy(),this.vignetteIdx&&this.vignetteIdx.destroy()}draw(l,u){let g=l.getOrCreateProgram("vignette");if(!this.vignetteVx||!this.vignetteIdx){let S=new r.eB,E=new r.b1;S.emplaceBack(-1,-1),S.emplaceBack(1,-1),S.emplaceBack(1,1),S.emplaceBack(-1,1),E.emplaceBack(0,1,2),E.emplaceBack(0,2,3),this.vignetteVx=l.context.createVertexBuffer(S,oF.members),this.vignetteIdx=l.context.createIndexBuffer(E)}let b=r.bg.simpleSegment(0,0,4,6);if(this.vignetteVx&&this.vignetteIdx){l.uploadCommonUniforms(l.context,g);let S={u_vignetteShape:(C={vignetteShape:[u.start,u.range,Math.pow(10,u.fadePower)],vignetteColor:[u.color.r,u.color.g,u.color.b,u.color.a*u.strength]}).vignetteShape,u_vignetteColor:C.vignetteColor};g.draw(l,l.context.gl.TRIANGLES,Vi.disabled,Mn.disabled,so.alphaBlended,Ln.disabled,S,"vignette",this.vignetteVx,this.vignetteIdx,b)}var C}}class rF{constructor(){this._accumulatedOffsetX=0,this._accumulatedOffsetY=0,this._accumulatedElevation=0}update(l,u){let g=l.getFreeCameraOptions().position,b=g.toAltitude(),C=g.toLngLat(),S=r.an(C.lng),E=r.an(C.lat),k=l.pixelsPerMeter/u,F=S*r.eD,z=r.eD*Math.log(Math.tan(Math.PI/4+E/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 q=-this._offsetYPrev+z,U=-this._elevationPrev+b;this._accumulatedOffsetX+=(-this._offsetXPrev+F)*k,this._accumulatedOffsetY+=q*k,this._accumulatedElevation+=U*k,this._offsetXPrev=F,this._offsetYPrev=z,this._elevationPrev=b}}getPosition(){return[this._accumulatedOffsetX,this._accumulatedOffsetY,this._accumulatedElevation]}}function sF(_,l){return[-(_[0]-Math.floor(_[0]/l)*l),-(_[1]-Math.floor(_[1]/l)*l),-(_[2]-Math.floor(_[2]/l)*l)]}function vc(_){let l=r.eo(1323123451230),u=[];for(let g=0;g<_;++g){let b=2*l()-1,C=2*l()-1,S=2*l()-1;u.push(r.d4(b,C,S))}return u}function Ef(_,l,u,g,b){let C=r.aA((b-u)/(g-u),0,1);return(1-C)*_+C*l}class Ty{constructor(l){this._movement=new rF,this._accumulatedTimeFromStart=0,this._prevTime=Date.now()/1e3,this._vignette=new F8,this._ppmScaleFactor=l}destroy(){this.particlesVx&&this.particlesVx.destroy(),this.particlesIdx&&this.particlesIdx.destroy(),this._vignette&&this._vignette.destroy()}updateOnRender(l,u){let g=l.transform;this._movement.update(g,this._ppmScaleFactor);let b=g.starsProjMatrix,C=r.c6([]);r.c8(C,C,r.an(90)-g._pitch),r.c7(C,C,-g.angle);let S=r.cb(new Float32Array(16),C),E=r.eC(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1),k=r.ed([],E),F=r.aB([],k,S),z=Date.now()/1e3;return this._accumulatedTimeFromStart+=(z-this._prevTime)*u,this._prevTime=z,{projectionMatrix:b,modelviewMatrix:F}}}class ps extends Ty{constructor(l){super(4.25),this._params={overrideStyleParameters:!1,intensity:.5,timeFactor:1,velocityConeAperture:0,velocity:300,boxSize:2500,dropletSizeX:1,dropletSizeYScale:10,distortionStrength:70,screenThinning:{intensity:.57,start:.46,range:1.17,fadePower:.17,affectedRatio:1,particleOffset:-.2},color:{r:.66,g:.68,b:.74,a:.7},direction:{x:-50,y:-35},shapeDirPower:2,shapeNormalPower:1},this._revealParams=new OD(l.tp,["Precipitation","Rain"]),this._vignetteParams={strength:1,start:.7,range:1,fadePower:.4,color:{r:.27,g:.27,b:.27,a:1}},this.particlesCount=16e3}update(l){let u=l.context;if(!this.particlesVx){let g=vc(this.particlesCount),b=new r.eE,C=new r.b1,S=0,E=r.eo(1323123451230);for(let k=0;kg)return;let b=Ef(0,1,u.revealStart,u.revealStart+u.revealRange,g);if(!this.particlesVx||!this.particlesIdx)return;let C=structuredClone(this._params),S=[-C.direction.x,C.direction.y,-100];r.aw(S,S);let E=structuredClone(this._vignetteParams);E.strength*=b,C.overrideStyleParameters||(C.intensity=l.style.rain.state.density,C.timeFactor=l.style.rain.state.intensity,C.color=structuredClone(l.style.rain.state.color),S=structuredClone(l.style.rain.state.direction),C.screenThinning.intensity=l.style.rain.state.centerThinning,C.dropletSizeX=l.style.rain.state.dropletSize[0],C.dropletSizeYScale=l.style.rain.state.dropletSize[1]/l.style.rain.state.dropletSize[0],C.distortionStrength=100*l.style.rain.state.distortionStrength,E.strength=1,E.color=structuredClone(l.style.rain.state.vignetteColor));let k=this.updateOnRender(l,C.timeFactor),F=l.context,z=F.gl,q=l.transform;this.screenTexture&&this.screenTexture.size[0]===l.width&&this.screenTexture.size[1]===l.height||(this.screenTexture=new r.T(F,{width:l.width,height:l.height,data:null},z.RGBA8)),C.distortionStrength>0&&(F.activeTexture.set(z.TEXTURE0),this.screenTexture.bind(z.LINEAR,z.CLAMP_TO_EDGE),z.copyTexSubImage2D(z.TEXTURE_2D,0,0,0,0,0,l.width,l.height));let U=l.getOrCreateProgram("rainParticle");l.uploadCommonUniforms(F,U),F.activeTexture.set(z.TEXTURE0),this.screenTexture.bind(z.LINEAR,z.CLAMP_TO_EDGE);let Y=[C.color.r,C.color.g,C.color.b,C.color.a],X=(J,ae)=>{let ne=sF(this._movement.getPosition(),J),ce=C.dropletSizeX,_e=C.dropletSizeX*C.dropletSizeYScale,xe=l.width/2,Pe=l.height/2,ke=Ef(0,C.screenThinning.start,0,1,C.screenThinning.intensity),Ne=Ef(.001,C.screenThinning.range,0,1,C.screenThinning.intensity),Me=Ef(0,C.screenThinning.particleOffset,0,1,C.screenThinning.intensity),De=(Be={modelview:k.modelviewMatrix,projection:k.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:ne,velocityConeAperture:C.velocityConeAperture,velocity:C.velocity,boxSize:J,rainDropletSize:[ce,_e],distortionStrength:C.distortionStrength,rainDirection:S,color:Y,screenSize:[q.width,q.height],thinningCenterPos:[xe,Pe],thinningShape:[ke,Ne,Math.pow(10,C.screenThinning.fadePower)],thinningAffectedRatio:C.screenThinning.affectedRatio,thinningParticleOffset:Me,shapeDirectionalPower:C.shapeDirPower,shapeNormalPower:C.shapeNormalPower,mode:ae?0:1},{u_modelview:Float32Array.from(Be.modelview),u_projection:Float32Array.from(Be.projection),u_time:Be.time,u_cam_pos:Be.camPos,u_texScreen:0,u_velocityConeAperture:Be.velocityConeAperture,u_velocity:Be.velocity,u_boxSize:Be.boxSize,u_rainDropletSize:Be.rainDropletSize,u_distortionStrength:Be.distortionStrength,u_rainDirection:Be.rainDirection,u_color:Be.color,u_screenSize:Be.screenSize,u_thinningCenterPos:Be.thinningCenterPos,u_thinningShape:Be.thinningShape,u_thinningAffectedRatio:Be.thinningAffectedRatio,u_thinningParticleOffset:Be.thinningParticleOffset,u_shapeDirectionalPower:Be.shapeDirectionalPower,u_shapeNormalPower:Be.shapeNormalPower,u_mode:Be.mode});var Be;let bt=Math.round(C.intensity*this.particlesCount),nt=r.bg.simpleSegment(0,0,4*bt,2*bt);U.draw(l,z.TRIANGLES,Vi.disabled,Mn.disabled,so.alphaBlended,Ln.disabled,De,"rain_particles",this.particlesVx,this.particlesIdx,nt)};C.distortionStrength>0&&X(C.boxSize,!0),X(C.boxSize,!1),this._vignette.draw(l,E)}}let Po=r.ef([{type:"Float32",name:"a_pos_3f",components:3},{type:"Float32",name:"a_uv",components:2},{type:"Float32",name:"a_snowParticleData",components:4},{type:"Float32",name:"a_snowParticleDataHorizontalOscillation",components:2}]);class aF extends Ty{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 OD(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 u=l.context;if(!this.particlesVx){let g=vc(this.particlesCount),b=new r.eF,C=new r.b1,S=0,E=r.eo(1323123451230);for(let k=0;kS)return;let E=Ef(0,1,C.revealStart,C.revealStart+C.revealRange,S);b.strength*=E,u.overrideStyleParameters||(u.intensity=l.style.snow.state.density,u.timeFactor=l.style.snow.state.intensity,u.color=structuredClone(l.style.snow.state.color),g=structuredClone(l.style.snow.state.direction),u.screenThinning.intensity=l.style.snow.state.centerThinning,u.billboardSize=2.79*l.style.snow.state.flakeSize,b.strength=1,b.color=structuredClone(l.style.snow.state.vignetteColor));let k=this.updateOnRender(l,u.timeFactor);if(!this.particlesVx||!this.particlesIdx)return;let F=l.context,z=F.gl,q=l.transform,U=l.getOrCreateProgram("snowParticle");l.uploadCommonUniforms(F,U),((Y,X,J)=>{let ae=sF(this._movement.getPosition(),Y),ne=q.width/2,ce=q.height/2,_e=Ef(0,J.screenThinning.start,0,1,J.screenThinning.intensity),xe=Ef(.001,J.screenThinning.range,0,1,J.screenThinning.intensity),Pe=Ef(0,J.screenThinning.particleOffset,0,1,J.screenThinning.intensity),ke=(Ne={modelview:k.modelviewMatrix,projection:k.projectionMatrix,time:this._accumulatedTimeFromStart,camPos:ae,velocityConeAperture:J.velocityConeAperture,velocity:J.velocity,horizontalOscillationRadius:J.horizontalOscillationRadius,horizontalOscillationRate:J.horizontalOscillationRate,boxSize:Y,billboardSize:1*J.billboardSize,simpleShapeParameters:[J.shapeFadeStart,J.shapeFadePower],screenSize:[q.width,q.height],thinningCenterPos:[ne,ce],thinningShape:[_e,xe,Math.pow(10,J.screenThinning.fadePower)],thinningAffectedRatio:J.screenThinning.affectedRatio,thinningParticleOffset:Pe,color:[J.color.r,J.color.g,J.color.b,J.color.a],direction:g},{u_modelview:Float32Array.from(Ne.modelview),u_projection:Float32Array.from(Ne.projection),u_time:Ne.time,u_cam_pos:Ne.camPos,u_velocityConeAperture:Ne.velocityConeAperture,u_velocity:Ne.velocity,u_horizontalOscillationRadius:Ne.horizontalOscillationRadius,u_horizontalOscillationRate:Ne.horizontalOscillationRate,u_boxSize:Ne.boxSize,u_billboardSize:Ne.billboardSize,u_simpleShapeParameters:Ne.simpleShapeParameters,u_screenSize:Ne.screenSize,u_thinningCenterPos:Ne.thinningCenterPos,u_thinningShape:Ne.thinningShape,u_thinningAffectedRatio:Ne.thinningAffectedRatio,u_thinningParticleOffset:Ne.thinningParticleOffset,u_particleColor:Ne.color,u_direction:Ne.direction});var Ne;let Me=Math.round(J.intensity*this.particlesCount),De=r.bg.simpleSegment(0,0,4*Me,2*Me);this.particlesVx&&this.particlesIdx&&U.draw(l,z.TRIANGLES,Vi.disabled,Mn.disabled,so.alphaBlended,Ln.disabled,ke,"snow_particles",this.particlesVx,this.particlesIdx,De)})(u.boxSize,0,u),this._vignette.draw(l,b)}}let Af={symbol:function(_,l,u,g,b){if(_.renderPass!=="translucent")return;let C=Mn.disabled,S=_.colorModeForRenderPass(),E=u.layout.get("text-variable-anchor"),k=u.layout.get("text-size-scale-range"),F=r.aA(_.scaleFactor,k[0],k[1]);E&&(function(U,Y,X,J,ae,ne,ce,_e){let xe=Y.transform,Pe=ae==="map",ke=ne==="map";for(let Ne of U){let Me=J.getTile(Ne),De=Me.getBucket(X);if(!De||!De.text||!De.text.segments.get().length)continue;let Be=r.bK(De.textSizeData,xe.zoom,_e),bt=s_(Ne,De.getProjection(),xe),nt=xe.calculatePixelsToTileUnitsMatrix(Me),kt=Ip(bt,Me.tileID.canonical,ke,Pe,xe,De.getProjection(),nt),ft=De.hasIconTextFit()&&De.hasIconData();Be&&$w(De,Pe,ke,ce,xe,kt,Ne,Math.pow(2,xe.zoom-Me.tileID.overscaledZ),Be,ft)}})(g,_,u,l,u.layout.get("text-rotation-alignment"),u.layout.get("text-pitch-alignment"),b,F);let z=u.paint.get("icon-opacity").constantOr(1)!==0,q=u.paint.get("text-opacity").constantOr(1)!==0;u.layout.get("symbol-sort-key").constantOr(1)!==void 0&&(z||q)?px(_,l,u,g,C,S):(z&&px(_,l,u,g,C,S,{onlyIcons:!0}),q&&px(_,l,u,g,C,S,{onlyText:!0})),l.map.showCollisionBoxes&&(ux(_,l,u,g,u.paint.get("text-translate"),u.paint.get("text-translate-anchor"),!0),ux(_,l,u,g,u.paint.get("icon-translate"),u.paint.get("icon-translate-anchor"),!1))},circle:function(_,l,u,g){if(_.renderPass!=="translucent")return;let b=u.paint.get("circle-opacity"),C=u.paint.get("circle-stroke-width"),S=u.paint.get("circle-stroke-opacity"),E=u.layout.get("circle-sort-key").constantOr(1)!==void 0,k=u.paint.get("circle-emissive-strength");if(b.constantOr(1)===0&&(C.constantOr(1)===0||S.constantOr(1)===0))return;let F=_.context,z=F.gl,q=_.transform,U=!(!_.terrain||!_.terrain.enabled),Y=u.layout.get("circle-elevation-reference"),X=_.depthModeForSublayer(0,Vi.ReadOnly),J=new Vi(_.context.gl.LEQUAL,Vi.ReadOnly,_.depthRangeFor3D),ae=Y==="none"||U?X:J,ne=Mn.disabled,ce=_.colorModeForDrapableLayerRenderPass(k),_e=q.projection.name==="globe",xe=[r.aF(q.center.lng),r.aJ(q.center.lat)],Pe=[];for(let Ne=0;NeNe.sortKey-Me.sortKey);let ke={useDepthForOcclusion:q.depthOcclusionForSymbolsAndCircles};for(let Ne of Pe){let{programConfiguration:Me,program:De,layoutVertexBuffer:Be,dynamicBuffers:bt,indexBuffer:nt,uniformValues:kt,tile:ft}=Ne.state,At=Ne.segments;_.terrain&&_.terrain.setupElevationDraw(ft,De,ke),_.uploadCommonUniforms(F,De,ft.tileID.toUnwrapped()),De.draw(_,z.TRIANGLES,ae,ne,ce,Ln.disabled,kt,u.id,Be,nt,At,u.paint,q.zoom,Me,bt)}},heatmap:function(_,l,u,g){if(u.paint.get("heatmap-opacity")!==0)if(_.renderPass==="offscreen"){let b=_.context,C=b.gl,S=Mn.disabled,E=new so([C.ONE,C.ONE,C.ONE,C.ONE],r.ao.transparent,[!0,!0,!0,!0]);(function(Y,X,J,ae){let ne=Y.gl,ce=X.width*ae,_e=X.height*ae;Y.activeTexture.set(ne.TEXTURE1),Y.viewport.set([0,0,ce,_e]);let xe=J.heatmapFbo;if(!xe||xe&&(xe.width!==ce||xe.height!==_e)){xe&&xe.destroy();let Pe=ne.createTexture();ne.bindTexture(ne.TEXTURE_2D,Pe),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_S,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_T,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MIN_FILTER,ne.LINEAR),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MAG_FILTER,ne.LINEAR),xe=J.heatmapFbo=Y.createFramebuffer(ce,_e,!0,null),(function(ke,Ne,Me,De,Be,bt){let nt=ke.gl;nt.texImage2D(nt.TEXTURE_2D,0,ke.extRenderToTextureHalfFloat?nt.RGBA16F:nt.RGBA,Be,bt,0,nt.RGBA,ke.extRenderToTextureHalfFloat?nt.HALF_FLOAT:nt.UNSIGNED_BYTE,null),De.colorAttachment.set(Me)})(Y,0,Pe,xe,ce,_e)}else ne.bindTexture(ne.TEXTURE_2D,xe.colorAttachment.get()),Y.bindFramebuffer.set(xe.framebuffer)})(b,_,u,_.transform.projection.name==="globe"?.5:.25),b.clear({color:r.ao.transparent});let k=_.transform,F=k.projection.name==="globe",z=F?["PROJECTION_GLOBE_VIEW"]:[],q=F?Ln.frontCCW:Ln.disabled,U=[r.aF(k.center.lng),r.aJ(k.center.lat)];for(let Y=0;Y({u_image:0,u_color_ramp:1,u_opacity:q.paint.get("heatmap-opacity")}))(0,C),C.id,b.viewportBuffer,b.quadTriangleIndexBuffer,b.viewportSegments,C.paint,b.transform.zoom)})(_,u))},line:function(_,l,u,g){if(_.renderPass!=="translucent")return;let b=u.paint.get("line-opacity"),C=u.paint.get("line-width");if(b.constantOr(1)===0||C.constantOr(1)===0)return;let S=u.paint.get("line-emissive-strength"),E=u.paint.get("line-occlusion-opacity"),k=u.layout.get("line-elevation-reference"),F=u.layout.get("line-width-unit")==="meters",z=k==="sea",q=!(!_.terrain||!_.terrain.enabled),U=_.context,Y=U.gl;if(u.hasElevatedBuckets&&_.transform.projection.name==="globe")return;let X=u.layout.get("line-cross-slope"),J=X!==void 0,ae=X<1,ne=_.colorModeForDrapableLayerRenderPass(S),ce=_.terrain&&_.terrain.renderingToTexture,_e=ce?1:r.o.devicePixelRatio,xe=u.paint.get("line-dasharray"),Pe=xe.constantOr(1),ke=u.layout.get("line-cap"),Ne=xe.constantOr(null),Me=ke.constantOr(null),De=u.paint.get("line-pattern"),Be=De.constantOr(1),bt=u.paint.get("line-pattern-cross-fade"),nt=De.constantOr(null),kt=u.paint.get("line-opacity").constantOr(1),ft=!Be&&kt!==1||_.depthOcclusion&&E>0&&E<1,At=u.paint.get("line-gradient"),pi=Be?"linePattern":"line",vt=r.d$(u),Ke;if(ce&&_.terrain&&_.terrain.clipOrMaskOverlapStencilType()&&(ft=!1),E!==0&&_.depthOcclusion){let di=u.paint._values["line-opacity"];di&&di.value&&di.value.kind==="constant"?Ke=di.value:r.w(`Occlusion opacity for layer ${u.id} is supported only when line-opacity isn't data-driven.`)}C.value.kind!=="constant"&&C.value.isLineProgressConstant===!1&&vt.push("VARIABLE_LINE_WIDTH");let Ot=(di,Ai,ri,ei,an,Xi)=>{for(let tn of di){let Yi=l.getTile(tn);if(Be&&!Yi.patternsLoaded())continue;let Nn=Yi.getBucket(u);if(!Nn||Nn.elevationType!=="none"&&!an||Nn.elevationType==="none"&&an)continue;_.prepareDrawTile();let no=[...Ai],lo=_.shadowRenderer,Sr=Nn.elevationType==="road"&&!!lo&&lo.enabled,$n=[0,0,0];if(Sr){let co=_.style.directionalLight,Rn=_.style.ambientLight;co&&Rn&&($n=Ap(_.style,co,Rn)),no.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET")}let Qo=Nn.programConfigurations.get(u.id),yr=!1;if(nt&&Yi.imageAtlas){let co=r.e0.from(nt),Rn=co.getPrimary().scaleSelf(_e).toString(),Ir=Yi.imageAtlas.patternPositions.get(Rn),zs=co.getSecondary(),ws=zs?Yi.imageAtlas.patternPositions.get(zs.scaleSelf(_e).toString()):null;yr=!!Ir&&!!ws,Ir&&Qo.setConstantPatternPositions(Ir,ws)}bt>0&&(yr||Qo.getPatternTransitionVertexBuffer("line-pattern"))&&no.push("LINE_PATTERN_TRANSITION");let hs=_.isTileAffectedByFog(tn),oo=_.getOrCreateProgram(pi,{config:Qo,defines:no,overrideFog:hs});if(!Be&&Ne&&Me&&Yi.lineAtlas){let co=Yi.lineAtlas.getDash(Ne,Me);co&&Qo.setConstantPatternPositions(co)}Sr&&lo.setupShadows(Yi.tileID.toUnwrapped(),oo,"vector-tile");let[ar,ir]=u.paint.get("line-trim-offset");(Me==="round"||Me==="square")&&ar!==ir&&(ar===0&&(ar-=1),ir===1&&(ir+=1));let pr=ce?tn.projMatrix:null,vs=F?1/Nn.tileToMeter/r.ay(Yi,1,_.transform.zoom):1,Ys=F?1/Nn.tileToMeter/r.ay(Yi,1,Math.floor(_.transform.zoom)):1,al=Be?r.e1(_,Yi,u,pr,_e,vs,Ys,[ar,ir],$n,bt):r.e2(_,Yi,u,pr,Nn.lineClipsArray.length,_e,vs,Ys,[ar,ir],$n);if(At){let co=Nn.gradients[u.id],Rn=co.texture;if(u.gradientVersion!==co.version){let Ir=256;if(u.stepInterpolant){let zs=l.getSource().maxzoom,ws=tn.canonical.z===zs?Math.ceil(1<<_.transform.maxZoom-tn.canonical.z):1;Ir=r.aA(r.e3(Nn.maxLineLength/r.al*1024*ws),256,U.maxTextureSize)}co.gradient=r.e4({expression:u.gradientExpression(),evaluationKey:"lineProgress",resolution:Ir,image:co.gradient||void 0,clips:Nn.lineClipsArray}),co.texture?co.texture.update(co.gradient):co.texture=new r.T(U,co.gradient,Y.RGBA8),co.version=u.gradientVersion,Rn=co.texture}U.activeTexture.set(Y.TEXTURE1),Rn.bind(u.stepInterpolant?Y.NEAREST:Y.LINEAR,Y.CLAMP_TO_EDGE)}Pe&&(U.activeTexture.set(Y.TEXTURE0),Yi.lineAtlasTexture&&Yi.lineAtlasTexture.bind(Y.LINEAR,Y.REPEAT),Qo.updatePaintBuffers()),Be&&(U.activeTexture.set(Y.TEXTURE0),Yi.imageAtlasTexture&&Yi.imageAtlasTexture.bind(Y.LINEAR,Y.CLAMP_TO_EDGE),Qo.updatePaintBuffers()),an&&!z&&_.terrain.setupElevationDraw(Yi,oo),_.uploadCommonUniforms(U,oo,tn.toUnwrapped());let bs=co=>{Ke!=null&&(Ke.value=kt*E),oo.draw(_,Y.TRIANGLES,ri,co,ne,Ln.disabled,al,u.id,Nn.layoutVertexBuffer,Nn.indexBuffer,Nn.segments,u.paint,_.transform.zoom,Qo,[Nn.layoutVertexBuffer2,Nn.patternVertexBuffer,Nn.zOffsetVertexBuffer]),Ke!=null&&(Ke.value=kt)};if(ft&&!an){let co=_.stencilModeForClipping(tn).ref;co===0&&ce&&U.clear({stencil:0});let Rn={func:Y.EQUAL,mask:255};al.u_alpha_discard_threshold=.8,bs(new Mn(Rn,co,255,Y.KEEP,Y.KEEP,Y.INVERT)),al.u_alpha_discard_threshold=0,bs(new Mn(Rn,co,255,Y.KEEP,Y.KEEP,Y.KEEP))}else al.u_alpha_discard_threshold=ft&&an&&Xi?.8:0,bs(an?ei:_.stencilModeForClipping(tn))}},Ct=_.depthModeForSublayer(0,Vi.ReadOnly),Kt=new Vi(_.depthOcclusion?Y.GREATER:Y.LEQUAL,Vi.ReadOnly,_.depthRangeFor3D);if(u.hasNonElevatedBuckets){let di=!ce&&_.terrain;E!==0&&di?r.w(`Occlusion opacity for layer ${u.id} is supported on terrain only if the layer has line-z-offset enabled.`):di?r.w(`Cannot render non-elevated lines in immediate mode when terrain is enabled. Layer: ${u.id}.`):Ot(g,vt,Ct,Mn.disabled,!1,!0)}if(u.hasElevatedBuckets){k==="hd-road-markup"?q||(Ct=Kt,vt.push("ELEVATED_ROADS")):(vt.push("ELEVATED"),Ct=Kt,J&&vt.push(ae?"CROSS_SLOPE_HORIZONTAL":"CROSS_SLOPE_VERTICAL"),z&&vt.push("ELEVATION_REFERENCE_SEA"));let di=ft?_.stencilModeFor3D():Mn.disabled;_.forceTerrainMode=!0,Ot(g,vt,Ct,di,!0,!0),ft&&Ot(g,vt,Ct,di,!0,!1),_.forceTerrainMode=!1}ft&&(_.resetStencilClippingMasks(),ce&&U.clear({stencil:0})),E===0||_.depthOcclusion||ce||_.layersWithOcclusionOpacity.push(_.currentLayer)},fill:function(_,l,u,g){let b=u.paint.get("fill-color"),C=u.paint.get("fill-opacity");if(C.constantOr(1)===0)return;let S=u.paint.get("fill-emissive-strength"),E=_.colorModeForDrapableLayerRenderPass(S),k=u.paint.get("fill-pattern"),F=_.opaquePassEnabledForLayer()&&!k.constantOr(1)&&b.constantOr(r.ao.transparent).a===1&&C.constantOr(0)===1?"opaque":"translucent",z="none";u.layout.get("fill-elevation-reference")!=="none"?z="road":u.paint.get("fill-z-offset").constantOr(1)!==0&&(z="offset");let q=!(!_.terrain||!_.terrain.enabled),U={painter:_,sourceCache:l,layer:u,coords:g,colorMode:E,elevationType:z,terrainEnabled:q,pass:F};if(_.renderPass!=="shadow")if(z!=="offset"){if(Cy(U,!1),z==="road"){let Y=!q&&_.renderPass==="translucent";Y&&y_(_,l,u,g,"geometry"),Cy(U,!0,Mn.disabled),Y&&(function(X){let{painter:J,sourceCache:ae,layer:ne,coords:ce,colorMode:_e}=X,xe=J.context.gl,Pe=X.painter.shadowRenderer,ke=!!Pe&&Pe.enabled,Ne=new Vi(J.context.gl.LEQUAL,Vi.ReadOnly,J.depthRangeFor3D),Me=[0,0,0];if(ke){let Be=J.style.directionalLight,bt=J.style.ambientLight;Be&&bt&&(Me=Ap(J.style,Be,bt))}let De=Be=>{for(let bt of ce){let nt=ae.getTile(bt),kt=nt.getBucket(ne);if(!kt)continue;let ft=kt.elevatedStructures;if(!ft)continue;let At,pi;if(Be?(At=ft.renderableBridgeSegments,pi=ft.bridgeProgramConfigurations.get(ne.id)):(At=ft.renderableTunnelSegments,pi=ft.tunnelProgramConfigurations.get(ne.id)),!At||At.segments[0].primitiveLength===0)continue;pi.updatePaintBuffers(),J.prepareDrawTile();let vt=J.isTileAffectedByFog(bt),Ke=[];ke&&Ke.push("RENDER_SHADOWS","DEPTH_TEXTURE","NORMAL_OFFSET");let Ot=J.getOrCreateProgram("elevatedStructures",{config:pi,overrideFog:vt,defines:Ke}),Ct=J.translatePosMatrix(bt.projMatrix,nt,ne.paint.get("fill-translate"),ne.paint.get("fill-translate-anchor"));ke&&Pe.setupShadows(nt.tileID.toUnwrapped(),Ot,"vector-tile");let Kt=E8(Ct,Me);J.uploadCommonUniforms(J.context,Ot,bt.toUnwrapped()),Ot.draw(J,xe.TRIANGLES,Ne,Mn.disabled,_e,Ln.backCCW,Kt,ne.id,ft.vertexBuffer,ft.indexBuffer,At,ne.paint,J.transform.zoom,pi,[ft.vertexBufferNormal])}};De(!0),De(!1)})(U)}}else Cy(U,!1,_.stencilModeFor3D());else _.shadowRenderer&&z==="road"&&!q&&(function(Y){let{painter:X,sourceCache:J,layer:ae,coords:ne}=Y,ce=X.context.gl,_e=Y.painter.shadowRenderer;for(let xe of ne){let Pe=J.getTile(xe),ke=Pe.getBucket(ae);if(!ke)continue;let Ne=ke.elevatedStructures;if(!Ne||!Ne.shadowCasterSegments||Ne.shadowCasterSegments.segments[0].primitiveLength===0)continue;X.prepareDrawTile();let Me=ke.bufferData.programConfigurations.get(ae.id),De=X.isTileAffectedByFog(xe),Be=X.getOrCreateProgram("elevatedStructuresDepth",{config:Me,overrideFog:De}),bt=_e.calculateShadowPassMatrixFromTile(Pe.tileID.toUnwrapped());X.uploadCommonUniforms(X.context,Be,xe.toUnwrapped());let nt={u_matrix:bt,u_depth_bias:0};Be.draw(X,ce.TRIANGLES,_e.getShadowPassDepthMode(),Mn.disabled,_e.getShadowPassColorMode(),Ln.disabled,nt,ae.id,Ne.vertexBuffer,Ne.indexBuffer,Ne.shadowCasterSegments,ae.paint,X.transform.zoom,Me)}})(U)},"fill-extrusion":function(_,l,u,g){let b=u.paint.get("fill-extrusion-opacity"),C=_.context,S=C.gl,E=_.terrain,k=E&&E.renderingToTexture;if(b===0)return;let F=_.conflationActive&&_.style.isLayerClipped(u,l.getSource()),z=_.style.order.indexOf(u.fqid);if(F&&(function(q,U,Y,X,J){for(let ae of X){let ne=U.getTile(ae).getBucket(Y);ne&&(ne.updateReplacement(ae,q.replacementSource,J),ne.uploadCentroid(q.context))}})(_,l,u,g,z),E||F)for(let q of g){let U=l.getTile(q).getBucket(u);U&&Sf(_.context,l,q,U,u,E,F)}if(_.renderPass==="shadow"&&_.shadowRenderer){let q=_.shadowRenderer;if(E&&b<.65&&u._transitionablePaint._values["fill-extrusion-opacity"].value.expression instanceof r.ad)return;let U=q.getShadowPassDepthMode(),Y=q.getShadowPassColorMode();Ui(_,l,u,g,U,Mn.disabled,Y,F)}else if(_.renderPass==="translucent"){let q=!u.paint.get("fill-extrusion-pattern").constantOr(1),U=u.paint.get("fill-extrusion-color").constantOr(r.ao.white);if(!k&&U.a!==0){let Y=new Vi(_.context.gl.LEQUAL,Vi.ReadWrite,_.depthRangeFor3D);b===1&&q?Ui(_,l,u,g,Y,Mn.disabled,so.unblended,F):(Ui(_,l,u,g,Y,Mn.disabled,so.disabled,F),Ui(_,l,u,g,Y,_.stencilModeFor3D(),_.colorModeForRenderPass(),F),_.resetStencilClippingMasks())}if(_.style.enable3dLights()&&q&&(!E&&_.transform.projection.name!=="globe"||k)){let Y=u.paint.get("fill-extrusion-opacity"),X=u.paint.get("fill-extrusion-ambient-occlusion-intensity"),J=u.paint.get("fill-extrusion-ambient-occlusion-ground-radius"),ae=u.paint.get("fill-extrusion-flood-light-intensity"),ne=u.paint.get("fill-extrusion-flood-light-color-use-theme").constantOr("default")==="none",ce=u.paint.get("fill-extrusion-flood-light-color").toNonPremultipliedRenderColor(ne?null:u.lut).toArray01().slice(0,3),_e=X>0&&J>0,xe=ae>0,Pe=(Me,De,Be)=>(1-Be)*Me+Be*De,ke=new ID;ke.translate=u.paint.get("fill-extrusion-translate"),ke.translateAnchor=u.paint.get("fill-extrusion-translate-anchor"),ke.edgeRadius=u.layout.get("fill-extrusion-edge-radius"),ke.cutoffFadeRange=u.paint.get("fill-extrusion-cutoff-fade-range");let Ne=Me=>{let De=_.depthModeForSublayer(1,Vi.ReadOnly,S.LEQUAL,!0),Be=u.paint.get(Me?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),bt=Pe(.1,3,Be),nt=_._showOverdrawInspector;if(!nt){let kt=new Mn({func:S.ALWAYS,mask:255},255,255,S.KEEP,S.KEEP,S.REPLACE),ft=new so([S.ONE,S.ONE,S.ONE,S.ONE],r.ao.transparent,[!1,!1,!1,!0],S.MIN);Jh(ke,_,l,u,g,De,kt,ft,Ln.disabled,Me,"sdf",Y,X,J,ae,ce,bt,F,!1)}{let kt=nt?Mn.disabled:new Mn({func:S.EQUAL,mask:255},255,255,S.KEEP,S.DECR,S.DECR),ft=nt?_.colorModeForRenderPass():new so([S.ONE_MINUS_DST_ALPHA,S.DST_ALPHA,S.ONE,S.ONE],r.ao.transparent,[!0,!0,!0,!0]);Jh(ke,_,l,u,g,De,kt,ft,Ln.disabled,Me,"color",Y,X,J,ae,ce,bt,F,!1)}};if(k){let Me=(De,Be,bt)=>{let nt=_.depthModeForSublayer(1,Vi.ReadOnly,S.LEQUAL,!1),kt=u.paint.get(De?"fill-extrusion-ambient-occlusion-ground-attenuation":"fill-extrusion-flood-light-ground-attenuation"),ft=Pe(.1,3,kt);{let At=new so([S.ONE,S.ONE,S.ONE,S.ONE],r.ao.transparent,[!1,!1,!1,!0]);Jh(ke,_,l,u,g,nt,Mn.disabled,At,Ln.disabled,De,"clear",Y,X,J,ae,ce,ft,F,Be)}{let At=new Mn({func:S.ALWAYS,mask:255},255,255,S.KEEP,S.KEEP,S.REPLACE),pi=new so([S.ONE,S.ONE,S.ONE,S.ONE],r.ao.transparent,[!1,!1,!1,!0],S.MIN);Jh(ke,_,l,u,g,nt,At,pi,Ln.disabled,De,"sdf",Y,X,J,ae,ce,ft,F,Be)}{let At=De?S.ZERO:S.ONE_MINUS_DST_ALPHA,pi=new Mn({func:S.EQUAL,mask:255},255,255,S.KEEP,S.DECR,S.DECR),vt=new so([At,S.DST_ALPHA,S.ONE_MINUS_DST_ALPHA,S.ZERO],r.ao.transparent,[!0,!0,!0,!0]);Jh(ke,_,l,u,g,nt,pi,vt,Ln.disabled,De,"color",Y,X,J,ae,ce,ft,F,Be)}{let At=new so([S.ONE,S.ONE,S.ONE,De?S.ZERO:S.ONE],r.ao.transparent,[!1,!1,!1,!0],De?S.FUNC_ADD:S.MAX);Jh(ke,_,l,u,g,nt,Mn.disabled,At,Ln.disabled,De,"clear",Y,X,J,ae,ce,ft,F,Be,bt)}};if(_e||xe){let De;if(_.prepareDrawTile(),E){let Be=E.drapeBufferSize[0],bt=E.drapeBufferSize[1];De=E.framebufferCopyTexture,De&&(!De||De.size[0]===Be&&De.size[1]===bt)||(De&&De.destroy(),De=E.framebufferCopyTexture=new r.T(C,new r.q({width:Be,height:bt}),S.RGBA8)),De.bind(S.LINEAR,S.CLAMP_TO_EDGE),S.copyTexSubImage2D(S.TEXTURE_2D,0,0,0,0,0,Be,bt)}_e&&Me(!0,!1,De),xe&&Me(!1,!0,De)}}else _e&&Ne(!0),xe&&Ne(!1),(_e||xe)&&_.resetStencilClippingMasks()}}},building:function(_,l,u,g){_.currentLayer<_.firstLightBeamLayer&&(_.firstLightBeamLayer=_.currentLayer);let b=u.paint.get("building-ambient-occlusion-ground-intensity"),C=u.paint.get("building-ambient-occlusion-ground-radius"),S=u.paint.get("building-ambient-occlusion-ground-attenuation"),E=u.paint.get("building-opacity");if(E<=0)return;let k=b>0&&C>0,F=!0,z=u.paint.get("building-vertical-scale");(!_.shadowRenderer||z<1)&&(F=!1);let q=_.conflationActive&&_.style.isLayerClipped(u,l.getSource()),U=_.style.order.indexOf(u.fqid);if((function(Y,X,J,ae,ne,ce){for(let _e of ce){let xe=X.getTile(_e).getBucket(J);xe&&(ne&&xe.updateReplacement(_e,Y.replacementSource,ae),xe.uploadUpdatedIndexBuffer(Y.context))}})(_,l,u,U,q,g),(function(Y,X,J,ae){for(let ne of ae){let ce=X.getTile(ne).getBucket(J);ce&&ce.needsEvaluation()&&ce.uploadUpdatedColorBuffer(Y.context)}})(_,l,u,g),u.resetLayerRenderingStats(_),_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!0),_.renderPass==="shadow"&&_.shadowRenderer){let Y=_.shadowRenderer,X=[],J=Y.getShadowPassDepthMode();Ww({painter:_,source:l,layer:u,coords:g,defines:X,blendMode:Y.getShadowPassColorMode(),depthMode:J,opacity:E,verticalScale:z,facadeEmissiveChance:0,facadeAOIntensity:0})}else if(_.renderPass==="translucent"){let Y=["HAS_ATTRIBUTE_a_part_color_emissive","LIGHTING_3D_MODE"];F&&(Y=Y.concat("RENDER_SHADOWS","DEPTH_TEXTURE")),_.shadowRenderer&&_.shadowRenderer.useNormalOffset&&(Y=Y.concat("NORMAL_OFFSET"));let X=u.paint.get("building-facade-emissive-chance"),J=u.paint.get("building-ambient-occlusion-intensity"),ae=new Vi(_.context.gl.LEQUAL,Vi.ReadWrite,_.depthRangeFor3D);E<1&&Ww({painter:_,source:l,layer:u,coords:g,defines:Y,blendMode:so.disabled,depthMode:ae,opacity:E,verticalScale:z,facadeEmissiveChance:X,facadeAOIntensity:J});let ne=_.colorModeForRenderPass();Ww({painter:_,source:l,layer:u,coords:g,defines:Y,blendMode:ne,depthMode:ae,opacity:E,verticalScale:z,facadeEmissiveChance:X,facadeAOIntensity:J}),k&&(function(ce,_e,xe,Pe,ke,Ne,Me,De,Be,bt,nt,kt,ft){let At=ce.context.gl,pi=ce.depthModeForSublayer(1,Vi.ReadOnly,At.LEQUAL,!0),vt=.1*(1-(Ke=nt))+3*Ke;var Ke;let Ot=ce._showOverdrawInspector,Ct=kt,Kt=new ID;Ot||Jh(Kt,ce,_e,xe,Pe,pi,new Mn({func:At.ALWAYS,mask:255},255,255,At.KEEP,At.KEEP,At.REPLACE),new so([At.ONE,At.ONE,At.ONE,At.ONE],r.ao.transparent,[!1,!1,!1,!0],At.MIN),Ln.disabled,ke,"sdf",Ne,Me,De,0,bt,vt,Ct,!1);{let di=Ot?Mn.disabled:new Mn({func:At.EQUAL,mask:255},255,255,At.KEEP,At.DECR,At.DECR),Ai=Ot?ce.colorModeForRenderPass():new so([At.ONE_MINUS_DST_ALPHA,At.DST_ALPHA,At.ONE,At.ONE],r.ao.transparent,[!0,!0,!0,!0]);Jh(Kt,ce,_e,xe,Pe,pi,di,Ai,Ln.disabled,ke,"color",Ne,Me,De,0,bt,vt,Ct,!1)}})(_,l,u,g,!0,E,b,C,0,[0,0,0],S,q)}else if(_.renderPass==="light-beam"){let Y=["HAS_ATTRIBUTE_a_part_color_emissive","HAS_ATTRIBUTE_a_bloom_attenuation"],X=new Vi(_.context.gl.LEQUAL,Vi.ReadOnly,_.depthRangeFor3D);Ww({painter:_,source:l,layer:u,coords:g,defines:Y,blendMode:so.alphaBlended,depthMode:X,opacity:E,verticalScale:z,facadeEmissiveChance:0,facadeAOIntensity:0})}_.shadowRenderer&&(_.shadowRenderer.useNormalOffset=!1),_.resetStencilClippingMasks()},hillshade:function(_,l,u,g){if(_.renderPass!=="offscreen"&&_.renderPass!=="translucent"||_.style.disableElevatedTerrain)return;let b=_.context,C=_.terrain&&_.terrain.renderingToTexture,[S,E]=_.renderPass!=="translucent"||C?[{},g]:_.stencilConfigForOverlap(g);for(let k of E){let F=l.getTile(k);if(F.needsHillshadePrepare&&_.renderPass==="offscreen")f8(_,F,u);else if(_.renderPass==="translucent"){let z=_.depthModeForSublayer(0,Vi.ReadOnly),q=u.paint.get("hillshade-emissive-strength"),U=_.colorModeForDrapableLayerRenderPass(q),Y=C&&_.terrain?_.terrain.stencilModeForRTTOverlap(k):S[k.overscaledZ];m8(_,k,F,u,z,Y,U)}}b.viewport.set([0,0,_.width,_.height]),_.resetStencilClippingMasks()},raster:function(_,l,u,g,b,C){if(_.renderPass!=="translucent"||u.paint.get("raster-opacity")===0)return;let S=_.transform.projection.name==="globe",E=u.paint.get("raster-elevation")!==0,k=E&&S;if(_.renderElevatedRasterBackface&&!k)return;let F=_.context,z=F.gl,q=l.getSource(),U=(function(ke,Ne,Me,De){let Be=Ne.paint.get("raster-color"),bt=ke.type==="raster-array",nt=[],kt=Ne.paint.get("raster-resampling"),ft=Ne.paint.get("raster-color-mix"),At=Ne.paint.get("raster-color-range"),pi=[ft[0],ft[1],ft[2],0],vt=ft[3],Ke=kt==="nearest"?De.NEAREST:De.LINEAR;if(bt&&(nt.push("RASTER_ARRAY"),Be||nt.push("RASTER_COLOR"),kt==="linear"&&nt.push("RASTER_ARRAY_LINEAR"),Ke=De.NEAREST,!At&&ke.rasterLayers)){let Ot=ke.rasterLayers.find(({id:Ct})=>Ct===Ne.sourceLayer);Ot&&Ot.fields&&Ot.fields.range&&(At=Ot.fields.range)}if(At=At||[0,1],Be){nt.push("RASTER_COLOR"),Me.activeTexture.set(De.TEXTURE2),Ne.updateColorRamp(At);let Ot=Ne.colorRampTexture;Ot||(Ot=Ne.colorRampTexture=new r.T(Me,Ne.colorRamp,De.RGBA8)),Ot.bind(De.LINEAR,De.CLAMP_TO_EDGE)}return{mix:pi,range:At,offset:vt,defines:nt,resampling:Ke}})(q,u,F,z);if(q instanceof r.aS&&!g.length&&!S)return;let Y=u.paint.get("raster-emissive-strength"),X=_.colorModeForDrapableLayerRenderPass(Y),J=_.terrain&&_.terrain.renderingToTexture,ae=!_.options.moving,ne=u.paint.get("raster-resampling")==="nearest"?z.NEAREST:z.LINEAR;if(q instanceof r.aS&&!g.length&&(q.onNorthPole||q.onSouthPole)){let ke=E?_.stencilModeFor3D():Mn.disabled;return void Zw(!!q.onNorthPole,null,_,l,u,Y,U,Ln.disabled,ke)}if(!g.length)return;let[ce,_e]=q instanceof r.aS||J?[{},g]:_.stencilConfigForOverlap(g),xe=_e[_e.length-1].overscaledZ;k&&U.defines.push("PROJECTION_GLOBE_VIEW"),E&&U.defines.push("RENDER_CUTOFF");let Pe=(ke,Ne,Me)=>{for(let De of ke){let Be=De.toUnwrapped(),bt=l.getTile(De);if(J&&(!bt||!bt.hasData()))continue;F.activeTexture.set(z.TEXTURE0);let nt=YL(bt,q,u,U);if(!nt||!nt.texture)continue;let{texture:kt,mix:ft,offset:At,tileSize:pi,buffer:vt}=nt,Ke,Ot;J?(Ke=Vi.disabled,Ot=De.projMatrix):E?(Ke=new Vi(z.LEQUAL,Vi.ReadWrite,_.depthRangeFor3D),Ot=S?Float32Array.from(_.transform.expandedFarZProjMatrix):_.transform.calculateProjMatrix(Be,ae)):(Ke=_.depthModeForSublayer(De.overscaledZ-xe,u.paint.get("raster-opacity")===1?Vi.ReadWrite:Vi.ReadOnly,z.LESS),Ot=_.transform.calculateProjMatrix(Be,ae));let Ct=_.terrain&&J?_.terrain.stencilModeForRTTOverlap(De):ce[De.overscaledZ],Kt=C?0:u.paint.get("raster-fade-duration");bt.registerFadeDuration(Kt);let di=l.findLoadedParent(De,0),Ai=m_(bt,di,l,_.transform,Kt),ri,ei;!Ai.isFading&&bt.refreshedUponExpiration&&(bt.refreshedUponExpiration=!1),_.terrain&&_.terrain.prepareDrawTile(),F.activeTexture.set(z.TEXTURE0),kt.bind(ne,z.CLAMP_TO_EDGE),F.activeTexture.set(z.TEXTURE1),di?(di.texture&&di.texture.bind(ne,z.CLAMP_TO_EDGE),ri=Math.pow(2,di.tileID.overscaledZ-bt.tileID.overscaledZ),ei=[bt.tileID.canonical.x*ri%1,bt.tileID.canonical.y*ri%1]):kt.bind(ne,z.CLAMP_TO_EDGE),"useMipmap"in kt&&F.extTextureFilterAnisotropic&&_.transform.pitch>20&&z.texParameterf(z.TEXTURE_2D,F.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,F.extTextureFilterAnisotropicMax);let an=_.transform,Xi,tn=E?R8(an):[0,0,0,0],Yi,Nn,no,lo,Sr,$n=0;if(k&&q instanceof r.aS&&q.coordinates.length>3)Yi=Float32Array.from(r.bk(r.dF(new r.cC(0,0,0)))),Nn=Float32Array.from(an.globeMatrix),no=Float32Array.from(r.dB(an)),lo=[r.aF(an.center.lng),r.aJ(an.center.lat)],Xi=q.elevatedGlobePerspectiveTransform,Sr=q.elevatedGlobeGridMatrix||new Float32Array(9);else if(k){let oo=r.dC(De.canonical);$n=r.dD(oo.getCenter().lat),Yi=Float32Array.from(r.bk(r.dF(De.canonical))),Nn=Float32Array.from(an.globeMatrix),no=Float32Array.from(r.dB(an)),lo=[r.aF(an.center.lng),r.aJ(an.center.lat)],Xi=[0,0],Sr=Float32Array.from(r.dE(De.canonical,oo,$n,an.worldSize/an._pixelsPerMercatorPixel))}else Xi=q instanceof r.aS?q.perspectiveTransform:[0,0],Yi=new Float32Array(16),Nn=new Float32Array(9),no=new Float32Array(16),lo=[0,0],Sr=new Float32Array(9);let Qo=Bw(Ot,Yi,Nn,no,Sr,ei||[0,0],r.aj(_.transform.zoom),lo,tn,ri||1,Ai,u,Xi,E?u.paint.get("raster-elevation"):0,2,ft,At,U.range,pi,vt,Y),yr=_.isTileAffectedByFog(De),hs=_.getOrCreateProgram("raster",{defines:U.defines,overrideFog:yr});if(_.uploadCommonUniforms(F,hs,Be),q instanceof r.aS){let oo=q.elevatedGlobeVertexBuffer,ar=q.elevatedGlobeIndexBuffer;if(J||!S)q.boundsBuffer&&q.boundsSegments&&hs.draw(_,z.TRIANGLES,Ke,Mn.disabled,X,Ln.disabled,Qo,u.id,q.boundsBuffer,_.quadTriangleIndexBuffer,q.boundsSegments);else if(oo&&ar){let ir=an.zoom<=r.cZ?q.elevatedGlobeSegments:q.getSegmentsForLongitude(an.center.lng);ir&&hs.draw(_,z.TRIANGLES,Ke,Mn.disabled,X,Ne,Qo,u.id,oo,ar,ir)}}else if(k){Ke=new Vi(z.LEQUAL,Vi.ReadOnly,_.depthRangeFor3D);let oo=_.globeSharedBuffers;if(oo){let[ar,ir,pr]=oo.getGridBuffers($n,!1);hs.draw(_,z.TRIANGLES,Ke,Me||Ct,_.colorModeForRenderPass(),Ne,Qo,u.id,ar,ir,pr)}}else{let{tileBoundsBuffer:oo,tileBoundsIndexBuffer:ar,tileBoundsSegments:ir}=_.getTileBoundsBuffers(bt);hs.draw(_,z.TRIANGLES,Ke,Ct,X,Ln.disabled,Qo,u.id,oo,ar,ir)}}if(!(q instanceof r.aS)&&k)for(let De of ke){let Be=De.canonical.y===(1<>>16,2654435769),((De=Math.imul(De^De>>>16,2654435769))>>>0)/4294967296},Me=1/1.1;for(let De=0;Der.e6[Ct](kt));vt.push(kt);let Ke=kt.canonical.x,Ot=kt.canonical.y;for(let Ct of vt){let Kt=xe.getTile(Be?Ct.wrapped():Ct);if(!Kt)continue;let di=Kt.rasterParticleState;if(!di)continue;let Ai=Ct.canonical.x+(1<ke.tileID)),Y&&(F.activeTexture.set(z.TEXTURE0),_.imageManager.bind(_.context,u.scope)),k){let ke=_.getOrCreateProgram(_e,{overrideFog:!1,overrideRtt:!0}),Ne=new Float32Array(r.bA([])),Me=new r.aO(0,0,0,0,0),De=Y?Uw(Ne,E,S,_,0,u.scope,X,k,{tileID:Me,tileSize:U}):Vw(Ne,E,S,b.toPremultipliedRenderColor(C?null:u.lut));ke.draw(_,z.TRIANGLES,ne,ae,ce,Ln.disabled,De,u.id,_.viewportBuffer,_.quadTriangleIndexBuffer,_.viewportSegments)}else for(let ke of Pe){let Ne=_.isTileAffectedByFog(ke),Me=_.getOrCreateProgram(_e,{overrideFog:Ne}),De=ke.toUnwrapped(),Be=g?ke.projMatrix:_.transform.calculateProjMatrix(De);_.prepareDrawTile();let bt=l?l.getTile(ke):xe?xe[ke.key]:new mf(ke,U,q.zoom,_),nt=Y?Uw(Be,E,S,_,0,u.scope,X,k,{tileID:ke,tileSize:U}):Vw(Be,E,S,b.toPremultipliedRenderColor(C?null:u.lut));_.uploadCommonUniforms(F,Me,De);let{tileBoundsBuffer:kt,tileBoundsIndexBuffer:ft,tileBoundsSegments:At}=_.getTileBoundsBuffers(bt);Me.draw(_,z.TRIANGLES,ne,ae,ce,Ln.disabled,nt,u.id,kt,ft,At)}},sky:function(_,l,u){let g=_._atmosphere?r.aj(_.transform.zoom):1,b=u.paint.get("sky-opacity")*g;if(b===0)return;let C=_.context,S=u.paint.get("sky-type"),E=new Vi(C.gl.LEQUAL,Vi.ReadOnly,[0,1]),k=_.frameCounter/1e3%1;S==="atmosphere"?_.renderPass==="offscreen"?u.needsSkyboxCapture(_)&&((function(F,z,q,U){let Y=F.context,X=Y.gl,J=z.skyboxFbo;if(!J){J=z.skyboxFbo=Y.createFramebuffer(32,32,!0,null),z.skyboxGeometry=new MD(Y),z.skyboxTexture=Y.gl.createTexture(),X.bindTexture(X.TEXTURE_CUBE_MAP,z.skyboxTexture),X.texParameteri(X.TEXTURE_CUBE_MAP,X.TEXTURE_WRAP_S,X.CLAMP_TO_EDGE),X.texParameteri(X.TEXTURE_CUBE_MAP,X.TEXTURE_WRAP_T,X.CLAMP_TO_EDGE),X.texParameteri(X.TEXTURE_CUBE_MAP,X.TEXTURE_MIN_FILTER,X.LINEAR),X.texParameteri(X.TEXTURE_CUBE_MAP,X.TEXTURE_MAG_FILTER,X.LINEAR);for(let _e=0;_e<6;++_e)X.texImage2D(X.TEXTURE_CUBE_MAP_POSITIVE_X+_e,0,X.RGBA,32,32,0,X.RGBA,X.UNSIGNED_BYTE,null)}Y.bindFramebuffer.set(J.framebuffer),Y.viewport.set([0,0,32,32]);let ae=z.getCenter(F,!0),ne=F.getOrCreateProgram("skyboxCapture"),ce=new Float64Array(16);r.bA(ce),r.ek(ce,ce,.5*-Math.PI),x_(F,z,ne,ce,ae,0),r.bA(ce),r.ek(ce,ce,.5*Math.PI),x_(F,z,ne,ce,ae,1),r.bA(ce),r.cT(ce,ce,.5*-Math.PI),x_(F,z,ne,ce,ae,2),r.bA(ce),r.cT(ce,ce,.5*Math.PI),x_(F,z,ne,ce,ae,3),r.bA(ce),x_(F,z,ne,ce,ae,4),r.bA(ce),r.ek(ce,ce,Math.PI),x_(F,z,ne,ce,ae,5),Y.viewport.set([0,0,F.width,F.height])})(_,u),u.markSkyboxValid(_)):_.renderPass==="sky"&&(function(F,z,q,U,Y){let X=F.context,J=X.gl,ae=F.transform,ne=F.getOrCreateProgram("skybox");X.activeTexture.set(J.TEXTURE0),J.bindTexture(J.TEXTURE_CUBE_MAP,z.skyboxTexture);let ce=((_e,xe,Pe,ke,Ne)=>({u_matrix:_e,u_sun_direction:xe,u_cubemap:0,u_opacity:ke,u_temporal_offset:Ne}))(ae.skyboxMatrix,z.getCenter(F,!1),0,U,Y);F.uploadCommonUniforms(X,ne),ne.draw(F,J.TRIANGLES,q,Mn.disabled,F.colorModeForRenderPass(),Ln.backCW,ce,"skybox",z.skyboxGeometry.vertexBuffer,z.skyboxGeometry.indexBuffer,z.skyboxGeometry.segment)})(_,u,E,b,k):S==="gradient"&&_.renderPass==="sky"&&(function(F,z,q,U,Y){let X=F.context,J=X.gl,ae=F.transform,ne=F.getOrCreateProgram("skyboxGradient");z.skyboxGeometry||(z.skyboxGeometry=new MD(X)),X.activeTexture.set(J.TEXTURE0);let ce=z.colorRampTexture;ce||(ce=z.colorRampTexture=new r.T(X,z.colorRamp,J.RGBA8)),ce.bind(J.LINEAR,J.CLAMP_TO_EDGE);let _e=((xe,Pe,ke,Ne,Me)=>({u_matrix:xe,u_color_ramp:0,u_center_direction:Pe,u_radius:r.an(ke),u_opacity:Ne,u_temporal_offset:Me}))(ae.skyboxMatrix,z.getCenter(F,!1),z.paint.get("sky-gradient-radius"),U,Y);F.uploadCommonUniforms(X,ne),ne.draw(F,J.TRIANGLES,q,Mn.disabled,F.colorModeForRenderPass(),Ln.backCW,_e,"skyboxGradient",z.skyboxGeometry.vertexBuffer,z.skyboxGeometry.indexBuffer,z.skyboxGeometry.segment)})(_,u,E,b,k)},custom:function(_,l,u,g){let b=_.context,C=u.implementation;if(!_.transform.projection.unsupportedLayers||!_.transform.projection.unsupportedLayers.includes("custom")||_.terrain&&(_.terrain.renderingToTexture||_.renderPass==="offscreen")&&u.isDraped(l)){if(_.renderPass==="offscreen"){let S=C.prerender;if(S){if(_.setCustomLayerDefaults(),b.setColorMode(_.colorModeForRenderPass()),_.transform.projection.name==="globe"){let E=_.transform.pointMerc;S.call(C,b.gl,_.transform.customLayerMatrix(),_.transform.getProjection(),_.transform.globeToMercatorMatrix(),r.aj(_.transform.zoom),[E.x,E.y],_.transform.pixelsPerMeterRatio)}else S.call(C,b.gl,_.transform.customLayerMatrix());b.setDirty(),_.setBaseState()}}else if(_.renderPass==="translucent"){if(_.terrain&&_.terrain.renderingToTexture){let E=C.renderToTile;if(E){let k=g[0].canonical,F={x:k.x+g[0].wrap*(C.wrapTileId?0:1<{S&&(S.useNormalOffset=!0,E||(S.enabled=!0))},F=l.getSource();if(_.renderPass==="light-beam"&&F.type!=="batched-model")return;if(F.type==="vector"||F.type==="geojson")return(function(ne,ce,_e,xe,Pe){let ke=ne.transform;if(ke.projection.name!=="mercator")return void r.w(`Drawing 3D models for ${ke.projection.name} projection is not yet implemented`);let Ne=ke.getFreeCameraOptions().position;if(!ne.modelManager)return;let Me=ne.modelManager;_e.modelManager=Me;let De=ne.shadowRenderer;if(!_e._unevaluatedLayout._values.hasOwnProperty("model-id"))return;let Be=_e._unevaluatedLayout._values["model-id"],bt=Object.assign({},_e.layout.get("model-id").parameters),nt=ne.style.order.indexOf(_e.fqid);for(let kt of xe){let ft=ce.getTile(kt).getBucket(_e);if(!ft||ft.projection.name!==ke.projection.name)continue;let At=ft.getModelUris();At&&!ft.modelsRequested&&(Me.addModelsFromBucket(At,Pe),ft.modelsRequested=!0);let pi=Sy(kt,ke);bt.zoom=pi;let vt=Be.possiblyEvaluate(bt);if(JL(ne,ft,kt),Dp.shadowUniformsInitialized=!1,Dp.useSingleShadowCascade=!!De&&De.getMaxCascadeForTile(kt.toUnwrapped())===0,ne.renderPass==="shadow"&&De){if(ne.currentShadowCascade===1&&ft.isInsideFirstShadowMapFrustum)continue;let Ct=ke.calculatePosMatrix(kt.toUnwrapped(),ke.worldSize);if(Dp.tileMatrix.set(Ct),Dp.shadowTileMatrix=Float32Array.from(De.calculateShadowPassMatrixFromMatrix(Ct)),Dp.aabb.min=[0,0,0],Dp.aabb.max[0]=Dp.aabb.max[1]=r.al,Dp.aabb.max[2]=0,tF(ft,Dp,ne,_e.scope))continue}let Ke=1<0&&ne.style.isLayerClipped(_e,ce.getSource())&&ft.updateReplacement(kt,ne.replacementSource,nt,Pe)&&(ft.uploaded=!1,ft.upload(ne.context));for(let Ct in ft.instancesPerModel){let Kt=ft.instancesPerModel[Ct];Kt.features.length>0&&(Ct=vt.evaluate(Kt.features[0].feature,{}));let di=Me.getModel(Ct,Pe);if(di||Me.hasURLBeenRequested(Ct)||ft.modelUris.includes(Ct)||(ft.modelUris.push(Ct),ft.modelsRequested=!1),di&&di.uploaded)for(let Ai of di.nodes)eF(ne,_e,Ai,Kt,Ot,kt,Dp)}}})(_,l,u,g,F.type==="vector"?u.scope:""),void k();if(!F.loaded())return;if(F.type==="batched-model")return(function(ne,ce,_e,xe){_e.resetLayerRenderingStats(ne);let Pe=ne.context,ke=ne.transform,Ne=ne.style.fog,Me=ne.shadowRenderer;if(ke.projection.name!=="mercator")return void r.w(`Drawing 3D landmark models for ${ke.projection.name} projection is not yet implemented`);let De=ne.transform.getFreeCameraOptions().position,Be=r.c4([],[De.x,De.y,De.z],ne.transform.worldSize),bt=r.et([],Be),nt=r.bA([]),kt=r.ec(ke.center.lat,ke.zoom),ft=r.bq([],[1,1,1/kt]);r.br(nt,nt,bt);let At=_e.paint.get("model-opacity").constantOr(1),pi=new Vi(Pe.gl.LEQUAL,Vi.ReadWrite,ne.depthRangeFor3D),vt=new Vi(Pe.gl.LEQUAL,Vi.ReadOnly,ne.depthRangeFor3D),Ke=new r.d8([1/0,1/0,1/0],[-1/0,-1/0,-1/0]),Ot=ne.renderPass==="shadow",Ct=Ot&&Me?Me.getCurrentCascadeFrustum():ke.getFrustum(ke.scaleZoom(ke.worldSize)),Kt=_e.paint.get("model-front-cutoff"),di=Kt[2]<1,Ai=yf(ne,_e.paint.get("model-cutoff-fade-range")),ri=_e.getLayerRenderingStats();(function(ei,an,Xi,tn){let Yi=ei.terrain?ei.terrain.exaggeration():0,Nn=ei.transform.zoom;for(let no of tn){let lo=an.getTile(no).getBucket(Xi);lo&&(lo.setFilter(Xi.filter),ei.conflationActive&&lo.updateReplacement(no,ei.replacementSource),lo.evaluateTransform(ei,Xi),ei.terrain&&Yi>0&&lo.elevationUpdate(ei.terrain,Yi,no,Xi.source),lo.needsReEvaluation(ei,Nn,Xi)&&lo.evaluate(Xi))}})(ne,ce,_e,xe),(function(){let ei,an,Xi;di?(ei=xe.length-1,an=-1,Xi=-1):(ei=0,an=xe.length,Xi=1);let tn=new Float64Array(16),Yi=r.cz(),Nn=new r.P(0,0);for(let no=ei;no!==an;no+=Xi){let lo=xe[no],Sr=ce.getTile(lo).getBucket(_e);if(!Sr||!Sr.uploaded)continue;let $n=!1;Me&&($n=Me.getMaxCascadeForTile(lo.toUnwrapped())===0);let Qo=ke.calculatePosMatrix(lo.toUnwrapped(),ke.worldSize),yr=Sr.modelTraits;!Ot&&di&&(r.bl(tn,Qo),r.af(Yi,Be,tn),Nn.x=Yi[0],Nn.y=Yi[1]);let hs=[];Sr.setFilter(_e.filter);for(let oo of Sr.getNodesInfo()){if(oo.hiddenByReplacement||!oo.node.meshes)continue;let ar=oo.node,ir=0;ne.terrain&&ar.elevation&&(ir=ar.elevation*ne.terrain.exaggeration());let pr=(()=>{let Al=oo.aabb;return Ke.min=[...Al.min],Ke.max=[...Al.max],Ke.min[2]+=ir,Ke.max[2]+=ir,r.af(Ke.min,Ke.min,Qo),r.af(Ke.max,Ke.max,Qo),Ke})(),vs=oo.evaluatedScale;if(vs[0]<=1&&vs[1]<=1&&vs[2]<=1&&pr.intersects(Ct)===0)continue;if(!Ot&&di){let Al=.16666666666666666;oo.cameraCollisionOpacity=Be[0]>pr.min[0]&&Be[0]pr.min[1]&&Be[1]!di||oo.opacity===1&&ar.opacity===1?oo.depthar.depth?-1:1);for(let oo of hs){let ar=oo.nodeInfo,ir=ar.node,pr=r.aB([],ft,oo.tileModelMatrix);r.aB(pr,nt,pr);let vs=r.bl([],pr);r.ed(vs,vs),r.cR(vs,vs,L8),pr=r.aB(pr,pr,ir.matrix);let Ys=ne.renderPass==="light-beam",al=_e.paint.get("model-color-use-theme").constantOr("default")==="none",bs=yr&r.ez.HasMapboxMeshFeatures,co=bs?0:ar.evaluatedRMEA[0][2];for(let Rn=0;Rn=pn||za>=pn}}let uu=Ir.material,Td;uu.occlusionTexture&&uu.occlusionTexture.offsetScale&&(Td=uu.occlusionTexture.offsetScale,fa.defines.push("OCCLUSION_TEXTURE_TRANSFORM"));let Ed=ne.getOrCreateProgram("model",fa);!Ot&&Me&&Me.setupShadowsFromMatrix(oo.tileModelMatrix,Ed,Me.useNormalOffset),ne.uploadCommonUniforms(Pe,Ed,null,du);let Wc=uu.pbrMetallicRoughness;Wc.metallicFactor=.9,Wc.roughnessFactor=.5;let qu=Hw(new Float32Array(ws),new Float32Array(pr),new Float32Array(vs),new Float32Array(ir.matrix),ne,oo.opacity,Wc.baseColorFactor,uu.emissiveFactor,Wc.metallicFactor,Wc.roughnessFactor,uu,co,_e,[0,0,0],Td);!zs&&(ar.hasTranslucentParts||oo.opacity<1)&&Ed.draw(ne,Pe.gl.TRIANGLES,pi,Mn.disabled,so.disabled,Ln.backCCW,qu,_e.id,Ir.vertexBuffer,Ir.indexBuffer,Ir.segments,_e.paint,ne.transform.zoom,void 0,Al),Ed.draw(ne,Pe.gl.TRIANGLES,zs?vt:pi,Mn.disabled,zs||oo.opacity<1||ar.hasTranslucentParts?so.alphaBlended:so.unblended,Ln.backCCW,qu,_e.id,Ir.vertexBuffer,Ir.indexBuffer,Ir.segments,_e.paint,ne.transform.zoom,void 0,Al)}}}})()})(_,l,u,g),void k();if(F.type!=="model")return;let z=F.getModels(),q=[],U=_.transform.getFreeCameraOptions().position,Y=r.c4([],[U.x,U.y,U.z],_.transform.worldSize);r.et(Y,Y);let X=[],J=[],ae=0;for(let ne of z){let ce=u.paint.get("model-rotation").constantOr(null),_e=u.paint.get("model-scale").constantOr(null),xe=u.paint.get("model-translation").constantOr(null);ne.computeModelMatrix(_,ce,_e,xe,!0,!0,!1);let Pe=r.bA([]),ke=r.ec(ne.position.lat,_.transform.zoom),Ne=r.bq([],[1,1,1/ke]);r.br(Pe,Pe,Y),q.push({zScaleMatrix:Ne,negCameraPosMatrix:Pe});for(let Me of ne.nodes)Xw(_.transform,Me,ne.matrix,_.transform.expandedFarZProjMatrix,ae,X,J);ae++}if(X.sort((ne,ce)=>ce.depth-ne.depth),_.renderPass!=="shadow"){if(b===1)for(let ne of J)S_(ne,_,u,q[ne.modelIndex],Mn.disabled,_.colorModeForRenderPass());else{for(let ne of J)S_(ne,_,u,q[ne.modelIndex],Mn.disabled,so.disabled);for(let ne of J)S_(ne,_,u,q[ne.modelIndex],_.stencilModeFor3D(),_.colorModeForRenderPass());_.resetStencilClippingMasks()}for(let ne of X)S_(ne,_,u,q[ne.modelIndex],Mn.disabled,_.colorModeForRenderPass());k()}else{for(let ne of J)hx(ne.mesh,ne.nodeModelMatrix,_,u);for(let ne of X)hx(ne.mesh,ne.nodeModelMatrix,_,u);k()}}},I_={line:function(_,l,u){if(_.hasElevatedBuckets=!1,_.hasNonElevatedBuckets=!1,_._unevaluatedLayout.getValue("line-elevation-reference")!==void 0||_._unevaluatedLayout.getValue("line-z-offset")!==void 0){if(l){let g=l.getVisibleCoordinates();for(let b of g){let C=l.getTile(b).getBucket(_);if(C&&(C.elevationType!=="none"?_.hasElevatedBuckets=!0:_.hasNonElevatedBuckets=!0,_.hasElevatedBuckets&&_.hasNonElevatedBuckets))break}}}else _.hasNonElevatedBuckets=!0},model:function(_,l,u){let g=l.getSource();if(!g.loaded())return;if(g.type==="vector"||g.type==="geojson")return void(u.modelManager&&u.modelManager.upload(u,g.type==="vector"?_.scope:""));if(g.type==="batched-model"||g.type!=="model")return;let b=g.getModels();for(let C of b)C.upload(u.context)},raster:function(_,l,u){let g=l.getSource();if(!(g instanceof pf&&g.loaded()))return;let b=_.sourceLayer||g.rasterLayerIds&&g.rasterLayerIds[0];if(!b)return;let C=_.paint.get("raster-array-band")||g.getInitialBand(b);if(C==null)return;let S=l.getIds().map(E=>l.getTileByID(E));for(let E of S)E.updateNeeded(_.id,C)&&g.prepareTile(E,b,_.id,C)},"raster-particle":function(_,l,u){let g=l.getSource();if(!(g instanceof pf&&g.loaded()))return;let b=_.sourceLayer||g.rasterLayerIds&&g.rasterLayerIds[0];if(!b)return;let C=_.paint.get("raster-particle-array-band")||g.getInitialBand(b);if(C==null)return;let S=l.getIds().map(E=>l.getTileByID(E));for(let E of S)E.updateNeeded(_.id,C)&&g.prepareTile(E,b,_.id,C)}},T_={fill:y_},Df={fill:function(_,l,u,g){if(!u.layout||u.layout.get("fill-elevation-reference")==="none")return;let b=_.context.gl,C=new Vi(b.LEQUAL,Vi.ReadOnly,_.depthRangeFor3D),S=new Mn({func:b.ALWAYS,mask:255},255,255,b.KEEP,b.KEEP,b.REPLACE),E=_.transform.getFreeCameraOptions().position,k=_.getOrCreateProgram("elevatedStructuresDepthReconstruct");for(let F of g){let z=l.getTile(F),q=z.getBucket(u);if(!q)continue;let U=q.elevatedStructures;if(!U||U.depthSegments.segments[0].primitiveLength===0)continue;let Y=KL(F.toUnwrapped(),E),X=_.translatePosMatrix(F.projMatrix,z,u.paint.get("fill-translate"),u.paint.get("fill-translate-anchor")),J=Nw(X,Y,0,1,0);k.draw(_,b.TRIANGLES,C,S,so.disabled,Ln.disabled,J,u.id,U.vertexBuffer,U.indexBuffer,U.depthSegments,u.paint,_.transform.zoom)}}};class PD{constructor(l,u,g,b,C,S){this.context=new wD(l,u),this.transform=g,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.tp=C,this._timeStamp=r.o.now(),this._averageFPS=0,this._fpsHistory=[],this._dt=0,this._debugParams={forceEnablePrecipitation:!1,showTerrainProxyTiles:!1,fpsWindow:30,continousRedraw:!1,enabledLayers:{}};let E=["fill","line","symbol","circle","heatmap","fill-extrusion","building","raster","raster-particle","hillshade","model","background","sky"];for(let F of E)this._debugParams.enabledLayers[F]=!0;C.registerParameter(this._debugParams,["Terrain"],"showTerrainProxyTiles",{},()=>{this.style.map.triggerRepaint()}),C.registerParameter(this._debugParams,["Precipitation"],"forceEnablePrecipitation"),C.registerParameter(this._debugParams,["FPS"],"fpsWindow",{min:1,max:100,step:1}),C.registerBinding(this._debugParams,["FPS"],"continousRedraw",{readonly:!0,label:"continuous redraw"}),C.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"value"}),C.registerBinding(this,["FPS"],"_averageFPS",{readonly:!0,label:"graph",view:"graph",min:0,max:200});for(let F of E)C.registerParameter(this._debugParams.enabledLayers,["Debug","Layers"],F);this.occlusionParams=new eS(C),this.setup(),this.numSublayers=nu.maxUnderzooming+nu.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={},this.conflationActive=!1,this.replacementSource=new r.eG,this.longestCutoffRange=0,this.minCutoffZoom=0,this._fogVisible=!1,this._cachedTileFogOpacities={},this._shadowRenderer=new c8(this),this._wireframeDebugCache=new nF,this.renderDefaultNorthPole=!0,this.renderDefaultSouthPole=!0,this.layersWithOcclusionOpacity=[];let k=new r.q({width:1,height:1},Uint8Array.of(0,0,0,0));this.emptyDepthTexture=new r.T(this.context,k,l.RGBA8),this._clippingActiveLastFrame=!1,this.scaleFactor=b,this.worldview=S}updateTerrain(l,u){let g=!!l&&!!l.terrain&&this.transform.projection.supportsTerrain;if(!(g||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new lx(this,l));let b=this._terrain;this.transform.elevation=g?b:null,b.update(l,this.transform,u),this.transform.elevation&&!b.enabled&&(this.transform.elevation=null)}_updateFog(l){let u=l.fog;if(!u||this.transform.projection.name==="globe"||u.getOpacity(this.transform.pitch)<1||u.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);let[g,b]=u.getFovAdjustedRange(this.transform._fov);if(g>b)return void(this.transform.fogCullDistSq=null);let C=g+.78*(b-g);this.transform.fogCullDistSq=C*C}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 lx(this,this.style)),this._forceTerrainMode=l}get shadowRenderer(){return this._shadowRenderer&&this._shadowRenderer.enabled?this._shadowRenderer:null}get wireframeDebugCache(){return this._wireframeDebugCache}resize(l,u){if(this.width=l*r.o.devicePixelRatio,this.height=u*r.o.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let g of this.style.order)this.style._mergedLayers[g].resize()}setup(){let l=this.context,u=new r.bd;u.emplaceBack(0,0),u.emplaceBack(r.al,0),u.emplaceBack(0,r.al),u.emplaceBack(r.al,r.al),this.tileExtentBuffer=l.createVertexBuffer(u,r.bf.members),this.tileExtentSegments=r.bg.simpleSegment(0,0,4,2);let g=new r.bd;g.emplaceBack(0,0),g.emplaceBack(r.al,0),g.emplaceBack(0,r.al),g.emplaceBack(r.al,r.al),this.debugBuffer=l.createVertexBuffer(g,r.bf.members),this.debugSegments=r.bg.simpleSegment(0,0,4,5);let b=new r.bd;b.emplaceBack(-1,-1),b.emplaceBack(1,-1),b.emplaceBack(-1,1),b.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(b,r.bf.members),this.viewportSegments=r.bg.simpleSegment(0,0,4,2);let C=new r.b0;C.emplaceBack(0,0,0,0),C.emplaceBack(r.al,0,r.al,0),C.emplaceBack(0,r.al,0,r.al),C.emplaceBack(r.al,r.al,r.al,r.al),this.mercatorBoundsBuffer=l.createVertexBuffer(C,r.bi.members),this.mercatorBoundsSegments=r.bg.simpleSegment(0,0,4,2);let S=new r.b1;S.emplaceBack(0,1,2),S.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(S);let E=new r.be;for(let F of[0,1,3,2,0])E.emplaceBack(F);this.debugIndexBuffer=l.createIndexBuffer(E),this.emptyTexture=new r.T(l,new r.q({width:1,height:1},Uint8Array.of(0,0,0,0)),l.gl.RGBA8),this.identityMat=r.bC();let k=this.context.gl;this.stencilClearMode=new Mn({func:k.ALWAYS,mask:0},0,255,k.ZERO,k.ZERO,k.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,Vi.disabled,this.stencilClearMode,so.disabled,Ln.disabled,h_(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(l,u,g){if(!u||this.currentStencilSource===u.id||!l.isTileClipped()||!g||g.length===0)return;if(this._tileClippingMaskIDs&&!this.terrain){let E=!1;for(let k of g)if(this._tileClippingMaskIDs[k.key]===void 0){E=!0;break}if(!E)return}this.currentStencilSource=u.id;let b=this.context,C=b.gl;this.nextStencilID+g.length>256&&this.clearStencil(),b.setColorMode(so.disabled),b.setDepthMode(Vi.disabled);let S=this.getOrCreateProgram("clippingMask");this._tileClippingMaskIDs={};for(let E of g){let k=u.getTile(E),F=this._tileClippingMaskIDs[E.key]=this.nextStencilID++,{tileBoundsBuffer:z,tileBoundsIndexBuffer:q,tileBoundsSegments:U}=this.getTileBoundsBuffers(k);S.draw(this,C.TRIANGLES,Vi.disabled,new Mn({func:C.ALWAYS,mask:0},F,255,C.KEEP,C.KEEP,C.REPLACE),so.disabled,Ln.disabled,h_(E.projMatrix),"$clipping",z,q,U)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let l=this.nextStencilID++,u=this.context.gl;return new Mn({func:u.NOTEQUAL,mask:255},l,255,u.KEEP,u.KEEP,u.REPLACE)}stencilModeForClipping(l){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(l);let u=this.context.gl;return new Mn({func:u.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,u.KEEP,u.KEEP,u.REPLACE)}stencilConfigForOverlap(l){let u=this.context.gl,g=l.sort((S,E)=>E.overscaledZ-S.overscaledZ),b=g[g.length-1].overscaledZ,C=g[0].overscaledZ-b+1;if(C>1){this.currentStencilSource=void 0,this.nextStencilID+C>256&&this.clearStencil();let S={};for(let E=0;Ethis._debugParams.fpsWindow&&this._fpsHistory.splice(0,this._fpsHistory.length-this._debugParams.fpsWindow),this._averageFPS=Math.round(this._fpsHistory.reduce((l,u)=>l+u/this._fpsHistory.length,0))}render(l,u){let g=r.o.now();this._dt=g-this._timeStamp,this._timeStamp=g,this._wireframeDebugCache.update(this.frameCounter),this._debugParams.continousRedraw=l.map.repaint,this.style=l,this.options=u;let b=this.style._mergedLayers,C=!(!this.terrain||!this.terrain.enabled),S=()=>this.style._getOrder(C).filter(vt=>{let Ke=b[vt];return!(Ke.type in this._debugParams.enabledLayers)||this._debugParams.enabledLayers[Ke.type]}),E=S(),k=!1,F=!1,z=null;for(let vt of E){let Ke=b[vt];Ke.type==="circle"?k=!0:Ke.type==="building"?z=Ke:Ke.type==="symbol"&&(Ke.hasOcclusionOpacityProperties?F=!0:k=!0)}let q=E.map(vt=>b[vt]),U=this.style._mergedSourceCaches;this.imageManager=l.imageManager,this.modelManager=l.modelManager,this.symbolFadeChange=l.placement.symbolFadeChange(r.o.now()),this.imageManager.beginFrame();let Y=0,X=!1;for(let vt in U){let Ke=U[vt];Ke.used&&(Ke.prepare(this.context),Ke.getSource().usedInConflation&&++Y)}let J=!1;for(let vt of q)vt.isHidden(this.transform.zoom)||(vt.type==="clip"&&(J=!0),this.prepareLayer(vt));let ae={},ne={},ce={},_e={},xe={};for(let vt in U){let Ke=U[vt];ae[vt]=Ke.getVisibleCoordinates(),ne[vt]=ae[vt].slice().reverse(),ce[vt]=Ke.getVisibleCoordinates(!0).reverse(),_e[vt]=Ke.getShadowCasterCoordinates(),xe[vt]=Ke.sortCoordinatesByDistance(ae[vt])}let Pe=vt=>{let Ke=this.style.getLayerSourceCache(vt);return Ke&&Ke.used?Ke.getSource():null};if(Y||J||this._clippingActiveLastFrame){let vt=[],Ke=[],Ot=0;for(let Ct of q)this.isSourceForClippingOrConflation(Ct,Pe(Ct))&&(vt.push(Ct),Ke.push(Ot)),Ot++;if(vt&&(J||vt.length>1)||this._clippingActiveLastFrame){J=!1;let Ct=[];for(let Kt=0;Kt0){let Ct=Pe(Ke);Ct&&(this.minCutoffZoom=Math.max(Ct.minzoom,this.minCutoffZoom)),Ke.minzoom&&(this.minCutoffZoom=Math.max(Ke.minzoom,this.minCutoffZoom))}Ke.is3D(C)&&(this.opaquePassCutoff===1/0&&(this.opaquePassCutoff=vt),this._lastOcclusionLayer=vt)}let ke=this.style&&this.style.fog;ke?(this._fogVisible=ke.getOpacity(this.transform.pitch)!==0,this._fogVisible&&this.transform.projection.name!=="globe"&&(this._fogVisible=ke.isVisibleOnFrustum(this.transform.cameraFrustum))):this._fogVisible=!1,this._cachedTileFogOpacities={},this.terrain&&(this.terrain.updateTileBinding(ce),this.opaquePassCutoff=0,E=S(),q=E.map(vt=>b[vt]));let Ne=this._shadowRenderer;if(Ne){Ne.updateShadowParameters(this.transform,this.style.directionalLight);for(let vt in U)for(let Ke of ae[vt]){let Ot={min:0,max:0};this.terrain&&(Ot=this.terrain.getMinMaxForTile(Ke)||Ot),Ne.addShadowReceiver(Ke.toUnwrapped(),Ot.min,Ot.max)}}this.transform.projection.name!=="globe"||this.globeSharedBuffers||(this.globeSharedBuffers=new r.eI(this.context)),this.style.fog&&this.transform.projection.supportsFog?(this._atmosphere||(this._atmosphere=new wy(this)),this._atmosphere.update(this)):this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0);let Me=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.snow),De=this._debugParams.forceEnablePrecipitation||!(!this.style||!this.style.rain);if(Me&&!this._snow&&(this._snow=new aF(this)),!Me&&this._snow&&(this._snow.destroy(),delete this._snow),De&&!this._rain&&(this._rain=new ps(this)),!De&&this._rain&&(this._rain.destroy(),delete this._rain),this._snow&&this._snow.update(this),this._rain&&this._rain.update(this),z){this.buildingTileBorderManager||(this.buildingTileBorderManager=new Bs);let vt=this.style.getLayerSourceCache(z);this.buildingTileBorderManager.updateBorders(vt,z)}if(!Fn.has(this.context.gl))return;this.renderPass="offscreen";for(let vt of q){let Ke=l.getLayerSourceCache(vt);if(!vt.hasOffscreenPass()||vt.isHidden(this.transform.zoom))continue;let Ot=Ke?ne[Ke.id]:void 0;(vt.type==="custom"||vt.type==="raster"||vt.type==="raster-particle"||vt.isSky()||Ot&&Ot.length)&&this.renderLayer(this,Ke,vt,Ot)}this.depthRangeFor3D=[0,1-(q.length+2)*this.numSublayers*this.depthEpsilon],this._shadowRenderer&&(this.renderPass="shadow",this._shadowRenderer.drawShadowPass(this.style,_e)),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]);let Be=this.transform.projection.name==="globe"||this.transform.isHorizonVisible(),bt=(()=>{if(u.showOverdrawInspector)return r.ao.black;let vt=this.style.fog;if(vt&&this.transform.projection.supportsFog){let Ke=this.style.getLut(vt.scope);if(!Be){let Ot=vt.properties.get("color-use-theme")==="none",Ct=vt.properties.get("color").toNonPremultipliedRenderColor(Ot?null:Ke).toArray01();return new r.ao(...Ct)}if(Be){let Ot=vt.properties.get("space-color-use-theme")==="none",Ct=vt.properties.get("space-color").toNonPremultipliedRenderColor(Ot?null:Ke).toArray01();return new r.ao(...Ct)}}return r.ao.transparent})();if(this.context.clear({color:bt,depth:1}),this.clearStencil(),this._showOverdrawInspector=u.showOverdrawInspector,this.renderPass="opaque",this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&Be&&this._atmosphere.drawStars(this,this.style.fog),!this.terrain)for(this.currentLayer=E.length-1;this.currentLayer>=0;this.currentLayer--){let vt=q[this.currentLayer],Ke=l.getLayerSourceCache(vt);if(vt.isSky())continue;let Ot=Ke?(vt.is3D(C)?xe:ne)[Ke.id]:void 0;this._renderTileClippingMasks(vt,Ke,Ot),this.renderLayer(this,Ke,vt,Ot)}if(this.style.fog&&this.transform.projection.supportsFog&&this._atmosphere&&!this._showOverdrawInspector&&Be&&this._atmosphere.drawAtmosphereGlow(this,this.style.fog),this.renderPass="sky",(!this._atmosphere||r.aj(this.transform.zoom)>0)&&(this.transform.projection.name==="globe"||this.transform.isHorizonVisible()))for(this.currentLayer=0;this.currentLayer{for(this.currentLayer=0;this.currentLayer0&&vt.hasShadowPass()&&--kt==0){{this.clearStencil(),this.resetStencilClippingMasks();let Ot=this.currentLayer;for(this.currentLayer=0;this.currentLayer=this._lastOcclusionLayer&&this.layersWithOcclusionOpacity.length>0){let Ot=this.currentLayer;this.depthOcclusion=!0;for(let Ct of this.layersWithOcclusionOpacity){this.currentLayer=Ct;let Kt=q[this.currentLayer],di=l.getLayerSourceCache(Kt),Ai=di?ne[di.id]:void 0;this.terrain||this._renderTileClippingMasks(Kt,di,di?ae[di.id]:void 0),this.renderLayer(this,di,Kt,Ai)}this.depthOcclusion=!1,this.currentLayer=Ot,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 vt=null;q.forEach(Ke=>{let Ot=l.getLayerSourceCache(Ke);Ot&&!Ke.isHidden(this.transform.zoom)&&Ot.getVisibleCoordinates().length&&(!vt||vt.getSource().maxzoom0?u.pop():null}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture||this.forceTerrainMode}linearFloatFilteringSupported(){return this.context.extTextureFloatLinear!=null}currentGlobalDefines(l,u,g){let b=g===void 0?this.terrain&&this.terrain.renderingToTexture:g,C=[];return this.style&&this.style.enable3dLights()&&(l==="globeRaster"||l==="terrainRaster"?(C.push("LIGHTING_3D_MODE"),C.push("LIGHTING_3D_ALPHA_EMISSIVENESS")):b||C.push("LIGHTING_3D_MODE")),this.renderPass==="shadow"&&(this._shadowMapDebug||C.push("DEPTH_TEXTURE")),this.terrainRenderModeElevated()&&(C.push("TERRAIN"),this.linearFloatFilteringSupported()&&C.push("TERRAIN_DEM_FLOAT_FORMAT")),this.transform.projection.name==="globe"&&C.push("GLOBE"),!this._fogVisible||b||u!==void 0&&!u||C.push("FOG","FOG_DITHERING"),b&&C.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&C.push("OVERDRAW_INSPECTOR"),C}getOrCreateProgram(l,u){this.cache=this.cache||{};let g=u&&u.defines||[],b=u&&u.config,C=this.currentGlobalDefines(l,u&&u.overrideFog,u&&u.overrideRtt).concat(g),S=Fw.cacheKey(ww[l],l,C,b);return this.cache[S]||(this.cache[S]=new Fw(this.context,l,ww[l],b,k8[l],C)),this.cache[S]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new r.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA8))}destroy(){this._terrain&&this._terrain.destroy(),this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=void 0),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this._wireframeDebugCache.destroy(),this.depthFBO&&(this.depthFBO.destroy(),this.depthFBO=void 0,this.depthTexture=void 0),this.emptyDepthTexture&&this.emptyDepthTexture.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}uploadCommonLightUniforms(l,u){if(this.style.enable3dLights()){let g=this.style.directionalLight,b=this.style.ambientLight;if(g&&b){let C=((S,E,k)=>{let F=S.properties.get("direction"),z=S.properties.get("color-use-theme")==="none",q=S.properties.get("color").toNonPremultipliedRenderColor(z?null:k.getLut(S.scope)).toArray01(),U=S.properties.get("intensity"),Y=E.properties.get("color-use-theme")==="none",X=E.properties.get("color").toNonPremultipliedRenderColor(Y?null:k.getLut(E.scope)).toArray01(),J=E.properties.get("intensity"),ae=[F.x,F.y,F.z],ne=r.dK(X,J),ce=r.dK(q,U);return{u_lighting_ambient_color:ne,u_lighting_directional_dir:ae,u_lighting_directional_color:ce,u_ground_radiance:Lw(ae,ce,ne)}})(g,b,this.style);u.setLightsUniformValues(l,C)}}}uploadCommonUniforms(l,u,g,b,C){if(this.uploadCommonLightUniforms(l,u),this.terrain&&this.terrain.renderingToTexture)return;let S=this.style.fog;if(S){let E=S.getOpacity(this.transform.pitch),k=((F,z,q,U,Y,X,J,ae,ne,ce,_e,xe)=>{let Pe=F.transform,ke=z.properties.get("color-use-theme")==="none",Ne=z.properties.get("color").toNonPremultipliedRenderColor(ke?null:F.style.getLut(z.scope)).toArray01();Ne[3]=U;let Me=F.frameCounter/1e3%1,[De,Be]=z.properties.get("vertical-range");return{u_fog_matrix:q?Pe.calculateFogTileMatrix(q):xe||F.identityMat,u_fog_range:z.getFovAdjustedRange(Pe._fov),u_fog_color:Ne,u_fog_horizon_blend:z.properties.get("horizon-blend"),u_fog_vertical_limit:[Math.min(De,Be),Be],u_fog_temporal_offset:Me,u_frustum_tl:Y,u_frustum_tr:X,u_frustum_br:J,u_frustum_bl:ae,u_globe_pos:ne,u_globe_radius:ce,u_viewport:_e,u_globe_transition:r.aj(Pe.zoom),u_is_globe:+(Pe.projection.name==="globe")}})(this,S,g,E,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*r.o.devicePixelRatio,this.transform.height*r.o.devicePixelRatio],b);u.setFogUniformValues(l,k)}C&&u.setCutoffUniformValues(l,C.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,u=l.createTexture();return l.bindTexture(l.TEXTURE_2D,u),l.copyTexImage2D(l.TEXTURE_2D,0,l.RGBA,0,0,l.drawingBufferWidth,l.drawingBufferHeight,0),u}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,u=this._backgroundTiles={},g=this.transform.coveringTiles({tileSize:512});for(let b of g)u[b.key]=l[b.key]||new mf(b,512,this.transform.tileZoom,this,void 0,this.worldview);return u}clearBackgroundTiles(){this._backgroundTiles={}}isSourceForClippingOrConflation(l,u){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")&&(!u||u.type!=="batched-model")))}isTileAffectedByFog(l){if(!this.style||!this.style.fog)return!1;if(this.transform.projection.name==="globe")return!0;let u=this._cachedTileFogOpacities[l.key];return u||(this._cachedTileFogOpacities[l.key]=u=this.style.fog.getOpacityForTile(l)),u[0]>=pn||u[1]>=pn}setupDepthForOcclusion(l,u,g){let b=this.context,C=b.gl,S=!!g;var E;g||(g={u_dem:2,u_dem_prev:4,u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_depth_range_unpack:[0,1],u_occluder_half_size:16,u_occlusion_depth_offset:-1e-4,u_exaggeration:0}),b.activeTexture.set(C.TEXTURE3),l&&this.depthFBO&&this.depthTexture?(this.depthTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),g.u_depth_size_inv=[1/this.depthFBO.width,1/this.depthFBO.height],g.u_depth_range_unpack=[2/((E=this.depthRangeFor3D)[1]-E[0]),-1-2*E[0]/(E[1]-E[0])],g.u_occluder_half_size=.5*this.occlusionParams.occluderSize,g.u_occlusion_depth_offset=this.occlusionParams.depthOffset):this.emptyDepthTexture.bind(C.NEAREST,C.CLAMP_TO_EDGE),b.activeTexture.set(C.TEXTURE0),S||u.setTerrainUniformValues(b,g)}}function tS(_,l){let u=!1,g=null,b=()=>{g=null,u&&(_(),g=setTimeout(b,l),u=!1)};return()=>(u=!0,g||b(),g)}class LD{constructor(l){this._hashName=l&&encodeURIComponent(l),r.aY(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=tS(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 u=iS(l);if(this._hashName){let g=this._hashName,b=!1,C=location.hash.slice(1).split("&").map(S=>{let E=S.split("=")[0];return E===g?(b=!0,`${E}=${u}`):S}).filter(S=>S);return b||C.push(`${g}=${u}`),`#${C.join("&")}`}return`#${u}`}_getCurrentHash(){let l=location.hash.replace("#","");if(this._hashName){let u;return l.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(u=g)}),(u&&u[1]||"").split("/")}return l.split("/")}_onHashChange(){let l=this._map;if(!l)return!1;let u=this._getCurrentHash();if(u.length>=3&&!u.some(g=>isNaN(Number(g)))){let g=l.dragRotate.isEnabled()&&l.touchZoomRotate.isEnabled()?+(u[3]||0):l.getBearing();return l.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:g,pitch:+(u[4]||0)}),!0}return!1}_updateHashUnthrottled(){history.replaceState(history.state,"",location.href.replace(/(#.+)?$/,this.getHashString()))}}function iS(_,l){let u=_.getCenter(),g=Math.round(100*_.getZoom())/100,b=Math.ceil((g*Math.LN2+Math.log(512/360/.5))/Math.LN10),C=Math.pow(10,b),S=Math.round(u.lng*C)/C,E=Math.round(u.lat*C)/C,k=_.getBearing(),F=_.getPitch(),z=l?`/${S}/${E}/${g}`:`${g}/${E}/${S}`;return(k||F)&&(z+="/"+Math.round(10*k)/10),F&&(z+=`/${Math.round(F)}`),z}let pd={linearity:.3,easing:r.eK(0,0,.3,1)},kf=Object.assign({deceleration:2500,maxSpeed:1400},pd),Ey=Object.assign({deceleration:20,maxSpeed:1400},pd),nS=Object.assign({deceleration:1e3,maxSpeed:360},pd),FD=Object.assign({deceleration:1e3,maxSpeed:90},pd);class ND{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:r.o.now(),settings:l})}_drainInertiaBuffer(){let l=this._inertiaBuffer,u=r.o.now();for(;l.length>0&&u-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._map._prefersReducedMotion()||(this._drainInertiaBuffer(),this._inertiaBuffer.length<2))return;let u={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:C}of this._inertiaBuffer)u.zoom+=C.zoomDelta||0,u.bearing+=C.bearingDelta||0,u.pitch+=C.pitchDelta||0,C.panDelta&&u.pan._add(C.panDelta),C.around&&(u.around=C.around),C.pinchAround&&(u.pinchAround=C.pinchAround);let g=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,b={};if(u.pan.mag()){let C=Ay(u.pan.mag(),g,Object.assign({},kf,l||{}));b.offset=u.pan.mult(C.amount/u.pan.mag()),b.center=this._map.transform.center,kp(b,C)}if(u.zoom){let C=Ay(u.zoom,g,Ey);b.zoom=this._map.transform.zoom+C.amount,kp(b,C)}if(u.bearing){let C=Ay(u.bearing,g,nS);b.bearing=this._map.transform.bearing+r.aA(C.amount,-179,179),kp(b,C)}if(u.pitch){let C=Ay(u.pitch,g,FD);b.pitch=this._map.transform.pitch+C.amount,kp(b,C)}if(b.zoom||b.bearing){let C=u.pinchAround===void 0?u.around:u.pinchAround;b.around=C?this._map.unproject(C):this._map.getCenter()}return this.clear(),b.noMoveStart=!0,b}}function kp(_,l){(!_.duration||_.durationu.unproject(k)),E=C.reduce((k,F,z,q)=>k.add(F.div(q.length)),new r.P(0,0));super(l,{points:C,point:E,lngLats:S,lngLat:u.unproject(E),originalEvent:g}),this._defaultPrevented=!1}}class oS extends r.z{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,u){super("wheel",{originalEvent:u}),this._defaultPrevented=!1}}class BD{constructor(l,u){this._map=l,this._clickTolerance=u.clickTolerance}reset(){this._mousedownPos=void 0}wheel(l){return this._firePreventable(new oS(this._map,l))}mousedown(l,u){return this._mousedownPos=u,this._firePreventable(new Ba(l.type,this._map,l))}mouseup(l){this._map.fire(new Ba(l.type,this._map,l))}preclick(l){let u=new MouseEvent("preclick",l);this._map.fire(new Ba(u.type,this._map,u))}click(l,u){this._mousedownPos&&this._mousedownPos.dist(u)>=this._clickTolerance||(this.preclick(l),this._map.fire(new Ba(l.type,this._map,l)))}dblclick(l){return this._firePreventable(new Ba(l.type,this._map,l))}mouseover(l){this._map.fire(new Ba(l.type,this._map,l))}mouseout(l){this._map.fire(new Ba(l.type,this._map,l))}touchstart(l){return this._firePreventable(new Dy(l.type,this._map,l))}touchmove(l){this._map.fire(new Dy(l.type,this._map,l))}touchend(l){this._map.fire(new Dy(l.type,this._map,l))}touchcancel(l){this._map.fire(new Dy(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class zD{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(l){this._map.fire(new Ba(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ba("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new Ba(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Za{constructor(l,u){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=u.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,u){this.isEnabled()&&l.shiftKey&&l.button===0&&(se(),this._startPos=this._lastPos=u,this._active=!0)}mousemoveWindow(l,u){if(!this._active)return;let g=u,b=this._startPos,C=this._lastPos;if(!b||!C||C.equals(g)||!this._box&&g.dist(b){this._box&&(this._box.style.transform=`translate(${S}px,${k}px)`,this._box.style.width=E-S+"px",this._box.style.height=F-k+"px")})}mouseupWindow(l,u){if(!this._active)return;let g=this._startPos,b=u;if(g&&l.button===0){if(this.reset(),Se(),g.x!==b.x||g.y!==b.y)return this._map.fire(new r.z("boxzoomend",{originalEvent:l})),{cameraAnimation:C=>C.fitScreenCoordinates(g,b,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),ge(),delete this._startPos,delete this._lastPos}_fireEvent(l,u){return this._map.fire(new r.z(l,{originalEvent:u}))}}function fx(_,l){let u={};for(let g=0;g<_.length;g++)u[_[g].identifier]=l[g];return u}class VD{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){this.centroid=void 0,this.startTime=0,this.touches={},this.aborted=!1}touchstart(l,u,g){(this.centroid||g.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===0&&(this.startTime=l.timeStamp),g.length===this.numTouches&&(this.centroid=(function(b){let C=new r.P(0,0);for(let S of b)C._add(S);return C.div(b.length)})(u),this.touches=fx(g,u)))}touchmove(l,u,g){if(this.aborted||!this.centroid)return;let b=fx(g,u);for(let C in this.touches){let S=b[C];(!S||S.dist(this.touches[C])>30)&&(this.aborted=!0)}}touchend(l,u,g){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),g.length===0){let b=!this.aborted&&this.centroid;if(this.reset(),b)return b}}}class gx{constructor(l){this.singleTap=new VD(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(l,u,g){this.singleTap.touchstart(l,u,g)}touchmove(l,u,g){this.singleTap.touchmove(l,u,g)}touchend(l,u,g){let b=this.singleTap.touchend(l,u,g);if(b){let C=l.timeStamp-this.lastTime<500,S=!this.lastTap||this.lastTap.dist(b)<30;if(C&&S||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=b,this.count===this.numTaps)return this.reset(),b}}}class E_{constructor(){this._zoomIn=new gx({numTouches:1,numTaps:2}),this._zoomOut=new gx({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,u,g){this._zoomIn.touchstart(l,u,g),this._zoomOut.touchstart(l,u,g)}touchmove(l,u,g){this._zoomIn.touchmove(l,u,g),this._zoomOut.touchmove(l,u,g)}touchend(l,u,g){let b=this._zoomIn.touchend(l,u,g),C=this._zoomOut.touchend(l,u,g);return b?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:S.getZoom()+1,around:S.unproject(b)},{originalEvent:l})}):C?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:S=>S.easeTo({duration:300,zoom:S.getZoom()-1,around:S.unproject(C)},{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 UD={0:1,2:2},rS={Control:"ctrlKey",Alt:"altKey",Shift:"shiftKey",Meta:"metaKey"};class _x{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,u){return!1}_move(l,u){return{}}mousedown(l,u){if(this._lastPoint)return;let g=je(l);this._correctButton(l,g)&&(this._lastPoint=u,this._eventButton=g)}mousemoveWindow(l,u){let g=this._lastPoint;if(g){if(l.preventDefault(),this._eventButton!=null&&(function(b,C){let S=UD[C];return b.buttons===void 0||(b.buttons&S)!==S})(l,this._eventButton))this.reset();else if(this._moved||!(u.dist(g)0&&(this._active=!0);let b=fx(g,u),C=new r.P(0,0),S=new r.P(0,0),E=0;for(let F in b){let z=b[F],q=this._touches[F];q&&(C._add(z),S._add(z.sub(q)),E++,b[F]=z)}if(this._touches=b,E{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.removeAttribute("role")},500)}}class My{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(l){}_move(l,u,g){return{}}touchstart(l,u,g){this._firstTwoTouches||g.length<2||(this._firstTwoTouches=[g[0].identifier,g[1].identifier],this._start([u[0],u[1]]))}touchmove(l,u,g){let b=this._firstTwoTouches;if(!b)return;l.preventDefault();let[C,S]=b,E=Ry(g,u,C),k=Ry(g,u,S);if(!E||!k)return;let F=this._aroundCenter?null:E.add(k).div(2);return this._move([E,k],F,l)}touchend(l,u,g){if(!this._firstTwoTouches)return;let[b,C]=this._firstTwoTouches,S=Ry(g,u,b),E=Ry(g,u,C);S&&E||(this._active&&Se(),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 Ry(_,l,u){for(let g=0;g<_.length;g++)if(_[g].identifier===u)return l[g]}function lS(_,l){return Math.log2(_/l)}class lF extends My{reset(){super.reset(),this._distance=0,this._startDistance=0}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,u){let g=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(lS(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:lS(this._distance,g),pinchAround:u}}}function jD(_,l){return 180*_.angleWith(l)/Math.PI}class cF extends My{reset(){super.reset(),this._minDiameter=0,this._startVector=void 0,this._vector=void 0}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,u){let g=this._vector;if(this._vector=l[0].sub(l[1]),g&&(this._active||!this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:jD(this._vector,g),pinchAround:u}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());let u=25/(Math.PI*this._minDiameter)*360,g=this._startVector;if(!g)return!1;let b=jD(l,g);return Math.abs(b)Math.abs(_.x)}class dF extends My{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,cS(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,u,g){let b=this._lastPoints;if(!b)return;let C=l[0].sub(b[0]),S=l[1].sub(b[1]);return this._map._cooperativeGestures&&!r.eL()&&g.touches.length<3||(this._valid=this.gestureBeginsVertically(C,S,g.timeStamp),!this._valid)?void 0:(this._lastPoints=l,this._active=!0,{pitchDelta:(C.y+S.y)/2*-.5})}gestureBeginsVertically(l,u,g){if(this._valid!==void 0)return this._valid;let b=l.mag()>=2,C=u.mag()>=2;if(!b&&!C)return;if(!b||!C)return this._firstMove==null&&(this._firstMove=g),g-this._firstMove<100&&void 0;let S=l.y>0==u.y>0;return cS(l)&&cS(u)&&S}}let uF={panStep:100,bearingStep:15,pitchStep:10};class pF{constructor(){let l=uF;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 u=0,g=0,b=0,C=0,S=0;switch(l.keyCode){case 61:case 107:case 171:case 187:u=1;break;case 189:case 109:case 173:u=-1;break;case 37:l.shiftKey?g=-1:(l.preventDefault(),C=-1);break;case 39:l.shiftKey?g=1:(l.preventDefault(),C=1);break;case 38:l.shiftKey?b=1:(l.preventDefault(),S=-1);break;case 40:l.shiftKey?b=-1:(l.preventDefault(),S=1);break;default:return}return this._rotationDisabled&&(g=0,b=0),{cameraAnimation:E=>{let k=E.getZoom();E.easeTo({duration:300,easeId:"keyboardHandler",easing:hF,zoom:u?Math.round(k)+u*(l.shiftKey?2:1):k,bearing:E.getBearing()+g*this._bearingStep,pitch:E.getPitch()+b*this._pitchStep,offset:[-C*this._panStep,-S*this._panStep],center:E.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 hF(_){return _*(2-_)}let GD=4.000244140625,mF=1/450;class fF{constructor(l,u){this._map=l,this._el=l.getCanvasContainer(),this._handler=u,this._delta=0,this._lastDelta=0,this._defaultZoomRate=.01,this._wheelZoomRate=mF,r.aY(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center",this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(l){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(l.ctrlKey||l.metaKey||this.isZooming()||r.eL()))return void this._showBlockerAlert();this._alertContainer.style.visibility!=="hidden"&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let u=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY,g=r.o.now(),b=g-(this._lastWheelEventTime||0);this._lastWheelEventTime=g,u!==0&&u%GD==0?this._type="wheel":u!==0&&Math.abs(u)<4?this._type="trackpad":b>400?(this._type=null,this._lastValue=u,this._timeout=window.setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(b*u)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,u+=this._lastValue)),l.shiftKey&&u&&(u/=4),this._type&&(this._lastWheelEvent=l,this._delta-=u,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 u=fe(this._el,l);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:u,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 u=()=>l._terrainEnabled()&&this._aroundCoord?l.computeZoomRelativeTo(this._aroundCoord):l.zoom;if(this._delta!==0){let F=this._type==="wheel"&&Math.abs(this._delta)>GD?this._wheelZoomRate:this._defaultZoomRate,z=2/(1+Math.exp(-Math.abs(this._delta*F)));this._delta<0&&z!==0&&(z=1/z);let q=u(),U=Math.pow(2,q),Y=typeof this._targetZoom=="number"?l.zoomScale(this._targetZoom):U;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(Y*z))),this._type==="wheel"&&(this._startZoom=q,this._easing=this._smoothOutEasing(200)),this._lastDelta=this._delta,this._delta=0}let g=typeof this._targetZoom=="number"?this._targetZoom:u(),b=this._startZoom,C=this._easing,S,E=!1;if(this._type==="wheel"&&b&&C){let F=Math.min((r.o.now()-this._lastWheelEventTime)/200,1),z=C(F);S=r.ak(b,g,z),F<1?this._frameId||(this._frameId=!0):E=!0}else S=g,E=!0;this._active=!0,E&&(this._active=!1,this._finishTimeout=window.setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200));let k=S-u();return k*this._lastDelta<0&&(k=0),{noInertia:!0,needsRenderFrame:!E,zoomDelta:k,around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let u=r.eM;if(this._prevEase){let g=this._prevEase,b=(r.o.now()-g.start)/g.duration,C=g.easing(b+.01)-g.easing(b),S=.27/Math.sqrt(C*C+1e-4)*.01,E=Math.sqrt(.0729-S*S);u=r.eK(S,E,.25,1)}return this._prevEase={start:r.o.now(),duration:l,easing:u},u}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 gF{constructor(l,u){this._clickZoom=l,this._tapZoom=u}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 _F{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(l,u){return l.preventDefault(),{cameraAnimation:g=>{g.easeTo({duration:300,zoom:g.getZoom()+(l.shiftKey?-1:1),around:g.unproject(u)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class N8{constructor(){this._tap=new gx({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,u,g){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?g.length>0&&(this._swipePoint=u[0],this._swipeTouch=g[0].identifier):this._tap.touchstart(l,u,g))}touchmove(l,u,g){if(this._tapTime){if(this._swipePoint){if(g[0].identifier!==this._swipeTouch)return;let b=u[0],C=b.y-this._swipePoint.y;return this._swipePoint=b,l.preventDefault(),this._active=!0,{zoomDelta:C/128}}}else this._tap.touchmove(l,u,g)}touchend(l,u,g){this._tapTime?this._swipePoint&&g.length===0&&this.reset():this._tap.touchend(l,u,g)&&(this._tapTime=l.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class B8{constructor(l,u,g){this._el=l,this._mousePan=u,this._touchPan=g}enable(l){this._inertiaOptions=l||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class z8{constructor(l,u,g){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=u,this._mousePitch=g}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Ds{constructor(l,u,g,b){this._el=l,this._touchZoom=u,this._touchRotate=g,this._tapDragZoom=b,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 yx=_=>_.zoom||_.drag||_.pitch||_.rotate;class V8 extends r.z{}class U8{constructor(){this.constants=[1,1,.01],this.radius=0}setup(l,u){let g=r.av([],u,l);this.radius=r.ag(g[2]<0?r.eO([],g,this.constants):[g[0],g[1],0])}projectRay(l){r.eO(l,l,this.constants),r.aw(l,l),r.eP(l,l,this.constants);let u=r.c4([],l,this.radius);if(u[2]>0){let g=r.c4([],[0,0,1],r.bJ(u,[0,0,1])),b=r.c4([],r.aw([],[u[0],u[1],0]),this.radius),C=r.d7([],u,r.c4([],r.av([],r.d7([],b,g),u),2));u[0]=C[0],u[1]=C[1]}return u}}function dS(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta}class vx{constructor(l,u){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ND(l),this._bearingSnap=u.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new U8,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(u),r.aY(["handleEvent","handleWindowEvent"],this);let g=this._el;this._listeners=[[g,"touchstart",{passive:!0}],[g,"touchmove",{passive:!1}],[g,"touchend",void 0],[g,"touchcancel",void 0],[g,"mousedown",void 0],[g,"mousemove",void 0],[g,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[g,"mouseover",void 0],[g,"mouseout",void 0],[g,"dblclick",void 0],[g,"click",void 0],[g,"keydown",{capture:!1}],[g,"keyup",void 0],[g,"wheel",{passive:!1}],[g,"contextmenu",void 0],[window,"blur",void 0]];for(let[b,C,S]of this._listeners){let E=b===document?this.handleWindowEvent:this.handleEvent;b.addEventListener(C,E,S)}}destroy(){for(let[l,u,g]of this._listeners){let b=l===document?this.handleWindowEvent:this.handleEvent;l.removeEventListener(u,b,g)}}_addDefaultHandlers(l){let u=this._map,g=u.getCanvasContainer();this._add("mapEvent",new BD(u,l));let b=u.boxZoom=new Za(u,l);this._add("boxZoom",b);let C=new E_,S=new _F;u.doubleClickZoom=new gF(S,C),this._add("tapZoom",C),this._add("clickZoom",S);let E=new N8;this._add("tapDragZoom",E);let k=u.touchPitch=new dF(u);this._add("touchPitch",k);let F=new sS(l),z=new aS(l);u.dragRotate=new z8(l,F,z),this._add("mouseRotate",F,["mousePitch"]),this._add("mousePitch",z,["mouseRotate"]);let q=new ky(l),U=new HD(u,l);u.dragPan=new B8(g,q,U),this._add("mousePan",q),this._add("touchPan",U,["touchZoom","touchRotate"]);let Y=new cF,X=new lF;u.touchZoomRotate=new Ds(g,X,Y,E),this._add("touchRotate",Y,["touchPan","touchZoom"]),this._add("touchZoom",X,["touchPan","touchRotate"]),this._add("blockableMapEvent",new zD(u));let J=u.scrollZoom=new fF(u,this);this._add("scrollZoom",J,["mousePan"]);let ae=u.keyboard=new pF;this._add("keyboard",ae);for(let ne of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])l.interactive&&l[ne]&&u[ne].enable(l[ne])}_add(l,u,g){this._handlers.push({handlerName:l,handler:u,allowed:g}),this._handlersById[l]=u}stop(l){if(!this._updatingCamera){for(let{handler:u}of this._handlers)u.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!!yx(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(l,u,g){for(let b in l)if(b!==g&&(!u||u.indexOf(b)<0))return!0;return!1}handleWindowEvent(l){this.handleEvent(l,`${l.type}Window`)}_getMapTouches(l){let u=[];for(let g of l)this._el.contains(g.target)&&u.push(g);return u}handleEvent(l,u){this._updatingCamera=!0;let g=l.type==="renderFrame",b=g?void 0:l,C={needsRenderFrame:!1},S={},E={},k=l.touches?this._getMapTouches(l.touches):void 0,F=k?be(this._el,k):g?void 0:fe(this._el,l);for(let{handlerName:U,handler:Y,allowed:X}of this._handlers){if(!Y.isEnabled())continue;let J;this._blockedByActive(E,X,U)?Y.reset():Y[u||l.type]&&(J=Y[u||l.type](l,F,k),this.mergeHandlerResult(C,S,J,U,b),J&&J.needsRenderFrame&&this._triggerRenderFrame()),(J||Y.isActive())&&(E[U]=Y)}let z={};for(let U in this._previousActiveHandlers)E[U]||(z[U]=b);this._previousActiveHandlers=E,(Object.keys(z).length||dS(C))&&(this._changes.push([C,S,z]),this._triggerRenderFrame()),(Object.keys(E).length||dS(C))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:q}=C;q&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],q(this._map))}mergeHandlerResult(l,u,g,b,C){if(!g)return;Object.assign(l,g);let S={handlerName:b,originalEvent:g.originalEvent||C};g.zoomDelta!==void 0&&(u.zoom=S),g.panDelta!==void 0&&(u.drag=S),g.pitchDelta!==void 0&&(u.pitch=S),g.bearingDelta!==void 0&&(u.rotate=S)}_applyChanges(){let l={},u={},g={};for(let[b,C,S]of this._changes)b.panDelta&&(l.panDelta=(l.panDelta||new r.P(0,0))._add(b.panDelta)),b.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+b.zoomDelta),b.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+b.bearingDelta),b.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+b.pitchDelta),b.around!==void 0&&(l.around=b.around),b.aroundCoord!==void 0&&(l.aroundCoord=b.aroundCoord),b.pinchAround!==void 0&&(l.pinchAround=b.pinchAround),b.noInertia&&(l.noInertia=b.noInertia),Object.assign(u,C),Object.assign(g,S);this._updateMapTransform(l,u,g),this._changes=[]}_updateMapTransform(l,u,g){let b=this._map,C=b.transform,S=ce=>[ce.x,ce.y,ce.z];if((ce=>{let _e=this._eventsInProgress.drag;return _e&&!this._handlersById[_e.handlerName].isActive()})()&&!dS(l)){let ce=C.zoom;C.cameraElevationReference="sea",this._originalZoom!=null&&C._orthographicProjectionAtLowPitch&&C.projection.name!=="globe"&&C.pitch===0?(C.cameraElevationReference="ground",C.zoom=this._originalZoom):(C.recenterOnTerrain(),C.cameraElevationReference="ground"),ce!==C.zoom&&this._map._update(!0)}if(C._isCameraConstrained&&b._stop(!0),!dS(l))return void this._fireEvents(u,g,!0);let{panDelta:E,zoomDelta:k,bearingDelta:F,pitchDelta:z,around:q,aroundCoord:U,pinchAround:Y}=l;C._isCameraConstrained&&(k>0&&(k=0),C._isCameraConstrained=!1),Y!==void 0&&(q=Y),(k||(ce=>u[ce]&&!this._eventsInProgress[ce])("drag"))&&q&&(this._dragOrigin=S(C.pointCoordinate3D(q)),this._originalZoom=C.zoom,this._trackingEllipsoid.setup(C._camera.position,this._dragOrigin)),C.cameraElevationReference="sea",b._stop(!0),q=q||b.transform.centerPoint,F&&(C.bearing+=F),z&&(C.pitch+=z),C._updateCameraState();let X=[0,0,0];if(E)if(C.projection.name==="mercator"){let ce=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(q).dir),_e=this._trackingEllipsoid.projectRay(C.screenPointToMercatorRay(q.sub(E)).dir);X[0]=_e[0]-ce[0],X[1]=_e[1]-ce[1]}else{let ce=C.pointCoordinate(q);if(C.projection.name==="globe"){E=E.rotate(-C.angle);let _e=C._pixelsPerMercatorPixel/C.worldSize;X[0]=-E.x*r.eN(r.a$(ce.y))*_e,X[1]=-E.y*r.eN(C.center.lat)*_e}else{let _e=C.pointCoordinate(q.sub(E));ce&&_e&&(X[0]=_e.x-ce.x,X[1]=_e.y-ce.y)}}let J=C.zoom,ae=[0,0,0];if(k){let ce=S(U||C.pointCoordinate3D(q)),_e={dir:r.aw([],r.av([],ce,C._camera.position))};if(_e.dir[2]<0){let xe=C.zoomDeltaToMovement(ce,k);r.c4(ae,_e.dir,xe)}}let ne=r.d7(X,X,ae);C._translateCameraConstrained(ne),k&&Math.abs(C.zoom-J)>1e-4&&C.recenterOnTerrain(),C.cameraElevationReference="ground",this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(u,g,!0)}_fireEvents(l,u,g){let b=yx(this._eventsInProgress),C=yx(l),S={};for(let z in l){let{originalEvent:q}=l[z];this._eventsInProgress[z]||(S[`${z}start`]=q),this._eventsInProgress[z]=l[z]}!b&&C&&this._fireEvent("movestart",C.originalEvent);for(let z in S)this._fireEvent(z,S[z]);C&&this._fireEvent("move",C.originalEvent);for(let z in l){let{originalEvent:q}=l[z];this._fireEvent(z,q)}let E={},k;for(let z in this._eventsInProgress){let{handlerName:q,originalEvent:U}=this._eventsInProgress[z];this._handlersById[q].isActive()||(delete this._eventsInProgress[z],k=u[q]||U,E[`${z}end`]=k)}for(let z in E)this._fireEvent(z,E[z]);let F=yx(this._eventsInProgress);if(g&&(b||C)&&!F){this._updatingCamera=!0;let z=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),q=U=>U!==0&&-this._bearingSnap{this._frameId=void 0,this.handleEvent(new V8("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}let $D="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class qD extends r.E{constructor(l,u){super(),this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=u.bearingSnap,this._respectPrefersReducedMotion=u.respectPrefersReducedMotion!==!1,r.aY(["_renderFrameCallback"],this)}getCenter(){return new r.aR(this.transform.center.lng,this.transform.center.lat)}setCenter(l,u){return this.jumpTo({center:l},u)}panBy(l,u,g){return l=r.P.convert(l).mult(-1),this.panTo(this.transform.center,Object.assign({offset:l},u),g)}panTo(l,u,g){return this.easeTo(Object.assign({center:l},u),g)}getZoom(){return this.transform.zoom}setZoom(l,u){return this.jumpTo({zoom:l},u),this}zoomTo(l,u,g){return this.easeTo(Object.assign({zoom:l},u),g)}zoomIn(l,u){return this.zoomTo(this.getZoom()+1,l,u),this}zoomOut(l,u){return this.zoomTo(this.getZoom()-1,l,u),this}getBearing(){return this.transform.bearing}setBearing(l,u){return this.jumpTo({bearing:l},u),this}getPadding(){return this.transform.padding}setPadding(l,u){return this.jumpTo({padding:l},u),this}rotateTo(l,u,g){return this.easeTo(Object.assign({bearing:l},u),g)}resetNorth(l,u){return this.rotateTo(0,Object.assign({duration:1e3},l),u),this}resetNorthPitch(l,u){return this.easeTo(Object.assign({bearing:0,pitch:0,duration:1e3},l),u),this}snapToNorth(l,u){return Math.abs(this.getBearing())l.aspect?g/(2*Math.tan(.5*l.fovX)*l.aspect):b/(2*Math.tan(.5*l.fovY)*l.aspect)}_cameraForBoundsOnGlobe(l,u,g,b,C,S){let E=l.clone(),k=this._extendCameraOptions(S);E.bearing=b,E.pitch=C;let F=r.aR.convert(u),z=r.aR.convert(g),q=.5*(F.lat+z.lat),U=.5*(F.lng+z.lng),Y=r.eQ(q,U),X=r.aw([],Y),J=r.aw([],r.bI([],X,[0,1,0])),ae=r.bI([],J,X),ne=[J[0],J[1],J[2],0,ae[0],ae[1],ae[2],0,X[0],X[1],X[2],0,0,0,0,1],ce=[Y,r.eQ(F.lat,F.lng),r.eQ(z.lat,F.lng),r.eQ(z.lat,z.lng),r.eQ(F.lat,z.lng),r.eQ(q,F.lng),r.eQ(q,z.lng),r.eQ(F.lat,U),r.eQ(z.lat,U)],_e=r.d8.fromPoints(ce.map(Ct=>[r.bJ(J,Ct),r.bJ(ae,Ct),r.bJ(X,Ct)])),xe=r.af([],_e.center,ne);r.eR(xe)===0&&r.eS(xe,0,0,1),r.aw(xe,xe),r.c4(xe,xe,r.aD),E.center=r.eT(xe);let Pe=E.getWorldToCameraMatrix(),ke=r.bl(new Float64Array(16),Pe);_e=r.d8.applyTransform(_e,r.aB([],Pe,ne));let Ne=this._extendAABB(_e,E,k,b);if(!Ne)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");_e=Ne,r.af(xe,xe,Pe);let Me=.5*(_e.max[2]-_e.min[2]),De=this._minimumAABBFrustumDistance(E,_e),Be=r.c4([],[0,0,1],Me),bt=r.d7(Be,xe,Be),nt=De+(E.pitch===0?0:r.bG(xe,bt)),kt=E.globeCenterInViewSpace,ft=r.av([],xe,[kt[0],kt[1],kt[2]]);r.aw(ft,ft),r.c4(ft,ft,nt);let At=r.d7([],xe,ft);r.af(At,At,ke);let pi=r.eD/r.aD,vt=r.ag(At),Ke=r.ce(Math.max(vt*pi-r.eD,Number.EPSILON),0),Ot=Math.min(E.zoomFromMercatorZAdjusted(Ke),k.maxZoom);return Ot>.5*(r.cZ+r.cK)?(E.setProjection({name:"mercator"}),E.zoom=Ot,this._cameraForBounds(E,u,g,b,C,S)):{center:E.center,zoom:Ot,bearing:b,pitch:C}}_extendAABB(l,u,g,b){let C=.5*((g.padding.left||0)+(g.padding.right||0)),S=.5*((g.padding.top||0)+(g.padding.bottom||0)),E=S,k=C,F=C,z=S,q=u.width-(k+F),U=u.height-(E+z),Y=r.av([],l.max,l.min),X=Math.min(q/Y[0],U/Y[1]),J=Math.min(u.scaleZoom(u.scale*X),g.maxZoom);if(isNaN(J))return null;let ae=u.scale/u.zoomScale(J),ne=new r.d8([l.min[0]-k*ae,l.min[1]-z*ae,l.min[2]],[l.max[0]+F*ae,l.max[1]+E*ae,l.max[2]]),ce=(typeof g.offset.x=="number"&&typeof g.offset.y=="number"?new r.P(g.offset.x,g.offset.y):r.P.convert(g.offset)).rotate(-r.an(b));return ne.center[0]-=ce.x*ae,ne.center[1]+=ce.y*ae,ne}queryTerrainElevation(l,u){let g=this.transform.elevation;return g?(u=Object.assign({},{exaggerated:!0},u),g.getAtPoint(r.ae.fromLngLat(l),null,u.exaggerated)):null}_cameraForBounds(l,u,g,b,C,S){if(l.projection.name==="globe")return this._cameraForBoundsOnGlobe(l,u,g,b,C,S);let E=l.clone(),k=this._extendCameraOptions(S);E.bearing=b,E.pitch=C;let F=r.aR.convert(u),z=r.aR.convert(g),q=new r.aR(F.lng,z.lat),U=new r.aR(z.lng,F.lat),Y=E.project(F),X=E.project(z),J=this.queryTerrainElevation(F),ae=this.queryTerrainElevation(z),ne=this.queryTerrainElevation(q),ce=this.queryTerrainElevation(U),_e=[[Y.x,Y.y,Math.min(J||0,ae||0,ne||0,ce||0)],[X.x,X.y,Math.max(J||0,ae||0,ne||0,ce||0)]],xe=r.d8.fromPoints(_e),Pe=E.getWorldToCameraMatrix(),ke=r.bl(new Float64Array(16),Pe);xe=r.d8.applyTransform(xe,Pe);let Ne=this._extendAABB(xe,E,k,b);if(!Ne)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");xe=Ne;let Me=.5*r.av([],xe.max,xe.min)[2],De=this._minimumAABBFrustumDistance(E,xe),Be=[0,0,1,0];r.aC(Be,Be,Pe),r.eU(Be,Be);let bt=r.c4([],Be,De+Me),nt=r.d7([],xe.center,bt);r.af(xe.center,xe.center,ke),r.af(nt,nt,ke);let kt=E.unproject(new r.P(xe.center[0],xe.center[1])),ft=r.eV(E.projection,kt),At=Math.pow(2,ft),pi=Math.min(E._zoomFromMercatorZ(nt[2]*E.pixelsPerMeter*At/E.worldSize),k.maxZoom);return E.mercatorFromTransition&&pi<.5*(r.cZ+r.cK)?(E.setProjection({name:"globe"}),E.zoom=pi,this._cameraForBounds(E,u,g,b,C,S)):{center:kt,zoom:pi,bearing:b,pitch:C}}fitBounds(l,u,g){let b=this.cameraForBounds(l,u);return this._fitInternal(b,u,g)}fitScreenCoordinates(l,u,g,b,C){let S=r.P.convert(l),E=r.P.convert(u),k=new r.P(Math.min(S.x,E.x),Math.min(S.y,E.y)),F=new r.P(Math.max(S.x,E.x),Math.max(S.y,E.y));if(this.transform.projection.name==="mercator"&&this.transform.anyCornerOffEdge(S,E))return this;let z=this.transform.pointLocation3D(k),q=this.transform.pointLocation3D(F),U=this.transform.pointLocation3D(new r.P(k.x,F.y)),Y=this.transform.pointLocation3D(new r.P(F.x,k.y)),X=[Math.min(z.lng,q.lng,U.lng,Y.lng),Math.min(z.lat,q.lat,U.lat,Y.lat)],J=[Math.max(z.lng,q.lng,U.lng,Y.lng),Math.max(z.lat,q.lat,U.lat,Y.lat)],ae=b&&b.pitch?b.pitch:this.getPitch(),ne=this._cameraForBounds(this.transform,X,J,g,ae,b);return this._fitInternal(ne,b,C)}_fitInternal(l,u,g){return l?(u=Object.assign(l,u)).linear?this.easeTo(u,g):this.flyTo(u,g):this}jumpTo(l,u){this.stop();let g=l.preloadOnly?this.transform.clone():this.transform,b=!1,C=!1,S=!1;"zoom"in l&&g.zoom!==+l.zoom&&(b=!0,g.zoom=+l.zoom),l.center!==void 0&&(g.center=r.aR.convert(l.center)),"bearing"in l&&g.bearing!==+l.bearing&&(C=!0,g.bearing=+l.bearing),"pitch"in l&&g.pitch!==+l.pitch&&(S=!0,g.pitch=+l.pitch);let E=typeof l.padding=="number"?this._extendPadding(l.padding):l.padding;if(l.padding!=null&&!g.isPaddingEqual(E))if(l.retainPadding===!1){let k=g.clone();k.padding=E,g.setLocationAtPoint(g.center,k.centerPoint)}else g.padding=E;return l.preloadOnly?(this._preloadTiles(g),this):(this.fire(new r.z("movestart",u)).fire(new r.z("move",u)),b&&this.fire(new r.z("zoomstart",u)).fire(new r.z("zoom",u)).fire(new r.z("zoomend",u)),C&&this.fire(new r.z("rotatestart",u)).fire(new r.z("rotate",u)).fire(new r.z("rotateend",u)),S&&this.fire(new r.z("pitchstart",u)).fire(new r.z("pitch",u)).fire(new r.z("pitchend",u)),this.fire(new r.z("moveend",u)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||r.w($D),this.transform.getFreeCameraOptions()}setFreeCameraOptions(l,u){let g=this.transform;if(!g.projection.supportsFreeCamera)return r.w($D),this;this.stop();let b=g.zoom,C=g.pitch,S=g.bearing;g.setFreeCameraOptions(l);let E=b!==g.zoom,k=C!==g.pitch,F=S!==g.bearing;return this.fire(new r.z("movestart",u)).fire(new r.z("move",u)),E&&this.fire(new r.z("zoomstart",u)).fire(new r.z("zoom",u)).fire(new r.z("zoomend",u)),F&&this.fire(new r.z("rotatestart",u)).fire(new r.z("rotate",u)).fire(new r.z("rotateend",u)),k&&this.fire(new r.z("pitchstart",u)).fire(new r.z("pitch",u)).fire(new r.z("pitchend",u)),this.fire(new r.z("moveend",u)),this}easeTo(l,u){this._stop(!1,l.easeId),((l=Object.assign({offset:[0,0],duration:500,easing:r.eM},l)).animate===!1||this._prefersReducedMotion(l))&&(l.duration=0);let g=this.transform,b=this.getZoom(),C=this.getBearing(),S=this.getPitch(),E=this.getPadding(),k="zoom"in l?+l.zoom:b,F="bearing"in l?this._normalizeBearing(l.bearing,C):C,z="pitch"in l?+l.pitch:S,q=this._extendPadding(l.padding),U=r.P.convert(l.offset),Y,X,J;if(g.projection.name==="globe"){let Be=r.ae.fromLngLat(g.center),bt=U.rotate(-g.angle);Be.x+=bt.x/g.worldSize,Be.y+=bt.y/g.worldSize;let nt=Be.toLngLat(),kt=r.aR.convert(l.center||nt);this._normalizeCenter(kt),Y=g.centerPoint.add(bt),X=new r.P(Be.x,Be.y).mult(g.worldSize),J=new r.P(r.aF(kt.lng),r.aJ(kt.lat)).mult(g.worldSize).sub(X)}else{Y=g.centerPoint.add(U);let Be=g.pointLocation(Y),bt=r.aR.convert(l.center||Be);this._normalizeCenter(bt),X=g.project(Be),J=g.project(bt).sub(X)}let ae=g.zoomScale(k-b),ne,ce;l.around&&(ne=r.aR.convert(l.around),ce=g.locationPoint(ne));let _e=this._zooming||k!==b,xe=this._rotating||C!==F,Pe=this._pitching||z!==S,ke=!g.isPaddingEqual(q),Ne=l.retainPadding===!1?g.clone():g,Me=Be=>bt=>{if(_e&&(Be.zoom=r.ak(b,k,bt)),xe&&(Be.bearing=r.ak(C,F,bt)),Pe&&(Be.pitch=r.ak(S,z,bt)),ke&&(Ne.interpolatePadding(E,q,bt),Y=Ne.centerPoint.add(U)),ne)Be.setLocationAtPoint(ne,ce);else{let nt=Be.zoomScale(Be.zoom-b),kt=k>b?Math.min(2,ae):Math.max(.5,ae),ft=Math.pow(kt,1-bt),At=Be.unproject(X.add(J.mult(bt*ft)).mult(nt));Be.setLocationAtPoint(Be.renderWorldCopies?At.wrap():At,Y)}return l.preloadOnly||this._fireMoveEvents(u),Be};if(l.preloadOnly){let Be=this._emulate(Me,l.duration,g);return this._preloadTiles(Be),this}let De={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=_e,this._rotating=xe,this._pitching=Pe,this._padding=ke,this._easeId=l.easeId,this._prepareEase(u,l.noMoveStart,De),this._ease(Me(g),Be=>{g.cameraElevationReference==="sea"&&g.recenterOnTerrain(),this._afterEase(u,Be)},l),this}_prepareEase(l,u,g={}){this._moving=!0,this.transform.cameraElevationReference="sea",this.transform._orthographicProjectionAtLowPitch&&this.transform.pitch===0&&this.transform.projection.name!=="globe"&&(this.transform.cameraElevationReference="ground"),u||g.moving||this.fire(new r.z("movestart",l)),this._zooming&&!g.zooming&&this.fire(new r.z("zoomstart",l)),this._rotating&&!g.rotating&&this.fire(new r.z("rotatestart",l)),this._pitching&&!g.pitching&&this.fire(new r.z("pitchstart",l))}_fireMoveEvents(l){this.fire(new r.z("move",l)),this._zooming&&this.fire(new r.z("zoom",l)),this._rotating&&this.fire(new r.z("rotate",l)),this._pitching&&this.fire(new r.z("pitch",l))}_afterEase(l,u){if(this._easeId&&u&&this._easeId===u)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";let g=this._zooming,b=this._rotating,C=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,g&&this.fire(new r.z("zoomend",l)),b&&this.fire(new r.z("rotateend",l)),C&&this.fire(new r.z("pitchend",l)),this.fire(new r.z("moveend",l))}flyTo(l,u){if(this._prefersReducedMotion(l)){let Ct=r.aH(l,["center","zoom","bearing","pitch","around","padding","retainPadding"]);return this.jumpTo(Ct,u)}this.stop(),l=Object.assign({offset:[0,0],speed:1.2,curve:1.42,easing:r.eM},l);let g=this.transform,b=this.getZoom(),C=this.getBearing(),S=this.getPitch(),E=this.getPadding(),k="zoom"in l?r.aA(+l.zoom,g.minZoom,g.maxZoom):b,F="bearing"in l?this._normalizeBearing(l.bearing,C):C,z="pitch"in l?+l.pitch:S,q=this._extendPadding(l.padding),U=g.zoomScale(k-b),Y=r.P.convert(l.offset),X=g.centerPoint.add(Y),J=g.pointLocation(X),ae=r.aR.convert(l.center||J);this._normalizeCenter(ae);let ne=g.project(J),ce=g.project(ae).sub(ne),_e=l.curve,xe=Math.max(g.width,g.height),Pe=xe/U,ke=ce.mag();if("minZoom"in l){let Ct=r.aA(Math.min(l.minZoom,b,k),g.minZoom,g.maxZoom),Kt=xe/g.zoomScale(Ct-b);_e=Math.sqrt(Kt/ke*2)}let Ne=_e*_e;function Me(Ct){let Kt=(Pe*Pe-xe*xe+(Ct?-1:1)*Ne*Ne*ke*ke)/(2*(Ct?Pe:xe)*Ne*ke);return Math.log(Math.sqrt(Kt*Kt+1)-Kt)}function De(Ct){return(Math.exp(Ct)-Math.exp(-Ct))/2}function Be(Ct){return(Math.exp(Ct)+Math.exp(-Ct))/2}let bt=Me(0),nt=function(Ct){return Be(bt)/Be(bt+_e*Ct)},kt=function(Ct){return xe*((Be(bt)*(De(Kt=bt+_e*Ct)/Be(Kt))-De(bt))/Ne)/ke;var Kt},ft=(Me(1)-bt)/_e;if(Math.abs(ke)<1e-6||!isFinite(ft)){if(Math.abs(xe-Pe)<1e-6)return this.easeTo(l,u);let Ct=Pel.maxDuration&&(l.duration=0);let At=C!==F,pi=z!==S,vt=!g.isPaddingEqual(q),Ke=l.retainPadding===!1?g.clone():g,Ot=Ct=>Kt=>{let di=Kt*ft,Ai=1/nt(di);Ct.zoom=Kt===1?k:b+Ct.scaleZoom(Ai),At&&(Ct.bearing=r.ak(C,F,Kt)),pi&&(Ct.pitch=r.ak(S,z,Kt)),vt&&(Ke.interpolatePadding(E,q,Kt),X=Ke.centerPoint.add(Y));let ri=Kt===1?ae:Ct.unproject(ne.add(ce.mult(kt(di))).mult(Ai));return Ct.setLocationAtPoint(Ct.renderWorldCopies?ri.wrap():ri,X),Ct._updateCameraOnTerrain(),l.preloadOnly||this._fireMoveEvents(u),Ct};if(l.preloadOnly){let Ct=this._emulate(Ot,l.duration,g);return this._preloadTiles(Ct),this}return this._zooming=!0,this._rotating=At,this._pitching=pi,this._padding=vt,this._prepareEase(u,!1),this._ease(Ot(g),()=>this._afterEase(u),l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_requestRenderFrame(l){}_cancelRenderFrame(l){}_stop(l,u){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){let g=this._onEaseEnd;this._onEaseEnd=void 0,g.call(this,u)}if(!l){let g=this.handlers;g&&g.stop(!1)}return this}_ease(l,u,g){g.animate===!1||g.duration===0?(l(1),u()):(this._easeStart=r.o.now(),this._easeOptions=g,this._onEaseFrame=l,this._onEaseEnd=u,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){let l=Math.min((r.o.now()-this._easeStart)/this._easeOptions.duration,1),u=this._onEaseFrame;u&&u(this._easeOptions.easing(l)),l<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(l,u){l=r.bT(l,-180,180);let g=Math.abs(l-u);return Math.abs(l-360-u)180?-360:g<-180?360:0}_prefersReducedMotion(l){return this._respectPrefersReducedMotion&&r.o.prefersReducedMotion&&!(l&&l.essential)}_emulate(l,u,g){let b=Math.ceil(15*u/1e3),C=[],S=l(g.clone());for(let E=0;E<=b;E++){let k=S(E/b);C.push(k.clone())}return C}_preloadTiles(l,u){}}class bx{constructor(l={}){this.options=l,r.aY(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(l){let u=this.options&&this.options.compact,g=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",g);let b=R("span","mapboxgl-ctrl-icon",this._compactButton);return b.setAttribute("aria-hidden","true"),b.setAttribute("title",g),this._innerContainer=R("div","mapboxgl-ctrl-attrib-inner",this._container),u&&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),u===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 u=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||r.e.ACCESS_TOKEN}];if(l){let g=u.reduce((b,C,S)=>(C.value&&(b+=`${C.key}=${C.value}${Sb.length-C.length),l=l.filter((b,C)=>{for(let S=C+1;S=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=[...this.options.customAttribution,...l]:l.unshift(this.options.customAttribution));let g=l.join(" | ");g!==this._attribHTML&&(this._attribHTML=g,l.length?(this._innerContainer.innerHTML=g,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class gh{constructor(){r.aY(["_updateLogo","_updateCompact"],this)}onAdd(l){this._map=l,this._container=R("div","mapboxgl-ctrl");let u=R("a","mapboxgl-ctrl-logo");return u.target="_blank",u.rel="noopener nofollow",u.href="https://www.mapbox.com/",u.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),u.setAttribute("rel","noopener nofollow"),this._container.appendChild(u),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 u in l){let g=l[u].getSource();if(g.hasOwnProperty("mapbox_logo")&&!g.mapbox_logo)return!1}return!0}_updateCompact(){let l=this._container.children;if(l.length){let u=l[0];this._map.getCanvasContainer().offsetWidth<250?u.classList.add("mapboxgl-compact"):u.classList.remove("mapboxgl-compact")}}}class xx{constructor(){r.aY(["_onIndoorUpdate"],this)}onAdd(l){return this._map=l,this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._map.indoor.on("indoorupdate",u=>this._onIndoorUpdate({selectedFloorId:u.selectedFloorId,floors:u.floors})),this._container}_createButton(l,u){let g=R("button",l,this._container);return g.type="button",g.addEventListener("click",u),g}_createSeparator(){return R("div","mapboxgl-ctrl-separator",this._container)}_setButtonTitle(l,u){this._map&&(l.setAttribute("aria-label",u),l.textContent=u)}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 u=this._model;this._model=l,this._container.style.display="inline-block",this._container.style.borderRadius="8px";let g=l.floors.sort((b,C)=>C.levelOrder-b.levelOrder);u?(Array.from(this._container.children).forEach(b=>b.remove()),this.addCurrentFloors(g)):this.addCurrentFloors(g)}addCurrentFloors(l){for(let u=0;u{this._map._selectIndoorFloor(g.id),this._model&&(this._model.selectedFloorId=g.id),Array.from(this._container.children).forEach(C=>{C.classList.contains("mapboxgl-ctrl-level-button")&&C.classList.remove("mapboxgl-ctrl-level-button-selected")}),b.classList.add("mapboxgl-ctrl-level-button-selected")});this._setButtonTitle(b,g.shortName),this._model&&g.id===this._model.selectedFloorId&&b.classList.add("mapboxgl-ctrl-level-button-selected"),this._container.append(b),u=this._endTime)return this._end;let u=r.dz((l-this._startTime)/(this._endTime-this._startTime));return this._start*(1-u)+this._end*u}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,u,g){this._start=this.getValue(u),this._end=l,this._startTime=u,this._endTime=u+g}}let Cx={"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 wx extends r.z{constructor(l,u,g,b){let{point:C,lngLat:S,originalEvent:E,target:k}=l;super(l.type,{point:C,lngLat:S,originalEvent:E,target:k}),this.preventDefault=()=>{l.preventDefault()},this.id=u,this.interaction=g,this.feature=b}}class yF{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,u){if(this.typeById.has(l))throw new Error(`Interaction id "${l}" already exists.`);let g=u.filter,b=u.type;g&&this.filters.set(l,r.b6(g)),b==="mouseover"&&(b="mouseenter"),b==="mouseout"&&(b="mouseleave");let C=this.interactionsByType.get(b)||new Map;b==="mouseenter"||b==="mouseleave"?(this.delegatedInteractions.size===0&&(this.map.on("mousemove",this.handleMove),this.map.on("mouseout",this.handleOut)),this.delegatedInteractions.set(l,u)):C.size===0&&this.map.on(b,this.handleType),C.size===0&&this.interactionsByType.set(b,C),C.set(l,u),this.typeById.set(l,b)}get(l){let u=this.typeById.get(l);if(!u)return;let g=this.interactionsByType.get(u);return g?g.get(l):void 0}remove(l){let u=this.typeById.get(l);if(!u)return;this.typeById.delete(l),this.filters.delete(l);let g=this.interactionsByType.get(u);g&&(g.delete(l),u==="mouseenter"||u==="mouseleave"?(this.delegatedInteractions.delete(l),this.delegatedInteractions.size===0&&(this.map.off("mousemove",this.handleMove),this.map.off("mouseout",this.handleOut))):g.size===0&&this.map.off(u,this.handleType))}queryTargets(l,u){let g=[];for(let[b,C]of u)C.target&&g.push({targetId:b,target:C.target,filter:this.filters.get(b)});return this.map.style.queryRenderedTargets(l,g,this.map.transform)}handleMove(l){this.prevHoveredFeatures=this.hoveredFeatures,this.hoveredFeatures=new Map;let u=this.queryTargets(l.point,Array.from(this.delegatedInteractions).reverse());u.length&&(l.type="mouseenter",this.handleType(l,u));let g=new Map;for(let[b,{feature:C}]of this.prevHoveredFeatures)this.hoveredFeatures.has(b)||g.set(C.id,C);g.size&&(l.type="mouseleave",this.handleType(l,Array.from(g.values())))}handleOut(l){let u=Array.from(this.hoveredFeatures.values()).map(({feature:g})=>g);u.length&&(l.type="mouseleave",this.handleType(l,u)),this.hoveredFeatures.clear()}handleType(l,u){let g=l.type==="mouseenter";if(g&&!this.interactionsByType.has(l.type))return void r.w("mouseenter interaction required for mouseleave to work.");let b=Array.from(this.interactionsByType.get(l.type)).reverse(),C=!!u;u=u||this.queryTargets(l.point,b);let S=!1,E=new Set;for(let k of u){for(let[F,z]of b){if(!z.target)continue;let q=k.variants?k.variants[F]:null;if(q){for(let U of q){if(hf(U,k,E,F))continue;let Y=new r.dt(k,U),X=jb(U,k,F);C&&(Y.state=this.map.getFeatureState(Y));let J=g?this.prevHoveredFeatures.get(X):null,ae=new wx(l,F,z,Y),ne=J?J.stop:z.handler(ae);if(g&&this.hoveredFeatures.set(X,{feature:k,stop:ne}),ne!==!1){S=!0;break}}if(S)break}}if(S)break}if(!S)for(let[k,F]of b){let{handler:z,target:q}=F;if(!q&&z(new wx(l,k,F,null))!==!1)break}}}function H8(_,l){if(Array.isArray(_)&&Array.isArray(l)){let u=new Set(_),g=new Set(l);return u.size===g.size&&_.every(b=>g.has(b))}return r.by(_,l)}let Sx={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"},j8={showCompass:!0,showZoom:!0,visualizePitch:!1};class G8{constructor(l,u,g=!1){this._clickTolerance=10,this.element=u,this.mouseRotate=new sS({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,g&&(this.mousePitch=new aS({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),r.aY(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),u.addEventListener("mousedown",this.mousedown),u.addEventListener("touchstart",this.touchstart,{passive:!1}),u.addEventListener("touchmove",this.touchmove),u.addEventListener("touchend",this.touchend),u.addEventListener("touchcancel",this.reset)}down(l,u){this.mouseRotate.mousedown(l,u),this.mousePitch&&this.mousePitch.mousedown(l,u),se()}move(l,u){let g=this.map,b=this.mouseRotate.mousemoveWindow(l,u),C=b&&b.bearingDelta;if(C&&g.setBearing(g.getBearing()+C),this.mousePitch){let S=this.mousePitch.mousemoveWindow(l,u),E=S&&S.pitchDelta;E&&g.setPitch(g.getPitch()+E)}}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(){ge(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup)}mousedown(l){this.down(Object.assign({},l,{ctrlKey:!0,preventDefault:()=>l.preventDefault()}),fe(this.element,l)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)}mousemove(l){this.move(l,fe(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=be(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=be(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)u.width||l.y>u.height;u.locationPoint3D(g).distSqr(l)180;){let g=u.locationPoint3D(_);if(g.x>=0&&g.y>=0&&g.x<=u.width&&g.y<=u.height)break;_.lng>u.center.lng?_.lng-=360:_.lng+=360}return _}let Ix={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%)"},cu={rotation:0,rotationAlignment:"auto",pitchAlignment:"auto",occludedOpacity:.2,altitude:0};class A_ extends r.E{constructor(l,u){super(),(l instanceof HTMLElement||u)&&(l=Object.assign({element:l},u)),r.aY(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this);let{anchor:g="center",color:b="#3FB1CE",scale:C=1,draggable:S=!1,clickTolerance:E=0,rotation:k=cu.rotation,rotationAlignment:F=cu.rotationAlignment,pitchAlignment:z=cu.pitchAlignment,occludedOpacity:q=cu.occludedOpacity,altitude:U=cu.altitude}=l||{};this._anchor=g,this._color=b,this._scale=C,this._draggable=S,this._clickTolerance=E,this._rotation=k,this._rotationAlignment=F,this._pitchAlignment=z,this._occludedOpacity=q,this._altitude=U,this._state="inactive",this._isDragging=!1,this._updateMoving=()=>this._update(!0),l&&l.element?(this._element=l.element,this._offset=r.P.convert(l&&l.offset||[0,0])):(this._defaultMarker=!0,this._element=this._createDefaultMarker(),this._offset=r.P.convert(l&&l.offset||[0,-14])),this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.hasAttribute("role")||this._element.setAttribute("role","img"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",J=>{J.preventDefault()}),this._element.addEventListener("mousedown",J=>{J.preventDefault()});let Y=this._element.classList;for(let J in Ix)Y.remove(`mapboxgl-marker-anchor-${J}`);Y.add(`mapboxgl-marker-anchor-${this._anchor}`);let X=l&&l.className?l.className.trim().split(/\s+/):[];Y.add(...X),this._popup=null}_createDefaultMarker(){let l=R("div"),u=j("svg",{display:"block",height:41*this._scale+"px",width:27*this._scale+"px",viewBox:"0 0 27 41"},l);if(this._altitude===0){let g=j("radialGradient",{id:"shadowGradient"},j("defs",{},u));j("stop",{offset:"10%","stop-opacity":.4},g),j("stop",{offset:"100%","stop-opacity":.05},g),j("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},u)}return j("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"},u),j("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"},u),j("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},u),l}addTo(l){return l===this._map||(this.remove(),this._map=l,l.getCanvasContainer().appendChild(this._element),l.on("move",this._updateMoving),l.on("moveend",this._update),l.on("remove",this._clearFadeTimer),l._addMarker(this),this.setDraggable(this._draggable),this._update(),l.on("click",this._onMapClick)),this}remove(){let l=this._map;return l&&(l.off("click",this._onMapClick),l.off("move",this._updateMoving),l.off("moveend",this._update),l.off("mousedown",this._addDragHandler),l.off("touchstart",this._addDragHandler),l.off("mouseup",this._onUp),l.off("touchend",this._onUp),l.off("mousemove",this._onMove),l.off("touchmove",this._onMove),l.off("remove",this._clearFadeTimer),l._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=r.aR.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}setAltitude(l){return l===this._altitude||(this._defaultMarker&&(this._altitude===0&&l!==0||this._altitude!==0&&l===0)&&(this._element=this._createDefaultMarker()),this._altitude=l||cu.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 b=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":[b,-1*(38.1-13.5+b)],"bottom-right":[-b,-1*(38.1-13.5+b)],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 u=l.code,g=l.charCode||l.keyCode;u!=="Space"&&u!=="Enter"&&g!==32&&g!==13||this.togglePopup()}_onMapClick(l){let u=l.originalEvent.target,g=this._element;this._popup&&(u===g||g.contains(u))&&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,u=this._pos;if(!l||!u)return!1;let g=l.unproject(u,this._altitude),b=l.getFreeCameraOptions();if(!b.position)return!1;let C=b.position.toLngLat();return C.distanceTo(g)<.9*C.distanceTo(this._lngLat)}_evaluateOpacity(){let l=this._map;if(!l)return;let u=this._pos;if(!u||u.x<0||u.x>l.transform.width||u.y<0||u.y>l.transform.height)return void this._clearFadeTimer();let g=l.unproject(u,this._altitude),b;l._showingGlobe()&&r.eY(l.transform,this._lngLat)?b=0:(b=1-l._queryFogOpacity(g),l.transform._terrainEnabled()&&l.getTerrain()&&this._behindTerrain()&&(b*=this._occludedOpacity)),this._element.style.opacity=`${b}`,this._element.style.pointerEvents=b>0?"auto":"none",this._popup&&this._popup._setOpacity(b),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){let l=this._pos;if(!l||!this._map)return;let u=this._offset.mult(this._scale);this._element.style.transform=` translate(${l.x}px,${l.y}px) ${Ix[this._anchor]} ${this._calculateXYTransform()} ${this._calculateZTransform()} translate(${u.x}px,${u.y}px) `}_calculateXYTransform(){let l=this._pos,u=this._map,g=this.getPitchAlignment();if(!u||!l||g!=="map")return"";if(!u._showingGlobe()){let k=u.getPitch();return k?`rotateX(${k}deg)`:""}let b=r.cW(r.eZ(u.transform,this._lngLat)),C=l.sub(r.e_(u.transform)),S=Math.abs(C.x)+Math.abs(C.y);if(S===0)return"";let E=b/S;return`rotateX(${-C.y*E}deg) rotateY(${C.x*E}deg)`}_calculateZTransform(){let l=this._pos,u=this._map;if(!u||!l)return"";let g=0,b=this.getRotationAlignment();if(b==="map")if(u._showingGlobe()){let C=u.project(new r.aR(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),S=u.project(new r.aR(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(C);g=r.cW(Math.atan2(S.y,S.x))-90}else g=-u.getBearing();else if(b==="horizon"){let C=r.ah(4,6,u.getZoom()),S=r.e_(u.transform);S.y+=C*u.transform.height;let E=l.sub(S),k=r.cW(Math.atan2(E.y,E.x));g=(k>90?k-270:k+90)*(1-C)}return g+=this._rotation,g?`rotateZ(${g}deg)`:""}_update(l){cancelAnimationFrame(this._updateFrameId);let u=this._map;u&&(u.transform.renderWorldCopies&&(this._lngLat=uS(this._lngLat,this._pos,u.transform)),this._pos=u.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(),u._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(u._showingGlobe()||u.getTerrain()||u.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(l){return this._offset=r.P.convert(l),this._update(),this}addClassName(l){return this._element.classList.add(l),this}removeClassName(l){return this._element.classList.remove(l),this}toggleClassName(l){return this._element.classList.toggle(l)}_onMove(l){let u=this._map;if(!u)return;let g=this._pointerdownPos,b=this._positionDelta;if(g&&b){if(!this._isDragging){let C=this._clickTolerance||u._clickTolerance;if(l.point.dist(g)_.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(_.minPitch!=null&&_.maxPitch!=null&&_.minPitch>_.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(_.minPitch!=null&&_.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(_.maxPitch!=null&&_.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(_.antialias&&r.eW(window)&&(_.antialias=!1,r.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new $c(_.minZoom,_.maxZoom,_.minPitch,_.maxPitch,_.renderWorldCopies,null,null),_),this._repaint=!!_.repaint,this._interactive=_.interactive,this._minTileCacheSize=_.minTileCacheSize,this._maxTileCacheSize=_.maxTileCacheSize,this._failIfMajorPerformanceCaveat=_.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=_.preserveDrawingBuffer,this._antialias=_.antialias,this._trackResize=_.trackResize,this._bearingSnap=_.bearingSnap,this._refreshExpiredTiles=_.refreshExpiredTiles,this._fadeDuration=_.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=_.crossSourceCollisions,this._collectResourceTiming=_.collectResourceTiming,this._language=this._parseLanguage(_.language),this._worldview=_.worldview,this._renderTaskQueue=new ca,this._domRenderTaskQueue=new ca,this._controls=[],this._markers=[],this._popups=[],this._mapId=r.b2(),this._locale=Object.assign({},Cx,_.locale),this._clickTolerance=_.clickTolerance,this._cooperativeGestures=_.cooperativeGestures,this._performanceMetricsCollection=_.performanceMetricsCollection,this._tessellationStep=_.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=_.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new _h(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=_.scaleFactor,this._requestManager=new ue(_.transformRequest,_.accessToken,_.testMode),this._silenceAuthErrors=!!_.testMode,this._contextCreateOptions=_.contextCreateOptions?Object.assign({},_.contextCreateOptions):{},typeof _.container=="string"){let u=document.getElementById(_.container);if(!u)throw new Error(`Container '${_.container.toString()}' not found.`);this._container=u}else{if(!(_.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=_.container}if(this._container.childNodes.length>0&&r.w("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),_.maxBounds&&this.setMaxBounds(_.maxBounds),this._spriteFormat=_.spriteFormat,r.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new Iy),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 vx(this,_),this._localFontFamily=_.localFontFamily,this._localIdeographFontFamily=_.localIdeographFontFamily,(_.style||!_.testMode)&&this.setStyle(_.style||r.e.DEFAULT_STYLE,{config:_.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),_.projection&&this.setProjection(_.projection),this.indoor=new u_(this),_.hash&&(this._hash=new LD(typeof _.hash=="string"&&_.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){l.center==null&&l.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:_.center,zoom:_.zoom,bearing:_.bearing,pitch:_.pitch});let u=_.bounds;u&&(this.resize(),this.fitBounds(u,Object.assign({},_.fitBoundsOptions,{duration:0})))}this.resize(),_.attributionControl&&this.addControl(new bx({customAttribution:_.customAttribution})),this._logoControl=new gh,this.addControl(this._logoControl,_.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()}),this.on("data",u=>{this._update(u.dataType==="style"),this.fire(new r.z(`${u.dataType}data`,u))}),this.on("dataloading",u=>{this.fire(new r.z(`${u.dataType}dataloading`,u))}),this._interactions=new yF(this)}_getMapId(){return this._mapId}addControl(_,l){if(l===void 0&&(l=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new r.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let u=_.onAdd(this);this._controls.push(_);let g=this._controlPositions[l];return l.indexOf("bottom")!==-1?g.insertBefore(u,g.firstChild):g.appendChild(u),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new r.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let l=this._controls.indexOf(_);return l>-1&&this._controls.splice(l,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(_){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));let l=!this._moving;return l&&this.fire(new r.z("movestart",_)).fire(new r.z("move",_)),this.fire(new r.z("resize",_)),l&&this.fire(new r.z("moveend",_)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(_){return this.transform.setMaxBounds(r.aI.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.minZoom=_,this._update(),this.getZoom()<_?this.setZoom(_):this.fire(new r.z("zoomstart")).fire(new r.z("zoom")).fire(new r.z("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.maxZoom=_,this._update(),this.getZoom()>_?this.setZoom(_):this.fire(new r.z("zoomstart")).fire(new r.z("zoom")).fire(new r.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.minPitch=_,this._update(),this.getPitch()<_?this.setPitch(_):this.fire(new r.z("pitchstart")).fire(new r.z("pitch")).fire(new r.z("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(_>=this.transform.minPitch)return this.transform.maxPitch=_,this._update(),this.getPitch()>_?this.setPitch(_):this.fire(new r.z("pitchstart")).fire(new r.z("pitch")).fire(new r.z("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(_){return this._scaleFactor=_,this.painter.scaleFactor=_,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(l=>l.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.renderWorldCopies=_,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(_){return _==="auto"?navigator.language:Array.isArray(_)?_.length===0?void 0:_.map(l=>l==="auto"?navigator.language:l):_}setLanguage(_){let l=this._parseLanguage(_);if(!this.style||l===this._language)return this;this._language=l,this.style.reloadSources();for(let u of this._controls)u._setLanguage&&u._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(_){return this.style&&_!==this._worldview?(this._worldview=_,this._styleDirty=!0,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(_){return this._lazyInitEmptyStyle(),_?typeof _=="string"&&(_={name:_}):_=null,this._useExplicitProjection=!!_,this._prioritizeAndUpdateProjection(_,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;let _=this.transform,l=_.projection.name,u;l==="globe"&&_.zoom>=r.cK?(_.setMercatorFromTransition(),u=!0):l==="mercator"&&_.zoom=r.cK?this.transform.setMercatorFromTransition():this.transform.setProjection(_),this.style.applyProjectionUpdate(),l&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(_,l){return this.transform.locationPoint3D(r.aR.convert(_),l)}unproject(_,l){return this.transform.pointLocation3D(r.P.convert(_),l)}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(_,l,u){let g=b=>{let C=[];if(Array.isArray(l)){let S=l.filter(E=>this.getLayer(E));C=S.length?this.queryRenderedFeatures(b,{layers:S}):[]}else C=this.queryRenderedFeatures(b,{target:l});return C};if(_==="mouseenter"||_==="mouseover"){let b=!1;return{listener:u,targets:l,delegates:{mousemove:S=>{let E=g(S.point);E.length?b||(b=!0,u.call(this,new Ba(_,this,S.originalEvent,{features:E}))):b=!1},mouseout:()=>{b=!1}}}}if(_==="mouseleave"||_==="mouseout"){let b=!1;return{listener:u,targets:l,delegates:{mousemove:E=>{g(E.point).length?b=!0:b&&(b=!1,u.call(this,new Ba(_,this,E.originalEvent)))},mouseout:E=>{b&&(b=!1,u.call(this,new Ba(_,this,E.originalEvent)))}}}}{let b=C=>{let S=g(C.point);S.length&&(C.features=S,u.call(this,C),delete C.features)};return{listener:u,targets:l,delegates:{[_]:b}}}}on(_,l,u){if(typeof l=="function"||u===void 0)return super.on(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._createDelegatedListener(_,l,u);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(g);for(let b in g.delegates)this.on(b,g.delegates[b]);return this}once(_,l,u){if(typeof l=="function"||u===void 0)return super.once(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._createDelegatedListener(_,l,u);for(let b in g.delegates)this.once(b,g.delegates[b]);return this}off(_,l,u){if(typeof l=="function"||u===void 0)return super.off(_,l);if(typeof l=="string"&&(l=[l]),!this._areTargetsValid(l))return this;let g=this._delegatedListeners?this._delegatedListeners[_]:void 0;return g&&(b=>{for(let C=0;C{if(u){let b=typeof u=="string"?u:u instanceof Error?u.message:u.error;r.w(`Unable to perform style diff: ${b}. Rebuilding the style from scratch.`),this._updateStyle(_,l)}else g&&this._update(!0)},()=>this._postStyleLoadEvent()),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._localFontFamily=l.localFontFamily,this._updateStyle(_,l))}_getUIString(_){let l=this._locale[_];if(l==null)throw new Error(`Missing UI string '${_}'`);return l}_updateStyle(_,l){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),_){let u=Object.assign({},l);l&&l.config&&(u.initialConfig=l.config,delete u.config),this.style=new Gu(this,u).load(_),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new Gu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(r.w("There is no style added to the map."),!1)}_isValidId(_){return _==null?(this.fire(new r.y(new Error("IDs can't be empty."))),!1):!r.dm(_)||(this.fire(new r.y(new Error(`IDs can't contain special symbols: "${_}".`))),!1)}_isTargetValid(_){return"featuresetId"in _?this._isValidId("importId"in _?_.importId:_.featuresetId):"layerId"in _&&this._isValidId(_.layerId)}_areTargetsValid(_){if(Array.isArray(_)){for(let l of _)if(!this._isValidId(l))return!1;return!0}return this._isTargetValid(_)}addSource(_,l){return this._isValidId(_)?(this._lazyInitEmptyStyle(),this.style.addSource(_,l),this._update(!0)):this}isSourceLoaded(_){return!!this._isValidId(_)&&!!this.style&&this.style._isSourceCacheLoaded(_)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(_,l,u){this._lazyInitEmptyStyle(),this.style.addSourceType(_,l,u)}removeSource(_){return this._isValidId(_)?(this.style.removeSource(_),this._updateTerrain(),this._update(!0)):this}getSource(_){return this._isValidId(_)?this.style.getOwnSource(_):null}addImage(_,l,{pixelRatio:u=1,sdf:g=!1,stretchX:b,stretchY:C,content:S}={}){this._lazyInitEmptyStyle();let E=r.I.from(_);if(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap){let{width:k,height:F,data:z}=r.o.getImageData(l);this.style.addImage(E,{data:new r.q({width:k,height:F},z),pixelRatio:u,stretchX:b,stretchY:C,content:S,sdf:g,version:0,usvg:!1})}else if(l.width===void 0||l.height===void 0)this.fire(new r.y(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{let{width:k,height:F}=l,z=l;this.style.addImage(E,{data:new r.q({width:k,height:F},new Uint8Array(z.data)),pixelRatio:u,stretchX:b,stretchY:C,content:S,sdf:g,usvg:!1,version:0,userImage:z}),z.onAdd&&z.onAdd(this,_)}}updateImage(_,l){this._lazyInitEmptyStyle();let u=r.I.from(_),g=this.style.getImage(u);if(!g)return void this.fire(new r.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let b=l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap?r.o.getImageData(l):l,{width:C,height:S,data:E}=b;if(C===void 0||S===void 0)return void this.fire(new r.y(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(C!==(g.usvg?g.icon.usvg_tree.width:g.data.width)||S!==(g.usvg?g.icon.usvg_tree.height:g.data.height))return void this.fire(new r.y(new Error(`The width and height of the updated image (${C}, ${S}) must be that same as the previous version of the image (${g.data.width}, ${g.data.height})`)));let k=!(l instanceof HTMLImageElement||ImageBitmap&&l instanceof ImageBitmap),F=!1;g.usvg?(g.data=new r.q({width:C,height:S},new Uint8Array(E)),g.usvg=!1,g.icon=void 0,F=!0):g.data.replace(E,k),this.style.updateImage(u,g,F)}hasImage(_){return _?!!this.style&&!!this.style.getImage(r.I.from(_)):(this.fire(new r.y(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(r.I.from(_))}loadImage(_,l){r.n(this._requestManager.transformRequest(_,r.R.Image),(u,g)=>{l(u,g instanceof HTMLImageElement?r.o.getImageData(g):g)})}listImages(){return this.style.listImages().map(_=>_.name)}addModel(_,l){this._lazyInitEmptyStyle(),this.style.addModel(_,l)}hasModel(_){return _?this.style.hasModel(_):(this.fire(new r.y(new Error("Missing required model id"))),!1)}removeModel(_){this.style.removeModel(_)}listModels(){return this.style.listModels()}addLayer(_,l){return this._isValidId(_.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(_,l),this._update(!0)):this}getSlot(_){let l=this.getLayer(_);return l&&l.slot||null}setSlot(_,l){return this.style.setSlot(_,l),this.style.mergeLayers(),this._update(!0)}addImport(_,l){return this.style.addImport(_,l).catch(u=>this.fire(new r.y(new Error("Failed to add import",u)))),this}updateImport(_,l){return typeof l!="string"&&l.id!==_?(this.removeImport(_),this.addImport(l)):(this.style.updateImport(_,l),this._update(!0))}removeImport(_){return this.style.removeImport(_),this}moveImport(_,l){return this.style.moveImport(_,l),this._update(!0)}moveLayer(_,l){return this._isValidId(_)?(this.style.moveLayer(_,l),this._update(!0)):this}removeLayer(_){return this._isValidId(_)?(this.style.removeLayer(_),this._update(!0)):this}getLayer(_){if(!this._isValidId(_))return null;let l=this.style.getOwnLayer(_);return l?l.type==="custom"?l.implementation:l.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(_,l,u){return this._isValidId(_)?(this.style.setLayerZoomRange(_,l,u),this._update(!0)):this}setFilter(_,l,u={}){return this._isValidId(_)?(this.style.setFilter(_,l,u),this._update(!0)):this}getFilter(_){return this._isValidId(_)?this.style.getFilter(_):null}setPaintProperty(_,l,u,g={}){return this._isValidId(_)?(this.style.setPaintProperty(_,l,u,g),this._update(!0)):this}getPaintProperty(_,l){return this._isValidId(_)?this.style.getPaintProperty(_,l):null}setLayoutProperty(_,l,u,g={}){return this._isValidId(_)?(this.style.setLayoutProperty(_,l,u,g),this._update(!0)):this}getLayoutProperty(_,l){return this._isValidId(_)?this.style.getLayoutProperty(_,l):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(_){return this.style.setGlyphsUrl(_),this._update(!0)}getSchema(_){return this.style.getSchema(_)}setSchema(_,l){return this.style.setSchema(_,l),this._update(!0)}getConfig(_){return this.style.getConfig(_)}setConfig(_,l){return this.style.setConfig(_,l),this._update(!0)}getConfigProperty(_,l){return this.style.getConfigProperty(_,l)}setConfigProperty(_,l,u){return this.style.setConfigProperty(_,l,u),this._update(!0)}getFeaturesetDescriptors(_){return this.style.getFeaturesetDescriptors(_)}setLights(_){if(this._lazyInitEmptyStyle(),_&&_.length===1&&_[0].type==="flat"){let l=_[0];l.properties?this.style.setFlatLight(l.properties,l.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(_),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){let _=this.style.getLights()||[];return _.length===0&&_.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),_}setLight(_,l={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:_}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(_){return this._lazyInitEmptyStyle(),!_&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(_),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(_){return this._lazyInitEmptyStyle(),this.style.setFog(_),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(_){return this._lazyInitEmptyStyle(),this.style.setSnow(_),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(_){return this._lazyInitEmptyStyle(),this.style.setRain(_),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(_){return this._lazyInitEmptyStyle(),this.style.setColorTheme(_),this._update(!0)}setImportColorTheme(_,l){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(_,l),this._update(!0)}setCamera(_){return this.style.setCamera(_),this._triggerCameraUpdate(_)}_triggerCameraUpdate(_){return this._update(this.transform.setOrthographicProjectionAtLowPitch(_["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(_){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(r.aR.convert(_),this.transform):0}setFeatureState(_,l){return _.source&&!this._isValidId(_.source)?this:(this.style.setFeatureState(_,l),this._update())}removeFeatureState(_,l){return _.source&&!this._isValidId(_.source)?this:(this.style.removeFeatureState(_,l),this._update())}getFeatureState(_){return _.source&&!this._isValidId(_.source)?null:this.style.getFeatureState(_)}_selectIndoorFloor(_){this.indoor.selectFloor(_)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new xx),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;let _=this._container.getBoundingClientRect().width||400,l=this._container.getBoundingClientRect().height||300,u,g,b,C=this._container;for(;C&&(!g||!b);){let S=window.getComputedStyle(C).transform;S&&S!=="none"&&(u=S.match(/matrix.*\((.+)\)/)[1].split(", "),u[0]&&u[0]!=="0"&&u[0]!=="1"&&(g=u[0]),u[3]&&u[3]!=="0"&&u[3]!=="1"&&(b=u[3])),C=C.parentElement}this._containerWidth=g?Math.abs(_/g):_,this._containerHeight=b?Math.abs(l/b):l}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&r.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){let _=this._container;_.classList.add("mapboxgl-map"),(this._missingCSSCanary=R("div","mapboxgl-canary",_)).style.visibility="hidden",this._detectMissingCSS();let l=this._canvasContainer=R("div","mapboxgl-canvas-container",_);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 u=this._controlContainer=R("div","mapboxgl-control-container",_),g=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(b=>{g[b]=R("div",`mapboxgl-ctrl-${b}`,u)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,l){let u=r.o.devicePixelRatio||1;this._canvas.width=u*Math.ceil(_),this._canvas.height=u*Math.ceil(l),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${l}px`}_addMarker(_){this._markers.push(_)}_removeMarker(_){let l=this._markers.indexOf(_);l!==-1&&this._markers.splice(l,1)}_addPopup(_){this._popups.push(_)}_removePopup(_){let l=this._popups.indexOf(_);l!==-1&&this._popups.splice(l,1)}_setupPainter(){let _=Object.assign({},P.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),l=this._canvas.getContext("webgl2",_);l?(Lo(l,!0),this.painter=new PD(l,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",u=>{u.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),r.k.testSupport(l)):this.fire(new r.y(new Error("Failed to initialize WebGL")))}_contextLost(_){_.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new r.z("webglcontextlost",{originalEvent:_}))}_contextRestored(_){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new r.z("webglcontextrestored",{originalEvent:_}))}_onMapScroll(_){if(_.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(_){return this.style?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_requestDomTask(_){!this.loaded()||this.loaded()&&!this.isMoving()?_():this._domRenderTaskQueue.add(_)}_render(_){let l;this.fire(new r.z("renderstart")),++this._frameId;let u=this.painter.context.extTimerQuery,g=r.o.now(),b=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(l=b.createQuery(),b.beginQuery(u.TIME_ELAPSED_EXT,l)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(_),this._domRenderTaskQueue.run(_),this._removed)return;this._updateProjectionTransition();let C=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;let F=this.transform.zoom,z=this.transform.pitch,q=r.o.now(),U=new r.ac(F,{now:q,fadeDuration:C,pitch:z,transition:this.style.transition,worldview:this._worldview});this.style.update(U)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let S=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),S=this._updateAverageElevation(g),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):S=this._updateAverageElevation(g);let E=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,C,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),E&&(this._placementDirty=E.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:C,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new r.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,f.mark(p.load),this.fire(new r.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),l){let F=r.o.now()-g;b.endQuery(u.TIME_ELAPSED_EXT),setTimeout(()=>{let z=b.getQueryParameter(l,b.QUERY_RESULT)/1e6;b.deleteQuery(l),this.fire(new r.z("gpu-timing-frame",{cpuTime:F,gpuTime:z}))},50)}if(this.listens("gpu-timing-layer")){let F=this.painter.collectGpuTimers();setTimeout(()=>{let z=this.painter.queryGpuTimers(F);this.fire(new r.z("gpu-timing-layer",{layerTimes:z}))},50)}if(this.listens("gpu-timing-deferred-render")){let F=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{let z=this.painter.queryGpuTimeDeferredRender(F);this.fire(new r.z("gpu-timing-deferred-render",{gpuTime:z}))},50)}let k=this._sourcesDirty||this._styleDirty||this._placementDirty||S;if(k||this._repaint)this.triggerRepaint();else{let F=this.idle();if(F&&(S=this._updateAverageElevation(g,!0)),S)this.triggerRepaint();else if(this._triggerFrame(!1),F&&(this.fire(new r.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){let z=this._calculateSpeedIndex();this.fire(new r.z("speedindexcompleted",{speedIndex:z})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||k||(this._fullyLoaded=!0,f.mark(p.fullLoad),this._performanceMetricsCollection&&Wi(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(_){for(let l of this._markers)_&&!this.getRenderWorldCopies()&&(l._lngLat=l._lngLat.wrap()),l._update();for(let l of this._popups)!_||this.getRenderWorldCopies()||l._trackPointer||(l._lngLat=l._lngLat.wrap()),l._update()}_updateAverageElevation(_,l=!1){let u=b=>(this.transform.averageElevation=b,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&u(0);let g=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(g||(l||_-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(_)){let b=this.transform.averageElevation,C=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(C)?C=0:this._averageElevationLastSampledAt=_;let S=Math.abs(b-C);if(S>1){if(this._isInitialLoad||g)return this._averageElevation.jumpTo(C),u(C);this._averageElevation.easeTo(C,_,300)}else if(S>1e-4)return this._averageElevation.jumpTo(C),u(C)}return!!this._averageElevation.isEasing(_)&&u(this._averageElevation.getValue(_))}_authenticate(){Vn(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,_=>{if(_&&(_.message===ht||_.status===401)){let l=this.painter.context.gl;Lo(l,!1),this._logoControl instanceof gh&&this._logoControl._updateLogo(),l&&l.clear(l.DEPTH_BUFFER_BIT|l.COLOR_BUFFER_BIT|l.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new r.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),qi(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&vn(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){let _=this._isDragging();this.painter.updateTerrain(this.style,_)}_calculateSpeedIndex(){let _=this.painter.canvasCopy(),l=this.painter.getCanvasCopiesAndTimestamps();l.timeStamps.push(performance.now());let u=this.painter.context.gl,g=u.createFramebuffer();function b(C){u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,C,0);let S=new Uint8Array(u.drawingBufferWidth*u.drawingBufferHeight*4);return u.readPixels(0,0,u.drawingBufferWidth,u.drawingBufferHeight,u.RGBA,u.UNSIGNED_BYTE,S),S}return u.bindFramebuffer(u.FRAMEBUFFER,g),this._canvasPixelComparison(b(_),l.canvasCopies.map(b),l.timeStamps)}_canvasPixelComparison(_,l,u){let g=u[1]-u[0],b=_.length/4;for(let C=0;C{let u=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,u&&this._render(l)}))}_preloadTiles(_){let l=this.style?this.style.getSourceCaches():[];return r.bw(l,(u,g)=>u._preloadTiles(_,g),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(_){this._trackResize&&this.resize({originalEvent:_})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(_){this._showParseStatus!==_&&(this._showParseStatus=_,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(_){this._showTerrainWireframe!==_&&(this._showTerrainWireframe=_,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(_){this._showLayers2DWireframe!==_&&(this._showLayers2DWireframe=_,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(_){this._showLayers3DWireframe!==_&&(this._showLayers3DWireframe=_,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(_){this._speedIndexTiming!==_&&(this._speedIndexTiming=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,this._tp.refreshUI(),_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(_){this._showTileAABBs!==_&&(this._showTileAABBs=_,this._tp.refreshUI(),_&&this._update())}_setCacheLimits(_,l){r.eX(_,l)}get version(){return a}},NavigationControl:class{constructor(_={}){this.options=Object.assign({},j8,_),this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(r.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",l=>{this._map&&this._map.zoomIn({},{originalEvent:l})}),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&&(r.aY(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",l=>{let u=this._map;u&&(this.options.visualizePitch?u.resetNorthPitch({},{originalEvent:l}):u.resetNorth({},{originalEvent:l}))}),this._compassIcon=R("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){let _=this._map;if(!_)return;let l=_.getZoom(),u=l===_.getMaxZoom(),g=l===_.getMinZoom();this._zoomInButton.disabled=u,this._zoomOutButton.disabled=g,this._zoomInButton.setAttribute("aria-disabled",u.toString()),this._zoomOutButton.setAttribute("aria-disabled",g.toString())}_rotateCompassArrow(){let _=this._map;if(!_)return;let l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(_.transform.pitch*(Math.PI/180)),.5)}) rotateX(${_.transform.pitch}deg) rotateZ(${_.transform.angle*(180/Math.PI)}deg)`:`rotate(${_.transform.angle*(180/Math.PI)}deg)`;_._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=l)})}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),_.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&_.on("pitch",this._rotateCompassArrow),_.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new G8(_,this._compass,this.options.visualizePitch)),this._container}onRemove(){let _=this._map;_&&(this._container.remove(),this.options.showZoom&&_.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&_.off("pitch",this._rotateCompassArrow),_.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(_,l){let u=R("button",_,this._container);return u.type="button",u.addEventListener("click",l),u}_setButtonTitle(_,l){if(!this._map)return;let u=this._map._getUIString(`NavigationControl.${l}`);_.setAttribute("aria-label",u),_.firstElementChild&&_.firstElementChild.setAttribute("title",u)}},GeolocateControl:class extends r.E{constructor(_={}){super();let l=navigator.geolocation;this.options=Object.assign({geolocation:l},Mf,_),r.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=tS(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(_){return this._map=_,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(_){let l=(u=!!this.options.geolocation)=>{this._supportsGeolocation=u,_(u)};this._supportsGeolocation!==void 0?_(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(u=>l(u.state!=="denied")).catch(()=>l()):l()}_isOutOfMapMaxBounds(_){let l=this._map.getMaxBounds(),u=_.coords;return!!l&&(u.longitudel.getEast()||u.latitudel.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(_){if(this._map){if(this._isOutOfMapMaxBounds(_))return this._setErrorState(),this.fire(new r.z("outofmaxbounds",_)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=_,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(_),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(_),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new r.z("geolocate",_)),this._finish()}}_updateCamera(_){let l=new r.aR(_.coords.longitude,_.coords.latitude),u=_.coords.accuracy,g=this._map.getBearing(),b=Object.assign({bearing:g},this.options.fitBoundsOptions);this._map.fitBounds(l.toBounds(u),b,{geolocateSource:!0})}_updateMarker(_){if(_){let l=new r.aR(_.coords.longitude,_.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=_.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){let _=this._map.transform,l=r.ce(1,_._center.lat)*_.worldSize,u=Math.ceil(2*this._accuracy*l);this._circleElement.style.width=`${u}px`,this._circleElement.style.height=`${u}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(_){if(this._map){if(this.options.trackUserLocation)if(_.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(_.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new r.z("error",_)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(_){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",l=>l.preventDefault()),this._geolocateButton=R("button","mapboxgl-ctrl-geolocate",this._container),R("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",_===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");let l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}else{let l=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",l),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",l)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=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 A_({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=R("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new A_({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",l=>{l.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l.originalEvent&&l.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new r.z("trackuserlocationend")))})}}_onDeviceOrientation(_){this._userLocationDotMarker&&(_.webkitCompassHeading?this._heading=_.webkitCompassHeading:_.absolute===!0&&(this._heading=-1*_.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return r.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new r.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new r.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new r.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(_={maximumAge:6e5,timeout:0},this._noTimeout=!0):(_=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,_),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){let _=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(l=>{l==="granted"&&_()}).catch(console.error):_()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:bx,ScaleControl:class{constructor(_={}){this.options=Object.assign({},tm,_),this._isNumberFormatSupported=(function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}})(),r.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){let _=this.options.maxWidth||100,l=this._map,u=l._containerHeight/2,g=l._containerWidth/2-_/2,b=l.unproject([g,u]),C=l.unproject([g+_,u]),S=b.distanceTo(C);if(this.options.unit==="imperial"){let E=3.2808*S;E>5280?this._setScale(_,E/5280,"mile"):this._setScale(_,E,"foot")}else this.options.unit==="nautical"?this._setScale(_,S/1852,"nautical-mile"):S>=1e3?this._setScale(_,S/1e3,"kilometer"):this._setScale(_,S,"meter")}_setScale(_,l,u){this._map._requestDomTask(()=>{let g=(function(C){let S=Math.pow(10,`${Math.floor(C)}`.length-1),E=C/S;return E=E>=10?10:E>=5?5:E>=3?3:E>=2?2:E>=1?1:(function(k){let F=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*F)/F})(E),S*E})(l),b=g/l;this._container.innerHTML=this._isNumberFormatSupported&&u!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:u}).format(g):`${g} ${im[u]}`,this._container.style.width=_*b+"px"})}onAdd(_){return this._map=_,this._language=_.getLanguage(),this._container=R("div","mapboxgl-ctrl mapboxgl-ctrl-scale",_.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(_){this._language=_,this._update()}setUnit(_){this.options.unit=_,this._update()}},FullscreenControl:class{constructor(_={}){this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:r.w("Full screen control 'container' must be a DOM element.")),r.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=R("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",r.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){let _=this._fullscreenButton=R("button","mapboxgl-ctrl-fullscreen",this._controlContainer);R("span","mapboxgl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){let _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",_)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},IndoorControl:xx,Popup:class extends r.E{constructor(_){super(),this.options=Object.assign(Object.create(D_),_),this._altitude=this.options.altitude,r.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(_&&_.className?_.className.trim().split(/\s+/):[])}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&_.on("preclick",this._onClose),this.options.closeOnMove&&_.on("move",this._onClose),_.on("remove",this.remove),this._update(),_._addPopup(this),this._focusFirstElement(),this._trackPointer?(_.on("mousemove",this._onMouseEvent),_.on("mouseup",this._onMouseEvent),_._canvasContainer.classList.add("mapboxgl-track-pointer")):_.on("move",this._update),this.fire(new r.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);let _=this._map;return _&&(_.off("move",this._update),_.off("move",this._onClose),_.off("preclick",this._onClose),_.off("click",this._onClose),_.off("remove",this.remove),_.off("mousemove",this._onMouseEvent),_.off("mouseup",this._onMouseEvent),_.off("drag",this._onMouseEvent),_._canvasContainer&&_._canvasContainer.classList.remove("mapboxgl-track-pointer"),_._removePopup(this),this._map=void 0),this.fire(new r.z("close")),this}getLngLat(){return this._lngLat}setLngLat(_){this._lngLat=r.aR.convert(_),this._pos=null,this._trackPointer=!1,this._update();let l=this._map;return l&&(l.on("move",this._update),l.off("mousemove",this._onMouseEvent),l._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(_){return this._altitude=_,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();let _=this._map;return _&&(_.off("move",this._update),_.on("mousemove",this._onMouseEvent),_.on("drag",this._onMouseEvent),_._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){let l=document.createDocumentFragment(),u=document.createElement("body"),g;for(u.innerHTML=_;g=u.firstChild,g;)l.appendChild(g);return this.setDOMContent(l)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){let l=this._content;if(l)for(;l.hasChildNodes();)l.firstChild&&l.removeChild(l.firstChild);else l=this._content=R("div","mapboxgl-popup-content",this._container||void 0);if(l.appendChild(_),this.options.closeButton){let u=this._closeButton=R("button","mapboxgl-popup-close-button",l);u.type="button",u.setAttribute("aria-label","Close popup"),u.innerHTML='',u.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(_){return this._classList.add(_),this._updateClassList(),this}removeClassName(_){return this._classList.delete(_),this._updateClassList(),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){let l;return this._classList.delete(_)?l=!1:(this._classList.add(_),l=!0),this._updateClassList(),l}_onMouseEvent(_){this._update(_.point)}_getAnchor(_){if(this.options.anchor)return this.options.anchor;let l=this._map,u=this._container,g=this._pos;if(!l||!u||!g)return"bottom";let b=u.offsetWidth,C=u.offsetHeight,S=g.xl.transform.width-b/2;if(g.y+_l.transform.height-C){if(S)return"bottom-left";if(E)return"bottom-right"}return S?"left":E?"right":"bottom"}_updateClassList(){let _=this._container;if(!_)return;let l=[...this._classList];l.push("mapboxgl-popup"),this._anchor&&l.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&l.push("mapboxgl-popup-track-pointer"),_.className=l.join(" ")}_update(_){let l=this._map,u=this._content;if(!l||!this._lngLat&&!this._trackPointer||!u)return;let g=this._container;if(g||(g=this._container=R("div","mapboxgl-popup",l.getContainer()),this._tip=R("div","mapboxgl-popup-tip",g),g.appendChild(u)),this.options.maxWidth&&g.style.maxWidth!==this.options.maxWidth&&(g.style.maxWidth=this.options.maxWidth),l.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=uS(this._lngLat,this._pos,l.transform)),!this._trackPointer||_){let b=this._pos=this._trackPointer&&_ instanceof r.P?_:l.project(this._lngLat,this._altitude),C=vF(this.options.offset),S=this._anchor=this._getAnchor(C.y),E=vF(this.options.offset,S),k=b.add(E).round();l._requestDomTask(()=>{this._container&&S&&(this._container.style.transform=`${Ix[S]} translate(${k.x}px,${k.y}px)`)})}if(!this._marker&&l._showingGlobe()){let b=r.eY(l.transform,this._lngLat)?0:1;this._setOpacity(b)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let _=this._container.querySelector(Mp);_&&_.focus()}_onClose(){this.remove()}_setOpacity(_){this._container&&(this._container.style.opacity=`${_}`),this._content&&(this._content.style.pointerEvents=_?"auto":"none")}},Marker:A_,Style:Gu,LngLat:r.aR,LngLatBounds:r.aI,Point:r.P,MercatorCoordinate:r.ae,FreeCameraOptions:ZA,Evented:r.E,config:r.e,prewarm:r.f0,clearPrewarmedResources:r.e$,get accessToken(){return r.e.ACCESS_TOKEN},set accessToken(_){r.e.ACCESS_TOKEN=_},get baseApiUrl(){return r.e.API_URL},set baseApiUrl(_){r.e.API_URL=_},get workerCount(){return r.f9.workerCount},set workerCount(_){r.f9.workerCount=_},get maxParallelImageRequests(){return r.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(_){r.e.MAX_PARALLEL_IMAGE_REQUESTS=_},clearStorage(_){r.f8(_)},get workerUrl(){return r.f7.workerUrl},set workerUrl(_){r.f7.workerUrl=_},get workerClass(){return r.f7.workerClass},set workerClass(_){r.f7.workerClass=_},get workerParams(){return r.f7.workerParams},set workerParams(_){r.f7.workerParams=_},get dracoUrl(){return r.f6()},set dracoUrl(_){r.f5(_)},get meshoptUrl(){return r.f4()},set meshoptUrl(_){r.f3(_)},setNow:r.o.setNow,restoreNow:r.o.restoreNow}});var o=e;return o})});var pxe=mu(bX=>{"use strict";bX.supported=vX;bX.notSupportedReason=uxe;function vX(t){return!uxe(t)}function uxe(t){if(!$at())return"not a browser";if(!qat())return"insufficient worker support";if(!Wat())return"insufficient Canvas/getImageData support";if(!Kat(t&&t.failIfMajorPerformanceCaveat))return"insufficient WebGL2 support";if(!Qat())return"insufficient ECMAScript 6 support"}function $at(){return typeof window<"u"&&typeof document<"u"}function qat(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(t),e,i;try{i=new Worker(n),e=!0}catch{e=!1}return i&&i.terminate(),URL.revokeObjectURL(n),e}function Wat(){var t=document.createElement("canvas");t.width=t.height=1;var n=t.getContext("2d");if(!n)return!1;var e=n.getImageData(0,0,1,1);return e&&e.width===t.width}var yX={};function Kat(t){return yX[t]===void 0&&(yX[t]=Yat(t)),yX[t]}vX.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Zat(t){var n=document.createElement("canvas"),e=Object.create(vX.webGLContextAttributes);return e.failIfMajorPerformanceCaveat=t,n.getContext("webgl2",e)}function Yat(t){var n=Zat(t);if(!n)return!1;var e;try{e=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!e||n.isContextLost()?!1:(n.shaderSource(e,"void main() {}"),n.compileShader(e),n.getShaderParameter(e,n.COMPILE_STATUS)===!0)}function Qat(){return!document.documentMode}});var Wxe=mu((R$i,qxe)=>{"use strict";qxe.exports=function(n,e,i,o){var r=n[0],a=n[1],p=!1;i===void 0&&(i=0),o===void 0&&(o=e.length);for(var f=(o-i)/2,x=0,I=f-1;xa!=j>a&&r<(R-D)*(a-P)/(j-P)+D;$&&(p=!p)}return p}});var Zxe=mu((O$i,Kxe)=>{"use strict";Kxe.exports=function(n,e,i,o){var r=n[0],a=n[1],p=!1;i===void 0&&(i=0),o===void 0&&(o=e.length);for(var f=o-i,x=0,I=f-1;xa!=j>a&&r<(R-D)*(a-P)/(j-P)+D;$&&(p=!p)}return p}});var Xxe=mu((P$i,MU)=>{"use strict";var Yxe=Wxe(),Qxe=Zxe();MU.exports=function(n,e,i,o){return e.length>0&&Array.isArray(e[0])?Qxe(n,e,i,o):Yxe(n,e,i,o)};MU.exports.nested=Qxe;MU.exports.flat=Yxe});var t1e=mu((FX,NX)=>{"use strict";(function(t,n){typeof FX=="object"&&typeof NX<"u"?NX.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self).RBush=n()})(FX,function(){"use strict";function t(W,Q,se,ge,Re){(function Se(fe,be,je,st,Fe){for(;st>je;){if(st-je>600){var ht=st-je+1,ue=be-je+1,Pt=Math.log(ht),ki=.5*Math.exp(2*Pt/3),zt=.5*Math.sqrt(Pt*ki*(ht-ki)/ht)*(ue-ht/2<0?-1:1),Bi=Math.max(je,Math.floor(be-ue*ki/ht+zt)),qt=Math.min(st,Math.floor(be+(ht-ue)*ki/ht+zt));Se(fe,be,Bi,qt,Fe)}var en=fe[be],_t=je,St=st;for(n(fe,je,be),Fe(fe[st],en)>0&&n(fe,je,st);_t0;)St--}Fe(fe[je],en)===0?n(fe,je,St):n(fe,++St,st),St<=be&&(je=St+1),be<=St&&(st=St-1)}})(W,Q,se||0,ge||W.length-1,Re||e)}function n(W,Q,se){var ge=W[Q];W[Q]=W[se],W[se]=ge}function e(W,Q){return WQ?1:0}var i=function(W){W===void 0&&(W=9),this._maxEntries=Math.max(4,W),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(W,Q,se){if(!se)return Q.indexOf(W);for(var ge=0;ge=W.minX&&Q.maxY>=W.minY}function j(W){return{children:W,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(W,Q,se,ge,Re){for(var Se=[Q,se];Se.length;)if(!((se=Se.pop())-(Q=Se.pop())<=ge)){var fe=Q+Math.ceil((se-Q)/ge/2)*ge;t(W,fe,Q,se,Re),Se.push(Q,fe,fe,se)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(W){var Q=this.data,se=[];if(!R(W,Q))return se;for(var ge=this.toBBox,Re=[];Q;){for(var Se=0;Se=0&&Re[Q].children.length>this._maxEntries;)this._split(Re,Q),Q--;this._adjustParentBBoxes(ge,Re,Q)},i.prototype._split=function(W,Q){var se=W[Q],ge=se.children.length,Re=this._minEntries;this._chooseSplitAxis(se,Re,ge);var Se=this._chooseSplitIndex(se,Re,ge),fe=j(se.children.splice(Se,se.children.length-Se));fe.height=se.height,fe.leaf=se.leaf,r(se,this.toBBox),r(fe,this.toBBox),Q?W[Q-1].children.push(fe):this._splitRoot(se,fe)},i.prototype._splitRoot=function(W,Q){this.data=j([W,Q]),this.data.height=W.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(W,Q,se){for(var ge,Re,Se,fe,be,je,st,Fe=1/0,ht=1/0,ue=Q;ue<=se-Q;ue++){var Pt=a(W,0,ue,this.toBBox),ki=a(W,ue,se,this.toBBox),zt=(Re=Pt,Se=ki,fe=void 0,be=void 0,je=void 0,st=void 0,fe=Math.max(Re.minX,Se.minX),be=Math.max(Re.minY,Se.minY),je=Math.min(Re.maxX,Se.maxX),st=Math.min(Re.maxY,Se.maxY),Math.max(0,je-fe)*Math.max(0,st-be)),Bi=I(Pt)+I(ki);zt=Q;Fe--){var ht=W.children[Fe];p(fe,W.leaf?Re(ht):ht),be+=D(fe)}return be},i.prototype._adjustParentBBoxes=function(W,Q,se){for(var ge=se;ge>=0;ge--)p(Q[ge],W)},i.prototype._condense=function(W){for(var Q=W.length-1,se=void 0;Q>=0;Q--)W[Q].children.length===0?Q>0?(se=W[Q-1].children).splice(se.indexOf(W[Q]),1):this.clear():r(W[Q],this.toBBox)},i})});var HX=mu(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.earthRadius=63710088e-1;rr.factors={centimeters:rr.earthRadius*100,centimetres:rr.earthRadius*100,degrees:rr.earthRadius/111325,feet:rr.earthRadius*3.28084,inches:rr.earthRadius*39.37,kilometers:rr.earthRadius/1e3,kilometres:rr.earthRadius/1e3,meters:rr.earthRadius,metres:rr.earthRadius,miles:rr.earthRadius/1609.344,millimeters:rr.earthRadius*1e3,millimetres:rr.earthRadius*1e3,nauticalmiles:rr.earthRadius/1852,radians:1,yards:rr.earthRadius*1.0936};rr.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/rr.earthRadius,yards:1.0936133};rr.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 Pb(t,n,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}rr.feature=Pb;function bct(t,n,e){switch(e===void 0&&(e={}),t){case"Point":return BX(n).geometry;case"LineString":return VX(n).geometry;case"Polygon":return zX(n).geometry;case"MultiPoint":return n1e(n).geometry;case"MultiLineString":return i1e(n).geometry;case"MultiPolygon":return o1e(n).geometry;default:throw new Error(t+" is invalid")}}rr.geometry=bct;function BX(t,n,e){if(e===void 0&&(e={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!OU(t[0])||!OU(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return Pb(i,n,e)}rr.point=BX;function xct(t,n,e){return e===void 0&&(e={}),PU(t.map(function(i){return BX(i,n)}),e)}rr.points=xct;function zX(t,n,e){e===void 0&&(e={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var e=Math.pow(10,n||0);return Math.round(t*e)/e}rr.round=Ict;function r1e(t,n){n===void 0&&(n="kilometers");var e=rr.factors[n];if(!e)throw new Error(n+" units is invalid");return t*e}rr.radiansToLength=r1e;function UX(t,n){n===void 0&&(n="kilometers");var e=rr.factors[n];if(!e)throw new Error(n+" units is invalid");return t/e}rr.lengthToRadians=UX;function Tct(t,n){return s1e(UX(t,n))}rr.lengthToDegrees=Tct;function Ect(t){var n=t%360;return n<0&&(n+=360),n}rr.bearingToAzimuth=Ect;function s1e(t){var n=t%(2*Math.PI);return n*180/Math.PI}rr.radiansToDegrees=s1e;function Act(t){var n=t%360;return n*Math.PI/180}rr.degreesToRadians=Act;function Dct(t,n,e){if(n===void 0&&(n="kilometers"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("length must be a positive number");return r1e(UX(t,n),e)}rr.convertLength=Dct;function kct(t,n,e){if(n===void 0&&(n="meters"),e===void 0&&(e="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=rr.areaFactors[n];if(!i)throw new Error("invalid original units");var o=rr.areaFactors[e];if(!o)throw new Error("invalid final units");return t/i*o}rr.convertArea=kct;function OU(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}rr.isNumber=OU;function Mct(t){return!!t&&t.constructor===Object}rr.isObject=Mct;function Rct(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(n){if(!OU(n))throw new Error("bbox must only contain numbers")})}rr.validateBBox=Rct;function Oct(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")}rr.validateId=Oct});var u1e=mu(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Jd=HX();function $P(t,n,e){if(t!==null)for(var i,o,r,a,p,f,x,I=0,D=0,P,R=t.type,j=R==="FeatureCollection",$=R==="Feature",W=j?t.features.length:1,Q=0;Qf||j>x||$>I){p=D,f=i,x=j,I=$,r=0;return}var W=Jd.lineString([p,D],e.properties);if(n(W,i,o,$,r)===!1)return!1;r++,p=D})===!1)return!1}}})}function Vct(t,n,e){var i=e,o=!1;return c1e(t,function(r,a,p,f,x){o===!1&&e===void 0?i=r:i=n(i,r,a,p,f,x),o=!0}),i}function d1e(t,n){if(!t)throw new Error("geojson is required");LU(t,function(e,i,o){if(e.geometry!==null){var r=e.geometry.type,a=e.geometry.coordinates;switch(r){case"LineString":if(n(e,i,o,0,0)===!1)return!1;break;case"Polygon":for(var p=0;p{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});var Cp=63710088e-1,$X={centimeters:Cp*100,centimetres:Cp*100,degrees:360/(2*Math.PI),feet:Cp*3.28084,inches:Cp*39.37,kilometers:Cp/1e3,kilometres:Cp/1e3,meters:Cp,metres:Cp,miles:Cp/1609.344,millimeters:Cp*1e3,millimetres:Cp*1e3,nauticalmiles:Cp/1852,radians:1,yards:Cp*1.0936},GX={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 Lb(t,n,e={}){let i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}function Gct(t,n,e={}){switch(t){case"Point":return qX(n).geometry;case"LineString":return KX(n).geometry;case"Polygon":return WX(n).geometry;case"MultiPoint":return h1e(n).geometry;case"MultiLineString":return p1e(n).geometry;case"MultiPolygon":return m1e(n).geometry;default:throw new Error(t+" is invalid")}}function qX(t,n,e={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!FU(t[0])||!FU(t[1]))throw new Error("coordinates must contain numbers");return Lb({type:"Point",coordinates:t},n,e)}function $ct(t,n,e={}){return NU(t.map(i=>qX(i,n)),e)}function WX(t,n,e={}){for(let o of t){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let r=0;rWX(i,n)),e)}function KX(t,n,e={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Lb({type:"LineString",coordinates:t},n,e)}function Wct(t,n,e={}){return NU(t.map(i=>KX(i,n)),e)}function NU(t,n={}){let e={type:"FeatureCollection"};return n.id&&(e.id=n.id),n.bbox&&(e.bbox=n.bbox),e.features=t,e}function p1e(t,n,e={}){return Lb({type:"MultiLineString",coordinates:t},n,e)}function h1e(t,n,e={}){return Lb({type:"MultiPoint",coordinates:t},n,e)}function m1e(t,n,e={}){return Lb({type:"MultiPolygon",coordinates:t},n,e)}function Kct(t,n,e={}){return Lb({type:"GeometryCollection",geometries:t},n,e)}function Zct(t,n=0){if(n&&!(n>=0))throw new Error("precision must be a positive number");let e=Math.pow(10,n||0);return Math.round(t*e)/e}function f1e(t,n="kilometers"){let e=$X[n];if(!e)throw new Error(n+" units is invalid");return t*e}function ZX(t,n="kilometers"){let e=$X[n];if(!e)throw new Error(n+" units is invalid");return t/e}function Yct(t,n){return g1e(ZX(t,n))}function Qct(t){let n=t%360;return n<0&&(n+=360),n}function Xct(t){return t=t%360,t>180?t-360:t<-180?t+360:t}function g1e(t){return t%(2*Math.PI)*180/Math.PI}function Jct(t){return t%360*Math.PI/180}function edt(t,n="kilometers",e="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return f1e(ZX(t,n),e)}function tdt(t,n="meters",e="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");let i=GX[n];if(!i)throw new Error("invalid original units");let o=GX[e];if(!o)throw new Error("invalid final units");return t/i*o}function FU(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function idt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function ndt(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(n=>{if(!FU(n))throw new Error("bbox must only contain numbers")})}function odt(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")}Ks.areaFactors=GX;Ks.azimuthToBearing=Xct;Ks.bearingToAzimuth=Qct;Ks.convertArea=tdt;Ks.convertLength=edt;Ks.degreesToRadians=Jct;Ks.earthRadius=Cp;Ks.factors=$X;Ks.feature=Lb;Ks.featureCollection=NU;Ks.geometry=Gct;Ks.geometryCollection=Kct;Ks.isNumber=FU;Ks.isObject=idt;Ks.lengthToDegrees=Yct;Ks.lengthToRadians=ZX;Ks.lineString=KX;Ks.lineStrings=Wct;Ks.multiLineString=p1e;Ks.multiPoint=h1e;Ks.multiPolygon=m1e;Ks.point=qX;Ks.points=$ct;Ks.polygon=WX;Ks.polygons=qct;Ks.radiansToDegrees=g1e;Ks.radiansToLength=f1e;Ks.round=Zct;Ks.validateBBox=ndt;Ks.validateId=odt});var C1e=mu(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var eu=_1e();function qP(t,n,e){if(t!==null)for(var i,o,r,a,p,f,x,I=0,D=0,P,R=t.type,j=R==="FeatureCollection",$=R==="Feature",W=j?t.features.length:1,Q=0;Qf||j>x||$>I){p=D,f=i,x=j,I=$,r=0;return}var W=eu.lineString.call(void 0,[p,D],e.properties);if(n(W,i,o,$,r)===!1)return!1;r++,p=D})===!1)return!1}}})}function udt(t,n,e){var i=e,o=!1;return b1e(t,function(r,a,p,f,x){o===!1&&e===void 0?i=r:i=n(i,r,a,p,f,x),o=!0}),i}function x1e(t,n){if(!t)throw new Error("geojson is required");BU(t,function(e,i,o){if(e.geometry!==null){var r=e.geometry.type,a=e.geometry.coordinates;switch(r){case"LineString":if(n(e,i,o,0,0)===!1)return!1;break;case"Polygon":for(var p=0;p{"use strict";Object.defineProperty(zU,"__esModule",{value:!0});var fdt=C1e();function w1e(t,n={}){if(t.bbox!=null&&n.recompute!==!0)return t.bbox;let e=[1/0,1/0,-1/0,-1/0];return fdt.coordEach.call(void 0,t,i=>{e[0]>i[0]&&(e[0]=i[0]),e[1]>i[1]&&(e[1]=i[1]),e[2]{"use strict";var i_=t1e(),T1e=HX(),E1e=u1e(),TA=S1e().default,_dt=E1e.featureEach,UKi=E1e.coordEach,HKi=T1e.polygon,I1e=T1e.featureCollection;function A1e(t){var n=new i_(t);return n.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:TA(e),i_.prototype.insert.call(this,e)},n.load=function(e){var i=[];return Array.isArray(e)?e.forEach(function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:TA(o),i.push(o)}):_dt(e,function(o){if(o.type!=="Feature")throw new Error("invalid features");o.bbox=o.bbox?o.bbox:TA(o),i.push(o)}),i_.prototype.load.call(this,i)},n.remove=function(e,i){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:TA(e),i_.prototype.remove.call(this,e,i)},n.clear=function(){return i_.prototype.clear.call(this)},n.search=function(e){var i=i_.prototype.search.call(this,this.toBBox(e));return I1e(i)},n.collides=function(e){return i_.prototype.collides.call(this,this.toBBox(e))},n.all=function(){var e=i_.prototype.all.call(this);return I1e(e)},n.toJSON=function(){return i_.prototype.toJSON.call(this)},n.fromJSON=function(e){return i_.prototype.fromJSON.call(this,e)},n.toBBox=function(e){var i;if(e.bbox)i=e.bbox;else if(Array.isArray(e)&&e.length===4)i=e;else if(Array.isArray(e)&&e.length===6)i=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")i=TA(e);else if(e.type==="FeatureCollection")i=TA(e);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},n}QX.exports=A1e;QX.exports.default=A1e});var l7;function fN(){return l7}function Bf(t){let n=l7;return l7=t,n}var bne=Symbol("NotFound");function MS(t){return t===bne||t?.name==="\u0275NotFound"}function bN(t,n){return Object.is(t,n)}var kd=null,gN=!1,c7=1,OTe=null,rc=Symbol("SIGNAL");function hr(t){let n=kd;return kd=t,n}function xN(){return kd}var Rx={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 jy(t){if(gN)throw new Error("");if(kd===null)return;kd.consumerOnSignalRead(t);let n=kd.producersTail;if(n!==void 0&&n.producer===t)return;let e,i=kd.recomputing;if(i&&(e=n!==void 0?n.nextProducer:kd.producers,e!==void 0&&e.producer===t)){kd.producersTail=e,e.lastReadVersion=t.version;return}let o=t.consumersTail;if(o!==void 0&&o.consumer===kd&&(!i||LTe(o,kd)))return;let r=RS(kd),a={producer:t,consumer:kd,nextProducer:e,prevConsumer:o,lastReadVersion:t.version,nextConsumer:void 0};kd.producersTail=a,n!==void 0?n.nextProducer=a:kd.producers=a,r&&Sne(t,a)}function xne(){c7++}function CN(t){if(!(RS(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===c7)){if(!t.producerMustRecompute(t)&&!Px(t)){vN(t);return}t.producerRecomputeValue(t),vN(t)}}function d7(t){if(t.consumers===void 0)return;let n=gN;gN=!0;try{for(let e=t.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||PTe(i)}}finally{gN=n}}function u7(){return kd?.consumerAllowSignalWrites!==!1}function PTe(t){t.dirty=!0,d7(t),t.consumerMarkedDirty?.(t)}function vN(t){t.dirty=!1,t.lastCleanEpoch=c7}function Gy(t){return t&&Cne(t),hr(t)}function Cne(t){t.producersTail=void 0,t.recomputing=!0}function Ox(t,n){hr(n),t&&wne(t)}function wne(t){t.recomputing=!1;let n=t.producersTail,e=n!==void 0?n.nextProducer:t.producers;if(e!==void 0){if(RS(t))do e=p7(e);while(e!==void 0);n!==void 0?n.nextProducer=void 0:t.producers=void 0}}function Px(t){for(let n=t.producers;n!==void 0;n=n.nextProducer){let e=n.producer,i=n.lastReadVersion;if(i!==e.version||(CN(e),i!==e.version))return!0}return!1}function $y(t){if(RS(t)){let n=t.producers;for(;n!==void 0;)n=p7(n)}t.producers=void 0,t.producersTail=void 0,t.consumers=void 0,t.consumersTail=void 0}function Sne(t,n){let e=t.consumersTail,i=RS(t);if(e!==void 0?(n.nextConsumer=e.nextConsumer,e.nextConsumer=n):(n.nextConsumer=void 0,t.consumers=n),n.prevConsumer=e,t.consumersTail=n,!i)for(let o=t.producers;o!==void 0;o=o.nextProducer)Sne(o.producer,o)}function p7(t){let n=t.producer,e=t.nextProducer,i=t.nextConsumer,o=t.prevConsumer;if(t.nextConsumer=void 0,t.prevConsumer=void 0,i!==void 0?i.prevConsumer=o:n.consumersTail=o,o!==void 0)o.nextConsumer=i;else if(n.consumers=i,!RS(n)){let r=n.producers;for(;r!==void 0;)r=p7(r)}return e}function RS(t){return t.consumerIsAlwaysLive||t.consumers!==void 0}function wN(t){OTe?.(t)}function LTe(t,n){let e=n.producersTail;if(e!==void 0){let i=n.producers;do{if(i===t)return!0;if(i===e)break;i=i.nextProducer}while(i!==void 0)}return!1}function O2(t,n){let e=Object.create(FTe);e.computation=t,n!==void 0&&(e.equal=n);let i=()=>{if(CN(e),jy(e),e.value===R2)throw e.error;return e.value};return i[rc]=e,wN(e),i}var _N=Symbol("UNSET"),yN=Symbol("COMPUTING"),R2=Symbol("ERRORED"),FTe=gt(ve({},Rx),{value:_N,dirty:!0,error:null,equal:bN,kind:"computed",producerMustRecompute(t){return t.value===_N||t.value===yN},producerRecomputeValue(t){if(t.value===yN)throw new Error("");let n=t.value;t.value=yN;let e=Gy(t),i,o=!1;try{i=t.computation(),hr(null),o=n!==_N&&n!==R2&&i!==R2&&t.equal(n,i)}catch(r){i=R2,t.error=r}finally{Ox(t,e)}if(o){t.value=n;return}t.value=i,t.version++}});function NTe(){throw new Error}var Ine=NTe;function Tne(t){Ine(t)}function h7(t){Ine=t}var BTe=null;function m7(t,n){let e=Object.create(P2);e.value=t,n!==void 0&&(e.equal=n);let i=()=>Ene(e);return i[rc]=e,wN(e),[i,a=>Lx(e,a),a=>f7(e,a)]}function Ene(t){return jy(t),t.value}function Lx(t,n){u7()||Tne(t),t.equal(t.value,n)||(t.value=n,zTe(t))}function f7(t,n){u7()||Tne(t),Lx(t,n(t.value))}var P2=gt(ve({},Rx),{equal:bN,value:void 0,kind:"signal"});function zTe(t){t.version++,xne(),d7(t),BTe?.(t)}function Wo(t){return typeof t=="function"}function OS(t){let e=t(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var SN=OS(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: ${e.map((i,o)=>`${o+1}) ${i.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function O_(t,n){if(t){let e=t.indexOf(n);0<=e&&t.splice(e,1)}}var Dr=class t{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let r of e)r.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(Wo(i))try{i()}catch(r){n=r instanceof SN?r.errors:[r]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let r of o)try{Ane(r)}catch(a){n=n??[],a instanceof SN?n=[...n,...a.errors]:n.push(a)}}if(n)throw new SN(n)}}add(n){var e;if(n&&n!==this)if(this.closed)Ane(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(n)}}_hasParent(n){let{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){let{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&O_(e,n)}remove(n){let{_finalizers:e}=this;e&&O_(e,n),n instanceof t&&n._removeParent(this)}};Dr.EMPTY=(()=>{let t=new Dr;return t.closed=!0,t})();var g7=Dr.EMPTY;function IN(t){return t instanceof Dr||t&&"closed"in t&&Wo(t.remove)&&Wo(t.add)&&Wo(t.unsubscribe)}function Ane(t){Wo(t)?t():t.unsubscribe()}var dm={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var PS={setTimeout(t,n,...e){let{delegate:i}=PS;return i?.setTimeout?i.setTimeout(t,n,...e):setTimeout(t,n,...e)},clearTimeout(t){let{delegate:n}=PS;return(n?.clearTimeout||clearTimeout)(t)},delegate:void 0};function TN(t){PS.setTimeout(()=>{let{onUnhandledError:n}=dm;if(n)n(t);else throw t})}function P_(){}var Dne=_7("C",void 0,void 0);function kne(t){return _7("E",void 0,t)}function Mne(t){return _7("N",t,void 0)}function _7(t,n,e){return{kind:t,value:n,error:e}}var Fx=null;function LS(t){if(dm.useDeprecatedSynchronousErrorHandling){let n=!Fx;if(n&&(Fx={errorThrown:!1,error:null}),t(),n){let{errorThrown:e,error:i}=Fx;if(Fx=null,e)throw i}}else t()}function Rne(t){dm.useDeprecatedSynchronousErrorHandling&&Fx&&(Fx.errorThrown=!0,Fx.error=t)}var Nx=class extends Dr{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,IN(n)&&n.add(this)):this.destination=HTe}static create(n,e,i){return new um(n,e,i)}next(n){this.isStopped?v7(Mne(n),this):this._next(n)}error(n){this.isStopped?v7(kne(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?v7(Dne,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},VTe=Function.prototype.bind;function y7(t,n){return VTe.call(t,n)}var b7=class{constructor(n){this.partialObserver=n}next(n){let{partialObserver:e}=this;if(e.next)try{e.next(n)}catch(i){EN(i)}}error(n){let{partialObserver:e}=this;if(e.error)try{e.error(n)}catch(i){EN(i)}else EN(n)}complete(){let{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(e){EN(e)}}},um=class extends Nx{constructor(n,e,i){super();let o;if(Wo(n)||!n)o={next:n??void 0,error:e??void 0,complete:i??void 0};else{let r;this&&dm.useDeprecatedNextContext?(r=Object.create(n),r.unsubscribe=()=>this.unsubscribe(),o={next:n.next&&y7(n.next,r),error:n.error&&y7(n.error,r),complete:n.complete&&y7(n.complete,r)}):o=n}this.destination=new b7(o)}};function EN(t){dm.useDeprecatedSynchronousErrorHandling?Rne(t):TN(t)}function UTe(t){throw t}function v7(t,n){let{onStoppedNotification:e}=dm;e&&PS.setTimeout(()=>e(t,n))}var HTe={closed:!0,next:P_,error:UTe,complete:P_};var FS=typeof Symbol=="function"&&Symbol.observable||"@@observable";function gu(t){return t}function x7(...t){return C7(t)}function C7(t){return t.length===0?gu:t.length===1?t[0]:function(e){return t.reduce((i,o)=>o(i),e)}}var Co=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,o){let r=GTe(e)?e:new um(e,i,o);return LS(()=>{let{operator:a,source:p}=this;r.add(a?a.call(r,p):p?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return i=One(i),new i((o,r)=>{let a=new um({next:p=>{try{e(p)}catch(f){r(f),a.unsubscribe()}},error:r,complete:o});this.subscribe(a)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[FS](){return this}pipe(...e){return C7(e)(this)}toPromise(e){return e=One(e),new e((i,o)=>{let r;this.subscribe(a=>r=a,a=>o(a),()=>i(r))})}}return t.create=n=>new t(n),t})();function One(t){var n;return(n=t??dm.Promise)!==null&&n!==void 0?n:Promise}function jTe(t){return t&&Wo(t.next)&&Wo(t.error)&&Wo(t.complete)}function GTe(t){return t&&t instanceof Nx||jTe(t)&&IN(t)}function w7(t){return Wo(t?.lift)}function lr(t){return n=>{if(w7(n))return n.lift(function(e){try{return t(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function or(t,n,e,i,o){return new S7(t,n,e,i,o)}var S7=class extends Nx{constructor(n,e,i,o,r,a){super(n),this.onFinalize=r,this.shouldUnsubscribe=a,this._next=e?function(p){try{e(p)}catch(f){n.error(f)}}:super._next,this._error=o?function(p){try{o(p)}catch(f){n.error(f)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(p){n.error(p)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((n=this.onFinalize)===null||n===void 0||n.call(this))}}};function NS(){return lr((t,n)=>{let e=null;t._refCount++;let i=or(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let o=t._connection,r=e;e=null,o&&(!r||o===r)&&o.unsubscribe(),n.unsubscribe()});t.subscribe(i),i.closed||(e=t.connect())})}var BS=class extends Co{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,w7(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){let n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new Dr;let e=this.getSubject();n.add(this.source.subscribe(or(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),n.closed&&(this._connection=null,n=Dr.EMPTY)}return n}refCount(){return NS()(this)}};var Pne=OS(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var xi=(()=>{class t extends Co{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new AN(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new Pne}next(e){LS(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){LS(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){LS(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:o,observers:r}=this;return i||o?g7:(this.currentObservers=null,r.push(e),new Dr(()=>{this.currentObservers=null,O_(r,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:o,isStopped:r}=this;i?e.error(o):r&&e.complete()}asObservable(){let e=new Co;return e.source=this,e}}return t.create=(n,e)=>new AN(n,e),t})(),AN=class extends xi{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,n)}error(n){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.call(e,n)}complete(){var n,e;(e=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||e===void 0||e.call(n)}_subscribe(n){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(n))!==null&&i!==void 0?i:g7}};var Ms=class extends xi{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){let{hasError:n,thrownError:e,_value:i}=this;if(n)throw e;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}};var L2={now(){return(L2.delegate||Date).now()},delegate:void 0};var mo=class extends xi{constructor(n=1/0,e=1/0,i=L2){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){let{isStopped:e,_buffer:i,_infiniteTimeWindow:o,_timestampProvider:r,_windowTime:a}=this;e||(i.push(n),!o&&i.push(r.now()+a)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:o}=this,r=o.slice();for(let a=0;at.complete());function VS(t){return t&&Wo(t.schedule)}function I7(t){return t[t.length-1]}function RN(t){return Wo(I7(t))?t.pop():void 0}function zf(t){return VS(I7(t))?t.pop():void 0}function Fne(t,n){return typeof I7(t)=="number"?t.pop():n}function Bne(t,n,e,i){function o(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function p(I){try{x(i.next(I))}catch(D){a(D)}}function f(I){try{x(i.throw(I))}catch(D){a(D)}}function x(I){I.done?r(I.value):o(I.value).then(p,f)}x((i=i.apply(t,n||[])).next())})}function Nne(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],i=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Bx(t){return this instanceof Bx?(this.v=t,this):new Bx(t)}function zne(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(t,n||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),p("next"),p("throw"),p("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(R){return function(j){return Promise.resolve(j).then(R,D)}}function p(R,j){i[R]&&(o[R]=function($){return new Promise(function(W,Q){r.push([R,$,W,Q])>1||f(R,$)})},j&&(o[R]=j(o[R])))}function f(R,j){try{x(i[R](j))}catch($){P(r[0][3],$)}}function x(R){R.value instanceof Bx?Promise.resolve(R.value.v).then(I,D):P(r[0][2],R)}function I(R){f("next",R)}function D(R){f("throw",R)}function P(R,j){R(j),r.shift(),r.length&&f(r[0][0],r[0][1])}}function Vne(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof Nne=="function"?Nne(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(r){e[r]=t[r]&&function(a){return new Promise(function(p,f){a=t[r](a),o(p,f,a.done,a.value)})}}function o(r,a,p,f){Promise.resolve(f).then(function(x){r({value:x,done:p})},a)}}var US=t=>t&&typeof t.length=="number"&&typeof t!="function";function ON(t){return Wo(t?.then)}function PN(t){return Wo(t[FS])}function LN(t){return Symbol.asyncIterator&&Wo(t?.[Symbol.asyncIterator])}function FN(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 $Te(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var NN=$Te();function BN(t){return Wo(t?.[NN])}function zN(t){return zne(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:i,done:o}=yield Bx(e.read());if(o)return yield Bx(void 0);yield yield Bx(i)}}finally{e.releaseLock()}})}function VN(t){return Wo(t?.getReader)}function Xs(t){if(t instanceof Co)return t;if(t!=null){if(PN(t))return qTe(t);if(US(t))return WTe(t);if(ON(t))return KTe(t);if(LN(t))return Une(t);if(BN(t))return ZTe(t);if(VN(t))return YTe(t)}throw FN(t)}function qTe(t){return new Co(n=>{let e=t[FS]();if(Wo(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function WTe(t){return new Co(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,TN)})}function ZTe(t){return new Co(n=>{for(let e of t)if(n.next(e),n.closed)return;n.complete()})}function Une(t){return new Co(n=>{QTe(t,n).catch(e=>n.error(e))})}function YTe(t){return Une(zN(t))}function QTe(t,n){var e,i,o,r;return Bne(this,void 0,void 0,function*(){try{for(e=Vne(t);i=yield e.next(),!i.done;){let a=i.value;if(n.next(a),n.closed)return}}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=e.return)&&(yield r.call(e))}finally{if(o)throw o.error}}n.complete()})}function Ku(t,n,e,i=0,o=!1){let r=n.schedule(function(){e(),o?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(r),!o)return r}function HS(t,n=0){return lr((e,i)=>{e.subscribe(or(i,o=>Ku(i,t,()=>i.next(o),n),()=>Ku(i,t,()=>i.complete(),n),o=>Ku(i,t,()=>i.error(o),n)))})}function jS(t,n=0){return lr((e,i)=>{i.add(t.schedule(()=>e.subscribe(i),n))})}function Hne(t,n){return Xs(t).pipe(jS(n),HS(n))}function jne(t,n){return Xs(t).pipe(jS(n),HS(n))}function Gne(t,n){return new Co(e=>{let i=0;return n.schedule(function(){i===t.length?e.complete():(e.next(t[i++]),e.closed||this.schedule())})})}function $ne(t,n){return new Co(e=>{let i;return Ku(e,n,()=>{i=t[NN](),Ku(e,n,()=>{let o,r;try{({value:o,done:r}=i.next())}catch(a){e.error(a);return}r?e.complete():e.next(o)},0,!0)}),()=>Wo(i?.return)&&i.return()})}function UN(t,n){if(!t)throw new Error("Iterable cannot be null");return new Co(e=>{Ku(e,n,()=>{let i=t[Symbol.asyncIterator]();Ku(e,n,()=>{i.next().then(o=>{o.done?e.complete():e.next(o.value)})},0,!0)})})}function qne(t,n){return UN(zN(t),n)}function Wne(t,n){if(t!=null){if(PN(t))return Hne(t,n);if(US(t))return Gne(t,n);if(ON(t))return jne(t,n);if(LN(t))return UN(t,n);if(BN(t))return $ne(t,n);if(VN(t))return qne(t,n)}throw FN(t)}function vr(t,n){return n?Wne(t,n):Xs(t)}function Ni(...t){let n=zf(t);return vr(t,n)}function qy(t,n){let e=Wo(t)?t:()=>t,i=o=>o.error(e());return new Co(n?o=>n.schedule(i,0,o):i)}function HN(t){return!!t&&(t instanceof Co||Wo(t.lift)&&Wo(t.subscribe))}var hm=OS(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function F_(t,n){let e=typeof n=="object";return new Promise((i,o)=>{let r=new um({next:a=>{i(a),r.unsubscribe()},error:o,complete:()=>{e?i(n.defaultValue):o(new hm)}});t.subscribe(r)})}function Kne(t){return t instanceof Date&&!isNaN(t)}function vi(t,n){return lr((e,i)=>{let o=0;e.subscribe(or(i,r=>{i.next(t.call(n,r,o++))}))})}var{isArray:XTe}=Array;function JTe(t,n){return XTe(n)?t(...n):t(n)}function Vf(t){return vi(n=>JTe(t,n))}function jN(t,n,e,i){if(e)if(VS(e))i=e;else return function(...o){return jN(t,n,i).apply(this,o).pipe(Vf(e))};return i?function(...o){return jN(t,n).apply(this,o).pipe(jS(i),HS(i))}:function(...o){let r=new pm,a=!0;return new Co(p=>{let f=r.subscribe(p);if(a){a=!1;let x=!1,I=!1;n.apply(this,[...o,(...D)=>{if(t){let P=D.shift();if(P!=null){r.error(P);return}}r.next(1n[i]),keys:e}}}return{args:t,keys:null}}function oEe(t){return t&&typeof t=="object"&&tEe(t)===iEe}function $N(t,n){return t.reduce((e,i,o)=>(e[i]=n[o],e),{})}function _u(...t){let n=zf(t),e=RN(t),{args:i,keys:o}=GN(t);if(i.length===0)return vr([],n);let r=new Co(rEe(i,n,o?a=>$N(o,a):gu));return e?r.pipe(Vf(e)):r}function rEe(t,n,e=gu){return i=>{Zne(n,()=>{let{length:o}=t,r=new Array(o),a=o,p=o;for(let f=0;f{let x=vr(t[f],n),I=!1;x.subscribe(or(i,D=>{r[f]=D,I||(I=!0,p--),p||i.next(e(r.slice()))},()=>{--a||i.complete()}))},i)},i)}}function Zne(t,n,e){t?Ku(e,t,n):n()}function Yne(t,n,e,i,o,r,a,p){let f=[],x=0,I=0,D=!1,P=()=>{D&&!f.length&&!x&&n.complete()},R=$=>x{r&&n.next($),x++;let W=!1;Xs(e($,I++)).subscribe(or(n,Q=>{o?.(Q),r?R(Q):n.next(Q)},()=>{W=!0},void 0,()=>{if(W)try{for(x--;f.length&&xj(Q)):j(Q)}P()}catch(Q){n.error(Q)}}))};return t.subscribe(or(n,R,()=>{D=!0,P()})),()=>{p?.()}}function Qa(t,n,e=1/0){return Wo(n)?Qa((i,o)=>vi((r,a)=>n(i,r,o,a))(Xs(t(i,o))),e):(typeof n=="number"&&(e=n),lr((i,o)=>Yne(i,o,t,e)))}function Uf(t=1/0){return Qa(gu,t)}function Qne(){return Uf(1)}function Hf(...t){return Qne()(vr(t,zf(t)))}function yu(t){return new Co(n=>{Xs(t()).subscribe(n)})}function Hl(...t){let n=RN(t),{args:e,keys:i}=GN(t),o=new Co(r=>{let{length:a}=e;if(!a){r.complete();return}let p=new Array(a),f=a,x=a;for(let I=0;I{D||(D=!0,x--),p[I]=P},()=>f--,void 0,()=>{(!f||!D)&&(x||r.next(i?$N(i,p):p),r.complete())}))}});return n?o.pipe(Vf(n)):o}var sEe=["addListener","removeListener"],aEe=["addEventListener","removeEventListener"],lEe=["on","off"];function jf(t,n,e,i){if(Wo(e)&&(i=e,e=void 0),i)return jf(t,n,e).pipe(Vf(i));let[o,r]=uEe(t)?aEe.map(a=>p=>t[a](n,p,e)):cEe(t)?sEe.map(Xne(t,n)):dEe(t)?lEe.map(Xne(t,n)):[];if(!o&&US(t))return Qa(a=>jf(a,n,e))(Xs(t));if(!o)throw new TypeError("Invalid event target");return new Co(a=>{let p=(...f)=>a.next(1r(p)})}function Xne(t,n){return e=>i=>t[e](n,i)}function cEe(t){return Wo(t.addListener)&&Wo(t.removeListener)}function dEe(t){return Wo(t.on)&&Wo(t.off)}function uEe(t){return Wo(t.addEventListener)&&Wo(t.removeEventListener)}function qN(t,n,e){return e?qN(t,n).pipe(Vf(e)):new Co(i=>{let o=(...a)=>i.next(a.length===1?a[0]:a),r=t(o);return Wo(n)?()=>n(o,r):void 0})}function E7(t,n,e){return yu(()=>t()?n:e)}function N_(t=0,n,e=Lne){let i=-1;return n!=null&&(VS(n)?e=n:i=n),new Co(o=>{let r=Kne(t)?+t-e.now():t;r<0&&(r=0);let a=0;return e.schedule(function(){o.closed||(o.next(a++),0<=i?this.schedule(void 0,i):o.complete())},r)})}function GS(t=0,n=L_){return t<0&&(t=0),N_(t,t,n)}function xc(...t){let n=zf(t),e=Fne(t,1/0),i=t;return i.length?i.length===1?Xs(i[0]):Uf(e)(vr(i,n)):kl}var zx=new Co(P_);function ro(t,n){return lr((e,i)=>{let o=0;e.subscribe(or(i,r=>t.call(n,r,o++)&&i.next(r)))})}function Jne(t){return lr((n,e)=>{let i=!1,o=null,r=null,a=!1,p=()=>{if(r?.unsubscribe(),r=null,i){i=!1;let x=o;o=null,e.next(x)}a&&e.complete()},f=()=>{r=null,a&&e.complete()};n.subscribe(or(e,x=>{i=!0,o=x,r||Xs(t(x)).subscribe(r=or(e,p,f))},()=>{a=!0,(!i||!r||r.closed)&&e.complete()}))})}function WN(t,n=L_){return Jne(()=>N_(t,n))}function A7(t,n=null){return n=n??t,lr((e,i)=>{let o=[],r=0;e.subscribe(or(i,a=>{let p=null;r++%n===0&&o.push([]);for(let f of o)f.push(a),t<=f.length&&(p=p??[],p.push(f));if(p)for(let f of p)O_(o,f),i.next(f)},()=>{for(let a of o)i.next(a);i.complete()},void 0,()=>{o=null}))})}function Xa(t){return lr((n,e)=>{let i=null,o=!1,r;i=n.subscribe(or(e,void 0,void 0,a=>{r=Xs(t(a,Xa(t)(n))),i?(i.unsubscribe(),i=null,r.subscribe(e)):o=!0})),o&&(i.unsubscribe(),i=null,r.subscribe(e))})}function eoe(t,n,e,i,o){return(r,a)=>{let p=e,f=n,x=0;r.subscribe(or(a,I=>{let D=x++;f=p?t(f,I,D):(p=!0,I),i&&a.next(f)},o&&(()=>{p&&a.next(f),a.complete()})))}}function Md(t,n){return Wo(n)?Qa(t,n,1):Qa(t,1)}function Zu(t,n=L_){return lr((e,i)=>{let o=null,r=null,a=null,p=()=>{if(o){o.unsubscribe(),o=null;let x=r;r=null,i.next(x)}};function f(){let x=a+t,I=n.now();if(I{r=x,a=n.now(),o||(o=n.schedule(f,t),i.add(o))},()=>{p(),i.complete()},void 0,()=>{r=o=null}))})}function Wy(t){return lr((n,e)=>{let i=!1;n.subscribe(or(e,o=>{i=!0,e.next(o)},()=>{i||e.next(t),e.complete()}))})}function Ko(t){return t<=0?()=>kl:lr((n,e)=>{let i=0;n.subscribe(or(e,o=>{++i<=t&&(e.next(o),t<=i&&e.complete())}))})}function toe(){return lr((t,n)=>{t.subscribe(or(n,P_))})}function ioe(t){return vi(()=>t)}function D7(t,n){return n?e=>Hf(n.pipe(Ko(1),toe()),e.pipe(D7(t))):Qa((e,i)=>Xs(t(e,i)).pipe(Ko(1),ioe(e)))}function k7(t,n=L_){let e=N_(t,n);return D7(()=>e)}function Fp(t,n=gu){return t=t??pEe,lr((e,i)=>{let o,r=!0;e.subscribe(or(i,a=>{let p=n(a);(r||!t(o,p))&&(r=!1,o=p,i.next(a))}))})}function pEe(t,n){return t===n}function KN(t=hEe){return lr((n,e)=>{let i=!1;n.subscribe(or(e,o=>{i=!0,e.next(o)},()=>i?e.complete():e.error(t())))})}function hEe(){return new hm}function Gf(t){return lr((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}function Yu(t,n){let e=arguments.length>=2;return i=>i.pipe(t?ro((o,r)=>t(o,r,i)):gu,Ko(1),e?Wy(n):KN(()=>new hm))}function $S(t){return t<=0?()=>kl:lr((n,e)=>{let i=[];n.subscribe(or(e,o=>{i.push(o),t{for(let o of i)e.next(o);e.complete()},void 0,()=>{i=null}))})}function M7(t,n){let e=arguments.length>=2;return i=>i.pipe(t?ro((o,r)=>t(o,r,i)):gu,$S(1),e?Wy(n):KN(()=>new hm))}function ZN(){return lr((t,n)=>{let e,i=!1;t.subscribe(or(n,o=>{let r=e;e=o,i&&n.next([r,o]),i=!0}))})}function R7(t,n){return lr(eoe(t,n,arguments.length>=2,!0))}function N2(t={}){let{connector:n=()=>new xi,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:o=!0}=t;return r=>{let a,p,f,x=0,I=!1,D=!1,P=()=>{p?.unsubscribe(),p=void 0},R=()=>{P(),a=f=void 0,I=D=!1},j=()=>{let $=a;R(),$?.unsubscribe()};return lr(($,W)=>{x++,!D&&!I&&P();let Q=f=f??n();W.add(()=>{x--,x===0&&!D&&!I&&(p=O7(j,o))}),Q.subscribe(W),!a&&x>0&&(a=new um({next:se=>Q.next(se),error:se=>{D=!0,P(),p=O7(R,e,se),Q.error(se)},complete:()=>{I=!0,P(),p=O7(R,i),Q.complete()}}),Xs($).subscribe(a))})(r)}}function O7(t,n,...e){if(n===!0){t();return}if(n===!1)return;let i=new um({next:()=>{i.unsubscribe(),t()}});return Xs(n(...e)).subscribe(i)}function B_(t,n,e){let i,o=!1;return t&&typeof t=="object"?{bufferSize:i=1/0,windowTime:n=1/0,refCount:o=!1,scheduler:e}=t:i=t??1/0,N2({connector:()=>new mo(i,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function B2(t){return ro((n,e)=>t<=e)}function Ja(...t){let n=zf(t);return lr((e,i)=>{(n?Hf(t,e,n):Hf(t,e)).subscribe(i)})}function wo(t,n){return lr((e,i)=>{let o=null,r=0,a=!1,p=()=>a&&!o&&i.complete();e.subscribe(or(i,f=>{o?.unsubscribe();let x=0,I=r++;Xs(t(f,I)).subscribe(o=or(i,D=>i.next(n?n(f,D,I,x++):D),()=>{o=null,p()}))},()=>{a=!0,p()}))})}function Wr(t){return lr((n,e)=>{Xs(t).subscribe(or(e,()=>e.complete(),P_)),!e.closed&&n.subscribe(e)})}function z2(t,n=!1){return lr((e,i)=>{let o=0;e.subscribe(or(i,r=>{let a=t(r,o++);(a||n)&&i.next(r),!a&&i.complete()}))})}function Er(t,n,e){let i=Wo(t)||n||e?{next:t,error:n,complete:e}:t;return i?lr((o,r)=>{var a;(a=i.subscribe)===null||a===void 0||a.call(i);let p=!0;o.subscribe(or(r,f=>{var x;(x=i.next)===null||x===void 0||x.call(i,f),r.next(f)},()=>{var f;p=!1,(f=i.complete)===null||f===void 0||f.call(i),r.complete()},f=>{var x;p=!1,(x=i.error)===null||x===void 0||x.call(i,f),r.error(f)},()=>{var f,x;p&&((f=i.unsubscribe)===null||f===void 0||f.call(i)),(x=i.finalize)===null||x===void 0||x.call(i)}))}):gu}function noe(t){let n=hr(null);try{return t()}finally{hr(n)}}var ooe=gt(ve({},Rx),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,kind:"effect"});function roe(t){if(t.dirty=!1,t.hasRun&&!Px(t))return;t.hasRun=!0;let n=Gy(t);try{t.cleanup(),t.fn()}finally{Ox(t,n)}}var JN="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",fn=class extends Error{code;constructor(n,e){super($f(n,e)),this.code=n}};function mEe(t){return`NG0${Math.abs(t)}`}function $f(t,n){return`${mEe(t)}${n?": "+n:""}`}var sc=globalThis;function ra(t){for(let n in t)if(t[n]===ra)return n;throw Error("")}function loe(t,n){for(let e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function V_(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(V_).join(", ")}]`;if(t==null)return""+t;let n=t.overriddenName||t.name;if(n)return`${n}`;let e=t.toString();if(e==null)return""+e;let i=e.indexOf(` `);return i>=0?e.slice(0,i):e}function e3(t,n){return t?n?`${t} ${n}`:t:n||""}var fEe=ra({__forward_ref__:ra});function Br(t){return t.__forward_ref__=Br,t.toString=function(){return V_(this())},t}function Cc(t){return $7(t)?t():t}function $7(t){return typeof t=="function"&&t.hasOwnProperty(fEe)&&t.__forward_ref__===Br}function coe(t,n,e){t!=n&&doe(e,t,n,"==")}function doe(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(i==null?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function ct(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function gi(t){return{providers:t.providers||[],imports:t.imports||[]}}function G2(t){return gEe(t,t3)}function q7(t){return G2(t)!==null}function gEe(t,n){return t.hasOwnProperty(n)&&t[n]||null}function _Ee(t){let n=t?.[t3]??null;return n||null}function L7(t){return t&&t.hasOwnProperty(QN)?t[QN]:null}var t3=ra({\u0275prov:ra}),QN=ra({\u0275inj:ra}),ii=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,e){this._desc=n,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=ct({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function W7(t){return t&&!!t.\u0275providers}var K7=ra({\u0275cmp:ra}),Z7=ra({\u0275dir:ra}),Y7=ra({\u0275pipe:ra}),Q7=ra({\u0275mod:ra}),U2=ra({\u0275fac:ra}),Gx=ra({__NG_ELEMENT_ID__:ra}),soe=ra({__NG_ENV_ID__:ra});function Yy(t){return typeof t=="string"?t:t==null?"":String(t)}function uoe(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Yy(t)}var poe=ra({ngErrorCode:ra}),yEe=ra({ngErrorMessage:ra}),vEe=ra({ngTokenPath:ra});function X7(t,n){return hoe("",-200,n)}function i3(t,n){throw new fn(-201,!1)}function hoe(t,n,e){let i=new fn(n,t);return i[poe]=n,i[yEe]=t,e&&(i[vEe]=e),i}function bEe(t){return t[poe]}var F7;function moe(){return F7}function vu(t){let n=F7;return F7=t,n}function J7(t,n,e){let i=G2(t);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&8)return null;if(n!==void 0)return n;i3(t,"Injector")}var xEe={},Vx=xEe,N7="__NG_DI_FLAG__",B7=class{injector;constructor(n){this.injector=n}retrieve(n,e){let i=Ux(e)||0;try{return this.injector.get(n,i&8?null:Vx,i)}catch(o){if(MS(o))return o;throw o}}};function CEe(t,n=0){let e=fN();if(e===void 0)throw new fn(-203,!1);if(e===null)return J7(t,void 0,n);{let i=wEe(n),o=e.retrieve(t,i);if(MS(o)){if(i.optional)return null;throw o}return o}}function ui(t,n=0){return(moe()||CEe)(Cc(t),n)}function re(t,n){return ui(t,Ux(n))}function Ux(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function wEe(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function z7(t){let n=[];for(let e=0;eArray.isArray(e)?n3(e,n):n(e))}function tj(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function $2(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function _oe(t,n){let e=[];for(let i=0;in;){let r=o-2;t[o]=t[r],o--}t[n]=e,t[n+1]=i}}function q2(t,n,e){let i=WS(t,n);return i>=0?t[i|1]=e:(i=~i,yoe(t,i,n,e)),i}function o3(t,n){let e=WS(t,n);if(e>=0)return t[e|1]}function WS(t,n){return IEe(t,n,1)}function IEe(t,n,e){let i=0,o=t.length>>e;for(;o!==i;){let r=i+(o-i>>1),a=t[r<n?o=r:i=r+1}return~(o<{e.push(a)};return n3(n,a=>{let p=a;XN(p,r,[],i)&&(o||=[],o.push(p))}),o!==void 0&&xoe(o,r),e}function xoe(t,n){for(let e=0;e{n(r,i)})}}function XN(t,n,e,i){if(t=Cc(t),!t)return!1;let o=null,r=L7(t),a=!r&&qf(t);if(!r&&!a){let f=t.ngModule;if(r=L7(f),r)o=f;else return!1}else{if(a&&!a.standalone)return!1;o=t}let p=i.has(o);if(a){if(p)return!1;if(i.add(o),a.dependencies){let f=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let x of f)XN(x,n,e,i)}}else if(r){if(r.imports!=null&&!p){i.add(o);let x;try{n3(r.imports,I=>{XN(I,n,e,i)&&(x||=[],x.push(I))})}finally{}x!==void 0&&xoe(x,n)}if(!p){let x=Ky(o)||(()=>new o);n({provide:o,useFactory:x,deps:hd},o),n({provide:nj,useValue:o,multi:!0},o),n({provide:U_,useValue:()=>ui(o),multi:!0},o)}let f=r.providers;if(f!=null&&!p){let x=t;sj(f,I=>{n(I,x)})}}else return!1;return o!==t&&t.providers!==void 0}function sj(t,n){for(let e of t)W7(e)&&(e=e.\u0275providers),Array.isArray(e)?sj(e,n):n(e)}var TEe=ra({provide:String,useValue:ra});function Coe(t){return t!==null&&typeof t=="object"&&TEe in t}function EEe(t){return!!(t&&t.useExisting)}function AEe(t){return!!(t&&t.useFactory)}function Hx(t){return typeof t=="function"}function woe(t){return!!t.useClass}var W2=new ii(""),YN={},aoe={},P7;function KS(){return P7===void 0&&(P7=new H2),P7}var ua=class{},jx=class extends ua{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,e,i,o){super(),this.parent=e,this.source=i,this.scopes=o,U7(n,a=>this.processProvider(a)),this.records.set(ij,qS(void 0,this)),o.has("environment")&&this.records.set(ua,qS(void 0,this));let r=this.records.get(W2);r!=null&&typeof r.value=="string"&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(nj,hd,{self:!0}))}retrieve(n,e){let i=Ux(e)||0;try{return this.get(n,Vx,i)}catch(o){if(MS(o))return o;throw o}}destroy(){V2(this),this._destroyed=!0;let n=hr(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),hr(n)}}onDestroy(n){return V2(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){V2(this);let e=Bf(this),i=vu(void 0),o;try{return n()}finally{Bf(e),vu(i)}}get(n,e=Vx,i){if(V2(this),n.hasOwnProperty(soe))return n[soe](this);let o=Ux(i),r,a=Bf(this),p=vu(void 0);try{if(!(o&4)){let x=this.records.get(n);if(x===void 0){let I=OEe(n)&&G2(n);I&&this.injectableDefInScope(I)?x=qS(V7(n),YN):x=null,this.records.set(n,x)}if(x!=null)return this.hydrate(n,x,o)}let f=o&2?KS():this.parent;return e=o&8&&e===Vx?null:e,f.get(n,e)}catch(f){let x=bEe(f);throw x===-200||x===-201?new fn(x,null):f}finally{vu(p),Bf(a)}}resolveInjectorInitializers(){let n=hr(null),e=Bf(this),i=vu(void 0),o;try{let r=this.get(U_,hd,{self:!0});for(let a of r)a()}finally{Bf(e),vu(i),hr(n)}}toString(){let n=[],e=this.records;for(let i of e.keys())n.push(V_(i));return`R3Injector[${n.join(", ")}]`}processProvider(n){n=Cc(n);let e=Hx(n)?n:Cc(n&&n.provide),i=kEe(n);if(!Hx(n)&&n.multi===!0){let o=this.records.get(e);o||(o=qS(void 0,YN,!0),o.factory=()=>z7(o.multi),this.records.set(e,o)),e=n,o.multi.push(n)}this.records.set(e,i)}hydrate(n,e,i){let o=hr(null);try{if(e.value===aoe)throw X7(V_(n));return e.value===YN&&(e.value=aoe,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&REe(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{hr(o)}}injectableDefInScope(n){if(!n.providedIn)return!1;let e=Cc(n.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(n){let e=this._onDestroyHooks.indexOf(n);e!==-1&&this._onDestroyHooks.splice(e,1)}};function V7(t){let n=G2(t),e=n!==null?n.factory:Ky(t);if(e!==null)return e;if(t instanceof ii)throw new fn(204,!1);if(t instanceof Function)return DEe(t);throw new fn(204,!1)}function DEe(t){if(t.length>0)throw new fn(204,!1);let e=_Ee(t);return e!==null?()=>e.factory(t):()=>new t}function kEe(t){if(Coe(t))return qS(void 0,t.useValue);{let n=aj(t);return qS(n,YN)}}function aj(t,n,e){let i;if(Hx(t)){let o=Cc(t);return Ky(o)||V7(o)}else if(Coe(t))i=()=>Cc(t.useValue);else if(AEe(t))i=()=>t.useFactory(...z7(t.deps||[]));else if(EEe(t))i=(o,r)=>ui(Cc(t.useExisting),r!==void 0&&r&8?8:void 0);else{let o=Cc(t&&(t.useClass||t.provide));if(MEe(t))i=()=>new o(...z7(t.deps));else return Ky(o)||V7(o)}return i}function V2(t){if(t.destroyed)throw new fn(205,!1)}function qS(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function MEe(t){return!!t.deps}function REe(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function OEe(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function U7(t,n){for(let e of t)Array.isArray(e)?U7(e,n):e&&W7(e)?U7(e.\u0275providers,n):n(e)}function Qc(t,n){let e;t instanceof jx?(V2(t),e=t):e=new B7(t);let i,o=Bf(e),r=vu(void 0);try{return n()}finally{Bf(o),vu(r)}}function lj(){return moe()!==void 0||fN()!=null}var fm=0,qo=1,cr=2,wc=3,wh=4,Rd=5,$x=6,ZS=7,jl=8,YS=9,Wf=10,Js=11,QS=12,cj=13,qx=14,Od=15,Qy=16,Wx=17,Kf=18,K2=19,dj=20,z_=21,s3=22,j_=23,Np=24,Kx=25,md=26,ga=27,Soe=1,uj=6,Xy=7,Z2=8,Zx=9,ac=10;function Zf(t){return Array.isArray(t)&&typeof t[Soe]=="object"}function gm(t){return Array.isArray(t)&&t[Soe]===!0}function pj(t){return(t.flags&4)!==0}function G_(t){return t.componentOffset>-1}function XS(t){return(t.flags&1)===1}function _m(t){return!!t.template}function JS(t){return(t[cr]&512)!==0}function Yx(t){return(t[cr]&256)===256}var hj="svg",Ioe="math";function Bp(t){for(;Array.isArray(t);)t=t[fm];return t}function mj(t,n){return Bp(n[t])}function Sh(t,n){return Bp(n[t.index])}function Y2(t,n){return t.data[n]}function Q2(t,n){return t[n]}function fj(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}function Ih(t,n){let e=n[t];return Zf(e)?e:e[fm]}function Toe(t){return(t[cr]&4)===4}function a3(t){return(t[cr]&128)===128}function Eoe(t){return gm(t[wc])}function Qu(t,n){return n==null?null:t[n]}function gj(t){t[Wx]=0}function _j(t){t[cr]&1024||(t[cr]|=1024,a3(t)&&Jy(t))}function Aoe(t,n){for(;t>0;)n=n[qx],t--;return n}function X2(t){return!!(t[cr]&9216||t[Np]?.dirty)}function l3(t){t[Wf].changeDetectionScheduler?.notify(8),t[cr]&64&&(t[cr]|=1024),X2(t)&&Jy(t)}function Jy(t){t[Wf].changeDetectionScheduler?.notify(0);let n=Zy(t);for(;n!==null&&!(n[cr]&8192||(n[cr]|=8192,!a3(n)));)n=Zy(n)}function yj(t,n){if(Yx(t))throw new fn(911,!1);t[z_]===null&&(t[z_]=[]),t[z_].push(n)}function Doe(t,n){if(t[z_]===null)return;let e=t[z_].indexOf(n);e!==-1&&t[z_].splice(e,1)}function Zy(t){let n=t[wc];return gm(n)?n[wc]:n}function vj(t){return t[ZS]??=[]}function bj(t){return t.cleanup??=[]}function koe(t,n,e,i){let o=vj(n);o.push(e),t.firstCreatePass&&bj(t).push(i,o.length-1)}var jr={lFrame:Uoe(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var H7=!1;function Moe(){return jr.lFrame.elementDepthCount}function Roe(){jr.lFrame.elementDepthCount++}function xj(){jr.lFrame.elementDepthCount--}function c3(){return jr.bindingsEnabled}function Cj(){return jr.skipHydrationRootTNode!==null}function wj(t){return jr.skipHydrationRootTNode===t}function Sj(){jr.skipHydrationRootTNode=null}function So(){return jr.lFrame.lView}function _a(){return jr.lFrame.tView}function Ee(t){return jr.lFrame.contextLView=t,t[jl]}function Ae(t){return jr.lFrame.contextLView=null,t}function lc(){let t=Ij();for(;t!==null&&t.type===64;)t=t.parent;return t}function Ij(){return jr.lFrame.currentTNode}function eI(){let t=jr.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function $_(t,n){let e=jr.lFrame;e.currentTNode=t,e.isParent=n}function Tj(){return jr.lFrame.isParent}function Ej(){jr.lFrame.isParent=!1}function Ooe(){return jr.lFrame.contextLView}function Aj(){return H7}function tI(t){let n=H7;return H7=t,n}function Xu(){let t=jr.lFrame,n=t.bindingRootIndex;return n===-1&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Poe(){return jr.lFrame.bindingIndex}function Loe(t){return jr.lFrame.bindingIndex=t}function q_(){return jr.lFrame.bindingIndex++}function d3(t){let n=jr.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function Foe(){return jr.lFrame.inI18n}function Dj(t){jr.lFrame.inI18n=t}function Noe(t,n){let e=jr.lFrame;e.bindingIndex=e.bindingRootIndex=t,u3(n)}function Boe(){return jr.lFrame.currentDirectiveIndex}function u3(t){jr.lFrame.currentDirectiveIndex=t}function zoe(t){let n=jr.lFrame.currentDirectiveIndex;return n===-1?null:t[n]}function p3(){return jr.lFrame.currentQueryIndex}function J2(t){jr.lFrame.currentQueryIndex=t}function PEe(t){let n=t[qo];return n.type===2?n.declTNode:n.type===1?t[Rd]:null}function kj(t,n,e){if(e&4){let o=n,r=t;for(;o=o.parent,o===null&&!(e&1);)if(o=PEe(r),o===null||(r=r[qx],o.type&10))break;if(o===null)return!1;n=o,t=r}let i=jr.lFrame=Voe();return i.currentTNode=n,i.lView=t,!0}function h3(t){let n=Voe(),e=t[qo];jr.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function Voe(){let t=jr.lFrame,n=t===null?null:t.child;return n===null?Uoe(t):n}function Uoe(t){let n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=n),n}function Hoe(){let t=jr.lFrame;return jr.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Mj=Hoe;function m3(){let t=Hoe();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 joe(t){return(jr.lFrame.contextLView=Aoe(t,jr.lFrame.contextLView))[jl]}function Yf(){return jr.lFrame.selectedIndex}function ev(t){jr.lFrame.selectedIndex=t}function iI(){let t=jr.lFrame;return Y2(t.tView,t.selectedIndex)}function oi(){jr.lFrame.currentNamespace=hj}function W_(){LEe()}function LEe(){jr.lFrame.currentNamespace=null}function Goe(){return jr.lFrame.currentNamespace}var $oe=!0;function ek(){return $oe}function nI(t){$oe=t}function j7(t,n=null,e=null,i){let o=Rj(t,n,e,i);return o.resolveInjectorInitializers(),o}function Rj(t,n=null,e=null,i,o=new Set){let r=[e||hd,boe(t)];return i=i||(typeof t=="object"?void 0:V_(t)),new jx(r,n||KS(),i||null,o)}var Zn=class t{static THROW_IF_NOT_FOUND=Vx;static NULL=new H2;static create(n,e){if(Array.isArray(n))return j7({name:""},e,n,"");{let i=n.name??"";return j7({name:i},n.parent,n.providers,i)}}static \u0275prov=ct({token:t,providedIn:"any",factory:()=>ui(ij)});static __NG_ELEMENT_ID__=-1},zn=new ii(""),bu=(()=>{class t{static __NG_ELEMENT_ID__=FEe;static __NG_ENV_ID__=e=>e}return t})(),j2=class extends bu{_lView;constructor(n){super(),this._lView=n}get destroyed(){return Yx(this._lView)}onDestroy(n){let e=this._lView;return yj(e,n),()=>Doe(e,n)}};function FEe(){return new j2(So())}var Yc=class{_console=console;handleError(n){this._console.error("ERROR",n)}},xu=new ii("",{providedIn:"root",factory:()=>{let t=re(ua),n;return e=>{t.destroyed&&!n?setTimeout(()=>{throw e}):(n??=t.get(Yc),n.handleError(e))}}}),qoe={provide:U_,useValue:()=>void re(Yc),multi:!0};function Qf(t){return typeof t=="function"&&t[rc]!==void 0}function Jn(t,n){let[e,i,o]=m7(t,n?.equal),r=e,a=r[rc];return r.set=i,r.update=o,r.asReadonly=f3.bind(r),r}function f3(){let t=this[rc];if(t.readonlyFn===void 0){let n=()=>this();n[rc]=t,t.readonlyFn=n}return t.readonlyFn}function Oj(t){return Qf(t)&&typeof t.set=="function"}var Ch=class{},tk=new ii("",{providedIn:"root",factory:()=>!1});var Pj=new ii(""),Lj=new ii("");var Qx=(()=>{class t{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=NEe}return t})();function NEe(){return new Qx(So(),lc())}var Xf=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Ms(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Co(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})(),oI=(()=>{class t{internalPendingTasks=re(Xf);scheduler=re(Ch);errorHandler=re(xu);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let i=this.add();e().catch(this.errorHandler).finally(i)}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})();function Xx(...t){}var ik=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new G7})}return t})(),G7=class{dirtyEffectCount=0;queues=new Map;add(n){this.enqueue(n),this.schedule(n)}schedule(n){n.dirty&&this.dirtyEffectCount++}remove(n){let e=n.zone,i=this.queues.get(e);i.has(n)&&(i.delete(n),n.dirty&&this.dirtyEffectCount--)}enqueue(n){let e=n.zone;this.queues.has(e)||this.queues.set(e,new Set);let i=this.queues.get(e);i.has(n)||i.add(n)}flush(){for(;this.dirtyEffectCount>0;){let n=!1;for(let[e,i]of this.queues)e===null?n||=this.flushQueue(i):n||=e.run(()=>this.flushQueue(i));n||(this.dirtyEffectCount=0)}}flushQueue(n){let e=!1;for(let i of n)i.dirty&&(this.dirtyEffectCount--,e=!0,i.run());return e}};function _I(t){return{toString:t}.toString()}var g3="__parameters__";function jEe(t){return function(...e){if(t){let i=t(...e);for(let o in i)this[o]=i[o]}}}function kre(t,n,e){return _I(()=>{let i=jEe(n);function o(...r){if(this instanceof o)return i.apply(this,r),this;let a=new o(...r);return p.annotation=a,p;function p(f,x,I){let D=f.hasOwnProperty(g3)?f[g3]:Object.defineProperty(f,g3,{value:[]})[g3];for(;D.length<=I;)D.push(null);return(D[I]=D[I]||[]).push(a),f}}return o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var yI=ej(kre("Optional"),8);var W3=ej(kre("SkipSelf"),4);function Mre(t){let n=sc.ng;if(n&&n.\u0275compilerFacade)return n.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function GEe(t){return typeof t=="function"}var D3=class{previousValue;currentValue;firstChange;constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function Rre(t,n,e,i){n!==null?n.applyValueToInputSignal(n,i):t[e]=i}var In=(()=>{let t=()=>Ore;return t.ngInherit=!0,t})();function Ore(t){return t.type.prototype.ngOnChanges&&(t.setInput=qEe),$Ee}function $Ee(){let t=Lre(this),n=t?.current;if(n){let e=t.previous;if(e===mm)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function qEe(t,n,e,i,o){let r=this.declaredInputs[i],a=Lre(t)||WEe(t,{previous:mm,current:null}),p=a.current||(a.current={}),f=a.previous,x=f[r];p[r]=new D3(x&&x.currentValue,e,f===mm),Rre(t,n,o,e)}var Pre="__ngSimpleChanges__";function Lre(t){return t[Pre]||null}function WEe(t,n){return t[Pre]=n}var Woe=[];var Aa=function(t,n=null,e){for(let i=0;i=i)break}else n[f]<0&&(t[Wx]+=65536),(p>14>16&&(t[cr]&3)===n&&(t[cr]+=16384,Koe(p,r)):Koe(p,r)}var sI=-1,e1=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(n,e,i,o){this.factory=n,this.name=o,this.canSeeViewProviders=e,this.injectImpl=i}};function YEe(t){return(t.flags&8)!==0}function QEe(t){return(t.flags&16)!==0}function XEe(t,n,e){let i=0;for(;in){a=r-1;break}}}for(;r>16}function M3(t,n){let e=eAe(t),i=n;for(;e>0;)i=i[qx],e--;return i}var Kj=!0;function R3(t){let n=Kj;return Kj=t,n}var tAe=256,Vre=tAe-1,Ure=5,iAe=0,Jf={};function nAe(t,n,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(Gx)&&(i=e[Gx]),i==null&&(i=e[Gx]=iAe++);let o=i&Vre,r=1<>Ure)]|=r}function O3(t,n){let e=Hre(t,n);if(e!==-1)return e;let i=n[qo];i.firstCreatePass&&(t.injectorIndex=n.length,Nj(i.data,t),Nj(n,null),Nj(i.blueprint,null));let o=z9(t,n),r=t.injectorIndex;if(zre(o)){let a=k3(o),p=M3(o,n),f=p[qo].data;for(let x=0;x<8;x++)n[r+x]=p[a+x]|f[a+x]}return n[r+8]=o,r}function Nj(t,n){t.push(0,0,0,0,0,0,0,0,n)}function Hre(t,n){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||n[t.injectorIndex+8]===null?-1:t.injectorIndex}function z9(t,n){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,i=null,o=n;for(;o!==null;){if(i=Wre(o),i===null)return sI;if(e++,o=o[qx],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return sI}function Zj(t,n,e){nAe(t,n,e)}function oAe(t,n){if(n==="class")return t.classes;if(n==="style")return t.styles;let e=t.attrs;if(e){let i=e.length,o=0;for(;o>20,D=i?p:p+I,P=o?p+I:x;for(let R=D;R=f&&j.type===e)return R}if(o){let R=a[f];if(R&&_m(R)&&R.type===e)return f}return null}function ak(t,n,e,i,o){let r=t[e],a=n.data;if(r instanceof e1){let p=r;if(p.resolving){let R=uoe(a[e]);throw X7(R)}let f=R3(p.canSeeViewProviders);p.resolving=!0;let x=a[e].type||a[e],I,D=p.injectImpl?vu(p.injectImpl):null,P=kj(t,i,0);try{r=t[e]=p.factory(void 0,o,a,t,i),n.firstCreatePass&&e>=i.directiveStart&&KEe(e,a[e],n)}finally{D!==null&&vu(D),R3(f),p.resolving=!1,Mj()}}return r}function sAe(t){if(typeof t=="string")return t.charCodeAt(0)||0;let n=t.hasOwnProperty(Gx)?t[Gx]:void 0;return typeof n=="number"?n>=0?n&Vre:aAe:n}function Yoe(t,n,e){let i=1<>Ure)]&i)}function Qoe(t,n){return!(t&2)&&!(t&1&&n)}var Jx=class{_tNode;_lView;constructor(n,e){this._tNode=n,this._lView=e}get(n,e,i){return $re(this._tNode,this._lView,n,Ux(i),e)}};function aAe(){return new Jx(lc(),So())}function jt(t){return _I(()=>{let n=t.prototype.constructor,e=n[U2]||Yj(n),i=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==i;){let r=o[U2]||Yj(o);if(r&&r!==e)return r;o=Object.getPrototypeOf(o)}return r=>new r})}function Yj(t){return $7(t)?()=>{let n=Yj(Cc(t));return n&&n()}:Ky(t)}function lAe(t,n,e,i,o){let r=t,a=n;for(;r!==null&&a!==null&&a[cr]&2048&&!JS(a);){let p=qre(r,a,e,i|2,Jf);if(p!==Jf)return p;let f=r.parent;if(!f){let x=a[dj];if(x){let I=x.get(e,Jf,i);if(I!==Jf)return I}f=Wre(a),a=a[qx]}r=f}return o}function Wre(t){let n=t[qo],e=n.type;return e===2?n.declTNode:e===1?t[Rd]:null}function mk(t){return oAe(lc(),t)}function cAe(){return vI(lc(),So())}function vI(t,n){return new _n(Sh(t,n))}var _n=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=cAe}return t})();function Kre(t){return t instanceof _n?t.nativeElement:t}function dAe(){return this._results[Symbol.iterator]()}var Z_=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 xi}constructor(n=!1){this._emitDistinctChangesOnly=n}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){this.dirty=!1;let i=goe(n);(this._changesDetected=!foe(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(n){this._onDirty=n}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=dAe};function Zre(t){return(t.flags&128)===128}var V9=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(V9||{}),Yre=new Map,uAe=0;function pAe(){return uAe++}function hAe(t){Yre.set(t[K2],t)}function Qj(t){Yre.delete(t[K2])}var Xoe="__ngContext__";function lI(t,n){Zf(n)?(t[Xoe]=n[K2],hAe(n)):t[Xoe]=n}function Qre(t){return Jre(t[QS])}function Xre(t){return Jre(t[wh])}function Jre(t){for(;t!==null&&!gm(t);)t=t[wh];return t}var Xj;function U9(t){Xj=t}function K3(){if(Xj!==void 0)return Xj;if(typeof document<"u")return document;throw new fn(210,!1)}var nv=new ii("",{providedIn:"root",factory:()=>mAe}),mAe="ng",Z3=new ii(""),Xc=new ii("",{providedIn:"platform",factory:()=>"unknown"});var fk=new ii(""),ov=new ii("",{providedIn:"root",factory:()=>K3().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var fAe="h",gAe="b";var ese="r";var tse="di";var ise=!1,nse=new ii("",{providedIn:"root",factory:()=>ise});var Y3=new ii("");var _Ae=(t,n,e,i)=>{};function yAe(t,n,e,i){_Ae(t,n,e,i)}function Q3(t){return(t.flags&32)===32}var vAe=()=>null;function ose(t,n,e=!1){return vAe(t,n,e)}function rse(t,n){let e=t.contentQueries;if(e!==null){let i=hr(null);try{for(let o=0;ot,createScript:t=>t,createScriptURL:t=>t})}catch{}return _3}function X3(t){return bAe()?.createHTML(t)||t}var y3;function sse(){if(y3===void 0&&(y3=null,sc.trustedTypes))try{y3=sc.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return y3}function Joe(t){return sse()?.createHTML(t)||t}function ere(t){return sse()?.createScriptURL(t)||t}var Q_=class{changingThisBreaksApplicationSecurity;constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${JN})`}},e9=class extends Q_{getTypeName(){return"HTML"}},t9=class extends Q_{getTypeName(){return"Style"}},i9=class extends Q_{getTypeName(){return"Script"}},n9=class extends Q_{getTypeName(){return"URL"}},o9=class extends Q_{getTypeName(){return"ResourceURL"}};function Ju(t){return t instanceof Q_?t.changingThisBreaksApplicationSecurity:t}function eg(t,n){let e=ase(t);if(e!=null&&e!==n){if(e==="ResourceURL"&&n==="URL")return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${JN})`)}return e===n}function ase(t){return t instanceof Q_&&t.getTypeName()||null}function j9(t){return new e9(t)}function G9(t){return new t9(t)}function $9(t){return new i9(t)}function q9(t){return new n9(t)}function W9(t){return new o9(t)}function lse(t){let n=new s9(t);return xAe()?new r9(n):n}var r9=class{inertDocumentHelper;constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{let e=new window.DOMParser().parseFromString(X3(n),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(n):(e.firstChild?.remove(),e)}catch{return null}}},s9=class{defaultDoc;inertDocument;constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){let e=this.inertDocument.createElement("template");return e.innerHTML=X3(n),e}};function xAe(){try{return!!new window.DOMParser().parseFromString(X3(""),"text/html")}catch{return!1}}var CAe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function bI(t){return t=String(t),t.match(CAe)?t:"unsafe:"+t}function X_(t){let n={};for(let e of t.split(","))n[e]=!0;return n}function gk(...t){let n={};for(let e of t)for(let i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}var cse=X_("area,br,col,hr,img,wbr"),dse=X_("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),use=X_("rp,rt"),wAe=gk(use,dse),SAe=gk(dse,X_("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")),IAe=gk(use,X_("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")),a9=gk(cse,SAe,IAe,wAe),K9=X_("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),TAe=X_("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"),EAe=X_("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"),pse=gk(K9,TAe,EAe),AAe=X_("script,style,template"),l9=class{sanitizedSomething=!1;buf=[];sanitizeChildren(n){let e=n.firstChild,i=!0,o=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild){o.push(e),e=MAe(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=kAe(e);if(r){e=r;break}e=o.pop()}}return this.buf.join("")}startElement(n){let e=tre(n).toLowerCase();if(!a9.hasOwnProperty(e))return this.sanitizedSomething=!0,!AAe.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=n.attributes;for(let o=0;o"),!0}endElement(n){let e=tre(n).toLowerCase();a9.hasOwnProperty(e)&&!cse.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(ire(n))}};function DAe(t,n){return(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function kAe(t){let n=t.nextSibling;if(n&&t!==n.previousSibling)throw hse(n);return n}function MAe(t){let n=t.firstChild;if(n&&DAe(t,n))throw hse(n);return n}function tre(t){let n=t.nodeName;return typeof n=="string"?n:"FORM"}function hse(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var RAe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,OAe=/([^\#-~ |!])/g;function ire(t){return t.replace(/&/g,"&").replace(RAe,function(n){let e=n.charCodeAt(0),i=n.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(OAe,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}var v3;function J3(t,n){let e=null;try{v3=v3||lse(t);let i=n?String(n):"";e=v3.getInertBodyElement(i);let o=5,r=i;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,i=r,r=e.innerHTML,e=v3.getInertBodyElement(i)}while(i!==r);let p=new l9().sanitizeChildren(c9(e)||e);return X3(p)}finally{if(e){let i=c9(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function c9(t){return"content"in t&&PAe(t)?t.content:null}function PAe(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var Jc=(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})(Jc||{});function xm(t){let n=Y9();return n?Joe(n.sanitize(Jc.HTML,t)||""):eg(t,"HTML")?Joe(Ju(t)):J3(K3(),Yy(t))}function ja(t){let n=Y9();return n?n.sanitize(Jc.URL,t)||"":eg(t,"URL")?Ju(t):bI(Yy(t))}function mse(t){let n=Y9();if(n)return ere(n.sanitize(Jc.RESOURCE_URL,t)||"");if(eg(t,"ResourceURL"))return ere(Ju(t));throw new fn(904,!1)}function LAe(t,n){return n==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||n==="href"&&(t==="base"||t==="link")?mse:ja}function Z9(t,n,e){return LAe(n,e)(t)}function Y9(){let t=So();return t&&t[Wf].sanitizer}var FAe=/^>|^->||--!>|)/g,BAe="\u200B$1\u200B";function zAe(t){return t.replace(FAe,n=>n.replace(NAe,BAe))}function eB(t){return t.ownerDocument.defaultView}function fse(t){return t instanceof Function?t():t}function VAe(t,n,e){let i=t.length;for(;;){let o=t.indexOf(n,e);if(o===-1)return o;if(o===0||t.charCodeAt(o-1)<=32){let r=n.length;if(o+r===i||t.charCodeAt(o+r)<=32)return o}e=o+1}}var gse="ng-template";function UAe(t,n,e,i){let o=0;if(i){for(;o-1){let r;for(;++or?D="":D=o[I+1].toLowerCase(),i&2&&x!==D){if(ym(i))return!1;a=!0}}}}return ym(i)||a}function ym(t){return(t&1)===0}function GAe(t,n,e,i){if(n===null)return-1;let o=0;if(i||!e){let r=!1;for(;o-1)for(e++;e0?'="'+p+'"':"")+"]"}else i&8?o+="."+a:i&4&&(o+=" "+a);else o!==""&&!ym(a)&&(n+=nre(r,o),o=""),i=a,r=r||!ym(i);e++}return o!==""&&(n+=nre(r,o)),n}function YAe(t){return t.map(ZAe).join(",")}function QAe(t){let n=[],e=[],i=1,o=2;for(;i{xse(n,f,p)}):t===3&&rre(r,()=>{n.destroyNode(f)}),a!=null&&pDe(n,t,a,e,o)}}function rDe(t,n){Ise(t,n),n[fm]=null,n[Rd]=null}function sDe(t,n,e,i,o,r){i[fm]=o,i[Rd]=n,oB(t,i,e,1,o,r)}function Ise(t,n){n[Wf].changeDetectionScheduler?.notify(9),oB(t,n,n[Js],2,null,null)}function aDe(t){let n=t[QS];if(!n)return Bj(t[qo],t);for(;n;){let e=null;if(Zf(n))e=n[QS];else{let i=n[ac];i&&(e=i)}if(!e){for(;n&&!n[wh]&&n!==t;)Zf(n)&&Bj(n[qo],n),n=n[wc];n===null&&(n=t),Zf(n)&&Bj(n[qo],n),e=n&&n[wh]}n=e}}function nG(t,n){let e=t[Zx],i=e.indexOf(n);e.splice(i,1)}function nB(t,n){if(Yx(n))return;let e=n[Js];e.destroyNode&&oB(t,n,e,3,null,null),aDe(n)}function Bj(t,n){if(Yx(n))return;let e=hr(null);try{n[cr]&=-129,n[cr]|=256,n[Np]&&$y(n[Np]),dDe(t,n),cDe(t,n),n[qo].type===1&&n[Js].destroy();let i=n[Qy];if(i!==null&&gm(n[wc])){i!==n[wc]&&nG(i,n);let o=n[Kf];o!==null&&o.detachView(t)}Qj(n)}finally{hr(e)}}function rre(t,n){if(t&&t[md]&&t[md].leave)if(t[md].skipLeaveAnimations)t[md].skipLeaveAnimations=!1;else{let e=t[md].leave,i=[];for(let o=0;o{t[md]&&t[md].running&&(t[md].running=void 0),iB.delete(t),n()});return}n()}function cDe(t,n){let e=t.cleanup,i=n[ZS];if(e!==null)for(let a=0;a=0?i[p]():i[-p].unsubscribe(),a+=2}else{let p=i[e[a+1]];e[a].call(p)}i!==null&&(n[ZS]=null);let o=n[z_];if(o!==null){n[z_]=null;for(let a=0;aga&&Sse(t,n,ga,!1),Aa(a?2:0,o,e),e(i,o)}finally{ev(r),Aa(a?3:1,o,e)}}function rB(t,n,e){yDe(t,n,e),(e.flags&64)===64&&vDe(t,n,e)}function yk(t,n,e=Sh){let i=n.localNames;if(i!==null){let o=n.index+1;for(let r=0;rnull;function _De(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function Lse(t,n,e,i,o,r){let a=n[qo];if(sB(t,a,n,e,i)){G_(t)&&Nse(n,t.index);return}t.type&3&&(e=_De(e)),Fse(t,n,e,i,o,r)}function Fse(t,n,e,i,o,r){if(t.type&3){let a=Sh(t,n);i=r!=null?r(i,t.value||"",e):i,o.setProperty(a,e,i)}else t.type&12}function Nse(t,n){let e=Ih(n,t);e[cr]&16||(e[cr]|=64)}function yDe(t,n,e){let i=e.directiveStart,o=e.directiveEnd;G_(e)&&nDe(n,e,t.data[i+e.componentOffset]),t.firstCreatePass||O3(e,n);let r=e.initialInputs;for(let a=i;a{Jy(t.lView)},consumerOnSignalRead(){this.lView[Np]=this}});function MDe(t){let n=t[Np]??Object.create(RDe);return n.lView=t,n}var RDe=gt(ve({},Rx),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let n=Zy(t.lView);for(;n&&!Hse(n[qo]);)n=Zy(n);n&&_j(n)},consumerOnSignalRead(){this.lView[Np]=this}});function Hse(t){return t.type!==2}function jse(t){if(t[j_]===null)return;let n=!0;for(;n;){let e=!1;for(let i of t[j_])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));n=e&&!!(t[cr]&8192)}}var ODe=100;function Gse(t,n=0){let i=t[Wf].rendererFactory,o=!1;o||i.begin?.();try{PDe(t,n)}finally{o||i.end?.()}}function PDe(t,n){let e=Aj();try{tI(!0),m9(t,n);let i=0;for(;X2(t);){if(i===ODe)throw new fn(103,!1);i++,m9(t,1)}}finally{tI(e)}}function LDe(t,n,e,i){if(Yx(n))return;let o=n[cr],r=!1,a=!1;h3(n);let p=!0,f=null,x=null;r||(Hse(t)?(x=EDe(n),f=Gy(x)):xN()===null?(p=!1,x=MDe(n),f=Gy(x)):n[Np]&&($y(n[Np]),n[Np]=null));try{gj(n),Loe(t.bindingStartIndex),e!==null&&Pse(t,n,e,2,i),FDe(n);let I=(o&3)===3;if(!r)if(I){let R=t.preOrderCheckHooks;R!==null&&w3(n,R,null)}else{let R=t.preOrderHooks;R!==null&&S3(n,R,0,null),Fj(n,0)}if(a||NDe(n),jse(n),$se(n,0),t.contentQueries!==null&&rse(t,n),!r)if(I){let R=t.contentCheckHooks;R!==null&&w3(n,R)}else{let R=t.contentHooks;R!==null&&S3(n,R,1),Fj(n,1)}zDe(t,n);let D=t.components;D!==null&&Wse(n,D,0);let P=t.viewQuery;if(P!==null&&Jj(2,P,i),!r)if(I){let R=t.viewCheckHooks;R!==null&&w3(n,R)}else{let R=t.viewHooks;R!==null&&S3(n,R,2),Fj(n,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),n[s3]){for(let R of n[s3])R();n[s3]=null}r||(Vse(n),n[cr]&=-73)}catch(I){throw r||Jy(n),I}finally{x!==null&&(Ox(x,f),p&&DDe(x)),m3()}}function FDe(t){let n=t[md];if(n?.enter){for(let e of n.enter)e();n.enter=void 0}}function $se(t,n){for(let e=Qre(t);e!==null;e=Xre(e))for(let i=ac;i0&&(t[e-1][wh]=i[wh]);let r=$2(t,ac+n);rDe(i[qo],i);let a=r[Kf];a!==null&&a.detachView(r[qo]),i[wc]=null,i[wh]=null,i[cr]&=-129}return i}function VDe(t,n,e,i){let o=ac+i,r=e.length;i>0&&(e[o-1][wh]=n),i-1&&(ck(n,i),$2(e,i))}this._attachedToViewContainer=!1}nB(this._lView[qo],this._lView)}onDestroy(n){yj(this._lView,n)}markForCheck(){dG(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[cr]&=-129}reattach(){l3(this._lView),this._lView[cr]|=128}detectChanges(){this._lView[cr]|=1024,Gse(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new fn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let n=JS(this._lView),e=this._lView[Qy];e!==null&&!n&&nG(e,this._lView),Ise(this._lView[qo],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new fn(902,!1);this._appRef=n;let e=JS(this._lView),i=this._lView[Qy];i!==null&&!e&&Qse(i,this._lView),l3(this._lView)}};var Ml=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=UDe;constructor(e,i,o){this._declarationLView=e,this._declarationTContainer=i,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,i){return this.createEmbeddedViewImpl(e,i)}createEmbeddedViewImpl(e,i,o){let r=vk(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:o});return new tv(r)}}return t})();function UDe(){return aB(lc(),So())}function aB(t,n){return t.type&4?new Ml(n,t,vI(t,n)):null}function Xse(t,n,e){let i=n.insertBeforeIndex,o=Array.isArray(i)?i[0]:i;return o===null?Dse(t,n,e):Bp(e[o])}function Jse(t,n,e,i,o){let r=n.insertBeforeIndex;if(Array.isArray(r)){let a=i,p=null;if(n.type&3||(p=a,a=o),a!==null&&n.componentOffset===-1)for(let f=1;f1)for(let e=t.length-2;e>=0;e--){let i=t[e];tae(i)||GDe(i,n)&&$De(i)===null&&qDe(i,n.index)}}function tae(t){return!(t.type&64)}function GDe(t,n){return tae(n)||t.index>n.index}function $De(t){let n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function qDe(t,n){let e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(Mse(Xse,Jse),t.insertBeforeIndex=n)}function WDe(t,n,e){let i=t.data[n];i===null?t.data[n]=e:i.value=e}function KDe(t,n){let e=t.insertBeforeIndex;e===null?(Mse(Xse,Jse),e=t.insertBeforeIndex=[null,n]):(coe(Array.isArray(e),!0,"Expecting array here"),e.push(n))}function ZDe(t,n,e){let i=uG(t,e,64,null,null);return eae(n,i),i}function YDe(t,n){let e=n[t.currentCaseLViewIndex];return e===null?e:e<0?~e:e}function QDe(t,n,e){return t|n<<17|e<<1}function XDe(t){return t===-1}function iae(t,n,e){t.index=0;let i=YDe(n,e);i!==null?t.removes=n.remove[i]:t.removes=hd}function f9(t){if(t.index0)return t.lView[n];{t.stack.push(t.index,t.removes);let e=~n,i=t.lView[qo].data[e];return iae(t,i,t.lView),f9(t)}}else return t.stack.length===0?null:(t.removes=t.stack.pop(),t.index=t.stack.pop(),f9(t))}function JDe(){let t={stack:[],index:-1};function n(e,i){for(t.lView=i;t.stack.length;)t.stack.pop();return iae(t,e.value,i),f9.bind(null,t)}return n}var ACt=new RegExp(`^(\\d+)*(${gAe}|${fAe})*(.*)`);var e2e=()=>{};function t2e(t,n,e,i){e2e(t,n,e,i)}function i2e(t){let n=t[uj]??[],i=t[wc][Js],o=[];for(let r of n)r.data[tse]!==void 0?o.push(r):n2e(r,i);t[uj]=o}function n2e(t,n){let e=0,i=t.firstChild;if(i){let o=t.data[ese];for(;enull,r2e=()=>null;function P3(t,n){return o2e(t,n)}function nae(t,n,e){return r2e(t,n,e)}var oae=class{},lB=class{},g9=class{resolveComponentFactory(n){throw new fn(917,!1)}},xk=class{static NULL=new g9},dl=class{},Kr=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>s2e()}return t})();function s2e(){let t=So(),n=lc(),e=Ih(n.index,t);return(Zf(e)?e:t)[Js]}var rae=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>null})}return t})();var T3={},_9=class{injector;parentInjector;constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){let o=this.injector.get(n,T3,i);return o!==T3||e===T3?o:this.parentInjector.get(n,e,i)}};function L3(t,n,e){let i=e?t.styles:null,o=e?t.classes:null,r=0;if(n!==null)for(let a=0;a0&&(e.directiveToIndex=new Map);for(let P=0;P0;){let e=t[--n];if(typeof e=="number"&&e<0)return e}return 0}function m2e(t,n,e){if(e){if(n.exportAs)for(let i=0;ii(Bp($[t.index])):t.index;uae(j,n,e,r,p,R,!1)}}return x}function _2e(t){return t.startsWith("animation")||t.startsWith("transition")}function y2e(t,n,e,i){let o=t.cleanup;if(o!=null)for(let r=0;rf?p[f]:null}typeof a=="string"&&(r+=2)}return null}function uae(t,n,e,i,o,r,a){let p=n.firstCreatePass?bj(n):null,f=vj(e),x=f.length;f.push(o,r),p&&p.push(i,t,x,(x+1)*(a?-1:1))}function dre(t,n,e,i,o,r){let a=n[e],p=n[qo],x=p.data[e].outputs[i],D=a[x].subscribe(r);uae(t.index,p,n,o,r,D,!0)}var y9=Symbol("BINDING");var F3=class extends xk{ngModule;constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){let e=qf(n);return new iv(e,this.ngModule)}};function v2e(t){return Object.keys(t).map(n=>{let[e,i,o]=t[n],r={propName:e,templateName:n,isSignal:(i&tB.SignalBased)!==0};return o&&(r.transform=o),r})}function b2e(t){return Object.keys(t).map(n=>({propName:t[n],templateName:n}))}function x2e(t,n,e){let i=n instanceof ua?n:n?.injector;return i&&t.getStandaloneInjector!==null&&(i=t.getStandaloneInjector(i)||i),i?new _9(e,i):e}function C2e(t){let n=t.get(dl,null);if(n===null)throw new fn(407,!1);let e=t.get(rae,null),i=t.get(Ch,null);return{rendererFactory:n,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function w2e(t,n){let e=pae(t);return X9(n,e,e==="svg"?hj:e==="math"?Ioe:null)}function pae(t){return(t.selectors[0][0]||"div").toLowerCase()}var iv=class extends lB{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=v2e(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=b2e(this.componentDef.outputs),this.cachedOutputs}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=YAe(n.selectors),this.ngContentSelectors=n.ngContentSelectors??[],this.isBoundToModule=!!e}create(n,e,i,o,r,a){Aa(22);let p=hr(null);try{let f=this.componentDef,x=S2e(i,f,a,r),I=x2e(f,o||this.ngModule,n),D=C2e(I),P=D.rendererFactory.createRenderer(null,f),R=i?mDe(P,i,f.encapsulation,I):w2e(f,P),j=a?.some(ure)||r?.some(Q=>typeof Q!="function"&&Q.bindings.some(ure)),$=eG(null,x,null,512|wse(f),null,null,D,P,I,null,ose(R,I,!0));$[ga]=R,h3($);let W=null;try{let Q=pG(ga,$,2,"#host",()=>x.directiveRegistry,!0,0);R&&(Cse(P,R,Q),lI(R,$)),rB(x,$,Q),H9(x,Q,$),hG(x,Q),e!==void 0&&T2e(Q,this.ngContentSelectors,e),W=Ih(Q.index,$),$[jl]=W[jl],cG(x,$,null)}catch(Q){throw W!==null&&Qj(W),Qj($),Q}finally{Aa(23),m3()}return new N3(this.componentType,$,!!j)}finally{hr(p)}}};function S2e(t,n,e,i){let o=t?["ng-version","20.3.1"]:QAe(n.selectors[0]),r=null,a=null,p=0;if(e)for(let I of e)p+=I[y9].requiredVars,I.create&&(I.targetIdx=0,(r??=[]).push(I)),I.update&&(I.targetIdx=0,(a??=[]).push(I));if(i)for(let I=0;I{if(e&1&&t)for(let i of t)i.create();if(e&2&&n)for(let i of n)i.update()}}function ure(t){let n=t[y9].kind;return n==="input"||n==="twoWay"}var N3=class extends oae{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(n,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=Y2(e[qo],ga),this.location=vI(this._tNode,e),this.instance=Ih(this._tNode.index,e)[jl],this.hostView=this.changeDetectorRef=new tv(e,void 0),this.componentType=n}setInput(n,e){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),e))return;let o=this._rootLView,r=sB(i,o[qo],o,n,e);this.previousInputValues.set(n,e);let a=Ih(i.index,o);dG(a,1)}get injector(){return new Jx(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}};function T2e(t,n,e){let i=t.projection=[];for(let o=0;o{class t{static __NG_ELEMENT_ID__=E2e}return t})();function E2e(){let t=lc();return mae(t,So())}var A2e=Ga,hae=class extends A2e{_lContainer;_hostTNode;_hostLView;constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return vI(this._hostTNode,this._hostLView)}get injector(){return new Jx(this._hostTNode,this._hostLView)}get parentInjector(){let n=z9(this._hostTNode,this._hostLView);if(zre(n)){let e=M3(n,this._hostLView),i=k3(n),o=e[qo].data[i+8];return new Jx(o,e)}else return new Jx(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){let e=pre(this._lContainer);return e!==null&&e[n]||null}get length(){return this._lContainer.length-ac}createEmbeddedView(n,e,i){let o,r;typeof i=="number"?o=i:i!=null&&(o=i.index,r=i.injector);let a=P3(this._lContainer,n.ssrId),p=n.createEmbeddedViewImpl(e||{},r,a);return this.insertImpl(p,o,dI(this._hostTNode,a)),p}createComponent(n,e,i,o,r,a,p){let f=n&&!GEe(n),x;if(f)x=e;else{let W=e||{};x=W.index,i=W.injector,o=W.projectableNodes,r=W.environmentInjector||W.ngModuleRef,a=W.directives,p=W.bindings}let I=f?n:new iv(qf(n)),D=i||this.parentInjector;if(!r&&I.ngModule==null){let Q=(f?D:this.parentInjector).get(ua,null);Q&&(r=Q)}let P=qf(I.componentType??{}),R=P3(this._lContainer,P?.id??null),j=R?.firstChild??null,$=I.create(D,o,j,r,a,p);return this.insertImpl($.hostView,x,dI(this._hostTNode,R)),$}insert(n,e){return this.insertImpl(n,e,!0)}insertImpl(n,e,i){let o=n._lView;if(Eoe(o)){let p=this.indexOf(n);if(p!==-1)this.detach(p);else{let f=o[wc],x=new hae(f,f[Rd],f[wc]);x.detach(x.indexOf(n))}}let r=this._adjustIndex(e),a=this._lContainer;return bk(a,o,r,i),n.attachToViewContainerRef(),tj(zj(a),r,n),n}move(n,e){return this.insert(n,e)}indexOf(n){let e=pre(this._lContainer);return e!==null?e.indexOf(n):-1}remove(n){let e=this._adjustIndex(n,-1),i=ck(this._lContainer,e);i&&($2(zj(this._lContainer),e),nB(i[qo],i))}detach(n){let e=this._adjustIndex(n,-1),i=ck(this._lContainer,e);return i&&$2(zj(this._lContainer),e)!=null?new tv(i):null}_adjustIndex(n,e=0){return n??this.length+e}};function pre(t){return t[Z2]}function zj(t){return t[Z2]||(t[Z2]=[])}function mae(t,n){let e,i=n[t.index];return gm(i)?e=i:(e=Kse(i,n,null,t),n[t.index]=e,tG(n,e)),k2e(e,n,t,i),new hae(e,t,n)}function D2e(t,n){let e=t[Js],i=e.createComment(""),o=Sh(n,t),r=e.parentNode(o);return cI(e,r,i,e.nextSibling(o),!1),i}var k2e=O2e,M2e=()=>!1;function R2e(t,n,e){return M2e(t,n,e)}function O2e(t,n,e,i){if(t[Xy])return;let o;e.type&8?o=Bp(i):o=D2e(n,e),t[Xy]=o}var v9=class t{queryList;matches=null;constructor(n){this.queryList=n}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},b9=class t{queries;constructor(n=[]){this.queries=n}createEmbeddedView(n){let e=n.queries;if(e!==null){let i=n.contentQueries!==null?n.contentQueries[0]:e.length,o=[];for(let r=0;r0)i.push(a[p/2]);else{let x=r[p+1],I=n[-f];for(let D=ac;Dn.trim())}function vae(t,n,e){t.queries===null&&(t.queries=new x9),t.queries.track(new C9(n,e))}function z2e(t,n){let e=t.contentQueries||(t.contentQueries=[]),i=e.length?e[e.length-1]:-1;n!==i&&e.push(t.queries.length-1,n)}function gG(t,n){return t.queries.getByIndex(n)}function bae(t,n){let e=t[qo],i=gG(e,n);return i.crossesNgTemplate?w9(e,t,n,[]):fae(e,t,i,n)}function xae(t,n,e){let i,o=O2(()=>{i._dirtyCounter();let r=V2e(i,t);if(n&&r===void 0)throw new fn(-951,!1);return r});return i=o[rc],i._dirtyCounter=Jn(0),i._flatValue=void 0,o}function _G(t){return xae(!0,!1,t)}function yG(t){return xae(!0,!0,t)}function Cae(t,n){let e=t[rc];e._lView=So(),e._queryIndex=n,e._queryList=fG(e._lView,n),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function V2e(t,n){let e=t._lView,i=t._queryIndex;if(e===void 0||i===void 0||e[cr]&4)return n?void 0:hd;let o=fG(e,i),r=bae(e,i);return o.reset(r,Kre),n?o.first:o._changesDetected||t._flatValue===void 0?t._flatValue=o.toArray():t._flatValue}function wae(t){let n=[],e=new Map;function i(o){let r=e.get(o);if(!r){let a=t(o);e.set(o,r=a.then(p=>H2e(o,p)))}return r}return z3.forEach((o,r)=>{let a=[];o.templateUrl&&a.push(i(o.templateUrl).then(x=>{o.template=x}));let p=typeof o.styles=="string"?[o.styles]:o.styles||[];if(o.styles=p,o.styleUrl&&o.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(o.styleUrls?.length){let x=o.styles.length,I=o.styleUrls;o.styleUrls.forEach((D,P)=>{p.push(""),a.push(i(D).then(R=>{p[x+P]=R,I.splice(I.indexOf(D),1),I.length==0&&(o.styleUrls=void 0)}))})}else o.styleUrl&&a.push(i(o.styleUrl).then(x=>{p.push(x),o.styleUrl=void 0}));let f=Promise.all(a).then(()=>j2e(r));n.push(f)}),Sae(),Promise.all(n).then(()=>{})}var z3=new Map,U2e=new Set;function Sae(){let t=z3;return z3=new Map,t}function Iae(){return z3.size===0}function H2e(t,n){return typeof n=="string"?n:n.status!==void 0&&n.status!==200?Promise.reject(new fn(918,!1)):n.text()}function j2e(t){U2e.delete(t)}var hre=new Set;function ig(t){hre.has(t)||(hre.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var bm=class{},dB=class{};function vG(t,n){return new hI(t,n??null,[])}var hI=class extends bm{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new F3(this);constructor(n,e,i,o=!0){super(),this.ngModuleType=n,this._parent=e;let r=oj(n);this._bootstrapComponents=fse(r.bootstrap),this._r3Injector=Rj(n,e,[{provide:bm,useValue:this},{provide:xk,useValue:this.componentFactoryResolver},...i],V_(n),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}},dk=class extends dB{moduleType;constructor(n){super(),this.moduleType=n}create(n){return new hI(this.moduleType,n,[])}};function Tae(t,n,e){return new hI(t,n,e,!1)}var V3=class extends bm{injector;componentFactoryResolver=new F3(this);instance=null;constructor(n){super();let e=new jx([...n.providers,{provide:bm,useValue:this},{provide:xk,useValue:this.componentFactoryResolver}],n.parent||KS(),n.debugName,new Set(["environment"]));this.injector=e,n.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}};function CI(t,n,e=null){return new V3({providers:t,parent:n,debugName:e,runEnvironmentInitializers:!0}).injector}var G2e=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let i=rj(!1,e.type),o=i.length>0?CI([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,o)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ct({token:t,providedIn:"environment",factory:()=>new t(ui(ua))})}return t})();function Le(t){return _I(()=>{let n=Eae(t),e=gt(ve({},n),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===V9.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:n.standalone?o=>o.get(G2e).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Y_.Emulated,styles:t.styles||hd,_:null,schemas:t.schemas||null,tView:null,id:""});n.standalone&&ig("NgStandalone"),Aae(e);let i=t.dependencies;return e.directiveDefs=mre(i,$2e),e.pipeDefs=mre(i,voe),e.id=K2e(e),e})}function $2e(t){return qf(t)||r3(t)}function yi(t){return _I(()=>({type:t.type,bootstrap:t.bootstrap||hd,declarations:t.declarations||hd,imports:t.imports||hd,exports:t.exports||hd,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function q2e(t,n){if(t==null)return mm;let e={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i],r,a,p,f;Array.isArray(o)?(p=o[0],r=o[1],a=o[2]??r,f=o[3]||null):(r=o,a=o,p=tB.None,f=null),e[r]=[i,p,f],n[r]=a}return e}function W2e(t){if(t==null)return mm;let n={};for(let e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}function Ki(t){return _I(()=>{let n=Eae(t);return Aae(n),n})}function ep(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 Eae(t){let n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,inputConfig:t.inputs||mm,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||hd,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:q2e(t.inputs,n),outputs:W2e(t.outputs),debugInfo:null}}function Aae(t){t.features?.forEach(n=>n(t))}function mre(t,n){return t?()=>{let e=typeof t=="function"?t():t,i=[];for(let o of e){let r=n(o);r!==null&&i.push(r)}return i}:null}function K2e(t){let n=0,e=typeof t.consts=="function"?"":t.consts,i=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let r of i.join("|"))n=Math.imul(31,n)+r.charCodeAt(0)<<0;return n+=2147483648,"c"+n}function Z2e(t){return Object.getPrototypeOf(t.prototype).constructor}function Rt(t){let n=Z2e(t.type),e=!0,i=[t];for(;n;){let o;if(_m(t))o=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new fn(903,!1);o=n.\u0275dir}if(o){if(e){i.push(o);let a=t;a.inputs=Vj(t.inputs),a.declaredInputs=Vj(t.declaredInputs),a.outputs=Vj(t.outputs);let p=o.hostBindings;p&&eke(t,p);let f=o.viewQuery,x=o.contentQueries;if(f&&X2e(t,f),x&&J2e(t,x),Y2e(t,o),loe(t.outputs,o.outputs),_m(o)&&o.data.animation){let I=t.data;I.animation=(I.animation||[]).concat(o.data.animation)}}let r=o.features;if(r)for(let a=0;a=0;i--){let o=t[i];o.hostVars=n+=o.hostVars,o.hostAttrs=aI(o.hostAttrs,e=aI(e,o.hostAttrs))}}function Vj(t){return t===mm?{}:t===hd?[]:t}function X2e(t,n){let e=t.viewQuery;e?t.viewQuery=(i,o)=>{n(i,o),e(i,o)}:t.viewQuery=n}function J2e(t,n){let e=t.contentQueries;e?t.contentQueries=(i,o,r)=>{n(i,o,r),e(i,o,r)}:t.contentQueries=n}function eke(t,n){let e=t.hostBindings;e?t.hostBindings=(i,o)=>{n(i,o),e(i,o)}:t.hostBindings=n}function i1(t){let n=e=>{let i=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=tke,e.hostDirectives=i?t.map(S9):[t]):i?e.hostDirectives.unshift(...t.map(S9)):e.hostDirectives.unshift(t)};return n.ngInherit=!0,n}function tke(t){let n=[],e=!1,i=null,o=null;for(let r=0;rnull),a=i;if(n&&typeof n=="object"){let f=n;o=f.next?.bind(f),r=f.error?.bind(f),a=f.complete?.bind(f)}this.__isAsync&&(r=this.wrapInTimeout(r),o&&(o=this.wrapInTimeout(o)),a&&(a=this.wrapInTimeout(a)));let p=super.subscribe({next:o,error:r,complete:a});return n instanceof Dr&&n.add(p),p}wrapInTimeout(n){return e=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{n(e)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},yt=I9;function Rae(t){let n,e;function i(){t=Xx;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),n!==void 0&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{t(),i()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),i()})),()=>i()}function _re(t){return queueMicrotask(()=>t()),()=>{t=Xx}}var bG="isAngularZone",U3=bG+"_ID",ske=0,on=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yt(!1);onMicrotaskEmpty=new yt(!1);onStable=new yt(!1);onError=new yt(!1);constructor(n){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:r=Mae}=n;if(typeof Zone>"u")throw new fn(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=!o&&i,a.shouldCoalesceRunChangeDetection=o,a.callbackScheduled=!1,a.scheduleInRootZone=r,cke(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(bG)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new fn(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new fn(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,o){let r=this._inner,a=r.scheduleEventTask("NgZoneEvent: "+o,n,ake,Xx,Xx);try{return r.runTask(a,e,i)}finally{r.cancelTask(a)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}},ake={};function xG(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 lke(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function n(){Rae(()=>{t.callbackScheduled=!1,T9(t),t.isCheckStableRunning=!0,xG(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{n()}):t._outer.run(()=>{n()}),T9(t)}function cke(t){let n=()=>{lke(t)},e=ske++;t._inner=t._inner.fork({name:"angular",properties:{[bG]:!0,[U3]:e,[U3+e]:!0},onInvokeTask:(i,o,r,a,p,f)=>{if(dke(f))return i.invokeTask(r,a,p,f);try{return yre(t),i.invokeTask(r,a,p,f)}finally{(t.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&n(),vre(t)}},onInvoke:(i,o,r,a,p,f,x)=>{try{return yre(t),i.invoke(r,a,p,f,x)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!uke(f)&&n(),vre(t)}},onHasTask:(i,o,r,a)=>{i.hasTask(r,a),o===r&&(a.change=="microTask"?(t._hasPendingMicrotasks=a.microTask,T9(t),xG(t)):a.change=="macroTask"&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(i,o,r,a)=>(i.handleError(r,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}function T9(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function yre(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function vre(t){t._nesting--,xG(t)}var uk=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yt;onMicrotaskEmpty=new yt;onStable=new yt;onError=new yt;run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,o){return n.apply(e,i)}};function dke(t){return Oae(t,"__ignore_ng_zone__")}function uke(t){return Oae(t,"__scheduler_tick__")}function Oae(t,n){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[n]===!0}function Pae(t="zone.js",n){return t==="noop"?new uk:t==="zone.js"?new on(n):t}var pB=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})(),CG=[0,1,2,3],wG=(()=>{class t{ngZone=re(on);scheduler=re(Ch);errorHandler=re(Yc,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){re(rv,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Aa(16),this.executing=!0;for(let i of CG)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[i]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let r=o.hooks[i];return r(o.pipelinedValue)},o.snapshot))}catch(r){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(r)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Aa(17)}register(e){let{view:i}=e;i!==void 0?((i[Kx]??=[]).push(e),Jy(i),i[cr]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,i){return i?i.run(uB.AFTER_NEXT_RENDER,e):e()}static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new t})}return t})(),pk=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(n,e,i,o,r,a=null){this.impl=n,this.hooks=e,this.view=i,this.once=o,this.snapshot=a,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let n=this.view?.[Kx];n&&(this.view[Kx]=n.filter(e=>e!==this))}};function Ic(t,n){let e=n?.injector??re(Zn);return ig("NgAfterNextRender"),hke(t,e,n,!0)}function pke(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function hke(t,n,e,i){let o=n.get(pB);o.impl??=n.get(wG);let r=n.get(rv,null,{optional:!0}),a=e?.manualCleanup!==!0?n.get(bu):null,p=n.get(Qx,null,{optional:!0}),f=new pk(o.impl,pke(t),p?.view,i,a,r?.snapshot(null));return o.impl.register(f),f}var hB=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var mB=new ii(""),SI=new ii(""),Sk=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,i,o){this._ngZone=e,this.registry=i,lj()&&(this._destroyRef=re(bu,{optional:!0})??void 0),SG||(Lae(o),o.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),i=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{on.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),i.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>i.updateCb&&i.updateCb(e)?(clearTimeout(i.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,o){let r=-1;i&&i>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==r),e()},i)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:o})}whenStable(e,i,o){if(o&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,o),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,o){return[]}static \u0275fac=function(i){return new(i||t)(ui(on),ui(Ik),ui(SI))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Ik=(()=>{class t{_applications=new Map;registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return SG?.findTestabilityInTree(this,e,i)??null}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function Lae(t){SG=t}var SG;function J_(t){return!!t&&typeof t.then=="function"}function fB(t){return!!t&&typeof t.subscribe=="function"}var IG=new ii("");function sv(t){return H_([{provide:IG,multi:!0,useValue:t}])}var TG=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=re(IG,{optional:!0})??[];injector=re(Zn);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let o of this.appInits){let r=Qc(this.injector,o);if(J_(r))e.push(r);else if(fB(r)){let a=new Promise((p,f)=>{r.subscribe({complete:p,error:f})});e.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(o=>{this.reject(o)}),e.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gB=new ii("");function Fae(){h7(()=>{let t="";throw new fn(600,t)})}function Nae(t){return t.isBoundToModule}var mke=10;function EG(t,n){return Array.isArray(n)?n.reduce(EG,t):ve(ve({},t),n)}var Tc=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=re(xu);afterRenderManager=re(pB);zonelessEnabled=re(tk);rootEffectScheduler=re(ik);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new xi;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=re(Xf);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(vi(e=>!e))}constructor(){re(rv,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:o=>{o&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=re(ua);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,o=Zn.NULL){return this._injector.get(on).run(()=>{Aa(10);let a=e instanceof lB;if(!this._injector.get(TG).done){let j="";throw new fn(405,j)}let f;a?f=e:f=this._injector.get(xk).resolveComponentFactory(e),this.componentTypes.push(f.componentType);let x=Nae(f)?void 0:this._injector.get(bm),I=i||f.selector,D=f.create(o,[],I,x),P=D.location.nativeElement,R=D.injector.get(mB,null);return R?.registerApplication(P),D.onDestroy(()=>{this.detachView(D.hostView),ok(this.components,D),R?.unregisterApplication(P)}),this._loadComponent(D),Aa(11,D),D})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Aa(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(uB.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new fn(101,!1);let e=hr(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,hr(e),this.afterTick.next(),Aa(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(dl,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++X2(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;ok(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(e),this._injector.get(gB,[]).forEach(o=>o(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>ok(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new fn(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ok(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var Uj="aria";function ul(t,n){let e=So(),i=q_();if(Pd(e,i,n)){let o=_a(),r=iI();if(sB(r,o,e,t,n))G_(r)&&Nse(e,r.index);else{let p=Sh(r,e),f=fke(t);Bse(e[Js],p,null,r.value,f,n,null)}}return ul}function fke(t){return t.charAt(Uj.length)!=="-"?Uj+"-"+t.slice(Uj.length).toLowerCase():t}function Xe(t,n,e,i){let o=So(),r=q_();if(Pd(o,r,n)){let a=_a(),p=iI();xDe(p,o,t,n,e,i)}return Xe}var LCt=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var E9=class{destroy(n){}updateValue(n,e){}swap(n,e){let i=Math.min(n,e),o=Math.max(n,e),r=this.detach(o);if(o-i>1){let a=this.detach(i);this.attach(i,r),this.attach(o,a)}else this.attach(i,r)}move(n,e){this.attach(e,this.detach(n,!0))}};function Hj(t,n,e,i,o){return t===e&&Object.is(n,i)?1:Object.is(o(t,n),o(e,i))?-1:0}function gke(t,n,e){let i,o,r=0,a=t.length-1,p=void 0;if(Array.isArray(n)){let f=n.length-1;for(;r<=a&&r<=f;){let x=t.at(r),I=n[r],D=Hj(r,x,r,I,e);if(D!==0){D<0&&t.updateValue(r,I),r++;continue}let P=t.at(a),R=n[f],j=Hj(a,P,f,R,e);if(j!==0){j<0&&t.updateValue(a,R),a--,f--;continue}let $=e(r,x),W=e(a,P),Q=e(r,I);if(Object.is(Q,W)){let se=e(f,R);Object.is(se,$)?(t.swap(r,a),t.updateValue(a,R),f--,a--):t.move(a,r),t.updateValue(r,I),r++;continue}if(i??=new H3,o??=xre(t,r,a,e),A9(t,i,r,Q))t.updateValue(r,I),r++,a++;else if(o.has(Q))i.set($,t.detach(r)),a--;else{let se=t.create(r,n[r]);t.attach(r,se),r++,a++}}for(;r<=f;)bre(t,i,e,r,n[r]),r++}else if(n!=null){let f=n[Symbol.iterator](),x=f.next();for(;!x.done&&r<=a;){let I=t.at(r),D=x.value,P=Hj(r,I,r,D,e);if(P!==0)P<0&&t.updateValue(r,D),r++,x=f.next();else{i??=new H3,o??=xre(t,r,a,e);let R=e(r,D);if(A9(t,i,r,R))t.updateValue(r,D),r++,a++,x=f.next();else if(!o.has(R))t.attach(r,t.create(r,D)),r++,a++,x=f.next();else{let j=e(r,I);i.set(j,t.detach(r)),a--}}}for(;!x.done;)bre(t,i,e,t.length,x.value),x=f.next()}for(;r<=a;)t.destroy(t.detach(a--));i?.forEach(f=>{t.destroy(f)})}function A9(t,n,e,i){return n!==void 0&&n.has(i)?(t.attach(e,n.get(i)),n.delete(i),!0):!1}function bre(t,n,e,i,o){if(A9(t,n,i,e(i,o)))t.updateValue(i,o);else{let r=t.create(i,o);t.attach(i,r)}}function xre(t,n,e,i){let o=new Set;for(let r=n;r<=e;r++)o.add(i(r,t.at(r)));return o}var H3=class{kvMap=new Map;_vMap=void 0;has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;let e=this.kvMap.get(n);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(n,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,e){if(this.kvMap.has(n)){let i=this.kvMap.get(n);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(i);)i=o.get(i);o.set(i,e)}else this.kvMap.set(n,e)}forEach(n){for(let[e,i]of this.kvMap)if(n(i,e),this._vMap!==void 0){let o=this._vMap;for(;o.has(i);)i=o.get(i),n(i,e)}}};function Lt(t,n,e,i,o,r,a,p){ig("NgControlFlow");let f=So(),x=_a(),I=Qu(x.consts,r);return mI(f,x,t,n,e,i,o,I,256,a,p),AG}function AG(t,n,e,i,o,r,a,p){ig("NgControlFlow");let f=So(),x=_a(),I=Qu(x.consts,r);return mI(f,x,t,n,e,i,o,I,512,a,p),AG}function Ft(t,n){ig("NgControlFlow");let e=So(),i=q_(),o=e[i]!==Cu?e[i]:-1,r=o!==-1?j3(e,ga+o):void 0,a=0;if(Pd(e,i,t)){let p=hr(null);try{if(r!==void 0&&Yse(r,a),t!==-1){let f=ga+t,x=j3(e,f),I=R9(e[qo],f),D=nae(x,I,e),P=vk(e,I,n,{dehydratedView:D});bk(x,P,a,dI(I,D))}}finally{hr(p)}}else if(r!==void 0){let p=Zse(r,a);p!==void 0&&(p[jl]=n)}}var D9=class{lContainer;$implicit;$index;constructor(n,e,i){this.lContainer=n,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-ac}};function ed(t,n){return n}var k9=class{hasEmptyBlock;trackByFn;liveCollection;constructor(n,e,i){this.hasEmptyBlock=n,this.trackByFn=e,this.liveCollection=i}};function ea(t,n,e,i,o,r,a,p,f,x,I,D,P){ig("NgControlFlow");let R=So(),j=_a(),$=f!==void 0,W=So(),Q=p?a.bind(W[Od][jl]):a,se=new k9($,Q);W[ga+t]=se,mI(R,j,t+1,n,e,i,o,Qu(j.consts,r),256),$&&mI(R,j,t+2,f,x,I,D,Qu(j.consts,P),512)}var M9=class extends E9{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(n,e,i){super(),this.lContainer=n,this.hostLView=e,this.templateTNode=i}get length(){return this.lContainer.length-ac}at(n){return this.getLView(n)[jl].$implicit}attach(n,e){let i=e[$x];this.needsIndexUpdate||=n!==this.length,bk(this.lContainer,e,n,dI(this.templateTNode,i))}detach(n,e){return this.needsIndexUpdate||=n!==this.length-1,e&&_ke(this.lContainer,n),yke(this.lContainer,n)}create(n,e){let i=P3(this.lContainer,this.templateTNode.tView.ssrId),o=vk(this.hostLView,this.templateTNode,new D9(this.lContainer,e,n),{dehydratedView:i});return this.operationsCounter?.recordCreate(),o}destroy(n){nB(n[qo],n),this.operationsCounter?.recordDestroy()}updateValue(n,e){this.getLView(n)[jl].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n(nI(!0),X9(n[Js],i,Goe()));function Mi(t,n,e){let i=So(),o=i[qo],r=t+ga,a=o.firstCreatePass?pG(r,i,8,"ng-container",sG,c3(),n,e):o.data[r];if(aG(a,i,t,"ng-container",bke),XS(a)){let p=i[qo];rB(p,i,a),H9(p,a,i)}return e!=null&&yk(i,a),Mi}function Ri(){let t=_a(),n=lc(),e=lG(n);return t.firstCreatePass&&hG(t,e),Ri}function Oi(t,n,e){return Mi(t,n,e),Ri(),Oi}var bke=(t,n,e,i,o)=>(nI(!0),vse(n[Js],""));function Bt(){return So()}function Bo(t,n,e){let i=So(),o=q_();if(Pd(i,o,n)){let r=_a(),a=iI();Fse(a,i,t,n,i[Js],e)}return Bo}var b3=void 0;function xke(t){let n=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&e===0?1:5}var Cke=["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"]],b3,[["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"]],b3,[["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}",b3,"{1} 'at' {0}",b3],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",xke],rk={};function DG(t,n,e){typeof n!="string"&&(e=n,n=t[Ha.LocaleId]),n=n.toLowerCase().replace(/_/g,"-"),rk[n]=t,e&&(rk[n][Ha.ExtraData]=e)}function Ld(t){let n=wke(t),e=Cre(n);if(e)return e;let i=n.split("-")[0];if(e=Cre(i),e)return e;if(i==="en")return Cke;throw new fn(701,!1)}function kG(t){return Ld(t)[Ha.PluralCase]}function Cre(t){return t in rk||(rk[t]=sc.ng&&sc.ng.common&&sc.ng.common.locales&&sc.ng.common.locales[t]),rk[t]}var Ha=(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})(Ha||{});function wke(t){return t.toLowerCase().replace(/_/g,"-")}var Tk="en-US",Ske="USD",Ike={marker:"element"},Tke={marker:"ICU"},K_=(function(t){return t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT",t})(K_||{}),Eke=Tk;function zae(t){typeof t=="string"&&(Eke=t.toLowerCase().replace(/_/g,"-"))}function Ake(t,n,e){let i=t[Js];switch(e){case Node.COMMENT_NODE:return vse(i,n);case Node.TEXT_NODE:return yse(i,n);case Node.ELEMENT_NODE:return X9(i,n,null)}}var Dke=(t,n,e,i)=>(nI(!0),Ake(t,e,i));function kke(t,n,e,i){let o=t[Js];for(let r=0;r>>K_.SHIFT,D=t[I],P=!1;D===null&&(D=t[I]=Dke(t,I,p,f?Node.COMMENT_NODE:Node.TEXT_NODE),P=ek()),x&&e!==null&&P&&cI(o,e,D,i,!1)}}var G3=/�(\d+):?\d*�/gi;var Mke=/�(\d+)�/,Vae=/^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/,sk="\uFFFD",Rke=/�\/?\*(\d+:\d+)�/gi,Oke=/�(\/?[#*]\d+):?\d*�/gi,Pke=/\uE500/g;function Lke(t){return t.replace(Pke," ")}function Fke(t,n,e,i,o,r){let a=eI(),p=[],f=[],x=[[]],I=[[]];o=Bke(o,r);let D=Lke(o).split(Oke);for(let P=0;P`}}let j=[];I.push(j),p=Vke(j,n,f,e,i,o,r.cases[D],P.join(""),R)|p}p&&jke(i,p,a),t.push({kind:3,index:a,cases:I,currentCaseLViewIndex:f.currentCaseLViewIndex})}function zke(t){let n=[],e=[],i=1,o=0;t=t.replace(Vae,function(a,p,f){return f==="select"?i=0:i=1,o=parseInt(p.slice(1),10),""});let r=P9(t);for(let a=0;ae.length&&e.push(f)}return{type:i,mainBinding:o,cases:n,values:e}}function P9(t){if(!t)return[];let n=0,e=[],i=[],o=/[{}]/g;o.lastIndex=0;let r;for(;r=o.exec(t);){let p=r.index;if(r[0]=="}"){if(e.pop(),e.length==0){let f=t.substring(n,p);Vae.test(f)?i.push(zke(f)):i.push(f),n=p+1}}else{if(e.length==0){let f=t.substring(n,p);i.push(f),n=p+1}e.push("{")}}let a=t.substring(n);return i.push(a),i}function Vke(t,n,e,i,o,r,a,p,f){let x=[],I=[],D=[];e.cases.push(a),e.create.push(x),e.remove.push(I),e.update.push(D);let R=lse(K3()).getInertBodyElement(p),j=c9(R)||R;return j?Gae(t,n,e,i,o,x,I,D,j,r,f,0):0}function Gae(t,n,e,i,o,r,a,p,f,x,I,D){let P=0,R=f.firstChild;for(;R;){let j=_k(n,i,1,null);switch(R.nodeType){case Node.ELEMENT_NODE:let $=R,W=$.tagName.toLowerCase();if(a9.hasOwnProperty(W)){jj(r,Ike,W,x,j),n.data[j]=W;let Re=$.attributes;for(let fe=0;fe>17&32767}function Wke(t){return(t&2)==2}function Kke(t,n){return t&131071|n<<17}function L9(t){return t|2}function fI(t){return(t&131068)>>2}function Gj(t,n){return t&-131069|n<<2}function Zke(t){return(t&1)===1}function F9(t){return t|1}function Yke(t,n,e,i,o,r){let a=r?n.classBindings:n.styleBindings,p=t1(a),f=fI(a);t[i]=e;let x=!1,I;if(Array.isArray(e)){let D=e;I=D[1],(I===null||WS(D,I)>0)&&(x=!0)}else I=e;if(o)if(f!==0){let P=t1(t[p+1]);t[i+1]=x3(P,p),P!==0&&(t[P+1]=Gj(t[P+1],i)),t[p+1]=Kke(t[p+1],i)}else t[i+1]=x3(p,0),p!==0&&(t[p+1]=Gj(t[p+1],i)),p=i;else t[i+1]=x3(f,0),p===0?p=i:t[f+1]=Gj(t[f+1],i),f=i;x&&(t[i+1]=L9(t[i+1])),Ire(t,I,i,!0),Ire(t,I,i,!1),Qke(n,I,t,i,r),a=x3(p,f),r?n.classBindings=a:n.styleBindings=a}function Qke(t,n,e,i,o){let r=o?t.residualClasses:t.residualStyles;r!=null&&typeof n=="string"&&WS(r,n)>=0&&(e[i+1]=F9(e[i+1]))}function Ire(t,n,e,i){let o=t[e+1],r=n===null,a=i?t1(o):fI(o),p=!1;for(;a!==0&&(p===!1||r);){let f=t[a],x=t[a+1];Xke(f,n)&&(p=!0,t[a+1]=i?F9(x):L9(x)),a=i?t1(x):fI(x)}p&&(t[e+1]=i?L9(o):F9(o))}function Xke(t,n){return t===null||n==null||(Array.isArray(t)?t[1]:t)===n?!0:Array.isArray(t)&&typeof n=="string"?WS(t,n)>=0:!1}var Sc={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Kae(t){return t.substring(Sc.key,Sc.keyEnd)}function Jke(t){return t.substring(Sc.value,Sc.valueEnd)}function eMe(t){return Qae(t),Zae(t,gI(t,0,Sc.textEnd))}function Zae(t,n){let e=Sc.textEnd;return e===n?-1:(n=Sc.keyEnd=iMe(t,Sc.key=n,e),gI(t,n,e))}function tMe(t){return Qae(t),Yae(t,gI(t,0,Sc.textEnd))}function Yae(t,n){let e=Sc.textEnd,i=Sc.key=gI(t,n,e);return e===i?-1:(i=Sc.keyEnd=nMe(t,i,e),i=Tre(t,i,e,58),i=Sc.value=gI(t,i,e),i=Sc.valueEnd=oMe(t,i,e),Tre(t,i,e,59))}function Qae(t){Sc.key=0,Sc.keyEnd=0,Sc.value=0,Sc.valueEnd=0,Sc.textEnd=t.length}function gI(t,n,e){for(;n32;)n++;return n}function nMe(t,n,e){let i;for(;n=65&&(i&-33)<=90||i>=48&&i<=57);)n++;return n}function Tre(t,n,e,i){return n=gI(t,n,e),n32&&(p=a),r=o,o=i,i=f&-33}return p}function Ere(t,n,e,i){let o=-1,r=e;for(;r=0;e=Yae(n,e))ile(t,Kae(n),Jke(n))}function Ge(t){Jae(pMe,sMe,t,!0)}function sMe(t,n){for(let e=eMe(n);e>=0;e=Zae(n,e))q2(t,Kae(n),!0)}function Xae(t,n,e,i){let o=So(),r=_a(),a=d3(2);if(r.firstUpdatePass&&tle(r,t,a,i),n!==Cu&&Pd(o,a,n)){let p=r.data[Yf()];nle(r,p,o,o[Js],t,o[a+1]=mMe(n,e),i,a)}}function Jae(t,n,e,i){let o=_a(),r=d3(2);o.firstUpdatePass&&tle(o,null,r,i);let a=So();if(e!==Cu&&Pd(a,r,e)){let p=o.data[Yf()];if(ole(p,i)&&!ele(o,r)){let f=i?p.classesWithoutHost:p.stylesWithoutHost;f!==null&&(e=e3(f,e||"")),O9(o,p,a,e,i)}else hMe(o,p,a,a[Js],a[r+1],a[r+1]=uMe(t,n,e),i,r)}}function ele(t,n){return n>=t.expandoStartIndex}function tle(t,n,e,i){let o=t.data;if(o[e+1]===null){let r=o[Yf()],a=ele(t,e);ole(r,i)&&n===null&&!a&&(n=!1),n=aMe(o,r,n,i),Yke(o,r,n,e,a,i)}}function aMe(t,n,e,i){let o=zoe(t),r=i?n.residualClasses:n.residualStyles;if(o===null)(i?n.classBindings:n.styleBindings)===0&&(e=$j(null,t,n,e,i),e=hk(e,n.attrs,i),r=null);else{let a=n.directiveStylingLast;if(a===-1||t[a]!==o)if(e=$j(o,t,n,e,i),r===null){let f=lMe(t,n,i);f!==void 0&&Array.isArray(f)&&(f=$j(null,t,n,f[1],i),f=hk(f,n.attrs,i),cMe(t,n,i,f))}else r=dMe(t,n,i)}return r!==void 0&&(i?n.residualClasses=r:n.residualStyles=r),e}function lMe(t,n,e){let i=e?n.classBindings:n.styleBindings;if(fI(i)!==0)return t[t1(i)]}function cMe(t,n,e,i){let o=e?n.classBindings:n.styleBindings;t[t1(o)]=i}function dMe(t,n,e){let i,o=n.directiveEnd;for(let r=1+n.directiveStylingLast;r0;){let f=t[o],x=Array.isArray(f),I=x?f[1]:f,D=I===null,P=e[o+1];P===Cu&&(P=D?hd:void 0);let R=D?o3(P,i):I===i?P:void 0;if(x&&!$3(R)&&(R=o3(f,i)),$3(R)&&(p=R,a))return p;let j=t[o+1];o=a?t1(j):fI(j)}if(n!==null){let f=r?n.residualClasses:n.residualStyles;f!=null&&(p=o3(f,i))}return p}function $3(t){return t!==void 0}function mMe(t,n){return t==null||t===""||(typeof n=="string"?t=t+n:typeof t=="object"&&(t=V_(Ju(t)))),t}function ole(t,n){return(t.flags&(n?8:16))!==0}function Ce(t,n=""){let e=So(),i=_a(),o=t+ga,r=i.firstCreatePass?xI(i,o,1,n,null):i.data[o],a=fMe(i,e,r,n,t);e[o]=a,ek()&&oG(i,e,a,r),$_(r,!1)}var fMe=(t,n,e,i,o)=>(nI(!0),yse(n[Js],i));function rle(t,n,e,i=""){return Pd(t,q_(),e)?n+Yy(e)+i:Cu}function gMe(t,n,e,i,o,r=""){let a=Poe(),p=uI(t,a,e,o);return d3(2),p?n+Yy(e)+i+Yy(o)+r:Cu}function Di(t){return qn("",t),Di}function qn(t,n,e){let i=So(),o=rle(i,t,n,e);return o!==Cu&&sle(i,Yf(),o),qn}function td(t,n,e,i,o){let r=So(),a=gMe(r,t,n,e,i,o);return a!==Cu&&sle(r,Yf(),a),td}function sle(t,n,e){let i=mj(n,t);XAe(t[Js],i,e)}function Cm(t,n,e){Oj(n)&&(n=n());let i=So(),o=q_();if(Pd(i,o,n)){let r=_a(),a=iI();Lse(a,i,t,n,i[Js],e)}return Cm}function ng(t,n){let e=Oj(t);return e&&t.set(n),e}function wm(t,n){let e=So(),i=_a(),o=lc();return Wae(i,e,e[Js],o,t,n),wm}function MG(t,n,e=""){return rle(So(),t,n,e)}function _Me(t,n,e){let i=_a();if(i.firstCreatePass){let o=_m(t);N9(e,i.data,i.blueprint,o,!0),N9(n,i.data,i.blueprint,o,!1)}}function N9(t,n,e,i,o){if(t=Cc(t),Array.isArray(t))for(let r=0;r>20;if(Hx(t)||!t.multi){let R=new e1(x,o,rt,null),j=Wj(f,n,o?I:I+P,D);j===-1?(Zj(O3(p,a),r,f),qj(r,t,n.length),n.push(f),p.directiveStart++,p.directiveEnd++,o&&(p.providerIndexes+=1048576),e.push(R),a.push(R)):(e[j]=R,a[j]=R)}else{let R=Wj(f,n,I+P,D),j=Wj(f,n,I,I+P),$=R>=0&&e[R],W=j>=0&&e[j];if(o&&!W||!o&&!$){Zj(O3(p,a),r,f);let Q=bMe(o?vMe:yMe,e.length,o,i,x,t);!o&&W&&(e[j].providerFactory=Q),qj(r,t,n.length,0),n.push(f),p.directiveStart++,p.directiveEnd++,o&&(p.providerIndexes+=1048576),e.push(Q),a.push(Q)}else{let Q=ale(e[o?j:R],x,!o&&i);qj(r,t,R>-1?R:j,Q)}!o&&i&&W&&e[j].componentProviders++}}}function qj(t,n,e,i){let o=Hx(n),r=woe(n);if(o||r){let f=(r?Cc(n.useClass):n).prototype.ngOnDestroy;if(f){let x=t.destroyHooks||(t.destroyHooks=[]);if(!o&&n.multi){let I=x.indexOf(e);I===-1?x.push(e,[i,f]):x[I+1].push(i,f)}else x.push(e,f)}}}function ale(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function Wj(t,n,e,i){for(let o=e;o{e.providersResolver=(i,o)=>_Me(i,o?o(t):t,n)}}function Is(t,n,e){let i=Xu()+t,o=So();return o[i]===Cu?tg(o,i,e?n.call(e):n()):wk(o,i)}function rn(t,n,e,i){return lle(So(),Xu(),t,n,e,i)}function kr(t,n,e,i,o){return cle(So(),Xu(),t,n,e,i,o)}function Th(t,n,e,i,o,r){return dle(So(),Xu(),t,n,e,i,o,r)}function bB(t,n,e,i,o,r,a){return xMe(So(),Xu(),t,n,e,i,o,r,a)}function n1(t,n,e,i,o,r,a,p){let f=Xu()+t,x=So(),I=pI(x,f,e,i,o,r);return Pd(x,f+4,a)||I?tg(x,f+5,p?n.call(p,e,i,o,r,a):n(e,i,o,r,a)):wk(x,f+5)}function TI(t,n,e,i,o,r,a,p,f){let x=Xu()+t,I=So(),D=pI(I,x,e,i,o,r);return uI(I,x+4,a,p)||D?tg(I,x+6,f?n.call(f,e,i,o,r,a,p):n(e,i,o,r,a,p)):wk(I,x+6)}function RG(t,n,e,i,o,r,a,p,f,x){let I=Xu()+t,D=So(),P=pI(D,I,e,i,o,r);return cae(D,I+4,a,p,f)||P?tg(D,I+7,x?n.call(x,e,i,o,r,a,p,f):n(e,i,o,r,a,p,f)):wk(D,I+7)}function OG(t,n,e,i,o,r,a,p,f,x,I){let D=Xu()+t,P=So(),R=pI(P,D,e,i,o,r);return pI(P,D+4,a,p,f,x)||R?tg(P,D+8,I?n.call(I,e,i,o,r,a,p,f,x):n(e,i,o,r,a,p,f,x)):wk(P,D+8)}function xB(t,n,e,i){return CMe(So(),Xu(),t,n,e,i)}function Ak(t,n){let e=t[n];return e===Cu?void 0:e}function lle(t,n,e,i,o,r){let a=n+e;return Pd(t,a,o)?tg(t,a+1,r?i.call(r,o):i(o)):Ak(t,a+1)}function cle(t,n,e,i,o,r,a){let p=n+e;return uI(t,p,o,r)?tg(t,p+2,a?i.call(a,o,r):i(o,r)):Ak(t,p+2)}function dle(t,n,e,i,o,r,a,p){let f=n+e;return cae(t,f,o,r,a)?tg(t,f+3,p?i.call(p,o,r,a):i(o,r,a)):Ak(t,f+3)}function xMe(t,n,e,i,o,r,a,p,f){let x=n+e;return pI(t,x,o,r,a,p)?tg(t,x+4,f?i.call(f,o,r,a,p):i(o,r,a,p)):Ak(t,x+4)}function CMe(t,n,e,i,o,r){let a=n+e,p=!1;for(let f=0;f=0;e--){let i=n[e];if(t===i.name)return i}}function Dk(t,n,e){let i=t+ga,o=So(),r=Q2(o,i);return LG(o,i)?lle(o,Xu(),n,r.transform,e,r):r.transform(e)}function Ec(t,n,e,i){let o=t+ga,r=So(),a=Q2(r,o);return LG(r,o)?cle(r,Xu(),n,a.transform,e,i,a):a.transform(e,i)}function PG(t,n,e,i,o){let r=t+ga,a=So(),p=Q2(a,r);return LG(a,r)?dle(a,Xu(),n,p.transform,e,i,o,p):p.transform(e,i,o)}function LG(t,n){return t[qo].data[n].pure}function Hi(t,n){return aB(t,n)}var C3=null;function ule(t){C3!==null&&(t.defaultEncapsulation!==C3.defaultEncapsulation||t.preserveWhitespaces!==C3.preserveWhitespaces)||(C3=t)}var q3=class{ngModuleFactory;componentFactories;constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}},FG=(()=>{class t{compileModuleSync(e){return new dk(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let i=this.compileModuleSync(e),o=oj(e),r=fse(o.declarations).reduce((a,p)=>{let f=qf(p);return f&&a.push(new iv(f)),a},[]);return new q3(i,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ple=new ii("");var SMe=(()=>{class t{zone=re(on);changeDetectionScheduler=re(Ch);applicationRef=re(Tc);applicationErrorHandler=re(xu);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hle({ngZoneFactory:t,ignoreChangesOutsideZone:n,scheduleInRootZone:e}){return t??=()=>new on(gt(ve({},NG()),{scheduleInRootZone:e})),[{provide:on,useFactory:t},{provide:U_,multi:!0,useFactory:()=>{let i=re(SMe,{optional:!0});return()=>i.initialize()}},{provide:U_,multi:!0,useFactory:()=>{let i=re(IMe);return()=>{i.initialize()}}},n===!0?{provide:Pj,useValue:!0}:[],{provide:Lj,useValue:e??Mae},{provide:xu,useFactory:()=>{let i=re(on),o=re(ua),r;return a=>{i.runOutsideAngular(()=>{o.destroyed&&!r?setTimeout(()=>{throw a}):(r??=o.get(Yc),r.handleError(a))})}}}]}function NG(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var IMe=(()=>{class t{subscription=new Dr;initialized=!1;zone=re(on);pendingTasks=re(Xf);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(()=>{on.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{on.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var mle=(()=>{class t{applicationErrorHandler=re(xu);appRef=re(Tc);taskService=re(Xf);ngZone=re(on);zonelessEnabled=re(tk);tracing=re(rv,{optional:!0});disableScheduling=re(Pj,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Dr;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(U3):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(re(Lj,{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 uk||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let i=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,i=!0;break}case 12:{this.appRef.dirtyFlags|=16,i=!0;break}case 13:{this.appRef.dirtyFlags|=2,i=!0;break}case 11:{i=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let o=this.useMicrotaskScheduler?_re:Rae;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(U3+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(e),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,_re(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function TMe(){return typeof $localize<"u"&&$localize.locale||Tk}var tp=new ii("",{providedIn:"root",factory:()=>re(tp,{optional:!0,skipSelf:!0})||TMe()}),BG=new ii("",{providedIn:"root",factory:()=>Ske});var kk=class{destroyed=!1;listeners=null;errorHandler=re(Yc,{optional:!0});destroyRef=re(bu);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(n){if(this.destroyed)throw new fn(953,!1);return(this.listeners??=[]).push(n),{unsubscribe:()=>{let e=this.listeners?.indexOf(n);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(n){if(this.destroyed){console.warn($f(953,!1));return}if(this.listeners===null)return;let e=hr(null);try{for(let i of this.listeners)try{i(n)}catch(o){this.errorHandler?.handleError(o)}}finally{hr(e)}}};function pl(t){return noe(t)}function Do(t,n){return O2(t,n?.equal)}var zG=class{[rc];constructor(n){this[rc]=n}destroy(){this[rc].destroy()}};function Gl(t,n){let e=n?.injector??re(Zn),i=n?.manualCleanup!==!0?e.get(bu):null,o,r=e.get(Qx,null,{optional:!0}),a=e.get(Ch);return r!==null?(o=DMe(r.view,a,t),i instanceof j2&&i._lView===r.view&&(i=null)):o=kMe(t,e.get(ik),a),o.injector=e,i!==null&&(o.onDestroyFn=i.onDestroy(()=>o.destroy())),new zG(o)}var fle=gt(ve({},ooe),{cleanupFns:void 0,zone:null,onDestroyFn:Xx,run(){let t=tI(!1);try{roe(this)}finally{tI(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=hr(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],hr(t)}}}),EMe=gt(ve({},fle),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){$y(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),AMe=gt(ve({},fle),{consumerMarkedDirty(){this.view[cr]|=8192,Jy(this.view),this.notifier.notify(13)},destroy(){$y(this),this.onDestroyFn(),this.cleanup(),this.view[j_]?.delete(this)}});function DMe(t,n,e){let i=Object.create(AMe);return i.view=t,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=n,i.fn=gle(i,e),t[j_]??=new Set,t[j_].add(i),i.consumerMarkedDirty(i),i}function kMe(t,n,e){let i=Object.create(EMe);return i.fn=gle(i,t),i.scheduler=n,i.notifier=e,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function gle(t,n){return()=>{n(e=>(t.cleanupFns??=[]).push(e))}}var SB=Symbol("InputSignalNode#UNSET"),Ale=gt(ve({},P2),{transformFn:void 0,applyValueToInputSignal(t,n){Lx(t,n)}});function Dle(t,n){let e=Object.create(Ale);e.value=t,e.transformFn=n?.transform;function i(){if(jy(e),e.value===SB){let o=null;throw new fn(-950,o)}return e.value}return i[rc]=e,i}var og=class{attributeName;constructor(n){this.attributeName=n}__NG_ELEMENT_ID__=()=>mk(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},FMe=new ii("");FMe.__NG_ELEMENT_ID__=t=>{let n=lc();if(n===null)throw new fn(204,!1);if(n.type&2)return n.value;if(t&8)return null;throw new fn(204,!1)};function kle(t){return new kk}function _le(t,n){return Dle(t,n)}function NMe(t){return Dle(SB,t)}var Wn=(_le.required=NMe,_le);function yle(t,n){return _G(n)}function BMe(t,n){return yG(n)}var Rk=(yle.required=BMe,yle);function vle(t,n){return _G(n)}function zMe(t,n){return yG(n)}var YG=(vle.required=zMe,vle);function Mle(t,n){let e=Object.create(Ale),i=new kk;e.value=t;function o(){return jy(e),ble(e.value),e.value}return o[rc]=e,o.asReadonly=f3.bind(o),o.set=r=>{e.equal(e.value,r)||(Lx(e,r),i.emit(r))},o.update=r=>{ble(e.value),o.set(r(e.value))},o.subscribe=i.subscribe.bind(i),o.destroyRef=i.destroyRef,o}function ble(t){if(t===SB)throw new fn(952,!1)}function xle(t,n){return Mle(t,n)}function VMe(t){return Mle(SB,t)}var IB=(xle.required=VMe,xle);function UMe(t,n,e){let i=new dk(e);return Promise.resolve(i)}function Cle(t){for(let n=t.length-1;n>=0;n--)if(t[n]!==void 0)return t[n]}var CB=new ii(""),HMe=new ii("");function Mk(t){return!t.moduleRef}function jMe(t){let n=Mk(t)?t.r3Injector:t.moduleRef.injector,e=n.get(on);return e.run(()=>{Mk(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let i=n.get(xu),o;if(e.runOutsideAngular(()=>{o=e.onError.subscribe({next:i})}),Mk(t)){let r=()=>n.destroy(),a=t.platformInjector.get(CB);a.add(r),n.onDestroy(()=>{o.unsubscribe(),a.delete(r)})}else{let r=()=>t.moduleRef.destroy(),a=t.platformInjector.get(CB);a.add(r),t.moduleRef.onDestroy(()=>{ok(t.allPlatformModules,t.moduleRef),o.unsubscribe(),a.delete(r)})}return $Me(i,e,()=>{let r=n.get(Xf),a=r.add(),p=n.get(TG);return p.runInitializers(),p.donePromise.then(()=>{let f=n.get(tp,Tk);if(zae(f||Tk),!n.get(HMe,!0))return Mk(t)?n.get(Tc):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Mk(t)){let I=n.get(Tc);return t.rootComponent!==void 0&&I.bootstrap(t.rootComponent),I}else return Rle?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void r.remove(a))})})}var Rle;function wle(){Rle=GMe}function GMe(t,n){let e=t.injector.get(Tc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>e.bootstrap(i));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new fn(-403,!1);n.push(t)}function $Me(t,n,e){try{let i=e();return J_(i)?i.catch(o=>{throw n.runOutsideAngular(()=>t(o)),o}):i}catch(i){throw n.runOutsideAngular(()=>t(i)),i}}var Ole=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,i){let o=i?.scheduleInRootZone,r=()=>Pae(i?.ngZone,gt(ve({},NG({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),a=i?.ignoreChangesOutsideZone,p=[hle({ngZoneFactory:r,ignoreChangesOutsideZone:a}),{provide:Ch,useExisting:mle},qoe],f=Tae(e.moduleType,this.injector,p);return wle(),jMe({moduleRef:f,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,i=[]){let o=EG({},i);return wle(),UMe(this.injector,o,e).then(r=>this.bootstrapModuleFactory(r,o))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new fn(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let e=this._injector.get(CB,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(i){return new(i||t)(ui(Zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),QG=null;function qMe(t){if(JG())throw new fn(400,!1);Fae(),QG=t;let n=t.get(Ole);return ZMe(t),n}function XG(t,n,e=[]){let i=`Platform: ${n}`,o=new ii(i);return(r=[])=>{let a=JG();if(!a){let p=[...e,...r,{provide:o,useValue:!0}];a=t?.(p)??qMe(WMe(p,i))}return KMe(o)}}function WMe(t=[],n){return Zn.create({name:n,providers:[{provide:W2,useValue:"platform"},{provide:CB,useValue:new Set([()=>QG=null])},...t]})}function KMe(t){let n=JG();if(!n)throw new fn(401,!1);return n}function JG(){return QG?.get(Ole)??null}function ZMe(t){let n=t.get(Z3,null);Qc(t,()=>{n?.forEach(e=>e())})}var Ho=(()=>{class t{static __NG_ELEMENT_ID__=YMe}return t})();function YMe(t){return QMe(lc(),So(),(t&16)===16)}function QMe(t,n,e){if(G_(t)&&!e){let i=Ih(t.index,n);return new tv(i,i)}else if(t.type&175){let i=n[Od];return new tv(i,n)}return null}var UG=class{constructor(){}supports(n){return mG(n)}create(n){return new HG(n)}},XMe=(t,n)=>n,HG=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(n){this._trackByFn=n||XMe}forEachItem(n){let e;for(e=this._itHead;e!==null;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,o=0,r=null;for(;e||i;){let a=!i||e&&e.currentIndex{a=this._trackByFn(o,p),e===null||!Object.is(e.trackById,a)?(e=this._mismatch(e,p,a,o),i=!0):(i&&(e=this._verifyReinsertion(e,p,a,o)),Object.is(e.item,p)||this._addIdentityChange(e,p)),e=e._next,o++}),this.length=o;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;n!==null;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;n!==null;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,o){let r;return n===null?r=this._itTail:(r=n._prev,this._remove(n)),n=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,r,o)):(n=this._linkedRecords===null?null:this._linkedRecords.get(i,o),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,r,o)):n=this._addAfter(new jG(e,i),r,o)),n}_verifyReinsertion(n,e,i,o){let r=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return r!==null?n=this._reinsertAfter(r,n._prev,o):n.currentIndex!=o&&(n.currentIndex=o,this._addToMoves(n,o)),n}_truncate(n){for(;n!==null;){let e=n._next;this._addToRemovals(this._unlink(n)),n=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(n);let o=n._prevRemoved,r=n._nextRemoved;return o===null?this._removalsHead=r:o._nextRemoved=r,r===null?this._removalsTail=o:r._prevRemoved=o,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail===null?this._additionsTail=this._additionsHead=n:this._additionsTail=this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){let o=e===null?this._itHead:e._next;return n._next=o,n._prev=e,o===null?this._itTail=n:o._prev=n,e===null?this._itHead=n:e._next=n,this._linkedRecords===null&&(this._linkedRecords=new wB),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){this._linkedRecords!==null&&this._linkedRecords.remove(n);let e=n._prev,i=n._next;return e===null?this._itHead=i:e._next=i,i===null?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=n:this._movesTail=this._movesTail._nextMoved=n),n}_addToRemovals(n){return this._unlinkedRecords===null&&(this._unlinkedRecords=new wB),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=n:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=n,n}},jG=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(n,e){this.item=n,this.trackById=e}},GG=class{_head=null;_tail=null;add(n){this._head===null?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;i!==null;i=i._nextDup)if((e===null||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){let e=n._prevDup,i=n._nextDup;return e===null?this._head=i:e._nextDup=i,i===null?this._tail=e:i._prevDup=e,this._head===null}},wB=class{map=new Map;put(n){let e=n.trackById,i=this.map.get(e);i||(i=new GG,this.map.set(e,i)),i.add(n)}get(n,e){let i=n,o=this.map.get(i);return o?o.get(n,e):null}remove(n){let e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Sle(t,n,e){let i=t.previousIndex;if(i===null)return i;let o=0;return e&&i{if(e&&e.key===o)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{let r=this._getOrCreateRecordForKey(o,i);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;i!==null;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){let i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){let o=this._records.get(n);this._maybeAddToChanges(o,e);let r=o._prev,a=o._next;return r&&(r._next=a),a&&(a._prev=r),o._next=null,o._prev=null,o}let i=new WG(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;n!==null;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;n!=null;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){this._additionsHead===null?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){this._changesHead===null?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}},WG=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(n){this.key=n}};function Ile(){return new TB([new UG])}var TB=(()=>{class t{factories;static \u0275prov=ct({token:t,providedIn:"root",factory:Ile});constructor(e){this.factories=e}static create(e,i){if(i!=null){let o=i.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let i=re(t,{optional:!0,skipSelf:!0});return t.create(e,i||Ile())}}}find(e){let i=this.factories.find(o=>o.supports(e));if(i!=null)return i;throw new fn(901,!1)}}return t})();function Tle(){return new e$([new $G])}var e$=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:Tle});factories;constructor(e){this.factories=e}static create(e,i){if(i){let o=i.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let i=re(t,{optional:!0,skipSelf:!0});return t.create(e,i||Tle())}}}find(e){let i=this.factories.find(o=>o.supports(e));if(i)return i;throw new fn(901,!1)}}return t})();var Ple=XG(null,"core",[]),Lle=(()=>{class t{constructor(e){}static \u0275fac=function(i){return new(i||t)(ui(Tc))};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();function lt(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function wn(t,n=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):n}var VG=Symbol("NOT_SET"),Fle=new Set,JMe=gt(ve({},P2),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:VG,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(jy(x),x.value),x.signal[rc]=x,x.registerCleanupFn=I=>(x.cleanup??=new Set).add(I),this.nodes[p]=x,this.hooks[p]=I=>x.phaseFn(I)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let n of this.nodes)if(n)try{for(let e of n.cleanup??Fle)e()}finally{$y(n)}}};function Nle(t,n){let e=n?.injector??re(Zn),i=e.get(Ch),o=e.get(pB),r=e.get(rv,null,{optional:!0});o.impl??=e.get(wG);let a=t;typeof a=="function"&&(a={mixedReadWrite:t});let p=e.get(Qx,null,{optional:!0}),f=new KG(o.impl,[a.earlyRead,a.write,a.mixedReadWrite,a.read],p?.view,i,e,r?.snapshot(null));return o.impl.register(f),f}function EI(t,n){let e=qf(t),i=n.elementInjector||KS();return new iv(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector,n.directives,n.bindings)}function Ble(t){let n=qf(t);if(!n)return null;let e=new iv(n);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}var Ule=null;function ip(){return Ule}function t$(t){Ule??=t}var Ok=class{},Pk=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(Hle),providedIn:"platform"})}return t})(),i$=new ii(""),Hle=(()=>{class t extends Pk{_location;_history;_doc=re(zn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ip().getBaseHref(this._doc)}onPopState(e){let i=ip().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=ip().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,o){this._history.pushState(e,i,o)}replaceState(e,i,o){this._history.replaceState(e,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function EB(t,n){return t?n?t.endsWith("/")?n.startsWith("/")?t+n.slice(1):t+n:n.startsWith("/")?t+n:`${t}/${n}`:t:n}function zle(t){let n=t.search(/#|\?|$/);return t[n-1]==="/"?t.slice(0,n-1)+t.slice(n):t}function Sm(t){return t&&t[0]!=="?"?`?${t}`:t}var Im=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(DB),providedIn:"root"})}return t})(),AB=new ii(""),DB=(()=>{class t extends Im{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??re(zn).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 EB(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+Sm(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${i}${o}`:i}pushState(e,i,o,r){let a=this.prepareExternalUrl(o+Sm(r));this._platformLocation.pushState(e,i,a)}replaceState(e,i,o,r){let a=this.prepareExternalUrl(o+Sm(r));this._platformLocation.replaceState(e,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||t)(ui(Pk),ui(AB,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),np=(()=>{class t{_subject=new xi;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._basePath=iRe(zle(Vle(i))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Sm(i))}normalize(e){return t.stripTrailingSlash(tRe(this._basePath,Vle(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",o=null){this._locationStrategy.pushState(o,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Sm(i)),o)}replaceState(e,i="",o=null){this._locationStrategy.replaceState(o,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Sm(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(o=>o(e,i))}subscribe(e,i,o){return this._subject.subscribe({next:e,error:i??void 0,complete:o??void 0})}static normalizeQueryParams=Sm;static joinWithSlash=EB;static stripTrailingSlash=zle;static \u0275fac=function(i){return new(i||t)(ui(Im))};static \u0275prov=ct({token:t,factory:()=>eRe(),providedIn:"root"})}return t})();function eRe(){return new np(ui(Im))}function tRe(t,n){if(!t||!n.startsWith(t))return n;let e=n.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:n}function Vle(t){return t.replace(/\/index.html$/,"")}function iRe(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var u$=(()=>{class t extends Im{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,i){super(),this._platformLocation=e,i!=null&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(e){let i=EB(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,o,r){let a=this.prepareExternalUrl(o+Sm(r))||this._platformLocation.pathname;this._platformLocation.pushState(e,i,a)}replaceState(e,i,o,r){let a=this.prepareExternalUrl(o+Sm(r))||this._platformLocation.pathname;this._platformLocation.replaceState(e,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(i){return new(i||t)(ui(Pk),ui(AB,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Yle={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]},zk=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(zk||{}),o1=(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})(o1||{}),Fd=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(Fd||{}),ya=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(ya||{}),op=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(op||{}),$l={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 Qle(t){return Ld(t)[Ha.LocaleId]}function Xle(t,n,e){let i=Ld(t),o=[i[Ha.DayPeriodsFormat],i[Ha.DayPeriodsStandalone]],r=Eh(o,n);return Eh(r,e)}function Jle(t,n,e){let i=Ld(t),o=[i[Ha.DaysFormat],i[Ha.DaysStandalone]],r=Eh(o,n);return Eh(r,e)}function ece(t,n,e){let i=Ld(t),o=[i[Ha.MonthsFormat],i[Ha.MonthsStandalone]],r=Eh(o,n);return Eh(r,e)}function tce(t,n){let i=Ld(t)[Ha.Eras];return Eh(i,n)}function Lk(t,n){let e=Ld(t);return Eh(e[Ha.DateFormat],n)}function Fk(t,n){let e=Ld(t);return Eh(e[Ha.TimeFormat],n)}function Nk(t,n){let i=Ld(t)[Ha.DateTimeFormat];return Eh(i,n)}function zp(t,n){let e=Ld(t),i=e[Ha.NumberSymbols][n];if(typeof i>"u"){if(n===$l.CurrencyDecimal)return e[Ha.NumberSymbols][$l.Decimal];if(n===$l.CurrencyGroup)return e[Ha.NumberSymbols][$l.Group]}return i}function zB(t,n){return Ld(t)[Ha.NumberFormats][n]}function nRe(t){return Ld(t)[Ha.Currencies]}var ice=kG;function nce(t){if(!t[Ha.ExtraData])throw new fn(2303,!1)}function oce(t){let n=Ld(t);return nce(n),(n[Ha.ExtraData][2]||[]).map(i=>typeof i=="string"?n$(i):[n$(i[0]),n$(i[1])])}function rce(t,n,e){let i=Ld(t);nce(i);let o=[i[Ha.ExtraData][0],i[Ha.ExtraData][1]],r=Eh(o,n)||[];return Eh(r,e)||[]}function Eh(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new fn(2304,!1)}function n$(t){let[n,e]=t.split(":");return{hours:+n,minutes:+e}}function sce(t,n,e="en"){let i=nRe(e)[t]||Yle[t]||[],o=i[1];return n==="narrow"&&typeof o=="string"?o:i[0]||t}var oRe=2;function ace(t){let n,e=Yle[t];return e&&(n=e[2]),typeof n=="number"?n:oRe}var rRe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,kB={},sRe=/((?:[^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 lce(t,n,e,i){let o=fRe(t);n=e0(e,n)||n;let a=[],p;for(;n;)if(p=sRe.exec(n),p){a=a.concat(p.slice(1));let I=a.pop();if(!I)break;n=I}else{a.push(n);break}let f=o.getTimezoneOffset();i&&(f=dce(i,f),o=mRe(o,i));let x="";return a.forEach(I=>{let D=pRe(I);x+=D?D(o,e,f):I==="''"?"'":I.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),x}function LB(t,n,e){let i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function e0(t,n){let e=Qle(t);if(kB[e]??={},kB[e][n])return kB[e][n];let i="";switch(n){case"shortDate":i=Lk(t,op.Short);break;case"mediumDate":i=Lk(t,op.Medium);break;case"longDate":i=Lk(t,op.Long);break;case"fullDate":i=Lk(t,op.Full);break;case"shortTime":i=Fk(t,op.Short);break;case"mediumTime":i=Fk(t,op.Medium);break;case"longTime":i=Fk(t,op.Long);break;case"fullTime":i=Fk(t,op.Full);break;case"short":let o=e0(t,"shortTime"),r=e0(t,"shortDate");i=MB(Nk(t,op.Short),[o,r]);break;case"medium":let a=e0(t,"mediumTime"),p=e0(t,"mediumDate");i=MB(Nk(t,op.Medium),[a,p]);break;case"long":let f=e0(t,"longTime"),x=e0(t,"longDate");i=MB(Nk(t,op.Long),[f,x]);break;case"full":let I=e0(t,"fullTime"),D=e0(t,"fullDate");i=MB(Nk(t,op.Full),[I,D]);break}return i&&(kB[e][n]=i),i}function MB(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return n!=null&&i in n?n[i]:e})),t}function Tm(t,n,e="-",i,o){let r="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,r=e));let a=String(t);for(;a.length0||p>-e)&&(p+=e),t===3)p===0&&e===-12&&(p=12);else if(t===6)return aRe(p,n);let f=zp(a,$l.MinusSign);return Tm(p,n,f,i,o)}}function lRe(t,n){switch(t){case 0:return n.getFullYear();case 1:return n.getMonth();case 2:return n.getDate();case 3:return n.getHours();case 4:return n.getMinutes();case 5:return n.getSeconds();case 6:return n.getMilliseconds();case 7:return n.getDay();default:throw new fn(2301,!1)}}function $a(t,n,e=Fd.Format,i=!1){return function(o,r){return cRe(o,r,t,n,e,i)}}function cRe(t,n,e,i,o,r){switch(e){case 2:return ece(n,o,i)[t.getMonth()];case 1:return Jle(n,o,i)[t.getDay()];case 0:let a=t.getHours(),p=t.getMinutes();if(r){let x=oce(n),I=rce(n,o,i),D=x.findIndex(P=>{if(Array.isArray(P)){let[R,j]=P,$=a>=R.hours&&p>=R.minutes,W=a0?Math.floor(o/60):Math.ceil(o/60);switch(t){case 0:return(o>=0?"+":"")+Tm(a,2,r)+Tm(Math.abs(o%60),2,r);case 1:return"GMT"+(o>=0?"+":"")+Tm(a,1,r);case 2:return"GMT"+(o>=0?"+":"")+Tm(a,2,r)+":"+Tm(Math.abs(o%60),2,r);case 3:return i===0?"Z":(o>=0?"+":"")+Tm(a,2,r)+":"+Tm(Math.abs(o%60),2,r);default:throw new fn(2310,!1)}}}var dRe=0,PB=4;function uRe(t){let n=LB(t,dRe,1).getDay();return LB(t,0,1+(n<=PB?PB:PB+7)-n)}function cce(t){let n=t.getDay(),e=n===0?-3:PB-n;return LB(t.getFullYear(),t.getMonth(),t.getDate()+e)}function o$(t,n=!1){return function(e,i){let o;if(n){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,a=e.getDate();o=1+Math.floor((a+r)/7)}else{let r=cce(e),a=uRe(r.getFullYear()),p=r.getTime()-a.getTime();o=1+Math.round(p/6048e5)}return Tm(o,t,zp(i,$l.MinusSign))}}function OB(t,n=!1){return function(e,i){let r=cce(e).getFullYear();return Tm(r,t,zp(i,$l.MinusSign),n)}}var r$={};function pRe(t){if(r$[t])return r$[t];let n;switch(t){case"G":case"GG":case"GGG":n=$a(3,ya.Abbreviated);break;case"GGGG":n=$a(3,ya.Wide);break;case"GGGGG":n=$a(3,ya.Narrow);break;case"y":n=cc(0,1,0,!1,!0);break;case"yy":n=cc(0,2,0,!0,!0);break;case"yyy":n=cc(0,3,0,!1,!0);break;case"yyyy":n=cc(0,4,0,!1,!0);break;case"Y":n=OB(1);break;case"YY":n=OB(2,!0);break;case"YYY":n=OB(3);break;case"YYYY":n=OB(4);break;case"M":case"L":n=cc(1,1,1);break;case"MM":case"LL":n=cc(1,2,1);break;case"MMM":n=$a(2,ya.Abbreviated);break;case"MMMM":n=$a(2,ya.Wide);break;case"MMMMM":n=$a(2,ya.Narrow);break;case"LLL":n=$a(2,ya.Abbreviated,Fd.Standalone);break;case"LLLL":n=$a(2,ya.Wide,Fd.Standalone);break;case"LLLLL":n=$a(2,ya.Narrow,Fd.Standalone);break;case"w":n=o$(1);break;case"ww":n=o$(2);break;case"W":n=o$(1,!0);break;case"d":n=cc(2,1);break;case"dd":n=cc(2,2);break;case"c":case"cc":n=cc(7,1);break;case"ccc":n=$a(1,ya.Abbreviated,Fd.Standalone);break;case"cccc":n=$a(1,ya.Wide,Fd.Standalone);break;case"ccccc":n=$a(1,ya.Narrow,Fd.Standalone);break;case"cccccc":n=$a(1,ya.Short,Fd.Standalone);break;case"E":case"EE":case"EEE":n=$a(1,ya.Abbreviated);break;case"EEEE":n=$a(1,ya.Wide);break;case"EEEEE":n=$a(1,ya.Narrow);break;case"EEEEEE":n=$a(1,ya.Short);break;case"a":case"aa":case"aaa":n=$a(0,ya.Abbreviated);break;case"aaaa":n=$a(0,ya.Wide);break;case"aaaaa":n=$a(0,ya.Narrow);break;case"b":case"bb":case"bbb":n=$a(0,ya.Abbreviated,Fd.Standalone,!0);break;case"bbbb":n=$a(0,ya.Wide,Fd.Standalone,!0);break;case"bbbbb":n=$a(0,ya.Narrow,Fd.Standalone,!0);break;case"B":case"BB":case"BBB":n=$a(0,ya.Abbreviated,Fd.Format,!0);break;case"BBBB":n=$a(0,ya.Wide,Fd.Format,!0);break;case"BBBBB":n=$a(0,ya.Narrow,Fd.Format,!0);break;case"h":n=cc(3,1,-12);break;case"hh":n=cc(3,2,-12);break;case"H":n=cc(3,1);break;case"HH":n=cc(3,2);break;case"m":n=cc(4,1);break;case"mm":n=cc(4,2);break;case"s":n=cc(5,1);break;case"ss":n=cc(5,2);break;case"S":n=cc(6,1);break;case"SS":n=cc(6,2);break;case"SSS":n=cc(6,3);break;case"Z":case"ZZ":case"ZZZ":n=RB(0);break;case"ZZZZZ":n=RB(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=RB(1);break;case"OOOO":case"ZZZZ":case"zzzz":n=RB(2);break;default:return null}return r$[t]=n,n}function dce(t,n){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function hRe(t,n){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function mRe(t,n,e){let o=t.getTimezoneOffset(),r=dce(n,o);return hRe(t,-1*(r-o))}function fRe(t){if(jle(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,r=1,a=1]=t.split("-").map(p=>+p);return LB(o,r-1,a)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(rRe))return gRe(i)}let n=new Date(t);if(!jle(n))throw new fn(2311,!1);return n}function gRe(t){let n=new Date(0),e=0,i=0,o=t[8]?n.setUTCFullYear:n.setFullYear,r=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),o.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));let a=Number(t[4]||0)-e,p=Number(t[5]||0)-i,f=Number(t[6]||0),x=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return r.call(n,a,p,f,x),n}function jle(t){return t instanceof Date&&!isNaN(t.valueOf())}var _Re=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Gle=22,FB=".",Bk="0",yRe=";",vRe=",",s$="#",$le="\xA4",bRe="%";function p$(t,n,e,i,o,r,a=!1){let p="",f=!1;if(!isFinite(t))p=zp(e,$l.Infinity);else{let x=CRe(t);a&&(x=xRe(x));let I=n.minInt,D=n.minFrac,P=n.maxFrac;if(r){let se=r.match(_Re);if(se===null)throw new fn(2306,!1);let ge=se[1],Re=se[3],Se=se[5];ge!=null&&(I=a$(ge)),Re!=null&&(D=a$(Re)),Se!=null?P=a$(Se):Re!=null&&D>P&&(P=D)}wRe(x,D,P);let R=x.digits,j=x.integerLen,$=x.exponent,W=[];for(f=R.every(se=>!se);j0?W=R.splice(j,R.length):(W=R,R=[0]);let Q=[];for(R.length>=n.lgSize&&Q.unshift(R.splice(-n.lgSize,R.length).join(""));R.length>n.gSize;)Q.unshift(R.splice(-n.gSize,R.length).join(""));R.length&&Q.unshift(R.join("")),p=Q.join(zp(e,i)),W.length&&(p+=zp(e,o)+W.join("")),$&&(p+=zp(e,$l.Exponential)+"+"+$)}return t<0&&!f?p=n.negPre+p+n.negSuf:p=n.posPre+p+n.posSuf,p}function uce(t,n,e,i,o){let r=zB(n,zk.Currency),a=h$(r,zp(n,$l.MinusSign));return a.minFrac=ace(i),a.maxFrac=a.minFrac,p$(t,a,n,$l.CurrencyGroup,$l.CurrencyDecimal,o).replace($le,e).replace($le,"").trim()}function pce(t,n,e){let i=zB(n,zk.Percent),o=h$(i,zp(n,$l.MinusSign));return p$(t,o,n,$l.Group,$l.Decimal,e,!0).replace(new RegExp(bRe,"g"),zp(n,$l.PercentSign))}function hce(t,n,e){let i=zB(n,zk.Decimal),o=h$(i,zp(n,$l.MinusSign));return p$(t,o,n,$l.Group,$l.Decimal,e)}function h$(t,n="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(yRe),o=i[0],r=i[1],a=o.indexOf(FB)!==-1?o.split(FB):[o.substring(0,o.lastIndexOf(Bk)+1),o.substring(o.lastIndexOf(Bk)+1)],p=a[0],f=a[1]||"";e.posPre=p.substring(0,p.indexOf(s$));for(let I=0;I-1&&(n=n.replace(FB,"")),(r=n.search(/e/i))>0?(o<0&&(o=r),o+=+n.slice(r+1),n=n.substring(0,r)):o<0&&(o=n.length),r=0;n.charAt(r)===Bk;r++);if(r===(p=n.length))i=[0],o=1;else{for(p--;n.charAt(p)===Bk;)p--;for(o-=r,i=[],a=0;r<=p;r++,a++)i[a]=Number(n.charAt(r))}return o>Gle&&(i=i.splice(0,Gle-1),e=o-1,o=1),{digits:i,exponent:e,integerLen:o}}function wRe(t,n,e){if(n>e)throw new fn(2307,!1);let i=t.digits,o=i.length-t.integerLen,r=Math.min(Math.max(n,o),e),a=r+t.integerLen,p=i[a];if(a>0){i.splice(Math.max(t.integerLen,a));for(let D=a;D=5)if(a-1<0){for(let D=0;D>a;D--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[a-1]++;for(;o=x?j.pop():f=!1),P>=10?1:0},0);I&&(i.unshift(I),t.integerLen++)}function a$(t){let n=parseInt(t);if(isNaN(n))throw new fn(2305,!1);return n}var m$=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:function(i){let o=null;return i?o=new i:o=(r=>new mce(r))(ui(tp)),o},providedIn:"root"})}return t})();function SRe(t,n,e,i){let o=`=${t}`;if(n.indexOf(o)>-1||(o=e.getPluralCategory(t,i),n.indexOf(o)>-1))return o;if(n.indexOf("other")>-1)return"other";throw new fn(2308,!1)}var mce=(()=>{class t extends m${locale;constructor(e){super(),this.locale=e}getPluralCategory(e,i){switch(ice(i||this.locale)(e)){case o1.Zero:return"zero";case o1.One:return"one";case o1.Two:return"two";case o1.Few:return"few";case o1.Many:return"many";default:return"other"}}static \u0275fac=function(i){return new(i||t)(ui(tp))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),l$=/\s+/,qle=[],Rs=(()=>{class t{_ngEl;_renderer;initialClasses=qle;rawClass;stateMap=new Map;constructor(e,i){this._ngEl=e,this._renderer=i}set klass(e){this.initialClasses=e!=null?e.trim().split(l$):qle}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(l$):e}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let i of e)this._updateState(i,!0);else if(e!=null)for(let i of Object.keys(e))this._updateState(i,!!e[i]);this._applyStateDiff()}_updateState(e,i){let o=this.stateMap.get(e);o!==void 0?(o.enabled!==i&&(o.changed=!0,o.enabled=i),o.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let i=e[0],o=e[1];o.changed?(this._toggleClass(i,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),o.touched=!1}}_toggleClass(e,i){e=e.trim(),e.length>0&&e.split(l$).forEach(o=>{i?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(i){return new(i||t)(rt(_n),rt(Kr))};static \u0275dir=Ki({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})(),f$=(()=>{class t{_viewContainerRef;ngComponentOutlet=null;ngComponentOutletInputs;ngComponentOutletInjector;ngComponentOutletEnvironmentInjector;ngComponentOutletContent;ngComponentOutletNgModule;ngComponentOutletNgModuleFactory;_componentRef;_moduleRef;_inputsUsed=new Map;get componentInstance(){return this._componentRef?.instance??null}constructor(e){this._viewContainerRef=e}_needToReCreateNgModuleInstance(e){return e.ngComponentOutletNgModule!==void 0||e.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(e){return e.ngComponentOutlet!==void 0||e.ngComponentOutletContent!==void 0||e.ngComponentOutletInjector!==void 0||e.ngComponentOutletEnvironmentInjector!==void 0||this._needToReCreateNgModuleInstance(e)}ngOnChanges(e){if(this._needToReCreateComponentInstance(e)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let i=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(e)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=vG(this.ngComponentOutletNgModule,Wle(i)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(Wle(i)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:i,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent,environmentInjector:this.ngComponentOutletEnvironmentInjector})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let e of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(e,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(e){for(let[i,o]of this._inputsUsed)o?(e.setInput(i,this.ngComponentOutletInputs[i]),this._inputsUsed.set(i,!1)):(e.setInput(i,void 0),this._inputsUsed.delete(i))}static \u0275fac=function(i){return new(i||t)(rt(Ga))};static \u0275dir=Ki({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletEnvironmentInjector:"ngComponentOutletEnvironmentInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},exportAs:["ngComponentOutlet"],features:[In]})}return t})();function Wle(t){return t.get(bm).injector}var NB=class{$implicit;ngForOf;index;count;constructor(n,e,i,o){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Rl=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,i,o){this._viewContainer=e,this._template=i,this._differs=o}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let i=this._viewContainer;e.forEachOperation((o,r,a)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new NB(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(r===null?void 0:r);else if(r!==null){let p=i.get(r);i.move(p,a),Kle(p,o)}});for(let o=0,r=i.length;o{let r=i.get(o.currentIndex);Kle(r,o)})}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||t)(rt(Ga),rt(Ml),rt(TB))};static \u0275dir=Ki({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function Kle(t,n){t.context.$implicit=n.item}var Zr=(()=>{class t{_viewContainer;_context=new BB;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,i){this._viewContainer=e,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Zle(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Zle(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||t)(rt(Ga),rt(Ml))};static \u0275dir=Ki({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),BB=class{$implicit=null;ngIf=null};function Zle(t,n){if(t&&!t.createEmbeddedView)throw new fn(2020,!1)}var fs=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,i,o){this._ngEl=e,this._differs=i,this._renderer=o}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){let[o,r]=e.split("."),a=o.indexOf("-")===-1?void 0:vm.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,r?`${i}${r}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}static \u0275fac=function(i){return new(i||t)(rt(_n),rt(e$),rt(Kr))};static \u0275dir=Ki({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Vo=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,o):!1,get:(e,i,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,o)}})}static \u0275fac=function(i){return new(i||t)(rt(Ga))};static \u0275dir=Ki({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[In]})}return t})();function AI(t,n){return new fn(2100,!1)}var c$=class{createSubscription(n,e,i){return pl(()=>n.subscribe({next:e,error:i}))}dispose(n){pl(()=>n.unsubscribe())}},d$=class{createSubscription(n,e,i){return n.then(o=>e?.(o),o=>i?.(o)),{unsubscribe:()=>{e=null,i=null}}}dispose(n){n.unsubscribe()}},IRe=new d$,TRe=new c$,Vk=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=re(xu);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i),i=>this.applicationErrorHandler(i))}_selectStrategy(e){if(J_(e))return IRe;if(fB(e))return TRe;throw AI(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||t)(rt(Ho,16))};static \u0275pipe=ep({name:"async",type:t,pure:!1})}return t})();var ERe="mediumDate",fce=new ii(""),gce=new ii(""),r1=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,i,o){this.locale=e,this.defaultTimezone=i,this.defaultOptions=o}transform(e,i,o,r){if(e==null||e===""||e!==e)return null;try{let a=i??this.defaultOptions?.dateFormat??ERe,p=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return lce(e,a,r||this.locale,p)}catch(a){throw AI(t,a.message)}}static \u0275fac=function(i){return new(i||t)(rt(tp,16),rt(fce,24),rt(gce,24))};static \u0275pipe=ep({name:"date",type:t,pure:!0})}return t})(),ARe=/#/g,DRe=(()=>{class t{_localization;constructor(e){this._localization=e}transform(e,i,o){if(e==null)return"";if(typeof i!="object"||i===null)throw AI(t,i);let r=SRe(e,Object.keys(i),this._localization,o);return i[r].replace(ARe,e.toString())}static \u0275fac=function(i){return new(i||t)(rt(m$,16))};static \u0275pipe=ep({name:"i18nPlural",type:t,pure:!0})}return t})();var yl=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,i,o){if(!g$(e))return null;o||=this._locale;try{let r=_$(e);return hce(r,o,i)}catch(r){throw AI(t,r.message)}}static \u0275fac=function(i){return new(i||t)(rt(tp,16))};static \u0275pipe=ep({name:"number",type:t,pure:!0})}return t})(),wu=(()=>{class t{_locale;constructor(e){this._locale=e}transform(e,i,o){if(!g$(e))return null;o||=this._locale;try{let r=_$(e);return pce(r,o,i)}catch(r){throw AI(t,r.message)}}static \u0275fac=function(i){return new(i||t)(rt(tp,16))};static \u0275pipe=ep({name:"percent",type:t,pure:!0})}return t})(),Su=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,i="USD"){this._locale=e,this._defaultCurrencyCode=i}transform(e,i=this._defaultCurrencyCode,o="symbol",r,a){if(!g$(e))return null;a||=this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let p=i||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?p=sce(p,o==="symbol"?"wide":"narrow",a):p=o);try{let f=_$(e);return uce(f,a,p,i,r)}catch(f){throw AI(t,f.message)}}static \u0275fac=function(i){return new(i||t)(rt(tp,16),rt(BG,16))};static \u0275pipe=ep({name:"currency",type:t,pure:!0})}return t})();function g$(t){return!(t==null||t===""||t!==t)}function _$(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new fn(2309,!1);return t}var po=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();function Uk(t,n){n=encodeURIComponent(n);for(let e of t.split(";")){let i=e.indexOf("="),[o,r]=i==-1?[e,""]:[e.slice(0,i),e.slice(i+1)];if(o.trim()===n)return decodeURIComponent(r)}return null}var s1=class{};function qAt(t,n,e){return DG(t,n,e)}var v$="browser",RRe="server";function ns(t){return t===v$}function _ce(t){return t===RRe}var yce=(()=>{class t{static \u0275prov=ct({token:t,providedIn:"root",factory:()=>new y$(re(zn),window)})}return t})(),y$=class{document;window;offset=()=>[0,0];constructor(n,e){this.document=n,this.window=e}setOffset(n){Array.isArray(n)?this.offset=()=>n:this.offset=n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n,e){this.window.scrollTo(gt(ve({},e),{left:n[0],top:n[1]}))}scrollToAnchor(n,e){let i=ORe(this.document,n);i&&(this.scrollToElement(i,e),i.focus())}setHistoryScrollRestoration(n){try{this.window.history.scrollRestoration=n}catch{console.warn($f(2400,!1))}}scrollToElement(n,e){let i=n.getBoundingClientRect(),o=i.left+this.window.pageXOffset,r=i.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(gt(ve({},e),{left:o-a[0],top:r-a[1]}))}};function ORe(t,n){let e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=i.currentNode;for(;o;){let r=o.shadowRoot;if(r){let a=r.getElementById(n)||r.querySelector(`[name="${n}"]`);if(a)return a}o=i.nextNode()}}return null}var UB=new ii(""),S$=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,o,r){return this._findPluginFor(i).addEventListener(e,i,o,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(r=>r.supports(e)),!i)throw new fn(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||t)(ui(UB),ui(on))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Hk=class{_doc;constructor(n){this._doc=n}manager},b$="ng-app-id";function vce(t){for(let n of t)n.remove()}function bce(t,n){let e=n.createElement("style");return e.textContent=t,e}function PRe(t,n,e,i){let o=t.head?.querySelectorAll(`style[${b$}="${n}"],link[${b$}="${n}"]`);if(o)for(let r of o)r.removeAttribute(b$),r instanceof HTMLLinkElement?i.set(r.href.slice(r.href.lastIndexOf("/")+1),{usage:0,elements:[r]}):r.textContent&&e.set(r.textContent,{usage:0,elements:[r]})}function C$(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var I$=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,o,r={}){this.doc=e,this.appId=i,this.nonce=o,PRe(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let o of e)this.addUsage(o,this.inline,bce);i?.forEach(o=>this.addUsage(o,this.external,C$))}removeStyles(e,i){for(let o of e)this.removeUsage(o,this.inline);i?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,i,o){let r=i.get(e);r?r.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,o(e,this.doc)))})}removeUsage(e,i){let o=i.get(e);o&&(o.usage--,o.usage<=0&&(vce(o.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])vce(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:o}]of this.inline)o.push(this.addElement(e,bce(i,this.doc)));for(let[i,{elements:o}]of this.external)o.push(this.addElement(e,C$(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||t)(ui(zn),ui(nv),ui(ov,8),ui(Xc))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),x$={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"},T$=/%COMP%/g;var Cce="%COMP%",LRe=`_nghost-${Cce}`,FRe=`_ngcontent-${Cce}`,NRe=!0,BRe=new ii("",{providedIn:"root",factory:()=>NRe});function zRe(t){return FRe.replace(T$,t)}function VRe(t){return LRe.replace(T$,t)}function wce(t,n){return n.map(e=>e.replace(T$,t))}var E$=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,o,r,a,p,f,x=null,I=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=a,this.platformId=p,this.ngZone=f,this.nonce=x,this.tracingService=I,this.platformIsServer=!1,this.defaultRenderer=new jk(e,a,f,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,i);return o instanceof VB?o.applyToHost(e):o instanceof Gk&&o.applyStyles(),o}getOrCreateRenderer(e,i){let o=this.rendererByCompId,r=o.get(i.id);if(!r){let a=this.doc,p=this.ngZone,f=this.eventManager,x=this.sharedStylesHost,I=this.removeStylesOnCompDestroy,D=this.platformIsServer,P=this.tracingService;switch(i.encapsulation){case Y_.Emulated:r=new VB(f,x,i,this.appId,I,a,p,D,P);break;case Y_.ShadowDom:return new w$(f,x,e,i,a,p,this.nonce,D,P);default:r=new Gk(f,x,i,I,a,p,D,P);break}o.set(i.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||t)(ui(S$),ui(I$),ui(nv),ui(BRe),ui(zn),ui(Xc),ui(on),ui(ov),ui(rv,8))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),jk=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,i,o,r){this.eventManager=n,this.doc=e,this.ngZone=i,this.platformIsServer=o,this.tracingService=r}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(x$[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(xce(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(xce(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){e.remove()}selectRootElement(n,e){let i=typeof n=="string"?this.doc.querySelector(n):n;if(!i)throw new fn(-5104,!1);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,o){if(o){e=o+":"+e;let r=x$[o];r?n.setAttributeNS(r,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){let o=x$[i];o?n.removeAttributeNS(o,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,o){o&(vm.DashCase|vm.Important)?n.style.setProperty(e,i,o&vm.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&vm.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n!=null&&(n[e]=i)}setValue(n,e){n.nodeValue=e}listen(n,e,i,o){if(typeof n=="string"&&(n=ip().getGlobalEventTarget(this.doc,n),!n))throw new fn(5102,!1);let r=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(r=this.tracingService.wrapEventListener(n,e,r)),this.eventManager.addEventListener(n,e,r,o)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function xce(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var w$=class extends jk{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,i,o,r,a,p,f,x){super(n,r,a,f,x),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let I=o.styles;I=wce(o.id,I);for(let P of I){let R=document.createElement("style");p&&R.setAttribute("nonce",p),R.textContent=P,this.shadowRoot.appendChild(R)}let D=o.getExternalStyles?.();if(D)for(let P of D){let R=C$(P,r);p&&R.setAttribute("nonce",p),this.shadowRoot.appendChild(R)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Gk=class extends jk{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,i,o,r,a,p,f,x){super(n,r,a,p,f),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let I=i.styles;this.styles=x?wce(x,I):I,this.styleUrls=i.getExternalStyles?.(x)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&iB.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},VB=class extends Gk{contentAttr;hostAttr;constructor(n,e,i,o,r,a,p,f,x){let I=o+"-"+i.id;super(n,e,i,r,a,p,f,x,I),this.contentAttr=zRe(I),this.hostAttr=VRe(I)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}};var HB=class t extends Ok{supportsDOMEvents=!0;static makeCurrent(){t$(new t)}onAndCancel(n,e,i,o){return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=URe();return e==null?null:HRe(e)}resetBaseElement(){$k=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Uk(document.cookie,n)}},$k=null;function URe(){return $k=$k||document.head.querySelector("base"),$k?$k.getAttribute("href"):null}function HRe(t){return new URL(t,document.baseURI).pathname}var jB=class{addToWindow(n){sc.getAngularTestability=(i,o=!0)=>{let r=n.findTestabilityInTree(i,o);if(r==null)throw new fn(5103,!1);return r},sc.getAllAngularTestabilities=()=>n.getAllTestabilities(),sc.getAllAngularRootElements=()=>n.getAllRootElements();let e=i=>{let o=sc.getAllAngularTestabilities(),r=o.length,a=function(){r--,r==0&&i()};o.forEach(p=>{p.whenStable(a)})};sc.frameworkStabilizers||(sc.frameworkStabilizers=[]),sc.frameworkStabilizers.push(e)}findTestabilityInTree(n,e,i){if(e==null)return null;let o=n.getTestability(e);return o??(i?ip().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},jRe=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Ice=(()=>{class t extends Hk{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,o,r){return e.addEventListener(i,o,r),()=>this.removeEventListener(e,i,o,r)}removeEventListener(e,i,o,r){return e.removeEventListener(i,o,r)}static \u0275fac=function(i){return new(i||t)(ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),Sce=["alt","control","meta","shift"],GRe={"\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"},$Re={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Tce=(()=>{class t extends Hk{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,i,o,r){let a=t.parseEventName(i),p=t.eventCallback(a.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ip().onAndCancel(e,a.domEventName,p,r))}static parseEventName(e){let i=e.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let r=t._normalizeKey(i.pop()),a="",p=i.indexOf("code");if(p>-1&&(i.splice(p,1),a="code."),Sce.forEach(x=>{let I=i.indexOf(x);I>-1&&(i.splice(I,1),a+=x+".")}),a+=r,i.length!=0||r.length===0)return null;let f={};return f.domEventName=o,f.fullKey=a,f}static matchEventFullKeyCode(e,i){let o=GRe[e.key]||e.key,r="";return i.indexOf("code.")>-1&&(o=e.code,r="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Sce.forEach(a=>{if(a!==o){let p=$Re[a];p(e)&&(r+=a+".")}}),r+=o,r===i)}static eventCallback(e,i,o){return r=>{t.matchEventFullKeyCode(r,e)&&o.runGuarded(()=>i(r))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||t)(ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function qRe(){HB.makeCurrent()}function WRe(){return new Yc}function KRe(){return U9(document),document}var ZRe=[{provide:Xc,useValue:v$},{provide:Z3,useValue:qRe,multi:!0},{provide:zn,useFactory:KRe}],YRe=XG(Ple,"browser",ZRe);var QRe=[{provide:SI,useClass:jB},{provide:mB,useClass:Sk,deps:[on,Ik,SI]},{provide:Sk,useClass:Sk,deps:[on,Ik,SI]}],XRe=[{provide:W2,useValue:"root"},{provide:Yc,useFactory:WRe},{provide:UB,useClass:Ice,multi:!0,deps:[zn]},{provide:UB,useClass:Tce,multi:!0,deps:[zn]},E$,I$,S$,{provide:dl,useExisting:E$},{provide:s1,useClass:jRe},[]],JRe=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[...XRe,...QRe],imports:[po,Lle]})}return t})();var MI=class{},qk=class{},av=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(n){n?typeof n=="string"?this.lazyInit=()=>{this.headers=new Map,n.split(` `).forEach(e=>{let i=e.indexOf(":");if(i>0){let o=e.slice(0,i),r=e.slice(i+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();let e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){let e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(n.name,e);let o=(n.op==="a"?this.headers.get(e):void 0)||[];o.push(...i),this.headers.set(e,o);break;case"d":let r=n.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(p=>r.indexOf(p)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(n,e){let i=n.toLowerCase();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(n,e){let i=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=n.toLowerCase();this.headers.set(o,i),this.maybeSetNormalizedName(n,o)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}};var $B=class{encodeKey(n){return Ece(n)}encodeValue(n){return Ece(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}};function eOe(t,n){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[a,p]=r==-1?[n.decodeKey(o),""]:[n.decodeKey(o.slice(0,r)),n.decodeValue(o.slice(r+1))],f=e.get(a)||[];f.push(p),e.set(a,f)}),e}var tOe=/%(\d[a-f0-9])/gi,iOe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ece(t){return encodeURIComponent(t).replace(tOe,(n,e)=>iOe[e]??n)}function GB(t){return`${t}`}var Mr=class t{map;encoder;updates=null;cloneFrom=null;constructor(n={}){if(this.encoder=n.encoder||new $B,n.fromString){if(n.fromObject)throw new fn(2805,!1);this.map=eOe(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{let i=n.fromObject[e],o=Array.isArray(i)?i.map(GB):[GB(i)];this.map.set(e,o)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();let e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){let e=[];return Object.keys(n).forEach(i=>{let o=n[i];Array.isArray(o)?o.forEach(r=>{e.push({param:i,value:r,op:"a"})}):e.push({param:i,value:o,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{let e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>n!=="").join("&")}clone(n){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":let e=(n.op==="a"?this.map.get(n.param):void 0)||[];e.push(GB(n.value)),this.map.set(n.param,e);break;case"d":if(n.value!==void 0){let i=this.map.get(n.param)||[],o=i.indexOf(GB(n.value));o!==-1&&i.splice(o,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}else{this.map.delete(n.param);break}}}),this.cloneFrom=this.updates=null)}};var qB=class{map=new Map;set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}};function nOe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ace(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Dce(t){return typeof Blob<"u"&&t instanceof Blob}function kce(t){return typeof FormData<"u"&&t instanceof FormData}function oOe(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Mce="Content-Type",Rce="Accept",Pce="X-Request-URL",Lce="text/plain",Fce="application/json",rOe=`${Fce}, ${Lce}, */*`,DI=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(n,e,i,o){this.url=e,this.method=n.toUpperCase();let r;if(nOe(this.method)||o?(this.body=i!==void 0?i:null,r=o):r=i,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new fn(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new av,this.context??=new qB,!this.params)this.params=new Mr,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let p=e.indexOf("?"),f=p===-1?"?":pSe.set(fe,n.setHeaders[fe]),se)),n.setParams&&(ge=Object.keys(n.setParams).reduce((Se,fe)=>Se.set(fe,n.setParams[fe]),ge)),new t(e,i,$,{params:ge,headers:se,context:Re,reportProgress:Q,responseType:o,withCredentials:W,transferCache:R,keepalive:r,cache:p,priority:a,timeout:j,mode:f,redirect:x,credentials:I,referrer:D,integrity:P})}},Em=(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})(Em||{}),RI=class{headers;status;statusText;url;ok;type;redirected;constructor(n,e=200,i="OK"){this.headers=n.headers||new av,this.status=n.status!==void 0?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.redirected=n.redirected,this.ok=this.status>=200&&this.status<300}},WB=class t extends RI{constructor(n={}){super(n)}type=Em.ResponseHeader;clone(n={}){return new t({headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}},Wk=class t extends RI{body;constructor(n={}){super(n),this.body=n.body!==void 0?n.body:null}type=Em.Response;clone(n={}){return new t({body:n.body!==void 0?n.body:this.body,headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0,redirected:n.redirected??this.redirected})}},kI=class extends RI{name="HttpErrorResponse";message;error;ok=!1;constructor(n){super(n,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${n.url||"(unknown url)"}`:this.message=`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}},sOe=200,aOe=204;function A$(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var va=(()=>{class t{handler;constructor(e){this.handler=e}request(e,i,o={}){let r;if(e instanceof DI)r=e;else{let f;o.headers instanceof av?f=o.headers:f=new av(o.headers);let x;o.params&&(o.params instanceof Mr?x=o.params:x=new Mr({fromObject:o.params})),r=new DI(e,i,o.body!==void 0?o.body:null,{headers:f,context:o.context,params:x,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let a=Ni(r).pipe(Md(f=>this.handler.handle(f)));if(e instanceof DI||o.observe==="events")return a;let p=a.pipe(ro(f=>f instanceof Wk));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return p.pipe(vi(f=>{if(f.body!==null&&!(f.body instanceof ArrayBuffer))throw new fn(2806,!1);return f.body}));case"blob":return p.pipe(vi(f=>{if(f.body!==null&&!(f.body instanceof Blob))throw new fn(2807,!1);return f.body}));case"text":return p.pipe(vi(f=>{if(f.body!==null&&typeof f.body!="string")throw new fn(2808,!1);return f.body}));case"json":default:return p.pipe(vi(f=>f.body))}case"response":return p;default:throw new fn(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new Mr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,o={}){return this.request("PATCH",e,A$(o,i))}post(e,i,o={}){return this.request("POST",e,A$(o,i))}put(e,i,o={}){return this.request("PUT",e,A$(o,i))}static \u0275fac=function(i){return new(i||t)(ui(MI))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var lOe=new ii("");function Nce(t,n){return n(t)}function cOe(t,n){return(e,i)=>n.intercept(e,{handle:o=>t(o,i)})}function dOe(t,n,e){return(i,o)=>Qc(e,()=>n(i,r=>t(r,o)))}var ZB=new ii(""),k$=new ii(""),Bce=new ii(""),M$=new ii("",{providedIn:"root",factory:()=>!0});function uOe(){let t=null;return(n,e)=>{t===null&&(t=(re(ZB,{optional:!0})??[]).reduceRight(cOe,Nce));let i=re(oI);if(re(M$)){let r=i.add();return t(n,e).pipe(Gf(r))}else return t(n,e)}}var KB=(()=>{class t extends MI{backend;injector;chain=null;pendingTasks=re(oI);contributeToStability=re(M$);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(k$),...this.injector.get(Bce,[])]));this.chain=i.reduceRight((o,r)=>dOe(o,r,this.injector),Nce)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Gf(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||t)(ui(qk),ui(ua))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var pOe=/^\)\]\}',?\n/,hOe=RegExp(`^${Pce}:`,"m");function mOe(t){return"responseURL"in t&&t.responseURL?t.responseURL:hOe.test(t.getAllResponseHeaders())?t.getResponseHeader(Pce):null}var D$=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new fn(-2800,!1);let i=this.xhrFactory;return Ni(null).pipe(wo(()=>new Co(r=>{let a=i.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((W,Q)=>a.setRequestHeader(W,Q.join(","))),e.headers.has(Rce)||a.setRequestHeader(Rce,rOe),!e.headers.has(Mce)){let W=e.detectContentTypeHeader();W!==null&&a.setRequestHeader(Mce,W)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let W=e.responseType.toLowerCase();a.responseType=W!=="json"?W:"text"}let p=e.serializeBody(),f=null,x=()=>{if(f!==null)return f;let W=a.statusText||"OK",Q=new av(a.getAllResponseHeaders()),se=mOe(a)||e.url;return f=new WB({headers:Q,status:a.status,statusText:W,url:se}),f},I=()=>{let{headers:W,status:Q,statusText:se,url:ge}=x(),Re=null;Q!==aOe&&(Re=typeof a.response>"u"?a.responseText:a.response),Q===0&&(Q=Re?sOe:0);let Se=Q>=200&&Q<300;if(e.responseType==="json"&&typeof Re=="string"){let fe=Re;Re=Re.replace(pOe,"");try{Re=Re!==""?JSON.parse(Re):null}catch(be){Re=fe,Se&&(Se=!1,Re={error:be,text:Re})}}Se?(r.next(new Wk({body:Re,headers:W,status:Q,statusText:se,url:ge||void 0})),r.complete()):r.error(new kI({error:Re,headers:W,status:Q,statusText:se,url:ge||void 0}))},D=W=>{let{url:Q}=x(),se=new kI({error:W,status:a.status||0,statusText:a.statusText||"Unknown Error",url:Q||void 0});r.error(se)},P=D;e.timeout&&(P=W=>{let{url:Q}=x(),se=new kI({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:Q||void 0});r.error(se)});let R=!1,j=W=>{R||(r.next(x()),R=!0);let Q={type:Em.DownloadProgress,loaded:W.loaded};W.lengthComputable&&(Q.total=W.total),e.responseType==="text"&&a.responseText&&(Q.partialText=a.responseText),r.next(Q)},$=W=>{let Q={type:Em.UploadProgress,loaded:W.loaded};W.lengthComputable&&(Q.total=W.total),r.next(Q)};return a.addEventListener("load",I),a.addEventListener("error",D),a.addEventListener("timeout",P),a.addEventListener("abort",D),e.reportProgress&&(a.addEventListener("progress",j),p!==null&&a.upload&&a.upload.addEventListener("progress",$)),a.send(p),r.next({type:Em.Sent}),()=>{a.removeEventListener("error",D),a.removeEventListener("abort",D),a.removeEventListener("load",I),a.removeEventListener("timeout",P),e.reportProgress&&(a.removeEventListener("progress",j),p!==null&&a.upload&&a.upload.removeEventListener("progress",$)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(i){return new(i||t)(ui(s1))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),zce=new ii(""),fOe="XSRF-TOKEN",gOe=new ii("",{providedIn:"root",factory:()=>fOe}),_Oe="X-XSRF-TOKEN",yOe=new ii("",{providedIn:"root",factory:()=>_Oe}),Kk=class{},vOe=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Uk(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||t)(ui(zn),ui(gOe))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function bOe(t,n){let e=t.url.toLowerCase();if(!re(zce)||t.method==="GET"||t.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return n(t);let i=re(Kk).getToken(),o=re(yOe);return i!=null&&!t.headers.has(o)&&(t=t.clone({headers:t.headers.set(o,i)})),n(t)}var R$=(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})(R$||{});function xOe(t,n){return{\u0275kind:t,\u0275providers:n}}function O$(...t){let n=[va,D$,KB,{provide:MI,useExisting:KB},{provide:qk,useFactory:()=>re(lOe,{optional:!0})??re(D$)},{provide:k$,useValue:bOe,multi:!0},{provide:zce,useValue:!0},{provide:Kk,useClass:vOe}];for(let e of t)n.push(...e.\u0275providers);return H_(n)}var Oce=new ii("");function P$(){return xOe(R$.LegacyInterceptors,[{provide:Oce,useFactory:uOe},{provide:k$,useExisting:Oce,multi:!0}])}var rg=(()=>{class t{_doc;_dom;constructor(e){this._doc=e,this._dom=ip()}addTag(e,i=!1){return e?this._getOrCreateElement(e,i):null}addTags(e,i=!1){return e?e.reduce((o,r)=>(r&&o.push(this._getOrCreateElement(r,i)),o),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];let i=this._doc.querySelectorAll(`meta[${e}]`);return i?[].slice.call(i):[]}updateTag(e,i){if(!e)return null;i=i||this._parseSelector(e);let o=this.getTag(i);return o?this._setMetaElementAttributes(e,o):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,i=!1){if(!i){let a=this._parseSelector(e),p=this.getTags(a).filter(f=>this._containsAttributes(e,f))[0];if(p!==void 0)return p}let o=this._dom.createElement("meta");return this._setMetaElementAttributes(e,o),this._doc.getElementsByTagName("head")[0].appendChild(o),o}_setMetaElementAttributes(e,i){return Object.keys(e).forEach(o=>i.setAttribute(this._getMetaKeyMap(o),e[o])),i}_parseSelector(e){let i=e.name?"name":"property";return`${i}="${e[i]}"`}_containsAttributes(e,i){return Object.keys(e).every(o=>i.getAttribute(this._getMetaKeyMap(o))===e[o])}_getMetaKeyMap(e){return COe[e]||e}static \u0275fac=function(i){return new(i||t)(ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),COe={httpEquiv:"http-equiv"},YB=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(i){return new(i||t)(ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var a1=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:function(i){let o=null;return i?o=new(i||t):o=ui(wOe),o},providedIn:"root"})}return t})(),wOe=(()=>{class t extends a1{_doc;constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case Jc.NONE:return i;case Jc.HTML:return eg(i,"HTML")?Ju(i):J3(this._doc,String(i)).toString();case Jc.STYLE:return eg(i,"Style")?Ju(i):i;case Jc.SCRIPT:if(eg(i,"Script"))return Ju(i);throw new fn(5200,!1);case Jc.URL:return eg(i,"URL")?Ju(i):bI(String(i));case Jc.RESOURCE_URL:if(eg(i,"ResourceURL"))return Ju(i);throw new fn(5201,!1);default:throw new fn(5202,!1)}}bypassSecurityTrustHtml(e){return j9(e)}bypassSecurityTrustStyle(e){return G9(e)}bypassSecurityTrustScript(e){return $9(e)}bypassSecurityTrustUrl(e){return q9(e)}bypassSecurityTrustResourceUrl(e){return W9(e)}static \u0275fac=function(i){return new(i||t)(ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Yr="primary",aM=Symbol("RouteTitle"),z$=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function d1(t){return new z$(t)}function Wce(t,n,e){let i=e.path.split("/");if(i.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||i.lengthi[r]===o)}else return t===n}function Zce(t){return t.length>0?t[t.length-1]:null}function i0(t){return HN(t)?t:J_(t)?vr(Promise.resolve(t)):Ni(t)}var IOe={exact:Qce,subset:Xce},Yce={exact:TOe,subset:EOe,ignored:()=>!0};function Vce(t,n,e){return IOe[e.paths](t.root,n.root,e.matrixParams)&&Yce[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function TOe(t,n){return sg(t,n)}function Qce(t,n,e){if(!l1(t.segments,n.segments)||!JB(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let i in n.children)if(!t.children[i]||!Qce(t.children[i],n.children[i],e))return!1;return!0}function EOe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Kce(t[e],n[e]))}function Xce(t,n,e){return Jce(t,n,n.segments,e)}function Jce(t,n,e,i){if(t.segments.length>e.length){let o=t.segments.slice(0,e.length);return!(!l1(o,e)||n.hasChildren()||!JB(o,e,i))}else if(t.segments.length===e.length){if(!l1(t.segments,e)||!JB(t.segments,e,i))return!1;for(let o in n.children)if(!t.children[o]||!Xce(t.children[o],n.children[o],i))return!1;return!0}else{let o=e.slice(0,t.segments.length),r=e.slice(t.segments.length);return!l1(t.segments,o)||!JB(t.segments,o,i)||!t.children[Yr]?!1:Jce(t.children[Yr],n,r,i)}}function JB(t,n,e){return n.every((i,o)=>Yce[e](t[o].parameters,i.parameters))}var lg=class{root;queryParams;fragment;_queryParamMap;constructor(n=new ia([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=d1(this.queryParams),this._queryParamMap}toString(){return kOe.serialize(this)}},ia=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return e4(this)}},lv=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=d1(this.parameters),this._parameterMap}toString(){return tde(this)}};function AOe(t,n){return l1(t,n)&&t.every((e,i)=>sg(e.parameters,n[i].parameters))}function l1(t,n){return t.length!==n.length?!1:t.every((e,i)=>e.path===n[i].path)}function DOe(t,n){let e=[];return Object.entries(t.children).forEach(([i,o])=>{i===Yr&&(e=e.concat(n(o,i)))}),Object.entries(t.children).forEach(([i,o])=>{i!==Yr&&(e=e.concat(n(o,i)))}),e}var u1=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>new cv,providedIn:"root"})}return t})(),cv=class{parse(n){let e=new H$(n);return new lg(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Zk(n.root,!0)}`,i=OOe(n.queryParams),o=typeof n.fragment=="string"?`#${MOe(n.fragment)}`:"";return`${e}${i}${o}`}},kOe=new cv;function e4(t){return t.segments.map(n=>tde(n)).join("/")}function Zk(t,n){if(!t.hasChildren())return e4(t);if(n){let e=t.children[Yr]?Zk(t.children[Yr],!1):"",i=[];return Object.entries(t.children).forEach(([o,r])=>{o!==Yr&&i.push(`${o}:${Zk(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=DOe(t,(i,o)=>o===Yr?[Zk(t.children[Yr],!1)]:[`${o}:${Zk(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[Yr]!=null?`${e4(t)}/${e[0]}`:`${e4(t)}/(${e.join("//")})`}}function ede(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function QB(t){return ede(t).replace(/%3B/gi,";")}function MOe(t){return encodeURI(t)}function U$(t){return ede(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function t4(t){return decodeURIComponent(t)}function Uce(t){return t4(t.replace(/\+/g,"%20"))}function tde(t){return`${U$(t.path)}${ROe(t.parameters)}`}function ROe(t){return Object.entries(t).map(([n,e])=>`;${U$(n)}=${U$(e)}`).join("")}function OOe(t){let n=Object.entries(t).map(([e,i])=>Array.isArray(i)?i.map(o=>`${QB(e)}=${QB(o)}`).join("&"):`${QB(e)}=${QB(i)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var POe=/^[^\/()?;#]+/;function L$(t){let n=t.match(POe);return n?n[0]:""}var LOe=/^[^\/()?;=#]+/;function FOe(t){let n=t.match(LOe);return n?n[0]:""}var NOe=/^[^=?&#]+/;function BOe(t){let n=t.match(NOe);return n?n[0]:""}var zOe=/^[^&#]+/;function VOe(t){let n=t.match(zOe);return n?n[0]:""}var H$=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new ia([],{}):new ia([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[Yr]=new ia(n,e)),i}parseSegment(){let n=L$(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new fn(4009,!1);return this.capture(n),new lv(t4(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=FOe(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=L$(this.remaining);o&&(i=o,this.capture(i))}n[t4(e)]=t4(i)}parseQueryParam(n){let e=BOe(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let a=VOe(this.remaining);a&&(i=a,this.capture(i))}let o=Uce(e),r=Uce(i);if(n.hasOwnProperty(o)){let a=n[o];Array.isArray(a)||(a=[a],n[o]=a),a.push(r)}else n[o]=r}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=L$(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new fn(4010,!1);let r;i.indexOf(":")>-1?(r=i.slice(0,i.indexOf(":")),this.capture(r),this.capture(":")):n&&(r=Yr);let a=this.parseChildren();e[r]=Object.keys(a).length===1?a[Yr]:new ia([],a),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new fn(4011,!1)}};function ide(t){return t.segments.length>0?new ia([],{[Yr]:t}):t}function nde(t){let n={};for(let[i,o]of Object.entries(t.children)){let r=nde(o);if(i===Yr&&r.segments.length===0&&r.hasChildren())for(let[a,p]of Object.entries(r.children))n[a]=p;else(r.segments.length>0||r.hasChildren())&&(n[i]=r)}let e=new ia(t.segments,n);return UOe(e)}function UOe(t){if(t.numberOfChildren===1&&t.children[Yr]){let n=t.children[Yr];return new ia(t.segments.concat(n.segments),n.children)}return t}function dv(t){return t instanceof lg}function ode(t,n,e=null,i=null){let o=rde(t);return sde(o,n,e,i)}function rde(t){let n;function e(r){let a={};for(let f of r.children){let x=e(f);a[f.outlet]=x}let p=new ia(r.url,a);return r===t&&(n=p),p}let i=e(t.root),o=ide(i);return n??o}function sde(t,n,e,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return F$(o,o,o,e,i);let r=HOe(n);if(r.toRoot())return F$(o,o,new ia([],{}),e,i);let a=jOe(r,o,t),p=a.processChildren?Qk(a.segmentGroup,a.index,r.commands):lde(a.segmentGroup,a.index,r.commands);return F$(o,a.segmentGroup,p,e,i)}function i4(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Jk(t){return typeof t=="object"&&t!=null&&t.outlets}function F$(t,n,e,i,o){let r={};i&&Object.entries(i).forEach(([f,x])=>{r[f]=Array.isArray(x)?x.map(I=>`${I}`):`${x}`});let a;t===n?a=e:a=ade(t,n,e);let p=ide(nde(a));return new lg(p,r,o)}function ade(t,n,e){let i={};return Object.entries(t.children).forEach(([o,r])=>{r===n?i[o]=e:i[o]=ade(r,n,e)}),new ia(t.segments,i)}var n4=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&i4(i[0]))throw new fn(4003,!1);let o=i.find(Jk);if(o&&o!==Zce(i))throw new fn(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function HOe(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new n4(!0,0,t);let n=0,e=!1,i=t.reduce((o,r,a)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let p={};return Object.entries(r.outlets).forEach(([f,x])=>{p[f]=typeof x=="string"?x.split("/"):x}),[...o,{outlets:p}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:a===0?(r.split("/").forEach((p,f)=>{f==0&&p==="."||(f==0&&p===""?e=!0:p===".."?n++:p!=""&&o.push(p))}),o):[...o,r]},[]);return new n4(e,n,i)}var LI=class{segmentGroup;processChildren;index;constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}};function jOe(t,n,e){if(t.isAbsolute)return new LI(n,!0,0);if(!e)return new LI(n,!1,NaN);if(e.parent===null)return new LI(e,!0,0);let i=i4(t.commands[0])?0:1,o=e.segments.length-1+i;return GOe(e,o,t.numberOfDoubleDots)}function GOe(t,n,e){let i=t,o=n,r=e;for(;r>o;){if(r-=o,i=i.parent,!i)throw new fn(4005,!1);o=i.segments.length}return new LI(i,!1,o-r)}function $Oe(t){return Jk(t[0])?t[0].outlets:{[Yr]:t}}function lde(t,n,e){if(t??=new ia([],{}),t.segments.length===0&&t.hasChildren())return Qk(t,n,e);let i=qOe(t,n,e),o=e.slice(i.commandIndex);if(i.match&&i.pathIndexr!==Yr)&&t.children[Yr]&&t.numberOfChildren===1&&t.children[Yr].segments.length===0){let r=Qk(t.children[Yr],n,e);return new ia(t.segments,r.children)}return Object.entries(i).forEach(([r,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(o[r]=lde(t.children[r],n,a))}),Object.entries(t.children).forEach(([r,a])=>{i[r]===void 0&&(o[r]=a)}),new ia(t.segments,o)}}function qOe(t,n,e){let i=0,o=n,r={match:!1,pathIndex:0,commandIndex:0};for(;o=e.length)return r;let a=t.segments[o],p=e[i];if(Jk(p))break;let f=`${p}`,x=i0&&f===void 0)break;if(f&&x&&typeof x=="object"&&x.outlets===void 0){if(!jce(f,x,a))return r;i+=2}else{if(!jce(f,{},a))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}function j$(t,n,e){let i=t.segments.slice(0,n),o=0;for(;o{typeof i=="string"&&(i=[i]),i!==null&&(n[e]=j$(new ia([],{}),0,i))}),n}function Hce(t){let n={};return Object.entries(t).forEach(([e,i])=>n[e]=`${i}`),n}function jce(t,n,e){return t==e.path&&sg(n,e.parameters)}var FI="imperative",Dc=(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})(Dc||{}),Up=class{id;url;constructor(n,e){this.id=n,this.url=e}},uv=class extends Up{type=Dc.NavigationStart;navigationTrigger;restoredState;constructor(n,e,i="imperative",o=null){super(n,e),this.navigationTrigger=i,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Hp=class extends Up{urlAfterRedirects;type=Dc.NavigationEnd;constructor(n,e,i){super(n,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Iu=(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})(Iu||{}),BI=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(BI||{}),ag=class extends Up{reason;code;type=Dc.NavigationCancel;constructor(n,e,i,o){super(n,e),this.reason=i,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},cg=class extends Up{reason;code;type=Dc.NavigationSkipped;constructor(n,e,i,o){super(n,e),this.reason=i,this.code=o}},zI=class extends Up{error;target;type=Dc.NavigationError;constructor(n,e,i,o){super(n,e),this.error=i,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},eM=class extends Up{urlAfterRedirects;state;type=Dc.RoutesRecognized;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},o4=class extends Up{urlAfterRedirects;state;type=Dc.GuardsCheckStart;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},r4=class extends Up{urlAfterRedirects;state;shouldActivate;type=Dc.GuardsCheckEnd;constructor(n,e,i,o,r){super(n,e),this.urlAfterRedirects=i,this.state=o,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},s4=class extends Up{urlAfterRedirects;state;type=Dc.ResolveStart;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},a4=class extends Up{urlAfterRedirects;state;type=Dc.ResolveEnd;constructor(n,e,i,o){super(n,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},l4=class{route;type=Dc.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},c4=class{route;type=Dc.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},d4=class{snapshot;type=Dc.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},u4=class{snapshot;type=Dc.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},p4=class{snapshot;type=Dc.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},VI=class{snapshot;type=Dc.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},UI=class{routerEvent;position;anchor;type=Dc.Scroll;constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},tM=class{},HI=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function KOe(t){return!(t instanceof tM)&&!(t instanceof HI)}function ZOe(t,n){return t.providers&&!t._injector&&(t._injector=CI(t.providers,n,`Route: ${t.path}`)),t._injector??n}function Am(t){return t.outlet||Yr}function YOe(t,n){let e=t.filter(i=>Am(i)===n);return e.push(...t.filter(i=>Am(i)!==n)),e}function $I(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var h4=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return $I(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new p1(this.rootInjector)}},p1=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,i){let o=this.getOrCreateContext(e);o.outlet=i,this.contexts.set(e,o)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new h4(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(i){return new(i||t)(ui(ua))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),m4=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=G$(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){let e=G$(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=$$(n,this._root);return e.length<2?[]:e[e.length-2].children.map(o=>o.value).filter(o=>o!==n)}pathFromRoot(n){return $$(n,this._root).map(e=>e.value)}};function G$(t,n){if(t===n.value)return n;for(let e of n.children){let i=G$(t,e);if(i)return i}return null}function $$(t,n){if(t===n.value)return[n];for(let e of n.children){let i=$$(t,e);if(i.length)return i.unshift(n),i}return[]}var Vp=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function PI(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var iM=class extends m4{snapshot;constructor(n,e){super(n),this.snapshot=e,J$(this,n)}toString(){return this.snapshot.toString()}};function cde(t){let n=QOe(t),e=new Ms([new lv("",{})]),i=new Ms({}),o=new Ms({}),r=new Ms({}),a=new Ms(""),p=new Ac(e,i,r,a,o,Yr,t,n.root);return p.snapshot=n.root,new iM(new Vp(p,[]),n)}function QOe(t){let n={},e={},i={},r=new c1([],n,i,"",e,Yr,t,null,{});return new nM("",new Vp(r,[]))}var Ac=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,i,o,r,a,p,f){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=o,this.dataSubject=r,this.outlet=a,this.component=p,this._futureSnapshot=f,this.title=this.dataSubject?.pipe(vi(x=>x[aM]))??Ni(void 0),this.url=n,this.params=e,this.queryParams=i,this.fragment=o,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(vi(n=>d1(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(vi(n=>d1(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function f4(t,n,e="emptyOnly"){let i,{routeConfig:o}=t;return n!==null&&(e==="always"||o?.path===""||!n.component&&!n.routeConfig?.loadComponent)?i={params:ve(ve({},n.params),t.params),data:ve(ve({},n.data),t.data),resolve:ve(ve(ve(ve({},t.data),n.data),o?.data),t._resolvedData)}:i={params:ve({},t.params),data:ve({},t.data),resolve:ve(ve({},t.data),t._resolvedData??{})},o&&ude(o)&&(i.resolve[aM]=o.title),i}var c1=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[aM]}constructor(n,e,i,o,r,a,p,f,x){this.url=n,this.params=e,this.queryParams=i,this.fragment=o,this.data=r,this.outlet=a,this.component=p,this.routeConfig=f,this._resolve=x}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??=d1(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=d1(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},nM=class extends m4{url;constructor(n,e){super(e),this.url=n,J$(this,e)}toString(){return dde(this._root)}};function J$(t,n){n.value._routerState=t,n.children.forEach(e=>J$(t,e))}function dde(t){let n=t.children.length>0?` { ${t.children.map(dde).join(", ")} } `:"";return`${t.value}${n}`}function N$(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,sg(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),sg(n.params,e.params)||t.paramsSubject.next(e.params),SOe(n.url,e.url)||t.urlSubject.next(e.url),sg(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function q$(t,n){let e=sg(t.params,n.params)&&AOe(t.url,n.url),i=!t.parent!=!n.parent;return e&&!i&&(!t.parent||q$(t.parent,n.parent))}function ude(t){return typeof t.title=="string"||t.title===null}var pde=new ii(""),eq=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Yr;activateEvents=new yt;deactivateEvents=new yt;attachEvents=new yt;detachEvents=new yt;routerOutletData=Wn(void 0);parentContexts=re(p1);location=re(Ga);changeDetector=re(Ho);inputBinder=re(lM,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:o}=e.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new fn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new fn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new fn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new fn(4013,!1);this._activatedRoute=e;let o=this.location,a=e.snapshot.component,p=this.parentContexts.getOrCreateContext(this.name).children,f=new W$(e,p,o.injector,this.routerOutletData);this.activated=o.createComponent(a,{index:o.length,injector:f,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[In]})}return t})(),W$=class{route;childContexts;parent;outletData;constructor(n,e,i,o){this.route=n,this.childContexts=e,this.parent=i,this.outletData=o}get(n,e){return n===Ac?this.route:n===p1?this.childContexts:n===pde?this.outletData:this.parent.get(n,e)}},lM=new ii(""),tq=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:i}=e,o=_u([i.queryParams,i.params,i.data]).pipe(wo(([r,a,p],f)=>(p=ve(ve(ve({},r),a),p),f===0?Ni(p):Promise.resolve(p)))).subscribe(r=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let a=Ble(i.component);if(!a){this.unsubscribeFromRouteData(e);return}for(let{templateName:p}of a.inputs)e.activatedComponentRef.setInput(p,r[p])});this.outletDataSubscriptions.set(e,o)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),iq=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,o){i&1&&Oe(0,"router-outlet")},dependencies:[eq],encapsulation:2})}return t})();function nq(t){let n=t.children&&t.children.map(nq),e=n?gt(ve({},t),{children:n}):ve({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==Yr&&(e.component=iq),e}function XOe(t,n,e){let i=oM(t,n._root,e?e._root:void 0);return new iM(i,n)}function oM(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=n.value;let o=JOe(t,n,e);return new Vp(i,o)}else{if(t.shouldAttach(n.value)){let r=t.retrieve(n.value);if(r!==null){let a=r.route;return a.value._futureSnapshot=n.value,a.children=n.children.map(p=>oM(t,p)),a}}let i=ePe(n.value),o=n.children.map(r=>oM(t,r));return new Vp(i,o)}}function JOe(t,n,e){return n.children.map(i=>{for(let o of e.children)if(t.shouldReuseRoute(i.value,o.value.snapshot))return oM(t,i,o);return oM(t,i)})}function ePe(t){return new Ac(new Ms(t.url),new Ms(t.params),new Ms(t.queryParams),new Ms(t.fragment),new Ms(t.data),t.outlet,t.component,t)}var jI=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},hde="ngNavigationCancelingError";function g4(t,n){let{redirectTo:e,navigationBehaviorOptions:i}=dv(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,o=mde(!1,Iu.Redirect);return o.url=e,o.navigationBehaviorOptions=i,o}function mde(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[hde]=!0,e.cancellationCode=n,e}function tPe(t){return fde(t)&&dv(t.url)}function fde(t){return!!t&&t[hde]}var iPe=(t,n,e,i)=>vi(o=>(new K$(n,o.targetRouterState,o.currentRouterState,e,i).activate(t),o)),K$=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,i,o,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=o,this.inputBindingEnabled=r}activate(n){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),N$(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){let o=PI(e);n.children.forEach(r=>{let a=r.value.outlet;this.deactivateRoutes(r,o[a],i),delete o[a]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,i)})}deactivateRoutes(n,e,i){let o=n.value,r=e?e.value:null;if(o===r)if(o.component){let a=i.getContext(o.outlet);a&&this.deactivateChildRoutes(n,e,a.children)}else this.deactivateChildRoutes(n,e,i);else r&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let i=e.getContext(n.value.outlet),o=i&&n.value.component?i.children:e,r=PI(n);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);if(i&&i.outlet){let a=i.outlet.detach(),p=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:a,route:n,contexts:p})}}deactivateRouteAndOutlet(n,e){let i=e.getContext(n.value.outlet),o=i&&n.value.component?i.children:e,r=PI(n);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(n,e,i){let o=PI(e);n.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],i),this.forwardEvent(new VI(r.value.snapshot))}),n.children.length&&this.forwardEvent(new u4(n.value.snapshot))}activateRoutes(n,e,i){let o=n.value,r=e?e.value:null;if(N$(o),o===r)if(o.component){let a=i.getOrCreateContext(o.outlet);this.activateChildRoutes(n,e,a.children)}else this.activateChildRoutes(n,e,i);else if(o.component){let a=i.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let p=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),a.children.onOutletReAttached(p.contexts),a.attachRef=p.componentRef,a.route=p.route.value,a.outlet&&a.outlet.attach(p.componentRef,p.route.value),N$(p.route.value),this.activateChildRoutes(n,null,a.children)}else a.attachRef=null,a.route=o,a.outlet&&a.outlet.activateWith(o,a.injector),this.activateChildRoutes(n,null,a.children)}else this.activateChildRoutes(n,null,i)}},_4=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},NI=class{component;route;constructor(n,e){this.component=n,this.route=e}};function nPe(t,n,e){let i=t._root,o=n?n._root:null;return Yk(i,o,e,[i.value])}function oPe(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function qI(t,n){let e=Symbol(),i=n.get(t,e);return i===e?typeof t=="function"&&!q7(t)?t:n.get(t):i}function Yk(t,n,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=PI(n);return t.children.forEach(a=>{rPe(a,r[a.value.outlet],e,i.concat([a.value]),o),delete r[a.value.outlet]}),Object.entries(r).forEach(([a,p])=>Xk(p,e.getContext(a),o)),o}function rPe(t,n,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=t.value,a=n?n.value:null,p=e?e.getContext(t.value.outlet):null;if(a&&r.routeConfig===a.routeConfig){let f=sPe(a,r,r.routeConfig.runGuardsAndResolvers);f?o.canActivateChecks.push(new _4(i)):(r.data=a.data,r._resolvedData=a._resolvedData),r.component?Yk(t,n,p?p.children:null,i,o):Yk(t,n,e,i,o),f&&p&&p.outlet&&p.outlet.isActivated&&o.canDeactivateChecks.push(new NI(p.outlet.component,a))}else a&&Xk(n,p,o),o.canActivateChecks.push(new _4(i)),r.component?Yk(t,null,p?p.children:null,i,o):Yk(t,null,e,i,o);return o}function sPe(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!l1(t.url,n.url);case"pathParamsOrQueryParamsChange":return!l1(t.url,n.url)||!sg(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!q$(t,n)||!sg(t.queryParams,n.queryParams);case"paramsChange":default:return!q$(t,n)}}function Xk(t,n,e){let i=PI(t),o=t.value;Object.entries(i).forEach(([r,a])=>{o.component?n?Xk(a,n.children.getContext(r),e):Xk(a,null,e):Xk(a,n,e)}),o.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new NI(n.outlet.component,o)):e.canDeactivateChecks.push(new NI(null,o)):e.canDeactivateChecks.push(new NI(null,o))}function cM(t){return typeof t=="function"}function aPe(t){return typeof t=="boolean"}function lPe(t){return t&&cM(t.canLoad)}function cPe(t){return t&&cM(t.canActivate)}function dPe(t){return t&&cM(t.canActivateChild)}function uPe(t){return t&&cM(t.canDeactivate)}function pPe(t){return t&&cM(t.canMatch)}function gde(t){return t instanceof hm||t?.name==="EmptyError"}var XB=Symbol("INITIAL_VALUE");function GI(){return wo(t=>_u(t.map(n=>n.pipe(Ko(1),Ja(XB)))).pipe(vi(n=>{for(let e of n)if(e!==!0){if(e===XB)return XB;if(e===!1||hPe(e))return e}return!0}),ro(n=>n!==XB),Ko(1)))}function hPe(t){return dv(t)||t instanceof jI}function mPe(t,n){return Qa(e=>{let{targetSnapshot:i,currentSnapshot:o,guards:{canActivateChecks:r,canDeactivateChecks:a}}=e;return a.length===0&&r.length===0?Ni(gt(ve({},e),{guardsResult:!0})):fPe(a,i,o,t).pipe(Qa(p=>p&&aPe(p)?gPe(i,r,t,n):Ni(p)),vi(p=>gt(ve({},e),{guardsResult:p})))})}function fPe(t,n,e,i){return vr(t).pipe(Qa(o=>xPe(o.component,o.route,e,n,i)),Yu(o=>o!==!0,!0))}function gPe(t,n,e,i){return vr(n).pipe(Md(o=>Hf(yPe(o.route.parent,i),_Pe(o.route,i),bPe(t,o.path,e),vPe(t,o.route,e))),Yu(o=>o!==!0,!0))}function _Pe(t,n){return t!==null&&n&&n(new p4(t)),Ni(!0)}function yPe(t,n){return t!==null&&n&&n(new d4(t)),Ni(!0)}function vPe(t,n,e){let i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||i.length===0)return Ni(!0);let o=i.map(r=>yu(()=>{let a=$I(n)??e,p=qI(r,a),f=cPe(p)?p.canActivate(n,t):Qc(a,()=>p(n,t));return i0(f).pipe(Yu())}));return Ni(o).pipe(GI())}function bPe(t,n,e){let i=n[n.length-1],r=n.slice(0,n.length-1).reverse().map(a=>oPe(a)).filter(a=>a!==null).map(a=>yu(()=>{let p=a.guards.map(f=>{let x=$I(a.node)??e,I=qI(f,x),D=dPe(I)?I.canActivateChild(i,t):Qc(x,()=>I(i,t));return i0(D).pipe(Yu())});return Ni(p).pipe(GI())}));return Ni(r).pipe(GI())}function xPe(t,n,e,i,o){let r=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!r||r.length===0)return Ni(!0);let a=r.map(p=>{let f=$I(n)??o,x=qI(p,f),I=uPe(x)?x.canDeactivate(t,n,e,i):Qc(f,()=>x(t,n,e,i));return i0(I).pipe(Yu())});return Ni(a).pipe(GI())}function CPe(t,n,e,i){let o=n.canLoad;if(o===void 0||o.length===0)return Ni(!0);let r=o.map(a=>{let p=qI(a,t),f=lPe(p)?p.canLoad(n,e):Qc(t,()=>p(n,e));return i0(f)});return Ni(r).pipe(GI(),_de(i))}function _de(t){return x7(Er(n=>{if(typeof n!="boolean")throw g4(t,n)}),vi(n=>n===!0))}function wPe(t,n,e,i){let o=n.canMatch;if(!o||o.length===0)return Ni(!0);let r=o.map(a=>{let p=qI(a,t),f=pPe(p)?p.canMatch(n,e):Qc(t,()=>p(n,e));return i0(f)});return Ni(r).pipe(GI(),_de(i))}var rM=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},sM=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function OI(t){return qy(new rM(t))}function SPe(t){return qy(new fn(4e3,!1))}function IPe(t){return qy(mde(!1,Iu.GuardRejected))}var Z$=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let i=[],o=e.root;for(;;){if(i=i.concat(o.segments),o.numberOfChildren===0)return Ni(i);if(o.numberOfChildren>1||!o.children[Yr])return SPe(`${n.redirectTo}`);o=o.children[Yr]}}applyRedirectCommands(n,e,i,o,r){return TPe(e,o,r).pipe(vi(a=>{if(a instanceof lg)throw new sM(a);let p=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),n,i);if(a[0]==="/")throw new sM(p);return p}))}applyRedirectCreateUrlTree(n,e,i,o){let r=this.createSegmentGroup(n,e.root,i,o);return new lg(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let i={};return Object.entries(n).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let p=r.substring(1);i[o]=e[p]}else i[o]=r}),i}createSegmentGroup(n,e,i,o){let r=this.createSegments(n,e.segments,i,o),a={};return Object.entries(e.children).forEach(([p,f])=>{a[p]=this.createSegmentGroup(n,f,i,o)}),new ia(r,a)}createSegments(n,e,i,o){return e.map(r=>r.path[0]===":"?this.findPosParam(n,r,o):this.findOrReturn(r,i))}findPosParam(n,e,i){let o=i[e.path.substring(1)];if(!o)throw new fn(4001,!1);return o}findOrReturn(n,e){let i=0;for(let o of e){if(o.path===n.path)return e.splice(i),o;i++}return n}};function TPe(t,n,e){if(typeof t=="string")return Ni(t);let i=t,{queryParams:o,fragment:r,routeConfig:a,url:p,outlet:f,params:x,data:I,title:D}=n;return i0(Qc(e,()=>i({params:x,data:I,queryParams:o,fragment:r,routeConfig:a,url:p,outlet:f,title:D})))}var Y$={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function EPe(t,n,e,i,o){let r=yde(t,n,e);return r.matched?(i=ZOe(n,i),wPe(i,n,e,o).pipe(vi(a=>a===!0?r:ve({},Y$)))):Ni(r)}function yde(t,n,e){if(n.path==="**")return APe(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?ve({},Y$):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let o=(n.matcher||Wce)(e,t,n);if(!o)return ve({},Y$);let r={};Object.entries(o.posParams??{}).forEach(([p,f])=>{r[p]=f.path});let a=o.consumed.length>0?ve(ve({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:e.slice(o.consumed.length),parameters:a,positionalParamSegments:o.posParams??{}}}function APe(t){return{matched:!0,parameters:t.length>0?Zce(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Gce(t,n,e,i){return e.length>0&&MPe(t,e,i)?{segmentGroup:new ia(n,kPe(i,new ia(e,t.children))),slicedSegments:[]}:e.length===0&&RPe(t,e,i)?{segmentGroup:new ia(t.segments,DPe(t,e,i,t.children)),slicedSegments:e}:{segmentGroup:new ia(t.segments,t.children),slicedSegments:e}}function DPe(t,n,e,i){let o={};for(let r of e)if(v4(t,n,r)&&!i[Am(r)]){let a=new ia([],{});o[Am(r)]=a}return ve(ve({},i),o)}function kPe(t,n){let e={};e[Yr]=n;for(let i of t)if(i.path===""&&Am(i)!==Yr){let o=new ia([],{});e[Am(i)]=o}return e}function MPe(t,n,e){return e.some(i=>v4(t,n,i)&&Am(i)!==Yr)}function RPe(t,n,e){return e.some(i=>v4(t,n,i))}function v4(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function OPe(t,n,e){return n.length===0&&!t.children[e]}var Q$=class{};function PPe(t,n,e,i,o,r,a="emptyOnly"){return new X$(t,n,e,i,o,a,r).recognize()}var LPe=31,X$=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,i,o,r,a,p){this.injector=n,this.configLoader=e,this.rootComponentType=i,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=a,this.urlSerializer=p,this.applyRedirects=new Z$(this.urlSerializer,this.urlTree)}noMatchError(n){return new fn(4002,`'${n.segmentGroup}'`)}recognize(){let n=Gce(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(vi(({children:e,rootSnapshot:i})=>{let o=new Vp(i,e),r=new nM("",o),a=ode(i,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(a),{state:r,tree:a}}))}match(n){let e=new c1([],Object.freeze({}),Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Yr,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,Yr,e).pipe(vi(i=>({children:i,rootSnapshot:e})),Xa(i=>{if(i instanceof sM)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof rM?this.noMatchError(i):i}))}processSegmentGroup(n,e,i,o,r){return i.segments.length===0&&i.hasChildren()?this.processChildren(n,e,i,r):this.processSegment(n,e,i,i.segments,o,!0,r).pipe(vi(a=>a instanceof Vp?[a]:[]))}processChildren(n,e,i,o){let r=[];for(let a of Object.keys(i.children))a==="primary"?r.unshift(a):r.push(a);return vr(r).pipe(Md(a=>{let p=i.children[a],f=YOe(e,a);return this.processSegmentGroup(n,f,p,a,o)}),R7((a,p)=>(a.push(...p),a)),Wy(null),M7(),Qa(a=>{if(a===null)return OI(i);let p=vde(a);return FPe(p),Ni(p)}))}processSegment(n,e,i,o,r,a,p){return vr(e).pipe(Md(f=>this.processSegmentAgainstRoute(f._injector??n,e,f,i,o,r,a,p).pipe(Xa(x=>{if(x instanceof rM)return Ni(null);throw x}))),Yu(f=>!!f),Xa(f=>{if(gde(f))return OPe(i,o,r)?Ni(new Q$):OI(i);throw f}))}processSegmentAgainstRoute(n,e,i,o,r,a,p,f){return Am(i)!==a&&(a===Yr||!v4(o,r,i))?OI(o):i.redirectTo===void 0?this.matchSegmentAgainstRoute(n,o,i,r,a,f):this.allowRedirects&&p?this.expandSegmentAgainstRouteUsingRedirect(n,o,e,i,r,a,f):OI(o)}expandSegmentAgainstRouteUsingRedirect(n,e,i,o,r,a,p){let{matched:f,parameters:x,consumedSegments:I,positionalParamSegments:D,remainingSegments:P}=yde(e,o,r);if(!f)return OI(e);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>LPe&&(this.allowRedirects=!1));let R=new c1(r,x,Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,$ce(o),Am(o),o.component??o._loadedComponent??null,o,qce(o)),j=f4(R,p,this.paramsInheritanceStrategy);return R.params=Object.freeze(j.params),R.data=Object.freeze(j.data),this.applyRedirects.applyRedirectCommands(I,o.redirectTo,D,R,n).pipe(wo(W=>this.applyRedirects.lineralizeSegments(o,W)),Qa(W=>this.processSegment(n,i,e,W.concat(P),a,!1,p)))}matchSegmentAgainstRoute(n,e,i,o,r,a){let p=EPe(e,i,o,n,this.urlSerializer);return i.path==="**"&&(e.children={}),p.pipe(wo(f=>f.matched?(n=i._injector??n,this.getChildConfig(n,i,o).pipe(wo(({routes:x})=>{let I=i._loadedInjector??n,{parameters:D,consumedSegments:P,remainingSegments:R}=f,j=new c1(P,D,Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,$ce(i),Am(i),i.component??i._loadedComponent??null,i,qce(i)),$=f4(j,a,this.paramsInheritanceStrategy);j.params=Object.freeze($.params),j.data=Object.freeze($.data);let{segmentGroup:W,slicedSegments:Q}=Gce(e,P,R,x);if(Q.length===0&&W.hasChildren())return this.processChildren(I,x,W,j).pipe(vi(ge=>new Vp(j,ge)));if(x.length===0&&Q.length===0)return Ni(new Vp(j,[]));let se=Am(i)===r;return this.processSegment(I,x,W,Q,se?Yr:r,!0,j).pipe(vi(ge=>new Vp(j,ge instanceof Vp?[ge]:[])))}))):OI(e)))}getChildConfig(n,e,i){return e.children?Ni({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?Ni({routes:e._loadedRoutes,injector:e._loadedInjector}):CPe(n,e,i,this.urlSerializer).pipe(Qa(o=>o?this.configLoader.loadChildren(n,e).pipe(Er(r=>{e._loadedRoutes=r.routes,e._loadedInjector=r.injector})):IPe(e))):Ni({routes:[],injector:n})}};function FPe(t){t.sort((n,e)=>n.value.outlet===Yr?-1:e.value.outlet===Yr?1:n.value.outlet.localeCompare(e.value.outlet))}function NPe(t){let n=t.value.routeConfig;return n&&n.path===""}function vde(t){let n=[],e=new Set;for(let i of t){if(!NPe(i)){n.push(i);continue}let o=n.find(r=>i.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...i.children),e.add(o)):n.push(i)}for(let i of e){let o=vde(i.children);n.push(new Vp(i.value,o))}return n.filter(i=>!e.has(i))}function $ce(t){return t.data||{}}function qce(t){return t.resolve||{}}function BPe(t,n,e,i,o,r){return Qa(a=>PPe(t,n,e,i,a.extractedUrl,o,r).pipe(vi(({state:p,tree:f})=>gt(ve({},a),{targetSnapshot:p,urlAfterRedirects:f}))))}function zPe(t,n){return Qa(e=>{let{targetSnapshot:i,guards:{canActivateChecks:o}}=e;if(!o.length)return Ni(e);let r=new Set(o.map(f=>f.route)),a=new Set;for(let f of r)if(!a.has(f))for(let x of bde(f))a.add(x);let p=0;return vr(a).pipe(Md(f=>r.has(f)?VPe(f,i,t,n):(f.data=f4(f,f.parent,t).resolve,Ni(void 0))),Er(()=>p++),$S(1),Qa(f=>p===a.size?Ni(e):kl))})}function bde(t){let n=t.children.map(e=>bde(e)).flat();return[t,...n]}function VPe(t,n,e,i){let o=t.routeConfig,r=t._resolve;return o?.title!==void 0&&!ude(o)&&(r[aM]=o.title),yu(()=>(t.data=f4(t,t.parent,e).resolve,UPe(r,t,n,i).pipe(vi(a=>(t._resolvedData=a,t.data=ve(ve({},t.data),a),null)))))}function UPe(t,n,e,i){let o=V$(t);if(o.length===0)return Ni({});let r={};return vr(o).pipe(Qa(a=>HPe(t[a],n,e,i).pipe(Yu(),Er(p=>{if(p instanceof jI)throw g4(new cv,p);r[a]=p}))),$S(1),vi(()=>r),Xa(a=>gde(a)?kl:qy(a)))}function HPe(t,n,e,i){let o=$I(n)??i,r=qI(t,o),a=r.resolve?r.resolve(n,e):Qc(o,()=>r(n,e));return i0(a)}function B$(t){return wo(n=>{let e=t(n);return e?vr(e).pipe(vi(()=>n)):Ni(n)})}var oq=(()=>{class t{buildTitle(e){let i,o=e.root;for(;o!==void 0;)i=this.getResolvedTitleForRoute(o)??i,o=o.children.find(r=>r.outlet===Yr);return i}getResolvedTitleForRoute(e){return e.data[aM]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(xde),providedIn:"root"})}return t})(),xde=(()=>{class t extends oq{title;constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||t)(ui(YB))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pv=new ii("",{providedIn:"root",factory:()=>({})}),WI=new ii(""),b4=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=re(FG);loadComponent(e,i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return Ni(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let o=i0(Qc(e,()=>i.loadComponent())).pipe(vi(wde),wo(Sde),Er(a=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=a}),Gf(()=>{this.componentLoaders.delete(i)})),r=new BS(o,()=>new xi).pipe(NS());return this.componentLoaders.set(i,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Ni({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let r=Cde(i,this.compiler,e,this.onLoadEndListener).pipe(Gf(()=>{this.childrenLoaders.delete(i)})),a=new BS(r,()=>new xi).pipe(NS());return this.childrenLoaders.set(i,a),a}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Cde(t,n,e,i){return i0(Qc(e,()=>t.loadChildren())).pipe(vi(wde),wo(Sde),Qa(o=>o instanceof dB||Array.isArray(o)?Ni(o):vr(n.compileModuleAsync(o))),vi(o=>{i&&i(t);let r,a,p=!1;return Array.isArray(o)?(a=o,p=!0):(r=o.create(e).injector,a=r.get(WI,[],{optional:!0,self:!0}).flat()),{routes:a.map(nq),injector:r}}))}function jPe(t){return t&&typeof t=="object"&&"default"in t}function wde(t){return jPe(t)?t.default:t}function Sde(t){return Ni(t)}var x4=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(GPe),providedIn:"root"})}return t})(),GPe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rq=new ii(""),sq=new ii("");function Ide(t,n,e){let i=t.get(sq),o=t.get(zn);if(!o.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(x=>setTimeout(x));let r,a=new Promise(x=>{r=x}),p=o.startViewTransition(()=>(r(),$Pe(t)));p.ready.catch(x=>{});let{onViewTransitionCreated:f}=i;return f&&Qc(t,()=>f({transition:p,from:n,to:e})),a}function $Pe(t){return new Promise(n=>{Ic({read:()=>setTimeout(n)},{injector:t})})}var aq=new ii(""),C4=(()=>{class t{currentNavigation=Jn(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new xi;transitionAbortWithErrorSubject=new xi;configLoader=re(b4);environmentInjector=re(ua);destroyRef=re(bu);urlSerializer=re(u1);rootContexts=re(p1);location=re(np);inputBindingEnabled=re(lM,{optional:!0})!==null;titleStrategy=re(oq);options=re(pv,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=re(x4);createViewTransition=re(rq,{optional:!0});navigationErrorHandler=re(aq,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Ni(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=o=>this.events.next(new l4(o)),i=o=>this.events.next(new c4(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;pl(()=>{this.transitions?.next(gt(ve({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:i}))})}setupNavigations(e){return this.transitions=new Ms(null),this.transitions.pipe(ro(i=>i!==null),wo(i=>{let o=!1;return Ni(i).pipe(wo(r=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",Iu.SupersededByNewNavigation),kl;this.currentTransition=i,this.currentNavigation.set({id:r.id,initialUrl:r.rawUrl,extractedUrl:r.extractedUrl,targetBrowserUrl:typeof r.extras.browserUrl=="string"?this.urlSerializer.parse(r.extras.browserUrl):r.extras.browserUrl,trigger:r.source,extras:r.extras,previousNavigation:this.lastSuccessfulNavigation?gt(ve({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>r.abortController.abort()});let a=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),p=r.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!a&&p!=="reload")return this.events.next(new cg(r.id,this.urlSerializer.serialize(r.rawUrl),"",BI.IgnoredSameUrlNavigation)),r.resolve(!1),kl;if(this.urlHandlingStrategy.shouldProcessUrl(r.rawUrl))return Ni(r).pipe(wo(f=>(this.events.next(new uv(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),f.id!==this.navigationId?kl:Promise.resolve(f))),BPe(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),Er(f=>{i.targetSnapshot=f.targetSnapshot,i.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation.update(I=>(I.finalUrl=f.urlAfterRedirects,I));let x=new eM(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(x)}));if(a&&this.urlHandlingStrategy.shouldProcessUrl(r.currentRawUrl)){let{id:f,extractedUrl:x,source:I,restoredState:D,extras:P}=r,R=new uv(f,this.urlSerializer.serialize(x),I,D);this.events.next(R);let j=cde(this.rootComponentType).snapshot;return this.currentTransition=i=gt(ve({},r),{targetSnapshot:j,urlAfterRedirects:x,extras:gt(ve({},P),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update($=>($.finalUrl=x,$)),Ni(i)}else return this.events.next(new cg(r.id,this.urlSerializer.serialize(r.extractedUrl),"",BI.IgnoredByUrlHandlingStrategy)),r.resolve(!1),kl}),Er(r=>{let a=new o4(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects),r.targetSnapshot);this.events.next(a)}),vi(r=>(this.currentTransition=i=gt(ve({},r),{guards:nPe(r.targetSnapshot,r.currentSnapshot,this.rootContexts)}),i)),mPe(this.environmentInjector,r=>this.events.next(r)),Er(r=>{if(i.guardsResult=r.guardsResult,r.guardsResult&&typeof r.guardsResult!="boolean")throw g4(this.urlSerializer,r.guardsResult);let a=new r4(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects),r.targetSnapshot,!!r.guardsResult);this.events.next(a)}),ro(r=>r.guardsResult?!0:(this.cancelNavigationTransition(r,"",Iu.GuardRejected),!1)),B$(r=>{if(r.guards.canActivateChecks.length!==0)return Ni(r).pipe(Er(a=>{let p=new s4(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)}),wo(a=>{let p=!1;return Ni(a).pipe(zPe(this.paramsInheritanceStrategy,this.environmentInjector),Er({next:()=>p=!0,complete:()=>{p||this.cancelNavigationTransition(a,"",Iu.NoDataFromResolver)}}))}),Er(a=>{let p=new a4(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(p)}))}),B$(r=>{let a=p=>{let f=[];if(p.routeConfig?.loadComponent){let x=$I(p)??this.environmentInjector;f.push(this.configLoader.loadComponent(x,p.routeConfig).pipe(Er(I=>{p.component=I}),vi(()=>{})))}for(let x of p.children)f.push(...a(x));return f};return _u(a(r.targetSnapshot.root)).pipe(Wy(null),Ko(1))}),B$(()=>this.afterPreactivation()),wo(()=>{let{currentSnapshot:r,targetSnapshot:a}=i,p=this.createViewTransition?.(this.environmentInjector,r.root,a.root);return p?vr(p).pipe(vi(()=>i)):Ni(i)}),vi(r=>{let a=XOe(e.routeReuseStrategy,r.targetSnapshot,r.currentRouterState);return this.currentTransition=i=gt(ve({},r),{targetRouterState:a}),this.currentNavigation.update(p=>(p.targetRouterState=a,p)),i}),Er(()=>{this.events.next(new tM)}),iPe(this.rootContexts,e.routeReuseStrategy,r=>this.events.next(r),this.inputBindingEnabled),Ko(1),Wr(new Co(r=>{let a=i.abortController.signal,p=()=>r.next();return a.addEventListener("abort",p),()=>a.removeEventListener("abort",p)}).pipe(ro(()=>!o&&!i.targetRouterState),Er(()=>{this.cancelNavigationTransition(i,i.abortController.signal.reason+"",Iu.Aborted)}))),Er({next:r=>{o=!0,this.lastSuccessfulNavigation=pl(this.currentNavigation),this.events.next(new Hp(r.id,this.urlSerializer.serialize(r.extractedUrl),this.urlSerializer.serialize(r.urlAfterRedirects))),this.titleStrategy?.updateTitle(r.targetRouterState.snapshot),r.resolve(!0)},complete:()=>{o=!0}}),Wr(this.transitionAbortWithErrorSubject.pipe(Er(r=>{throw r}))),Gf(()=>{o||this.cancelNavigationTransition(i,"",Iu.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Xa(r=>{if(this.destroyed)return i.resolve(!1),kl;if(o=!0,fde(r))this.events.next(new ag(i.id,this.urlSerializer.serialize(i.extractedUrl),r.message,r.cancellationCode)),tPe(r)?this.events.next(new HI(r.url,r.navigationBehaviorOptions)):i.resolve(!1);else{let a=new zI(i.id,this.urlSerializer.serialize(i.extractedUrl),r,i.targetSnapshot??void 0);try{let p=Qc(this.environmentInjector,()=>this.navigationErrorHandler?.(a));if(p instanceof jI){let{message:f,cancellationCode:x}=g4(this.urlSerializer,p);this.events.next(new ag(i.id,this.urlSerializer.serialize(i.extractedUrl),f,x)),this.events.next(new HI(p.redirectTo,p.navigationBehaviorOptions))}else throw this.events.next(a),r}catch(p){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(p)}}return kl}))}))}cancelNavigationTransition(e,i,o){let r=new ag(e.id,this.urlSerializer.serialize(e.extractedUrl),i,o);this.events.next(r),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=pl(this.currentNavigation),o=i?.targetBrowserUrl??i?.extractedUrl;return e.toString()!==o?.toString()&&!i?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qPe(t){return t!==FI}var Tde=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(WPe),providedIn:"root"})}return t})(),y4=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},WPe=(()=>{class t extends y4{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ede=(()=>{class t{urlSerializer=re(u1);options=re(pv,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=re(np);urlHandlingStrategy=re(x4);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new lg;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:i,targetBrowserUrl:o}){let r=e!==void 0?this.urlHandlingStrategy.merge(e,i):i,a=o??r;return a instanceof lg?this.urlSerializer.serialize(a):a}commitTransition({targetRouterState:e,finalUrl:i,initialUrl:o}){i&&e?(this.currentUrlTree=i,this.rawUrlTree=this.urlHandlingStrategy.merge(i,o),this.routerState=e):this.rawUrlTree=o}routerState=cde(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:()=>re(KPe),providedIn:"root"})}return t})(),KPe=(()=>{class t extends Ede{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&setTimeout(()=>{e(i.url,i.state,"popstate")})})}handleRouterEvent(e,i){e instanceof uv?this.updateStateMemento():e instanceof cg?this.commitTransition(i):e instanceof eM?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof tM?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof ag&&e.code!==Iu.SupersededByNewNavigation&&e.code!==Iu.Redirect?this.restoreHistory(i):e instanceof zI?this.restoreHistory(i,!0):e instanceof Hp&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:i,id:o}){let{replaceUrl:r,state:a}=i;if(this.location.isCurrentPathEqualTo(e)||r){let p=this.browserPageId,f=ve(ve({},a),this.generateNgRouterState(o,p));this.location.replaceState(e,"",f)}else{let p=ve(ve({},a),this.generateNgRouterState(o,this.browserPageId+1));this.location.go(e,"",p)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,r=this.currentPageId-o;r!==0?this.location.historyGo(r):this.getCurrentUrlTree()===e.finalUrl&&r===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function w4(t,n){t.events.pipe(ro(e=>e instanceof Hp||e instanceof ag||e instanceof zI||e instanceof cg),vi(e=>e instanceof Hp||e instanceof cg?0:(e instanceof ag?e.code===Iu.Redirect||e.code===Iu.SupersededByNewNavigation:!1)?2:1),ro(e=>e!==2),Ko(1)).subscribe(()=>{n()})}var ZPe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},YPe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},aa=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=re(hB);stateManager=re(Ede);options=re(pv,{optional:!0})||{};pendingTasks=re(Xf);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=re(C4);urlSerializer=re(u1);location=re(np);urlHandlingStrategy=re(x4);injector=re(ua);_events=new xi;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=re(Tde);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=re(WI,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!re(lM,{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 Dr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,r=pl(this.navigationTransitions.currentNavigation);if(o!==null&&r!==null){if(this.stateManager.handleRouterEvent(i,r),i instanceof ag&&i.code!==Iu.Redirect&&i.code!==Iu.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Hp)this.navigated=!0;else if(i instanceof HI){let a=i.navigationBehaviorOptions,p=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),f=ve({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||qPe(o.source)},a);this.scheduleNavigation(p,FI,null,f,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}KOe(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),FI,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i,o)=>{this.navigateToSyncWithBrowser(e,o,i)})}navigateToSyncWithBrowser(e,i,o){let r={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let f=ve({},o);delete f.navigationId,delete f.\u0275routerPageId,Object.keys(f).length!==0&&(r.state=f)}let p=this.parseUrl(e);this.scheduleNavigation(p,i,a,r).catch(f=>{this.disposed||this.injector.get(xu)(f)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return pl(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(nq),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){let{relativeTo:o,queryParams:r,fragment:a,queryParamsHandling:p,preserveFragment:f}=i,x=f?this.currentUrlTree.fragment:a,I=null;switch(p??this.options.defaultQueryParamsHandling){case"merge":I=ve(ve({},this.currentUrlTree.queryParams),r);break;case"preserve":I=this.currentUrlTree.queryParams;break;default:I=r||null}I!==null&&(I=this.removeEmptyProps(I));let D;try{let P=o?o.snapshot:this.routerState.snapshot.root;D=rde(P)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),D=this.currentUrlTree.root}return sde(D,e,I,x??null)}navigateByUrl(e,i={skipLocationChange:!1}){let o=dv(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(r,FI,null,i)}navigate(e,i={skipLocationChange:!1}){return QPe(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let o;if(i===!0?o=ve({},ZPe):i===!1?o=ve({},YPe):o=i,dv(e))return Vce(this.currentUrlTree,e,o);let r=this.parseUrl(e);return Vce(this.currentUrlTree,r,o)}removeEmptyProps(e){return Object.entries(e).reduce((i,[o,r])=>(r!=null&&(i[o]=r),i),{})}scheduleNavigation(e,i,o,r,a){if(this.disposed)return Promise.resolve(!1);let p,f,x;a?(p=a.resolve,f=a.reject,x=a.promise):x=new Promise((D,P)=>{p=D,f=P});let I=this.pendingTasks.add();return w4(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(I))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:r,resolve:p,reject:f,promise:x,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),x.catch(D=>Promise.reject(D))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function QPe(t){for(let n=0;n{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Jn(null);get href(){return pl(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new xi;applicationErrorHandler=re(xu);options=re(pv,{optional:!0});constructor(e,i,o,r,a,p){this.router=e,this.route=i,this.tabIndexAttribute=o,this.renderer=r,this.el=a,this.locationStrategy=p,this.reactiveHref.set(re(new og("href"),{optional:!0}));let f=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=f==="a"||f==="area"||!!(typeof customElements=="object"&&customElements.get(f)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,i=o=>o==="merge"||o==="preserve";e||=i(this.queryParamsHandling),e||=!this.queryParamsHandling&&!i(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(o=>{o instanceof Hp&&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)):(dv(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,i,o,r,a){let p=this.urlTree;if(p===null||this.isAnchorElement&&(e!==0||i||o||r||a||typeof this.target=="string"&&this.target!="_self"))return!0;let f={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(p,f)?.catch(x=>{this.applicationErrorHandler(x)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,i){let o=this.renderer,r=this.el.nativeElement;i!==null?o.setAttribute(r,e,i):o.removeAttribute(r,e)}get urlTree(){return this.routerLinkInput===null?null:dv(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(i){return new(i||t)(rt(aa),rt(Ac),mk("tabindex"),rt(Kr),rt(_n),rt(Im))};static \u0275dir=Ki({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),i&2&&Xe("href",o.reactiveHref(),Z9)("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",lt],skipLocationChange:[2,"skipLocationChange","skipLocationChange",lt],replaceUrl:[2,"replaceUrl","replaceUrl",lt],routerLink:"routerLink"},features:[In]})}return t})(),cq=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new yt;constructor(e,i,o,r,a){this.router=e,this.element=i,this.renderer=o,this.cdr=r,this.link=a,this.routerEventsSubscription=e.events.subscribe(p=>{p instanceof Hp&&this.update()})}ngAfterContentInit(){Ni(this.links.changes,Ni(null)).pipe(Uf()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=vr(e).pipe(Uf()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){let i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(o=>!!o)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let i=XPe(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return o=>{let r=o.urlTree;return r?e.isActive(r,i):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(i){return new(i||t)(rt(aa),rt(_n),rt(Kr),rt(Ho),rt(ba,8))};static \u0275dir=Ki({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(i,o,r){if(i&1&&Ht(r,ba,5),i&2){let a;Je(a=et())&&(o.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[In]})}return t})();function XPe(t){return!!t.paths}var dM=class{};var Ade=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,i,o,r){this.router=e,this.injector=i,this.preloadingStrategy=o,this.loader=r}setUpPreloading(){this.subscription=this.router.events.pipe(ro(e=>e instanceof Hp),Md(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let o=[];for(let r of i){r.providers&&!r._injector&&(r._injector=CI(r.providers,e,`Route: ${r.path}`));let a=r._injector??e,p=r._loadedInjector??a;(r.loadChildren&&!r._loadedRoutes&&r.canLoad===void 0||r.loadComponent&&!r._loadedComponent)&&o.push(this.preloadConfig(a,r)),(r.children||r._loadedRoutes)&&o.push(this.processRoutes(p,r.children??r._loadedRoutes))}return vr(o).pipe(Uf())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let o;i.loadChildren&&i.canLoad===void 0?o=this.loader.loadChildren(e,i):o=Ni(null);let r=o.pipe(Qa(a=>a===null?Ni(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(a.injector??e,a.routes))));if(i.loadComponent&&!i._loadedComponent){let a=this.loader.loadComponent(e,i);return vr([r,a]).pipe(Uf())}else return r})}static \u0275fac=function(i){return new(i||t)(ui(aa),ui(ua),ui(dM),ui(b4))};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dde=new ii(""),JPe=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=FI;restoredId=0;store={};constructor(e,i,o,r,a={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=o,this.zone=r,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 uv?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Hp?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof cg&&e.code===BI.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 UI&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>tt(this,null,function*(){yield new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<"u"&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new UI(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(i){Ck()};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function eLe(t){return t.routerState.root}function uM(t,n){return{\u0275kind:t,\u0275providers:n}}function tLe(){let t=re(Zn);return n=>{let e=t.get(Tc);if(n!==e.components[0])return;let i=t.get(aa),o=t.get(kde);t.get(dq)===1&&i.initialNavigation(),t.get(Ode,null,{optional:!0})?.setUpPreloading(),t.get(Dde,null,{optional:!0})?.init(),i.resetRootComponentType(e.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var kde=new ii("",{factory:()=>new xi}),dq=new ii("",{providedIn:"root",factory:()=>1});function Mde(){let t=[{provide:Y3,useValue:!0},{provide:dq,useValue:0},sv(()=>{let n=re(Zn);return n.get(i$,Promise.resolve()).then(()=>new Promise(i=>{let o=n.get(aa),r=n.get(kde);w4(o,()=>{i(!0)}),n.get(C4).afterPreactivation=()=>(i(!0),r.closed?Ni(void 0):r),o.initialNavigation()}))})];return uM(2,t)}function Rde(){let t=[sv(()=>{re(aa).setUpLocationChangeListener()}),{provide:dq,useValue:2}];return uM(3,t)}var Ode=new ii("");function Pde(t){return uM(0,[{provide:Ode,useExisting:Ade},{provide:dM,useExisting:t}])}function Lde(){return uM(8,[tq,{provide:lM,useExisting:tq}])}function Fde(t){ig("NgRouterViewTransitions");let n=[{provide:rq,useValue:Ide},{provide:sq,useValue:ve({skipNextTransition:!!t?.skipInitialTransition},t)}];return uM(9,n)}var Nde=[np,{provide:u1,useClass:cv},aa,p1,{provide:Ac,useFactory:eLe,deps:[aa]},b4,[]],fd=(()=>{class t{constructor(){}static forRoot(e,i){return{ngModule:t,providers:[Nde,[],{provide:WI,multi:!0,useValue:e},[],i?.errorHandler?{provide:aq,useValue:i.errorHandler}:[],{provide:pv,useValue:i||{}},i?.useHash?nLe():oLe(),iLe(),i?.preloadingStrategy?Pde(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?rLe(i):[],i?.bindToComponentInputs?Lde().\u0275providers:[],i?.enableViewTransitions?Fde().\u0275providers:[],sLe()]}}static forChild(e){return{ngModule:t,providers:[{provide:WI,multi:!0,useValue:e}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();function iLe(){return{provide:Dde,useFactory:()=>{let t=re(yce),n=re(on),e=re(pv),i=re(C4),o=re(u1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new JPe(o,i,t,n,e)}}}function nLe(){return{provide:Im,useClass:u$}}function oLe(){return{provide:Im,useClass:DB}}function rLe(t){return[t.initialNavigation==="disabled"?Rde().\u0275providers:[],t.initialNavigation==="enabledBlocking"?Mde().\u0275providers:[]]}var lq=new ii("");function sLe(){return[{provide:lq,useFactory:tLe},{provide:gB,multi:!0,useExisting:lq}]}var aLe=new ii("BD_FRONTEND_APP_CONFIG"),br=(()=>{class t{static{this.envStoragePrefix="bd.config"}constructor(e){this._appConfig=e,this.store()}store(){if(this._storeValues(this._appConfig.apiEndpoints),this._storeValues(this._appConfig.variables),this._appConfig.helpResources&&this._appConfig.helpResources.length>0){let e=`${t.envStoragePrefix}.BD_HELP_RESOURCE_URLS`;sessionStorage.setItem(e,JSON.stringify(this._appConfig.helpResources))}}_storeValues(e={}){Object.keys(e).forEach(o=>{let r=`${t.envStoragePrefix}.${o}`,a=e[o];a.toString().match('[\\[\\{][\\\\\\"].*([\\"\\\\]|\\w)[\\]\\}]')&&(a=JSON.parse(a)),sessionStorage.setItem(r,JSON.stringify(a))})}load(e,i=!1){let o=`${t.envStoragePrefix}.${e}`,r=sessionStorage.getItem(o),a=null;if(!r&&!i)throw new Error(`${e} is missing in storage.`);try{a=JSON.parse(r)}catch{a=r}return a}static{this.\u0275fac=function(i){return new(i||t)(ui(aLe))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qs=class{constructor(){this._subs=[]}unsubscribeAll(){this._subs.forEach(n=>n.unsubscribe()),this._subs=[]}};var S4=(()=>{class t{resize$(){if(this._resize$)return this._resize$.pipe();throw new Error("BdWindowResizeListenerService: No resize listener attached. Please use BdWindowResizeListenerDirective on a global element.")}set(e){this._resize$=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var zde=(()=>{class t{constructor(e){this._windowResizeListenerService=e,this._resize$=new xi;let i=this._resize$.pipe(ro(o=>o.type==="resize"),ro(o=>o.target instanceof Window),vi(o=>o.target),Zu(100));this._windowResizeListenerService.set(i)}onResizeEvent(e){this._resize$.next(e)}static{this.\u0275fac=function(i){return new(i||t)(rt(S4))}}static{this.\u0275dir=Ki({type:t,selectors:[["","bd-window-resize-listener",""]],hostBindings:function(i,o){i&1&&Qe("resize",function(a){return o.onResizeEvent(a)},eB)}})}}return t})();var Vde=(()=>{class t{constructor(e,i){this._elRef=e,this._windowResizeListener=i,this.widthChange=new yt,this._width$=new xi,this._subs=[];let o=this._windowResizeListener.resize$().subscribe(()=>this._onWindowResize());this._subs.push(o)}ngAfterViewInit(){let e=this._width$.pipe(Ja(this._elRef.nativeElement.clientWidth)).subscribe(i=>this.widthChange.emit(i));this._subs.push(e)}ngOnDestroy(){this._subs.forEach(e=>e.unsubscribe())}_onWindowResize(){this._width$.next(this._elRef.nativeElement.clientWidth)}static{this.\u0275fac=function(i){return new(i||t)(rt(_n),rt(S4))}}static{this.\u0275dir=Ki({type:t,selectors:[["","bd-width-measurement",""]],outputs:{widthChange:"widthChange"}})}}return t})();var Ude=class t{static loadFrontendConfig(n,e){let i=t.frontendConfigUrl(e.configRequestMethod,e.configRequestUrl);return fetch(i,{method:e.configRequestMethod,mode:"cors",body:e.configRequestMethod==="GET"?null:JSON.stringify(n),headers:new Headers({"content-type":"application/json"})}).then(o=>o.json())}static frontendConfigUrl(n,e){let i=t.extractHostname(window.location.origin,!0);return n==="GET"?e:`${window.location.protocol}//frontend-config-api.${i}${e}`}static extractHostname(n,e=!1){let i;if(n.indexOf("://")>-1?i=n.split("/")[2]:i=n.split("/")[0],i=i.split(":")[0],i=i.split("?")[0],e){let o=i.split(".");i=o[o.length-2]+"."+o[o.length-1]}return i}};var pM=class{_attachedHost;attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;n!=null&&(this._attachedHost=null,n.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},hv=class extends pM{component;viewContainerRef;injector;projectableNodes;constructor(n,e,i,o){super(),this.component=n,this.viewContainerRef=e,this.injector=i,this.projectableNodes=o}},Dm=class extends pM{templateRef;viewContainerRef;context;injector;constructor(n,e,i,o){super(),this.templateRef=n,this.viewContainerRef=e,this.context=i,this.injector=o}get origin(){return this.templateRef.elementRef}attach(n,e=this.context){return this.context=e,super.attach(n)}detach(){return this.context=void 0,super.detach()}},uq=class extends pM{element;constructor(n){super(),this.element=n instanceof _n?n.nativeElement:n}},KI=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(n){if(n instanceof hv)return this._attachedPortal=n,this.attachComponentPortal(n);if(n instanceof Dm)return this._attachedPortal=n,this.attachTemplatePortal(n);if(this.attachDomPortal&&n instanceof uq)return this._attachedPortal=n,this.attachDomPortal(n)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},hM=class extends KI{outletElement;_appRef;_defaultInjector;constructor(n,e,i){super(),this.outletElement=n,this._appRef=e,this._defaultInjector=i}attachComponentPortal(n){let e;if(n.viewContainerRef){let i=n.injector||n.viewContainerRef.injector,o=i.get(bm,null,{optional:!0})||void 0;e=n.viewContainerRef.createComponent(n.component,{index:n.viewContainerRef.length,injector:i,ngModuleRef:o,projectableNodes:n.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else{let i=this._appRef,o=n.injector||this._defaultInjector||Zn.NULL,r=o.get(ua,i.injector);e=EI(n.component,{elementInjector:o,environmentInjector:r,projectableNodes:n.projectableNodes||void 0}),i.attachView(e.hostView),this.setDisposeFn(()=>{i.viewCount>0&&i.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=n,e}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(o=>this.outletElement.appendChild(o)),i.detectChanges(),this.setDisposeFn(()=>{let o=e.indexOf(i);o!==-1&&e.remove(o)}),this._attachedPortal=n,i}attachDomPortal=n=>{let e=n.element;e.parentNode;let i=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),this._attachedPortal=n,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}};var mM=(()=>{class t extends KI{_moduleRef=re(bm,{optional:!0});_document=re(zn);_viewContainerRef=re(Ga);_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 yt;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,o=i.createComponent(e.component,{index:i.length,injector:e.injector||i.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return i!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=e,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachDomPortal=e=>{let i=e.element;i.parentNode;let o=this._document.createComment("dom-portal");e.setAttachedHost(this),i.parentNode.insertBefore(o,i),this._getRootNode().appendChild(i),this._attachedPortal=e,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(i,o)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Rt]})}return t})();var h1=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();function m1(t){return t.buttons===0||t.detail===0}function f1(t){let n=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!n&&n.identifier===-1&&(n.radiusX==null||n.radiusX===1)&&(n.radiusY==null||n.radiusY===1)}var pq;function Hde(){if(pq==null){let t=typeof document<"u"?document.head:null;pq=!!(t&&(t.createShadowRoot||t.attachShadow))}return pq}function hq(t){if(Hde()){let n=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}function mv(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function gd(t){return t.composedPath?t.composedPath()[0]:t.target}var mq;try{mq=typeof Intl<"u"&&Intl.v8BreakIterator}catch{mq=!1}var gs=(()=>{class t{_platformId=re(Xc);isBrowser=this._platformId?ns(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||mq)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var fM;function jde(){if(fM==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>fM=!0}))}finally{fM=fM||!1}return fM}function fv(t){return jde()?t:!!t.capture}function jp(t,n=0){return Gde(t)?Number(t):arguments.length===2?n:0}function Gde(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Tu(t){return t instanceof _n?t.nativeElement:t}var $de=new ii("cdk-input-modality-detector-options"),qde={ignoreKeys:[18,17,224,91,16]},Wde=650,fq={passive:!0,capture:!0},Kde=(()=>{class t{_platform=re(gs);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Ms(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(i=>i===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=gd(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(f1(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=gd(e)};constructor(){let e=re(on),i=re(zn),o=re($de,{optional:!0});if(this._options=ve(ve({},qde),o),this.modalityDetected=this._modality.pipe(B2(1)),this.modalityChanged=this.modalityDetected.pipe(Fp()),this._platform.isBrowser){let r=re(dl).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(i,"keydown",this._onKeydown,fq),r.listen(i,"mousedown",this._onMousedown,fq),r.listen(i,"touchstart",this._onTouchstart,fq)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),gM=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(gM||{}),Zde=new ii("cdk-focus-monitor-default-options"),I4=fv({passive:!0,capture:!0}),dg=(()=>{class t{_ngZone=re(on);_platform=re(gs);_inputModalityDetector=re(Kde);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=re(zn);_stopInputModalityDetector=new xi;constructor(){let e=re(Zde,{optional:!0});this._detectionMode=e?.detectionMode||gM.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let i=gd(e);for(let o=i;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,i=!1){let o=Tu(e);if(!this._platform.isBrowser||o.nodeType!==1)return Ni();let r=hq(o)||this._document,a=this._elementInfo.get(o);if(a)return i&&(a.checkChildren=!0),a.subject;let p={checkChildren:i,subject:new xi,rootNode:r};return this._elementInfo.set(o,p),this._registerGlobalListeners(p),p.subject}stopMonitoring(e){let i=Tu(e),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(e,i,o){let r=Tu(e),a=this._document.activeElement;r===a?this._getClosestElementsInfo(r).forEach(([p,f])=>this._originChanged(p,i,f)):(this._setOrigin(i),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===gM.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused",i==="touch"),e.classList.toggle("cdk-keyboard-focused",i==="keyboard"),e.classList.toggle("cdk-mouse-focused",i==="mouse"),e.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&i,this._detectionMode===gM.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?Wde:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,i){let o=this._elementInfo.get(i),r=gd(e);!o||!o.checkChildren&&i!==r||this._originChanged(i,this._getFocusOrigin(r),o)}_onBlur(e,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,I4),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,I4)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Wr(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,I4),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,I4),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,o){this._setClasses(e,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&i.push([r,o])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let a=0;a{class t{_appRef;_injector=re(Zn);_environmentInjector=re(ua);load(e){let i=this._appRef=this._appRef||this._injector.get(Tc),o=T4.get(i);o||(o={loaders:new Set,refs:[]},T4.set(i,o),i.onDestroy(()=>{T4.get(i)?.refs.forEach(r=>r.destroy()),T4.delete(i)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(EI(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ZI=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(i,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} `],encapsulation:2,changeDetection:0})}return t})();function n0(t){return Array.isArray(t)?t:[t]}var Yde=new Set,g1,E4=(()=>{class t{_platform=re(gs);_nonce=re(ov,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):cLe}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&lLe(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lLe(t,n){if(!Yde.has(t))try{g1||(g1=document.createElement("style"),n&&g1.setAttribute("nonce",n),g1.setAttribute("type","text/css"),document.head.appendChild(g1)),g1.sheet&&(g1.sheet.insertRule(`@media ${t} {body{ }}`,0),Yde.add(t))}catch(e){console.error(e)}}function cLe(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var Eu=(()=>{class t{_mediaMatcher=re(E4);_zone=re(on);_queries=new Map;_destroySubject=new xi;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Qde(n0(e)).some(o=>this._registerQuery(o).mql.matches)}observe(e){let o=Qde(n0(e)).map(a=>this._registerQuery(a).observable),r=_u(o);return r=Hf(r.pipe(Ko(1)),r.pipe(B2(1),Zu(0))),r.pipe(vi(a=>{let p={matches:!1,breakpoints:{}};return a.forEach(({matches:f,query:x})=>{p.matches=p.matches||f,p.breakpoints[x]=f}),p}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),r={observable:new Co(a=>{let p=f=>this._zone.run(()=>a.next(f));return i.addListener(p),()=>{i.removeListener(p)}}).pipe(Ja(i),vi(({matches:a})=>({query:e,matches:a})),Wr(this._destroySubject)),mql:i};return this._queries.set(e,r),r}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qde(t){return t.map(n=>n.split(",")).reduce((n,e)=>n.concat(e)).map(n=>n.trim())}function dLe(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let n=0;n{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Jde=(()=>{class t{_mutationObserverFactory=re(Xde);_observedElements=new Map;_ngZone=re(on);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){let i=Tu(e);return new Co(o=>{let a=this._observeElement(i).pipe(vi(p=>p.filter(f=>!dLe(f))),ro(p=>!!p.length)).subscribe(p=>{this._ngZone.run(()=>{o.next(p)})});return()=>{a.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let i=new xi,o=this._mutationObserverFactory.create(r=>i.next(r));o&&o.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:o,stream:i,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:i,stream:o}=this._observedElements.get(e);i&&i.disconnect(),o.complete(),this._observedElements.delete(e)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),eue=(()=>{class t{_contentObserver=re(Jde);_elementRef=re(_n);event=new yt;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=jp(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(Zu(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",lt],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),YI=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[Xde]})}return t})();var yq=(()=>{class t{_platform=re(gs);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return pLe(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=uLe(bLe(e));if(i&&(tue(i)===-1||!this.isVisible(i)))return!1;let o=e.nodeName.toLowerCase(),r=tue(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!yLe(e)?!1:o==="audio"?e.hasAttribute("controls")?r!==-1:!1:o==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,i){return vLe(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uLe(t){try{return t.frameElement}catch{return null}}function pLe(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function hLe(t){let n=t.nodeName.toLowerCase();return n==="input"||n==="select"||n==="button"||n==="textarea"}function mLe(t){return gLe(t)&&t.type=="hidden"}function fLe(t){return _Le(t)&&t.hasAttribute("href")}function gLe(t){return t.nodeName.toLowerCase()=="input"}function _Le(t){return t.nodeName.toLowerCase()=="a"}function oue(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let n=t.getAttribute("tabindex");return!!(n&&!isNaN(parseInt(n,10)))}function tue(t){if(!oue(t))return null;let n=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}function yLe(t){let n=t.nodeName.toLowerCase(),e=n==="input"&&t.type;return e==="text"||e==="password"||n==="select"||n==="textarea"}function vLe(t){return mLe(t)?!1:hLe(t)||fLe(t)||t.hasAttribute("contenteditable")||oue(t)}function bLe(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var _q=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_enabled=!0;constructor(n,e,i,o,r=!1,a){this._element=n,this._checker=e,this._ngZone=i,this._document=o,this._injector=a,r||this.attachAnchors()}destroy(){let n=this._startAnchor,e=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){let e=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return n=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let i=this._getFirstTabbableElement(e);return i?.focus(n),!!i}return e.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){let e=this._getRegionBoundary("start");return e&&e.focus(n),!!e}focusLastTabbableElement(n){let e=this._getRegionBoundary("end");return e&&e.focus(n),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let e=n.children;for(let i=0;i=0;i--){let o=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(o)return o}return null}_createAnchor(){let n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,e){n?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._injector?Ic(n,{injector:this._injector}):setTimeout(n)}},vq=(()=>{class t{_checker=re(yq);_ngZone=re(on);_document=re(zn);_injector=re(Zn);constructor(){re(Ol).load(ZI)}create(e,i=!1){return new _q(e,this._checker,this._ngZone,this._document,i,this._injector)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var rue=new ii("liveAnnouncerElement",{providedIn:"root",factory:sue});function sue(){return null}var aue=new ii("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),xLe=0,bq=(()=>{class t{_ngZone=re(on);_defaultOptions=re(aue,{optional:!0});_liveElement;_document=re(zn);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=re(rue,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...i){let o=this._defaultOptions,r,a;return i.length===1&&typeof i[0]=="number"?a=i[0]:[r,a]=i,this.clear(),clearTimeout(this._previousTimeout),r||(r=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",r),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(p=>this._currentResolve=p)),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",i=this._document.getElementsByClassName(e),o=this._document.createElement("div");for(let r=0;r .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{class t{_platform=re(gs);_hasCheckedHighContrastMode;_document=re(zn);_breakpointSubscription;constructor(){this._breakpointSubscription=re(Eu).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return gv.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,o=i&&i.getComputedStyle?i.getComputedStyle(e):null,r=(o&&o.backgroundColor||"").replace(/ /g,"");switch(e.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return gv.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return gv.BLACK_ON_WHITE}return gv.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(gq,iue,nue),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===gv.BLACK_ON_WHITE?e.add(gq,iue):i===gv.WHITE_ON_BLACK&&e.add(gq,nue)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_M=(()=>{class t{constructor(){re(A4)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[YI]})}return t})();function Pl(t,...n){return n.length?n.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}function xq(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function ql(t){return t==null?"":typeof t=="string"?t:`${t}px`}var CLe=new ii("cdk-dir-doc",{providedIn:"root",factory:wLe});function wLe(){return re(zn)}var SLe=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function lue(t){let n=t?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?SLe.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var kc=(()=>{class t{get value(){return this.valueSignal()}valueSignal=Jn("ltr");change=new yt;constructor(){let e=re(CLe,{optional:!0});if(e){let i=e.body?e.body.dir:null,o=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(lue(i||o||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var km=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(km||{}),D4,_1;function k4(){if(_1==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return _1=!1,_1;if("scrollBehavior"in document.documentElement.style)_1=!0;else{let t=Element.prototype.scrollTo;t?_1=!/\{\s*\[native code\]\s*\}/.test(t.toString()):_1=!1}}return _1}function QI(){if(typeof document!="object"||!document)return km.NORMAL;if(D4==null){let t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",t.appendChild(e),document.body.appendChild(t),D4=km.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,D4=t.scrollLeft===0?km.NEGATED:km.INVERTED),t.remove()}return D4}var _v=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var ILe=20,yv=(()=>{class t{_ngZone=re(on);_platform=re(gs);_renderer=re(dl).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new xi;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=ILe){return this._platform.isBrowser?new Co(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=e>0?this._scrolled.pipe(WN(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Ni()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let o=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(ro(r=>!r||o.indexOf(r)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((o,r)=>{this._scrollableContainsElement(r,e)&&i.push(r)}),i}_scrollableContainsElement(e,i){let o=Tu(i),r=e.getElementRef().nativeElement;do if(o==r)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Cq=(()=>{class t{elementRef=re(_n);scrollDispatcher=re(yv);ngZone=re(on);dir=re(kc,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new xi;_renderer=re(Kr);_cleanupScroll;_elementScrolled=new xi;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let i=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=o?e.end:e.start),e.right==null&&(e.right=o?e.start:e.end),e.bottom!=null&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),o&&QI()!=km.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),QI()==km.INVERTED?e.left=e.right:QI()==km.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;k4()?i.scrollTo(e):(e.top!=null&&(i.scrollTop=e.top),e.left!=null&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",o="right",r=this.elementRef.nativeElement;if(e=="top")return r.scrollTop;if(e=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let a=this.dir&&this.dir.value=="rtl";return e=="start"?e=a?o:i:e=="end"&&(e=a?i:o),a&&QI()==km.INVERTED?e==i?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:a&&QI()==km.NEGATED?e==i?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:e==i?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})(),TLe=20,Rm=(()=>{class t{_platform=re(gs);_listeners;_viewportSize;_change=new xi;_document=re(zn);constructor(){let e=re(on),i=re(dl).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=r=>this._change.next(r);this._listeners=[i.listen("window","resize",o),i.listen("window","orientationchange",o)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:o}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+o,right:e.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),o=e.documentElement,r=o.getBoundingClientRect(),a=-r.top||e.body.scrollTop||i.scrollY||o.scrollTop||0,p=-r.left||e.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:a,left:p}}change(e=TLe){return e>0?this._change.pipe(WN(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Mm=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})(),wq=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[_v,Mm,_v,Mm]})}return t})();var Sq={},qa=(()=>{class t{_appId=re(nv);getId(e){return this._appId!=="ng"&&(e+=this._appId),Sq.hasOwnProperty(e)||(Sq[e]=0),`${e}${Sq[e]++}`}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cue=k4();function eT(t){return new M4(t.get(Rm),t.get(zn))}var M4=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(n,e){this._viewportRuler=n,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=ql(-this._previousScrollPosition.left),n.style.top=ql(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let n=this._document.documentElement,e=this._document.body,i=n.style,o=e.style,r=i.scrollBehavior||"",a=o.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),cue&&(i.scrollBehavior=o.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),cue&&(i.scrollBehavior=r,o.scrollBehavior=a)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};function gue(t,n){return new R4(t.get(yv),t.get(on),t.get(Rm),n)}var R4=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(n,e,i,o){this._scrollDispatcher=n,this._ngZone=e,this._viewportRuler=i,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(this._scrollSubscription)return;let n=this._scrollDispatcher.scrolled(0).pipe(ro(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var yM=class{enable(){}disable(){}attach(){}};function Iq(t,n){return n.some(e=>{let i=t.bottome.bottom,r=t.righte.right;return i||o||r||a})}function due(t,n){return n.some(e=>{let i=t.tope.bottom,r=t.lefte.right;return i||o||r||a})}function Nd(t,n){return new O4(t.get(yv),t.get(Rm),t.get(on),n)}var O4=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(n,e,i,o){this._scrollDispatcher=n,this._viewportRuler=e,this._ngZone=i,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(!this._scrollSubscription){let n=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(n).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:o}=this._viewportRuler.getViewportSize();Iq(e,[{width:i,height:o,bottom:o,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},_ue=(()=>{class t{_injector=re(Zn);constructor(){}noop=()=>new yM;close=e=>gue(this._injector,e);block=()=>eT(this._injector);reposition=e=>Nd(this._injector,e);static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Om=class{positionStrategy;scrollStrategy=new yM;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(n){if(n){let e=Object.keys(n);for(let i of e)n[i]!==void 0&&(this[i]=n[i])}}};var P4=class{connectionPair;scrollableViewProperties;constructor(n,e){this.connectionPair=n,this.scrollableViewProperties=e}};var yue=(()=>{class t{_attachedOverlays=[];_document=re(zn);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vue=(()=>{class t extends yue{_ngZone=re(on);_renderer=re(dl).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let i=this._attachedOverlays;for(let o=i.length-1;o>-1;o--)if(i[o]._keydownEvents.observers.length>0){this._ngZone.run(()=>i[o]._keydownEvents.next(e));break}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bue=(()=>{class t extends yue{_platform=re(gs);_ngZone=re(on);_renderer=re(dl).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(e){if(super.add(e),!this._isAttached){let i=this._document.body,o={capture:!0},r=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[r.listen(i,"pointerdown",this._pointerDownListener,o),r.listen(i,"click",this._clickListener,o),r.listen(i,"auxclick",this._clickListener,o),r.listen(i,"contextmenu",this._clickListener,o)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=gd(e)};_clickListener=e=>{let i=gd(e),o=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:i;this._pointerDownEventTarget=null;let r=this._attachedOverlays.slice();for(let a=r.length-1;a>-1;a--){let p=r[a];if(p._outsidePointerEvents.observers.length<1||!p.hasAttached())continue;if(uue(p.overlayElement,i)||uue(p.overlayElement,o))break;let f=p._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>f.next(e)):f.next(e)}};static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uue(t,n){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=n;for(;i;){if(i===t)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var xue=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll} `],encapsulation:2,changeDetection:0})}return t})(),N4=(()=>{class t{_platform=re(gs);_containerElement;_document=re(zn);_styleLoader=re(Ol);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||xq()){let o=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let r=0;r{let n=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(n,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),n.style.pointerEvents="none",n.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},XI=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new xi;_attachments=new xi;_detachments=new xi;_positionStrategy;_scrollStrategy;_locationChanges=Dr.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new xi;_outsidePointerEvents=new xi;_afterNextRenderRef;constructor(n,e,i,o,r,a,p,f,x,I=!1,D,P){this._portalOutlet=n,this._host=e,this._pane=i,this._config=o,this._ngZone=r,this._keyboardDispatcher=a,this._document=p,this._location=f,this._outsideClickDispatcher=x,this._animationsDisabled=I,this._injector=D,this._renderer=P,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Ic(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let n=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){let n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,n&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config=ve(ve({},this._config),n),this._updateElementSize()}setDirection(n){this._config=gt(ve({},this._config),{direction:n}),this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){let n=this._config.direction;return n?typeof n=="string"?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let n=this._pane.style;n.width=ql(this._config.width),n.height=ql(this._config.height),n.minWidth=ql(this._config.minWidth),n.minHeight=ql(this._config.minHeight),n.maxWidth=ql(this._config.maxWidth),n.maxHeight=ql(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){let n="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Tq(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(n))}):this._backdropRef.element.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(n,e,i){let o=n0(e||[]).filter(r=>!!r);o.length&&(i?n.classList.add(...o):n.classList.remove(...o))}_detachContentWhenEmpty(){let n=!1;try{this._detachContentAfterRenderRef=Ic(()=>{n=!0,this._detachContent()},{injector:this._injector})}catch(e){if(n)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let n=this._scrollStrategy;n?.disable(),n?.detach?.()}},pue="cdk-overlay-connected-position-bounding-box",ALe=/([A-Za-z%]+)$/;function o0(t,n){return new L4(n,t.get(Rm),t.get(zn),t.get(gs),t.get(N4))}var L4=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 xi;_resizeSubscription=Dr.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(n,e,i,o,r){this._viewportRuler=e,this._document=i,this._platform=o,this._overlayContainer=r,this.setOrigin(n)}attach(n){this._overlayRef&&this._overlayRef,this._validatePositions(),n.hostElement.classList.add(pue),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._originRect,e=this._overlayRect,i=this._viewportRect,o=this._containerRect,r=[],a;for(let p of this._preferredPositions){let f=this._getOriginPoint(n,o,p),x=this._getOverlayPoint(f,e,p),I=this._getOverlayFit(x,e,i,p);if(I.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(p,f);return}if(this._canFitWithFlexibleDimensions(I,x,i)){r.push({position:p,origin:f,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(f,p)});continue}(!a||a.overlayFit.visibleAreaf&&(f=I,p=x)}this._isPushed=!1,this._applyPosition(p.position,p.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&&y1(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(pue),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,e)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,n.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,e,i){let o;if(i.originX=="center")o=n.left+n.width/2;else{let a=this._isRtl()?n.right:n.left,p=this._isRtl()?n.left:n.right;o=i.originX=="start"?a:p}e.left<0&&(o-=e.left);let r;return i.originY=="center"?r=n.top+n.height/2:r=i.originY=="top"?n.top:n.bottom,e.top<0&&(r-=e.top),{x:o,y:r}}_getOverlayPoint(n,e,i){let o;i.overlayX=="center"?o=-e.width/2:i.overlayX==="start"?o=this._isRtl()?-e.width:0:o=this._isRtl()?0:-e.width;let r;return i.overlayY=="center"?r=-e.height/2:r=i.overlayY=="top"?0:-e.height,{x:n.x+o,y:n.y+r}}_getOverlayFit(n,e,i,o){let r=mue(e),{x:a,y:p}=n,f=this._getOffset(o,"x"),x=this._getOffset(o,"y");f&&(a+=f),x&&(p+=x);let I=0-a,D=a+r.width-i.width,P=0-p,R=p+r.height-i.height,j=this._subtractOverflows(r.width,I,D),$=this._subtractOverflows(r.height,P,R),W=j*$;return{visibleArea:W,isCompletelyWithinViewport:r.width*r.height===W,fitsInViewportVertically:$===r.height,fitsInViewportHorizontally:j==r.width}}_canFitWithFlexibleDimensions(n,e,i){if(this._hasFlexibleDimensions){let o=i.bottom-e.y,r=i.right-e.x,a=hue(this._overlayRef.getConfig().minHeight),p=hue(this._overlayRef.getConfig().minWidth),f=n.fitsInViewportVertically||a!=null&&a<=o,x=n.fitsInViewportHorizontally||p!=null&&p<=r;return f&&x}return!1}_pushOverlayOnScreen(n,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};let o=mue(e),r=this._viewportRect,a=Math.max(n.x+o.width-r.width,0),p=Math.max(n.y+o.height-r.height,0),f=Math.max(r.top-i.top-n.y,0),x=Math.max(r.left-i.left-n.x,0),I=0,D=0;return o.width<=r.width?I=x||-a:I=n.xj&&!this._isInitialRender&&!this._growAfterOpen&&(a=n.y-j/2)}let f=e.overlayX==="start"&&!o||e.overlayX==="end"&&o,x=e.overlayX==="end"&&!o||e.overlayX==="start"&&o,I,D,P;if(x)P=i.width-n.x+this._viewportMargin*2,I=n.x-this._viewportMargin;else if(f)D=n.x,I=i.right-n.x;else{let R=Math.min(i.right-n.x+i.left,n.x),j=this._lastBoundingBoxSize.width;I=R*2,D=n.x-R,I>j&&!this._isInitialRender&&!this._growAfterOpen&&(D=n.x-j/2)}return{top:a,left:D,bottom:p,right:P,width:I,height:r}}_setBoundingBoxStyles(n,e){let i=this._calculateBoundingBoxRect(n,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let o={};if(this._hasExactPosition())o.top=o.left="0",o.bottom=o.right=o.maxHeight=o.maxWidth="",o.width=o.height="100%";else{let r=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;o.height=ql(i.height),o.top=ql(i.top),o.bottom=ql(i.bottom),o.width=ql(i.width),o.left=ql(i.left),o.right=ql(i.right),e.overlayX==="center"?o.alignItems="center":o.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?o.justifyContent="center":o.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",r&&(o.maxHeight=ql(r)),a&&(o.maxWidth=ql(a))}this._lastBoundingBoxSize=i,y1(this._boundingBox.style,o)}_resetBoundingBoxStyles(){y1(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){y1(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,e){let i={},o=this._hasExactPosition(),r=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(o){let I=this._viewportRuler.getViewportScrollPosition();y1(i,this._getExactOverlayY(e,n,I)),y1(i,this._getExactOverlayX(e,n,I))}else i.position="static";let p="",f=this._getOffset(e,"x"),x=this._getOffset(e,"y");f&&(p+=`translateX(${f}px) `),x&&(p+=`translateY(${x}px)`),i.transform=p.trim(),a.maxHeight&&(o?i.maxHeight=ql(a.maxHeight):r&&(i.maxHeight="")),a.maxWidth&&(o?i.maxWidth=ql(a.maxWidth):r&&(i.maxWidth="")),y1(this._pane.style,i)}_getExactOverlayY(n,e,i){let o={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,n);if(this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i)),n.overlayY==="bottom"){let a=this._document.documentElement.clientHeight;o.bottom=`${a-(r.y+this._overlayRect.height)}px`}else o.top=ql(r.y);return o}_getExactOverlayX(n,e,i){let o={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,n);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,i));let a;if(this._isRtl()?a=n.overlayX==="end"?"left":"right":a=n.overlayX==="end"?"right":"left",a==="right"){let p=this._document.documentElement.clientWidth;o.right=`${p-(r.x+this._overlayRect.width)}px`}else o.left=ql(r.x);return o}_getScrollVisibility(){let n=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(o=>o.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:due(n,i),isOriginOutsideView:Iq(n,i),isOverlayClipped:due(e,i),isOverlayOutsideView:Iq(e,i)}}_subtractOverflows(n,...e){return e.reduce((i,o)=>i-Math.max(o,0),n)}_getNarrowedViewportRect(){let n=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+n-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:n-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,e){return e==="x"?n.offsetX==null?this._offsetX:n.offsetX:n.offsetY==null?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&n0(n).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){let n=this._origin;if(n instanceof _n)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();let e=n.width||0,i=n.height||0;return{top:n.y,bottom:n.y+i,left:n.x,right:n.x+e,height:i,width:e}}};function y1(t,n){for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function hue(t){if(typeof t!="number"&&t!=null){let[n,e]=t.split(ALe);return!e||e==="px"?parseFloat(n):null}return t||null}function mue(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 DLe(t,n){return t===n?!0:t.isOriginClipped===n.isOriginClipped&&t.isOriginOutsideView===n.isOriginOutsideView&&t.isOverlayClipped===n.isOverlayClipped&&t.isOverlayOutsideView===n.isOverlayOutsideView}var fue="cdk-global-overlay-wrapper";function tT(t){return new F4}var F4=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(n){let e=n.getConfig();this._overlayRef=n,this._width&&!e.width&&n.updateSize({width:this._width}),this._height&&!e.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(fue),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:o,height:r,maxWidth:a,maxHeight:p}=i,f=(o==="100%"||o==="100vw")&&(!a||a==="100%"||a==="100vw"),x=(r==="100%"||r==="100vh")&&(!p||p==="100%"||p==="100vh"),I=this._xPosition,D=this._xOffset,P=this._overlayRef.getConfig().direction==="rtl",R="",j="",$="";f?$="flex-start":I==="center"?($="center",P?j=D:R=D):P?I==="left"||I==="end"?($="flex-end",R=D):(I==="right"||I==="start")&&($="flex-start",j=D):I==="left"||I==="start"?($="flex-start",R=D):(I==="right"||I==="end")&&($="flex-end",j=D),n.position=this._cssPosition,n.marginLeft=f?"0":R,n.marginTop=x?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=f?"0":j,e.justifyContent=$,e.alignItems=x?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(fue),i.justifyContent=i.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}},Cue=(()=>{class t{_injector=re(Zn);constructor(){}global(){return tT()}flexibleConnectedTo(e){return o0(this._injector,e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Pm(t,n){t.get(Ol).load(xue);let e=t.get(N4),i=t.get(zn),o=t.get(qa),r=t.get(Tc),a=t.get(kc),p=i.createElement("div"),f=i.createElement("div");f.id=o.getId("cdk-overlay-"),f.classList.add("cdk-overlay-pane"),p.appendChild(f),e.getContainerElement().appendChild(p);let x=new hM(f,r,t),I=new Om(n),D=t.get(Kr,null,{optional:!0})||t.get(dl).createRenderer(null,null);return I.direction=I.direction||a.value,new XI(x,p,f,I,t.get(on),t.get(vue),i,t.get(np),t.get(bue),n?.disableAnimations??t.get(fk,null,{optional:!0})==="NoopAnimations",t.get(ua),D)}var wue=(()=>{class t{scrollStrategies=re(_ue);_positionBuilder=re(Cue);_injector=re(Zn);constructor(){}create(e){return Pm(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),kLe=[{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"}],Sue=new ii("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>Nd(t)}}),JI=(()=>{class t{elementRef=re(_n);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return t})(),B4=(()=>{class t{_dir=re(kc,{optional:!0});_injector=re(Zn);_overlayRef;_templatePortal;_backdropSubscription=Dr.EMPTY;_attachSubscription=Dr.EMPTY;_detachSubscription=Dr.EMPTY;_positionSubscription=Dr.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=re(Sue);_disposeOnNavigation=!1;_ngZone=re(on);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 yt;positionChange=new yt;attach=new yt;detach=new yt;overlayKeydown=new yt;overlayOutsideClick=new yt;constructor(){let e=re(Ml),i=re(Ga);this._templatePortal=new Dm(e,i),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=kLe);let e=this._overlayRef=Pm(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!Pl(i)&&(i.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{let o=this._getOriginElement(),r=gd(i);(!o||o!==r&&!o.contains(r))&&this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Om({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=o0(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof JI?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof JI?this.origin.elementRef.nativeElement:this.origin instanceof _n?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(z2(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({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",lt],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",lt],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",lt],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",lt],push:[2,"cdkConnectedOverlayPush","push",lt],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",lt]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[In]})}return t})();function MLe(t){let n=re(Zn);return()=>Nd(n)}var RLe={provide:Sue,useFactory:MLe},Gp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[wue,RLe],imports:[_v,h1,wq,wq]})}return t})();function OLe(t,n){}var vv=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 Aq=(()=>{class t extends KI{_elementRef=re(_n);_focusTrapFactory=re(vq);_config;_interactivityChecker=re(yq);_ngZone=re(on);_focusMonitor=re(dg);_renderer=re(Kr);_changeDetectorRef=re(Ho);_injector=re(Zn);_platform=re(gs);_document=re(zn);_portalOutlet;_focusTrapped=new xi;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=re(vv,{optional:!0})||new vv,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}attachDomPortal=e=>{this._portalOutlet.hasAttached();let i=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),i};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{r(),a(),e.removeAttribute("tabindex")},r=this._renderer.listen(e,"blur",o),a=this._renderer.listen(e,"mousedown",o)})),e.focus(i)}_focusByCssSelector(e,i){let o=this._elementRef.nativeElement.querySelector(e);o&&this._forceFocus(o,i)}_trapFocus(e){this._isDestroyed||Ic(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus(e);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let o=mv(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,i=mv();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=mv()))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["cdk-dialog-container"]],viewQuery:function(i,o){if(i&1&&Qi(mM,7),i&2){let r;Je(r=et())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,o){i&2&&Xe("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[Rt],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,o){i&1&&le(0,OLe,0,0,"ng-template",0)},dependencies:[mM],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit} `],encapsulation:2})}return t})(),vM=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new xi;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(n,e){this.overlayRef=n,this.config=e,this.disableClose=e.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!Pl(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=n.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(n,e){if(this._canClose(n)){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(n),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",e=""){return this.overlayRef.updateSize({width:n,height:e}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}_canClose(n){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(n,e,this.componentInstance))}},PLe=new ii("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>eT(t)}}),LLe=new ii("DialogData"),FLe=new ii("DefaultDialogConfig");function NLe(t){let n=Jn(t),e=new yt;return{valueSignal:n,get value(){return n()},change:e,ngOnDestroy(){e.complete()}}}var Dq=(()=>{class t{_injector=re(Zn);_defaultOptions=re(FLe,{optional:!0});_parentDialog=re(t,{optional:!0,skipSelf:!0});_overlayContainer=re(N4);_idGenerator=re(qa);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new xi;_afterOpenedAtThisLevel=new xi;_ariaHiddenElements=new Map;_scrollStrategy=re(PLe);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=yu(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ja(void 0)));constructor(){}open(e,i){let o=this._defaultOptions||new vv;i=ve(ve({},o),i),i.id=i.id||this._idGenerator.getId("cdk-dialog-"),i.id&&this.getDialogById(i.id);let r=this._getOverlayConfig(i),a=Pm(this._injector,r),p=new vM(a,i),f=this._attachContainer(a,p,i);if(p.containerInstance=f,!this.openDialogs.length){let x=this._overlayContainer.getContainerElement();f._focusTrapped?f._focusTrapped.pipe(Ko(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(x)}):this._hideNonDialogContentFromAssistiveTechnology(x)}return this._attachDialogContent(e,p,f,i),this.openDialogs.push(p),p.closed.subscribe(()=>this._removeOpenDialog(p,!0)),this.afterOpened.next(p),p}closeAll(){Eq(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){Eq(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Eq(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Om({positionStrategy:e.positionStrategy||tT().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,o){let r=o.injector||o.viewContainerRef?.injector,a=[{provide:vv,useValue:o},{provide:vM,useValue:i},{provide:XI,useValue:e}],p;o.container?typeof o.container=="function"?p=o.container:(p=o.container.type,a.push(...o.container.providers(o))):p=Aq;let f=new hv(p,o.viewContainerRef,Zn.create({parent:r||this._injector,providers:a}));return e.attach(f).instance}_attachDialogContent(e,i,o,r){if(e instanceof Ml){let a=this._createInjector(r,i,o,void 0),p={$implicit:r.data,dialogRef:i};r.templateContext&&(p=ve(ve({},p),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new Dm(e,null,p,a))}else{let a=this._createInjector(r,i,o,this._injector),p=o.attachComponentPortal(new hv(e,r.viewContainerRef,a));i.componentRef=p,i.componentInstance=p.instance}}_createInjector(e,i,o,r){let a=e.injector||e.viewContainerRef?.injector,p=[{provide:LLe,useValue:e.data},{provide:vM,useValue:i}];return e.providers&&(typeof e.providers=="function"?p.push(...e.providers(i,e,o)):p.push(...e.providers)),e.direction&&(!a||!a.get(kc,null,{optional:!0}))&&p.push({provide:kc,useValue:NLe(e.direction)}),Zn.create({parent:a||r,providers:p})}_removeOpenDialog(e,i){let o=this.openDialogs.indexOf(e);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,a)=>{r?a.setAttribute("aria-hidden",r):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let i=e.parentElement.children;for(let o=i.length-1;o>-1;o--){let r=i[o];r!==e&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Eq(t,n){let e=t.length;for(;e--;)n(t[e])}var Iue=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[Dq],imports:[Gp,h1,_M,h1]})}return t})();function id(t){return t!=null&&`${t}`!="false"}var _d={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 BLe=new ii("MATERIAL_ANIMATIONS");var Tue=null;function xM(){return re(BLe,{optional:!0})?.animationsDisabled||re(fk,{optional:!0})==="NoopAnimations"?"di-disabled":(Tue??=re(E4).matchMedia("(prefers-reduced-motion)").matches,Tue?"reduced-motion":"enabled")}function xa(){return xM()!=="enabled"}var zLe=200,z4=class{_letterKeyStream=new xi;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new xi;selectedItem=this._selectedItem;constructor(n,e){let i=typeof e?.debounceInterval=="number"?e.debounceInterval:zLe;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(n),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(n){this._selectedItemIndex=n}setItems(n){this._items=n}handleKey(n){let e=n.keyCode;n.key&&n.key.length===1?this._letterKeyStream.next(n.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(n){this._letterKeyStream.pipe(Er(e=>this._pressedLetters.push(e)),Zu(n),ro(()=>this._pressedLetters.length>0),vi(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let i=1;in.disabled;constructor(n,e){this._items=n,n instanceof Z_?this._itemChangesSubscription=n.changes.subscribe(i=>this._itemsChanged(i.toArray())):Qf(n)&&(this._effectRef=Gl(()=>this._itemsChanged(n()),{injector:e}))}tabOut=new xi;change=new xi;skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new z4(e,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(n=!0){return this._homeAndEnd=n,this}withPageUpDown(n=!0,e=10){return this._pageUpAndDown={enabled:n,delta:e},this}setActiveItem(n){let e=this._activeItem();this.updateActiveItem(n),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(n){let e=n.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(r=>!n[r]||this._allowedModifierKeys.indexOf(r)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(r>0?r:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(r-1&&i!==this._activeItemIndex()&&(this._activeItemIndex.set(i),this._typeahead?.setCurrentSelectedItemIndex(i))}}};var b1=class extends iT{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}};var SM=class extends iT{_origin="program";setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}};var kue=" ";function nT(t,n,e){let i=U4(t,n);e=e.trim(),!i.some(o=>o.trim()===e)&&(i.push(e),t.setAttribute(n,i.join(kue)))}function xv(t,n,e){let i=U4(t,n);e=e.trim();let o=i.filter(r=>r!==e);o.length?t.setAttribute(n,o.join(kue)):t.removeAttribute(n)}function U4(t,n){return t.getAttribute(n)?.match(/\S+/g)??[]}var Mue="cdk-describedby-message",V4="cdk-describedby-host",Mq=0,Rue=(()=>{class t{_platform=re(gs);_document=re(zn);_messageRegistry=new Map;_messagesContainer=null;_id=`${Mq++}`;constructor(){re(Ol).load(ZI),this._id=re(nv)+"-"+Mq++}describe(e,i,o){if(!this._canBeDescribed(e,i))return;let r=kq(i,o);typeof i!="string"?(Due(i,this._id),this._messageRegistry.set(r,{messageElement:i,referenceCount:0})):this._messageRegistry.has(r)||this._createMessageElement(i,o),this._isElementDescribedByMessage(e,r)||this._addMessageReference(e,r)}removeDescription(e,i,o){if(!i||!this._isElementNode(e))return;let r=kq(i,o);if(this._isElementDescribedByMessage(e,r)&&this._removeMessageReference(e,r),typeof i=="string"){let a=this._messageRegistry.get(r);a&&a.referenceCount===0&&this._deleteMessageElement(r)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${V4}="${this._id}"]`);for(let i=0;io.indexOf(Mue)!=0);e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let o=this._messageRegistry.get(i);nT(e,"aria-describedby",o.messageElement.id),e.setAttribute(V4,this._id),o.referenceCount++}_removeMessageReference(e,i){let o=this._messageRegistry.get(i);o.referenceCount--,xv(e,"aria-describedby",o.messageElement.id),e.removeAttribute(V4)}_isElementDescribedByMessage(e,i){let o=U4(e,"aria-describedby"),r=this._messageRegistry.get(i),a=r&&r.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&typeof i=="object")return!0;let o=i==null?"":`${i}`.trim(),r=e.getAttribute("aria-label");return o?!r||r.trim()!==o:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kq(t,n){return typeof t=="string"?`${n||""}/${t}`:t}function Due(t,n){t.id||(t.id=`${Mue}-${n}-${Mq++}`)}var Xo=(()=>{class t{constructor(){re(A4)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[_v,_v]})}return t})();function VLe(t,n){}var x1=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},Rq="mdc-dialog--open",Oue="mdc-dialog--opening",Pue="mdc-dialog--closing",ULe=150,HLe=75,Nue=(()=>{class t extends Aq{_animationStateChanged=new yt;_animationsEnabled=!xa();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?Fue(this._config.enterAnimationDuration)??ULe:0;_exitAnimationDuration=this._animationsEnabled?Fue(this._config.exitAnimationDuration)??HLe:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Lue,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Oue,Rq)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Rq),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Rq),this._animationsEnabled?(this._hostElement.style.setProperty(Lue,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Pue)),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(Oue,Pue)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,o){i&2&&(Bo("id",o._config.id),Xe("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),fo("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[Rt],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1),le(2,VLe,0,0,"ng-template",2),Z()())},dependencies:[mM],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})(),Lue="--mat-dialog-transition-duration";function Fue(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?jp(t.substring(0,t.length-2)):t.endsWith("s")?jp(t.substring(0,t.length-1))*1e3:t==="0"?0:null}var IM=(function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t})(IM||{}),ug=class{_ref;_config;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new xi;_beforeClosed=new xi;_result;_closeFallbackTimeout;_state=IM.OPEN;_closeInteractionType;constructor(n,e,i){this._ref=n,this._config=e,this._containerInstance=i,this.disableClose=e.disableClose,this.id=n.id,n.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(ro(o=>o.state==="opened"),Ko(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(ro(o=>o.state==="closed"),Ko(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),xc(this.backdropClick(),this.keydownEvents().pipe(ro(o=>o.keyCode===27&&!this.disableClose&&!Pl(o)))).subscribe(o=>{this.disableClose||(o.preventDefault(),Oq(this,o.type==="keydown"?"keyboard":"mouse"))})}close(n){let e=this._config.closePredicate;e&&!e(n,this._config,this.componentInstance)||(this._result=n,this._containerInstance._animationStateChanged.pipe(ro(i=>i.state==="closing"),Ko(1)).subscribe(i=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),i.totalTime+100)}),this._state=IM.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let e=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?e.left(n.left):e.right(n.right):e.centerHorizontally(),n&&(n.top||n.bottom)?n.top?e.top(n.top):e.bottom(n.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",e=""){return this._ref.updateSize(n,e),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=IM.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Oq(t,n,e){return t._closeInteractionType=n,t.close(e)}var oT=new ii("MatMdcDialogData"),Bue=new ii("mat-mdc-dialog-default-options"),zue=new ii("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>eT(t)}}),pg=(()=>{class t{_defaultOptions=re(Bue,{optional:!0});_scrollStrategy=re(zue);_parentDialog=re(t,{optional:!0,skipSelf:!0});_idGenerator=re(qa);_injector=re(Zn);_dialog=re(Dq);_animationsDisabled=xa();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new xi;_afterOpenedAtThisLevel=new xi;dialogConfigClass=x1;_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=yu(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ja(void 0)));constructor(){this._dialogRefConstructor=ug,this._dialogContainerType=Nue,this._dialogDataToken=oT}open(e,i){let o;i=ve(ve({},this._defaultOptions||new x1),i),i.id=i.id||this._idGenerator.getId("mat-mdc-dialog-"),i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(e,gt(ve({},i),{positionStrategy:tT(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||i.enterAnimationDuration?.toLocaleString()==="0"||i.exitAnimationDuration?.toString()==="0",container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:vv,useValue:i}]},templateContext:()=>({dialogRef:o}),providers:(a,p,f)=>(o=new this._dialogRefConstructor(a,i,f),o.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:f},{provide:this._dialogDataToken,useValue:p.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),TM=(()=>{class t{dialogRef=re(ug,{optional:!0});_elementRef=re(_n);_dialog=re(pg);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=Uue(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){Oq(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o._onButtonClick(a)}),i&2&&Xe("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[In]})}return t})(),Vue=(()=>{class t{_dialogRef=re(ug,{optional:!0});_elementRef=re(_n);_dialog=re(pg);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=Uue(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t})}return t})(),EM=(()=>{class t extends Vue{id=re(qa).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(i,o){i&2&&Bo("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[Rt]})}return t})(),C1=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[i1([Cq])]})}return t})(),w1=(()=>{class t extends Vue{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,o){i&2&&fo("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},features:[Rt]})}return t})();function Uue(t,n){let e=t.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?n.find(i=>i.id===e.id):null}var jLe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[pg],imports:[Iue,Gp,h1,Xo,Xo]})}return t})();var H4=class{static getResponsiveConfig(){let n=new x1;return n.maxHeight="80vh",n.width=n.maxWidth="100%",n.height=n.maxHeight="100%",n.panelClass=["mat-dialog-container-fullscreen"],n}};var rT=(()=>{class t{constructor(e){this._breakpointObserver=e,this._destroyed=new xi}config(){return this._breakpointObserver.isMatched([_d.XSmall])?H4.getResponsiveConfig():{width:"80vw",maxHeight:"80vh"}}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(ui(Eu))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var nLt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({providers:[rT]})}}return t})();var j4=class{constructor(n,e,i){this.dialogTitle=n,this.dialogMessage=e,this.dialogSubmitButtonText=i}};var sT,Hue=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function Pq(){if(sT)return sT;if(typeof document!="object"||!document)return sT=new Set(Hue),sT;let t=document.createElement("input");return sT=new Set(Hue.filter(n=>(t.setAttribute("type",n),t.type===n))),sT}var Mh=(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})(Mh||{}),Lq=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=Mh.HIDDEN;constructor(n,e,i,o=!1){this._renderer=n,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=o}fadeOut(){this._renderer.fadeOutRipple(this)}},jue=fv({passive:!0,capture:!0}),Fq=class{_events=new Map;addHandler(n,e,i,o){let r=this._events.get(e);if(r){let a=r.get(i);a?a.add(o):r.set(i,new Set([o]))}else this._events.set(e,new Map([[i,new Set([o])]])),n.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,jue)})}removeHandler(n,e,i){let o=this._events.get(n);if(!o)return;let r=o.get(e);r&&(r.delete(i),r.size===0&&o.delete(e),o.size===0&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,jue)))}_delegateEventHandler=n=>{let e=gd(n);e&&this._events.get(n.type)?.forEach((i,o)=>{(o===e||o.contains(e))&&i.forEach(r=>r.handleEvent(n))})}},DM={enterDuration:225,exitDuration:150},GLe=800,Gue=fv({passive:!0,capture:!0}),$ue=["mousedown","touchstart"],que=["mouseup","mouseleave","touchend","touchcancel"],$Le=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none} `],encapsulation:2,changeDetection:0})}return t})(),S1=class t{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new Fq;constructor(n,e,i,o,r){this._target=n,this._ngZone=e,this._platform=o,o.isBrowser&&(this._containerElement=Tu(i)),r&&r.get(Ol).load($Le)}fadeInRipple(n,e,i={}){let o=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=ve(ve({},DM),i.animation);i.centered&&(n=o.left+o.width/2,e=o.top+o.height/2);let a=i.radius||qLe(n,e,o),p=n-o.left,f=e-o.top,x=r.enterDuration,I=document.createElement("div");I.classList.add("mat-ripple-element"),I.style.left=`${p-a}px`,I.style.top=`${f-a}px`,I.style.height=`${a*2}px`,I.style.width=`${a*2}px`,i.color!=null&&(I.style.backgroundColor=i.color),I.style.transitionDuration=`${x}ms`,this._containerElement.appendChild(I);let D=window.getComputedStyle(I),P=D.transitionProperty,R=D.transitionDuration,j=P==="none"||R==="0s"||R==="0s, 0s"||o.width===0&&o.height===0,$=new Lq(this,I,i,j);I.style.transform="scale3d(1, 1, 1)",$.state=Mh.FADING_IN,i.persistent||(this._mostRecentTransientRipple=$);let W=null;return!j&&(x||r.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let Q=()=>{W&&(W.fallbackTimer=null),clearTimeout(ge),this._finishRippleTransition($)},se=()=>this._destroyRipple($),ge=setTimeout(se,x+100);I.addEventListener("transitionend",Q),I.addEventListener("transitioncancel",se),W={onTransitionEnd:Q,onTransitionCancel:se,fallbackTimer:ge}}),this._activeRipples.set($,W),(j||!x)&&this._finishRippleTransition($),$}fadeOutRipple(n){if(n.state===Mh.FADING_OUT||n.state===Mh.HIDDEN)return;let e=n.element,i=ve(ve({},DM),n.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",n.state=Mh.FADING_OUT,(n._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){let e=Tu(n);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,$ue.forEach(i=>{t._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(n){n.type==="mousedown"?this._onMousedown(n):n.type==="touchstart"?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{que.forEach(e=>{this._triggerElement.addEventListener(e,this,Gue)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===Mh.FADING_IN?this._startFadeOutTransition(n):n.state===Mh.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){let e=n===this._mostRecentTransientRipple,{persistent:i}=n.config;n.state=Mh.VISIBLE,!i&&(!e||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){let e=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=Mh.HIDDEN,e!==null&&(n.element.removeEventListener("transitionend",e.onTransitionEnd),n.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),n.element.remove()}_onMousedown(n){let e=m1(n),i=this._lastTouchStartEvent&&Date.now(){let e=n.state===Mh.VISIBLE||n.config.terminateOnPointerUp&&n.state===Mh.FADING_IN;!n.config.persistent&&e&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let n=this._triggerElement;n&&($ue.forEach(e=>t._eventManager.removeHandler(e,n,this)),this._pointerUpEventsRegistered&&(que.forEach(e=>n.removeEventListener(e,this,Gue)),this._pointerUpEventsRegistered=!1))}};function qLe(t,n,e){let i=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),o=Math.max(Math.abs(n-e.top),Math.abs(n-e.bottom));return Math.sqrt(i*i+o*o)}var kM=new ii("mat-ripple-global-options"),aT=(()=>{class t{_elementRef=re(_n);_animationsDisabled=xa();color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=re(on),i=re(gs),o=re(kM,{optional:!0}),r=re(Zn);this._globalOptions=o||{},this._rippleRenderer=new S1(this,e,this._elementRef,i,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:ve(ve(ve({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,o){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,i,ve(ve({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,ve(ve({},this.rippleConfig),e))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return t})();var WLe={capture:!0},KLe=["focus","mousedown","mouseenter","touchstart"],Nq="mat-ripple-loader-uninitialized",Bq="mat-ripple-loader-class-name",Wue="mat-ripple-loader-centered",G4="mat-ripple-loader-disabled",Kue=(()=>{class t{_document=re(zn);_animationsDisabled=xa();_globalRippleOptions=re(kM,{optional:!0});_platform=re(gs);_ngZone=re(on);_injector=re(Zn);_eventCleanups;_hosts=new Map;constructor(){let e=re(dl).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>KLe.map(i=>e.listen(this._document,i,this._onInteraction,WLe)))}ngOnDestroy(){let e=this._hosts.keys();for(let i of e)this.destroyRipple(i);this._eventCleanups.forEach(i=>i())}configureRipple(e,i){e.setAttribute(Nq,this._globalRippleOptions?.namespace??""),(i.className||!e.hasAttribute(Bq))&&e.setAttribute(Bq,i.className||""),i.centered&&e.setAttribute(Wue,""),i.disabled&&e.setAttribute(G4,"")}setDisabled(e,i){let o=this._hosts.get(e);o?(o.target.rippleDisabled=i,!i&&!o.hasSetUpEvents&&(o.hasSetUpEvents=!0,o.renderer.setupTriggerEvents(e))):i?e.setAttribute(G4,""):e.removeAttribute(G4)}_onInteraction=e=>{let i=gd(e);if(i instanceof HTMLElement){let o=i.closest(`[${Nq}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let i=this._document.createElement("span");i.classList.add("mat-ripple",e.getAttribute(Bq)),e.append(i);let o=this._globalRippleOptions,r=this._animationsDisabled?0:o?.animation?.enterDuration??DM.enterDuration,a=this._animationsDisabled?0:o?.animation?.exitDuration??DM.exitDuration,p={rippleDisabled:this._animationsDisabled||o?.disabled||e.hasAttribute(G4),rippleConfig:{centered:e.hasAttribute(Wue),terminateOnPointerUp:o?.terminateOnPointerUp,animation:{enterDuration:r,exitDuration:a}}},f=new S1(p,this._ngZone,i,this._platform,this._injector),x=!p.rippleDisabled;x&&f.setupTriggerEvents(e),this._hosts.set(e,{target:p,renderer:f,hasSetUpEvents:x}),e.removeAttribute(Nq)}destroyRipple(e){let i=this._hosts.get(e);i&&(i.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hg=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(i,o){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} `],encapsulation:2,changeDetection:0})}return t})();var ZLe=["mat-icon-button",""],YLe=["*"],QLe=new ii("MAT_BUTTON_CONFIG");function Zue(t){return t==null?void 0:wn(t)}var zq=(()=>{class t{_elementRef=re(_n);_ngZone=re(on);_animationsDisabled=xa();_config=re(QLe,{optional:!0});_focusMonitor=re(dg);_cleanupClick;_renderer=re(Kr);_rippleLoader=re(Kue);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){re(Ol).load(hg);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(i,o){i&2&&(Xe("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled())("tabindex",o._getTabIndex()),Ge(o.color?"mat-"+o.color:""),fo("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("mat-unthemed",!o.color)("_mat-animation-noopable",o._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",lt],disabled:[2,"disabled","disabled",lt],ariaDisabled:[2,"aria-disabled","ariaDisabled",lt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",lt],tabIndex:[2,"tabIndex","tabIndex",Zue],_tabindex:[2,"tabindex","_tabindex",Zue]}})}return t})(),yd=(()=>{class t extends zq{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({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:[Rt],attrs:ZLe,ngContentSelectors:YLe,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,o){i&1&&(eo(),mn(0,"span",0),yn(1),mn(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();var Cv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Xo]})}return t})();var XLe=["matButton",""],JLe=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],eFe=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var Yue=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"]]]),_s=(()=>{class t extends zq{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=tFe(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let i=this._elementRef.nativeElement.classList,o=this._appearance?Yue.get(this._appearance):null,r=Yue.get(e);o&&i.remove(...o),i.add(...r),this._appearance=e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({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:[Rt],attrs:XLe,ngContentSelectors:eFe,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,o){i&1&&(eo(JLe),mn(0,"span",0),yn(1),jn(2,"span",1),yn(3,1),Yn(),yn(4,2),mn(5,"span",2)(6,"span",3)),i&2&&fo("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus>.mat-focus-indicator::before,.mat-mdc-raised-button:focus>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus>.mat-focus-indicator::before,.mat-tonal-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)} `,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} `],encapsulation:2,changeDetection:0})}return t})();function tFe(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 Jo=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Cv,Xo]})}return t})();var Que=(()=>{class t{constructor(e){this.data=e}static{this.\u0275fac=function(i){return new(i||t)(rt(oT))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:9,vars:5,consts:[["mat-dialog-title",""],[3,"align"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(i,o){i&1&&(K(0,"h1",0),Ce(1),Z(),K(2,"mat-dialog-content"),Ce(3),Z(),K(4,"mat-dialog-actions",1)(5,"button",2),Ce(6,"Abbrechen"),Z(),K(7,"button",3),Ce(8),Z()()),i&2&&(L(),qn(" ",o.data.dialogTitle," "),L(2),qn(" ",o.data.dialogMessage," "),L(),B("align","end"),L(3),B("mat-dialog-close",!0),L(),qn(" ",o.data.dialogSubmitButtonText," "))},dependencies:[EM,C1,w1,Jo,_s,TM],styles:["*[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}"]})}}return t})();var Xue=(()=>{class t{constructor(e){this.dialog=e}get(e="Objekt l\xF6schen",i="Best\xE4tigen um das Objekt endg\xFCltig zu l\xF6schen.",o="L\xF6schen"){let r={data:new j4(e,i,o)},a=this.dialog.open(Que,r);return F_(a.afterClosed())}static{this.\u0275fac=function(i){return new(i||t)(ui(pg))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function iFe(t,n){return Math.round(t/n)*n}function Jue(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function nFe(t){return Array.isArray(t)?t:[t]}function oFe(t){t=String(t);var n=t.split(".");return n.length>1?n[1].length:0}function Uq(t,n){return 100/(n-t)}function Vq(t,n,e){return n*100/(t[e+1]-t[e])}function rFe(t,n){return Vq(t,t[0]<0?n+Math.abs(t[0]):n-t[0],0)}function sFe(t,n){return n*(t[1]-t[0])/100+t[0]}function MM(t,n){for(var e=1;t>=n[e];)e+=1;return e}function aFe(t,n,e){if(e>=t.slice(-1)[0])return 100;var i=MM(e,t),o=t[i-1],r=t[i],a=n[i-1],p=n[i];return a+rFe([o,r],e)/Uq(a,p)}function lFe(t,n,e){if(e>=100)return t.slice(-1)[0];var i=MM(e,n),o=t[i-1],r=t[i],a=n[i-1],p=n[i];return sFe([o,r],(e-a)*Uq(a,p))}function cFe(t,n,e,i){if(i===100)return i;var o=MM(i,t),r=t[o-1],a=t[o];return e?i-r>(a-r)/2?a:r:n[o-1]?t[o-1]+iFe(i-t[o-1],n[o-1]):i}var IFt=(function(){function t(n,e,i){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=e;var o,r=[];for(Object.keys(n).forEach(function(a){r.push([nFe(n[a]),a])}),r.sort(function(a,p){return a[0][0]-p[0][0]}),o=0;othis.xPct[o+1];)o++;else n===this.xPct[this.xPct.length-1]&&(o=this.xPct.length-2);!i&&n===this.xPct[o+1]&&o++,e===null&&(e=[]);var r,a=1,p=e[o],f=0,x=0,I=0,D=0;for(i?r=(n-this.xPct[o])/(this.xPct[o+1]-this.xPct[o]):r=(this.xPct[o+1]-n)/(this.xPct[o+1]-this.xPct[o]);p>0;)f=this.xPct[o+1+D]-this.xPct[o+D],e[o+D]*a+100-r*100>100?(x=f*r,a=(p-100*r)/e[o+D],r=1):(x=e[o+D]*f/100*a,a=0),i?(I=I-x,this.xPct.length+D>=1&&D--):(I=I+x,this.xPct.length-D>=1&&D++),p=e[o+D]*a;return n+I},t.prototype.toStepping=function(n){return n=aFe(this.xVal,this.xPct,n),n},t.prototype.fromStepping=function(n){return lFe(this.xVal,this.xPct,n)},t.prototype.getStep=function(n){return n=cFe(this.xPct,this.xSteps,this.snap,n),n},t.prototype.getDefaultStep=function(n,e,i){var o=MM(n,this.xPct);return(n===100||e&&n===this.xPct[o-1])&&(o=Math.max(o-1,1)),(this.xVal[o]-this.xVal[o-1])/i},t.prototype.getNearbySteps=function(n){var e=MM(n,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var n=this.xNumSteps.map(oFe);return Math.max.apply(null,n)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(n){return this.getStep(this.toStepping(n))},t.prototype.handleEntryPoint=function(n,e){var i;if(n==="min"?i=0:n==="max"?i=100:i=parseFloat(n),!Jue(i)||!Jue(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(i),this.xVal.push(e[0]);var o=Number(e[1]);i?this.xSteps.push(isNaN(o)?!1:o):isNaN(o)||(this.xSteps[0]=o),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(n,e){if(e){if(this.xVal[n]===this.xVal[n+1]){this.xSteps[n]=this.xHighestCompleteStep[n]=this.xVal[n];return}this.xSteps[n]=Vq([this.xVal[n],this.xVal[n+1]],e,0)/Uq(this.xPct[n],this.xPct[n+1]);var i=(this.xVal[n+1]-this.xVal[n])/this.xNumSteps[n],o=Math.ceil(Number(i.toFixed(3))-1),r=this.xVal[n]+this.xNumSteps[n]*o;this.xHighestCompleteStep[n]=r}},t})();var spe=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||t)(rt(Kr),rt(_n))};static \u0275dir=Ki({type:t})}return t})(),dFe=(()=>{class t extends spe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,features:[Rt]})}return t})(),Wa=new ii("");var uFe={provide:Wa,useExisting:Br(()=>Sv),multi:!0};function pFe(){let t=ip()?ip().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var hFe=new ii(""),Sv=(()=>{class t extends spe{_compositionMode;_composing=!1;constructor(e,i,o){super(e,i),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!pFe())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||t)(rt(Kr),rt(_n),rt(hFe,8))};static \u0275dir=Ki({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&Qe("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[Pi([uFe]),Rt]})}return t})();function jq(t){return t==null||Gq(t)===0}function Gq(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Iv=new ii(""),BM=new ii(""),mFe=/^(?=.{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])?)*$/,Bd=class{static min(n){return fFe(n)}static max(n){return gFe(n)}static required(n){return ape(n)}static requiredTrue(n){return _Fe(n)}static email(n){return yFe(n)}static minLength(n){return vFe(n)}static maxLength(n){return bFe(n)}static pattern(n){return xFe(n)}static nullValidator(n){return q4()}static compose(n){return hpe(n)}static composeAsync(n){return mpe(n)}};function fFe(t){return n=>{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}function ape(t){return jq(t.value)?{required:!0}:null}function _Fe(t){return t.value===!0?null:{required:!0}}function yFe(t){return jq(t.value)||mFe.test(t.value)?null:{email:!0}}function vFe(t){return n=>{let e=n.value?.length??Gq(n.value);return e===null||e===0?null:e{let e=n.value?.length??Gq(n.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function xFe(t){if(!t)return q4;let n,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if(jq(i.value))return null;let o=i.value;return n.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function q4(t){return null}function lpe(t){return t!=null}function cpe(t){return J_(t)?vr(t):t}function dpe(t){let n={};return t.forEach(e=>{n=e!=null?ve(ve({},n),e):n}),Object.keys(n).length===0?null:n}function upe(t,n){return n.map(e=>e(t))}function CFe(t){return!t.validate}function ppe(t){return t.map(n=>CFe(n)?n:e=>n.validate(e))}function hpe(t){if(!t)return null;let n=t.filter(lpe);return n.length==0?null:function(e){return dpe(upe(e,n))}}function $q(t){return t!=null?hpe(ppe(t)):null}function mpe(t){if(!t)return null;let n=t.filter(lpe);return n.length==0?null:function(e){let i=upe(e,n).map(cpe);return Hl(i).pipe(vi(dpe))}}function qq(t){return t!=null?mpe(ppe(t)):null}function epe(t,n){return t===null?[n]:Array.isArray(t)?[...t,n]:[t,n]}function fpe(t){return t._rawValidators}function gpe(t){return t._rawAsyncValidators}function Hq(t){return t?Array.isArray(t)?t:[t]:[]}function W4(t,n){return Array.isArray(t)?t.includes(n):t===n}function tpe(t,n){let e=Hq(n);return Hq(t).forEach(o=>{W4(e,o)||e.push(o)}),e}function ipe(t,n){return Hq(n).filter(e=>!W4(t,e))}var K4=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=$q(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=qq(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},r0=class extends K4{name;get formDirective(){return null}get path(){return null}},Wl=class extends K4{_parent=null;name=null;valueAccessor=null},Z4=class{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},wFe={"[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"},QFt=gt(ve({},wFe),{"[class.ng-submitted]":"isSubmitted"}),il=(()=>{class t extends Z4{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(rt(Wl,2))};static \u0275dir=Ki({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&fo("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[Rt]})}return t})(),nz=(()=>{class t extends Z4{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(rt(r0,10))};static \u0275dir=Ki({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,o){i&2&&fo("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[Rt]})}return t})();var RM="VALID",$4="INVALID",lT="PENDING",OM="DISABLED",wv=class{},Y4=class extends wv{value;source;constructor(n,e){super(),this.value=n,this.source=e}},LM=class extends wv{pristine;source;constructor(n,e){super(),this.pristine=n,this.source=e}},FM=class extends wv{touched;source;constructor(n,e){super(),this.touched=n,this.source=e}},cT=class extends wv{status;source;constructor(n,e){super(),this.status=n,this.source=e}},Q4=class extends wv{source;constructor(n){super(),this.source=n}},X4=class extends wv{source;constructor(n){super(),this.source=n}};function _pe(t){return(oz(t)?t.validators:t)||null}function SFe(t){return Array.isArray(t)?$q(t):t||null}function ype(t,n){return(oz(n)?n.asyncValidators:t)||null}function IFe(t){return Array.isArray(t)?qq(t):t||null}function oz(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function TFe(t,n,e){let i=t.controls;if(!(n?Object.keys(i):i).length)throw new fn(1e3,"");if(!i[e])throw new fn(1001,"")}function EFe(t,n,e){t._forEachChild((i,o)=>{if(e[o]===void 0)throw new fn(1002,"")})}var J4=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,e){this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return pl(this.statusReactive)}set status(n){pl(()=>this.statusReactive.set(n))}_status=Do(()=>this.statusReactive());statusReactive=Jn(void 0);get valid(){return this.status===RM}get invalid(){return this.status===$4}get pending(){return this.status==lT}get disabled(){return this.status===OM}get enabled(){return this.status!==OM}errors;get pristine(){return pl(this.pristineReactive)}set pristine(n){pl(()=>this.pristineReactive.set(n))}_pristine=Do(()=>this.pristineReactive());pristineReactive=Jn(!0);get dirty(){return!this.pristine}get touched(){return pl(this.touchedReactive)}set touched(n){pl(()=>this.touchedReactive.set(n))}_touched=Do(()=>this.touchedReactive());touchedReactive=Jn(!1);get untouched(){return!this.touched}_events=new xi;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(tpe(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(tpe(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(ipe(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(ipe(n,this._rawAsyncValidators))}hasValidator(n){return W4(this._rawValidators,n)}hasAsyncValidator(n){return W4(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let e=this.touched===!1;this.touched=!0;let i=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsTouched(gt(ve({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new FM(!0,i))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(n))}markAsUntouched(n={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:i})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,i),e&&n.emitEvent!==!1&&this._events.next(new FM(!1,i))}markAsDirty(n={}){let e=this.pristine===!0;this.pristine=!1;let i=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsDirty(gt(ve({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new LM(!1,i))}markAsPristine(n={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n,i),e&&n.emitEvent!==!1&&this._events.next(new LM(!0,i))}markAsPending(n={}){this.status=lT;let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new cT(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.markAsPending(gt(ve({},n),{sourceControl:e}))}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=OM,this.errors=null,this._forEachChild(o=>{o.disable(gt(ve({},n),{onlySelf:!0}))}),this._updateValue();let i=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new Y4(this.value,i)),this._events.next(new cT(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(gt(ve({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=RM,this._forEachChild(i=>{i.enable(gt(ve({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(gt(ve({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n,e){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===RM||this.status===lT)&&this._runAsyncValidator(i,n.emitEvent)}let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new Y4(this.value,e)),this._events.next(new cT(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(gt(ve({},n),{sourceControl:e}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?OM:RM}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,e){if(this.asyncValidator){this.status=lT,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:n!==!1};let i=cpe(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(n,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,e,i){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||i)&&this._events.next(new cT(this.status,e)),this._parent&&this._parent._updateControlsErrors(n,e,i)}_initObservables(){this.valueChanges=new yt,this.statusChanges=new yt}_calculateStatus(){return this._allControlsDisabled()?OM:this.errors?$4:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(lT)?lT:this._anyControlsHaveStatus($4)?$4:RM}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,e){let i=!this._anyControlsDirty(),o=this.pristine!==i;this.pristine=i,this._parent&&!n.onlySelf&&this._parent._updatePristine(n,e),o&&this._events.next(new LM(this.pristine,e))}_updateTouched(n={},e){this.touched=this._anyControlsTouched(),this._events.next(new FM(this.touched,e)),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,e)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){oz(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){let e=this._parent&&this._parent.dirty;return!n&&!!e&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=SFe(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=IFe(this._rawAsyncValidators)}},dT=class extends J4{constructor(n,e,i){super(_pe(e),ype(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){EFe(this,!0,n),Object.keys(n).forEach(i=>{TFe(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(Object.keys(n).forEach(i=>{let o=this.controls[i];o&&o.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,o)=>{i.reset(n?n[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(e,i,o)=>((i.enabled||this.disabled)&&(e[o]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((o,r)=>{i=e(i,o,r)}),i}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var uT=new ii("",{providedIn:"root",factory:()=>rz}),rz="always";function vpe(t,n){return[...n.path,t]}function NM(t,n,e=rz){Wq(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(t.disabled),DFe(t,n),MFe(t,n),kFe(t,n),AFe(t,n)}function ez(t,n,e=!0){let i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),iz(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function tz(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function AFe(t,n){if(n.valueAccessor.setDisabledState){let e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function Wq(t,n){let e=fpe(t);n.validator!==null?t.setValidators(epe(e,n.validator)):typeof e=="function"&&t.setValidators([e]);let i=gpe(t);n.asyncValidator!==null?t.setAsyncValidators(epe(i,n.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let o=()=>t.updateValueAndValidity();tz(n._rawValidators,o),tz(n._rawAsyncValidators,o)}function iz(t,n){let e=!1;if(t!==null){if(n.validator!==null){let o=fpe(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==n.validator);r.length!==o.length&&(e=!0,t.setValidators(r))}}if(n.asyncValidator!==null){let o=gpe(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==n.asyncValidator);r.length!==o.length&&(e=!0,t.setAsyncValidators(r))}}}let i=()=>{};return tz(n._rawValidators,i),tz(n._rawAsyncValidators,i),e}function DFe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&bpe(t,n)})}function kFe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&bpe(t,n),t.updateOn!=="submit"&&t.markAsTouched()})}function bpe(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function MFe(t,n){let e=(i,o)=>{n.valueAccessor.writeValue(i),o&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function xpe(t,n){t==null,Wq(t,n)}function RFe(t,n){return iz(t,n)}function Kq(t,n){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function OFe(t){return Object.getPrototypeOf(t.constructor)===dFe}function Cpe(t,n){t._syncPendingControls(),n.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Zq(t,n){if(!n)return null;Array.isArray(n);let e,i,o;return n.forEach(r=>{r.constructor===Sv?e=r:OFe(r)?i=r:o=r}),o||i||e||null}function PFe(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var LFe={provide:r0,useExisting:Br(()=>I1)},PM=Promise.resolve(),I1=(()=>{class t extends r0{callSetDisabledState;get submitted(){return pl(this.submittedReactive)}_submitted=Do(()=>this.submittedReactive());submittedReactive=Jn(!1);_directives=new Set;form;ngSubmit=new yt;options;constructor(e,i,o){super(),this.callSetDisabledState=o,this.form=new dT({},$q(e),qq(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){PM.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),NM(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){PM.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){PM.then(()=>{let i=this._findContainer(e.path),o=new dT({});xpe(o,e),i.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){PM.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){PM.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Cpe(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Q4(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 X4(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||t)(rt(Iv,10),rt(BM,10),rt(uT,8))};static \u0275dir=Ki({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,o){i&1&&Qe("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Pi([LFe]),Rt]})}return t})();function npe(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}function ope(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var dc=class extends J4{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,e,i){super(_pe(e),ype(i,e)),this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),oz(e)&&(e.nonNullable||e.initialValueIsDefault)&&(ope(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){npe(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){npe(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){ope(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},pT=dc,FFe=t=>t instanceof dc;var NFe={provide:Wl,useExisting:Br(()=>Rh)},rpe=Promise.resolve(),Rh=(()=>{class t extends Wl{_changeDetectorRef;callSetDisabledState;control=new dc;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yt;constructor(e,i,o,r,a,p){super(),this._changeDetectorRef=a,this.callSetDisabledState=p,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Zq(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Kq(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(){NM(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){rpe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,o=i!==0&<(i);rpe.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?vpe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||t)(rt(r0,9),rt(Iv,10),rt(BM,10),rt(Wa,10),rt(Ho,8),rt(uT,8))};static \u0275dir=Ki({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:[Pi([NFe]),Rt,In]})}return t})();var sz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})();var Yq=new ii(""),BFe={provide:Wl,useExisting:Br(()=>$p)},$p=(()=>{class t extends Wl{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new yt;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,r,a){super(),this._ngModelWarningConfig=r,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Zq(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ez(i,this,!1),NM(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Kq(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ez(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||t)(rt(Iv,10),rt(BM,10),rt(Wa,10),rt(Yq,8),rt(uT,8))};static \u0275dir=Ki({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:[Pi([BFe]),Rt,In]})}return t})(),zFe={provide:r0,useExisting:Br(()=>T1)},T1=(()=>{class t extends r0{callSetDisabledState;get submitted(){return pl(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Do(()=>this._submittedReactive());_submittedReactive=Jn(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new yt;constructor(e,i,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(iz(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return NM(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ez(e.control||null,e,!1),PFe(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),Cpe(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Q4(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1),i?.emitEvent!==!1&&this.form._events.next(new X4(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,o=this.form.get(e.path);i!==o&&(ez(i||null,e),FFe(o)&&(NM(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);xpe(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&RFe(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Wq(this.form,this),this._oldForm&&iz(this._oldForm,this)}static \u0275fac=function(i){return new(i||t)(rt(Iv,10),rt(BM,10),rt(uT,8))};static \u0275dir=Ki({type:t,selectors:[["","formGroup",""]],hostBindings:function(i,o){i&1&&Qe("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Pi([zFe]),Rt,In]})}return t})();var VFe={provide:Wl,useExisting:Br(()=>Qq)},Qq=(()=>{class t extends Wl{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new yt;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,o,r,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=Zq(this,r)}ngOnChanges(e){this._added||this._setUpControl(),Kq(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 vpe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||t)(rt(r0,13),rt(Iv,10),rt(BM,10),rt(Wa,10),rt(Yq,8))};static \u0275dir=Ki({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[Pi([VFe]),Rt,In]})}return t})();var UFe=(()=>{class t{_validator=q4;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):q4,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,features:[In]})}return t})();var HFe={provide:Iv,useExisting:Br(()=>zM),multi:!0};var zM=(()=>{class t extends UFe{required;inputName="required";normalizeInput=lt;createValidator=e=>ape;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&Xe("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[Pi([HFe]),Rt]})}return t})();var wpe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var Au=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:uT,useValue:e.callSetDisabledState??rz}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[wpe]})}return t})(),rp=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Yq,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:uT,useValue:e.callSetDisabledState??rz}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[wpe]})}return t})();var jFe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} `],encapsulation:2,changeDetection:0})}return t})(),GFe={passive:!0},Spe=(()=>{class t{_platform=re(gs);_ngZone=re(on);_renderer=re(dl).createRenderer(null,null);_styleLoader=re(Ol);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return kl;this._styleLoader.load(jFe);let i=Tu(e),o=this._monitoredElements.get(i);if(o)return o.subject;let r=new xi,a="cdk-text-field-autofilled",p=x=>{x.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(a)?(i.classList.add(a),this._ngZone.run(()=>r.next({target:x.target,isAutofilled:!0}))):x.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(a)&&(i.classList.remove(a),this._ngZone.run(()=>r.next({target:x.target,isAutofilled:!1})))},f=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",p,GFe)));return this._monitoredElements.set(i,{subject:r,unlisten:f}),r}stopMonitoring(e){let i=Tu(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ipe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var Tpe=new ii("MAT_INPUT_VALUE_ACCESSOR");var Xq=class{_box;_destroyed=new xi;_resizeSubject=new xi;_resizeObserver;_elementObservables=new Map;constructor(n){this._box=n,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(n){return this._elementObservables.has(n)||this._elementObservables.set(n,new Co(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(n,{box:this._box}),()=>{this._resizeObserver?.unobserve(n),i.unsubscribe(),this._elementObservables.delete(n)}}).pipe(ro(e=>e.some(i=>i.target===n)),B_({bufferSize:1,refCount:!0}),Wr(this._destroyed))),this._elementObservables.get(n)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},Epe=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=re(on);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new Xq(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $Fe=["notch"],qFe=["matFormFieldNotchedOutline",""],WFe=["*"],Ape=["iconPrefixContainer"],Dpe=["textPrefixContainer"],kpe=["iconSuffixContainer"],Mpe=["textSuffixContainer"],KFe=["textField"],ZFe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],YFe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function QFe(t,n){t&1&&Oe(0,"span",20)}function XFe(t,n){if(t&1&&(K(0,"label",19),yn(1,1),Lt(2,QFe,1,0,"span",20),Z()),t&2){let e=V(2);B("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Xe("for",e._control.disableAutomaticLabeling?null:e._control.id),L(2),Ft(!e.hideRequiredMarker&&e._control.required?2:-1)}}function JFe(t,n){if(t&1&&Lt(0,XFe,3,5,"label",19),t&2){let e=V();Ft(e._hasFloatingLabel()?0:-1)}}function eNe(t,n){t&1&&Oe(0,"div",7)}function tNe(t,n){}function iNe(t,n){if(t&1&&le(0,tNe,0,0,"ng-template",13),t&2){V(2);let e=un(1);B("ngTemplateOutlet",e)}}function nNe(t,n){if(t&1&&(K(0,"div",9),Lt(1,iNe,1,1,null,13),Z()),t&2){let e=V();B("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),L(),Ft(e._forceDisplayInfixLabel()?-1:1)}}function oNe(t,n){t&1&&(K(0,"div",10,2),yn(2,2),Z())}function rNe(t,n){t&1&&(K(0,"div",11,3),yn(2,3),Z())}function sNe(t,n){}function aNe(t,n){if(t&1&&le(0,sNe,0,0,"ng-template",13),t&2){V();let e=un(1);B("ngTemplateOutlet",e)}}function lNe(t,n){t&1&&(K(0,"div",14,4),yn(2,4),Z())}function cNe(t,n){t&1&&(K(0,"div",15,5),yn(2,5),Z())}function dNe(t,n){t&1&&Oe(0,"div",16)}function uNe(t,n){t&1&&yn(0,6)}function pNe(t,n){if(t&1&&(K(0,"mat-hint",21),Ce(1),Z()),t&2){let e=V(2);B("id",e._hintLabelId),L(),Di(e.hintLabel)}}function hNe(t,n){if(t&1&&(Lt(0,pNe,2,2,"mat-hint",21),yn(1,7),Oe(2,"div",22),yn(3,8)),t&2){let e=V();Ft(e.hintLabel?0:-1)}}var Lm=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-label"]]})}return t})(),eW=new ii("MatError"),tW=(()=>{class t{id=re(qa).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Bo("id",o.id)},inputs:{id:"id"},features:[Pi([{provide:eW,useExisting:t}])]})}return t})(),Jq=(()=>{class t{align="start";id=re(qa).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Bo("id",o.id),Xe("align",null),fo("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Bpe=new ii("MatPrefix");var iW=new ii("MatSuffix"),nW=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[Pi([{provide:iW,useExisting:t}])]})}return t})(),zpe=new ii("FloatingLabelParent"),Rpe=(()=>{class t{_elementRef=re(_n);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=re(Epe);_ngZone=re(on);_parent=re(zpe);_resizeSubscription=new Dr;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return mNe(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function mNe(t){let n=t;if(n.offsetParent!==null)return n.scrollWidth;let e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var Ope="mdc-line-ripple--active",az="mdc-line-ripple--deactivating",Ppe=(()=>{class t{_elementRef=re(_n);_cleanupTransitionEnd;constructor(){let e=re(on),i=re(Kr);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(az),e.add(Ope)}deactivate(){this._elementRef.nativeElement.classList.add(az)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains(az);e.propertyName==="opacity"&&o&&i.remove(Ope,az)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Lpe=(()=>{class t{_elementRef=re(_n);_ngZone=re(on);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&Qi($Fe,5),i&2){let r;Je(r=et())&&(o._notch=r.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:qFe,ngContentSelectors:WFe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,o){i&1&&(eo(),mn(0,"div",1),jn(1,"div",2,0),yn(3),Yn(),mn(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),hT=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t})}return t})();var Tv=new ii("MatFormField"),Vpe=new ii("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Fpe="fill",fNe="auto",Npe="fixed",gNe="translateY(-50%)",vd=(()=>{class t{_elementRef=re(_n);_changeDetectorRef=re(Ho);_platform=re(gs);_idGenerator=re(qa);_ngZone=re(on);_defaults=re(Vpe,{optional:!0});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Rk("iconPrefixContainer");_textPrefixContainerSignal=Rk("textPrefixContainer");_iconSuffixContainerSignal=Rk("iconSuffixContainer");_textSuffixContainerSignal=Rk("textSuffixContainer");_prefixSuffixContainers=Do(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=YG(Lm);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=id(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||fNe}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||Fpe;this._appearanceSignal.set(i)}_appearanceSignal=Jn(Fpe);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Npe}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Npe}_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 xi;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=xa();constructor(){let e=this._defaults,i=re(kc);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Gl(()=>this._currentDirection=i.valueSignal()),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=Do(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ja([void 0,void 0]),vi(()=>[i.errorState,i.userAriaDescribedBy]),ZN(),ro(([[r,a],[p,f]])=>r!==p||a!==f)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(Wr(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(),xc(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(){Nle({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=Do(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(p=>p.align==="start"):null,a=this._hintChildren?this._hintChildren.find(p=>p.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id)}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let i=this._control.describedByIds,o;if(i){let r=this._describedByIds||e;o=e.concat(i.filter(a=>a&&!r.includes(a)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,i=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,p=i?.getBoundingClientRect().width??0,f=o?.getBoundingClientRect().width??0,x=r?.getBoundingClientRect().width??0,I=this._currentDirection==="rtl"?"-1":"1",D=`${a+p}px`,R=`calc(${I} * (${D} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,j=`var(--mat-mdc-form-field-label-transform, ${gNe} translateX(${R}))`,$=a+p+f+x;return[j,$]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,r){if(i&1&&(vB(r,o._labelChild,Lm,5),Ht(r,hT,5),Ht(r,Bpe,5),Ht(r,iW,5),Ht(r,eW,5),Ht(r,Jq,5)),i&2){Ek();let a;Je(a=et())&&(o._formFieldControl=a.first),Je(a=et())&&(o._prefixChildren=a),Je(a=et())&&(o._suffixChildren=a),Je(a=et())&&(o._errorChildren=a),Je(a=et())&&(o._hintChildren=a)}},viewQuery:function(i,o){if(i&1&&(II(o._iconPrefixContainerSignal,Ape,5),II(o._textPrefixContainerSignal,Dpe,5),II(o._iconSuffixContainerSignal,kpe,5),II(o._textSuffixContainerSignal,Mpe,5),Qi(KFe,5),Qi(Ape,5),Qi(Dpe,5),Qi(kpe,5),Qi(Mpe,5),Qi(Rpe,5),Qi(Lpe,5),Qi(Ppe,5)),i&2){Ek(4);let r;Je(r=et())&&(o._textField=r.first),Je(r=et())&&(o._iconPrefixContainer=r.first),Je(r=et())&&(o._textPrefixContainer=r.first),Je(r=et())&&(o._iconSuffixContainer=r.first),Je(r=et())&&(o._textSuffixContainer=r.first),Je(r=et())&&(o._floatingLabel=r.first),Je(r=et())&&(o._notchedOutline=r.first),Je(r=et())&&(o._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(i,o){i&2&&fo("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Pi([{provide:Tv,useExisting:t},{provide:zpe,useExisting:t}])],ngContentSelectors:YFe,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,o){if(i&1){let r=Bt();eo(ZFe),le(0,JFe,1,1,"ng-template",null,0,Hi),K(2,"div",6,1),Qe("click",function(p){return Ee(r),Ae(o._control.onContainerClick(p))}),Lt(4,eNe,1,0,"div",7),K(5,"div",8),Lt(6,nNe,2,2,"div",9),Lt(7,oNe,3,0,"div",10),Lt(8,rNe,3,0,"div",11),K(9,"div",12),Lt(10,aNe,1,1,null,13),yn(11),Z(),Lt(12,lNe,3,0,"div",14),Lt(13,cNe,3,0,"div",15),Z(),Lt(14,dNe,1,0,"div",16),Z(),K(15,"div",17)(16,"div",18),Lt(17,uNe,1,0)(18,hNe,4,1),Z()()}if(i&2){let r;L(2),fo("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),L(2),Ft(!o._hasOutline()&&!o._control.disabled?4:-1),L(2),Ft(o._hasOutline()?6:-1),L(),Ft(o._hasIconPrefix?7:-1),L(),Ft(o._hasTextPrefix?8:-1),L(2),Ft(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),L(2),Ft(o._hasTextSuffix?12:-1),L(),Ft(o._hasIconSuffix?13:-1),L(),Ft(o._hasOutline()?-1:14),L(),fo("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let a=o._getSubscriptMessageType();L(),fo("mat-mdc-form-field-error-wrapper",a==="error")("mat-mdc-form-field-hint-wrapper",a==="hint"),L(),Ft((r=a)==="error"?17:r==="hint"?18:-1)}},dependencies:[Rpe,Lpe,Vo,Ppe,Jq],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 lz=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var mT=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(n,e,i,o,r){this._defaultMatcher=n,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=r}updateErrorState(){let n=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,r=i?.isErrorState(o,e)??!1;r!==n&&(this.errorState=r,this._stateChanges.next())}};var zd=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,YI,vd,Xo]})}return t})();var _Ne=["button","checkbox","file","hidden","image","radio","range","reset","submit"],yNe=new ii("MAT_INPUT_CONFIG"),Ev=(()=>{class t{_elementRef=re(_n);_platform=re(gs);ngControl=re(Wl,{optional:!0,self:!0});_autofillMonitor=re(Spe);_ngZone=re(on);_formField=re(Tv,{optional:!0});_renderer=re(Kr);_uid=re(qa).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=re(yNe,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new xi;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=id(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(Bd.required)??!1}set required(e){this._required=id(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Pq().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=id(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=>Pq().has(e));constructor(){let e=re(I1,{optional:!0}),i=re(T1,{optional:!0}),o=re(lz),r=re(Tpe,{optional:!0,self:!0}),a=this._elementRef.nativeElement,p=a.nodeName.toLowerCase();r?Qf(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r: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 mT(o,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=p==="select",this._isTextarea=p==="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&&Gl(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){_Ne.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&Qe("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Bo("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Xe("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),fo("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",lt]},exportAs:["matInput"],features:[Pi([{provide:hT,useExisting:t}]),In]})}return t})(),Av=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,zd,zd,Ipe,Xo]})}return t})();var Upe=(()=>{class t{_animationsDisabled=xa();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(i,o){i&2&&fo("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(i,o){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px} `],encapsulation:2,changeDetection:0})}return t})();var vNe=["text"],bNe=[[["mat-icon"]],"*"],xNe=["mat-icon","*"];function CNe(t,n){if(t&1&&Oe(0,"mat-pseudo-checkbox",1),t&2){let e=V();B("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function wNe(t,n){if(t&1&&Oe(0,"mat-pseudo-checkbox",3),t&2){let e=V();B("disabled",e.disabled)}}function SNe(t,n){if(t&1&&(K(0,"span",4),Ce(1),Z()),t&2){let e=V();L(),qn("(",e.group.label,")")}}var UM=new ii("MAT_OPTION_PARENT_COMPONENT"),HM=new ii("MatOptgroup");var VM=class{source;isUserInput;constructor(n,e=!1){this.source=n,this.isUserInput=e}},sp=(()=>{class t{_element=re(_n);_changeDetectorRef=re(Ho);_parent=re(UM,{optional:!0});group=re(HM,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=re(qa).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=Jn(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new yt;_text;_stateChanges=new xi;constructor(){let e=re(Ol);e.load(hg),e.load(ZI),this._signalDisableRipple=!!this._parent&&Qf(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,i){let o=this._getHostElement();typeof o.focus=="function"&&o.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Pl(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 VM(this,e))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-option"]],viewQuery:function(i,o){if(i&1&&Qi(vNe,7),i&2){let r;Je(r=et())&&(o._text=r.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(i,o){i&1&&Qe("click",function(){return o._selectViaInteraction()})("keydown",function(a){return o._handleKeydown(a)}),i&2&&(Bo("id",o.id),Xe("aria-selected",o.selected)("aria-disabled",o.disabled.toString()),fo("mdc-list-item--selected",o.selected)("mat-mdc-option-multiple",o.multiple)("mat-mdc-option-active",o.active)("mdc-list-item--disabled",o.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",lt]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:xNe,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(i,o){i&1&&(eo(bNe),Lt(0,CNe,1,2,"mat-pseudo-checkbox",1),yn(1),K(2,"span",2,0),yn(4,1),Z(),Lt(5,wNe,1,1,"mat-pseudo-checkbox",3),Lt(6,SNe,2,1,"span",4),Oe(7,"div",5)),i&2&&(Ft(o.multiple?0:-1),L(5),Ft(!o.multiple&&o.selected&&!o.hideSingleSelectionIndicator?5:-1),L(),Ft(o.group&&o.group._inert?6:-1),L(),B("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disabled||o.disableRipple))},dependencies:[Upe,aT],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 dz(t,n,e){if(e.length){let i=n.toArray(),o=e.toArray(),r=0;for(let a=0;ae+i?Math.max(0,t-i+n):e}var pz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo]})}return t})();var qp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Cv,Xo,pz,sp]})}return t})();var INe=["panel"],TNe=["*"];function ENe(t,n){if(t&1&&(jn(0,"div",1,0),yn(2),Yn()),t&2){let e=n.id,i=V();Ge(i._classList),fo("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-autocomplete-panel-animations-enabled",!i._animationsDisabled)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),Bo("id",i.id),Xe("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var oW=class{source;option;constructor(n,e){this.source=n,this.option=e}},Hpe=new ii("mat-autocomplete-default-options",{providedIn:"root",factory:ANe});function ANe(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var jpe=(()=>{class t{_changeDetectorRef=re(Ho);_elementRef=re(_n);_defaults=re(Hpe);_animationsDisabled=xa();_activeOptionChanges=Dr.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new yt;opened=new yt;closed=new yt;optionActivated=new yt;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=re(qa).getId("mat-autocomplete-");inertGroups;constructor(){let e=re(gs);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new b1(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new oW(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,sp,5),Ht(r,HM,5)),i&2){let a;Je(a=et())&&(o.options=a),Je(a=et())&&(o.optionGroups=a)}},viewQuery:function(i,o){if(i&1&&(Qi(Ml,7),Qi(INe,5)),i&2){let r;Je(r=et())&&(o.template=r.first),Je(r=et())&&(o.panel=r.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",lt],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",lt],requireSelection:[2,"requireSelection","requireSelection",lt],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",lt],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",lt]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[Pi([{provide:UM,useExisting:t}])],ngContentSelectors:TNe,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,o){i&1&&(eo(),wI(0,ENe,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-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));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none} `],encapsulation:2,changeDetection:0})}return t})();var DNe={provide:Wa,useExisting:Br(()=>rW),multi:!0};var Gpe=new ii("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>Nd(t)}});function kNe(t){let n=re(Zn);return()=>Nd(n)}var MNe={provide:Gpe,deps:[],useFactory:kNe},rW=(()=>{class t{_environmentInjector=re(ua);_element=re(_n);_injector=re(Zn);_viewContainerRef=re(Ga);_zone=re(on);_changeDetectorRef=re(Ho);_dir=re(kc,{optional:!0});_formField=re(Tv,{optional:!0,host:!0});_viewportRuler=re(Rm);_scrollStrategy=re(Gpe);_renderer=re(Kr);_animationsDisabled=xa();_defaults=re(Hpe,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new xi;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=Dr.EMPTY;_breakpointObserver=re(Eu);_handsetLandscapeSubscription=Dr.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new xi;_overlayPanelClass=n0(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&xv(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return xc(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ro(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ro(()=>this._overlayAttached)):Ni()).pipe(vi(e=>e instanceof VM?e:null))}optionSelections=yu(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Ja(e),wo(()=>xc(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(wo(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new Co(e=>{let i=r=>{let a=gd(r),p=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,f=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&a!==this._element.nativeElement&&!this._hasFocus()&&(!p||!p.contains(a))&&(!f||!f.contains(a))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(a)&&e.next(r)},o=[this._renderer.listen("document","click",i),this._renderer.listen("document","auxclick",i),this._renderer.listen("document","touchend",i)];return()=>{o.forEach(r=>r())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e,o=i.keyCode,r=Pl(i);if(o===27&&!r&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&o===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let a=this.autocomplete._keyManager.activeItem,p=o===38||o===40;o===9||p&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):p&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(p||this.autocomplete._keyManager.activeItem!==a)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,o=i.value;if(i.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let r=this.autocomplete.options?.find(a=>a.selected);if(r){let a=this._getDisplayValue(r.value);o!==a&&r.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let r=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(r)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return mv()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Co(o=>{Ic(()=>{o.next()},{injector:this._environmentInjector})}),i=this.autocomplete.options?.changes.pipe(Er(()=>this._positionStrategy.reapplyLastPosition()),k7(0))??Ni();return xc(e,i).pipe(wo(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Ko(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=this.autocomplete,o=e?e.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),i._emitSelectEvent(o),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(o=>{o!==e&&o.selected&&o.deselect(i)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;nT(this._trackedModal,"aria-owns",i)}}_attachOverlay(e){this.autocomplete;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new Dm(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=Pm(this._injector,this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(_d.HandsetLandscape).subscribe(r=>{r.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Pl(e)||e.keyCode===38&&Pl(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Om({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=o0(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],a;this.position==="above"?a=r:this.position==="below"?a=i:a=[...i,...r],e.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&xv(this._trackedModal,"aria-owns",i),nT(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;xv(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,o){i&1&&Qe("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(a){return o._handleInput(a)})("keydown",function(a){return o._handleKeydown(a)})("click",function(){return o._handleClick()}),i&2&&Xe("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",lt]},exportAs:["matAutocompleteTrigger"],features:[Pi([DNe]),In]})}return t})(),$pe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[MNe],imports:[Gp,qp,Xo,Mm,qp,Xo]})}return t})();function RNe(t,n){t&1&&mn(0,"div",2)}var ONe=new ii("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var hz=(()=>{class t{_elementRef=re(_n);_ngZone=re(on);_changeDetectorRef=re(Ho);_renderer=re(Kr);_cleanupTransitionEnd;constructor(){let e=xM(),i=re(ONe,{optional:!0});this._isNoopAnimation=e==="di-disabled",e==="reduced-motion"&&this._elementRef.nativeElement.classList.add("mat-progress-bar-reduced-motion"),i&&(i.color&&(this.color=this._defaultColor=i.color),this.mode=i.mode||this.mode)}_isNoopAnimation;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";get value(){return this._value}set value(e){this._value=qpe(e||0),this._changeDetectorRef.markForCheck()}_value=0;get bufferValue(){return this._bufferValue||0}set bufferValue(e){this._bufferValue=qpe(e||0),this._changeDetectorRef.markForCheck()}_bufferValue=0;animationEnd=new yt;get mode(){return this._mode}set mode(e){this._mode=e,this._changeDetectorRef.markForCheck()}_mode="determinate";ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._cleanupTransitionEnd=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._transitionendHandler)})}ngOnDestroy(){this._cleanupTransitionEnd?.()}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}_transitionendHandler=e=>{this.animationEnd.observers.length===0||!e.target||!e.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))};static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(i,o){i&2&&(Xe("aria-valuenow",o._isIndeterminate()?null:o.value)("mode",o.mode),Ge("mat-"+o.color),fo("_mat-animation-noopable",o._isNoopAnimation)("mdc-linear-progress--animation-ready",!o._isNoopAnimation)("mdc-linear-progress--indeterminate",o._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",wn],bufferValue:[2,"bufferValue","bufferValue",wn],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(i,o){i&1&&(jn(0,"div",0),mn(1,"div",1),Lt(2,RNe,1,0,"div",2),Yn(),jn(3,"div",3),mn(4,"span",4),Yn(),jn(5,"div",5),mn(6,"span",4),Yn()),i&2&&(L(),zr("flex-basis",o._getBufferBarFlexBasis()),L(),Ft(o.mode==="buffer"?2:-1),L(),zr("transform",o._getPrimaryBarTransform()))},styles:[`.mat-mdc-progress-bar{--mat-progress-bar-animation-multiplier: 1;display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mat-progress-bar-reduced-motion{--mat-progress-bar-animation-multiplier: 2}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mat-progress-bar-track-height, 4px),var(--mat-progress-bar-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mat-progress-bar-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-progress-bar-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mat-progress-bar-track-height, 4px);border-radius:var(--mat-progress-bar-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{background-image:radial-gradient(circle, var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant)) calc(var(--mat-progress-bar-track-height, 4px) / 2), transparent 0);background-repeat:repeat-x;background-size:calc(calc(var(--mat-progress-bar-track-height, 4px) / 2)*5);background-position:left;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse calc(250ms*var(--mat-progress-bar-animation-multiplier)) infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mat-progress-bar-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale calc(2s*var(--mat-progress-bar-animation-multiplier)) infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mat-progress-bar-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}} `],encapsulation:2,changeDetection:0})}return t})();function qpe(t,n=0,e=100){return Math.max(n,Math.min(e,t))}var mz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo]})}return t})();var PNe=["mat-internal-form-field",""],LNe=["*"],Kpe=(()=>{class t{labelPosition;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:PNe,ngContentSelectors:LNe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(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 FNe=t=>({$implicit:t});function NNe(t,n){t&1&&(K(0,"mat-option",4),Oe(1,"mat-progress-bar",5),Z())}function BNe(t,n){if(t&1&&(K(0,"mat-option",4),Ce(1),Z()),t&2){let e=V(2);L(),qn(" ",e.noEntriesFoundText," ")}}function zNe(t,n){t&1&&Oi(0)}function VNe(t,n){if(t&1&&(K(0,"mat-option",6),le(1,zNe,1,0,"ng-container",7),Z()),t&2){let e=n.$implicit,i=V(2);B("ngStyle",i.optionsTemplateStyle)("value",e),L(),B("ngTemplateOutlet",i.optionsTemplate)("ngTemplateOutletContext",rn(4,FNe,e))}}function UNe(t,n){if(t&1&&(Lt(0,BNe,2,1,"mat-option",4),ea(1,VNe,2,6,"mat-option",6,ed)),t&2){let e=V();Ft(e.noEntriesFoundIndicator&&(e.options==null?null:e.options.length)===0?0:-1),L(),ta(e.options)}}var Zpe=(()=>{class t{constructor(e){this._cdf=e,this.placeholderText="Begriff oder Suchtext eingeben",this.noEntriesFoundText="Keine Ergebnisse gefunden",this.optionsTemplate=null,this.optionSelect=new yt,this.loadingSearchIndicator=!1,this.noEntriesFoundIndicator=!1,this.queryInputCtrl=new dc,this.options=[],this.displayWith=i=>this.displayWithFn?this.displayWithFn(i):i}ngOnInit(){this.queryInputCtrl.valueChanges.pipe(Er(()=>{this.loadingSearchIndicator=!0,this.options=[]}),Zu(500),wo(e=>E7(()=>this._validSearchTerm(e),this._search(e),this._invalidSearchTermResponse()))).subscribe({next:e=>{this.options=e,this.loadingSearchIndicator=!1,this._cdf.markForCheck()},error:()=>{this.loadingSearchIndicator=!1,this.options=[],this._cdf.markForCheck()}})}onOptionSelect(e){let i=e.option.value;this.optionSelect.emit(i)}_search(e){return this.queryServiceFn?this.queryServiceFn(e).pipe(Er(()=>this.noEntriesFoundIndicator=!0)):Ni([])}_invalidSearchTermResponse(){return Ni([]).pipe(Er(()=>this.noEntriesFoundIndicator=!1))}_validSearchTerm(e){return typeof e=="string"?!!e&&e!=="":!!e}static{this.\u0275fac=function(i){return new(i||t)(rt(Ho))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-autocomplete"]],inputs:{placeholderText:"placeholderText",noEntriesFoundText:"noEntriesFoundText",queryServiceFn:"queryServiceFn",displayWithFn:"displayWithFn",optionsTemplate:"optionsTemplate",optionsTemplateStyle:"optionsTemplateStyle"},outputs:{optionSelect:"optionSelect"},decls:10,vars:6,consts:[["auto","matAutocomplete"],[1,"bd-autocomplete"],["matInput","","type","text","data-test","autocomplete-input",3,"id","formControl","matAutocomplete"],[3,"optionSelected","displayWith"],["disabled",""],["mode","query"],[3,"ngStyle","value"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",1)(1,"form")(2,"mat-form-field")(3,"mat-label"),Ce(4),Z(),Oe(5,"input",2),K(6,"mat-autocomplete",3,0),Qe("optionSelected",function(p){return Ee(r),Ae(o.onOptionSelect(p))}),Lt(8,NNe,2,0,"mat-option",4)(9,UNe,3,1),Z()()()()}if(i&2){let r=un(7);L(4),Di(o.placeholderText),L(),B("id","autocomplete-input")("formControl",o.queryInputCtrl)("matAutocomplete",r),L(),B("displayWith",o.displayWith),L(2),Ft(o.loadingSearchIndicator?8:9)}},dependencies:[rp,sz,Sv,il,nz,$p,Au,I1,zd,vd,Lm,Av,Ev,$pe,jpe,sp,rW,qp,mz,hz,fs,Vo],encapsulation:2})}}return t})();var fz;function HNe(){if(fz===void 0&&(fz=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(fz=t.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return fz}function jM(t){return HNe()?.createHTML(t)||t}function Ype(t){return Error(`Unable to find icon with the name "${t}"`)}function jNe(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function Qpe(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function Xpe(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}var a0=class{url;svgText;options;svgElement;constructor(n,e,i){this.url=n,this.svgText=e,this.options=i}},ehe=(()=>{class t{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(e,i,o,r){this._httpClient=e,this._sanitizer=i,this._errorHandler=r,this._document=o}addSvgIcon(e,i,o){return this.addSvgIconInNamespace("",e,i,o)}addSvgIconLiteral(e,i,o){return this.addSvgIconLiteralInNamespace("",e,i,o)}addSvgIconInNamespace(e,i,o,r){return this._addSvgIconConfig(e,i,new a0(o,null,r))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,o,r){let a=this._sanitizer.sanitize(Jc.HTML,o);if(!a)throw Xpe(o);let p=jM(a);return this._addSvgIconConfig(e,i,new a0("",p,r))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,o){return this._addSvgIconSetConfig(e,new a0(i,null,o))}addSvgIconSetLiteralInNamespace(e,i,o){let r=this._sanitizer.sanitize(Jc.HTML,i);if(!r)throw Xpe(i);let a=jM(r);return this._addSvgIconSetConfig(e,new a0("",a,o))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let i=this._sanitizer.sanitize(Jc.RESOURCE_URL,e);if(!i)throw Qpe(e);let o=this._cachedIconsByUrl.get(i);return o?Ni(gz(o)):this._loadSvgIconFromConfig(new a0(e,null)).pipe(Er(r=>this._cachedIconsByUrl.set(i,r)),vi(r=>gz(r)))}getNamedSvgIcon(e,i=""){let o=Jpe(i,e),r=this._svgIconConfigs.get(o);if(r)return this._getSvgFromConfig(r);if(r=this._getIconConfigFromResolvers(i,e),r)return this._svgIconConfigs.set(o,r),this._getSvgFromConfig(r);let a=this._iconSetConfigs.get(i);return a?this._getSvgFromIconSetConfigs(e,a):qy(Ype(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?Ni(gz(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(vi(i=>gz(i)))}_getSvgFromIconSetConfigs(e,i){let o=this._extractIconWithNameFromAnySet(e,i);if(o)return Ni(o);let r=i.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(Xa(p=>{let x=`Loading icon set URL: ${this._sanitizer.sanitize(Jc.RESOURCE_URL,a.url)} failed: ${p.message}`;return this._errorHandler.handleError(new Error(x)),Ni(null)})));return Hl(r).pipe(vi(()=>{let a=this._extractIconWithNameFromAnySet(e,i);if(!a)throw Ype(e);return a}))}_extractIconWithNameFromAnySet(e,i){for(let o=i.length-1;o>=0;o--){let r=i[o];if(r.svgText&&r.svgText.toString().indexOf(e)>-1){let a=this._svgElementFromConfig(r),p=this._extractSvgIconFromSet(a,e,r.options);if(p)return p}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Er(i=>e.svgText=i),vi(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?Ni(null):this._fetchIcon(e).pipe(Er(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,o){let r=e.querySelector(`[id="${i}"]`);if(!r)return null;let a=r.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let p=this._svgElementFromString(jM(""));return p.appendChild(a),this._setSvgAttributes(p,o)}_svgElementFromString(e){let i=this._document.createElement("DIV");i.innerHTML=e;let o=i.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(e){let i=this._svgElementFromString(jM("")),o=e.attributes;for(let r=0;rjM(x)),Gf(()=>this._inProgressUrlFetches.delete(a)),N2());return this._inProgressUrlFetches.set(a,f),f}_addSvgIconConfig(e,i,o){return this._svgIconConfigs.set(Jpe(e,i),o),this}_addSvgIconSetConfig(e,i){let o=this._iconSetConfigs.get(e);return o?o.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){let i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let o=0;on?n.pathname+n.search:""}}var the=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ZNe=the.map(t=>`[${t}]`).join(", "),YNe=/^url\(['"]?#(.*?)['"]?\)$/,la=(()=>{class t{_elementRef=re(_n);_iconRegistry=re(ehe);_location=re(WNe);_errorHandler=re(Yc);_defaultColor;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(e){let i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(e){let i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName;_svgNamespace;_previousPath;_elementsWithExternalReferences;_currentIconFetch=Dr.EMPTY;constructor(){let e=re(new og("aria-hidden"),{optional:!0}),i=re(qNe,{optional:!0});i&&(i.color&&(this.color=this._defaultColor=i.color),i.fontSet&&(this.fontSet=i.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let o=e.childNodes[i];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>e.classList.remove(o)),i.forEach(o=>e.classList.add(o)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let i=this._elementsWithExternalReferences;i&&i.forEach((o,r)=>{o.forEach(a=>{r.setAttribute(a.name,`url('${e}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(ZNe),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let r=0;r{let p=i[r],f=p.getAttribute(a),x=f?f.match(YNe):null;if(x){let I=o.get(p);I||(I=[],o.set(p,I)),I.push({name:a,value:x[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,o]=this._splitIconName(e);i&&(this._svgNamespace=i),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,i).pipe(Ko(1)).subscribe(r=>this._setSvgElement(r),r=>{let a=`Error retrieving icon ${i}:${o}! ${r.message}`;this._errorHandler.handleError(new Error(a))})}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(i,o){i&2&&(Xe("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Ge(o.color?"mat-"+o.color:""),fo("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",lt],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:$Ne,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(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})(),Ls=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Xo]})}return t})();var QNe=["tooltip"],aW=20;var lW=new ii("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>Nd(t,{scrollThrottle:aW})}});function ohe(t){let n=re(Zn);return()=>Nd(n,{scrollThrottle:aW})}var cW={provide:lW,deps:[],useFactory:ohe};function rhe(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var she=new ii("mat-tooltip-default-options",{providedIn:"root",factory:rhe});var ihe="tooltip-panel",nhe=fv({passive:!0}),XNe=8,JNe=8,e3e=24,t3e=200,Fm=(()=>{class t{_elementRef=re(_n);_ngZone=re(on);_platform=re(gs);_ariaDescriber=re(Rue);_focusMonitor=re(dg);_dir=re(kc);_injector=re(Zn);_viewContainerRef=re(Ga);_animationsDisabled=xa();_defaultOptions=re(she,{optional:!0});_overlayRef;_tooltipInstance;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=ahe;_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=id(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let i=id(e);this._disabled!==i&&(this._disabled=i,i?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=jp(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=jp(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let i=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(i)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_touchstartTimeout=null;_destroyed=new xi;_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=XNe}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Wr(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,o])=>{e.removeEventListener(i,o,nhe)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(i);this._detach(),this._portal=this._portal||new hv(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=o.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(Wr(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&a._origin instanceof _n)return this._overlayRef;this._detach()}let i=this._injector.get(yv).getAncestorScrollContainers(this._elementRef),o=`${this._cssClassPrefix}-${ihe}`,r=o0(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(Wr(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=Pm(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,o]:o,scrollStrategy:this._injector.get(lW)(),disableAnimations:this._animationsDisabled}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Wr(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Wr(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Wr(this._destroyed)).subscribe(a=>{this._isTooltipVisible()&&a.keyCode===27&&!Pl(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(Wr(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let i=e.getConfig().positionStrategy,o=this._getOrigin(),r=this._getOverlayPosition();i.withPositions([this._addOffset(ve(ve({},o.main),r.main)),this._addOffset(ve(ve({},o.fallback),r.fallback))])}_addOffset(e){let i=JNe,o=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-i:e.originY==="bottom"?e.offsetY=i:e.originX==="start"?e.offsetX=o?-i:i:e.originX==="end"&&(e.offsetX=o?i:-i),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"||i=="below"?o={originX:"center",originY:i=="above"?"top":"bottom"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={originX:"start",originY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",i=this.position,o;i=="above"?o={overlayX:"center",overlayY:"bottom"}:i=="below"?o={overlayX:"center",overlayY:"top"}:i=="before"||i=="left"&&e||i=="right"&&!e?o={overlayX:"end",overlayY:"center"}:(i=="after"||i=="right"&&e||i=="left"&&!e)&&(o={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ic(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return this.position==="above"||this.position==="below"?i==="top"?i="bottom":i==="bottom"&&(i="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){let{overlayY:i,originX:o,originY:r}=e,a;if(i==="center"?this._dir&&this._dir.value==="rtl"?a=o==="end"?"left":"right":a=o==="start"?"left":"right":a=i==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let p=this._overlayRef;if(p){let f=`${this._cssClassPrefix}-${ihe}-`;p.removePanelClass(f+this._currentPosition),p.addPanelClass(f+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let i;e.x!==void 0&&e.y!==void 0&&(i=e),this.show(void 0,i)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let i=e.targetTouches?.[0],o=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,o)},this._defaultOptions?.touchLongPressShowDelay??r)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{let o=i.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let i=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,o])=>{this._elementRef.nativeElement.addEventListener(i,o,nhe)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let i=this._injector.get(zn).elementFromPoint(e.clientX,e.clientY),o=this._elementRef.nativeElement;i!==o&&!o.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let i=this._elementRef.nativeElement,o=i.style;(e==="on"||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(e==="on"||!i.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ic({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return t})(),ahe=(()=>{class t{_changeDetectorRef=re(Ho);_elementRef=re(_n);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=xa();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new xi;_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>e3e&&e.width>=t3e}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let i=this._tooltip.nativeElement,o=this._showAnimation,r=this._hideAnimation;if(i.classList.remove(e?r:o),i.classList.add(e?o:r),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(i);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-tooltip-component"]],viewQuery:function(i,o){if(i&1&&Qi(QNe,7),i&2){let r;Je(r=et())&&(o._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(i,o){i&1&&Qe("mouseleave",function(a){return o._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(i,o){if(i&1){let r=Bt();K(0,"div",1,0),Qe("animationend",function(p){return Ee(r),Ae(o._handleAnimationEnd(p))}),K(2,"div",2),Ce(3),Z()()}i&2&&(fo("mdc-tooltip--multiline",o._isMultiline),B("ngClass",o.tooltipClass),L(3),Di(o.message))},dependencies:[Rs],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 Nm=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[cW],imports:[_M,Gp,Xo,Xo,Mm]})}return t})();var i3e=["*"],yz=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-link-external"]],inputs:{link:"link"},ngContentSelectors:i3e,decls:2,vars:1,consts:[["target","_blank","rel","noopener",3,"href"]],template:function(i,o){i&1&&(eo(),jn(0,"a",0),yn(1),Yn()),i&2&&Bo("href",o.link,ja)},encapsulation:2})}}return t})();var n3e=["*"],vz=(()=>{class t{constructor(){this.link=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-link-internal"]],inputs:{link:"link"},ngContentSelectors:n3e,decls:2,vars:1,consts:[[3,"routerLink"]],template:function(i,o){i&1&&(eo(),K(0,"a",0),yn(1),Z()),i&2&&B("routerLink",o.link)},dependencies:[ba],encapsulation:2})}}return t})();var bz={target:"_self"};var o3e={type:"loader-circle",width:"100px"},lhe=o3e;var Cn=(function(t){return t[t.INIT=0]="INIT",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.ERROR=3]="ERROR",t})(Cn||{}),xz=class{constructor(){this.state$=new xi}destroy(){this.state$.unsubscribe()}},Cz=class extends xz{constructor(){super()}connect(n){this.state$.next(Cn.LOADING),n.then(()=>this.state$.next(Cn.SUCCESS)).catch(()=>this.state$.next(Cn.ERROR))}},wz=class extends xz{constructor(){super()}connect(n){this._loadSubscription=n.pipe(Ja(Cn.INIT),Xa(e=>(this.state$.next(Cn.ERROR),e)),z2(e=>!(e instanceof Error))).subscribe(e=>this.state$.next(e))}destroy(){super.destroy(),this._loadSubscription&&this._loadSubscription.unsubscribe()}};var r3e=["determinateSpinner"];function s3e(t,n){if(t&1&&(oi(),K(0,"svg",11),Oe(1,"circle",12),Z()),t&2){let e=V();Xe("viewBox",e._viewBox()),L(),zr("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Xe("r",e._circleRadius())}}var a3e=new ii("mat-progress-spinner-default-options",{providedIn:"root",factory:l3e});function l3e(){return{diameter:che}}var che=100,c3e=10,dhe=(()=>{class t{_elementRef=re(_n);_noopAnimations;get color(){return this._color||this._defaultColor}set color(e){this._color=e}_color;_defaultColor="primary";_determinateCircle;constructor(){let e=re(a3e),i=xM(),o=this._elementRef.nativeElement;this._noopAnimations=i==="di-disabled"&&!!e&&!e._forceAnimations,this.mode=o.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&i==="reduced-motion"&&o.classList.add("mat-progress-spinner-reduced-motion"),e&&(e.color&&(this.color=this._defaultColor=e.color),e.diameter&&(this.diameter=e.diameter),e.strokeWidth&&(this.strokeWidth=e.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}_value=0;get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}_diameter=che;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_strokeWidth;_circleRadius(){return(this.diameter-c3e)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(i,o){if(i&1&&Qi(r3e,5),i&2){let r;Je(r=et())&&(o._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(i,o){i&2&&(Xe("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Ge("mat-"+o.color),zr("width",o.diameter,"px")("height",o.diameter,"px")("--mat-progress-spinner-size",o.diameter+"px")("--mat-progress-spinner-active-indicator-width",o.diameter+"px"),fo("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",wn],diameter:[2,"diameter","diameter",wn],strokeWidth:[2,"strokeWidth","strokeWidth",wn]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(i,o){if(i&1&&(le(0,s3e,2,8,"ng-template",null,0,Hi),K(2,"div",2,1),oi(),K(4,"svg",3),Oe(5,"circle",4),Z()(),W_(),K(6,"div",5)(7,"div",6)(8,"div",7),Oi(9,8),Z(),K(10,"div",9),Oi(11,8),Z(),K(12,"div",10),Oi(13,8),Z()()()),i&2){let r=un(1);L(4),Xe("viewBox",o._viewBox()),L(),zr("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Xe("r",o._circleRadius()),L(4),B("ngTemplateOutlet",r),L(2),B("ngTemplateOutlet",r),L(2),B("ngTemplateOutlet",r)}},dependencies:[Vo],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 uhe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo]})}return t})();var dW=t=>({$implicit:t});function u3e(t,n){t&1&&Oi(0)}function p3e(t,n){if(t&1&&le(0,u3e,1,0,"ng-container",1),t&2){let e=V(2);B("ngTemplateOutlet",e.customLoadingTemplate)}}function h3e(t,n){t&1&&(K(0,"div",0)(1,"div",2),Oe(2,"mat-spinner",3),Z()())}function m3e(t,n){if(t&1&&Lt(0,p3e,1,1,"ng-container")(1,h3e,3,0,"div",0),t&2){let e=V();Ft(e.customLoadingTemplate?0:1)}}function f3e(t,n){t&1&&Oi(0)}function g3e(t,n){if(t&1&&le(0,f3e,1,0,"ng-container",4),t&2){let e=V();B("ngTemplateOutlet",e.initTemplate)("ngTemplateOutletContext",rn(2,dW,e.initTemplateContext))}}function _3e(t,n){t&1&&Oi(0)}function y3e(t,n){if(t&1&&le(0,_3e,1,0,"ng-container",4),t&2){let e=V();B("ngTemplateOutlet",e.successTemplate)("ngTemplateOutletContext",rn(2,dW,e.successTemplateContext))}}function v3e(t,n){t&1&&Oi(0)}function b3e(t,n){if(t&1&&le(0,v3e,1,0,"ng-container",4),t&2){let e=V();B("ngTemplateOutlet",e.errorTemplate)("ngTemplateOutletContext",rn(2,dW,e.errorTemplateContext))}}var mr=(()=>{class t{constructor(e){this._cdr=e,this.customLoadingTemplate=null,this.errorTemplate=null,this.successTemplate=null,this.initTemplate=null,this.options=lhe,this.BdLoaderState=Cn,this.currentState=Cn.INIT}ngOnChanges(e){e.loadItem&&e.loadItem.currentValue&&this._onLoadItemChange(e.loadItem.currentValue)}ngOnDestroy(){this._loader&&this._loader.destroy()}_onLoadItemChange(e){this._loader&&(this._loader.destroy(),this._loader=null),this._isPromise(e)?this._setPromiseLoader(e):this._setSubjectLoader(e)}_setPromiseLoader(e){this._loader=new Cz,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_setSubjectLoader(e){this._loader=new wz,this._subscribeLoaderState(this._loader),this._loader.connect(e)}_subscribeLoaderState(e){this._stateSubscription&&this._stateSubscription.unsubscribe(),this._stateSubscription=e.state$.subscribe(i=>{this.currentState=i,this._cdr.detectChanges()})}_isPromise(e){return!!e.then&&typeof e.then=="function"}static{this.\u0275fac=function(i){return new(i||t)(rt(Ho))}}static{this.\u0275cmp=Le({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:[In],decls:5,vars:1,consts:[[1,"flex","flex-row","items-center","justify-center"],[4,"ngTemplateOutlet"],[1,"basis-24","m-6"],["strokeWidth","3"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){if(i&1&&(K(0,"div"),Lt(1,m3e,2,1)(2,g3e,1,4,"ng-container")(3,y3e,1,4,"ng-container")(4,b3e,1,4,"ng-container"),Z()),i&2){let r;L(),Ft((r=o.currentState)===o.BdLoaderState.LOADING?1:r===o.BdLoaderState.INIT?2:r===o.BdLoaderState.SUCCESS?3:r===o.BdLoaderState.ERROR?4:-1)}},dependencies:[Vo,uhe,dhe],encapsulation:2,changeDetection:0})}}return t})();var Ca=(()=>{class t{constructor(){this.icon="visibility_off",this.message=""}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-message-empty"]],inputs:{icon:"icon",message:"message"},decls:8,vars:2,consts:[[1,"message__empty"],[1,"flex","flex-row","gap-2","items-center","justify-center"],[1,"flex-none"],[1,"mat-caption"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),Ce(4),Z()(),K(5,"div",2)(6,"span",3),Ce(7),Z()()()()),i&2&&(L(4),Di(o.icon),L(3),Di(o.message))},dependencies:[Ls,la],styles:[".message__empty[_ngcontent-%COMP%]{color:#0000008a}.mat-caption[_ngcontent-%COMP%]{line-height:28px}"]})}}return t})();var GM=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 xi;constructor(n=!1,e,i=!0,o){this._multiple=n,this._emitChanges=i,this.compareWith=o,e&&e.length&&(n?e.forEach(r=>this._markSelected(r)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...n){this._verifyValueAssignment(n),n.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...n){this._verifyValueAssignment(n);let e=this.selected,i=new Set(n.map(r=>this._getConcreteValue(r)));n.forEach(r=>this._markSelected(r)),e.filter(r=>!i.has(this._getConcreteValue(r,i))).forEach(r=>this._unmarkSelected(r));let o=this._hasQueuedChanges();return this._emitChangeEvent(),o}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();let e=this._hasQueuedChanges();return n&&this._emitChangeEvent(),e}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){n.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(n,e){if(this.compareWith){e=e??this._selection;for(let i of e)if(this.compareWith(n,i))return i;return n}else return n}};var x3e=["trigger"],C3e=["panel"],w3e=[[["mat-select-trigger"]],"*"],S3e=["mat-select-trigger","*"];function I3e(t,n){if(t&1&&(K(0,"span",4),Ce(1),Z()),t&2){let e=V();L(),Di(e.placeholder)}}function T3e(t,n){t&1&&yn(0)}function E3e(t,n){if(t&1&&(K(0,"span",11),Ce(1),Z()),t&2){let e=V(2);L(),Di(e.triggerValue)}}function A3e(t,n){if(t&1&&(K(0,"span",5),Lt(1,T3e,1,0)(2,E3e,2,1,"span",11),Z()),t&2){let e=V();L(),Ft(e.customTrigger?1:2)}}function D3e(t,n){if(t&1){let e=Bt();K(0,"div",12,1),Qe("keydown",function(o){Ee(e);let r=V();return Ae(r._handleKeydown(o))}),yn(2,1),Z()}if(t&2){let e=V();Ge(MG("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),fo("mat-select-panel-animations-enabled",!e._animationsDisabled),B("ngClass",e.panelClass),Xe("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var uW=new ii("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>Nd(t)}});function phe(t){let n=re(Zn);return()=>Nd(n)}var hhe=new ii("MAT_SELECT_CONFIG"),mhe={provide:uW,deps:[],useFactory:phe},fhe=new ii("MatSelectTrigger"),Sz=class{source;value;constructor(n,e){this.source=n,this.value=e}},E1=(()=>{class t{_viewportRuler=re(Rm);_changeDetectorRef=re(Ho);_elementRef=re(_n);_dir=re(kc,{optional:!0});_idGenerator=re(qa);_renderer=re(Kr);_parentFormField=re(Tv,{optional:!0});ngControl=re(Wl,{self:!0,optional:!0});_liveAnnouncer=re(bq);_defaultOptions=re(hhe,{optional:!0});_animationsDisabled=xa();_initialized=new xi;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let i=this.options.toArray()[e];if(i){let o=this.panel.nativeElement,r=dz(e,this.options,this.optionGroups),a=i._getHostElement();e===0&&r===1?o.scrollTop=0:o.scrollTop=uz(a.offsetTop,a.offsetHeight,o.scrollTop,o.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new Sz(this,e)}_scrollStrategyFactory=re(uW);_panelOpen=!1;_compareWith=(e,i)=>e===i;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new xi;_errorStateTracker;stateChanges=new xi;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=Jn(!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(Bd.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=yu(()=>{let e=this.options;return e?e.changes.pipe(Ja(e),wo(()=>xc(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(wo(()=>this.optionSelectionChanges))});openedChange=new yt;_openedStream=this.openedChange.pipe(ro(e=>e),vi(()=>{}));_closedStream=this.openedChange.pipe(ro(e=>!e),vi(()=>{}));selectionChange=new yt;valueChange=new yt;constructor(){let e=re(lz),i=re(I1,{optional:!0}),o=re(T1,{optional:!0}),r=re(new og("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new mT(e,this.ngControl,o,i,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=r==null?0:parseInt(r)||0,this.id=this.id}ngOnInit(){this._selectionModel=new GM(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(Wr(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(Wr(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(Ja(null),Wr(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){let o=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?o.setAttribute("aria-labelledby",e):o.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(this._previousControl!==void 0&&i.disabled!==null&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(Ko(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=`${this.id}-panel`;this._trackedModal&&xv(this._trackedModal,"aria-owns",i),nT(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;xv(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{i(),clearTimeout(o),this._cleanupDetach=void 0};let e=this.panel.nativeElement,i=this._renderer.listen(e,"animationend",r=>{r.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),o=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let i=e.keyCode,o=i===40||i===38||i===37||i===39,r=i===13||i===32,a=this._keyManager;if(!a.isTyping()&&r&&!Pl(e)||(this.multiple||e.altKey)&&o)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;a.onKeydown(e);let f=this.selected;f&&p!==f&&this._liveAnnouncer.announce(f.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,o=e.keyCode,r=o===40||o===38,a=i.isTyping();if(r&&e.altKey)e.preventDefault(),this.close();else if(!a&&(o===13||o===32)&&i.activeItem&&!Pl(e))e.preventDefault(),i.activeItem._selectViaInteraction();else if(!a&&this._multiple&&o===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(f=>!f.disabled&&!f.selected);this.options.forEach(f=>{f.disabled||(p?f.select():f.deselect())})}else{let p=i.activeItemIndex;i.onKeydown(e),this._multiple&&r&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==p&&i.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!Pl(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{let i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let i=this.options.find(o=>{if(this._selectionModel.isSelected(o))return!1;try{return(o.value!=null||this.canSelectNullableOptions)&&this._compareWith(o.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof JI?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 b1(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=xc(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Wr(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),xc(...this.options.map(i=>i._stateChanges)).pipe(Wr(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){let o=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(o!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())),o!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((i,o)=>this.sortComparator?this.sortComparator(i,o,e):e.indexOf(i)-e.indexOf(o)),this.stateChanges.next()}}_propagateChanges(e){let i;this.multiple?i=this.selected.map(o=>o.value):i=this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let i=0;i0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-select"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,fhe,5),Ht(r,sp,5),Ht(r,HM,5)),i&2){let a;Je(a=et())&&(o.customTrigger=a.first),Je(a=et())&&(o.options=a),Je(a=et())&&(o.optionGroups=a)}},viewQuery:function(i,o){if(i&1&&(Qi(x3e,5),Qi(C3e,5),Qi(B4,5)),i&2){let r;Je(r=et())&&(o.trigger=r.first),Je(r=et())&&(o.panel=r.first),Je(r=et())&&(o._overlayDir=r.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(i,o){i&1&&Qe("keydown",function(a){return o._handleKeydown(a)})("focus",function(){return o._onFocus()})("blur",function(){return o._onBlur()}),i&2&&(Xe("id",o.id)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o.panelOpen?o.id+"-panel":null)("aria-expanded",o.panelOpen)("aria-label",o.ariaLabel||null)("aria-required",o.required.toString())("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState)("aria-activedescendant",o._getAriaActiveDescendant()),fo("mat-mdc-select-disabled",o.disabled)("mat-mdc-select-invalid",o.errorState)("mat-mdc-select-required",o.required)("mat-mdc-select-empty",o.empty)("mat-mdc-select-multiple",o.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",lt],disableRipple:[2,"disableRipple","disableRipple",lt],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:wn(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",lt],placeholder:"placeholder",required:[2,"required","required",lt],multiple:[2,"multiple","multiple",lt],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",lt],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",wn],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",lt]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Pi([{provide:hT,useExisting:t},{provide:UM,useExisting:t}]),In],ngContentSelectors:S3e,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(i,o){if(i&1){let r=Bt();eo(w3e),K(0,"div",2,0),Qe("click",function(){return Ee(r),Ae(o.open())}),K(3,"div",3),Lt(4,I3e,2,1,"span",4)(5,A3e,3,1,"span",5),Z(),K(6,"div",6)(7,"div",7),oi(),K(8,"svg",8),Oe(9,"path",9),Z()()()(),le(10,D3e,3,10,"ng-template",10),Qe("detach",function(){return Ee(r),Ae(o.close())})("backdropClick",function(){return Ee(r),Ae(o.close())})("overlayKeydown",function(p){return Ee(r),Ae(o._handleOverlayKeydown(p))})}if(i&2){let r=un(1);L(3),Xe("id",o._valueId),L(),Ft(o.empty?4:5),L(6),B("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",o._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",o._scrollStrategy)("cdkConnectedOverlayOrigin",o._preferredOverlayOrigin||r)("cdkConnectedOverlayPositions",o._positions)("cdkConnectedOverlayWidth",o._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[JI,B4,Rs],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})();var A1=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[mhe],imports:[Gp,qp,Xo,Mm,zd,qp,Xo]})}return t})();function k3e(t,n){if(t&1&&(K(0,"mat-option",17),Ce(1),Z()),t&2){let e=n.$implicit;B("value",e),L(),qn(" ",e," ")}}function M3e(t,n){if(t&1){let e=Bt();K(0,"mat-form-field",14)(1,"mat-select",16,0),Qe("selectionChange",function(o){Ee(e);let r=V(2);return Ae(r._changePageSize(o.value))}),ea(3,k3e,2,2,"mat-option",17,ed),Z(),K(5,"div",18),Qe("click",function(){Ee(e);let o=un(2);return Ae(o.open())}),Z()()}if(t&2){let e=V(2);B("appearance",e._formFieldAppearance)("color",e.color),L(),B("value",e.pageSize)("disabled",e.disabled),ul("aria-labelledby",e._pageSizeLabelId),B("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),L(2),ta(e._displayedPageSizeOptions)}}function R3e(t,n){if(t&1&&(K(0,"div",15),Ce(1),Z()),t&2){let e=V(2);L(),Di(e.pageSize)}}function O3e(t,n){if(t&1&&(K(0,"div",3)(1,"div",13),Ce(2),Z(),Lt(3,M3e,6,7,"mat-form-field",14),Lt(4,R3e,2,1,"div",15),Z()),t&2){let e=V();L(),Xe("id",e._pageSizeLabelId),L(),qn(" ",e._intl.itemsPerPageLabel," "),L(),Ft(e._displayedPageSizeOptions.length>1?3:-1),L(),Ft(e._displayedPageSizeOptions.length<=1?4:-1)}}function P3e(t,n){if(t&1){let e=Bt();K(0,"button",19),Qe("click",function(){Ee(e);let o=V();return Ae(o._buttonClicked(0,o._previousButtonsDisabled()))}),oi(),K(1,"svg",8),Oe(2,"path",20),Z()()}if(t&2){let e=V();B("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),Xe("aria-label",e._intl.firstPageLabel)}}function L3e(t,n){if(t&1){let e=Bt();K(0,"button",21),Qe("click",function(){Ee(e);let o=V();return Ae(o._buttonClicked(o.getNumberOfPages()-1,o._nextButtonsDisabled()))}),oi(),K(1,"svg",8),Oe(2,"path",22),Z()()}if(t&2){let e=V();B("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),Xe("aria-label",e._intl.lastPageLabel)}}var kv=(()=>{class t{changes=new xi;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,i,o)=>{if(o==0||i==0)return`0 of ${o}`;o=Math.max(o,0);let r=e*i,a=r{class t{_intl=re(kv);_changeDetectorRef=re(Ho);_formFieldAppearance;_pageSizeLabelId=re(qa).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new mo(1);color;get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>wn(i,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new yt;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,i=re($M,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:o,pageSizeOptions:r,hidePageSize:a,showFirstLastButtons:p}=i;o!=null&&(this._pageSize=o),r!=null&&(this._pageSizeOptions=r),a!=null&&(this.hidePageSize=a),p!=null&&(this.showFirstLastButtons=p)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndexe-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let i=this.pageIndex;e!==i&&(this.pageIndex=e,this._emitPageEvent(i))}_buttonClicked(e,i){i||this._navigate(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",wn],length:[2,"length","length",wn],pageSize:[2,"pageSize","pageSize",wn],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",lt],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",lt],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",lt]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(i,o){i&1&&(K(0,"div",1)(1,"div",2),Lt(2,O3e,5,4,"div",3),K(3,"div",4)(4,"div",5),Ce(5),Z(),Lt(6,P3e,3,5,"button",6),K(7,"button",7),Qe("click",function(){return o._buttonClicked(o.pageIndex-1,o._previousButtonsDisabled())}),oi(),K(8,"svg",8),Oe(9,"path",9),Z()(),W_(),K(10,"button",10),Qe("click",function(){return o._buttonClicked(o.pageIndex+1,o._nextButtonsDisabled())}),oi(),K(11,"svg",8),Oe(12,"path",11),Z()(),Lt(13,L3e,3,5,"button",12),Z()()()),i&2&&(L(2),Ft(o.hidePageSize?-1:2),L(3),qn(" ",o._intl.getRangeLabel(o.pageIndex,o.pageSize,o.length)," "),L(),Ft(o.showFirstLastButtons?6:-1),L(),B("matTooltip",o._intl.previousPageLabel)("matTooltipDisabled",o._previousButtonsDisabled())("disabled",o._previousButtonsDisabled())("tabindex",o._previousButtonsDisabled()?-1:null),Xe("aria-label",o._intl.previousPageLabel),L(3),B("matTooltip",o._intl.nextPageLabel)("matTooltipDisabled",o._nextButtonsDisabled())("disabled",o._nextButtonsDisabled())("tabindex",o._nextButtonsDisabled()?-1:null),Xe("aria-label",o._intl.nextPageLabel),L(3),Ft(o.showFirstLastButtons?13:-1))},dependencies:[vd,E1,sp,yd,Fm],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})(),ghe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[N3e],imports:[Jo,A1,Nm,z3e]})}return t})();var _he=(()=>{class t extends kv{constructor(){super(...arguments),this.itemsPerPageLabel="Elemente pro Seite",this.nextPageLabel="N\xE4chste Seite",this.previousPageLabel="Vorherige Seite",this.getRangeLabel=this.buildRangeLabel}buildRangeLabel(e,i,o){return`${e*i+1} - ${e*i+i} von ${o}`}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})()}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pW=class t{static{this.DEFAULT=new t(20,0)}constructor(n,e){this.size=n,this.page=e}static of(n){return new t(n.pageSize,n.pageIndex)}toHttpParams(){let n=new Mr;return n=n.set("size",this.size.toString()),n=n.set("page",this.page.toString()),n}};var mg=(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})(mg||{}),U3e="*";function Ph(t,n){return{type:mg.Trigger,name:t,definitions:n,options:{}}}function Kl(t,n=null){return{type:mg.Animate,styles:n,timings:t}}function i6t(t,n=null){return{type:mg.Sequence,steps:t,options:n}}function hl(t){return{type:mg.Style,styles:t,offset:null}}function fW(t,n,e){return{type:mg.State,name:t,styles:n,options:e}}function Mc(t,n,e=null){return{type:mg.Transition,expr:t,animation:n,options:e}}function fg(t,n=null){return{type:mg.Reference,animation:t,options:n}}function Mv(t,n=null){return{type:mg.AnimateRef,animation:t,options:n}}var hW=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,e=0){this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let e=n=="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},mW=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let e=0,i=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==r&&this._onFinish()}),a.onDestroy(()=>{++i==r&&this._onDestroy()}),a.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,p)=>Math.max(a,p.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let e=n*this.totalTime;this.players.forEach(i=>{let o=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(o)})}getPosition(){let n=this.players.reduce((e,i)=>e===null||i.totalTime>e.totalTime?i:e,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let e=n=="start"?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},H3e="!";function _T(...t){if(t){let n=[];for(let e=0;ep?a:void 0);n=r.length?n.concat(r.filter(a=>!!a)):n}}return n.join(" ").trim()}}function Zl(t,n){return t?t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className):!1}function Rc(t,n){if(t&&n){let e=i=>{Zl(t,i)||(t.classList?t.classList.add(i):t.className+=" "+i)};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function j3e(){return window.innerWidth-document.documentElement.offsetWidth}function vhe(t){typeof t=="string"?Rc(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.setProperty(t.variableName,j3e()+"px"),Rc(document.body,t?.className||"p-overflow-hidden"))}function nd(t,n){if(t&&n){let e=i=>{t.classList?t.classList.remove(i):t.className=t.className.replace(new RegExp("(^|\\b)"+i.split(" ").join("|")+"(\\b|$)","gi")," ")};[n].flat().filter(Boolean).forEach(i=>i.split(" ").forEach(e))}}function bhe(t){typeof t=="string"?nd(document.body,t||"p-overflow-hidden"):(t!=null&&t.variableName&&document.body.style.removeProperty(t.variableName),nd(document.body,t?.className||"p-overflow-hidden"))}function qM(t){for(let n of document?.styleSheets)try{for(let e of n?.cssRules)for(let i of e?.style)if(t.test(i))return{name:i,value:e.style.getPropertyValue(i).trim()}}catch{}return null}function xhe(t){let n={width:0,height:0};if(t){let[e,i]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block",n.width=t.offsetWidth,n.height=t.offsetHeight,t.style.display=i,t.style.visibility=e}return n}function Rv(){let t=window,n=document,e=n.documentElement,i=n.getElementsByTagName("body")[0],o=t.innerWidth||e.clientWidth||i.clientWidth,r=t.innerHeight||e.clientHeight||i.clientHeight;return{width:o,height:r}}function _W(t){return t?Math.abs(t.scrollLeft):0}function yW(){let t=document.documentElement;return(window.pageXOffset||_W(t))-(t.clientLeft||0)}function vW(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function Tz(t){return t?getComputedStyle(t).direction==="rtl":!1}function Ez(t,n,e=!0){var i,o,r,a;if(t){let p=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:xhe(t),f=p.height,x=p.width,I=n.offsetHeight,D=n.offsetWidth,P=n.getBoundingClientRect(),R=vW(),j=yW(),$=Rv(),W,Q,se="top";P.top+I+f>$.height?(W=P.top+R-f,se="bottom",W<0&&(W=R)):W=I+P.top+R,P.left+x>$.width?Q=Math.max(0,P.left+j+D-x):Q=P.left+j,Tz(t)?t.style.insetInlineEnd=Q+"px":t.style.insetInlineStart=Q+"px",t.style.top=W+"px",t.style.transformOrigin=se,e&&(t.style.marginTop=se==="bottom"?`calc(${(o=(i=qM(/-anchor-gutter$/))==null?void 0:i.value)!=null?o:"2px"} * -1)`:(a=(r=qM(/-anchor-gutter$/))==null?void 0:r.value)!=null?a:"")}}function WM(t,n){t&&(typeof n=="string"?t.style.cssText=n:Object.entries(n||{}).forEach(([e,i])=>t.style[e]=i))}function Da(t,n){if(t instanceof HTMLElement){let e=t.offsetWidth;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginLeft)+parseFloat(i.marginRight)}return e}return 0}function Az(t,n,e=!0,i=void 0){var o;if(t){let r=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:xhe(t),a=n.offsetHeight,p=n.getBoundingClientRect(),f=Rv(),x,I,D=i??"top";if(!i&&p.top+a+r.height>f.height?(x=-1*r.height,D="bottom",p.top+x<0&&(x=-1*p.top)):x=a,r.width>f.width?I=p.left*-1:p.left+r.width>f.width?I=(p.left+r.width-f.width)*-1:I=0,t.style.top=x+"px",t.style.insetInlineStart=I+"px",t.style.transformOrigin=D,e){let P=(o=qM(/-anchor-gutter$/))==null?void 0:o.value;t.style.marginTop=D==="bottom"?`calc(${P??"2px"} * -1)`:P??""}}}function Che(t){if(t){let n=t.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n}return null}function G3e(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&Che(t))}function yT(t){return typeof Element<"u"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}function whe(t){let n=t;return t&&typeof t=="object"&&(Object.hasOwn(t,"current")?n=t.current:Object.hasOwn(t,"el")&&(Object.hasOwn(t.el,"nativeElement")?n=t.el.nativeElement:n=t.el)),yT(n)?n:void 0}function bW(t,n){var e,i,o;if(t)switch(t){case"document":return document;case"window":return window;case"body":return document.body;case"@next":return n?.nextElementSibling;case"@prev":return n?.previousElementSibling;case"@first":return n?.firstElementChild;case"@last":return n?.lastElementChild;case"@child":return(e=n?.children)==null?void 0:e[0];case"@parent":return n?.parentElement;case"@grandparent":return(i=n?.parentElement)==null?void 0:i.parentElement;default:{if(typeof t=="string"){let p=t.match(/^@child\[(\d+)]/);return p?((o=n?.children)==null?void 0:o[parseInt(p[1],10)])||null:document.querySelector(t)||null}let r=(p=>typeof p=="function"&&"call"in p&&"apply"in p)(t)?t():t,a=whe(r);return G3e(a)?a:r?.nodeType===9?r:void 0}}}function l0(t,n){let e=bW(t,n);if(e)e.appendChild(n);else throw new Error("Cannot append "+n+" to "+t)}var gW;function yhe(t){if(t){let n=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(gW!=null)return gW;let n=document.createElement("div");WM(n,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(n);let e=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),gW=e,e}}function Dz(t,n={}){if(yT(t)){let e=(i,o)=>{var r,a;let p=(r=t?.$attrs)!=null&&r[i]?[(a=t?.$attrs)==null?void 0:a[i]]:[];return[o].flat().reduce((f,x)=>{if(x!=null){let I=typeof x;if(I==="string"||I==="number")f.push(x);else if(I==="object"){let D=Array.isArray(x)?e(i,x):Object.entries(x).map(([P,R])=>i==="style"&&(R||R===0)?`${P.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${R}`:R?P:void 0);f=D.length?f.concat(D.filter(P=>!!P)):f}}return f},p)};Object.entries(n).forEach(([i,o])=>{if(o!=null){let r=i.match(/^on(.+)/);r?t.addEventListener(r[1].toLowerCase(),o):i==="p-bind"||i==="pBind"?Dz(t,o):(o=i==="class"?[...new Set(e("class",o))].join(" ").trim():i==="style"?e("style",o).join(";").trim():o,(t.$attrs=t.$attrs||{})&&(t.$attrs[i]=o),t.setAttribute(i,o))}})}}function She(t,n={},...e){if(t){let i=document.createElement(t);return Dz(i,n),i.append(...e),i}}function Ihe(t,n){if(t){t.style.opacity="0";let e=+new Date,i="0",o=function(){i=`${+t.style.opacity+(new Date().getTime()-e)/n}`,t.style.opacity=i,e=+new Date,+i<1&&("requestAnimationFrame"in window?requestAnimationFrame(o):setTimeout(o,16))};o()}}function gg(t,n){return yT(t)?Array.from(t.querySelectorAll(n)):[]}function $r(t,n){return yT(t)?t.matches(n)?t:t.querySelector(n):null}function cs(t,n){t&&document.activeElement!==t&&t.focus(n)}function KM(t,n){if(yT(t)){let e=t.getAttribute(n);return isNaN(e)?e==="true"||e==="false"?e==="true":e:+e}}function c0(t,n=""){let e=gg(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [href]:not([tabindex = "-1"]):not([style*="display:none"]):not([hidden])${n}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n}`),i=[];for(let o of e)getComputedStyle(o).display!="none"&&getComputedStyle(o).visibility!="hidden"&&i.push(o);return i}function vT(t,n){let e=c0(t,n);return e.length>0?e[0]:null}function _g(t){if(t){let n=t.offsetHeight,e=getComputedStyle(t);return n-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),n}return 0}function $3e(t){if(t){let[n,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let i=t.offsetHeight;return t.style.display=e,t.style.visibility=n,i}return 0}function q3e(t){if(t){let[n,e]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let i=t.offsetWidth;return t.style.display=e,t.style.visibility=n,i}return 0}function ZM(t){var n;if(t){let e=(n=Che(t))==null?void 0:n.childNodes,i=0;if(e)for(let o=0;o0?e[e.length-1]:null}function xT(t){if(t){let n=t.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||_W(document.documentElement)||_W(document.body)||0)}}return{top:"auto",left:"auto"}}function Vd(t,n){if(t){let e=t.offsetHeight;if(n){let i=getComputedStyle(t);e+=parseFloat(i.marginTop)+parseFloat(i.marginBottom)}return e}return 0}function The(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function ku(t){if(t){let n=t.offsetWidth,e=getComputedStyle(t);return n-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth),n}return 0}function xW(t){return!!(t&&t.offsetParent!=null)}function Lh(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Ehe(t,n){var e,i;if(t){let o=t.parentElement,r=xT(o),a=Rv(),p=t.offsetParent?t.offsetWidth:q3e(t),f=t.offsetParent?t.offsetHeight:$3e(t),x=Da((e=o?.children)==null?void 0:e[0]),I=Vd((i=o?.children)==null?void 0:i[0]),D="",P="";r.left+x+p>a.width-yhe()?r.lefta.height?P=`-${f-I}px`:P="0px",t.style.top=P,t.style.insetInlineStart=D}}function Ahe(t){var n;t&&("remove"in Element.prototype?t.remove():(n=t.parentNode)==null||n.removeChild(t))}function Dhe(t,n){let e=whe(t);if(e)e.removeChild(n);else throw new Error("Cannot remove "+n+" from "+t)}function khe(t,n){let e=getComputedStyle(t).getPropertyValue("borderTopWidth"),i=e?parseFloat(e):0,o=getComputedStyle(t).getPropertyValue("paddingTop"),r=o?parseFloat(o):0,a=t.getBoundingClientRect(),p=n.getBoundingClientRect().top+document.body.scrollTop-(a.top+document.body.scrollTop)-i-r,f=t.scrollTop,x=t.clientHeight,I=Vd(n);p<0?t.scrollTop=f+p:p+I>x&&(t.scrollTop=f+p-x+I)}function Ov(t,n="",e){yT(t)&&e!==null&&e!==void 0&&t.setAttribute(n,e)}function Mhe(){let t=new Map;return{on(n,e){let i=t.get(n);return i?i.push(e):i=[e],t.set(n,i),this},off(n,e){let i=t.get(n);return i&&i.splice(i.indexOf(e)>>>0,1),this},emit(n,e){let i=t.get(n);i&&i.forEach(o=>{o(e)})},clear(){t.clear()}}}var W3e=Object.defineProperty,Rhe=Object.getOwnPropertySymbols,K3e=Object.prototype.hasOwnProperty,Z3e=Object.prototype.propertyIsEnumerable,Ohe=(t,n,e)=>n in t?W3e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Y3e=(t,n)=>{for(var e in n||(n={}))K3e.call(n,e)&&Ohe(t,e,n[e]);if(Rhe)for(var e of Rhe(n))Z3e.call(n,e)&&Ohe(t,e,n[e]);return t};function Ud(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function CW(t,n,e=new WeakSet){if(t===n)return!0;if(!t||!n||typeof t!="object"||typeof n!="object"||e.has(t)||e.has(n))return!1;e.add(t).add(n);let i=Array.isArray(t),o=Array.isArray(n),r,a,p;if(i&&o){if(a=t.length,a!=n.length)return!1;for(r=a;r--!==0;)if(!CW(t[r],n[r],e))return!1;return!0}if(i!=o)return!1;let f=t instanceof Date,x=n instanceof Date;if(f!=x)return!1;if(f&&x)return t.getTime()==n.getTime();let I=t instanceof RegExp,D=n instanceof RegExp;if(I!=D)return!1;if(I&&D)return t.toString()==n.toString();let P=Object.keys(t);if(a=P.length,a!==Object.keys(n).length)return!1;for(r=a;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,P[r]))return!1;for(r=a;r--!==0;)if(p=P[r],!CW(t[p],n[p],e))return!1;return!0}function YM(t,n){return CW(t,n)}function Lhe(t){return typeof t=="function"&&"call"in t&&"apply"in t}function er(t){return!Ud(t)}function wa(t,n){if(!t||!n)return null;try{let e=t[n];if(er(e))return e}catch{}if(Object.keys(t).length){if(Lhe(n))return n(t);if(n.indexOf(".")===-1)return t[n];{let e=n.split("."),i=t;for(let o=0,r=e.length;o{let o=i;Bm(n[o])&&o in t&&Bm(t[o])?e[o]=Nhe(t[o],n[o]):e[o]=n[o]}),e}function Bhe(...t){return t.reduce((n,e,i)=>i===0?e:Nhe(n,e),{})}function ap(t,n){let e=-1;if(er(t))try{e=t.findLastIndex(n)}catch{e=t.lastIndexOf([...t].reverse().find(n))}return e}function bd(t,...n){return Lhe(t)?t(...n):t}function Pv(t,n=!0){return typeof t=="string"&&(n||t!=="")}function Phe(t){return Pv(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function kz(t,n="",e={}){let i=Phe(n).split("."),o=i.shift();if(o){if(Bm(t)){let r=Object.keys(t).find(a=>Phe(a)===o)||"";return kz(bd(t[r],e),i.join("."),e)}return}return bd(t,e)}function wW(t,n=!0){return Array.isArray(t)&&(n||t.length!==0)}function QM(t){return t instanceof Date}function zhe(t){return er(t)&&!isNaN(t)}function CT(t=""){return er(t)&&t.length===1&&!!t.match(/\S| /)}function zm(t,n){if(n){let e=n.test(t);return n.lastIndex=0,e}return!1}function k1(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 Wp(t){if(t&&/[\xC0-\xFF\u0100-\u017E]/.test(t)){let n={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let e in n)t=t.replace(n[e],e)}return t}function Mz(t){return Pv(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(n,e)=>e===0?n:"-"+n.toLowerCase()).toLowerCase():t}var Rz={};function tr(t="pui_id_"){return Object.hasOwn(Rz,t)||(Rz[t]=0),Rz[t]++,`${t}${Rz[t]}`}var Vhe=["*"];var Oc=(()=>{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})(),SW=(()=>{class t{static AND="and";static OR="or"}return t})(),wT=(()=>{class t{filter(e,i,o,r,a){let p=[];if(e)for(let f of e)for(let x of i){let I=wa(f,x);if(this.filters[r](I,o,a)){p.push(f);break}}return p}filters={startsWith:(e,i,o)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let r=Wp(i.toString()).toLocaleLowerCase(o);return Wp(e.toString()).toLocaleLowerCase(o).slice(0,r.length)===r},contains:(e,i,o)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let r=Wp(i.toString()).toLocaleLowerCase(o);return Wp(e.toString()).toLocaleLowerCase(o).indexOf(r)!==-1},notContains:(e,i,o)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(e==null)return!1;let r=Wp(i.toString()).toLocaleLowerCase(o);return Wp(e.toString()).toLocaleLowerCase(o).indexOf(r)===-1},endsWith:(e,i,o)=>{if(i==null||i.trim()==="")return!0;if(e==null)return!1;let r=Wp(i.toString()).toLocaleLowerCase(o),a=Wp(e.toString()).toLocaleLowerCase(o);return a.indexOf(r,a.length-r.length)!==-1},equals:(e,i,o)=>i==null||typeof i=="string"&&i.trim()===""?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()===i.getTime():e==i?!0:Wp(e.toString()).toLocaleLowerCase(o)==Wp(i.toString()).toLocaleLowerCase(o),notEquals:(e,i,o)=>i==null||typeof i=="string"&&i.trim()===""?!1:e==null?!0:e.getTime&&i.getTime?e.getTime()!==i.getTime():e==i?!1:Wp(e.toString()).toLocaleLowerCase(o)!=Wp(i.toString()).toLocaleLowerCase(o),in:(e,i)=>{if(i==null||i.length===0)return!0;for(let o=0;oi==null||i[0]==null||i[1]==null?!0:e==null?!1:e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1],lt:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i,gt:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>i.getTime():e>i,gte:(e,i,o)=>i==null?!0:e==null?!1:e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i,is:(e,i,o)=>this.filters.equals(e,i,o),isNot:(e,i,o)=>this.filters.notEquals(e,i,o),before:(e,i,o)=>this.filters.lt(e,i,o),after:(e,i,o)=>this.filters.gt(e,i,o),dateIs:(e,i)=>i==null?!0:e==null?!1:e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>i==null?!0:e==null?!1:e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>i==null?!0:e==null?!1:e.getTime()i==null?!0:e==null?!1:(e.setHours(0,0,0,0),e.getTime()>i.getTime())};register(e,i){this.filters[e]=i}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Fh=(()=>{class t{clickSource=new xi;clickObservable=this.clickSource.asObservable();add(e){e&&this.clickSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Uhe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["p-header"]],standalone:!1,ngContentSelectors:Vhe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},encapsulation:2})}return t})(),Hhe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["p-footer"]],standalone:!1,ngContentSelectors:Vhe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},encapsulation:2})}return t})(),Uo=(()=>{class t{template;type;name;constructor(e){this.template=e}getType(){return this.name}static \u0275fac=function(i){return new(i||t)(rt(Ml))};static \u0275dir=Ki({type:t,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]}})}return t})(),kn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[po]})}return t})(),Ts=(()=>{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})();var Q3e=Object.defineProperty,X3e=Object.defineProperties,J3e=Object.getOwnPropertyDescriptors,Oz=Object.getOwnPropertySymbols,$he=Object.prototype.hasOwnProperty,qhe=Object.prototype.propertyIsEnumerable,jhe=(t,n,e)=>n in t?Q3e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Um=(t,n)=>{for(var e in n||(n={}))$he.call(n,e)&&jhe(t,e,n[e]);if(Oz)for(var e of Oz(n))qhe.call(n,e)&&jhe(t,e,n[e]);return t},IW=(t,n)=>X3e(t,J3e(n)),d0=(t,n)=>{var e={};for(var i in t)$he.call(t,i)&&n.indexOf(i)<0&&(e[i]=t[i]);if(t!=null&&Oz)for(var i of Oz(t))n.indexOf(i)<0&&qhe.call(t,i)&&(e[i]=t[i]);return e};function b6t(...t){return Bhe(...t)}var eBe=Mhe(),Kp=eBe,XM=/{([^}]*)}/g,Whe=/(\d+\s+[\+\-\*\/]\s+\d+)/g,Khe=/var\([^)]+\)/g;function Ghe(t){return Pv(t)?t.replace(/[A-Z]/g,(n,e)=>e===0?n:"."+n.toLowerCase()).toLowerCase():t}function tBe(t){return Bm(t)&&t.hasOwnProperty("$value")&&t.hasOwnProperty("$type")?t.$value:t}function iBe(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function TW(t="",n=""){return iBe(`${Pv(t,!1)&&Pv(n,!1)?`${t}-`:t}${n}`)}function Zhe(t="",n=""){return`--${TW(t,n)}`}function nBe(t=""){let n=(t.match(/{/g)||[]).length,e=(t.match(/}/g)||[]).length;return(n+e)%2!==0}function Yhe(t,n="",e="",i=[],o){if(Pv(t)){let r=t.trim();if(nBe(r))return;if(zm(r,XM)){let a=r.replaceAll(XM,p=>{let f=p.replace(/{|}/g,"").split(".").filter(x=>!i.some(I=>zm(x,I)));return`var(${Zhe(e,Mz(f.join("-")))}${er(o)?`, ${o}`:""})`});return zm(a.replace(Khe,"0"),Whe)?`calc(${a})`:a}return r}else if(zhe(t))return t}function oBe(t,n,e){Pv(n,!1)&&t.push(`${n}:${e};`)}function ST(t,n){return t?`${t}{${n}}`:""}function Qhe(t,n){if(t.indexOf("dt(")===-1)return t;function e(a,p){let f=[],x=0,I="",D=null,P=0;for(;x<=a.length;){let R=a[x];if((R==='"'||R==="'"||R==="`")&&a[x-1]!=="\\"&&(D=D===R?null:R),!D&&(R==="("&&P++,R===")"&&P--,(R===","||x===a.length)&&P===0)){let j=I.trim();j.startsWith("dt(")?f.push(Qhe(j,p)):f.push(i(j)),I="",x++;continue}R!==void 0&&(I+=R),x++}return f}function i(a){let p=a[0];if((p==='"'||p==="'"||p==="`")&&a[a.length-1]===p)return a.slice(1,-1);let f=Number(a);return isNaN(f)?a:f}let o=[],r=[];for(let a=0;a0){let p=r.pop();r.length===0&&o.push([p,a])}if(!o.length)return t;for(let a=o.length-1;a>=0;a--){let[p,f]=o[a],x=t.slice(p+3,f),I=e(x,n),D=n(...I);t=t.slice(0,p)+D+t.slice(f+1)}return t}var AW=t=>{var n;let e=Sa.getTheme(),i=EW(e,t,void 0,"variable"),o=(n=i?.match(/--[\w-]+/g))==null?void 0:n[0],r=EW(e,t,void 0,"value");return{name:o,variable:i,value:r}},u0=(...t)=>EW(Sa.getTheme(),...t),EW=(t={},n,e,i)=>{if(n){let{variable:o,options:r}=Sa.defaults||{},{prefix:a,transform:p}=t?.options||r||{},f=zm(n,XM)?n:`{${n}}`;return i==="value"||Ud(i)&&p==="strict"?Sa.getTokenValue(n):Yhe(f,void 0,a,[o.excludedKeyRegex],e)}return""};function IT(t,...n){if(t instanceof Array){let e=t.reduce((i,o,r)=>{var a;return i+o+((a=bd(n[r],{dt:u0}))!=null?a:"")},"");return Qhe(e,u0)}return bd(t,{dt:u0})}function rBe(t,n={}){let e=Sa.defaults.variable,{prefix:i=e.prefix,selector:o=e.selector,excludedKeyRegex:r=e.excludedKeyRegex}=n,a=[],p=[],f=[{node:t,path:i}];for(;f.length;){let{node:I,path:D}=f.pop();for(let P in I){let R=I[P],j=tBe(R),$=zm(P,r)?TW(D):TW(D,Mz(P));if(Bm(j))f.push({node:j,path:$});else{let W=Zhe($),Q=Yhe(j,$,i,[r]);oBe(p,W,Q);let se=$;i&&se.startsWith(i+"-")&&(se=se.slice(i.length+1)),a.push(se.replace(/-/g,"."))}}}let x=p.join("");return{value:p,tokens:a,declarations:x,css:ST(o,x)}}var Vm={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:t,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark)",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let n=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[t].flat().map(e=>{var i;return(i=n.map(o=>o.resolve(e)).find(o=>o.matched))!=null?i:this.rules.custom.resolve(e)})}},_toVariables(t,n){return rBe(t,{prefix:n?.prefix})},getCommon({name:t="",theme:n={},params:e,set:i,defaults:o}){var r,a,p,f,x,I,D;let{preset:P,options:R}=n,j,$,W,Q,se,ge,Re;if(er(P)&&R.transform!=="strict"){let{primitive:Se,semantic:fe,extend:be}=P,je=fe||{},{colorScheme:st}=je,Fe=d0(je,["colorScheme"]),ht=be||{},{colorScheme:ue}=ht,Pt=d0(ht,["colorScheme"]),ki=st||{},{dark:zt}=ki,Bi=d0(ki,["dark"]),qt=ue||{},{dark:en}=qt,_t=d0(qt,["dark"]),St=er(Se)?this._toVariables({primitive:Se},R):{},Ei=er(Fe)?this._toVariables({semantic:Fe},R):{},qi=er(Bi)?this._toVariables({light:Bi},R):{},zi=er(zt)?this._toVariables({dark:zt},R):{},vn=er(Pt)?this._toVariables({semantic:Pt},R):{},Gn=er(_t)?this._toVariables({light:_t},R):{},Wi=er(en)?this._toVariables({dark:en},R):{},[An,Vn]=[(r=St.declarations)!=null?r:"",St.tokens],[Fn,Lo]=[(a=Ei.declarations)!=null?a:"",Ei.tokens||[]],[gr,pe]=[(p=qi.declarations)!=null?p:"",qi.tokens||[]],[Qt,Wt]=[(f=zi.declarations)!=null?f:"",zi.tokens||[]],[at,Ze]=[(x=vn.declarations)!=null?x:"",vn.tokens||[]],[Dt,Si]=[(I=Gn.declarations)!=null?I:"",Gn.tokens||[]],[Li,Zt]=[(D=Wi.declarations)!=null?D:"",Wi.tokens||[]];j=this.transformCSS(t,An,"light","variable",R,i,o),$=Vn;let sn=this.transformCSS(t,`${Fn}${gr}`,"light","variable",R,i,o),bn=this.transformCSS(t,`${Qt}`,"dark","variable",R,i,o);W=`${sn}${bn}`,Q=[...new Set([...Lo,...pe,...Wt])];let nn=this.transformCSS(t,`${at}${Dt}color-scheme:light`,"light","variable",R,i,o),Sn=this.transformCSS(t,`${Li}color-scheme:dark`,"dark","variable",R,i,o);se=`${nn}${Sn}`,ge=[...new Set([...Ze,...Si,...Zt])],Re=bd(P.css,{dt:u0})}return{primitive:{css:j,tokens:$},semantic:{css:W,tokens:Q},global:{css:se,tokens:ge},style:Re}},getPreset({name:t="",preset:n={},options:e,params:i,set:o,defaults:r,selector:a}){var p,f,x;let I,D,P;if(er(n)&&e.transform!=="strict"){let R=t.replace("-directive",""),j=n,{colorScheme:$,extend:W,css:Q}=j,se=d0(j,["colorScheme","extend","css"]),ge=W||{},{colorScheme:Re}=ge,Se=d0(ge,["colorScheme"]),fe=$||{},{dark:be}=fe,je=d0(fe,["dark"]),st=Re||{},{dark:Fe}=st,ht=d0(st,["dark"]),ue=er(se)?this._toVariables({[R]:Um(Um({},se),Se)},e):{},Pt=er(je)?this._toVariables({[R]:Um(Um({},je),ht)},e):{},ki=er(be)?this._toVariables({[R]:Um(Um({},be),Fe)},e):{},[zt,Bi]=[(p=ue.declarations)!=null?p:"",ue.tokens||[]],[qt,en]=[(f=Pt.declarations)!=null?f:"",Pt.tokens||[]],[_t,St]=[(x=ki.declarations)!=null?x:"",ki.tokens||[]],Ei=this.transformCSS(R,`${zt}${qt}`,"light","variable",e,o,r,a),qi=this.transformCSS(R,_t,"dark","variable",e,o,r,a);I=`${Ei}${qi}`,D=[...new Set([...Bi,...en,...St])],P=bd(Q,{dt:u0})}return{css:I,tokens:D,style:P}},getPresetC({name:t="",theme:n={},params:e,set:i,defaults:o}){var r;let{preset:a,options:p}=n,f=(r=a?.components)==null?void 0:r[t];return this.getPreset({name:t,preset:f,options:p,params:e,set:i,defaults:o})},getPresetD({name:t="",theme:n={},params:e,set:i,defaults:o}){var r,a;let p=t.replace("-directive",""),{preset:f,options:x}=n,I=((r=f?.components)==null?void 0:r[p])||((a=f?.directives)==null?void 0:a[p]);return this.getPreset({name:p,preset:I,options:x,params:e,set:i,defaults:o})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,n){var e;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?n.options.darkModeSelector:(e=t.darkModeSelector)!=null?e:n.options.darkModeSelector):[]},getLayerOrder(t,n={},e,i){let{cssLayer:o}=n;return o?`@layer ${bd(o.order||o.name||"primeui",e)}`:""},getCommonStyleSheet({name:t="",theme:n={},params:e,props:i={},set:o,defaults:r}){let a=this.getCommon({name:t,theme:n,params:e,set:o,defaults:r}),p=Object.entries(i).reduce((f,[x,I])=>f.push(`${x}="${I}"`)&&f,[]).join(" ");return Object.entries(a||{}).reduce((f,[x,I])=>{if(Bm(I)&&Object.hasOwn(I,"css")){let D=k1(I.css),P=`${x}-variables`;f.push(``)}return f},[]).join("")},getStyleSheet({name:t="",theme:n={},params:e,props:i={},set:o,defaults:r}){var a;let p={name:t,theme:n,params:e,set:o,defaults:r},f=(a=t.includes("-directive")?this.getPresetD(p):this.getPresetC(p))==null?void 0:a.css,x=Object.entries(i).reduce((I,[D,P])=>I.push(`${D}="${P}"`)&&I,[]).join(" ");return f?``:""},createTokens(t={},n,e="",i="",o={}){let r=function(p,f={},x=[]){if(x.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:p,path:this.path,paths:f,value:void 0};x.push(this.path),f.name=this.path,f.binding||(f.binding={});let I=this.value;if(typeof this.value=="string"&&XM.test(this.value)){let D=this.value.trim().replace(XM,P=>{var R;let j=P.slice(1,-1),$=this.tokens[j];if(!$)return console.warn(`Token not found for path: ${j}`),"__UNRESOLVED__";let W=$.computed(p,f,x);return Array.isArray(W)&&W.length===2?`light-dark(${W[0].value},${W[1].value})`:(R=W?.value)!=null?R:"__UNRESOLVED__"});I=Whe.test(D.replace(Khe,"0"))?`calc(${D})`:D}return Ud(f.binding)&&delete f.binding,x.pop(),{colorScheme:p,path:this.path,paths:f,value:I.includes("__UNRESOLVED__")?void 0:I}},a=(p,f,x)=>{Object.entries(p).forEach(([I,D])=>{let P=zm(I,n.variable.excludedKeyRegex)?f:f?`${f}.${Ghe(I)}`:Ghe(I),R=x?`${x}.${I}`:I;Bm(D)?a(D,P,R):(o[P]||(o[P]={paths:[],computed:(j,$={},W=[])=>{if(o[P].paths.length===1)return o[P].paths[0].computed(o[P].paths[0].scheme,$.binding,W);if(j&&j!=="none")for(let Q=0;QQ.computed(Q.scheme,$[Q.scheme],W))}}),o[P].paths.push({path:R,value:D,scheme:R.includes("colorScheme.light")?"light":R.includes("colorScheme.dark")?"dark":"none",computed:r,tokens:o}))})};return a(t,e,i),o},getTokenValue(t,n,e){var i;let o=(p=>p.split(".").filter(f=>!zm(f.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(n),r=n.includes("colorScheme.light")?"light":n.includes("colorScheme.dark")?"dark":void 0,a=[(i=t[o])==null?void 0:i.computed(r)].flat().filter(p=>p);return a.length===1?a[0].value:a.reduce((p={},f)=>{let x=f,{colorScheme:I}=x,D=d0(x,["colorScheme"]);return p[I]=D,p},void 0)},getSelectorRule(t,n,e,i){return e==="class"||e==="attr"?ST(er(n)?`${t}${n},${t} ${n}`:t,i):ST(t,ST(n??":root",i))},transformCSS(t,n,e,i,o={},r,a,p){if(er(n)){let{cssLayer:f}=o;if(i!=="style"){let x=this.getColorSchemeOption(o,a);n=e==="dark"?x.reduce((I,{type:D,selector:P})=>(er(P)&&(I+=P.includes("[CSS]")?P.replace("[CSS]",n):this.getSelectorRule(P,p,D,n)),I),""):ST(p??":root",n)}if(f){let x={name:"primeui",order:"primeui"};Bm(f)&&(x.name=bd(f.name,{name:t,type:i})),er(x.name)&&(n=ST(`@layer ${x.name}`,n),r?.layerNames(x.name))}return n}return""}},Sa={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:n}=t;n&&(this._theme=IW(Um({},n),{options:Um(Um({},this.defaults.options),n.options)}),this._tokens=Vm.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}),Kp.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=IW(Um({},this.theme),{preset:t}),this._tokens=Vm.createTokens(t,this.defaults),this.clearLoadedStyleNames(),Kp.emit("preset:change",t),Kp.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=IW(Um({},this.theme),{options:t}),this.clearLoadedStyleNames(),Kp.emit("options:change",t),Kp.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 Vm.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",n){return Vm.getCommon({name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vm.getPresetC(e)},getDirective(t="",n){let e={name:t,theme:this.theme,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vm.getPresetD(e)},getCustomPreset(t="",n,e,i){let o={name:t,preset:n,options:this.options,selector:e,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vm.getPreset(o)},getLayerOrderCSS(t=""){return Vm.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",n,e="style",i){return Vm.transformCSS(t,n,i,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",n,e={}){return Vm.getCommonStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,n,e={}){return Vm.getStyleSheet({name:t,theme:this.theme,params:n,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:n}){this._loadingStyles.size&&(this._loadingStyles.delete(n),Kp.emit(`theme:${n}:load`,t),!this._loadingStyles.size&&Kp.emit("theme:load"))}};var Xhe=` *, ::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 sBe=0,Jhe=(()=>{class t{document=re(zn);use(e,i={}){let o=!1,r=e,a=null,{immediate:p=!0,manual:f=!1,name:x=`style_${++sBe}`,id:I=void 0,media:D=void 0,nonce:P=void 0,first:R=!1,props:j={}}=i;if(this.document){if(a=this.document.querySelector(`style[data-primeng-style-id="${x}"]`)||I&&this.document.getElementById(I)||this.document.createElement("style"),!a.isConnected){r=e;let $=this.document.head;Ov(a,"nonce",P),R&&$.firstChild?$.insertBefore(a,$.firstChild):$.appendChild(a),Dz(a,{type:"text/css",media:D,nonce:P,"data-primeng-style-id":x})}return a.textContent!==r&&(a.textContent=r),{id:I,name:x,el:a,css:r}}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var TT={_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()}},aBe=` .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'); } `,to=(()=>{class t{name="base";useStyle=re(Jhe);theme=void 0;css=void 0;classes={};inlineStyles={};load=(e,i={},o=r=>r)=>{let r=o(IT`${bd(e,{dt:u0})}`);return r?this.useStyle.use(k1(r),ve({name:this.name},i)):{}};loadCSS=(e={})=>this.load(this.css,e);loadTheme=(e={},i="")=>this.load(this.theme,e,(o="")=>Sa.transformCSS(e.name||this.name,`${o}${IT`${i}`}`));loadGlobalCSS=(e={})=>this.load(aBe,e);loadGlobalTheme=(e={},i="")=>this.load(Xhe,e,(o="")=>Sa.transformCSS(e.name||this.name,`${o}${IT`${i}`}`));getCommonTheme=e=>Sa.getCommon(this.name,e);getComponentTheme=e=>Sa.getComponent(this.name,e);getDirectiveTheme=e=>Sa.getDirective(this.name,e);getPresetTheme=(e,i,o)=>Sa.getCustomPreset(this.name,e,i,o);getLayerOrderThemeCSS=()=>Sa.getLayerOrderCSS(this.name);getStyleSheet=(e="",i={})=>{if(this.css){let o=bd(this.css,{dt:u0}),r=k1(IT`${o}${e}`),a=Object.entries(i).reduce((p,[f,x])=>p.push(`${f}="${x}"`)&&p,[]).join(" ");return``}return""};getCommonThemeStyleSheet=(e,i={})=>Sa.getCommonStyleSheet(this.name,e,i);getThemeStyleSheet=(e,i={})=>{let o=[Sa.getStyleSheet(this.name,e,i)];if(this.theme){let r=this.name==="base"?"global-style":`${this.name}-style`,a=IT`${bd(this.theme,{dt:u0})}`,p=k1(Sa.transformCSS(r,a)),f=Object.entries(i).reduce((x,[I,D])=>x.push(`${I}="${D}"`)&&x,[]).join(" ");o.push(``)}return o.join("")};static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var lBe=(()=>{class t{theme=Jn(void 0);csp=Jn({nonce:void 0});isThemeChanged=!1;document=re(zn);baseStyle=re(to);constructor(){Gl(()=>{Kp.on("theme:change",e=>{pl(()=>{this.isThemeChanged=!0,this.theme.set(e)})})}),Gl(()=>{let e=this.theme();this.document&&e&&(this.isThemeChanged||this.onThemeChange(e),this.isThemeChanged=!1)})}ngOnDestroy(){Sa.clearLoadedStyleNames(),Kp.clear()}onThemeChange(e){Sa.setTheme(e),this.document&&this.loadCommonTheme()}loadCommonTheme(){if(this.theme()!=="none"&&!Sa.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:o,style:r}=this.baseStyle.getCommonTheme?.()||{},a={nonce:this.csp?.()?.nonce};this.baseStyle.load(e?.css,ve({name:"primitive-variables"},a)),this.baseStyle.load(i?.css,ve({name:"semantic-variables"},a)),this.baseStyle.load(o?.css,ve({name:"global-variables"},a)),this.baseStyle.loadGlobalTheme(ve({name:"global-style"},a),r),Sa.setLoadedStyleName("common")}}setThemeConfig(e){let{theme:i,csp:o}=e||{};i&&this.theme.set(i),o&&this.csp.set(o)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),JM=(()=>{class t extends lBe{ripple=Jn(!1);platformId=re(Xc);inputStyle=Jn(null);inputVariant=Jn(null);overlayAppendTo=Jn("self");overlayOptions={};csp=Jn({nonce:void 0});filterMatchModeOptions={text:[Oc.STARTS_WITH,Oc.CONTAINS,Oc.NOT_CONTAINS,Oc.ENDS_WITH,Oc.EQUALS,Oc.NOT_EQUALS],numeric:[Oc.EQUALS,Oc.NOT_EQUALS,Oc.LESS_THAN,Oc.LESS_THAN_OR_EQUAL_TO,Oc.GREATER_THAN,Oc.GREATER_THAN_OR_EQUAL_TO],date:[Oc.DATE_IS,Oc.DATE_IS_NOT,Oc.DATE_BEFORE,Oc.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 xi;translationObserver=this.translationSource.asObservable();getTranslation(e){return this.translation[e]}setTranslation(e){this.translation=ve(ve({},this.translation),e),this.translationSource.next(this.translation)}setConfig(e){let{csp:i,ripple:o,inputStyle:r,inputVariant:a,theme:p,overlayOptions:f,translation:x,filterMatchModeOptions:I,overlayAppendTo:D,zIndex:P}=e||{};i&&this.csp.set(i),D&&this.overlayAppendTo.set(D),o&&this.ripple.set(o),r&&this.inputStyle.set(r),a&&this.inputVariant.set(a),f&&(this.overlayOptions=f),x&&this.setTranslation(x),I&&(this.filterMatchModeOptions=I),P&&(this.zIndex=P),p&&this.setThemeConfig({theme:p,csp:i})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),cBe=new ii("PRIME_NG_CONFIG");function Z6t(...t){let n=t?.map(i=>({provide:cBe,useValue:i,multi:!1})),e=sv(()=>{let i=re(JM);t?.forEach(o=>i.setConfig(o))});return H_([...n,e])}var eme=(()=>{class t extends to{name="common";static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ao=(()=>{class t{document=re(zn);platformId=re(Xc);el=re(_n);injector=re(Zn);cd=re(Ho);renderer=re(Kr);config=re(JM);baseComponentStyle=re(eme);baseStyle=re(to);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=tr("pc");themeChangeListeners=[];_getHostInstance(e){if(e)return e?this.hostName?e.name===this.hostName?e:this._getHostInstance(e.parentInstance):e.parentInstance:void 0}_getOptionValue(e,i="",o={}){return kz(e,i,o)}ngOnInit(){this.document&&(this._loadCoreStyles(),this._loadStyles())}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(e){if(this.document&&!_ce(this.platformId)){let{dt:i}=e;i&&i.currentValue&&(this._loadScopedThemeStyles(i.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(i.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(e=>Kp.off("theme:change",e))}_loadStyles(){let e=()=>{TT.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),TT.setLoadedStyleName("base")),this._loadThemeStyles()};e(),this._themeChangeListener(()=>e())}_loadCoreStyles(){!TT.isStyleNameLoaded("base")&&this.componentStyle?.name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),TT.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!Sa.isStyleNameLoaded("common")){let{primitive:e,semantic:i,global:o,style:r}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(e?.css,ve({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(i?.css,ve({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(o?.css,ve({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(ve({name:"global-style"},this.styleOptions),r),Sa.setLoadedStyleName("common")}if(!Sa.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:e,style:i}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(e,ve({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(ve({name:`${this.componentStyle?.name}-style`},this.styleOptions),i),Sa.setLoadedStyleName(this.componentStyle?.name)}if(!Sa.isStyleNameLoaded("layer-order")){let e=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(e,ve({name:"layer-order",first:!0},this.styleOptions)),Sa.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(e){let{css:i}=this.componentStyle?.getPresetTheme?.(e,`[${this.attrSelector}]`)||{},o=this.componentStyle?.load(i,ve({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=o?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(e=()=>{}){TT.clearLoadedStyleNames(),Kp.on("theme:change",e),this.themeChangeListeners.push(e)}cx(e,i={}){return _T(this._getOptionValue(this.$style?.classes,e,ve({instance:this},i)))}sx(e="",i=!0,o={}){if(i)return this._getOptionValue(this.$style?.inlineStyles,e,ve({instance:this},o))}get parent(){return this.parentInstance}get $style(){return this.parent?this.parent.componentStyle:this.componentStyle}cn=_T;static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,inputs:{dt:"dt"},features:[Pi([eme,to]),In]})}return t})();var Io=(()=>{class t{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let o=i.trim().split(" ");for(let r=0;ro.split(" ").forEach(r=>this.removeClass(e,r)))}static hasClass(e,i){return e&&i?e.classList?e.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(e.className):!1}static siblings(e){return Array.prototype.filter.call(e.parentNode.children,function(i){return i!==e})}static find(e,i){return Array.from(e.querySelectorAll(i))}static findSingle(e,i){return this.isElement(e)?e.querySelector(i):null}static index(e){let i=e.parentNode.childNodes,o=0;for(var r=0;r{if(ge)return getComputedStyle(ge).getPropertyValue("position")==="relative"?ge:r(ge.parentElement)},a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),p=i.offsetHeight,f=i.getBoundingClientRect(),x=this.getWindowScrollTop(),I=this.getWindowScrollLeft(),D=this.getViewport(),R=r(e)?.getBoundingClientRect()||{top:-1*x,left:-1*I},j,$,W="top";f.top+p+a.height>D.height?(j=f.top-R.top-a.height,W="bottom",f.top+j<0&&(j=-1*f.top)):(j=p+f.top-R.top,W="top");let Q=f.left+a.width-D.width,se=f.left-R.left;if(a.width>D.width?$=(f.left-R.left)*-1:Q>0?$=se-Q:$=f.left-R.left,e.style.top=j+"px",e.style.left=$+"px",e.style.transformOrigin=W,o){let ge=qM(/-anchor-gutter$/)?.value;e.style.marginTop=W==="bottom"?`calc(${ge??"2px"} * -1)`:ge??""}}static absolutePosition(e,i,o=!0){let r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),a=r.height,p=r.width,f=i.offsetHeight,x=i.offsetWidth,I=i.getBoundingClientRect(),D=this.getWindowScrollTop(),P=this.getWindowScrollLeft(),R=this.getViewport(),j,$;I.top+f+a>R.height?(j=I.top+D-a,e.style.transformOrigin="bottom",j<0&&(j=D)):(j=f+I.top+D,e.style.transformOrigin="top"),I.left+p>R.width?$=Math.max(0,I.left+P+x-p):$=I.left+P,e.style.top=j+"px",e.style.left=$+"px",o&&(e.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(e,i=[]){return e.parentNode===null?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let o=this.getParents(e),r=/(auto|scroll)/,a=p=>{let f=window.getComputedStyle(p,null);return r.test(f.getPropertyValue("overflow"))||r.test(f.getPropertyValue("overflowX"))||r.test(f.getPropertyValue("overflowY"))};for(let p of o){let f=p.nodeType===1&&p.dataset.scrollselectors;if(f){let x=f.split(",");for(let I of x){let D=this.findSingle(p,I);D&&a(D)&&i.push(D)}}p.nodeType!==9&&a(p)&&i.push(p)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let o=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=o?parseFloat(o):0,a=getComputedStyle(e).getPropertyValue("paddingTop"),p=a?parseFloat(a):0,f=e.getBoundingClientRect(),I=i.getBoundingClientRect().top+document.body.scrollTop-(f.top+document.body.scrollTop)-r-p,D=e.scrollTop,P=e.clientHeight,R=this.getOuterHeight(i);I<0?e.scrollTop=D+I:I+R>P&&(e.scrollTop=D+I-P+R)}static fadeIn(e,i){e.style.opacity=0;let o=+new Date,r=0,a=function(){r=+e.style.opacity.replace(",",".")+(new Date().getTime()-o)/i,e.style.opacity=r,o=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(a)||setTimeout(a,16))};a()}static fadeOut(e,i){var o=1,r=50,a=i,p=r/a;let f=setInterval(()=>{o=o-p,o<=0&&(o=0,clearInterval(f)),e.style.opacity=o},r)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var o=Element.prototype,r=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||function(a){return[].indexOf.call(document.querySelectorAll(a),this)!==-1};return r.call(e,i)}static getOuterWidth(e,i){let o=e.offsetWidth;if(i){let r=getComputedStyle(e);o+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return o}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,o=getComputedStyle(e);return i+=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i}static width(e){let i=e.offsetWidth,o=getComputedStyle(e);return i-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,o=getComputedStyle(e);return i+=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom),i}static getOuterHeight(e,i){let o=e.offsetHeight;if(i){let r=getComputedStyle(e);o+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return o}static getHeight(e){let i=e.offsetHeight,o=getComputedStyle(e);return i-=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,o=getComputedStyle(e);return i-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)+parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),i}static getViewport(){let e=window,i=document,o=i.documentElement,r=i.getElementsByTagName("body")[0],a=e.innerWidth||o.clientWidth||r.clientWidth,p=e.innerHeight||o.clientHeight||r.clientHeight;return{width:a,height:p}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let o=e.parentNode;if(!o)throw"Can't replace element";return o.replaceChild(i,e)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var e=window.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return!0;var o=e.indexOf("Trident/");if(o>0){var r=e.indexOf("rv:");return!0}var 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,i){if(this.isElement(i))i.appendChild(e);else if(i&&i.el&&i.el.nativeElement)i.el.nativeElement.appendChild(e);else throw"Cannot append "+i+" to "+e}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else if(i.el&&i.el.nativeElement)i.el.nativeElement.removeChild(e);else throw"Cannot remove "+e+" from "+i}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let o=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=o,o}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,o){e[i].apply(e,o)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||e.offsetParent===null}static isVisible(e){return e&&e.offsetParent!=null}static isExist(e){return e!==null&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableSelectorString(e=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, .p-inputtext:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}, .p-button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}`}static getFocusableElements(e,i=""){let o=this.find(e,this.getFocusableSelectorString(i)),r=[];for(let a of o){let p=getComputedStyle(a);this.isVisible(a)&&p.display!="none"&&p.visibility!="hidden"&&r.push(a)}return r}static getFocusableElement(e,i=""){let o=this.findSingle(e,this.getFocusableSelectorString(i));if(o){let r=getComputedStyle(o);if(this.isVisible(o)&&r.display!="none"&&r.visibility!="hidden")return o}return null}static getFirstFocusableElement(e,i=""){let o=this.getFocusableElements(e,i);return o.length>0?o[0]:null}static getLastFocusableElement(e,i){let o=this.getFocusableElements(e,i);return o.length>0?o[o.length-1]:null}static getNextFocusableElement(e,i=!1){let o=t.getFocusableElements(e),r=0;if(o&&o.length>0){let a=o.indexOf(o[0].ownerDocument.activeElement);i?a==-1||a===0?r=o.length-1:r=a-1:a!=-1&&a!==o.length-1&&(r=a+1)}return o[r]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,i){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:let o=typeof e;if(o==="string")return document.querySelector(e);if(o==="object"&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;let a=(p=>!!(p&&p.constructor&&p.call&&p.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,i){if(e){let o=e.getAttribute(i);return isNaN(o)?o==="true"||o==="false"?o==="true":o:+o}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(e="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}static unblockBodyScroll(e="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}static createElement(e,i={},...o){if(e){let r=document.createElement(e);return this.setAttributes(r,i),r.append(...o),r}}static setAttribute(e,i="",o){this.isElement(e)&&o!==null&&o!==void 0&&e.setAttribute(i,o)}static setAttributes(e,i={}){if(this.isElement(e)){let o=(r,a)=>{let p=e?.$attrs?.[r]?[e?.$attrs?.[r]]:[];return[a].flat().reduce((f,x)=>{if(x!=null){let I=typeof x;if(I==="string"||I==="number")f.push(x);else if(I==="object"){let D=Array.isArray(x)?o(r,x):Object.entries(x).map(([P,R])=>r==="style"&&(R||R===0)?`${P.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${R}`:R?P:void 0);f=D.length?f.concat(D.filter(P=>!!P)):f}}return f},p)};Object.entries(i).forEach(([r,a])=>{if(a!=null){let p=r.match(/^on(.+)/);p?e.addEventListener(p[1].toLowerCase(),a):r==="pBind"?this.setAttributes(e,a):(a=r==="class"?[...new Set(o("class",a))].join(" ").trim():r==="style"?o("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[r]=a),e.setAttribute(r,a))}})}}static isFocusableElement(e,i=""){return this.isElement(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}`):!1}}return t})();function tme(){vhe({variableName:AW("scrollbar.width").name})}function ET(){bhe({variableName:AW("scrollbar.width").name})}var Hm=class{element;listener;scrollableParents;constructor(n,e=()=>{}){this.element=n,this.listener=e}bindScrollListener(){this.scrollableParents=Io.getScrollableParents(this.element);for(let n=0;n{class t extends Ao{autofocus=!1;focused=!1;platformId=re(Xc);document=re(zn);host=re(_n);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(){ns(this.platformId)&&this.autofocus&&setTimeout(()=>{let e=Io.getFocusableElements(this.host?.nativeElement);e.length===0&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[0,"pAutoFocus","autofocus"]},features:[Rt]})}return t})();var Pz=(()=>{class t extends Ao{modelValue=Jn(void 0);$filled=Do(()=>er(this.modelValue()));writeModelValue(e){this.modelValue.set(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,features:[Rt]})}return t})();var Nh=(()=>{class t extends Pz{required=Wn(void 0,{transform:lt});invalid=Wn(void 0,{transform:lt});disabled=Wn(void 0,{transform:lt});name=Wn();_disabled=Jn(!1);$disabled=Do(()=>this.disabled()||this._disabled());onModelChange=()=>{};onModelTouched=()=>{};writeDisabledState(e){this._disabled.set(e)}writeControlValue(e,i){}writeValue(e){this.writeControlValue(e,this.writeModelValue.bind(this))}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.writeDisabledState(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,inputs:{required:[1,"required"],invalid:[1,"invalid"],disabled:[1,"disabled"],name:[1,"name"]},features:[Rt]})}return t})();var Lz=` .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 dBe=["*"],uBe={root:"p-fluid"},ime=(()=>{class t extends to{name="fluid";classes=uBe;theme=Lz;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Lv=(()=>{class t extends Ao{_componentStyle=re(ime);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-fluid"]],hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.cx("root"))},features:[Pi([ime]),Rt],ngContentSelectors:dBe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po],encapsulation:2,changeDetection:0})}return t})();var Fv=(()=>{class t extends Nh{pcFluid=re(Lv,{optional:!0,host:!0,skipSelf:!0});fluid=Wn(void 0,{transform:lt});variant=Wn();size=Wn();inputSize=Wn();pattern=Wn();min=Wn();max=Wn();step=Wn();minlength=Wn();maxlength=Wn();$variant=Do(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({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:[Rt]})}return t})();var nme=` .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 pBe=` ${nme} /* 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; } `,hBe={root:({instance:t})=>["p-badge p-component",{"p-badge-circle":er(t.value())&&String(t.value()).length===1,"p-badge-dot":Ud(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"}]},ome=(()=>{class t extends to{name="badge";theme=pBe;classes=hBe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var M1=(()=>{class t extends Ao{styleClass=Wn();badgeSize=Wn();size=Wn();severity=Wn();value=Wn();badgeDisabled=Wn(!1,{transform:lt});_componentStyle=re(ome);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-badge"]],hostVars:4,hostBindings:function(i,o){i&2&&(Ge(o.cn(o.cx("root"),o.styleClass())),zr("display",o.badgeDisabled()?"none":null))},inputs:{styleClass:[1,"styleClass"],badgeSize:[1,"badgeSize"],size:[1,"size"],severity:[1,"severity"],value:[1,"value"],badgeDisabled:[1,"badgeDisabled"]},features:[Pi([ome]),Rt],decls:1,vars:1,template:function(i,o){i&1&&Ce(0),i&2&&Di(o.value())},dependencies:[po,kn],encapsulation:2,changeDetection:0})}return t})(),Fz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[M1,kn,kn]})}return t})();var mBe=["*"],fBe=` .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); } } `,sme=(()=>{class t extends to{name="baseicon";css=fBe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var To=(()=>{class t extends Ao{spin=!1;_componentStyle=re(sme);getClassNames(){return _T("p-icon",{"p-icon-spin":this.spin})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["ng-component"]],hostAttrs:["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.getClassNames())},inputs:{spin:[2,"spin","spin",lt]},features:[Pi([sme]),Rt],ngContentSelectors:mBe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},encapsulation:2,changeDetection:0})}return t})();var gBe=["data-p-icon","angle-double-left"],ame=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Rt],attrs:gBe,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var _Be=["data-p-icon","angle-double-right"],lme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Rt],attrs:_Be,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var yBe=["data-p-icon","angle-down"],cme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-down"]],features:[Rt],attrs:yBe,decls:1,vars:0,consts:[["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var vBe=["data-p-icon","angle-left"],dme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Rt],attrs:vBe,decls:1,vars:0,consts:[["d","M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var bBe=["data-p-icon","angle-right"],Nz=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Rt],attrs:bBe,decls:1,vars:0,consts:[["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var xBe=["data-p-icon","angle-up"],ume=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","angle-up"]],features:[Rt],attrs:xBe,decls:1,vars:0,consts:[["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var CBe=["data-p-icon","arrow-down"],DW=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Rt],attrs:CBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var wBe=["data-p-icon","arrow-up"],kW=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Rt],attrs:wBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var SBe=["data-p-icon","blank"],pme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","blank"]],features:[Rt],attrs:SBe,decls:1,vars:0,consts:[["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(i,o){i&1&&(oi(),mn(0,"rect",0))},encapsulation:2})}return t})();var IBe=["data-p-icon","calendar"],hme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","calendar"]],features:[Rt],attrs:IBe,decls:1,vars:0,consts:[["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var TBe=["data-p-icon","check"],AT=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","check"]],features:[Rt],attrs:TBe,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var EBe=["data-p-icon","chevron-down"],Nv=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","chevron-down"]],features:[Rt],attrs:EBe,decls:1,vars:0,consts:[["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var ABe=["data-p-icon","chevron-left"],Bz=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Rt],attrs:ABe,decls:1,vars:0,consts:[["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var DBe=["data-p-icon","chevron-right"],DT=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Rt],attrs:DBe,decls:1,vars:0,consts:[["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var kBe=["data-p-icon","chevron-up"],mme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Rt],attrs:kBe,decls:1,vars:0,consts:[["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var MBe=["data-p-icon","filter"],fme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","filter"]],features:[Rt],attrs:MBe,decls:5,vars:2,consts:[["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var RBe=["data-p-icon","filter-slash"],gme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Rt],attrs:RBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var OBe=["data-p-icon","home"],_me=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","home"]],features:[Rt],attrs:OBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M13.4175 6.79971C13.2874 6.80029 13.1608 6.75807 13.057 6.67955L12.4162 6.19913V12.6073C12.4141 12.7659 12.3502 12.9176 12.2379 13.0298C12.1257 13.142 11.9741 13.206 11.8154 13.208H8.61206C8.61179 13.208 8.61151 13.208 8.61123 13.2081C8.61095 13.208 8.61068 13.208 8.6104 13.208H5.41076C5.40952 13.208 5.40829 13.2081 5.40705 13.2081C5.40581 13.2081 5.40458 13.208 5.40334 13.208H2.20287C2.04418 13.206 1.89257 13.142 1.78035 13.0298C1.66813 12.9176 1.60416 12.7659 1.60209 12.6073V6.19914L0.961256 6.67955C0.833786 6.77515 0.673559 6.8162 0.515823 6.79367C0.358086 6.77114 0.215762 6.68686 0.120159 6.55939C0.0245566 6.43192 -0.0164931 6.2717 0.00604063 6.11396C0.0285744 5.95622 0.112846 5.8139 0.240316 5.7183L1.83796 4.52007L1.84689 4.51337L6.64868 0.912027C6.75267 0.834032 6.87915 0.79187 7.00915 0.79187C7.13914 0.79187 7.26562 0.834032 7.36962 0.912027L12.1719 4.51372L12.1799 4.51971L13.778 5.7183C13.8943 5.81278 13.9711 5.94732 13.9934 6.09553C14.0156 6.24373 13.9816 6.39489 13.8981 6.51934C13.8471 6.60184 13.7766 6.67054 13.6928 6.71942C13.609 6.76831 13.5144 6.79587 13.4175 6.79971ZM6.00783 12.0065H8.01045V7.60074H6.00783V12.0065ZM9.21201 12.0065V6.99995C9.20994 6.84126 9.14598 6.68965 9.03375 6.57743C8.92153 6.46521 8.76992 6.40124 8.61123 6.39917H5.40705C5.24836 6.40124 5.09675 6.46521 4.98453 6.57743C4.8723 6.68965 4.80834 6.84126 4.80627 6.99995V12.0065H2.80366V5.29836L7.00915 2.14564L11.2146 5.29836V12.0065H9.21201Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var PBe=["data-p-icon","minus"],yme=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","minus"]],features:[Rt],attrs:PBe,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var LBe=["data-p-icon","plus"],zz=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","plus"]],features:[Rt],attrs:LBe,decls:5,vars:2,consts:[["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var FBe=["data-p-icon","search"],Vz=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","search"]],features:[Rt],attrs:FBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var NBe=["data-p-icon","sort-alt"],MW=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Rt],attrs:NBe,decls:8,vars:2,consts:[["d","M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z","fill","currentColor"],["d","M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z","fill","currentColor"],["d","M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z","fill","currentColor"],["d","M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),Yn(),jn(5,"defs")(6,"clipPath",4),mn(7,"rect",5),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(6),Bo("id",o.pathId))},encapsulation:2})}return t})();var BBe=["data-p-icon","sort-amount-down"],RW=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Rt],attrs:BBe,decls:5,vars:2,consts:[["d","M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var zBe=["data-p-icon","sort-amount-up-alt"],OW=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Rt],attrs:zBe,decls:5,vars:2,consts:[["d","M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var VBe=["data-p-icon","spinner"],p0=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","spinner"]],features:[Rt],attrs:VBe,decls:5,vars:2,consts:[["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var UBe=["data-p-icon","times"],xd=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","times"]],features:[Rt],attrs:UBe,decls:1,vars:0,consts:[["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var HBe=["data-p-icon","times-circle"],Uz=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","times-circle"]],features:[Rt],attrs:HBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var jBe=["data-p-icon","trash"],vme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","trash"]],features:[Rt],attrs:jBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var GBe=["data-p-icon","upload"],bme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","upload"]],features:[Rt],attrs:GBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var $Be=["data-p-icon","window-maximize"],xme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","window-maximize"]],features:[Rt],attrs:$Be,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var qBe=["data-p-icon","window-minimize"],Cme=(()=>{class t extends To{pathId;ngOnInit(){super.ngOnInit(),this.pathId="url(#"+tr()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","window-minimize"]],features:[Rt],attrs:qBe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,o){i&1&&(oi(),jn(0,"g"),mn(1,"path",0),Yn(),jn(2,"defs")(3,"clipPath",1),mn(4,"rect",2),Yn()()),i&2&&(Xe("clip-path",o.pathId),L(3),Bo("id",o.pathId))},encapsulation:2})}return t})();var wme=` .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 WBe=` ${wme} /* 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); } } `,KBe={root:"p-ink"},Sme=(()=>{class t extends to{name="ripple";theme=WBe;classes=KBe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Yl=(()=>{class t extends Ao{zone=re(on);_componentStyle=re(Sme);animationListener;mouseDownListener;timeout;constructor(){super(),Gl(()=>{ns(this.platformId)&&(this.config.ripple()?this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))}):this.remove())})}ngAfterViewInit(){super.ngAfterViewInit()}onMouseDown(e){let i=this.getInk();if(!i||this.document.defaultView?.getComputedStyle(i,null).display==="none")return;if(nd(i,"p-ink-active"),!_g(i)&&!ku(i)){let p=Math.max(Da(this.el.nativeElement),Vd(this.el.nativeElement));i.style.height=p+"px",i.style.width=p+"px"}let o=xT(this.el.nativeElement),r=e.pageX-o.left+this.document.body.scrollTop-ku(i)/2,a=e.pageY-o.top+this.document.body.scrollLeft-_g(i)/2;this.renderer.setStyle(i,"top",a+"px"),this.renderer.setStyle(i,"left",r+"px"),Rc(i,"p-ink-active"),this.timeout=setTimeout(()=>{let p=this.getInk();p&&nd(p,"p-ink-active")},401)}getInk(){let e=this.el.nativeElement.children;for(let i=0;i{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var Eme=` .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 ZBe=["content"],YBe=["loadingicon"],QBe=["icon"],XBe=["*"],Dme=t=>({class:t});function JBe(t,n){t&1&&Oi(0)}function e4e(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(3);Ge(e.cx("loadingIcon")),Xe("aria-hidden",!0)("data-pc-section","loadingicon")}}function t4e(t,n){if(t&1&&(oi(),Oe(0,"svg",7)),t&2){let e=V(3);Ge(e.cn(e.cx("loadingIcon"),e.spinnerIconClass())),B("spin",!0),Xe("aria-hidden",!0)("data-pc-section","loadingicon")}}function i4e(t,n){if(t&1&&(Mi(0),le(1,e4e,1,4,"span",3)(2,t4e,1,5,"svg",6),Ri()),t&2){let e=V(2);L(),B("ngIf",e.loadingIcon),L(),B("ngIf",!e.loadingIcon)}}function n4e(t,n){}function o4e(t,n){if(t&1&&le(0,n4e,0,0,"ng-template",8),t&2){let e=V(2);B("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function r4e(t,n){if(t&1&&(Mi(0),le(1,i4e,3,2,"ng-container",2)(2,o4e,1,1,null,5),Ri()),t&2){let e=V();L(),B("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),L(),B("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)("ngTemplateOutletContext",rn(3,Dme,e.cx("loadingIcon")))}}function s4e(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(2);Ge(e.cx("icon")),Xe("data-pc-section","icon")}}function a4e(t,n){}function l4e(t,n){if(t&1&&le(0,a4e,0,0,"ng-template",8),t&2){let e=V(2);B("ngIf",!e.icon&&(e.iconTemplate||e._iconTemplate))}}function c4e(t,n){if(t&1&&(Mi(0),le(1,s4e,1,3,"span",3)(2,l4e,1,1,null,5),Ri()),t&2){let e=V();L(),B("ngIf",e.icon&&!e.iconTemplate&&!e._iconTemplate),L(),B("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",rn(3,Dme,e.cx("icon")))}}function d4e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V();Ge(e.cx("label")),Xe("aria-hidden",e.icon&&!e.label)("data-pc-section","label"),L(),Di(e.label)}}function u4e(t,n){if(t&1&&Oe(0,"p-badge",9),t&2){let e=V();B("value",e.badge)("severity",e.badgeSeverity)}}var p4e={root:({instance:t})=>["p-button p-component",{"p-button-icon-only":(t.icon||t.buttonProps?.icon||t.iconTemplate||t._iconTemplate||t.loadingIcon||t.loadingIconTemplate||t._loadingIconTemplate)&&!t.label&&!t.buttonProps?.label,"p-button-vertical":(t.iconPos==="top"||t.iconPos==="bottom")&&t.label,"p-button-loading":t.loading||t.buttonProps?.loading,"p-button-link":t.link||t.buttonProps?.link,[`p-button-${t.severity||t.buttonProps?.severity}`]:t.severity||t.buttonProps?.severity,"p-button-raised":t.raised||t.buttonProps?.raised,"p-button-rounded":t.rounded||t.buttonProps?.rounded,"p-button-text":t.text||t.variant==="text"||t.buttonProps?.text||t.buttonProps?.variant==="text","p-button-outlined":t.outlined||t.variant==="outlined"||t.buttonProps?.outlined||t.buttonProps?.variant==="outlined","p-button-sm":t.size==="small"||t.buttonProps?.size==="small","p-button-lg":t.size==="large"||t.buttonProps?.size==="large","p-button-plain":t.plain||t.buttonProps?.plain,"p-button-fluid":t.hasFluid}],loadingIcon:"p-button-loading-icon",icon:({instance:t})=>["p-button-icon",{[`p-button-icon-${t.iconPos||t.buttonProps?.iconPos}`]:t.label||t.buttonProps?.label,"p-button-icon-left":(t.iconPos==="left"||t.buttonProps?.iconPos==="left")&&t.label||t.buttonProps?.label,"p-button-icon-right":(t.iconPos==="right"||t.buttonProps?.iconPos==="right")&&t.label||t.buttonProps?.label},t.icon,t.buttonProps?.icon],spinnerIcon:({instance:t})=>Object.entries(t.iconClass()).filter(([,n])=>!!n).reduce((n,[e])=>n+` ${e}`,"p-button-loading-icon"),label:"p-button-label"},Ame=(()=>{class t extends to{name="button";theme=Eme;classes=p4e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var jm=(()=>{class t extends Ao{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=Wn(void 0,{transform:lt});onClick=new yt;onFocus=new yt;onBlur=new yt;contentTemplate;loadingIconTemplate;iconTemplate;templates;pcFluid=re(Lv,{optional:!0,host:!0,skipSelf:!0});get hasFluid(){return this.fluid()??!!this.pcFluid}_componentStyle=re(Ame);_contentTemplate;_iconTemplate;_loadingIconTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"icon":this._iconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}spinnerIconClass(){return Object.entries(this.iconClass()).filter(([,e])=>!!e).reduce((e,[i])=>e+` ${i}`,"p-button-loading-icon")}iconClass(){return{[`p-button-loading-icon pi-spin ${this.loadingIcon??""}`]:this.loading,"p-button-icon":!0,"p-button-icon-left":this.iconPos==="left"&&this.label,"p-button-icon-right":this.iconPos==="right"&&this.label,"p-button-icon-top":this.iconPos==="top"&&this.label,"p-button-icon-bottom":this.iconPos==="bottom"&&this.label}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-button"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,ZBe,5),Ht(r,YBe,5),Ht(r,QBe,5),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.loadingIconTemplate=a.first),Je(a=et())&&(o.iconTemplate=a.first),Je(a=et())&&(o.templates=a)}},inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:[2,"disabled","disabled",lt],loading:[2,"loading","loading",lt],loadingIcon:"loadingIcon",raised:[2,"raised","raised",lt],rounded:[2,"rounded","rounded",lt],text:[2,"text","text",lt],plain:[2,"plain","plain",lt],severity:"severity",outlined:[2,"outlined","outlined",lt],link:[2,"link","link",lt],tabindex:[2,"tabindex","tabindex",wn],size:"size",variant:"variant",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",badgeSeverity:"badgeSeverity",ariaLabel:"ariaLabel",buttonProps:"buttonProps",autofocus:[2,"autofocus","autofocus",lt],fluid:[1,"fluid"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Pi([Ame]),Rt],ngContentSelectors:XBe,decls:7,vars:15,consts:[["pRipple","",3,"click","focus","blur","ngStyle","disabled","pAutoFocus"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"class",4,"ngIf"],[3,"value","severity",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","spinner",3,"class","spin",4,"ngIf"],["data-p-icon","spinner",3,"spin"],[3,"ngIf"],[3,"value","severity"]],template:function(i,o){i&1&&(eo(),K(0,"button",0),Qe("click",function(a){return o.onClick.emit(a)})("focus",function(a){return o.onFocus.emit(a)})("blur",function(a){return o.onBlur.emit(a)}),yn(1),le(2,JBe,1,0,"ng-container",1)(3,r4e,3,5,"ng-container",2)(4,c4e,3,5,"ng-container",2)(5,d4e,2,5,"span",3)(6,u4e,1,2,"p-badge",4),Z()),i&2&&(Ge(o.cn(o.cx("root"),o.styleClass,o.buttonProps==null?null:o.buttonProps.styleClass)),B("ngStyle",o.style||(o.buttonProps==null?null:o.buttonProps.style))("disabled",o.disabled||o.loading||(o.buttonProps==null?null:o.buttonProps.disabled))("pAutoFocus",o.autofocus||(o.buttonProps==null?null:o.buttonProps.autofocus)),Xe("type",o.type||(o.buttonProps==null?null:o.buttonProps.type))("aria-label",o.ariaLabel||(o.buttonProps==null?null:o.buttonProps.ariaLabel))("data-pc-name","button")("data-pc-section","root")("tabindex",o.tabindex||(o.buttonProps==null?null:o.buttonProps.tabindex)),L(2),B("ngTemplateOutlet",o.contentTemplate||o._contentTemplate),L(),B("ngIf",o.loading),L(),B("ngIf",!o.loading),L(),B("ngIf",!o.contentTemplate&&!o._contentTemplate&&o.label),L(),B("ngIf",!o.contentTemplate&&!o._contentTemplate&&o.badge))},dependencies:[po,Zr,Vo,fs,Yl,cp,p0,Fz,M1,kn],encapsulation:2,changeDetection:0})}return t})(),Hz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[po,jm,kn,kn]})}return t})();var kme=` .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 h4e=` ${kme} /* 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'); } `,m4e={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}]},Mme=(()=>{class t extends to{name="inputtext";theme=h4e;classes=m4e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var yg=(()=>{class t extends Pz{ngControl=re(Wl,{optional:!0,self:!0});pcFluid=re(Lv,{optional:!0,host:!0,skipSelf:!0});pSize;variant=Wn();fluid=Wn(void 0,{transform:lt});invalid=Wn(void 0,{transform:lt});$variant=Do(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());_componentStyle=re(Mme);ngAfterViewInit(){super.ngAfterViewInit(),this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value),this.cd.detectChanges()}ngDoCheck(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}onInput(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","pInputText",""]],hostVars:2,hostBindings:function(i,o){i&1&&Qe("input",function(a){return o.onInput(a)}),i&2&&Ge(o.cx("root"))},inputs:{pSize:"pSize",variant:[1,"variant"],fluid:[1,"fluid"],invalid:[1,"invalid"]},features:[Pi([Mme]),Rt]})}return t})(),jz=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var Zo=class t{static isArray(n,e=!0){return Array.isArray(n)&&(e||n.length!==0)}static isObject(n,e=!0){return typeof n=="object"&&!Array.isArray(n)&&n!=null&&(e||Object.keys(n).length!==0)}static equals(n,e,i){return i?this.resolveFieldData(n,i)===this.resolveFieldData(e,i):this.equalsByValue(n,e)}static equalsByValue(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){var i=Array.isArray(n),o=Array.isArray(e),r,a,p;if(i&&o){if(a=n.length,a!=e.length)return!1;for(r=a;r--!==0;)if(!this.equalsByValue(n[r],e[r]))return!1;return!0}if(i!=o)return!1;var f=this.isDate(n),x=this.isDate(e);if(f!=x)return!1;if(f&&x)return n.getTime()==e.getTime();var I=n instanceof RegExp,D=e instanceof RegExp;if(I!=D)return!1;if(I&&D)return n.toString()==e.toString();var P=Object.keys(n);if(a=P.length,a!==Object.keys(e).length)return!1;for(r=a;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,P[r]))return!1;for(r=a;r--!==0;)if(p=P[r],!this.equalsByValue(n[p],e[p]))return!1;return!0}return n!==n&&e!==e}static resolveFieldData(n,e){if(n&&e){if(this.isFunction(e))return e(n);if(e.indexOf(".")==-1)return n[e];{let i=e.split("."),o=n;for(let r=0,a=i.length;r=n.length&&(i%=n.length,e%=n.length),n.splice(i,0,n.splice(e,1)[0]))}static insertIntoOrderedArray(n,e,i,o){if(i.length>0){let r=!1;for(let a=0;ae){i.splice(a,0,n),r=!0;break}r||i.push(n)}else i.push(n)}static findIndexInList(n,e){let i=-1;if(e){for(let o=0;oe?1:0,r}static sort(n,e,i=1,o,r=1){let a=t.compare(n,e,o,i),p=i;return(t.isEmpty(n)||t.isEmpty(e))&&(p=r===1?i:r),p*a}static merge(n,e){if(!(n==null&&e==null)){{if((n==null||typeof n=="object")&&(e==null||typeof e=="object"))return ve(ve({},n||{}),e||{});if((n==null||typeof n=="string")&&(e==null||typeof e=="string"))return[n||"",e||""].join(" ")}return e||n}}static isPrintableCharacter(n=""){return this.isNotEmpty(n)&&n.length===1&&n.match(/\S| /)}static getItemValue(n,...e){return this.isFunction(n)?n(...e):n}static findLastIndex(n,e){let i=-1;if(this.isNotEmpty(n))try{i=n.findLastIndex(e)}catch{i=n.lastIndexOf([...n].reverse().find(e))}return i}static findLast(n,e){let i;if(this.isNotEmpty(n))try{i=n.findLast(e)}catch{i=[...n].reverse().find(e)}return i}static deepEquals(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){var i=Array.isArray(n),o=Array.isArray(e),r,a,p;if(i&&o){if(a=n.length,a!=e.length)return!1;for(r=a;r--!==0;)if(!this.deepEquals(n[r],e[r]))return!1;return!0}if(i!=o)return!1;var f=n instanceof Date,x=e instanceof Date;if(f!=x)return!1;if(f&&x)return n.getTime()==e.getTime();var I=n instanceof RegExp,D=e instanceof RegExp;if(I!=D)return!1;if(I&&D)return n.toString()==e.toString();var P=Object.keys(n);if(a=P.length,a!==Object.keys(e).length)return!1;for(r=a;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,P[r]))return!1;for(r=a;r--!==0;)if(p=P[r],!this.deepEquals(n[p],e[p]))return!1;return!0}return n!==n&&e!==e}static minifyCSS(n){return n&&n.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}static toFlatCase(n){return this.isString(n)?n.replace(/(-|_)/g,"").toLowerCase():n}static isString(n,e=!0){return typeof n=="string"&&(e||n!=="")}},Rme=0;function Ome(t="pn_id_"){return Rme++,`${t}${Rme}`}function f4e(){let t=[],n=(r,a)=>{let p=t.length>0?t[t.length-1]:{key:r,value:a},f=p.value+(p.key===r?0:a)+2;return t.push({key:r,value:f}),f},e=r=>{t=t.filter(a=>a.value!==r)},i=()=>t.length>0?t[t.length-1].value:0,o=r=>r&&parseInt(r.style.zIndex,10)||0;return{get:o,set:(r,a,p)=>{a&&(a.style.zIndex=String(n(r,p)))},clear:r=>{r&&(e(o(r)),r.style.zIndex="")},getCurrent:()=>i(),generateZIndex:n,revertZIndex:e}}var ml=f4e();var Pme=` .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 g4e=["date"],_4e=["header"],y4e=["footer"],v4e=["disabledDate"],b4e=["decade"],x4e=["previousicon"],C4e=["nexticon"],w4e=["triggericon"],S4e=["clearicon"],I4e=["decrementicon"],T4e=["incrementicon"],E4e=["inputicon"],A4e=["inputfield"],D4e=["contentWrapper"],k4e=[[["p-header"]],[["p-footer"]]],M4e=["p-header","p-footer"],R4e=t=>({clickCallBack:t}),O4e=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),P4e=t=>({value:"visible",params:t}),Lme=t=>({visibility:t}),PW=t=>({$implicit:t}),L4e=t=>({date:t}),F4e=(t,n)=>({month:t,index:n}),N4e=t=>({year:t});function B4e(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",10),Qe("click",function(){Ee(e);let o=V(3);return Ae(o.clear())}),Z()}if(t&2){let e=V(3);Ge(e.cx("clearIcon"))}}function z4e(t,n){}function V4e(t,n){t&1&&le(0,z4e,0,0,"ng-template")}function U4e(t,n){if(t&1){let e=Bt();K(0,"span",11),Qe("click",function(){Ee(e);let o=V(3);return Ae(o.clear())}),le(1,V4e,1,0,null,12),Z()}if(t&2){let e=V(3);Ge(e.cx("clearIcon")),L(),B("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function H4e(t,n){if(t&1&&(Mi(0),le(1,B4e,1,2,"svg",8)(2,U4e,2,3,"span",9),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),L(),B("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function j4e(t,n){if(t&1&&Oe(0,"span",15),t&2){let e=V(3);B("ngClass",e.icon)}}function G4e(t,n){t&1&&(oi(),Oe(0,"svg",17))}function $4e(t,n){}function q4e(t,n){t&1&&le(0,$4e,0,0,"ng-template")}function W4e(t,n){if(t&1&&(Mi(0),le(1,G4e,1,0,"svg",16)(2,q4e,1,0,null,12),Ri()),t&2){let e=V(3);L(),B("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),L(),B("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function K4e(t,n){if(t&1){let e=Bt();K(0,"button",13),Qe("click",function(o){Ee(e),V();let r=un(1),a=V();return Ae(a.onButtonClick(o,r))}),le(1,j4e,1,1,"span",14)(2,W4e,3,2,"ng-container",6),Z()}if(t&2){let e=V(2);Ge(e.cx("dropdown")),B("disabled",e.$disabled()),Xe("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null),L(),B("ngIf",e.icon),L(),B("ngIf",!e.icon)}}function Z4e(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",20),Qe("click",function(o){Ee(e);let r=V(3);return Ae(r.onButtonClick(o))}),Z()}if(t&2){let e=V(3);Ge(e.cx("inputIcon"))}}function Y4e(t,n){t&1&&Oi(0)}function Q4e(t,n){if(t&1&&(Mi(0),K(1,"span"),le(2,Z4e,1,2,"svg",18)(3,Y4e,1,0,"ng-container",19),Z(),Ri()),t&2){let e=V(2);L(),Ge(e.cx("inputIconContainer")),L(),B("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),L(),B("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",rn(5,R4e,e.onButtonClick.bind(e)))}}function X4e(t,n){if(t&1){let e=Bt();K(0,"input",5,0),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onInputFocus(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onInputKeydown(o))})("click",function(){Ee(e);let o=V();return Ae(o.onInputClick())})("blur",function(o){Ee(e);let r=V();return Ae(r.onInputBlur(o))})("input",function(o){Ee(e);let r=V();return Ae(r.onUserInput(o))}),Z(),le(2,H4e,3,2,"ng-container",6)(3,K4e,3,8,"button",7)(4,Q4e,4,7,"ng-container",6)}if(t&2){let e=V();Ge(e.cn(e.cx("pcInputText"),e.inputStyleClass)),B("pSize",e.size())("value",e.inputFieldValue)("ngStyle",e.inputStyle)("pAutoFocus",e.autofocus)("variant",e.$variant())("fluid",e.hasFluid)("invalid",e.invalid()),Xe("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),L(2),B("ngIf",e.showClear&&!e.$disabled()&&e.value!=null),L(),B("ngIf",e.showIcon&&e.iconDisplay==="button"),L(),B("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function J4e(t,n){t&1&&Oi(0)}function eze(t,n){t&1&&(oi(),Oe(0,"svg",29))}function tze(t,n){}function ize(t,n){t&1&&le(0,tze,0,0,"ng-template")}function nze(t,n){if(t&1&&(K(0,"span"),le(1,ize,1,0,null,12),Z()),t&2){let e=V(5);L(),B("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function oze(t,n){if(t&1&&le(0,eze,1,0,"svg",28)(1,nze,2,1,"span",6),t&2){let e=V(4);B("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),L(),B("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function rze(t,n){if(t&1){let e=Bt();K(0,"button",30),Qe("click",function(o){Ee(e);let r=V(4);return Ae(r.switchToMonthView(o))})("keydown",function(o){Ee(e);let r=V(4);return Ae(r.onContainerButtonKeydown(o))}),Ce(1),Z()}if(t&2){let e=V().$implicit,i=V(3);Ge(i.cx("selectMonth")),Xe("disabled",i.switchViewButtonDisabled()?"":void 0)("aria-label",i.getTranslation("chooseMonth")),L(),qn(" ",i.getMonthName(e.month)," ")}}function sze(t,n){if(t&1){let e=Bt();K(0,"button",30),Qe("click",function(o){Ee(e);let r=V(4);return Ae(r.switchToYearView(o))})("keydown",function(o){Ee(e);let r=V(4);return Ae(r.onContainerButtonKeydown(o))}),Ce(1),Z()}if(t&2){let e=V().$implicit,i=V(3);Ge(i.cx("selectYear")),Xe("disabled",i.switchViewButtonDisabled()?"":void 0)("aria-label",i.getTranslation("chooseYear")),L(),qn(" ",i.getYear(e)," ")}}function aze(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(5);L(),td("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function lze(t,n){t&1&&Oi(0)}function cze(t,n){if(t&1&&(K(0,"span"),le(1,aze,2,2,"ng-container",6)(2,lze,1,0,"ng-container",19),Z()),t&2){let e=V(4);Ge(e.cx("decade")),L(),B("ngIf",!e.decadeTemplate&&!e._decadeTemplate),L(),B("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",rn(5,PW,e.yearPickerValues))}}function dze(t,n){t&1&&(oi(),Oe(0,"svg",32))}function uze(t,n){}function pze(t,n){t&1&&le(0,uze,0,0,"ng-template")}function hze(t,n){if(t&1&&(Mi(0),le(1,pze,1,0,null,12),Ri()),t&2){let e=V(5);L(),B("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function mze(t,n){if(t&1&&le(0,dze,1,0,"svg",31)(1,hze,2,1,"ng-container",6),t&2){let e=V(4);B("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),L(),B("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function fze(t,n){if(t&1&&(K(0,"th")(1,"span"),Ce(2),Z()()),t&2){let e=V(5);Ge(e.cx("weekHeader")),L(2),Di(e.getTranslation("weekHeader"))}}function gze(t,n){if(t&1&&(K(0,"th",36)(1,"span"),Ce(2),Z()()),t&2){let e=n.$implicit,i=V(5);Ge(i.cx("weekDayCell")),L(),Ge(i.cx("weekDay")),L(),Di(e)}}function _ze(t,n){if(t&1&&(K(0,"td")(1,"span"),Ce(2),Z()()),t&2){let e=V().index,i=V(2).$implicit,o=V(3);Ge(o.cx("weekNumber")),L(),Ge(o.cx("weekLabelContainer")),L(),qn(" ",i.weekNumbers[e]," ")}}function yze(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(2).$implicit;L(),Di(e.day)}}function vze(t,n){t&1&&Oi(0)}function bze(t,n){if(t&1&&(Mi(0),le(1,vze,1,0,"ng-container",19),Ri()),t&2){let e=V(2).$implicit,i=V(6);L(),B("ngTemplateOutlet",i.dateTemplate||i._dateTemplate)("ngTemplateOutletContext",rn(2,PW,e))}}function xze(t,n){t&1&&Oi(0)}function Cze(t,n){if(t&1&&(Mi(0),le(1,xze,1,0,"ng-container",19),Ri()),t&2){let e=V(2).$implicit,i=V(6);L(),B("ngTemplateOutlet",i.disabledDateTemplate||i._disabledDateTemplate)("ngTemplateOutletContext",rn(2,PW,e))}}function wze(t,n){if(t&1&&(K(0,"div",39),Ce(1),Z()),t&2){let e=V(2).$implicit;L(),qn(" ",e.day," ")}}function Sze(t,n){if(t&1){let e=Bt();Mi(0),K(1,"span",37),Qe("click",function(o){Ee(e);let r=V().$implicit,a=V(6);return Ae(a.onDateSelect(o,r))})("keydown",function(o){Ee(e);let r=V().$implicit,a=V(3).index,p=V(3);return Ae(p.onDateCellKeydown(o,r,a))}),le(2,yze,2,1,"ng-container",6)(3,bze,2,4,"ng-container",6)(4,Cze,2,4,"ng-container",6),Z(),le(5,wze,2,1,"div",38),Ri()}if(t&2){let e=V().$implicit,i=V(6);L(),B("ngClass",i.dayClass(e)),Xe("data-date",i.formatDateKey(i.formatDateMetaToDate(e))),L(),B("ngIf",!i.dateTemplate&&!i._dateTemplate&&(e.selectable||!i.disabledDateTemplate&&!i._disabledDateTemplate)),L(),B("ngIf",e.selectable||!i.disabledDateTemplate&&!i._disabledDateTemplate),L(),B("ngIf",!e.selectable),L(),B("ngIf",i.isSelected(e))}}function Ize(t,n){if(t&1&&(K(0,"td"),le(1,Sze,6,6,"ng-container",6),Z()),t&2){let e=n.$implicit,i=V(6);Ge(i.cx("dayCell",rn(4,L4e,e))),Xe("aria-label",e.day),L(),B("ngIf",e.otherMonth?i.showOtherMonths:!0)}}function Tze(t,n){if(t&1&&(K(0,"tr"),le(1,_ze,3,5,"td",22)(2,Ize,2,6,"td",23),Z()),t&2){let e=n.$implicit,i=V(5);L(),B("ngIf",i.showWeek),L(),B("ngForOf",e)}}function Eze(t,n){if(t&1&&(K(0,"table",33)(1,"thead")(2,"tr"),le(3,fze,3,3,"th",22)(4,gze,3,5,"th",34),Z()(),K(5,"tbody"),le(6,Tze,3,2,"tr",35),Z()()),t&2){let e=V().$implicit,i=V(3);Ge(i.cx("dayView")),L(3),B("ngIf",i.showWeek),L(),B("ngForOf",i.weekDays),L(2),B("ngForOf",e.dates)}}function Aze(t,n){if(t&1){let e=Bt();K(0,"div")(1,"div")(2,"p-button",24),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("onClick",function(o){Ee(e);let r=V(3);return Ae(r.onPrevButtonClick(o))}),le(3,oze,2,2,"ng-template",null,2,Hi),Z(),K(5,"div"),le(6,rze,2,5,"button",25)(7,sze,2,5,"button",25)(8,cze,3,7,"span",22),Z(),K(9,"p-button",26),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("onClick",function(o){Ee(e);let r=V(3);return Ae(r.onNextButtonClick(o))}),le(10,mze,2,2,"ng-template",null,2,Hi),Z()(),le(12,Eze,7,5,"table",27),Z()}if(t&2){let e=n.index,i=V(3);Ge(i.cx("calendar")),L(),Ge(i.cx("header")),L(),B("styleClass",i.cx("pcPrevButton"))("ngStyle",rn(16,Lme,e===0?"visible":"hidden")),ul("ariaLabel",i.prevIconAriaLabel),L(3),Ge(i.cx("title")),L(),B("ngIf",i.currentView==="date"),L(),B("ngIf",i.currentView!=="year"),L(),B("ngIf",i.currentView==="year"),L(),B("styleClass",i.cx("pcNextButton"))("ngStyle",rn(18,Lme,e===i.months.length-1?"visible":"hidden")),ul("ariaLabel",i.nextIconAriaLabel),L(3),B("ngIf",i.currentView==="date")}}function Dze(t,n){if(t&1&&(K(0,"div",39),Ce(1),Z()),t&2){let e=V().$implicit;L(),qn(" ",e," ")}}function kze(t,n){if(t&1){let e=Bt();K(0,"span",41),Qe("click",function(o){let r=Ee(e).index,a=V(4);return Ae(a.onMonthSelect(o,r))})("keydown",function(o){let r=Ee(e).index,a=V(4);return Ae(a.onMonthCellKeydown(o,r))}),Ce(1),le(2,Dze,2,1,"div",38),Z()}if(t&2){let e=n.$implicit,i=n.index,o=V(4);Ge(o.cx("month",kr(4,F4e,e,i))),L(),qn(" ",e," "),L(),B("ngIf",o.isMonthSelected(i))}}function Mze(t,n){if(t&1&&(K(0,"div"),le(1,kze,3,7,"span",40),Z()),t&2){let e=V(3);Ge(e.cx("monthView")),L(),B("ngForOf",e.monthPickerValues())}}function Rze(t,n){if(t&1&&(K(0,"div",39),Ce(1),Z()),t&2){let e=V().$implicit;L(),qn(" ",e," ")}}function Oze(t,n){if(t&1){let e=Bt();K(0,"span",41),Qe("click",function(o){let r=Ee(e).$implicit,a=V(4);return Ae(a.onYearSelect(o,r))})("keydown",function(o){let r=Ee(e).$implicit,a=V(4);return Ae(a.onYearCellKeydown(o,r))}),Ce(1),le(2,Rze,2,1,"div",38),Z()}if(t&2){let e=n.$implicit,i=V(4);Ge(i.cx("year",rn(4,N4e,e))),L(),qn(" ",e," "),L(),B("ngIf",i.isYearSelected(e))}}function Pze(t,n){if(t&1&&(K(0,"div"),le(1,Oze,3,6,"span",40),Z()),t&2){let e=V(3);Ge(e.cx("yearView")),L(),B("ngForOf",e.yearPickerValues())}}function Lze(t,n){if(t&1&&(Mi(0),K(1,"div"),le(2,Aze,13,20,"div",23),Z(),le(3,Mze,2,3,"div",22)(4,Pze,2,3,"div",22),Ri()),t&2){let e=V(2);L(),Ge(e.cx("calendarContainer")),L(),B("ngForOf",e.months),L(),B("ngIf",e.currentView==="month"),L(),B("ngIf",e.currentView==="year")}}function Fze(t,n){t&1&&(oi(),Oe(0,"svg",45))}function Nze(t,n){}function Bze(t,n){t&1&&le(0,Nze,0,0,"ng-template")}function zze(t,n){if(t&1&&le(0,Fze,1,0,"svg",44)(1,Bze,1,0,null,12),t&2){let e=V(3);B("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),L(),B("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function Vze(t,n){t&1&&(Mi(0),Ce(1,"0"),Ri())}function Uze(t,n){t&1&&(oi(),Oe(0,"svg",47))}function Hze(t,n){}function jze(t,n){t&1&&le(0,Hze,0,0,"ng-template")}function Gze(t,n){if(t&1&&le(0,Uze,1,0,"svg",46)(1,jze,1,0,null,12),t&2){let e=V(3);B("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),L(),B("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function $ze(t,n){t&1&&(oi(),Oe(0,"svg",45))}function qze(t,n){}function Wze(t,n){t&1&&le(0,qze,0,0,"ng-template")}function Kze(t,n){if(t&1&&le(0,$ze,1,0,"svg",44)(1,Wze,1,0,null,12),t&2){let e=V(3);B("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),L(),B("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function Zze(t,n){t&1&&(Mi(0),Ce(1,"0"),Ri())}function Yze(t,n){t&1&&(oi(),Oe(0,"svg",47))}function Qze(t,n){}function Xze(t,n){t&1&&le(0,Qze,0,0,"ng-template")}function Jze(t,n){if(t&1&&le(0,Yze,1,0,"svg",46)(1,Xze,1,0,null,12),t&2){let e=V(3);B("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),L(),B("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function eVe(t,n){if(t&1&&(K(0,"div")(1,"span"),Ce(2),Z()()),t&2){let e=V(3);Ge(e.cx("separator")),L(2),Di(e.timeSeparator)}}function tVe(t,n){t&1&&(oi(),Oe(0,"svg",45))}function iVe(t,n){}function nVe(t,n){t&1&&le(0,iVe,0,0,"ng-template")}function oVe(t,n){if(t&1&&le(0,tVe,1,0,"svg",44)(1,nVe,1,0,null,12),t&2){let e=V(4);B("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),L(),B("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function rVe(t,n){t&1&&(Mi(0),Ce(1,"0"),Ri())}function sVe(t,n){t&1&&(oi(),Oe(0,"svg",47))}function aVe(t,n){}function lVe(t,n){t&1&&le(0,aVe,0,0,"ng-template")}function cVe(t,n){if(t&1&&le(0,sVe,1,0,"svg",46)(1,lVe,1,0,null,12),t&2){let e=V(4);B("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),L(),B("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function dVe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(3);return Ae(r.incrementSecond(o))})("keydown.space",function(o){Ee(e);let r=V(3);return Ae(r.incrementSecond(o))})("mousedown",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseDown(o,2,1))})("mouseup",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(3);return Ae(o.onTimePickerElementMouseLeave())}),le(2,oVe,2,2,"ng-template",null,2,Hi),Z(),K(4,"span"),le(5,rVe,2,0,"ng-container",6),Ce(6),Z(),K(7,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(3);return Ae(r.decrementSecond(o))})("keydown.space",function(o){Ee(e);let r=V(3);return Ae(r.decrementSecond(o))})("mousedown",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseDown(o,2,-1))})("mouseup",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(3);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(3);return Ae(o.onTimePickerElementMouseLeave())}),le(8,cVe,2,2,"ng-template",null,2,Hi),Z()()}if(t&2){let e=V(3);Ge(e.cx("secondPicker")),L(),B("styleClass",e.cx("pcIncrementButton")),Xe("aria-label",e.getTranslation("nextSecond")),L(4),B("ngIf",e.currentSecond<10),L(),Di(e.currentSecond),L(),B("styleClass",e.cx("pcDecrementButton")),Xe("aria-label",e.getTranslation("prevSecond"))}}function uVe(t,n){if(t&1&&(K(0,"div")(1,"span"),Ce(2),Z()()),t&2){let e=V(3);Ge(e.cx("separator")),L(2),Di(e.timeSeparator)}}function pVe(t,n){t&1&&(oi(),Oe(0,"svg",45))}function hVe(t,n){}function mVe(t,n){t&1&&le(0,hVe,0,0,"ng-template")}function fVe(t,n){if(t&1&&le(0,pVe,1,0,"svg",44)(1,mVe,1,0,null,12),t&2){let e=V(4);B("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),L(),B("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function gVe(t,n){t&1&&(oi(),Oe(0,"svg",47))}function _Ve(t,n){}function yVe(t,n){t&1&&le(0,_Ve,0,0,"ng-template")}function vVe(t,n){if(t&1&&le(0,gVe,1,0,"svg",46)(1,yVe,1,0,null,12),t&2){let e=V(4);B("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),L(),B("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function bVe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"p-button",48),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("onClick",function(o){Ee(e);let r=V(3);return Ae(r.toggleAMPM(o))})("keydown.enter",function(o){Ee(e);let r=V(3);return Ae(r.toggleAMPM(o))}),le(2,fVe,2,2,"ng-template",null,2,Hi),Z(),K(4,"span"),Ce(5),Z(),K(6,"p-button",49),Qe("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onContainerButtonKeydown(o))})("click",function(o){Ee(e);let r=V(3);return Ae(r.toggleAMPM(o))})("keydown.enter",function(o){Ee(e);let r=V(3);return Ae(r.toggleAMPM(o))}),le(7,vVe,2,2,"ng-template",null,2,Hi),Z()()}if(t&2){let e=V(3);Ge(e.cx("ampmPicker")),L(),B("styleClass",e.cx("pcIncrementButton")),Xe("aria-label",e.getTranslation("am")),L(4),Di(e.pm?"PM":"AM"),L(),B("styleClass",e.cx("pcDecrementButton")),Xe("aria-label",e.getTranslation("pm"))}}function xVe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"div")(2,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(2);return Ae(r.incrementHour(o))})("keydown.space",function(o){Ee(e);let r=V(2);return Ae(r.incrementHour(o))})("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseDown(o,0,1))})("mouseup",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(2);return Ae(o.onTimePickerElementMouseLeave())}),le(3,zze,2,2,"ng-template",null,2,Hi),Z(),K(5,"span"),le(6,Vze,2,0,"ng-container",6),Ce(7),Z(),K(8,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(2);return Ae(r.decrementHour(o))})("keydown.space",function(o){Ee(e);let r=V(2);return Ae(r.decrementHour(o))})("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseDown(o,0,-1))})("mouseup",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(2);return Ae(o.onTimePickerElementMouseLeave())}),le(9,Gze,2,2,"ng-template",null,2,Hi),Z()(),K(11,"div",43)(12,"span"),Ce(13),Z()(),K(14,"div")(15,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(2);return Ae(r.incrementMinute(o))})("keydown.space",function(o){Ee(e);let r=V(2);return Ae(r.incrementMinute(o))})("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseDown(o,1,1))})("mouseup",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(2);return Ae(o.onTimePickerElementMouseLeave())}),le(16,Kze,2,2,"ng-template",null,2,Hi),Z(),K(18,"span"),le(19,Zze,2,0,"ng-container",6),Ce(20),Z(),K(21,"p-button",42),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){Ee(e);let r=V(2);return Ae(r.decrementMinute(o))})("keydown.space",function(o){Ee(e);let r=V(2);return Ae(r.decrementMinute(o))})("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseDown(o,1,-1))})("mouseup",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){Ee(e);let r=V(2);return Ae(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){Ee(e);let o=V(2);return Ae(o.onTimePickerElementMouseLeave())}),le(22,Jze,2,2,"ng-template",null,2,Hi),Z()(),le(24,eVe,3,3,"div",22)(25,dVe,10,8,"div",22)(26,uVe,3,3,"div",22)(27,bVe,9,7,"div",22),Z()}if(t&2){let e=V(2);Ge(e.cx("timePicker")),L(),Ge(e.cx("hourPicker")),L(),B("styleClass",e.cx("pcIncrementButton")),Xe("aria-label",e.getTranslation("nextHour")),L(4),B("ngIf",e.currentHour<10),L(),Di(e.currentHour),L(),B("styleClass",e.cx("pcDecrementButton")),Xe("aria-label",e.getTranslation("prevHour")),L(5),Di(e.timeSeparator),L(),Ge(e.cx("minutePicker")),L(),B("styleClass",e.cx("pcIncrementButton")),Xe("aria-label",e.getTranslation("nextMinute")),L(4),B("ngIf",e.currentMinute<10),L(),Di(e.currentMinute),L(),B("styleClass",e.cx("pcDecrementButton")),Xe("aria-label",e.getTranslation("prevMinute")),L(3),B("ngIf",e.showSeconds),L(),B("ngIf",e.showSeconds),L(),B("ngIf",e.hourFormat=="12"),L(),B("ngIf",e.hourFormat=="12")}}function CVe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"p-button",50),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("onClick",function(o){Ee(e);let r=V(2);return Ae(r.onTodayButtonClick(o))}),Z(),K(2,"p-button",50),Qe("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onContainerButtonKeydown(o))})("onClick",function(o){Ee(e);let r=V(2);return Ae(r.onClearButtonClick(o))}),Z()()}if(t&2){let e=V(2);Ge(e.cx("buttonbar")),L(),B("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass),L(),B("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)}}function wVe(t,n){t&1&&Oi(0)}function SVe(t,n){if(t&1){let e=Bt();K(0,"div",21,1),Qe("@overlayAnimation.start",function(o){Ee(e);let r=V();return Ae(r.onOverlayAnimationStart(o))})("@overlayAnimation.done",function(o){Ee(e);let r=V();return Ae(r.onOverlayAnimationDone(o))})("click",function(o){Ee(e);let r=V();return Ae(r.onOverlayClick(o))}),yn(2),le(3,J4e,1,0,"ng-container",12)(4,Lze,5,5,"ng-container",6)(5,xVe,28,23,"div",22)(6,CVe,3,8,"div",22),yn(7,1),le(8,wVe,1,0,"ng-container",12),Z()}if(t&2){let e=V();Ge(e.cn(e.cx("panel"),e.panelStyleClass)),B("ngStyle",e.panelStyle)("@overlayAnimation",rn(17,P4e,kr(14,O4e,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.inline===!0),Xe("id",e.panelId)("aria-label",e.getTranslation("chooseDate"))("role",e.inline?null:"dialog")("aria-modal",e.inline?null:"true"),L(3),B("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),L(),B("ngIf",!e.timeOnly),L(),B("ngIf",(e.showTime||e.timeOnly)&&e.currentView==="date"),L(),B("ngIf",e.showButtonBar),L(2),B("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var IVe=` ${Pme} /* For PrimeNG */ .p-datepicker.ng-invalid.ng-dirty .p-inputtext { border-color: dt('inputtext.invalid.border.color'); } `,TVe={root:()=>({position:"relative"})},EVe={root:({instance:t})=>["p-datepicker p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-datepicker-fluid":t.hasFluid,"p-inputwrapper-filled":t.$filled(),"p-variant-filled":t.$variant()==="filled","p-inputwrapper-focus":t.focus||t.overlayVisible,"p-focus":t.focus||t.overlayVisible}],pcInputText:"p-datepicker-input",dropdown:"p-datepicker-dropdown",inputIconContainer:"p-datepicker-input-icon-container",inputIcon:"p-datepicker-input-icon",panel:({instance:t})=>["p-datepicker-panel p-component",{"p-datepicker-panel p-component":!0,"p-datepicker-panel-inline":t.inline,"p-disabled":t.$disabled(),"p-datepicker-timeonly":t.timeOnly}],calendarContainer:"p-datepicker-calendar-container",calendar:"p-datepicker-calendar",header:"p-datepicker-header",pcPrevButton:"p-datepicker-prev-button",title:"p-datepicker-title",selectMonth:"p-datepicker-select-month",selectYear:"p-datepicker-select-year",decade:"p-datepicker-decade",pcNextButton:"p-datepicker-next-button",dayView:"p-datepicker-day-view",weekHeader:"p-datepicker-weekheader p-disabled",weekNumber:"p-datepicker-weeknumber",weekLabelContainer:"p-datepicker-weeklabel-container p-disabled",weekDayCell:"p-datepicker-weekday-cell",weekDay:"p-datepicker-weekday",dayCell:({date:t})=>["p-datepicker-day-cell",{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}],day:({instance:t,date:n})=>{let e="";if(t.isRangeSelection()&&t.isSelected(n)&&n.selectable){let i=t.value[0],o=t.value[1],r=i&&n.year===i.getFullYear()&&n.month===i.getMonth()&&n.day===i.getDate(),a=o&&n.year===o.getFullYear()&&n.month===o.getMonth()&&n.day===o.getDate();e=r||a?"p-datepicker-day-selected":"p-datepicker-day-selected-range"}return{"p-datepicker-day":!0,"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(n)&&n.selectable,"p-disabled":t.$disabled()||!n.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:n})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(n),"p-disabled":t.isMonthDisabled(n)}],yearView:"p-datepicker-year-view",year:({instance:t,year:n})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(n),"p-disabled":t.isYearDisabled(n)}],timePicker:"p-datepicker-time-picker",hourPicker:"p-datepicker-hour-picker",pcIncrementButton:"p-datepicker-increment-button",pcDecrementButton:"p-datepicker-decrement-button",separator:"p-datepicker-separator",minutePicker:"p-datepicker-minute-picker",secondPicker:"p-datepicker-second-picker",ampmPicker:"p-datepicker-ampm-picker",buttonbar:"p-datepicker-buttonbar",pcTodayButton:"p-datepicker-today-button",pcClearButton:"p-datepicker-clear-button",clearIcon:"p-datepicker-clear-icon"},Fme=(()=>{class t extends to{name="datepicker";theme=IVe;classes=EVe;inlineStyles=TVe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var AVe={provide:Wa,useExisting:Br(()=>Nme),multi:!0},Nme=(()=>{class t extends Fv{zone;overlayService;iconDisplay="button";styleClass;inputStyle;inputId;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;get dateFormat(){return this._dateFormat}set dateFormat(e){this._dateFormat=e,this.initialized&&this.updateInputfield()}multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;readonlyInput;shortYearCutoff="+10";get hourFormat(){return this._hourFormat}set hourFormat(e){this._hourFormat=e,this.initialized&&this.updateInputfield()}timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;showOnFocus=!0;showWeek=!1;startWeekFromFirstDayOfYear=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass;clearButtonStyleClass;autofocus;autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=Wn(void 0);onFocus=new yt;onBlur=new yt;onClose=new yt;onSelect=new yt;onClear=new yt;onInput=new yt;onTodayClick=new yt;onClearClick=new yt;onMonthChange=new yt;onYearChange=new yt;onClickOutside=new yt;onShow=new yt;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}_componentStyle=re(Fme);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;_minDate;_maxDate;_dateFormat;_hourFormat="24";_showTime;_yearRange;preventDocumentListener;dayClass(e){return this._componentStyle.classes.day({instance:this,date:e})}dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;_dateTemplate;_headerTemplate;_footerTemplate;_disabledDateTemplate;_decadeTemplate;_previousIconTemplate;_nextIconTemplate;_triggerIconTemplate;_clearIconTemplate;_decrementIconTemplate;_incrementIconTemplate;_inputIconTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;_focusKey=null;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,i){super(),this.zone=e,this.overlayService=i,this.window=this.document.defaultView}ngOnInit(){super.ngOnInit(),this.attributeSelector=tr("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=Da(this.el?.nativeElement)+"px")))}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this._dateTemplate=e.template;break;case"decade":this._decadeTemplate=e.template;break;case"disabledDate":this._disabledDateTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"inputicon":this._inputIconTemplate=e.template;break;case"previousicon":this._previousIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"decrementicon":this._decrementIconTemplate=e.template;break;case"incrementicon":this._incrementIconTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._dateTemplate=e.template;break}})}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let o=e;o<=i;o++)this.yearOptions.push(o)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(Ts.DAY_NAMES_MIN);for(let o=0;o<7;o++)this.weekDays.push(i[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let o=0;o<10;o++)e.push(i+o);return e}createMonths(e,i){this.months=this.months=[];for(let o=0;o11&&(r=r%12,a=i+Math.floor((e+o)/12)),this.months.push(this.createMonth(r,a))}}getWeekNumber(e){let i=new Date(e.getTime());if(this.startWeekFromFirstDayOfYear){let r=+this.getFirstDateOfWeek();i.setDate(i.getDate()+6+r-i.getDay())}else i.setDate(i.getDate()+4-(i.getDay()||7));let o=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((o-i.getTime())/864e5)/7)+1}createMonth(e,i){let o=[],r=this.getFirstDayOfMonthIndex(e,i),a=this.getDaysCountInMonth(e,i),p=this.getDaysCountInPrevMonth(e,i),f=1,x=new Date,I=[],D=Math.ceil((a+r)/7);for(let P=0;Pa){let $=this.getNextMonthAndYear(e,i);R.push({day:f-a,month:$.month,year:$.year,otherMonth:!0,today:this.isToday(x,f-a,$.month,$.year),selectable:this.isSelectable(f-a,$.month,$.year,!0)})}else R.push({day:f,month:e,year:i,today:this.isToday(x,f,e,i),selectable:this.isSelectable(f,e,i,!1)});f++}this.showWeek&&I.push(this.getWeekNumber(new Date(R[0].year,R[0].month,R[0].day))),o.push(R)}return{month:e,year:i,dates:o,weekNumbers:I}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.currentYeare[e.length-1]){let i=e[e.length-1]-e[0];this.populateYearOptions(e[0]+i,e[e.length-1]+i)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,i){if(this.$disabled()||!i.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((o,r)=>!this.isDateEquals(o,i)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.hideOnDateTimeSelect&&(this.isSingleSelection()||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,i){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){this.view==="year"?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let i=this.formatDateMetaToDate(e);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?i.setHours(this.pm?12:0):i.setHours(this.pm?this.currentHour+12:this.currentHour):i.setHours(this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=o.getTime()?r=i:(o=i,r=null),this.updateModel([o,r])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,this.dataType=="date")this.writeModelValue(this.value),this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;Array.isArray(this.value)&&(i=this.value.map(o=>this.formatDateTime(o))),this.writeModelValue(i),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let o=new Date;o.setDate(1),o.setMonth(e),o.setFullYear(i);let r=o.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let o=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(o.month,o.year)}getPreviousMonthAndYear(e,i){let o,r;return e===0?(o=11,r=i-1):(o=e-1,r=i),{month:o,year:r}}getNextMonthAndYear(e,i){let o,r;return e===11?(o=0,r=i+1):(o=e+1,r=i),{month:o,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let o of this.value)if(i=this.isDateEquals(o,e),i)break;return i}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(!this.isComparable())return!1;if(this.isMultipleSelection())return this.value.some(i=>i.getMonth()===e&&i.getFullYear()===this.currentYear);if(this.isRangeSelection())if(this.value[1]){let i=new Date(this.currentYear,e,1),o=new Date(this.value[0].getFullYear(),this.value[0].getMonth(),1),r=new Date(this.value[1].getFullYear(),this.value[1].getMonth(),1);return i>=o&&i<=r}else return this.value[0]?.getFullYear()===this.currentYear&&this.value[0]?.getMonth()===e;else return this.value.getMonth()===e&&this.value.getFullYear()===this.currentYear}isMonthDisabled(e,i){let o=i??this.currentYear;for(let r=1;rthis.isMonthDisabled(o,e))}isYearSelected(e){if(this.isComparable()){let i=this.isRangeSelection()?this.value[0]:this.value;return this.isMultipleSelection()?!1:i.getFullYear()===e}return!1}isDateEquals(e,i){return e&&QM(e)?e.getDate()===i.day&&e.getMonth()===i.month&&e.getFullYear()===i.year:!1}isDateBetween(e,i,o){let r=!1;if(QM(e)&&QM(i)){let a=this.formatDateMetaToDate(o);return e.getTime()<=a.getTime()&&i.getTime()>=a.getTime()}return r}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,i,o,r){return e.getDate()===i&&e.getMonth()===o&&e.getFullYear()===r}isSelectable(e,i,o,r){let a=!0,p=!0,f=!0,x=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>o||this.minDate.getFullYear()===o&&this.currentView!="year"&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(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 i=$r(this.el?.nativeElement,".p-datepicker-header"),o=e.target;if(this.timeOnly)return;o==i.children[i?.children?.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(c0(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,o){let r=e.currentTarget,a=r.parentElement,p=this.formatDateMetaToDate(i);switch(e.which){case 40:{r.tabIndex="-1";let j=ZM(a),$=a.parentElement.nextElementSibling;if($){let W=$.children[j].children[0];Zl(W,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):($.children[j].children[0].tabIndex="0",$.children[j].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let j=ZM(a),$=a.parentElement.previousElementSibling;if($){let W=$.children[j].children[0];Zl(W,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(W.tabIndex="0",W.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let j=a.previousElementSibling;if(j){let $=j.children[0];Zl($,"p-disabled")||Zl($.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,o):($.tabIndex="0",$.focus())}else this.navigateToMonth(!0,o);e.preventDefault();break}case 39:{r.tabIndex="-1";let j=a.nextElementSibling;if(j){let $=j.children[0];Zl($,"p-disabled")?this.navigateToMonth(!1,o):($.tabIndex="0",$.focus())}else this.navigateToMonth(!1,o);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}case 33:{r.tabIndex="-1";let j=new Date(p.getFullYear(),p.getMonth()-1,p.getDate()),$=this.formatDateKey(j);this.navigateToMonth(!0,o,`span[data-date='${$}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let j=new Date(p.getFullYear(),p.getMonth()+1,p.getDate()),$=this.formatDateKey(j);this.navigateToMonth(!1,o,`span[data-date='${$}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let f=new Date(p.getFullYear(),p.getMonth(),1),x=this.formatDateKey(f),I=$r(r.offsetParent,`span[data-date='${x}']:not(.p-disabled):not(.p-ink)`);I&&(I.tabIndex="0",I.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let D=new Date(p.getFullYear(),p.getMonth()+1,0),P=this.formatDateKey(D),R=$r(r.offsetParent,`span[data-date='${P}']:not(.p-disabled):not(.p-ink)`);D&&(R.tabIndex="0",R.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,i){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=ZM(o);let p=r[e.which===40?a+3:a-3];p&&(p.tabIndex="0",p.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let p=o.previousElementSibling;p?(p.tabIndex="0",p.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let p=o.nextElementSibling;p?(p.tabIndex="0",p.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,i){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=ZM(o);let p=r[e.which===40?a+2:a-2];p&&(p.tabIndex="0",p.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let p=o.previousElementSibling;p?(p.tabIndex="0",p.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let p=o.nextElementSibling;p?(p.tabIndex="0",p.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,i),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,i,o){if(e)if(this.numberOfMonths===1||i===0)this.navigationState={backward:!0},this._focusKey=o,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[i-1];if(o){let a=$r(r,o);a.tabIndex="0",a.focus()}else{let a=gg(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),p=a[a.length-1];p.tabIndex="0",p.focus()}}else if(this.numberOfMonths===1||i===this.numberOfMonths-1)this.navigationState={backward:!1},this._focusKey=o,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[i+1];if(o){let a=$r(r,o);a.tabIndex="0",a.focus()}else{let a=$r(r,".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 i;this.currentView==="month"?i=gg(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?i=gg(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):i=gg(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else this.currentView==="month"?e=$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,i;if(this.currentView==="month"){let o=gg(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=$r(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");o.forEach(a=>a.tabIndex=-1),i=r||o[0],o.length===0&&gg(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(p=>p.tabIndex=-1)}else if(this.currentView==="year"){let o=gg(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=$r(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");o.forEach(a=>a.tabIndex=-1),i=r||o[0],o.length===0&&gg(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(p=>p.tabIndex=-1)}else if(i=$r(e,"span.p-highlight"),!i){let o=$r(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");o?i=o:i=$r(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}i&&(i.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.$disabled()||i.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=c0(this.contentViewChild.nativeElement);if(i&&i.length>0)if(!i[0].ownerDocument.activeElement)i[0].focus();else{let o=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(o==-1||o===0)if(this.focusTrap)i[i.length-1].focus();else{if(o===-1)return this.hideOverlay();if(o===0)return}else i[o-1].focus();else if(o==-1)if(this.timeOnly)i[0].focus();else{let r=0;for(let a=0;a=12),!0){case(j&&p&&this.minDate.getHours()===12&&this.minDate.getHours()>x):a[0]=11;case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()>i):a[1]=this.minDate.getMinutes();case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(j&&!p&&this.minDate.getHours()-1===x&&this.minDate.getHours()>x):a[0]=11,this.pm=!0;case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()>i):a[1]=this.minDate.getMinutes();case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(j&&p&&this.minDate.getHours()>x&&x!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour;case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()>i):a[1]=this.minDate.getMinutes();case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(j&&this.minDate.getHours()>x):a[0]=this.minDate.getHours();case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()>i):a[1]=this.minDate.getMinutes();case(j&&this.minDate.getHours()===x&&this.minDate.getMinutes()===i&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case($&&this.maxDate.getHours()=24?o-24:o:this.hourFormat=="12"&&(i<12&&o>11&&(r=!this.pm),o=o>=13?o-12:o),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(o,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let i=this.value,o=i?i.toDateString():null;this.minDate&&o&&this.minDate.toDateString()===o&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,i,o){this.$disabled()||(this.repeat(e,null,i,o),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,o,r){let a=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,o,r),this.cd.markForCheck()},a),o){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=(this.currentHour??0)-this.stepHour,o=this.pm;this.hourFormat=="24"?i=i<0?24+i:i:this.hourFormat=="12"&&(this.currentHour===12&&(o=!this.pm),i=i<=0?12+i:i),this.toggleAMPMIfNotMinDate(o),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(i,this.currentMinute,this.currentSecond,o),e.preventDefault()}incrementMinute(e){let i=(this.currentMinute??0)+this.stepMinute;i=i>59?i-60:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,i,this.currentSecond,this.pm),e.preventDefault()}decrementMinute(e){let i=(this.currentMinute??0)-this.stepMinute;i=i<0?60+i:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,i,this.currentSecond,this.pm),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,i,this.pm),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,i,this.pm),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let i=!this.pm;this.pm=i,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour,this.currentMinute,this.currentSecond,i),this.updateTime(),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let o=this.parseValueFromString(i);this.isValidSelection(o)?(this.updateModel(o),this.updateUI()):this.keepInvalid&&this.updateModel(o)}catch{let r=this.keepInvalid?i:null;this.updateModel(r)}this.onInput.emit(e)}isValidSelection(e){if(this.isSingleSelection())return this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1);let i=e.every(o=>this.isSelectable(o.getDate(),o.getMonth(),o.getFullYear(),!1));return i&&this.isRangeSelection()&&(i=e.length===1||e.length>1&&e[1]>=e[0]),i}parseValueFromString(e){if(!e||e.trim().length===0)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let o=e.split(this.multipleSeparator);i=[];for(let r of o)i.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let o=e.split(" "+this.rangeSeparator+" ");i=[];for(let r=0;r{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),tme())}disableModality(){this.mask&&(Rc(this.mask,"p-overlay-mask-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,i;for(let o=0;o{let D=o+1{let R=""+D;if(r(I))for(;R.lengthr(I)?R[D]:P[D],f="",x=!1;if(e)for(o=0;o11&&o!=12&&(o-=12),this.hourFormat=="12"?i+=o===0?12:o<10?"0"+o:o:i+=o<10?"0"+o:o,i+=":",i+=r<10?"0"+r:r,this.showSeconds&&(i+=":",i+=a<10?"0"+a:a),this.hourFormat=="12"&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":"),o=this.showSeconds?3:2;if(i.length!==o)throw"Invalid time";let r=parseInt(i[0]),a=parseInt(i[1]),p=this.showSeconds?parseInt(i[2]):null;if(isNaN(r)||isNaN(a)||r>23||a>59||this.hourFormat=="12"&&r>12||this.showSeconds&&(isNaN(p)||p>59))throw"Invalid time";return this.hourFormat=="12"&&(r!==12&&this.pm?r+=12:!this.pm&&r===12&&(r-=12)),{hour:r,minute:a,second:p}}parseDate(e,i){if(i==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let o,r,a,p=0,f=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),x=-1,I=-1,D=-1,P=-1,R=!1,j,$=ge=>{let Re=o+1{let Re=$(ge),Se=ge==="@"?14:ge==="!"?20:ge==="y"&&Re?4:ge==="o"?3:2,fe=ge==="y"?Se:1,be=new RegExp("^\\d{"+fe+","+Se+"}"),je=e.substring(p).match(be);if(!je)throw"Missing number at position "+p;return p+=je[0].length,parseInt(je[0],10)},Q=(ge,Re,Se)=>{let fe=-1,be=$(ge)?Se:Re,je=[];for(let st=0;st-(st[1].length-Fe[1].length));for(let st=0;st{if(e.charAt(p)!==i.charAt(o))throw"Unexpected literal at position "+p;p++};for(this.view==="month"&&(D=1),o=0;o-1){I=1,D=P;do{if(r=this.getDaysCountInMonth(x,I-1),D<=r)break;I++,D-=r}while(!0)}if(this.view==="year"&&(I=I===-1?1:I,D=D===-1?1:D),j=this.daylightSavingAdjust(new Date(x,I-1,D)),j.getFullYear()!==x||j.getMonth()+1!==I||j.getDate()!==D)throw"Invalid date";return j}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}isValidDateForTimeConstraints(e){return this.keepInvalid?!0:(!this.minDate||e>=this.minDate)&&(!this.maxDate||e<=this.maxDate)}onTodayButtonClick(e){let i=new Date,o={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(i.getMonth(),i.getFullYear()),this.onDateSelect(e,o),this.onTodayClick.emit(i)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",Ov(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(o=>!!(o.breakpoint&&o.numMonths)).sort((o,r)=>-1*o.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let o=0;o{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Hm(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 Zl(e.target,"p-datepicker-prev-button")||Zl(e.target,"p-datepicker-prev-icon")||Zl(e.target,"p-datepicker-next-button")||Zl(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!Lh()&&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&&ml.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(rt(on),rt(Fh))};static \u0275cmp=Le({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,g4e,4),Ht(r,_4e,4),Ht(r,y4e,4),Ht(r,v4e,4),Ht(r,b4e,4),Ht(r,x4e,4),Ht(r,C4e,4),Ht(r,w4e,4),Ht(r,S4e,4),Ht(r,I4e,4),Ht(r,T4e,4),Ht(r,E4e,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.dateTemplate=a.first),Je(a=et())&&(o.headerTemplate=a.first),Je(a=et())&&(o.footerTemplate=a.first),Je(a=et())&&(o.disabledDateTemplate=a.first),Je(a=et())&&(o.decadeTemplate=a.first),Je(a=et())&&(o.previousIconTemplate=a.first),Je(a=et())&&(o.nextIconTemplate=a.first),Je(a=et())&&(o.triggerIconTemplate=a.first),Je(a=et())&&(o.clearIconTemplate=a.first),Je(a=et())&&(o.decrementIconTemplate=a.first),Je(a=et())&&(o.incrementIconTemplate=a.first),Je(a=et())&&(o.inputIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(A4e,5),Qi(D4e,5)),i&2){let r;Je(r=et())&&(o.inputfieldViewChild=r.first),Je(r=et())&&(o.content=r.first)}},hostVars:4,hostBindings:function(i,o){i&2&&(Gr(o.sx("root")),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{iconDisplay:"iconDisplay",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:[2,"inline","inline",lt],showOtherMonths:[2,"showOtherMonths","showOtherMonths",lt],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",lt],showIcon:[2,"showIcon","showIcon",lt],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",lt],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",lt],stepHour:[2,"stepHour","stepHour",wn],stepMinute:[2,"stepMinute","stepMinute",wn],stepSecond:[2,"stepSecond","stepSecond",wn],showSeconds:[2,"showSeconds","showSeconds",lt],showOnFocus:[2,"showOnFocus","showOnFocus",lt],showWeek:[2,"showWeek","showWeek",lt],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",lt],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",wn],showButtonBar:[2,"showButtonBar","showButtonBar",lt],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",lt],autoZIndex:[2,"autoZIndex","autoZIndex",lt],baseZIndex:[2,"baseZIndex","baseZIndex",wn],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",lt],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",lt],touchUI:[2,"touchUI","touchUI",lt],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",lt],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",wn],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:[Pi([AVe,Fme]),Rt],ngContentSelectors:M4e,decls:2,vars:2,consts:[["inputfield",""],["contentWrapper",""],["icon",""],[3,"ngIf"],[3,"ngStyle","class","click",4,"ngIf"],["pInputText","","type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"focus","keydown","click","blur","input","pSize","value","ngStyle","pAutoFocus","variant","fluid","invalid"],[4,"ngIf"],["type","button","aria-haspopup","dialog","tabindex","0",3,"class","disabled","click",4,"ngIf"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["type","button","aria-haspopup","dialog","tabindex","0",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","calendar",4,"ngIf"],["data-p-icon","calendar"],["data-p-icon","calendar",3,"class","click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","calendar",3,"click"],[3,"click","ngStyle"],[3,"class",4,"ngIf"],[3,"class",4,"ngFor","ngForOf"],["rounded","","variant","text","severity","secondary","type","button",3,"keydown","onClick","styleClass","ngStyle","ariaLabel"],["type","button","pRipple","",3,"class","click","keydown",4,"ngIf"],["rounded","","variant","text","severity","secondary",3,"keydown","onClick","styleClass","ngStyle","ariaLabel"],["role","grid",3,"class",4,"ngIf"],["data-p-icon","chevron-left",4,"ngIf"],["data-p-icon","chevron-left"],["type","button","pRipple","",3,"click","keydown"],["data-p-icon","chevron-right",4,"ngIf"],["data-p-icon","chevron-right"],["role","grid"],["scope","col",3,"class",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["scope","col"],["draggable","false","pRipple","",3,"click","keydown","ngClass"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],["pRipple","",3,"class","click","keydown",4,"ngFor","ngForOf"],["pRipple","",3,"click","keydown"],["rounded","","variant","text","severity","secondary",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave","styleClass"],[1,"p-datepicker-separator"],["data-p-icon","chevron-up",4,"ngIf"],["data-p-icon","chevron-up"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-down"],["text","","rounded","","severity","secondary",3,"keydown","onClick","keydown.enter","styleClass"],["text","","rounded","","severity","secondary",3,"keydown","click","keydown.enter","styleClass"],["size","small","severity","secondary","variant","text","size","small",3,"keydown","onClick","styleClass","label","ngClass"]],template:function(i,o){i&1&&(eo(k4e),le(0,X4e,5,26,"ng-template",3)(1,SVe,9,19,"div",4)),i&2&&(B("ngIf",!o.inline),L(),B("ngIf",o.inline||o.overlayVisible))},dependencies:[po,Rs,Rl,Zr,Vo,fs,jm,Yl,Bz,DT,mme,Nv,xd,hme,cp,yg,kn],encapsulation:2,data:{animation:[Ph("overlayAnimation",[fW("visibleTouchUI",hl({transform:"translate(-50%,-50%)",opacity:1})),Mc("void => visible",[hl({opacity:0,transform:"scaleY(0.8)"}),Kl("{{showTransitionParams}}",hl({opacity:1,transform:"*"}))]),Mc("visible => void",[Kl("{{hideTransitionParams}}",hl({opacity:0}))]),Mc("void => visibleTouchUI",[hl({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Kl("{{showTransitionParams}}")]),Mc("visibleTouchUI => void",[Kl("{{hideTransitionParams}}",hl({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0})}return t})(),Bme=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Nme,kn,kn]})}return t})();var zme=` .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 DVe=["*"],kVe=` ${zme} /* For PrimeNG */ .p-iftalabel:has(.ng-invalid.ng-dirty) label { color: dt('iftalabel.invalid.color'); } `,MVe={root:"p-iftalabel"},Vme=(()=>{class t extends to{name="iftalabel";theme=kVe;classes=MVe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var vg=(()=>{class t extends Ao{_componentStyle=re(Vme);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-iftalabel"],["p-iftaLabel"],["p-ifta-label"]],hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.cx("root"))},features:[Pi([Vme]),Rt],ngContentSelectors:DVe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},encapsulation:2,changeDetection:0})}return t})();var Ume=` .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 RVe=["*"],OVe={root:({instance:t})=>["p-iconfield",{"p-iconfield-left":t.iconPosition=="left","p-iconfield-right":t.iconPosition=="right"}]},Hme=(()=>{class t extends to{name="iconfield";theme=Ume;classes=OVe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Gz=(()=>{class t extends Ao{iconPosition="left";styleClass;_componentStyle=re(Hme);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.cn(o.cx("root"),o.styleClass))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[Pi([Hme]),Rt],ngContentSelectors:RVe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po],encapsulation:2,changeDetection:0})}return t})();var PVe=["*"],LVe={root:"p-inputicon"},jme=(()=>{class t extends to{name="inputicon";classes=LVe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),$z=(()=>{class t extends Ao{styleClass;_componentStyle=re(jme);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.cn(o.cx("root"),o.styleClass))},inputs:{styleClass:"styleClass"},features:[Pi([jme]),Rt],ngContentSelectors:PVe,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po,kn],encapsulation:2,changeDetection:0})}return t})();var Gme=["content"],FVe=["overlay"],NVe=["*"],BVe=(t,n,e,i,o,r,a,p,f,x,I,D,P,R)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":t,"p-overlay-center":n,"p-overlay-top":e,"p-overlay-top-start":i,"p-overlay-top-end":o,"p-overlay-bottom":r,"p-overlay-bottom-start":a,"p-overlay-bottom-end":p,"p-overlay-left":f,"p-overlay-left-start":x,"p-overlay-left-end":I,"p-overlay-right":D,"p-overlay-right-start":P,"p-overlay-right-end":R}),zVe=(t,n,e)=>({showTransitionParams:t,hideTransitionParams:n,transform:e}),VVe=t=>({value:"visible",params:t}),UVe=t=>({mode:t}),HVe=t=>({$implicit:t});function jVe(t,n){t&1&&Oi(0)}function GVe(t,n){if(t&1){let e=Bt();K(0,"div",3,1),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.onOverlayContentClick(o))})("@overlayContentAnimation.start",function(o){Ee(e);let r=V(2);return Ae(r.onOverlayContentAnimationStart(o))})("@overlayContentAnimation.done",function(o){Ee(e);let r=V(2);return Ae(r.onOverlayContentAnimationDone(o))}),yn(2),le(3,jVe,1,0,"ng-container",4),Z()}if(t&2){let e=V(2);Ge(e.contentStyleClass),B("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",rn(11,VVe,Th(7,zVe,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),L(3),B("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",rn(15,HVe,rn(13,UVe,e.overlayMode)))}}function $Ve(t,n){if(t&1){let e=Bt();K(0,"div",3,0),Qe("click",function(){Ee(e);let o=V();return Ae(o.onOverlayClick())}),le(2,GVe,4,17,"div",2),Z()}if(t&2){let e=V();Ge(e.styleClass),B("ngStyle",e.style)("ngClass",xB(5,BVe,[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"])),L(2),B("ngIf",e.visible)}}var qVe=` .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; } `,$me=(()=>{class t extends to{name="overlay";theme=qVe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),WVe=fg([hl({transform:"{{transform}}",opacity:0}),Kl("{{showTransitionParams}}")]),KVe=fg([Kl("{{hideTransitionParams}}",hl({transform:"{{transform}}",opacity:0}))]),kT=(()=>{class t extends Ao{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 Zo.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Zo.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Zo.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Zo.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=Wn(void 0);visibleChange=new yt;onBeforeShow=new yt;onShow=new yt;onBeforeHide=new yt;onHide=new yt;onAnimationStart=new yt;onAnimationDone=new yt;overlayViewChild;contentViewChild;contentTemplate;templates;hostAttrSelector=Wn();$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());_contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;_componentStyle=re($me);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(ns(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 ve(ve({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return ve(ve({},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 bW(this.target,this.el?.nativeElement)}constructor(e,i){super(),this.overlayService=e,this.zone=i}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&cs(this.targetEl),this.modal&&Rc(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&cs(this.targetEl),this.modal&&nd(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&Io.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&&ml.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),this.hostAttrSelector()&&this.overlayEl.setAttribute(this.hostAttrSelector(),""),Io.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&&Rc(this.overlayEl,"p-overlay-mask-leave");break}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){let i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.visible&&(this.show(i,!0),this.bindListeners());break;case"void":if(!this.visible){this.hide(i,!0),this.modalVisible=!1,this.unbindListeners(),Io.appendOverlay(this.overlayEl,this.targetEl,this.$appendTo()),ml.clear(i),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&(this.config?.overlayOptions)[e]&&(this.config?.overlayOptions)[e](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Hm(this.targetEl,e=>{(this.listener?this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{let o=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:e.which!==3&&o}):o)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!Lh()}):!Lh())&&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:!Lh()}):!Lh())&&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),ml.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(rt(Fh),rt(on))};static \u0275cmp=Le({type:t,selectors:[["p-overlay"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,Gme,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(FVe,5),Qi(Gme,5)),i&2){let r;Je(r=et())&&(o.overlayViewChild=r.first),Je(r=et())&&(o.contentViewChild=r.first)}},inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options",appendTo:[1,"appendTo"],hostAttrSelector:[1,"hostAttrSelector"]},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Pi([$me]),Rt],ngContentSelectors:NVe,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(eo(),le(0,$Ve,3,20,"div",2)),i&2&&B("ngIf",o.modalVisible)},dependencies:[po,Rs,Zr,Vo,fs,kn],encapsulation:2,data:{animation:[Ph("overlayContentAnimation",[Mc(":enter",[Mv(WVe)]),Mc(":leave",[Mv(KVe)])])]},changeDetection:0})}return t})();var qme=["content"],ZVe=["item"],YVe=["loader"],QVe=["loadericon"],XVe=["element"],JVe=["*"],LW=(t,n)=>({$implicit:t,options:n}),e5e=t=>({numCols:t}),Kme=t=>({options:t}),t5e=()=>({styleClass:"p-virtualscroller-loading-icon"}),i5e=(t,n)=>({rows:t,columns:n});function n5e(t,n){t&1&&Oi(0)}function o5e(t,n){if(t&1&&(Mi(0),le(1,n5e,1,0,"ng-container",10),Ri()),t&2){let e=V(2);L(),B("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",kr(2,LW,e.loadedItems,e.getContentOptions()))}}function r5e(t,n){t&1&&Oi(0)}function s5e(t,n){if(t&1&&(Mi(0),le(1,r5e,1,0,"ng-container",10),Ri()),t&2){let e=n.$implicit,i=n.index,o=V(3);L(),B("ngTemplateOutlet",o.itemTemplate||o._itemTemplate)("ngTemplateOutletContext",kr(2,LW,e,o.getOptions(i)))}}function a5e(t,n){if(t&1&&(K(0,"div",null,3),le(2,s5e,2,5,"ng-container",11),Z()),t&2){let e=V(2);Gr(e.contentStyle),Ge(e.cn(e.cx("content"),e.contentStyleClass)),Xe("data-pc-section","content"),L(2),B("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy)}}function l5e(t,n){if(t&1&&Oe(0,"div",12),t&2){let e=V(2);Ge(e.cx("spacer")),B("ngStyle",e.spacerStyle),Xe("data-pc-section","spacer")}}function c5e(t,n){t&1&&Oi(0)}function d5e(t,n){if(t&1&&(Mi(0),le(1,c5e,1,0,"ng-container",10),Ri()),t&2){let e=n.index,i=V(4);L(),B("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",rn(4,Kme,i.getLoaderOptions(e,i.both&&rn(2,e5e,i.numItemsInViewport.cols))))}}function u5e(t,n){if(t&1&&(Mi(0),le(1,d5e,2,6,"ng-container",13),Ri()),t&2){let e=V(3);L(),B("ngForOf",e.loaderArr)}}function p5e(t,n){t&1&&Oi(0)}function h5e(t,n){if(t&1&&(Mi(0),le(1,p5e,1,0,"ng-container",10),Ri()),t&2){let e=V(4);L(),B("ngTemplateOutlet",e.loaderIconTemplate||e._loaderIconTemplate)("ngTemplateOutletContext",rn(3,Kme,Is(2,t5e)))}}function m5e(t,n){if(t&1&&(oi(),Oe(0,"svg",14)),t&2){let e=V(4);Ge(e.cx("loadingIcon")),B("spin",!0),Xe("data-pc-section","loadingIcon")}}function f5e(t,n){if(t&1&&le(0,h5e,2,5,"ng-container",6)(1,m5e,1,4,"ng-template",null,5,Hi),t&2){let e=un(2),i=V(3);B("ngIf",i.loaderIconTemplate||i._loaderIconTemplate)("ngIfElse",e)}}function g5e(t,n){if(t&1&&(K(0,"div"),le(1,u5e,2,1,"ng-container",6)(2,f5e,3,2,"ng-template",null,4,Hi),Z()),t&2){let e=un(3),i=V(2);Ge(i.cx("loader")),Xe("data-pc-section","loader"),L(),B("ngIf",i.loaderTemplate||i._loaderTemplate)("ngIfElse",e)}}function _5e(t,n){if(t&1){let e=Bt();Mi(0),K(1,"div",7,1),Qe("scroll",function(o){Ee(e);let r=V();return Ae(r.onContainerScroll(o))}),le(3,o5e,2,5,"ng-container",6)(4,a5e,3,7,"ng-template",null,2,Hi)(6,l5e,1,4,"div",8)(7,g5e,4,5,"div",9),Z(),Ri()}if(t&2){let e=un(5),i=V();L(),Ge(i.cn(i.cx("root"),i.styleClass)),B("ngStyle",i._style),Xe("id",i._id)("tabindex",i.tabindex)("data-pc-name","scroller")("data-pc-section","root"),L(2),B("ngIf",i.contentTemplate||i._contentTemplate)("ngIfElse",e),L(3),B("ngIf",i._showSpacer),L(),B("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function y5e(t,n){t&1&&Oi(0)}function v5e(t,n){if(t&1&&(Mi(0),le(1,y5e,1,0,"ng-container",10),Ri()),t&2){let e=V(2);L(),B("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",kr(5,LW,e.items,kr(2,i5e,e._items,e.loadedColumns)))}}function b5e(t,n){if(t&1&&(yn(0),le(1,v5e,2,8,"ng-container",15)),t&2){let e=V();L(),B("ngIf",e.contentTemplate||e._contentTemplate)}}var x5e=` .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; } `,C5e={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"},Wme=(()=>{class t extends to{name="virtualscroller";theme=x5e;classes=C5e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var h0=(()=>{class t extends Ao{zone;get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&typeof e=="object"&&(Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o)),Object.entries(e).forEach(([i,o])=>this[`${i}`]!==o&&(this[`${i}`]=o)))}onLazyLoad=new yt;onScroll=new yt;onScrollIndexChange=new yt;elementViewChild;contentViewChild;height;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;templates;_contentTemplate;_itemTemplate;_loaderTemplate;_loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;_contentStyleClass;get contentStyleClass(){return this._contentStyleClass}set contentStyleClass(e){this._contentStyleClass=e}get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:Array.isArray(e)?e.slice(this._appendOnly?0:this.first.cols,this.last.cols):e):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}_componentStyle=re(Wme);constructor(e){super(),this.zone=e}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(e){super.ngOnChanges(e);let i=!1;if(this.scrollHeight=="100%"&&(this.height="100%"),e.loading){let{previousValue:o,currentValue:r}=e.loading;this.lazy&&o!==r&&r!==this.d_loading&&(this.d_loading=r,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){let{previousValue:o,currentValue:r}=e.numToleratedItems;o!==r&&r!==this.d_numToleratedItems&&(this.d_numToleratedItems=r)}if(e.options){let{previousValue:o,currentValue:r}=e.options;this.lazy&&o?.loading!==r?.loading&&r?.loading!==this.d_loading&&(this.d_loading=r.loading,i=!0),o?.numToleratedItems!==r?.numToleratedItems&&r?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=r.numToleratedItems)}this.initialized&&!i&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"loadericon":this._loaderIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1,super.ngOnDestroy()}viewInit(){ns(this.platformId)&&!this.initialized&&xW(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=ku(this.elementViewChild?.nativeElement),this.defaultHeight=_g(this.elementViewChild?.nativeElement),this.defaultContentWidth=ku(this.contentEl),this.defaultContentHeight=_g(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,i="auto"){if(this.both?e.every(r=>r>-1):e>-1){let r=this.first,{scrollTop:a=0,scrollLeft:p=0}=this.elementViewChild?.nativeElement,{numToleratedItems:f}=this.calculateNumItems(),x=this.getContentPosition(),I=this.itemSize,D=(Q=0,se)=>Q<=se?0:Q,P=(Q,se,ge)=>Q*se+ge,R=(Q=0,se=0)=>this.scrollTo({left:Q,top:se,behavior:i}),j=this.both?{rows:0,cols:0}:0,$=!1,W=!1;this.both?(j={rows:D(e[0],f[0]),cols:D(e[1],f[1])},R(P(j.cols,I[1],x.left),P(j.rows,I[0],x.top)),W=this.lastScrollPos.top!==a||this.lastScrollPos.left!==p,$=j.rows!==r.rows||j.cols!==r.cols):(j=D(e,f),this.horizontal?R(P(j,I,x.left),a):R(p,P(j,I,x.top)),W=this.lastScrollPos!==(this.horizontal?p:a),$=j!==r),this.isRangeChanged=$,W&&(this.first=j)}}scrollInView(e,i,o="auto"){if(i){let{first:r,viewport:a}=this.getRenderedRange(),p=(I=0,D=0)=>this.scrollTo({left:I,top:D,behavior:o}),f=i==="to-start",x=i==="to-end";if(f){if(this.both)a.first.rows-r.rows>e[0]?p(a.first.cols*this._itemSize[1],(a.first.rows-1)*this._itemSize[0]):a.first.cols-r.cols>e[1]&&p((a.first.cols-1)*this._itemSize[1],a.first.rows*this._itemSize[0]);else if(a.first-r>e){let I=(a.first-1)*this._itemSize;this.horizontal?p(I,0):p(0,I)}}else if(x){if(this.both)a.last.rows-r.rows<=e[0]+1?p(a.first.cols*this._itemSize[1],(a.first.rows+1)*this._itemSize[0]):a.last.cols-r.cols<=e[1]+1&&p((a.first.cols+1)*this._itemSize[1],a.first.rows*this._itemSize[0]);else if(a.last-r<=e+1){let I=(a.first+1)*this._itemSize;this.horizontal?p(I,0):p(0,I)}}}else this.scrollToIndex(e,o)}getRenderedRange(){let e=(r,a)=>a||r?Math.floor(r/(a||r)):0,i=this.first,o=0;if(this.elementViewChild?.nativeElement){let{scrollTop:r,scrollLeft:a}=this.elementViewChild.nativeElement;if(this.both)i={rows:e(r,this._itemSize[0]),cols:e(a,this._itemSize[1])},o={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols};else{let p=this.horizontal?a:r;i=e(p,this._itemSize),o=i+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:i,last:o}}}calculateNumItems(){let e=this.getContentPosition(),i=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0)||0,o=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0)||0,r=(x,I)=>I||x?Math.ceil(x/(I||x)):0,a=x=>Math.ceil(x/2),p=this.both?{rows:r(o,this._itemSize[0]),cols:r(i,this._itemSize[1])}:r(this.horizontal?i:o,this._itemSize),f=this.d_numToleratedItems||(this.both?[a(p.rows),a(p.cols)]:a(p));return{numItemsInViewport:p,numToleratedItems:f}}calculateOptions(){let{numItemsInViewport:e,numToleratedItems:i}=this.calculateNumItems(),o=(p,f,x,I=!1)=>this.getLast(p+f+(pArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:r.cols}:0:r,last:Math.min(this._step?this._step:this.last,this._items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[e,i]=[ku(this.contentEl),_g(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[o,r]=[ku(this.elementViewChild.nativeElement),_g(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=othis.elementViewChild.nativeElement.style[a]=p;this.both||this.horizontal?(r("height",o),r("width",i)):r("height",o)}}setSpacerSize(){if(this._items){let e=this.getContentPosition(),i=(o,r,a,p=0)=>this.spacerStyle=gt(ve({},this.spacerStyle),{[`${o}`]:(r||[]).length*a+p+"px"});this.both?(i("height",this._items,this._itemSize[0],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){let i=e?e.first:this.first,o=(a,p)=>a*p,r=(a=0,p=0)=>this.contentStyle=gt(ve({},this.contentStyle),{transform:`translate3d(${a}px, ${p}px, 0)`});if(this.both)r(o(i.cols,this._itemSize[1]),o(i.rows,this._itemSize[0]));else{let a=o(i,this._itemSize);this.horizontal?r(a,0):r(0,a)}}}onScrollPositionChange(e){let i=e.target;if(!i)throw new Error("Event target is null");let o=this.getContentPosition(),r=(W,Q)=>W?W>Q?W-Q:W:0,a=(W,Q)=>Q||W?Math.floor(W/(Q||W)):0,p=(W,Q,se,ge,Re,Se)=>W<=Re?Re:Se?se-ge-Re:Q+Re-1,f=(W,Q,se,ge,Re,Se,fe)=>W<=Se?0:Math.max(0,fe?WQ?se:W-2*Se),x=(W,Q,se,ge,Re,Se=!1)=>{let fe=Q+ge+2*Re;return W>=Re&&(fe+=Re+1),this.getLast(fe,Se)},I=r(i.scrollTop,o.top),D=r(i.scrollLeft,o.left),P=this.both?{rows:0,cols:0}:0,R=this.last,j=!1,$=this.lastScrollPos;if(this.both){let W=this.lastScrollPos.top<=I,Q=this.lastScrollPos.left<=D;if(!this._appendOnly||this._appendOnly&&(W||Q)){let se={rows:a(I,this._itemSize[0]),cols:a(D,this._itemSize[1])},ge={rows:p(se.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],W),cols:p(se.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],Q)};P={rows:f(se.rows,ge.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],W),cols:f(se.cols,ge.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],Q)},R={rows:x(se.rows,P.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:x(se.cols,P.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},j=P.rows!==this.first.rows||R.rows!==this.last.rows||P.cols!==this.first.cols||R.cols!==this.last.cols||this.isRangeChanged,$={top:I,left:D}}}else{let W=this.horizontal?D:I,Q=this.lastScrollPos<=W;if(!this._appendOnly||this._appendOnly&&Q){let se=a(W,this._itemSize),ge=p(se,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,Q);P=f(se,ge,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,Q),R=x(se,P,this.last,this.numItemsInViewport,this.d_numToleratedItems),j=P!==this.first||R!==this.last||this.isRangeChanged,$=W}}return{first:P,last:R,isRangeChanged:j,scrollPos:$}}onScrollChange(e){let{first:i,last:o,isRangeChanged:r,scrollPos:a}=this.onScrollPositionChange(e);if(r){let p={first:i,last:o};if(this.setContentPosition(p),this.first=i,this.last=o,this.lastScrollPos=a,this.handleEvents("onScrollIndexChange",p),this._lazy&&this.isPageChanged(i)){let f={first:this._step?Math.min(this.getPageByFirst(i)*this._step,this._items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst(i)+1)*this._step:o,this._items.length)};(this.lazyLoadState.first!==f.first||this.lazyLoadState.last!==f.last)&&this.handleEvents("onLazyLoad",f),this.lazyLoadState=f}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this._showLoader){let{isRangeChanged:i}=this.onScrollPositionChange(e);(i||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this._showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst()),this.cd.detectChanges()},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){ns(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let e=this.document.defaultView,i=Lh()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(e,i,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(xW(this.elementViewChild?.nativeElement)){let[e,i]=[ku(this.elementViewChild?.nativeElement),_g(this.elementViewChild?.nativeElement)],[o,r]=[e!==this.defaultWidth,i!==this.defaultHeight];(this.both?o||r:this.horizontal?o:this.vertical?r:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=i,this.defaultContentWidth=ku(this.contentEl),this.defaultContentHeight=_g(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:`p-virtualscroller-content ${this.d_loading?"p-virtualscroller-loading":""}`,items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both,scrollTo:this.scrollTo.bind(this),scrollToIndex:this.scrollToIndex.bind(this),orientation:this._orientation,scrollableElement:this.elementViewChild?.nativeElement}}getOptions(e){let i=(this._items||[]).length,o=this.both?this.first.rows+e:this.first+e;return{index:o,count:i,first:o===0,last:o===i-1,even:o%2===0,odd:o%2!==0}}getLoaderOptions(e,i){let o=this.loaderArr.length;return ve({index:e,count:o,first:e===0,last:e===o-1,even:e%2===0,odd:e%2!==0,loading:this.d_loading},i)}static \u0275fac=function(i){return new(i||t)(rt(on))};static \u0275cmp=Le({type:t,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,qme,4),Ht(r,ZVe,4),Ht(r,YVe,4),Ht(r,QVe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.loaderTemplate=a.first),Je(a=et())&&(o.loaderIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(XVe,5),Qi(qme,5)),i&2){let r;Je(r=et())&&(o.elementViewChild=r.first),Je(r=et())&&(o.contentViewChild=r.first)}},hostVars:2,hostBindings:function(i,o){i&2&&zr("height",o.height)},inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Pi([Wme]),Rt,In],ngContentSelectors:JVe,decls:3,vars:2,consts:[["disabledContainer",""],["element",""],["buildInContent",""],["content",""],["buildInLoader",""],["buildInLoaderIcon",""],[4,"ngIf","ngIfElse"],[3,"scroll","ngStyle"],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],[4,"ngFor","ngForOf"],["data-p-icon","spinner",3,"spin"],[4,"ngIf"]],template:function(i,o){if(i&1&&(eo(),le(0,_5e,8,11,"ng-container",6)(1,b5e,2,1,"ng-template",null,0,Hi)),i&2){let r=un(2);B("ngIf",!o._disabled)("ngIfElse",r)}},dependencies:[po,Rl,Zr,Vo,fs,p0,kn],encapsulation:2})}return t})(),FW=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[h0,kn,kn]})}return t})();var Zme=` .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 S5e={root:"p-tooltip p-component",arrow:"p-tooltip-arrow",text:"p-tooltip-text"},Yme=(()=>{class t extends to{name="tooltip";theme=Zme;classes=S5e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Bv=(()=>{class t extends Ao{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=Wn(void 0);$appendTo=Do(()=>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:tr("pn_id_")+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;documentEscapeListener;scrollHandler;resizeListener;_componentStyle=re(Yme);interactionInProgress=!1;constructor(e,i){super(),this.zone=e,this.viewContainer=i}ngAfterViewInit(){super.ngAfterViewInit(),ns(this.platformId)&&this.zone.runOutsideAngular(()=>{let e=this.getOption("tooltipEvent");if((e==="hover"||e==="both")&&(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener)),e==="focus"||e==="both"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement)),i.addEventListener("focus",this.focusListener),i.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){super.ngOnChanges(e),e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.content&&(this.setOption({tooltipLabel:e.content.currentValue}),this.active&&(e.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.id&&this.setOption({id:e.id.currentValue}),e.tooltipOptions&&(this._tooltipOptions=ve(ve({},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():!(Zl(e.relatedTarget,"p-tooltip")||Zl(e.relatedTarget,"p-tooltip-text")||Zl(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"?l0(this.container,this.el.nativeElement):l0(this.getOption("appendTo"),this.container),this.container.style.display="none",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let e=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(e,"mouseleave",i=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){if(!this.getOption("tooltipLabel")||this.getOption("disabled"))return;this.create(),this.el.nativeElement.closest("p-dialog")?setTimeout(()=>{this.container&&(this.container.style.display="inline-block"),this.container&&this.align()},100):(this.container.style.display="inline-block",this.align()),Ihe(this.container,250),this.getOption("tooltipZIndex")==="auto"?ml.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&ml.clear(this.container),this.remove()}updateText(){let e=this.getOption("tooltipLabel");if(e instanceof Ml){let i=this.viewContainer.createEmbeddedView(e);i.detectChanges(),i.rootNodes.forEach(o=>this.tooltipText.appendChild(o))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(e))):this.tooltipText.innerHTML=e}align(){let e=this.getOption("tooltipPosition"),i={top:[this.alignTop,this.alignBottom,this.alignRight,this.alignLeft],bottom:[this.alignBottom,this.alignTop,this.alignRight,this.alignLeft],left:[this.alignLeft,this.alignRight,this.alignTop,this.alignBottom],right:[this.alignRight,this.alignLeft,this.alignTop,this.alignBottom]};for(let[o,r]of i[e].entries())if(o===0)r.call(this);else if(this.isOutOfBounds())r.call(this);else break}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let e=this.el.nativeElement.getBoundingClientRect(),i=e.left+yW(),o=e.top+vW();return{left:i,top:o}}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,i=Da(e),o=(Vd(e)-Vd(this.container))/2;this.alignTooltip(i,o);let r=this.getArrowElement();r.style.top="50%",r.style.right=null,r.style.bottom=null,r.style.left="0"}alignLeft(){this.preAlign("left");let e=this.getArrowElement(),i=Da(this.container),o=(Vd(this.el.nativeElement)-Vd(this.container))/2;this.alignTooltip(-i,o),e.style.top="50%",e.style.right="0",e.style.bottom=null,e.style.left=null}alignTop(){this.preAlign("top");let e=this.getArrowElement(),i=this.getHostOffset(),o=Da(this.container),r=(Da(this.el.nativeElement)-Da(this.container))/2,a=Vd(this.container);this.alignTooltip(r,-a);let p=i.left-this.getHostOffset().left+o/2;e.style.top=null,e.style.right=null,e.style.bottom="0",e.style.left=p+"px"}getArrowElement(){return $r(this.container,'[data-pc-section="arrow"]')}alignBottom(){this.preAlign("bottom");let e=this.getArrowElement(),i=Da(this.container),o=this.getHostOffset(),r=(Da(this.el.nativeElement)-Da(this.container))/2,a=Vd(this.el.nativeElement);this.alignTooltip(r,a);let p=o.left-this.getHostOffset().left+i/2;e.style.top="0",e.style.right=null,e.style.bottom=null,e.style.left=p+"px"}alignTooltip(e,i){let o=this.getHostOffset(),r=o.left+e,a=o.top+i;this.container.style.left=r+this.getOption("positionLeft")+"px",this.container.style.top=a+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions=ve(ve({},this._tooltipOptions),e)}getOption(e){return this._tooltipOptions[e]}getTarget(e){return Zl(e,"p-inputwrapper")?$r(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,o=e.left,r=Da(this.container),a=Vd(this.container),p=Rv();return o+r>p.width||o<0||i<0||i+a>p.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 Hm(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){let e=this.getOption("tooltipEvent");if((e==="hover"||e==="both")&&(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)),e==="focus"||e==="both"){let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement)),i.removeEventListener("focus",this.focusListener),i.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):Dhe(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&&ml.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.documentEscapeListener&&this.documentEscapeListener()}static \u0275fac=function(i){return new(i||t)(rt(on),rt(Ga))};static \u0275dir=Ki({type:t,selectors:[["","pTooltip",""]],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[2,"escape","escape",lt],showDelay:[2,"showDelay","showDelay",wn],hideDelay:[2,"hideDelay","hideDelay",wn],life:[2,"life","life",wn],positionTop:[2,"positionTop","positionTop",wn],positionLeft:[2,"positionLeft","positionLeft",wn],autoHide:[2,"autoHide","autoHide",lt],fitContent:[2,"fitContent","fitContent",lt],hideOnEscape:[2,"hideOnEscape","hideOnEscape",lt],content:[0,"pTooltip","content"],disabled:[0,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions",appendTo:[1,"appendTo"]},features:[Pi([Yme]),Rt,In]})}return t})(),eR=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({})}return t})();var Xme=` .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 tR=t=>({height:t}),NW=t=>({$implicit:t});function I5e(t,n){if(t&1&&(oi(),Oe(0,"svg",5)),t&2){let e=V(2);Ge(e.cx("optionCheckIcon"))}}function T5e(t,n){if(t&1&&(oi(),Oe(0,"svg",6)),t&2){let e=V(2);Ge(e.cx("optionBlankIcon"))}}function E5e(t,n){if(t&1&&(Mi(0),le(1,I5e,1,2,"svg",3)(2,T5e,1,2,"svg",4),Ri()),t&2){let e=V();L(),B("ngIf",e.selected),L(),B("ngIf",!e.selected)}}function A5e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V();L(),Di(e.label??"empty")}}function D5e(t,n){t&1&&Oi(0)}var k5e=["item"],M5e=["group"],R5e=["loader"],O5e=["selectedItem"],P5e=["header"],Jme=["filter"],L5e=["footer"],F5e=["emptyfilter"],N5e=["empty"],B5e=["dropdownicon"],z5e=["loadingicon"],V5e=["clearicon"],U5e=["filtericon"],H5e=["onicon"],j5e=["officon"],G5e=["cancelicon"],$5e=["focusInput"],q5e=["editableInput"],W5e=["items"],K5e=["scroller"],Z5e=["overlay"],Y5e=["firstHiddenFocusableEl"],Q5e=["lastHiddenFocusableEl"],efe=t=>({class:t}),tfe=t=>({options:t}),ife=(t,n)=>({$implicit:t,options:n}),X5e=()=>({});function J5e(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(2);L(),Di(e.label()==="p-emptylabel"?"\xA0":e.label())}}function e6e(t,n){if(t&1&&Oi(0,24),t&2){let e=V(2);B("ngTemplateOutlet",e.selectedItemTemplate||e._selectedItemTemplate)("ngTemplateOutletContext",rn(2,NW,e.selectedOption))}}function t6e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(3);L(),Di(e.label()==="p-emptylabel"?"\xA0":e.label())}}function i6e(t,n){if(t&1&&le(0,t6e,2,1,"span",18),t&2){let e=V(2);B("ngIf",e.isSelectedOptionEmpty())}}function n6e(t,n){if(t&1){let e=Bt();K(0,"span",22,3),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onInputFocus(o))})("blur",function(o){Ee(e);let r=V();return Ae(r.onInputBlur(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onKeyDown(o))}),le(2,J5e,2,1,"ng-container",20)(3,e6e,1,4,"ng-container",23)(4,i6e,1,1,"ng-template",null,4,Hi),Z()}if(t&2){let e=un(5),i=V();Ge(i.cx("label")),B("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass)("pAutoFocus",i.autofocus),Xe("aria-disabled",i.$disabled())("id",i.inputId)("aria-label",i.ariaLabel||(i.label()==="p-emptylabel"?void 0:i.label()))("aria-labelledby",i.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",i.overlayVisible??!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("tabindex",i.$disabled()?-1:i.tabindex)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-required",i.required())("required",i.required()?"":void 0)("disabled",i.$disabled()?"":void 0),L(2),B("ngIf",!i.selectedItemTemplate&&!i._selectedItemTemplate)("ngIfElse",e),L(),B("ngIf",(i.selectedItemTemplate||i._selectedItemTemplate)&&!i.isSelectedOptionEmpty())}}function o6e(t,n){if(t&1){let e=Bt();K(0,"input",25,5),Qe("input",function(o){Ee(e);let r=V();return Ae(r.onEditableInput(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onKeyDown(o))})("focus",function(o){Ee(e);let r=V();return Ae(r.onInputFocus(o))})("blur",function(o){Ee(e);let r=V();return Ae(r.onInputBlur(o))}),Z()}if(t&2){let e=V();Ge(e.cx("label")),B("pAutoFocus",e.autofocus),Xe("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 r6e(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",28),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.clear(o))}),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearicon")}}function s6e(t,n){}function a6e(t,n){t&1&&le(0,s6e,0,0,"ng-template")}function l6e(t,n){if(t&1){let e=Bt();K(0,"span",29),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.clear(o))}),le(1,a6e,1,0,null,30),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearicon"),L(),B("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)("ngTemplateOutletContext",rn(5,efe,e.cx("clearIcon")))}}function c6e(t,n){if(t&1&&(Mi(0),le(1,r6e,1,3,"svg",26)(2,l6e,2,7,"span",27),Ri()),t&2){let e=V();L(),B("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),L(),B("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function d6e(t,n){t&1&&Oi(0)}function u6e(t,n){if(t&1&&(Mi(0),le(1,d6e,1,0,"ng-container",31),Ri()),t&2){let e=V(2);L(),B("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function p6e(t,n){if(t&1&&Oe(0,"span",33),t&2){let e=V(3);Ge(e.cn(e.cx("loadingIcon"),"pi-spin"+e.loadingIcon))}}function h6e(t,n){if(t&1&&Oe(0,"span",33),t&2){let e=V(3);Ge(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin"))}}function m6e(t,n){if(t&1&&(Mi(0),le(1,p6e,1,2,"span",32)(2,h6e,1,2,"span",32),Ri()),t&2){let e=V(2);L(),B("ngIf",e.loadingIcon),L(),B("ngIf",!e.loadingIcon)}}function f6e(t,n){if(t&1&&(Mi(0),le(1,u6e,2,1,"ng-container",18)(2,m6e,3,2,"ng-container",18),Ri()),t&2){let e=V();L(),B("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),L(),B("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function g6e(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(3);Ge(e.cn(e.cx("dropdownIcon"),e.dropdownIcon))}}function _6e(t,n){if(t&1&&(oi(),Oe(0,"svg",36)),t&2){let e=V(3);Ge(e.cx("dropdownIcon"))}}function y6e(t,n){if(t&1&&(Mi(0),le(1,g6e,1,2,"span",34)(2,_6e,1,2,"svg",35),Ri()),t&2){let e=V(2);L(),B("ngIf",e.dropdownIcon),L(),B("ngIf",!e.dropdownIcon)}}function v6e(t,n){}function b6e(t,n){t&1&&le(0,v6e,0,0,"ng-template")}function x6e(t,n){if(t&1&&(K(0,"span"),le(1,b6e,1,0,null,30),Z()),t&2){let e=V(2);Ge(e.cx("dropdownIcon")),L(),B("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)("ngTemplateOutletContext",rn(4,efe,e.cx("dropdownIcon")))}}function C6e(t,n){if(t&1&&le(0,y6e,3,2,"ng-container",18)(1,x6e,2,6,"span",34),t&2){let e=V();B("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),L(),B("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function w6e(t,n){t&1&&Oi(0)}function S6e(t,n){t&1&&Oi(0)}function I6e(t,n){if(t&1&&(Mi(0),le(1,S6e,1,0,"ng-container",30),Ri()),t&2){let e=V(3);L(),B("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",rn(2,tfe,e.filterOptions))}}function T6e(t,n){t&1&&(oi(),Oe(0,"svg",42))}function E6e(t,n){}function A6e(t,n){t&1&&le(0,E6e,0,0,"ng-template")}function D6e(t,n){if(t&1&&(K(0,"span"),le(1,A6e,1,0,null,31),Z()),t&2){let e=V(4);L(),B("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function k6e(t,n){if(t&1){let e=Bt();K(0,"p-iconfield")(1,"input",40,10),Qe("input",function(o){Ee(e);let r=V(3);return Ae(r.onFilterInputChange(o))})("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onFilterKeyDown(o))})("blur",function(o){Ee(e);let r=V(3);return Ae(r.onFilterBlur(o))}),Z(),K(3,"p-inputicon"),le(4,T6e,1,0,"svg",41)(5,D6e,2,1,"span",18),Z()()}if(t&2){let e=V(3);L(),Ge(e.cx("pcFilter")),B("pSize",e.size())("value",e._filterValue()||"")("variant",e.$variant()),Xe("placeholder",e.filterPlaceholder)("aria-owns",e.id+"_list")("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.focusedOptionId),L(3),B("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),L(),B("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function M6e(t,n){if(t&1){let e=Bt();K(0,"div",29),Qe("click",function(o){return Ee(e),Ae(o.stopPropagation())}),le(1,I6e,2,4,"ng-container",20)(2,k6e,6,11,"ng-template",null,9,Hi),Z()}if(t&2){let e=un(3),i=V(2);Ge(i.cx("header")),L(),B("ngIf",i.filterTemplate||i._filterTemplate)("ngIfElse",e)}}function R6e(t,n){t&1&&Oi(0)}function O6e(t,n){if(t&1&&le(0,R6e,1,0,"ng-container",30),t&2){let e=n.$implicit,i=n.options;V(2);let o=un(9);B("ngTemplateOutlet",o)("ngTemplateOutletContext",kr(2,ife,e,i))}}function P6e(t,n){t&1&&Oi(0)}function L6e(t,n){if(t&1&&le(0,P6e,1,0,"ng-container",30),t&2){let e=n.options,i=V(4);B("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",rn(2,tfe,e))}}function F6e(t,n){t&1&&(Mi(0),le(1,L6e,1,4,"ng-template",null,12,Hi),Ri())}function N6e(t,n){if(t&1){let e=Bt();K(0,"p-scroller",43,11),Qe("onLazyLoad",function(o){Ee(e);let r=V(2);return Ae(r.onLazyLoad.emit(o))}),le(2,O6e,1,5,"ng-template",null,2,Hi)(4,F6e,3,0,"ng-container",18),Z()}if(t&2){let e=V(2);Gr(rn(8,tR,e.scrollHeight)),B("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),L(4),B("ngIf",e.loaderTemplate||e._loaderTemplate)}}function B6e(t,n){t&1&&Oi(0)}function z6e(t,n){if(t&1&&(Mi(0),le(1,B6e,1,0,"ng-container",30),Ri()),t&2){V();let e=un(9),i=V();L(),B("ngTemplateOutlet",e)("ngTemplateOutletContext",kr(3,ife,i.visibleOptions(),Is(2,X5e)))}}function V6e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(2).$implicit,i=V(3);L(),Di(i.getOptionGroupLabel(e.optionGroup))}}function U6e(t,n){t&1&&Oi(0)}function H6e(t,n){if(t&1&&(Mi(0),K(1,"li",47),le(2,V6e,2,1,"span",18)(3,U6e,1,0,"ng-container",30),Z(),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),Ge(a.cx("optionGroup")),B("ngStyle",rn(7,tR,r.itemSize+"px")),Xe("id",a.id+"_"+a.getOptionIndex(o,r)),L(),B("ngIf",!a.groupTemplate&&!a._groupTemplate),L(),B("ngTemplateOutlet",a.groupTemplate||a._groupTemplate)("ngTemplateOutletContext",rn(9,NW,i.optionGroup))}}function j6e(t,n){if(t&1){let e=Bt();Mi(0),K(1,"p-selectItem",48),Qe("onClick",function(o){Ee(e);let r=V().$implicit,a=V(3);return Ae(a.onOptionSelect(o,r))})("onMouseEnter",function(o){Ee(e);let r=V().index,a=V().options,p=V(2);return Ae(p.onOptionMouseEnter(o,p.getOptionIndex(r,a)))}),Z(),Ri()}if(t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),B("id",a.id+"_"+a.getOptionIndex(o,r))("option",i)("checkmark",a.checkmark)("selected",a.isSelected(i))("label",a.getOptionLabel(i))("disabled",a.isOptionDisabled(i))("template",a.itemTemplate||a._itemTemplate)("focused",a.focusedOptionIndex()===a.getOptionIndex(o,r)),ul("ariaPosInset",a.getAriaPosInset(a.getOptionIndex(o,r)))("ariaSetSize",a.ariaSetSize)}}function G6e(t,n){if(t&1&&le(0,H6e,4,11,"ng-container",18)(1,j6e,2,10,"ng-container",18),t&2){let e=n.$implicit,i=V(3);B("ngIf",i.isOptionGroup(e)),L(),B("ngIf",!i.isOptionGroup(e))}}function $6e(t,n){if(t&1&&Ce(0),t&2){let e=V(4);qn(" ",e.emptyFilterMessageLabel," ")}}function q6e(t,n){t&1&&Oi(0,null,14)}function W6e(t,n){if(t&1&&le(0,q6e,2,0,"ng-container",31),t&2){let e=V(4);B("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyTemplate)}}function K6e(t,n){if(t&1&&(K(0,"li",47),Lt(1,$6e,1,1)(2,W6e,1,1,"ng-container"),Z()),t&2){let e=V().options,i=V(2);Ge(i.cx("emptyMessage")),B("ngStyle",rn(4,tR,e.itemSize+"px")),L(),Ft(!i.emptyFilterTemplate&&!i._emptyFilterTemplate&&!i.emptyTemplate?1:2)}}function Z6e(t,n){if(t&1&&Ce(0),t&2){let e=V(4);qn(" ",e.emptyFilterMessageLabel||e.emptyMessageLabel," ")}}function Y6e(t,n){t&1&&Oi(0,null,15)}function Q6e(t,n){if(t&1&&le(0,Y6e,2,0,"ng-container",31),t&2){let e=V(4);B("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function X6e(t,n){if(t&1&&(K(0,"li",47),Lt(1,Z6e,1,1)(2,Q6e,1,1,"ng-container"),Z()),t&2){let e=V().options,i=V(2);Ge(i.cx("emptyMessage")),B("ngStyle",rn(4,tR,e.itemSize+"px")),L(),Ft(!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function J6e(t,n){if(t&1&&(K(0,"ul",44,13),le(2,G6e,2,2,"ng-template",45)(3,K6e,3,6,"li",46)(4,X6e,3,6,"li",46),Z()),t&2){let e=n.$implicit,i=n.options,o=V(2);Gr(i.contentStyle),Ge(o.cn(o.cx("list"),i.contentStyleClass)),Xe("id",o.id+"_list")("aria-label",o.listLabel),L(2),B("ngForOf",e),L(),B("ngIf",o.filterValue&&o.isEmpty()),L(),B("ngIf",!o.filterValue&&o.isEmpty())}}function eUe(t,n){t&1&&Oi(0)}function tUe(t,n){if(t&1){let e=Bt();K(0,"div",37)(1,"span",38,6),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onFirstHiddenFocus(o))}),Z(),le(3,w6e,1,0,"ng-container",31)(4,M6e,4,4,"div",27),K(5,"div"),le(6,N6e,5,10,"p-scroller",39)(7,z6e,2,6,"ng-container",18)(8,J6e,5,9,"ng-template",null,7,Hi),Z(),le(10,eUe,1,0,"ng-container",31),K(11,"span",38,8),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onLastHiddenFocus(o))}),Z()()}if(t&2){let e=V();Ge(e.cn(e.cx("overlay"),e.panelStyleClass)),B("ngStyle",e.panelStyle),L(),Xe("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),L(2),B("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),L(),B("ngIf",e.filter),L(),Ge(e.cx("listContainer")),zr("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),L(),B("ngIf",e.virtualScroll),L(),B("ngIf",!e.virtualScroll),L(3),B("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),L(),Xe("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var iUe=` ${Xme} /* 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'); } `,nUe={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"},qz=(()=>{class t extends to{name="select";theme=iUe;classes=nUe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var oUe={provide:Wa,useExisting:Br(()=>bg),multi:!0},rUe=(()=>{class t extends Ao{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new yt;onMouseEnter=new yt;_componentStyle=re(qz);onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-selectItem"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",lt],focused:[2,"focused","focused",lt],label:"label",disabled:[2,"disabled","disabled",lt],visible:[2,"visible","visible",lt],itemSize:[2,"itemSize","itemSize",wn],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",lt]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[Pi([qz]),Rt],decls:4,vars:19,consts:[["role","option","pRipple","",3,"click","mouseenter","id","ngStyle"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","check",3,"class",4,"ngIf"],["data-p-icon","blank",3,"class",4,"ngIf"],["data-p-icon","check"],["data-p-icon","blank"]],template:function(i,o){i&1&&(K(0,"li",0),Qe("click",function(a){return o.onOptionClick(a)})("mouseenter",function(a){return o.onOptionMouseEnter(a)}),le(1,E5e,3,2,"ng-container",1)(2,A5e,2,1,"span",1)(3,D5e,1,0,"ng-container",2),Z()),i&2&&(Ge(o.cx("option")),B("id",o.id)("ngStyle",rn(15,tR,o.itemSize+"px")),Xe("aria-label",o.label)("aria-setsize",o.ariaSetSize)("aria-posinset",o.ariaPosInset)("aria-selected",o.selected)("data-p-focused",o.focused)("data-p-highlight",o.selected)("data-p-disabled",o.disabled),L(),B("ngIf",o.checkmark),L(),B("ngIf",!o.template),L(),B("ngTemplateOutlet",o.template)("ngTemplateOutletContext",rn(17,NW,o.option)))},dependencies:[po,Zr,Vo,fs,kn,Yl,AT,pme],encapsulation:2})}return t})(),bg=(()=>{class t extends Fv{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){YM(e,this._options())||this._options.set(e)}appendTo=Wn(void 0);onChange=new yt;onFilter=new yt;onFocus=new yt;onBlur=new yt;onClick=new yt;onShow=new yt;onHide=new yt;onClear=new yt;onLazyLoad=new yt;_componentStyle=re(qz);filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;itemsWrapper;$appendTo=Do(()=>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=Jn(null);_placeholder=Jn(void 0);value;hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=Jn(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=Jn(-1);labelId;listId;clicked=Jn(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ts.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ts.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.$disabled()}get listLabel(){return this.config.getTranslation(Ts.ARIA).listLabel}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=Do(()=>{let e=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let o=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(r=>r.label?r.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:r.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue().trim(),this.filterMatchMode,this.filterLocale);if(this.group){let r=this.options||[],a=[];return r.forEach(p=>{let x=this.getOptionGroupChildren(p).filter(I=>o.includes(I));x.length>0&&a.push(gt(ve({},p),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...x]}))}),this.flatOptions(a)}return o}return e});label=Do(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),i=e.findIndex(o=>this.isOptionValueEqualsModelValue(o));return i!==-1?this.getOptionLabel(e[i]):this.placeholder()||"p-emptylabel"});selectedOption;constructor(e,i){super(),this.zone=e,this.filterService=i,Gl(()=>{let o=this.modelValue(),r=this.visibleOptions();if(r&&er(r)){let a=this.findSelectedOptionIndex();(a!==-1||o===void 0||typeof o=="string"&&o.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=r[a])}Ud(r)&&(o===void 0||this.isModelValueNotSet())&&er(this.selectedOption)&&(this.selectedOption=null),o!==void 0&&this.editable&&this.updateEditableLabel(),this.cd.markForCheck()})}isModelValueNotSet(){return this.modelValue()===null&&!this.isOptionValueEqualsModelValue(this.selectedOption)}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}ngOnInit(){super.ngOnInit(),this.id=this.id||tr("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&&khe(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let a=this.getOptionGroupChildren(o);return a&&a.forEach(p=>i.push(p)),i},[])}autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1))}onOptionSelect(e,i,o=!0,r=!1){if(!this.isSelected(i)){let a=this.getOptionValue(i);this.updateModel(a,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),r===!1&&this.onChange.emit({originalEvent:e,value:a})}o&&this.hide(!0)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}updateModel(e,i){this.value=e,this.onModelChange(e),this.writeModelValue(e),this.selectedOptionUpdated=!0}allowModelChange(){return!!this.modelValue()&&!this.placeholder()&&(this.modelValue()===void 0||this.modelValue()===null)&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isOptionValueEqualsModelValue(e)}isOptionValueEqualsModelValue(e){return this.isValidOption(e)&&vl(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){super.ngAfterViewInit(),this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){let e=this.el.nativeElement.parentElement,i=e?.classList.contains("p-float-label");if(e&&i&&!this.selectedOption){let o=e.querySelector("label");o&&this._placeholder.set(o.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?wa(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?wa(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isSelectedOptionEmpty(){return Ud(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?wa(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?wa(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?wa(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}onContainerClick(e){this.$disabled()||this.readonly||this.loading||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.clicked.set(!0),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let i=e.target.value;this.searchValue="",!this.searchOptions(e,i)&&this.focusedOptionIndex.set(-1),this.onModelChange(i),this.updateModel(i||null,e),setTimeout(()=>{this.onChange.emit({originalEvent:e,value:i})},1),!this.overlayVisible&&er(i)&&this.show()}show(e){this.overlayVisible=!0,this.focusedOptionIndex.set(this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex()),e&&cs(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 i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=$r(this.itemsWrapper,".p-select-option.p-select-option-selected");i&&i.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&!this.editable&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.clicked.set(!1),this.searchValue="",this.overlayOptions?.mode==="modal"&&ET(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&cs(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&cs(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.$disabled())return;this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),!this.preventModelTouched&&!this.overlayVisible&&this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,i=!1){if(!(this.$disabled()||this.readonly||this.loading)){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,i);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&CT(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked.set(!1)}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,!0);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,i)}e.preventDefault(),e.stopPropagation()}changeFocusedOptionIndex(e,i){if(this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus)){let o=this.visibleOptions()[i];this.onOptionSelect(e,o,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=$r(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?ap(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}findLastOptionIndex(){return ap(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,i=!1){if(e.altKey&&!i){if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}this.overlayVisible&&this.hide()}else{let o=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show()}e.preventDefault(),e.stopPropagation()}onArrowLeftKey(e,i=!1){i&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,i=!1){if(i){let o=e.currentTarget;e.shiftKey?o.setSelectionRange(0,o.value.length):(o.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,i=!1){if(i){let o=e.currentTarget;if(e.shiftKey)o.setSelectionRange(0,o.value.length);else{let r=o.value.length;o.setSelectionRange(r,r),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,i=!1){!this.editable&&!i&&this.onEnterKey(e)}onEnterKey(e,i=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}!i&&this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()}onTabKey(e,i=!1){if(!i)if(this.overlayVisible&&this.hasFocusableElements())cs(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let o=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,o)}this.overlayVisible&&this.hide(this.filter)}e.stopPropagation()}onFirstHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?vT(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;cs(i)}onLastHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?bT(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;cs(i)}hasFocusableElements(){return c0(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,i=!1){i&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return o=this.visibleOptions().findIndex(a=>this.isOptionMatched(a)),o!==-1&&(r=!0),o===-1&&this.focusedOptionIndex()===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&setTimeout(()=>{this.changeFocusedOptionIndex(e,o)}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(e){let i=e.target.value;this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()}),this.cd.markForCheck()}applyFocus(){this.editable?$r(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():cs(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onModelTouched(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}writeControlValue(e,i){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),i(this.value),this.updateEditableLabel(),this.cd.markForCheck()}static \u0275fac=function(i){return new(i||t)(rt(on),rt(wT))};static \u0275cmp=Le({type:t,selectors:[["p-select"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,k5e,4),Ht(r,M5e,4),Ht(r,R5e,4),Ht(r,O5e,4),Ht(r,P5e,4),Ht(r,Jme,4),Ht(r,L5e,4),Ht(r,F5e,4),Ht(r,N5e,4),Ht(r,B5e,4),Ht(r,z5e,4),Ht(r,V5e,4),Ht(r,U5e,4),Ht(r,H5e,4),Ht(r,j5e,4),Ht(r,G5e,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.groupTemplate=a.first),Je(a=et())&&(o.loaderTemplate=a.first),Je(a=et())&&(o.selectedItemTemplate=a.first),Je(a=et())&&(o.headerTemplate=a.first),Je(a=et())&&(o.filterTemplate=a.first),Je(a=et())&&(o.footerTemplate=a.first),Je(a=et())&&(o.emptyFilterTemplate=a.first),Je(a=et())&&(o.emptyTemplate=a.first),Je(a=et())&&(o.dropdownIconTemplate=a.first),Je(a=et())&&(o.loadingIconTemplate=a.first),Je(a=et())&&(o.clearIconTemplate=a.first),Je(a=et())&&(o.filterIconTemplate=a.first),Je(a=et())&&(o.onIconTemplate=a.first),Je(a=et())&&(o.offIconTemplate=a.first),Je(a=et())&&(o.cancelIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(Jme,5),Qi($5e,5),Qi(q5e,5),Qi(W5e,5),Qi(K5e,5),Qi(Z5e,5),Qi(Y5e,5),Qi(Q5e,5)),i&2){let r;Je(r=et())&&(o.filterViewChild=r.first),Je(r=et())&&(o.focusInputViewChild=r.first),Je(r=et())&&(o.editableInputViewChild=r.first),Je(r=et())&&(o.itemsViewChild=r.first),Je(r=et())&&(o.scroller=r.first),Je(r=et())&&(o.overlayViewChild=r.first),Je(r=et())&&(o.firstHiddenFocusableElementOnOverlay=r.first),Je(r=et())&&(o.lastHiddenFocusableElementOnOverlay=r.first)}},hostVars:3,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onContainerClick(a)}),i&2&&(Xe("id",o.id),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{id:"id",scrollHeight:"scrollHeight",filter:[2,"filter","filter",lt],panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:[2,"readonly","readonly",lt],editable:[2,"editable","editable",lt],tabindex:[2,"tabindex","tabindex",wn],placeholder:"placeholder",loadingIcon:"loadingIcon",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:[2,"autofocus","autofocus",lt],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",lt],checkmark:[2,"checkmark","checkmark",lt],dropdownIcon:"dropdownIcon",loading:[2,"loading","loading",lt],optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",group:[2,"group","group",lt],showClear:[2,"showClear","showClear",lt],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:[2,"lazy","lazy",lt],virtualScroll:[2,"virtualScroll","virtualScroll",lt],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",wn],virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:[2,"focusOnHover","focusOnHover",lt],selectOnFocus:[2,"selectOnFocus","selectOnFocus",lt],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",lt],autofocusFilter:[2,"autofocusFilter","autofocusFilter",lt],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:[Pi([oUe,qz]),Rt],decls:11,vars:14,consts:[["elseBlock",""],["overlay",""],["content",""],["focusInput",""],["defaultPlaceholder",""],["editableInput",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["filter",""],["scroller",""],["loader",""],["items",""],["emptyFilter",""],["empty",""],["role","combobox",3,"class","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus","focus","blur","keydown",4,"ngIf"],["type","text",3,"class","pAutoFocus","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo"],["role","combobox",3,"focus","blur","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text",3,"input","keydown","focus","blur","pAutoFocus"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],[3,"class",4,"ngIf"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],["data-p-icon","chevron-down"],[3,"ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["pInputText","","type","text","role","searchbox","autocomplete","off",3,"input","keydown","blur","pSize","value","variant"],["data-p-icon","search",4,"ngIf"],["data-p-icon","search"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","checkmark","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize"]],template:function(i,o){if(i&1){let r=Bt();le(0,n6e,6,22,"span",16)(1,o6e,2,18,"input",17)(2,c6e,3,2,"ng-container",18),K(3,"div",19),le(4,f6e,3,2,"ng-container",20)(5,C6e,2,2,"ng-template",null,0,Hi),Z(),K(7,"p-overlay",21,1),wm("visibleChange",function(p){return Ee(r),ng(o.overlayVisible,p)||(o.overlayVisible=p),Ae(p)}),Qe("onAnimationStart",function(p){return Ee(r),Ae(o.onOverlayAnimationStart(p))})("onHide",function(){return Ee(r),Ae(o.hide())}),le(9,tUe,13,18,"ng-template",null,2,Hi),Z()}if(i&2){let r=un(6);B("ngIf",!o.editable),L(),B("ngIf",o.editable),L(),B("ngIf",o.isVisibleClearIcon),L(),Ge(o.cx("dropdown")),Xe("aria-expanded",o.overlayVisible??!1)("data-pc-section","trigger"),L(),B("ngIf",o.loading)("ngIfElse",r),L(3),B("hostAttrSelector",o.attrSelector),Cm("visible",o.overlayVisible),B("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())}},dependencies:[po,Rl,Zr,Vo,fs,rUe,kT,Bv,cp,xd,Nv,Vz,yg,Gz,$z,h0,kn],encapsulation:2,changeDetection:0})}return t})(),nfe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[bg,kn,kn]})}return t})();var ofe=gt(ve({},$M),{formFieldAppearance:"fill"});var iR=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({providers:[{provide:$M,useValue:ofe},{provide:kv,useClass:_he}]})}}return t})();var i$t=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({imports:[iR,iR]})}}return t})();var sUe=["*",[["mat-toolbar-row"]]],aUe=["*","mat-toolbar-row"],lUe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]})}return t})(),MT=(()=>{class t{_elementRef=re(_n);_platform=re(gs);_document=re(zn);color;_toolbarRows;constructor(){}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){this._toolbarRows.length}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-toolbar"]],contentQueries:function(i,o,r){if(i&1&&Ht(r,lUe,5),i&2){let a;Je(a=et())&&(o._toolbarRows=a)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(i,o){i&2&&(Ge(o.color?"mat-"+o.color:""),fo("mat-toolbar-multiple-rows",o._toolbarRows.length>0)("mat-toolbar-single-row",o._toolbarRows.length===0))},inputs:{color:"color"},exportAs:["matToolbar"],ngContentSelectors:aUe,decls:2,vars:0,template:function(i,o){i&1&&(eo(sUe),yn(0),yn(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 zv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Xo]})}return t})();var cUe=["*"],dUe=(t,n)=>({"bd-primary":t,"bd-primary-text":n}),Mu=(()=>{class t extends qs{constructor(e){super(),this._breakpointObserver=e,this.layout="bar";let i=this._breakpointObserver.observe([_d.Small,_d.XSmall]).pipe(Fp((o,r)=>o.matches===r.matches)).subscribe(o=>{this.layout=o.matches?"line":"bar"});this._subs.push(i)}ngOnDestroy(){this.unsubscribeAll()}static{this.\u0275fac=function(i){return new(i||t)(rt(Eu))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-toolbar"]],features:[Rt],ngContentSelectors:cUe,decls:2,vars:4,consts:[[3,"ngClass"]],template:function(i,o){i&1&&(eo(),K(0,"mat-toolbar",0),yn(1),Z()),i&2&&B("ngClass",kr(1,dUe,o.layout==="bar",o.layout==="line"))},dependencies:[MT,Rs],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 xg=class{constructor(n){this._environmentService=n}codingSystem(n){return`${this._codingSystemUrl(n)}/`}children(n){return`${`${this._codingSystemUrl(n)}/`}children/`}codeGroup(n){let e=this._environmentService.load("AYS_CODE_URL");return n==="G-DRG"?`${e}/${n}/mdc-groups/`:n==="ICD-10-GM"||n==="ICD-10-AT"?`${e}/${n}/chapters/`:`${e}/${n}/groups/`}codeByCodeName(n,e){return`${this._codingSystemUrl(n)}/${e}`}codeAgeGroupDistribution(n,e){return`${this._codingSystemUrl(n)}/${e}/cases/agm-id/distribution`}codePrevalence(n,e){return`${this._codingSystemUrl(n)}/${e}/cases/prevalence`}treeParent(n,e){return`${this._codingSystemUrl(n)}/tree/${e}`}treeChildren(n){return`${this._codingSystemUrl(n)}/tree/children`}_codingSystemUrl(n){return`${this._environmentService.load("AYS_CODE_URL")}/${n}`}};var uUe=["mainDiagnosis","secondaryDiagnosis","skCode"],pUe=["opsCode","mainProcedure"],hUe=["mainDiagnosis","secondaryDiagnosis"],mUe=["mainDiagnosis","secondaryDiagnosis"],fUe=["opcs","mainProcedure"],gUe=["procedure"];var aqt={"ICD-10-GM":uUe.map(t=>t),"ICD-10-AT":hUe.map(t=>t),"ICD-10-UK":mUe.map(t=>t),OPS:pUe.map(t=>t),"OPCS-4":fUe.map(t=>t),"PROCEDURE-AT":gUe.map(t=>t),"G-DRG":[]};var Ws=class t{static validateCodeName(n,e){let i;switch(e){case"OPS":i=!!n.match(/^[0-9]-\S{2,3}(\.\S{1,2})?$/);break;case"ICD-10-GM":case"ICD-10-AT":i=!!n.match(/^[A-Z]\d{2}(\.\d{1,2})?(\+)?$/);break;case"G-DRG":i=!!n.match(/^[0-9A-Z][0-9][0-9][A-Z]$/);break;default:i=!0}return i}static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.year)}constructor(n,e,i,o,r){this.name=n,this.description=e,this.codingSystem=i,this.hierarchyElementType=o,this.year=r}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year)}numberOfDigits(){switch(this.hierarchyElementType){case"chapter":return 1;case"block":return;case"specific":switch(this.codingSystem){case"G-DRG":return 3;case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":return this._cleanName(this.name).length;case"OPS":return this._cleanName(this.name).length;default:return}}}toJSON(){return{name:this.name,codingSystem:this.codingSystem,hierarchyElementType:this.hierarchyElementType,year:this.year}}_cleanName(n){let e=new RegExp("[-+.!*]");return n.match(e)?this._cleanName(n.replace(e,"")):n}};var BW={MEDICAL_SERVICE:"#e6194b",NURSING_SERVICE:"#3cb44b",MEDTECH_SERVICE:"#4363d8",DRUGS_OVERHEAD:"#911eb4",DRUGS_SINGLE:"#f032e6",IMPLANTS:"#fabebe",MEDICAL_SUPPLIES_OVERHEAD:"#e6beff",MEDICAL_SUPPLIES_SINGLE:"#9a6324",MEDICAL_SUPPLIES_EXTERNAL:"#800000",INFRASTRUCTURE_MEDICAL:"#808000",INFRASTRUCTURE_NON_MEDICAL:"#000075"};var sfe=["NORMAL_WARD_01","INTENSIVE_CARE_UNIT_02","DIALYSIS_DEPARTMENT_03","SURGERY_DEPARTMENT_04","ANAESTHESIA_DEPARTMENT_05","LABOR_WARD_06","CARDIOLOGY_07","ENDOSCOPY_08","RADIOLOGY_09","LABORATORIES_10","DIAGNOSTICS_11","THERAPEUTIC_12","PATIENT_ADMISSION_13"],RT={NORMAL_WARD_01:"1. Normalstation",INTENSIVE_CARE_UNIT_02:"2. Intensivstation",DIALYSIS_DEPARTMENT_03:"3. Dialyseabteilung",SURGERY_DEPARTMENT_04:"4. OP-Bereich",ANAESTHESIA_DEPARTMENT_05:"5. An\xE4sthesie",LABOR_WARD_06:"6. Krei\xDFsaal",CARDIOLOGY_07:"7. Kardiologische Diagnostik / Therapie",ENDOSCOPY_08:"8. Endoskopische Diagnostik / Therapie",RADIOLOGY_09:"9. Radiologie",LABORATORIES_10:"10. Laboratorien",DIAGNOSTICS_11:"11.Diagnostische Bereiche",THERAPEUTIC_12:"12 Therapeutische Verfahren",PATIENT_ADMISSION_13:"13. Patientenaufnahme"},zW={NORMAL_WARD_01:"#e6194b",INTENSIVE_CARE_UNIT_02:"#fffac8",DIALYSIS_DEPARTMENT_03:"#ffe119",SURGERY_DEPARTMENT_04:"#aaffc3",ANAESTHESIA_DEPARTMENT_05:"#f58231",CARDIOLOGY_07:"#ffd8b1",ENDOSCOPY_08:"#46f0f0",RADIOLOGY_09:"#808080",LABORATORIES_10:"#bcf60c",DIAGNOSTICS_11:"#008080",THERAPEUTIC_12:"#808000",PATIENT_ADMISSION_13:"#3cb44b"};var Zp=["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 afe={MEDICAL_SERVICE:"Personalkosten \xC4rztlicher Dienst",NURSING_SERVICE:"Personalkosten Pflegedienst",MEDTECH_SERVICE:"Personalkosten Med. tech. Dienst",DRUGS_OVERHEAD:"Arzneimittel Gemeinkosten",DRUGS_SINGLE:"Arzneimittel Einzelkosten",IMPLANTS:"Implantate / Transplantate",MEDICAL_SUPPLIES_OVERHEAD:"Med. Bedarf Gemeinkosten",MEDICAL_SUPPLIES_SINGLE:"Med. Bedarf Einzelkosten",MEDICAL_SUPPLIES_EXTERNAL:"Med. Bedarf Ext. Behandlungsleistunge",INFRASTRUCTURE_MEDICAL:"Infrastruktur med.",INFRASTRUCTURE_NON_MEDICAL:"Infrastruktur nicht med."};var lfe=[2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025],dp=2025;var R1=class t{constructor(n){this.data=n,this.departments=Object.keys(this.data),this._calculateDepartmentSums(),this._calculateSectionSums(),this._calculateTopSectionSums(),this._calculateTotal()}isEmpty(){return Object.keys(this.data).length===0}clone(){return new t(JSON.parse(JSON.stringify(this.data)))}_calculateDepartmentSums(){let n={};this.departments.forEach(e=>{let i=Object.keys(this.data[e]),o=0;this.data[e]&&i.forEach(r=>{this.data[e][r]&&(o=o+this.data[e][r])}),n[e]=o}),this.departmentSums=n}_calculateTopSectionSums(){let n=this.sectionSums.MEDICAL_SERVICE+this.sectionSums.MEDTECH_SERVICE+this.sectionSums.NURSING_SERVICE,e=this.sectionSums.DRUGS_OVERHEAD+this.sectionSums.DRUGS_SINGLE,i=this.sectionSums.IMPLANTS,o=this.sectionSums.MEDICAL_SUPPLIES_OVERHEAD+this.sectionSums.MEDICAL_SUPPLIES_SINGLE+this.sectionSums.MEDICAL_SUPPLIES_EXTERNAL,r=this.sectionSums.INFRASTRUCTURE_MEDICAL+this.sectionSums.INFRASTRUCTURE_NON_MEDICAL,a={STAFF:n,DRUGS:e,IMPLANTS:i,MEDICAL_SUPPLIES:o,INFRASTRUCTURE:r};this.topSectionSums=a}_calculateSectionSums(){let n={};Zp.forEach(e=>{let i=0;this.departments.forEach(o=>{i=i+this.data[o][e]}),n[e]=i}),this.sectionSums=n}_calculateTotal(){let n=(e,i)=>e+this.departmentSums[i];this.total=this.departments.reduce(n,0)}};var OT=class t extends Ws{static fromObject(n){let e=[],i=[],o=null;return n.mainDiagnoses&&(e=n.mainDiagnoses.map(r=>({code:Ws.fromObject(r.code),percentage:r.percentage}))),n.procedures&&(i=n.procedures.map(r=>({code:Ws.fromObject(r.code),percentage:r.percentage}))),n.costTable&&(o=new R1(n.costTable)),new t(n.name,n.description,n.year,n.mainDepartment,e,i,o)}constructor(n,e,i,o,r,a,p){super(n,e,"G-DRG","specific",i),this.mainDepartment=o,this.mainDiagnoses=r,this.procedures=a,this.costTable=p}clone(){return new t(this.name,this.description,this.year,this.mainDepartment?JSON.parse(JSON.stringify(this.mainDepartment)):void 0,this.mainDiagnoses?[...this.mainDiagnoses.map(n=>({code:n.code.clone(),percentage:n.percentage}))]:void 0,this.procedures?[...this.procedures.map(n=>({code:n.code.clone(),percentage:n.percentage}))]:void 0,this.costTable?this.costTable.clone():void 0)}},Wz=class{constructor(n){this.timeSeries=n}};var Kz=class t extends Ws{static fromObject(n){return new t(n.name,n.description,n.year,n.content,n.ansteckend,n.ebmlabor,n.rare,n.age,n.agereject,n.morbodity,n.mortalities,n.paragraph295,n.paragraph301,n.sexcode,n.sexreject)}constructor(n,e,i,o,r,a,p,f,x,I,D,P,R,j,$){super(n,e,"ICD-10-GM","specific",i),this.content=o,this.ansteckend=r,this.ebmlabor=a,this.rare=p,this.age=f,this.agereject=x,this.morbodity=I,this.mortalities=D,this.paragraph295=P,this.paragraph301=R,this.sexcode=j,this.sexreject=$}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 Gm=class{static summary(n,e){if(e.length===0)return`Alle ${n} Kapitel`;function i(a){switch(a.hierarchyElementType){case"chapter":return"Kapitel";case"block":return"Gruppe";default:return""}}function o(a){switch(a.hierarchyElementType){case"chapter":return 3;case"block":return 2;default:return 1}}if(e.length===1)return`${i(e[0])} ${e[0].name}`;let r=e.sort((a,p)=>o(p)-o(a))[0];return`${i(r)} ${r.name} + ${e.length-1} weitere`}static fromObject(n){let e;switch(n.hierarchyElementType){case"chapter":case"block":e=Vv.fromObject(n);break;case"specific":switch(n.codingSystem){case"G-DRG":{e=OT.fromObject(n);break}case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":e=Kz.fromObject(n);break;default:e=Ws.fromObject(n)}}return e}};var Vv=class t extends Ws{static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.shortName,n.longName,n.start?Gm.fromObject(n.start):void 0,n.end?Gm.fromObject(n.end):void 0)}constructor(n,e,i,o,r,a,p,f){super(n,e,i,o),this.shortName=r,this.longName=a,this.chapterStart=p,this.chapterEnd=f}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 Zz=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new xg(this._environmentService)}mainDepartmentTimeSeries(e,i=new Mr){let o=`${this._store.codeByCodeName("G-DRG",e)}/main-departments/timeseries`;return this._httpClient.get(o,{params:i}).pipe(vi(r=>new Wz(r)))}proceedsTable(e,i,o=new Mr){let r=`${this._store.codeByCodeName("G-DRG",e)}/proceeds-table`,a={baseRate:i.value};return this._httpClient.post(r,a,{params:o}).pipe(vi(p=>new R1(p)))}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cfe={numberFormat:"1.2-2",showZeroRows:!1,valueCellOptions:{fontColor:t=>t!==0?"rgba(0, 0, 0, 0.87)":"rgba(0, 0, 0, 0.54)",backgroundColor:()=>"transparent"},partialSumCellOptions:{fontColor:()=>"#4CAF50",backgroundColor:()=>"transparent"},totalSumCellOptions:{fontColor:()=>"#4CAF50",backgroundColor:()=>"transparent"}};var ko=class{static equals(n,e,i=(o,r)=>o===r){return n===void 0&&e===void 0||n===null&&e===null?!0:typeof n=="boolean"?n===e:n&&e?i(n,e):!1}};var Cg=class t{constructor(n,e,i,o,r,a=void 0,p=(x,I)=>x===I,f=x=>JSON.parse(JSON.stringify(x))){this.tileId=n,this.propertyKey=e,this.value=i,this.overrideValue=o,this.deleteState=r,this.dependencyVirtualClinicId=a,this.equalsFn=p,this._cloneFn=f}clone(){return new t(this.tileId,this.propertyKey,this.value?this._cloneFn(this.value):this.value,this.overrideValue?this._cloneFn(this.overrideValue):this.overrideValue,this.deleteState,this.dependencyVirtualClinicId,this.equalsFn,this._cloneFn)}equals(n){return ko.equals(this.tileId,n.tileId)&&ko.equals(this.propertyKey,n.propertyKey)&&ko.equals(this.value,n.value,(e,i)=>this.equalsFn(e,i))}},wg=class{static overrideProperty(n,e,i,o){if(!i)return o(n)??null;let r=i.find(a=>ko.equals(e,a.propertyKey)&&ko.equals(n,a.value,(p,f)=>a.equalsFn(p,f)));return r?r.deleteState==="should-be-deleted"?null:o(r.overrideValue):o(n)??null}static overrideProperties(n,e,i,o){return n.map(r=>this.overrideProperty(r,e,i,o)).filter(r=>!!r)}};var Uv=class{percentage(n,e,i){return(n-e)/(i-e)}};function Pc(t,n){_Ue(t)&&(t="100%");let e=yUe(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function nR(t){return Math.min(1,Math.max(0,t))}function _Ue(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function yUe(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Yz(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function oR(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Hv(t){return t.length===1?"0"+t:String(t)}function dfe(t,n,e){return{r:Pc(t,255)*255,g:Pc(n,255)*255,b:Pc(e,255)*255}}function UW(t,n,e){t=Pc(t,255),n=Pc(n,255),e=Pc(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,a=0,p=(i+o)/2;if(i===o)a=0,r=0;else{let f=i-o;switch(a=p>.5?f/(2-i-o):f/(i+o),i){case t:r=(n-e)/f+(n1&&(e-=1),e<1/6?t+(n-t)*(6*e):e<1/2?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function ufe(t,n,e){let i,o,r;if(t=Pc(t,360),n=Pc(n,100),e=Pc(e,100),n===0)o=e,r=e,i=e;else{let a=e<.5?e*(1+n):e+n-e*n,p=2*e-a;i=VW(p,a,t+1/3),o=VW(p,a,t),r=VW(p,a,t-1/3)}return{r:i*255,g:o*255,b:r*255}}function HW(t,n,e){t=Pc(t,255),n=Pc(n,255),e=Pc(e,255);let i=Math.max(t,n,e),o=Math.min(t,n,e),r=0,a=i,p=i-o,f=i===0?0:p/i;if(i===o)r=0;else{switch(i){case t:r=(n-e)/p+(n>16,g:(t&65280)>>8,b:t&255}}var rR={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 gfe(t){let n={r:0,g:0,b:0},e=1,i=null,o=null,r=null,a=!1,p=!1;return typeof t=="string"&&(t=CUe(t)),typeof t=="object"&&(Yp(t.r)&&Yp(t.g)&&Yp(t.b)?(n=dfe(t.r,t.g,t.b),a=!0,p=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Yp(t.h)&&Yp(t.s)&&Yp(t.v)?(i=oR(t.s),o=oR(t.v),n=pfe(t.h,i,o),a=!0,p="hsv"):Yp(t.h)&&Yp(t.s)&&Yp(t.l)?(i=oR(t.s),r=oR(t.l),n=ufe(t.h,i,r),a=!0,p="hsl"):Yp(t.c)&&Yp(t.m)&&Yp(t.y)&&Yp(t.k)&&(n=mfe(t.c,t.m,t.y,t.k),a=!0,p="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=Yz(e),{ok:a,format:t.format||p,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:e}}var bUe="[-\\+]?\\d+%?",xUe="[-\\+]?\\d*\\.\\d+%?",jv="(?:"+xUe+")|(?:"+bUe+")",qW="[\\s|\\(]+("+jv+")[,|\\s]+("+jv+")[,|\\s]+("+jv+")\\s*\\)?",Qz="[\\s|\\(]+("+jv+")[,|\\s]+("+jv+")[,|\\s]+("+jv+")[,|\\s]+("+jv+")\\s*\\)?",Bh={CSS_UNIT:new RegExp(jv),rgb:new RegExp("rgb"+qW),rgba:new RegExp("rgba"+Qz),hsl:new RegExp("hsl"+qW),hsla:new RegExp("hsla"+Qz),hsv:new RegExp("hsv"+qW),hsva:new RegExp("hsva"+Qz),cmyk:new RegExp("cmyk"+Qz),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 CUe(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let n=!1;if(rR[t])t=rR[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let e=Bh.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=Bh.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=Bh.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=Bh.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=Bh.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=Bh.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=Bh.cmyk.exec(t),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=Bh.hex8.exec(t),e?{r:up(e[1]),g:up(e[2]),b:up(e[3]),a:$W(e[4]),format:n?"name":"hex8"}:(e=Bh.hex6.exec(t),e?{r:up(e[1]),g:up(e[2]),b:up(e[3]),format:n?"name":"hex"}:(e=Bh.hex4.exec(t),e?{r:up(e[1]+e[1]),g:up(e[2]+e[2]),b:up(e[3]+e[3]),a:$W(e[4]+e[4]),format:n?"name":"hex8"}:(e=Bh.hex3.exec(t),e?{r:up(e[1]+e[1]),g:up(e[2]+e[2]),b:up(e[3]+e[3]),format:n?"name":"hex"}:!1))))))))))}function Yp(t){return typeof t=="number"?!Number.isNaN(t):Bh.CSS_UNIT.test(t)}var Us=class t{constructor(n="",e={}){if(n instanceof t)return n;typeof n=="number"&&(n=ffe(n)),this.originalInput=n;let i=gfe(n);this.originalInput=n,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=e.format??i.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3}getLuminance(){let n=this.toRgb(),e,i,o,r=n.r/255,a=n.g/255,p=n.b/255;return r<=.03928?e=r/12.92:e=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),p<=.03928?o=p/12.92:o=Math.pow((p+.055)/1.055,2.4),.2126*e+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(n){return this.a=Yz(n),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:n}=this.toHsl();return n===0}toHsv(){let n=HW(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}}toHsvString(){let n=HW(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?`hsv(${e}, ${i}%, ${o}%)`:`hsva(${e}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){let n=UW(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}}toHslString(){let n=UW(this.r,this.g,this.b),e=Math.round(n.h*360),i=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?`hsl(${e}, ${i}%, ${o}%)`:`hsla(${e}, ${i}%, ${o}%, ${this.roundA})`}toHex(n=!1){return jW(this.r,this.g,this.b,n)}toHexString(n=!1){return"#"+this.toHex(n)}toHex8(n=!1){return hfe(this.r,this.g,this.b,this.a,n)}toHex8String(n=!1){return"#"+this.toHex8(n)}toHexShortString(n=!1){return this.a===1?this.toHexString(n):this.toHex8String(n)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let n=Math.round(this.r),e=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${n}, ${e}, ${i})`:`rgba(${n}, ${e}, ${i}, ${this.roundA})`}toPercentageRgb(){let n=e=>`${Math.round(Pc(e,255)*100)}%`;return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}}toPercentageRgbString(){let n=e=>Math.round(Pc(e,255)*100);return this.a===1?`rgb(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%)`:`rgba(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%, ${this.roundA})`}toCmyk(){return ve({},GW(this.r,this.g,this.b))}toCmykString(){let{c:n,m:e,y:i,k:o}=GW(this.r,this.g,this.b);return`cmyk(${n}, ${e}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;let n="#"+jW(this.r,this.g,this.b,!1);for(let[e,i]of Object.entries(rR))if(n===i)return e;return!1}toString(n){let e=!!n;n=n??this.format;let i=!1,o=this.a<1&&this.a>=0;return!e&&o&&(n.startsWith("hex")||n==="name")?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),n==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new t(this.toString())}lighten(n=10){let e=this.toHsl();return e.l+=n/100,e.l=nR(e.l),new t(e)}brighten(n=10){let e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(n/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(n/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(n/100)))),new t(e)}darken(n=10){let e=this.toHsl();return e.l-=n/100,e.l=nR(e.l),new t(e)}tint(n=10){return this.mix("white",n)}shade(n=10){return this.mix("black",n)}desaturate(n=10){let e=this.toHsl();return e.s-=n/100,e.s=nR(e.s),new t(e)}saturate(n=10){let e=this.toHsl();return e.s+=n/100,e.s=nR(e.s),new t(e)}greyscale(){return this.desaturate(100)}spin(n){let e=this.toHsl(),i=(e.h+n)%360;return e.h=i<0?360+i:i,new t(e)}mix(n,e=50){let i=this.toRgb(),o=new t(n).toRgb(),r=e/100,a={r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a};return new t(a)}analogous(n=6,e=30){let i=this.toHsl(),o=360/e,r=[this];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,r.push(new t(i));return r}complement(){let n=this.toHsl();return n.h=(n.h+180)%360,new t(n)}monochromatic(n=6){let e=this.toHsv(),{h:i}=e,{s:o}=e,{v:r}=e,a=[],p=1/n;for(;n--;)a.push(new t({h:i,s:o,v:r})),r=(r+p)%1;return a}splitcomplement(){let n=this.toHsl(),{h:e}=n;return[this,new t({h:(e+72)%360,s:n.s,l:n.l}),new t({h:(e+216)%360,s:n.s,l:n.l})]}onBackground(n){let e=this.toRgb(),i=new t(n).toRgb(),o=e.a+i.a*(1-e.a);return new t({r:(e.r*e.a+i.r*i.a*(1-e.a))/o,g:(e.g*e.a+i.g*i.a*(1-e.a))/o,b:(e.b*e.a+i.b*i.a*(1-e.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(n){let e=this.toHsl(),{h:i}=e,o=[this],r=360/n;for(let a=1;a0){let r=this.good.toHsl(),a=1-this.good.toHsl().l,p=1-n/i;r.l=r.l+a*p,o=new Us(r)}else{let r=this.bad.toHsl(),a=this.bad.toHsl().l,p=1-n/e;r.l=r.l+a*p,o=new Us(r)}return o}};var WW={low:new Us("hsl(0, 100%, 50%)"),high:new Us("hsl(180, 100%, 50%)")},Sg=class t extends Uv{static fromObject(n){let e;return n.colorScheme&&(e={low:n.colorScheme.low?new Us(n.colorScheme.low):WW.low,high:n.colorScheme.high?new Us(n.colorScheme.high):WW.high}),new t(e)}constructor(n=WW){super(),this.colorScheme=n,this.type="scheme"}clone(){return new t({low:this.colorScheme.low.clone(),high:this.colorScheme.high.clone()})}toJSON(){return{type:this.type,colorScheme:{low:this.colorScheme.low.toHslString(),high:this.colorScheme.high.toHslString()}}}getColorForValue(n,e,i){let o;if(n===e)o=this.colorScheme.low;else if(n===i)o=this.colorScheme.high;else{let r=Math.round(this.percentage(n,e,i)*100);o=this.colorScheme.low.clone().mix(this.colorScheme.high.clone(),r)}return o}};var Hd=class{};var Xz=class{static process(n,e,i="..."){return n.length{class t{static{this.ILLEGAL_CHARACTERS_IN_SHEET_NAME=["[","]","/","\\","<",">","&",":","*"]}static{this.MAX_SHEET_NAME_LENGTH=31}static{this.DEFAULT_SHEET_NAME="Export"}static sanitizeSheetName(e,i=this.MAX_SHEET_NAME_LENGTH){return(!e||e.length===0)&&(e=this.DEFAULT_SHEET_NAME),e=Xz.process(e,i),this.ILLEGAL_CHARACTERS_IN_SHEET_NAME.forEach(o=>{e=e.replace(o," ")}),e}}return t})();var aR={minimumFractionDigits:0,maximumFractionDigits:2},pp=class{static convertAngularFormatString(n){if(!n.match(/[0-9].[0-9]-[0-9]/))throw new Error("Invalid format string.");let e=n.split(".")[1].split("-"),i=parseInt(e[0]),o=parseInt(e[1]);return{minimumFractionDigits:i,maximumFractionDigits:o}}static format(n,e=aR,i=navigator.languages){let o="";return!isNaN(n)&&n!=null&&(o=new Intl.NumberFormat(i,e).format(n)),o}};var yfe=(()=>{class t{static{this.DEFAULT_LOCALE="de-DE"}static getPreferredLocale(){let e=this.getLocales();return e&&e[0]?e[0]:this.DEFAULT_LOCALE}static getLocales(){let e=navigator.languages===void 0?[navigator.language]:navigator.languages;if(e)return e.map(i=>i.trim())}}return t})();var go=class t{static move(n,e,i){if(i>=n.length){let o=i-n.length+1;for(;o--;)n.push(void 0)}return n.splice(i,0,n.splice(e,1)[0]),n}static unique(n,e){return[...new Map(n.map(i=>[e(i),i])).values()]}static equals(n,e,i,o){let r;if(!n&&!e)r=!0;else if(!n||!e)r=!1;else{let a=o?n.slice().sort(o):n.slice().sort(),p=o?e.slice().sort(o):e.slice().sort();r=a.length===p.length&&a.every((f,x)=>{let I;return i?I=i(f,p[x]):I=f===p[x],I})}return r}static average(n){let e=null;return n&&n.length>0&&(e=n.reduce((i,o)=>i+o,0)/n.length),e}static sum(n){let e=null;return n&&n.length>0&&(e=n.reduce((i,o)=>i+o,0)),e}static median(n){return t.quartile(n,.5)}static quartile(n,e){if(n&&n.length>0){n.sort((p,f)=>p-f);let o=(n.length-1)*e,r=Math.floor(o),a=o-r;return n[r+1]!==void 0?n[r]+a*(n[r+1]-n[r]):n[r]}return null}static chunking(n,e){let i=0,o=n.length,r=[];for(i=0;i{let a=o.lastIndexOf("_"),p=r.lastIndexOf("_");return o.substr(a).localeCompare(r.substr(p))}).map(o=>{let r=[RT[o]].map(p=>({value:p,type:"string"})),a=Zp.map(p=>({value:this._inekTable.data[o][p],type:"number",format:{minimumFractionDigits:2}}));return r.concat(a).concat({value:this._inekTable.departmentSums[o],type:"number",format:{minimumFractionDigits:2}})}),e=[];e.push({value:"Summe",type:"string"});let i=Zp.map(o=>({value:this._inekTable.sectionSums[o],type:"number",format:{minimumFractionDigits:2}}));return e.push(...i),e.push({value:this._inekTable.total,type:"number",format:{minimumFractionDigits:2}}),n.push(e),n}_getFields(){return["","Personal \xE4rztlicher Dienst (\u20AC)","Personal Pflegedienst (\u20AC)","Personal Med. Tech. Dienst (\u20AC)","Arzneimittel Gemeinkosten (\u20AC)","Arzneimittel Einzelkosten (\u20AC)","Implantate / Transplantate (\u20AC)","Med. Bedarf Gemeinkosten (\u20AC)","Med. Bedarf Einzelkosten (\u20AC)","Med. Bedarf Ext. Behandlungsleistungen (\u20AC)","Infrastruktur med. (\u20AC)","Infrastruktur nicht med. (\u20AC)","Summe"]}};var PT=class{constructor(n,e){this._locale=n,this.filename=e}static _instanceOfNumberFormatOptions(n){return n?"localeMatcher"in n||"style"in n||"currency"in n||"currencyDisplay"in n||"currencySign"in n||"useGrouping"in n||"minimumIntegerDigits"in n||"minimumFractionDigits"in n||"maximumFractionDigits"in n||"minimumSignificantDigits"in n||"maximumSignificantDigits"in n:!1}static _instanceOfDateTimeFormatOptions(n){return n?"localeMatcher"in n||"weekday"in n||"era"in n||"year"in n||"month"in n||"day"in n||"hour"in n||"minute"in n||"second"in n||"timeZoneName"in n||"formatMatcher"in n||"hour12"in n||"timeZone"in n:!1}};var Bfe=fu(bfe(),1),zfe=fu(lR(),1);function cR(t){if(!t)throw new Error("`contentType` is required");var n=t.toLowerCase().replace(/.*\//,"");if(!n)throw new Error("Unsupported `contentType`: "+t);return n}function dR(t,n){var e=n.sheetId,i=n.sheetImages;return"sheet".concat(e,"-image").concat(i.indexOf(t)+1,".").concat(cR(t.contentType))}function uR(t,n){var e=n.attribute;return t=t.replace(wUe,"&").replace(SUe,">").replace(IUe,"<"),e&&(t=t.replace(TUe,"'").replace(EUe,""")),t}var wUe=/&/g,SUe=/>/g,IUe=/1&&arguments[1]!==void 0?arguments[1]:{},e=n.removeDiscouragedCharacters,i=e===void 0?!0:e;return t=t.replace(AUe,""),i&&(t=t.replace(DUe,"")),t}function uc(t){return uR(pR(t),{attribute:!0})}function XW(t){var n=t.sheets,e=t.stickyRowsCount,i=t.stickyColumnsCount;return''+(e||i?"":"")+""+n.map(function(o){var r=o.id,a=o.name;return'')}).join("")+""}function JW(t){var n=t.sheets;return''+n.map(function(e){var i=e.id;return'')}).join("")+'')+'')+""}var xfe='';function eK(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=kUe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kUe(t,n){if(t){if(typeof t=="string")return Cfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Cfe(t,n):void 0}}function Cfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e'+n.map(function(i){var o=i.id;return'')}).join("")+n.map(function(i){var o=i.id,r=i.images;return r?''):""}).join("")+''+MUe(e).map(function(i){var o=i.fileExtension,r=i.contentType;return'')}).join("")+""}function MUe(t){if(!t)return[];var n=[],e=function(R){var j=cR(R.contentType),$=n.find(function(W){return W.fileExtension===j});$||n.push({fileExtension:j,contentType:R.contentType})};if(Array.isArray(t[0]))for(var i=eK(t),o;!(o=i()).done;)for(var r=o.value,a=eK(r),p;!(p=a()).done;){var f=p.value;e(f)}else for(var x=eK(t),I;!(I=x()).done;){var D=I.value;e(D)}return n}function RUe(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=OUe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OUe(t,n){if(t){if(typeof t=="string")return wfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?wfe(t,n):void 0}}function wfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e',i=0,o=function(){var f=a.value,x=i+1,I=function(P){return LUe(P,f.dpi)};e+="",e+="",e+="".concat(f.anchor.column-1,""),e+="".concat(typeof f.offsetX=="number"?I(f.offsetX):0,""),e+="".concat(f.anchor.row-1,""),e+="".concat(typeof f.offsetY=="number"?I(f.offsetY):0,""),e+="",e+=''),e+="",e+="",e+=''),e+="",e+='',e+="",e+="",e+="",e+=''),e+="",e+="",e+="",e+="",e+="",e+='',e+="",e+="",e+="",e+="",e+="",e+="",i++},r=RUe(n),a;!(a=r()).done;)o();return e+="",e}var Sfe=96,PUe=96;function LUe(t,n){var e=Sfe;return Math.round(t*9525*(Sfe/e)*(PUe/n))}function nK(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.images,e=n===void 0?[]:n,i=t.sheetId;return''+e.map(function(o,r){return'')}).join("")+""}function oK(t){var n=t.id,e=t.images;return''+(e?''):"")+""}function hR(t){return uR(pR(t),{attribute:!1})}function FUe(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=NUe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NUe(t,n){if(t){if(typeof t=="string")return Ife(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ife(t,n):void 0}}function Ife(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e"),n+=hR(o),n+=""}return n+="",n}var sK=100;function aK(t){var n=t.fontFamily,e=t.fontSize,i=!!(n||e);n===void 0&&(n="Calibri"),e===void 0&&(e=12);var o=[],r={},a=[],p={},f=[],x={},I=[],D={},P=[],R={};f.push({size:e,family:n,custom:i}),x["-:-"]=0,I.push({}),D["-"]=0,P.push({left:{},right:{},top:{},bottom:{}}),R["-:-/-:-/-:-/-:-"]=0,I.push({gray125:!0});function j($,W){var Q=$.align,se=$.alignVertical,ge=$.textRotation,Re=$.indent,Se=$.wrap,fe=$.fontFamily,be=$.fontSize,je=$.fontWeight,st=$.fontStyle,Fe=$.color,ht=$.backgroundColor,ue=$.borderColor,Pt=$.borderStyle,ki=$.leftBorderColor,zt=$.leftBorderStyle,Bi=$.rightBorderColor,qt=$.rightBorderStyle,en=$.topBorderColor,_t=$.topBorderStyle,St=$.bottomBorderColor,Ei=$.bottomBorderStyle,qi=W.format,zi=void 0,vn="".concat(fe||"-",":").concat(be||"-",":").concat(je||"-",":").concat(st||"-",":").concat(Fe||"-"),Gn=ht||"-",Wi="".concat(en||ue||"-",":").concat(_t||Pt||"-")+"/"+"".concat(Bi||ue||"-",":").concat(qt||Pt||"-")+"/"+"".concat(St||ue||"-",":").concat(Ei||Pt||"-")+"/"+"".concat(ki||ue||"-",":").concat(zt||Pt||"-"),An="".concat(Q||"-","/").concat(se||"-","/").concat(ge||"-","/").concat(Re||"-","/").concat(Se||"-","/").concat(qi||"-","/").concat(vn,"/").concat(Gn,"/").concat(Wi),Vn=p[An];if(Vn!==void 0)return Vn;var Fn;qi&&(Fn=r[qi],Fn===void 0&&(Fn=r[qi]=String(sK+o.length),o.push(qi)));var Lo=i?0:void 0;(fe||be||je||st||Fe)&&(Lo=x[vn],Lo===void 0&&(Lo=x[vn]=String(f.length),f.push({custom:!0,size:be||e,family:fe||n,weight:je,style:st,color:Fe})));var gr;ht&&(gr=D[Gn],gr===void 0&&(gr=D[Gn]=String(I.length),I.push({color:ht})));var pe;return(ue||Pt||ki||zt||Bi||qt||en||_t||St||Ei)&&(pe=R[Wi],pe===void 0&&(pe=R[Wi]=String(P.length),P.push({left:{style:zt||Pt,color:ki||ue},right:{style:qt||Pt,color:Bi||ue},top:{style:_t||Pt,color:en||ue},bottom:{style:Ei||Pt,color:St||ue}}))),a.push({fontId:Lo,fillId:gr,borderId:pe,align:Q,alignVertical:se,textRotation:ge,indent:Re,wrap:Se,formatId:Fn}),p[An]=String(a.length-1)}return j({},{}),{getStyles:function(){return{formats:o,styles:a,fonts:f,fills:I,borders:P}},getStyle:j}}function eV(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=BUe(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BUe(t,n){if(t){if(typeof t=="string")return Tfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Tfe(t,n):void 0}}function Tfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e';if(a+='',n.length>0){a+='');for(var p=0;p');a+=""}a+='');for(var f=eV(i),x;!(x=f()).done;){var I=x.value,D=I.size,P=I.family,R=I.color,j=I.weight,$=I.style,W=I.custom;a+="",a+=''),a+=""),a+=''),a+='',W||(a+=''),j==="bold"&&(a+=""),$==="italic"&&(a+=""),a+=""}a+="",a+='');for(var Q=eV(o),se;!(se=Q()).done;){var ge=se.value,Re=ge.color,Se=ge.gray125;a+="",Re?(a+='',a+=''),a+='',a+=""):Se?a+='':a+='',a+=""}a+="",a+='');for(var fe=eV(r),be;!(be=fe()).done;){var je=be.value,st=je.left,Fe=je.right,ht=je.top,ue=je.bottom,Pt=function(An,Vn){var Fn=Vn.style,Lo=Vn.color;Lo&&!Fn&&(Fn="thin");var gr=!!Lo;return"<".concat(An)+(Fn?' style="'.concat(uc(Fn),'"'):"")+(gr?">":"/>")+(Lo?''):"")+(gr?""):"")};a+="",a+=Pt("left",st),a+=Pt("right",Fe),a+=Pt("top",ht),a+=Pt("bottom",ue),a+="",a+=""}a+="",a+='');for(var ki=eV(e),zt;!(zt=ki()).done;){var Bi=zt.value,qt=Bi.fontId,en=Bi.fillId,_t=Bi.borderId,St=Bi.align,Ei=Bi.alignVertical,qi=Bi.textRotation,zi=Bi.indent,vn=Bi.wrap,Gn=Bi.formatId;a+=""+(St||Ei||qi||zi||vn?"":"")+""}return a+="",a+="",a}function lK(t){if(t[0]!=="#")throw new Error('Color "'.concat(t,'" must start with a "#"'));return"FF".concat(t.slice(1).toUpperCase())}function zUe(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 VUe(t){return t<0?90-t:t}function m0(t){return Object.keys(t).map(function(n){return"".concat(n,'="').concat(uc(String(t[n])),'"')}).reduce(function(n,e){return n+" "+e},"")}function Gv(t,n){return"".concat(Afe(t)).concat(n)}var Efe=26;function Afe(t){if(typeof t!="number")return"";var n=Math.floor(t/Efe),e=String.fromCharCode(97+t%Efe).toUpperCase();return n===0?e:Afe(n-1)+e}var UUe=25569,HUe=3600*1e3,jUe=24*HUe;function dK(t){return t.getTime()/jUe+UUe}function GUe(t,n){return KUe(t)||WUe(t,n)||qUe(t,n)||$Ue()}function $Ue(){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 qUe(t,n){if(t){if(typeof t=="string")return Dfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Dfe(t,n):void 0}}function Dfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e");if(i===Date&&!o)throw new Error('No "format" has been specified for a Date cell');var p=YUe(i,e,r),f=ZUe(i);f&&(a.t=f);var x=XUe(i),I=GUe(x,2),D=I[0],P=I[1];return"")+D+p+P+""}function ZUe(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 YUe(t,n,e){switch(t){case String:if(typeof n!="string")throw new Error("Invalid cell value: ".concat(n,". Expected a string"));return e(n);case Number:if(typeof n!="number")throw new Error("Invalid cell value: ".concat(n,". Expected a number"));return String(n);case Date:if(!(n instanceof Date))throw new Error("Invalid cell value: ".concat(n,". Expected a Date"));return String(dK(n));case Boolean:if(typeof n!="boolean")throw new Error("Invalid cell value: ".concat(n,". Expected a boolean"));return n?"1":"0";case"Formula":if(typeof n!="string")throw new Error("Invalid cell value: ".concat(n,". Expected a string"));return hR(n);default:throw new Error("Unknown schema type: ".concat(t&&t.name||t))}}var QUe=/";default:return""}}function mR(t){var n=t.align,e=t.alignVertical,i=t.textRotation,o=t.indent,r=t.wrap,a=t.fontFamily,p=t.fontSize,f=t.fontWeight,x=t.fontStyle,I=t.color,D=t.backgroundColor,P=t.borderColor,R=t.borderStyle,j=t.leftBorderColor,$=t.leftBorderStyle,W=t.rightBorderColor,Q=t.rightBorderStyle,se=t.topBorderColor,ge=t.topBorderStyle,Re=t.bottomBorderColor,Se=t.bottomBorderStyle;if(n||e||i||o||r||a||p||f||x||I||D||P||R||j||$||W||Q||se||ge||Re||Se)return e8e({align:n,alignVertical:e,textRotation:i,indent:o,wrap:r,fontFamily:a,fontSize:p,fontWeight:f,fontStyle:x,color:I,backgroundColor:D,borderColor:P,borderStyle:R,leftBorderColor:j,leftBorderStyle:$,rightBorderColor:W,rightBorderStyle:Q,topBorderColor:se,topBorderStyle:ge,bottomBorderColor:Re,bottomBorderStyle:Se})}function e8e(t){var n={};for(var e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function pK(t){"@babel/helpers - typeof";return pK=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pK(t)}function hK(t,n,e){var i=e.getStyle,o=e.getSharedString,r=e.customFont,a=e.dateFormat,p=e.usesSchema,f=n+1,x,I=t.map(function(P,R){if(P==null)return"";var j=P.height,$=mR(P),W=P.type,Q=P.value,se=P.format;if(t8e(Q)?Q=null:W===void 0&&(p||(W=i8e(Q)),W===void 0&&(W=String,Q=String(Q))),se){if(W!==Date&&W!==Number&&W!==String&&W!=="Formula")throw new Error('`format` can only be used on `Date`, `Number`, `String` or `"Formula"` cells');if(W===String&&se!=="@")throw new Error('`String` cells only support "@" `format`')}else W===Date&&(se=a);var ge;return(se||r||$)&&(ge=i($||{},{format:se})),j&&(x===void 0||x")+I+""}function t8e(t){return t==null||t===""}function i8e(t){switch(pK(t)){case"string":return String;case"number":return Number;case"boolean":return Boolean;default:if(t instanceof Date)return Date}}function fR(t){"@babel/helpers - typeof";return fR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fR(t)}function kfe(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),e.push.apply(e,i)}return e}function tV(t){for(var n=1;n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a8e(t,n){if(t){if(typeof t=="string")return Mfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Mfe(t,n):void 0}}function Mfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e')}function gK(t){var n=t.schema,e=t.columns;if(n||e){var i=(n||e).map(fK).join("");if(i)return"".concat(i,"")}return""}function _K(t,n){var e=n.schema,i=[];if(e)return{data:t,mergedCells:i};for(var o=function(){t=t.slice();for(var j=0;j1||P>1)&&(d8e({data:t,rowIndex:r,columnIndex:p,span:I,rowSpan:P,cloneData:o}),i.push([[r,p],[r+(P?P-1:0),p+(I?I-1:0)]]))}p++}r++}return{data:t,mergedCells:i}}function d8e(t){var n=t.data,e=t.rowIndex,i=t.columnIndex,o=t.span,r=t.rowSpan,a=t.cloneData,p=mR(n[e][i]);p&&(n=a());for(var f=e;f<=e+(r-1);){for(var x=i;x<=i+(o-1);){var I=n[f][x];if(f>e||x>i){if(I!=null)throw new Error("[write-excel-file] When using `span` or `rowSpan` parameters, all hidden overlapped cells should be represented by `null`s or `undefined`s. Cell at row ".concat(e+1," and column ").concat(i+1," is configured with `span` ").concat(o," and `rowSpan` ").concat(r,". Cell at row ").concat(f+1," and column ").concat(x+1," is neither `null` nor `undefined`: ").concat(JSON.stringify(I)));p&&(n[f][x]=p)}x++}f++}}function u8e(t,n){return f8e(t)||m8e(t,n)||h8e(t,n)||p8e()}function p8e(){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 h8e(t,n){if(t){if(typeof t=="string")return Rfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Rfe(t,n):void 0}}function Rfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e')+t.map(function(n){var e=u8e(n,2),i=e[0],o=e[1],r=Gv(i[1],i[0]+1)+":"+Gv(o[1],o[0]+1);return'')}).join("")+""}function vK(t){var n=t.sheetId,e=t.orientation,i="";if(e){var o=.7,r=.7,a=.75,p=.75,f=.3,x=.3;i+=""),r+=""),r+="",r+="",r}function xK(t){var n=t.images;return n?'':""}var g8e=` {views}{columnsDescription}{data}{mergedCellsDescription}{layout}{drawing}`;function CK(t,n){var e=n.schema,i=n.columns,o=n.images,r=n.getHeaderStyle,a=n.getStyle,p=n.getSharedString,f=n.customFont,x=n.dateFormat,I=n.orientation,D=n.stickyRowsCount,P=n.stickyColumnsCount,R=n.showGridLines,j=n.rightToLeft,$=n.sheetId;_8e(t,{schema:e});var W=_K(t,{schema:e}),Q=W.data,se=W.mergedCells;return g8e.replace("{data}",mK(Q,{schema:e,getHeaderStyle:r,getStyle:a,getSharedString:p,customFont:f,dateFormat:x})).replace("{views}",bK({stickyRowsCount:D,stickyColumnsCount:P,showGridLines:R,rightToLeft:j})).replace("{columnsDescription}",gK({schema:e,columns:i})).replace("{mergedCellsDescription}",yK(se)).replace("{layout}",vK({sheetId:$,orientation:I})).replace("{drawing}",xK({images:o}))}function _8e(t,n){var e=n.schema;if(e){if(!Array.isArray(t))throw new TypeError("Expected an array of objects")}else{if(!Array.isArray(t))throw new TypeError("Expected an array of arrays");if(t.length>0&&!Array.isArray(t[0]))throw new TypeError("Expected an array of arrays")}}function wK(){var t=[],n={};return{getSharedStrings:function(){return t},getSharedString:function(i){var o=n[i];return o===void 0&&(o=String(t.length),n[i]=o,t.push(i)),o}}}var y8e=/[\[\]\/\\:*?]+/;function SK(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(y8e.test(t))throw new Error('Sheet name "'.concat(t,'" contains illegal characters: []/\\:*?'))}function Ofe(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=v8e(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v8e(t,n){if(t){if(typeof t=="string")return Pfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Pfe(t,n):void 0}}function Pfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x8e(t,n){if(t){if(typeof t=="string")return Nfe(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Nfe(t,n):void 0}}function Nfe(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e1&&arguments[1]!==void 0?arguments[1]:{},e=n.fileName,i=C8e(n,b8e);return S8e(t,i).then(function(o){return e?zfe.default.saveAs(o,e):o})}function S8e(t,n){var e=n.sheet,i=n.sheets,o=n.schema,r=n.columns,a=n.images,p=n.headerStyle,f=n.getHeaderStyle,x=n.fontFamily,I=n.fontSize,D=n.orientation,P=n.stickyRowsCount,R=n.stickyColumnsCount,j=n.showGridLines,$=n.rightToLeft,W=n.dateFormat,Q=new Bfe.default,se=Lfe({data:t,sheetName:e,sheetNames:i,schema:o,columns:r,images:a,headerStyle:p,getHeaderStyle:f,fontFamily:x,fontSize:I,orientation:D,stickyRowsCount:P,stickyColumnsCount:R,showGridLines:j,rightToLeft:$,dateFormat:W}),ge=se.sheets,Re=se.getSharedStrings,Se=se.getStyles;Q.file("_rels/.rels",xfe),Q.file("[Content_Types].xml",tK({sheets:ge,images:a}));var fe=Q.folder("xl");fe.file("_rels/workbook.xml.rels",JW({sheets:ge})),fe.file("workbook.xml",XW({sheets:ge,stickyRowsCount:P,stickyColumnsCount:R})),fe.file("styles.xml",cK(Se())),fe.file("sharedStrings.xml",rK(Re()));for(var be=Ffe(ge),je;!(je=be()).done;){var st=je.value,Fe=st.id,ht=st.data,ue=st.images;if(fe.file("worksheets/sheet".concat(Fe,".xml"),ht),fe.file("worksheets/_rels/sheet".concat(Fe,".xml.rels"),oK({id:Fe,images:ue})),ue){fe.file("drawings/drawing".concat(Fe,".xml"),iK({images:ue})),fe.file("drawings/_rels/drawing".concat(Fe,".xml.rels"),nK({images:ue,sheetId:Fe}));for(var Pt=Ffe(ue),ki;!(ki=Pt()).done;){var zt=ki.value;fe.file("media/".concat(dR(zt,{sheetId:Fe,sheetImages:ue})),zt.content)}}}return Q.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",compression:"deflate"})}var iV=class t extends PT{constructor(n,e,i){super(e,`${i}.xlsx`),this._exportData=n,this.defaultDateTimeFormat=Intl.DateTimeFormat(e).format(new Date(1999,11,31)).replace("1999","yyyy").replace("12","mm").replace("31","dd")}process(){return tt(this,null,function*(){let n={},e=yield this._exportData;return(Array.isArray(e)?this._processSheets(e):this._processSheet(e)).then(o=>(n.result=o,n)).catch(o=>(n.errors=[o instanceof Error?o.message:"Unknown error"],n))})}_processSheets(n){return tt(this,null,function*(){let e=n.map(i=>this._sheet(i.data,i.fields));return gR(e,{sheets:Array.isArray(n)?n.map(i=>KW.sanitizeSheetName(i.sheetName)??""):void 0})})}_processSheet(n){return tt(this,null,function*(){let e=this._sheet(n.data,n.fields);return gR(e,{sheet:Array.isArray(n)?void 0:KW.sanitizeSheetName(n.sheetName)??""})})}_sheet(n,e){return[this._header(e),...n.map(i=>this._row(i))]}_row(n){return n.map(e=>this._cell(e))}_header(n){return n.map(e=>({type:String,value:e,fontWeight:"bold"}))}_cell(n){let e={value:n.value};return n.type==="number"?gt(ve({},e),{type:Number,format:this._numberFormat(n.value,n.format)}):n.type==="Date"?gt(ve({},e),{type:Date,format:typeof n.format=="string"?n.format:this.defaultDateTimeFormat}):n.type==="boolean"?gt(ve({},e),{type:Boolean}):gt(ve({},e),{type:String})}_numberFormat(n,e){if(!n)return;if(!e)return this._defaultNumberFormat(n);if(typeof e=="string")return e;let i;return t._instanceOfNumberFormatOptions(e)&&(i=this._fractionPattern(e)),this._defaultNumberFormat(n,i)}_defaultNumberFormat(n,e){return Number(n)===n&&n%1===0?e?`0.${e}`:"0":(e=e||this._fractionPattern(aR),`0.${e}`)}_fractionPattern(n){let e=n.minimumFractionDigits||0,i=n.maximumFractionDigits||e;return"0".repeat(i)}};var Vfe=fu(EK());var nV=class t extends PT{constructor(n,e,i){super(e,`${i}.csv`),this._exportData=n,this._defaultConfig={quotes:!1,quoteChar:'"',delimiter:";",header:!0,newline:`\r `}}process(){return tt(this,null,function*(){let n={},e=yield this._exportData;try{let i=(0,Vfe.unparse)({data:this._getData(e.data),fields:e.fields},this._defaultConfig);n.result=new Blob(["\uFEFF"+i],{type:"text/csv;charset=utf-8"})}catch(i){n.errors=[i instanceof Error?i.message:"Unknown error"]}return Promise.resolve(n)})}_getData(n){return n.map(e=>e.map(i=>this._itemToString(i)))}_itemToString(n){if(!n.value)return"";if(n.type==="boolean")return n.value?"ja":"nein";if(n.type==="number"){let e=t._instanceOfNumberFormatOptions(n.format)?n.format:aR;return pp.format(n.value,e,[this._locale])}if(n.type==="Date"){let e=t._instanceOfDateTimeFormatOptions(n.format)?n.format:void 0;return Intl.DateTimeFormat(this._locale,e).format(n.value)}return n.value.toString()}};var _R=class{constructor(n){this.consent=n}consentForMarketing(){return this.consent.linkedIn&&this.consent.youtube}equals(n){return this.consent.zendesk===n.consent.zendesk&&this.consent.tracking===n.consent.tracking&&this.consent.linkedIn===n.consent.linkedIn&&this.consent.youtube===n.consent.youtube}},Ufe=new _R({linkedIn:!1,youtube:!1,tracking:!1,zendesk:!0});var oV=new ii("Cookie Manager CCM19 DomainId"),Hfe="YouTube Video",jfe="LinkedIn",Gfe="Microsoft Azure App Insights",$fe="Zendesk";function aQt(t){return t.variables.COOKIE_MANAGER_DOMAIN_ID?{provide:oV,useValue:t.variables.COOKIE_MANAGER_DOMAIN_ID}:(console.error("No 'COOKIE_MANAGER_DOMAIN_ID' found in app config response"),{provide:oV,useValue:""})}function qfe(){return window}var Wfe=(()=>{class t{constructor(e){this._rendererFactory2=e,this.renderer=this._rendererFactory2.createRenderer(null,null),this.userConsent$=new Ms(Ufe),this.renderer.listen("window","ccm19EmbeddingAccepted",i=>this.handleEmbeddingAccepted(i)),this.renderer.listen("window","ccm19WidgetClosed",()=>this.handleWidgetClosed())}ngOnDestroy(){this.renderer.destroy()}handleEmbeddingAccepted(e){this._updateUserConsent(qfe().CCM.acceptedEmbeddings)}handleWidgetClosed(){this._updateUserConsent(qfe().CCM.acceptedEmbeddings)}_updateUserConsent(e){let i=new _R({youtube:!!e.find(o=>o.name===Hfe),linkedIn:!!e.find(o=>o.name===jfe),tracking:!!e.find(o=>o.name===Gfe),zendesk:!!e.find(o=>o.name===$fe)});this.userConsent$.next(i)}static{this.\u0275fac=function(i){return new(i||t)(ui(dl))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var yR=class{constructor(n,e){this.key=n,this.value=e}};var LT=class{constructor(n=10){this.limit=n,this.size=0,this.map={},this.head=null,this.tail=null}setHead(n){n.next=this.head,n.prev=null,this.head!==null&&(this.head.prev=n),this.head=n,this.tail===null&&(this.tail=n),this.size++,this.map[n.key]=n}set(n,e){let i=new yR(n,e);this.map[n]?(this.map[n].value=i.value,this.remove(i.key)):this.size>=this.limit&&(delete this.map[this.tail.key],this.size--,this.tail=this.tail.prev,this.tail.next=null),this.setHead(i)}get(n){let e=null;if(this.map[n]){e=this.map[n].value;let i=new yR(n,e);this.remove(n),this.setHead(i)}return e}remove(n){let e=this.map[n];e.prev!==null?e.prev.next=e.next:this.head=e.next,e.next!==null?e.next.prev=e.prev:this.tail=e.prev,delete this.map[n],this.size--}};var rV=(()=>{class t{transform(e,i){let o=i.length>0?parseInt(i[0],10):20,r=i.length>1?i[1]:"...";return e.length>o?e.substring(0,o)+r:e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=ep({name:"truncate",type:t,pure:!0})}}return t})();var Ru=(()=>{class t{constructor(e,i){this.el=e,this.renderer=i}ngOnChanges(){for(;this.testId.includes(" ");)this.testId=this.testId.replace(" ","_");this.renderer.setAttribute(this.el.nativeElement,"data-test",this.testId)}static{this.\u0275fac=function(i){return new(i||t)(rt(_n),rt(Kr))}}static{this.\u0275dir=Ki({type:t,selectors:[["","data-test",""]],inputs:{testId:[0,"data-test","testId"]},features:[In]})}}return t})();var sV=(()=>{class t{constructor(e,i){this.document=e,this.rendererFactory=i,this._scriptsLoaded={}}removeJsScript(e){this._scriptsLoaded[e]&&(delete this._scriptsLoaded[e],this.document.getElementById(e).remove())}loadJsScript(e,i=[],o=this.document.body){let r=new xi;if(this._scriptsLoaded[e.id])return Ni(this.document.getElementById(e.id));let a=this._renderer().createElement("script");return a.id=e.id,a.type="text/javascript",a.src=e.src,i.forEach(p=>a.setAttribute(p[0],p[1])),a.onload=()=>{r.next(a)},this._scriptsLoaded[e.id]=!0,this._renderer().appendChild(o,a),r}_renderer(){return this.rendererFactory.createRenderer(null,null)}static{this.\u0275fac=function(i){return new(i||t)(ui(zn),ui(dl))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var jd=(()=>{class t{static title(e){return{primaryKeyword:`${e}`}}constructor(e,i,o){this._router=e,this._titleService=i,this._brand=o,this._maxTitleLength=60,this._brand=this._brand?this._brand:"BinDoc"}init(){this._router.events.pipe(ro(e=>e instanceof VI),ro(e=>e.snapshot.children.length===0)).subscribe(e=>this.updateTitle(this._pageTitleFromRoute(e)))}pageTitleText(e){return e?(e.length>this._maxTitleLength&&(e=e.slice(0,this._maxTitleLength-3).concat("...")),`${e} | ${this._brand}`):this._brand}updateTitle(e){this._titleService.setTitle(e)}_pageTitleFromRoute(e){if(e.snapshot.data&&e.snapshot.data.pageTitle){let i=e.snapshot.data.pageTitle.primaryKeyword;return this.pageTitleText(i)}else return this._brand}static{this.\u0275fac=function(i){return new(i||t)(ui(aa),ui(YB),ui("BD_PAGE_TITLE_BRAND",8))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var AK=(()=>{class t{constructor(e,i){this.document=e,this._scriptService=i}init(e){this._scriptService.loadJsScript({id:"CCM19",src:`https://cloud.ccm19.de/app.js?apiKey=5894089525888ce5c262843cf003c6e18a6655024bc18588&domain=${e}`},[["referrerpolicy","origin"]],this.document.head)}static{this.\u0275fac=function(i){return new(i||t)(ui(zn),ui(sV))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var I8e=(()=>{class t{static forRoot(){return{ngModule:t,providers:[sv(()=>((i,o)=>(i.init(o),()=>Ni()))(re(AK),re(oV))())]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({providers:[AK]})}}return t})();var JV={};Wu(JV,{addClientCapabilitiesToClaims:()=>PHe,blockAPICallsBeforeInitialize:()=>QV,blockAcquireTokenInPopups:()=>Fge,blockNonBrowserEnvironment:()=>YV,blockRedirectInIframe:()=>Lge,blockReloadInHiddenIframes:()=>Pge,clearHash:()=>TO,createGuid:()=>rY,getCurrentUri:()=>zu,getHomepage:()=>oY,invoke:()=>xl,invokeAsync:()=>_i,isInIframe:()=>EO,isInPopup:()=>Oge,preconnect:()=>DO,preflightCheck:()=>AO,redirectPreflightCheck:()=>XV,replaceHash:()=>nY});var Ii={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"},$m={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},zh={GET:"GET",POST:"POST"},Qp=[Ii.OPENID_SCOPE,Ii.PROFILE_SCOPE,Ii.OFFLINE_ACCESS_SCOPE],DK=[...Qp,Ii.EMAIL_SCOPE],Ql={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"},aV={ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},qm={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},NT={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Xl={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"};var vR={CODE:"code",IDTOKEN_TOKEN:"id_token token",IDTOKEN_TOKEN_REFRESHTOKEN:"id_token token refresh_token"},Ig={QUERY:"query",FRAGMENT:"fragment"},kK={QUERY:"query",FRAGMENT:"fragment",FORM_POST:"form_post"},bR={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"},BT={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},f0={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Jl={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"};var xR="appmetadata",Kfe="client_info",O1="1",zT={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Ou={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},Lc={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"},Qr={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},g0={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},lV={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},cV={username:"username",password:"password"},P1={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},dV={CONFIGURED_NO_AUTO_DETECTION:"2",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Tg={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},uV={Jwt:"JWT",Jwk:"JWK",Pop:"pop"};var CR=300;var $v={};Wu($v,{postRequestFailed:()=>SR,unexpectedError:()=>wR});var wR="unexpected_error",SR="post_request_failed";var pV={[wR]:"Unexpected error in authentication.",[SR]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},Zfe={unexpectedError:{code:wR,desc:pV[wR]},postRequestFailed:{code:SR,desc:pV[SR]}},fr=class t extends Error{constructor(n,e,i){let o=e?`${n}: ${e}`:n;super(o),Object.setPrototypeOf(this,t.prototype),this.errorCode=n||Ii.EMPTY_STRING,this.errorMessage=e||Ii.EMPTY_STRING,this.subError=i||Ii.EMPTY_STRING,this.name="AuthError"}setCorrelationId(n){this.correlationId=n}};function VT(t,n){return new fr(t,n?`${pV[t]} ${n}`:pV[t])}var Fc={};Wu(Fc,{authTimeNotFound:()=>_0,authorizationCodeMissingFromServerResponse:()=>Z1,bindingKeyNotRemoved:()=>LR,cannotAppendScopeSet:()=>q1,cannotRemoveEmptyScope:()=>$1,clientInfoDecodingError:()=>qv,clientInfoEmptyError:()=>L1,deviceCodeExpired:()=>AR,deviceCodePollingCancelled:()=>ER,deviceCodeUnknownError:()=>DR,emptyInputScopeSet:()=>Zv,endSessionEndpointNotSupported:()=>Y1,endpointResolutionError:()=>Pu,hashNotDeserialized:()=>z1,invalidAssertion:()=>RR,invalidCacheEnvironment:()=>v0,invalidCacheRecord:()=>W1,invalidClientCredential:()=>OR,invalidState:()=>Wm,keyIdMissing:()=>Q1,maxAgeTranspired:()=>H1,methodNotImplemented:()=>Vr,missingTenantIdError:()=>BR,multipleMatchingAccounts:()=>TR,multipleMatchingAppMetadata:()=>j1,multipleMatchingTokens:()=>IR,nestedAppAuthBridgeDisabled:()=>zR,networkError:()=>N1,noAccountFound:()=>kR,noAccountInSilentRequest:()=>y0,noCryptoObject:()=>Yv,noNetworkConnectivity:()=>FR,nonceMismatch:()=>U1,nullOrEmptyToken:()=>F1,openIdConfigError:()=>B1,requestCannotBeMade:()=>G1,stateMismatch:()=>V1,stateNotFound:()=>Kv,tokenClaimsCnfRequiredForSignedJwt:()=>K1,tokenParsingError:()=>Wv,tokenRefreshRequired:()=>b0,unexpectedCredentialType:()=>MR,userCanceled:()=>NR,userTimeoutReached:()=>PR});var qv="client_info_decoding_error",L1="client_info_empty_error",Wv="token_parsing_error",F1="null_or_empty_token",Pu="endpoints_resolution_error",N1="network_error",B1="openid_config_error",z1="hash_not_deserialized",Wm="invalid_state",V1="state_mismatch",Kv="state_not_found",U1="nonce_mismatch",_0="auth_time_not_found",H1="max_age_transpired",IR="multiple_matching_tokens",TR="multiple_matching_accounts",j1="multiple_matching_appMetadata",G1="request_cannot_be_made",$1="cannot_remove_empty_scope",q1="cannot_append_scopeset",Zv="empty_input_scopeset",ER="device_code_polling_cancelled",AR="device_code_expired",DR="device_code_unknown_error",y0="no_account_in_silent_request",W1="invalid_cache_record",v0="invalid_cache_environment",kR="no_account_found",Yv="no_crypto_object",MR="unexpected_credential_type",RR="invalid_assertion",OR="invalid_client_credential",b0="token_refresh_required",PR="user_timeout_reached",K1="token_claims_cnf_required_for_signedjwt",Z1="authorization_code_missing_from_server_response",LR="binding_key_not_removed",Y1="end_session_endpoint_not_supported",Q1="key_id_missing",FR="no_network_connectivity",NR="user_canceled",BR="missing_tenant_id_error",Vr="method_not_implemented",zR="nested_app_auth_bridge_disabled";var Lr={[qv]:"The client info could not be parsed/decoded correctly",[L1]:"The client info was empty",[Wv]:"Token cannot be parsed",[F1]:"The token is null or empty",[Pu]:"Endpoints cannot be resolved",[N1]:"Network request failed",[B1]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[z1]:"The hash parameters could not be deserialized",[Wm]:"State was not the expected format",[V1]:"State mismatch error",[Kv]:"State not found",[U1]:"Nonce mismatch error",[_0]:"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.",[H1]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[IR]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[TR]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[j1]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[G1]:"Token request cannot be made without authorization code or refresh token.",[$1]:"Cannot remove null or empty scope from ScopeSet",[q1]:"Cannot append ScopeSet",[Zv]:"Empty input ScopeSet cannot be processed",[ER]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[AR]:"Device code is expired.",[DR]:"Device code stopped polling for unknown reasons.",[y0]:"Please pass an account object, silent flow is not supported without account information",[W1]:"Cache record object was null or undefined.",[v0]:"Invalid environment when attempting to create cache entry",[kR]:"No account found in cache for given key.",[Yv]:"No crypto object detected.",[MR]:"Unexpected credential type.",[RR]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[OR]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[b0]:"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.",[PR]:"User defined timeout for device code polling reached",[K1]:"Cannot generate a POP jwt if the token_claims are not populated",[Z1]:"Server response does not contain an authorization code to proceed",[LR]:"Could not remove the credential's binding key from storage.",[Y1]:"The provided authority does not support logout",[Q1]:"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.",[FR]:"No network connectivity. Check your internet connection.",[NR]:"User cancelled the flow.",[BR]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Vr]:"This method has not been implemented",[zR]:"The nested app auth bridge is disabled"},Yfe={clientInfoDecodingError:{code:qv,desc:Lr[qv]},clientInfoEmptyError:{code:L1,desc:Lr[L1]},tokenParsingError:{code:Wv,desc:Lr[Wv]},nullOrEmptyToken:{code:F1,desc:Lr[F1]},endpointResolutionError:{code:Pu,desc:Lr[Pu]},networkError:{code:N1,desc:Lr[N1]},unableToGetOpenidConfigError:{code:B1,desc:Lr[B1]},hashNotDeserialized:{code:z1,desc:Lr[z1]},invalidStateError:{code:Wm,desc:Lr[Wm]},stateMismatchError:{code:V1,desc:Lr[V1]},stateNotFoundError:{code:Kv,desc:Lr[Kv]},nonceMismatchError:{code:U1,desc:Lr[U1]},authTimeNotFoundError:{code:_0,desc:Lr[_0]},maxAgeTranspired:{code:H1,desc:Lr[H1]},multipleMatchingTokens:{code:IR,desc:Lr[IR]},multipleMatchingAccounts:{code:TR,desc:Lr[TR]},multipleMatchingAppMetadata:{code:j1,desc:Lr[j1]},tokenRequestCannotBeMade:{code:G1,desc:Lr[G1]},removeEmptyScopeError:{code:$1,desc:Lr[$1]},appendScopeSetError:{code:q1,desc:Lr[q1]},emptyInputScopeSetError:{code:Zv,desc:Lr[Zv]},DeviceCodePollingCancelled:{code:ER,desc:Lr[ER]},DeviceCodeExpired:{code:AR,desc:Lr[AR]},DeviceCodeUnknownError:{code:DR,desc:Lr[DR]},NoAccountInSilentRequest:{code:y0,desc:Lr[y0]},invalidCacheRecord:{code:W1,desc:Lr[W1]},invalidCacheEnvironment:{code:v0,desc:Lr[v0]},noAccountFound:{code:kR,desc:Lr[kR]},noCryptoObj:{code:Yv,desc:Lr[Yv]},unexpectedCredentialType:{code:MR,desc:Lr[MR]},invalidAssertion:{code:RR,desc:Lr[RR]},invalidClientCredential:{code:OR,desc:Lr[OR]},tokenRefreshRequired:{code:b0,desc:Lr[b0]},userTimeoutReached:{code:PR,desc:Lr[PR]},tokenClaimsRequired:{code:K1,desc:Lr[K1]},noAuthorizationCodeFromServer:{code:Z1,desc:Lr[Z1]},bindingKeyNotRemovedError:{code:LR,desc:Lr[LR]},logoutNotSupported:{code:Y1,desc:Lr[Y1]},keyIdMissing:{code:Q1,desc:Lr[Q1]},noNetworkConnectivity:{code:FR,desc:Lr[FR]},userCanceledError:{code:NR,desc:Lr[NR]},missingTenantIdError:{code:BR,desc:Lr[BR]},nestedAppAuthBridgeDisabled:{code:zR,desc:Lr[zR]}},VR=class t extends fr{constructor(n,e){super(n,e?`${Lr[n]}: ${e}`:Lr[n]),this.name="ClientAuthError",Object.setPrototypeOf(this,t.prototype)}};function Gi(t,n){return new VR(t,n)}var Qv={createNewGuid:()=>{throw Gi(Vr)},base64Decode:()=>{throw Gi(Vr)},base64Encode:()=>{throw Gi(Vr)},base64UrlEncode:()=>{throw Gi(Vr)},encodeKid:()=>{throw Gi(Vr)},getPublicKeyThumbprint(){return tt(this,null,function*(){throw Gi(Vr)})},removeTokenBindingKey(){return tt(this,null,function*(){throw Gi(Vr)})},clearKeystore(){return tt(this,null,function*(){throw Gi(Vr)})},signJwt(){return tt(this,null,function*(){throw Gi(Vr)})},hashString(){return tt(this,null,function*(){throw Gi(Vr)})}};var Ia=(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})(Ia||{}),Lu=class t{constructor(n,e,i){this.level=Ia.Info;let o=()=>{},r=n||t.createDefaultLoggerOptions();this.localCallback=r.loggerCallback||o,this.piiLoggingEnabled=r.piiLoggingEnabled||!1,this.level=typeof r.logLevel=="number"?r.logLevel:Ia.Info,this.correlationId=r.correlationId||Ii.EMPTY_STRING,this.packageName=e||Ii.EMPTY_STRING,this.packageVersion=i||Ii.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ia.Info}}clone(n,e,i){return new t({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:i||this.correlationId},n,e)}logMessage(n,e){if(e.logLevel>this.level||!this.piiLoggingEnabled&&e.containsPii)return;let r=`${`[${new Date().toUTCString()}] : [${e.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Ia[e.logLevel]} - ${n}`;this.executeCallback(e.logLevel,r,e.containsPii||!1)}executeCallback(n,e,i){this.localCallback&&this.localCallback(n,e,i)}error(n,e){this.logMessage(n,{logLevel:Ia.Error,containsPii:!1,correlationId:e||Ii.EMPTY_STRING})}errorPii(n,e){this.logMessage(n,{logLevel:Ia.Error,containsPii:!0,correlationId:e||Ii.EMPTY_STRING})}warning(n,e){this.logMessage(n,{logLevel:Ia.Warning,containsPii:!1,correlationId:e||Ii.EMPTY_STRING})}warningPii(n,e){this.logMessage(n,{logLevel:Ia.Warning,containsPii:!0,correlationId:e||Ii.EMPTY_STRING})}info(n,e){this.logMessage(n,{logLevel:Ia.Info,containsPii:!1,correlationId:e||Ii.EMPTY_STRING})}infoPii(n,e){this.logMessage(n,{logLevel:Ia.Info,containsPii:!0,correlationId:e||Ii.EMPTY_STRING})}verbose(n,e){this.logMessage(n,{logLevel:Ia.Verbose,containsPii:!1,correlationId:e||Ii.EMPTY_STRING})}verbosePii(n,e){this.logMessage(n,{logLevel:Ia.Verbose,containsPii:!0,correlationId:e||Ii.EMPTY_STRING})}trace(n,e){this.logMessage(n,{logLevel:Ia.Trace,containsPii:!1,correlationId:e||Ii.EMPTY_STRING})}tracePii(n,e){this.logMessage(n,{logLevel:Ia.Trace,containsPii:!0,correlationId:e||Ii.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}};var hV="@azure/msal-common",UT="15.12.0";var Xv={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 Fu={};Wu(Fu,{authorityMismatch:()=>KR,authorityUriInsecure:()=>J1,cannotAllowPlatformBroker:()=>WR,cannotSetOIDCOptions:()=>qR,claimsRequestParsingError:()=>UR,emptyInputScopesError:()=>tC,invalidAuthenticationHeader:()=>$R,invalidAuthorityMetadata:()=>rC,invalidAuthorizePostBodyParameters:()=>YR,invalidClaims:()=>Jv,invalidCloudDiscoveryMetadata:()=>eb,invalidCodeChallengeMethod:()=>HR,invalidRequestMethodForEAR:()=>ZR,logoutRequestEmpty:()=>nC,missingNonceAuthenticationHeader:()=>GR,missingSshJwk:()=>x0,missingSshKid:()=>jR,pkceParamsMissing:()=>oC,redirectUriEmpty:()=>X1,tokenRequestEmpty:()=>iC,untrustedAuthority:()=>sC,urlEmptyError:()=>eC,urlParseError:()=>Eg});var X1="redirect_uri_empty",UR="claims_request_parsing_error",J1="authority_uri_insecure",Eg="url_parse_error",eC="empty_url_error",tC="empty_input_scopes_error",Jv="invalid_claims",iC="token_request_empty",nC="logout_request_empty",HR="invalid_code_challenge_method",oC="pkce_params_missing",eb="invalid_cloud_discovery_metadata",rC="invalid_authority_metadata",sC="untrusted_authority",x0="missing_ssh_jwk",jR="missing_ssh_kid",GR="missing_nonce_authentication_header",$R="invalid_authentication_header",qR="cannot_set_OIDCOptions",WR="cannot_allow_platform_broker",KR="authority_mismatch",ZR="invalid_request_method_for_EAR",YR="invalid_authorize_post_body_parameters";var fl={[X1]:"A redirect URI is required for all calls, and none has been set.",[UR]:"Could not parse the given claims request object.",[J1]:"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",[Eg]:"URL could not be parsed into appropriate segments.",[eC]:"URL was empty or null.",[tC]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Jv]:"Given claims parameter must be a stringified JSON object.",[iC]:"Token request was empty and not found in cache.",[nC]:"The logout request was null or undefined.",[HR]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[oC]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[eb]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[rC]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[sC]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[x0]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[jR]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[GR]:"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.",[$R]:"Invalid authentication header provided",[qR]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[WR]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[KR]:"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.",[YR]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[ZR]:"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."},Qfe={redirectUriNotSet:{code:X1,desc:fl[X1]},claimsRequestParsingError:{code:UR,desc:fl[UR]},authorityUriInsecure:{code:J1,desc:fl[J1]},urlParseError:{code:Eg,desc:fl[Eg]},urlEmptyError:{code:eC,desc:fl[eC]},emptyScopesError:{code:tC,desc:fl[tC]},invalidClaimsRequest:{code:Jv,desc:fl[Jv]},tokenRequestEmptyError:{code:iC,desc:fl[iC]},logoutRequestEmptyError:{code:nC,desc:fl[nC]},invalidCodeChallengeMethod:{code:HR,desc:fl[HR]},invalidCodeChallengeParams:{code:oC,desc:fl[oC]},invalidCloudDiscoveryMetadata:{code:eb,desc:fl[eb]},invalidAuthorityMetadata:{code:rC,desc:fl[rC]},untrustedAuthority:{code:sC,desc:fl[sC]},missingSshJwk:{code:x0,desc:fl[x0]},missingSshKid:{code:jR,desc:fl[jR]},missingNonceAuthenticationHeader:{code:GR,desc:fl[GR]},invalidAuthenticationHeader:{code:$R,desc:fl[$R]},cannotSetOIDCOptions:{code:qR,desc:fl[qR]},cannotAllowPlatformBroker:{code:WR,desc:fl[WR]},authorityMismatch:{code:KR,desc:fl[KR]},invalidAuthorizePostBodyParameters:{code:YR,desc:fl[YR]},invalidRequestMethodForEAR:{code:ZR,desc:fl[ZR]}},QR=class t extends fr{constructor(n){super(n,fl[n]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,t.prototype)}};function ys(t){return new QR(t)}var ka=class{static isEmptyObj(n){if(n)try{let e=JSON.parse(n);return Object.keys(e).length===0}catch{}return!0}static startsWith(n,e){return n.indexOf(e)===0}static endsWith(n,e){return n.length>=e.length&&n.lastIndexOf(e)===n.length-e.length}static queryStringToObject(n){let e={},i=n.split("&"),o=r=>decodeURIComponent(r.replace(/\+/g," "));return i.forEach(r=>{if(r.trim()){let[a,p]=r.split(/=(.+)/g,2);a&&p&&(e[o(a)]=o(p))}}),e}static trimArrayEntries(n){return n.map(e=>e.trim())}static removeEmptyStringsFromArray(n){return n.filter(e=>!!e)}static jsonParseHelper(n){try{return JSON.parse(n)}catch{return null}}static matchPattern(n,e){return new RegExp(n.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(e)}};var bl=class t{constructor(n){let e=n?ka.trimArrayEntries([...n]):[],i=e?ka.removeEmptyStringsFromArray(e):[];if(!i||!i.length)throw ys(tC);this.scopes=new Set,i.forEach(o=>this.scopes.add(o))}static fromString(n){let i=(n||Ii.EMPTY_STRING).split(" ");return new t(i)}static createSearchScopes(n){let e=n&&n.length>0?n:[...Qp],i=new t(e);return i.containsOnlyOIDCScopes()?i.removeScope(Ii.OFFLINE_ACCESS_SCOPE):i.removeOIDCScopes(),i}containsScope(n){let e=this.printScopesLowerCase().split(" "),i=new t(e);return n?i.scopes.has(n.toLowerCase()):!1}containsScopeSet(n){return!n||n.scopes.size<=0?!1:this.scopes.size>=n.scopes.size&&n.asArray().every(e=>this.containsScope(e))}containsOnlyOIDCScopes(){let n=0;return DK.forEach(e=>{this.containsScope(e)&&(n+=1)}),this.scopes.size===n}appendScope(n){n&&this.scopes.add(n.trim())}appendScopes(n){try{n.forEach(e=>this.appendScope(e))}catch{throw Gi(q1)}}removeScope(n){if(!n)throw Gi($1);this.scopes.delete(n.trim())}removeOIDCScopes(){DK.forEach(n=>{this.scopes.delete(n)})}unionScopeSets(n){if(!n)throw Gi(Zv);let e=new Set;return n.scopes.forEach(i=>e.add(i.toLowerCase())),this.scopes.forEach(i=>e.add(i.toLowerCase())),e}intersectingScopeSets(n){if(!n)throw Gi(Zv);n.containsOnlyOIDCScopes()||n.removeOIDCScopes();let e=this.unionScopeSets(n),i=n.getScopeCount(),o=this.getScopeCount();return e.sizen.push(e)),n}printScopes(){return this.scopes?this.asArray().join(" "):Ii.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}};function MK(t,n){return!!t&&!!n&&t===n.split(".")[1]}function HT(t,n,e,i){if(i){let{oid:o,sub:r,tid:a,name:p,tfp:f,acr:x,preferred_username:I,upn:D,login_hint:P}=i,R=a||f||x||"";return{tenantId:R,localAccountId:o||r||"",name:p,username:I||D||"",loginHint:P,isHomeTenant:MK(R,t)}}else return{tenantId:e,localAccountId:n,username:"",isHomeTenant:MK(e,t)}}function aC(t,n,e,i){let o=t;if(n){let r=n,{isHomeTenant:p}=r,f=Lp(r,["isHomeTenant"]);o=ve(ve({},t),f)}if(e){let a=HT(t.homeAccountId,t.localAccountId,t.tenantId,e),{isHomeTenant:p}=a,f=Lp(a,["isHomeTenant"]);return o=gt(ve(ve({},o),f),{idTokenClaims:e,idToken:i}),o}return o}var jT={};Wu(jT,{checkMaxAge:()=>XR,extractTokenClaims:()=>C0,getJWSPayload:()=>Xfe});function C0(t,n){let e=Xfe(t);try{let i=n(e);return JSON.parse(i)}catch{throw Gi(Wv)}}function Xfe(t){if(!t)throw Gi(F1);let e=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(t);if(!e||e.length<4)throw Gi(Wv);return e[2]}function XR(t,n){if(n===0||Date.now()-3e5>t+n)throw Gi(H1)}var Dg={};Wu(Dg,{getDeserializedResponse:()=>RK,mapToQueryString:()=>Ag,normalizeUrlForComparison:()=>E8e,stripLeadingHashOrQuery:()=>ege});function Jfe(t){if(!t)return t;let n=t.toLowerCase();return ka.endsWith(n,"?")?n=n.slice(0,-1):ka.endsWith(n,"?/")&&(n=n.slice(0,-2)),ka.endsWith(n,"/")||(n+="/"),n}function ege(t){return t.startsWith("#/")?t.substring(2):t.startsWith("#")||t.startsWith("?")?t.substring(1):t}function RK(t){if(!t||t.indexOf("=")<0)return null;try{let n=ege(t),e=Object.fromEntries(new URLSearchParams(n));if(e.code||e.ear_jwe||e.error||e.error_description||e.state)return e}catch{throw Gi(z1)}return null}function Ag(t,n=!0,e){let i=new Array;return t.forEach((o,r)=>{!n&&e&&r in e?i.push(`${r}=${o}`):i.push(`${r}=${encodeURIComponent(o)}`)}),i.join("&")}function E8e(t){if(!t)return t;let n=t.split("#")[0];try{let e=new URL(n),i=e.origin+e.pathname+e.search;return Jfe(i)}catch{return Jfe(n)}}var Ur=class t{get urlString(){return this._urlString}constructor(n){if(this._urlString=n,!this._urlString)throw ys(eC);n.includes("#")||(this._urlString=t.canonicalizeUri(n))}static canonicalizeUri(n){if(n){let e=n.toLowerCase();return ka.endsWith(e,"?")?e=e.slice(0,-1):ka.endsWith(e,"?/")&&(e=e.slice(0,-2)),ka.endsWith(e,"/")||(e+="/"),e}return n}validateAsUri(){let n;try{n=this.getUrlComponents()}catch{throw ys(Eg)}if(!n.HostNameAndPort||!n.PathSegments)throw ys(Eg);if(!n.Protocol||n.Protocol.toLowerCase()!=="https:")throw ys(J1)}static appendQueryString(n,e){return e?n.indexOf("?")<0?`${n}?${e}`:`${n}&${e}`:n}static removeHashFromUrl(n){return t.canonicalizeUri(n.split("#")[0])}replaceTenantPath(n){let e=this.getUrlComponents(),i=e.PathSegments;return n&&i.length!==0&&(i[0]===qm.COMMON||i[0]===qm.ORGANIZATIONS)&&(i[0]=n),t.constructAuthorityUriFromObject(e)}getUrlComponents(){let n=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),e=this.urlString.match(n);if(!e)throw ys(Eg);let i={Protocol:e[1],HostNameAndPort:e[4],AbsolutePath:e[5],QueryString:e[7]},o=i.AbsolutePath.split("/");return o=o.filter(r=>r&&r.length>0),i.PathSegments=o,i.QueryString&&i.QueryString.endsWith("/")&&(i.QueryString=i.QueryString.substring(0,i.QueryString.length-1)),i}static getDomainFromUrl(n){let e=RegExp("^([^:/?#]+://)?([^/?#]*)"),i=n.match(e);if(!i)throw ys(Eg);return i[2]}static getAbsoluteUrl(n,e){if(n[0]===Ii.FORWARD_SLASH){let o=new t(e).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+n}return n}static constructAuthorityUriFromObject(n){return new t(n.Protocol+"//"+n.HostNameAndPort+"/"+n.PathSegments.join("/"))}static hashContainsKnownProperties(n){return!!RK(n)}};var ige={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"]}]}},OK=ige.endpointMetadata,PK=ige.instanceDiscoveryMetadata,LK=new Set;PK.metadata.forEach(t=>{t.aliases.forEach(n=>{LK.add(n)})});function nge(t,n){let e,i=t.canonicalAuthority;if(i){let o=new Ur(i).getUrlComponents().HostNameAndPort;e=tge(o,t.cloudDiscoveryMetadata?.metadata,Ou.CONFIG,n)||tge(o,PK.metadata,Ou.HARDCODED_VALUES,n)||t.knownAuthorities}return e||[]}function tge(t,n,e,i){if(i?.trace(`getAliasesFromMetadata called with source: ${e}`),t&&n){let o=JR(n,t);if(o)return i?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${e}, returning aliases`),o.aliases;i?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${e}`)}return null}function oge(t){return JR(PK.metadata,t)}function JR(t,n){for(let e=0;eeO,cacheQuotaExceeded:()=>mV});var mV="cache_quota_exceeded",eO="cache_error_unknown";var FK={[mV]:"Exceeded cache storage capacity.",[eO]:"Unexpected error occurred when using cache storage."},tb=class t extends fr{constructor(n,e){let i=e||(FK[n]?FK[n]:FK[eO]);super(`${n}: ${i}`),Object.setPrototypeOf(this,t.prototype),this.name="CacheError",this.errorCode=n,this.errorMessage=i}};function GT(t){return t instanceof Error?t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED"||t.message.includes("exceeded the quota")?new tb(mV):new tb(t.name,t.message):new tb(eO)}var lC=class{constructor(n,e,i,o,r){this.clientId=n,this.cryptoImpl=e,this.commonLogger=i.clone(hV,UT),this.staticAuthorityOptions=r,this.performanceClient=o}getAllAccounts(n,e){return this.buildTenantProfiles(this.getAccountsFilteredBy(n,e),e,n)}getAccountInfoFilteredBy(n,e){if(Object.keys(n).length===0||Object.values(n).every(o=>!o))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;let i=this.getAllAccounts(n,e);return i.length>1?i.sort(r=>r.idTokenClaims?-1:1)[0]:i.length===1?i[0]:null}getBaseAccountInfo(n,e){let i=this.getAccountsFilteredBy(n,e);return i.length>0?i[0].getAccountInfo():null}buildTenantProfiles(n,e,i){return n.flatMap(o=>this.getTenantProfilesFromAccountEntity(o,e,i?.tenantId,i))}getTenantedAccountInfoByFilter(n,e,i,o,r){let a=null,p;if(r&&!this.tenantProfileMatchesFilter(i,r))return null;let f=this.getIdToken(n,o,e,i.tenantId);return f&&(p=C0(f.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(p,r))?null:(a=aC(n,i,p,f?.secret),a)}getTenantProfilesFromAccountEntity(n,e,i,o){let r=n.getAccountInfo(),a=r.tenantProfiles||new Map,p=this.getTokenKeys();if(i){let x=a.get(i);if(x)a=new Map([[i,x]]);else return[]}let f=[];return a.forEach(x=>{let I=this.getTenantedAccountInfoByFilter(r,p,x,e,o);I&&f.push(I)}),f}tenantProfileMatchesFilter(n,e){return!(e.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(n,e.localAccountId)||e.name&&n.name!==e.name||e.isHomeTenant!==void 0&&n.isHomeTenant!==e.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(n,e){return!(e&&(e.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(n,e.localAccountId)||e.loginHint&&!this.matchLoginHintFromTokenClaims(n,e.loginHint)||e.username&&!this.matchUsername(n.preferred_username,e.username)||e.name&&!this.matchName(n,e.name)||e.sid&&!this.matchSid(n,e.sid)))}saveCacheRecord(n,e,i){return tt(this,null,function*(){if(!n)throw Gi(W1);try{n.account&&(yield this.setAccount(n.account,e)),n.idToken&&i?.idToken!==!1&&(yield this.setIdTokenCredential(n.idToken,e)),n.accessToken&&i?.accessToken!==!1&&(yield this.saveAccessToken(n.accessToken,e)),n.refreshToken&&i?.refreshToken!==!1&&(yield this.setRefreshTokenCredential(n.refreshToken,e)),n.appMetadata&&this.setAppMetadata(n.appMetadata,e)}catch(o){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),o instanceof fr?o:GT(o)}})}saveAccessToken(n,e){return tt(this,null,function*(){let i={clientId:n.clientId,credentialType:n.credentialType,environment:n.environment,homeAccountId:n.homeAccountId,realm:n.realm,tokenType:n.tokenType,requestedClaimsHash:n.requestedClaimsHash},o=this.getTokenKeys(),r=bl.fromString(n.target);o.accessToken.forEach(a=>{if(!this.accessTokenKeyMatchesFilter(a,i,!1))return;let p=this.getAccessTokenCredential(a,e);p&&this.credentialMatchesFilter(p,i)&&bl.fromString(p.target).intersectingScopeSets(r)&&this.removeAccessToken(a,e)}),yield this.setAccessTokenCredential(n,e)})}getAccountsFilteredBy(n,e){let i=this.getAccountKeys(),o=[];return i.forEach(r=>{let a=this.getAccount(r,e);if(!a||n.homeAccountId&&!this.matchHomeAccountId(a,n.homeAccountId)||n.username&&!this.matchUsername(a.username,n.username)||n.environment&&!this.matchEnvironment(a,n.environment)||n.realm&&!this.matchRealm(a,n.realm)||n.nativeAccountId&&!this.matchNativeAccountId(a,n.nativeAccountId)||n.authorityType&&!this.matchAuthorityType(a,n.authorityType))return;let p={localAccountId:n?.localAccountId,name:n?.name},f=a.tenantProfiles?.filter(x=>this.tenantProfileMatchesFilter(x,p));f&&f.length===0||o.push(a)}),o}credentialMatchesFilter(n,e){return!(e.clientId&&!this.matchClientId(n,e.clientId)||e.userAssertionHash&&!this.matchUserAssertionHash(n,e.userAssertionHash)||typeof e.homeAccountId=="string"&&!this.matchHomeAccountId(n,e.homeAccountId)||e.environment&&!this.matchEnvironment(n,e.environment)||e.realm&&!this.matchRealm(n,e.realm)||e.credentialType&&!this.matchCredentialType(n,e.credentialType)||e.familyId&&!this.matchFamilyId(n,e.familyId)||e.target&&!this.matchTarget(n,e.target)||(e.requestedClaimsHash||n.requestedClaimsHash)&&n.requestedClaimsHash!==e.requestedClaimsHash||n.credentialType===Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(e.tokenType&&!this.matchTokenType(n,e.tokenType)||e.tokenType===Qr.SSH&&e.keyId&&!this.matchKeyId(n,e.keyId)))}getAppMetadataFilteredBy(n){let e=this.getKeys(),i={};return e.forEach(o=>{if(!this.isAppMetadata(o))return;let r=this.getAppMetadata(o);r&&(n.environment&&!this.matchEnvironment(r,n.environment)||n.clientId&&!this.matchClientId(r,n.clientId)||(i[o]=r))}),i}getAuthorityMetadataByAlias(n){let e=this.getAuthorityMetadataKeys(),i=null;return e.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;let r=this.getAuthorityMetadata(o);r&&r.aliases.indexOf(n)!==-1&&(i=r)}),i}removeAllAccounts(n){this.getAllAccounts({},n).forEach(i=>{this.removeAccount(i,n)})}removeAccount(n,e){this.removeAccountContext(n,e);let i=this.getAccountKeys(),o=r=>r.includes(n.homeAccountId)&&r.includes(n.environment);i.filter(o).forEach(r=>{this.removeItem(r,e),this.performanceClient.incrementFields({accountsRemoved:1},e)})}removeAccountContext(n,e){let i=this.getTokenKeys(),o=r=>r.includes(n.homeAccountId)&&r.includes(n.environment);i.idToken.filter(o).forEach(r=>{this.removeIdToken(r,e)}),i.accessToken.filter(o).forEach(r=>{this.removeAccessToken(r,e)}),i.refreshToken.filter(o).forEach(r=>{this.removeRefreshToken(r,e)})}removeAccessToken(n,e){let i=this.getAccessTokenCredential(n,e);if(this.removeItem(n,e),this.performanceClient.incrementFields({accessTokensRemoved:1},e),!i||i.credentialType.toLowerCase()!==Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||i.tokenType!==Qr.POP)return;let o=i.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,e),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},e)})}removeAppMetadata(n){return this.getKeys().forEach(i=>{this.isAppMetadata(i)&&this.removeItem(i,n)}),!0}getIdToken(n,e,i,o,r){this.commonLogger.trace("CacheManager - getIdToken called");let a={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:Jl.ID_TOKEN,clientId:this.clientId,realm:o},p=this.getIdTokensByFilter(a,e,i),f=p.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(f>1){let x=p;if(!o){let I=new Map;p.forEach((P,R)=>{P.realm===n.tenantId&&I.set(R,P)});let D=I.size;if(D<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),p.values().next().value;if(D===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),I.values().next().value;x=I}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),x.forEach((I,D)=>{this.removeIdToken(D,e)}),r&&e&&r.addFields({multiMatchedID:p.size},e),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),p.values().next().value}getIdTokensByFilter(n,e,i){let o=i&&i.idToken||this.getTokenKeys().idToken,r=new Map;return o.forEach(a=>{if(!this.idTokenKeyMatchesFilter(a,ve({clientId:this.clientId},n)))return;let p=this.getIdTokenCredential(a,e);p&&this.credentialMatchesFilter(p,n)&&r.set(a,p)}),r}idTokenKeyMatchesFilter(n,e){let i=n.toLowerCase();return!(e.clientId&&i.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&i.indexOf(e.homeAccountId.toLowerCase())===-1)}removeIdToken(n,e){this.removeItem(n,e)}removeRefreshToken(n,e){this.removeItem(n,e)}getAccessToken(n,e,i,o){let r=e.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",r);let a=bl.createSearchScopes(e.scopes),p=e.authenticationScheme||Qr.BEARER,f=p&&p.toLowerCase()!==Qr.BEARER.toLowerCase()?Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME:Jl.ACCESS_TOKEN,x={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:f,clientId:this.clientId,realm:o||n.tenantId,target:a,tokenType:p,keyId:e.sshKid,requestedClaimsHash:e.requestedClaimsHash},I=i&&i.accessToken||this.getTokenKeys().accessToken,D=[];I.forEach(R=>{if(this.accessTokenKeyMatchesFilter(R,x,!0)){let j=this.getAccessTokenCredential(R,r);j&&this.credentialMatchesFilter(j,x)&&D.push(j)}});let P=D.length;return P<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",r),null):P>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",r),D.forEach(R=>{this.removeAccessToken(this.generateCredentialKey(R),r)}),this.performanceClient.addFields({multiMatchedAT:D.length},r),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",r),D[0])}accessTokenKeyMatchesFilter(n,e,i){let o=n.toLowerCase();if(e.clientId&&o.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&o.indexOf(e.homeAccountId.toLowerCase())===-1||e.realm&&o.indexOf(e.realm.toLowerCase())===-1||e.requestedClaimsHash&&o.indexOf(e.requestedClaimsHash.toLowerCase())===-1)return!1;if(e.target){let r=e.target.asArray();for(let a=0;a{if(!this.accessTokenKeyMatchesFilter(r,n,!0))return;let a=this.getAccessTokenCredential(r,e);a&&this.credentialMatchesFilter(a,n)&&o.push(a)}),o}getRefreshToken(n,e,i,o,r){this.commonLogger.trace("CacheManager - getRefreshToken called");let a=e?O1:void 0,p={homeAccountId:n.homeAccountId,environment:n.environment,credentialType:Jl.REFRESH_TOKEN,clientId:this.clientId,familyId:a},f=o&&o.refreshToken||this.getTokenKeys().refreshToken,x=[];f.forEach(D=>{if(this.refreshTokenKeyMatchesFilter(D,p)){let P=this.getRefreshTokenCredential(D,i);P&&this.credentialMatchesFilter(P,p)&&x.push(P)}});let I=x.length;return I<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(I>1&&r&&i&&r.addFields({multiMatchedRT:I},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),x[0])}refreshTokenKeyMatchesFilter(n,e){let i=n.toLowerCase();return!(e.familyId&&i.indexOf(e.familyId.toLowerCase())===-1||!e.familyId&&e.clientId&&i.indexOf(e.clientId.toLowerCase())===-1||e.homeAccountId&&i.indexOf(e.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(n){let e={environment:n,clientId:this.clientId},i=this.getAppMetadataFilteredBy(e),o=Object.keys(i).map(a=>i[a]),r=o.length;if(r<1)return null;if(r>1)throw Gi(j1);return o[0]}isAppMetadataFOCI(n){let e=this.readAppMetadataFromCache(n);return!!(e&&e.familyId===O1)}matchHomeAccountId(n,e){return typeof n.homeAccountId=="string"&&e===n.homeAccountId}matchLocalAccountIdFromTokenClaims(n,e){let i=n.oid||n.sub;return e===i}matchLocalAccountIdFromTenantProfile(n,e){return n.localAccountId===e}matchName(n,e){return e.toLowerCase()===n.name?.toLowerCase()}matchUsername(n,e){return!!(n&&typeof n=="string"&&e?.toLowerCase()===n.toLowerCase())}matchUserAssertionHash(n,e){return!!(n.userAssertionHash&&e===n.userAssertionHash)}matchEnvironment(n,e){if(this.staticAuthorityOptions){let o=nge(this.staticAuthorityOptions,this.commonLogger);if(o.includes(e)&&o.includes(n.environment))return!0}let i=this.getAuthorityMetadataByAlias(e);return!!(i&&i.aliases.indexOf(n.environment)>-1)}matchCredentialType(n,e){return n.credentialType&&e.toLowerCase()===n.credentialType.toLowerCase()}matchClientId(n,e){return!!(n.clientId&&e===n.clientId)}matchFamilyId(n,e){return!!(n.familyId&&e===n.familyId)}matchRealm(n,e){return n.realm?.toLowerCase()===e.toLowerCase()}matchNativeAccountId(n,e){return!!(n.nativeAccountId&&e===n.nativeAccountId)}matchLoginHintFromTokenClaims(n,e){return n.login_hint===e||n.preferred_username===e||n.upn===e}matchSid(n,e){return n.sid===e}matchAuthorityType(n,e){return!!(n.authorityType&&e.toLowerCase()===n.authorityType.toLowerCase())}matchTarget(n,e){return n.credentialType!==Jl.ACCESS_TOKEN&&n.credentialType!==Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME||!n.target?!1:bl.fromString(n.target).containsScopeSet(e)}matchTokenType(n,e){return!!(n.tokenType&&n.tokenType===e)}matchKeyId(n,e){return!!(n.keyId&&n.keyId===e)}isAppMetadata(n){return n.indexOf(xR)!==-1}isAuthorityMetadata(n){return n.indexOf(zT.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(n){return`${zT.CACHE_KEY}-${this.clientId}-${n}`}static toObject(n,e){for(let i in e)n[i]=e[i];return n}},iO=class extends lC{setAccount(){return tt(this,null,function*(){throw Gi(Vr)})}getAccount(){throw Gi(Vr)}setIdTokenCredential(){return tt(this,null,function*(){throw Gi(Vr)})}getIdTokenCredential(){throw Gi(Vr)}setAccessTokenCredential(){return tt(this,null,function*(){throw Gi(Vr)})}getAccessTokenCredential(){throw Gi(Vr)}setRefreshTokenCredential(){return tt(this,null,function*(){throw Gi(Vr)})}getRefreshTokenCredential(){throw Gi(Vr)}setAppMetadata(){throw Gi(Vr)}getAppMetadata(){throw Gi(Vr)}setServerTelemetry(){throw Gi(Vr)}getServerTelemetry(){throw Gi(Vr)}setAuthorityMetadata(){throw Gi(Vr)}getAuthorityMetadata(){throw Gi(Vr)}getAuthorityMetadataKeys(){throw Gi(Vr)}setThrottlingCache(){throw Gi(Vr)}getThrottlingCache(){throw Gi(Vr)}removeItem(){throw Gi(Vr)}getKeys(){throw Gi(Vr)}getAccountKeys(){throw Gi(Vr)}getTokenKeys(){throw Gi(Vr)}generateCredentialKey(){throw Gi(Vr)}generateAccountKey(){throw Gi(Vr)}};var nl={AAD:"AAD",OIDC:"OIDC",EAR:"EAR"};var $e={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"},xJt=new Map([[$e.AcquireTokenByCode,"ATByCode"],[$e.AcquireTokenByRefreshToken,"ATByRT"],[$e.AcquireTokenSilent,"ATS"],[$e.AcquireTokenSilentAsync,"ATSAsync"],[$e.AcquireTokenPopup,"ATPopup"],[$e.AcquireTokenRedirect,"ATRedirect"],[$e.CryptoOptsGetPublicKeyThumbprint,"CryptoGetPKThumb"],[$e.CryptoOptsSignJwt,"CryptoSignJwt"],[$e.SilentCacheClientAcquireToken,"SltCacheClientAT"],[$e.SilentIframeClientAcquireToken,"SltIframeClientAT"],[$e.SilentRefreshClientAcquireToken,"SltRClientAT"],[$e.SsoSilent,"SsoSlt"],[$e.StandardInteractionClientGetDiscoveredAuthority,"StdIntClientGetDiscAuth"],[$e.FetchAccountIdWithNativeBroker,"FetchAccIdWithNtvBroker"],[$e.NativeInteractionClientAcquireToken,"NtvIntClientAT"],[$e.BaseClientCreateTokenRequestHeaders,"BaseClientCreateTReqHead"],[$e.NetworkClientSendPostRequestAsync,"NetClientSendPost"],[$e.RefreshTokenClientExecutePostToTokenEndpoint,"RTClientExecPost"],[$e.AuthorizationCodeClientExecutePostToTokenEndpoint,"AuthCodeClientExecPost"],[$e.BrokerHandhshake,"BrokerHandshake"],[$e.AcquireTokenByRefreshTokenInBroker,"ATByRTInBroker"],[$e.AcquireTokenByBroker,"ATByBroker"],[$e.RefreshTokenClientExecuteTokenRequest,"RTClientExecTReq"],[$e.RefreshTokenClientAcquireToken,"RTClientAT"],[$e.RefreshTokenClientAcquireTokenWithCachedRefreshToken,"RTClientATWithCachedRT"],[$e.RefreshTokenClientAcquireTokenByRefreshToken,"RTClientATByRT"],[$e.RefreshTokenClientCreateTokenRequestBody,"RTClientCreateTReqBody"],[$e.AcquireTokenFromCache,"ATFromCache"],[$e.SilentFlowClientAcquireCachedToken,"SltFlowClientATCached"],[$e.SilentFlowClientGenerateResultFromCacheRecord,"SltFlowClientGenResFromCache"],[$e.AcquireTokenBySilentIframe,"ATBySltIframe"],[$e.InitializeBaseRequest,"InitBaseReq"],[$e.InitializeSilentRequest,"InitSltReq"],[$e.InitializeClientApplication,"InitClientApplication"],[$e.InitializeCache,"InitCache"],[$e.ImportExistingCache,"importCache"],[$e.SetUserData,"setUserData"],[$e.LocalStorageUpdated,"localStorageUpdated"],[$e.SilentIframeClientTokenHelper,"SIClientTHelper"],[$e.SilentHandlerInitiateAuthRequest,"SHandlerInitAuthReq"],[$e.SilentHandlerMonitorIframeForHash,"SltHandlerMonitorIframeForHash"],[$e.SilentHandlerLoadFrame,"SHandlerLoadFrame"],[$e.SilentHandlerLoadFrameSync,"SHandlerLoadFrameSync"],[$e.StandardInteractionClientCreateAuthCodeClient,"StdIntClientCreateAuthCodeClient"],[$e.StandardInteractionClientGetClientConfiguration,"StdIntClientGetClientConf"],[$e.StandardInteractionClientInitializeAuthorizationRequest,"StdIntClientInitAuthReq"],[$e.GetAuthCodeUrl,"GetAuthCodeUrl"],[$e.HandleCodeResponseFromServer,"HandleCodeResFromServer"],[$e.HandleCodeResponse,"HandleCodeResp"],[$e.HandleResponseEar,"HandleRespEar"],[$e.HandleResponseCode,"HandleRespCode"],[$e.HandleResponsePlatformBroker,"HandleRespPlatBroker"],[$e.UpdateTokenEndpointAuthority,"UpdTEndpointAuth"],[$e.AuthClientAcquireToken,"AuthClientAT"],[$e.AuthClientExecuteTokenRequest,"AuthClientExecTReq"],[$e.AuthClientCreateTokenRequestBody,"AuthClientCreateTReqBody"],[$e.PopTokenGenerateCnf,"PopTGenCnf"],[$e.PopTokenGenerateKid,"PopTGenKid"],[$e.HandleServerTokenResponse,"HandleServerTRes"],[$e.DeserializeResponse,"DeserializeRes"],[$e.AuthorityFactoryCreateDiscoveredInstance,"AuthFactCreateDiscInst"],[$e.AuthorityResolveEndpointsAsync,"AuthResolveEndpointsAsync"],[$e.AuthorityResolveEndpointsFromLocalSources,"AuthResolveEndpointsFromLocal"],[$e.AuthorityGetCloudDiscoveryMetadataFromNetwork,"AuthGetCDMetaFromNet"],[$e.AuthorityUpdateCloudDiscoveryMetadata,"AuthUpdCDMeta"],[$e.AuthorityGetEndpointMetadataFromNetwork,"AuthUpdCDMetaFromNet"],[$e.AuthorityUpdateEndpointMetadata,"AuthUpdEndpointMeta"],[$e.AuthorityUpdateMetadataWithRegionalInformation,"AuthUpdMetaWithRegInfo"],[$e.RegionDiscoveryDetectRegion,"RegDiscDetectReg"],[$e.RegionDiscoveryGetRegionFromIMDS,"RegDiscGetRegFromIMDS"],[$e.RegionDiscoveryGetCurrentVersion,"RegDiscGetCurrentVer"],[$e.AcquireTokenByCodeAsync,"ATByCodeAsync"],[$e.GetEndpointMetadataFromNetwork,"GetEndpointMetaFromNet"],[$e.GetCloudDiscoveryMetadataFromNetworkMeasurement,"GetCDMetaFromNet"],[$e.HandleRedirectPromiseMeasurement,"HandleRedirectPromise"],[$e.HandleNativeRedirectPromiseMeasurement,"HandleNtvRedirectPromise"],[$e.UpdateCloudDiscoveryMetadataMeasurement,"UpdateCDMeta"],[$e.UsernamePasswordClientAcquireToken,"UserPassClientAT"],[$e.NativeMessageHandlerHandshake,"NtvMsgHandlerHandshake"],[$e.NativeGenerateAuthResult,"NtvGenAuthRes"],[$e.RemoveHiddenIframe,"RemoveHiddenIframe"],[$e.ClearTokensAndKeysWithClaims,"ClearTAndKeysWithClaims"],[$e.CacheManagerGetRefreshToken,"CacheManagerGetRT"],[$e.GeneratePkceCodes,"GenPkceCodes"],[$e.GenerateCodeVerifier,"GenCodeVerifier"],[$e.GenerateCodeChallengeFromVerifier,"GenCodeChallengeFromVerifier"],[$e.Sha256Digest,"Sha256Digest"],[$e.GetRandomValues,"GetRandomValues"],[$e.GenerateHKDF,"genHKDF"],[$e.GenerateBaseKey,"genBaseKey"],[$e.Base64Decode,"b64Decode"],[$e.UrlEncodeArr,"urlEncArr"],[$e.Encrypt,"encrypt"],[$e.Decrypt,"decrypt"],[$e.GenerateEarKey,"genEarKey"],[$e.DecryptEarResponse,"decryptEarResp"]]),NK={NotStarted:0,InProgress:1,Completed:2};var fV=class{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}},w0=class{generateId(){return"callback-id"}startMeasurement(n,e){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:NK.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:n,startTimeMs:Date.now(),correlationId:e||""},measurement:new fV}}startPerformanceMeasurement(){return new fV}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}};var gV={tokenRenewalOffsetSeconds:CR,preventCorsPreflight:!1},A8e={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ia.Info,correlationId:Ii.EMPTY_STRING},D8e={claimsBasedCachingEnabled:!1},k8e={sendGetRequestAsync(){return tt(this,null,function*(){throw Gi(Vr)})},sendPostRequestAsync(){return tt(this,null,function*(){throw Gi(Vr)})}},M8e={sku:Ii.SKU,version:UT,cpu:Ii.EMPTY_STRING,os:Ii.EMPTY_STRING},R8e={clientSecret:Ii.EMPTY_STRING,clientAssertion:void 0},O8e={azureCloudInstance:Xv.None,tenant:`${Ii.DEFAULT_COMMON_TENANT}`},P8e={application:{appName:"",appVersion:""}};function rge({authOptions:t,systemOptions:n,loggerOptions:e,cacheOptions:i,storageInterface:o,networkInterface:r,cryptoInterface:a,clientCredentials:p,libraryInfo:f,telemetry:x,serverTelemetryManager:I,persistencePlugin:D,serializableCache:P}){let R=ve(ve({},A8e),e);return{authOptions:L8e(t),systemOptions:ve(ve({},gV),n),loggerOptions:R,cacheOptions:ve(ve({},D8e),i),storageInterface:o||new iO(t.clientId,Qv,new Lu(R),new w0),networkInterface:r||k8e,cryptoInterface:a||Qv,clientCredentials:p||R8e,libraryInfo:ve(ve({},M8e),f),telemetry:ve(ve({},P8e),x),serverTelemetryManager:I||null,persistencePlugin:D||null,serializableCache:P||null}}function L8e(t){return ve({clientCapabilities:[],azureCloudOptions:O8e,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1},t)}function _V(t){return t.authOptions.authority.options.protocolMode===nl.OIDC}var Gd={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};function $T(t,n){if(!t)throw Gi(L1);try{let e=n(t);return JSON.parse(e)}catch{throw Gi(qv)}}function kg(t){if(!t)throw Gi(qv);let n=t.split(f0.CLIENT_INFO_SEPARATOR,2);return{uid:n[0],utid:n.length<2?Ii.EMPTY_STRING:n[1]}}var pc={};Wu(pc,{addApplicationTelemetry:()=>rO,addAuthorizationCode:()=>AZ,addBrokerParameters:()=>E0,addCcsOid:()=>I0,addCcsUpn:()=>ib,addClaims:()=>hC,addClientAssertion:()=>lO,addClientAssertionType:()=>cO,addClientCapabilitiesToClaims:()=>sge,addClientId:()=>uC,addClientInfo:()=>fC,addClientSecret:()=>aO,addCodeChallengeParams:()=>Y8e,addCodeVerifier:()=>kZ,addCorrelationId:()=>mC,addDeviceCode:()=>Q8e,addDomainHint:()=>IZ,addEARParameters:()=>iHe,addExtraQueryParameters:()=>T0,addGrantType:()=>dO,addIdTokenHint:()=>SZ,addInstanceAware:()=>uO,addLibraryInfo:()=>oO,addLoginHint:()=>WT,addLogoutHint:()=>MZ,addNativeBroker:()=>Z8e,addNonce:()=>EZ,addOboAssertion:()=>X8e,addPassword:()=>tHe,addPopToken:()=>pO,addPostBodyParameters:()=>nHe,addPostLogoutRedirectUri:()=>wZ,addPrompt:()=>TZ,addRedirectUri:()=>pC,addRefreshToken:()=>DZ,addRequestTokenUse:()=>J8e,addResponseMode:()=>CZ,addResponseType:()=>K8e,addScopes:()=>dC,addServerTelemetry:()=>mO,addSid:()=>wV,addSshJwk:()=>hO,addState:()=>sO,addThrottling:()=>fO,addUsername:()=>eHe,instrumentBrokerParams:()=>cC});var S0={};Wu(S0,{ACCESS_TOKEN:()=>B8e,BROKER_CLIENT_ID:()=>nO,BROKER_REDIRECT_URI:()=>CV,CCS_HEADER:()=>q8e,CLAIMS:()=>UK,CLIENT_ASSERTION:()=>uZ,CLIENT_ASSERTION_TYPE:()=>pZ,CLIENT_ID:()=>Mg,CLIENT_INFO:()=>j8e,CLIENT_REQUEST_ID:()=>QK,CLIENT_SECRET:()=>dZ,CODE:()=>WK,CODE_CHALLENGE:()=>KK,CODE_CHALLENGE_METHOD:()=>ZK,CODE_VERIFIER:()=>YK,DEVICE_CODE:()=>cZ,DOMAIN_HINT:()=>vZ,EAR_JWE_CRYPTO:()=>xZ,EAR_JWK:()=>bZ,ERROR:()=>F8e,ERROR_DESCRIPTION:()=>N8e,EXPIRES_IN:()=>V8e,FOCI:()=>$8e,GRANT_TYPE:()=>VK,ID_TOKEN:()=>z8e,ID_TOKEN_HINT:()=>lZ,INSTANCE_AWARE:()=>qT,LOGIN_HINT:()=>yZ,LOGOUT_HINT:()=>gZ,NATIVE_BROKER:()=>fZ,NONCE:()=>$K,OBO_ASSERTION:()=>hZ,ON_BEHALF_OF:()=>G8e,POST_LOGOUT_URI:()=>aZ,PROMPT:()=>qK,REDIRECT_URI:()=>yV,REFRESH_TOKEN:()=>jK,REFRESH_TOKEN_EXPIRES_IN:()=>U8e,REQUESTED_TOKEN_USE:()=>mZ,REQ_CNF:()=>bV,RESPONSE_MODE:()=>zK,RESPONSE_TYPE:()=>BK,RETURN_SPA_CODE:()=>xV,SCOPE:()=>HK,SESSION_STATE:()=>H8e,SID:()=>_Z,STATE:()=>GK,TOKEN_TYPE:()=>vV,X_APP_NAME:()=>rZ,X_APP_VER:()=>sZ,X_CLIENT_CPU:()=>tZ,X_CLIENT_CURR_TELEM:()=>iZ,X_CLIENT_EXTRA_SKU:()=>W8e,X_CLIENT_LAST_TELEM:()=>nZ,X_CLIENT_OS:()=>eZ,X_CLIENT_SKU:()=>XK,X_CLIENT_VER:()=>JK,X_MS_LIB_CAPABILITY:()=>oZ});var Mg="client_id",yV="redirect_uri",BK="response_type",zK="response_mode",VK="grant_type",UK="claims",HK="scope",F8e="error",N8e="error_description",B8e="access_token",z8e="id_token",jK="refresh_token",V8e="expires_in",U8e="refresh_token_expires_in",GK="state",$K="nonce",qK="prompt",H8e="session_state",j8e="client_info",WK="code",KK="code_challenge",ZK="code_challenge_method",YK="code_verifier",QK="client-request-id",XK="x-client-SKU",JK="x-client-VER",eZ="x-client-OS",tZ="x-client-CPU",iZ="x-client-current-telemetry",nZ="x-client-last-telemetry",oZ="x-ms-lib-capability",rZ="x-app-name",sZ="x-app-ver",aZ="post_logout_redirect_uri",lZ="id_token_hint",cZ="device_code",dZ="client_secret",uZ="client_assertion",pZ="client_assertion_type",vV="token_type",bV="req_cnf",hZ="assertion",mZ="requested_token_use",G8e="on_behalf_of",$8e="foci",q8e="X-AnchorMailbox",xV="return_spa_code",fZ="nativebroker",gZ="logout_hint",_Z="sid",yZ="login_hint",vZ="domain_hint",W8e="x-client-xtra-sku",nO="brk_client_id",CV="brk_redirect_uri",qT="instance_aware",bZ="ear_jwk",xZ="ear_jwe_crypto";function cC(t,n,e){if(!n)return;let i=t.get(Mg);i&&t.has(nO)&&e?.addFields({embeddedClientId:i,embeddedRedirectUri:t.get(yV)},n)}function K8e(t,n){t.set(BK,n)}function CZ(t,n){t.set(zK,n||kK.QUERY)}function Z8e(t){t.set(fZ,"1")}function dC(t,n,e=!0,i=Qp){e&&!i.includes("openid")&&!n.includes("openid")&&i.push("openid");let o=e?[...n||[],...i]:n||[],r=new bl(o);t.set(HK,r.printScopes())}function uC(t,n){t.set(Mg,n)}function pC(t,n){t.set(yV,n)}function wZ(t,n){t.set(aZ,n)}function SZ(t,n){t.set(lZ,n)}function IZ(t,n){t.set(vZ,n)}function WT(t,n){t.set(yZ,n)}function ib(t,n){t.set(Ql.CCS_HEADER,`UPN:${n}`)}function I0(t,n){t.set(Ql.CCS_HEADER,`Oid:${n.uid}@${n.utid}`)}function wV(t,n){t.set("sid",n)}function hC(t,n,e){let i=sge(n,e);try{JSON.parse(i)}catch{throw ys(Jv)}t.set(UK,i)}function mC(t,n){t.set(QK,n)}function oO(t,n){t.set(XK,n.sku),t.set(JK,n.version),n.os&&t.set(eZ,n.os),n.cpu&&t.set(tZ,n.cpu)}function rO(t,n){n?.appName&&t.set(rZ,n.appName),n?.appVersion&&t.set(sZ,n.appVersion)}function TZ(t,n){t.set(qK,n)}function sO(t,n){n&&t.set(GK,n)}function EZ(t,n){t.set($K,n)}function Y8e(t,n,e){if(n&&e)t.set(KK,n),t.set(ZK,e);else throw ys(oC)}function AZ(t,n){t.set(WK,n)}function Q8e(t,n){t.set(cZ,n)}function DZ(t,n){t.set(jK,n)}function kZ(t,n){t.set(YK,n)}function aO(t,n){t.set(dZ,n)}function lO(t,n){n&&t.set(uZ,n)}function cO(t,n){n&&t.set(pZ,n)}function X8e(t,n){t.set(hZ,n)}function J8e(t,n){t.set(mZ,n)}function dO(t,n){t.set(VK,n)}function fC(t){t.set(Kfe,"1")}function uO(t){t.has(qT)||t.set(qT,"true")}function T0(t,n){Object.entries(n).forEach(([e,i])=>{!t.has(e)&&i&&t.set(e,i)})}function sge(t,n){let e;if(!t)e={};else try{e=JSON.parse(t)}catch{throw ys(Jv)}return n&&n.length>0&&(e.hasOwnProperty(NT.ACCESS_TOKEN)||(e[NT.ACCESS_TOKEN]={}),e[NT.ACCESS_TOKEN][NT.XMS_CC]={values:n}),JSON.stringify(e)}function eHe(t,n){t.set(cV.username,n)}function tHe(t,n){t.set(cV.password,n)}function pO(t,n){n&&(t.set(vV,Qr.POP),t.set(bV,n))}function hO(t,n){n&&(t.set(vV,Qr.SSH),t.set(bV,n))}function mO(t,n){t.set(iZ,n.generateCurrentRequestHeaderValue()),t.set(nZ,n.generateLastRequestHeaderValue())}function fO(t){t.set(oZ,g0.X_MS_LIB_CAPABILITY_VALUE)}function MZ(t,n){t.set(gZ,n)}function E0(t,n,e){t.has(nO)||t.set(nO,n),t.has(CV)||t.set(CV,e)}function iHe(t,n){t.set(bZ,encodeURIComponent(n)),t.set(xZ,"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}function nHe(t,n){Object.entries(n).forEach(([e,i])=>{i&&t.set(e,i)})}var AV={};Wu(AV,{createDiscoveredInstance:()=>NZ});var Nu={Default:0,Adfs:1,Dsts:2,Ciam:3};function age(t){return t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("jwks_uri")}function lge(t){return t.hasOwnProperty("tenant_discovery_endpoint")&&t.hasOwnProperty("metadata")}function cge(t){return t.hasOwnProperty("error")&&t.hasOwnProperty("error_description")}var xl=(t,n,e,i,o)=>(...r)=>{e.trace(`Executing function ${n}`);let a=i?.startMeasurement(n,o);if(o){let p=n+"CallCount";i?.incrementFields({[p]:1},o)}try{let p=t(...r);return a?.end({success:!0}),e.trace(`Returning result from ${n}`),p}catch(p){e.trace(`Error occurred in ${n}`);try{e.trace(JSON.stringify(p))}catch{e.trace("Unable to print error message.")}throw a?.end({success:!1},p),p}},_i=(t,n,e,i,o)=>(...r)=>{e.trace(`Executing function ${n}`);let a=i?.startMeasurement(n,o);if(o){let p=n+"CallCount";i?.incrementFields({[p]:1},o)}return i?.setPreQueueTime(n,o),t(...r).then(p=>(e.trace(`Returning result from ${n}`),a?.end({success:!0}),p)).catch(p=>{e.trace(`Error occurred in ${n}`);try{e.trace(JSON.stringify(p))}catch{e.trace("Unable to print error message.")}throw a?.end({success:!1},p),p})};var dge=(()=>{class t{constructor(e,i,o,r){this.networkInterface=e,this.logger=i,this.performanceClient=o,this.correlationId=r}detectRegion(e,i){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RegionDiscoveryDetectRegion,this.correlationId);let o=e;if(o)i.region_source=P1.ENVIRONMENT_VARIABLE;else{let r=t.IMDS_OPTIONS;try{let a=yield _i(this.getRegionFromIMDS.bind(this),$e.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(Ii.IMDS_VERSION,r);if(a.status===$m.SUCCESS&&(o=a.body,i.region_source=P1.IMDS),a.status===$m.BAD_REQUEST){let p=yield _i(this.getCurrentVersion.bind(this),$e.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(r);if(!p)return i.region_source=P1.FAILED_AUTO_DETECTION,null;let f=yield _i(this.getRegionFromIMDS.bind(this),$e.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(p,r);f.status===$m.SUCCESS&&(o=f.body,i.region_source=P1.IMDS)}}catch{return i.region_source=P1.FAILED_AUTO_DETECTION,null}}return o||(i.region_source=P1.FAILED_AUTO_DETECTION),o||null})}getRegionFromIMDS(e,i){return tt(this,null,function*(){return this.performanceClient?.addQueueMeasurement($e.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Ii.IMDS_ENDPOINT}?api-version=${e}&format=text`,i,Ii.IMDS_TIMEOUT)})}getCurrentVersion(e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RegionDiscoveryGetCurrentVersion,this.correlationId);try{let i=yield this.networkInterface.sendGetRequestAsync(`${Ii.IMDS_ENDPOINT}?format=json`,e);return i.status===$m.BAD_REQUEST&&i.body&&i.body["newest-versions"]&&i.body["newest-versions"].length>0?i.body["newest-versions"][0]:null}catch{return null}})}}return t.IMDS_OPTIONS={headers:{Metadata:"true"}},t})();var Ll={};Wu(Ll,{createAccessTokenEntity:()=>PZ,createIdTokenEntity:()=>OZ,createRefreshTokenEntity:()=>LZ,generateAppMetadataKey:()=>pHe,generateAuthorityMetadataExpiresAt:()=>IV,isAccessTokenEntity:()=>aHe,isAppMetadataEntity:()=>hHe,isAuthorityMetadataEntity:()=>mHe,isAuthorityMetadataExpired:()=>TV,isCredentialEntity:()=>SV,isIdTokenEntity:()=>lHe,isRefreshTokenEntity:()=>cHe,isServerTelemetryEntity:()=>dHe,isThrottlingEntity:()=>uHe,updateAuthorityEndpointMetadata:()=>ZT,updateCloudDiscoveryMetadata:()=>_O});var Nc={};Wu(Nc,{delay:()=>sHe,isCacheExpired:()=>rHe,isTokenExpired:()=>KT,nowSeconds:()=>Xp,toDateFromSeconds:()=>gO,toSecondsFromDate:()=>oHe,wasClockTurnedBack:()=>RZ});function Xp(){return Math.round(new Date().getTime()/1e3)}function oHe(t){return t.getTime()/1e3}function gO(t){return t?new Date(Number(t)*1e3):new Date}function KT(t,n){let e=Number(t)||0;return Xp()+n>e}function rHe(t,n){let e=Number(t)+n*24*60*60*1e3;return Date.now()>e}function RZ(t){return Number(t)>Xp()}function sHe(t,n){return new Promise(e=>setTimeout(()=>e(n),t))}function OZ(t,n,e,i,o){return{credentialType:Jl.ID_TOKEN,homeAccountId:t,environment:n,clientId:i,secret:e,realm:o,lastUpdatedAt:Date.now().toString()}}function PZ(t,n,e,i,o,r,a,p,f,x,I,D,P,R,j){let $={homeAccountId:t,credentialType:Jl.ACCESS_TOKEN,secret:e,cachedAt:Xp().toString(),expiresOn:a.toString(),extendedExpiresOn:p.toString(),environment:n,clientId:i,realm:o,target:r,tokenType:I||Qr.BEARER,lastUpdatedAt:Date.now().toString()};if(D&&($.userAssertionHash=D),x&&($.refreshOn=x.toString()),R&&($.requestedClaims=R,$.requestedClaimsHash=j),$.tokenType?.toLowerCase()!==Qr.BEARER.toLowerCase())switch($.credentialType=Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME,$.tokenType){case Qr.POP:let W=C0(e,f);if(!W?.cnf?.kid)throw Gi(K1);$.keyId=W.cnf.kid;break;case Qr.SSH:$.keyId=P}return $}function LZ(t,n,e,i,o,r,a){let p={credentialType:Jl.REFRESH_TOKEN,homeAccountId:t,environment:n,clientId:i,secret:e,lastUpdatedAt:Date.now().toString()};return r&&(p.userAssertionHash=r),o&&(p.familyId=o),a&&(p.expiresOn=a.toString()),p}function SV(t){return t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("credentialType")&&t.hasOwnProperty("clientId")&&t.hasOwnProperty("secret")}function aHe(t){return t?SV(t)&&t.hasOwnProperty("realm")&&t.hasOwnProperty("target")&&(t.credentialType===Jl.ACCESS_TOKEN||t.credentialType===Jl.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function lHe(t){return t?SV(t)&&t.hasOwnProperty("realm")&&t.credentialType===Jl.ID_TOKEN:!1}function cHe(t){return t?SV(t)&&t.credentialType===Jl.REFRESH_TOKEN:!1}function dHe(t,n){let e=t.indexOf(Lc.CACHE_KEY)===0,i=!0;return n&&(i=n.hasOwnProperty("failedRequests")&&n.hasOwnProperty("errors")&&n.hasOwnProperty("cacheHits")),e&&i}function uHe(t,n){let e=!1;t&&(e=t.indexOf(g0.THROTTLING_PREFIX)===0);let i=!0;return n&&(i=n.hasOwnProperty("throttleTime")),e&&i}function pHe({environment:t,clientId:n}){return[xR,t,n].join(f0.CACHE_KEY_SEPARATOR).toLowerCase()}function hHe(t,n){return n?t.indexOf(xR)===0&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("environment"):!1}function mHe(t,n){return n?t.indexOf(zT.CACHE_KEY)===0&&n.hasOwnProperty("aliases")&&n.hasOwnProperty("preferred_cache")&&n.hasOwnProperty("preferred_network")&&n.hasOwnProperty("canonical_authority")&&n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("aliasesFromNetwork")&&n.hasOwnProperty("endpointsFromNetwork")&&n.hasOwnProperty("expiresAt")&&n.hasOwnProperty("jwks_uri"):!1}function IV(){return Xp()+zT.REFRESH_TIME_SECONDS}function ZT(t,n,e){t.authorization_endpoint=n.authorization_endpoint,t.token_endpoint=n.token_endpoint,t.end_session_endpoint=n.end_session_endpoint,t.issuer=n.issuer,t.endpointsFromNetwork=e,t.jwks_uri=n.jwks_uri}function _O(t,n,e){t.aliases=n.aliases,t.preferred_cache=n.preferred_cache,t.preferred_network=n.preferred_network,t.aliasesFromNetwork=e}function TV(t){return t.expiresAt<=Xp()}var Vh=class t{constructor(n,e,i,o,r,a,p,f){this.canonicalAuthority=n,this._canonicalAuthority.validateAsUri(),this.networkInterface=e,this.cacheManager=i,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=r,this.performanceClient=p,this.correlationId=a,this.managedIdentity=f||!1,this.regionDiscovery=new dge(e,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(n){if(n.HostNameAndPort.endsWith(Ii.CIAM_AUTH_URL))return Nu.Ciam;let e=n.PathSegments;if(e.length)switch(e[0].toLowerCase()){case Ii.ADFS:return Nu.Adfs;case Ii.DSTS:return Nu.Dsts}return Nu.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(n){this._canonicalAuthority=new Ur(n),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Gi(Pu)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Gi(Pu)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Gi(Pu)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Gi(Y1);return this.replacePath(this.metadata.end_session_endpoint)}else throw Gi(Pu)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Gi(Pu)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Gi(Pu)}canReplaceTenant(n){return n.PathSegments.length===1&&!t.reservedTenantDomains.has(n.PathSegments[0])&&this.getAuthorityType(n)===Nu.Default&&this.protocolMode!==nl.OIDC}replaceTenant(n){return n.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(n){let e=n,o=new Ur(this.metadata.canonical_authority).getUrlComponents(),r=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((p,f)=>{let x=r[f];if(f===0&&this.canReplaceTenant(o)){let I=new Ur(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];x!==I&&(this.logger.verbose(`Replacing tenant domain name ${x} with id ${I}`),x=I)}p!==x&&(e=e.replace(`/${x}/`,`/${p}/`))}),this.replaceTenant(e)}get defaultOpenIdConfigurationEndpoint(){let n=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Nu.Adfs||this.protocolMode===nl.OIDC&&!this.isAliasOfKnownMicrosoftAuthority(n)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}resolveEndpointsAsync(){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityResolveEndpointsAsync,this.correlationId);let n=this.getCurrentMetadataEntity(),e=yield _i(this.updateCloudDiscoveryMetadata.bind(this),$e.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,n.preferred_network);let i=yield _i(this.updateEndpointMetadata.bind(this),$e.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(n);this.updateCachedMetadata(n,e,{source:i}),this.performanceClient?.addFields({cloudDiscoverySource:e,authorityEndpointSource:i},this.correlationId)})}getCurrentMetadataEntity(){let n=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return n||(n={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:IV(),jwks_uri:""}),n}updateCachedMetadata(n,e,i){e!==Ou.CACHE&&i?.source!==Ou.CACHE&&(n.expiresAt=IV(),n.canonical_authority=this.canonicalAuthority);let o=this.cacheManager.generateAuthorityMetadataCacheKey(n.preferred_cache);this.cacheManager.setAuthorityMetadata(o,n),this.metadata=n}updateEndpointMetadata(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityUpdateEndpointMetadata,this.correlationId);let e=this.updateEndpointMetadataFromLocalSources(n);if(e){if(e.source===Ou.HARDCODED_VALUES&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&e.metadata){let o=yield _i(this.updateMetadataWithRegionalInformation.bind(this),$e.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(e.metadata);ZT(n,o,!1),n.canonical_authority=this.canonicalAuthority}return e.source}let i=yield _i(this.getEndpointMetadataFromNetwork.bind(this),$e.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(i)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(i=yield _i(this.updateMetadataWithRegionalInformation.bind(this),$e.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(i)),ZT(n,i,!0),Ou.NETWORK;throw Gi(B1,this.defaultOpenIdConfigurationEndpoint)})}updateEndpointMetadataFromLocalSources(n){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");let e=this.getEndpointMetadataFromConfig();if(e)return this.logger.verbose("Found endpoint metadata in authority configuration"),ZT(n,e,!1),{source:Ou.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{let o=this.getEndpointMetadataFromHardcodedValues();if(o)return ZT(n,o,!1),{source:Ou.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}let i=TV(n);return this.isAuthoritySameType(n)&&n.endpointsFromNetwork&&!i?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Ou.CACHE}):(i&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(n){return new Ur(n.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw ys(rC)}return null}getEndpointMetadataFromNetwork(){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);let n={},e=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${e}`);try{let i=yield this.networkInterface.sendGetRequestAsync(e,n);return age(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}})}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in OK?OK[this.hostnameAndPort]:null}updateMetadataWithRegionalInformation(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);let e=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(e){if(e!==Ii.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=dV.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=e,t.replaceWithRegionalInformation(n,e);let i=yield _i(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),$e.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(i)return this.regionDiscoveryMetadata.region_outcome=dV.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=i,t.replaceWithRegionalInformation(n,i);this.regionDiscoveryMetadata.region_outcome=dV.AUTO_DETECTION_REQUESTED_FAILED}return n})}updateCloudDiscoveryMetadata(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);let e=this.updateCloudDiscoveryMetadataFromLocalSources(n);if(e)return e;let i=yield _i(this.getCloudDiscoveryMetadataFromNetwork.bind(this),$e.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(i)return _O(n,i,!0),Ou.NETWORK;throw ys(sC)})}updateCloudDiscoveryMetadataFromLocalSources(n){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Ii.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Ii.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${n.canonical_authority||Ii.NOT_APPLICABLE}`);let e=this.getCloudDiscoveryMetadataFromConfig();if(e)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),_O(n,e,!1),Ou.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{let o=oge(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),_O(n,o,!1),Ou.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}let i=TV(n);return this.isAuthoritySameType(n)&&n.aliasesFromNetwork&&!i?(this.logger.verbose("Found cloud discovery metadata in the cache."),Ou.CACHE):(i&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Nu.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");let n=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),e=JR(n.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),ys(eb)}}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 tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);let n=`${Ii.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,e={},i=null;try{let o=yield this.networkInterface.sendGetRequestAsync(n,e),r,a;if(lge(o.body))r=o.body,a=r.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${r.tenant_discovery_endpoint}`);else if(cge(o.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),r=o.body,r.error===Ii.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${r.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${r.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),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."),i=JR(a,this.hostnameAndPort)}catch(o){if(o instanceof fr)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata. Error: ${o.errorCode} Error Description: ${o.errorMessage}`);else{let r=o;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata. Error: ${r.name} Error Description: ${r.message}`)}return null}return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),i})}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&Ur.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(n,e){let i;if(e&&e.azureCloudInstance!==Xv.None){let o=e.tenant?e.tenant:Ii.DEFAULT_COMMON_TENANT;i=`${e.azureCloudInstance}/${o}/`}return i||n}static createCloudDiscoveryMetadataFromHost(n){return{preferred_network:n,preferred_cache:n,aliases:[n]}}getPreferredCache(){if(this.managedIdentity)return Ii.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Gi(Pu)}isAlias(n){return this.metadata.aliases.indexOf(n)>-1}isAliasOfKnownMicrosoftAuthority(n){return LK.has(n)}static isPublicCloudAuthority(n){return Ii.KNOWN_PUBLIC_CLOUDS.indexOf(n)>=0}static buildRegionalAuthorityString(n,e,i){let o=new Ur(n);o.validateAsUri();let r=o.getUrlComponents(),a=`${e}.${r.HostNameAndPort}`;this.isPublicCloudAuthority(r.HostNameAndPort)&&(a=`${e}.${Ii.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);let p=Ur.constructAuthorityUriFromObject(gt(ve({},o.getUrlComponents()),{HostNameAndPort:a})).urlString;return i?`${p}?${i}`:p}static replaceWithRegionalInformation(n,e){let i=ve({},n);return i.authorization_endpoint=t.buildRegionalAuthorityString(i.authorization_endpoint,e),i.token_endpoint=t.buildRegionalAuthorityString(i.token_endpoint,e),i.end_session_endpoint&&(i.end_session_endpoint=t.buildRegionalAuthorityString(i.end_session_endpoint,e)),i}static transformCIAMAuthority(n){let e=n,o=new Ur(n).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(Ii.CIAM_AUTH_URL)){let r=o.HostNameAndPort.split(".")[0];e=`${e}${r}${Ii.AAD_TENANT_DOMAIN_SUFFIX}`}return e}};Vh.reservedTenantDomains=new Set(["{tenant}","{tenantid}",qm.COMMON,qm.CONSUMERS,qm.ORGANIZATIONS]);function uge(t){let i=new Ur(t).getUrlComponents().PathSegments.slice(-1)[0]?.toLowerCase();switch(i){case qm.COMMON:case qm.ORGANIZATIONS:case qm.CONSUMERS:return;default:return i}}function EV(t){return t.endsWith(Ii.FORWARD_SLASH)?t:`${t}${Ii.FORWARD_SLASH}`}function FZ(t){let n=t.cloudDiscoveryMetadata,e;if(n)try{e=JSON.parse(n)}catch{throw ys(eb)}return{canonicalAuthority:t.authority?EV(t.authority):void 0,knownAuthorities:t.knownAuthorities,cloudDiscoveryMetadata:e}}function NZ(t,n,e,i,o,r,a){return tt(this,null,function*(){a?.addQueueMeasurement($e.AuthorityFactoryCreateDiscoveredInstance,r);let p=Vh.transformCIAMAuthority(EV(t)),f=new Vh(p,n,e,i,o,r,a);try{return yield _i(f.resolveEndpointsAsync.bind(f),$e.AuthorityResolveEndpointsAsync,o,a,r)(),f}catch{throw Gi(Pu)}})}var hp=class t extends fr{constructor(n,e,i,o,r){super(n,e,i),this.name="ServerError",this.errorNo=o,this.status=r,Object.setPrototypeOf(this,t.prototype)}};function A0(t,n,e){return{clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:e,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid,embeddedClientId:n.embeddedClientId||n.tokenBodyParameters?.clientId}}var D0=class t{static generateThrottlingStorageKey(n){return`${g0.THROTTLING_PREFIX}.${JSON.stringify(n)}`}static preProcess(n,e,i){let o=t.generateThrottlingStorageKey(e),r=n.getThrottlingCache(o);if(r){if(r.throttleTime=500&&n.status<600}static checkResponseForRetryAfter(n){return n.headers?n.headers.hasOwnProperty(Ql.RETRY_AFTER)&&(n.status<200||n.status>=300):!1}static calculateThrottleTime(n){let e=n<=0?0:n,i=Date.now()/1e3;return Math.floor(Math.min(i+(e||g0.DEFAULT_THROTTLE_TIME_SECONDS),i+g0.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(n,e,i,o){let r=A0(e,i,o),a=this.generateThrottlingStorageKey(r);n.removeItem(a,i.correlationId)}};var QT=class t extends fr{constructor(n,e,i){super(n.errorCode,n.errorMessage,n.subError),Object.setPrototypeOf(this,t.prototype),this.name="NetworkError",this.error=n,this.httpStatus=e,this.responseHeaders=i}};function gC(t,n,e,i){return t.errorMessage=`${t.errorMessage}, additionalErrorInfo: error.name:${i?.name}, error.message:${i?.message}`,new QT(t,n,e)}var nb=class{constructor(n,e){this.config=rge(n),this.logger=new Lu(this.config.loggerOptions,hV,UT),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=e}createTokenRequestHeaders(n){let e={};if(e[Ql.CONTENT_TYPE]=Ii.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case Gd.HOME_ACCOUNT_ID:try{let i=kg(n.credential);e[Ql.CCS_HEADER]=`Oid:${i.uid}@${i.utid}`}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case Gd.UPN:e[Ql.CCS_HEADER]=`UPN: ${n.credential}`;break}return e}executePostToTokenEndpoint(n,e,i,o,r,a){return tt(this,null,function*(){a&&this.performanceClient?.addQueueMeasurement(a,r);let p=yield this.sendPostRequest(o,n,{body:e,headers:i},r);return this.config.serverTelemetryManager&&p.status<500&&p.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),p})}sendPostRequest(n,e,i,o){return tt(this,null,function*(){D0.preProcess(this.cacheManager,n,o);let r;try{r=yield _i(this.networkClient.sendPostRequestAsync.bind(this.networkClient),$e.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,o)(e,i);let a=r.headers||{};this.performanceClient?.addFields({refreshTokenSize:r.body.refresh_token?.length||0,httpVerToken:a[Ql.X_MS_HTTP_VERSION]||"",requestId:a[Ql.X_MS_REQUEST_ID]||""},o)}catch(a){if(a instanceof QT){let p=a.responseHeaders;throw p&&this.performanceClient?.addFields({httpVerToken:p[Ql.X_MS_HTTP_VERSION]||"",requestId:p[Ql.X_MS_REQUEST_ID]||"",contentTypeHeader:p[Ql.CONTENT_TYPE]||void 0,contentLengthHeader:p[Ql.CONTENT_LENGTH]||void 0,httpStatus:a.httpStatus},o),a.error}throw a instanceof fr?a:Gi(N1)}return D0.postProcess(this.cacheManager,n,r,o),r})}updateAuthority(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.UpdateTokenEndpointAuthority,e);let i=`https://${n}/${this.authority.tenant}/`,o=yield NZ(i,this.networkClient,this.cacheManager,this.authority.options,this.logger,e,this.performanceClient);this.authority=o})}createTokenQueryParameters(n){let e=new Map;return n.embeddedClientId&&E0(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenQueryParameters&&T0(e,n.tokenQueryParameters),mC(e,n.correlationId),cC(e,n.correlationId,this.performanceClient),Ag(e)}};function DV(t){return t&&(t.tid||t.tfp||t.acr)||null}var Cd=class t{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(n=>[n.tenantId,n]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(n,e,i){let o=new t;e.authorityType===Nu.Adfs?o.authorityType=BT.ADFS_ACCOUNT_TYPE:e.protocolMode===nl.OIDC?o.authorityType=BT.GENERIC_ACCOUNT_TYPE:o.authorityType=BT.MSSTS_ACCOUNT_TYPE;let r;n.clientInfo&&i&&(r=$T(n.clientInfo,i)),o.clientInfo=n.clientInfo,o.homeAccountId=n.homeAccountId,o.nativeAccountId=n.nativeAccountId;let a=n.environment||e&&e.getPreferredCache();if(!a)throw Gi(v0);o.environment=a,o.realm=r?.utid||DV(n.idTokenClaims)||"",o.localAccountId=r?.uid||n.idTokenClaims?.oid||n.idTokenClaims?.sub||"";let p=n.idTokenClaims?.preferred_username||n.idTokenClaims?.upn,f=n.idTokenClaims?.emails?n.idTokenClaims.emails[0]:null;if(o.username=p||f||"",o.loginHint=n.idTokenClaims?.login_hint,o.name=n.idTokenClaims?.name||"",o.cloudGraphHostName=n.cloudGraphHostName,o.msGraphHost=n.msGraphHost,n.tenantProfiles)o.tenantProfiles=n.tenantProfiles;else{let x=HT(n.homeAccountId,o.localAccountId,o.realm,n.idTokenClaims);o.tenantProfiles=[x]}return o}static createFromAccountInfo(n,e,i){let o=new t;return o.authorityType=n.authorityType||BT.GENERIC_ACCOUNT_TYPE,o.homeAccountId=n.homeAccountId,o.localAccountId=n.localAccountId,o.nativeAccountId=n.nativeAccountId,o.realm=n.tenantId,o.environment=n.environment,o.username=n.username,o.name=n.name,o.loginHint=n.loginHint,o.cloudGraphHostName=e,o.msGraphHost=i,o.tenantProfiles=Array.from(n.tenantProfiles?.values()||[]),o}static generateHomeAccountId(n,e,i,o,r){if(!(e===Nu.Adfs||e===Nu.Dsts)){if(n)try{let a=$T(n,o.base64Decode);if(a.uid&&a.utid)return`${a.uid}.${a.utid}`}catch{}i.warning("No client info in response")}return r?.sub||""}static isAccountEntity(n){return n?n.hasOwnProperty("homeAccountId")&&n.hasOwnProperty("environment")&&n.hasOwnProperty("realm")&&n.hasOwnProperty("localAccountId")&&n.hasOwnProperty("username")&&n.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(n,e,i){if(!n||!e)return!1;let o=!0;if(i){let r=n.idTokenClaims||{},a=e.idTokenClaims||{};o=r.iat===a.iat&&r.nonce===a.nonce}return n.homeAccountId===e.homeAccountId&&n.localAccountId===e.localAccountId&&n.username===e.username&&n.tenantId===e.tenantId&&n.loginHint===e.loginHint&&n.environment===e.environment&&n.nativeAccountId===e.nativeAccountId&&o}};var Rg={};Wu(Rg,{badToken:()=>rb,consentRequired:()=>zZ,interactionRequired:()=>BZ,loginRequired:()=>VZ,nativeAccountUnavailable:()=>yO,noTokensFound:()=>ob,refreshTokenExpired:()=>vO,uxNotAllowed:()=>kV});var ob="no_tokens_found",yO="native_account_unavailable",vO="refresh_token_expired",kV="ux_not_allowed",BZ="interaction_required",zZ="consent_required",VZ="login_required",rb="bad_token";var pge=[BZ,zZ,VZ,rb,kV],fHe=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],MV={[ob]:"No refresh token found in the cache. Please sign-in.",[yO]:"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.",[vO]:"Refresh token has expired.",[rb]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[kV]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."},hge={noTokensFoundError:{code:ob,desc:MV[ob]},native_account_unavailable:{code:yO,desc:MV[yO]},bad_token:{code:rb,desc:MV[rb]}},od=class t extends fr{constructor(n,e,i,o,r,a,p,f){super(n,e,i),Object.setPrototypeOf(this,t.prototype),this.timestamp=o||Ii.EMPTY_STRING,this.traceId=r||Ii.EMPTY_STRING,this.correlationId=a||Ii.EMPTY_STRING,this.claims=p||Ii.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}};function RV(t,n,e){let i=!!t&&pge.indexOf(t)>-1,o=!!e&&fHe.indexOf(e)>-1,r=!!n&&pge.some(a=>n.indexOf(a)>-1);return i||r||o}function _C(t){return new od(t,MV[t])}var Km=class t{static setRequestState(n,e,i){let o=t.generateLibraryState(n,i);return e?`${o}${Ii.RESOURCE_DELIM}${e}`:o}static generateLibraryState(n,e){if(!n)throw Gi(Yv);let i={id:n.createNewGuid()};e&&(i.meta=e);let o=JSON.stringify(i);return n.base64Encode(o)}static parseRequestState(n,e){if(!n)throw Gi(Yv);if(!e)throw Gi(Wm);try{let i=e.split(Ii.RESOURCE_DELIM),o=i[0],r=i.length>1?i.slice(1).join(Ii.RESOURCE_DELIM):Ii.EMPTY_STRING,a=n.base64Decode(o),p=JSON.parse(a);return{userRequestState:r||Ii.EMPTY_STRING,libraryState:p}}catch{throw Gi(Wm)}}};var gHe={SW:"sw"},mp=class{constructor(n,e){this.cryptoUtils=n,this.performanceClient=e}generateCnf(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.PopTokenGenerateCnf,n.correlationId);let i=yield _i(this.generateKid.bind(this),$e.PopTokenGenerateCnf,e,this.performanceClient,n.correlationId)(n),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(i));return{kid:i.kid,reqCnfString:o}})}generateKid(n){return tt(this,null,function*(){return this.performanceClient?.addQueueMeasurement($e.PopTokenGenerateKid,n.correlationId),{kid:yield this.cryptoUtils.getPublicKeyThumbprint(n),xms_ksl:gHe.SW}})}signPopToken(n,e,i){return tt(this,null,function*(){return this.signPayload(n,e,i)})}signPayload(n,e,i,o){return tt(this,null,function*(){let{resourceRequestMethod:r,resourceRequestUri:a,shrClaims:p,shrNonce:f,shrOptions:x}=i,D=(a?new Ur(a):void 0)?.getUrlComponents();return this.cryptoUtils.signJwt(ve({at:n,ts:Xp(),m:r?.toUpperCase(),u:D?.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:D?.AbsolutePath,q:D?.QueryString?[[],D.QueryString]:void 0,client_claims:p||void 0},o),e,x,i.correlationId)})}};var OV=class{constructor(n,e){this.cache=n,this.hasChanged=e}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}};var Zm=class t{constructor(n,e,i,o,r,a,p){this.clientId=n,this.cacheStorage=e,this.cryptoObj=i,this.logger=o,this.serializableCache=r,this.persistencePlugin=a,this.performanceClient=p}validateTokenResponse(n,e){if(n.error||n.error_description||n.suberror){let i=`Error(s): ${n.error_codes||Ii.NOT_AVAILABLE} - Timestamp: ${n.timestamp||Ii.NOT_AVAILABLE} - Description: ${n.error_description||Ii.NOT_AVAILABLE} - Correlation ID: ${n.correlation_id||Ii.NOT_AVAILABLE} - Trace ID: ${n.trace_id||Ii.NOT_AVAILABLE}`,o=n.error_codes?.length?n.error_codes[0]:void 0,r=new hp(n.error,i,n.suberror,o,n.status);if(e&&n.status&&n.status>=$m.SERVER_ERROR_RANGE_START&&n.status<=$m.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed. ${r}`);return}else if(e&&n.status&&n.status>=$m.CLIENT_ERROR_RANGE_START&&n.status<=$m.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token. ${r}`);return}throw RV(n.error,n.error_description,n.suberror)?new od(n.error,n.error_description,n.suberror,n.timestamp||Ii.EMPTY_STRING,n.trace_id||Ii.EMPTY_STRING,n.correlation_id||Ii.EMPTY_STRING,n.claims||Ii.EMPTY_STRING,o):r}}handleServerTokenResponse(n,e,i,o,r,a,p,f,x){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.HandleServerTokenResponse,n.correlation_id);let I;if(n.id_token){if(I=C0(n.id_token||Ii.EMPTY_STRING,this.cryptoObj.base64Decode),r&&r.nonce&&I.nonce!==r.nonce)throw Gi(U1);if(o.maxAge||o.maxAge===0){let j=I.auth_time;if(!j)throw Gi(_0);XR(j,o.maxAge)}}this.homeAccountIdentifier=Cd.generateHomeAccountId(n.client_info||Ii.EMPTY_STRING,e.authorityType,this.logger,this.cryptoObj,I);let D;r&&r.state&&(D=Km.parseRequestState(this.cryptoObj,r.state)),n.key_id=n.key_id||o.sshKid||void 0;let P=this.generateCacheRecord(n,e,i,o,I,a,r),R;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),R=new OV(this.serializableCache,!0),yield this.persistencePlugin.beforeCacheAccess(R)),p&&!f&&P.account){let j=this.cacheStorage.generateAccountKey(P.account.getAccountInfo());if(!this.cacheStorage.getAccount(j,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),yield t.generateAuthenticationResult(this.cryptoObj,e,P,!1,o,I,D,void 0,x)}yield this.cacheStorage.saveCacheRecord(P,o.correlationId,o.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,o,I,D,n,x)})}generateCacheRecord(n,e,i,o,r,a,p){let f=e.getPreferredCache();if(!f)throw Gi(v0);let x=DV(r),I,D;n.id_token&&r&&(I=OZ(this.homeAccountIdentifier,f,n.id_token,this.clientId,x||""),D=XT(this.cacheStorage,e,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,r,n.client_info,f,x,p,void 0,this.logger));let P=null;if(n.access_token){let $=n.scope?bl.fromString(n.scope):new bl(o.scopes||[]),W=(typeof n.expires_in=="string"?parseInt(n.expires_in,10):n.expires_in)||0,Q=(typeof n.ext_expires_in=="string"?parseInt(n.ext_expires_in,10):n.ext_expires_in)||0,se=(typeof n.refresh_in=="string"?parseInt(n.refresh_in,10):n.refresh_in)||void 0,ge=i+W,Re=ge+Q,Se=se&&se>0?i+se:void 0;P=PZ(this.homeAccountIdentifier,f,n.access_token,this.clientId,x||e.tenant||"",$.printScopes(),ge,Re,this.cryptoObj.base64Decode,Se,n.token_type,a,n.key_id,o.claims,o.requestedClaimsHash)}let R=null;if(n.refresh_token){let $;if(n.refresh_token_expires_in){let W=typeof n.refresh_token_expires_in=="string"?parseInt(n.refresh_token_expires_in,10):n.refresh_token_expires_in;$=i+W}R=LZ(this.homeAccountIdentifier,f,n.refresh_token,this.clientId,n.foci,a,$)}let j=null;return n.foci&&(j={clientId:this.clientId,environment:f,familyId:n.foci}),{account:D,idToken:I,accessToken:P,refreshToken:R,appMetadata:j}}static generateAuthenticationResult(n,e,i,o,r,a,p,f,x){return tt(this,null,function*(){let I=Ii.EMPTY_STRING,D=[],P=null,R,j,$=Ii.EMPTY_STRING;if(i.accessToken){if(i.accessToken.tokenType===Qr.POP&&!r.popKid){let ge=new mp(n),{secret:Re,keyId:Se}=i.accessToken;if(!Se)throw Gi(Q1);I=yield ge.signPopToken(Re,Se,r)}else I=i.accessToken.secret;D=bl.fromString(i.accessToken.target).asArray(),P=gO(i.accessToken.expiresOn),R=gO(i.accessToken.extendedExpiresOn),i.accessToken.refreshOn&&(j=gO(i.accessToken.refreshOn))}i.appMetadata&&($=i.appMetadata.familyId===O1?O1:"");let W=a?.oid||a?.sub||"",Q=a?.tid||"";f?.spa_accountid&&i.account&&(i.account.nativeAccountId=f?.spa_accountid);let se=i.account?aC(i.account.getAccountInfo(),void 0,a,i.idToken?.secret):null;return{authority:e.canonicalAuthority,uniqueId:W,tenantId:Q,scopes:D,account:se,idToken:i?.idToken?.secret||"",idTokenClaims:a||{},accessToken:I,fromCache:o,expiresOn:P,extExpiresOn:R,refreshOn:j,correlationId:r.correlationId,requestId:x||Ii.EMPTY_STRING,familyId:$,tokenType:i.accessToken?.tokenType||Ii.EMPTY_STRING,state:p?p.userRequestState:Ii.EMPTY_STRING,cloudGraphHostName:i.account?.cloudGraphHostName||Ii.EMPTY_STRING,msGraphHost:i.account?.msGraphHost||Ii.EMPTY_STRING,code:f?.spa_code,fromNativeBroker:!1}})}};function XT(t,n,e,i,o,r,a,p,f,x,I,D){D?.verbose("setCachedAccount called");let R=t.getAccountKeys().find(se=>se.startsWith(e)),j=null;R&&(j=t.getAccount(R,o));let $=j||Cd.createAccount({homeAccountId:e,idTokenClaims:r,clientInfo:a,environment:p,cloudGraphHostName:x?.cloud_graph_host_name,msGraphHost:x?.msgraph_host,nativeAccountId:I},n,i),W=$.tenantProfiles||[],Q=f||$.realm;if(Q&&!W.find(se=>se.tenantId===Q)){let se=HT(e,$.localAccountId,Q,r);W.push(se)}return $.tenantProfiles=W,$}function PV(t,n,e){return tt(this,null,function*(){return typeof t=="string"?t:t({clientId:n,tokenEndpoint:e})})}var yC=class extends nb{constructor(n,e){super(n,e),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}acquireToken(n,e){return tt(this,null,function*(){if(this.performanceClient?.addQueueMeasurement($e.AuthClientAcquireToken,n.correlationId),!n.code)throw Gi(G1);let i=Xp(),o=yield _i(this.executeTokenRequest.bind(this),$e.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,n.correlationId)(this.authority,n),r=o.headers?.[Ql.X_MS_REQUEST_ID],a=new Zm(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return a.validateTokenResponse(o.body),_i(a.handleServerTokenResponse.bind(a),$e.HandleServerTokenResponse,this.logger,this.performanceClient,n.correlationId)(o.body,this.authority,i,n,e,void 0,void 0,void 0,r)})}getLogoutUri(n){if(!n)throw ys(nC);let e=this.createLogoutUrlQueryString(n);return Ur.appendQueryString(this.authority.endSessionEndpoint,e)}executeTokenRequest(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthClientExecuteTokenRequest,e.correlationId);let i=this.createTokenQueryParameters(e),o=Ur.appendQueryString(n.tokenEndpoint,i),r=yield _i(this.createTokenRequestBody.bind(this),$e.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),a;if(e.clientInfo)try{let x=$T(e.clientInfo,this.cryptoUtils.base64Decode);a={credential:`${x.uid}${f0.CLIENT_INFO_SEPARATOR}${x.utid}`,type:Gd.HOME_ACCOUNT_ID}}catch(x){this.logger.verbose("Could not parse client info for CCS Header: "+x)}let p=this.createTokenRequestHeaders(a||e.ccsCredential),f=A0(this.config.authOptions.clientId,e);return _i(this.executePostToTokenEndpoint.bind(this),$e.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(o,r,p,f,e.correlationId,$e.AuthorizationCodeClientExecutePostToTokenEndpoint)})}createTokenRequestBody(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.AuthClientCreateTokenRequestBody,n.correlationId);let e=new Map;if(uC(e,n.embeddedClientId||n.tokenBodyParameters?.[Mg]||this.config.authOptions.clientId),this.includeRedirectUri)pC(e,n.redirectUri);else if(!n.redirectUri)throw ys(X1);if(dC(e,n.scopes,!0,this.oidcDefaultScopes),AZ(e,n.code),oO(e,this.config.libraryInfo),rO(e,this.config.telemetry.application),fO(e),this.serverTelemetryManager&&!_V(this.config)&&mO(e,this.serverTelemetryManager),n.codeVerifier&&kZ(e,n.codeVerifier),this.config.clientCredentials.clientSecret&&aO(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let o=this.config.clientCredentials.clientAssertion;lO(e,yield PV(o.assertion,this.config.authOptions.clientId,n.resourceRequestUri)),cO(e,o.assertionType)}if(dO(e,bR.AUTHORIZATION_CODE_GRANT),fC(e),n.authenticationScheme===Qr.POP){let o=new mp(this.cryptoUtils,this.performanceClient),r;n.popKid?r=this.cryptoUtils.encodeKid(n.popKid):r=(yield _i(o.generateCnf.bind(o),$e.PopTokenGenerateCnf,this.logger,this.performanceClient,n.correlationId)(n,this.logger)).reqCnfString,pO(e,r)}else if(n.authenticationScheme===Qr.SSH)if(n.sshJwk)hO(e,n.sshJwk);else throw ys(x0);(!ka.isEmptyObj(n.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&hC(e,n.claims,this.config.authOptions.clientCapabilities);let i;if(n.clientInfo)try{let o=$T(n.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${o.uid}${f0.CLIENT_INFO_SEPARATOR}${o.utid}`,type:Gd.HOME_ACCOUNT_ID}}catch(o){this.logger.verbose("Could not parse client info for CCS Header: "+o)}else i=n.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&i)switch(i.type){case Gd.HOME_ACCOUNT_ID:try{let o=kg(i.credential);I0(e,o)}catch(o){this.logger.verbose("Could not parse home account ID for CCS Header: "+o)}break;case Gd.UPN:ib(e,i.credential);break}return n.embeddedClientId&&E0(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenBodyParameters&&T0(e,n.tokenBodyParameters),n.enableSpaAuthorizationCode&&(!n.tokenBodyParameters||!n.tokenBodyParameters[xV])&&T0(e,{[xV]:"1"}),cC(e,n.correlationId,this.performanceClient),Ag(e)})}createLogoutUrlQueryString(n){let e=new Map;return n.postLogoutRedirectUri&&wZ(e,n.postLogoutRedirectUri),n.correlationId&&mC(e,n.correlationId),n.idTokenHint&&SZ(e,n.idTokenHint),n.state&&sO(e,n.state),n.logoutHint&&MZ(e,n.logoutHint),n.extraQueryParameters&&T0(e,n.extraQueryParameters),this.config.authOptions.instanceAware&&uO(e),Ag(e,this.config.authOptions.encodeExtraQueryParams,n.extraQueryParameters)}};var _He=300,bO=class extends nb{constructor(n,e){super(n,e)}acquireToken(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RefreshTokenClientAcquireToken,n.correlationId);let e=Xp(),i=yield _i(this.executeTokenRequest.bind(this),$e.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,n.correlationId)(n,this.authority),o=i.headers?.[Ql.X_MS_REQUEST_ID],r=new Zm(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return r.validateTokenResponse(i.body),_i(r.handleServerTokenResponse.bind(r),$e.HandleServerTokenResponse,this.logger,this.performanceClient,n.correlationId)(i.body,this.authority,e,n,void 0,void 0,!0,n.forceCache,o)})}acquireTokenByRefreshToken(n){return tt(this,null,function*(){if(!n)throw ys(iC);if(this.performanceClient?.addQueueMeasurement($e.RefreshTokenClientAcquireTokenByRefreshToken,n.correlationId),!n.account)throw Gi(y0);if(this.cacheManager.isAppMetadataFOCI(n.account.environment))try{return yield _i(this.acquireTokenWithCachedRefreshToken.bind(this),$e.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!0)}catch(i){let o=i instanceof od&&i.errorCode===ob,r=i instanceof hp&&i.errorCode===lV.INVALID_GRANT_ERROR&&i.subError===lV.CLIENT_MISMATCH_ERROR;if(o||r)return _i(this.acquireTokenWithCachedRefreshToken.bind(this),$e.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!1);throw i}return _i(this.acquireTokenWithCachedRefreshToken.bind(this),$e.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,!1)})}acquireTokenWithCachedRefreshToken(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RefreshTokenClientAcquireTokenWithCachedRefreshToken,n.correlationId);let i=xl(this.cacheManager.getRefreshToken.bind(this.cacheManager),$e.CacheManagerGetRefreshToken,this.logger,this.performanceClient,n.correlationId)(n.account,e,n.correlationId,void 0,this.performanceClient);if(!i)throw _C(ob);if(i.expiresOn&&KT(i.expiresOn,n.refreshTokenExpirationOffsetSeconds||_He))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},n.correlationId),_C(vO);let o=gt(ve({},n),{refreshToken:i.secret,authenticationScheme:n.authenticationScheme||Qr.BEARER,ccsCredential:{credential:n.account.homeAccountId,type:Gd.HOME_ACCOUNT_ID}});try{return yield _i(this.acquireToken.bind(this),$e.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(o)}catch(r){if(r instanceof od&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(i.expiresOn)},n.correlationId),r.subError===rb)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");let a=this.cacheManager.generateCredentialKey(i);this.cacheManager.removeRefreshToken(a,n.correlationId)}throw r}})}executeTokenRequest(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RefreshTokenClientExecuteTokenRequest,n.correlationId);let i=this.createTokenQueryParameters(n),o=Ur.appendQueryString(e.tokenEndpoint,i),r=yield _i(this.createTokenRequestBody.bind(this),$e.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,n.correlationId)(n),a=this.createTokenRequestHeaders(n.ccsCredential),p=A0(this.config.authOptions.clientId,n);return _i(this.executePostToTokenEndpoint.bind(this),$e.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,n.correlationId)(o,r,a,p,n.correlationId,$e.RefreshTokenClientExecutePostToTokenEndpoint)})}createTokenRequestBody(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.RefreshTokenClientCreateTokenRequestBody,n.correlationId);let e=new Map;if(uC(e,n.embeddedClientId||n.tokenBodyParameters?.[Mg]||this.config.authOptions.clientId),n.redirectUri&&pC(e,n.redirectUri),dC(e,n.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),dO(e,bR.REFRESH_TOKEN_GRANT),fC(e),oO(e,this.config.libraryInfo),rO(e,this.config.telemetry.application),fO(e),this.serverTelemetryManager&&!_V(this.config)&&mO(e,this.serverTelemetryManager),DZ(e,n.refreshToken),this.config.clientCredentials.clientSecret&&aO(e,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){let i=this.config.clientCredentials.clientAssertion;lO(e,yield PV(i.assertion,this.config.authOptions.clientId,n.resourceRequestUri)),cO(e,i.assertionType)}if(n.authenticationScheme===Qr.POP){let i=new mp(this.cryptoUtils,this.performanceClient),o;n.popKid?o=this.cryptoUtils.encodeKid(n.popKid):o=(yield _i(i.generateCnf.bind(i),$e.PopTokenGenerateCnf,this.logger,this.performanceClient,n.correlationId)(n,this.logger)).reqCnfString,pO(e,o)}else if(n.authenticationScheme===Qr.SSH)if(n.sshJwk)hO(e,n.sshJwk);else throw ys(x0);if((!ka.isEmptyObj(n.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&hC(e,n.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&n.ccsCredential)switch(n.ccsCredential.type){case Gd.HOME_ACCOUNT_ID:try{let i=kg(n.ccsCredential.credential);I0(e,i)}catch(i){this.logger.verbose("Could not parse home account ID for CCS Header: "+i)}break;case Gd.UPN:ib(e,n.ccsCredential.credential);break}return n.embeddedClientId&&E0(e,this.config.authOptions.clientId,this.config.authOptions.redirectUri),n.tokenBodyParameters&&T0(e,n.tokenBodyParameters),cC(e,n.correlationId,this.performanceClient),Ag(e)})}};var xO=class extends nb{constructor(n,e){super(n,e)}acquireCachedToken(n){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.SilentFlowClientAcquireCachedToken,n.correlationId);let e=Tg.NOT_APPLICABLE;if(n.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!ka.isEmptyObj(n.claims))throw this.setCacheOutcome(Tg.FORCE_REFRESH_OR_CLAIMS,n.correlationId),Gi(b0);if(!n.account)throw Gi(y0);let i=n.account.tenantId||uge(n.authority),o=this.cacheManager.getTokenKeys(),r=this.cacheManager.getAccessToken(n.account,n,o,i);if(r){if(RZ(r.cachedAt)||KT(r.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Tg.CACHED_ACCESS_TOKEN_EXPIRED,n.correlationId),Gi(b0);r.refreshOn&&KT(r.refreshOn,0)&&(e=Tg.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Tg.NO_CACHED_ACCESS_TOKEN,n.correlationId),Gi(b0);let a=n.authority||this.authority.getPreferredCache(),p={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(n.account),n.correlationId),accessToken:r,idToken:this.cacheManager.getIdToken(n.account,n.correlationId,o,i,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(e,n.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[yield _i(this.generateResultFromCacheRecord.bind(this),$e.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,n.correlationId)(p,n),e]})}setCacheOutcome(n,e){this.serverTelemetryManager?.setCacheOutcome(n),this.performanceClient?.addFields({cacheOutcome:n},e),n!==Tg.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${n}`)}generateResultFromCacheRecord(n,e){return tt(this,null,function*(){this.performanceClient?.addQueueMeasurement($e.SilentFlowClientGenerateResultFromCacheRecord,e.correlationId);let i;if(n.idToken&&(i=C0(n.idToken.secret,this.config.cryptoInterface.base64Decode)),e.maxAge||e.maxAge===0){let o=i?.auth_time;if(!o)throw Gi(_0);XR(o,e.maxAge)}return Zm.generateAuthenticationResult(this.cryptoUtils,this.authority,n,!0,e,i)})}};var UZ={sendGetRequestAsync:()=>Promise.reject(Gi(Vr)),sendPostRequestAsync:()=>Promise.reject(Gi(Vr))};var Og={};Wu(Og,{getAuthorizationCodePayload:()=>bHe,getAuthorizeUrl:()=>vHe,getStandardAuthorizeRequestParameters:()=>yHe,validateAuthorizationResponse:()=>mge});function yHe(t,n,e,i){let o=n.correlationId,r=new Map;uC(r,n.embeddedClientId||n.extraQueryParameters?.[Mg]||t.clientId);let a=[...n.scopes||[],...n.extraScopesToConsent||[]];if(dC(r,a,!0,t.authority.options.OIDCOptions?.defaultScopes),pC(r,n.redirectUri),mC(r,o),CZ(r,n.responseMode),fC(r),n.prompt&&(TZ(r,n.prompt),i?.addFields({prompt:n.prompt},o)),n.domainHint&&(IZ(r,n.domainHint),i?.addFields({domainHintFromRequest:!0},o)),n.prompt!==Xl.SELECT_ACCOUNT)if(n.sid&&n.prompt===Xl.NONE)e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),wV(r,n.sid),i?.addFields({sidFromRequest:!0},o);else if(n.account){let p=CHe(n.account),f=wHe(n.account);if(f&&n.domainHint&&(e.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),f=null),f){e.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),WT(r,f),i?.addFields({loginHintFromClaim:!0},o);try{let x=kg(n.account.homeAccountId);I0(r,x)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(p&&n.prompt===Xl.NONE){e.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),wV(r,p),i?.addFields({sidFromClaim:!0},o);try{let x=kg(n.account.homeAccountId);I0(r,x)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(n.loginHint)e.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),WT(r,n.loginHint),ib(r,n.loginHint),i?.addFields({loginHintFromRequest:!0},o);else if(n.account.username){e.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),WT(r,n.account.username),i?.addFields({loginHintFromUpn:!0},o);try{let x=kg(n.account.homeAccountId);I0(r,x)}catch{e.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else n.loginHint&&(e.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),WT(r,n.loginHint),ib(r,n.loginHint),i?.addFields({loginHintFromRequest:!0},o));else e.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");return n.nonce&&EZ(r,n.nonce),n.state&&sO(r,n.state),(n.claims||t.clientCapabilities&&t.clientCapabilities.length>0)&&hC(r,n.claims,t.clientCapabilities),n.embeddedClientId&&E0(r,t.clientId,t.redirectUri),t.instanceAware&&(!n.extraQueryParameters||!Object.keys(n.extraQueryParameters).includes(qT))&&uO(r),r}function vHe(t,n,e,i){let o=Ag(n,e,i);return Ur.appendQueryString(t.authorizationEndpoint,o)}function bHe(t,n){if(mge(t,n),!t.code)throw Gi(Z1);return t}function mge(t,n){if(!t.state||!n)throw t.state?Gi(Kv,"Cached State"):Gi(Kv,"Server State");let e,i;try{e=decodeURIComponent(t.state)}catch{throw Gi(Wm,t.state)}try{i=decodeURIComponent(n)}catch{throw Gi(Wm,t.state)}if(e!==i)throw Gi(V1);if(t.error||t.error_description||t.suberror){let o=xHe(t);throw RV(t.error,t.error_description,t.suberror)?new od(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||"",o):new hp(t.error||"",t.error_description,t.suberror,o)}}function xHe(t){let n="code=",e=t.error_uri?.lastIndexOf(n);return e&&e>=0?t.error_uri?.substring(e+n.length):void 0}function CHe(t){return t.idTokenClaims?.sid||null}function wHe(t){return t.loginHint||t.idTokenClaims?.login_hint||null}var fge=",",gge="|";function SHe(t){let{skus:n,libraryName:e,libraryVersion:i,extensionName:o,extensionVersion:r}=t,a=new Map([[0,[e,i]],[2,[o,r]]]),p=[];if(n?.length){if(p=n.split(fge),p.length<4)return n}else p=Array.from({length:4},()=>gge);return a.forEach((f,x)=>{f.length===2&&f[0]?.length&&f[1]?.length&&IHe({skuArr:p,index:x,skuName:f[0],skuVersion:f[1]})}),p.join(fge)}function IHe(t){let{skuArr:n,index:e,skuName:i,skuVersion:o}=t;e>=n.length||(n[e]=[i,o].join(gge))}var vC=class t{constructor(n,e){this.cacheOutcome=Tg.NOT_APPLICABLE,this.cacheManager=e,this.apiId=n.apiId,this.correlationId=n.correlationId,this.wrapperSKU=n.wrapperSKU||Ii.EMPTY_STRING,this.wrapperVer=n.wrapperVer||Ii.EMPTY_STRING,this.telemetryCacheKey=Lc.CACHE_KEY+f0.CACHE_KEY_SEPARATOR+n.clientId}generateCurrentRequestHeaderValue(){let n=`${this.apiId}${Lc.VALUE_SEPARATOR}${this.cacheOutcome}`,e=[this.wrapperSKU,this.wrapperVer],i=this.getNativeBrokerErrorCode();i?.length&&e.push(`broker_error=${i}`);let o=e.join(Lc.VALUE_SEPARATOR),r=this.getRegionDiscoveryFields(),a=[n,r].join(Lc.VALUE_SEPARATOR);return[Lc.SCHEMA_VERSION,a,o].join(Lc.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){let n=this.getLastRequests(),e=t.maxErrorsToSend(n),i=n.failedRequests.slice(0,2*e).join(Lc.VALUE_SEPARATOR),o=n.errors.slice(0,e).join(Lc.VALUE_SEPARATOR),r=n.errors.length,a=e=Lc.MAX_CACHED_ERRORS&&(e.failedRequests.shift(),e.failedRequests.shift(),e.errors.shift()),e.failedRequests.push(this.apiId,this.correlationId),n instanceof Error&&n&&n.toString()?n instanceof fr?n.subError?e.errors.push(n.subError):n.errorCode?e.errors.push(n.errorCode):e.errors.push(n.toString()):e.errors.push(n.toString()):e.errors.push(Lc.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId)}incrementCacheHits(){let n=this.getLastRequests();return n.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,n,this.correlationId),n.cacheHits}getLastRequests(){let n={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||n}clearTelemetryCache(){let n=this.getLastRequests(),e=t.maxErrorsToSend(n),i=n.errors.length;if(e===i)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{let o={failedRequests:n.failedRequests.slice(e*2),errors:n.errors.slice(e),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o,this.correlationId)}}static maxErrorsToSend(n){let e,i=0,o=0,r=n.errors.length;for(e=0;eString.fromCodePoint(e)).join("");return btoa(n)}function $d(t){return new TextDecoder().decode(zg(t))}function zg(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw xn(wE)}let e=atob(n);return Uint8Array.from(e,i=>i.codePointAt(0)||0)}var EHe="RSASSA-PKCS1-v1_5",EE="AES-GCM",wge="HKDF",ZZ="SHA-256",AHe=2048,DHe=new Uint8Array([1,0,1]),xge="0123456789abcdef",Cge=new Uint32Array(1),YZ="raw",Sge="encrypt",QZ="decrypt",kHe="deriveKey",MHe="crypto_subtle_undefined",XZ={name:EHe,hash:ZZ,modulusLength:AHe,publicExponent:DHe};function Ige(t){if(!window)throw xn(Fg);if(!window.crypto)throw xn(xC);if(!t&&!window.crypto.subtle)throw xn(xC,MHe)}function JZ(t,n,e){return tt(this,null,function*(){n?.addQueueMeasurement($e.Sha256Digest,e);let o=new TextEncoder().encode(t);return window.crypto.subtle.digest(ZZ,o)})}function Tge(t){return window.crypto.getRandomValues(t)}function KZ(){return window.crypto.getRandomValues(Cge),Cge[0]}function Bc(){let t=Date.now(),n=KZ()*1024+(KZ()&1023),e=new Uint8Array(16),i=Math.trunc(n/2**30),o=n&2**30-1,r=KZ();e[0]=t/2**40,e[1]=t/2**32,e[2]=t/2**24,e[3]=t/2**16,e[4]=t/2**8,e[5]=t,e[6]=112|i>>>8,e[7]=i,e[8]=128|o>>>24,e[9]=o>>>16,e[10]=o>>>8,e[11]=o,e[12]=r>>>24,e[13]=r>>>16,e[14]=r>>>8,e[15]=r;let a="";for(let p=0;p>>4),a+=xge.charAt(e[p]&15),(p===3||p===5||p===7||p===9)&&(a+="-");return a}function Ege(t,n){return tt(this,null,function*(){return window.crypto.subtle.generateKey(XZ,t,n)})}function qV(t){return tt(this,null,function*(){return window.crypto.subtle.exportKey(qZ,t)})}function Age(t,n,e){return tt(this,null,function*(){return window.crypto.subtle.importKey(qZ,t,XZ,n,e)})}function Dge(t,n){return tt(this,null,function*(){return window.crypto.subtle.sign(XZ,t,n)})}function AE(){return tt(this,null,function*(){let t=yield eY(),e={alg:"dir",kty:"oct",k:Uh(new Uint8Array(t))};return db(JSON.stringify(e))})}function RHe(t){return tt(this,null,function*(){let n=$d(t),i=JSON.parse(n).k,o=zg(i);return window.crypto.subtle.importKey(YZ,o,EE,!1,[QZ])})}function kge(t,n){return tt(this,null,function*(){let e=n.split(".");if(e.length!==5)throw xn(IE,"jwe_length");let i=yield RHe(t).catch(()=>{throw xn(IE,"import_key")});try{let o=new TextEncoder().encode(e[0]),r=zg(e[2]),a=zg(e[3]),p=zg(e[4]),f=p.byteLength*8,x=new Uint8Array(a.length+p.length);x.set(a),x.set(p,a.length);let I=yield window.crypto.subtle.decrypt({name:EE,iv:r,tagLength:f,additionalData:o},i,x);return new TextDecoder().decode(I)}catch{throw xn(IE,"decrypt")}})}function eY(){return tt(this,null,function*(){let t=yield window.crypto.subtle.generateKey({name:EE,length:256},!0,[Sge,QZ]);return window.crypto.subtle.exportKey(YZ,t)})}function tY(t){return tt(this,null,function*(){return window.crypto.subtle.importKey(YZ,t,wge,!1,[kHe])})}function Mge(t,n,e){return tt(this,null,function*(){return window.crypto.subtle.deriveKey({name:wge,salt:n,hash:ZZ,info:new TextEncoder().encode(e)},t,{name:EE,length:256},!1,[Sge,QZ])})}function Rge(t,n,e){return tt(this,null,function*(){let i=new TextEncoder().encode(n),o=window.crypto.getRandomValues(new Uint8Array(16)),r=yield Mge(t,o,e),a=yield window.crypto.subtle.encrypt({name:EE,iv:new Uint8Array(12)},r,i);return{data:Uh(new Uint8Array(a)),nonce:Uh(o)}})}function iY(t,n,e,i){return tt(this,null,function*(){let o=zg(i),r=yield Mge(t,zg(n),e),a=yield window.crypto.subtle.decrypt({name:EE,iv:new Uint8Array(12)},r,o);return new TextDecoder().decode(a)})}function WV(t){return tt(this,null,function*(){let n=yield JZ(t),e=new Uint8Array(n);return Uh(e)})}var ub="storage_not_supported",KV="stubbed_public_client_application_called",DE="in_mem_redirect_unavailable";var ZV={[ub]:"Given storage configuration option was not supported.",[KV]:"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",[DE]:"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."},OHe={storageNotSupportedError:{code:ub,desc:ZV[ub]},stubPcaInstanceCalled:{code:KV,desc:ZV[KV]},inMemRedirectUnavailable:{code:DE,desc:ZV[DE]}},IC=class t extends fr{constructor(n,e){super(n,e),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,t.prototype)}};function kE(t){return new IC(t,ZV[t])}function TO(t){t.location.hash="",typeof t.history.replaceState=="function"&&t.history.replaceState(null,"",`${t.location.origin}${t.location.pathname}${t.location.search}`)}function nY(t){let n=t.split("#");n.shift(),window.location.hash=n.length>0?n.join("#"):""}function EO(){return window.parent!==window}function Oge(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Cl.POPUP_NAME_PREFIX}.`)===0}function zu(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function oY(){let n=new Ur(window.location.href).getUrlComponents();return`${n.Protocol}//${n.HostNameAndPort}/`}function Pge(){if(Ur.hashContainsKnownProperties(window.location.hash)&&EO())throw xn(lE)}function Lge(t){if(EO()&&!t)throw xn(aE)}function Fge(){if(Oge())throw xn(cE)}function YV(){if(typeof window>"u")throw xn(Fg)}function QV(t){if(!t)throw xn(Bg)}function AO(t){YV(),Pge(),Fge(),QV(t)}function XV(t,n){if(AO(t),Lge(n.system.allowRedirectInIframe),n.cache.cacheLocation===Ka.MemoryStorage&&!n.cache.storeAuthStateInCookie)throw kE(DE)}function DO(t){let n=document.createElement("link");n.rel="preconnect",n.href=new URL(t).origin,n.crossOrigin="anonymous",document.head.appendChild(n),window.setTimeout(()=>{try{document.head.removeChild(n)}catch{}},1e4)}function rY(){return Bc()}var PHe=pc.addClientCapabilitiesToClaims;var kO=class t{navigateInternal(n,e){return t.defaultNavigateWindow(n,e)}navigateExternal(n,e){return t.defaultNavigateWindow(n,e)}static defaultNavigateWindow(n,e){return e.noHistory?window.location.replace(n):window.location.assign(n),new Promise((i,o)=>{setTimeout(()=>{o(xn(wC,"failed_to_redirect"))},e.timeout)})}};var e5=class{sendGetRequestAsync(n,e){return tt(this,null,function*(){let i,o={},r=0,a=Nge(e);try{i=yield fetch(n,{method:GZ.GET,headers:a})}catch(p){throw gC(xn(window.navigator.onLine?mE:k0),void 0,void 0,p)}o=Bge(i.headers);try{return r=i.status,{headers:o,body:yield i.json(),status:r}}catch(p){throw gC(xn(CC),r,o,p)}})}sendPostRequestAsync(n,e){return tt(this,null,function*(){let i=e&&e.body||"",o=Nge(e),r,a=0,p={};try{r=yield fetch(n,{method:GZ.POST,headers:o,body:i})}catch(f){throw gC(xn(window.navigator.onLine?hE:k0),void 0,void 0,f)}p=Bge(r.headers);try{return a=r.status,{headers:p,body:yield r.json(),status:a}}catch(f){throw gC(xn(CC),a,p,f)}})}};function Nge(t){try{let n=new Headers;if(!(t&&t.headers))return n;let e=t.headers;return Object.entries(e).forEach(([i,o])=>{n.append(i,o)}),n}catch(n){throw gC(xn(jV),void 0,void 0,n)}}function Bge(t){try{let n={};return t.forEach((e,i)=>{n[i]=e}),n}catch{throw xn(GV)}}var LHe=6e4,t5=1e4,FHe=3e4,sY=2e3;function zge({auth:t,cache:n,system:e,telemetry:i},o){let r={clientId:Ii.EMPTY_STRING,authority:`${Ii.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Ii.EMPTY_STRING,authorityMetadata:Ii.EMPTY_STRING,redirectUri:typeof window<"u"?zu():"",postLogoutRedirectUri:Ii.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:nl.AAD,OIDCOptions:{serverResponseType:Ig.FRAGMENT,defaultScopes:[Ii.OPENID_SCOPE,Ii.PROFILE_SCOPE,Ii.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Xv.None,tenant:Ii.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:Ka.SessionStorage,cacheRetentionDays:5,temporaryCacheLocation:Ka.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(n&&n.cacheLocation===Ka.LocalStorage),claimsBasedCachingEnabled:!1},p={loggerCallback:()=>{},logLevel:Ia.Info,piiLoggingEnabled:!1},f=gt(ve({},gV),{loggerOptions:p,networkClient:o?new e5:UZ,navigationClient:new kO,loadFrameTimeout:0,windowHashTimeout:e?.loadFrameTimeout||LHe,iframeHashTimeout:e?.loadFrameTimeout||t5,navigateFrameWait:0,redirectNavigationTimeout:FHe,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:e?.nativeBrokerHandshakeTimeout||sY,pollIntervalMilliseconds:Cl.DEFAULT_POLL_INTERVAL_MS}),x=gt(ve(ve({},f),e),{loggerOptions:e?.loggerOptions||p}),I={application:{appName:Ii.EMPTY_STRING,appVersion:Ii.EMPTY_STRING},client:new w0};if(t?.protocolMode!==nl.OIDC&&t?.OIDCOptions&&new Lu(x.loggerOptions).warning(JSON.stringify(ys(Fu.cannotSetOIDCOptions))),t?.protocolMode&&t.protocolMode===nl.OIDC&&x?.allowPlatformBroker)throw ys(Fu.cannotAllowPlatformBroker);return{auth:gt(ve(ve({},r),t),{OIDCOptions:ve(ve({},r.OIDCOptions),t?.OIDCOptions)}),cache:ve(ve({},a),n),system:x,telemetry:ve(ve({},I),i)}}var Vge="@azure/msal-browser",Jp="4.23.0";var ec="msal",i5="browser";var jge=`${ec}.${i5}.log.level`,Gge=`${ec}.${i5}.log.pii`,pri=`${ec}.${i5}.performance.enabled`,$ge=`${ec}.${i5}.platform.auth.dom`,aY=`${ec}.version`,Uge="account.keys",Hge="token.keys";function eh(t=1){return t<1?`${ec}.${Uge}`:`${ec}.${t}.${Uge}`}function Vg(t,n=1){return n<1?`${ec}.${Hge}.${t}`:`${ec}.${n}.${Hge}.${t}`}var n5=class t{static loggerCallback(n,e){switch(n){case Ia.Error:console.error(e);return;case Ia.Info:console.info(e);return;case Ia.Verbose:console.debug(e);return;case Ia.Warning:console.warn(e);return;default:console.log(e);return}}constructor(n){this.browserEnvironment=typeof window<"u",this.config=zge(n,this.browserEnvironment);let e;try{e=window[Ka.SessionStorage]}catch{}let i=e?.getItem(jge),o=e?.getItem(Gge)?.toLowerCase(),r=o==="true"?!0:o==="false"?!1:void 0,a=ve({},this.config.system.loggerOptions),p=i&&Object.keys(Ia).includes(i)?Ia[i]:void 0;p&&(a.loggerCallback=t.loggerCallback,a.logLevel=p),r!==void 0&&(a.piiLoggingEnabled=r),this.logger=new Lu(a,Vge,Jp),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}};var o5=(()=>{class t extends n5{getModuleName(){return t.MODULE_NAME}getId(){return t.ID}initialize(){return tt(this,null,function*(){return this.available=typeof window<"u",this.available})}}return t.MODULE_NAME="",t.ID="StandardOperatingContext",t})();var r5=class{constructor(){this.dbName=$V,this.version=_ge,this.tableName=yge,this.dbOpen=!1}open(){return tt(this,null,function*(){return new Promise((n,e)=>{let i=window.indexedDB.open(this.dbName,this.version);i.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),i.addEventListener("success",o=>{let r=o;this.db=r.target.result,this.dbOpen=!0,n()}),i.addEventListener("error",()=>e(xn(lb)))})})}closeConnection(){let n=this.db;n&&this.dbOpen&&(n.close(),this.dbOpen=!1)}validateDbIsOpen(){return tt(this,null,function*(){if(!this.dbOpen)return this.open()})}getItem(n){return tt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(xn(Ng));let a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(n);a.addEventListener("success",p=>{let f=p;this.closeConnection(),e(f.target.result)}),a.addEventListener("error",p=>{this.closeConnection(),i(p)})})})}setItem(n,e){return tt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((i,o)=>{if(!this.db)return o(xn(Ng));let p=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e,n);p.addEventListener("success",()=>{this.closeConnection(),i()}),p.addEventListener("error",f=>{this.closeConnection(),o(f)})})})}removeItem(n){return tt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(xn(Ng));let a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(n);a.addEventListener("success",()=>{this.closeConnection(),e()}),a.addEventListener("error",p=>{this.closeConnection(),i(p)})})})}getKeys(){return tt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((n,e)=>{if(!this.db)return e(xn(Ng));let r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();r.addEventListener("success",a=>{let p=a;this.closeConnection(),n(p.target.result)}),r.addEventListener("error",a=>{this.closeConnection(),e(a)})})})}containsKey(n){return tt(this,null,function*(){return yield this.validateDbIsOpen(),new Promise((e,i)=>{if(!this.db)return i(xn(Ng));let a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(n);a.addEventListener("success",p=>{let f=p;this.closeConnection(),e(f.target.result===1)}),a.addEventListener("error",p=>{this.closeConnection(),i(p)})})})}deleteDatabase(){return tt(this,null,function*(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((n,e)=>{let i=window.indexedDB.deleteDatabase($V),o=setTimeout(()=>e(!1),200);i.addEventListener("success",()=>(clearTimeout(o),n(!0))),i.addEventListener("blocked",()=>(clearTimeout(o),n(!0))),i.addEventListener("error",()=>(clearTimeout(o),e(!1)))})})}};var R0=class{constructor(){this.cache=new Map}initialize(){return tt(this,null,function*(){})}getItem(n){return this.cache.get(n)||null}getUserData(n){return this.getItem(n)}setItem(n,e){this.cache.set(n,e)}setUserData(n,e){return tt(this,null,function*(){this.setItem(n,e)})}removeItem(n){this.cache.delete(n)}getKeys(){let n=[];return this.cache.forEach((e,i)=>{n.push(i)}),n}containsKey(n){return this.cache.has(n)}clear(){this.cache.clear()}decryptData(){return Promise.resolve(null)}};var s5=class{constructor(n){this.inMemoryCache=new R0,this.indexedDBCache=new r5,this.logger=n}handleDatabaseAccessError(n){if(n instanceof SC&&n.errorCode===lb)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw n}getItem(n){return tt(this,null,function*(){let e=this.inMemoryCache.getItem(n);if(!e)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.getItem(n)}catch(i){this.handleDatabaseAccessError(i)}return e})}setItem(n,e){return tt(this,null,function*(){this.inMemoryCache.setItem(n,e);try{yield this.indexedDBCache.setItem(n,e)}catch(i){this.handleDatabaseAccessError(i)}})}removeItem(n){return tt(this,null,function*(){this.inMemoryCache.removeItem(n);try{yield this.indexedDBCache.removeItem(n)}catch(e){this.handleDatabaseAccessError(e)}})}getKeys(){return tt(this,null,function*(){let n=this.inMemoryCache.getKeys();if(n.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),yield this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return n})}containsKey(n){return tt(this,null,function*(){let e=this.inMemoryCache.containsKey(n);if(!e)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),yield this.indexedDBCache.containsKey(n)}catch(i){this.handleDatabaseAccessError(i)}return e})}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}clearPersistent(){return tt(this,null,function*(){try{this.logger.verbose("Deleting persistent keystore");let n=yield this.indexedDBCache.deleteDatabase();return n&&this.logger.verbose("Persistent keystore deleted"),n}catch(n){return this.handleDatabaseAccessError(n),!1}})}};var ME=(()=>{class t{constructor(e,i,o){this.logger=e,Ige(o??!1),this.cache=new s5(this.logger),this.performanceClient=i}createNewGuid(){return Bc()}base64Encode(e){return db(e)}base64Decode(e){return $d(e)}base64UrlEncode(e){return IO(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}getPublicKeyThumbprint(e){return tt(this,null,function*(){let i=this.performanceClient?.startMeasurement($e.CryptoOptsGetPublicKeyThumbprint,e.correlationId),o=yield Ege(t.EXTRACTABLE,t.POP_KEY_USAGES),r=yield qV(o.publicKey),a={e:r.e,kty:r.kty,n:r.n},p=qge(a),f=yield this.hashString(p),x=yield qV(o.privateKey),I=yield Age(x,!1,["sign"]);return yield this.cache.setItem(f,{privateKey:I,publicKey:o.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),i&&i.end({success:!0}),f})}removeTokenBindingKey(e){return tt(this,null,function*(){if(yield this.cache.removeItem(e),yield this.cache.containsKey(e))throw Gi(Fc.bindingKeyNotRemoved)})}clearKeystore(){return tt(this,null,function*(){this.cache.clearInMemory();try{return yield this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}})}signJwt(e,i,o,r){return tt(this,null,function*(){let a=this.performanceClient?.startMeasurement($e.CryptoOptsSignJwt,r),p=yield this.cache.getItem(i);if(!p)throw xn(ab);let f=yield qV(p.publicKey),x=qge(f),I=IO(JSON.stringify({kid:i})),D=CO.getShrHeaderString(gt(ve({},o?.header),{alg:f.alg,kid:I})),P=IO(D);e.cnf={jwk:JSON.parse(x)};let R=IO(JSON.stringify(e)),j=`${P}.${R}`,W=new TextEncoder().encode(j),Q=yield Dge(p.privateKey,W),se=Uh(new Uint8Array(Q)),ge=`${j}.${se}`;return a&&a.end({success:!0}),ge})}hashString(e){return tt(this,null,function*(){return WV(e)})}}return t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t})();function qge(t){return JSON.stringify(t,Object.keys(t).sort())}var NHe=1440*60*1e3,a5={Lax:"Lax",None:"None"},RE=class{initialize(){return Promise.resolve()}getItem(n){let e=`${encodeURIComponent(n)}`,i=document.cookie.split(";");for(let o=0;o{let o=decodeURIComponent(i).trim().split("=");e.push(o[0])}),e}containsKey(n){return this.getKeys().includes(n)}decryptData(){return Promise.resolve(null)}};function BHe(t){let n=new Date;return new Date(n.getTime()+t*NHe).toUTCString()}function TC(t,n){let e=t.getItem(eh(n));return e?JSON.parse(e):[]}function EC(t,n,e){let i=n.getItem(Vg(t,e));if(i){let o=JSON.parse(i);if(o&&o.hasOwnProperty("idToken")&&o.hasOwnProperty("accessToken")&&o.hasOwnProperty("refreshToken"))return o}return{idToken:[],accessToken:[],refreshToken:[]}}function MO(t){return t.hasOwnProperty("id")&&t.hasOwnProperty("nonce")&&t.hasOwnProperty("data")}var Wge="msal.cache.encryption",zHe="msal.broadcast.cache",l5=class{constructor(n,e,i){if(!window.localStorage)throw kE(ub);this.memoryStorage=new R0,this.initialized=!1,this.clientId=n,this.logger=e,this.performanceClient=i,this.broadcast=new BroadcastChannel(zHe)}initialize(n){return tt(this,null,function*(){let e=new RE,i=e.getItem(Wge),o={key:"",id:""};if(i)try{o=JSON.parse(i)}catch{}if(o.key&&o.id){let r=xl(zg,$e.Base64Decode,this.logger,this.performanceClient,n)(o.key);this.encryptionCookie={id:o.id,key:yield _i(tY,$e.GenerateHKDF,this.logger,this.performanceClient,n)(r)}}else{let r=Bc(),a=yield _i(eY,$e.GenerateBaseKey,this.logger,this.performanceClient,n)(),p=xl(Uh,$e.UrlEncodeArr,this.logger,this.performanceClient,n)(new Uint8Array(a));this.encryptionCookie={id:r,key:yield _i(tY,$e.GenerateHKDF,this.logger,this.performanceClient,n)(a)};let f={id:r,key:p};e.setItem(Wge,JSON.stringify(f),0,!0,a5.None)}yield _i(this.importExistingCache.bind(this),$e.ImportExistingCache,this.logger,this.performanceClient,n)(n),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0})}getItem(n){return window.localStorage.getItem(n)}getUserData(n){if(!this.initialized)throw xn(Bg);return this.memoryStorage.getItem(n)}decryptData(n,e,i){return tt(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw xn(Bg);if(e.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},i),null;let o=yield _i(iY,$e.Decrypt,this.logger,this.performanceClient,i)(this.encryptionCookie.key,e.nonce,this.getContext(n),e.data);if(!o)return null;try{return JSON.parse(o)}catch{return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},i),null}})}setItem(n,e){window.localStorage.setItem(n,e)}setUserData(n,e,i,o){return tt(this,null,function*(){if(!this.initialized||!this.encryptionCookie)throw xn(Bg);let{data:r,nonce:a}=yield _i(Rge,$e.Encrypt,this.logger,this.performanceClient,i)(this.encryptionCookie.key,e,this.getContext(n)),p={id:this.encryptionCookie.id,nonce:a,data:r,lastUpdatedAt:o};this.memoryStorage.setItem(n,e),this.setItem(n,JSON.stringify(p)),this.broadcast.postMessage({key:n,value:e,context:this.getContext(n)})})}removeItem(n){this.memoryStorage.containsKey(n)&&(this.memoryStorage.removeItem(n),this.broadcast.postMessage({key:n,value:null,context:this.getContext(n)})),window.localStorage.removeItem(n)}getKeys(){return Object.keys(window.localStorage)}containsKey(n){return window.localStorage.hasOwnProperty(n)}clear(){this.memoryStorage.clear(),TC(this).forEach(i=>this.removeItem(i));let e=EC(this.clientId,this);e.idToken.forEach(i=>this.removeItem(i)),e.accessToken.forEach(i=>this.removeItem(i)),e.refreshToken.forEach(i=>this.removeItem(i)),this.getKeys().forEach(i=>{(i.startsWith(ec)||i.indexOf(this.clientId)!==-1)&&this.removeItem(i)})}importExistingCache(n){return tt(this,null,function*(){if(!this.encryptionCookie)return;let e=TC(this);e=yield this.importArray(e,n),e.length?this.setItem(eh(),JSON.stringify(e)):this.removeItem(eh());let i=EC(this.clientId,this);i.idToken=yield this.importArray(i.idToken,n),i.accessToken=yield this.importArray(i.accessToken,n),i.refreshToken=yield this.importArray(i.refreshToken,n),i.idToken.length||i.accessToken.length||i.refreshToken.length?this.setItem(Vg(this.clientId),JSON.stringify(i)):this.removeItem(Vg(this.clientId))})}getItemFromEncryptedCache(n,e){return tt(this,null,function*(){if(!this.encryptionCookie)return null;let i=this.getItem(n);if(!i)return null;let o;try{o=JSON.parse(i)}catch{return null}return MO(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},e),null):_i(iY,$e.Decrypt,this.logger,this.performanceClient,e)(this.encryptionCookie.key,o.nonce,this.getContext(n),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},e),o)})}importArray(n,e){return tt(this,null,function*(){let i=[],o=[];return n.forEach(r=>{let a=this.getItemFromEncryptedCache(r,e).then(p=>{p?(this.memoryStorage.setItem(r,p),i.push(r)):this.removeItem(r)});o.push(a)}),yield Promise.all(o),i})}getContext(n){let e="";return n.includes(this.clientId)&&(e=this.clientId),e}updateCache(n){this.logger.trace("Updating internal cache from broadcast event");let e=this.performanceClient.startMeasurement($e.LocalStorageUpdated);e.add({isBackground:!0});let{key:i,value:o,context:r}=n.data;if(!i){this.logger.error("Broadcast event missing key"),e.end({success:!1,errorCode:"noKey"});return}if(r&&r!==this.clientId){this.logger.trace(`Ignoring broadcast event from clientId: ${r}`),e.end({success:!1,errorCode:"contextMismatch"});return}o?(this.memoryStorage.setItem(i,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(i),this.logger.verbose("Removed item from internal cache")),e.end({success:!0})}};var c5=class{constructor(){if(!window.sessionStorage)throw kE(ub)}initialize(){return tt(this,null,function*(){})}getItem(n){return window.sessionStorage.getItem(n)}getUserData(n){return this.getItem(n)}setItem(n,e){window.sessionStorage.setItem(n,e)}setUserData(n,e){return tt(this,null,function*(){this.setItem(n,e)})}removeItem(n){window.sessionStorage.removeItem(n)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(n){return window.sessionStorage.hasOwnProperty(n)}decryptData(){return Promise.resolve(null)}};var Qn={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 lY(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var OE=class t extends lC{constructor(n,e,i,o,r,a,p){super(n,i,o,r,p),this.cacheConfig=e,this.logger=o,this.internalStorage=new R0,this.browserStorage=Zge(n,e.cacheLocation,o,r),this.temporaryCacheStorage=Zge(n,e.temporaryCacheLocation,o,r),this.cookieStorage=new RE,this.eventHandler=a}initialize(n){return tt(this,null,function*(){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},n),yield this.browserStorage.initialize(n),yield this.migrateExistingCache(n),this.trackVersionChanges(n)})}migrateExistingCache(n){return tt(this,null,function*(){let e=TC(this.browserStorage,0),i=EC(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:e.length,oldAccessCount:i.accessToken.length,oldIdCount:i.idToken.length,oldRefreshCount:i.refreshToken.length},n);let o=TC(this.browserStorage,1),r=EC(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:r.accessToken.length,currIdCount:r.idToken.length,currRefreshCount:r.refreshToken.length},n),yield Promise.all([this.updateV0ToCurrent(1,e,o,n),this.updateV0ToCurrent(1,i.idToken,r.idToken,n),this.updateV0ToCurrent(1,i.accessToken,r.accessToken,n),this.updateV0ToCurrent(1,i.refreshToken,r.refreshToken,n)]),e.length>0?this.browserStorage.setItem(eh(0),JSON.stringify(e)):this.browserStorage.removeItem(eh(0)),o.length>0?this.browserStorage.setItem(eh(1),JSON.stringify(o)):this.browserStorage.removeItem(eh(1)),this.setTokenKeys(i,n,0),this.setTokenKeys(r,n,1)})}updateV0ToCurrent(n,e,i,o){return tt(this,null,function*(){let r=[];for(let a of[...e]){let p=this.browserStorage.getItem(a),f=this.validateAndParseJson(p||"");if(!f){lY(e,a);continue}f.lastUpdatedAt||(f.lastUpdatedAt=Date.now().toString(),this.setItem(a,JSON.stringify(f),o));let x=MO(f)?yield this.browserStorage.decryptData(a,f,o):f,I;if(x&&(Ll.isAccessTokenEntity(x)||Ll.isRefreshTokenEntity(x))&&(I=x.expiresOn),!x||Nc.isCacheExpired(f.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||I&&Nc.isTokenExpired(I,CR)){this.browserStorage.removeItem(a),lY(e,a),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);continue}if(this.cacheConfig.cacheLocation!==Ka.LocalStorage||MO(f)){let D=`${ec}.${n}${"-"}${a}`,P=this.browserStorage.getItem(D);if(P){let R=this.validateAndParseJson(P);if(Number(f.lastUpdatedAt)>Number(R.lastUpdatedAt)){r.push(this.setUserData(D,JSON.stringify(x),o,f.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}else{r.push(this.setUserData(D,JSON.stringify(x),o,f.lastUpdatedAt).then(()=>{i.push(D),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}}}return Promise.all(r)})}trackVersionChanges(n){let e=this.browserStorage.getItem(aY);e&&(this.logger.info(`MSAL.js was last initialized by version: ${e}`),this.performanceClient.addFields({previousLibraryVersion:e},n)),e!==Jp&&this.setItem(aY,Jp,n)}validateAndParseJson(n){if(!n)return null;try{let e=JSON.parse(n);return e&&typeof e=="object"?e:null}catch{return null}}setItem(n,e,i){let o=0,r=[],a=20;for(let p=0;p<=a;p++)try{this.browserStorage.setItem(n,e),p>0&&(p<=o?this.removeAccessTokenKeys(r.slice(0,p),i,0):(this.removeAccessTokenKeys(r.slice(0,o),i,0),this.removeAccessTokenKeys(r.slice(o,p),i)));break}catch(f){let x=GT(f);if(x.errorCode===tO.cacheQuotaExceeded&&p0&&(f<=r?this.removeAccessTokenKeys(a.slice(0,f),i,0):(this.removeAccessTokenKeys(a.slice(0,r),i,0),this.removeAccessTokenKeys(a.slice(r,f),i)));break}catch(x){let I=GT(x);if(I.errorCode===tO.cacheQuotaExceeded&&f-1){if(i.splice(o,1),i.length===0){this.removeItem(eh());return}else this.setItem(eh(),JSON.stringify(i),e);this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(n,e){let i=this.getActiveAccount(e);i?.homeAccountId===n.homeAccountId&&i?.environment===n.environment&&this.setActiveAccount(null,e),super.removeAccount(n,e),this.removeAccountKeyFromMap(this.generateAccountKey(n),e),this.browserStorage.getKeys().forEach(o=>{o.includes(n.homeAccountId)&&o.includes(n.environment)&&this.browserStorage.removeItem(o)}),this.cacheConfig.cacheLocation===Ka.LocalStorage&&this.eventHandler.emitEvent(Qn.ACCOUNT_REMOVED,void 0,n)}removeIdToken(n,e){super.removeIdToken(n,e);let i=this.getTokenKeys(),o=i.idToken.indexOf(n);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),i.idToken.splice(o,1),this.setTokenKeys(i,e))}removeAccessToken(n,e,i=!0){super.removeAccessToken(n,e),i&&this.removeAccessTokenKeys([n],e)}removeAccessTokenKeys(n,e,i=1){this.logger.trace("removeAccessTokenKey called");let o=this.getTokenKeys(i),r=0;if(n.forEach(a=>{let p=o.accessToken.indexOf(a);p>-1&&(o.accessToken.splice(p,1),r++)}),r>0){this.logger.info(`removed ${r} accessToken keys from tokenKeys map`),this.setTokenKeys(o,e,i);return}}removeRefreshToken(n,e){super.removeRefreshToken(n,e);let i=this.getTokenKeys(),o=i.refreshToken.indexOf(n);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),i.refreshToken.splice(o,1),this.setTokenKeys(i,e))}getTokenKeys(n=1){return EC(this.clientId,this.browserStorage,n)}setTokenKeys(n,e,i=1){if(n.idToken.length===0&&n.accessToken.length===0&&n.refreshToken.length===0){this.removeItem(Vg(this.clientId,i));return}else this.setItem(Vg(this.clientId,i),JSON.stringify(n),e)}getIdTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(n,e),null;let o=this.validateAndParseJson(i);return!o||!Ll.isIdTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o)}setIdTokenCredential(n,e){return tt(this,null,function*(){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys();r.idToken.indexOf(i)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(i),this.setTokenKeys(r,e))})}getAccessTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([n],e),null;let o=this.validateAndParseJson(i);return!o||!Ll.isAccessTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o)}setAccessTokenCredential(n,e){return tt(this,null,function*(){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys(),a=r.accessToken.indexOf(i);a!==-1&&r.accessToken.splice(a,1),this.logger.trace(`access token ${a===-1?"added to":"updated in"} map`),r.accessToken.push(i),this.setTokenKeys(r,e)})}getRefreshTokenCredential(n,e){let i=this.browserStorage.getUserData(n);if(!i)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(n,e),null;let o=this.validateAndParseJson(i);return!o||!Ll.isRefreshTokenEntity(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o)}setRefreshTokenCredential(n,e){return tt(this,null,function*(){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");let i=this.generateCredentialKey(n),o=Date.now().toString();n.lastUpdatedAt=o,yield this.setUserData(i,JSON.stringify(n),e,o);let r=this.getTokenKeys();r.refreshToken.indexOf(i)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(i),this.setTokenKeys(r,e))})}getAppMetadata(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!Ll.isAppMetadataEntity(n,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),i)}setAppMetadata(n,e){this.logger.trace("BrowserCacheManager.setAppMetadata called");let i=Ll.generateAppMetadataKey(n);this.setItem(i,JSON.stringify(n),e)}getServerTelemetry(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!Ll.isServerTelemetryEntity(n,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),i)}setServerTelemetry(n,e,i){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(n,JSON.stringify(e),i)}getAuthorityMetadata(n){let e=this.internalStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;let i=this.validateAndParseJson(e);return i&&Ll.isAuthorityMetadataEntity(n,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),i):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(n,e){this.internalStorage.setItem(SO.WRAPPER_SKU,n),this.internalStorage.setItem(SO.WRAPPER_VER,e)}getWrapperMetadata(){let n=this.internalStorage.getItem(SO.WRAPPER_SKU)||Ii.EMPTY_STRING,e=this.internalStorage.getItem(SO.WRAPPER_VER)||Ii.EMPTY_STRING;return[n,e]}setAuthorityMetadata(n,e){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(n,JSON.stringify(e))}getActiveAccount(n){let e=this.generateCacheKey(aV.ACTIVE_ACCOUNT_FILTERS),i=this.browserStorage.getItem(e);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;let o=this.validateAndParseJson(i);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},n)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(n,e){let i=this.generateCacheKey(aV.ACTIVE_ACCOUNT_FILTERS);if(n){this.logger.verbose("setActiveAccount: Active account set");let o={homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId,lastUpdatedAt:Nc.nowSeconds().toString()};this.setItem(i,JSON.stringify(o),e)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(i);this.eventHandler.emitEvent(Qn.ACTIVE_ACCOUNT_CHANGED)}getThrottlingCache(n){let e=this.browserStorage.getItem(n);if(!e)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;let i=this.validateAndParseJson(e);return!i||!Ll.isThrottlingEntity(n,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),i)}setThrottlingCache(n,e,i){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(n,JSON.stringify(e),i)}getTemporaryCache(n,e){let i=e?this.generateCacheKey(n):n;if(this.cacheConfig.storeAuthStateInCookie){let r=this.cookieStorage.getItem(i);if(r)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),r}let o=this.temporaryCacheStorage.getItem(i);if(!o){if(this.cacheConfig.cacheLocation===Ka.LocalStorage){let r=this.browserStorage.getItem(i);if(r)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),r}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(n,e,i){let o=i?this.generateCacheKey(n):n;this.temporaryCacheStorage.setItem(o,e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,e,void 0,this.cacheConfig.secureCookies))}removeItem(n){this.browserStorage.removeItem(n)}removeTemporaryItem(n){this.temporaryCacheStorage.removeItem(n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(n))}getKeys(){return this.browserStorage.getKeys()}clear(n){this.removeAllAccounts(n),this.removeAppMetadata(n),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(ec)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(ec)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(n){this.performanceClient.addQueueMeasurement($e.ClearTokensAndKeysWithClaims,n);let e=this.getTokenKeys(),i=0;e.accessToken.forEach(o=>{let r=this.getAccessTokenCredential(o,n);r?.requestedClaimsHash&&o.includes(r.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(o,n),i++)}),i>0&&this.logger.warning(`${i} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(n){return ka.startsWith(n,ec)?n:`${ec}.${this.clientId}.${n}`}generateCredentialKey(n){let e=n.credentialType===Jl.REFRESH_TOKEN&&n.familyId||n.clientId,i=n.tokenType&&n.tokenType.toLowerCase()!==Qr.BEARER.toLowerCase()?n.tokenType.toLowerCase():"";return[`${ec}.${1}`,n.homeAccountId,n.environment,n.credentialType,e,n.realm||"",n.target||"",n.requestedClaimsHash||"",i].join("-").toLowerCase()}generateAccountKey(n){let e=n.homeAccountId.split(".")[1];return[`${ec}.${1}`,n.homeAccountId,n.environment,e||n.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(wl.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(wl.VERIFIER)),this.removeTemporaryItem(this.generateCacheKey(wl.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(wl.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(wl.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(n,e){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");let i=db(JSON.stringify(n));if(this.setTemporaryCache(wl.REQUEST_PARAMS,i,!0),e){let o=db(e);this.setTemporaryCache(wl.VERIFIER,o,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");let n=this.getTemporaryCache(wl.REQUEST_PARAMS,!0);if(!n)throw xn(uE);let e=this.getTemporaryCache(wl.VERIFIER,!0),i,o="";try{i=JSON.parse($d(n)),e&&(o=$d(e))}catch(r){throw this.logger.errorPii(`Attempted to parse: ${n}`),this.logger.error(`Parsing cached token request threw with error: ${r}`),xn(pE)}return[i,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");let n=this.getTemporaryCache(wl.NATIVE_REQUEST,!0);if(!n)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;let e=this.validateAndParseJson(n);return e||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(n){let e=this.getInteractionInProgress()?.clientId;return n?e===this.clientId:!!e}getInteractionInProgress(){let n=`${ec}.${wl.INTERACTION_STATUS_KEY}`,e=this.getTemporaryCache(n,!1);try{return e?JSON.parse(e):null}catch{return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(n),this.resetRequestCache(),TO(window),null}}setInteractionInProgress(n,e=Qm.SIGNIN){let i=`${ec}.${wl.INTERACTION_STATUS_KEY}`;if(n){if(this.getInteractionInProgress())throw xn(nE);this.setTemporaryCache(i,JSON.stringify({clientId:this.clientId,type:e}),!1)}else!n&&this.getInteractionInProgress()?.clientId===this.clientId&&this.removeTemporaryItem(i)}hydrateCache(n,e){return tt(this,null,function*(){let i=Ll.createIdTokenEntity(n.account?.homeAccountId,n.account?.environment,n.idToken,this.clientId,n.tenantId),o;e.claims&&(o=yield this.cryptoImpl.hashString(e.claims));let r=Ll.createAccessTokenEntity(n.account?.homeAccountId,n.account.environment,n.accessToken,this.clientId,n.tenantId,n.scopes.join(" "),n.expiresOn?Nc.toSecondsFromDate(n.expiresOn):0,n.extExpiresOn?Nc.toSecondsFromDate(n.extExpiresOn):0,$d,void 0,n.tokenType,void 0,e.sshKid,e.claims,o),a={idToken:i,accessToken:r};return this.saveCacheRecord(a,n.correlationId)})}saveCacheRecord(n,e,i){return tt(this,null,function*(){try{yield a7(t.prototype,this,"saveCacheRecord").call(this,n,e,i)}catch(o){if(o instanceof tb&&this.performanceClient&&e)try{let r=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:r.refreshToken.length,cacheIdCount:r.idToken.length,cacheAtCount:r.accessToken.length},e)}catch{}throw o}})}};function Zge(t,n,e,i){try{switch(n){case Ka.LocalStorage:return new l5(t,e,i);case Ka.SessionStorage:return new c5;case Ka.MemoryStorage:default:break}}catch(o){e.error(o)}return new R0}var Yge=(t,n,e,i)=>{let o={cacheLocation:Ka.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:Ka.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new OE(t,o,Qv,n,e,i)};function Qge(t,n,e,i,o){return t.verbose("getAllAccounts called"),e?n.getAllAccounts(o||{},i):[]}function Xge(t,n,e,i){let o=e.getAccountInfoFilteredBy(t,i);return o?(n.verbose("getAccount: Account matching provided filter found, returning"),o):(n.verbose("getAccount: No matching account found, returning null"),null)}function Jge(t,n,e,i){if(n.trace("getAccountByUsername called"),!t)return n.warning("getAccountByUsername: No username provided"),null;let o=e.getAccountInfoFilteredBy({username:t},i);return o?(n.verbose("getAccountByUsername: Account matching username found, returning"),n.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${t}`),o):(n.verbose("getAccountByUsername: No matching account found, returning null"),null)}function e_e(t,n,e,i){if(n.trace("getAccountByHomeId called"),!t)return n.warning("getAccountByHomeId: No homeAccountId provided"),null;let o=e.getAccountInfoFilteredBy({homeAccountId:t},i);return o?(n.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),n.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${t}`),o):(n.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function t_e(t,n,e,i){if(n.trace("getAccountByLocalId called"),!t)return n.warning("getAccountByLocalId: No localAccountId provided"),null;let o=e.getAccountInfoFilteredBy({localAccountId:t},i);return o?(n.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),n.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${t}`),o):(n.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function i_e(t,n,e){n.setActiveAccount(t,e)}function n_e(t,n){return t.getActiveAccount(n)}var VHe="msal.broadcast.event",d5=class{constructor(n){this.eventCallbacks=new Map,this.logger=n||new Lu({}),typeof BroadcastChannel<"u"&&(this.broadcastChannel=new BroadcastChannel(VHe)),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(n,e,i){if(typeof window<"u"){let o=i||rY();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[n,e||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(n){this.eventCallbacks.delete(n),this.logger.verbose(`Event callback ${n} removed.`)}emitEvent(n,e,i,o){let r={eventType:n,interactionType:e||null,payload:i||null,error:o||null,timestamp:Date.now()};switch(n){case Qn.ACCOUNT_ADDED:case Qn.ACCOUNT_REMOVED:case Qn.ACTIVE_ACCOUNT_CHANGED:this.broadcastChannel?.postMessage(r);break;default:this.invokeCallbacks(r);break}}invokeCallbacks(n){this.eventCallbacks.forEach(([e,i],o)=>{(i.length===0||i.includes(n.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${n.eventType}`),e.apply(null,[n]))})}invokeCrossTabCallbacks(n){let e=n.data;this.invokeCallbacks(e)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}};var PE=class{constructor(n,e,i,o,r,a,p,f,x){this.config=n,this.browserStorage=e,this.browserCrypto=i,this.networkClient=this.config.system.networkClient,this.eventHandler=r,this.navigationClient=a,this.platformAuthProvider=f,this.correlationId=x||Bc(),this.logger=o.clone(Cl.MSAL_SKU,Jp,this.correlationId),this.performanceClient=p}clearCacheOnLogout(n,e){return tt(this,null,function*(){if(e)try{this.browserStorage.removeAccount(e,n),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(n),yield this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}})}getRedirectUri(n){this.logger.verbose("getRedirectUri called");let e=n||this.config.auth.redirectUri;return Ur.getAbsoluteUrl(e,zu())}initializeServerTelemetryManager(n,e){this.logger.verbose("initializeServerTelemetryManager called");let i={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:n,forceRefresh:e||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new vC(i,this.browserStorage)}getDiscoveredAuthority(n){return tt(this,null,function*(){let{account:e}=n,i=n.requestExtraQueryParameters&&n.requestExtraQueryParameters.hasOwnProperty("instance_aware")?n.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement($e.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);let o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},r=n.requestAuthority||this.config.auth.authority,a=i?.length?i==="true":this.config.auth.instanceAware,p=e&&a?this.config.auth.authority.replace(Ur.getDomainFromUrl(r),e.environment):r,f=Vh.generateAuthority(p,n.requestAzureCloudOptions||this.config.auth.azureCloudOptions),x=yield _i(AV.createDiscoveredInstance,$e.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(f,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(e&&!x.isAlias(e.environment))throw ys(Fu.authorityMismatch);return x})}};function RO(t,n,e,i){return tt(this,null,function*(){e.addQueueMeasurement($e.InitializeBaseRequest,t.correlationId);let o=t.authority||n.auth.authority,r=[...t&&t.scopes||[]],a=gt(ve({},t),{correlationId:t.correlationId,authority:o,scopes:r});if(!a.authenticationScheme)a.authenticationScheme=Qr.BEARER,i.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(a.authenticationScheme===Qr.SSH){if(!t.sshJwk)throw ys(Fu.missingSshJwk);if(!t.sshKid)throw ys(Fu.missingSshKid)}i.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}return n.cache.claimsBasedCachingEnabled&&t.claims&&!ka.isEmptyObj(t.claims)&&(a.requestedClaimsHash=yield WV(t.claims)),a})}function o_e(t,n,e,i,o){return tt(this,null,function*(){i.addQueueMeasurement($e.InitializeSilentRequest,t.correlationId);let r=yield _i(RO,$e.InitializeBaseRequest,o,i,t.correlationId)(t,e,i,o);return gt(ve(ve({},t),r),{account:n,forceRefresh:t.forceRefresh||!1})})}function u5(t,n){let e,i=t.httpMethod;if(n===nl.EAR){if(e=i||zh.POST,e!==zh.POST)throw ys(Fu.invalidRequestMethodForEAR)}else e=i||zh.GET;if(t.authorizePostBodyParameters&&e!==zh.POST)throw ys(Fu.invalidAuthorizePostBodyParameters);return e}var fp=class extends PE{initializeLogoutRequest(n){this.logger.verbose("initializeLogoutRequest called",n?.correlationId);let e=ve({correlationId:this.correlationId||Bc()},n);if(n)if(n.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(n.account){let i=this.getLogoutHintFromIdTokenClaims(n.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),e.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!n||n.postLogoutRedirectUri!==null?n&&n.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",e.correlationId),e.postLogoutRedirectUri=Ur.getAbsoluteUrl(n.postLogoutRedirectUri,zu())):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=Ur.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,zu())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",e.correlationId),e.postLogoutRedirectUri=Ur.getAbsoluteUrl(zu(),zu())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",e.correlationId),e}getLogoutHintFromIdTokenClaims(n){let e=n.idTokenClaims;if(e){if(e.login_hint)return e.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}createAuthCodeClient(n){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.StandardInteractionClientCreateAuthCodeClient,this.correlationId);let e=yield _i(this.getClientConfiguration.bind(this),$e.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(n);return new yC(e,this.performanceClient)})}getClientConfiguration(n){return tt(this,null,function*(){let{serverTelemetryManager:e,requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:a}=n;this.performanceClient.addQueueMeasurement($e.StandardInteractionClientGetClientConfiguration,this.correlationId);let p=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:i,requestAzureCloudOptions:o,requestExtraQueryParameters:r,account:a}),f=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:p,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:f.loggerCallback,piiLoggingEnabled:f.piiLoggingEnabled,logLevel:f.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:e,libraryInfo:{sku:Cl.MSAL_SKU,version:Jp,cpu:Ii.EMPTY_STRING,os:Ii.EMPTY_STRING},telemetry:this.config.telemetry}})}initializeAuthorizationRequest(n,e){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);let i=this.getRedirectUri(n.redirectUri),o={interactionType:e},r=Km.setRequestState(this.browserCrypto,n&&n.state||Ii.EMPTY_STRING,o),a=yield _i(RO,$e.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)(gt(ve({},n),{correlationId:this.correlationId}),this.config,this.performanceClient,this.logger),p=gt(ve({},a),{redirectUri:i,state:r,nonce:n.nonce||Bc(),responseMode:this.config.auth.OIDCOptions.serverResponseType}),f=gt(ve({},p),{httpMethod:u5(p,this.config.auth.protocolMode)});if(n.loginHint||n.sid)return f;let x=n.account||this.browserStorage.getActiveAccount(this.correlationId);return x&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${x.homeAccountId}`,this.correlationId),f.account=x),f})}};function r_e(t,n){if(!n)return null;try{return Km.parseRequestState(t,n).libraryState.meta}catch{throw Gi(Fc.invalidState)}}function DC(t,n,e){let i=Dg.getDeserializedResponse(t);if(!i)throw Dg.stripLeadingHashOrQuery(t)?(e.error(`A ${n} is present in the iframe but it does not contain known properties. It's likely that the ${n} has been replaced by code running on the redirectUri page.`),e.errorPii(`The ${n} detected is: ${t}`),xn(eE)):(e.error(`The request has returned to the redirectUri but a ${n} is not present. It's likely that the ${n} has been removed or the page has been redirected by code running on the redirectUri page.`),xn(JT));return i}function s_e(t,n,e){if(!t.state)throw xn(sb);let i=r_e(n,t.state);if(!i)throw xn(tE);if(i.interactionType!==e)throw xn(iE)}var LE=class{constructor(n,e,i,o,r){this.authModule=n,this.browserStorage=e,this.authCodeRequest=i,this.logger=o,this.performanceClient=r}handleCodeResponse(n,e){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.HandleCodeResponse,e.correlationId);let i;try{i=Og.getAuthorizationCodePayload(n,e.state)}catch(o){throw o instanceof hp&&o.subError===Ym?xn(Ym):o}return _i(this.handleCodeResponseFromServer.bind(this),$e.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)(i,e)})}handleCodeResponseFromServer(n,e,i=!0){return tt(this,null,function*(){if(this.performanceClient.addQueueMeasurement($e.HandleCodeResponseFromServer,e.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=n.code,n.cloud_instance_host_name&&(yield _i(this.authModule.updateAuthority.bind(this.authModule),$e.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,e.correlationId)(n.cloud_instance_host_name,e.correlationId)),i&&(n.nonce=e.nonce||void 0),n.state=e.state,n.client_info)this.authCodeRequest.clientInfo=n.client_info;else{let r=this.createCcsCredentials(e);r&&(this.authCodeRequest.ccsCredential=r)}return yield _i(this.authModule.acquireToken.bind(this.authModule),$e.AuthClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(this.authCodeRequest,n)})}createCcsCredentials(n){return n.account?{credential:n.account.homeAccountId,type:Gd.HOME_ACCOUNT_ID}:n.loginHint?{credential:n.loginHint,type:Gd.UPN}:null}};var a_e="ContentError",p5="user_switch";var l_e="USER_INTERACTION_REQUIRED",c_e="USER_CANCEL",d_e="NO_NETWORK",u_e="DISABLED",p_e="ACCOUNT_UNAVAILABLE",h_e="UX_NOT_ALLOWED";var UHe=-2147186943,HHe={[p5]:"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."},Hh=class t extends fr{constructor(n,e,i){super(n,e),Object.setPrototypeOf(this,t.prototype),this.name="NativeAuthError",this.ext=i}};function pb(t){if(t.ext&&t.ext.status&&t.ext.status===u_e||t.ext&&t.ext.error&&t.ext.error===UHe)return!0;switch(t.errorCode){case a_e:return!0;default:return!1}}function kC(t,n,e){if(e&&e.status)switch(e.status){case p_e:return _C(Rg.nativeAccountUnavailable);case l_e:return new od(t,n);case c_e:return xn(Ym);case d_e:return xn(k0);case h_e:return _C(Rg.uxNotAllowed)}return new Hh(t,HHe[t]||n,e)}var FE=class extends fp{acquireToken(n){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.SilentCacheClientAcquireToken,n.correlationId);let e=this.initializeServerTelemetryManager(Os.acquireTokenSilent_silentFlow),i=yield _i(this.getClientConfiguration.bind(this),$e.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,account:n.account}),o=new xO(i,this.performanceClient);this.logger.verbose("Silent auth client created");try{let a=(yield _i(o.acquireCachedToken.bind(o),$e.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,n.correlationId)(n))[0];return this.performanceClient.addFields({fromCache:!0},n.correlationId),a}catch(r){throw r instanceof SC&&r.errorCode===ab&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),r}})}logout(n){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(n);return this.clearCacheOnLogout(e.correlationId,e?.account)}};var hb=class extends PE{constructor(n,e,i,o,r,a,p,f,x,I,D,P){super(n,e,i,o,r,a,f,x,P),this.apiId=p,this.accountId=I,this.platformAuthProvider=x,this.nativeStorageManager=D,this.silentCacheClient=new FE(n,this.nativeStorageManager,i,o,r,a,f,x,P);let R=this.platformAuthProvider.getExtensionName();this.skus=vC.makeExtraSkuString({libraryName:Cl.MSAL_SKU,libraryVersion:Jp,extensionName:R,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(n){n.extraParameters=gt(ve({},n.extraParameters),{[S0.X_CLIENT_EXTRA_SKU]:this.skus})}acquireToken(n,e){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.NativeInteractionClientAcquireToken,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");let i=this.performanceClient.startMeasurement($e.NativeInteractionClientAcquireToken,this.correlationId),o=Nc.nowSeconds(),r=this.initializeServerTelemetryManager(this.apiId);try{let a=yield this.initializeNativeRequest(n);try{let f=yield this.acquireTokensFromCache(this.accountId,a);return i.end({success:!0,isNativeBroker:!1,fromCache:!0}),f}catch(f){if(e===rd.AccessToken)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),i.end({success:!1,brokerErrorCode:"cache_request_failed"}),f;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}let p=yield this.platformAuthProvider.sendMessage(a);return yield this.handleNativeResponse(p,a,o).then(f=>(i.end({success:!0,isNativeBroker:!0,requestId:f.requestId}),r.clearNativeBrokerErrorCode(),f)).catch(f=>{throw i.end({success:!1,errorCode:f.errorCode,subErrorCode:f.subError}),f})}catch(a){throw a instanceof Hh&&r.setNativeBrokerErrorCode(a.errorCode),i.end({success:!1}),a}})}createSilentCacheRequest(n,e){return{authority:n.authority,correlationId:this.correlationId,scopes:bl.fromString(n.scope).asArray(),account:e,forceRefresh:!1}}acquireTokensFromCache(n,e){return tt(this,null,function*(){if(!n)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Gi(Fc.noAccountFound);let i=this.browserStorage.getBaseAccountInfo({nativeAccountId:n},this.correlationId);if(!i)throw Gi(Fc.noAccountFound);try{let o=this.createSilentCacheRequest(e,i),r=yield this.silentCacheClient.acquireToken(o),a=gt(ve({},i),{idTokenClaims:r?.idTokenClaims,idToken:r?.idToken});return gt(ve({},r),{account:a})}catch(o){throw o}})}acquireTokenRedirect(n,e){return tt(this,null,function*(){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");let i=Lp(n,[]);delete i.onRedirectNavigate;let o=yield this.initializeNativeRequest(i);try{yield this.platformAuthProvider.sendMessage(o)}catch(p){if(p instanceof Hh&&(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(p.errorCode),pb(p)))throw p}this.browserStorage.setTemporaryCache(wl.NATIVE_REQUEST,JSON.stringify(o),!0);let r={apiId:Os.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},a=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(n.redirectUri);e.end({success:!0}),yield this.navigationClient.navigateExternal(a,r)})}handleRedirectPromise(n,e){return tt(this,null,function*(){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;let i=this.browserStorage.getCachedNativeRequest();if(!i)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),n&&e&&n?.addFields({errorCode:"no_cached_request"},e),null;let p=i,{prompt:o}=p,r=Lp(p,["prompt"]);o&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(wl.NATIVE_REQUEST));let a=Nc.nowSeconds();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");let f=yield this.platformAuthProvider.sendMessage(r),x=yield this.handleNativeResponse(f,r,a);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),n&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),x}catch(f){throw f}})}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}handleNativeResponse(n,e,i){return tt(this,null,function*(){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");let o=jT.extractTokenClaims(n.id_token,$d),r=this.createHomeAccountIdentifier(n,o),a=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:e.accountId},this.correlationId)?.homeAccountId;if(e.extraParameters?.child_client_id&&n.account.id!==e.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(r!==a&&n.account.id!==e.accountId)throw kC(p5);let p=yield this.getDiscoveredAuthority({requestAuthority:e.authority}),f=XT(this.browserStorage,p,r,$d,this.correlationId,o,n.client_info,void 0,o.tid,void 0,n.account.id,this.logger);n.expires_in=Number(n.expires_in);let x=yield this.generateAuthenticationResult(n,e,o,f,p.canonicalAuthority,i);return yield this.cacheAccount(f,this.correlationId),yield this.cacheNativeTokens(n,e,r,o,n.access_token,x.tenantId,i),x})}createHomeAccountIdentifier(n,e){return Cd.generateHomeAccountId(n.client_info||Ii.EMPTY_STRING,Nu.Default,this.logger,this.browserCrypto,e)}generateScopes(n,e){return e?bl.fromString(e):bl.fromString(n)}generatePopAccessToken(n,e){return tt(this,null,function*(){if(e.tokenType===Qr.POP&&e.signPopToken){if(n.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),n.shr;let i=new mp(this.browserCrypto),o={resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,shrNonce:e.shrNonce};if(!e.keyId)throw Gi(Fc.keyIdMissing);return i.signPopToken(n.access_token,e.keyId,o)}else return n.access_token})}generateAuthenticationResult(n,e,i,o,r,a){return tt(this,null,function*(){let p=this.addTelemetryFromNativeResponse(n.properties.MATS),f=this.generateScopes(e.scope,n.scope),x=n.account.properties||{},I=x.UID||i.oid||i.sub||Ii.EMPTY_STRING,D=x.TenantId||i.tid||Ii.EMPTY_STRING,P=aC(o.getAccountInfo(),void 0,i,n.id_token);P.nativeAccountId!==n.account.id&&(P.nativeAccountId=n.account.id);let R=yield this.generatePopAccessToken(n,e),j=e.tokenType===Qr.POP?Qr.POP:Qr.BEARER;return{authority:r,uniqueId:I,tenantId:D,scopes:f.asArray(),account:P,idToken:n.id_token,idTokenClaims:i,accessToken:R,fromCache:p?this.isResponseFromCache(p):!1,expiresOn:Nc.toDateFromSeconds(a+n.expires_in),tokenType:j,correlationId:this.correlationId,state:n.state,fromNativeBroker:!0}})}cacheAccount(n,e){return tt(this,null,function*(){yield this.browserStorage.setAccount(n,this.correlationId),this.browserStorage.removeAccountContext(n.getAccountInfo(),e)})}cacheNativeTokens(n,e,i,o,r,a,p){let f=Ll.createIdTokenEntity(i,e.authority,n.id_token||"",e.clientId,o.tid||""),x=e.tokenType===Qr.POP?Ii.SHR_NONCE_VALIDITY:(typeof n.expires_in=="string"?parseInt(n.expires_in,10):n.expires_in)||0,I=p+x,D=this.generateScopes(n.scope,e.scope),P=Ll.createAccessTokenEntity(i,e.authority,r,e.clientId,o.tid||a,D.printScopes(),I,0,$d,void 0,e.tokenType,void 0,e.keyId),R={idToken:f,accessToken:P};return this.nativeStorageManager.saveCacheRecord(R,this.correlationId,e.storeInCache)}getExpiresInValue(n,e){return n===Qr.POP?Ii.SHR_NONCE_VALIDITY:(typeof e=="string"?parseInt(e,10):e)||0}addTelemetryFromNativeResponse(n){let e=this.getMATSFromResponse(n);return e?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:e.broker_version,matsAccountJoinOnStart:e.account_join_on_start,matsAccountJoinOnEnd:e.account_join_on_end,matsDeviceJoin:e.device_join,matsPromptBehavior:e.prompt_behavior,matsApiErrorCode:e.api_error_code,matsUiVisible:e.ui_visible,matsSilentCode:e.silent_code,matsSilentBiSubCode:e.silent_bi_sub_code,matsSilentMessage:e.silent_message,matsSilentStatus:e.silent_status,matsHttpStatus:e.http_status,matsHttpEventCount:e.http_event_count},this.correlationId),e):null}getMATSFromResponse(n){if(n)try{return JSON.parse(n)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(n){return typeof n.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!n.is_cached}initializeNativeRequest(n){return tt(this,null,function*(){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");let e=yield this.getCanonicalAuthority(n),p=n,{scopes:i}=p,o=Lp(p,["scopes"]),r=new bl(i||[]);r.appendScopes(Qp);let a=gt(ve({},o),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:e.urlString,scope:r.printScopes(),redirectUri:this.getRedirectUri(n.redirectUri),prompt:this.getPrompt(n.prompt),correlationId:this.correlationId,tokenType:n.authenticationScheme,windowTitleSubstring:document.title,extraParameters:ve(ve({},n.extraQueryParameters),n.tokenQueryParameters),extendedExpiryToken:!1,keyId:n.popKid});if(a.signPopToken&&n.popKid)throw xn(SE);if(this.handleExtraBrokerParams(a),a.extraParameters=a.extraParameters||{},a.extraParameters.telemetry=Bu.MATS_TELEMETRY,n.authenticationScheme===Qr.POP){let f={resourceRequestUri:n.resourceRequestUri,resourceRequestMethod:n.resourceRequestMethod,shrClaims:n.shrClaims,shrNonce:n.shrNonce},x=new mp(this.browserCrypto),I;if(a.keyId)I=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:a.keyId})),a.signPopToken=!1;else{let D=yield _i(x.generateCnf.bind(x),$e.PopTokenGenerateCnf,this.logger,this.performanceClient,this.correlationId)(f,this.logger);I=D.reqCnfString,a.keyId=D.kid,a.signPopToken=!0}a.reqCnf=I}return this.addRequestSKUs(a),a})}getCanonicalAuthority(n){return tt(this,null,function*(){let e=n.authority||this.config.auth.authority;n.account&&(yield this.getDiscoveredAuthority({requestAuthority:e,requestAzureCloudOptions:n.azureCloudOptions,account:n.account}));let i=new Ur(e);return i.validateAsUri(),i})}getPrompt(n){switch(this.apiId){case Os.ssoSilent:case Os.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Xl.NONE}if(!n){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(n){case Xl.NONE:case Xl.CONSENT:case Xl.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),n;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${n} is not compatible with native flow`),xn(CE)}}handleExtraBrokerParams(n){let e=n.extraParameters&&n.extraParameters.hasOwnProperty(S0.BROKER_CLIENT_ID)&&n.extraParameters.hasOwnProperty(S0.BROKER_REDIRECT_URI)&&n.extraParameters.hasOwnProperty(S0.CLIENT_ID);if(!n.embeddedClientId&&!e)return;let i="",o=n.redirectUri;n.embeddedClientId?(n.redirectUri=this.config.auth.redirectUri,i=n.embeddedClientId):n.extraParameters&&(n.redirectUri=n.extraParameters[S0.BROKER_REDIRECT_URI],i=n.extraParameters[S0.CLIENT_ID]),n.extraParameters={child_client_id:i,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:i,embeddedRedirectUri:o},this.correlationId)}};function dY(t,n,e,i,o){return tt(this,null,function*(){let r=Og.getStandardAuthorizeRequestParameters(gt(ve({},t.auth),{authority:n}),e,i,o);if(pc.addLibraryInfo(r,{sku:Cl.MSAL_SKU,version:Jp,os:"",cpu:""}),t.auth.protocolMode!==nl.OIDC&&pc.addApplicationTelemetry(r,t.telemetry.application),e.platformBroker&&(pc.addNativeBroker(r),o.addFields({isPlatformAuthorizeRequest:!0},e.correlationId),e.authenticationScheme===Qr.POP)){let a=new ME(i,o),p=new mp(a),f;e.popKid?f=a.encodeKid(e.popKid):f=(yield _i(p.generateCnf.bind(p),$e.PopTokenGenerateCnf,i,o,e.correlationId)(e,i)).reqCnfString,pc.addPopToken(r,f)}return pc.instrumentBrokerParams(r,e.correlationId,o),r})}function NE(t,n,e,i,o){return tt(this,null,function*(){if(!e.codeChallenge)throw ys(Fu.pkceParamsMissing);let r=yield _i(dY,$e.GetStandardParams,i,o,e.correlationId)(t,n,e,i,o);return pc.addResponseType(r,vR.CODE),pc.addCodeChallengeParams(r,e.codeChallenge,Ii.S256_CODE_CHALLENGE_METHOD),pc.addExtraQueryParameters(r,e.extraQueryParameters||{}),Og.getAuthorizeUrl(n,r,t.auth.encodeExtraQueryParams,e.extraQueryParameters)})}function BE(t,n,e,i,o,r){return tt(this,null,function*(){if(!i.earJwk)throw xn(wO);let a=yield dY(n,e,i,o,r);pc.addResponseType(a,vR.IDTOKEN_TOKEN_REFRESHTOKEN),pc.addEARParameters(a,i.earJwk);let p=new Map;pc.addExtraQueryParameters(p,i.extraQueryParameters||{});let f=Og.getAuthorizeUrl(e,p,n.auth.encodeExtraQueryParams,i.extraQueryParameters);return m_e(t,f,a)})}function zE(t,n,e,i,o,r){return tt(this,null,function*(){let a=yield dY(n,e,i,o,r);pc.addResponseType(a,vR.CODE),pc.addCodeChallengeParams(a,i.codeChallenge,i.codeChallengeMethod||Ii.S256_CODE_CHALLENGE_METHOD),pc.addPostBodyParameters(a,i.authorizePostBodyParameters||{});let p=new Map;pc.addExtraQueryParameters(p,i.extraQueryParameters||{});let f=Og.getAuthorizeUrl(e,p,n.auth.encodeExtraQueryParams,i.extraQueryParameters);return m_e(t,f,a)})}function m_e(t,n,e){let i=t.createElement("form");return i.method="post",i.action=n,e.forEach((o,r)=>{let a=t.createElement("input");a.hidden=!0,a.name=r,a.value=o,i.appendChild(a)}),t.body.appendChild(i),i}function f_e(t,n,e,i,o,r,a,p,f,x){return tt(this,null,function*(){if(p.verbose("Account id found, calling WAM for token"),!x)throw xn(cb);let I=new ME(p,f),D=new hb(i,o,I,p,a,i.system.navigationClient,e,f,x,n,r,t.correlationId),{userRequestState:P}=Km.parseRequestState(I,t.state);return _i(D.acquireToken.bind(D),$e.NativeInteractionClientAcquireToken,p,f,t.correlationId)(gt(ve({},t),{state:P,prompt:void 0}))})}function MC(t,n,e,i,o,r,a,p,f,x,I,D){return tt(this,null,function*(){if(D0.removeThrottle(a,o.auth.clientId,t),n.accountId)return _i(f_e,$e.HandleResponsePlatformBroker,x,I,t.correlationId)(t,n.accountId,i,o,a,p,f,x,I,D);let P=gt(ve({},t),{code:n.code||"",codeVerifier:e}),R=new LE(r,a,P,x,I);return yield _i(R.handleCodeResponse.bind(R),$e.HandleCodeResponse,x,I,t.correlationId)(n,t)})}function VE(t,n,e,i,o,r,a,p,f,x,I){return tt(this,null,function*(){if(D0.removeThrottle(r,i.auth.clientId,t),Og.validateAuthorizationResponse(n,t.state),!n.ear_jwe)throw xn(NV);if(!t.earJwk)throw xn(wO);let D=JSON.parse(yield _i(kge,$e.DecryptEarResponse,f,x,t.correlationId)(t.earJwk,n.ear_jwe));if(D.accountId)return _i(f_e,$e.HandleResponsePlatformBroker,f,x,t.correlationId)(t,D.accountId,e,i,r,a,p,f,x,I);let P=new Zm(i.auth.clientId,r,new ME(f,x),f,null,null,x);P.validateTokenResponse(D);let R={code:"",state:t.state,nonce:t.nonce,client_info:D.client_info,cloud_graph_host_name:D.cloud_graph_host_name,cloud_instance_host_name:D.cloud_instance_host_name,cloud_instance_name:D.cloud_instance_name,msgraph_host:D.msgraph_host};return yield _i(P.handleServerTokenResponse.bind(P),$e.HandleServerTokenResponse,f,x,t.correlationId)(D,o,Nc.nowSeconds(),t,R,void 0,void 0,void 0,void 0)})}var jHe=32;function mb(t,n,e){return tt(this,null,function*(){t.addQueueMeasurement($e.GeneratePkceCodes,e);let i=xl(GHe,$e.GenerateCodeVerifier,n,t,e)(t,n,e),o=yield _i($He,$e.GenerateCodeChallengeFromVerifier,n,t,e)(i,t,n,e);return{verifier:i,challenge:o}})}function GHe(t,n,e){try{let i=new Uint8Array(jHe);return xl(Tge,$e.GetRandomValues,n,t,e)(i),Uh(i)}catch{throw xn(bC)}}function $He(t,n,e,i){return tt(this,null,function*(){n.addQueueMeasurement($e.GenerateCodeChallengeFromVerifier,i);try{let o=yield _i(JZ,$e.Sha256Digest,e,n,i)(t,n,i);return Uh(new Uint8Array(o))}catch{throw xn(bC)}})}var h5=class t{constructor(n,e,i,o){this.logger=n,this.handshakeTimeoutMs=e,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=i,this.handshakeEvent=i.startMeasurement($e.NativeMessageHandlerHandshake),this.platformAuthType=Bu.PLATFORM_EXTENSION_PROVIDER}sendMessage(n){return tt(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendMessage called.");let e={method:TE.GetToken,request:n},i={channel:Bu.CHANNEL_ID,extensionId:this.extensionId,responseId:Bc(),body:e};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(i)}`),this.messageChannel.port1.postMessage(i);let o=yield new Promise((a,p)=>{this.resolvers.set(i.responseId,{resolve:a,reject:p})});return this.validatePlatformBrokerResponse(o)})}static createProvider(n,e,i){return tt(this,null,function*(){n.trace("PlatformAuthExtensionHandler - createProvider called.");try{let o=new t(n,e,i,Bu.PREFERRED_EXTENSION_ID);return yield o.sendHandshakeRequest(),o}catch{let r=new t(n,e,i);return yield r.sendHandshakeRequest(),r}})}sendHandshakeRequest(){return tt(this,null,function*(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);let n={channel:Bu.CHANNEL_ID,extensionId:this.extensionId,responseId:Bc(),body:{method:TE.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(n,window.origin,[this.messageChannel.port2]),new Promise((e,i)=>{this.handshakeResolvers.set(n.responseId,{resolve:e,reject:i}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),i(xn(bE)),this.handshakeResolvers.delete(n.responseId)},this.handshakeTimeoutMs)})})}onWindowMessage(n){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),n.source!==window)return;let e=n.data;if(!(!e.channel||e.channel!==Bu.CHANNEL_ID)&&!(e.extensionId&&e.extensionId!==this.extensionId)&&e.body.method===TE.HandshakeRequest){let i=this.handshakeResolvers.get(e.responseId);if(!i){this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${e.responseId}`);return}this.logger.verbose(e.extensionId?`Extension with id: ${e.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),i.reject(xn(xE))}}onChannelMessage(n){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");let e=n.data,i=this.resolvers.get(e.responseId),o=this.handshakeResolvers.get(e.responseId);try{let r=e.body.method;if(r===TE.Response){if(!i)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")i.reject(kC(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?i.reject(kC(a.result.code,a.result.description,a.result.ext)):i.resolve(a.result);else throw VT($v.unexpectedError,"Event does not contain result.");this.resolvers.delete(e.responseId)}else if(r===TE.HandshakeResponse){if(!o){this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${e.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=e.extensionId,this.extensionVersion=e.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(e.responseId)}}catch(r){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${r}`),this.logger.errorPii(`Unable to parse ${n}`),i?i.reject(r):o&&o.reject(r)}}validatePlatformBrokerResponse(n){if(n.hasOwnProperty("access_token")&&n.hasOwnProperty("id_token")&&n.hasOwnProperty("client_info")&&n.hasOwnProperty("account")&&n.hasOwnProperty("scope")&&n.hasOwnProperty("expires_in"))return n;throw VT($v.unexpectedError,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===Bu.PREFERRED_EXTENSION_ID?"chrome":this.getExtensionId()?.length?"unknown":void 0}};var m5=class t{constructor(n,e,i){this.logger=n,this.performanceClient=e,this.correlationId=i,this.platformAuthType=Bu.PLATFORM_DOM_PROVIDER}static createProvider(n,e,i){return tt(this,null,function*(){if(n.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication&&(yield window.navigator.platformAuthentication.getSupportedContracts(Bu.MICROSOFT_ENTRA_BROKERID))?.includes(Bu.PLATFORM_DOM_APIS))return n.trace("Platform auth api available in DOM"),new t(n,e,i)})}getExtensionId(){return Bu.MICROSOFT_ENTRA_BROKERID}getExtensionVersion(){return""}getExtensionName(){return Bu.DOM_API_NAME}sendMessage(n){return tt(this,null,function*(){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{let e=this.initializePlatformDOMRequest(n),i=yield window.navigator.platformAuthentication.executeGetToken(e);return this.validatePlatformBrokerResponse(i)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}})}initializePlatformDOMRequest(n){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");let $=n,{accountId:e,clientId:i,authority:o,scope:r,redirectUri:a,correlationId:p,state:f,storeInCache:x,embeddedClientId:I,extraParameters:D}=$,P=Lp($,["accountId","clientId","authority","scope","redirectUri","correlationId","state","storeInCache","embeddedClientId","extraParameters"]),R=this.getDOMExtraParams(P);return{accountId:e,brokerId:this.getExtensionId(),authority:o,clientId:i,correlationId:p||this.correlationId,extraParameters:ve(ve({},D),R),isSecurityTokenService:!1,redirectUri:a,scope:r,state:f,storeInCache:x,embeddedClientId:I}}validatePlatformBrokerResponse(n){if(n.hasOwnProperty("isSuccess")){if(n.hasOwnProperty("accessToken")&&n.hasOwnProperty("idToken")&&n.hasOwnProperty("clientInfo")&&n.hasOwnProperty("account")&&n.hasOwnProperty("scopes")&&n.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(n);if(n.hasOwnProperty("error")){let e=n;if(e.isSuccess===!1&&e.error&&e.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),kC(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 VT($v.unexpectedError,"Response missing expected properties.")}convertToPlatformBrokerResponse(n){return this.logger.trace(this.platformAuthType+" - convertToNativeResponse called"),{access_token:n.accessToken,id_token:n.idToken,client_info:n.clientInfo,account:n.account,expires_in:n.expiresIn,scope:n.scopes,state:n.state||"",properties:n.properties||{},extendedLifetimeToken:n.extendedLifetimeToken??!1,shr:n.proofOfPossessionPayload}}getDOMExtraParams(n){let e=Object.entries(n).reduce((o,[r,a])=>(o[r]=String(a),o),{});return ve({},e)}};function g_e(t,n,e,i){return tt(this,null,function*(){t.trace("getPlatformAuthProvider called",e);let o=qHe();t.trace("Has client allowed platform auth via DOM API: "+o);let r;try{o&&(r=yield m5.createProvider(t,n,e)),r||(t.trace("Platform auth via DOM API not available, checking for extension"),r=yield h5.createProvider(t,i||sY,n))}catch(a){t.trace("Platform auth not available",a)}return r})}function qHe(){let t;try{return t=window[Ka.SessionStorage],t?.getItem($ge)==="true"}catch{return!1}}function O0(t,n,e,i){if(n.trace("isPlatformAuthAllowed called"),!t.system.allowPlatformBroker)return n.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!e)return n.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(i)switch(i){case Qr.BEARER:case Qr.POP:return n.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return n.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}var f5=class extends fp{constructor(n,e,i,o,r,a,p,f,x,I){super(n,e,i,o,r,a,p,x,I),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f,this.eventHandler=r}acquireToken(n,e){let i;try{if(i={popupName:this.generatePopupName(n.scopes||Qp,n.authority||this.config.auth.authority),popupWindowAttributes:n.popupWindowAttributes||{},popupWindowParent:n.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(n,i,e);{let r=gt(ve({},n),{httpMethod:u5(n,this.config.auth.protocolMode)});return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),i.popup=this.openSizedPopup("about:blank",i),this.acquireTokenPopupAsync(r,i,e)}}catch(o){return Promise.reject(o)}}logout(n){try{this.logger.verbose("logoutPopup called");let e=this.initializeLogoutRequest(n),i={popupName:this.generateLogoutPopupName(e),popupWindowAttributes:n?.popupWindowAttributes||{},popupWindowParent:n?.popupWindowParent??window},o=n&&n.authority,r=n&&n.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(e,i,o,r)):(this.logger.verbose("asyncPopup set to false, opening popup"),i.popup=this.openSizedPopup("about:blank",i),this.logoutPopupAsync(e,i,o,r))}catch(e){return Promise.reject(e)}}acquireTokenPopupAsync(n,e,i){return tt(this,null,function*(){this.logger.verbose("acquireTokenPopupAsync called");let o=yield _i(this.initializeAuthorizationRequest.bind(this),$e.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(n,ao.Popup);e.popup&&DO(o.authority);let r=O0(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme);return o.platformBroker=r,this.config.auth.protocolMode===nl.EAR?this.executeEarFlow(o,e):this.executeCodeFlow(o,e,i)})}executeCodeFlow(n,e,i){return tt(this,null,function*(){let o=n.correlationId,r=this.initializeServerTelemetryManager(Os.acquireTokenPopup),a=i||(yield _i(mb,$e.GeneratePkceCodes,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o)),p=gt(ve({},n),{codeChallenge:a.challenge});try{let f=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,o)({serverTelemetryManager:r,requestAuthority:p.authority,requestAzureCloudOptions:p.azureCloudOptions,requestExtraQueryParameters:p.extraQueryParameters,account:p.account});if(p.httpMethod===zh.POST)return yield this.executeCodeFlowWithPost(p,e,f,a.verifier);{let x=yield _i(NE,$e.GetAuthCodeUrl,this.logger,this.performanceClient,o)(this.config,f.authority,p,this.logger,this.performanceClient),I=this.initiateAuthRequest(x,e);this.eventHandler.emitEvent(Qn.POPUP_OPENED,ao.Popup,{popupWindow:I},null);let D=yield this.monitorPopupForHash(I,e.popupWindowParent),P=xl(DC,$e.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(D,this.config.auth.OIDCOptions.serverResponseType,this.logger);return yield _i(MC,$e.HandleResponseCode,this.logger,this.performanceClient,o)(n,P,a.verifier,Os.acquireTokenPopup,this.config,f,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(f){throw e.popup?.close(),f instanceof fr&&(f.setCorrelationId(this.correlationId),r.cacheFailedRequest(f)),f}})}executeEarFlow(n,e){return tt(this,null,function*(){let i=n.correlationId,o=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,i)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),r=yield _i(AE,$e.GenerateEarKey,this.logger,this.performanceClient,i)(),a=gt(ve({},n),{earJwk:r}),p=e.popup||this.openPopup("about:blank",e);(yield BE(p.document,this.config,o,a,this.logger,this.performanceClient)).submit();let x=yield _i(this.monitorPopupForHash.bind(this),$e.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,i)(p,e.popupWindowParent),I=xl(DC,$e.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(x,this.config.auth.OIDCOptions.serverResponseType,this.logger);return _i(VE,$e.HandleResponseEar,this.logger,this.performanceClient,i)(a,I,Os.acquireTokenPopup,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}executeCodeFlowWithPost(n,e,i,o){return tt(this,null,function*(){let r=n.correlationId,a=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,r)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),p=e.popup||this.openPopup("about:blank",e);(yield zE(p.document,this.config,a,n,this.logger,this.performanceClient)).submit();let x=yield _i(this.monitorPopupForHash.bind(this),$e.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(p,e.popupWindowParent),I=xl(DC,$e.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(x,this.config.auth.OIDCOptions.serverResponseType,this.logger);return _i(MC,$e.HandleResponseCode,this.logger,this.performanceClient,r)(n,I,o,Os.acquireTokenPopup,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logoutPopupAsync(n,e,i,o){return tt(this,null,function*(){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Qn.LOGOUT_START,ao.Popup,n);let r=this.initializeServerTelemetryManager(Os.logoutPopup);try{yield this.clearCacheOnLogout(this.correlationId,n.account);let a=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i,account:n.account||void 0});try{a.authority.endSessionEndpoint}catch{if(n.account?.homeAccountId&&n.postLogoutRedirectUri&&a.authority.protocolMode===nl.OIDC){if(this.eventHandler.emitEvent(Qn.LOGOUT_SUCCESS,ao.Popup,n),o){let x={apiId:Os.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},I=Ur.getAbsoluteUrl(o,zu());yield this.navigationClient.navigateInternal(I,x)}e.popup?.close();return}}let p=a.getLogoutUri(n);this.eventHandler.emitEvent(Qn.LOGOUT_SUCCESS,ao.Popup,n);let f=this.openPopup(p,e);if(this.eventHandler.emitEvent(Qn.POPUP_OPENED,ao.Popup,{popupWindow:f},null),yield this.monitorPopupForHash(f,e.popupWindowParent).catch(()=>{}),o){let x={apiId:Os.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},I=Ur.getAbsoluteUrl(o,zu());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${I}`),yield this.navigationClient.navigateInternal(I,x)}else this.logger.verbose("No main window navigation requested")}catch(a){throw e.popup?.close(),a instanceof fr&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),this.eventHandler.emitEvent(Qn.LOGOUT_FAILURE,ao.Popup,null,a),this.eventHandler.emitEvent(Qn.LOGOUT_END,ao.Popup),a}this.eventHandler.emitEvent(Qn.LOGOUT_END,ao.Popup)})}initiateAuthRequest(n,e){if(n)return this.logger.infoPii(`Navigate to: ${n}`),this.openPopup(n,e);throw this.logger.error("Navigate url is empty"),xn(Pg)}monitorPopupForHash(n,e){return new Promise((i,o)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");let r=setInterval(()=>{if(n.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(r),o(xn(Ym));return}let a="";try{a=n.location.href}catch{}if(!a||a==="about:blank")return;clearInterval(r);let p="",f=this.config.auth.OIDCOptions.serverResponseType;n&&(f===Ig.QUERY?p=n.location.search:p=n.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),i(p)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(n,e)})}openPopup(n,e){try{let i;if(e.popup?(i=e.popup,this.logger.verbosePii(`Navigating popup window to: ${n}`),i.location.assign(n)):typeof e.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${n}`),i=this.openSizedPopup(n,e)),!i)throw xn(rE);return i.focus&&i.focus(),this.currentWindow=i,e.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),i}catch(i){throw this.logger.error("error opening popup "+i.message),xn(oE)}}openSizedPopup(n,{popupName:e,popupWindowAttributes:i,popupWindowParent:o}){let r=o.screenLeft?o.screenLeft:o.screenX,a=o.screenTop?o.screenTop:o.screenY,p=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,x=i.popupSize?.width,I=i.popupSize?.height,D=i.popupPosition?.top,P=i.popupPosition?.left;return(!x||x<0||x>p)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),x=Cl.POPUP_WIDTH),(!I||I<0||I>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),I=Cl.POPUP_HEIGHT),(!D||D<0||D>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),D=Math.max(0,f/2-Cl.POPUP_HEIGHT/2+a)),(!P||P<0||P>p)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),P=Math.max(0,p/2-Cl.POPUP_WIDTH/2+r)),o.open(n,e,`width=${x}, height=${I}, top=${D}, left=${P}, scrollbars=yes`)}unloadWindow(n){this.currentWindow&&this.currentWindow.close(),n.preventDefault()}cleanPopup(n,e){n.close(),e.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(n,e){return`${Cl.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${n.join("-")}.${e}.${this.correlationId}`}generateLogoutPopupName(n){let e=n.account&&n.account.homeAccountId;return`${Cl.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e}.${this.correlationId}`}};function WHe(){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 g5=class extends fp{constructor(n,e,i,o,r,a,p,f,x,I){super(n,e,i,o,r,a,p,x,I),this.nativeStorage=f}acquireToken(n){return tt(this,null,function*(){let e=yield _i(this.initializeAuthorizationRequest.bind(this),$e.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(n,ao.Redirect);e.platformBroker=O0(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme);let i=r=>{r.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent(Qn.RESTORE_FROM_BFCACHE,ao.Redirect))},o=this.getRedirectStartPage(n.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(wl.ORIGIN_URI,o,!0),window.addEventListener("pageshow",i);try{this.config.auth.protocolMode===nl.EAR?yield this.executeEarFlow(e):yield this.executeCodeFlow(e,n.onRedirectNavigate)}catch(r){throw r instanceof fr&&r.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",i),r}})}executeCodeFlow(n,e){return tt(this,null,function*(){let i=n.correlationId,o=this.initializeServerTelemetryManager(Os.acquireTokenRedirect),r=yield _i(mb,$e.GeneratePkceCodes,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),a=gt(ve({},n),{codeChallenge:r.challenge});this.browserStorage.cacheAuthorizeRequest(a,r.verifier);try{if(a.httpMethod===zh.POST)return yield this.executeCodeFlowWithPost(a);{let p=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account}),f=yield _i(NE,$e.GetAuthCodeUrl,this.logger,this.performanceClient,n.correlationId)(this.config,p.authority,a,this.logger,this.performanceClient);return yield this.initiateAuthRequest(f,e)}}catch(p){throw p instanceof fr&&(p.setCorrelationId(this.correlationId),o.cacheFailedRequest(p)),p}})}executeEarFlow(n){return tt(this,null,function*(){let e=n.correlationId,i=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),o=yield _i(AE,$e.GenerateEarKey,this.logger,this.performanceClient,e)(),r=gt(ve({},n),{earJwk:o});return this.browserStorage.cacheAuthorizeRequest(r),(yield BE(document,this.config,i,r,this.logger,this.performanceClient)).submit(),new Promise((p,f)=>{setTimeout(()=>{f(xn(wC,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}executeCodeFlowWithPost(n){return tt(this,null,function*(){let e=n.correlationId,i=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account});return this.browserStorage.cacheAuthorizeRequest(n),(yield zE(document,this.config,i,n,this.logger,this.performanceClient)).submit(),new Promise((r,a)=>{setTimeout(()=>{a(xn(wC,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})})}handleRedirectPromise(n="",e,i,o){return tt(this,null,function*(){let r=this.initializeServerTelemetryManager(Os.handleRedirectPromise);try{let[a,p]=this.getRedirectResponse(n||"");if(!a)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),WHe()!=="back_forward"?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;let f=this.browserStorage.getTemporaryCache(wl.ORIGIN_URI,!0)||Ii.EMPTY_STRING,x=Dg.normalizeUrlForComparison(f),I=Dg.normalizeUrlForComparison(window.location.href);if(x===I&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),f.indexOf("#")>-1&&nY(f),yield this.handleResponse(a,e,i,r);if(this.config.auth.navigateToLoginRequestUrl){if(!EO()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(wl.URL_HASH,p,!0);let D={apiId:Os.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},P=!0;if(!f||f==="null"){let R=oY();this.browserStorage.setTemporaryCache(wl.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,D)}else this.logger.verbose(`Navigating to loginRequestUrl: ${f}`),P=yield this.navigationClient.navigateInternal(f,D);if(!P)return yield this.handleResponse(a,e,i,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),yield this.handleResponse(a,e,i,r);return null}catch(a){throw a instanceof fr&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),a}})}getRedirectResponse(n){this.logger.verbose("getRedirectResponseHash called");let e=n;e||(this.config.auth.OIDCOptions.serverResponseType===Ig.QUERY?e=window.location.search:e=window.location.hash);let i=Dg.getDeserializedResponse(e);if(i){try{s_e(i,this.browserCrypto,ao.Redirect)}catch(r){return r instanceof fr&&this.logger.error(`Interaction type validation failed due to ${r.errorCode}: ${r.errorMessage}`),[null,""]}return TO(window),this.logger.verbose("Hash contains known properties, returning response hash"),[i,e]}let o=this.browserStorage.getTemporaryCache(wl.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(wl.URL_HASH)),o&&(i=Dg.getDeserializedResponse(o),i)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[i,o]):[null,""]}handleResponse(n,e,i,o){return tt(this,null,function*(){if(!n.state)throw xn(sb);if(n.ear_jwe){let p=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e.correlationId)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return _i(VE,$e.HandleResponseEar,this.logger,this.performanceClient,e.correlationId)(e,n,Os.acquireTokenRedirect,this.config,p,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}let a=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:e.authority});return _i(MC,$e.HandleResponseCode,this.logger,this.performanceClient,e.correlationId)(e,n,i,Os.acquireTokenRedirect,this.config,a,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}initiateAuthRequest(n,e){return tt(this,null,function*(){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),n){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${n}`);let i={apiId:Os.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=e||this.config.auth.onRedirectNavigate;if(typeof o=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o(n)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),yield this.navigationClient.navigateExternal(n,i);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),yield this.navigationClient.navigateExternal(n,i);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),xn(Pg)})}logout(n){return tt(this,null,function*(){this.logger.verbose("logoutRedirect called");let e=this.initializeLogoutRequest(n),i=this.initializeServerTelemetryManager(Os.logout);try{this.eventHandler.emitEvent(Qn.LOGOUT_START,ao.Redirect,n),yield this.clearCacheOnLogout(this.correlationId,e.account);let o={apiId:Os.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},r=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:i,requestAuthority:n&&n.authority,requestExtraQueryParameters:n?.extraQueryParameters,account:n&&n.account||void 0});if(r.authority.protocolMode===nl.OIDC)try{r.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId){this.eventHandler.emitEvent(Qn.LOGOUT_SUCCESS,ao.Redirect,e);return}}let a=r.getLogoutUri(e);if(this.eventHandler.emitEvent(Qn.LOGOUT_SUCCESS,ao.Redirect,e),n&&typeof n.onRedirectNavigate=="function")if(n.onRedirectNavigate(a)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Qm.SIGNOUT),yield this.navigationClient.navigateExternal(a,o);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Qm.SIGNOUT),yield this.navigationClient.navigateExternal(a,o);return}}catch(o){throw o instanceof fr&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),this.eventHandler.emitEvent(Qn.LOGOUT_FAILURE,ao.Redirect,null,o),this.eventHandler.emitEvent(Qn.LOGOUT_END,ao.Redirect),o}this.eventHandler.emitEvent(Qn.LOGOUT_END,ao.Redirect)})}getRedirectStartPage(n){let e=n||window.location.href;return Ur.getAbsoluteUrl(e,zu())}};function __e(t,n,e,i,o){return tt(this,null,function*(){if(n.addQueueMeasurement($e.SilentHandlerInitiateAuthRequest,i),!t)throw e.info("Navigate url is empty"),xn(Pg);return o?_i(KHe,$e.SilentHandlerLoadFrame,e,n,i)(t,o,n,i):xl(ZHe,$e.SilentHandlerLoadFrameSync,e,n,i)(t)})}function y_e(t,n,e,i,o){return tt(this,null,function*(){let r=_5();if(!r.contentDocument)throw"No document associated with iframe!";return(yield zE(r.contentDocument,t,n,e,i,o)).submit(),r})}function v_e(t,n,e,i,o){return tt(this,null,function*(){let r=_5();if(!r.contentDocument)throw"No document associated with iframe!";return(yield BE(r.contentDocument,t,n,e,i,o)).submit(),r})}function uY(t,n,e,i,o,r,a){return tt(this,null,function*(){return i.addQueueMeasurement($e.SilentHandlerMonitorIframeForHash,r),new Promise((p,f)=>{n{window.clearInterval(I),f(xn(sE))},n),I=window.setInterval(()=>{let D="",P=t.contentWindow;try{D=P?P.location.href:""}catch{}if(!D||D==="about:blank")return;let R="";P&&(a===Ig.QUERY?R=P.location.search:R=P.location.hash),window.clearTimeout(x),window.clearInterval(I),p(R)},e)}).finally(()=>{xl(YHe,$e.RemoveHiddenIframe,o,i,r)(t)})})}function KHe(t,n,e,i){return e.addQueueMeasurement($e.SilentHandlerLoadFrame,i),new Promise((o,r)=>{let a=_5();window.setTimeout(()=>{if(!a){r("Unable to load iframe");return}a.src=t,o(a)},n)})}function ZHe(t){let n=_5();return n.src=t,n}function _5(){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 YHe(t){document.body===t.parentNode&&document.body.removeChild(t)}var y5=class extends fp{constructor(n,e,i,o,r,a,p,f,x,I,D){super(n,e,i,o,r,a,f,I,D),this.apiId=p,this.nativeStorage=x}acquireToken(n){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.SilentIframeClientAcquireToken,n.correlationId),!n.loginHint&&!n.sid&&(!n.account||!n.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");let e=ve({},n);e.prompt?e.prompt!==Xl.NONE&&e.prompt!==Xl.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${e.prompt} with ${Xl.NONE}`),e.prompt=Xl.NONE):e.prompt=Xl.NONE;let i=yield _i(this.initializeAuthorizationRequest.bind(this),$e.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,n.correlationId)(e,ao.Silent);return i.platformBroker=O0(this.config,this.logger,this.platformAuthProvider,i.authenticationScheme),DO(i.authority),this.config.auth.protocolMode===nl.EAR?this.executeEarFlow(i):this.executeCodeFlow(i)})}executeCodeFlow(n){return tt(this,null,function*(){let e,i=this.initializeServerTelemetryManager(this.apiId);try{return e=yield _i(this.createAuthCodeClient.bind(this),$e.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,n.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),yield _i(this.silentTokenHelper.bind(this),$e.SilentIframeClientTokenHelper,this.logger,this.performanceClient,n.correlationId)(e,n)}catch(o){if(o instanceof fr&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),!e||!(o instanceof fr)||o.errorCode!==Cl.INVALID_GRANT_ERROR)throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),yield _i(this.silentTokenHelper.bind(this),$e.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(e,n)}})}executeEarFlow(n){return tt(this,null,function*(){let e=n.correlationId,i=yield _i(this.getDiscoveredAuthority.bind(this),$e.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,e)({requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),o=yield _i(AE,$e.GenerateEarKey,this.logger,this.performanceClient,e)(),r=gt(ve({},n),{earJwk:o}),a=yield _i(v_e,$e.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,e)(this.config,i,r,this.logger,this.performanceClient),p=this.config.auth.OIDCOptions.serverResponseType,f=yield _i(uY,$e.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,e)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,e,p),x=xl(DC,$e.DeserializeResponse,this.logger,this.performanceClient,e)(f,p,this.logger);return _i(VE,$e.HandleResponseEar,this.logger,this.performanceClient,e)(r,x,this.apiId,this.config,i,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}logout(){return Promise.reject(xn(Lg))}silentTokenHelper(n,e){return tt(this,null,function*(){let i=e.correlationId;this.performanceClient.addQueueMeasurement($e.SilentIframeClientTokenHelper,i);let o=yield _i(mb,$e.GeneratePkceCodes,this.logger,this.performanceClient,i)(this.performanceClient,this.logger,i),r=gt(ve({},e),{codeChallenge:o.challenge}),a;if(e.httpMethod===zh.POST)a=yield _i(y_e,$e.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,i)(this.config,n.authority,r,this.logger,this.performanceClient);else{let I=yield _i(NE,$e.GetAuthCodeUrl,this.logger,this.performanceClient,i)(this.config,n.authority,r,this.logger,this.performanceClient);a=yield _i(__e,$e.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,i)(I,this.performanceClient,this.logger,i,this.config.system.navigateFrameWait)}let p=this.config.auth.OIDCOptions.serverResponseType,f=yield _i(uY,$e.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,i)(a,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,i,p),x=xl(DC,$e.DeserializeResponse,this.logger,this.performanceClient,i)(f,p,this.logger);return _i(MC,$e.HandleResponseCode,this.logger,this.performanceClient,i)(e,x,o.verifier,this.apiId,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)})}};var v5=class extends fp{acquireToken(n){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.SilentRefreshClientAcquireToken,n.correlationId);let e=yield _i(RO,$e.InitializeBaseRequest,this.logger,this.performanceClient,n.correlationId)(n,this.config,this.performanceClient,this.logger),i=ve(ve({},n),e);n.redirectUri&&(i.redirectUri=this.getRedirectUri(n.redirectUri));let o=this.initializeServerTelemetryManager(Os.acquireTokenSilent_silentFlow),r=yield this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:i.authority,azureCloudOptions:i.azureCloudOptions,account:i.account});return _i(r.acquireTokenByRefreshToken.bind(r),$e.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,n.correlationId)(i).catch(a=>{throw a.setCorrelationId(this.correlationId),o.cacheFailedRequest(a),a})})}logout(){return Promise.reject(xn(Lg))}createRefreshTokenClient(n){return tt(this,null,function*(){let e=yield _i(this.getClientConfiguration.bind(this),$e.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n.serverTelemetryManager,requestAuthority:n.authorityUrl,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account});return new bO(e,this.performanceClient)})}};var b5=class{constructor(n,e,i,o){this.isBrowserEnvironment=typeof window<"u",this.config=n,this.storage=e,this.logger=i,this.cryptoObj=o}loadExternalTokens(n,e,i){return tt(this,null,function*(){if(!this.isBrowserEnvironment)throw xn(Fg);let o=n.correlationId||Bc(),r=e.id_token?jT.extractTokenClaims(e.id_token,$d):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},p=n.authority?new Vh(Vh.generateAuthority(n.authority,n.azureCloudOptions),this.config.system.networkClient,this.storage,a,this.logger,n.correlationId||Bc()):void 0,f=yield this.loadAccount(n,i.clientInfo||e.client_info||"",o,r,p),x=yield this.loadIdToken(e,f.homeAccountId,f.environment,f.realm,o),I=yield this.loadAccessToken(n,e,f.homeAccountId,f.environment,f.realm,i,o),D=yield this.loadRefreshToken(e,f.homeAccountId,f.environment,o);return this.generateAuthenticationResult(n,{account:f,idToken:x,accessToken:I,refreshToken:D},r,p)})}loadAccount(n,e,i,o,r){return tt(this,null,function*(){if(this.logger.verbose("TokenCache - loading account"),n.account){let x=Cd.createFromAccountInfo(n.account);return yield this.storage.setAccount(x,i),x}else if(!r||!e&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),xn(fE);let a=Cd.generateHomeAccountId(e,r.authorityType,this.logger,this.cryptoObj,o),p=o?.tid,f=XT(this.storage,r,a,$d,i,o,e,r.hostnameAndPort,p,void 0,void 0,this.logger);return yield this.storage.setAccount(f,i),f})}loadIdToken(n,e,i,o,r){return tt(this,null,function*(){if(!n.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");let a=Ll.createIdTokenEntity(e,i,n.id_token,this.config.auth.clientId,o);return yield this.storage.setIdTokenCredential(a,r),a})}loadAccessToken(n,e,i,o,r,a,p){return tt(this,null,function*(){if(e.access_token)if(e.expires_in){if(!e.scope&&(!n.scopes||!n.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");let f=e.scope?bl.fromString(e.scope):new bl(n.scopes),x=a.expiresOn||e.expires_in+Nc.nowSeconds(),I=a.extendedExpiresOn||(e.ext_expires_in||e.expires_in)+Nc.nowSeconds(),D=Ll.createAccessTokenEntity(i,o,e.access_token,this.config.auth.clientId,r,f.printScopes(),x,I,$d);return yield this.storage.setAccessTokenCredential(D,p),D})}loadRefreshToken(n,e,i,o){return tt(this,null,function*(){if(!n.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");let r=Ll.createRefreshTokenEntity(e,i,n.refresh_token,this.config.auth.clientId,n.foci,void 0,n.refresh_token_expires_in);return yield this.storage.setRefreshTokenCredential(r,o),r})}generateAuthenticationResult(n,e,i,o){let r="",a=[],p=null,f;e?.accessToken&&(r=e.accessToken.secret,a=bl.fromString(e.accessToken.target).asArray(),p=Nc.toDateFromSeconds(e.accessToken.expiresOn),f=Nc.toDateFromSeconds(e.accessToken.extendedExpiresOn));let x=e.account;return{authority:o?o.canonicalAuthority:"",uniqueId:e.account.localAccountId,tenantId:e.account.realm,scopes:a,account:x.getAccountInfo(),idToken:e.idToken?.secret||"",idTokenClaims:i||{},accessToken:r,fromCache:!0,expiresOn:p,correlationId:n.correlationId||"",requestId:"",extExpiresOn:f,familyId:e.refreshToken?.familyId||"",tokenType:e?.accessToken?.tokenType||"",state:n.state||"",cloudGraphHostName:x.cloudGraphHostName||"",msGraphHost:x.msGraphHost||"",fromNativeBroker:!1}}};var x5=class extends yC{constructor(n){super(n),this.includeRedirectUri=!1}};var C5=class extends fp{constructor(n,e,i,o,r,a,p,f,x,I){super(n,e,i,o,r,a,f,x,I),this.apiId=p}acquireToken(n){return tt(this,null,function*(){if(!n.code)throw xn(gE);let e=yield _i(this.initializeAuthorizationRequest.bind(this),$e.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,n.correlationId)(n,ao.Silent),i=this.initializeServerTelemetryManager(this.apiId);try{let o=gt(ve({},e),{code:n.code}),r=yield _i(this.getClientConfiguration.bind(this),$e.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,n.correlationId)({serverTelemetryManager:i,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=new x5(r);this.logger.verbose("Auth code client created");let p=new LE(a,this.browserStorage,o,this.logger,this.performanceClient);return yield _i(p.handleCodeResponseFromServer.bind(p),$e.HandleCodeResponseFromServer,this.logger,this.performanceClient,n.correlationId)({code:n.code,msgraph_host:n.msGraphHost,cloud_graph_host_name:n.cloudGraphHostName,cloud_instance_host_name:n.cloudInstanceHostName},e,!1)}catch(o){throw o instanceof fr&&(o.setCorrelationId(this.correlationId),i.cacheFailedRequest(o)),o}})}logout(){return Promise.reject(xn(Lg))}};function b_e(t,n,e){let i=window.msal?.clientIds||[],o=i.length,r=i.filter(a=>a===t).length;r>1&&e.warning("There is already an instance of MSAL.js in the window with the same client id."),n.add({msalInstanceCount:o,sameClientIdInstanceCount:r})}function Ug(t){let n=t?.idTokenClaims;if(n?.tfp||n?.acr)return"B2C";if(n?.tid){if(n?.tid==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function w5(t,n){try{AO(t)}catch(e){throw n.end({success:!1},e),e}}var UE=class t{constructor(n){this.operatingContext=n,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=n.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new ME(this.logger,this.performanceClient):Qv,this.eventHandler=new d5(this.logger),this.browserStorage=this.isBrowserEnvironment?new OE(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,FZ(this.config.auth)):Yge(this.config.auth.clientId,this.logger,this.performanceClient,this.eventHandler);let e={cacheLocation:Ka.MemoryStorage,cacheRetentionDays:5,temporaryCacheLocation:Ka.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new OE(this.config.auth.clientId,e,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new b5(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static createController(n,e){return tt(this,null,function*(){let i=new t(n);return yield i.initialize(e),i})}trackPageVisibility(n){n&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},n))}initialize(n,e){return tt(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(Qn.INITIALIZE_END);return}let i=n?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,r=this.performanceClient.startMeasurement($e.InitializeClientApplication,i);if(this.eventHandler.emitEvent(Qn.INITIALIZE_START),!e)try{this.logMultipleInstances(r)}catch{}if(yield _i(this.browserStorage.initialize.bind(this.browserStorage),$e.InitializeCache,this.logger,this.performanceClient,i)(i),o)try{this.platformAuthProvider=yield g_e(this.logger,this.performanceClient,i,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"),xl(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),$e.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,i)(i)),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(i)),this.initialized=!0,this.eventHandler.emitEvent(Qn.INITIALIZE_END),r.end({allowPlatformBroker:o,success:!0})})}handleRedirectPromise(n){return tt(this,null,function*(){if(this.logger.verbose("handleRedirectPromise called"),QV(this.initialized),this.isBrowserEnvironment){let e=n||"",i=this.redirectResponse.get(e);return typeof i>"u"?(i=this.handleRedirectPromiseInternal(n),this.redirectResponse.set(e,i),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),i}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null})}handleRedirectPromiseInternal(n){return tt(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===Qm.SIGNOUT)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Promise.resolve(null);let i=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),r=o&&this.platformAuthProvider&&!n,a;this.eventHandler.emitEvent(Qn.HANDLE_REDIRECT_START,ao.Redirect);let p;try{if(r&&this.platformAuthProvider){a=this.performanceClient.startMeasurement($e.AcquireTokenRedirect,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),a.add({isPlatformBrokerRequest:!0});let f=new hb(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Os.handleRedirectPromise,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);p=_i(f.handleRedirectPromise.bind(f),$e.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,a.event.correlationId)(this.performanceClient,a.event.correlationId)}else{let[f,x]=this.browserStorage.getCachedRequest(),I=f.correlationId;a=this.performanceClient.startMeasurement($e.AcquireTokenRedirect,I),this.logger.trace("handleRedirectPromise - acquiring token from web flow");let D=this.createRedirectClient(I);p=_i(D.handleRedirectPromise.bind(D),$e.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,a.event.correlationId)(n,f,x,a)}}catch(f){throw this.browserStorage.resetRequestCache(),f}return p.then(f=>(f?(this.browserStorage.resetRequestCache(),i.length{this.browserStorage.resetRequestCache();let x=f;throw i.length>0?this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_FAILURE,ao.Redirect,null,x):this.eventHandler.emitEvent(Qn.LOGIN_FAILURE,ao.Redirect,null,x),this.eventHandler.emitEvent(Qn.HANDLE_REDIRECT_END,ao.Redirect),a.end({success:!1},x),f})})}acquireTokenRedirect(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n);this.logger.verbose("acquireTokenRedirect called",e);let i=this.performanceClient.startMeasurement($e.AcquireTokenPreRedirect,e);i.add({accountType:Ug(n.account),scenarioId:n.scenarioId});let o=n.onRedirectNavigate;if(o)n.onRedirectNavigate=a=>{let p=typeof o=="function"?o(a):void 0;return i.add({navigateCallbackResult:p!==!1}),i.event=i.end({success:!0})||i.event,p};else{let a=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=p=>{let f=typeof a=="function"?a(p):void 0;return i.add({navigateCallbackResult:f!==!1}),i.event=i.end({success:!0})||i.event,f}}let r=this.getAllAccounts().length>0;try{XV(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Qm.SIGNIN),r?this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_START,ao.Redirect,n):this.eventHandler.emitEvent(Qn.LOGIN_START,ao.Redirect,n);let a;return this.platformAuthProvider&&this.canUsePlatformBroker(n)?a=new hb(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Os.acquireTokenRedirect,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(n),this.nativeInternalStorage,e).acquireTokenRedirect(n,i).catch(f=>{if(i.add({brokerErrorName:f.name,brokerErrorCode:f.errorCode}),f instanceof Hh&&pb(f))return this.platformAuthProvider=void 0,this.createRedirectClient(e).acquireToken(n);if(f instanceof od)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(e).acquireToken(n);throw f}):a=this.createRedirectClient(e).acquireToken(n),yield a}catch(a){throw this.browserStorage.resetRequestCache(),i.event.status===2?this.performanceClient.startMeasurement($e.AcquireTokenRedirect,e).end({success:!1},a):i.end({success:!1},a),r?this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_FAILURE,ao.Redirect,null,a):this.eventHandler.emitEvent(Qn.LOGIN_FAILURE,ao.Redirect,null,a),a}})}acquireTokenPopup(n){let e=this.getRequestCorrelationId(n),i=this.performanceClient.startMeasurement($e.AcquireTokenPopup,e);i.add({scenarioId:n.scenarioId,accountType:Ug(n.account)});try{this.logger.verbose("acquireTokenPopup called",e),w5(this.initialized,i),this.browserStorage.setInteractionInProgress(!0,Qm.SIGNIN)}catch(p){return Promise.reject(p)}let o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_START,ao.Popup,n):this.eventHandler.emitEvent(Qn.LOGIN_START,ao.Popup,n);let r,a=this.getPreGeneratedPkceCodes(e);return this.canUsePlatformBroker(n)?(i.add({isPlatformBrokerRequest:!0}),r=this.acquireTokenNative(gt(ve({},n),{correlationId:e}),Os.acquireTokenPopup).then(p=>(i.end({success:!0,accountType:Ug(p.account)}),p)).catch(p=>{if(i.add({brokerErrorName:p.name,brokerErrorCode:p.errorCode}),p instanceof Hh&&pb(p))return this.platformAuthProvider=void 0,this.createPopupClient(e).acquireToken(n,a);if(p instanceof od)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(e).acquireToken(n,a);throw p})):r=this.createPopupClient(e).acquireToken(n,a),r.then(p=>(o.length(o.length>0?this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_FAILURE,ao.Popup,null,p):this.eventHandler.emitEvent(Qn.LOGIN_FAILURE,ao.Popup,null,p),i.end({success:!1},p),Promise.reject(p))).finally(()=>tt(this,null,function*(){this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&(yield this.preGeneratePkceCodes(e))}))}trackPageVisibilityWithMeasurement(){let n=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;n&&(this.logger.info("Perf: Visibility change detected in ",n.event.name),n.increment({visibilityChangeCount:1}))}ssoSilent(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n),i=gt(ve({},n),{prompt:n.prompt,correlationId:e});this.ssoSilentMeasurement=this.performanceClient.startMeasurement($e.SsoSilent,e),this.ssoSilentMeasurement?.add({scenarioId:n.scenarioId,accountType:Ug(n.account)}),w5(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",e),this.eventHandler.emitEvent(Qn.SSO_SILENT_START,ao.Silent,i);let o;return this.canUsePlatformBroker(i)?(this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(i,Os.ssoSilent).catch(r=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:r.name,brokerErrorCode:r.errorCode}),r instanceof Hh&&pb(r))return this.platformAuthProvider=void 0,this.createSilentIframeClient(i.correlationId).acquireToken(i);throw r})):o=this.createSilentIframeClient(i.correlationId).acquireToken(i),o.then(r=>(this.eventHandler.emitEvent(Qn.SSO_SILENT_SUCCESS,ao.Silent,r),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:r.accessToken.length,idTokenSize:r.idToken.length,accountType:Ug(r.account)}),r)).catch(r=>{throw this.eventHandler.emitEvent(Qn.SSO_SILENT_FAILURE,ao.Silent,null,r),this.ssoSilentMeasurement?.end({success:!1},r),r}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenByCode(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n);this.logger.trace("acquireTokenByCode called",e);let i=this.performanceClient.startMeasurement($e.AcquireTokenByCode,e);w5(this.initialized,i),this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_BY_CODE_START,ao.Silent,n),i.add({scenarioId:n.scenarioId});try{if(n.code&&n.nativeAccountId)throw xn(yE);if(n.code){let o=n.code,r=this.hybridAuthCodeResponses.get(o);return r?(this.logger.verbose("Existing acquireTokenByCode request found",e),i.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",e),r=this.acquireTokenByCodeAsync(gt(ve({},n),{correlationId:e})).then(a=>(this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_BY_CODE_SUCCESS,ao.Silent,a),this.hybridAuthCodeResponses.delete(o),i.end({success:!0,accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length,accountType:Ug(a.account)}),a)).catch(a=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_BY_CODE_FAILURE,ao.Silent,null,a),i.end({success:!1},a),a}),this.hybridAuthCodeResponses.set(o,r)),yield r}else if(n.nativeAccountId)if(this.canUsePlatformBroker(n,n.nativeAccountId)){i.add({isPlatformBrokerRequest:!0});let o=yield this.acquireTokenNative(gt(ve({},n),{correlationId:e}),Os.acquireTokenByCode,n.nativeAccountId).catch(r=>{throw r instanceof Hh&&pb(r)&&(this.platformAuthProvider=void 0),i.add({brokerErrorName:r.name,brokerErrorCode:r.errorCode}),r});return i.end({accountType:Ug(o.account),success:!0}),o}else throw xn(vE);else throw xn(_E)}catch(o){throw this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_BY_CODE_FAILURE,ao.Silent,null,o),i.end({success:!1},o),o}})}acquireTokenByCodeAsync(n){return tt(this,null,function*(){return this.logger.trace("acquireTokenByCodeAsync called",n.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement($e.AcquireTokenByCodeAsync,n.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),yield this.createSilentAuthCodeClient(n.correlationId).acquireToken(n).then(o=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:o.fromCache}),o)).catch(o=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},o),o}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})})}acquireTokenFromCache(n,e){return tt(this,null,function*(){switch(this.performanceClient.addQueueMeasurement($e.AcquireTokenFromCache,n.correlationId),e){case rd.Default:case rd.AccessToken:case rd.AccessTokenAndRefreshToken:let i=this.createSilentCacheClient(n.correlationId);return _i(i.acquireToken.bind(i),$e.SilentCacheClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n);default:throw Gi(Fc.tokenRefreshRequired)}})}acquireTokenByRefreshToken(n,e){return tt(this,null,function*(){switch(this.performanceClient.addQueueMeasurement($e.AcquireTokenByRefreshToken,n.correlationId),e){case rd.Default:case rd.AccessTokenAndRefreshToken:case rd.RefreshToken:case rd.RefreshTokenAndNetwork:let i=this.createSilentRefreshClient(n.correlationId);return _i(i.acquireToken.bind(i),$e.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n);default:throw Gi(Fc.tokenRefreshRequired)}})}acquireTokenBySilentIframe(n){return tt(this,null,function*(){this.performanceClient.addQueueMeasurement($e.AcquireTokenBySilentIframe,n.correlationId);let e=this.createSilentIframeClient(n.correlationId);return _i(e.acquireToken.bind(e),$e.SilentIframeClientAcquireToken,this.logger,this.performanceClient,n.correlationId)(n)})}logout(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",e),this.logoutRedirect(ve({correlationId:e},n))})}logoutRedirect(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n);return XV(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Qm.SIGNOUT),this.createRedirectClient(e).logout(n)})}logoutPopup(n){try{let e=this.getRequestCorrelationId(n);return AO(this.initialized),this.browserStorage.setInteractionInProgress(!0,Qm.SIGNOUT),this.createPopupClient(e).logout(n).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Promise.reject(e)}}clearCache(n){return tt(this,null,function*(){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}let e=this.getRequestCorrelationId(n);return this.createSilentCacheClient(e).logout(n)})}getAllAccounts(n){let e=this.getRequestCorrelationId();return Qge(this.logger,this.browserStorage,this.isBrowserEnvironment,e,n)}getAccount(n){let e=this.getRequestCorrelationId();return Xge(n,this.logger,this.browserStorage,e)}getAccountByUsername(n){let e=this.getRequestCorrelationId();return Jge(n,this.logger,this.browserStorage,e)}getAccountByHomeId(n){let e=this.getRequestCorrelationId();return e_e(n,this.logger,this.browserStorage,e)}getAccountByLocalId(n){let e=this.getRequestCorrelationId();return t_e(n,this.logger,this.browserStorage,e)}setActiveAccount(n){let e=this.getRequestCorrelationId();i_e(n,this.browserStorage,e)}getActiveAccount(){let n=this.getRequestCorrelationId();return n_e(this.browserStorage,n)}hydrateCache(n,e){return tt(this,null,function*(){this.logger.verbose("hydrateCache called");let i=Cd.createFromAccountInfo(n.account,n.cloudGraphHostName,n.msGraphHost);return yield this.browserStorage.setAccount(i,n.correlationId),n.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(n,e)):this.browserStorage.hydrateCache(n,e)})}acquireTokenNative(n,e,i,o){return tt(this,null,function*(){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw xn(cb);return new hb(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,e,this.performanceClient,this.platformAuthProvider,i||this.getNativeAccountId(n),this.nativeInternalStorage,n.correlationId).acquireToken(n,o)})}canUsePlatformBroker(n,e){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!O0(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(n.prompt)switch(n.prompt){case Xl.NONE:case Xl.CONSENT:case Xl.LOGIN:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${n.prompt} is not compatible with platform broker flow, returning false`),!1}return!e&&!this.getNativeAccountId(n)?(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(n){let e=n.account||this.getAccount({loginHint:n.loginHint,sid:n.sid})||this.getActiveAccount();return e&&e.nativeAccountId||""}createPopupClient(n){return new f5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createRedirectClient(n){return new g5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createSilentIframeClient(n){return new y5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Os.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,n)}createSilentCacheClient(n){return new FE(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,n)}createSilentRefreshClient(n){return new v5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,n)}createSilentAuthCodeClient(n){return new C5(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Os.acquireTokenByCode,this.performanceClient,this.platformAuthProvider,n)}addEventCallback(n,e){return this.eventHandler.addEventCallback(n,e)}removeEventCallback(n){this.eventHandler.removeEventCallback(n)}addPerformanceCallback(n){return YV(),this.performanceClient.addPerformanceCallback(n)}removePerformanceCallback(n){return this.performanceClient.removePerformanceCallback(n)}enableAccountStorageEvents(){if(this.config.cache.cacheLocation!==Ka.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!==Ka.LocalStorage){this.logger.info("Account storage events are only available when cacheLocation is set to localStorage");return}this.eventHandler.unsubscribeCrossTab()}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(n){this.logger=n}initializeWrapperLibrary(n,e){this.browserStorage.setWrapperMetadata(n,e)}setNavigationClient(n){this.navigationClient=n}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(n){return n?.correlationId?n.correlationId:this.isBrowserEnvironment?Bc():Ii.EMPTY_STRING}loginRedirect(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n);return this.logger.verbose("loginRedirect called",e),this.acquireTokenRedirect(ve({correlationId:e},n||$Z))})}loginPopup(n){let e=this.getRequestCorrelationId(n);return this.logger.verbose("loginPopup called",e),this.acquireTokenPopup(ve({correlationId:e},n||$Z))}acquireTokenSilent(n){return tt(this,null,function*(){let e=this.getRequestCorrelationId(n),i=this.performanceClient.startMeasurement($e.AcquireTokenSilent,e);i.add({cacheLookupPolicy:n.cacheLookupPolicy,scenarioId:n.scenarioId}),w5(this.initialized,i),this.logger.verbose("acquireTokenSilent called",e);let o=n.account||this.getActiveAccount();if(!o)throw xn(dE);return i.add({accountType:Ug(o)}),this.acquireTokenSilentDeduped(n,o,e).then(r=>(i.end({success:!0,fromCache:r.fromCache,accessTokenSize:r.accessToken.length,idTokenSize:r.idToken.length}),gt(ve({},r),{state:n.state,correlationId:e}))).catch(r=>{throw r instanceof fr&&r.setCorrelationId(e),i.end({success:!1},r),r})})}acquireTokenSilentDeduped(n,e,i){return tt(this,null,function*(){let o=A0(this.config.auth.clientId,gt(ve({},n),{authority:n.authority||this.config.auth.authority,correlationId:i}),e.homeAccountId),r=JSON.stringify(o),a=this.activeSilentTokenRequests.get(r);if(typeof a>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",i),this.performanceClient.addFields({deduped:!1},i);let p=_i(this.acquireTokenSilentAsync.bind(this),$e.AcquireTokenSilentAsync,this.logger,this.performanceClient,i)(gt(ve({},n),{correlationId:i}),e);return this.activeSilentTokenRequests.set(r,p),p.finally(()=>{this.activeSilentTokenRequests.delete(r)})}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",i),this.performanceClient.addFields({deduped:!0},i),a})}acquireTokenSilentAsync(n,e){return tt(this,null,function*(){let i=()=>this.trackPageVisibility(n.correlationId);this.performanceClient.addQueueMeasurement($e.AcquireTokenSilentAsync,n.correlationId),this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_START,ao.Silent,n),n.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},n.correlationId),document.addEventListener("visibilitychange",i);let o=yield _i(o_e,$e.InitializeSilentRequest,this.logger,this.performanceClient,n.correlationId)(n,e,this.config,this.performanceClient,this.logger),r=n.cacheLookupPolicy||rd.Default;return this.acquireTokenSilentNoIframe(o,r).catch(p=>tt(this,null,function*(){if(QHe(p,r))if(this.activeIframeRequest)if(r!==rd.Skip){let[x,I]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${I}`,o.correlationId);let D=this.performanceClient.startMeasurement($e.AwaitConcurrentIframe,o.correlationId);D.add({awaitIframeCorrelationId:I});let P=yield x;if(D.end({success:P}),P)return this.logger.verbose(`Parallel iframe request with correlationId: ${I} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,r);throw this.logger.info(`Iframe request with correlationId: ${I} failed. Interaction is required.`),p}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),_i(this.acquireTokenBySilentIframe.bind(this),$e.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o);else{let x;return this.activeIframeRequest=[new Promise(I=>{x=I}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),_i(this.acquireTokenBySilentIframe.bind(this),$e.AcquireTokenBySilentIframe,this.logger,this.performanceClient,o.correlationId)(o).then(I=>(x(!0),I)).catch(I=>{throw x(!1),I}).finally(()=>{this.activeIframeRequest=void 0})}else throw p})).then(p=>(this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_SUCCESS,ao.Silent,p),n.correlationId&&this.performanceClient.addFields({fromCache:p.fromCache},n.correlationId),p)).catch(p=>{throw this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_FAILURE,ao.Silent,null,p),p}).finally(()=>{document.removeEventListener("visibilitychange",i)})})}acquireTokenSilentNoIframe(n,e){return tt(this,null,function*(){return O0(this.config,this.logger,this.platformAuthProvider,n.authenticationScheme)&&n.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},n.correlationId),this.acquireTokenNative(n,Os.acquireTokenSilent_silentFlow,n.account.nativeAccountId,e).catch(i=>tt(this,null,function*(){throw this.performanceClient.addFields({brokerErrorName:i.name,brokerErrorCode:i.errorCode},n.correlationId),i instanceof Hh&&pb(i)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Gi(Fc.tokenRefreshRequired)):i}))):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),e===rd.AccessToken&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),_i(this.acquireTokenFromCache.bind(this),$e.AcquireTokenFromCache,this.logger,this.performanceClient,n.correlationId)(n,e).catch(i=>{if(e===rd.AccessToken)throw i;return this.eventHandler.emitEvent(Qn.ACQUIRE_TOKEN_NETWORK_START,ao.Silent,n),_i(this.acquireTokenByRefreshToken.bind(this),$e.AcquireTokenByRefreshToken,this.logger,this.performanceClient,n.correlationId)(n,e)}))})}preGeneratePkceCodes(n){return tt(this,null,function*(){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=yield _i(mb,$e.GeneratePkceCodes,this.logger,this.performanceClient,n)(this.performanceClient,this.logger,n),Promise.resolve()})}getPreGeneratedPkceCodes(n){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");let e=this.pkceCode?ve({},this.pkceCode):void 0;return this.pkceCode=void 0,this.logger.verbose(`${e?"Found":"Did not find"} pre-generated PKCE codes`),this.performanceClient.addFields({usePreGeneratedPkce:!!e},n),e}logMultipleInstances(n){let e=this.config.auth.clientId;if(!window)return;window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[],window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(e),b_e(e,n,this.logger)}};function QHe(t,n){let e=!(t instanceof od&&t.subError!==Rg.badToken),i=t.errorCode===Cl.INVALID_GRANT_ERROR||t.errorCode===Fc.tokenRefreshRequired,o=e&&i||t.errorCode===Rg.noTokensFound||t.errorCode===Rg.refreshTokenExpired,r=vge.includes(n);return o&&r}function x_e(t,n){return tt(this,null,function*(){let e=new o5(t);return yield e.initialize(),UE.createController(e,n)})}var OO=class t{static createPublicClientApplication(n){return tt(this,null,function*(){let e=yield x_e(n);return new t(n,e)})}constructor(n,e){this.isBroker=!1,this.controller=e||new UE(new o5(n))}initialize(n){return tt(this,null,function*(){return this.controller.initialize(n,this.isBroker)})}acquireTokenPopup(n){return tt(this,null,function*(){return this.controller.acquireTokenPopup(n)})}acquireTokenRedirect(n){return this.controller.acquireTokenRedirect(n)}acquireTokenSilent(n){return this.controller.acquireTokenSilent(n)}acquireTokenByCode(n){return this.controller.acquireTokenByCode(n)}addEventCallback(n,e){return this.controller.addEventCallback(n,e)}removeEventCallback(n){return this.controller.removeEventCallback(n)}addPerformanceCallback(n){return this.controller.addPerformanceCallback(n)}removePerformanceCallback(n){return this.controller.removePerformanceCallback(n)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(n){return this.controller.getAccount(n)}getAccountByHomeId(n){return this.controller.getAccountByHomeId(n)}getAccountByLocalId(n){return this.controller.getAccountByLocalId(n)}getAccountByUsername(n){return this.controller.getAccountByUsername(n)}getAllAccounts(n){return this.controller.getAllAccounts(n)}handleRedirectPromise(n){return this.controller.handleRedirectPromise(n)}loginPopup(n){return this.controller.loginPopup(n)}loginRedirect(n){return this.controller.loginRedirect(n)}logout(n){return this.controller.logout(n)}logoutRedirect(n){return this.controller.logoutRedirect(n)}logoutPopup(n){return this.controller.logoutPopup(n)}ssoSilent(n){return this.controller.ssoSilent(n)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(n){this.controller.setLogger(n)}setActiveAccount(n){this.controller.setActiveAccount(n)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(n,e){return this.controller.initializeWrapperLibrary(n,e)}setNavigationClient(n){this.controller.setNavigationClient(n)}getConfiguration(){return this.controller.getConfiguration()}hydrateCache(n,e){return tt(this,null,function*(){return this.controller.hydrateCache(n,e)})}clearCache(n){return this.controller.clearCache(n)}};var PO=class{static getInteractionStatusFromEvent(n,e){switch(n.eventType){case Qn.LOGIN_START:return ol.Login;case Qn.SSO_SILENT_START:return ol.SsoSilent;case Qn.ACQUIRE_TOKEN_START:if(n.interactionType===ao.Redirect||n.interactionType===ao.Popup)return ol.AcquireToken;break;case Qn.HANDLE_REDIRECT_START:return ol.HandleRedirect;case Qn.LOGOUT_START:return ol.Logout;case Qn.SSO_SILENT_SUCCESS:case Qn.SSO_SILENT_FAILURE:if(e&&e!==ol.SsoSilent)break;return ol.None;case Qn.LOGOUT_END:if(e&&e!==ol.Logout)break;return ol.None;case Qn.HANDLE_REDIRECT_END:if(e&&e!==ol.HandleRedirect)break;return ol.None;case Qn.LOGIN_SUCCESS:case Qn.LOGIN_FAILURE:case Qn.ACQUIRE_TOKEN_SUCCESS:case Qn.ACQUIRE_TOKEN_FAILURE:case Qn.RESTORE_FROM_BFCACHE:if(n.interactionType===ao.Redirect||n.interactionType===ao.Popup){if(e&&e!==ol.Login&&e!==ol.AcquireToken)break;return ol.None}break}return null}};var S5="@azure/msal-angular",LO="4.0.19",pY=new ii("MSAL_INSTANCE"),C_e=new ii("MSAL_GUARD_CONFIG"),w_e=new ii("MSAL_INTERCEPTOR_CONFIG"),XHe=new ii("MSAL_BROADCAST_CONFIG"),fb=(()=>{class t{constructor(e,i){this.msalInstance=e,this.msalBroadcastConfig=i,this.msalBroadcastConfig&&this.msalBroadcastConfig.eventsToReplay>0?(this.msalInstance.getLogger().clone(S5,LO).verbose(`BroadcastService - eventsToReplay set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`),this._msalSubject=new mo(this.msalBroadcastConfig.eventsToReplay)):this._msalSubject=new xi,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new Ms(ol.Startup),this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback(o=>{this._msalSubject.next(o);let r=PO.getInteractionStatusFromEvent(o,this._inProgress.value);r!==null&&(this.msalInstance.getLogger().clone(S5,LO).verbose(`BroadcastService - ${o.eventType} results in setting inProgress from ${this._inProgress.value} to ${r}`),this._inProgress.next(r))})}resetInProgressEvent(){this._inProgress.value===ol.Startup&&this._inProgress.next(ol.None)}}return t.\u0275fac=function(e){return new(e||t)(ui(pY),ui(XHe,8))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),gb=(()=>{class t{constructor(e,i,o){this.instance=e,this.location=i,this.injector=o;let r=this.location.path(!0).split("#").pop();r&&(this.redirectHash=`#${r}`),this.instance.initializeWrapperLibrary(WZ.Angular,LO)}initialize(){return vr(this.instance.initialize())}acquireTokenPopup(e){return vr(this.instance.acquireTokenPopup(e))}acquireTokenRedirect(e){return vr(this.instance.acquireTokenRedirect(e))}acquireTokenSilent(e){return vr(this.instance.acquireTokenSilent(e))}handleRedirectObservable(e){return vr(this.instance.initialize().then(()=>this.instance.handleRedirectPromise(e||this.redirectHash)).finally(()=>{this.injector.get(fb).resetInProgressEvent()}))}loginPopup(e){return vr(this.instance.loginPopup(e))}loginRedirect(e){return vr(this.instance.loginRedirect(e))}logout(e){return vr(this.instance.logout(e))}logoutRedirect(e){return vr(this.instance.logoutRedirect(e))}logoutPopup(e){return vr(this.instance.logoutPopup(e))}ssoSilent(e){return vr(this.instance.ssoSilent(e))}getLogger(){return this.logger||(this.logger=this.instance.getLogger().clone(S5,LO)),this.logger}setLogger(e){this.logger=e.clone(S5,LO),this.instance.setLogger(e)}}return t.\u0275fac=function(e){return new(e||t)(ui(pY),ui(np),ui(Zn))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),HE=(()=>{class t{constructor(e,i,o,r,a){this.msalGuardConfig=e,this.msalBroadcastService=i,this.authService=o,this.location=r,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 i=document.getElementsByTagName("base"),o=this.location.normalize(i.length?i[0].href:window.location.origin),r=this.location.prepareExternalUrl(e);return r.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),`${o}/${r}`):`${o}${e}`}loginInteractively(e){let i=typeof this.msalGuardConfig.authRequest=="function"?this.msalGuardConfig.authRequest(this.authService,e):ve({},this.msalGuardConfig.authRequest);if(this.msalGuardConfig.interactionType===ao.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(i).pipe(vi(r=>(this.authService.getLogger().verbose("Guard - login by popup successful, can activate, setting active account"),this.authService.instance.setActiveAccount(r.account),!0)));this.authService.getLogger().verbose("Guard - logging in by redirect");let o=this.getDestinationUrl(e.url);return this.authService.loginRedirect(ve({redirectStartPage:o},i)).pipe(vi(()=>!1))}activateHelper(e){if(this.msalGuardConfig.interactionType!==ao.Popup&&this.msalGuardConfig.interactionType!==ao.Redirect)throw new IC("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(Ur.hashContainsKnownProperties(window.location.hash)&&JV.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."),Ni(!1)}else return this.authService.getLogger().info("Guard - window is undefined, MSAL does not support server-side token acquisition"),Ni(!0);this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute));let i=this.location.path(!0);return this.authService.initialize().pipe(Md(()=>this.authService.handleRedirectObservable()),Md(()=>{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"),Ni(!1));if(this.authService.getLogger().verbose("Guard - at least 1 account exists, can activate or load"),e){let o=this.includesCode(e.url),r=!!e.root&&!!e.root.fragment&&this.includesCode(`#${e.root.fragment}`),a=this.location.prepareExternalUrl(e.url).indexOf("#")===0;if(o&&(r||a))return this.authService.getLogger().info("Guard - Hash contains known code response, stopping navigation."),i.indexOf("#")>-1?Ni(this.parseUrl(this.location.path())):Ni(this.parseUrl(""))}return Ni(!0)}),Xa(o=>(this.authService.getLogger().error("Guard - error while logging in, unable to activate"),this.authService.getLogger().errorPii(`Guard - error: ${o.message}`),this.loginFailedRoute&&e?(this.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),Ni(this.loginFailedRoute)):Ni(!1))))}includesCode(e){return e.lastIndexOf("/code")>-1&&e.lastIndexOf("/code")===e.length-5||e.indexOf("#code=")>-1||e.indexOf("&code=")>-1}canActivate(e,i){return this.authService.getLogger().verbose("Guard - canActivate"),this.activateHelper(i)}canActivateChild(e,i){return this.authService.getLogger().verbose("Guard - canActivateChild"),this.activateHelper(i)}canMatch(){return this.authService.getLogger().verbose("Guard - canLoad"),this.activateHelper()}}return t.\u0275fac=function(e){return new(e||t)(ui(C_e),ui(fb),ui(gb),ui(np),ui(aa))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),S_e=(()=>{class t{constructor(e,i,o,r,a){this.msalInterceptorConfig=e,this.authService=i,this.location=o,this.msalBroadcastService=r,this._document=a}intercept(e,i){if(this.msalInterceptorConfig.interactionType!==ao.Popup&&this.msalInterceptorConfig.interactionType!==ao.Redirect)throw new IC("invalid_interaction_type","Invalid interaction type provided to MSAL Interceptor. InteractionType.Popup, InteractionType.Redirect must be provided in the msalInterceptorConfiguration");this.authService.getLogger().verbose("MSAL Interceptor activated");let o=this.getScopesForEndpoint(e.url,e.method);if(!o||o.length===0)return this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),i.handle(e);let r;this.authService.instance.getActiveAccount()?(this.authService.getLogger().verbose("Interceptor - active account selected"),r=this.authService.instance.getActiveAccount()):(this.authService.getLogger().verbose("Interceptor - no active account, fallback to first account"),r=this.authService.instance.getAllAccounts()[0]);let a=typeof this.msalInterceptorConfig.authRequest=="function"?this.msalInterceptorConfig.authRequest(this.authService,e,{account:r}):gt(ve({},this.msalInterceptorConfig.authRequest),{account:r});return this.authService.getLogger().info(`Interceptor - ${o.length} scopes found for endpoint`),this.authService.getLogger().infoPii(`Interceptor - [${o}] scopes found for ${e.url}`),this.acquireToken(a,o,r).pipe(wo(p=>{this.authService.getLogger().verbose("Interceptor - setting authorization headers");let f=e.headers.set("Authorization",`Bearer ${p.accessToken}`),x=e.clone({headers:f});return i.handle(x)}))}acquireToken(e,i,o){return this.authService.acquireTokenSilent(gt(ve({},e),{scopes:i,account:o})).pipe(Xa(()=>(this.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(Ko(1),wo(r=>r===ol.None?this.acquireTokenInteractively(e,i):this.msalBroadcastService.inProgress$.pipe(ro(a=>a===ol.None),Ko(1),wo(()=>this.acquireToken(e,i,o))))))),wo(r=>r.accessToken?Ni(r):(this.authService.getLogger().error("Interceptor - acquireTokenSilent resolved with null access token. Known issue with B2C tenants, invoking interaction to resolve."),this.msalBroadcastService.inProgress$.pipe(ro(a=>a===ol.None),Ko(1),wo(()=>this.acquireTokenInteractively(e,i))))))}acquireTokenInteractively(e,i){if(this.msalInterceptorConfig.interactionType===ao.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup(gt(ve({},e),{scopes:i}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");let o=window.location.href;return this.authService.acquireTokenRedirect(gt(ve({},e),{scopes:i,redirectStartPage:o})),kl}getScopesForEndpoint(e,i){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");let o=this.location.normalize(e),r=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()),a=this.matchResourcesToEndpoint(r,o);return a.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,a,i):null}matchResourcesToEndpoint(e,i){let o=[];return e.forEach(r=>{let a=this.location.normalize(r),p=this.getAbsoluteUrl(a),f=new URL(p),x=this.getAbsoluteUrl(i),I=new URL(x);this.checkUrlComponents(f,I)&&o.push(r)}),o}checkUrlComponents(e,i){let o=["protocol","host","pathname","search","hash"];for(let r of o)if(e[r]){let a=decodeURIComponent(e[r]);if(!ka.matchPattern(a,i[r]))return!1}return!0}getAbsoluteUrl(e){let i=this._document.createElement("a");return i.href=e,i.href}matchScopesToEndpoint(e,i,o){let r=[];return i.forEach(a=>{let p=[],f=e.get(a);if(f===null){r.push(null);return}f.forEach(x=>{if(typeof x=="string")p.push(x);else{let I=o.toLowerCase();x.httpMethod.toLowerCase()===I&&(x.scopes===null?r.push(null):x.scopes.forEach(P=>{p.push(P)}))}}),p.length>0&&r.push(p)}),r.length>0?(r.length>1&&this.authService.getLogger().warning("Interceptor - More than 1 matching scopes for endpoint found."),r[0]):null}}return t.\u0275fac=function(e){return new(e||t)(ui(w_e),ui(gb),ui(np),ui(fb),ui(zn))},t.\u0275prov=ct({token:t,factory:t.\u0275fac}),t})(),sui=(()=>{class t{constructor(e){this.authService=e}ngOnInit(){this.authService.getLogger().verbose("MsalRedirectComponent activated"),this.authService.handleRedirectObservable().subscribe()}}return t.\u0275fac=function(e){return new(e||t)(rt(gb))},t.\u0275cmp=Le({type:t,selectors:[["app-redirect"]],standalone:!1,decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})(),hY=(()=>{class t{static forRoot(e,i,o){return{ngModule:t,providers:[{provide:pY,useValue:e},{provide:C_e,useValue:i},{provide:w_e,useValue:o},gb]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=yi({type:t}),t.\u0275inj=gi({providers:[HE,fb],imports:[po]}),t})();var Hg=(()=>{class t{constructor(e,i,o){this._msalBroadcastService=e,this._environmentService=i,this._msalService=o,this._destroying$=new xi,this._accountInfo=new mo(1),this._authentication=new Ms(!1),this.msalInitialized=new pm,this.authentication$=this._authentication.asObservable().pipe(Fp()),this.accountInfo$=this._accountInfo.asObservable(),this._init()}static successEvent(e){return e.eventType===Qn.LOGIN_SUCCESS||e.eventType===Qn.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(ro(e=>e===ol.None),Wr(this._destroying$)).subscribe(()=>{this.msalInitialized.next(),this.msalInitialized.complete();try{let e=this._msalService.instance.getAllAccounts(),i=this._msalService.instance.getActiveAccount();this._authentication.next(e.length>0),this._accountInfo.next(i??null)}catch{}})}static{this.\u0275fac=function(i){return new(i||t)(ui(fb),ui(br),ui(gb))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mY=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:18,vars:0,consts:[["color","warn"],[1,"bd-container-inner","mat-typography"],["href","https://browser-cache-leeren.de/detect.html"],[1,"bd-container-inner"],[1,"mat-body"],["href","https://www.bindoc.de/support"]],template:function(i,o){i&1&&(K(0,"mat-toolbar",0),Ce(1,"Login fehlgeschlagen"),Z(),K(2,"div",1)(3,"span"),Ce(4,"Versuchen Sie bitte folgende Dinge, um das Problem zu l\xF6sen"),Z(),K(5,"ul")(6,"li"),Ce(7,"Browser Cache leeren - "),K(8,"a",2),Ce(9,"Wie leere ich den Cache eines Browsers ?"),Z()(),K(10,"li"),Ce(11,"Seite neu laden"),Z()()(),K(12,"div",3)(13,"span",4),Ce(14,"Falls dieser Fehler immer wieder auftritt, wenden Sie sich bitte an unseren "),K(15,"a",5),Ce(16,"BinDoc Support"),Z(),Ce(17,"."),Z()())},dependencies:[zv,MT],encapsulation:2})}}return t})();var Tui=(()=>{class t{constructor(e){this._authenticationService=e}static{this.\u0275fac=function(i){return new(i||t)(ui(Hg))}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({providers:[gb,HE,fb,{provide:ZB,useClass:S_e,multi:!0},O$(P$())],imports:[hY,fd.forChild([{path:"sys-login-failed",component:mY}]),zv,mY,hY,fd]})}}return t})();var T_e=` .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 e7e=["sublist"],t7e=t=>({processedItem:t}),i7e=()=>({exact:!1}),n7e=(t,n)=>({$implicit:t,hasSubmenu:n}),o7e=t=>({display:t});function r7e(t,n){if(t&1&&Oe(0,"li",7),t&2){let e=V().$implicit,i=V();Gr(i.getItemProp(e,"style")),Ge(i.cn(i.cx("separator"),i.getItemProp(e,"class"),i.getItemProp(e,"styleClass"))),Xe("id",i.getItemId(e))("data-pc-section","separator")}}function s7e(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(4).$implicit,i=V();Ge(i.cn(i.cx("itemIcon"),i.getItemProp(e,"icon"))),B("ngStyle",i.getItemProp(e,"iconStyle")),Xe("data-pc-section","icon")("tabindex",-1)}}function a7e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(4).$implicit,i=V();Ge(i.cx("itemLabel")),Xe("data-pc-section","label"),L(),qn(" ",i.getItemLabel(e)," ")}}function l7e(t,n){if(t&1&&Oe(0,"span",19),t&2){let e=V(4).$implicit,i=V();Ge(i.cx("itemLabel")),B("innerHTML",i.getItemLabel(e),xm),Xe("data-pc-section","label")}}function c7e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(4).$implicit,i=V();Ge(i.cn(i.cx("itemBadge"),i.getItemProp(e,"badgeStyleClass"))),L(),Di(i.getItemProp(e,"badge"))}}function d7e(t,n){if(t&1&&(oi(),Oe(0,"svg",22)),t&2){let e=V(6);Ge(e.cx("submenuIcon")),Xe("data-pc-section","submenuicon")("aria-hidden",!0)}}function u7e(t,n){}function p7e(t,n){t&1&&le(0,u7e,0,0,"ng-template",23),t&2&&(B("data-pc-section","submenuicon"),ul("aria-hidden",!0))}function h7e(t,n){if(t&1&&(Mi(0),le(1,d7e,1,4,"svg",20)(2,p7e,1,2,null,21),Ri()),t&2){let e=V(5);L(),B("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),L(),B("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function m7e(t,n){if(t&1&&(K(0,"a",14),le(1,s7e,1,5,"span",15)(2,a7e,2,4,"span",16)(3,l7e,1,4,"ng-template",null,2,Hi)(5,c7e,2,3,"span",17)(6,h7e,3,2,"ng-container",10),Z()),t&2){let e=un(4),i=V(3).$implicit,o=V();Ge(o.cx("itemLink")),B("target",o.getItemProp(i,"target")),Xe("href",o.getItemProp(i,"url"),ja)("data-automationid",o.getItemProp(i,"automationId"))("data-pc-section","action")("tabindex",-1),L(),B("ngIf",o.getItemProp(i,"icon")),L(),B("ngIf",o.getItemProp(i,"escape"))("ngIfElse",e),L(3),B("ngIf",o.getItemProp(i,"badge")),L(),B("ngIf",o.isItemGroup(i))}}function f7e(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(4).$implicit,i=V();Ge(i.cn(i.cx("itemIcon"),i.getItemProp(e,"icon"))),B("ngStyle",i.getItemProp(e,"iconStyle")),Xe("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function g7e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(4).$implicit,i=V();Ge(i.cx("itemLabel")),Xe("data-pc-section","label"),L(),qn(" ",i.getItemLabel(e)," ")}}function _7e(t,n){if(t&1&&Oe(0,"span",19),t&2){let e=V(4).$implicit,i=V();Ge(i.cx("itemLabel")),B("innerHTML",i.getItemLabel(e),xm),Xe("data-pc-section","label")}}function y7e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(4).$implicit,i=V();Ge(i.cn(i.cx("itemBadge"),i.getItemProp(e,"badgeStyleClass"))),L(),Di(i.getItemProp(e,"badge"))}}function v7e(t,n){if(t&1&&(oi(),Oe(0,"svg",22)),t&2){let e=V(6);Ge(e.cx("submenuIcon")),Xe("data-pc-section","submenuicon")("aria-hidden",!0)}}function b7e(t,n){}function x7e(t,n){t&1&&le(0,b7e,0,0,"ng-template",23),t&2&&(B("data-pc-section","submenuicon"),ul("aria-hidden",!0))}function C7e(t,n){if(t&1&&(Mi(0),le(1,v7e,1,4,"svg",20)(2,x7e,1,2,null,21),Ri()),t&2){let e=V(5);L(),B("ngIf",!e.tieredMenu.submenuIconTemplate&&!e.tieredMenu._submenuIconTemplate),L(),B("ngTemplateOutlet",e.tieredMenu.submenuIconTemplate||e.tieredMenu._submenuIconTemplate)}}function w7e(t,n){if(t&1&&(K(0,"a",24),le(1,f7e,1,6,"span",15)(2,g7e,2,4,"span",16)(3,_7e,1,4,"ng-template",null,2,Hi)(5,y7e,2,3,"span",17)(6,C7e,3,2,"ng-container",10),Z()),t&2){let e=un(4),i=V(3).$implicit,o=V();Ge(o.cx("itemLink")),B("routerLink",o.getItemProp(i,"routerLink"))("queryParams",o.getItemProp(i,"queryParams"))("routerLinkActive","p-tieredmenu-item-link-active")("routerLinkActiveOptions",o.getItemProp(i,"routerLinkActiveOptions")||Is(21,i7e))("target",o.getItemProp(i,"target"))("fragment",o.getItemProp(i,"fragment"))("queryParamsHandling",o.getItemProp(i,"queryParamsHandling"))("preserveFragment",o.getItemProp(i,"preserveFragment"))("skipLocationChange",o.getItemProp(i,"skipLocationChange"))("replaceUrl",o.getItemProp(i,"replaceUrl"))("state",o.getItemProp(i,"state")),Xe("data-automationid",o.getItemProp(i,"automationId"))("tabindex",-1)("data-pc-section","action"),L(),B("ngIf",o.getItemProp(i,"icon")),L(),B("ngIf",o.getItemProp(i,"escape"))("ngIfElse",e),L(3),B("ngIf",o.getItemProp(i,"badge")),L(),B("ngIf",o.isItemGroup(i))}}function S7e(t,n){if(t&1&&(Mi(0),le(1,m7e,7,12,"a",12)(2,w7e,7,22,"a",13),Ri()),t&2){let e=V(2).$implicit,i=V();L(),B("ngIf",!i.getItemProp(e,"routerLink")),L(),B("ngIf",i.getItemProp(e,"routerLink"))}}function I7e(t,n){}function T7e(t,n){t&1&&le(0,I7e,0,0,"ng-template")}function E7e(t,n){if(t&1&&(Mi(0),le(1,T7e,1,0,null,25),Ri()),t&2){let e=V(2).$implicit,i=V();L(),B("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",kr(2,n7e,e.item,i.getItemProp(e,"items")))}}function A7e(t,n){if(t&1){let e=Bt();K(0,"p-tieredmenusub",26),Qe("itemClick",function(o){Ee(e);let r=V(3);return Ae(r.itemClick.emit(o))})("itemMouseEnter",function(o){Ee(e);let r=V(3);return Ae(r.onItemMouseEnter(o))}),Z()}if(t&2){let e=V(2).$implicit,i=V();B("items",e.items)("itemTemplate",i.itemTemplate)("autoDisplay",i.autoDisplay)("menuId",i.menuId)("activeItemPath",i.activeItemPath())("focusedItemId",i.focusedItemId),ul("ariaLabelledBy",i.getItemId(e)),B("level",i.level+1)("inlineStyles",rn(9,o7e,i.isItemActive(e)?"flex":"none"))}}function D7e(t,n){if(t&1){let e=Bt();K(0,"li",8,1)(2,"div",9),Qe("click",function(o){Ee(e);let r=V().$implicit,a=V();return Ae(a.onItemClick(o,r))})("mouseenter",function(o){Ee(e);let r=V().$implicit,a=V();return Ae(a.onItemMouseEnter({$event:o,processedItem:r}))}),le(3,S7e,3,2,"ng-container",10)(4,E7e,2,5,"ng-container",10),Z(),le(5,A7e,1,11,"p-tieredmenusub",11),Z()}if(t&2){let e=V(),i=e.$implicit,o=e.index,r=V();Ge(r.cn(r.cx("item",rn(21,t7e,i)),r.getItemProp(i,"styleClass"))),B("ngStyle",r.getItemProp(i,"style"))("tooltipOptions",r.getItemProp(i,"tooltipOptions")),Xe("id",r.getItemId(i))("data-pc-section","menuitem")("data-p-highlight",r.isItemActive(i))("data-p-focused",r.isItemFocused(i))("data-p-disabled",r.isItemDisabled(i))("aria-label",r.getItemLabel(i))("aria-disabled",r.isItemDisabled(i)||void 0)("aria-haspopup",r.isItemGroup(i)&&!r.getItemProp(i,"to")?"menu":void 0)("aria-expanded",r.isItemGroup(i)?r.isItemActive(i):void 0)("aria-setsize",r.getAriaSetSize())("aria-posinset",r.getAriaPosInset(o)),L(2),Ge(r.cx("itemContent")),Xe("data-pc-section","content"),L(),B("ngIf",!r.itemTemplate),L(),B("ngIf",r.itemTemplate),L(),B("ngIf",r.isItemVisible(i)&&r.isItemGroup(i))}}function k7e(t,n){if(t&1&&le(0,r7e,1,6,"li",5)(1,D7e,6,23,"li",6),t&2){let e=n.$implicit,i=V();B("ngIf",i.isItemVisible(e)&&i.getItemProp(e,"separator")),L(),B("ngIf",i.isItemVisible(e)&&!i.getItemProp(e,"separator"))}}var M7e=["submenuicon"],R7e=["item"],O7e=["rootmenu"],P7e=["container"],L7e=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),F7e=t=>({value:"visible",params:t});function N7e(t,n){if(t&1){let e=Bt();K(0,"div",3,0),Qe("click",function(o){Ee(e);let r=V();return Ae(r.onOverlayClick(o))})("@overlayAnimation.start",function(o){Ee(e);let r=V();return Ae(r.onOverlayAnimationStart(o))})("@overlayAnimation.done",function(o){Ee(e);let r=V();return Ae(r.onOverlayAnimationEnd(o))}),K(2,"p-tieredMenuSub",4,1),Qe("itemClick",function(o){Ee(e);let r=V();return Ae(r.onItemClick(o))})("menuFocus",function(o){Ee(e);let r=V();return Ae(r.onMenuFocus(o))})("menuBlur",function(o){Ee(e);let r=V();return Ae(r.onMenuBlur(o))})("menuKeydown",function(o){Ee(e);let r=V();return Ae(r.onKeyDown(o))})("itemMouseEnter",function(o){Ee(e);let r=V();return Ae(r.onItemMouseEnter(o))}),Z()()}if(t&2){let e=V();Ge(e.cn(e.cx("root"),e.styleClass)),B("id",e.id)("ngStyle",e.style)("@overlayAnimation",rn(24,F7e,kr(21,L7e,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",e.popup!==!0),Xe("data-pc-section","root")("data-pc-name","tieredmenu"),L(2),B("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex),ul("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy),B("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("autoDisplay",e.autoDisplay)("popup",e.popup)("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var B7e={submenu:({instance:t,processedItem:n})=>({display:t.isItemActive(n)?"flex":"none"})},z7e={root:({instance:t})=>["p-tieredmenu p-component",{"p-tieredmenu-overlay":t.popup,"p-tieredmenu-mobile":t.queryMatches}],start:"p-tieredmenu-start",rootList:"p-tieredmenu-root-list",item:({instance:t,processedItem:n})=>["p-tieredmenu-item",{"p-tieredmenu-item-active":t.isItemActive(n),"p-focus":t.isItemFocused(n),"p-disabled":t.isItemDisabled(n)}],itemContent:"p-tieredmenu-item-content",itemLink:"p-tieredmenu-item-link",itemIcon:"p-tieredmenu-item-icon",itemLabel:"p-tieredmenu-item-label",itemBadge:"p-menuitem-badge",submenuIcon:"p-tieredmenu-submenu-icon",submenu:"p-tieredmenu-submenu",separator:"p-tieredmenu-separator",end:"p-tieredmenu-end"},fY=(()=>{class t extends to{name="tieredmenu";theme=T_e;classes=z7e;inlineStyles=B7e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var V7e=(()=>{class t extends Ao{el;renderer;tieredMenu;items;itemTemplate;root=!1;autoDisplay;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath=Wn([]);tabindex=0;inlineStyles;itemClick=new yt;itemMouseEnter=new yt;menuFocus=new yt;menuBlur=new yt;menuKeydown=new yt;sublistViewChild;_componentStyle=re(fY);constructor(e,i,o){super(),this.el=e,this.renderer=i,this.tieredMenu=o}positionSubmenu(){if(ns(this.tieredMenu.platformId)){let e=this.sublistViewChild&&this.sublistViewChild.nativeElement;e&&Ehe(e,this.level)}}getItemProp(e,i,o=null){return e&&e.item?bd(e.item[i],o):void 0}getItemId(e){return e.item?.id??`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return gt(ve({},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 gt(ve({},this.getItemProp(e,"class")),{"p-tieredmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(i=>{let o=this.isItemVisible(i),r=o&&this.getItemProp(i,"separator");return!o||r}).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath())return this.positionSubmenu(),this.activeItemPath().some(i=>i.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return er(e.items)}onItemMouseEnter(e){if(this.autoDisplay){let{event:i,processedItem:o}=e;this.itemMouseEnter.emit({originalEvent:i,processedItem:o})}}onItemClick(e,i){this.getItemProp(i,"command",{originalEvent:e,item:i.item}),this.itemClick.emit({originalEvent:e,processedItem:i,isFocus:!0})}static \u0275fac=function(i){return new(i||t)(rt(_n),rt(Kr),rt(Br(()=>gY)))};static \u0275cmp=Le({type:t,selectors:[["p-tieredMenuSub"],["p-tieredmenusub"]],viewQuery:function(i,o){if(i&1&&Qi(e7e,7),i&2){let r;Je(r=et())&&(o.sublistViewChild=r.first)}},inputs:{items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",lt],autoDisplay:[2,"autoDisplay","autoDisplay",lt],autoZIndex:[2,"autoZIndex","autoZIndex",lt],baseZIndex:[2,"baseZIndex","baseZIndex",wn],popup:[2,"popup","popup",lt],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",wn],focusedItemId:"focusedItemId",activeItemPath:[1,"activeItemPath"],tabindex:[2,"tabindex","tabindex",wn],inlineStyles:"inlineStyles"},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Rt],decls:3,vars:12,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"keydown","focus","blur","id","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","class",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","class","tooltipOptions",4,"ngIf"],["role","separator"],["role","menuitem","pTooltip","",3,"ngStyle","tooltipOptions"],[3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","autoDisplay","menuId","activeItemPath","focusedItemId","ariaLabelledBy","level","inlineStyles","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","class",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","class","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target"],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf","ngIfElse"],[3,"class",4,"ngIf"],[3,"ngStyle"],[3,"innerHTML"],["data-p-icon","angle-right",3,"class",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","angle-right"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActive","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"itemClick","itemMouseEnter","items","itemTemplate","autoDisplay","menuId","activeItemPath","focusedItemId","ariaLabelledBy","level","inlineStyles"]],template:function(i,o){if(i&1){let r=Bt();K(0,"ul",3,0),Qe("keydown",function(p){return Ee(r),Ae(o.menuKeydown.emit(p))})("focus",function(p){return Ee(r),Ae(o.menuFocus.emit(p))})("blur",function(p){return Ee(r),Ae(o.menuBlur.emit(p))}),le(2,k7e,2,2,"ng-template",4),Z()}i&2&&(Gr(o.inlineStyles),Ge(o.root?o.cx("rootList"):o.cx("submenu")),B("id",o.menuId+"_list")("tabindex",o.tabindex),Xe("aria-label",o.ariaLabel)("aria-labelledBy",o.ariaLabelledBy)("aria-activedescendant",o.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),L(2),B("ngForOf",o.items))},dependencies:[t,po,Rl,Zr,Vo,fs,fd,ba,cq,Yl,eR,Bv,Nz,kn],encapsulation:2})}return t})(),gY=(()=>{class t extends Ao{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=Wn(void 0);onShow=new yt;onHide=new yt;rootmenu;containerViewChild;submenuIconTemplate;itemTemplate;templates;$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());container;outsideClickListener;resizeListener;scrollHandler;target;relatedTarget;visible;relativeAlign;dirty=!1;focused=!1;activeItemPath=Jn([]);number=Jn(0);focusedItemInfo=Jn({index:-1,level:0,parentKey:"",item:null});searchValue="";searchTimeout;_processedItems;_model;_componentStyle=re(fY);matchMediaListener;query;queryMatches;_submenuIconTemplate;_itemTemplate;get visibleItems(){let e=this.activeItemPath().find(i=>i.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item?.id?e.item.id:e.index!==-1?`${this.id}${er(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,Gl(()=>{let i=this.activeItemPath();er(i)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())})}ngOnInit(){super.ngOnInit(),this.bindMatchMediaListener(),this.id=this.id||tr("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(ns(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}createProcessedItems(e,i=0,o={},r=""){let a=[];return e&&e.forEach((p,f)=>{let x=(r!==""?r+"_":"")+f,I={item:p,index:f,level:i,key:x,parent:o,parentKey:r};I.items=this.createProcessedItems(p.items,i+1,I,x),a.push(I)}),a}getItemProp(e,i){return e?bd(e[i]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&er(e.items)}isSelected(e){return this.activeItemPath().some(i=>i.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)&&this.isItemVisible(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&er(e.items)}onOverlayClick(e){this.popup&&this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}onItemClick(e){let{originalEvent:i,processedItem:o}=e,r=this.isProcessedItemGroup(o),a=Ud(o.parent);if(this.isSelected(o)){let{index:f,key:x,level:I,parentKey:D,item:P}=o;this.activeItemPath.set(this.activeItemPath().filter(R=>x!==R.key&&x.startsWith(R.key))),this.focusedItemInfo.set({index:f,level:I,parentKey:D,item:P}),this.dirty=!0,cs(this.rootmenu.sublistViewChild.nativeElement)}else if(r)this.onItemChange(e);else{let f=a?o:this.activeItemPath().find(x=>x.parentKey==="");this.hide(i),this.changeFocusedItemIndex(i,f?f.index:-1),cs(this.rootmenu.sublistViewChild.nativeElement)}}onItemMouseEnter(e){Lh()?this.onItemChange({event:e,processedItem:e.processedItem,focus:this.autoDisplay},"hover"):this.dirty&&this.onItemChange(e,"hover")}onKeyDown(e){let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&CT(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let i=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}onArrowRightKey(e){let i=this.visibleItems[this.focusedItemInfo().index],o=this.isProccessedItemGroup(i),r=i?.item;o&&(this.onItemChange({originalEvent:e,processedItem:i}),this.focusedItemInfo.set({index:-1,parentKey:i.key,item:r}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.popup&&this.hide(e,!0),e.preventDefault()}else{let i=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}}onArrowLeftKey(e){let i=this.visibleItems[this.focusedItemInfo().index];if(!i){e.preventDefault();return}let o=this.activeItemPath().find(p=>p.key===i.parentKey);Ud(i.parent)||(this.focusedItemInfo.set({index:-1,parentKey:o?o.parentKey:"",item:i.item}),this.searchValue="",this.onArrowDownKey(e));let a=this.activeItemPath().filter(p=>p.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 i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let i=$r(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),o=i&&$r(i,'a[data-pc-section="action"]');if(o?o.click():i&&i.click(),!this.popup){let r=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(r)&&(this.focusedItemInfo().index=this.findFirstFocusedItemIndex())}}e.preventDefault()}onItemChange(e,i){let{processedItem:o,isFocus:r}=e;if(Ud(o))return;let{index:a,key:p,level:f,parentKey:x,items:I,item:D}=o,P=er(I),R=this.activeItemPath().filter(j=>j.parentKey!==x&&j.parentKey!==p);P&&R.push(o),this.focusedItemInfo.set({index:a,level:f,parentKey:x,item:D}),P&&(this.dirty=!0),r&&cs(this.rootmenu.sublistViewChild.nativeElement),!(i==="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({}),WM(this.containerViewChild.nativeElement,{position:"absolute",top:0}),this.attrSelector&&this.container.setAttribute(this.attrSelector,""),this.appendOverlay(),this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),cs(this.rootmenu.sublistViewChild.nativeElement),this.scrollInView());break;case"void":this.onOverlayHide(),this.onHide.emit({});break}}alignOverlay(){this.relativeAlign?Az(this.container,this.target):Ez(this.container,this.target),Da(this.target)>Da(this.container)&&(this.container.style.minWidth=Da(this.target)+"px")}onOverlayAnimationEnd(e){switch(e.toState){case"void":ml.clear(e.element);break}}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?this.renderer.appendChild(this.document.body,this.container):l0(this.$appendTo(),this.container))}restoreOverlayAppend(){this.container&&this.$appendTo()!=="self"&&this.renderer.appendChild(this.el.nativeElement,this.container)}moveOnTop(){this.autoZIndex&&ml.set("menu",this.container,this.baseZIndex+this.config.zIndex.menu)}hide(e,i){this.popup&&(this.onHide.emit({}),this.visible=!1),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:""}),i&&cs(this.relatedTarget||this.target||this.rootmenu.sublistViewChild.nativeElement),this.dirty=!1}toggle(e){this.visible?this.hide(e,!0):this.show(e)}show(e,i){this.popup&&(this.visible=!0,this.target=this.target||e.currentTarget,this.relatedTarget=e.relatedTarget||null,this.relativeAlign=e?.relativeAlign||null),this.focusedItemInfo.set({index:-1,level:0,parentKey:""}),i&&cs(this.rootmenu.sublistViewChild.nativeElement),this.cd.markForCheck()}searchItems(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return this.focusedItemInfo().index!==-1?(o=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(a=>this.isItemMatched(a)),o=o===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(a=>this.isItemMatched(a)):o+this.focusedItemInfo().index):o=this.visibleItems.findIndex(a=>this.isItemMatched(a)),o!==-1&&(r=!0),o===-1&&this.focusedItemInfo().index===-1&&(o=this.findFirstFocusedItemIndex()),o!==-1&&this.changeFocusedItemIndex(e,o),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return ap(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let i=e>0?ap(this.visibleItems.slice(0,e),o=>this.isValidItem(o)):-1;return i>-1?i:e}findNextItemIndex(e){let i=ethis.isValidItem(o)):-1;return i>-1?i+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,i){if(this.focusedItemInfo().index!==i){let o=this.focusedItemInfo();this.focusedItemInfo.set(gt(ve({},o),{item:this.visibleItems[i].item,index:i})),this.scrollInView()}}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedItemId,o=$r(this.rootmenu.el.nativeElement,`li[id="${i}"]`);o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Hm(this.target,e=>{this.visible&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&(this.scrollHandler.unbindScrollListener(),this.scrollHandler=null)}bindResizeListener(){ns(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{Lh()||this.hide(e,!0)})))}bindOutsideClickListener(){ns(this.platformId)&&(this.outsideClickListener||(this.outsideClickListener=this.renderer.listen(this.document,"click",e=>{let i=this.containerViewChild&&!this.containerViewChild.nativeElement.contains(e.target),o=this.popup?!(this.target&&(this.target===e.target||this.target.contains(e.target))):!0;i&&o&&this.hide()})))}unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}onOverlayHide(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.cd.destroyed||(this.target=null)}ngOnDestroy(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&ml.clear(this.container),this.restoreOverlayAppend(),this.onOverlayHide()),this.unbindMatchMediaListener(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(rt(Fh))};static \u0275cmp=Le({type:t,selectors:[["p-tieredMenu"],["p-tieredmenu"],["p-tiered-menu"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,M7e,4),Ht(r,R7e,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.submenuIconTemplate=a.first),Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(O7e,5),Qi(P7e,5)),i&2){let r;Je(r=et())&&(o.rootmenu=r.first),Je(r=et())&&(o.containerViewChild=r.first)}},inputs:{model:"model",popup:[2,"popup","popup",lt],style:"style",styleClass:"styleClass",breakpoint:"breakpoint",autoZIndex:[2,"autoZIndex","autoZIndex",lt],baseZIndex:[2,"baseZIndex","baseZIndex",wn],autoDisplay:[2,"autoDisplay","autoDisplay",lt],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",id:"id",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",disabled:[2,"disabled","disabled",lt],tabindex:[2,"tabindex","tabindex",wn],appendTo:[1,"appendTo"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[Pi([fY]),Rt],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"id","class","ngStyle","click",4,"ngIf"],[3,"click","id","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","autoDisplay","popup","focusedItemId","activeItemPath"]],template:function(i,o){i&1&&le(0,N7e,4,26,"div",2),i&2&&B("ngIf",!o.popup||o.visible)},dependencies:[po,Zr,fs,V7e,fd,eR,kn],encapsulation:2,data:{animation:[Ph("overlayAnimation",[Mc(":enter",[hl({opacity:0,transform:"scaleY(0.8)"}),Kl("{{showTransitionParams}}")]),Mc(":leave",[Kl("{{hideTransitionParams}}",hl({opacity:0}))])])]},changeDetection:0})}return t})();var _Y=class{static msalInstance(n){return new OO(n.msalConfig.publicClientApplication)}static msalInterceptorConfig(n){let e=new Map;return n.msalConfig.protectedResources.forEach(i=>e.set(i.uri,i.scopes)),{interactionType:ao.Redirect,protectedResourceMap:e}}static msalGuardConfig(n){return{interactionType:n.msalConfig.guardConfig.interactionType==="redirect"?ao.Redirect:ao.Popup,authRequest:n.msalConfig.guardConfig.authRequest,loginFailedRoute:n.msalConfig.guardConfig?.loginFailedRoute??"sys-login-failed"}}};var Mt=class{constructor(n,e){this.fabKey=n,this.name=e}};new Mt("1500","Allgemeinchirurgie");new Mt("2900","Allgemeine Psychiatrie");new Mt("2700","Augenheilkunde");new Mt("0600","Endokrinologie");new Mt("2400","Frauenheilkunde und Geburtshilfe");new Mt("0700","Gastroenterologie");new Mt("1800","Gef\xE4\xDFchirurgie");new Mt("0200","Geriatrie");new Mt("2600","Hals-, Nasen-, Ohrenheilkunde");new Mt("1551","Handchirurgie");new Mt("2100","Herzchirurgie");new Mt("0500","H\xE4matologie und internistische Onkologie");new Mt("0100","Innere Medizin");new Mt("3600","Intensivmedizin");new Mt("0300","Kardiologie");new Mt("1700","Neurochirurgie");new Mt("2800","Neurologie");new Mt("2316","Orthop\xE4die und Unfallchirurgie");new Mt("1900","Plastische Chirurgie");new Mt("0800","Pneumologie");new Mt("3100","Psychosomatik/Psychotherapie");new Mt("1000","P\xE4diatrie");new Mt("3300","Strahlenheilkunde");new Mt("2000","Thoraxchirurgie");new Mt("2200","Urologie");new Mt("2500","Geburtshilfe");var U7e=[new Mt("1500","Allgemeinchirurgie"),new Mt("2900","Allgemeine Psychiatrie"),new Mt("2700","Augenheilkunde"),new Mt("3400","Dermatologie"),new Mt("0600","Endokrinologie"),new Mt("2400","Frauenheilkunde und Geburtshilfe"),new Mt("0700","Gastroenterologie"),new Mt("1800","Gef\xE4\xDFchirurgie"),new Mt("0200","Geriatrie"),new Mt("2600","Hals-, Nasen-, Ohrenheilkunde"),new Mt("1551","Handchirurgie"),new Mt("2100","Herzchirurgie"),new Mt("0500","H\xE4matologie und internistische Onkologie"),new Mt("0100","Innere Medizin"),new Mt("3600","Intensivmedizin"),new Mt("0300","Kardiologie"),new Mt("3000","Kinder- und Jugendpsychiatrie"),new Mt("1300","Kinderchirurgie"),new Mt("1100","Kinderkardiologie"),new Mt("1400","Lungen- und Bronchialheilkunde"),new Mt("1200","Neonatologie"),new Mt("0400","Nephrologie"),new Mt("1700","Neurochirurgie"),new Mt("2800","Neurologie"),new Mt("3200","Nuklearmedizin"),new Mt("2300","Orthop\xE4die"),new Mt("2316","Orthop\xE4die und Unfallchirurgie"),new Mt("1900","Plastische Chirurgie"),new Mt("0800","Pneumologie"),new Mt("3100","Psychosomatik/Psychotherapie"),new Mt("1000","P\xE4diatrie"),new Mt("0900","Rheumatologie"),new Mt("3753","Schmerztherapie"),new Mt("0000","Sonstige"),new Mt("3700","Sonstige Fachabteilung"),new Mt("3300","Strahlenheilkunde"),new Mt("2000","Thoraxchirurgie"),new Mt("1600","Unfallchirurgie"),new Mt("2200","Urologie"),new Mt("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new Mt("2500","davon Geburtshilfe")],H7e=[new Mt("0000","Unbekannt"),new Mt("0100","Innere Medizin"),new Mt("2400","Frauenheilkunde"),new Mt("2500","Geburtshilfe"),new Mt("0200","Geriatrie"),new Mt("0300","Kardiologie"),new Mt("0400","Nephrologie"),new Mt("0500","H\xE4matologie und internistische Onkologie"),new Mt("0600","Endokrinologie"),new Mt("0700","Gastroenterologie"),new Mt("0800","Pneumologie"),new Mt("0900","Rheumatologie"),new Mt("1000","P\xE4diatrie"),new Mt("1100","Kinderkardiologie"),new Mt("1200","Neonatologie"),new Mt("1300","Kinderchirurgie"),new Mt("1400","Lungen- und Bronchialheilkunde"),new Mt("1500","Allgemeinchirurgie"),new Mt("1600","Unfallchirurgie"),new Mt("1700","Neurochirurgie"),new Mt("1800","Gef\xE4\xDFchirurgie"),new Mt("1900","Plastische Chirurgie"),new Mt("2000","Thoraxchirurgie"),new Mt("2100","Herzchirurgie"),new Mt("2200","Urologie"),new Mt("2300","Orthop\xE4die"),new Mt("2600","Hals-, Nasen-, Ohrenheilkunde"),new Mt("2700","Augenheilkunde"),new Mt("2800","Neurologie"),new Mt("2900","Allgemeine Psychiatrie"),new Mt("3000","Kinder- und Jugendpsychiatrie"),new Mt("3100","Psychosomatik/Psychotherapie"),new Mt("3200","Nuklearmedizin"),new Mt("3300","Strahlenheilkunde"),new Mt("3400","Dermatologie"),new Mt("3500","Zahn- und Kieferheilkunde, Mund- und Kieferchirurgie"),new Mt("3600","Intensivmedizin"),new Mt("3700","Sonstige Fachabteilung"),new Mt("2316","Orthop\xE4die und Unfallchirurgie"),new Mt("0104","Innere Medizin/Schwerpunkt Nephrologie"),new Mt("0105","Innere Medizin/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Mt("0106","Innere Medizin/Schwerpunkt Endokrinologie"),new Mt("0107","Innere Medizin/Schwerpunkt Gastroenterologie"),new Mt("0108","Innere Medizin/Schwerpunkt Pneumologie"),new Mt("0109","Innere Medizin/Schwerpunkt Rheumatologie"),new Mt("0114","Innere Medizin/Schwerpunkt Lungen- und Bronchialheilkunde"),new Mt("0150","Innere Medizin/Tumorforschung"),new Mt("0151","Innere Medizin/Schwerpunkt Coloproktologie"),new Mt("0152","Innere Medizin/Schwerpunkt Infektionskrankheiten"),new Mt("0153","Innere Medizin/Schwerpunkt Diabetes"),new Mt("0154","Innere Medizin/Schwerpunkt Naturheilkunde"),new Mt("0224","Geriatrie/Schwerpunkt Frauenheilkunde"),new Mt("0260","Geriatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("0261","Geriatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("0410","Nephrologie/Schwerpunkt P\xE4diatrie"),new Mt("0436","Nephrologie/Intensivmedizin"),new Mt("0510","H\xE4matologie und internistische Onkologie/Schwerpunkt P\xE4diatrie"),new Mt("0524","H\xE4matologie und internistische Onkologie/Schwerpunkt Frauenheilkunde"),new Mt("0533","H\xE4matologie und internistische Onkologie/Schwerpunkt Strahlenheilkunde"),new Mt("0607","Endokrinologie/Schwerpunkt Gastroenterologie"),new Mt("0610","Endokrinologie/Schwerpunkt P\xE4diatrie"),new Mt("0706","Gastroenterologie/Schwerpunkt Endokrinologie"),new Mt("0710","Gastroenterologie/Schwerpunkt P\xE4diatrie"),new Mt("0910","Rheumatologie/Schwerpunkt P\xE4diatrie"),new Mt("1004","P\xE4diatrie/Schwerpunkt Nephrologie"),new Mt("1005","P\xE4diatrie/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Mt("1006","P\xE4diatrie/Schwerpunkt Endokrinologie "),new Mt("3750","Angiologie"),new Mt("0156","Innere Medizin/Schwerpunkt Schlaganfallpatienten"),new Mt("1007","P\xE4diatrie/Schwerpunkt Gastroenterologie"),new Mt("1009","P\xE4diatrie/Schwerpunkt Rheumatologie"),new Mt("1011","P\xE4diatrie/Schwerpunkt Kinderkardiologie"),new Mt("1012","P\xE4diatrie/Schwerpunkt Neonatologie"),new Mt("1014","P\xE4diatrie/Schwerpunkt Lungen- und Bronchialheilkunde"),new Mt("1028","P\xE4diatrie/Schwerpunkt Kinderneurologie"),new Mt("1050","P\xE4diatrie/Schwerpunkt Perinatalmedizin"),new Mt("1051","Langzeitbereich Kinder"),new Mt("1136","Kinderkardiologie/Schwerpunkt Intensivmedizin"),new Mt("1410","Lungen- und Bronchialheilkunde/Schwerpunkt P\xE4diatrie"),new Mt("1513","Allgemeine Chirurgie/Schwerpunkt Kinderchirurgie"),new Mt("1516","Allgemeine Chirurgie/Schwerpunkt Unfallchirurgie"),new Mt("1518","Allgemeine Chirurgie/Schwerpunkt Gef\xE4\xDFchirurgie"),new Mt("1519","Allgemeine Chirurgie/Schwerpunkt Plastische Chirurgie"),new Mt("1520","Allgemeine Chirurgie/Schwerpunkt Thoraxchirurgie"),new Mt("1523","Chirurgie/Schwerpunkt Orthop\xE4die"),new Mt("1550","Allgemeine Chirurgie/Schwerpunkt Abdominal- und Gef\xE4\xDFchirurgie"),new Mt("1551","Allgemeine Chirurgie/Schwerpunkt Handchirurgie"),new Mt("2021","Thoraxchirurgie/Schwerpunkt Herzchirurgie"),new Mt("2036","Thoraxchirurgie/Intensivmedizin"),new Mt("2050","Thoraxchirurgie/Schwerpunkt Herzchirurgie Intensivmedizin"),new Mt("2120","Herzchirurgie/Schwerpunkt Thoraxchirurgie"),new Mt("2150","Herzchirurgie/Schwerpunkt Thoraxchirurgie Intensivmedizin"),new Mt("2309","Orthop\xE4die/Schwerpunkt Rheumatologie"),new Mt("2315","Orthop\xE4die/Schwerpunkt Chirurgie"),new Mt("2402","Frauenheilkunde/Schwerpunkt Geriatrie"),new Mt("2405","Frauenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Mt("2406","Frauenheilkunde/Schwerpunkt Endokrinologie"),new Mt("2810","Neurologie/Schwerpunkt P\xE4diatrie"),new Mt("2928","Allgemeine Psychiatrie/Schwerpunkt Neurologie"),new Mt("2930","Allgemeine Psychiatrie/Schwerpunkt Kinder- und Jugendpsychiatrie"),new Mt("0103","Innere Medizin/Schwerpunkt Kardiologie"),new Mt("2931","Allgemeine Psychiatrie/Schwerpunkt Psychosomatik/Psychotherapie"),new Mt("2950","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung"),new Mt("2951","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie"),new Mt("2952","Allgemeine Psychiatrie/Schwerpunkt Forensische Behandlung"),new Mt("2953","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Tagesklinik"),new Mt("2954","Allgemeine Psychiatrie/Schwerpunkt Suchtbehandlung, Nachtklinik"),new Mt("2955","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Tagesklinik"),new Mt("2956","Allgemeine Psychiatrie/Schwerpunkt Gerontopsychiatrie, Nachtklinik"),new Mt("2960","Allgemeine Psychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("2961","Allgemeine Psychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3060","Kinder- und Jugendpsychiatrie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3061","Kinder- und Jugendpsychiatrie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3160","Psychosomatik/Psychotherapie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3161","Psychosomatik/Psychotherapie/Nachtklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3233","Nuklearmedizin/Schwerpunkt Strahlenheilkunde"),new Mt("3305","Strahlenheilkunde/Schwerpunkt H\xE4matologie und internistische Onkologie"),new Mt("3350","Strahlenheilkunde/Schwerpunkt Radiologie"),new Mt("3460","Dermatologie/Tagesklinik (f\xFCr teilstation\xE4re Pfleges\xE4tze)"),new Mt("3601","Intensivmedizin/Schwerpunkt Innere Medizin"),new Mt("3603","Intensivmedizin/Schwerpunkt Kardiologie"),new Mt("3610","Intensivmedizin/Schwerpunkt P\xE4diatrie"),new Mt("3617","Intensivmedizin/Schwerpunkt Neurochirurgie"),new Mt("3618","Intensivmedizin/Schwerpunkt Chirurgie"),new Mt("3621","Intensivmedizin/Schwerpunkt Herzchirurgie"),new Mt("3622","Intensivmedizin/Schwerpunkt Urologie"),new Mt("3624","Intensivmedizin/Schwerpunkt Frauenheilkunde und Geburtshilfe"),new Mt("3626","Intensivmedizin/Schwerpunkt Hals-, Nasen-, Ohrenheilkunde"),new Mt("3628","Intensivmedizin/Schwerpunkt Neurologie"),new Mt("3650","Operative Intensivmedizin/Schwerpunkt Chirurgie"),new Mt("3651","Intensivmedizin/Thorax-Herzchirurgie"),new Mt("3652","Intensivmedizin/Herz-Thoraxchirurgie"),new Mt("3751","Radiologie"),new Mt("3752","Palliativmedizin"),new Mt("3753","Schmerztherapie"),new Mt("3754","Heiltherapeutische Abteilung"),new Mt("3755","Wirbels\xE4ulenchirurgie"),new Mt("3756","Suchtmedizin"),new Mt("3757","Visceralchirurgie"),new Mt("1536","Allgemeine Chirurgie/Intensivmedizin"),new Mt("2136","Herzchirurgie/Intensivmedizin"),new Mt("2856","Neurologie/Schwerpunkt Schlaganfallpatienten")];var j7e={id:"USER",displayName:"File-Center",type:"other",navigation:{path:["/user","downloads"]},permissions:null},G7e={id:"HELP_PAGES",displayName:"Dokumentation",type:"other",permissions:null,navigation:{externalLink:"https://bindoc.atlassian.net/wiki/spaces/HP/overview"}},E_e=[j7e,G7e];var qd="https://www.bindoc.de/online-meeting";var $7e={id:"HOME",displayName:"Home",type:"tool",permissions:null,navigation:{path:["/home"]}},q7e={id:"OPERATING_NUMBERS",displayName:"Kennzahlen-Benchmarking",type:"tool",permissions:["OPERATING_NUMBERS:BASE"],navigation:{path:["/operating-numbers","clinics"],disabledLink:qd}},W7e={id:"CLINIC_BROWSER",displayName:"Klinik-Browser",type:"tool",permissions:null,navigation:{path:["/clinics"]}},K7e={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"]}]}},Z7e={id:"PROJECTION",displayName:"Marktprognosen",type:"tool",permissions:["PROJECTION:BASE"],navigation:{path:["/projection"],disabledLink:qd}},Y7e={id:"GEOGRAPHIC",displayName:"Geo-Analyse",type:"tool",permissions:null,navigation:{path:["/geographic"],disabledLink:qd}},Q7e={id:"POTENTIAL",displayName:"Potenzialanalyse",type:"tool",permissions:["POTENTIAL:BASE"],navigation:{path:["/potential"],disabledLink:qd}},X7e={id:"DRG_PROFIT_LOSS_ANALYSIS",displayName:"DRG Benchmarking",type:"tool",permissions:["DRG_PROFIT_LOSS_ANALYSIS:BASE"],navigation:{path:["/drg-profit-loss-analysis"],disabledLink:qd}},J7e={id:"COMPETITOR_ANALYSIS",displayName:"Wettbewerbsanalyse",type:"tool",permissions:["COMPETITOR_ANALYSIS:BASE"],navigation:{path:["/competitors-analysis"],disabledLink:qd}},eje={id:"VIRTUAL_CLINIC_REFERRAL",displayName:"Einweiseranalyse",type:"tool",permissions:["VIRTUAL_CLINIC_REFERRAL:BASE","VIRTUAL_CLINIC_REFERRAL:MAIL"],navigation:{path:null,disabledLink:qd,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"]}]}},tje={id:"CUBE",displayName:"Cube",type:"tool",permissions:["CUBE:BASE","CUBE:CREATE_DASHBOARD"],navigation:{path:["/cube"],disabledLink:qd}},ije={id:"BUSINESS_CASE",displayName:"Business Case",type:"tool",permissions:["BUSINESS_CASE:BASE"],navigation:{path:["/business-case"],disabledLink:qd}},nje={id:"SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING",displayName:"Szenarioanalyse",type:"tool",permissions:["SCENARIO_ANALYSIS_CLINIC_LOCATIONS_CLOSING:BASE"],navigation:{path:["/scenario-analysis"],disabledLink:qd}},oje={id:"DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING",displayName:"Versorgungsanalyse",type:"tool",permissions:["DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:BASE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:INEK_DATASOURCE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BB","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BW","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_BY","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HB","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HE","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_HH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_MV","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_NI","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_NW","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_RP","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SL","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SN","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_ST","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_SH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:STATE_TH","DEMAND_ANALYSIS_CLINIC_LOCATIONS_CLOSING:CUSTOM_SAARLAND_DATASOURCE"],navigation:{path:null,disabledLink:qd,children:[{title:"Simulation",path:["/demand-analysis"]},{title:"Kalkulation",path:["/demand-analysis/vv"]}]}},A_e=[$7e,q7e,W7e,K7e,Z7e,Y7e,Q7e,X7e,J7e,eje,tje,ije,nje,oje];var rje={id:"MARKET",displayName:"M\xE4rkte",type:"resource",navigation:{path:["/markets"]},permissions:null},sje={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"]},aje={id:"VIRTUAL_BENCHMARKING_GROUP",displayName:"Virtuelle Benchmarking-Gruppen",type:"resource",navigation:{path:["/virtual-benchmarking-groups"]},permissions:null},lje={id:"CLINICS_FILTER",displayName:"Klinik-Filter",type:"resource",navigation:{path:["/clinics-filters"]},permissions:null},cje={id:"CODE_SPECTRUM",displayName:"Ziffer-Spektra",type:"resource",navigation:{path:["/code-spectra"]},permissions:null},D_e=[rje,sje,lje,cje,aje];var k_e=[...A_e,...D_e,...E_e];var M_e=(()=>{class t extends qs{constructor(e,i){super(),this._httpClient=e,this._envService=i,this._cache=N_(0,60*1e3).pipe(wo(()=>this._fetchFeatureStates()),B_(1))}ngOnDestroy(){this.unsubscribeAll()}getFeatureStatus(e){return this._cache.pipe(vi(i=>{let o=Object.keys(i);return e.forEach(r=>{o.includes(r)||(i[r]=!0)}),i}))}_fetchFeatureStates(){let e=`${this._envService.load("BD_FRONTEND_CONFIG_RESOURCE_URL")}/config/feature/status`;return this._httpClient.post(e,k_e.map(i=>i.id))}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var yY=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:11,vars:1,consts:[[1,"bd-container"],[1,"flex","flex-row","justify-center"],[3,"inline"],[1,"bd-container-inner","mat-typography"],[1,"mat-title"]],template:function(i,o){i&1&&(Oe(0,"mat-toolbar"),K(1,"div",0)(2,"div",1)(3,"div")(4,"mat-icon",2),Ce(5,"engineering"),Z()()()(),K(6,"div",3)(7,"h1",4),Ce(8,"Wir \xFCberarbeiten diesen Bereich gerade f\xFCr Sie"),Z(),K(9,"p"),Ce(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. "),Z()()),i&2&&(L(4),B("inline",!0))},dependencies:[zv,MT,Ls,la],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 R_e=(()=>{class t{constructor(e,i){this._featureStateService=e,this._router=i}canActivate(e){let i=e.data.featureId;return i?this._featureStateService.getFeatureStatus([i]).pipe(vi(o=>o[i]),vi(o=>o||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}canActivateChild(e){let i=e.data.featureId;return i?this._featureStateService.getFeatureStatus([i]).pipe(vi(o=>o[i]),vi(o=>o||this._router.parseUrl("/sys-feature-maintenance"))):this._router.parseUrl("/sys-feature-maintenance")}static{this.\u0275fac=function(i){return new(i||t)(ui(M_e),ui(aa))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var uje="sys-feature-maintenance",pje={path:uje,component:yY},Bhi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({providers:[R_e],imports:[fd.forChild([pje]),zv,Ls,yY,fd]})}}return t})();var hje=new ii("tracking.service"),vY=(()=>{class t{constructor(e){if(this._trackers=[],this._trackers=[],e&&e.length>0)for(let i of e)this._trackers.push(i);else console.log("no tracker loaded")}addAuthenticatedUserContext(e){this._trackers.forEach(i=>i.addAuthenticatedUserContext(e))}removeAuthenticatedUserContext(){this._trackers.forEach(e=>e.removeAuthenticatedUserContext())}trackException(e){this._trackers.forEach(i=>i.trackException(e))}trackEvent(e,i){this._trackers.forEach(o=>o.trackEvent(e,i))}init(e){this._trackers.forEach(i=>i.init(e))}destroy(){this._trackers.forEach(e=>e.destroy())}static{this.\u0275fac=function(i){return new(i||t)(ui(hje,8))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _b=(()=>{class t extends qs{constructor(e,i,o){super(),this._authenticationService=e,this._userConsentService=i,this._userTrackingService=o,this.consent$=new mo,this.authenticated$=new Ms(!1),this.currentUser=new mo,this.accountInfo=null}init(){let e=this._authenticationService.authentication$.pipe(Er(r=>{r||(this.accountInfo=null),this._onAuthenticatedChange(r)})).subscribe(r=>{this.authenticated$.next(r)}),i=this._userConsentService.userConsent$.pipe(Fp((r,a)=>r.equals(a)),Er(r=>{console.debug("onConsentChange",r),this._onConsentChange(r)})).subscribe(r=>{this.consent$.next(r)}),o=this._authenticationService.accountInfo$.subscribe(r=>{this.currentUser.next(r),this.accountInfo=r});this._subs.push(e,i,o)}_onConsentChange(e){e.consent.tracking?this._userTrackingService.init(this.accountInfo):this._userTrackingService.destroy()}_onAuthenticatedChange(e){e?this._userTrackingService.addAuthenticatedUserContext(this.accountInfo):this._userTrackingService.removeAuthenticatedUserContext()}static{this.\u0275fac=function(i){return new(i||t)(ui(Hg),ui(Wfe),ui(vY))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var P_e={showDeleteButton:!0,showEditButton:!0};var Fl=(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})(Fl||{}),Smi=[Fl.ADMIN,Fl.BUSINESS_CASE,Fl.CLINIC_BROWSER,Fl.CLINIC_OPERATING_NUMBERS,Fl.CODE_BROWSER,Fl.COMPETITOR_ANALYSIS,Fl.CUBE,Fl.CUBE_BASE,Fl.CUBE_PREVIEW,Fl.DRG_BENCHMARKING,Fl.HARTMANN_OPPORTUNITY_COSTS,Fl.HARTMANN_OPPORTUNITY_COSTS_CH,Fl.HARTMANN_VIRTUAL_CLINIC_ANALYSIS,Fl.INTUITIVE_PROFITABILITY_ANALYSIS,Fl.INTUITIVE_VIRTUAL_CLINIC_DETAILS_CHANGE,Fl.OP_LIVE,Fl.POTENTIAL_ANALYSIS,Fl.PROJECTION,Fl.REFERRAL_ANALYSIS,Fl.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS,Fl.VIRTUAL_CLINIC_DRG_ACCOUNTING_ANALYSIS_ADVANCED];var NO=class t{static includedLower(n){let e=["CREATOR","DELETE","UPDATE","READ"],i=e.indexOf(n);if(i===-1)throw new Error(`Invalid permission type: ${n}`);return e.slice(i)}static includedBetween(n="READ",e="CREATOR"){let i=["READ","UPDATE","DELETE","CREATOR"],o=p=>{let f=i.indexOf(p);return f>-1?f:null},r=o(n)||0,a=o(e)+1||4;return i.slice(r,a)}static includes(n,e){return t.includedLower(n).indexOf(e)>-1}};var BO={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 I5=class{static merge(n,e){return Object.keys(e).forEach(o=>{if(!n[o])n[o]=e[o];else{let r=e[o].filter(a=>n[o].indexOf(a)===-1);n[o]=n[o].concat(r)}}),n}static flatten(n){let e=Object.keys(n),i=[];return e.forEach(o=>{n[o].forEach(r=>{i.push({resourceName:o,resourceId:r})})}),i}};var jo=(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})(jo||{}),T5={[jo.CH_VIRTUAL_CLINIC]:"Virtuelle Klinik CH",[jo.AT_CUBE_DASHBOARD]:"Cube Dashboard AT",[jo.AT_CODE_SPECTRUM]:"Ziffer-Spektra AT",[jo.AT_VIRTUAL_CLINIC]:"Virtuelle Klinik AT",[jo.APP_CONTENT_SNIPPET]:"Content Snippet",[jo.CASE_EXPORT_TEMPLATE]:"Fall Export Vorlage",[jo.CLINIC_OPERATING_NUMBER_GROUP]:"Kennzahlengruppe",[jo.CODE_SPECTRUM]:"Ziffer-Spektra",[jo.CLINICS_FILTER]:"Klinik-Filter",[jo.MARKET]:"M\xE4rkte",[jo.VIRTUAL_CLINIC]:"Virtuelle Klinik",[jo.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:"Cube Dashboard",[jo.VIRTUAL_CLINIC_BENCHMARKING_GROUP]:"Virtuelle Benchmarking-Gruppe",[jo.VIRTUAL_CLINIC_REFERRAL_IMPORT]:"Einweiser Import",[jo.SCENARIO_ANALYSIS]:"Szenario-Analyse",[jo.SCENARIO_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Simulation",[jo.SCENARIO_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Simulation",[jo.SCENARIO_VV_ANALYSIS_OPEN_CLOSE_INEK_DATASOURCE]:"Versorgunganalyse - Kalkulation",[jo.SCENARIO_VV_ANALYSIS_OPEN_CLOSE]:"Versorgunganalyse - Kalkulation",[jo.UK_CODE_SPECTRUM]:"Code-Spectra UK",[jo.VIRTUAL_CLINIC_CZ]:"Virtuelle Klinik",[jo.FILE]:"Datei"};var jmi={[jo.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]:{children:[jo.CODE_SPECTRUM,jo.VIRTUAL_CLINIC]},[jo.CODE_SPECTRUM]:{parents:[jo.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[jo.VIRTUAL_CLINIC]:{parents:[jo.VIRTUAL_CLINIC_ANALYSIS_DASHBOARD]},[jo.APP_CONTENT_SNIPPET]:{children:[jo.CODE_SPECTRUM,jo.MARKET,jo.CLINICS_FILTER,jo.VIRTUAL_CLINIC]}};var RC=(function(t){return t.NOOP="NOOP",t.EDIT_RESOURCE="EDIT_RESOURCE",t.DELETE_RESOURCE="DELETE_RESOURCE",t})(RC||{});var E5=class{constructor(n){this._environmentService=n}linkAssets(){return this._environmentService.load("BD_HELP_RESOURCE_URLS")}};var A5=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new E5(this._environmentService);let o=this._store.linkAssets().map(r=>this._httpClient.get(r));this._helpLinks=F_(Hl(o).pipe(vi(r=>r.reduce((a,p)=>a.concat(p))))).then(r=>r.reduce((a,p)=>(a[p.key]=p,a),{}))}findByKey(e){return this._helpLinks.then(i=>i[e])}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var L_e={mode:"button",color:"accent"},D5={mode:"toolbar"};function gje(t,n){if(t&1&&(K(0,"a",0)(1,"mat-icon"),Ce(2,"help_outline"),Z()()),t&2){let e=V();B("href",e.link.link,ja)("color",e.color)("ngClass",e.class)("ngStyle",e.styles)("matTooltip",e.link==null?null:e.link.displayName)}}var yb=(()=>{class t{constructor(e,i,o){this._helpService=e,this._changeDetection=i,this._breakpointObserver=o,this.options=L_e,this.class={"bd-primary":!1,"bd-primary-text":!1},this._destroyed=new xi}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([_d.XSmall,_d.Small]).pipe(Wr(this._destroyed)).subscribe(e=>{this.class={"bd-primary":this.options.mode==="toolbar"&&this.options?.hexColor===null,"bd-primary-text":e.matches&&this.options.mode==="toolbar"&&this.options?.hexColor===null}})}ngOnChanges(){this._helpService.findByKey(this.key).then(e=>{this.link=e,this._changeDetection.markForCheck()},()=>this.link=void 0)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(rt(A5),rt(Ho),rt(Eu))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-help-button"]],inputs:{key:"key",options:"options"},features:[In],decls:1,vars:1,consts:[["target","_blank","rel","noopener","mat-icon-button","",3,"href","color","ngClass","ngStyle","matTooltip"]],template:function(i,o){i&1&&Lt(0,gje,3,5,"a",0),i&2&&Ft(o.link?0:-1)},dependencies:[Jo,yd,Rs,fs,Nm,Fm,Ls,la],encapsulation:2,changeDetection:0})}}return t})();var th=(()=>{class t{get vertical(){return this._vertical}set vertical(e){this._vertical=id(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=id(e)}_inset=!1;static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(i,o){i&2&&(Xe("aria-orientation",o.vertical?"vertical":"horizontal"),fo("mat-divider-vertical",o.vertical)("mat-divider-horizontal",!o.vertical)("mat-divider-inset",o.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(i,o){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px} `],encapsulation:2,changeDetection:0})}return t})(),Wd=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Xo]})}return t})();var yje=["*"],vje=`.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))} `,bje=["unscopedContent"],xje=["text"],Cje=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],wje=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var Sje=new ii("ListOption"),xY=(()=>{class t{_elementRef=re(_n);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return t})(),CY=(()=>{class t{_elementRef=re(_n);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return t})(),Ije=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return t})(),F_e=(()=>{class t{_listOption=re(Sje,{optional:!0});constructor(){}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,hostVars:4,hostBindings:function(i,o){i&2&&fo("mdc-list-item__start",o._isAlignedAtStart())("mdc-list-item__end",!o._isAlignedAtStart())}})}return t})(),Tje=(()=>{class t extends F_e{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[Rt]})}return t})(),wY=(()=>{class t extends F_e{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[Rt]})}return t})(),Eje=new ii("MAT_LIST_CONFIG"),bY=(()=>{class t{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=id(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(id(e))}_disabled=Jn(!1);_defaultOptions=re(Eje,{optional:!0});static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,hostVars:1,hostBindings:function(i,o){i&2&&Xe("aria-disabled",o.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return t})(),Aje=(()=>{class t{_elementRef=re(_n);_ngZone=re(on);_listBase=re(bY,{optional:!0});_platform=re(gs);_hostElement;_isButtonElement;_noopAnimations=xa();_avatars;_icons;set lines(e){this._explicitLines=jp(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=id(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(id(e))}_disabled=Jn(!1);_subscriptions=new Dr;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){re(Ol).load(hg);let e=re(kM,{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 S1(this,this._ngZone,this._hostElement,this._platform,re(Zn)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(xc(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let i=this._explicitLines??this._inferLinesFromContent(),o=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",i===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",i===3),this._hasUnscopedTextContent){let r=this._titles.length===0&&i===1;o.classList.toggle("mdc-list-item__primary-text",r),o.classList.toggle("mdc-list-item__secondary-text",!r)}else o.classList.remove("mdc-list-item__primary-text"),o.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,contentQueries:function(i,o,r){if(i&1&&(Ht(r,Tje,4),Ht(r,wY,4)),i&2){let a;Je(a=et())&&(o._avatars=a),Je(a=et())&&(o._icons=a)}},hostVars:4,hostBindings:function(i,o){i&2&&(Xe("aria-disabled",o.disabled)("disabled",o._isButtonElement&&o.disabled||null),fo("mdc-list-item--disabled",o.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return t})();var N_e=(()=>{class t extends bY{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[Pi([{provide:bY,useExisting:t}]),Rt],ngContentSelectors:yje,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},styles:[vje],encapsulation:2,changeDetection:0})}return t})(),B_e=(()=>{class t extends Aje{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=id(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,CY,5),Ht(r,xY,5),Ht(r,Ije,5)),i&2){let a;Je(a=et())&&(o._lines=a),Je(a=et())&&(o._titles=a),Je(a=et())&&(o._meta=a)}},viewQuery:function(i,o){if(i&1&&(Qi(bje,5),Qi(xje,5)),i&2){let r;Je(r=et())&&(o._unscopedContent=r.first),Je(r=et())&&(o._itemText=r.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(i,o){i&2&&(Xe("aria-current",o._getAriaCurrent()),fo("mdc-list-item--activated",o.activated)("mdc-list-item--with-leading-avatar",o._avatars.length!==0)("mdc-list-item--with-leading-icon",o._icons.length!==0)("mdc-list-item--with-trailing-meta",o._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",o._hasBothLeadingAndTrailing())("_mat-animation-noopable",o._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[Rt],ngContentSelectors:wje,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(i,o){if(i&1){let r=Bt();eo(Cje),yn(0),K(1,"span",1),yn(2,1),yn(3,2),K(4,"span",2,0),Qe("cdkObserveContent",function(){return Ee(r),Ae(o._updateItemLines(!0))}),yn(6,3),Z()(),yn(7,4),yn(8,5),Oe(9,"div",3)}},dependencies:[eue],encapsulation:2,changeDetection:0})}return t})();var z_e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[YI,Xo,Cv,pz,Wd]})}return t})();function Dje(t,n){if(t&1&&(K(0,"mat-list-item")(1,"mat-icon",0),Ce(2,"calendar_today"),Z(),K(3,"div",1),Ce(4),el(5,"date"),Z(),K(6,"div",2),Ce(7,"Zeitpunkt der Erstellung"),Z()()),t&2){let e=V();L(4),qn(" ",Ec(5,1,e.data.resource.createdDate,"medium")," ")}}function kje(t,n){if(t&1&&(K(0,"mat-list-item")(1,"mat-icon",0),Ce(2,"help"),Z(),K(3,"a",5),Ce(4),Z()()),t&2){let e=V();L(3),B("href",e.helpLink.link,ja),L(),qn("Dokumentation ",e.helpLink.displayName)}}function Mje(t,n){if(t&1){let e=Bt();K(0,"button",6),Qe("click",function(){Ee(e);let o=V();return Ae(o.editResource())}),K(1,"span"),Ce(2,"Bearbeiten"),Z()()}}function Rje(t,n){if(t&1){let e=Bt();K(0,"button",7),Qe("click",function(){Ee(e);let o=V();return Ae(o.deleteResource())}),K(1,"span"),Ce(2,"L\xF6schen"),Z()()}}var V_e=(()=>{class t{constructor(e,i,o,r){this.locale=e,this.data=i,this._dialogRef=o,this._helpService=r,this.permissionDisplayText="",this.showEditButton=!1,this.showDeleteButton=!1,this.permissionDisplayText=BO[e][this.data.resource.highestPermission],this.showDeleteButton=i.config.showDeleteButton&&NO.includes(i.resource.highestPermission,"DELETE"),this.showEditButton=i.config.showEditButton&&NO.includes(i.resource.highestPermission,"UPDATE"),this._helpService.findByKey(i.helpKey).then(a=>this.helpLink=a)}editResource(){this._dialogRef.close(RC.EDIT_RESOURCE)}deleteResource(){this._dialogRef.close(RC.DELETE_RESOURCE)}static{this.\u0275fac=function(i){return new(i||t)(rt(tp),rt(oT),rt(ug),rt(A5))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:20,vars:9,consts:[["matListItemIcon",""],["matListItemTitle",""],["matListItemLine",""],["mat-flat-button","","color","accent","data-test","resource-edit"],["mat-flat-button","","color","accent","data-test","resource-delete"],["matListItemTitle","","target","_blank","rel","noopener",3,"href"],["mat-flat-button","","color","accent","data-test","resource-edit",3,"click"],["mat-flat-button","","color","accent","data-test","resource-delete",3,"click"]],template:function(i,o){i&1&&(K(0,"mat-dialog-content")(1,"mat-list")(2,"mat-list-item")(3,"mat-icon",0),Ce(4,"visibility"),Z(),K(5,"div",1),Ce(6),Z()(),Lt(7,Dje,8,4,"mat-list-item"),K(8,"mat-list-item")(9,"mat-icon",0),Ce(10,"edit_calendar"),Z(),K(11,"div",1),Ce(12),el(13,"date"),Z(),K(14,"div",2),Ce(15,"Zeitpunkt der letzten \xC4nderung"),Z()(),Lt(16,kje,5,2,"mat-list-item"),Z()(),K(17,"mat-dialog-actions"),Lt(18,Mje,3,0,"button",3),Lt(19,Rje,3,0,"button",4),Z()),i&2&&(L(6),Di(o.permissionDisplayText),L(),Ft(o.data.resource!=null&&o.data.resource.createdDate?7:-1),L(5),qn(" ",Ec(13,6,o.data.resource.modifiedDate,"medium")," "),L(4),Ft(o.helpLink?16:-1),L(2),Ft(o.showEditButton?18:-1),L(),Ft(o.showDeleteButton?19:-1))},dependencies:[C1,z_e,N_e,B_e,wY,CY,xY,Ls,la,w1,Jo,_s,r1],styles:["a[_ngcontent-%COMP%]{text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return t})();var Oje=["menuButton"],U_e=(()=>{class t extends qs{constructor(e,i){super(),this._dialog=e,this._confirmService=i,this.config=P_e,this.editResource=new yt,this.deleteResource=new yt}openMenu(e){let i=this.menuButtonRef.nativeElement.getBoundingClientRect();this._subs.push(this._dialog.open(V_e,{position:{right:`calc(100vw - ${e.x}px)`,top:`${i.bottom}px`},hasBackdrop:!0,data:{resource:this.resource,config:this.config,helpKey:this.helpKey}}).afterClosed().pipe(ro(o=>!!o)).subscribe(o=>{switch(o){case RC.DELETE_RESOURCE:{this._confirmService.get(T5[this.resource.resourceName],`${T5[this.resource.resourceName]} entg\xFCltig l\xF6schen ?`).then(r=>{r&&this.deleteResource.emit()});break}case RC.EDIT_RESOURCE:{this.editResource.emit();break}}}))}static{this.\u0275fac=function(i){return new(i||t)(rt(pg),rt(Xue))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-resources-info-menu"]],viewQuery:function(i,o){if(i&1&&Qi(Oje,5,_n),i&2){let r;Je(r=et())&&(o.menuButtonRef=r.first)}},inputs:{resource:"resource",helpKey:"helpKey",config:"config"},outputs:{editResource:"editResource",deleteResource:"deleteResource"},features:[Rt],decls:4,vars:1,consts:[["menuButton",""],["mat-icon-button","","matTooltip","Info","aria-label","resource info menu",3,"click","data-test"]],template:function(i,o){if(i&1){let r=Bt();K(0,"button",1,0),Qe("click",function(p){return Ee(r),Ae(o.openMenu(p))}),K(2,"mat-icon"),Ce(3,"more_vert"),Z()()}i&2&&B("data-test","resource-info-"+(o.resource==null?null:o.resource.resourceName))},dependencies:[Jo,yd,Nm,Fm,Ru,Ls,la],encapsulation:2,changeDetection:0})}}return t})();var H_e=()=>!1,j_e=()=>!0,G_e=t=>[`/${t.resourceName}`,t.id],jE={disableFnc:H_e,detailLinkFnc:G_e,filterFnc:j_e,emptyResourcesText:"Keine Elemente gespeichert"};var $_e=` .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 Pje=["icon"],Lje=["input"],Fje=(t,n)=>({checked:t,class:n});function Nje(t,n){if(t&1&&Oe(0,"span",7),t&2){let e=V(3);Ge(e.cx("icon")),B("ngClass",e.checkboxIcon),Xe("data-pc-section","icon")}}function Bje(t,n){if(t&1&&(oi(),Oe(0,"svg",8)),t&2){let e=V(3);Ge(e.cx("icon")),Xe("data-pc-section","icon")}}function zje(t,n){if(t&1&&(Mi(0),le(1,Nje,1,4,"span",5)(2,Bje,1,3,"svg",6),Ri()),t&2){let e=V(2);L(),B("ngIf",e.checkboxIcon),L(),B("ngIf",!e.checkboxIcon)}}function Vje(t,n){if(t&1&&(oi(),Oe(0,"svg",9)),t&2){let e=V(2);Ge(e.cx("icon")),Xe("data-pc-section","icon")}}function Uje(t,n){if(t&1&&(Mi(0),le(1,zje,3,2,"ng-container",2)(2,Vje,1,3,"svg",4),Ri()),t&2){let e=V();L(),B("ngIf",e.checked),L(),B("ngIf",e._indeterminate())}}function Hje(t,n){}function jje(t,n){t&1&&le(0,Hje,0,0,"ng-template")}var Gje=` ${$_e} /* 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'); } `,$je={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"},q_e=(()=>{class t extends to{name="checkbox";theme=Gje;classes=$je;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var qje={provide:Wa,useExisting:Br(()=>zO),multi:!0},zO=(()=>{class t extends Nh{value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=Wn();size=Wn();onChange=new yt;onFocus=new yt;onBlur=new yt;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:Fhe(this.value,this.modelValue())}_indeterminate=Jn(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=re(q_e);$variant=Do(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._checkboxIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break}})}ngOnChanges(e){super.ngOnChanges(e),e.indeterminate&&this._indeterminate.set(e.indeterminate.currentValue)}updateModel(e){let i,o=this.injector.get(Wl,null,{optional:!0,self:!0}),r=o&&!this.formControl?o.value:this.modelValue();this.binary?(i=this._indeterminate()?this.trueValue:this.checked?this.falseValue:this.trueValue,this.writeModelValue(i),this.onModelChange(i)):(this.checked||this._indeterminate()?i=r.filter(a=>!vl(a,this.value)):i=r?[...r,this.value]:[this.value],this.onModelChange(i),this.writeModelValue(i),this.formControl&&this.formControl.setValue(i)),this._indeterminate()&&this._indeterminate.set(!1),this.onChange.emit({checked:i,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,i){i(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,Pje,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.checkboxIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&Qi(Lje,5),i&2){let r;Je(r=et())&&(o.inputViewChild=r.first)}},hostVars:5,hostBindings:function(i,o){i&2&&(Xe("data-p-highlight",o.checked)("data-p-checked",o.checked)("data-p-disabled",o.$disabled()),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{value:"value",binary:[2,"binary","binary",lt],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",wn],inputId:"inputId",inputStyle:"inputStyle",styleClass:"styleClass",inputClass:"inputClass",indeterminate:[2,"indeterminate","indeterminate",lt],formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",lt],autofocus:[2,"autofocus","autofocus",lt],trueValue:"trueValue",falseValue:"falseValue",variant:[1,"variant"],size:[1,"size"]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[Pi([qje,q_e]),Rt,In],decls:5,vars:22,consts:[["input",""],["type","checkbox",3,"focus","blur","change","checked"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","minus",3,"class",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["data-p-icon","check",3,"class",4,"ngIf"],[3,"ngClass"],["data-p-icon","check"],["data-p-icon","minus"]],template:function(i,o){if(i&1){let r=Bt();K(0,"input",1,0),Qe("focus",function(p){return Ee(r),Ae(o.onInputFocus(p))})("blur",function(p){return Ee(r),Ae(o.onInputBlur(p))})("change",function(p){return Ee(r),Ae(o.handleChange(p))}),Z(),K(2,"div"),le(3,Uje,3,2,"ng-container",2)(4,jje,1,0,null,3),Z()}i&2&&(Gr(o.inputStyle),Ge(o.cn(o.cx("input"),o.inputClass)),B("checked",o.checked),Xe("id",o.inputId)("value",o.value)("name",o.name())("tabindex",o.tabindex)("required",o.required()?"":void 0)("readonly",o.readonly?"":void 0)("disabled",o.$disabled()?"":void 0)("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel),L(2),Ge(o.cx("box")),L(),B("ngIf",!o.checkboxIconTemplate&&!o._checkboxIconTemplate),L(),B("ngTemplateOutlet",o.checkboxIconTemplate||o._checkboxIconTemplate)("ngTemplateOutletContext",kr(19,Fje,o.checked,o.cx("icon"))))},dependencies:[po,Rs,Zr,Vo,kn,AT,yme],encapsulation:2,changeDetection:0})}return t})(),W_e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[zO,kn,kn]})}return t})();var Wje=["data-p-icon","filter-fill"],K_e=(()=>{class t extends To{static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Rt],attrs:Wje,decls:1,vars:0,consts:[["d","M13.7274 0.33847C13.6228 0.130941 13.4095 0 13.1764 0H0.82351C0.590451 0 0.377157 0.130941 0.272568 0.33847C0.167157 0.545999 0.187746 0.795529 0.325275 0.98247L4.73527 6.99588V13.3824C4.73527 13.7233 5.01198 14 5.35292 14H8.64704C8.98798 14 9.26469 13.7233 9.26469 13.3824V6.99588L13.6747 0.98247C13.8122 0.795529 13.8328 0.545999 13.7274 0.33847Z","fill","currentColor"]],template:function(i,o){i&1&&(oi(),mn(0,"path",0))},encapsulation:2})}return t})();var Z_e=` .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 Kje=["clearicon"],Zje=["incrementbuttonicon"],Yje=["decrementbuttonicon"],Qje=["input"];function Xje(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",7),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.clear())}),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearIcon")}}function Jje(t,n){}function e9e(t,n){t&1&&le(0,Jje,0,0,"ng-template")}function t9e(t,n){if(t&1){let e=Bt();K(0,"span",8),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.clear())}),le(1,e9e,1,0,null,9),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearIcon"),L(),B("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function i9e(t,n){if(t&1&&(Mi(0),le(1,Xje,1,3,"svg",5)(2,t9e,2,4,"span",6),Ri()),t&2){let e=V();L(),B("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),L(),B("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function n9e(t,n){if(t&1&&Oe(0,"span",12),t&2){let e=V(2);B("ngClass",e.incrementButtonIcon),Xe("data-pc-section","incrementbuttonicon")}}function o9e(t,n){t&1&&(oi(),Oe(0,"svg",14)),t&2&&Xe("data-pc-section","incrementbuttonicon")}function r9e(t,n){}function s9e(t,n){t&1&&le(0,r9e,0,0,"ng-template")}function a9e(t,n){if(t&1&&(Mi(0),le(1,o9e,1,1,"svg",13)(2,s9e,1,0,null,9),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),L(),B("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function l9e(t,n){if(t&1&&Oe(0,"span",12),t&2){let e=V(2);B("ngClass",e.decrementButtonIcon),Xe("data-pc-section","decrementbuttonicon")}}function c9e(t,n){t&1&&(oi(),Oe(0,"svg",16)),t&2&&Xe("data-pc-section","decrementbuttonicon")}function d9e(t,n){}function u9e(t,n){t&1&&le(0,d9e,0,0,"ng-template")}function p9e(t,n){if(t&1&&(Mi(0),le(1,c9e,1,1,"svg",15)(2,u9e,1,0,null,9),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),L(),B("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function h9e(t,n){if(t&1){let e=Bt();K(0,"span")(1,"button",10),Qe("mousedown",function(o){Ee(e);let r=V();return Ae(r.onUpButtonMouseDown(o))})("mouseup",function(){Ee(e);let o=V();return Ae(o.onUpButtonMouseUp())})("mouseleave",function(){Ee(e);let o=V();return Ae(o.onUpButtonMouseLeave())})("keydown",function(o){Ee(e);let r=V();return Ae(r.onUpButtonKeyDown(o))})("keyup",function(){Ee(e);let o=V();return Ae(o.onUpButtonKeyUp())}),le(2,n9e,1,2,"span",11)(3,a9e,3,2,"ng-container",2),Z(),K(4,"button",10),Qe("mousedown",function(o){Ee(e);let r=V();return Ae(r.onDownButtonMouseDown(o))})("mouseup",function(){Ee(e);let o=V();return Ae(o.onDownButtonMouseUp())})("mouseleave",function(){Ee(e);let o=V();return Ae(o.onDownButtonMouseLeave())})("keydown",function(o){Ee(e);let r=V();return Ae(r.onDownButtonKeyDown(o))})("keyup",function(){Ee(e);let o=V();return Ae(o.onDownButtonKeyUp())}),le(5,l9e,1,2,"span",11)(6,p9e,3,2,"ng-container",2),Z()()}if(t&2){let e=V();Ge(e.cx("buttonGroup")),Xe("data-pc-section","buttonGroup"),L(),Ge(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),Xe("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),L(),B("ngIf",e.incrementButtonIcon),L(),B("ngIf",!e.incrementButtonIcon),L(),Ge(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),Xe("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),L(),B("ngIf",e.decrementButtonIcon),L(),B("ngIf",!e.decrementButtonIcon)}}function m9e(t,n){if(t&1&&Oe(0,"span",12),t&2){let e=V(2);B("ngClass",e.incrementButtonIcon),Xe("data-pc-section","incrementbuttonicon")}}function f9e(t,n){t&1&&(oi(),Oe(0,"svg",14)),t&2&&Xe("data-pc-section","incrementbuttonicon")}function g9e(t,n){}function _9e(t,n){t&1&&le(0,g9e,0,0,"ng-template")}function y9e(t,n){if(t&1&&(Mi(0),le(1,f9e,1,1,"svg",13)(2,_9e,1,0,null,9),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),L(),B("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function v9e(t,n){if(t&1){let e=Bt();K(0,"button",10),Qe("mousedown",function(o){Ee(e);let r=V();return Ae(r.onUpButtonMouseDown(o))})("mouseup",function(){Ee(e);let o=V();return Ae(o.onUpButtonMouseUp())})("mouseleave",function(){Ee(e);let o=V();return Ae(o.onUpButtonMouseLeave())})("keydown",function(o){Ee(e);let r=V();return Ae(r.onUpButtonKeyDown(o))})("keyup",function(){Ee(e);let o=V();return Ae(o.onUpButtonKeyUp())}),le(1,m9e,1,2,"span",11)(2,y9e,3,2,"ng-container",2),Z()}if(t&2){let e=V();Ge(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),Xe("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","incrementbutton"),L(),B("ngIf",e.incrementButtonIcon),L(),B("ngIf",!e.incrementButtonIcon)}}function b9e(t,n){if(t&1&&Oe(0,"span",12),t&2){let e=V(2);B("ngClass",e.decrementButtonIcon),Xe("data-pc-section","decrementbuttonicon")}}function x9e(t,n){t&1&&(oi(),Oe(0,"svg",16)),t&2&&Xe("data-pc-section","decrementbuttonicon")}function C9e(t,n){}function w9e(t,n){t&1&&le(0,C9e,0,0,"ng-template")}function S9e(t,n){if(t&1&&(Mi(0),le(1,x9e,1,1,"svg",15)(2,w9e,1,0,null,9),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),L(),B("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function I9e(t,n){if(t&1){let e=Bt();K(0,"button",10),Qe("mousedown",function(o){Ee(e);let r=V();return Ae(r.onDownButtonMouseDown(o))})("mouseup",function(){Ee(e);let o=V();return Ae(o.onDownButtonMouseUp())})("mouseleave",function(){Ee(e);let o=V();return Ae(o.onDownButtonMouseLeave())})("keydown",function(o){Ee(e);let r=V();return Ae(r.onDownButtonKeyDown(o))})("keyup",function(){Ee(e);let o=V();return Ae(o.onDownButtonKeyUp())}),le(1,b9e,1,2,"span",11)(2,S9e,3,2,"ng-container",2),Z()}if(t&2){let e=V();Ge(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),Xe("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-pc-section","decrementbutton"),L(),B("ngIf",e.decrementButtonIcon),L(),B("ngIf",!e.decrementButtonIcon)}}var T9e=` ${Z_e} /* 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'); } `,E9e={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"},Y_e=(()=>{class t extends to{name="inputnumber";theme=T9e;classes=E9e;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var A9e={provide:Wa,useExisting:Br(()=>k5),multi:!0},k5=(()=>{class t extends Fv{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 yt;onFocus=new yt;onBlur=new yt;onKeyDown=new yt;onClear=new yt;clearIconTemplate;incrementButtonIconTemplate;decrementButtonIconTemplate;templates;input;_clearIconTemplate;_incrementButtonIconTemplate;_decrementButtonIconTemplate;value;focused;initialized;groupChar="";prefixChar="";suffixChar="";isSpecialChar;timer;lastValue;_numeral;numberFormat;_decimal;_decimalChar;_group;_minusSign;_currency;_prefix;_suffix;_index;_componentStyle=re(Y_e);ngControl=null;constructor(e){super(),this.injector=e}ngOnChanges(e){super.ngOnChanges(e),["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(o=>!!e[o])&&this.updateConstructParser()}ngOnInit(){super.ngOnInit(),this.ngControl=this.injector.get(Wl,null,{optional:!0}),this.constructParser(),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"clearicon":this._clearIconTemplate=e.template;break;case"incrementbuttonicon":this._incrementButtonIconTemplate=e.template;break;case"decrementbuttonicon":this._decrementButtonIconTemplate=e.template;break}})}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits??void 0,maximumFractionDigits:this.maxFractionDigits??void 0}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());let e=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(e.map((o,r)=>[o,r]));this._numeral=new RegExp(`[${e.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._decimalChar=this.getDecimalChar(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=o=>i.get(o)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){let e=this.getDecimalChar();return new RegExp(`[${e}]`,"g")}getDecimalChar(){return new Intl.NumberFormat(this.locale,gt(ve({},this.getOptions()),{useGrouping:!1})).format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}getGroupingExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){let e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(e!=null){if(e==="-")return e;if(this.format){let o=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&e!=this.prefix&&(o=this.prefix+o),this.suffix&&e!=this.suffix&&(o=o+this.suffix),o}return e.toString()}return""}parseValue(e){let i=new RegExp(this._suffix,""),o=new RegExp(this._prefix,""),r=new RegExp(this._currency,""),a=e.replace(i,"").replace(o,"").trim().replace(/\s/g,"").replace(r,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(a){if(a==="-")return a;let p=+a;return isNaN(p)?null:p}return null}repeat(e,i,o){if(this.readonly)return;let r=i||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,o)},r),this.spin(e,o)}spin(e,i){let o=(this.step()??1)*i,r=this.parseValue(this.input?.nativeElement.value)||0,a=this.validateValue(r+o);this.maxlength()&&this.maxlength()=0;p--)if(this.isNumeralChar(r.charAt(p))){this.input.nativeElement.setSelectionRange(p,p);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(),i===o){if(i==1&&this.prefix||i==r.length&&this.suffix)break;let p=r.charAt(i-1),{decimalCharIndex:f,decimalCharIndexWithoutPrefix:x}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(p)){let I=this.getDecimalLength(r);if(this._group.test(p))this._group.lastIndex=0,a=r.slice(0,i-2)+r.slice(i-1);else if(this._decimal.test(p))this._decimal.lastIndex=0,I?this.input?.nativeElement.setSelectionRange(i-1,i-1):a=r.slice(0,i-1)+r.slice(i);else if(f>0&&i>f){let D=this.isDecimalMode()&&(this.minFractionDigits||0)0?a:""):a=r.slice(0,i-1)+r.slice(i)}else this.mode==="currency"&&p.search(this._currency)!=-1&&(a=r.slice(1));this.updateValue(e,a,null,"delete-single")}else a=this.deleteRange(r,i,o),this.updateValue(e,a,null,"delete-range");break}case"Delete":if(e.preventDefault(),i===o){if(i==0&&this.prefix||i==r.length-1&&this.suffix)break;let p=r.charAt(i),{decimalCharIndex:f,decimalCharIndexWithoutPrefix:x}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(p)){let I=this.getDecimalLength(r);if(this._group.test(p))this._group.lastIndex=0,a=r.slice(0,i)+r.slice(i+2);else if(this._decimal.test(p))this._decimal.lastIndex=0,I?this.input?.nativeElement.setSelectionRange(i+1,i+1):a=r.slice(0,i)+r.slice(i+1);else if(f>0&&i>f){let D=this.isDecimalMode()&&(this.minFractionDigits||0)0?a:""):a=r.slice(0,i)+r.slice(i+1)}this.updateValue(e,a,null,"delete-back-single")}else a=this.deleteRange(r,i,o),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 i=e.which||e.keyCode,o=String.fromCharCode(i),r=this.isDecimalSign(o),a=this.isMinusSign(o);i!=13&&e.preventDefault(),!r&&e.code==="NumpadDecimal"&&(r=!0,o=this._decimalChar,i=o.charCodeAt(0));let{value:p,selectionStart:f,selectionEnd:x}=this.input.nativeElement,I=this.parseValue(p+o),D=I!=null?I.toString():"",P=p.substring(f,x),R=this.parseValue(P),j=R!=null?R.toString():"";if(f!==x&&j.length>0){this.insert(e,o,{isDecimalSign:r,isMinusSign:a});return}this.maxlength()&&D.length>this.maxlength()||(48<=i&&i<=57||a||r)&&this.insert(e,o,{isDecimalSign:r,isMinusSign:a})}onPaste(e){if(!this.$disabled()&&!this.readonly){e.preventDefault();let i=(e.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(this.inputId==="integeronly"&&/[^\d-]/.test(i))return;if(i){this.maxlength()&&(i=i.toString().substring(0,this.maxlength()));let o=this.parseValue(i);o!=null&&this.insert(e,o.toString())}}}allowMinusSign(){return this.min()==null||this.min()<0}isMinusSign(e){return this._minusSign.test(e)||e==="-"?(this._minusSign.lastIndex=0,!0):!1}isDecimalSign(e){return this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1}isDecimalMode(){return this.mode==="decimal"}getDecimalCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;let r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:i,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){let i=e.search(this._decimal);this._decimal.lastIndex=0;let o=e.search(this._minusSign);this._minusSign.lastIndex=0;let r=e.search(this._suffix);this._suffix.lastIndex=0;let a=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:i,minusCharIndex:o,suffixCharIndex:r,currencyCharIndex:a}}insert(e,i,o={isDecimalSign:!1,isMinusSign:!1}){let r=i.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&r!==-1)return;let a=this.input?.nativeElement.selectionStart,p=this.input?.nativeElement.selectionEnd,f=this.input?.nativeElement.value.trim(),{decimalCharIndex:x,minusCharIndex:I,suffixCharIndex:D,currencyCharIndex:P}=this.getCharIndexes(f),R;if(o.isMinusSign)a===0&&(R=f,(I===-1||p!==0)&&(R=this.insertText(f,i,0,p)),this.updateValue(e,R,i,"insert"));else if(o.isDecimalSign)x>0&&a===x?this.updateValue(e,f,i,"insert"):x>a&&x0&&a>x){if(a+i.length-(x+1)<=j){let W=P>=a?P-1:D>=a?D:f.length;R=f.slice(0,a)+i+f.slice(a+i.length,W)+f.slice(W),this.updateValue(e,R,i,$)}}else R=this.insertText(f,i,a,p),this.updateValue(e,R,i,$)}}insertText(e,i,o,r){if((i==="."?i:i.split(".")).length===2){let p=e.slice(o,r).search(this._decimal);return this._decimal.lastIndex=0,p>0?e.slice(0,o)+this.formatValue(i)+e.slice(r):e||this.formatValue(i)}else return r-o===e.length?this.formatValue(i):o===0?i+e.slice(r):r===e.length?e.slice(0,o)+i:e.slice(0,o)+i+e.slice(r)}deleteRange(e,i,o){let r;return o-i===e.length?r="":i===0?r=e.slice(o):o===e.length?r=e.slice(0,i):r=e.slice(0,i)+e.slice(o),r}initCursor(){let e=this.input?.nativeElement.selectionStart,i=this.input?.nativeElement.selectionEnd,o=this.input?.nativeElement.value,r=o.length,a=null,p=(this.prefixChar||"").length;o=o.replace(this._prefix,""),(e===i||e!==0||i=0;)if(f=o.charAt(x),this.isNumeralChar(f)){a=x+p;break}else x--;if(a!==null)this.input?.nativeElement.setSelectionRange(a+1,a+1);else{for(x=e;xthis.max()?this.max():e}updateInput(e,i,o,r){i=i||"";let a=this.input?.nativeElement.value,p=this.formatValue(e),f=a.length;if(p!==r&&(p=this.concatValues(p,r)),f===0){this.input.nativeElement.value=p,this.input.nativeElement.setSelectionRange(0,0);let I=this.initCursor()+i.length;this.input.nativeElement.setSelectionRange(I,I)}else{let x=this.input.nativeElement.selectionStart,I=this.input.nativeElement.selectionEnd;if(this.maxlength()&&p.length>this.maxlength()&&(p=p.slice(0,this.maxlength()),x=Math.min(x,this.maxlength()),I=Math.min(I,this.maxlength())),this.maxlength()&&this.maxlength()wn(e,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>wn(e,null)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",lt],autofocus:[2,"autofocus","autofocus",lt]},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[Pi([A9e,Y_e]),Rt,In],decls:6,vars:36,consts:[["input",""],["pInputText","","role","spinbutton","inputmode","decimal",3,"input","keydown","keypress","paste","click","focus","blur","value","ngStyle","variant","invalid","pSize","pAutoFocus","fluid"],[4,"ngIf"],[3,"class",4,"ngIf"],["type","button","tabindex","-1",3,"class","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["type","button","tabindex","-1",3,"mousedown","mouseup","mouseleave","keydown","keyup"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","angle-up",4,"ngIf"],["data-p-icon","angle-up"],["data-p-icon","angle-down",4,"ngIf"],["data-p-icon","angle-down"]],template:function(i,o){if(i&1){let r=Bt();K(0,"input",1,0),Qe("input",function(p){return Ee(r),Ae(o.onUserInput(p))})("keydown",function(p){return Ee(r),Ae(o.onInputKeyDown(p))})("keypress",function(p){return Ee(r),Ae(o.onInputKeyPress(p))})("paste",function(p){return Ee(r),Ae(o.onPaste(p))})("click",function(){return Ee(r),Ae(o.onInputClick())})("focus",function(p){return Ee(r),Ae(o.onInputFocus(p))})("blur",function(p){return Ee(r),Ae(o.onInputBlur(p))}),Z(),le(2,i9e,3,2,"ng-container",2)(3,h9e,7,17,"span",3)(4,v9e,3,7,"button",4)(5,I9e,3,7,"button",4)}i&2&&(Ge(o.cn(o.cx("pcInputText"),o.inputStyleClass)),B("value",o.formattedValue())("ngStyle",o.inputStyle)("variant",o.$variant())("invalid",o.invalid())("pSize",o.size())("pAutoFocus",o.autofocus)("fluid",o.hasFluid),Xe("id",o.inputId)("aria-valuemin",o.min())("aria-valuemax",o.max())("aria-valuenow",o.value)("placeholder",o.placeholder)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy)("aria-describedby",o.ariaDescribedBy)("title",o.title)("size",o.inputSize())("name",o.name())("autocomplete",o.autocomplete)("maxlength",o.maxlength())("minlength",o.minlength())("tabindex",o.tabindex)("aria-required",o.ariaRequired)("min",o.min())("max",o.max())("step",o.step()??1)("required",o.required()?"":void 0)("readonly",o.readonly?"":void 0)("disabled",o.$disabled()?"":void 0)("data-pc-section","input"),L(2),B("ngIf",o.buttonLayout!="vertical"&&o.showClear&&o.value),L(),B("ngIf",o.showButtons&&o.buttonLayout==="stacked"),L(),B("ngIf",o.showButtons&&o.buttonLayout!=="stacked"),L(),B("ngIf",o.showButtons&&o.buttonLayout!=="stacked"))},dependencies:[po,Rs,Zr,Vo,fs,yg,cp,xd,ume,cme,kn],encapsulation:2,changeDetection:0})}return t})(),Q_e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[k5,kn,kn]})}return t})();var X_e=` .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 D9e=["dropdownicon"],k9e=["firstpagelinkicon"],M9e=["previouspagelinkicon"],R9e=["lastpagelinkicon"],O9e=["nextpagelinkicon"],M5=t=>({$implicit:t}),P9e=t=>({pageLink:t});function L9e(t,n){t&1&&Oi(0)}function F9e(t,n){if(t&1&&(K(0,"div"),le(1,L9e,1,0,"ng-container",9),Z()),t&2){let e=V();Ge(e.cx("contentStart")),Xe("data-pc-section","start"),L(),B("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",rn(5,M5,e.paginatorState))}}function N9e(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V();Ge(e.cx("current")),L(),Di(e.currentPageReport)}}function B9e(t,n){if(t&1&&(oi(),Oe(0,"svg",12)),t&2){let e=V(2);Ge(e.cx("firstIcon"))}}function z9e(t,n){}function V9e(t,n){t&1&&le(0,z9e,0,0,"ng-template")}function U9e(t,n){if(t&1&&(K(0,"span"),le(1,V9e,1,0,null,13),Z()),t&2){let e=V(2);Ge(e.cx("firstIcon")),L(),B("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function H9e(t,n){if(t&1){let e=Bt();K(0,"button",10),Qe("click",function(o){Ee(e);let r=V();return Ae(r.changePageToFirst(o))}),le(1,B9e,1,2,"svg",11)(2,U9e,2,3,"span",0),Z()}if(t&2){let e=V();Ge(e.cx("first")),Xe("aria-label",e.getAriaLabel("firstPageLabel")),L(),B("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),L(),B("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function j9e(t,n){if(t&1&&(oi(),Oe(0,"svg",14)),t&2){let e=V();Ge(e.cx("prevIcon"))}}function G9e(t,n){}function $9e(t,n){t&1&&le(0,G9e,0,0,"ng-template")}function q9e(t,n){if(t&1&&(K(0,"span"),le(1,$9e,1,0,null,13),Z()),t&2){let e=V();Ge(e.cx("prevIcon")),L(),B("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function W9e(t,n){if(t&1){let e=Bt();K(0,"button",10),Qe("click",function(o){let r=Ee(e).$implicit,a=V(2);return Ae(a.onPageLinkClick(o,r-1))}),Ce(1),Z()}if(t&2){let e=n.$implicit,i=V(2);Ge(i.cx("page",rn(5,P9e,e))),Xe("aria-label",i.getPageAriaLabel(e))("aria-current",e-1==i.getPage()?"page":void 0),L(),qn(" ",i.getLocalization(e)," ")}}function K9e(t,n){if(t&1&&(K(0,"span"),le(1,W9e,2,7,"button",15),Z()),t&2){let e=V();Ge(e.cx("pages")),L(),B("ngForOf",e.pageLinks)}}function Z9e(t,n){if(t&1&&Ce(0),t&2){let e=V(2);Di(e.currentPageReport)}}function Y9e(t,n){t&1&&Oi(0)}function Q9e(t,n){if(t&1&&le(0,Y9e,1,0,"ng-container",9),t&2){let e=n.$implicit,i=V(3);B("ngTemplateOutlet",i.jumpToPageItemTemplate)("ngTemplateOutletContext",rn(2,M5,e))}}function X9e(t,n){t&1&&(Mi(0),le(1,Q9e,1,4,"ng-template",19),Ri())}function J9e(t,n){t&1&&Oi(0)}function eGe(t,n){if(t&1&&le(0,J9e,1,0,"ng-container",13),t&2){let e=V(3);B("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function tGe(t,n){t&1&&le(0,eGe,1,1,"ng-template",20)}function iGe(t,n){if(t&1){let e=Bt();K(0,"p-select",16),Qe("onChange",function(o){Ee(e);let r=V();return Ae(r.onPageDropdownChange(o))}),le(1,Z9e,1,1,"ng-template",17)(2,X9e,2,0,"ng-container",18)(3,tGe,1,0,null,18),Z()}if(t&2){let e=V();B("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("styleClass",e.cx("pcJumpToPageDropdown"))("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),Xe("aria-label",e.getAriaLabel("jumpToPageDropdownLabel")),L(2),B("ngIf",e.jumpToPageItemTemplate),L(),B("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function nGe(t,n){if(t&1&&(oi(),Oe(0,"svg",21)),t&2){let e=V();Ge(e.cx("nextIcon"))}}function oGe(t,n){}function rGe(t,n){t&1&&le(0,oGe,0,0,"ng-template")}function sGe(t,n){if(t&1&&(K(0,"span"),le(1,rGe,1,0,null,13),Z()),t&2){let e=V();Ge(e.cx("nextIcon")),L(),B("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function aGe(t,n){if(t&1&&(oi(),Oe(0,"svg",23)),t&2){let e=V(2);Ge(e.cx("lastIcon"))}}function lGe(t,n){}function cGe(t,n){t&1&&le(0,lGe,0,0,"ng-template")}function dGe(t,n){if(t&1&&(K(0,"span"),le(1,cGe,1,0,null,13),Z()),t&2){let e=V(2);Ge(e.cx("lastIcon")),L(),B("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function uGe(t,n){if(t&1){let e=Bt();K(0,"button",2),Qe("click",function(o){Ee(e);let r=V();return Ae(r.changePageToLast(o))}),le(1,aGe,1,2,"svg",22)(2,dGe,2,3,"span",0),Z()}if(t&2){let e=V();Ge(e.cx("last")),B("disabled",e.isLastPage()||e.empty()),Xe("aria-label",e.getAriaLabel("lastPageLabel")),L(),B("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),L(),B("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function pGe(t,n){if(t&1){let e=Bt();K(0,"p-inputnumber",24),Qe("ngModelChange",function(o){Ee(e);let r=V();return Ae(r.changePage(o-1))}),Z()}if(t&2){let e=V();Ge(e.cx("pcJumpToPageInput")),B("ngModel",e.currentPage())("disabled",e.empty())}}function hGe(t,n){t&1&&Oi(0)}function mGe(t,n){if(t&1&&le(0,hGe,1,0,"ng-container",9),t&2){let e=n.$implicit,i=V(3);B("ngTemplateOutlet",i.dropdownItemTemplate)("ngTemplateOutletContext",rn(2,M5,e))}}function fGe(t,n){t&1&&(Mi(0),le(1,mGe,1,4,"ng-template",19),Ri())}function gGe(t,n){t&1&&Oi(0)}function _Ge(t,n){if(t&1&&le(0,gGe,1,0,"ng-container",13),t&2){let e=V(3);B("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function yGe(t,n){t&1&&le(0,_Ge,1,1,"ng-template",20)}function vGe(t,n){if(t&1){let e=Bt();K(0,"p-select",25),wm("ngModelChange",function(o){Ee(e);let r=V();return ng(r.rows,o)||(r.rows=o),Ae(o)}),Qe("onChange",function(o){Ee(e);let r=V();return Ae(r.onRppChange(o))}),le(1,fGe,2,0,"ng-container",18)(2,yGe,1,0,null,18),Z()}if(t&2){let e=V();B("options",e.rowsPerPageItems),Cm("ngModel",e.rows),B("styleClass",e.cx("pcRowPerPageDropdown"))("disabled",e.empty())("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight),ul("ariaLabel",e.getAriaLabel("rowsPerPageLabel")),L(),B("ngIf",e.dropdownItemTemplate),L(),B("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function bGe(t,n){t&1&&Oi(0)}function xGe(t,n){if(t&1&&(K(0,"div"),le(1,bGe,1,0,"ng-container",9),Z()),t&2){let e=V();Ge(e.cx("contentEnd")),Xe("data-pc-section","end"),L(),B("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",rn(5,M5,e.paginatorState))}}var CGe={paginator:({instance:t})=>["p-paginator p-component"],content:"p-paginator-content",contentStart:"p-paginator-content-start",contentEnd:"p-paginator-content-end",first:({instance:t})=>["p-paginator-first",{"p-disabled":t.isFirstPage()||t.empty()}],firstIcon:"p-paginator-first-icon",prev:({instance:t})=>["p-paginator-prev",{"p-disabled":t.isFirstPage()||t.empty()}],prevIcon:"p-paginator-prev-icon",next:({instance:t})=>["p-paginator-next",{"p-disabled":t.isLastPage()||t.empty()}],nextIcon:"p-paginator-next-icon",last:({instance:t})=>["p-paginator-last",{"p-disabled":t.isLastPage()||t.empty()}],lastIcon:"p-paginator-last-icon",pages:"p-paginator-pages",page:({instance:t,pageLink:n})=>["p-paginator-page",{"p-paginator-page-selected":n-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},J_e=(()=>{class t extends to{name="paginator";theme=X_e;classes=CGe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var SY=(()=>{class t extends Ao{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=Wn(void 0);onPageChange=new yt;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=re(J_e);$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());get display(){return this.alwaysShow||this.pageLinks&&this.pageLinks.length>1?null:"none"}constructor(){super()}ngOnInit(){super.ngOnInit(),this.updatePaginatorState()}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"firstpagelinkicon":this._firstPageLinkIconTemplate=e.template;break;case"previouspagelinkicon":this._previousPageLinkIconTemplate=e.template;break;case"lastpagelinkicon":this._lastPageLinkIconTemplate=e.template;break;case"nextpagelinkicon":this._nextPageLinkIconTemplate=e.template;break}})}getAriaLabel(e){return this.config.translation.aria?this.config.translation.aria[e]:void 0}getPageAriaLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel.replace(/{page}/g,`${e}`):void 0}getLocalization(e){let i=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((r,a)=>[a,r]));return e>9?String(e).split("").map(a=>o.get(Number(a))).join(""):o.get(e)}ngOnChanges(e){super.ngOnChanges(e),e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions(),e.pageLinkSize&&this.updatePageLinks()}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];let e=null;for(let i of this.rowsPerPageOptions)typeof i=="object"&&i.showAll?e={label:i.showAll,value:this.totalRecords}:this.rowsPerPageItems.push({label:String(this.getLocalization(i)),value:i});e&&this.rowsPerPageItems.push(e)}}isFirstPage(){return this.getPage()===0}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),i=Math.min(this.pageLinkSize,e),o=Math.max(0,Math.ceil(this.getPage()-i/2)),r=Math.min(e-1,o+i-1);var a=this.pageLinkSize-(r-o+1);return o=Math.max(0,o-a),[o,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),i=e[0],o=e[1];for(let r=i;r<=o;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r=0&&e0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,i){this.changePage(i),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return this.getPageCount()===0}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["p-paginator"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,D9e,4),Ht(r,k9e,4),Ht(r,M9e,4),Ht(r,R9e,4),Ht(r,O9e,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.dropdownIconTemplate=a.first),Je(a=et())&&(o.firstPageLinkIconTemplate=a.first),Je(a=et())&&(o.previousPageLinkIconTemplate=a.first),Je(a=et())&&(o.lastPageLinkIconTemplate=a.first),Je(a=et())&&(o.nextPageLinkIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},hostVars:6,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","paginator")("data-pc-section","root"),Ge(o.cn(o.cx("paginator"),o.styleClass)),zr("display",o.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",wn],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",lt],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",lt],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",lt],totalRecords:[2,"totalRecords","totalRecords",wn],rows:[2,"rows","rows",wn],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",lt],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",lt],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",lt],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[Pi([J_e]),Rt,In],decls:15,vars:21,consts:[[3,"class",4,"ngIf"],["type","button","pRipple","",3,"class","click",4,"ngIf"],["type","button","pRipple","",3,"click","disabled"],["data-p-icon","angle-left",3,"class",4,"ngIf"],[3,"options","ngModel","disabled","styleClass","appendTo","scrollHeight","onChange",4,"ngIf"],["data-p-icon","angle-right",3,"class",4,"ngIf"],["type","button","pRipple","",3,"disabled","class","click",4,"ngIf"],[3,"ngModel","class","disabled","ngModelChange",4,"ngIf"],[3,"options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","ngModelChange","onChange",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","pRipple","",3,"click"],["data-p-icon","angle-double-left",3,"class",4,"ngIf"],["data-p-icon","angle-double-left"],[4,"ngTemplateOutlet"],["data-p-icon","angle-left"],["type","button","pRipple","",3,"class","click",4,"ngFor","ngForOf"],[3,"onChange","options","ngModel","disabled","styleClass","appendTo","scrollHeight"],["pTemplate","selectedItem"],[4,"ngIf"],["pTemplate","item"],["pTemplate","dropdownicon"],["data-p-icon","angle-right"],["data-p-icon","angle-double-right",3,"class",4,"ngIf"],["data-p-icon","angle-double-right"],[3,"ngModelChange","ngModel","disabled"],[3,"ngModelChange","onChange","options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel"]],template:function(i,o){i&1&&(le(0,F9e,2,7,"div",0)(1,N9e,2,3,"span",0)(2,H9e,3,5,"button",1),K(3,"button",2),Qe("click",function(a){return o.changePageToPrev(a)}),le(4,j9e,1,2,"svg",3)(5,q9e,2,3,"span",0),Z(),le(6,K9e,2,3,"span",0)(7,iGe,4,9,"p-select",4),K(8,"button",2),Qe("click",function(a){return o.changePageToNext(a)}),le(9,nGe,1,2,"svg",5)(10,sGe,2,3,"span",0),Z(),le(11,uGe,3,6,"button",6)(12,pGe,1,4,"p-inputnumber",7)(13,vGe,3,9,"p-select",8)(14,xGe,2,7,"div",0)),i&2&&(B("ngIf",o.templateLeft),L(),B("ngIf",o.showCurrentPageReport),L(),B("ngIf",o.showFirstLastIcon),L(),Ge(o.cx("prev")),B("disabled",o.isFirstPage()||o.empty()),Xe("aria-label",o.getAriaLabel("prevPageLabel")),L(),B("ngIf",!o.previousPageLinkIconTemplate&&!o._previousPageLinkIconTemplate),L(),B("ngIf",o.previousPageLinkIconTemplate||o._previousPageLinkIconTemplate),L(),B("ngIf",o.showPageLinks),L(),B("ngIf",o.showJumpToPageDropdown),L(),Ge(o.cx("next")),B("disabled",o.isLastPage()||o.empty()),Xe("aria-label",o.getAriaLabel("nextPageLabel")),L(),B("ngIf",!o.nextPageLinkIconTemplate&&!o._nextPageLinkIconTemplate),L(),B("ngIf",o.nextPageLinkIconTemplate||o._nextPageLinkIconTemplate),L(),B("ngIf",o.showFirstLastIcon),L(),B("ngIf",o.showJumpToPageInput),L(),B("ngIf",o.rowsPerPageOptions),L(),B("ngIf",o.templateRight))},dependencies:[po,Rl,Zr,Vo,bg,k5,Au,il,Rh,Yl,ame,lme,dme,Nz,kn,Uo],encapsulation:2,changeDetection:0})}return t})(),e0e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[SY,kn,kn]})}return t})();var t0e=` .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 SGe=["input"],IGe=` ${t0e} /* 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'); } `,TGe={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"},i0e=(()=>{class t extends to{name="radiobutton";theme=IGe;classes=TGe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var EGe={provide:Wa,useExisting:Br(()=>n0e),multi:!0},AGe=(()=>{class t{accessors=[];add(e,i){this.accessors.push([e,i])}remove(e){this.accessors=this.accessors.filter(i=>i[1]!==e)}select(e){this.accessors.forEach(i=>{this.isSameGroup(i,e)&&i[1]!==e&&i[1].writeValue(e.value)})}isSameGroup(e,i){return e[0].control?e[0].control.root===i.control.control.root&&e[1].name()===i.name():!1}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),n0e=(()=>{class t extends Nh{value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=Wn();size=Wn();onClick=new yt;onFocus=new yt;onBlur=new yt;inputViewChild;$variant=Do(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=re(i0e);injector=re(Zn);registry=re(AGe);ngOnInit(){super.ngOnInit(),this.control=this.injector.get(Wl),this.registry.add(this.control,this)}onChange(e){this.$disabled()||this.select(e)}select(e){this.$disabled()||(this.checked=!0,this.writeModelValue(this.checked),this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,i){this.checked=this.binary?!!e:e==this.value,i(this.checked),this.cd.markForCheck()}ngOnDestroy(){this.registry.remove(this),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(i,o){if(i&1&&Qi(SGe,5),i&2){let r;Je(r=et())&&(o.inputViewChild=r.first)}},hostVars:4,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","radiobutton")("data-pc-section","root"),Ge(o.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",wn],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",lt],binary:[2,"binary","binary",lt],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Pi([EGe,i0e]),Rt],decls:4,vars:19,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus"]],template:function(i,o){if(i&1){let r=Bt();K(0,"input",1,0),Qe("focus",function(p){return Ee(r),Ae(o.onInputFocus(p))})("blur",function(p){return Ee(r),Ae(o.onInputBlur(p))})("change",function(p){return Ee(r),Ae(o.onChange(p))}),Z(),K(2,"div"),Oe(3,"div"),Z()}i&2&&(Ge(o.cx("input")),B("checked",o.checked)("pAutoFocus",o.autofocus),Xe("id",o.inputId)("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0)("value",o.modelValue())("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("tabindex",o.tabindex)("aria-checked",o.checked),L(2),Ge(o.cx("box")),Xe("data-pc-section","input"),L(),Ge(o.cx("icon")),Xe("data-pc-section","icon"))},dependencies:[po,cp,kn],encapsulation:2,changeDetection:0})}return t})(),o0e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[n0e,kn,kn]})}return t})();var r0e=` .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 DGe=["icon"],kGe=["content"],a0e=t=>({$implicit:t});function MGe(t,n){t&1&&Oi(0)}function RGe(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(3);Ge(e.cn(e.cx("icon"),e.checked?e.onIcon:e.offIcon,e.iconPos==="left"?e.cx("iconLeft"):e.cx("iconRight"))),Xe("data-pc-section","icon")}}function OGe(t,n){if(t&1&&Lt(0,RGe,1,3,"span",1),t&2){let e=V(2);Ft(e.onIcon||e.offIcon?0:-1)}}function PGe(t,n){t&1&&Oi(0)}function LGe(t,n){if(t&1&&le(0,PGe,1,0,"ng-container",0),t&2){let e=V(2);B("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",rn(2,a0e,e.checked))}}function FGe(t,n){if(t&1&&(Lt(0,OGe,1,1)(1,LGe,1,4,"ng-container"),K(2,"span"),Ce(3),Z()),t&2){let e=V();Ft(e.iconTemplate?1:0),L(2),Ge(e.cx("label")),Xe("data-pc-section","label"),L(),Di(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var NGe=` ${r0e} /* For PrimeNG (iconPos) */ .p-togglebutton-icon-right { order: 1; } .p-togglebutton.ng-invalid.ng-dirty { border-color: dt('togglebutton.invalid.border.color'); } `,BGe={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"},s0e=(()=>{class t extends to{name="togglebutton";theme=NGe;classes=BGe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var zGe={provide:Wa,useExisting:Br(()=>IY),multi:!0},IY=(()=>{class t extends Nh{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=Wn(void 0,{transform:lt});onChange=new yt;iconTemplate;contentTemplate;templates;checked=!1;_componentStyle=re(s0e);onBlur(){this.onModelTouched()}get hasOnLabel(){return this.onLabel&&this.onLabel.length>0}get hasOffLabel(){return this.onLabel&&this.onLabel.length>0}get active(){return this.checked===!0}_iconTemplate;_contentTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}writeControlValue(e,i){this.checked=e,i(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,DGe,4),Ht(r,kGe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.iconTemplate=a.first),Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.templates=a)}},hostVars:6,hostBindings:function(i,o){i&1&&Qe("keydown",function(a){return o.onKeyDown(a)})("click",function(a){return o.toggle(a)}),i&2&&(Xe("aria-labelledby",o.ariaLabelledBy)("aria-pressed",o.checked)("role","button")("tabindex",o.$disabled()?-1:0),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",wn],iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",lt],size:"size",allowEmpty:"allowEmpty",fluid:[1,"fluid"]},outputs:{onChange:"onChange"},features:[Pi([zGe,s0e]),i1([Yl]),Rt],decls:3,vars:7,consts:[[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class"]],template:function(i,o){i&1&&(K(0,"span"),le(1,MGe,1,0,"ng-container",0),Lt(2,FGe,4,5),Z()),i&2&&(Ge(o.cx("content")),L(),B("ngTemplateOutlet",o.contentTemplate||o._contentTemplate)("ngTemplateOutletContext",rn(5,a0e,o.checked)),L(),Ft(o.contentTemplate?-1:2))},dependencies:[po,Vo,kn],encapsulation:2,changeDetection:0})}return t})();var l0e=` .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 VGe=["item"],UGe=(t,n)=>({$implicit:t,index:n});function HGe(t,n){return this.getOptionLabel(n)}function jGe(t,n){t&1&&Oi(0)}function GGe(t,n){if(t&1&&le(0,jGe,1,0,"ng-container",3),t&2){let e=V(2),i=e.$implicit,o=e.$index,r=V();B("ngTemplateOutlet",r.itemTemplate||r._itemTemplate)("ngTemplateOutletContext",kr(2,UGe,i,o))}}function $Ge(t,n){t&1&&le(0,GGe,1,5,"ng-template",null,0,Hi)}function qGe(t,n){if(t&1){let e=Bt();K(0,"p-togglebutton",2),Qe("onChange",function(o){let r=Ee(e),a=r.$implicit,p=r.$index,f=V();return Ae(f.onOptionSelect(o,a,p))}),Lt(1,$Ge,2,0),Z()}if(t&2){let e=n.$implicit,i=V();B("autofocus",i.autofocus)("styleClass",i.styleClass)("ngModel",i.isSelected(e))("onLabel",i.getOptionLabel(e))("offLabel",i.getOptionLabel(e))("disabled",i.$disabled()||i.isOptionDisabled(e))("allowEmpty",i.getAllowEmpty())("size",i.size())("fluid",i.fluid()),L(),Ft(i.itemTemplate||i._itemTemplate?1:-1)}}var WGe=` ${l0e} /* For PrimeNG */ .p-selectbutton.ng-invalid.ng-dirty { outline: 1px solid dt('selectbutton.invalid.border.color'); outline-offset: 0; } `,KGe={root:({instance:t})=>["p-selectbutton p-component",{"p-invalid":t.invalid(),"p-selectbutton-fluid":t.fluid()}]},c0e=(()=>{class t extends to{name="selectbutton";theme=WGe;classes=KGe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var ZGe={provide:Wa,useExisting:Br(()=>d0e),multi:!0},d0e=(()=>{class t extends Nh{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=Wn();fluid=Wn(void 0,{transform:lt});onOptionClick=new yt;onChange=new yt;itemTemplate;_itemTemplate;get equalityKey(){return this.optionValue?null:this.dataKey}value;focusedIndex=0;_componentStyle=re(c0e);getAllowEmpty(){return this.multiple?this.allowEmpty||this.value?.length!==1:this.allowEmpty}getOptionLabel(e){return this.optionLabel?wa(e,this.optionLabel):e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?wa(e,this.optionValue):this.optionLabel||e.value===void 0?e:e.value}isOptionDisabled(e){return this.optionDisabled?wa(e,this.optionDisabled):e.disabled!==void 0?e.disabled:!1}onOptionSelect(e,i,o){if(this.$disabled()||this.isOptionDisabled(i))return;let r=this.isSelected(i);if(r&&this.unselectable)return;let a=this.getOptionValue(i),p;if(this.multiple)r?p=this.value.filter(f=>!vl(f,a,this.equalityKey)):p=this.value?[...this.value,a]:[a];else{if(r&&!this.allowEmpty)return;p=r?null:a}this.focusedIndex=o,this.value=p,this.writeModelValue(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.onOptionClick.emit({originalEvent:e,option:i,index:o})}changeTabIndexes(e,i){let o,r;for(let a=0;a<=this.el.nativeElement.children.length-1;a++)this.el.nativeElement.children[a].getAttribute("tabindex")==="0"&&(o={elem:this.el.nativeElement.children[a],index:a});i==="prev"?o.index===0?r=this.el.nativeElement.children.length-1:r=o.index-1:o.index===this.el.nativeElement.children.length-1?r=0:r=o.index+1,this.focusedIndex=r,this.el.nativeElement.children[r].focus()}onFocus(e,i){this.focusedIndex=i}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(i=>!vl(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,o=this.getOptionValue(e);if(this.multiple){if(this.value&&Array.isArray(this.value)){for(let r of this.value)if(vl(r,o,this.dataKey)){i=!0;break}}}else i=vl(this.getOptionValue(e),this.value,this.equalityKey);return i}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break}})}writeControlValue(e,i){this.value=e,i(this.value),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-selectButton"],["p-selectbutton"],["p-select-button"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,VGe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.templates=a)}},hostVars:6,hostBindings:function(i,o){i&2&&(Xe("role","group")("aria-labelledby",o.ariaLabelledBy)("data-pc-section","root")("data-pc-name","selectbutton"),Ge(o.cx("root")))},inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",unselectable:[2,"unselectable","unselectable",lt],tabindex:[2,"tabindex","tabindex",wn],multiple:[2,"multiple","multiple",lt],allowEmpty:[2,"allowEmpty","allowEmpty",lt],styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",dataKey:"dataKey",autofocus:[2,"autofocus","autofocus",lt],size:[1,"size"],fluid:[1,"fluid"]},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[Pi([ZGe,c0e]),Rt],decls:2,vars:0,consts:[["content",""],[3,"autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size","fluid"],[3,"onChange","autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size","fluid"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&ea(0,qGe,2,10,"p-togglebutton",1,HGe,!0),i&2&&ta(o.options)},dependencies:[IY,Au,il,Rh,po,Vo,kn],encapsulation:2,changeDetection:0})}return t})(),u0e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[d0e,kn,kn]})}return t})();var p0e=` .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 YGe=["header"],QGe=["headergrouped"],XGe=["body"],JGe=["loadingbody"],e$e=["caption"],t$e=["footer"],i$e=["footergrouped"],n$e=["summary"],o$e=["colgroup"],r$e=["expandedrow"],s$e=["groupheader"],a$e=["groupfooter"],l$e=["frozenexpandedrow"],c$e=["frozenheader"],d$e=["frozenbody"],u$e=["frozenfooter"],p$e=["frozencolgroup"],h$e=["emptymessage"],m$e=["paginatorleft"],f$e=["paginatorright"],g$e=["paginatordropdownitem"],_$e=["loadingicon"],y$e=["reorderindicatorupicon"],v$e=["reorderindicatordownicon"],b$e=["sorticon"],x$e=["checkboxicon"],C$e=["headercheckboxicon"],w$e=["paginatordropdownicon"],S$e=["paginatorfirstpagelinkicon"],I$e=["paginatorlastpagelinkicon"],T$e=["paginatorpreviouspagelinkicon"],E$e=["paginatornextpagelinkicon"],A$e=["resizeHelper"],D$e=["reorderIndicatorUp"],k$e=["reorderIndicatorDown"],M$e=["wrapper"],R$e=["table"],O$e=["thead"],P$e=["tfoot"],L$e=["scroller"],F$e=t=>({height:t}),h0e=(t,n)=>({$implicit:t,options:n}),N$e=t=>({columns:t}),R5=t=>({$implicit:t});function B$e(t,n){if(t&1&&Oe(0,"i"),t&2){let e=V(2);Ge(e.cn(e.cx("loadingIcon"),e.loadingIcon))}}function z$e(t,n){if(t&1&&(oi(),Oe(0,"svg",18)),t&2){let e=V(3);Ge(e.cx("loadingIcon")),B("spin",!0)}}function V$e(t,n){}function U$e(t,n){t&1&&le(0,V$e,0,0,"ng-template")}function H$e(t,n){if(t&1&&(K(0,"span"),le(1,U$e,1,0,null,19),Z()),t&2){let e=V(3);Ge(e.cx("loadingIcon")),L(),B("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function j$e(t,n){if(t&1&&(Mi(0),le(1,z$e,1,3,"svg",17)(2,H$e,2,3,"span",10),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),L(),B("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function G$e(t,n){if(t&1&&(K(0,"div"),le(1,B$e,1,2,"i",10)(2,j$e,3,2,"ng-container",14),Z()),t&2){let e=V();Ge(e.cx("mask")),L(),B("ngIf",e.loadingIcon),L(),B("ngIf",!e.loadingIcon)}}function $$e(t,n){t&1&&Oi(0)}function q$e(t,n){if(t&1&&(K(0,"div"),le(1,$$e,1,0,"ng-container",19),Z()),t&2){let e=V();Ge(e.cx("header")),L(),B("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function W$e(t,n){t&1&&Oi(0)}function K$e(t,n){if(t&1&&le(0,W$e,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function Z$e(t,n){t&1&&le(0,K$e,1,1,"ng-template",21)}function Y$e(t,n){t&1&&Oi(0)}function Q$e(t,n){if(t&1&&le(0,Y$e,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function X$e(t,n){t&1&&le(0,Q$e,1,1,"ng-template",22)}function J$e(t,n){t&1&&Oi(0)}function eqe(t,n){if(t&1&&le(0,J$e,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function tqe(t,n){t&1&&le(0,eqe,1,1,"ng-template",23)}function iqe(t,n){t&1&&Oi(0)}function nqe(t,n){if(t&1&&le(0,iqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function oqe(t,n){t&1&&le(0,nqe,1,1,"ng-template",24)}function rqe(t,n){t&1&&Oi(0)}function sqe(t,n){if(t&1&&le(0,rqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function aqe(t,n){t&1&&le(0,sqe,1,1,"ng-template",25)}function lqe(t,n){if(t&1){let e=Bt();K(0,"p-paginator",20),Qe("onPageChange",function(o){Ee(e);let r=V();return Ae(r.onPageChange(o))}),le(1,Z$e,1,0,null,14)(2,X$e,1,0,null,14)(3,tqe,1,0,null,14)(4,oqe,1,0,null,14)(5,aqe,1,0,null,14),Z()}if(t&2){let e=V();B("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),L(),B("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),L(),B("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),L(),B("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),L(),B("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),L(),B("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function cqe(t,n){t&1&&Oi(0)}function dqe(t,n){if(t&1&&le(0,cqe,1,0,"ng-container",27),t&2){let e=n.$implicit,i=n.options;V(2);let o=un(8);B("ngTemplateOutlet",o)("ngTemplateOutletContext",kr(2,h0e,e,i))}}function uqe(t,n){if(t&1){let e=Bt();K(0,"p-scroller",26,2),Qe("onLazyLoad",function(o){Ee(e);let r=V();return Ae(r.onLazyItemLoad(o))}),le(2,dqe,1,5,"ng-template",null,3,Hi),Z()}if(t&2){let e=V();Gr(rn(15,F$e,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),B("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 pqe(t,n){t&1&&Oi(0)}function hqe(t,n){if(t&1&&(Mi(0),le(1,pqe,1,0,"ng-container",27),Ri()),t&2){let e=V(),i=un(8);L(),B("ngTemplateOutlet",i)("ngTemplateOutletContext",kr(4,h0e,e.processedData,rn(2,N$e,e.columns)))}}function mqe(t,n){t&1&&Oi(0)}function fqe(t,n){t&1&&Oi(0)}function gqe(t,n){if(t&1&&Oe(0,"tbody",34),t&2){let e=V().options,i=V();Ge(i.cx("tbody")),B("value",i.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",i.frozenBodyTemplate||i._frozenBodyTemplate)("frozen",!0)}}function _qe(t,n){if(t&1&&Oe(0,"tbody",35),t&2){let e=V().options,i=V();Gr("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),Ge(i.cx("virtualScrollerSpacer"))}}function yqe(t,n){t&1&&Oi(0)}function vqe(t,n){if(t&1&&(K(0,"tfoot",36,6),le(2,yqe,1,0,"ng-container",27),Z()),t&2){let e=V().options,i=V();B("ngClass",i.cx("footer"))("ngStyle",i.sx("tfoot")),L(2),B("ngTemplateOutlet",i.footerGroupedTemplate||i.footerTemplate||i._footerTemplate||i._footerGroupedTemplate)("ngTemplateOutletContext",rn(4,R5,e.columns))}}function bqe(t,n){if(t&1&&(K(0,"table",28,4),le(2,mqe,1,0,"ng-container",27),K(3,"thead",29,5),le(5,fqe,1,0,"ng-container",27),Z(),le(6,gqe,1,7,"tbody",30),Oe(7,"tbody",31),le(8,_qe,1,4,"tbody",32)(9,vqe,3,6,"tfoot",33),Z()),t&2){let e=n.options,i=V();Gr(i.tableStyle),Ge(i.cn(i.cx("table"),i.tableStyleClass)),Xe("id",i.id+"-table"),L(2),B("ngTemplateOutlet",i.colGroupTemplate||i._colGroupTemplate)("ngTemplateOutletContext",rn(23,R5,e.columns)),L(),Ge(i.cx("thead")),B("ngStyle",i.sx("thead")),L(2),B("ngTemplateOutlet",i.headerGroupedTemplate||i.headerTemplate||i._headerTemplate)("ngTemplateOutletContext",rn(25,R5,e.columns)),L(),B("ngIf",i.frozenValue||i.frozenBodyTemplate||i._frozenBodyTemplate),L(),Gr(e.contentStyle),Ge(i.cx("tbody",e.contentStyleClass)),B("value",i.dataToRender(e.rows))("pTableBody",e.columns)("pTableBodyTemplate",i.bodyTemplate||i._bodyTemplate)("scrollerOptions",e),L(),B("ngIf",e.spacerStyle),L(),B("ngIf",i.footerGroupedTemplate||i.footerTemplate||i._footerTemplate||i._footerGroupedTemplate)}}function xqe(t,n){t&1&&Oi(0)}function Cqe(t,n){if(t&1&&le(0,xqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function wqe(t,n){t&1&&le(0,Cqe,1,1,"ng-template",21)}function Sqe(t,n){t&1&&Oi(0)}function Iqe(t,n){if(t&1&&le(0,Sqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function Tqe(t,n){t&1&&le(0,Iqe,1,1,"ng-template",22)}function Eqe(t,n){t&1&&Oi(0)}function Aqe(t,n){if(t&1&&le(0,Eqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function Dqe(t,n){t&1&&le(0,Aqe,1,1,"ng-template",23)}function kqe(t,n){t&1&&Oi(0)}function Mqe(t,n){if(t&1&&le(0,kqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function Rqe(t,n){t&1&&le(0,Mqe,1,1,"ng-template",24)}function Oqe(t,n){t&1&&Oi(0)}function Pqe(t,n){if(t&1&&le(0,Oqe,1,0,"ng-container",19),t&2){let e=V(3);B("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Lqe(t,n){t&1&&le(0,Pqe,1,1,"ng-template",25)}function Fqe(t,n){if(t&1){let e=Bt();K(0,"p-paginator",20),Qe("onPageChange",function(o){Ee(e);let r=V();return Ae(r.onPageChange(o))}),le(1,wqe,1,0,null,14)(2,Tqe,1,0,null,14)(3,Dqe,1,0,null,14)(4,Rqe,1,0,null,14)(5,Lqe,1,0,null,14),Z()}if(t&2){let e=V();B("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),L(),B("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),L(),B("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),L(),B("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),L(),B("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),L(),B("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function Nqe(t,n){t&1&&Oi(0)}function Bqe(t,n){if(t&1&&(K(0,"div",37),le(1,Nqe,1,0,"ng-container",19),Z()),t&2){let e=V();B("ngClass",e.cx("footer")),L(),B("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function zqe(t,n){if(t&1&&Oe(0,"div",37,7),t&2){let e=V();zr("display","none"),B("ngClass",e.cx("columnResizeIndicator"))}}function Vqe(t,n){t&1&&(oi(),Oe(0,"svg",39))}function Uqe(t,n){}function Hqe(t,n){t&1&&le(0,Uqe,0,0,"ng-template")}function jqe(t,n){if(t&1&&(K(0,"span",37,8),le(2,Vqe,1,0,"svg",38)(3,Hqe,1,0,null,19),Z()),t&2){let e=V();zr("display","none"),B("ngClass",e.cx("rowReorderIndicatorUp")),L(2),B("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),L(),B("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function Gqe(t,n){t&1&&(oi(),Oe(0,"svg",41))}function $qe(t,n){}function qqe(t,n){t&1&&le(0,$qe,0,0,"ng-template")}function Wqe(t,n){if(t&1&&(K(0,"span",37,9),le(2,Gqe,1,0,"svg",40)(3,qqe,1,0,null,19),Z()),t&2){let e=V();zr("display","none"),B("ngClass",e.cx("rowReorderIndicatorDown")),L(2),B("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),L(),B("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var Kqe=["pTableBody",""],TY=(t,n,e,i,o)=>({$implicit:t,rowIndex:n,columns:e,editing:i,frozen:o}),Zqe=(t,n,e,i,o,r,a)=>({$implicit:t,rowIndex:n,columns:e,editing:i,frozen:o,rowgroup:r,rowspan:a}),P5=(t,n,e,i,o,r)=>({$implicit:t,rowIndex:n,columns:e,expanded:i,editing:o,frozen:r}),m0e=(t,n,e,i)=>({$implicit:t,rowIndex:n,columns:e,frozen:i}),f0e=(t,n)=>({$implicit:t,frozen:n});function Yqe(t,n){t&1&&Oi(0)}function Qqe(t,n){if(t&1&&(Mi(0,3),le(1,Yqe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)("ngTemplateOutletContext",n1(2,TY,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function Xqe(t,n){t&1&&Oi(0)}function Jqe(t,n){if(t&1&&(Mi(0),le(1,Xqe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",i?r.template:r.dt.loadingBodyTemplate||r.dt._loadingBodyTemplate)("ngTemplateOutletContext",n1(2,TY,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function eWe(t,n){t&1&&Oi(0)}function tWe(t,n){if(t&1&&(Mi(0),le(1,eWe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",i?r.template:r.dt.loadingBodyTemplate||r.dt._loadingBodyTemplate)("ngTemplateOutletContext",RG(2,Zqe,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen,r.shouldRenderRowspan(r.value,i,o),r.calculateRowGroupSize(r.value,i,o)))}}function iWe(t,n){t&1&&Oi(0)}function nWe(t,n){if(t&1&&(Mi(0,3),le(1,iWe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)("ngTemplateOutletContext",n1(2,TY,i,r.getRowIndex(o),r.columns,r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function oWe(t,n){if(t&1&&le(0,Qqe,2,8,"ng-container",2)(1,Jqe,2,8,"ng-container",0)(2,tWe,2,10,"ng-container",0)(3,nWe,2,8,"ng-container",2),t&2){let e=n.$implicit,i=n.index,o=V(2);B("ngIf",(o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)&&!o.dt.virtualScroll&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(i))),L(),B("ngIf",o.dt.rowGroupMode!=="rowspan"),L(),B("ngIf",o.dt.rowGroupMode==="rowspan"),L(),B("ngIf",(o.dt.groupFooterTemplate||o.dt._groupFooterTemplate)&&!o.dt.virtualScroll&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupFooter(o.value,e,o.getRowIndex(i)))}}function rWe(t,n){if(t&1&&(Mi(0),le(1,oWe,4,4,"ng-template",1),Ri()),t&2){let e=V();L(),B("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function sWe(t,n){t&1&&Oi(0)}function aWe(t,n){if(t&1&&(Mi(0),le(1,sWe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.template)("ngTemplateOutletContext",TI(2,P5,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function lWe(t,n){t&1&&Oi(0)}function cWe(t,n){if(t&1&&(Mi(0,3),le(1,lWe,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.groupHeaderTemplate||r.dt._groupHeaderTemplate)("ngTemplateOutletContext",TI(2,P5,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function dWe(t,n){t&1&&Oi(0)}function uWe(t,n){t&1&&Oi(0)}function pWe(t,n){if(t&1&&(Mi(0,3),le(1,uWe,1,0,"ng-container",4),Ri()),t&2){let e=V(2),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)("ngTemplateOutletContext",TI(2,P5,i,r.getRowIndex(o),r.columns,r.dt.isRowExpanded(i),r.dt.editMode==="row"&&r.dt.isRowEditing(i),r.frozen))}}function hWe(t,n){if(t&1&&(Mi(0),le(1,dWe,1,0,"ng-container",4)(2,pWe,2,9,"ng-container",2),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.expandedRowTemplate||r.dt._expandedRowTemplate)("ngTemplateOutletContext",bB(3,m0e,i,r.getRowIndex(o),r.columns,r.frozen)),L(),B("ngIf",(r.dt.groupFooterTemplate||r.dt._groupFooterTemplate)&&r.dt.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,i,r.getRowIndex(o)))}}function mWe(t,n){if(t&1&&le(0,aWe,2,9,"ng-container",0)(1,cWe,2,9,"ng-container",2)(2,hWe,3,8,"ng-container",0),t&2){let e=n.$implicit,i=n.index,o=V(2);B("ngIf",!(o.dt.groupHeaderTemplate&&o.dt._groupHeaderTemplate)),L(),B("ngIf",(o.dt.groupHeaderTemplate||o.dt._groupHeaderTemplate)&&o.dt.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(i))),L(),B("ngIf",o.dt.isRowExpanded(e))}}function fWe(t,n){if(t&1&&(Mi(0),le(1,mWe,3,3,"ng-template",1),Ri()),t&2){let e=V();L(),B("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function gWe(t,n){t&1&&Oi(0)}function _We(t,n){t&1&&Oi(0)}function yWe(t,n){if(t&1&&(Mi(0),le(1,_We,1,0,"ng-container",4),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V(2);L(),B("ngTemplateOutlet",r.dt.frozenExpandedRowTemplate||r.dt._frozenExpandedRowTemplate)("ngTemplateOutletContext",bB(2,m0e,i,r.getRowIndex(o),r.columns,r.frozen))}}function vWe(t,n){if(t&1&&le(0,gWe,1,0,"ng-container",4)(1,yWe,2,7,"ng-container",0),t&2){let e=n.$implicit,i=n.index,o=V(2);B("ngTemplateOutlet",o.template)("ngTemplateOutletContext",TI(3,P5,e,o.getRowIndex(i),o.columns,o.dt.isRowExpanded(e),o.dt.editMode==="row"&&o.dt.isRowEditing(e),o.frozen)),L(),B("ngIf",o.dt.isRowExpanded(e))}}function bWe(t,n){if(t&1&&(Mi(0),le(1,vWe,2,10,"ng-template",1),Ri()),t&2){let e=V();L(),B("ngForOf",e.value)("ngForTrackBy",e.dt.rowTrackBy)}}function xWe(t,n){t&1&&Oi(0)}function CWe(t,n){if(t&1&&(Mi(0),le(1,xWe,1,0,"ng-container",4),Ri()),t&2){let e=V();L(),B("ngTemplateOutlet",e.dt.loadingBodyTemplate||e.dt._loadingBodyTemplate)("ngTemplateOutletContext",kr(2,f0e,e.columns,e.frozen))}}function wWe(t,n){t&1&&Oi(0)}function SWe(t,n){if(t&1&&(Mi(0),le(1,wWe,1,0,"ng-container",4),Ri()),t&2){let e=V();L(),B("ngTemplateOutlet",e.dt.emptyMessageTemplate||e.dt._emptyMessageTemplate)("ngTemplateOutletContext",kr(2,f0e,e.columns,e.frozen))}}function IWe(t,n){if(t&1&&(oi(),Oe(0,"svg",6)),t&2){let e=V(2);Ge(e.cx("sortableColumnIcon"))}}function TWe(t,n){if(t&1&&(oi(),Oe(0,"svg",7)),t&2){let e=V(2);Ge(e.cx("sortableColumnIcon"))}}function EWe(t,n){if(t&1&&(oi(),Oe(0,"svg",8)),t&2){let e=V(2);Ge(e.cx("sortableColumnIcon"))}}function AWe(t,n){if(t&1&&(Mi(0),le(1,IWe,1,2,"svg",3)(2,TWe,1,2,"svg",4)(3,EWe,1,2,"svg",5),Ri()),t&2){let e=V();L(),B("ngIf",e.sortOrder===0),L(),B("ngIf",e.sortOrder===1),L(),B("ngIf",e.sortOrder===-1)}}function DWe(t,n){}function kWe(t,n){t&1&&le(0,DWe,0,0,"ng-template")}function MWe(t,n){if(t&1&&(K(0,"span"),le(1,kWe,1,0,null,9),Z()),t&2){let e=V();Ge(e.cx("sortableColumnIcon")),L(),B("ngTemplateOutlet",e.dt.sortIconTemplate||e.dt._sortIconTemplate)("ngTemplateOutletContext",rn(4,R5,e.sortOrder))}}function RWe(t,n){if(t&1&&Oe(0,"p-badge",10),t&2){let e=V();Ge(e.cx("sortableColumnBadge")),B("value",e.getBadgeValue())}}var OWe=` ${p0e} /* 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%; } `,PWe={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"},LWe={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"}},P0=(()=>{class t extends to{name="datatable";theme=OWe;classes=PWe;inlineStyles=LWe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var O5=(()=>{class t{sortSource=new xi;selectionSource=new xi;contextMenuSource=new xi;valueSource=new xi;columnsSource=new xi;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();valueSource$=this.valueSource.asObservable();columnsSource$=this.columnsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})(),sd=(()=>{class t extends Ao{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 yt;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;rowSelectable;rowTrackBy=(e,i)=>i;lazy=!1;lazyLoadOnInit=!0;compareSelectionBy="deepEquals";csvSeparator=",";exportFilename="download";filters={};globalFilterFields;filterDelay=300;filterLocale;expandedRowKeys={};editingRowKeys={};rowExpandMode="multiple";scrollable;rowGroupMode;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=250;frozenWidth;contextMenu;resizableColumns;columnResizeMode="fit";reorderableColumns;loading;loadingIcon;showLoader=!0;rowHover;customSort;showInitialSortBadge=!0;exportFunction;exportHeader;stateKey;stateStorage="session";editMode="cell";groupRowsBy;size;showGridlines;stripedRows;groupRowsByOrder=1;responsiveLayout="scroll";breakpoint="960px";paginatorLocale;get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}totalRecords=0;get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}selectAllChange=new yt;selectionChange=new yt;onRowSelect=new yt;onRowUnselect=new yt;onPage=new yt;onSort=new yt;onFilter=new yt;onLazyLoad=new yt;onRowExpand=new yt;onRowCollapse=new yt;onContextMenuSelect=new yt;onColResize=new yt;onColReorder=new yt;onRowReorder=new yt;onEditInit=new yt;onEditComplete=new yt;onEditCancel=new yt;onHeaderCheckboxToggle=new yt;sortFunction=new yt;firstChange=new yt;rowsChange=new yt;onStateSave=new yt;onStateRestore=new yt;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=Ome();styleElement;responsiveStyleElement;overlayService=re(Fh);filterService=re(wT);tableService=re(O5);zone=re(on);_componentStyle=re(P0);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(),ns(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&&ns(this.platformId)&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0,this.sortMode=="single"&&(this.sortField||this.groupRowsBy)?this.sortSingle():this.sortMode=="multiple"&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this.isStateful()||(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue)),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&(this.restoreColumnOrder(),this.tableService.onColumnsChange(this._columns))),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get processedData(){return this.filteredValue||this.value||[]}_initialColWidths;dataToRender(e){let i=e||this.processedData;if(i&&this.paginator){let o=this.lazy?0:this.first;return i.slice(o,o+this.rows)}return i}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Zo.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Zo.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.onPage.emit({first:this.first,rows:this.rows}),this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),this.sortMode==="multiple"){let o=i.metaKey||i.ctrlKey,r=this.getSortMeta(e.field);r?o?r.order=r.order*-1:(this._multiSortMeta=[{field:e.field,order:r.order*-1}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!o||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,i=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField){this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],this.sortMultiple();return}if(e&&i){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:i}):(this.value.sort((r,a)=>{let p=Zo.resolveFieldData(r,e),f=Zo.resolveFieldData(a,e),x=null;return p==null&&f!=null?x=-1:p!=null&&f==null?x=1:p==null&&f==null?x=0:typeof p=="string"&&typeof f=="string"?x=p.localeCompare(f):x=pf?1:0,i*x}),this._value=[...this.value]),this.hasFilter()&&this._filter());let o={field:e,order:i};this.onSort.emit(o),this.tableService.onSort(o)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,i)=>this.multisortField(e,i,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,i,o,r){let a=Zo.resolveFieldData(e,o[r].field),p=Zo.resolveFieldData(i,o[r].field);return Zo.compare(a,p,this.filterLocale)===0?o.length-1>r?this.multisortField(e,i,o,r+1):0:this.compareValuesOnSort(a,p,o[r].order)}compareValuesOnSort(e,i,o){return Zo.sort(e,i,o,this.filterLocale,this.sortOrder)}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let i=0;ij!=P),this.selectionChange.emit(this.selection),I&&delete this.selectionKeys[I]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),I&&(this.selectionKeys={},this.selectionKeys[I]=1)):this.isMultipleSelectionMode()&&(D?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),I&&(this.selectionKeys[I]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:p})}else if(this.selectionMode==="single")f?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:p})):(this._selection=a,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:p}),I&&(this.selectionKeys={},this.selectionKeys[I]=1));else if(this.selectionMode==="multiple")if(f){let D=this.findIndexInSelection(a);this._selection=this.selection.filter((P,R)=>R!=D),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:p}),I&&delete this.selectionKeys[I]}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:p}),I&&(this.selectionKeys[I]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let i=e.rowData,o=e.rowIndex;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:i,index:e.rowIndex}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let r=this.isSelected(i),a=this.dataKey?String(Zo.resolveFieldData(i,this.dataKey)):null;if(!r){if(!this.isRowSelectable(i,o))return;this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i),a&&(this.selectionKeys={},this.selectionKeys[a]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),a&&(this.selectionKeys[a]=1))}this.tableService.onSelectionChange(),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e,data:i,index:e.rowIndex})}}}selectRange(e,i,o){let r,a;this.anchorRowIndex>i?(r=i,a=this.anchorRowIndex):this.anchorRowIndexa?(i=this.anchorRowIndex,o=this.rangeRowIndex):rP!=x);let I=this.dataKey?String(Zo.resolveFieldData(f,this.dataKey)):null;I&&delete this.selectionKeys[I],this.onRowUnselect.emit({originalEvent:e,data:f,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Zo.resolveFieldData(e,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length){for(let o=0;of!=a),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(i,e.rowIndex))return;this._selection=this.selection?[...this.selection,i]:[i],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:i,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox({originalEvent:e},i){if(this._selectAll!==null)this.selectAllChange.emit({originalEvent:e,checked:i});else{let o=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!o.some(p=>this.equals(a,p))):[];i&&(r=this.frozenValue?[...r,...this.frozenValue,...o]:[...r,...o],r=this.rowSelectable?r.filter((a,p)=>this.rowSelectable({data:a,index:p})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i}),this.isStateful()&&this.saveState()}}equals(e,i){return this.compareSelectionBy==="equals"?e===i:Zo.equals(e,i,this.dataKey)}filter(e,i,o){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:o},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredValue=null,this.paginator&&(this.totalRecords=this._totalRecords===0&&this.value?this.value.length:this._totalRecords);else{let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let i=0;ithis.cd.detectChanges()}}clear(){this._sortField=null,this._sortOrder=this.defaultSortOrder,this._multiSortMeta=null,this.tableService.onSort(null),this.clearFilterValues(),this.filteredValue=null,this.first=0,this.firstChange.emit(this.first),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0}clearFilterValues(){for(let[,e]of Object.entries(this.filters))if(Array.isArray(e))for(let i of e)i.value=null;else e&&(e.value=null)}reset(){this.clear()}getExportHeader(e){return e[this.exportHeader]||e.header||e.field}exportCSV(e){let i,o="",r=this.columns;e&&e.selectionOnly?i=this.selection||[]:e&&e.allValues?i=this.value||[]:(i=this.filteredValue||this.value,this.frozenValue&&(i=i?[...this.frozenValue,...i]:this.frozenValue));let a=r.filter(I=>I.exportable!==!1&&I.field);o+=a.map(I=>'"'+this.getExportHeader(I)+'"').join(this.csvSeparator);let p=i.map(I=>a.map(D=>{let P=Zo.resolveFieldData(I,D.field);return P!=null?this.exportFunction?P=this.exportFunction({data:P,field:D.field}):P=String(P).replace(/"/g,'""'):P="",'"'+P+'"'}).join(this.csvSeparator)).join(` `);p.length&&(o+=` `+p);let f=new Blob([new Uint8Array([239,187,191]),o],{type:"text/csv;charset=utf-8;"}),x=this.renderer.createElement("a");x.style.display="none",this.renderer.appendChild(this.document.body,x),x.download!==void 0?(x.setAttribute("href",URL.createObjectURL(f)),x.setAttribute("download",this.exportFilename+".csv"),x.click()):(o="data:text/csv;charset=utf-8,"+o,this.document.defaultView.open(encodeURI(o))),this.renderer.removeChild(this.document.body,x)}onLazyItemLoad(e){this.onLazyLoad.emit(gt(ve(ve({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,i,o,r){this.editingCell=e,this.editingCellData=i,this.editingCellField=o,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&Io.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()&&(Io.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}initRowEdit(e){let i=String(Zo.resolveFieldData(e,this.dataKey));this.editingRowKeys[i]=!0}saveRowEdit(e,i){if(Io.find(i,".ng-invalid.ng-dirty").length===0){let o=String(Zo.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[o]}}cancelRowEdit(e){let i=String(Zo.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}toggleRow(e,i){if(!this.dataKey&&!this.groupRowsBy)throw new Error("dataKey or groupRowsBy must be defined to use row expansion");let o=this.groupRowsBy?String(Zo.resolveFieldData(e,this.groupRowsBy)):String(Zo.resolveFieldData(e,this.dataKey));this.expandedRowKeys[o]!=null?(delete this.expandedRowKeys[o],this.onRowCollapse.emit({originalEvent:i,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[o]=!0,this.onRowExpand.emit({originalEvent:i,data:e})),i&&i.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Zo.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Zo.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Zo.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let i=Io.getOffset(this.el?.nativeElement).left;this.resizeColumnElement=e.target.closest("th"),this.columnResizing=!0,e.type=="touchstart"?this.lastResizerHelperX=e.changedTouches[0].clientX-i+this.el?.nativeElement.scrollLeft:this.lastResizerHelperX=e.pageX-i+this.el?.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let i=Io.getOffset(this.el?.nativeElement).left;Io.addClass(this.el?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.el?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",e.type=="touchmove"?this.resizeHelperViewChild.nativeElement.style.left=e.changedTouches[0].clientX-i+this.el?.nativeElement.scrollLeft+"px":this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=this.resizeHelperViewChild?.nativeElement.offsetLeft-this.lastResizerHelperX,o=this.resizeColumnElement.offsetWidth+e,r=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),a=r?parseFloat(r):15;if(o>=a){if(this.columnResizeMode==="fit"){let f=this.resizeColumnElement.nextElementSibling.offsetWidth-e;o>15&&f>15&&this.resizeTableCells(o,f)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let p=this.tableViewChild?.nativeElement.offsetWidth+e;this.setResizeTableWidth(p+"px"),this.resizeTableCells(o,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:e}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",Io.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],i=Io.findSingle(this.el.nativeElement,".p-datatable-thead");return Io.find(i,"tr > th").forEach(r=>e.push(Io.getOuterWidth(r))),e}onColumnDragStart(e,i){this.reorderIconWidth=Io.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=Io.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let o=Io.getOffset(this.el?.nativeElement),r=Io.getOffset(i);if(this.draggedColumn!=i){let a=Io.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),p=Io.indexWithinGroup(i,"preorderablecolumn"),f=r.left-o.left,x=o.top-r.top,I=r.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-o.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-o.top+i.offsetHeight+"px",e.pageX>I?(this.reorderIndicatorUpViewChild.nativeElement.style.left=f+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=f+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=f-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=f-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&e.preventDefault()}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let o=Io.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=Io.indexWithinGroup(i,"preorderablecolumn"),a=o!=r;if(a&&(r-o==1&&this.dropPosition===-1||o-r==1&&this.dropPosition===1)&&(a=!1),a&&ro&&this.dropPosition===-1&&(r=r-1),a&&(Zo.reorderArray(this.columns,o,r),this.onColReorder.emit({dragIndex:o,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.resizableColumns&&this.resizeColumnElement){let p=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();Zo.reorderArray(p,o+1,r+1),this.updateStyleElement(p,o,null,null)}this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}resizeTableCells(e,i){let o=Io.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,o,e,i)}updateStyleElement(e,i,o,r){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((p,f)=>{let x=f===i?o:r&&f===i+1?r:p,I=`width: ${x}px !important; max-width: ${x}px !important;`;a+=` #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${f+1}), #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${f+1}), #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${f+1}) { ${I} } `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,i){this.rowDragging=!0,this.draggedRowIndex=i,e.dataTransfer.setData("text","b")}onRowDragOver(e,i,o){if(this.rowDragging&&this.draggedRowIndex!==i){let r=Io.getOffset(o).top,a=e.pageY,p=r+Io.getOuterHeight(o)/2,f=o.previousElementSibling;athis.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Zo.reorderArray(this.value,this.draggedRowIndex,o),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:o})}this.onRowDragLeave(e,i),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){if(ns(this.platformId))switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}else throw new Error("Browser storage is not available in the server side.")}isStateful(){return this.stateKey!=null}saveState(){let e=this.getStorage(),i={};this.paginator&&(i.first=this.first,i.rows=this.rows),this.sortField&&(i.sortField=this.sortField,i.sortOrder=this.sortOrder),this.multiSortMeta&&(i.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(i.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(i),this.reorderableColumns&&this.saveColumnOrder(i),this.selection&&(i.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(i.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(i)),this.onStateSave.emit(i)}clearState(){let e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){let i=this.getStorage().getItem(this.stateKey),o=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(a,p){return typeof p=="string"&&o.test(p)?new Date(p):p};if(i){let a=JSON.parse(i,r);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 i=[],o=[],r=this.el?.nativeElement;r&&(o=Io.find(r,".p-datatable-thead > tr > th")),o.forEach(a=>i.push(Io.getOuterWidth(a))),e.columnWidths=i.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=Io.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"),Zo.isNotEmpty(e)){this.createStyleElement();let i="";e.forEach((o,r)=>{let a=`width: ${o}px !important; max-width: ${o}px !important`;i+=` #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}), #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}), #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) { ${a} } `}),this.styleElement.innerHTML=i}}}saveColumnOrder(e){if(this.columns){let i=[];this.columns.map(o=>{i.push(o.field||o.key)}),e.columnOrder=i}}restoreColumnOrder(){let i=this.getStorage().getItem(this.stateKey);if(i){let r=JSON.parse(i).columnOrder;if(r){let a=[];r.map(p=>{let f=this.findColumnByKey(p);f&&a.push(f)}),this.columnOrderStateRestored=!0,this.columns=a}}}findColumnByKey(e){if(this.columns){for(let i of this.columns)if(i.key===e||i.field===e)return i}else return null}createStyleElement(){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",Io.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),Io.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(ns(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",Io.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),Io.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyle(){this.responsiveStyleElement&&(this.renderer.removeChild(this.document.head,this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.destroyStyleElement(),this.destroyResponsiveStyle(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-table"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,YGe,4),Ht(r,QGe,4),Ht(r,XGe,4),Ht(r,JGe,4),Ht(r,e$e,4),Ht(r,t$e,4),Ht(r,i$e,4),Ht(r,n$e,4),Ht(r,o$e,4),Ht(r,r$e,4),Ht(r,s$e,4),Ht(r,a$e,4),Ht(r,l$e,4),Ht(r,c$e,4),Ht(r,d$e,4),Ht(r,u$e,4),Ht(r,p$e,4),Ht(r,h$e,4),Ht(r,m$e,4),Ht(r,f$e,4),Ht(r,g$e,4),Ht(r,_$e,4),Ht(r,y$e,4),Ht(r,v$e,4),Ht(r,b$e,4),Ht(r,x$e,4),Ht(r,C$e,4),Ht(r,w$e,4),Ht(r,S$e,4),Ht(r,I$e,4),Ht(r,T$e,4),Ht(r,E$e,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o._headerTemplate=a.first),Je(a=et())&&(o._headerGroupedTemplate=a.first),Je(a=et())&&(o._bodyTemplate=a.first),Je(a=et())&&(o._loadingBodyTemplate=a.first),Je(a=et())&&(o._captionTemplate=a.first),Je(a=et())&&(o._footerTemplate=a.first),Je(a=et())&&(o._footerGroupedTemplate=a.first),Je(a=et())&&(o._summaryTemplate=a.first),Je(a=et())&&(o._colGroupTemplate=a.first),Je(a=et())&&(o._expandedRowTemplate=a.first),Je(a=et())&&(o._groupHeaderTemplate=a.first),Je(a=et())&&(o._groupFooterTemplate=a.first),Je(a=et())&&(o._frozenExpandedRowTemplate=a.first),Je(a=et())&&(o._frozenHeaderTemplate=a.first),Je(a=et())&&(o._frozenBodyTemplate=a.first),Je(a=et())&&(o._frozenFooterTemplate=a.first),Je(a=et())&&(o._frozenColGroupTemplate=a.first),Je(a=et())&&(o._emptyMessageTemplate=a.first),Je(a=et())&&(o._paginatorLeftTemplate=a.first),Je(a=et())&&(o._paginatorRightTemplate=a.first),Je(a=et())&&(o._paginatorDropdownItemTemplate=a.first),Je(a=et())&&(o._loadingIconTemplate=a.first),Je(a=et())&&(o._reorderIndicatorUpIconTemplate=a.first),Je(a=et())&&(o._reorderIndicatorDownIconTemplate=a.first),Je(a=et())&&(o._sortIconTemplate=a.first),Je(a=et())&&(o._checkboxIconTemplate=a.first),Je(a=et())&&(o._headerCheckboxIconTemplate=a.first),Je(a=et())&&(o._paginatorDropdownIconTemplate=a.first),Je(a=et())&&(o._paginatorFirstPageLinkIconTemplate=a.first),Je(a=et())&&(o._paginatorLastPageLinkIconTemplate=a.first),Je(a=et())&&(o._paginatorPreviousPageLinkIconTemplate=a.first),Je(a=et())&&(o._paginatorNextPageLinkIconTemplate=a.first),Je(a=et())&&(o._templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(A$e,5),Qi(D$e,5),Qi(k$e,5),Qi(M$e,5),Qi(R$e,5),Qi(O$e,5),Qi(P$e,5),Qi(L$e,5)),i&2){let r;Je(r=et())&&(o.resizeHelperViewChild=r.first),Je(r=et())&&(o.reorderIndicatorUpViewChild=r.first),Je(r=et())&&(o.reorderIndicatorDownViewChild=r.first),Je(r=et())&&(o.wrapperViewChild=r.first),Je(r=et())&&(o.tableViewChild=r.first),Je(r=et())&&(o.tableHeaderViewChild=r.first),Je(r=et())&&(o.tableFooterViewChild=r.first),Je(r=et())&&(o.scroller=r.first)}},hostVars:2,hostBindings:function(i,o){i&2&&Ge(o.cn(o.cx("root"),o.styleClass))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",lt],pageLinks:[2,"pageLinks","pageLinks",wn],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",lt],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",lt],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",lt],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",lt],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",lt],showPageLinks:[2,"showPageLinks","showPageLinks",lt],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",wn],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",lt],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",lt],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",lt],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",lt],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",lt],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",wn],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",lt],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",lt],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",wn],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",wn],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",lt],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",lt],loading:[2,"loading","loading",lt],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",lt],rowHover:[2,"rowHover","rowHover",lt],customSort:[2,"customSort","customSort",lt],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",lt],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",lt],stripedRows:[2,"stripedRows","stripedRows",lt],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",wn],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:[Pi([O5,P0]),Rt,In],decls:14,vars:13,consts:[["wrapper",""],["buildInTable",""],["scroller",""],["content",""],["table",""],["thead",""],["tfoot",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],[3,"class",4,"ngIf"],[3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],[3,"ngStyle"],[3,"items","columns","style","scrollHeight","itemSize","step","delay","inline","lazy","loaderDisabled","showSpacer","showLoader","options","autoSize","onLazyLoad",4,"ngIf"],[4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ngClass","display",4,"ngIf"],["data-p-icon","spinner",3,"spin","class",4,"ngIf"],["data-p-icon","spinner",3,"spin"],[4,"ngTemplateOutlet"],[3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale"],["pTemplate","dropdownicon"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[3,"onLazyLoad","items","columns","scrollHeight","itemSize","step","delay","inline","lazy","loaderDisabled","showSpacer","showLoader","options","autoSize"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","table"],["role","rowgroup",3,"ngStyle"],["role","rowgroup",3,"class","value","frozenRows","pTableBody","pTableBodyTemplate","frozen",4,"ngIf"],["role","rowgroup",3,"value","pTableBody","pTableBodyTemplate","scrollerOptions"],["role","rowgroup",3,"style","class",4,"ngIf"],["role","rowgroup",3,"ngClass","ngStyle",4,"ngIf"],["role","rowgroup",3,"value","frozenRows","pTableBody","pTableBodyTemplate","frozen"],["role","rowgroup"],["role","rowgroup",3,"ngClass","ngStyle"],[3,"ngClass"],["data-p-icon","arrow-down",4,"ngIf"],["data-p-icon","arrow-down"],["data-p-icon","arrow-up",4,"ngIf"],["data-p-icon","arrow-up"]],template:function(i,o){i&1&&(le(0,G$e,3,4,"div",10)(1,q$e,2,3,"div",10)(2,lqe,6,24,"p-paginator",11),K(3,"div",12,0),le(5,uqe,4,17,"p-scroller",13)(6,hqe,2,7,"ng-container",14)(7,bqe,10,27,"ng-template",null,1,Hi),Z(),le(9,Fqe,6,24,"p-paginator",11)(10,Bqe,2,2,"div",15)(11,zqe,2,3,"div",16)(12,jqe,4,5,"span",16)(13,Wqe,4,5,"span",16)),i&2&&(B("ngIf",o.loading&&o.showLoader),L(),B("ngIf",o.captionTemplate||o._captionTemplate),L(),B("ngIf",o.paginator&&(o.paginatorPosition==="top"||o.paginatorPosition=="both")),L(),Ge(o.cx("tableContainer")),B("ngStyle",o.sx("tableContainer")),L(2),B("ngIf",o.virtualScroll),L(),B("ngIf",!o.virtualScroll),L(3),B("ngIf",o.paginator&&(o.paginatorPosition==="bottom"||o.paginatorPosition=="both")),L(),B("ngIf",o.summaryTemplate||o._summaryTemplate),L(),B("ngIf",o.resizableColumns),L(),B("ngIf",o.reorderableColumns),L(),B("ngIf",o.reorderableColumns))},dependencies:()=>[Rs,Zr,Vo,fs,SY,Uo,h0,DW,kW,p0,FWe],encapsulation:2})}return t})(),FWe=(()=>{class t{dt;tableService;cd;el;columns;template;get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&this.dt.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}frozen;frozenRows;scrollerOptions;subscription;_value;ngAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dt.scrollable&&this.dt.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}constructor(e,i,o,r){this.dt=e,this.tableService=i,this.cd=o,this.el=r,this.subscription=this.dt.tableService.valueSource$.subscribe(()=>{this.dt.virtualScroll&&this.cd.detectChanges()})}shouldRenderRowGroupHeader(e,i,o){let r=Zo.resolveFieldData(i,this.dt.groupRowsBy),a=e[o-this.dt._first-1];if(a){let p=Zo.resolveFieldData(a,this.dt.groupRowsBy);return r!==p}else return!0}shouldRenderRowGroupFooter(e,i,o){let r=Zo.resolveFieldData(i,this.dt.groupRowsBy),a=e[o-this.dt._first+1];if(a){let p=Zo.resolveFieldData(a,this.dt.groupRowsBy);return r!==p}else return!0}shouldRenderRowspan(e,i,o){let r=Zo.resolveFieldData(i,this.dt.groupRowsBy),a=e[o-1];if(a){let p=Zo.resolveFieldData(a,this.dt.groupRowsBy);return r!==p}else return!0}calculateRowGroupSize(e,i,o){let r=Zo.resolveFieldData(i,this.dt.groupRowsBy),a=r,p=0;for(;r===a;){p++;let f=e[++o];if(f)a=Zo.resolveFieldData(f,this.dt.groupRowsBy);else break}return p===1?null:p}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=Io.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=Io.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dt.rowGroupHeaderStyleObject.top=e+"px"}}getScrollerOption(e,i){return this.dt.virtualScroll?(i=i||this.scrollerOptions,i?i[e]:null):null}getRowIndex(e){let i=this.dt.paginator?this.dt.first+e:e,o=this.getScrollerOption("getItemOptions");return o?o(i).index:i}static \u0275fac=function(i){return new(i||t)(rt(sd),rt(O5),rt(Ho),rt(_n))};static \u0275cmp=Le({type:t,selectors:[["","pTableBody",""]],inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",lt],frozenRows:[2,"frozenRows","frozenRows",lt],scrollerOptions:"scrollerOptions"},standalone:!1,attrs:Kqe,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&le(0,rWe,2,2,"ng-container",0)(1,fWe,2,2,"ng-container",0)(2,bWe,2,2,"ng-container",0)(3,CWe,2,5,"ng-container",0)(4,SWe,2,5,"ng-container",0),i&2&&(B("ngIf",!o.dt.expandedRowTemplate&&!o.dt._expandedRowTemplate),L(),B("ngIf",(o.dt.expandedRowTemplate||o.dt._expandedRowTemplate)&&!(o.frozen&&(o.dt.frozenExpandedRowTemplate||o.dt._frozenExpandedRowTemplate))),L(),B("ngIf",(o.dt.frozenExpandedRowTemplate||o.dt._frozenExpandedRowTemplate)&&o.frozen),L(),B("ngIf",o.dt.loading),L(),B("ngIf",o.dt.isEmpty()&&!o.dt.loading))},dependencies:[Rl,Zr,Vo],encapsulation:2})}return t})();var GE=(()=>{class t extends Ao{dt;#e=re(_n);field;pSortableColumnDisabled;role=this.#e.nativeElement?.tagName!=="TH"?"columnheader":null;sorted;sortOrder;subscription;_componentStyle=re(P0);constructor(e){super(),this.dt=e,this.isEnabled()&&(this.subscription=this.dt.tableService.sortSource$.subscribe(i=>{this.updateSortState()}))}ngOnInit(){super.ngOnInit(),this.isEnabled()&&this.updateSortState()}updateSortState(){let e=!1,i=0;if(this.dt.sortMode==="single")e=this.dt.isSorted(this.field),i=this.dt.sortOrder;else if(this.dt.sortMode==="multiple"){let o=this.dt.getSortMeta(this.field);e=!!o,i=o?o.order:0}this.sorted=e,this.sortOrder=e?i===1?"ascending":"descending":"none"}onClick(e){this.isEnabled()&&!this.isFilterElement(e.target)&&(this.updateSortState(),this.dt.sort({originalEvent:e,field:this.field}),Io.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 Io.hasClass(e,"pi-filter-icon")||Io.hasClass(e,"p-column-filter-menu-button")}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(rt(sd))};static \u0275dir=Ki({type:t,selectors:[["","pSortableColumn",""]],hostVars:5,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onClick(a)})("keydown.space",function(a){return o.onEnterKey(a)})("keydown.enter",function(a){return o.onEnterKey(a)}),i&2&&(Bo("tabIndex",o.isEnabled()?"0":null)("role","columnheader"),Xe("aria-sort",o.sortOrder),Ge(o.cx("sortableColumn")))},inputs:{field:[0,"pSortableColumn","field"],pSortableColumnDisabled:[2,"pSortableColumnDisabled","pSortableColumnDisabled",lt]},standalone:!1,features:[Pi([P0]),Rt]})}return t})(),$E=(()=>{class t extends Ao{dt;cd;field;subscription;sortOrder;_componentStyle=re(P0);constructor(e,i){super(),this.dt=e,this.cd=i,this.subscription=this.dt.tableService.sortSource$.subscribe(o=>{this.updateSortState()})}ngOnInit(){super.ngOnInit(),this.updateSortState()}onClick(e){e.preventDefault()}updateSortState(){if(this.dt.sortMode==="single")this.sortOrder=this.dt.isSorted(this.field)?this.dt.sortOrder:0;else if(this.dt.sortMode==="multiple"){let e=this.dt.getSortMeta(this.field);this.sortOrder=e?e.order:0}this.cd.markForCheck()}getMultiSortMetaIndex(){let e=this.dt._multiSortMeta,i=-1;if(e&&this.dt.sortMode==="multiple"&&this.dt.showInitialSortBadge&&e.length>1)for(let o=0;o-1?e:e+1}isMultiSorted(){return this.dt.sortMode==="multiple"&&this.getMultiSortMetaIndex()>-1}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(rt(sd),rt(Ho))};static \u0275cmp=Le({type:t,selectors:[["p-sortIcon"]],inputs:{field:"field"},standalone:!1,features:[Pi([P0]),Rt],decls:3,vars:3,consts:[[4,"ngIf"],[3,"class",4,"ngIf"],["size","small",3,"class","value",4,"ngIf"],["data-p-icon","sort-alt",3,"class",4,"ngIf"],["data-p-icon","sort-amount-up-alt",3,"class",4,"ngIf"],["data-p-icon","sort-amount-down",3,"class",4,"ngIf"],["data-p-icon","sort-alt"],["data-p-icon","sort-amount-up-alt"],["data-p-icon","sort-amount-down"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["size","small",3,"value"]],template:function(i,o){i&1&&le(0,AWe,4,3,"ng-container",0)(1,MWe,2,6,"span",1)(2,RWe,1,3,"p-badge",2),i&2&&(B("ngIf",!(o.dt.sortIconTemplate||o.dt._sortIconTemplate)),L(),B("ngIf",o.dt.sortIconTemplate||o.dt._sortIconTemplate),L(),B("ngIf",o.isMultiSorted()))},dependencies:()=>[Zr,Vo,M1,MW,OW,RW],encapsulation:2,changeDetection:0})}return t})(),g0e=(()=>{class t extends Ao{dt;tableService;data;index;pSelectableRowDisabled;selected;subscription;_componentStyle=re(P0);constructor(e,i){super(),this.dt=e,this.tableService=i,this.isEnabled()&&(this.subscription=this.dt.tableService.selectionSource$.subscribe(()=>{this.selected=this.dt.isSelected(this.data)}))}setRowTabIndex(){if(this.dt.selectionMode==="single"||this.dt.selectionMode==="multiple")return this.dt.selection?this.dt.anchorRowIndex===this.index?0:-1:0}ngOnInit(){super.ngOnInit(),this.isEnabled()&&(this.selected=this.dt.isSelected(this.data))}onClick(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onTouchEnd(e){this.isEnabled()&&this.dt.handleRowTouchEnd(e)}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;default:if(e.code==="KeyA"&&(e.metaKey||e.ctrlKey)&&this.dt.selectionMode==="multiple"){let i=this.dt.dataToRender(this.dt.processedData);this.dt.selection=[...i],this.dt.selectRange(e,i.length-1,!0),e.preventDefault()}break}}onArrowDownKey(e){if(!this.isEnabled())return;let i=e.currentTarget,o=this.findNextSelectableRow(i);o&&o.focus(),e.preventDefault()}onArrowUpKey(e){if(!this.isEnabled())return;let i=e.currentTarget,o=this.findPrevSelectableRow(i);o&&o.focus(),e.preventDefault()}onEnterKey(e){this.isEnabled()&&this.dt.handleRowClick({originalEvent:e,rowData:this.data,rowIndex:this.index})}onEndKey(e){let i=this.findLastSelectableRow();if(i&&this.focusRowChange(this.el.nativeElement,i),e.ctrlKey&&e.shiftKey){let o=this.dt.dataToRender(this.dt.rows),r=Io.getAttribute(i,"index");this.dt.anchorRowIndex=r,this.dt.selection=o.slice(this.index,o.length),this.dt.selectRange(e,this.index)}e.preventDefault()}onHomeKey(e){let i=this.findFirstSelectableRow();if(i&&this.focusRowChange(this.el.nativeElement,i),e.ctrlKey&&e.shiftKey){let o=this.dt.dataToRender(this.dt.rows),r=Io.getAttribute(i,"index");this.dt.anchorRowIndex=this.dt.anchorRowIndex||r,this.dt.selection=o.slice(0,this.index+1),this.dt.selectRange(e,this.index)}e.preventDefault()}onSpaceKey(e){if(!(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLTextAreaElement)){if(this.onEnterKey(e),e.shiftKey&&this.dt.selection!==null){let o=this.dt.dataToRender(this.dt.rows),r;if(Zo.isNotEmpty(this.dt.selection)&&this.dt.selection.length>0){let a,p;a=Zo.findIndexInList(this.dt.selection[0],o),p=Zo.findIndexInList(this.dt.selection[this.dt.selection.length-1],o),r=this.index<=a?p:a}else r=Zo.findIndexInList(this.dt.selection,o);this.dt.anchorRowIndex=r,this.dt.selection=r!==this.index?o.slice(Math.min(r,this.index),Math.max(r,this.index)+1):[this.data],this.dt.selectRange(e,this.index)}e.preventDefault()}}focusRowChange(e,i){e.tabIndex="-1",i.tabIndex="0",Io.focus(i)}findLastSelectableRow(){let e=Io.find(this.dt.el.nativeElement,".p-datatable-selectable-row");return e?e[e.length-1]:null}findFirstSelectableRow(){return Io.findSingle(this.dt.el.nativeElement,".p-datatable-selectable-row")}findNextSelectableRow(e){let i=e.nextElementSibling;return i?Io.hasClass(i,"p-datatable-selectable-row")?i:this.findNextSelectableRow(i):null}findPrevSelectableRow(e){let i=e.previousElementSibling;return i?Io.hasClass(i,"p-datatable-selectable-row")?i:this.findPrevSelectableRow(i):null}isEnabled(){return this.pSelectableRowDisabled!==!0}ngOnDestroy(){super.ngOnDestroy(),this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(rt(sd),rt(O5))};static \u0275dir=Ki({type:t,selectors:[["","pSelectableRow",""]],hostVars:4,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onClick(a)})("touchend",function(a){return o.onTouchEnd(a)})("keydown",function(a){return o.onKeyDown(a)}),i&2&&(Bo("tabIndex",o.setRowTabIndex()),Xe("data-p-selectable-row",!0),Ge(o.cx("selectableRow")))},inputs:{data:[0,"pSelectableRow","data"],index:[0,"pSelectableRowIndex","index"],pSelectableRowDisabled:[2,"pSelectableRowDisabled","pSelectableRowDisabled",lt]},standalone:!1,features:[Pi([P0]),Rt]})}return t})();var gp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[P0],imports:[po,e0e,jz,nfe,Au,Hz,u0e,Bme,Q_e,Fz,W_e,FW,DW,kW,p0,MW,OW,RW,fme,K_e,gme,zz,vme,o0e,kn,FW]})}return t})();var NWe=()=>[25,50,100],BWe=()=>["name","labels","modifiedDate"];function zWe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"mat-form-field")(2,"input",8),Qe("input",function(o){Ee(e),V();let r=un(1);return Ae(r.filterGlobal(o.target.value,"contains"))}),Z()()()}}function VWe(t,n){t&1&&(K(0,"th",11),Ce(1,"Labels"),Z())}function UWe(t,n){if(t&1&&(K(0,"tr")(1,"th",9),Ce(2," Name "),Oe(3,"p-sortIcon",10),Z(),Lt(4,VWe,2,0,"th",11),K(5,"th"),_B(6,1),Z(),K(7,"th",12)(8,"span"),_B(9,2),Z(),Oe(10,"p-sortIcon",13),Z(),K(11,"th"),Ce(12,"Link"),Z()()),t&2){let e=V();L(4),Ft(e.options.showLabelsColumn?4:-1)}}function HWe(t,n){if(t&1&&(K(0,"td"),Ce(1),Z()),t&2){let e=V().$implicit;L(),qn(" ",e.labels&&e.labels.length>0?e.labels.join(", "):""," ")}}function jWe(t,n){if(t&1&&(K(0,"tr",14)(1,"td"),Ce(2),Z(),Lt(3,HWe,2,1,"td"),K(4,"td"),Ce(5),Z(),K(6,"td"),Ce(7),el(8,"date"),Z(),K(9,"td")(10,"a",15)(11,"mat-icon"),Ce(12,"open_in_new"),Z()()()()),t&2){let e=n.$implicit,i=V();B("pSelectableRow",e)("pSelectableRowDisabled",i.options.disableFnc(e)),L(2),Di(e.name),L(),Ft(i.options.showLabelsColumn?3:-1),L(2),qn(" ",i.localizedPermissionDisplayNames[e.highestPermission]," "),L(2),Di(Ec(8,8,e.modifiedDate,"short")),L(3),B("routerLink",i.options.detailLinkFnc(e))("disabled",i.options.disableFnc(e))}}function GWe(t,n){if(t&1&&(K(0,"tr")(1,"td",16),Ce(2),Z()()),t&2){let e=V();L(2),Di(e.options.emptyResourcesText)}}var EY=(()=>{class t{constructor(e,i){this.locale=e,this._router=i,this.options=jE,this.resources=[],this.localizedPermissionDisplayNames=BO[e]}onRowSelect(e){let i=this.options.detailLinkFnc(e);this._router.navigate(i)}static{this.\u0275fac=function(i){return new(i||t)(rt(tp),rt(aa))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-resources-list"]],inputs:{options:"options",resources:"resources"},decls:6,vars:9,consts:()=>{let e;e=$localize`Suchen`;let i;i=$localize`Berechtigung`;let o;return o=$localize`Letzte Änderung`,[["resourcesTable",""],i,o,["selectionMode","single","dataKey","id","styleClass","p-datatable-sm",3,"selectionChange","value","paginator","rows","sortField","sortOrder","rowsPerPageOptions","globalFilterFields"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["matInput","","placeholder",e,3,"input"],["pSortableColumn","name"],["field","name"],[2,"width","20%"],["pSortableColumn","modifiedDate"],["field","modifiedDate"],[3,"pSelectableRow","pSelectableRowDisabled"],["mat-icon-button","","color","accent",3,"routerLink","disabled"],["colspan","4"]]},template:function(i,o){if(i&1){let r=Bt();K(0,"p-table",3,0),Qe("selectionChange",function(p){return Ee(r),Ae(o.onRowSelect(p))}),le(2,zWe,3,0,"ng-template",4)(3,UWe,13,1,"ng-template",5)(4,jWe,13,11,"ng-template",6)(5,GWe,3,1,"ng-template",7),Z()}i&2&&B("value",o.resources)("paginator",!0)("rows",25)("sortField","modifiedDate")("sortOrder",-1)("rowsPerPageOptions",Is(7,NWe))("globalFilterFields",Is(8,BWe))},dependencies:[Wd,ghe,gp,sd,Uo,GE,g0e,$E,Jo,yd,Ls,la,jz,Av,Ev,vd,ba,r1],encapsulation:2})}}return t})();var _0e=` .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 $We={root:{position:"relative"}},qWe={root:({instance:t})=>["p-skeleton p-component",{"p-skeleton-circle":t.shape==="circle","p-skeleton-animation-none":t.animation==="none"}]},y0e=(()=>{class t extends to{name="skeleton";theme=_0e;classes=qWe;inlineStyles=$We;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var VO=(()=>{class t extends Ao{styleClass;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";_componentStyle=re(y0e);get containerStyle(){let e=this._componentStyle?.inlineStyles.root,i;return this.size?i=gt(ve({},e),{width:this.size,height:this.size,borderRadius:this.borderRadius}):i=gt(ve({},e),{width:this.width,height:this.height,borderRadius:this.borderRadius}),i}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-skeleton"]],hostVars:7,hostBindings:function(i,o){i&2&&(Xe("aria-hidden",!0)("data-pc-name","skeleton")("data-pc-section","root"),Gr(o.containerStyle),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},features:[Pi([y0e]),Rt],decls:0,vars:0,template:function(i,o){},dependencies:[po,kn],encapsulation:2,changeDetection:0})}return t})(),L5=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[VO,kn,kn]})}return t})();var UO=class{constructor(n,e,i){this._resourceConfigItem=n,this._environmentService=e,this._cache=i}getBaseUrl(){return this._environmentService.load(this._resourceConfigItem.API_TOKENS.BASE)}deleteCacheForKey(n){this._cache.deleteCacheForKey(this.key(n))}key(n){return`${this._resourceConfigItem.API_TOKENS.BASE}__${n}`}};var WWe=new ii("RESOURCE_REGISTRATION");var S0e=` .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 ZWe=["removeicon"],YWe=["*"];function QWe(t,n){if(t&1){let e=Bt();K(0,"img",4),Qe("error",function(o){Ee(e);let r=V();return Ae(r.imageError(o))}),Z()}if(t&2){let e=V();Ge(e.cx("image")),B("src",e.image,ja)("alt",e.alt)}}function XWe(t,n){if(t&1&&Oe(0,"span",6),t&2){let e=V(2);Ge(e.icon),B("ngClass",e.cx("icon")),Xe("data-pc-section","icon")}}function JWe(t,n){if(t&1&&le(0,XWe,1,4,"span",5),t&2){let e=V();B("ngIf",e.icon)}}function eKe(t,n){if(t&1&&(K(0,"div"),Ce(1),Z()),t&2){let e=V();Ge(e.cx("label")),Xe("data-pc-section","label"),L(),Di(e.label)}}function tKe(t,n){if(t&1){let e=Bt();K(0,"span",10),Qe("click",function(o){Ee(e);let r=V(3);return Ae(r.close(o))})("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onKeydown(o))}),Z()}if(t&2){let e=V(3);Ge(e.removeIcon),B("ngClass",e.cx("removeIcon")),Xe("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function iKe(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",11),Qe("click",function(o){Ee(e);let r=V(3);return Ae(r.close(o))})("keydown",function(o){Ee(e);let r=V(3);return Ae(r.onKeydown(o))}),Z()}if(t&2){let e=V(3);Ge(e.cx("removeIcon")),Xe("data-pc-section","removeicon")("aria-label",e.removeAriaLabel)}}function nKe(t,n){if(t&1&&(Mi(0),le(1,tKe,1,5,"span",8)(2,iKe,1,4,"svg",9),Ri()),t&2){let e=V(2);L(),B("ngIf",e.removeIcon),L(),B("ngIf",!e.removeIcon)}}function oKe(t,n){}function rKe(t,n){t&1&&le(0,oKe,0,0,"ng-template")}function sKe(t,n){if(t&1){let e=Bt();K(0,"span",12),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.close(o))})("keydown",function(o){Ee(e);let r=V(2);return Ae(r.onKeydown(o))}),le(1,rKe,1,0,null,13),Z()}if(t&2){let e=V(2);Ge(e.cx("removeIcon")),Xe("data-pc-section","removeicon")("aria-label",e.removeAriaLabel),L(),B("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function aKe(t,n){if(t&1&&(Mi(0),le(1,nKe,3,2,"ng-container",3)(2,sKe,2,5,"span",7),Ri()),t&2){let e=V();L(),B("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),L(),B("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var lKe={root:()=>["p-chip p-component"],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},I0e=(()=>{class t extends to{name="chip";theme=S0e;classes=lKe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var qE=(()=>{class t extends Ao{label;icon;image;alt;styleClass;removable=!1;removeIcon;onRemove=new yt;onImageError=new yt;visible=!0;get removeAriaLabel(){return this.config.getTranslation(Ts.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([i,o])=>this[`_${i}`]!==o&&(this[`_${i}`]=o))}_chipProps;_componentStyle=re(I0e);removeIconTemplate;templates;_removeIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"removeicon":this._removeIconTemplate=e.template;break;default:this._removeIconTemplate=e.template;break}})}ngOnChanges(e){if(super.ngOnChanges(e),e.chipProps&&e.chipProps.currentValue){let{currentValue:i}=e.chipProps;i.label!==void 0&&(this.label=i.label),i.icon!==void 0&&(this.icon=i.icon),i.image!==void 0&&(this.image=i.image),i.alt!==void 0&&(this.alt=i.alt),i.styleClass!==void 0&&(this.styleClass=i.styleClass),i.removable!==void 0&&(this.removable=i.removable),i.removeIcon!==void 0&&(this.removeIcon=i.removeIcon)}}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key==="Enter"||e.key==="Backspace")&&this.close(e)}imageError(e){this.onImageError.emit(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-chip"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,ZWe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.removeIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},hostVars:7,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","chip")("aria-label",o.label)("data-pc-section","root"),Ge(o.cn(o.cx("root"),o.styleClass)),zr("display",!o.visible&&"none"))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",styleClass:"styleClass",removable:[2,"removable","removable",lt],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[Pi([I0e]),Rt,In],ngContentSelectors:YWe,decls:6,vars:4,consts:[["iconTemplate",""],[3,"class","src","alt","error",4,"ngIf","ngIfElse"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"error","src","alt"],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["tabindex","0","role","button",3,"class","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"class","ngClass","click","keydown",4,"ngIf"],["data-p-icon","times-circle","tabindex","0","role","button",3,"class","click","keydown",4,"ngIf"],["tabindex","0","role","button",3,"click","keydown","ngClass"],["data-p-icon","times-circle","tabindex","0","role","button",3,"click","keydown"],["tabindex","0","role","button",3,"click","keydown"],[4,"ngTemplateOutlet"]],template:function(i,o){if(i&1&&(eo(),yn(0),le(1,QWe,1,4,"img",1)(2,JWe,1,1,"ng-template",null,0,Hi)(4,eKe,2,4,"div",2)(5,aKe,3,2,"ng-container",3)),i&2){let r=un(3);L(),B("ngIf",o.image)("ngIfElse",r),L(3),B("ngIf",o.label),L(),B("ngIf",o.removable)}},dependencies:[po,Rs,Zr,Vo,Uz,kn],encapsulation:2,changeDetection:0})}return t})();var T0e=` .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 HO=t=>({height:t}),E0e=t=>({$implicit:t}),cKe=(t,n)=>({checked:t,class:n});function dKe(t,n){}function uKe(t,n){t&1&&le(0,dKe,0,0,"ng-template")}function pKe(t,n){if(t&1&&le(0,uKe,1,0,null,4),t&2){let e=n.class,i=V(2);B("ngTemplateOutlet",i.itemCheckboxIconTemplate)("ngTemplateOutletContext",kr(2,cKe,i.selected,e))}}function hKe(t,n){t&1&&(Mi(0),le(1,pKe,1,5,"ng-template",null,0,Hi),Ri())}function mKe(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V();L(),Di(e.label??"empty")}}function fKe(t,n){t&1&&Oi(0)}var gKe=["item"],_Ke=["group"],yKe=["loader"],vKe=["header"],bKe=["filter"],xKe=["footer"],CKe=["emptyfilter"],wKe=["empty"],SKe=["selecteditems"],IKe=["loadingicon"],TKe=["filtericon"],EKe=["removetokenicon"],AKe=["chipicon"],DKe=["clearicon"],kKe=["dropdownicon"],MKe=["itemcheckboxicon"],RKe=["headercheckboxicon"],OKe=["overlay"],PKe=["filterInput"],LKe=["focusInput"],FKe=["items"],NKe=["scroller"],BKe=["lastHiddenFocusableEl"],zKe=["firstHiddenFocusableEl"],VKe=["headerCheckbox"],UKe=[[["p-header"]],[["p-footer"]]],HKe=["p-header","p-footer"],jKe=()=>({class:"p-multiselect-chip-icon"}),GKe=(t,n)=>({$implicit:t,removeChip:n}),A0e=t=>({options:t}),$Ke=(t,n,e)=>({checked:t,partialSelected:n,class:e}),D0e=(t,n)=>({$implicit:t,options:n}),qKe=()=>({});function WKe(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(2);L(),Di(e.label()||"empty")}}function KKe(t,n){if(t&1&&Ce(0),t&2){let e=V(3);qn(" ",e.getSelectedItemsLabel()," ")}}function ZKe(t,n){t&1&&Oi(0)}function YKe(t,n){if(t&1){let e=Bt();K(0,"span",26),Qe("click",function(o){Ee(e);let r=V(4).$implicit,a=V(4);return Ae(a.removeOption(r,o))}),le(1,ZKe,1,0,"ng-container",27),Z()}if(t&2){let e=V(8);Ge(e.cx("chipIcon")),Xe("data-pc-section","clearicon")("aria-hidden",!0),L(),B("ngTemplateOutlet",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)("ngTemplateOutletContext",Is(6,jKe))}}function QKe(t,n){if(t&1&&(Mi(0),le(1,YKe,2,7,"span",25),Ri()),t&2){let e=V(7);L(),B("ngIf",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)}}function XKe(t,n){if(t&1&&le(0,QKe,2,1,"ng-container",19),t&2){let e=V(6);B("ngIf",!e.$disabled()&&!e.readonly)}}function JKe(t,n){t&1&&(Mi(0),le(1,XKe,1,1,"ng-template",null,5,Hi),Ri())}function eZe(t,n){if(t&1){let e=Bt();K(0,"div",null,4)(2,"p-chip",24),Qe("onRemove",function(o){let r=Ee(e).$implicit,a=V(4);return Ae(a.removeOption(r,o))}),le(3,JKe,3,0,"ng-container",19),Z()()}if(t&2){let e=n.$implicit,i=V(4);Ge(i.cx("chipItem")),L(2),Ge(i.cx("pcChip")),B("label",i.getLabelByValue(e))("removable",!i.$disabled()&&!i.readonly)("removeIcon",i.chipIcon),L(),B("ngIf",i.chipIconTemplate||i._chipIconTemplate||i.removeTokenIconTemplate||i._removeTokenIconTemplate)}}function tZe(t,n){if(t&1&&le(0,eZe,4,8,"div",23),t&2){let e=V(3);B("ngForOf",e.chipSelectedItems())}}function iZe(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(3);L(),Di(e.placeholder()||"empty")}}function nZe(t,n){if(t&1&&(Mi(0),Lt(1,KKe,1,1)(2,tZe,1,1,"div",22),le(3,iZe,2,1,"ng-container",19),Ri()),t&2){let e=V(2);L(),Ft(e.chipSelectedItems()&&e.chipSelectedItems().length===e.maxSelectedLabels?1:2),L(2),B("ngIf",!e.modelValue()||e.modelValue().length===0)}}function oZe(t,n){if(t&1&&(Mi(0),le(1,WKe,2,1,"ng-container",19)(2,nZe,4,2,"ng-container",19),Ri()),t&2){let e=V();L(),B("ngIf",e.display==="comma"),L(),B("ngIf",e.display==="chip")}}function rZe(t,n){t&1&&Oi(0)}function sZe(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(2);L(),Di(e.placeholder()||"empty")}}function aZe(t,n){if(t&1&&(Mi(0),le(1,rZe,1,0,"ng-container",27)(2,sZe,2,1,"ng-container",19),Ri()),t&2){let e=V();L(),B("ngTemplateOutlet",e.selectedItemsTemplate||e._selectedItemsTemplate)("ngTemplateOutletContext",kr(3,GKe,e.selectedOptions,e.removeOption.bind(e))),L(),B("ngIf",!e.modelValue()||e.modelValue().length===0)}}function lZe(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",29),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.clear(o))}),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearicon")("aria-hidden",!0)}}function cZe(t,n){}function dZe(t,n){t&1&&le(0,cZe,0,0,"ng-template")}function uZe(t,n){if(t&1){let e=Bt();K(0,"span",26),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.clear(o))}),le(1,dZe,1,0,null,30),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("data-pc-section","clearicon")("aria-hidden",!0),L(),B("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function pZe(t,n){if(t&1&&(Mi(0),le(1,lZe,1,4,"svg",28)(2,uZe,2,5,"span",25),Ri()),t&2){let e=V();L(),B("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),L(),B("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function hZe(t,n){t&1&&Oi(0)}function mZe(t,n){if(t&1&&(Mi(0),le(1,hZe,1,0,"ng-container",30),Ri()),t&2){let e=V(2);L(),B("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function fZe(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(3);Ge(e.cn(e.cx("loadingIcon"),"pi-spin "+e.loadingIcon)),Xe("aria-hidden",!0)}}function gZe(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(3);Ge(e.cn(e.cx("loadingIcon"),"pi pi-spinner pi-spin")),Xe("aria-hidden",!0)}}function _Ze(t,n){if(t&1&&(Mi(0),le(1,fZe,1,3,"span",31)(2,gZe,1,3,"span",31),Ri()),t&2){let e=V(2);L(),B("ngIf",e.loadingIcon),L(),B("ngIf",!e.loadingIcon)}}function yZe(t,n){if(t&1&&(Mi(0),le(1,mZe,2,1,"ng-container",19)(2,_Ze,3,2,"ng-container",19),Ri()),t&2){let e=V();L(),B("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),L(),B("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function vZe(t,n){if(t&1&&Oe(0,"span",34),t&2){let e=V(3);Ge(e.cx("dropdownIcon")),B("ngClass",e.dropdownIcon),Xe("data-pc-section","triggericon")("aria-hidden",!0)}}function bZe(t,n){if(t&1&&(oi(),Oe(0,"svg",35)),t&2){let e=V(3);Ge(e.cx("dropdownIcon")),Xe("data-pc-section","triggericon")("aria-hidden",!0)}}function xZe(t,n){if(t&1&&(Mi(0),le(1,vZe,1,5,"span",32)(2,bZe,1,4,"svg",33),Ri()),t&2){let e=V(2);L(),B("ngIf",e.dropdownIcon),L(),B("ngIf",!e.dropdownIcon)}}function CZe(t,n){}function wZe(t,n){t&1&&le(0,CZe,0,0,"ng-template")}function SZe(t,n){if(t&1&&(K(0,"span"),le(1,wZe,1,0,null,30),Z()),t&2){let e=V(2);Ge(e.cx("dropdownIcon")),Xe("data-pc-section","triggericon")("aria-hidden",!0),L(),B("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function IZe(t,n){if(t&1&&le(0,xZe,3,2,"ng-container",19)(1,SZe,2,5,"span",31),t&2){let e=V();B("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),L(),B("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function TZe(t,n){t&1&&Oi(0)}function EZe(t,n){t&1&&Oi(0)}function AZe(t,n){if(t&1&&(Mi(0),le(1,EZe,1,0,"ng-container",27),Ri()),t&2){let e=V(3);L(),B("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",rn(2,A0e,e.filterOptions))}}function DZe(t,n){if(t&1&&(oi(),Oe(0,"svg",42)),t&2){let e=V().class;Ge(e),Xe("data-pc-section","icon")}}function kZe(t,n){}function MZe(t,n){t&1&&le(0,kZe,0,0,"ng-template")}function RZe(t,n){if(t&1&&le(0,DZe,1,3,"svg",41)(1,MZe,1,0,null,27),t&2){let e=n.class,i=V(5);B("ngIf",!i.headerCheckboxIconTemplate&&!i._headerCheckboxIconTemplate&&i.allSelected()),L(),B("ngTemplateOutlet",i.headerCheckboxIconTemplate||i._headerCheckboxIconTemplate)("ngTemplateOutletContext",Th(3,$Ke,i.allSelected(),i.partialSelected(),e))}}function OZe(t,n){if(t&1){let e=Bt();K(0,"p-checkbox",40,10),Qe("onChange",function(o){Ee(e);let r=V(4);return Ae(r.onToggleAll(o))}),le(2,RZe,2,7,"ng-template",null,11,Hi),Z()}if(t&2){let e=V(4);B("ngModel",e.allSelected()),ul("ariaLabel",e.toggleAllAriaLabel),B("binary",!0)("variant",e.$variant())("disabled",e.$disabled())}}function PZe(t,n){t&1&&(oi(),Oe(0,"svg",46))}function LZe(t,n){}function FZe(t,n){t&1&&le(0,LZe,0,0,"ng-template")}function NZe(t,n){if(t&1&&(K(0,"span",47),le(1,FZe,1,0,null,30),Z()),t&2){let e=V(5);L(),B("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function BZe(t,n){if(t&1){let e=Bt();K(0,"p-iconfield")(1,"input",43,12),Qe("input",function(o){Ee(e);let r=V(4);return Ae(r.onFilterInputChange(o))})("keydown",function(o){Ee(e);let r=V(4);return Ae(r.onFilterKeyDown(o))})("click",function(o){Ee(e);let r=V(4);return Ae(r.onInputClick(o))})("blur",function(o){Ee(e);let r=V(4);return Ae(r.onFilterBlur(o))}),Z(),K(3,"p-inputicon"),le(4,PZe,1,0,"svg",44)(5,NZe,2,1,"span",45),Z()()}if(t&2){let e=V(4);Ge(e.cx("pcFilterContainer")),L(),Ge(e.cx("pcFilter")),B("variant",e.$variant())("value",e._filterValue()||""),Xe("autocomplete",e.autocomplete)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("disabled",e.$disabled()?"":void 0)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),L(3),B("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),L(),B("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function zZe(t,n){if(t&1&&le(0,OZe,4,5,"p-checkbox",39)(1,BZe,6,14,"p-iconfield",31),t&2){let e=V(3);B("ngIf",e.showToggleAll&&!e.selectionLimit),L(),B("ngIf",e.filter)}}function VZe(t,n){if(t&1&&(K(0,"div"),yn(1),le(2,AZe,2,4,"ng-container",20)(3,zZe,2,2,"ng-template",null,9,Hi),Z()),t&2){let e=un(4),i=V(2);Ge(i.cx("header")),L(2),B("ngIf",i.filterTemplate||i._filterTemplate)("ngIfElse",e)}}function UZe(t,n){t&1&&Oi(0)}function HZe(t,n){if(t&1&&le(0,UZe,1,0,"ng-container",27),t&2){let e=n.$implicit,i=n.options;V(2);let o=un(9);B("ngTemplateOutlet",o)("ngTemplateOutletContext",kr(2,D0e,e,i))}}function jZe(t,n){t&1&&Oi(0)}function GZe(t,n){if(t&1&&le(0,jZe,1,0,"ng-container",27),t&2){let e=n.options,i=V(4);B("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",rn(2,A0e,e))}}function $Ze(t,n){t&1&&(Mi(0),le(1,GZe,1,4,"ng-template",null,14,Hi),Ri())}function qZe(t,n){if(t&1){let e=Bt();K(0,"p-scroller",48,13),Qe("onLazyLoad",function(o){Ee(e);let r=V(2);return Ae(r.onLazyLoad.emit(o))}),le(2,HZe,1,5,"ng-template",null,3,Hi)(4,$Ze,3,0,"ng-container",19),Z()}if(t&2){let e=V(2);Gr(rn(9,HO,e.scrollHeight)),B("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),L(4),B("ngIf",e.loaderTemplate||e._loaderTemplate)}}function WZe(t,n){t&1&&Oi(0)}function KZe(t,n){if(t&1&&(Mi(0),le(1,WZe,1,0,"ng-container",27),Ri()),t&2){V();let e=un(9),i=V();L(),B("ngTemplateOutlet",e)("ngTemplateOutletContext",kr(3,D0e,i.visibleOptions(),Is(2,qKe)))}}function ZZe(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(2).$implicit,i=V(3);L(),Di(i.getOptionGroupLabel(e.optionGroup))}}function YZe(t,n){t&1&&Oi(0)}function QZe(t,n){if(t&1&&(Mi(0),K(1,"li",52),le(2,ZZe,2,1,"span",19)(3,YZe,1,0,"ng-container",27),Z(),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),Ge(a.cx("optionGroup")),B("ngStyle",rn(7,HO,r.itemSize+"px")),Xe("id",a.id+"_"+a.getOptionIndex(o,r)),L(),B("ngIf",!a.groupTemplate),L(),B("ngTemplateOutlet",a.groupTemplate)("ngTemplateOutletContext",rn(9,E0e,i.optionGroup))}}function XZe(t,n){if(t&1){let e=Bt();Mi(0),K(1,"p-multiselect-item",53),Qe("onClick",function(o){Ee(e);let r=V().index,a=V().options,p=V(2);return Ae(p.onOptionSelect(o,!1,p.getOptionIndex(r,a)))})("onMouseEnter",function(o){Ee(e);let r=V().index,a=V().options,p=V(2);return Ae(p.onOptionMouseEnter(o,p.getOptionIndex(r,a)))}),Z(),Ri()}if(t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),B("id",a.id+"_"+a.getOptionIndex(o,r))("option",i)("selected",a.isSelected(i))("label",a.getOptionLabel(i))("disabled",a.isOptionDisabled(i))("template",a.itemTemplate||a._itemTemplate)("itemCheckboxIconTemplate",a.itemCheckboxIconTemplate||a._itemCheckboxIconTemplate)("itemSize",r.itemSize)("focused",a.focusedOptionIndex()===a.getOptionIndex(o,r)),ul("ariaPosInset",a.getAriaPosInset(a.getOptionIndex(o,r)))("ariaSetSize",a.ariaSetSize),B("variant",a.$variant())("highlightOnSelect",a.highlightOnSelect)}}function JZe(t,n){if(t&1&&le(0,QZe,4,11,"ng-container",19)(1,XZe,2,13,"ng-container",19),t&2){let e=n.$implicit,i=V(3);B("ngIf",i.isOptionGroup(e)),L(),B("ngIf",!i.isOptionGroup(e))}}function eYe(t,n){if(t&1&&Ce(0),t&2){let e=V(4);qn(" ",e.emptyFilterMessageLabel," ")}}function tYe(t,n){t&1&&Oi(0)}function iYe(t,n){if(t&1&&le(0,tYe,1,0,"ng-container",30),t&2){let e=V(4);B("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyFilterTemplate)}}function nYe(t,n){if(t&1&&(K(0,"li",52),Lt(1,eYe,1,1)(2,iYe,1,1,"ng-container"),Z()),t&2){let e=V().options,i=V(2);Ge(i.cx("emptyMessage")),B("ngStyle",rn(4,HO,e.itemSize+"px")),L(),Ft(!i.emptyFilterTemplate&&!i._emptyFilterTemplate&&!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function oYe(t,n){if(t&1&&Ce(0),t&2){let e=V(4);qn(" ",e.emptyMessageLabel," ")}}function rYe(t,n){t&1&&Oi(0)}function sYe(t,n){if(t&1&&le(0,rYe,1,0,"ng-container",30),t&2){let e=V(4);B("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function aYe(t,n){if(t&1&&(K(0,"li",52),Lt(1,oYe,1,1)(2,sYe,1,1,"ng-container"),Z()),t&2){let e=V().options,i=V(2);Ge(i.cx("emptyMessage")),B("ngStyle",rn(4,HO,e.itemSize+"px")),L(),Ft(!i.emptyTemplate&&!i._emptyTemplate?1:2)}}function lYe(t,n){if(t&1&&(K(0,"ul",49,15),le(2,JZe,2,2,"ng-template",50)(3,nYe,3,6,"li",51)(4,aYe,3,6,"li",51),Z()),t&2){let e=n.$implicit,i=n.options,o=V(2);Gr(i.contentStyle),Ge(o.cn(o.cx("list"),i.contentStyleClass)),Xe("aria-label",o.listLabel),L(2),B("ngForOf",e),L(),B("ngIf",o.hasFilter()&&o.isEmpty()),L(),B("ngIf",!o.hasFilter()&&o.isEmpty())}}function cYe(t,n){t&1&&Oi(0)}function dYe(t,n){if(t&1&&(K(0,"div"),yn(1,1),le(2,cYe,1,0,"ng-container",30),Z()),t&2){let e=V(2);L(2),B("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function uYe(t,n){if(t&1){let e=Bt();K(0,"div",36)(1,"span",37,6),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onFirstHiddenFocus(o))}),Z(),le(3,TZe,1,0,"ng-container",30)(4,VZe,5,4,"div",31),K(5,"div"),le(6,qZe,5,11,"p-scroller",38)(7,KZe,2,6,"ng-container",19)(8,lYe,5,8,"ng-template",null,7,Hi),Z(),le(10,dYe,3,1,"div",19),K(11,"span",37,8),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onLastHiddenFocus(o))}),Z()()}if(t&2){let e=V();Ge(e.cn(e.cx("overlay"),e.panelStyleClass)),B("ngStyle",e.panelStyle),Xe("id",e.id+"_list"),L(),Xe("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),L(2),B("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),L(),B("ngIf",e.showHeader),L(),Ge(e.cx("listContainer")),zr("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),L(),B("ngIf",e.virtualScroll),L(),B("ngIf",!e.virtualScroll),L(3),B("ngIf",e.footerFacet||e.footerTemplate||e._footerTemplate),L(),Xe("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var pYe=` ${T0e} /* 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'); } `,hYe={root:({instance:t})=>({position:t.$appendTo()==="self"?"relative":void 0})},mYe={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"},F5=(()=>{class t extends to{name="multiselect";theme=pYe;classes=mYe;inlineStyles=hYe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var fYe={provide:Wa,useExisting:Br(()=>N5),multi:!0},gYe=(()=>{class t extends Ao{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;variant;template;checkIconTemplate;itemCheckboxIconTemplate;highlightOnSelect;onClick=new yt;onMouseEnter=new yt;_componentStyle=re(F5);onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected}),e.stopPropagation(),e.preventDefault()}onOptionMouseEnter(e){this.onMouseEnter.emit({originalEvent:e,option:this.option,selected:this.selected})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-multiSelectItem"],["p-multiselect-item"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",lt],label:"label",disabled:[2,"disabled","disabled",lt],itemSize:[2,"itemSize","itemSize",wn],focused:[2,"focused","focused",lt],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",variant:"variant",template:"template",checkIconTemplate:"checkIconTemplate",itemCheckboxIconTemplate:"itemCheckboxIconTemplate",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",lt]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[Pi([F5]),Rt],decls:5,vars:25,consts:[["icon",""],["pRipple","","role","option",3,"click","mouseenter","ngStyle","id"],[3,"ngModel","binary","tabindex","variant","ariaLabel"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(K(0,"li",1),Qe("click",function(a){return o.onOptionClick(a)})("mouseenter",function(a){return o.onOptionMouseEnter(a)}),K(1,"p-checkbox",2),le(2,hKe,3,0,"ng-container",3),Z(),le(3,mKe,2,1,"span",3)(4,fKe,1,0,"ng-container",4),Z()),i&2&&(Ge(o.cx("option")),B("ngStyle",rn(21,HO,o.itemSize+"px"))("id",o.id),Xe("aria-label",o.label)("aria-setsize",o.ariaSetSize)("aria-posinset",o.ariaPosInset)("aria-selected",o.selected)("data-p-focused",o.focused)("data-p-highlight",o.selected)("data-p-disabled",o.disabled)("aria-checked",o.selected),L(),B("ngModel",o.selected)("binary",!0)("tabindex",-1)("variant",o.variant),ul("ariaLabel",o.label),L(),B("ngIf",o.itemCheckboxIconTemplate),L(),B("ngIf",!o.template),L(),B("ngTemplateOutlet",o.template)("ngTemplateOutletContext",rn(23,E0e,o.option)))},dependencies:[po,Zr,Vo,fs,zO,Au,il,Rh,Yl,kn],encapsulation:2})}return t})(),N5=(()=>{class t extends Nh{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){YM(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=Wn();variant=Wn();fluid=Wn(void 0,{transform:lt});appendTo=Wn(void 0);onChange=new yt;onFilter=new yt;onFocus=new yt;onBlur=new yt;onClick=new yt;onClear=new yt;onPanelShow=new yt;onPanelHide=new yt;onLazyLoad=new yt;onRemove=new yt;onSelectAllChange=new yt;overlayViewChild;filterInputChild;focusInputViewChild;itemsViewChild;scroller;lastHiddenFocusableElementOnOverlay;firstHiddenFocusableElementOnOverlay;headerCheckboxViewChild;footerFacet;headerFacet;_componentStyle=re(F5);searchValue;searchTimeout;_selectAll=null;_placeholder=Jn(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=Do(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());pcFluid=re(Lv,{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=Jn(null);_filterValue=Jn(null);_options=Jn(null);startRangeIndex=Jn(-1);focusedOptionIndex=Jn(-1);selectedOptions;clickInProgress=!1;get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ts.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ts.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&er(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(Ts.ARIA).listLabel}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}visibleOptions=Do(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),i=wW(e)&&Zo.isObject(e[0]);if(this._filterValue()){let o;if(i?o=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale):o=e.filter(r=>r.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase())),this.group){let r=this.options||[],a=[];return r.forEach(p=>{let x=this.getOptionGroupChildren(p).filter(I=>o.includes(I));x.length>0&&a.push(gt(ve({},p),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...x]}))}),this.flatOptions(a)}return o}return e});label=Do(()=>{let e,i=this.modelValue();if(i&&i.length&&this.displaySelectedLabel){if(er(this.maxSelectedLabels)&&i.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let o=0;oer(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,i,o){super(),this.zone=e,this.filterService=i,this.overlayService=o,Gl(()=>{let r=this.modelValue(),a=this.getAllVisibleAndNonVisibleOptions();a&&er(a)&&(this.optionValue&&this.optionLabel&&r?this.selectedOptions=a.filter(p=>r.includes(p[this.optionLabel])||r.includes(p[this.optionValue])):this.selectedOptions=r,this.cd.markForCheck())})}ngOnInit(){super.ngOnInit(),this.id=this.id||tr("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue()&&this.modelValue().length===this.selectionLimit}ngAfterViewInit(){super.ngAfterViewInit(),this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let a=this.getOptionGroupChildren(o);return a&&a.forEach(p=>i.push(p)),i},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()){this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());let e=this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);this.onOptionSelect({originalEvent:null,option:[e]})}}updateModel(e,i){this.value=e,this.onModelChange(e),this.writeValue(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,i=!1,o=-1){let{originalEvent:r,option:a}=e;if(this.$disabled()||this.isOptionDisabled(a))return;let p=this.isSelected(a),f=null;p?f=this.modelValue().filter(x=>!vl(x,this.getOptionValue(a),this.equalityKey())):f=[...this.modelValue()||[],this.getOptionValue(a)],this.updateModel(f,r),o!==-1&&this.focusedOptionIndex.set(o),i&&cs(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:f,itemValue:a})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,i=-1,o=-1){if(i===-1&&(i=this.findNearestSelectedOptionIndex(o,!0)),o===-1&&(o=this.findNearestSelectedOptionIndex(i)),i!==-1&&o!==-1){let r=Math.min(i,o),a=Math.max(i,o),p=this.visibleOptions().slice(r,a+1).filter(f=>this.isValidOption(f)).map(f=>this.getOptionValue(f));this.updateModel(p,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,i=!1){let o=-1;return this.hasSelectedOption()&&(i?(o=this.findPrevSelectedOptionIndex(e),o=o===-1?this.findNextSelectedOptionIndex(e):o):(o=this.findNextSelectedOptionIndex(e),o=o===-1?this.findPrevSelectedOptionIndex(e):o)),o>-1?o:e}findPrevSelectedOptionIndex(e){let i=this.hasSelectedOption()&&e>0?ap(this.visibleOptions().slice(0,e),o=>this.isValidSelectedOption(o)):-1;return i>-1?i:-1}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextSelectedOptionIndex(e){let i=this.hasSelectedOption()&&ethis.isValidSelectedOption(o)):-1;return i>-1?i+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return er(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?wa(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let i=this.getOptionValue(e);return(this.modelValue()||[]).some(o=>vl(o,i,this.equalityKey()))}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let o=(this.group?this.flatOptions(this._options()):this._options()||[]).find(r=>!this.isOptionGroup(r)&&vl(this.getOptionValue(r),e,this.equalityKey()));return o?this.getOptionLabel(o):null}getSelectedItemsLabel(){let e=/{(.*?)}/,i=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(Ts.SELECTION_MESSAGE);return e.test(i)?i.replace(i.match(e)[0],this.modelValue().length+""):i}getOptionLabel(e){return this.optionLabel?wa(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?wa(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?wa(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?wa(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.$disabled()){e.preventDefault();return}let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(e.code==="KeyA"&&i){let o=this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(o,e),e.preventDefault();break}!i&&CT(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onArrowLeftKey(e,i=!1){i&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),i),this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,i=!1){if(e.altKey&&!i)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let o=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,o,this.startRangeIndex()),this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,i=!1){let{currentTarget:o}=e;if(i){let r=o.value.length;o.setSelectionRange(0,e.shiftKey?r:0),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,a=this.findFirstOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,a,this.startRangeIndex()),this.changeFocusedOptionIndex(e,a),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,i=!1){let{currentTarget:o}=e;if(i){let r=o.value.length;o.setSelectionRange(e.shiftKey?0:r,r),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,a=this.findLastFocusedOptionIndex();e.shiftKey&&r&&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,i=!1){if(!i)if(this.overlayVisible&&this.hasFocusableElements())cs(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1){let o=this.visibleOptions()[this.focusedOptionIndex()];!this.isSelected(o)&&this.onOptionSelect({originalEvent:e,option:o})}this.overlayVisible&&this.hide(this.filter)}}onShiftKey(){this.startRangeIndex.set(this.focusedOptionIndex())}onContainerClick(e){if(!(this.$disabled()||this.loading||this.readonly||e.target.isSameNode(this.focusInputViewChild?.nativeElement))){if(!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target)){if(this.clickInProgress)return;this.clickInProgress=!0,setTimeout(()=>{this.clickInProgress=!1},150),this.overlayVisible?this.hide(!0):this.show(!0)}this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),this.onClick.emit(e),this.cd.detectChanges()}}onFirstHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?vT(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;cs(i)}onInputFocus(e){this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focused=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onFilterInputChange(e){let i=e.target.value;this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onLastHiddenFocus(e){let i=e.relatedTarget===this.focusInputViewChild?.nativeElement?bT(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;cs(i)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onToggleAll(e){if(!(this.$disabled()||this.readonly)){if(this.selectAll!=null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let i=this.getAllVisibleAndNonVisibleOptions().filter(f=>this.isSelected(f)&&(this.optionDisabled?wa(f,this.optionDisabled):f&&f.disabled!==void 0?f.disabled:!1)),o=this.allSelected()?this.visibleOptions().filter(f=>!this.isValidOption(f)&&this.isSelected(f)):this.visibleOptions().filter(f=>this.isSelected(f)||this.isValidOption(f)),a=[...this.filter&&!this.allSelected()?this.getAllVisibleAndNonVisibleOptions().filter(f=>this.isSelected(f)&&this.isValidOption(f)):[],...i,...o].map(f=>this.getOptionValue(f)),p=[...new Set(a)];this.updateModel(p,e),(!p.length||p.length===this.getAllVisibleAndNonVisibleOptions().length)&&this.onSelectAllChange.emit({originalEvent:e,checked:!!p.length})}this.partialSelected()&&(this.selectedOptions=null,this.cd.markForCheck()),this.onChange.emit({originalEvent:e,value:this.value}),Io.focus(this.headerCheckboxViewChild?.inputViewChild?.nativeElement),this.headerCheckboxFocus=!0,e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()}}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=$r(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}allSelected(){return this.selectAll!==null?this.selectAll:er(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!vl(r,e,this.equalityKey()));this.updateModel(o,i),this.onChange.emit({originalEvent:i,value:o,itemValue:e}),this.onRemove.emit({newValue:o,removed:e}),i&&i.stopPropagation()}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?ap(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?ap(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return ap(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,i){this.searchValue=(this.searchValue||"")+i;let o=-1,r=!1;return this.focusedOptionIndex()!==-1?(o=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(a=>this.isOptionMatched(a)),o=o===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(a=>this.isOptionMatched(a)):o+this.focusedOptionIndex()):o=this.visibleOptions().findIndex(a=>this.isOptionMatched(a)),o!==-1&&(r=!0),o===-1&&this.focusedOptionIndex()===-1&&(o=this.findFirstFocusedOptionIndex()),o!==-1&&this.changeFocusedOptionIndex(e,o),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}hasFocusableElements(){return c0(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}writeControlValue(e,i){this.value=e,i(e),this.cd.markForCheck()}static \u0275fac=function(i){return new(i||t)(rt(on),rt(wT),rt(Fh))};static \u0275cmp=Le({type:t,selectors:[["p-multiSelect"],["p-multiselect"],["p-multi-select"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,Hhe,5),Ht(r,Uhe,5),Ht(r,gKe,4),Ht(r,_Ke,4),Ht(r,yKe,4),Ht(r,vKe,4),Ht(r,bKe,4),Ht(r,xKe,4),Ht(r,CKe,4),Ht(r,wKe,4),Ht(r,SKe,4),Ht(r,IKe,4),Ht(r,TKe,4),Ht(r,EKe,4),Ht(r,AKe,4),Ht(r,DKe,4),Ht(r,kKe,4),Ht(r,MKe,4),Ht(r,RKe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.footerFacet=a.first),Je(a=et())&&(o.headerFacet=a.first),Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.groupTemplate=a.first),Je(a=et())&&(o.loaderTemplate=a.first),Je(a=et())&&(o.headerTemplate=a.first),Je(a=et())&&(o.filterTemplate=a.first),Je(a=et())&&(o.footerTemplate=a.first),Je(a=et())&&(o.emptyFilterTemplate=a.first),Je(a=et())&&(o.emptyTemplate=a.first),Je(a=et())&&(o.selectedItemsTemplate=a.first),Je(a=et())&&(o.loadingIconTemplate=a.first),Je(a=et())&&(o.filterIconTemplate=a.first),Je(a=et())&&(o.removeTokenIconTemplate=a.first),Je(a=et())&&(o.chipIconTemplate=a.first),Je(a=et())&&(o.clearIconTemplate=a.first),Je(a=et())&&(o.dropdownIconTemplate=a.first),Je(a=et())&&(o.itemCheckboxIconTemplate=a.first),Je(a=et())&&(o.headerCheckboxIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(OKe,5),Qi(PKe,5),Qi(LKe,5),Qi(FKe,5),Qi(NKe,5),Qi(BKe,5),Qi(zKe,5),Qi(VKe,5)),i&2){let r;Je(r=et())&&(o.overlayViewChild=r.first),Je(r=et())&&(o.filterInputChild=r.first),Je(r=et())&&(o.focusInputViewChild=r.first),Je(r=et())&&(o.itemsViewChild=r.first),Je(r=et())&&(o.scroller=r.first),Je(r=et())&&(o.lastHiddenFocusableElementOnOverlay=r.first),Je(r=et())&&(o.firstHiddenFocusableElementOnOverlay=r.first),Je(r=et())&&(o.headerCheckboxViewChild=r.first)}},hostVars:5,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onContainerClick(a)}),i&2&&(Xe("id",o.id),Gr(o.sx("root")),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{id:"id",ariaLabel:"ariaLabel",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",readonly:[2,"readonly","readonly",lt],group:[2,"group","group",lt],filter:[2,"filter","filter",lt],filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:[2,"overlayVisible","overlayVisible",lt],tabindex:[2,"tabindex","tabindex",wn],dataKey:"dataKey",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:[2,"selectionLimit","selectionLimit",wn],selectedItemsLabel:"selectedItemsLabel",showToggleAll:[2,"showToggleAll","showToggleAll",lt],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",lt],dropdownIcon:"dropdownIcon",chipIcon:"chipIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:[2,"showHeader","showHeader",lt],filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",lt],virtualScroll:[2,"virtualScroll","virtualScroll",lt],loading:[2,"loading","loading",lt],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",wn],loadingIcon:"loadingIcon",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:[2,"autofocusFilter","autofocusFilter",lt],display:"display",autocomplete:"autocomplete",showClear:[2,"showClear","showClear",lt],autofocus:[2,"autofocus","autofocus",lt],placeholder:"placeholder",options:"options",filterValue:"filterValue",selectAll:"selectAll",focusOnHover:[2,"focusOnHover","focusOnHover",lt],filterFields:"filterFields",selectOnFocus:[2,"selectOnFocus","selectOnFocus",lt],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",lt],highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",lt],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:[Pi([fYe,F5]),Rt],ngContentSelectors:HKe,decls:16,vars:40,consts:[["focusInput",""],["elseBlock",""],["overlay",""],["content",""],["token",""],["removeicon",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["headerCheckbox",""],["icon",""],["filterInput",""],["scroller",""],["loader",""],["items",""],[1,"p-hidden-accessible"],["role","combobox",3,"focus","blur","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"mouseleave","pTooltip","tooltipDisabled","tooltipPosition","positionStyle","tooltipStyleClass"],[4,"ngIf"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo"],[3,"class"],[3,"class",4,"ngFor","ngForOf"],[3,"onRemove","label","removable","removeIcon"],[3,"class","click",4,"ngIf"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times",3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[4,"ngTemplateOutlet"],[3,"class",4,"ngIf"],[3,"class","ngClass",4,"ngIf"],["data-p-icon","chevron-down",3,"class",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-down"],[3,"ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],[3,"ngModel","ariaLabel","binary","variant","disabled","onChange",4,"ngIf"],[3,"onChange","ngModel","ariaLabel","binary","variant","disabled"],["data-p-icon","check",3,"class",4,"ngIf"],["data-p-icon","check"],["pInputText","","type","text","role","searchbox",3,"input","keydown","click","blur","variant","value"],["data-p-icon","search",4,"ngIf"],["class","p-multiselect-filter-icon",4,"ngIf"],["data-p-icon","search"],[1,"p-multiselect-filter-icon"],[3,"onLazyLoad","items","itemSize","autoSize","tabindex","lazy","options"],["role","listbox","aria-multiselectable","true"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","selected","label","disabled","template","itemCheckboxIconTemplate","itemSize","focused","ariaPosInset","ariaSetSize","variant","highlightOnSelect"]],template:function(i,o){if(i&1){let r=Bt();eo(UKe),K(0,"div",16)(1,"input",17,0),Qe("focus",function(p){return Ee(r),Ae(o.onInputFocus(p))})("blur",function(p){return Ee(r),Ae(o.onInputBlur(p))})("keydown",function(p){return Ee(r),Ae(o.onKeyDown(p))}),Z()(),K(3,"div",18),Qe("mouseleave",function(){return Ee(r),Ae(o.labelContainerMouseLeave())}),K(4,"div"),le(5,oZe,3,2,"ng-container",19)(6,aZe,3,6,"ng-container",19),Z()(),le(7,pZe,3,2,"ng-container",19),K(8,"div"),le(9,yZe,3,2,"ng-container",20)(10,IZe,2,2,"ng-template",null,1,Hi),Z(),K(12,"p-overlay",21,2),wm("visibleChange",function(p){return Ee(r),ng(o.overlayVisible,p)||(o.overlayVisible=p),Ae(p)}),Qe("onAnimationStart",function(p){return Ee(r),Ae(o.onOverlayAnimationStart(p))})("onHide",function(){return Ee(r),Ae(o.hide())}),le(14,uYe,13,19,"ng-template",null,3,Hi),Z()}if(i&2){let r=un(11);Xe("data-p-hidden-accessible",!0),L(),B("pTooltip",o.tooltip)("tooltipPosition",o.tooltipPosition)("positionStyle",o.tooltipPositionStyle)("tooltipStyleClass",o.tooltipStyleClass)("pAutoFocus",o.autofocus),Xe("aria-disabled",o.$disabled())("id",o.inputId)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",o.overlayVisible??!1)("aria-controls",o.overlayVisible?o.id+"_list":null)("tabindex",o.$disabled()?-1:o.tabindex)("aria-activedescendant",o.focused?o.focusedOptionId:void 0)("value",o.modelValue())("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0),L(2),Ge(o.cx("labelContainer")),B("pTooltip",o.tooltip)("tooltipDisabled",o._disableTooltip)("tooltipPosition",o.tooltipPosition)("positionStyle",o.tooltipPositionStyle)("tooltipStyleClass",o.tooltipStyleClass),L(),Ge(o.cx("label")),L(),B("ngIf",!o.selectedItemsTemplate&&!o._selectedItemsTemplate),L(),B("ngIf",o.selectedItemsTemplate||o._selectedItemsTemplate),L(),B("ngIf",o.isVisibleClearIcon),L(),Ge(o.cx("dropdown")),L(),B("ngIf",o.loading)("ngIfElse",r),L(3),B("hostAttrSelector",o.attrSelector),Cm("visible",o.overlayVisible),B("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())}},dependencies:[po,Rs,Rl,Zr,Vo,fs,gYe,kT,kn,Bv,h0,cp,AT,Vz,xd,Nv,Gz,$z,yg,qE,zO,Au,il,Rh],encapsulation:2,changeDetection:0})}return t})(),k0e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[N5,kn,kn]})}return t})();var M0e={accept:"*"};var R0e=` .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 bYe=["container"],xYe=["icon"],CYe=["closeicon"],wYe=["*"],SYe=(t,n)=>({showTransitionParams:t,hideTransitionParams:n}),IYe=t=>({value:"visible()",params:t}),TYe=t=>({closeCallback:t});function EYe(t,n){t&1&&Oi(0)}function AYe(t,n){if(t&1&&le(0,EYe,1,0,"ng-container",7),t&2){let e=V(2);B("ngTemplateOutlet",e.iconTemplate||e.iconTemplate)}}function DYe(t,n){if(t&1&&Oe(0,"i"),t&2){let e=V(2);Ge(e.cn(e.cx("icon"),e.icon))}}function kYe(t,n){if(t&1&&Oe(0,"span",9),t&2){let e=V(3);B("ngClass",e.cx("text"))("innerHTML",e.text,xm)}}function MYe(t,n){if(t&1&&(K(0,"div"),le(1,kYe,1,2,"span",8),Z()),t&2){let e=V(2);L(),B("ngIf",!e.escape)}}function RYe(t,n){if(t&1&&(K(0,"span",5),Ce(1),Z()),t&2){let e=V(3);B("ngClass",e.cx("text")),L(),Di(e.text)}}function OYe(t,n){if(t&1&&le(0,RYe,2,2,"span",10),t&2){let e=V(2);B("ngIf",e.escape&&e.text)}}function PYe(t,n){t&1&&Oi(0)}function LYe(t,n){if(t&1&&le(0,PYe,1,0,"ng-container",11),t&2){let e=V(2);B("ngTemplateOutlet",e.containerTemplate||e.containerTemplate)("ngTemplateOutletContext",rn(2,TYe,e.close.bind(e)))}}function FYe(t,n){if(t&1&&(K(0,"span",5),yn(1),Z()),t&2){let e=V(2);B("ngClass",e.cx("text"))}}function NYe(t,n){if(t&1&&Oe(0,"i",5),t&2){let e=V(3);Ge(e.cn(e.cx("closeIcon"),e.closeIcon)),B("ngClass",e.closeIcon)}}function BYe(t,n){t&1&&Oi(0)}function zYe(t,n){if(t&1&&le(0,BYe,1,0,"ng-container",7),t&2){let e=V(3);B("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function VYe(t,n){if(t&1&&(oi(),Oe(0,"svg",15)),t&2){let e=V(3);Ge(e.cx("closeIcon"))}}function UYe(t,n){if(t&1){let e=Bt();K(0,"button",12),Qe("click",function(o){Ee(e);let r=V(2);return Ae(r.close(o))}),Lt(1,NYe,1,3,"i",13),Lt(2,zYe,1,1,"ng-container"),Lt(3,VYe,1,2,":svg:svg",14),Z()}if(t&2){let e=V(2);Ge(e.cx("closeButton")),Xe("aria-label",e.closeAriaLabel),L(),Ft(e.closeIcon?1:-1),L(),Ft(e.closeIconTemplate||e._closeIconTemplate?2:-1),L(),Ft(!e.closeIconTemplate&&!e._closeIconTemplate&&!e.closeIcon?3:-1)}}function HYe(t,n){if(t&1&&(K(0,"div",2)(1,"div"),Lt(2,AYe,1,1,"ng-container"),Lt(3,DYe,1,2,"i",3),le(4,MYe,2,1,"div",4)(5,OYe,1,1,"ng-template",null,0,Hi),Lt(7,LYe,1,4,"ng-container")(8,FYe,2,1,"span",5),Lt(9,UYe,4,6,"button",6),Z()()),t&2){let e=un(6),i=V();Ge(i.cn(i.cx("root"),i.styleClass)),B("@messageAnimation",rn(16,IYe,kr(13,SYe,i.showTransitionOptions,i.hideTransitionOptions))),Xe("aria-live","polite")("role","alert"),L(),Ge(i.cx("content")),L(),Ft(i.iconTemplate||i._iconTemplate?2:-1),L(),Ft(i.icon?3:-1),L(),B("ngIf",!i.escape)("ngIfElse",e),L(3),Ft(i.containerTemplate||i._containerTemplate?7:8),L(2),Ft(i.closable?9:-1)}}var jYe={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"},O0e=(()=>{class t extends to{name="message";theme=R0e;classes=jYe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var P0e=(()=>{class t extends Ao{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 yt;get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}visible=Jn(!0);_componentStyle=re(O0e);containerTemplate;iconTemplate;closeIconTemplate;templates;_containerTemplate;_iconTemplate;_closeIconTemplate;ngOnInit(){super.ngOnInit(),this.life&&setTimeout(()=>{this.visible.set(!1)},this.life)}ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"container":this._containerTemplate=e.template;break;case"icon":this._iconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break}})}close(e){this.visible.set(!1),this.onClose.emit({originalEvent:e})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-message"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,bYe,4),Ht(r,xYe,4),Ht(r,CYe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.containerTemplate=a.first),Je(a=et())&&(o.iconTemplate=a.first),Je(a=et())&&(o.closeIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},inputs:{severity:"severity",text:"text",escape:[2,"escape","escape",lt],style:"style",styleClass:"styleClass",closable:[2,"closable","closable",lt],icon:"icon",closeIcon:"closeIcon",life:"life",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",size:"size",variant:"variant"},outputs:{onClose:"onClose"},features:[Pi([O0e]),Rt],ngContentSelectors:wYe,decls:1,vars:1,consts:[["escapeOut",""],[1,"p-message","p-component",3,"class"],[1,"p-message","p-component"],[3,"class"],[4,"ngIf","ngIfElse"],[3,"ngClass"],["pRipple","","type","button",3,"class"],[4,"ngTemplateOutlet"],[3,"ngClass","innerHTML",4,"ngIf"],[3,"ngClass","innerHTML"],[3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pRipple","","type","button",3,"click"],[3,"class","ngClass"],["data-p-icon","times",3,"class"],["data-p-icon","times"]],template:function(i,o){i&1&&(eo(),Lt(0,HYe,10,18,"div",1)),i&2&&Ft(o.visible()?0:-1)},dependencies:[po,Rs,Zr,Vo,xd,Yl,kn],encapsulation:2,data:{animation:[Ph("messageAnimation",[Mc(":enter",[hl({opacity:0,transform:"translateY(-25%)"}),Kl("{{showTransitionParams}}")]),Mc(":leave",[Kl("{{hideTransitionParams}}",hl({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return t})();var GYe=["content"],$Ye=t=>({$implicit:t});function qYe(t,n){if(t&1&&(K(0,"div"),Ce(1),Z()),t&2){let e=V(2);zr("display",e.value!=null&&e.value!==0?"flex":"none"),Xe("data-pc-section","label"),L(),td("",e.value,"",e.unit)}}function WYe(t,n){t&1&&Oi(0)}function KYe(t,n){if(t&1&&(K(0,"div")(1,"div"),le(2,qYe,2,5,"div",2)(3,WYe,1,0,"ng-container",3),Z()()),t&2){let e=V();Ge(e.cn(e.cx("value"),e.valueStyleClass)),zr("width",e.value+"%")("display","flex")("background",e.color),Xe("data-pc-section","value"),L(),Ge(e.cx("label")),L(),B("ngIf",e.showValue&&!e.contentTemplate&&!e._contentTemplate),L(),B("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",rn(14,$Ye,e.value))}}function ZYe(t,n){if(t&1&&Oe(0,"div"),t&2){let e=V();Ge(e.cn(e.cx("value"),e.valueStyleClass)),zr("background",e.color),Xe("data-pc-section","value")}}var YYe={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"},L0e=(()=>{class t extends to{name="progressbar";theme=Lz;classes=YYe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var F0e=(()=>{class t extends Ao{value;showValue=!0;styleClass;valueStyleClass;unit="%";mode="determinate";color;contentTemplate;_componentStyle=re(L0e);templates;_contentTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template}})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-progressBar"],["p-progressbar"],["p-progress-bar"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,GYe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.templates=a)}},hostVars:8,hostBindings:function(i,o){i&2&&(Xe("aria-valuemin",0)("aria-valuenow",o.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root")("aria-level",o.value+o.unit),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{value:[2,"value","value",wn],showValue:[2,"showValue","showValue",lt],styleClass:"styleClass",valueStyleClass:"valueStyleClass",unit:"unit",mode:"mode",color:"color"},features:[Pi([L0e]),Rt],decls:2,vars:2,consts:[[3,"class","width","display","background",4,"ngIf"],[3,"class","background",4,"ngIf"],[3,"display",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&le(0,KYe,4,16,"div",0)(1,ZYe,1,5,"div",1),i&2&&(B("ngIf",o.mode==="determinate"),L(),B("ngIf",o.mode==="indeterminate"))},dependencies:[po,Zr,Vo,kn],encapsulation:2,changeDetection:0})}return t})();var N0e=` .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 QYe=["pFileContent",""],XYe=(t,n,e)=>({class:t,file:n,index:e}),JYe=(t,n)=>(n==null?null:n.name)+"-"+t;function eQe(t,n){}function tQe(t,n){t&1&&le(0,eQe,0,0,"ng-template")}function iQe(t,n){if(t&1&&le(0,tQe,1,0,null,6),t&2){let e=V().class,i=V(),o=i.$implicit,r=i.$index,a=V();B("ngTemplateOutlet",a.fileRemoveIconTemplate())("ngTemplateOutletContext",Th(2,XYe,e,o,r))}}function nQe(t,n){if(t&1&&(oi(),Oe(0,"svg",7)),t&2){let e=V().class;Ge(e),Xe("aria-hidden",!0)}}function oQe(t,n){if(t&1&&Lt(0,iQe,1,6)(1,nQe,1,3,":svg:svg",5),t&2){let e=V(2);Ft(e.fileRemoveIconTemplate()?0:1)}}function rQe(t,n){if(t&1){let e=Bt();K(0,"div"),Oe(1,"img",2),K(2,"div")(3,"div"),Ce(4),Z(),K(5,"span"),Ce(6),Z()(),Oe(7,"p-badge",3),K(8,"div")(9,"p-button",4),Qe("onClick",function(o){let r=Ee(e).$index,a=V();return Ae(a.onRemoveClick(o,r))}),le(10,oQe,2,1,"ng-template",null,0,Hi),Z()()()}if(t&2){let e=n.$implicit,i=V();Ge(i.cx("file")),L(),Ge(i.cx("fileThumbnail")),B("src",e.objectURL,ja)("width",i.previewWidth()),Xe("alt",e.name),L(),Ge(i.cx("fileInfo")),L(),Ge(i.cx("fileName")),L(),Di(e.name),L(),Ge(i.cx("fileSize")),L(),Di(i.formatSize(e.size)),L(),Ge(i.cx("pcFileBadge")),B("value",i.badgeValue())("severity",i.badgeSeverity()),L(),Ge(i.cx("fileActions")),L(),B("styleClass",i.cx("pcFileRemoveButton"))}}var sQe=["file"],aQe=["header"],B0e=["content"],lQe=["toolbar"],cQe=["chooseicon"],dQe=["filelabel"],uQe=["uploadicon"],pQe=["cancelicon"],hQe=["empty"],mQe=["advancedfileinput"],fQe=["basicfileinput"],gQe=(t,n,e,i,o)=>({$implicit:t,uploadedFiles:n,chooseCallback:e,clearCallback:i,uploadCallback:o}),_Qe=(t,n,e,i,o,r,a,p)=>({$implicit:t,uploadedFiles:n,chooseCallback:e,clearCallback:i,removeUploadedFileCallback:o,removeFileCallback:r,progress:a,messages:p}),yQe=t=>({$implicit:t});function vQe(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(4);Ge(e.chooseIcon),Xe("aria-label",!0)("data-pc-section","chooseicon")}}function bQe(t,n){t&1&&(oi(),Oe(0,"svg",15)),t&2&&Xe("aria-label",!0)("data-pc-section","chooseicon")}function xQe(t,n){}function CQe(t,n){t&1&&le(0,xQe,0,0,"ng-template")}function wQe(t,n){if(t&1&&(K(0,"span"),le(1,CQe,1,0,null,10),Z()),t&2){let e=V(5);Xe("aria-label",!0)("data-pc-section","chooseicon"),L(),B("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function SQe(t,n){if(t&1&&(Mi(0),le(1,bQe,1,2,"svg",14)(2,wQe,2,3,"span",8),Ri()),t&2){let e=V(4);L(),B("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),L(),B("ngIf",e.chooseIconTemplate||e._chooseIconTemplate)}}function IQe(t,n){if(t&1&&le(0,vQe,1,4,"span",5)(1,SQe,3,2,"ng-container",8),t&2){let e=V(3);B("ngIf",e.chooseIcon),L(),B("ngIf",!e.chooseIcon)}}function TQe(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(5);B("ngClass",e.uploadIcon),Xe("aria-hidden",!0)}}function EQe(t,n){t&1&&(oi(),Oe(0,"svg",20))}function AQe(t,n){}function DQe(t,n){t&1&&le(0,AQe,0,0,"ng-template")}function kQe(t,n){if(t&1&&(K(0,"span"),le(1,DQe,1,0,null,10),Z()),t&2){let e=V(6);Xe("aria-hidden",!0),L(),B("ngTemplateOutlet",e.uploadIconTemplate||e._uploadIconTemplate)}}function MQe(t,n){if(t&1&&(Mi(0),le(1,EQe,1,0,"svg",19)(2,kQe,2,2,"span",8),Ri()),t&2){let e=V(5);L(),B("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),L(),B("ngIf",e.uploadIconTemplate||e._uploadIconTemplate)}}function RQe(t,n){if(t&1&&le(0,TQe,1,2,"span",17)(1,MQe,3,2,"ng-container",8),t&2){let e=V(4);B("ngIf",e.uploadIcon),L(),B("ngIf",!e.uploadIcon)}}function OQe(t,n){if(t&1){let e=Bt();K(0,"p-button",16),Qe("onClick",function(){Ee(e);let o=V(3);return Ae(o.upload())}),le(1,RQe,2,2,"ng-template",null,2,Hi),Z()}if(t&2){let e=V(3);B("label",e.uploadButtonLabel)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.cn(e.cx("pcUploadButton"),e.uploadStyleClass))("buttonProps",e.uploadButtonProps)}}function PQe(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(5);B("ngClass",e.cancelIcon)}}function LQe(t,n){t&1&&(oi(),Oe(0,"svg",22)),t&2&&Xe("aria-hidden",!0)}function FQe(t,n){}function NQe(t,n){t&1&&le(0,FQe,0,0,"ng-template")}function BQe(t,n){if(t&1&&(K(0,"span"),le(1,NQe,1,0,null,10),Z()),t&2){let e=V(6);Xe("aria-hidden",!0),L(),B("ngTemplateOutlet",e.cancelIconTemplate||e._cancelIconTemplate)}}function zQe(t,n){if(t&1&&(Mi(0),le(1,LQe,1,1,"svg",21)(2,BQe,2,2,"span",8),Ri()),t&2){let e=V(5);L(),B("ngIf",!e.cancelIconTemplate&&!e._cancelIconTemplate),L(),B("ngIf",e.cancelIconTemplate||e._cancelIconTemplate)}}function VQe(t,n){if(t&1&&le(0,PQe,1,1,"span",17)(1,zQe,3,2,"ng-container",8),t&2){let e=V(4);B("ngIf",e.cancelIcon),L(),B("ngIf",!e.cancelIcon)}}function UQe(t,n){if(t&1){let e=Bt();K(0,"p-button",16),Qe("onClick",function(){Ee(e);let o=V(3);return Ae(o.clear())}),le(1,VQe,2,2,"ng-template",null,2,Hi),Z()}if(t&2){let e=V(3);B("label",e.cancelButtonLabel)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cn(e.cx("pcCancelButton"),e.cancelStyleClass))("buttonProps",e.cancelButtonProps)}}function HQe(t,n){if(t&1){let e=Bt();Mi(0),K(1,"p-button",12),Qe("focus",function(){Ee(e);let o=V(2);return Ae(o.onFocus())})("blur",function(){Ee(e);let o=V(2);return Ae(o.onBlur())})("onClick",function(){Ee(e);let o=V(2);return Ae(o.choose())})("keydown.enter",function(){Ee(e);let o=V(2);return Ae(o.choose())}),K(2,"input",7,0),Qe("change",function(o){Ee(e);let r=V(2);return Ae(r.onFileSelect(o))}),Z(),le(4,IQe,2,2,"ng-template",null,2,Hi),Z(),le(6,OQe,3,4,"p-button",13)(7,UQe,3,4,"p-button",13),Ri()}if(t&2){let e=V(2);L(),B("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled||e.isChooseDisabled())("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),Xe("data-pc-section","choosebutton"),L(),B("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Xe("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),L(4),B("ngIf",!e.auto&&e.showUploadButton),L(),B("ngIf",!e.auto&&e.showCancelButton)}}function jQe(t,n){t&1&&Oi(0)}function GQe(t,n){t&1&&Oi(0)}function $Qe(t,n){t&1&&Oi(0)}function qQe(t,n){if(t&1&&le(0,$Qe,1,0,"ng-container",9),t&2){let e=V(2);B("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",OG(2,_Qe,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 WQe(t,n){if(t&1&&Oe(0,"p-progressbar",26),t&2){let e=V(3);B("value",e.progress)("showValue",!1)}}function KQe(t,n){if(t&1&&Oe(0,"p-message",24),t&2){let e=n.$implicit;B("severity",e.severity)("text",e.text)}}function ZQe(t,n){}function YQe(t,n){if(t&1){let e=Bt();K(0,"div",29),Qe("onRemove",function(o){Ee(e);let r=V(4);return Ae(r.onRemoveClick(o))}),Z()}if(t&2){let e=V(4);B("files",e.files)("badgeValue",e.pendingLabel)("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function QQe(t,n){if(t&1&&(K(0,"div"),le(1,ZQe,0,0,"ng-template",27),Lt(2,YQe,1,4,"div",28),Z()),t&2){let e=V(3);Ge(e.cx("fileList")),L(),B("ngForOf",e.files)("ngForTemplate",e.fileTemplate||e._fileTemplate),L(),Ft(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function XQe(t,n){}function JQe(t,n){if(t&1){let e=Bt();K(0,"div",31),Qe("onRemove",function(o){Ee(e);let r=V(4);return Ae(r.onRemoveUploadedFileClick(o))}),Z()}if(t&2){let e=V(4);B("files",e.uploadedFiles)("badgeValue",e.completedLabel())("previewWidth",e.previewWidth)("fileRemoveIconTemplate",e.cancelIconTemplate||e._cancelIconTemplate)}}function eXe(t,n){if(t&1&&(K(0,"div"),le(1,XQe,0,0,"ng-template",27),Lt(2,JQe,1,4,"div",30),Z()),t&2){let e=V(3);Ge(e.cx("fileList")),L(),B("ngForOf",e.uploadedFiles)("ngForTemplate",e.fileTemplate||e._fileTemplate),L(),Ft(!e.fileTemplate&&!e._fileTemplate?2:-1)}}function tXe(t,n){if(t&1&&(le(0,WQe,1,2,"p-progressbar",23),ea(1,KQe,1,2,"p-message",24,ed),Lt(3,QQe,3,5,"div",25),Lt(4,eXe,3,5,"div",25)),t&2){let e=V(2);B("ngIf",e.hasFiles()),L(),ta(e.msgs),L(2),Ft(e.hasFiles()?3:-1),L(),Ft(e.hasUploadedFiles()?4:-1)}}function iXe(t,n){t&1&&Oi(0)}function nXe(t,n){if(t&1&&le(0,iXe,1,0,"ng-container",10),t&2){let e=V(2);B("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function oXe(t,n){if(t&1){let e=Bt();K(0,"div",6)(1,"input",7,0),Qe("change",function(o){Ee(e);let r=V();return Ae(r.onFileSelect(o))}),Z(),K(3,"div"),le(4,HQe,8,13,"ng-container",8)(5,jQe,1,0,"ng-container",9)(6,GQe,1,0,"ng-container",10),Z(),K(7,"div",11,1),Qe("dragenter",function(o){Ee(e);let r=V();return Ae(r.onDragEnter(o))})("dragleave",function(o){Ee(e);let r=V();return Ae(r.onDragLeave(o))})("drop",function(o){Ee(e);let r=V();return Ae(r.onDrop(o))}),Lt(9,qQe,1,11,"ng-container")(10,tXe,5,3),Lt(11,nXe,1,1,"ng-container"),Z()()}if(t&2){let e=V();Ge(e.cn(e.cx("root"),e.styleClass)),B("ngStyle",e.style),Xe("data-pc-name","fileupload")("data-pc-section","root"),L(),zr("display","none"),B("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),Xe("aria-label",e.browseFilesLabel)("title","")("data-pc-section","input"),L(2),Ge(e.cx("header")),L(),B("ngIf",!e.headerTemplate&&!e._headerTemplate),L(),B("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",n1(24,gQe,e.files,e.uploadedFiles,e.choose.bind(e),e.clear.bind(e),e.upload.bind(e))),L(),B("ngTemplateOutlet",e.toolbarTemplate||e._toolbarTemplate),L(),Ge(e.cx("content")),Xe("data-pc-section","content"),L(2),Ft(e.contentTemplate||e._contentTemplate?9:10),L(2),Ft((e.emptyTemplate||e._emptyTemplate)&&!e.hasFiles()&&!e.hasUploadedFiles()?11:-1)}}function rXe(t,n){if(t&1&&Oe(0,"p-message",24),t&2){let e=n.$implicit;B("severity",e.severity)("text",e.text)}}function sXe(t,n){if(t&1&&Oe(0,"span",35),t&2){let e=V(4);B("ngClass",e.uploadIcon)}}function aXe(t,n){t&1&&(oi(),Oe(0,"svg",20)),t&2&&Ge("p-button-icon p-button-icon-left")}function lXe(t,n){}function cXe(t,n){t&1&&le(0,lXe,0,0,"ng-template")}function dXe(t,n){if(t&1&&(K(0,"span",38),le(1,cXe,1,0,null,10),Z()),t&2){let e=V(5);L(),B("ngTemplateOutlet",e._uploadIconTemplate||e.uploadIconTemplate)}}function uXe(t,n){if(t&1&&(Mi(0),le(1,aXe,1,2,"svg",36)(2,dXe,2,1,"span",37),Ri()),t&2){let e=V(4);L(),B("ngIf",!e.uploadIconTemplate&&!e._uploadIconTemplate),L(),B("ngIf",e._uploadIconTemplate||e.uploadIconTemplate)}}function pXe(t,n){if(t&1&&le(0,sXe,1,1,"span",34)(1,uXe,3,2,"ng-container",8),t&2){let e=V(3);B("ngIf",e.uploadIcon),L(),B("ngIf",!e.uploadIcon)}}function hXe(t,n){if(t&1&&Oe(0,"span",40),t&2){let e=V(4);B("ngClass",e.chooseIcon)}}function mXe(t,n){t&1&&(oi(),Oe(0,"svg",15)),t&2&&Xe("data-pc-section","uploadicon")}function fXe(t,n){}function gXe(t,n){t&1&&le(0,fXe,0,0,"ng-template")}function _Xe(t,n){if(t&1&&(Mi(0),le(1,mXe,1,1,"svg",14)(2,gXe,1,0,null,10),Ri()),t&2){let e=V(4);L(),B("ngIf",!e.chooseIconTemplate&&!e._chooseIconTemplate),L(),B("ngTemplateOutlet",e.chooseIconTemplate||e._chooseIconTemplate)}}function yXe(t,n){if(t&1&&le(0,hXe,1,1,"span",39)(1,_Xe,3,2,"ng-container",8),t&2){let e=V(3);B("ngIf",e.chooseIcon),L(),B("ngIf",!e.chooseIcon)}}function vXe(t,n){if(t&1&&Lt(0,pXe,2,2)(1,yXe,2,2),t&2){let e=V(2);Ft(e.hasFiles()&&!e.auto?0:1)}}function bXe(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(3);L(),qn(" ",e.basicFileChosenLabel()," ")}}function xXe(t,n){t&1&&Oi(0)}function CXe(t,n){if(t&1&&le(0,xXe,1,0,"ng-container",9),t&2){let e=V(3);B("ngTemplateOutlet",e.fileLabelTemplate||e._fileLabelTemplate)("ngTemplateOutletContext",rn(2,yQe,e.files))}}function wXe(t,n){if(t&1&&Lt(0,bXe,2,1,"span")(1,CXe,1,4,"ng-container"),t&2){let e=V(2);Ft(!e.fileLabelTemplate&&!e._fileLabelTemplate?0:1)}}function SXe(t,n){if(t&1){let e=Bt();K(0,"div"),ea(1,rXe,1,2,"p-message",24,ed),K(3,"div")(4,"p-button",32),Qe("onClick",function(){Ee(e);let o=V();return Ae(o.onBasicUploaderClick())})("keydown",function(o){Ee(e);let r=V();return Ae(r.onBasicKeydown(o))}),le(5,vXe,2,1,"ng-template",null,2,Hi),K(7,"input",33,3),Qe("change",function(o){Ee(e);let r=V();return Ae(r.onFileSelect(o))})("focus",function(){Ee(e);let o=V();return Ae(o.onFocus())})("blur",function(){Ee(e);let o=V();return Ae(o.onBlur())}),Z()(),Lt(9,wXe,2,1),Z()()}if(t&2){let e=V();Ge(e.cn(e.cx("root"),e.styleClass)),Xe("data-pc-name","fileupload"),L(),ta(e.msgs),L(2),Ge(e.cx("basicContent")),L(),Gr(e.style),B("styleClass",e.cn(e.cx("pcChooseButton"),e.chooseStyleClass))("disabled",e.disabled)("label",e.chooseButtonLabel)("buttonProps",e.chooseButtonProps),L(3),B("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled),Xe("aria-label",e.browseFilesLabel)("data-pc-section","input"),L(2),Ft(e.auto?-1:9)}}var IXe={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"},B5=(()=>{class t extends to{name="fileupload";theme=N0e;classes=IXe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var TXe=(()=>{class t extends Ao{_componentStyle=re(B5);onRemove=kle();files=Wn();badgeSeverity=Wn("warn");badgeValue=Wn();previewWidth=Wn(50);fileRemoveIconTemplate=Wn();onRemoveClick(e,i){this.onRemove.emit({event:e,index:i})}formatSize(e){let r=this.config.getTranslation(Ts.FILE_SIZE_TYPES);if(e===0)return`0 ${r[0]}`;let a=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,a)).toFixed(3)} ${r[a]}`}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["","pFileContent",""]],inputs:{files:[1,"files"],badgeSeverity:[1,"badgeSeverity"],badgeValue:[1,"badgeValue"],previewWidth:[1,"previewWidth"],fileRemoveIconTemplate:[1,"fileRemoveIconTemplate"]},outputs:{onRemove:"onRemove"},features:[Pi([B5]),Rt],attrs:QYe,decls:2,vars:0,consts:[["icon",""],[3,"class"],["role","presentation",3,"src","width"],[3,"value","severity"],["text","","rounded","","severity","danger",3,"onClick","styleClass"],["data-p-icon","times",3,"class"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times"]],template:function(i,o){i&1&&ea(0,rQe,12,22,"div",1,JYe),i&2&&ta(o.files())},dependencies:[po,Vo,M1,jm,xd],encapsulation:2,changeDetection:0})}return t})(),z0e=(()=>{class t extends Ao{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 yt;onSend=new yt;onUpload=new yt;onError=new yt;onClear=new yt;onRemove=new yt;onSelect=new yt;onProgress=new yt;uploadHandler=new yt;onImageError=new yt;onRemoveUploadedFile=new yt;fileTemplate;headerTemplate;contentTemplate;toolbarTemplate;chooseIconTemplate;fileLabelTemplate;uploadIconTemplate;cancelIconTemplate;emptyTemplate;advancedFileInput;basicFileInput;content;set files(e){this._files=[];for(let i=0;i{this.cd.markForCheck()})}ngAfterViewInit(){super.ngAfterViewInit(),ns(this.platformId)&&this.mode==="advanced"&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}_headerTemplate;_contentTemplate;_toolbarTemplate;_chooseIconTemplate;_uploadIconTemplate;_cancelIconTemplate;_emptyTemplate;_fileTemplate;_fileLabelTemplate;templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"file":this._fileTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;case"toolbar":this._toolbarTemplate=e.template;break;case"chooseicon":this._chooseIconTemplate=e.template;break;case"uploadicon":this._uploadIconTemplate=e.template;break;case"cancelicon":this._cancelIconTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"filelabel":this._fileLabelTemplate=e.template;break;default:this._fileTemplate=e.template;break}})}basicFileChosenLabel(){return this.auto?this.chooseButtonLabel:this.hasFiles()?this.files&&this.files.length===1?this.files[0].name:this.config.getTranslation("fileChosenMessage")?.replace("{0}",this.files.length):this.config.getTranslation("noFileChosenMessage")||""}completedLabel(){return this.config.getTranslation("completed")||""}getTranslation(e){return this.config.getTranslation(e)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(e){if(e.type!=="drop"&&this.isIE11()&&this.duplicateIEEvent){this.duplicateIEEvent=!1;return}this.multiple||(this.files=[]),this.msgs=[],this.files=this.files||[];let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let o=0;othis.maxFileSize){let i=`${this.invalidFileSizeMessageSummary.replace("{0}",e.name)} ${this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}`;return this.msgs.push({severity:"error",text:i}),!1}return!0}isFileTypeValid(e){let i=this.accept?.split(",").map(o=>o.trim());for(let o of i)if(this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return e.indexOf("*")!==-1}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.src)}uploader(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case Em.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case Em.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.uploadedFiles=[...this.uploadedFiles,...this.files],this.clear();break;case Em.UploadProgress:{i.loaded&&(this.progress=Math.round(i.loaded*100/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress});break}}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}onRemoveClick(e){let{event:i,index:o}=e;this.hasFiles()&&this.remove(i,o)}onRemoveUploadedFileClick(e){let{event:i,index:o}=e;this.hasUploadedFiles()&&this.removeUploadedFile(o)}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.msgs=[],this.cd.markForCheck()}remove(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit(this.files)}removeUploadedFile(e){let i=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.onRemoveUploadedFile.emit({file:i,files:this.uploadedFiles})}isFileLimitExceeded(){let i=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=i&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0&&this.fileLimit&&this.fileLimit!o.text.includes(this.invalidFileLimitMessageSummary))}clearInputElement(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.advancedFileInput.nativeElement.value=""),this.basicFileInput&&this.basicFileInput.nativeElement&&(this.basicFileInput.nativeElement.value="")}clearIEInput(){this.advancedFileInput&&this.advancedFileInput.nativeElement&&(this.duplicateIEEvent=!0,this.advancedFileInput.nativeElement.value="")}hasFiles(){return this.files&&this.files.length>0}hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0}onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(Rc(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||nd(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){nd(this.content?.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&i.length===1)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){let r=this.getTranslation(Ts.FILE_SIZE_TYPES);if(e===0)return`0 ${r[0]}`;let a=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,a)).toFixed(3)} ${r[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(Ts.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Ts.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Ts.CANCEL)}get browseFilesLabel(){return this.config.getTranslation(Ts.ARIA)[Ts.BROWSE_FILES]}get pendingLabel(){return this.config.getTranslation(Ts.PENDING)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-fileupload"],["p-fileUpload"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,sQe,4),Ht(r,aQe,4),Ht(r,B0e,4),Ht(r,lQe,4),Ht(r,cQe,4),Ht(r,dQe,4),Ht(r,uQe,4),Ht(r,pQe,4),Ht(r,hQe,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.fileTemplate=a.first),Je(a=et())&&(o.headerTemplate=a.first),Je(a=et())&&(o.contentTemplate=a.first),Je(a=et())&&(o.toolbarTemplate=a.first),Je(a=et())&&(o.chooseIconTemplate=a.first),Je(a=et())&&(o.fileLabelTemplate=a.first),Je(a=et())&&(o.uploadIconTemplate=a.first),Je(a=et())&&(o.cancelIconTemplate=a.first),Je(a=et())&&(o.emptyTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(mQe,5),Qi(fQe,5),Qi(B0e,5)),i&2){let r;Je(r=et())&&(o.advancedFileInput=r.first),Je(r=et())&&(o.basicFileInput=r.first),Je(r=et())&&(o.content=r.first)}},inputs:{name:"name",url:"url",method:"method",multiple:[2,"multiple","multiple",lt],accept:"accept",disabled:[2,"disabled","disabled",lt],auto:[2,"auto","auto",lt],withCredentials:[2,"withCredentials","withCredentials",lt],maxFileSize:[2,"maxFileSize","maxFileSize",wn],invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:[2,"previewWidth","previewWidth",wn],chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:[2,"showUploadButton","showUploadButton",lt],showCancelButton:[2,"showCancelButton","showCancelButton",lt],mode:"mode",headers:"headers",customUpload:[2,"customUpload","customUpload",lt],fileLimit:[2,"fileLimit","fileLimit",e=>wn(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:[Pi([B5]),Rt],decls:2,vars:2,consts:[["advancedfileinput",""],["content",""],["icon",""],["basicfileinput",""],[3,"class","ngStyle",4,"ngIf"],[3,"class",4,"ngIf"],[3,"ngStyle"],["type","file",3,"change","multiple","accept","disabled"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],[3,"dragenter","dragleave","drop"],[3,"focus","blur","onClick","keydown.enter","styleClass","disabled","label","buttonProps"],[3,"label","disabled","styleClass","buttonProps","onClick",4,"ngIf"],["data-p-icon","plus",4,"ngIf"],["data-p-icon","plus"],[3,"onClick","label","disabled","styleClass","buttonProps"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","upload",4,"ngIf"],["data-p-icon","upload"],["data-p-icon","times",4,"ngIf"],["data-p-icon","times"],[3,"value","showValue",4,"ngIf"],[3,"severity","text"],[3,"class"],[3,"value","showValue"],["ngFor","",3,"ngForOf","ngForTemplate"],["pFileContent","",3,"files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","",3,"onRemove","files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","","badgeSeverity","success",3,"files","badgeValue","previewWidth","fileRemoveIconTemplate"],["pFileContent","","badgeSeverity","success",3,"onRemove","files","badgeValue","previewWidth","fileRemoveIconTemplate"],[3,"onClick","keydown","styleClass","disabled","label","buttonProps"],["type","file",3,"change","focus","blur","accept","multiple","disabled"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],["data-p-icon","upload",3,"class",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[1,"p-button-icon","p-button-icon-left"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"]],template:function(i,o){i&1&&le(0,oXe,12,30,"div",4)(1,SXe,10,17,"div",5),i&2&&(B("ngIf",o.mode==="advanced"),L(),B("ngIf",o.mode==="basic"))},dependencies:[po,Rs,Rl,Zr,Vo,fs,jm,F0e,P0e,zz,bme,xd,kn,TXe],encapsulation:2,changeDetection:0})}return t})();function EXe(t,n){if(t&1){let e=Bt();K(0,"div")(1,"p-fileupload",1),Qe("onSelect",function(o){Ee(e);let r=V();return Ae(r.onFileSelect(o))}),Z()()}if(t&2){let e=V();L(),B("accept",e.config.accept)("auto",!0)}}function AXe(t,n){if(t&1){let e=Bt();K(0,"div",0)(1,"div",2)(2,"span",3),Ce(3),Z()(),K(4,"div",4)(5,"button",5),Qe("click",function(){Ee(e);let o=V();return Ae(o.onFileRemove())}),K(6,"mat-icon"),Ce(7,"delete"),Z()()()()}if(t&2){let e=V();L(3),Di(e.file.name)}}var V0e=(()=>{class t{constructor(){this.config=M0e,this.disabled=!1,this.fileChange=new yt}onFileSelect(e){let i=e.files;i.length>0&&this._setFile(i[0])}onFileRemove(){this._setFile(null)}_setFile(e){this.file=e,this.fileChange.emit(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-ui-file-input"]],inputs:{file:"file",config:"config",disabled:"disabled"},outputs:{fileChange:"fileChange"},decls:2,vars:1,consts:()=>{let e;return e=$localize`Auswählen`,[[1,"flex","flex-row","gap-6","file-info"],["mode","basic","name","file-select","chooseIcon","pi pi-upload","chooseLabel",e,3,"onSelect","accept","auto"],[1,"flex-1"],[1,"filename","mat-body-2"],[1,"basis-10"],["mat-icon-button","","color","accent",3,"click"]]},template:function(i,o){i&1&&Lt(0,EXe,2,2,"div")(1,AXe,8,1,"div",0),i&2&&Ft(o.file?1:0)},dependencies:[Jo,yd,Ls,la,z0e],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 U0e=` .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 DXe=["item"],kXe=["empty"],MXe=["header"],RXe=["footer"],OXe=["selecteditem"],PXe=["group"],LXe=["loader"],FXe=["removeicon"],NXe=["loadingicon"],BXe=["clearicon"],zXe=["dropdownicon"],VXe=["focusInput"],UXe=["multiIn"],HXe=["multiContainer"],jXe=["ddBtn"],GXe=["items"],$Xe=["scroller"],qXe=["overlay"],WXe=t=>({i:t}),j0e=t=>({$implicit:t}),KXe=(t,n,e)=>({removeCallback:t,index:n,class:e}),z5=t=>({height:t}),G0e=(t,n)=>({$implicit:t,options:n}),ZXe=t=>({options:t}),YXe=()=>({}),QXe=(t,n,e)=>({option:t,i:n,scrollerOptions:e}),XXe=(t,n)=>({$implicit:t,index:n});function JXe(t,n){if(t&1){let e=Bt();K(0,"input",17,2),Qe("input",function(o){Ee(e);let r=V();return Ae(r.onInput(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onKeyDown(o))})("change",function(o){Ee(e);let r=V();return Ae(r.onInputChange(o))})("focus",function(o){Ee(e);let r=V();return Ae(r.onInputFocus(o))})("blur",function(o){Ee(e);let r=V();return Ae(r.onInputBlur(o))})("paste",function(o){Ee(e);let r=V();return Ae(r.onInputPaste(o))})("keyup",function(o){Ee(e);let r=V();return Ae(r.onInputKeyUp(o))}),Z()}if(t&2){let e=V();Ge(e.cn(e.cx("pcInputText"),e.inputStyleClass)),B("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle)("variant",e.$variant())("invalid",e.invalid())("pSize",e.size())("fluid",e.hasFluid),Xe("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 eJe(t,n){if(t&1){let e=Bt();oi(),K(0,"svg",20),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.clear())}),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("aria-hidden",!0)}}function tJe(t,n){}function iJe(t,n){t&1&&le(0,tJe,0,0,"ng-template")}function nJe(t,n){if(t&1){let e=Bt();K(0,"span",21),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.clear())}),le(1,iJe,1,0,null,22),Z()}if(t&2){let e=V(2);Ge(e.cx("clearIcon")),Xe("aria-hidden",!0),L(),B("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function oJe(t,n){if(t&1&&(Mi(0),le(1,eJe,1,3,"svg",18)(2,nJe,2,4,"span",19),Ri()),t&2){let e=V();L(),B("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),L(),B("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function rJe(t,n){t&1&&Oi(0)}function sJe(t,n){if(t&1){let e=Bt();K(0,"span",21),Qe("click",function(o){Ee(e);let r=V(2).index,a=V(2);return Ae(a.readonly?"":a.removeOption(o,r))}),oi(),Oe(1,"svg",29),Z()}if(t&2){let e=V(4);Ge(e.cx("chipIcon")),L(),Ge(e.cx("chipIcon")),Xe("aria-hidden",!0)}}function aJe(t,n){}function lJe(t,n){t&1&&le(0,aJe,0,0,"ng-template")}function cJe(t,n){if(t&1&&(K(0,"span"),le(1,lJe,1,0,null,28),Z()),t&2){let e=V(2).index,i=V(2);Xe("aria-hidden",!0),L(),B("ngTemplateOutlet",i.removeIconTemplate||i._removeIconTemplate)("ngTemplateOutletContext",Th(3,KXe,i.removeOption.bind(i),e,i.cx("chipIcon")))}}function dJe(t,n){if(t&1&&le(0,sJe,2,5,"span",19)(1,cJe,2,7,"span",13),t&2){let e=V(3);B("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),L(),B("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}function uJe(t,n){if(t&1){let e=Bt();K(0,"li",25,4)(2,"p-chip",27),Qe("onRemove",function(o){let r=Ee(e).index,a=V(2);return Ae(a.readonly?"":a.removeOption(o,r))}),le(3,rJe,1,0,"ng-container",28)(4,dJe,2,2,"ng-template",null,5,Hi),Z()()}if(t&2){let e=n.$implicit,i=n.index,o=V(2);Ge(o.cx("chipItem",rn(13,WXe,i))),Xe("id",o.id+"_multiple_option_"+i)("aria-label",o.getOptionLabel(e))("aria-setsize",o.modelValue().length)("aria-posinset",i+1)("aria-selected",!0),L(2),Ge(o.cx("pcChip")),B("label",!o.selectedItemTemplate&&!o._selectedItemTemplate&&o.getOptionLabel(e))("removable",!0),L(),B("ngTemplateOutlet",o.selectedItemTemplate||o._selectedItemTemplate)("ngTemplateOutletContext",rn(15,j0e,e))}}function pJe(t,n){if(t&1){let e=Bt();K(0,"ul",23,3),Qe("focus",function(o){Ee(e);let r=V();return Ae(r.onMultipleContainerFocus(o))})("blur",function(o){Ee(e);let r=V();return Ae(r.onMultipleContainerBlur(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onMultipleContainerKeyDown(o))}),le(2,uJe,6,17,"li",24),K(3,"li",25)(4,"input",26,2),Qe("input",function(o){Ee(e);let r=V();return Ae(r.onInput(o))})("keydown",function(o){Ee(e);let r=V();return Ae(r.onKeyDown(o))})("change",function(o){Ee(e);let r=V();return Ae(r.onInputChange(o))})("focus",function(o){Ee(e);let r=V();return Ae(r.onInputFocus(o))})("blur",function(o){Ee(e);let r=V();return Ae(r.onInputBlur(o))})("paste",function(o){Ee(e);let r=V();return Ae(r.onInputPaste(o))})("keyup",function(o){Ee(e);let r=V();return Ae(r.onInputKeyUp(o))}),Z()()()}if(t&2){let e=V();Ge(e.cx("inputMultiple")),B("tabindex",-1),Xe("aria-orientation","horizontal")("aria-activedescendant",e.focused?e.focusedMultipleOptionId:void 0),L(2),B("ngForOf",e.modelValue()),L(),Ge(e.cx("inputChip")),L(),Ge(e.cx("pcInputText")),B("pAutoFocus",e.autofocus)("ngStyle",e.inputStyle),Xe("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 hJe(t,n){if(t&1&&(oi(),Oe(0,"svg",32)),t&2){let e=V(2);Ge(e.cx("loader")),B("spin",!0),Xe("aria-hidden",!0)}}function mJe(t,n){}function fJe(t,n){t&1&&le(0,mJe,0,0,"ng-template")}function gJe(t,n){if(t&1&&(K(0,"span"),le(1,fJe,1,0,null,22),Z()),t&2){let e=V(2);Ge(e.cx("loader")),Xe("aria-hidden",!0),L(),B("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function _Je(t,n){if(t&1&&(Mi(0),le(1,hJe,1,4,"svg",30)(2,gJe,2,4,"span",31),Ri()),t&2){let e=V();L(),B("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),L(),B("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function yJe(t,n){if(t&1&&Oe(0,"span",35),t&2){let e=V(2);B("ngClass",e.dropdownIcon),Xe("aria-hidden",!0)}}function vJe(t,n){t&1&&(oi(),Oe(0,"svg",37))}function bJe(t,n){}function xJe(t,n){t&1&&le(0,bJe,0,0,"ng-template")}function CJe(t,n){if(t&1&&(Mi(0),le(1,vJe,1,0,"svg",36)(2,xJe,1,0,null,22),Ri()),t&2){let e=V(2);L(),B("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),L(),B("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function wJe(t,n){if(t&1){let e=Bt();K(0,"button",33,6),Qe("click",function(o){Ee(e);let r=V();return Ae(r.handleDropdownClick(o))}),le(2,yJe,1,2,"span",34)(3,CJe,3,2,"ng-container",13),Z()}if(t&2){let e=V();Ge(e.cx("dropdown")),B("disabled",e.$disabled()),Xe("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex),L(2),B("ngIf",e.dropdownIcon),L(),B("ngIf",!e.dropdownIcon)}}function SJe(t,n){t&1&&Oi(0)}function IJe(t,n){t&1&&Oi(0)}function TJe(t,n){if(t&1&&le(0,IJe,1,0,"ng-container",28),t&2){let e=n.$implicit,i=n.options;V(2);let o=un(6);B("ngTemplateOutlet",o)("ngTemplateOutletContext",kr(2,G0e,e,i))}}function EJe(t,n){t&1&&Oi(0)}function AJe(t,n){if(t&1&&le(0,EJe,1,0,"ng-container",28),t&2){let e=n.options,i=V(4);B("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",rn(2,ZXe,e))}}function DJe(t,n){t&1&&(Mi(0),le(1,AJe,1,4,"ng-template",null,9,Hi),Ri())}function kJe(t,n){if(t&1){let e=Bt();K(0,"p-scroller",41,8),Qe("onLazyLoad",function(o){Ee(e);let r=V(2);return Ae(r.onLazyLoad.emit(o))}),le(2,TJe,1,5,"ng-template",null,1,Hi)(4,DJe,3,0,"ng-container",13),Z()}if(t&2){let e=V(2);Gr(rn(8,z5,e.scrollHeight)),B("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),L(4),B("ngIf",e.loaderTemplate||e._loaderTemplate)}}function MJe(t,n){t&1&&Oi(0)}function RJe(t,n){if(t&1&&(Mi(0),le(1,MJe,1,0,"ng-container",28),Ri()),t&2){V();let e=un(6),i=V();L(),B("ngTemplateOutlet",e)("ngTemplateOutletContext",kr(3,G0e,i.visibleOptions(),Is(2,YXe)))}}function OJe(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(2).$implicit,i=V(3);L(),Di(i.getOptionGroupLabel(e.optionGroup))}}function PJe(t,n){t&1&&Oi(0)}function LJe(t,n){if(t&1&&(Mi(0),K(1,"li",45),le(2,OJe,2,1,"span",13)(3,PJe,1,0,"ng-container",28),Z(),Ri()),t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),Ge(a.cx("optionGroup")),B("ngStyle",rn(7,z5,r.itemSize+"px")),Xe("id",a.id+"_"+a.getOptionIndex(o,r)),L(),B("ngIf",!a.groupTemplate),L(),B("ngTemplateOutlet",a.groupTemplate)("ngTemplateOutletContext",rn(9,j0e,i.optionGroup))}}function FJe(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(2).$implicit,i=V(3);L(),Di(i.getOptionLabel(e))}}function NJe(t,n){t&1&&Oi(0)}function BJe(t,n){if(t&1){let e=Bt();Mi(0),K(1,"li",46),Qe("click",function(o){Ee(e);let r=V().$implicit,a=V(3);return Ae(a.onOptionSelect(o,r))})("mouseenter",function(o){Ee(e);let r=V().index,a=V().options,p=V(2);return Ae(p.onOptionMouseEnter(o,p.getOptionIndex(r,a)))}),le(2,FJe,2,1,"span",13)(3,NJe,1,0,"ng-container",28),Z(),Ri()}if(t&2){let e=V(),i=e.$implicit,o=e.index,r=V().options,a=V(2);L(),Ge(a.cx("option",Th(13,QXe,i,o,r))),B("ngStyle",rn(17,z5,r.itemSize+"px")),Xe("id",a.id+"_"+a.getOptionIndex(o,r))("aria-label",a.getOptionLabel(i))("aria-selected",a.isSelected(i))("aria-disabled",a.isOptionDisabled(i))("data-p-focused",a.focusedOptionIndex()===a.getOptionIndex(o,r))("aria-setsize",a.ariaSetSize)("aria-posinset",a.getAriaPosInset(a.getOptionIndex(o,r))),L(),B("ngIf",!a.itemTemplate&&!a._itemTemplate),L(),B("ngTemplateOutlet",a.itemTemplate||a._itemTemplate)("ngTemplateOutletContext",kr(19,XXe,i,r.getOptions?r.getOptions(o):o))}}function zJe(t,n){if(t&1&&le(0,LJe,4,11,"ng-container",13)(1,BJe,4,22,"ng-container",13),t&2){let e=n.$implicit,i=V(3);B("ngIf",i.isOptionGroup(e)),L(),B("ngIf",!i.isOptionGroup(e))}}function VJe(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(4);L(),qn(" ",e.searchResultMessageText," ")}}function UJe(t,n){t&1&&Oi(0,null,11)}function HJe(t,n){if(t&1&&(K(0,"li",45),le(1,VJe,2,1,"ng-container",47)(2,UJe,2,0,"ng-container",22),Z()),t&2){let e=V().options,i=V(2);Ge(i.cx("emptyMessage")),B("ngStyle",rn(6,z5,e.itemSize+"px")),L(),B("ngIf",!i.emptyTemplate&&!i._emptyTemplate)("ngIfElse",i.empty),L(),B("ngTemplateOutlet",i.emptyTemplate||i._emptyTemplate)}}function jJe(t,n){if(t&1&&(K(0,"ul",42,10),le(2,zJe,2,2,"ng-template",43)(3,HJe,3,8,"li",44),Z()),t&2){let e=n.$implicit,i=n.options,o=V(2);Gr(i.contentStyle),Ge(o.cn(o.cx("list"),i.contentStyleClass)),Xe("id",o.id+"_list")("aria-label",o.listLabel),L(2),B("ngForOf",e),L(),B("ngIf",!e||e&&e.length===0&&o.showEmptyMessage)}}function GJe(t,n){t&1&&Oi(0)}function $Je(t,n){if(t&1&&(K(0,"div",38),le(1,SJe,1,0,"ng-container",22),K(2,"div"),le(3,kJe,5,10,"p-scroller",39)(4,RJe,2,6,"ng-container",13),Z(),le(5,jJe,4,8,"ng-template",null,7,Hi)(7,GJe,1,0,"ng-container",22),Z(),K(8,"span",40),Ce(9),Z()),t&2){let e=V();Ge(e.cn(e.cx("overlay"),e.panelStyleClass)),B("ngStyle",e.panelStyle),L(),B("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),L(),Ge(e.cx("listContainer")),zr("max-height",e.virtualScroll?"auto":e.scrollHeight),L(),B("ngIf",e.virtualScroll),L(),B("ngIf",!e.virtualScroll),L(3),B("ngTemplateOutlet",e.footerTemplate||e._footerTemplate),L(2),qn(" ",e.selectedMessageText," ")}}var qJe=` ${U0e} /* 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'); } `,WJe={root:{position:"relative"}},KJe={root:({instance:t})=>["p-autocomplete p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-focus":t.focused,"p-inputwrapper-filled":t.$filled(),"p-inputwrapper-focus":t.focused&&!t.$disabled()||t.autofocus||t.overlayVisible,"p-autocomplete-open":t.overlayVisible,"p-autocomplete-clearable":t.showClear&&!t.$disabled(),"p-autocomplete-fluid":t.hasFluid}],pcInputText:"p-autocomplete-input",inputMultiple:({instance:t})=>["p-autocomplete-input-multiple",{"p-disabled":t.$disabled(),"p-variant-filled":t.$variant()==="filled"}],chipItem:({instance:t,i:n})=>["p-autocomplete-chip-item",{"p-focus":t.focusedMultipleOptionIndex()===n}],pcChip:"p-autocomplete-chip",chipIcon:"p-autocomplete-chip-icon",inputChip:"p-autocomplete-input-chip",loader:"p-autocomplete-loader",dropdown:"p-autocomplete-dropdown",overlay:({instance:t})=>["p-autocomplete-overlay p-component-overlay p-component",{"p-input-filled":t.$variant()==="filled","p-ripple-disabled":t.config.ripple()===!1}],listContainer:"p-autocomplete-list-container",list:"p-autocomplete-list",optionGroup:"p-autocomplete-option-group",option:({instance:t,option:n,i:e,scrollerOptions:i})=>({"p-autocomplete-option":!0,"p-autocomplete-option-selected":t.isSelected(n),"p-focus":t.focusedOptionIndex()===t.getOptionIndex(e,i),"p-disabled":t.isOptionDisabled(n)}),emptyMessage:"p-autocomplete-empty-message",clearIcon:"p-autocomplete-clear-icon"},H0e=(()=>{class t extends to{name="autocomplete";theme=qJe;classes=KJe;inlineStyles=WJe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var ZJe={provide:Wa,useExisting:Br(()=>AY),multi:!0},AY=(()=>{class t extends Fv{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=Wn(void 0);completeMethod=new yt;onSelect=new yt;onUnselect=new yt;onFocus=new yt;onBlur=new yt;onDropdownClick=new yt;onClear=new yt;onKeyUp=new yt;onShow=new yt;onHide=new yt;onLazyLoad=new yt;inputEL;multiInputEl;multiContainerEL;dropdownButton;itemsViewChild;scroller;overlayViewChild;itemsWrapper;itemTemplate;emptyTemplate;headerTemplate;footerTemplate;selectedItemTemplate;groupTemplate;loaderTemplate;removeIconTemplate;loadingIconTemplate;clearIconTemplate;dropdownIconTemplate;onHostClick(e){this.onContainerClick(e)}primeng=re(JM);value;_suggestions=Jn(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=Jn(-1);focusedOptionIndex=Jn(-1);_componentStyle=re(H0e);$appendTo=Do(()=>this.appendTo()||this.config.overlayAppendTo());visibleOptions=Do(()=>this.group?this.flatOptions(this._suggestions()):this._suggestions()||[]);inputValue=Do(()=>{let e=this.modelValue(),i=this.optionValueSelected?(this.suggestions||[]).find(o=>wa(o,this.optionValue)===e):e;if(er(e))if(typeof e=="object"||this.optionValueSelected){let o=this.getOptionLabel(i);return o??e}else return e;else return""});get focusedMultipleOptionId(){return this.focusedMultipleOptionIndex()!==-1?`${this.id}_multiple_option_${this.focusedMultipleOptionIndex()}`:null}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get searchResultMessageText(){return er(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(Ts.ARIA).listLabel}get virtualScrollerDisabled(){return!this.virtualScroll}get optionValueSelected(){return typeof this.modelValue()=="string"&&this.optionValue}chipItemClass(e){return this._componentStyle.classes.chipItem({instance:this,i:e})}constructor(e,i){super(),this.overlayService=e,this.zone=i}ngOnInit(){super.ngOnInit(),this.id=this.id||tr("pn_id_"),this.cd.detectChanges()}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"selecteditem":this._selectedItemTemplate=e.template;break;case"selectedItem":this._selectedItemTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"removetokenicon":this._removeIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1})}handleSuggestionsChange(){if(this.loading){this._suggestions()?.length>0||this.showEmptyMessage||this.emptyTemplate?this.show():this.hide();let e=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(e),this.suggestionsUpdated=!0,this.loading=!1,this.cd.markForCheck()}}flatOptions(e){return(e||[]).reduce((i,o,r)=>{i.push({optionGroup:o,group:!0,index:r});let a=this.getOptionGroupChildren(o);return a&&a.forEach(p=>i.push(p)),i},[])}isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findLastOptionIndex(){return ap(this.visibleOptions(),e=>this.isValidOption(e))}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let i=ethis.isValidOption(o)):-1;return i>-1?i+e+1:e}findPrevOptionIndex(e){let i=e>0?ap(this.visibleOptions().slice(0,e),o=>this.isValidOption(o)):-1;return i>-1?i:e}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.optionDisabled?wa(e,this.optionDisabled):!1}isSelected(e){return this.multiple?this.unique?this.modelValue()?.find(i=>vl(i,this.getOptionValue(e),this.equalityKey())):!1:vl(this.modelValue(),this.getOptionValue(e),this.equalityKey())}isOptionMatched(e,i){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===i.toLocaleLowerCase(this.searchLocale)}isInputClicked(e){return e.target===this.inputEL.nativeElement}isDropdownClicked(e){return this.dropdownButton?.nativeElement?e.target===this.dropdownButton.nativeElement||this.dropdownButton.nativeElement.contains(e.target):!1}equalityKey(){return this.dataKey}onContainerClick(e){this.$disabled()||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||(!this.overlayViewChild||!this.overlayViewChild.overlayViewChild?.nativeElement.contains(e.target))&&cs(this.inputEL.nativeElement)}handleDropdownClick(e){let i;this.overlayVisible?this.hide(!0):(cs(this.inputEL.nativeElement),i=this.inputEL.nativeElement.value,this.dropdownMode==="blank"?this.search(e,"","dropdown"):this.dropdownMode==="current"&&this.search(e,i,"dropdown")),this.onDropdownClick.emit({originalEvent:e,query:i})}onInput(e){if(this.typeahead){let i=this.minQueryLength||this.minLength;this.searchTimeout&&clearTimeout(this.searchTimeout);let o=e.target.value;this.maxlength()!==null&&(o=o.split("").slice(0,this.maxlength()).join("")),!this.multiple&&!this.forceSelection&&this.updateModel(o),o.length===0&&!this.multiple?(this.onClear.emit(),setTimeout(()=>{this.hide()},this.delay/2)):o.length>=i?(this.focusedOptionIndex.set(-1),this.searchTimeout=setTimeout(()=>{this.search(e,o,"input")},this.delay)):this.hide()}}onInputChange(e){if(this.forceSelection){let i=!1;if(this.visibleOptions()){let o=this.visibleOptions().find(r=>this.isOptionMatched(r,this.inputEL.nativeElement.value||""));o!==void 0&&(i=!0,!this.isSelected(o)&&this.onOptionSelect(e,o))}i||(this.inputEL.nativeElement.value="",!this.multiple&&this.updateModel(null))}}onInputFocus(e){if(this.$disabled())return;!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onMultipleContainerFocus(e){this.$disabled()||(this.focused=!0)}onMultipleContainerBlur(e){this.focusedMultipleOptionIndex.set(-1),this.focused=!1}onMultipleContainerKeyDown(e){if(this.$disabled()){e.preventDefault();return}switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e);break;default:break}}onInputBlur(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex.set(-1),this.onModelTouched(),this.onBlur.emit(e)}onInputPaste(e){this.onKeyDown(e)}onInputKeyUp(e){this.onKeyUp.emit(e)}onKeyDown(e){if(this.$disabled()){e.preventDefault();return}switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e);break;case"ShiftLeft":case"ShiftRight":break;default:break}}onArrowDownKey(e){if(!this.overlayVisible)return;let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e){if(this.overlayVisible)if(e.altKey)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),e.preventDefault(),e.stopPropagation()}}onArrowLeftKey(e){let i=e.currentTarget;this.focusedOptionIndex.set(-1),this.multiple&&(Ud(i.value)&&this.hasSelectedOption()?(cs(this.multiContainerEL.nativeElement),this.focusedMultipleOptionIndex.set(this.modelValue().length)):e.stopPropagation())}onArrowRightKey(e){this.focusedOptionIndex.set(-1),this.multiple&&e.stopPropagation()}onHomeKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(0,e.shiftKey?o:0),this.focusedOptionIndex.set(-1),e.preventDefault()}onEndKey(e){let{currentTarget:i}=e,o=i.value.length;i.setSelectionRange(e.shiftKey?0:o,o),this.focusedOptionIndex.set(-1),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){if(this.typeahead||this.multiple&&(this.isSelected(e.target.value)||(this.updateModel([...this.modelValue()||[],e.target.value]),this.inputEL.nativeElement.value="")),this.overlayVisible)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.hide();else return;e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e){this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide()}onBackspaceKey(e){if(this.multiple){if(er(this.modelValue())&&!this.inputEL.nativeElement.value){let i=this.modelValue()[this.modelValue().length-1],o=this.modelValue().slice(0,-1);this.updateModel(o),this.onUnselect.emit({originalEvent:e,value:i})}e.stopPropagation()}!this.multiple&&this.showClear&&this.findSelectedOptionIndex()!=-1&&this.clear()}onArrowLeftKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex()<1?0:this.focusedMultipleOptionIndex()-1;this.focusedMultipleOptionIndex.set(i)}onArrowRightKeyOnMultiple(e){let i=this.focusedMultipleOptionIndex();i++,this.focusedMultipleOptionIndex.set(i),i>this.modelValue().length-1&&(this.focusedMultipleOptionIndex.set(-1),cs(this.inputEL.nativeElement))}onBackspaceKeyOnMultiple(e){this.focusedMultipleOptionIndex()!==-1&&this.removeOption(e,this.focusedMultipleOptionIndex())}onOptionSelect(e,i,o=!0){let r=this.getOptionValue(i);this.multiple?(this.inputEL.nativeElement.value="",this.isSelected(i)||this.updateModel([...this.modelValue()||[],r])):this.updateModel(r),this.onSelect.emit({originalEvent:e,value:i}),o&&this.hide(!0)}onOptionMouseEnter(e,i){this.focusOnHover&&this.changeFocusedOptionIndex(e,i)}search(e,i,o){i!=null&&(o==="input"&&i.trim().length===0||(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:i})))}removeOption(e,i){e.stopPropagation();let o=this.modelValue()[i],r=this.modelValue().filter((a,p)=>p!==i);this.updateModel(r),this.onUnselect.emit({originalEvent:e,value:o}),cs(this.inputEL.nativeElement)}updateModel(e){this.value=e,this.writeModelValue(e),this.onModelChange(e),this.updateInputValue(),this.cd.markForCheck()}updateInputValue(){this.inputEL&&this.inputEL.nativeElement&&(this.multiple?this.inputEL.nativeElement.value="":this.inputEL.nativeElement.value=this.inputValue())}autoUpdateModel(){if((this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption()){let e=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(e),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)}}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let o=$r(this.itemsViewChild.nativeElement,`li[id="${i}"]`);o?o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}changeFocusedOptionIndex(e,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions()[i],!1))}show(e=!1){this.dirty=!0,this.overlayVisible=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),e&&cs(this.inputEL.nativeElement),e&&cs(this.inputEL.nativeElement),this.onShow.emit(),this.cd.markForCheck()}hide(e=!1){let i=()=>{this.dirty=e,this.overlayVisible=!1,this.focusedOptionIndex.set(-1),e&&cs(this.inputEL.nativeElement),this.onHide.emit(),this.cd.markForCheck()};setTimeout(()=>{i()},0)}clear(){this.updateModel(null),this.inputEL.nativeElement.value="",this.onClear.emit()}hasSelectedOption(){return er(this.modelValue())}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(i=>this.isOptionGroup(i)).length:e)+1}getOptionLabel(e){return this.optionLabel?wa(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?wa(e,this.optionValue):e&&e.value!=null?e.value:e}getOptionIndex(e,i){return this.virtualScrollerDisabled?e:i&&i.getItemOptions(e).index}getOptionGroupLabel(e){return this.optionGroupLabel?wa(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?wa(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 i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=$r(this.itemsWrapper,".p-autocomplete-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}}writeControlValue(e,i){this.value=e,i(e),this.updateInputValue(),this.cd.markForCheck()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(rt(Fh),rt(on))};static \u0275cmp=Le({type:t,selectors:[["p-autoComplete"],["p-autocomplete"],["p-auto-complete"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,DXe,5),Ht(r,kXe,5),Ht(r,MXe,5),Ht(r,RXe,5),Ht(r,OXe,5),Ht(r,PXe,5),Ht(r,LXe,5),Ht(r,FXe,5),Ht(r,NXe,5),Ht(r,BXe,5),Ht(r,zXe,5),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.emptyTemplate=a.first),Je(a=et())&&(o.headerTemplate=a.first),Je(a=et())&&(o.footerTemplate=a.first),Je(a=et())&&(o.selectedItemTemplate=a.first),Je(a=et())&&(o.groupTemplate=a.first),Je(a=et())&&(o.loaderTemplate=a.first),Je(a=et())&&(o.removeIconTemplate=a.first),Je(a=et())&&(o.loadingIconTemplate=a.first),Je(a=et())&&(o.clearIconTemplate=a.first),Je(a=et())&&(o.dropdownIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(VXe,5),Qi(UXe,5),Qi(HXe,5),Qi(jXe,5),Qi(GXe,5),Qi($Xe,5),Qi(qXe,5)),i&2){let r;Je(r=et())&&(o.inputEL=r.first),Je(r=et())&&(o.multiInputEl=r.first),Je(r=et())&&(o.multiContainerEL=r.first),Je(r=et())&&(o.dropdownButton=r.first),Je(r=et())&&(o.itemsViewChild=r.first),Je(r=et())&&(o.scroller=r.first),Je(r=et())&&(o.overlayViewChild=r.first)}},hostVars:4,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o.onHostClick(a)}),i&2&&(Gr(o.sx("root")),Ge(o.cn(o.cx("root"),o.styleClass)))},inputs:{minLength:[2,"minLength","minLength",wn],minQueryLength:[2,"minQueryLength","minQueryLength",wn],delay:[2,"delay","delay",wn],panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",readonly:[2,"readonly","readonly",lt],scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",lt],virtualScroll:[2,"virtualScroll","virtualScroll",lt],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",wn],virtualScrollOptions:"virtualScrollOptions",autoHighlight:[2,"autoHighlight","autoHighlight",lt],forceSelection:[2,"forceSelection","forceSelection",lt],type:"type",autoZIndex:[2,"autoZIndex","autoZIndex",lt],baseZIndex:[2,"baseZIndex","baseZIndex",wn],ariaLabel:"ariaLabel",dropdownAriaLabel:"dropdownAriaLabel",ariaLabelledBy:"ariaLabelledBy",dropdownIcon:"dropdownIcon",unique:[2,"unique","unique",lt],group:[2,"group","group",lt],completeOnFocus:[2,"completeOnFocus","completeOnFocus",lt],showClear:[2,"showClear","showClear",lt],dropdown:[2,"dropdown","dropdown",lt],showEmptyMessage:[2,"showEmptyMessage","showEmptyMessage",lt],dropdownMode:"dropdownMode",multiple:[2,"multiple","multiple",lt],tabindex:[2,"tabindex","tabindex",wn],dataKey:"dataKey",emptyMessage:"emptyMessage",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",autofocus:[2,"autofocus","autofocus",lt],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",lt],selectOnFocus:[2,"selectOnFocus","selectOnFocus",lt],searchLocale:[2,"searchLocale","searchLocale",lt],optionDisabled:"optionDisabled",focusOnHover:[2,"focusOnHover","focusOnHover",lt],typeahead:[2,"typeahead","typeahead",lt],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:[Pi([ZJe,H0e]),Rt],decls:9,vars:12,consts:[["overlay",""],["content",""],["focusInput",""],["multiContainer",""],["token",""],["removeicon",""],["ddBtn",""],["buildInItems",""],["scroller",""],["loader",""],["items",""],["empty",""],["pInputText","","aria-autocomplete","list","role","combobox",3,"pAutoFocus","class","ngStyle","variant","invalid","pSize","fluid","input","keydown","change","focus","blur","paste","keyup",4,"ngIf"],[4,"ngIf"],["role","listbox",3,"class","tabindex","focus","blur","keydown",4,"ngIf"],["type","button","pRipple","",3,"class","disabled","click",4,"ngIf"],[3,"visibleChange","onAnimationStart","onHide","hostAttrSelector","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],["pInputText","","aria-autocomplete","list","role","combobox",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngStyle","variant","invalid","pSize","fluid"],["data-p-icon","times",3,"class","click",4,"ngIf"],[3,"class","click",4,"ngIf"],["data-p-icon","times",3,"click"],[3,"click"],[4,"ngTemplateOutlet"],["role","listbox",3,"focus","blur","keydown","tabindex"],["role","option",3,"class",4,"ngFor","ngForOf"],["role","option"],["role","combobox","aria-autocomplete","list",3,"input","keydown","change","focus","blur","paste","keyup","pAutoFocus","ngStyle"],[3,"onRemove","label","removable"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","times-circle"],["data-p-icon","spinner",3,"class","spin",4,"ngIf"],[3,"class",4,"ngIf"],["data-p-icon","spinner",3,"spin"],["type","button","pRipple","",3,"click","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],["data-p-icon","chevron-down",4,"ngIf"],["data-p-icon","chevron-down"],[3,"ngStyle"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox"],["ngFor","",3,"ngForOf"],["role","option",3,"class","ngStyle",4,"ngIf"],["role","option",3,"ngStyle"],["pRipple","","role","option",3,"click","mouseenter","ngStyle"],[4,"ngIf","ngIfElse"]],template:function(i,o){if(i&1){let r=Bt();le(0,JXe,2,30,"input",12)(1,oJe,3,2,"ng-container",13)(2,pJe,6,33,"ul",14)(3,_Je,3,2,"ng-container",13)(4,wJe,4,7,"button",15),K(5,"p-overlay",16,0),wm("visibleChange",function(p){return Ee(r),ng(o.overlayVisible,p)||(o.overlayVisible=p),Ae(p)}),Qe("onAnimationStart",function(p){return Ee(r),Ae(o.onOverlayAnimationStart(p))})("onHide",function(){return Ee(r),Ae(o.hide())}),le(7,$Je,10,12,"ng-template",null,1,Hi),Z()}i&2&&(B("ngIf",!o.multiple),L(),B("ngIf",o.$filled()&&!o.$disabled()&&o.showClear&&!o.loading),L(),B("ngIf",o.multiple),L(),B("ngIf",o.loading),L(),B("ngIf",o.dropdown),L(),B("hostAttrSelector",o.attrSelector),Cm("visible",o.overlayVisible),B("options",o.overlayOptions)("target","@parent")("appendTo",o.$appendTo())("showTransitionOptions",o.showTransitionOptions)("hideTransitionOptions",o.hideTransitionOptions))},dependencies:[po,Rs,Rl,Zr,Vo,fs,kT,yg,Yl,h0,cp,Uz,p0,Nv,qE,kn,xd],encapsulation:2,changeDetection:0})}return t})();var jO=(()=>{class t{constructor(){this.labels=[],this.labelsChange=new yt,this.inputControl=new dc([]),this.suggestions=[],this.inputControl.valueChanges.subscribe(e=>this.labelsChange.emit(e))}ngOnInit(){this.labels&&this.inputControl.patchValue(this.labels)}ngOnChanges(e){e.labelOptions&&e.labelOptions.currentValue&&(this.suggestions=[...this.labelOptions])}onCompleteMethod(e){let i=[...this.labelOptions??[]];e.query.length===0?this.suggestions=[...i]:this.suggestions=[e.query,...i.filter(o=>o.toLowerCase().includes(e.query.toLowerCase()))]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-ui-labels-input"]],inputs:{labels:"labels",labelOptions:"labelOptions"},outputs:{labelsChange:"labelsChange"},features:[In],decls:4,vars:3,consts:[["multiple","","fluid","","variant","filled","inputId","labels-input",3,"completeMethod","formControl","suggestions","typeahead"],["for","labels-input"]],template:function(i,o){i&1&&(K(0,"p-iftalabel")(1,"p-autoComplete",0),Qe("completeMethod",function(a){return o.onCompleteMethod(a)}),Z(),K(2,"label",1),Ce(3,"Labels"),Z()()),i&2&&(L(),B("formControl",o.inputControl)("suggestions",o.suggestions)("typeahead",!0))},dependencies:[rp,il,$p,AY,vg],encapsulation:2})}}return t})();var $0e=(()=>{class t{constructor(){this.formChange=new yt,this.fileInputConfig={accept:"*"}}onFileSelect(e){this.form.file=e,this.formChange.emit(this.form)}onLabelsChange(e){this.form.labels=e,this.formChange.emit(this.form)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-user-files-new-dialog-form"]],inputs:{form:"form"},outputs:{formChange:"formChange"},decls:12,vars:2,consts:[[1,"form-part"],[1,"mat-subtitle-1"],[3,"fileChange","config"],[3,"labelsChange","labels"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div")(2,"span",1),Ce(3,"Datei Auswahl"),Z()(),K(4,"div")(5,"bd-ui-file-input",2),Qe("fileChange",function(a){return o.onFileSelect(a)}),Z()()(),K(6,"div",0)(7,"div")(8,"span",1),Ce(9,"Datei Labels"),Z()(),K(10,"div")(11,"bd-ui-labels-input",3),Qe("labelsChange",function(a){return o.onLabelsChange(a)}),Z()()()),i&2&&(L(5),B("config",o.fileInputConfig),L(6),B("labels",o.form.labels))},dependencies:[V0e,jO],styles:[".form-part[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var pa=class{constructor(n){this.id=n}};var WE=(function(t){return t[t.LEGACY=0]="LEGACY",t[t.AS_NULL=1]="AS_NULL",t})(WE||{}),Eo=class extends pa{constructor(n,e=[],i=[],o=WE.AS_NULL){super(n),this.includes=e,this.excludes=i,this._emptyArrayStrategy=o}toJSON(){return{[this.id]:{includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}_arrayToJson(n,e=WE.AS_NULL){return e===WE.LEGACY||n?.length>0?n:null}};var _p=class extends Eo{constructor(n,e,i,o,r,a,p,f=[],x=[]){super(n,f,x,WE.LEGACY),this.codeSpectrumIds=e,this.codingSystem=i,this.matching=o,this.codeTypeSpecification=r,this.codeTypeClassification=a,this.grouperVersionYear=p}toJSON(){let n={includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)};return this.codeSpectrumIds&&(n.codeSpectrumIds=this.codeSpectrumIds),this.codingSystem&&(n.codingSystem=this.codingSystem),this.matching&&(n.matching=this.matching),this.codeTypeSpecification&&(n.codeTypeSpecification=this.codeTypeSpecification),this.codeTypeClassification&&(n.codeTypeClassification=this.codeTypeClassification),this.grouperVersionYear&&(n.grouperVersionYear=this.grouperVersionYear),{[this.id]:n}}};var ih=class extends _p{constructor(n,e=[],i=[],o,r,a,p,f,x,I){super(n,o,r,a,p,f,x,e,i),this.numberOfDigits=I}toJSON(){let n=super.toJSON();return this.numberOfDigits&&(n[this.id]=Object.assign(n[this.id],{numberOfDigits:this.numberOfDigits})),n}};var V5=class extends pa{constructor(n,e){super(n),this.bool=e}toJSON(){return{[this.id]:{flag:this.bool}}}};var YJe="clinicId",KE=class extends Eo{constructor(n,e){super(YJe,n,e)}};var QJe="additionalGrouperVersionDrgCode",GO=class extends Eo{constructor(n,e,i){super(QJe,e,i),this.grouperVersionYear=n}toJSON(){return{[this.id]:{grouperVersionYear:this.grouperVersionYear,includes:this._arrayToJson(this.includes,this._emptyArrayStrategy),excludes:this._arrayToJson(this.excludes,this._emptyArrayStrategy)}}}};var ZE=class extends pa{constructor(n,e){super(n),this.conditions=e}toJSON(){let n=[];return this.conditions.forEach(e=>{n.push(e.toJSON())}),{[this.id]:{conditions:n}}}};var $O="or",YE=class extends ZE{constructor(n=[]){super($O,n)}};var qO="and",jg=class extends ZE{constructor(n=[]){super(qO,n)}};var Ps=class t{static create(n){let e=typeof n,i=null;if(e==="string")i=t.createFromString(n);else if(e==="number")i=t.createFromNumber(n);else if(!n)i=null;else throw new Error("Invalid administrative district id type.");return i}static createFromNumber(n){let e=n.toString(10);return t.createFromString(e)}static createFromString(n){return n.length===4&&(n=`0${n}`),new t(n)}constructor(n){this.value=n}getNumericValue(){return parseInt(this.value,10)}getStateId(){return parseInt(this.value.substring(0,2),10)}clone(){return new t(this.value)}};var L0=class t{static fromObjectArray(n=[]){let e=i=>t.fromObject(i);return n.map(e)}static fromObject(n={}){return new t(Ps.create(n.id),n.name,n.otherName)}constructor(n,e,i){this.id=n,this.name=e,this.otherName=i}displayName(){return this.otherName??this.name}};var U5="administrative-districts",XJe="administrative-districts";var WO={id:XJe,type:"fill",source:U5,"source-layer":"administrative_districts_2020.1",paint:{"fill-outline-color":"rgba(0,0,0,0.3)","fill-color":"rgba(0,0,0,0.1)"}};var DY={type:"vector",url:"mapbox://sseemann.ckgge66kg010g29qvmxl5r90a-8j8hs"};var Xm=class{static byId(n){let e=Vu.filter(i=>i.id===n);return e[0]?e[0]:null}},KO=[{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"}],Vu=[{id:-1,name:"Bund"},...KO];var vb=[[15.0169958839,47.3024876979],[5.98865807458,54.983104153]];var Uu=63710088e-1,JJe={centimeters:Uu*100,centimetres:Uu*100,degrees:Uu/111325,feet:Uu*3.28084,inches:Uu*39.37,kilometers:Uu/1e3,kilometres:Uu/1e3,meters:Uu,metres:Uu,miles:Uu/1609.344,millimeters:Uu*1e3,millimetres:Uu*1e3,nauticalmiles:Uu/1852,radians:1,yards:Uu*1.0936},HSi={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/Uu,yards:1.0936133};function F0(t,n,e){e===void 0&&(e={});var i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=n||{},i.geometry=t,i}function Gg(t,n,e){if(e===void 0&&(e={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kY(t[0])||!kY(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return F0(i,n,e)}function MY(t,n,e){e===void 0&&(e={});for(var i=0,o=t;i{if(r){let f=p._z;return r.maxZoom?r.minZoom?r.minZoom<=f&&fF0(p.geometry,p.properties,{bbox:p.bbox,id:p.id}))}};var j5=fu(XE()),$g=class t{static fromBbox(n,e){if(!Array.isArray(n))throw new Error("bbox is not an array");return n.length===6?new t(new j5.LngLatBounds(n.slice(0,4)),e):new t(new j5.LngLatBounds(n),e)}static fromBoundsLike(n,e){return new t(j5.LngLatBounds.convert(n),e)}constructor(n,e){this.bounds=n,this.origin=e}toPointLikeArray(n){return[n.project(this.bounds._sw),n.project(this.bounds._ne)]}};var G5=class{static getDataMaxValue(n,e){let i=0;return n.forEach(o=>{i=i>=e[o]?i:e[o]}),console.log(i),i}static getDataExtremeValues(n,e){let i=null,o=null;return n.forEach(r=>{i!==null?i=i>=e[r]?i:e[r]:i=e[r],o!==null?o=o<=e[r]?o:e[r]:o=e[r]}),{min:o,max:i}}};var K0e=fu(XE()),JE=class{constructor(n,e){this._mbxMap=n,this._layerName=e,this._popup=new K0e.Popup({closeButton:!0,closeOnClick:!1})}_removePopup(){this._popup.remove()}};var ZO=fu(XE());var $5=class{constructor(n,e={closeButton:!1,closeOnClick:!0,mode:"MERGE",contentDivider:'
'}){this._mpxMap=n,this._options=e,this._listener=[],this._subs=[],this._onMouseClick=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let o=this._listener.filter(r=>r.type==="click").map(r=>gt(ve({},r),{features:QE.getFeaturesOnPosition(this._mpxMap,i.point,r.layerId,r.bboxSize,r.zoom)})).filter(r=>r.features&&r.features.length>0);this._showContent(o,i.lngLat)},this._onMousemove=i=>{this._mpxMap.getCanvas().style.cursor="pointer";let o=this._listener.filter(r=>r.type==="mousemove").map(r=>gt(ve({},r),{features:QE.getFeaturesOnPosition(this._mpxMap,i.point,r.layerId,r.bboxSize,r.zoom)})).filter(r=>r.features&&r.features.length>0);this._showContent(o,i.lngLat)},this._onMouseleave=i=>{this._mpxMap.getCanvas().style.cursor="",this._popupMove.remove()},this._popupClick=new ZO.Popup(gt(ve({},e),{closeButton:!0,closeOnClick:!0})),this._popupMove=new ZO.Popup(e),this._subs.push(jf(this._mpxMap,"click").pipe(ro(i=>i.target.idle())).subscribe(i=>this._onMouseClick(i))),this._subs.push(jf(this._mpxMap,"mousemove").pipe(ro(i=>i.target.idle())).subscribe(i=>this._onMousemove(i))),this._subs.push(jf(this._mpxMap,"mouseleave").subscribe(i=>this._onMouseleave(i))),this._subs.push(jf(this._mpxMap,"mouseout").subscribe(i=>this._onMouseleave(i)))}registerHandler(n,e,i){let o=ve({type:"mousemove",bboxSize:0,popupSortingIndex:1,layerGroupStrategy:"NOOP"},i);this.deregisterHandler(e),i?.layerGroupId&&i?.layerGroupStrategy&&i.layerGroupStrategy==="ONLY_ONE_OF_GROUP"&&(this._listener=this._listener.filter(r=>r.layerGroupId!==i.layerGroupId)),this._listener.push(gt(ve({layerGroupId:""},o),{popupHandler:n,layerId:e}))}deregisterHandler(n){this._listener=this._listener.filter(e=>e.layerId!==n)}onDestroy(){this._popupClick.remove(),this._popupMove.remove(),this._subs.forEach(n=>n.unsubscribe())}_showContent(n,e){if(n.some(i=>i.type==="click")){this._popupClick.remove();let i=this._createPopupContent(n.filter(o=>o.type==="click").filter(o=>o.features&&o.features.length>0).sort((o,r)=>r.popupSortingIndex-o.popupSortingIndex).map(o=>o.features.map(r=>o.popupHandler.content(r))));this._popupClick=new ZO.Popup(gt(ve({},this._options),{closeButton:!0,closeOnClick:!0})).setHTML(i).setLngLat(e).addTo(this._mpxMap)}if(n.some(i=>i.type!=="click")){this._popupMove.remove();let i=this._createPopupContent(n.filter(o=>o.type!=="click").filter(o=>o.features&&o.features.length>0).sort((o,r)=>r.popupSortingIndex-o.popupSortingIndex).map(o=>o.features.map(r=>o.popupHandler.content(r))));this._popupMove=new ZO.Popup(this._options).setHTML(i).setLngLat(e).addTo(this._mpxMap)}}_createPopupContent(n){return n.flat().filter((e,i,o)=>o.findIndex(r=>r===e)===i).join(` ${this._options.contentDivider}`)}};var YO=class{static addSaveLayer(n,e,i){return this.hasResource(n,e.id,"layer")?Ni(e):(n=n.addLayer(e,i),GS(500).pipe(Ko(10),vi(o=>{let r=n.isStyleLoaded();return console.debug(`checking layer loaded ${o}/10`,e.id,r),r}),Yu(o=>o),vi(()=>e)))}static addSaveSource(n,e,i){return this.hasResource(n,e,"source")?Ni(i):(n=n.addSource(e,i),GS(500).pipe(Ko(10),vi(o=>{let r=n.isSourceLoaded(e);return console.debug(`checking source loaded ${o}/10`,e,r),r}),Yu(o=>o),vi(()=>i)))}static hasResource(n,e,i){return i==="layer"?!!n.getLayer(e):!!n.getSource(e)}};var LC=class{constructor(n,e){this.layerControlId=n,this.config=e,this.visible="visible",this.active=!0,this.legend={showInLegend:!0},this.initDone=!1,this.popupImpl=void 0,this._bounds=new Ms(vb),this._legendRef=new mo(1),this.legendRef=this._legendRef.asObservable(),this.visible=e.visible??this.visible,this.active=e.active??this.active,this.zIndex=e.zIndex,this.displayName=e.displayName,this.legend=ve(ve({},this.legend),e.legend)}initBounds(){this.bounds=this._bounds.asObservable()}initImage(n){let e=this.image();if(e&&!n.hasImage(e.imageName)){console.debug("loading image",e.imageName);let i=T7(n.loadImage).bind(n);if("url"in e)return i(e.url).pipe(vi(o=>{if(o[0])throw o[0];return n.addImage(e.imageName,o[1],{sdf:e.url}),n}));if("svg"in e){let o=new Image(20,20),r=e.svg;return o.onload=()=>n.addImage(e.imageName,o),o.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`,Ni(n)}else return Ni(n)}else return Ni(n)}initSource(n){if(console.debug("init source",this.source()),this.source()){if(!this.source().sourceId)throw new Error("missing source id");return YO.addSaveSource(n,this.source().sourceId,this.source().sourceData)}else return Ni(null)}initLayer(n,e){this.mapRef=n,this.popupControlRef=e;let i=Ni();return this.layer()&&(console.debug("init layer",this.layer().id),i=Ni(this.layer()).pipe(vi(o=>(o?.layout?o.layout.visibility="none":o.layout={visibility:"none"},o)),wo(o=>YO.addSaveLayer(n,o)))),i.pipe(Er(()=>this.initDone=!0),Er(()=>this.afterInit(n,e)))}onRedraw(n){switch(n.action){case"SHOW":{this._show();break}case"UPDATE-DATA":{this._update(n.data);break}case"UPDATE-BY-COMMAND":{let e=n.data;this.updateByCommand(e);break}case"HIDE":{this._hide();break}}}destroyLayer(n){this.popupControlRef.onDestroy(),this.layer()&&(this.hidePopup(this.layer()?.id),console.debug(`removeLayer [${this.layer().id}]`),n.removeLayer(this.layer().id))}destroySource(n){this.source()&&(console.debug(`removeSource [${this.source()?.sourceId}]`),n.removeSource(this.source()?.sourceId)),this.image()&&(console.debug(`removeImage [${this.image()?.imageName}]`),n.removeImage(this.image()?.imageName))}afterInit(n,e){this.initBounds()}hide(){console.debug(`[${this.layer()?.id}] set layout.visibility => none`),this.mapRef.setLayoutProperty(this.layer().id,"visibility","none",{validate:!0})}show(){console.debug(`[${this.layer()?.id}] set layout.visibility => visible`),this.mapRef.setLayoutProperty(this.layer().id,"visibility","visible",{validate:!0})}update(n){console.debug("no update method impl!")}updateByCommand(n){let e=n.options.find(i=>i.key===n.currentOption.key);n.commandFn(this.mapRef,e)}hidePopup(n){this.popupControlRef.deregisterHandler(n),this.popupImpl=void 0,this._popupSubscription&&this._popupSubscription.unsubscribe()}showPopup(n){this.popupImpl=new LY(this.mapRef,n,e=>this.popupContent(e,{})),this.popupControlRef.registerHandler(this.popupImpl,n,this.config.popup)}image(){}popupContent(n,e){if(this.config.popup?.popupType==="customPopupContent")return null;let i=this.config.popup.titleFnc(n,e),o=`
${i}
`;if(this.config.popup.messageFnc){let r=this.config.popup.messageFnc(n,e);r&&(o=`
${i}
${this.config.popup.messagePrefix} ${r}
`)}return o}_show(){this.initDone&&this.layer()&&(this.show(),this.config.popup&&this.showPopup(this.layer().id))}_update(n){this.initDone&&this.layer()&&this.update(n)}_hide(){this.initDone&&this.layer()&&(this.hidePopup(this.layer().id),this.hide())}},LY=class extends JE{constructor(n,e,i){super(n,e),this.contentFn=i}content(n){return this.contentFn({id:n.id,properties:n.properties,geometry:n.geometry?{type:n.geometry.type,bbox:n.geometry.bbox,coordinates:void 0}:void 0,bbox:n.bbox,type:n.type})}};function eA(t,n,e){if(t!==null)for(var i,o,r,a,p,f,x,I=0,D=0,P,R=t.type,j=R==="FeatureCollection",$=R==="Feature",W=j?t.features.length:1,Q=0;Qe[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]this._legendRef.next(this.updateLegendRef(i,{min:null,max:null}))),_u([this.data$,this.colorFactory$]).subscribe(i=>this.updateSource(i[0],void 0,i[1]))}showPopup(n){this._popupSubscription=this.data$.subscribe(e=>{this.popupImpl=new NY(this.mapRef,n,(i,o)=>this.popupContent(i,o),e),this.popupControlRef.registerHandler(this.popupImpl,n)})}updateSource(n,e=G5.getDataExtremeValues(Object.keys(n),n),i){console.debug(this.layerControlId,"updateSource",n),this._legendRef.next(this.updateLegendRef(i,e));let o=Object.keys(n),r,a;o.length>0?(r=this.getFillColorExpression(o,n,e,i),a=this.getFillOpacityExpression(n),this.popupImpl&&(this.popupImpl.data=n)):(r=this.getFillColorFallback(),a=.7),this.mapRef.setPaintProperty(this.layer().id,"fill-color",r),this.mapRef.setPaintProperty(this.layer().id,"fill-opacity",a)}getFillColorExpression(n,e,i,o){let r=this.getFillColorFallback(),a=JSON.parse(JSON.stringify(this.baseFilterExpression()));return n.forEach(function(p){let f=o.getColorForValue(e[p],i.min,i.max)??new Us(r);a.push(p,f.toHslString())}),a.push(r),a}baseFilterExpression(n){return["match",["get",this.config.geoJsonPropertiesKey]]}getFillColorFallback(){return"rgba(0,0,0,0)"}getFillOpacityExpression(n){let e=JSON.parse(JSON.stringify(this.baseFilterExpression()));return Object.keys(n).forEach(i=>{e.push(i,.7)}),e.push(0),e}updateLegendRef(n,e){return console.debug(this.config.layerId,"updateLegendRef"),new q5(this.layerControlId,this.displayName,n,e.min,e.max)}initBounds(){this.bounds=this.data$.pipe(Er(()=>this.mapRef.fitBounds(this.defaultBounds)),wo(n=>jf(this.mapRef,"idle").pipe(Ko(1),vi(()=>n))),vi(n=>{let e=[];if(Object.keys(n).length>250)return this.defaultBounds;if(Object.keys(n).forEach(i=>{let o=["in",i,["get",this.config.geoJsonPropertiesKey]],r=this.mapRef.querySourceFeatures(this.config.sourceId,{filter:o,sourceLayer:this.layer()["source-layer"]});r.length>0&&r.forEach(a=>{e.push(F0({type:a.geometry.type,bbox:a.geometry.bbox,coordinates:a.geometry.coordinates},a.properties))})}),e.length>0){let i=nh(e);return $g.fromBbox(N0(i),i).bounds}else return this.defaultBounds}),Er(n=>console.debug(this.config.sourceId,"updateBounds",n)))}},NY=class extends JE{constructor(n,e,i,o={}){super(n,e),this.contentFn=i,this.data=o}content(n){return this.contentFn({type:n.type,bbox:n.bbox,id:n.id,properties:n.properties,geometry:n.geometry?{type:n.geometry?.type,bbox:n.geometry?.bbox,coordinates:void 0}:void 0},this.data)}};var Jm=class{constructor(n){this.layerControls$=new mo,this._layers={},this._mapRef$=new mo(1),this.mapRef$=this._mapRef$.asObservable(),this._boundsByLayerId$=new mo(1),this._startup=new xi,this.config=ve({interactive:!0,global:{exportMenu:!0,styleMenu:!0}},n),_u([this._startup,this._boundsByLayerId$]).pipe(wo(e=>this._layers[e[1]].primary.bounds.pipe(vi(i=>({bounds:i,mapRef:e[0],boundsByLayerId:e[1]}))))).subscribe(e=>{console.debug("listen to bounds of",e.boundsByLayerId,e.bounds),e.mapRef.fitBounds(e.bounds,{duration:3e3,padding:30})}),this._mapRef$.subscribe(e=>{this._popupControl=new $5(e),e.on("style.load",i=>{GS(500).pipe(vi(()=>e.isStyleLoaded()),Yu(o=>o)).subscribe(()=>this._initLayers(e))}),this._initLayers(e)})}followBoundsOf(n){console.debug("followBoundsOf",n),this._boundsByLayerId$.next(n)}addMapRef(n){this._mapRef$.next(n),this._mapRef$.complete()}registerLayer(n){this._layers[n.layerControlId]={primary:n,other:[]},this._layers[n.layerControlId].primary.zIndex=n.zIndex??Object.keys(this._layers).length,n.active&&this.layerControls$.next({layerControl:n,action:"ACTIVE"})}registerWithinLayer(n,e){e.legend.showInLegend=!1,e.zIndex=e.zIndex??this._layers[n].other.length,this._layers[n].other.push(e),e.active&&this.layerControls$.next({layerControl:e,action:"ACTIVE"})}setActive(n,e,i=e?"visible":"none"){this._layers[n]&&this._layers[n].primary.active!==e&&(this._layers[n].primary.active=e,this._toggleLayer(this._layers[n].primary,i),this.layerControls$.next({layerControl:this._layers[n].primary,action:e?"ACTIVE":"NOT_ACTIVE"}),this._layers[n].other.forEach(o=>{o.active=e,this._toggleLayer(o,i),this.layerControls$.next({layerControl:o,action:e?"ACTIVE":"NOT_ACTIVE"})}))}setVisibility(n,e){this._layers[n]&&this._layers[n].primary.visible!==e&&(this._toggleLayer(this._layers[n].primary,e),this._layers[n].other.forEach(i=>this._toggleLayer(i,e)))}setActionChange(n,e){if(this._layers[n]&&this._layers[n].primary.visible){let i={action:"UPDATE-DATA",layerControl:this._layers[n].primary,data:e.data},o=this._layers[n].primary;o&&o.onRedraw(i),this.layerControls$.next(i),e.commands?.forEach(r=>{let a={action:"UPDATE-BY-COMMAND",data:r,layerControl:this._layers[n].primary},p=this._layers[n].primary;p&&p.onRedraw(a),this.layerControls$.next(a)})}}onDestroy(){return this._mapRef$.asObservable().pipe(vi(n=>{Object.values(this._layers).forEach(e=>{e.other.forEach(i=>i.destroyLayer(n,this._popupControl)),e.primary.destroyLayer(n,this._popupControl)}),Object.values(this._layers).forEach(e=>{e.other.forEach(i=>i.destroySource(n)),e.primary.destroySource(n)})}))}_toggleLayer(n,e){let i;e==="none"?(n.visible="none",i={action:"HIDE",layerControl:n},console.debug(`[${n.layerControlId}] toggle layer to ${n.visible}`,i)):(n.visible="visible",i={action:"SHOW",layerControl:n},console.debug(`[${n.layerControlId}] toggle layer to ${n.visible}`,i)),n.onRedraw(i),this.layerControls$.next(i)}_initLayers(n){console.debug("### init layers ###");let e=Object.values(this._layers).map(r=>[r.primary,...r.other]).flat().sort((r,a)=>r.zIndex-a.zIndex),i=e.map(r=>r.initImage(n)),o=e.map(r=>r.initSource(n));Hl([...i,...o]).subscribe(()=>{vr(e).pipe(Md(r=>(console.debug(`start init of [${r.layerControlId}]: ${r.displayName}`),r.initLayer(n,this._popupControl))),A7(e.length)).subscribe(()=>{console.debug("finished with init"),this._startup.next(n),e.filter(r=>r.active).filter(r=>r.visible==="visible").forEach(r=>{r.onRedraw({layerControl:r,action:"SHOW"})})})})}};var Q0e=class{static{this.ICONS=new Map([["marker-with-dot",n=>({key:"marker-with-dot",displayName:"Marker mit Loch",value:``})],["marker",n=>({key:"marker",displayName:"Marker",value:``})],["pin",n=>({key:"pin",displayName:"Nadel",value:` `})],["pin-with-circle",n=>({key:"pin-with-circle",displayName:"Pin",value:``})],["flag",n=>({key:"flag",displayName:"Flagge",value:` `})],["flag-filled",n=>({key:"flag-filled",displayName:"Flagge gef\xFCllt",value:` `})]])}static findByIdAndFillWithColor(n,e=new Us("#000000")){if(this.ICONS.has(n))return this.ICONS.get(n)(e.toHexString())}static findAllAndFillWithColor(n=new Us("#000000")){return[...this.ICONS.values()].map(e=>e(n.toHexString()))}};var W5=class{constructor(n,e,i,o=!0){this.mapEvent=n,this.map=e,this.controls=i,this.propagate=o}};var ef={container:"map-container",style:"mapbox://styles/mapbox/streets-v12",bounds:vb,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"}},bEi=gt(ve({},ef),{center:[8.689091,50.108202],zoom:8}),eet=gt(ve({},ef),{center:[8.689091,50.108202],zoom:9,interactive:!1});var X0e={streets:"Stra\xDFen",outdoors:"Outdoor",light:"Hell",dark:"Dunkel",satellite:"Satellit","satellite-streets":"Satellit & Stra\xDFen","navigation-day":"Navigation Hell","navigation-night":"Navigation Dunkel"},K5=class{static fromStyleKey(n){switch(n){case"streets":return"mapbox://styles/mapbox/streets-v12";case"outdoors":return"mapbox://styles/mapbox/outdoors-v12";case"light":return"mapbox://styles/mapbox/light-v11";case"dark":return"mapbox://styles/mapbox/dark-v11";case"satellite":return"mapbox://styles/mapbox/satellite-v9";case"satellite-streets":return"mapbox://styles/mapbox/satellite-streets-v12";case"navigation-day":return"mapbox://styles/mapbox/navigation-day-v1";case"navigation-night":return"mapbox://styles/mapbox/navigation-night-v1";default:return"mapbox://styles/mapbox/streets-v12"}}};var XEi=Symbol.for("constructDateFrom");function J0e(t,n,e="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:e}).format(n).split(/\s/g).slice(2).join(" ")}var tet={},XO={};function B0(t,n){try{let i=(tet[t]||=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format)(n).split("GMT")[1];return i in XO?XO[i]:eye(i,i.split(":"))}catch{if(t in XO)return XO[t];let e=t?.match(iet);return e?eye(t,e.slice(1)):NaN}}var iet=/([+-]\d\d):?(\d\d)?/;function eye(t,n){let e=+(n[0]||0),i=+(n[1]||0),o=+(n[2]||0)/60;return XO[t]=e*60+i>0?e*60+i+o:e*60-i-o}var bb=class t extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(B0(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),iye(this,NaN),zY(this)):this.setTime(Date.now())}static tz(n,...e){return e.length?new t(...e,n):new t(Date.now(),n)}withTimeZone(n){return new t(+this,n)}getTimezoneOffset(){let n=-B0(this.timeZone,this);return n>0?Math.floor(n):Math.ceil(n)}setTime(n){return Date.prototype.setTime.apply(this,arguments),zY(this),+this}[Symbol.for("constructDateFrom")](n){return new t(+new Date(n),this.timeZone)}},tye=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!tye.test(t))return;let n=t.replace(tye,"$1UTC");bb.prototype[n]&&(t.startsWith("get")?bb.prototype[t]=function(){return this.internal[n]()}:(bb.prototype[t]=function(){return Date.prototype[n].apply(this.internal,arguments),net(this),+this},bb.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),zY(this),+this}))});function zY(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-B0(t.timeZone,t)*60))}function net(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()),iye(t)}function iye(t){let n=B0(t.timeZone,t),e=n>0?Math.floor(n):Math.ceil(n),i=new Date(+t);i.setUTCHours(i.getUTCHours()-1);let o=-new Date(+t).getTimezoneOffset(),r=-new Date(+i).getTimezoneOffset(),a=o-r,p=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();a&&p&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+a);let f=o-e;f&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+f);let x=new Date(+t);x.setUTCSeconds(0);let I=o>0?x.getSeconds():(x.getSeconds()-60)%60,D=Math.round(-(B0(t.timeZone,t)*60))%60;(D||I)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+D),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+D+I));let P=B0(t.timeZone,t),R=P>0?Math.floor(P):Math.ceil(P),$=-new Date(+t).getTimezoneOffset()-R,W=R!==e,Q=$-f;if(W&&Q){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+Q);let se=B0(t.timeZone,t),ge=se>0?Math.floor(se):Math.ceil(se),Re=R-ge;Re&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+Re),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+Re))}}var Z5=class t extends bb{static tz(n,...e){return e.length?new t(...e,n):new t(Date.now(),n)}toISOString(){let[n,e,i]=this.tzComponents(),o=`${n}${e}:${i}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[n,e,i,o]=this.internal.toUTCString().split(" ");return`${n?.slice(0,-1)} ${i} ${e} ${o}`}toTimeString(){let n=this.internal.toUTCString().split(" ")[4],[e,i,o]=this.tzComponents();return`${n} GMT${e}${i}${o} (${J0e(this.timeZone,this)})`}toLocaleString(n,e){return Date.prototype.toLocaleString.call(this,n,gt(ve({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleDateString(n,e){return Date.prototype.toLocaleDateString.call(this,n,gt(ve({},e),{timeZone:e?.timeZone||this.timeZone}))}toLocaleTimeString(n,e){return Date.prototype.toLocaleTimeString.call(this,n,gt(ve({},e),{timeZone:e?.timeZone||this.timeZone}))}tzComponents(){let n=this.getTimezoneOffset(),e=n>0?"-":"+",i=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),o=String(Math.abs(n)%60).padStart(2,"0");return[e,i,o]}withTimeZone(n){return new t(+this,n)}[Symbol.for("constructDateFrom")](n){return new t(+new Date(n),this.timeZone)}};var UY="mainDiagnosis",HY="mainDiagnosisLeftAnchored",JO=class extends _p{constructor(n,e,i,o,r,a,p,f){super(UY,i,o,r,a,p,f,n,e)}},eP=class extends ih{constructor(n,e,i,o,r,a,p,f,x){super(HY,n,e,i,o,r,a,p,f,x)}};var jY="mainProcedure",GY="mainProcedureLeftAnchored",Y5=class extends _p{constructor(n,e,i,o,r,a,p,f){super(jY,i,o,r,a,p,f,n,e)}},Q5=class extends ih{constructor(n,e,i,o,r,a,p,f,x){super(GY,n,e,i,o,r,a,p,f,x)}};var $Y="opsCode",qY="opsCodeLeftAnchored",tA=class extends _p{constructor(n,e,i,o,r,a,p,f){super($Y,i,o,r,a,p,f,n,e)}},X5=class extends ih{constructor(n,e,i,o,r,a,p,f,x){super(qY,n,e,i,o,r,a,p,f,x)}};var iA=class extends pa{constructor(n,e=null,i=null){super(n),this.from=e,this.to=i}toJSON(){return{[this.id]:{from:this.from,to:this.to}}}};var WY="skCode",KY="skCodeLeftAnchored",J5=class extends _p{constructor(n,e,i,o,r,a,p,f){super(WY,i,o,r,a,p,f,n,e)}},e6=class extends ih{constructor(n,e,i,o,r,a,p,f,x){super(KY,n,e,i,o,r,a,p,f,x)}};var ZY="secondaryDiagnosis",YY="secondaryDiagnosisLeftAnchored",tP=class extends _p{constructor(n,e,i,o,r,a,p,f){super(ZY,i,o,r,a,p,f,n,e)}},iP=class extends ih{constructor(n,e,i,o,r,a,p,f,x){super(YY,n,e,i,o,r,a,p,f,x)}};var oye="true",nA=class extends pa{constructor(){super(oye)}toJSON(){return{[oye]:{}}}};var t6=class{constructor(n){this._baseUrl=n}crud(){return`${this._baseUrl}/`}};var qg=class extends UO{constructor(n,e,i,o){super(n,e,i),this._httpClient=o,this._api=new t6(this.getBaseUrl())}availableLabels(){let n=`${this._api.crud()}files/labels/available`;return this._httpClient.get(n)}create(n,e){throw new Error("Method not implemented.")}upload(n,e){let i=`${this._api.crud()}files/create`,o=new FormData;if(e){let r=new Mr({fromObject:{labels:e}});i=i.concat("?").concat(r.toString())}return o.append("file",n),this._httpClient.post(i,o)}downloadFile(n){let e=`${this._api.crud()}files/${n}/download`;return this._httpClient.get(e,{responseType:"blob"})}findAll(n,e,i=new nA){let o=`${this._api.crud()}files/`;return this._httpClient.post(o,{condition:i})}findById(n){let e=`${this._api.crud()}files/${n}`;return this._httpClient.get(e)}update(n,e,i=null){let o=`${this._api.crud()}files/${n.id}/update`;return this._httpClient.put(o,{labels:i}).pipe(wo(()=>kl))}};function oet(t,n){if(t&1){let e=Bt();K(0,"bd-user-files-new-dialog-form",7),Qe("formChange",function(o){Ee(e);let r=V();return Ae(r.onFormChange(o))}),Z()}if(t&2){let e=V();B("form",e.form)}}var rye=(()=>{class t{constructor(e,i){this._dialogRef=e,this._fileService=i,this.upload$=new xi,this.form={file:null,labels:[]},this.isValid=!1}onFormChange(e){this.form=e,this.isValid=!!this.form&&!!this.form.file}upload(){this.upload$.next(Cn.LOADING),this._fileService.upload(this.form.file,this.form.labels).subscribe(e=>{this.upload$.next(Cn.SUCCESS),this._dialogRef.close(e)})}static{this.\u0275fac=function(i){return new(i||t)(rt(ug),rt(qg))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-user-files-new-dialog"]],decls:13,vars:5,consts:[["initTpl",""],["mat-dialog-title",""],["mat-dialog-content",""],[3,"initTemplate","loadItem"],["mat-dialog-actions","",3,"align"],["mat-button","",3,"mat-dialog-close"],["mat-raised-button","","color","accent",3,"click","disabled"],[3,"formChange","form"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div")(1,"span",1),Ce(2,"Datei hochladen"),Z()(),K(3,"div",2),Oe(4,"bd-loader",3),Z(),K(5,"div",4)(6,"button",5),Ce(7,"Abbrechen"),Z(),Mi(8),K(9,"button",6),Qe("click",function(){return Ee(r),Ae(o.upload())}),Ce(10," Hochladen "),Z(),Ri(),Z(),le(11,oet,1,1,"ng-template",null,0,Hi)}if(i&2){let r=un(12);L(4),B("initTemplate",r)("loadItem",o.upload$),L(),B("align","end"),L(),B("mat-dialog-close",null),L(3),B("disabled",!o.isValid)}},dependencies:[EM,C1,mr,w1,Jo,_s,TM,$0e],encapsulation:2})}}return t})();var sye=(()=>{class t{constructor(e,i){this._dialog=e,this._responsiveDialogService=i,this.created=new yt}openNewDialog(){let e=this._responsiveDialogService.config();this._dialog.open(rye,e).afterClosed().pipe(Ko(1),ro(i=>!!i)).subscribe(i=>{this.created.emit(i)})}static{this.\u0275fac=function(i){return new(i||t)(rt(pg),rt(rT))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-user-downloads-new"]],outputs:{created:"created"},decls:2,vars:0,consts:[["mat-raised-button","","color","accent",3,"click"]],template:function(i,o){i&1&&(K(0,"button",0),Qe("click",function(){return o.openNewDialog()}),Ce(1," Neue Datei hochladen "),Z())},dependencies:[Jo,_s],encapsulation:2})}}return t})();function ret(t,n){if(t&1&&Oe(0,"bd-resources-list",6),t&2){let e=V(2);B("resources",e.files)("options",e.listOptions)}}function set(t,n){t&1&&Oe(0,"bd-message-empty",7)}function aet(t,n){if(t&1&&(K(0,"div",2),Lt(1,ret,1,2,"bd-resources-list",6),Lt(2,set,1,0,"bd-message-empty",7),Z()),t&2){let e=V();L(),Ft((e.files==null?null:e.files.length)>0?1:-1),L(),Ft((e.files==null?null:e.files.length)===0?2:-1)}}var aye=(()=>{class t{constructor(e,i){this._userFilesService=e,this._environmentService=i,this.loading$=new mo(1),this.listOptions=gt(ve({},jE),{detailLinkFnc:o=>["/user","files",o.id],showLabelsColumn:!0}),this.p21ImportUrl=this._environmentService.load("AYS_VIRTUAL_CLINIC_P21_IMPORT_APP")+"/new"}ngOnInit(){this._fetchFiles()}onFileCreated(e){this.files=[e,...this.files]}_fetchFiles(){this.loading$.next(Cn.LOADING),this._userFilesService.findAll(null,null).subscribe(e=>{this.files=e,this.loading$.next(Cn.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(rt(qg),rt(br))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:11,vars:3,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"bd-container"],[1,"flex","flex-row-reverse","gap-6"],[3,"created"],["mat-raised-button","","color","accent","target","_blank",3,"href"],[3,"resources","options"],["message","Keine Dateien gefunden"]],template:function(i,o){if(i&1){let r=Bt();K(0,"bd-toolbar")(1,"span"),Ce(2,"File-Center"),Z()(),Oe(3,"bd-loader",1),K(4,"div",2)(5,"div",3)(6,"bd-user-downloads-new",4),Qe("created",function(p){return Ee(r),Ae(o.onFileCreated(p))}),Z(),K(7,"a",5),Ce(8," Struktur- und Leistungsdaten hochladen "),Z()()(),le(9,aet,3,2,"ng-template",null,0,Hi)}if(i&2){let r=un(10);L(3),B("loadItem",o.loading$)("successTemplate",r),L(4),B("href",o.p21ImportUrl,ja)}},dependencies:[Mu,mr,sye,EY,Ca,Jo,_s],encapsulation:2})}}return t})();var uye=fu(lR());var i6=class{constructor(n){this._environmentService=n}base(){return this._environmentService.load("BD_PERMISSION_RESOURCE_URL")}archive(n,e){return`${this.base()}/archive/${n}/${e}`}sharedResourceWithPermission(n,e,i){return`${this.base()}/shared/${n}/${e}/${i}`}sharedResources(n){return`${this.base()}/shared/${n}`}};var XY=(()=>{class t{constructor(e,i){this._httpClient=e,this._environmentService=i,this._cache={},this._store=new i6(this._environmentService)}hasPermission(e,i,o){let r=this._getKey(i,e,o),a=this._cache[r];if(!a){let p=this._store.sharedResourceWithPermission(e,i,o);a=this._httpClient.get(p).toPromise().then(()=>!0).catch(()=>!1),this._cache[r]=a}return a}archive(e,i){let o=this._store.archive(e,i);return this._httpClient.delete(o)}sharedResources(e,i="READ",o="CREATOR"){let r=this._store.sharedResources(e),a=new Mr;return a=a.set("minPermission",i),a=a.set("maxPermission",o),this._httpClient.get(r,{params:a})}_getKey(e,i,o){return`${e}_${i}_${o}`}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var bet=()=>["/user","files"];function xet(t,n){if(t&1&&(K(0,"span",5),Ce(1),el(2,"date"),Z()),t&2){let e=V();L(),Di(Ec(2,1,e.userFile.createdDate,"short"))}}function Cet(t,n){if(t&1&&Oe(0,"p-chip",10),t&2){let e=n.$implicit;B("label",e)}}function wet(t,n){if(t&1&&(K(0,"div",9),ea(1,Cet,1,1,"p-chip",10,ed),Z()),t&2){let e=V(2);L(),ta(e.userFile.labels)}}function Iet(t,n){if(t&1&&(K(0,"div",3)(1,"div",4)(2,"span",5),Ce(3,"Labels:"),Z()(),K(4,"div",0),Lt(5,wet,3,0,"div",9),Z()()),t&2){let e=V();L(5),Ft(e.userFile.labels?5:-1)}}var pye=(()=>{class t{constructor(e,i,o,r){this._activatedRoute=e,this._fileService=i,this._permissionService=o,this._router=r,this.resourceInfoMenuConfig={showDeleteButton:!0,showEditButton:!1},this._activatedRoute.params.pipe(ro(a=>!!a.fileId),wo(a=>this._fileService.findById(a.fileId))).subscribe(a=>{this.userFile=a})}delete(){this._permissionService.archive(jo.FILE,this.userFile.id).pipe(Ko(1)).subscribe(()=>{this._router.navigate(["/user","files"])})}downloadFile(){this._fileService.downloadFile(this.userFile.id).subscribe(e=>{uye.saveAs(e,this.userFile.name)})}static{this.\u0275fac=function(i){return new(i||t)(rt(Ac),rt(qg),rt(XY),rt(aa))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-user-file-details"]],decls:18,vars:8,consts:[[1,"flex-1"],[3,"deleteResource","resource","config"],[1,"bd-container-inner"],[1,"flex","flex-row"],[1,"basis-1/5"],[1,"mat-body-1"],[1,"flex","flex-row-reverse","gap-6"],["mat-raised-button","","color","accent",3,"click","disabled"],["mat-button","",3,"routerLink"],[1,"card","flex","items-center","gap-2","flex-wrap"],[3,"label"]],template:function(i,o){i&1&&(K(0,"bd-toolbar")(1,"span",0),Ce(2),Z(),K(3,"bd-resources-info-menu",1),Qe("deleteResource",function(){return o.delete()}),Z()(),K(4,"div",2)(5,"div",3)(6,"div",4)(7,"span",5),Ce(8,"Erstellt:"),Z()(),K(9,"div",0),Lt(10,xet,3,4,"span",5),Z()(),Lt(11,Iet,6,1,"div",3),Oe(12,"mat-divider"),K(13,"div",6)(14,"button",7),Qe("click",function(){return o.downloadFile()}),Ce(15," Herunterladen "),Z(),K(16,"a",8),Ce(17,"Zur \xDCbersicht"),Z()()()),i&2&&(L(2),Di(o.userFile==null?null:o.userFile.name),L(),B("resource",o.userFile)("config",o.resourceInfoMenuConfig),L(7),Ft(o.userFile?10:-1),L(),Ft(o.userFile!=null&&o.userFile.labels?11:-1),L(3),B("disabled",!o.userFile),L(2),B("routerLink",Is(7,bet)))},dependencies:[Mu,U_e,Wd,th,Jo,_s,ba,qE,r1],styles:["mat-divider[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var Tet=[{path:"downloads",redirectTo:"files"},{path:"files",children:[{path:"",pathMatch:"full",component:aye,canActivate:[HE],data:{pageTitle:jd.title("File-Center")}},{path:":fileId",component:pye,canActivate:[HE],data:{pageTitle:jd.title("File-Center")}}]}],hOi=fd.forChild(Tet);var o6=class{constructor(n,e,i,o,r,a){this._hubspotFormService=n,this._input=e,this._config=i,this._authenticated=o,this._fileService=r,this._contact=a,this._updateIsValid()}export(){let n;this._authenticated?n=vr(this._input.data.getExport()):(this._config.authenticationStrategy==="contact"?n=this._exportContact():this._config.authenticationStrategy==="reduce"&&(n=this._exportReduced()),this._input.saveInDownloadCenter=!1);let e=n.pipe(wo(i=>{let o=this._getExportConverter(i);return vr(o.process())}));return this._input.saveInDownloadCenter&&(e=e.pipe(wo(i=>{let o=new File([i.result],`${this._input.filename}.${this._input.exportType}`);return this._fileService.upload(o,this._input.labels||[]).pipe(vi(()=>i))}))),e}_exportContact(){let n=this.config.authenticationStrategyConfig;return this._hubspotFormService.sendForm(n.portalId,n.formId,this._contact?.toRequestBody(),this._contact?.data.privacyConsent,window.location.href,`Export ${this._input.filename}`).pipe(wo(()=>vr(this._input.data.getExport())))}_exportReduced(){return vr(this._input.data.getExport()).pipe(vi(n=>{let e=this.config.authenticationStrategyConfig.resultSetCount;return Array.isArray(n)?gt(ve({},n[0]),{data:n[0].data.slice(0,e)}):gt(ve({},n),{data:n.data.slice(0,e)})}))}_getExportConverter(n){let e=yfe.getPreferredLocale(),i;if(this._input.exportType==="csv"){if(Array.isArray(n))throw new Error("CSV converter can not handle more than one BdExportAsFileDataSheet");i=new nV(Promise.resolve(n),e,this._input.filename)}else this._input.exportType==="xlsx"&&(i=new iV(Promise.resolve(n),e,this._input.filename));return i}_updateIsValid(){let n=!0;(!this._exportInputIsValid()||!this.authenticated&&this._config.authenticationStrategy==="contact"&&(!this._contact||!this._contact.dataIsValid()))&&(n=!1),this.isValid=n}_exportInputIsValid(){return!!this._input.exportType&&!!this._input.data&&!!this._input.filename}get input(){return this._input}set input(n){this._input=n,this._updateIsValid()}get config(){return this._config}set config(n){this._config=n,this._updateIsValid()}get authenticated(){return this._authenticated}set authenticated(n){this._authenticated=n,this._updateIsValid()}get contact(){return this._contact}set contact(n){this._contact=n,this._updateIsValid()}};var wye=fu(lR());var hye=(()=>{class t{constructor(e){this._http=e}sendForm(e,i,o,r,a,p){o=o.filter(D=>!!D.value);let f=`https://api.hsforms.com/submissions/v3/integration/submit/${e}/${i}`,x=this._getCookie("hubspotutk"),I={pageUri:a,pageName:p};return x&&(I.hutk=x),this._http.post(f,{fields:o,context:I,legalConsentOptions:{consent:{consentToProcess:!0,text:"Indem Sie unten auf \u201EEinsenden\u201C klicken, stimmen Sie zu, dass BinDoc die oben angegebenen pers\xF6nlichen Daten speichert und verarbeitet, um Ihnen die angeforderten Inhalte bereitzustellen.",communications:[{value:r,subscriptionTypeId:5651662,text:"Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten."}]}}})}_getCookie(e){let i=document.cookie.split(";"),o=i.length,r=`${e}=`,a;for(let p=0;p{class t{_elementRef=re(_n);_changeDetectorRef=re(Ho);_ngZone=re(on);_animationsDisabled=xa();_options=re(Pet,{optional:!0});focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new JY;return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"};ariaLabel="";ariaLabelledby=null;ariaDescribedby;ariaExpanded;ariaControls;ariaOwns;_uniqueId;id;get inputId(){return`${this.id||this._uniqueId}-input`}required;labelPosition="after";name=null;change=new yt;indeterminateChange=new yt;value;disableRipple;_inputElement;_labelElement;tabIndex;color;disabledInteractive;_onTouched=()=>{};_currentAnimationClass="";_currentCheckState=Kd.Init;_controlValueAccessorChangeFn=()=>{};_validatorChangeFn=()=>{};constructor(){re(Ol).load(hg);let e=re(new og("tabindex"),{optional:!0});this._options=this._options||mye,this.color=this._options.color||mye.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=re(qa).getId("mat-mdc-checkbox-"),this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this.indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}_checked=!1;get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}_disabled=!1;get indeterminate(){return this._indeterminate()}set indeterminate(e){let i=e!=this._indeterminate();this._indeterminate.set(e),i&&(e?this._transitionCheckState(Kd.Indeterminate):this._transitionCheckState(this.checked?Kd.Checked:Kd.Unchecked),this.indeterminateChange.emit(e)),this._syncIndeterminate(e)}_indeterminate=Jn(!1);_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let i=this._currentCheckState,o=this._getAnimationTargetElement();if(!(i===e||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let r=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(r)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate.set(!1),this.indeterminateChange.emit(!1)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Kd.Checked:Kd.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if(this._animationsDisabled)return"";switch(e){case Kd.Init:if(i===Kd.Checked)return this._animationClasses.uncheckedToChecked;if(i==Kd.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Kd.Unchecked:return i===Kd.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Kd.Checked:return i===Kd.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Kd.Indeterminate:return i===Kd.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-checkbox"]],viewQuery:function(i,o){if(i&1&&(Qi(Met,5),Qi(Ret,5)),i&2){let r;Je(r=et())&&(o._inputElement=r.first),Je(r=et())&&(o._labelElement=r.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(i,o){i&2&&(Bo("id",o.id),Xe("tabindex",null)("aria-label",null)("aria-labelledby",null),Ge(o.color?"mat-"+o.color:"mat-accent"),fo("_mat-animation-noopable",o._animationsDisabled)("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked)("mat-mdc-checkbox-disabled-interactive",o.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",lt],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",lt],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",lt],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:wn(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",lt],checked:[2,"checked","checked",lt],disabled:[2,"disabled","disabled",lt],indeterminate:[2,"indeterminate","indeterminate",lt]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[Pi([{provide:Wa,useExisting:Br(()=>t),multi:!0},{provide:Iv,useExisting:t,multi:!0}]),In],ngContentSelectors:Oet,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(i,o){if(i&1){let r=Bt();eo(),K(0,"div",3),Qe("click",function(p){return Ee(r),Ae(o._preventBubblingFromLabel(p))}),K(1,"div",4,0)(3,"div",5),Qe("click",function(){return Ee(r),Ae(o._onTouchTargetClick())}),Z(),K(4,"input",6,1),Qe("blur",function(){return Ee(r),Ae(o._onBlur())})("click",function(){return Ee(r),Ae(o._onInputClick())})("change",function(p){return Ee(r),Ae(o._onInteractionEvent(p))}),Z(),Oe(6,"div",7),K(7,"div",8),oi(),K(8,"svg",9),Oe(9,"path",10),Z(),W_(),Oe(10,"div",11),Z(),Oe(11,"div",12),Z(),K(12,"label",13,2),yn(14),Z()()}if(i&2){let r=un(2);B("labelPosition",o.labelPosition),L(4),fo("mdc-checkbox--selected",o.checked),B("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled&&!o.disabledInteractive)("id",o.inputId)("required",o.required)("tabIndex",o.disabled&&!o.disabledInteractive?-1:o.tabIndex),Xe("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("aria-controls",o.ariaControls)("aria-disabled",o.disabled&&o.disabledInteractive?!0:null)("aria-expanded",o.ariaExpanded)("aria-owns",o.ariaOwns)("name",o.name)("value",o.value),L(7),B("matRippleTrigger",r)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),L(),B("for",o.inputId)}},dependencies:[aT,Kpe],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})(),oA=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[NC,Xo,Xo]})}return t})();var nP=class extends qs{constructor(){super(),this.valid=!0,this.searching=!0,this.selectCtrl=new dc,this.allOptions=new mo(1),this._onDestroy=new xi}init(n){this.placeholderLabel=`${n.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${n.selectLabel} gefunden`,this.selectCtrl.valueChanges.pipe(Wr(this._onDestroy)).subscribe(()=>{this.onSelectionChange(this.selectCtrl.value)}),n.valid$&&n.valid$.pipe(Wr(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(n,e){this.selectCtrl.setValue(n,e)}};var Let=()=>["searchTerm"];function Fet(t,n){if(t&1&&(K(0,"small",2),Ce(1),Z()),t&2){let e=V();B("id",e.selectConfig.id+"-help"),L(),Di(e.errorMessage)}}var Wg=(()=>{class t extends nP{constructor(){super(),this.initialSelection=void 0,this.selectOptions=Ni([]),this.selection=new yt,this.optionsChange=new yt,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"single-select",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,resetOption:!1,valid$:new mo(1)},this._initialSelection$=new pm,this._subs.push(_u([this._initialSelection$.pipe(Ko(1),vi(e=>this.transformToWrapper(e))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=gt(ve({id:`single-select-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new mo(1),resetOption:!1},this.config),{option:ve({searchOptionDisplayName:i=>this.config.option.searchOptionDisplayName?this.config.option.searchOptionDisplayName(i):this.config.option.searchOptionAccessor(i)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Co?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}onSelectionChange(e){e?this.selection.emit(e.realValue):this.selection.emit(void 0)}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this._subs.push(this.selectOptions.pipe(vi(e=>e.map(i=>this.transformToWrapper(i)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.option.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-ui-single-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Rt,In],decls:6,vars:20,consts:[["fluid","","variant","filled","dataKey","dataKey","optionLabel","displayName","filterBy","searchTerm",3,"inputId","formControl","options","data-test","loading","showClear","filter","filterFields","filterPlaceholder","emptyFilterMessage","emptyMessage","overlayOptions"],[3,"for"],[3,"id"]],template:function(i,o){i&1&&(K(0,"p-iftalabel"),Oe(1,"p-select",0),el(2,"async"),K(3,"label",1),Ce(4),Z(),Lt(5,Fet,2,2,"small",2),Z()),i&2&&(L(),Ge(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),B("inputId",o.selectConfig.id)("formControl",o.selectCtrl)("options",Dk(2,17,o.allOptions))("data-test",o.selectConfig.id)("loading",o.searching)("showClear",o.selectConfig.resetOption)("filter",!0)("filterFields",Is(19,Let))("filterPlaceholder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions),L(2),B("for",o.selectConfig.id),L(),Di(o.selectConfig==null?null:o.selectConfig.selectLabel),L(),Ft(o.errorMessage?5:-1))},dependencies:[rp,il,$p,vg,bg,Ru,Vk],encapsulation:2,changeDetection:0})}}return t})();var Net=()=>[];function Bet(t,n){if(t&1){let e=Bt();K(0,"bd-ui-labels-input",6),Qe("labelsChange",function(o){Ee(e);let r=V(2);return Ae(r.onLabelsChange(o))}),Z()}if(t&2){let e=V(2);B("labels",e.input.labels||Is(1,Net))}}function zet(t,n){if(t&1&&(K(0,"div")(1,"mat-checkbox",4),Ce(2,"Zus\xE4tzlich im File-Center ablegen "),Z()(),Lt(3,Bet,1,2,"bd-ui-labels-input",5)),t&2){let e=V();L(),B("formControl",e.saveInDownloadCenterFormControl),L(2),Ft(e.input.saveInDownloadCenter?3:-1)}}var gye=(()=>{class t{constructor(){this.inputChange=new yt,this.exportTypeConfig={id:"export-type-select",selectLabel:"Typ",resetOption:!1,option:{sortFnc:(e,i)=>e.label.localeCompare(i.label),uniqueFnc:e=>e.value,searchOptionAccessor:e=>e.label}},this.fileNameFormControl=new dc(null,Bd.required),this.exportTypeOptions=zx,this.saveInDownloadCenterFormControl=new dc(!1),this.fileNameFormControl.valueChanges.pipe(Zu(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=Ni(this.config.form.availableExportTypes.map(e=>({value:e,label:e==="csv"?"CSV":"XLSX (Excel)"}))))}ngOnChanges(e){e.input&&this._onInputChange(),e.authenticated&&this._onAuthenticatedChange()}onExportTypeChange(e){this.input.exportType=e.value,this.inputChange.emit(this.input)}onLabelsChange(e){this.input.labels=e,this.inputChange.emit(this.input)}_onAuthenticatedChange(){this.authenticated||(this.input.saveInDownloadCenter=!1,this.input.labels=[])}_onInputChange(){this._setFileNameFormControl(),this._setSaveInDownloadCenterFormControl(),this.input&&this.input.exportType&&(this.exportTypeInitial={value:this.input.exportType,label:""})}_setFileNameFormControl(){this.fileNameFormControl.setValue(this.input.filename)}_setSaveInDownloadCenterFormControl(){this.saveInDownloadCenterFormControl.setValue(this.input.saveInDownloadCenter)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-export-as-file-dialog-form"]],inputs:{input:"input",config:"config",authenticated:"authenticated"},outputs:{inputChange:"inputChange"},features:[In],decls:11,vars:6,consts:[[1,"export-form"],[3,"selection","config","selectOptions","initialSelection"],["type","text","matInput","","data-test","export-file-name",3,"formControl"],["matSuffix",""],[3,"formControl"],[3,"labels"],[3,"labelsChange","labels"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div")(2,"bd-ui-single-select",1),Qe("selection",function(a){return o.onExportTypeChange(a)}),Z()(),K(3,"div")(4,"mat-form-field")(5,"mat-label"),Ce(6,"Name"),Z(),Oe(7,"input",2),K(8,"span",3),Ce(9),Z()()(),Lt(10,zet,4,2),Z()),i&2&&(L(2),B("config",o.exportTypeConfig)("selectOptions",o.exportTypeOptions)("initialSelection",o.exportTypeInitial),L(5),B("formControl",o.fileNameFormControl),L(2),qn(".",o.input.exportType),L(),Ft(o.authenticated?10:-1))},dependencies:[zd,vd,Lm,nW,rp,Sv,il,$p,Av,Ev,oA,NC,jO,Wg],encapsulation:2})}}return t})();var r6=class{constructor(n){this.data=n}dataIsValid(){return!!this.data.email&&!!this.data.firstname&&!!this.data.lastname&&this.data.privacyConsent}toRequestBody(){let n=[];return n.push({name:"email",value:this.data.email}),this.data.company&&n.push({name:"company",value:this.data.company}),n.push({name:"lastname",value:this.data.lastname}),n.push({name:"firstname",value:this.data.firstname}),n.push({name:"mobilephone",value:this.data.mobilephone}),n}};function Vet(t,n){t&1&&(K(0,"mat-error"),Ce(1," Bitte geben Sie ihren Vorname an"),Z())}function Uet(t,n){t&1&&(K(0,"mat-error"),Ce(1," Bitte geben Sie ihren Nachname an"),Z())}function Het(t,n){t&1&&(K(0,"mat-error"),Ce(1," Ung\xFCltige Email-Adresse"),Z())}function jet(t,n){t&1&&(K(0,"mat-error"),Ce(1," Bitte geben Sie eine Email an"),Z())}function Get(t,n){t&1&&(K(0,"mat-error"),Ce(1," Ung\xFCltige Nummer"),Z())}function $et(t,n){t&1&&(K(0,"mat-error"),Ce(1," Mindestens 7 Stellen"),Z())}function qet(t,n){t&1&&(K(0,"mat-error"),Ce(1," Maximal 20 Stellen"),Z())}var _ye=(()=>{class t{constructor(){this.contact=new r6({company:null,firstname:null,lastname:null,email:null,mobilephone:null,privacyConsent:!0}),this.contactChange=new yt,this.form=new dT({email:new dc(null,[Bd.email,Bd.required]),firstname:new dc(null,[Bd.required]),lastname:new dc(null,[Bd.required]),company:new dc(null,[]),mobilephone:new pT(null,[Bd.minLength(7),Bd.maxLength(20)]),privacyConsent:new dc(!0,[Bd.requiredTrue])}),this.form.valueChanges.subscribe(e=>{this.contact.data=e,this.contactChange.emit(this.contact)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-export-as-file-dialog-form-hubspot-contact"]],inputs:{contact:"contact"},outputs:{contactChange:"contactChange"},decls:50,vars:8,consts:[[3,"formGroup"],[1,"flex","flex-col","gap-2"],[1,"flex-1"],["matInput","","type","text","formControlName","company"],[1,"flex","flex-row","gap-6"],["matInput","","type","text","formControlName","firstname","required",""],["matInput","","type","text","formControlName","lastname","required",""],["matInput","","type","email","formControlName","email","required",""],[1,"basis-1/2"],["matInput","","type","tel","formControlName","mobilephone"],[1,"mat-body"],["formControlName","privacyConsent"]],template:function(i,o){i&1&&(K(0,"form",0)(1,"div",1)(2,"div",2)(3,"mat-form-field")(4,"mat-label"),Ce(5,"Firma"),Z(),Oe(6,"input",3),Z()(),K(7,"div",2)(8,"div",4)(9,"div",2)(10,"mat-form-field")(11,"mat-label"),Ce(12,"Vorname"),Z(),Oe(13,"input",5),Lt(14,Vet,2,0,"mat-error"),Z()(),K(15,"div",2)(16,"mat-form-field")(17,"mat-label"),Ce(18,"Nachname"),Z(),Oe(19,"input",6),Lt(20,Uet,2,0,"mat-error"),Z()()()(),K(21,"div",2)(22,"mat-form-field")(23,"mat-label"),Ce(24,"Email"),Z(),Oe(25,"input",7),Lt(26,Het,2,0,"mat-error"),Lt(27,jet,2,0,"mat-error"),Z()(),K(28,"div",2)(29,"div",4)(30,"div",8)(31,"mat-form-field")(32,"mat-label"),Ce(33,"Telefon"),Z(),Oe(34,"input",9),Lt(35,Get,2,0,"mat-error"),Lt(36,$et,2,0,"mat-error"),Lt(37,qet,2,0,"mat-error"),Z()()()(),K(38,"div",2)(39,"span",10),Ce(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: "),Z()(),K(41,"div",2)(42,"mat-checkbox",11),Ce(43," Ich stimme zu, andere Benachrichtigungen von BinDoc zu erhalten. "),Z()(),K(44,"div",2)(45,"span",10),Ce(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."),Z()(),K(47,"div",2)(48,"span",10),Ce(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."),Z()()()()),i&2&&(B("formGroup",o.form),L(14),Ft(o.form.get("firstname").hasError("required")?14:-1),L(6),Ft(o.form.get("lastname").hasError("required")?20:-1),L(6),Ft(o.form.get("email").hasError("email")&&!o.form.get("email").hasError("required")?26:-1),L(),Ft(o.form.get("email").hasError("required")?27:-1),L(8),Ft(o.form.get("mobilephone").hasError("number")?35:-1),L(),Ft(o.form.get("mobilephone").hasError("minlength")?36:-1),L(),Ft(o.form.get("mobilephone").hasError("maxlength")?37:-1))},dependencies:[rp,sz,Sv,il,nz,zM,T1,Qq,zd,vd,Lm,tW,Av,Ev,oA,NC],encapsulation:2})}}return t})();var yye=(()=>{class t extends Ao{pFocusTrapDisabled=!1;platformId=re(Xc);document=re(zn);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){super.ngOnInit(),ns(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(e){super.ngOnChanges(e),e.pFocusTrapDisabled&&ns(this.platformId)&&(e.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??""}`}createHiddenFocusableElements(){let i=o=>She("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:"0",role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:o?.bind(this)});this.firstHiddenFocusableElement=i(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=i(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.el.nativeElement.prepend(this.firstHiddenFocusableElement),this.el.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(e){let{currentTarget:i,relatedTarget:o}=e,r=o===this.lastHiddenFocusableElement||!this.el.nativeElement?.contains(o)?vT(i.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;cs(r)}onLastHiddenElementFocus(e){let{currentTarget:i,relatedTarget:o}=e,r=o===this.firstHiddenFocusableElement||!this.el.nativeElement?.contains(o)?bT(i.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;cs(r)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275dir=Ki({type:t,selectors:[["","pFocusTrap",""]],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",lt]},features:[Rt,In]})}return t})();var vye=` .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 Wet={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"}},Ket={mask:({instance:t})=>{let e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(i=>i===t.position);return["p-dialog-mask",{"p-overlay-mask p-overlay-mask-enter":t.modal},e?`p-dialog-${e}`:""]},root:({instance:t})=>["p-dialog p-component",{"p-dialog-maximized":t.maximizable&&t.maximized}],header:"p-dialog-header",title:"p-dialog-title",resizeHandle:"p-resizable-handle",headerActions:"p-dialog-header-actions",pcMaximizeButton:"p-dialog-maximize-button",pcCloseButton:"p-dialog-close-button",content:()=>["p-dialog-content"],footer:"p-dialog-footer"},bye=(()=>{class t extends to{name="dialog";theme=vye;classes=Ket;inlineStyles=Wet;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var GLi=fg([hl({transform:"{{transform}}",opacity:0}),Kl("{{transition}}")]),$Li=fg([Kl("{{transition}}",hl({transform:"{{transform}}",opacity:0}))]);var Zet=["mask"],Yet=["content"],Qet=["footer"],Xet=["titlebar"],Jet=(t,n,e)=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex","justify-content":t,"align-items":n,"pointer-events":e}),ett=t=>({"p-dialog p-component":!0,"p-dialog-maximized":t}),ttt=()=>({display:"flex","flex-direction":"column","pointer-events":"auto"}),itt=(t,n)=>({transform:t,transition:n}),ntt=t=>({value:"visible",params:t});function ott(t,n){if(t&1){let e=Bt();K(0,"div",15),Qe("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.initResize(o))}),Z()}t&2&&B("ngClass","p-resizable-handle")}function rtt(t,n){t&1&&Oi(0)}function stt(t,n){t&1&&(oi(),Oe(0,"svg",24))}function att(t,n){}function ltt(t,n){t&1&&le(0,att,0,0,"ng-template")}function ctt(t,n){if(t&1&&(Mi(0),le(1,stt,1,0,"svg",22)(2,ltt,1,0,null,23),Ri()),t&2){let e=V(6);L(),B("ngIf",!e.maximizeIconTemplate),L(),B("ngTemplateOutlet",e.maximizeIconTemplate)}}function dtt(t,n){t&1&&(oi(),Oe(0,"svg",26))}function utt(t,n){}function ptt(t,n){t&1&&le(0,utt,0,0,"ng-template")}function htt(t,n){if(t&1&&(Mi(0),le(1,dtt,1,0,"svg",25)(2,ptt,1,0,null,23),Ri()),t&2){let e=V(6);L(),B("ngIf",!e.minimizeIconTemplate),L(),B("ngTemplateOutlet",e.minimizeIconTemplate)}}function mtt(t,n){if(t&1&&le(0,ctt,3,2,"ng-container",12)(1,htt,3,2,"ng-container",12),t&2){let e=V(5);B("ngIf",!e.maximized),L(),B("ngIf",e.maximized)}}function ftt(t,n){if(t&1){let e=Bt();K(0,"p-button",21),Qe("onClick",function(){Ee(e);let o=V(4);return Ae(o.maximize())})("keydown.enter",function(){Ee(e);let o=V(4);return Ae(o.maximize())}),le(1,mtt,2,2,"ng-template",null,4,Hi),Z()}if(t&2){let e=V(4);B("styleClass","p-dialog-maximize-button")("tabindex",e.maximizable?"0":"-1")}}function gtt(t,n){t&1&&(oi(),Oe(0,"svg",29))}function _tt(t,n){}function ytt(t,n){t&1&&le(0,_tt,0,0,"ng-template")}function vtt(t,n){if(t&1&&le(0,gtt,1,0,"svg",28)(1,ytt,1,0,null,23),t&2){let e=V(5);B("ngIf",!e.closeIconTemplate),L(),B("ngTemplateOutlet",e.closeIconTemplate)}}function btt(t,n){if(t&1){let e=Bt();K(0,"p-button",27),Qe("onClick",function(){Ee(e);let o=V(4);return Ae(o.hide())})("keydown.enter",function(){Ee(e);let o=V(4);return Ae(o.hide())}),le(1,vtt,2,2,"ng-template",null,4,Hi),Z()}if(t&2){let e=V(4);B("styleClass","p-dialog-close-button"),ul("ariaLabel",e.ddconfig.closeAriaLabel||e.defaultCloseAriaLabel)}}function xtt(t,n){if(t&1&&(Mi(0),K(1,"span",17),Ce(2),Z(),K(3,"div",18),le(4,ftt,3,2,"p-button",19)(5,btt,3,2,"p-button",20),Z(),Ri()),t&2){let e=V(3);L(),B("ngClass","p-dialog-title")("id",e.ariaLabelledBy),L(),Di(e.ddconfig.header),L(),B("ngClass","p-dialog-header-actions"),L(),B("ngIf",e.ddconfig.maximizable),L(),B("ngIf",e.closable)}}function Ctt(t,n){if(t&1){let e=Bt();K(0,"div",16,3),Qe("mousedown",function(o){Ee(e);let r=V(2);return Ae(r.initDrag(o))}),le(2,rtt,1,0,"ng-container",13)(3,xtt,6,6,"ng-container",12),Z()}if(t&2){let e=V(2);B("ngClass","p-dialog-header"),L(2),B("ngComponentOutlet",e.headerTemplate),L(),B("ngIf",!e.headerTemplate)}}function wtt(t,n){}function Stt(t,n){t&1&&le(0,wtt,0,0,"ng-template",30)}function Itt(t,n){t&1&&Oi(0)}function Ttt(t,n){if(t&1&&(Mi(0),Ce(1),Ri()),t&2){let e=V(3);L(),qn(" ",e.ddconfig.footer," ")}}function Ett(t,n){t&1&&Oi(0)}function Att(t,n){if(t&1&&(K(0,"div",18,5),le(2,Ttt,2,1,"ng-container",12)(3,Ett,1,0,"ng-container",13),Z()),t&2){let e=V(2);B("ngClass","p-dialog-footer"),L(2),B("ngIf",!e.footerTemplate),L(),B("ngComponentOutlet",e.footerTemplate)}}function Dtt(t,n){if(t&1){let e=Bt();K(0,"div",8,1),Qe("@animation.start",function(o){Ee(e);let r=V();return Ae(r.onAnimationStart(o))})("@animation.done",function(o){Ee(e);let r=V();return Ae(r.onAnimationEnd(o))}),le(2,ott,1,1,"div",9)(3,Ctt,4,3,"div",10),K(4,"div",11,2),le(6,Stt,1,0,null,12)(7,Itt,1,0,"ng-container",13),Z(),le(8,Att,4,3,"div",14),Z()}if(t&2){let e=V();Gr(e.ddconfig.style),Ge(e.ddconfig.styleClass),zr("width",e.ddconfig.width)("height",e.ddconfig.height),B("ngClass",rn(22,ett,e.maximizable&&e.maximized))("ngStyle",Is(24,ttt))("@animation",rn(28,ntt,kr(25,itt,e.transformOptions,e.ddconfig.transitionOptions||"150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled",e.ddconfig.focusTrap===!1),Xe("aria-labelledby",e.ariaLabelledBy)("aria-modal",!0)("id",e.dialogId),L(2),B("ngIf",e.ddconfig.resizable),L(),B("ngIf",e.ddconfig.showHeader!==!1),L(),B("ngClass","p-dialog-content")("ngStyle",e.ddconfig.contentStyle),L(2),B("ngIf",!e.contentTemplate),L(),B("ngComponentOutlet",e.contentTemplate),L(),B("ngIf",e.ddconfig.footer||e.footerTemplate)}}var xye=(()=>{class t{viewContainerRef;constructor(e){this.viewContainerRef=e}static \u0275fac=function(i){return new(i||t)(rt(Ga))};static \u0275dir=Ki({type:t,selectors:[["","pDynamicDialogContent",""]]})}return t})(),Cye=(()=>{class t extends bye{name="dialog";static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var jh=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},tf=class{constructor(){}close(n){this._onClose.next(n),setTimeout(()=>{this._onClose.complete()},1e3)}destroy(){this._onDestroy.next(null)}dragStart(n){this._onDragStart.next(n)}dragEnd(n){this._onDragEnd.next(n)}resizeInit(n){this._onResizeInit.next(n)}resizeEnd(n){this._onResizeEnd.next(n)}maximize(n){this._onMaximize.next(n)}_onClose=new xi;onClose=this._onClose.asObservable();_onDestroy=new xi;onDestroy=this._onDestroy.asObservable();_onDragStart=new xi;onDragStart=this._onDragStart.asObservable();_onDragEnd=new xi;onDragEnd=this._onDragEnd.asObservable();_onResizeInit=new xi;onResizeInit=this._onResizeInit.asObservable();_onResizeEnd=new xi;onResizeEnd=this._onResizeEnd.asObservable();_onMaximize=new xi;onMaximize=this._onMaximize.asObservable();onChildComponentLoaded=new xi},ktt=fg([hl({transform:"{{transform}}",opacity:0}),Kl("{{transition}}",hl({transform:"none",opacity:1}))]),Mtt=fg([Kl("{{transition}}",hl({transform:"{{transform}}",opacity:0}))]),Rtt=(()=>{class t extends Ao{renderer;ddconfig;dialogRef;zone;parentDialog;visible=!0;componentRef;mask;resizing;dragging;maximized;_style={};originalStyle;lastPageX;lastPageY;ariaLabelledBy;id=tr("pn_id_");styleElement;insertionPoint;maskViewChild;contentViewChild;footerViewChild;headerViewChild;childComponentType;inputValues;container;wrapper;documentKeydownListener;documentEscapeListener;maskClickListener;transformOptions="scale(0.7)";documentResizeListener;documentResizeEndListener;documentDragListener;documentDragEndListener;_componentStyle=re(Cye);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(Ts.ARIA).close}set style(e){e&&(this._style=ve({},e),this.originalStyle=e)}get parent(){let e=Array.from(this.document.getElementsByClassName("p-dialog"));if(e.length>1)return e.pop()}get parentContent(){let e=Array.from(this.document.getElementsByClassName("p-dialog"));if(e.length>0){let i=e[e.length-1].querySelector(".p-dialog-content");if(i)return Array.isArray(i)?i[0]:i}}get header(){return this.ddconfig.header}get data(){return this.ddconfig.data}get breakpoints(){return this.ddconfig.breakpoints}get footerTemplate(){return this.ddconfig?.templates?.footer}get headerTemplate(){return this.ddconfig?.templates?.header}get contentTemplate(){return this.ddconfig?.templates?.content}get minimizeIconTemplate(){return this.ddconfig?.templates?.minimizeicon}get maximizeIconTemplate(){return this.ddconfig?.templates?.maximizeicon}get closeIconTemplate(){return this.ddconfig?.templates?.closeicon}get maskClass(){let i=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find(o=>o===this.position);return{"p-dialog-mask":!0,"p-overlay-mask p-overlay-mask-enter":this.ddconfig.modal||this.ddconfig.dismissableMask,[`p-dialog-${i}`]:i}}get dialogId(){return this.attrSelector}zIndexForLayering;constructor(e,i,o,r,a){super(),this.renderer=e,this.ddconfig=i,this.dialogRef=o,this.zone=r,this.parentDialog=a}ngOnInit(){super.ngOnInit(),this.breakpoints&&this.createStyle()}createStyle(){if(ns(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",Ov(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let e="";for(let i in this.breakpoints)e+=` @media screen and (max-width: ${i}) { .p-dialog[id=${this.dialogId}]:not(.p-dialog-maximized) { width: ${this.breakpoints[i]} !important; } } `;this.renderer.setProperty(this.styleElement,"innerHTML",e),Ov(this.styleElement,"nonce",this.config?.csp()?.nonce)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewInit(){super.ngAfterViewInit(),this.loadChildComponent(this.childComponentType),this.ariaLabelledBy=this.getAriaLabelledBy(),this.cd.detectChanges()}getAriaLabelledBy(){let{header:e,showHeader:i}=this.ddconfig;return e===null||i===!1?null:tr("pn_id_")+"_header"}loadChildComponent(e){let i=this.insertionPoint?.viewContainerRef;i?.clear(),this.componentRef=i?.createComponent(e),this.inputValues&&Object.entries(this.inputValues).forEach(([o,r])=>{this.componentRef.setInput(o,r)}),this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance)}moveOnTop(){this.ddconfig.autoZIndex!==!1?(ml.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=ml.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&&Rc(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&&ml.clear(this.container),this.zIndexForLayering&&ml.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&&Rc(this.document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.ddconfig.dismissableMask&&this.unbindMaskClickListener(),this.ddconfig.modal!==!1&&nd(this.document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}focus(e=this.contentViewChild.nativeElement){let i=Io.getFocusableElement(e,"[autofocus]");if(i){this.zone.runOutsideAngular(()=>{setTimeout(()=>i.focus(),5)});return}let o=Io.getFocusableElement(e);o?this.zone.runOutsideAngular(()=>{setTimeout(()=>o.focus(),5)}):this.footerViewChild?this.focus(this.footerViewChild.nativeElement):!o&&this.headerViewChild&&this.focus(this.headerViewChild.nativeElement)}maximize(){this.maximized=!this.maximized,this.maximized?Rc(this.document.body,"p-overflow-hidden"):nd(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,Rc(this.document.body,"p-unselectable-text"),this.dialogRef.resizeInit(e))}onResize(e){if(this.resizing){let i=e.pageX-this.lastPageX,o=e.pageY-this.lastPageY,r=Da(this.container),a=Vd(this.container),p=Vd(this.contentViewChild.nativeElement),f=r+i,x=a+o,I=this.container.style.minWidth,D=this.container.style.minHeight,P=this.container.getBoundingClientRect(),R=Rv();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(f+=i,x+=o),(!I||f>parseInt(I))&&P.left+fparseInt(D))&&P.top+x=this.minX&&f+i=this.minY&&x+o{this.documentDragListener=this.renderer.listen(this.document,"mousemove",this.onDrag.bind(this))})}bindDocumentDragEndListener(){ns(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(){ns(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.document,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.document,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindGlobalListeners(){this.ddconfig.closeOnEscape!==!1&&this.bindDocumentEscapeListener(),this.ddconfig.resizable&&this.bindDocumentResizeListeners(),this.ddconfig.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener())}unbindGlobalListeners(){this.unbindDocumentEscapeListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener()}bindDocumentEscapeListener(){let e=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",i=>{if(i.which==27){let o=ml.getCurrent();(parseInt(this.container.style.zIndex)==o||this.zIndexForLayering==o)&&this.hide()}})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}ngOnDestroy(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy(),this.destroyStyle(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(rt(Kr),rt(jh),rt(tf),rt(on),rt(t,12))};static \u0275cmp=Le({type:t,selectors:[["p-dynamicDialog"],["p-dynamicdialog"],["p-dynamic-dialog"]],viewQuery:function(i,o){if(i&1&&(Qi(xye,5),Qi(Zet,5),Qi(Yet,5),Qi(Qet,5),Qi(Xet,5)),i&2){let r;Je(r=et())&&(o.insertionPoint=r.first),Je(r=et())&&(o.maskViewChild=r.first),Je(r=et())&&(o.contentViewChild=r.first),Je(r=et())&&(o.footerViewChild=r.first),Je(r=et())&&(o.headerViewChild=r.first)}},features:[Pi([Cye]),Rt],decls:3,vars:9,consts:[["mask",""],["container",""],["content",""],["titlebar",""],["icon",""],["footer",""],[3,"ngStyle","ngClass"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","style","class","pFocusTrapDisabled","width","height",4,"ngIf"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],["style","z-index: 90;",3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],[4,"ngIf"],[4,"ngComponentOutlet"],[3,"ngClass",4,"ngIf"],[2,"z-index","90",3,"mousedown","ngClass"],[3,"mousedown","ngClass"],[3,"ngClass","id"],[3,"ngClass"],["rounded","","text","",3,"styleClass","tabindex","onClick","keydown.enter",4,"ngIf"],["rounded","","text","","severity","secondary",3,"styleClass","ariaLabel","onClick","keydown.enter",4,"ngIf"],["rounded","","text","",3,"onClick","keydown.enter","styleClass","tabindex"],["data-p-icon","window-maximize",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","window-maximize"],["data-p-icon","window-minimize",4,"ngIf"],["data-p-icon","window-minimize"],["rounded","","text","","severity","secondary",3,"onClick","keydown.enter","styleClass","ariaLabel"],["data-p-icon","times",4,"ngIf"],["data-p-icon","times"],["pDynamicDialogContent",""]],template:function(i,o){i&1&&(K(0,"div",6,0),le(2,Dtt,9,30,"div",7),Z()),i&2&&(Ge(o.ddconfig.maskStyleClass),B("ngStyle",Th(5,Jet,o.position==="left"||o.position==="topleft"||o.position==="bottomleft"?"flex-start":o.position==="right"||o.position==="topright"||o.position==="bottomright"?"flex-end":"center",o.position==="top"||o.position==="topleft"||o.position==="topright"?"flex-start":o.position==="bottom"||o.position==="bottomleft"||o.position==="bottomright"?"flex-end":"center",o.ddconfig.modal?"auto":"none"))("ngClass",o.maskClass),L(2),B("ngIf",o.visible))},dependencies:[po,Rs,f$,Zr,Vo,fs,kn,xye,xme,Cme,xd,jm,yye],encapsulation:2,data:{animation:[Ph("animation",[Mc("void => visible",[Mv(ktt)]),Mc("visible => void",[Mv(Mtt)])])]}})}return t})();var tQ=class{_parentInjector;_additionalTokens;constructor(n,e){this._parentInjector=n,this._additionalTokens=e}get(n,e,i){let o=this._additionalTokens.get(n);return o||this._parentInjector.get(n,e)}},Zd=(()=>{class t{appRef;injector;document;dialogComponentRefMap=new Map;constructor(e,i,o){this.appRef=e,this.injector=i,this.document=o}open(e,i){if(!this.duplicationPermission(e,i))return null;let o=this.appendDialogComponentToBody(i,e);return this.dialogComponentRefMap.get(o).instance.childComponentType=e,this.dialogComponentRefMap.get(o).instance.inputValues=i.inputValues,o}getInstance(e){return this.dialogComponentRefMap.get(e).instance}appendDialogComponentToBody(e,i){let o=new WeakMap;o.set(jh,e);let r=new tf;o.set(tf,r);let a=r.onClose.subscribe(()=>{this.dialogComponentRefMap.get(r).instance.close()}),p=r.onDestroy.subscribe(()=>{this.removeDialogComponentFromBody(r),p.unsubscribe(),a.unsubscribe()}),f=EI(Rtt,{environmentInjector:this.appRef.injector,elementInjector:new tQ(this.injector,o)});this.appRef.attachView(f.hostView);let x=f.hostView.rootNodes[0];return!e.appendTo||e.appendTo==="body"?this.document.body.appendChild(x):l0(e.appendTo,x),this.dialogComponentRefMap.set(r,f),r}removeDialogComponentFromBody(e){if(!e||!this.dialogComponentRefMap.has(e))return;let i=this.dialogComponentRefMap.get(e);this.appRef.detachView(i.hostView),i.destroy(),i.changeDetectorRef.detectChanges(),this.dialogComponentRefMap.delete(e)}duplicationPermission(e,i){if(i.duplicate)return!0;let o=!0;for(let[r,a]of this.dialogComponentRefMap)if(a.instance.childComponentType===e){o=!1;break}return o}static \u0275fac=function(i){return new(i||t)(ui(Tc),ui(Zn),ui(zn))};static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();function Ott(t,n){if(t&1&&(K(0,"div")(1,"div",7)(2,"div",8)(3,"div",9)(4,"mat-icon"),Ce(5,"info_outline"),Z()(),K(6,"div",10)(7,"span",11),Ce(8),K(9,"a",12),Ce(10,"Kontaktieren Sie unseren Vertrieb"),Z()()()()()()),t&2){let e=V(2);L(8),qn("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 Ptt(t,n){if(t&1){let e=Bt();K(0,"div",13)(1,"bd-export-as-file-dialog-form-hubspot-contact",14),Qe("contactChange",function(o){Ee(e);let r=V(2);return Ae(r.onContactChange(o))}),Z()(),Oe(2,"mat-divider")}}function Ltt(t,n){if(t&1){let e=Bt();Lt(0,Ott,11,1,"div"),Lt(1,Ptt,3,0),K(2,"div")(3,"bd-export-as-file-dialog-form",3),Qe("inputChange",function(o){Ee(e);let r=V();return Ae(r.onInputChange(o))}),Z()(),K(4,"div",4)(5,"button",5),Qe("click",function(){Ee(e);let o=V();return Ae(o.abort())}),Ce(6,"Abbrechen"),Z(),K(7,"button",6),Qe("click",function(){Ee(e);let o=V();return Ae(o.onExportClick())}),Ce(8," Exportieren "),Z()()}if(t&2){let e=V();Ft(e.config.authenticationStrategy==="reduce"&&!e.exportHandler.authenticated?0:-1),L(),Ft(e.config.authenticationStrategy==="contact"&&!e.exportHandler.authenticated?1:-1),L(2),B("input",e.exportHandler.input)("config",e.config)("authenticated",e.exportHandler.authenticated),L(4),B("disabled",!e.exportHandler.isValid)}}function Ftt(t,n){if(t&1){let e=Bt();K(0,"p",15),Ce(1," Es ist ein Fehler w\xE4hrend dem Export aufgetreten, der Export konnte nicht erstellt werden "),Z(),K(2,"div",4)(3,"button",16),Qe("click",function(){Ee(e);let o=V();return Ae(o.abort())}),Ce(4," Abbrechen "),Z()()}}var Sye=(()=>{class t{constructor(e,i,o,r,a){this._dialogRef=i,this._currentUserService=o,this._hubspotFormService=r,this._fileService=a,this.loading$=new xi,e.data.input.exportType=e.data.input.exportType??"xlsx",this.config=e.data.config??FC,this._currentUserService.authenticated$.pipe(Ko(1)).subscribe(p=>{this.exportHandler=new o6(this._hubspotFormService,e.data.input,this.config,p,this._fileService)})}abort(){this._dialogRef.close()}onContactChange(e){this.exportHandler.contact=e}onInputChange(e){this.exportHandler.input=e}onExportClick(){this.loading$.next(Cn.LOADING),this.exportHandler.export().subscribe({next:e=>{e.errors?(this.loading$.next(Cn.ERROR),console.error(e.errors)):(this.loading$.next(Cn.SUCCESS),(0,wye.saveAs)(e.result,`${this.exportHandler.input.filename}.${this.exportHandler.input.exportType}`),this._dialogRef.close())},error:e=>{console.error(e),this.loading$.next(Cn.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(rt(jh),rt(tf),rt(_b),rt(hye),rt(qg,8))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-export-as-file-dialog"]],decls:6,vars:3,consts:[["formTpl",""],["errorTpl",""],[3,"loadItem","initTemplate","errorTemplate"],[3,"inputChange","input","config","authenticated"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],["mat-raised-button","","color","accent","data-test","export-submit",3,"click","disabled"],[1,"info-box"],[1,"flex","flex-row","gap-6"],[1,"basis-10"],[1,"flex-1"],[1,"mat-body-2"],["href","https://www.bindoc.de/online-meeting","target","_blank"],[1,"contact-form"],[3,"contactChange"],[1,"mat-body-1"],["mat-button","","data-test","export-abort",3,"click"]],template:function(i,o){if(i&1&&(K(0,"div"),Oe(1,"bd-loader",2),Z(),le(2,Ltt,9,6,"ng-template",null,0,Hi)(4,Ftt,5,0,"ng-template",null,1,Hi)),i&2){let r=un(3),a=un(5);L(),B("loadItem",o.loading$)("initTemplate",r)("errorTemplate",a)}},dependencies:[mr,Ls,la,_ye,Wd,th,gye,Jo,_s],styles:[".contact-form[_ngcontent-%COMP%], .export-form[_ngcontent-%COMP%]{padding:24px 0}"]})}}return t})();var nf={position:"center",modal:!0,width:"70%",closable:!0,closeOnEscape:!0,maximizable:!1,breakpoints:{"640px":"100%","768px":"90%","1024px":"85%","1280px":"80%"}};function Ntt(t,n){if(t&1){let e=Bt();K(0,"div")(1,"button",0),Qe("click",function(){Ee(e);let o=V();return Ae(o.onClick())}),K(2,"mat-icon"),Ce(3,"save"),Z()()()}if(t&2){let e=V();L(),B("data-test",e.exportConfig.trigger.dataTestKey)("color",e.exportConfig.trigger.color)("matTooltip",e.exportConfig.trigger.tooltipText)}}var s6=(()=>{class t extends qs{constructor(e,i){super(),this._dialogService=e,this._currentUserService=i,this.config=FC,this.exportConfig=FC;let o=this._currentUserService.authenticated$.subscribe(r=>{this._authenticated=r,this._updateShowTrigger(r)});this._subs.push(o)}ngOnInit(){this.config&&(this.exportConfig=JSON.parse(JSON.stringify(this.config)))}ngOnDestroy(){this.unsubscribeAll()}onClick(){let e={filename:this.filename,data:this.data,labels:null,exportType:"xlsx",saveInDownloadCenter:!1},i=gt(ve({},nf),{header:"Export",data:{input:e,config:this.config,authenticated:this._authenticated}});this._dialogService.open(Sye,i)}_updateShowTrigger(e){this.exportConfig.authenticationStrategy==="always"&&!e&&(this.showTrigger=!1),this.showTrigger=!0}static{this.\u0275fac=function(i){return new(i||t)(rt(Zd),rt(_b))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-export-as-file"]],inputs:{data:"data",filename:"filename",config:"config"},features:[Pi([Zd]),Rt],decls:1,vars:1,consts:[["mat-icon-button","",3,"click","data-test","color","matTooltip"]],template:function(i,o){i&1&&Lt(0,Ntt,4,3,"div"),i&2&&Ft(o.showTrigger?0:-1)},dependencies:[Jo,yd,Nm,Fm,Ls,la,Ru],encapsulation:2})}}return t})();var Iye=` .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 Btt=["previcon"],ztt=["nexticon"],Vtt=["content"],Utt=["prevButton"],Htt=["nextButton"],jtt=["inkbar"],Gtt=["tabs"],oP=["*"];function $tt(t,n){t&1&&Oi(0)}function qtt(t,n){if(t&1&&le(0,$tt,1,0,"ng-container",11),t&2){let e=V(2);B("ngTemplateOutlet",e.prevIconTemplate||e._prevIconTemplate)}}function Wtt(t,n){t&1&&(oi(),Oe(0,"svg",10))}function Ktt(t,n){if(t&1){let e=Bt();K(0,"button",9,3),Qe("click",function(){Ee(e);let o=V();return Ae(o.onPrevButtonClick())}),Lt(2,qtt,1,1,"ng-container")(3,Wtt,1,0,":svg:svg",10),Z()}if(t&2){let e=V();Ge(e.cx("prevButton")),Xe("aria-label",e.prevButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),L(2),Ft(e.prevIconTemplate||e._prevIconTemplate?2:3)}}function Ztt(t,n){t&1&&Oi(0)}function Ytt(t,n){if(t&1&&le(0,Ztt,1,0,"ng-container",11),t&2){let e=V(2);B("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function Qtt(t,n){t&1&&(oi(),Oe(0,"svg",12))}function Xtt(t,n){if(t&1){let e=Bt();K(0,"button",9,4),Qe("click",function(){Ee(e);let o=V();return Ae(o.onNextButtonClick())}),Lt(2,Ytt,1,1,"ng-container")(3,Qtt,1,0,":svg:svg",12),Z()}if(t&2){let e=V();Ge(e.cx("nextButton")),Xe("aria-label",e.nextButtonAriaLabel)("tabindex",e.tabindex())("data-pc-group-section","navigator"),L(2),Ft(e.nextIconTemplate||e._nextIconTemplate?2:3)}}function Jtt(t,n){t&1&&yn(0)}var eit={root:({instance:t})=>["p-tabs p-component",{"p-tabs-scrollable":t.scrollable()}]},Tye=(()=>{class t extends to{name="tabs";theme=Iye;classes=eit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var tit={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"},Eye=(()=>{class t extends to{name="tablist";classes=tit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var Kg=(()=>{class t extends Ao{prevIconTemplate;nextIconTemplate;templates;content;prevButton;nextButton;inkbar;tabs;pcTabs=re(Br(()=>Gh));isPrevButtonEnabled=Jn(!1);isNextButtonEnabled=Jn(!1);resizeObserver;showNavigators=Do(()=>this.pcTabs.showNavigators());tabindex=Do(()=>this.pcTabs.tabindex());scrollable=Do(()=>this.pcTabs.scrollable());_componentStyle=re(Eye);constructor(){super(),Gl(()=>{this.pcTabs.value(),ns(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()&&ns(this.platformId)&&(this.updateButtonState(),this.bindResizeObserver())}_prevIconTemplate;_nextIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"previcon":this._prevIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break}})}ngOnDestroy(){this.unbindResizeObserver(),super.ngOnDestroy()}onScroll(e){this.showNavigators()&&this.updateButtonState(),e.preventDefault()}onPrevButtonClick(){let e=this.content.nativeElement,i=ku(e),o=Math.abs(e.scrollLeft)-i,r=o<=0?0:o;e.scrollLeft=Tz(e)?-1*r:r}onNextButtonClick(){let e=this.content.nativeElement,i=ku(e)-this.getVisibleButtonWidths(),o=e.scrollLeft+i,r=e.scrollWidth-i,a=o>=r?r:o;e.scrollLeft=Tz(e)?-1*a:a}updateButtonState(){let e=this.content?.nativeElement,i=this.el?.nativeElement,{scrollWidth:o,offsetWidth:r}=e,a=Math.abs(e.scrollLeft),p=ku(e);this.isPrevButtonEnabled.set(a!==0),this.isNextButtonEnabled.set(i.offsetWidth>=r&&a!==o-p)}updateInkBar(){let e=this.content?.nativeElement,i=this.inkbar?.nativeElement,o=this.tabs?.nativeElement,r=$r(e,'[data-pc-name="tab"][data-p-active="true"]');i&&(i.style.width=Da(r)+"px",i.style.left=xT(r).left-xT(o).left+"px")}getVisibleButtonWidths(){let e=this.prevButton?.nativeElement,i=this.nextButton?.nativeElement;return[e,i].reduce((o,r)=>r?o+ku(r):o,0)}bindResizeObserver(){this.resizeObserver=new ResizeObserver(()=>this.updateButtonState()),this.resizeObserver.observe(this.el.nativeElement)}unbindResizeObserver(){this.resizeObserver&&(this.resizeObserver.unobserve(this.el.nativeElement),this.resizeObserver=null)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["p-tablist"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,Btt,4),Ht(r,ztt,4),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.prevIconTemplate=a.first),Je(a=et())&&(o.nextIconTemplate=a.first),Je(a=et())&&(o.templates=a)}},viewQuery:function(i,o){if(i&1&&(Qi(Vtt,5),Qi(Utt,5),Qi(Htt,5),Qi(jtt,5),Qi(Gtt,5)),i&2){let r;Je(r=et())&&(o.content=r.first),Je(r=et())&&(o.prevButton=r.first),Je(r=et())&&(o.nextButton=r.first),Je(r=et())&&(o.inkbar=r.first),Je(r=et())&&(o.tabs=r.first)}},hostVars:3,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","tablist"),Ge(o.cx("root")))},features:[Pi([Eye]),Rt],ngContentSelectors:oP,decls:9,vars:9,consts:[["content",""],["tabs",""],["inkbar",""],["prevButton",""],["nextButton",""],["type","button","pRipple","",3,"class"],[3,"scroll"],["role","tablist"],["role","presentation"],["type","button","pRipple","",3,"click"],["data-p-icon","chevron-left"],[4,"ngTemplateOutlet"],["data-p-icon","chevron-right"]],template:function(i,o){if(i&1){let r=Bt();eo(),Lt(0,Ktt,4,6,"button",5),K(1,"div",6,0),Qe("scroll",function(p){return Ee(r),Ae(o.onScroll(p))}),K(3,"div",7,1),yn(5),Oe(6,"span",8,2),Z()(),Lt(8,Xtt,4,6,"button",5)}i&2&&(Ft(o.showNavigators()&&o.isPrevButtonEnabled()?0:-1),L(),Ge(o.cx("content")),L(2),Ge(o.cx("tabList")),L(3),Ge(o.cx("activeBar")),Xe("data-pc-section","inkbar"),L(2),Ft(o.showNavigators()&&o.isNextButtonEnabled()?8:-1))},dependencies:[po,Vo,Bz,DT,Ime,Yl,kn],encapsulation:2,changeDetection:0})}return t})(),iit={root:({instance:t})=>["p-tab",{"p-tab-active":t.active(),"p-disabled":t.disabled()}]},Aye=(()=>{class t extends to{name="tab";classes=iit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var z0=(()=>{class t extends Ao{value=IB();disabled=Wn(!1,{transform:lt});pcTabs=re(Br(()=>Gh));pcTabList=re(Br(()=>Kg));el=re(_n);_componentStyle=re(Aye);ripple=Do(()=>this.config.ripple());id=Do(()=>`${this.pcTabs.id()}_tab_${this.value()}`);ariaControls=Do(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);active=Do(()=>vl(this.pcTabs.value(),this.value()));tabindex=Do(()=>this.active()?this.pcTabs.tabindex():-1);mutationObserver;onFocus(e){this.pcTabs.selectOnFocus()&&this.changeActiveValue()}onClick(e){this.changeActiveValue()}onKeyDown(e){switch(e.code){case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break;default:break}e.stopPropagation()}ngAfterViewInit(){super.ngAfterViewInit(),this.bindMutationObserver()}onArrowRightKey(e){let i=this.findNextTab(e.currentTarget);i?this.changeFocusedTab(e,i):this.onHomeKey(e),e.preventDefault()}onArrowLeftKey(e){let i=this.findPrevTab(e.currentTarget);i?this.changeFocusedTab(e,i):this.onEndKey(e),e.preventDefault()}onHomeKey(e){let i=this.findFirstTab();this.changeFocusedTab(e,i),e.preventDefault()}onEndKey(e){let i=this.findLastTab();this.changeFocusedTab(e,i),e.preventDefault()}onPageDownKey(e){this.scrollInView(this.findLastTab()),e.preventDefault()}onPageUpKey(e){this.scrollInView(this.findFirstTab()),e.preventDefault()}onEnterKey(e){this.changeActiveValue(),e.preventDefault()}findNextTab(e,i=!1){let o=i?e:e.nextElementSibling;return o?KM(o,"data-p-disabled")||KM(o,"data-pc-section")==="inkbar"?this.findNextTab(o):o:null}findPrevTab(e,i=!1){let o=i?e:e.previousElementSibling;return o?KM(o,"data-p-disabled")||KM(o,"data-pc-section")==="inkbar"?this.findPrevTab(o):o:null}findFirstTab(){return this.findNextTab(this.pcTabList?.tabs?.nativeElement?.firstElementChild,!0)}findLastTab(){return this.findPrevTab(this.pcTabList?.tabs?.nativeElement?.lastElementChild,!0)}changeActiveValue(){this.pcTabs.updateValue(this.value())}changeFocusedTab(e,i){cs(i),this.scrollInView(i)}scrollInView(e){e?.scrollIntoView?.({block:"nearest"})}bindMutationObserver(){ns(this.platformId)&&(this.mutationObserver=new MutationObserver(e=>{e.forEach(()=>{this.active()&&this.pcTabList?.updateInkBar()})}),this.mutationObserver.observe(this.el.nativeElement,{childList:!0,characterData:!0,subtree:!0}))}unbindMutationObserver(){this.mutationObserver.disconnect()}ngOnDestroy(){this.mutationObserver&&this.unbindMutationObserver(),super.ngOnDestroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-tab"]],hostVars:10,hostBindings:function(i,o){i&1&&Qe("focus",function(a){return o.onFocus(a)})("click",function(a){return o.onClick(a)})("keydown",function(a){return o.onKeyDown(a)}),i&2&&(Xe("data-pc-name","tab")("id",o.id())("aria-controls",o.ariaControls())("role","tab")("aria-selected",o.active())("data-p-disabled",o.disabled())("data-p-active",o.active())("tabindex",o.tabindex()),Ge(o.cx("root")))},inputs:{value:[1,"value"],disabled:[1,"disabled"]},outputs:{value:"valueChange"},features:[Pi([Aye]),i1([Yl]),Rt],ngContentSelectors:oP,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po,kn],encapsulation:2,changeDetection:0})}return t})(),nit={root:({instance:t})=>["p-tabpanel",{"p-tabpanel-active":t.active()}]},Dye=(()=>{class t extends to{name="tabpanel";classes=nit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var V0=(()=>{class t extends Ao{pcTabs=re(Br(()=>Gh));value=IB(void 0);id=Do(()=>`${this.pcTabs.id()}_tabpanel_${this.value()}`);ariaLabelledby=Do(()=>`${this.pcTabs.id()}_tab_${this.value()}`);active=Do(()=>vl(this.pcTabs.value(),this.value()));_componentStyle=re(Dye);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-tabpanel"]],hostVars:7,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","tabpanel")("id",o.id())("role","tabpanel")("aria-labelledby",o.ariaLabelledby())("data-p-active",o.active()),Ge(o.cx("root")))},inputs:{value:[1,"value"]},outputs:{value:"valueChange"},features:[Pi([Dye]),Rt],ngContentSelectors:oP,decls:1,vars:1,template:function(i,o){i&1&&(eo(),Lt(0,Jtt,1,0)),i&2&&Ft(o.active()?0:-1)},dependencies:[po],encapsulation:2,changeDetection:0})}return t})(),oit={root:"p-tabpanels"},kye=(()=>{class t extends to{name="tabpanels";classes=oit;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var U0=(()=>{class t extends Ao{_componentStyle=re(kye);static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-tabpanels"]],hostVars:4,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","tabpanels")("role","presentation"),Ge(o.cx("root")))},features:[Pi([kye]),Rt],ngContentSelectors:oP,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po],encapsulation:2,changeDetection:0})}return t})(),Gh=(()=>{class t extends Ao{value=IB(void 0);scrollable=Wn(!1,{transform:lt});lazy=Wn(!1,{transform:lt});selectOnFocus=Wn(!1,{transform:lt});showNavigators=Wn(!0,{transform:lt});tabindex=Wn(0,{transform:wn});id=Jn(tr("pn_id_"));_componentStyle=re(Tye);updateValue(e){this.value.update(()=>e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275cmp=Le({type:t,selectors:[["p-tabs"]],hostVars:4,hostBindings:function(i,o){i&2&&(Xe("data-pc-name","tabs")("id",o.id()),Ge(o.cx("root")))},inputs:{value:[1,"value"],scrollable:[1,"scrollable"],lazy:[1,"lazy"],selectOnFocus:[1,"selectOnFocus"],showNavigators:[1,"showNavigators"],tabindex:[1,"tabindex"]},outputs:{value:"valueChange"},features:[Pi([Tye]),Rt],ngContentSelectors:oP,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},dependencies:[po],encapsulation:2,changeDetection:0})}return t})(),Cb=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Gh,U0,V0,Kg,z0]})}return t})();var Mye={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 rit=["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"],iQ=class{constructor(n,e){this.id=n,this.name=e}parent(){if(this.isLeistungsgruppe()){let n=this.id.slice(0,this.id.indexOf("."));return Rye.find(e=>e.id===n)}else return}children(){return this.isLeistungsbereich()?Rye.filter(n=>n.isLeistungsgruppe()).filter(n=>n.parent()?.id===this.id):[]}isLeistungsbereich(){return!this.id.includes(".")}isLeistungsgruppe(){return this.id.includes(".")}},sit={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"},Rye=rit.map(t=>new iQ(t,sit[t]));var uit=t=>({color:t}),pit=()=>({}),hit=(t,n)=>n.id;function mit(t,n){t&1&&(K(0,"tr"),Oe(1,"th",5),K(2,"th",6),Ce(3,"Personal (\u20AC)"),Z(),K(4,"th",7),Ce(5,"Arzneimittel (\u20AC)"),Z(),K(6,"th",5),Ce(7,"Implantate / Transplantate (\u20AC)"),Z(),K(8,"th",6),Ce(9,"Med. Bedarf (\u20AC)"),Z(),K(10,"th",7),Ce(11,"Infrastruktur (\u20AC)"),Z(),K(12,"th",5),Ce(13,"Summe"),Z()(),K(14,"tr")(15,"th"),Ce(16,"\xE4rztlicher Dienst"),Z(),K(17,"th"),Ce(18,"Pflegedienst"),Z(),K(19,"th"),Ce(20,"Med. tech. Dienst"),Z(),K(21,"th"),Ce(22,"Gemeinkosten"),Z(),K(23,"th"),Ce(24,"Einzelkosten"),Z(),K(25,"th"),Ce(26,"Gemeinkosten"),Z(),K(27,"th"),Ce(28,"Einzelkosten"),Z(),K(29,"th"),Ce(30,"Ext. Behandlungsleistungen"),Z(),K(31,"th"),Ce(32,"med."),Z(),K(33,"th"),Ce(34,"nicht med."),Z()())}function fit(t,n){if(t&1&&(K(0,"td",9),Ce(1),Z()),t&2){let e=n.$implicit;Ge(e.cssClass),B("ngStyle",e.fontColor?rn(4,uit,e.fontColor):Is(6,pit)),L(),qn(" ",e.value," ")}}function git(t,n){if(t&1&&(K(0,"tr"),ea(1,fit,2,7,"td",8,hit),Z()),t&2){let e=n.$implicit;L(),ta(e)}}var d6=(()=>{class t{constructor(e){this._decimalPipe=e,this.options=cfe,this.rows=[]}ngOnChanges(){this.inekDataCsv=new Jz(this.inekTable),this.rows=sfe.filter(e=>this.options.showZeroRows||this.inekTable.departmentSums[e]>0||this.inekTable.departmentSums[e]<0).map(e=>[{id:e,value:RT[e],cssClass:""},...Zp.map(i=>{let o=this.inekTable.data[e]?.[i]??0;return{id:`${e}_${i}`,value:this._decimalPipe.transform(o,this.options.numberFormat),cssClass:"text-right!",fontColor:this.options.valueCellOptions.fontColor(o)}}),{id:`${e}_sum`,cssClass:"text-right!",value:this._decimalPipe.transform(this.inekTable.departmentSums[e],this.options.numberFormat),fontColor:this.options.partialSumCellOptions.fontColor(this.inekTable.departmentSums[e])}]),this.rows.push(this._footerRow())}_footerRow(){return[{id:"SUM",value:"Summe",cssClass:""},...Zp.map(e=>({id:`SUM_${e}`,value:this._decimalPipe.transform(this.inekTable.sectionSums[e],this.options.numberFormat),cssClass:"text-right!",fontColor:this.options.totalSumCellOptions.fontColor(this.inekTable.sectionSums[e])})),{id:"SUM_SUM",value:this._decimalPipe.transform(this.inekTable.total,this.options.numberFormat),cssClass:"text-right!",fontColor:this.options.totalSumCellOptions.fontColor(this.inekTable.total)}]}static{this.\u0275fac=function(i){return new(i||t)(rt(yl))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-drg-inek-table"]],inputs:{inekTable:"inekTable",options:"options",exportConfig:"exportConfig"},features:[Pi([yl]),In],decls:8,vars:3,consts:[["header",""],["body",""],[1,"flex","flex-row-reverse"],["filename","Inek Tabelle",3,"data","config"],[1,"p-datatable-sm",3,"value"],["rowspan","2"],["colspan","3"],["colspan","2"],[3,"class","ngStyle"],[3,"ngStyle"]],template:function(i,o){i&1&&(K(0,"div",2)(1,"div"),Oe(2,"bd-export-as-file",3),Z()(),K(3,"p-table",4),le(4,mit,35,0,"ng-template",null,0,Hi)(6,git,3,0,"ng-template",null,1,Hi),Z()),i&2&&(L(2),B("data",o.inekDataCsv)("config",o.exportConfig),L(),B("value",o.rows))},dependencies:[s6,fs,gp,sd],encapsulation:2})}}return t})();var u6=(()=>{class t{constructor(){this._departments=RT}transform(e){return this._departments[e]||"n/a"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=ep({name:"drgCostDepartment",type:t,pure:!0})}}return t})();var p6=(()=>{class t{transform(e){return afe[e]||"n/a"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275pipe=ep({name:"drgCostSection",type:t,pure:!0})}}return t})();var h6=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/base_rates/`}};var Pye=(()=>{class t{static _fromObj(e){return{year:parseInt(e.year,10),value:e.baseRate,state:{id:e.stateId,name:Vu.find(i=>i.id===e.stateId)?.name??null}}}constructor(e,i){this._httpClient=e,this._environmentService=i,this._store=new h6(this._environmentService)}index(){let e;return this._baseRates?e=Promise.resolve(this._baseRates):e=F_(this._fetch().pipe(vi(i=>this._parseBaseRatesResponse(i)),Er(i=>this._baseRates=i))),e}_fetch(){let e=this._store.index();return this._httpClient.get(e)}_parseBaseRatesResponse(e){let i={};return Object.keys(e).forEach(o=>{let r=e[o];i[o]=r.map(a=>t._fromObj(a))}),i}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function yit(t,n){if(t&1&&(K(0,"span",11),Ce(1),el(2,"currency"),Z()),t&2){let e=V(2);L(),Di(PG(2,1,e.baseRate.value,"EUR","symbol"))}}function vit(t,n){t&1&&(K(0,"span",11),Ce(1,"n/a"),Z())}function bit(t,n){if(t&1){let e=Bt();K(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",4)(4,"p-iftalabel")(5,"p-select",6),Qe("onChange",function(o){Ee(e);let r=V();return Ae(r.onYearChange(o))}),Z(),K(6,"label",7),Ce(7,"Jahr"),Z()()(),K(8,"div",4)(9,"bd-ui-single-select",8),Qe("selection",function(o){Ee(e);let r=V();return Ae(r.onStateChange(o))}),Z()()()(),K(10,"div",4)(11,"div",9)(12,"span",10),Ce(13,"Basisfallwert: "),Z(),K(14,"div",10),Lt(15,yit,3,5,"span",11),Lt(16,vit,2,0,"span",11),Z()()()()}if(t&2){let e=V();L(5),B("required",!0)("options",e.yearOptions)("ngModel",e.baseRate.year),L(4),B("config",e.config)("selectOptions",e.stateOptions)("initialSelection",e.initialState),L(6),Ft(e.baseRate.value?15:-1),L(),Ft(e.baseRate.value?-1:16)}}var m6=(()=>{class t{constructor(e){this._baseRateService=e,this.baseRate={},this.stateSelectOptions={includeBund:!0,resetOption:!1},this.baseRateChange=new yt,this.config={selectLabel:"Bundesland",option:{sortFnc:(i,o)=>i.name.localeCompare(o.name),uniqueFnc:i=>i.id.toString(),searchOptionAccessor:i=>i.name}},this.loading$=new mo(1),this.stateOptions=zx}ngOnInit(){this.loading$.next(Cn.LOADING),this.baseRate&&this.baseRate.state&&(this.initialState=this.baseRate.state),this.stateOptions=Ni(this.stateSelectOptions.includeBund?Vu:KO),this._fetchBaseRates().then(()=>this._onInputChanges()).then(()=>this.loading$.next(Cn.SUCCESS))}ngOnChanges(e){this.baseRateData&&e.baseRate&&e.baseRate.currentValue&&this._onInputChanges()}onYearChange(e){this.baseRate.year=parseInt(e.value,10),this._onInputChanges()}onStateChange(e){this.baseRate.state=e,this._onInputChanges()}_fetchBaseRates(){return this._baseRateService.index().then(e=>{this.baseRateData=e,this.yearOptions=Object.keys(e).map(i=>parseInt(i,10)).reverse()})}_onInputChanges(){this.baseRate?(this.baseRate.year&&this.baseRate.state?this.baseRate.value=this._getBaseRateValue(this.baseRate.year,this.baseRate.state.id):this.baseRate.value=null,this.baseRateChange.emit(this.baseRate)):this.baseRate={}}_getBaseRateValue(e,i){let o=this.baseRateData[e.toString()]||null,r=null;return o&&o.forEach(a=>{a.state.id===i&&(r=a.value)}),r}static{this.\u0275fac=function(i){return new(i||t)(rt(Pye))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-drg-base-rate"]],inputs:{baseRate:"baseRate",stateSelectOptions:"stateSelectOptions"},outputs:{baseRateChange:"baseRateChange"},features:[In],decls:4,vars:2,consts:[["successTpl",""],[1,"base-rate"],[3,"loadItem","successTemplate"],[1,"flex","flex-col","xl:flex-row","gap-0","xl:gap-6","items-start","xl:items-center"],[1,"flex-1"],[1,"flex","flex-col","sm:flex-row","gap-0","sm:gap-6","items-start","sm:items-center"],["inputId","drg-base-rate-year-select","fluid","","variant","filled",1,"mb-4",3,"onChange","required","options","ngModel"],["for","drg-base-rate-year-select"],[3,"selection","config","selectOptions","initialSelection"],[1,"flex","flex-row","base-rate--result"],[1,"mat-subheading-2"],["data-test","drg-base-rate-result"]],template:function(i,o){if(i&1&&(K(0,"div",1),Oe(1,"bd-loader",2),Z(),le(2,bit,17,8,"ng-template",null,0,Hi)),i&2){let r=un(3);L(),B("loadItem",o.loading$)("successTemplate",r)}},dependencies:[mr,vg,bg,Au,il,zM,Rh,Wg,Su],styles:[".base-rate--result[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;margin-right:8px}"]})}}return t})();var f6=class t{static fromObj(n,e){return new t(new Ws(e.content.code.name,void 0,n,"specific"),e.content.year,e.content.sum,e.content.percentageByAgmId,e.additionalInformation.text)}constructor(n,e,i,o,r){this.code=n,this.year=e,this.sum=i,this.percentageByAgmId=o,this.additionalInformation=r}};var Sl=(()=>{class t{static toQueryParams(e){function i(o){return`${o.codingSystem}--${o.hierarchyElementType}--${o.name}`}return{codes:e.map(o=>i(o))}}static fromQueryParams(e){return e.has("codes")?e.getAll("codes").map(i=>{let o=i.split("--");return new Ws(o[2],void 0,o[0],o[1])}):[]}constructor(e,i){this._httpClient=e,this._environmentService=i,this._codeCache={},this._codeStore=new xg(this._environmentService)}get$(e,i,o=new Mr){if(o.keys().length>0)return this._get(e,i,o);if(this._codeCache[e]){let r=this._codeCache[e][i];if(r)return r.pipe(vi(a=>a.clone()))}else this._codeCache[e]={};return this._codeCache[e][i]=this._get(e,i,o).pipe(vi(r=>r.clone()),B_(1)),this._codeCache[e][i]}getAll(e,i,o=new Mr){let r=this._codeStore.codingSystem(e),a;return e==="G-DRG"?a=this._httpClient.post(r,i,{params:o}).pipe(vi(p=>{let f={};return Object.keys(p).forEach(x=>{let I=p[x];f[x]=new OT(I.drgCode.name,I.drgCode.description,I.drgCode.year,I.mainDepartment)}),f})):a=this._httpClient.post(r,i,{params:o}).pipe(vi(p=>{let f={};return Object.keys(p).forEach(x=>{f[x]=Ws.fromObject(p[x])}),f})),a.pipe(Er(p=>{Object.keys(p).forEach(f=>{this._addToCache(e,f,p[f])})})),a}children(e,i,o){let r=this._codeStore.children(e),a={codes:i};return o&&(a={codes:i,numberOfDigits:o}),this._httpClient.post(r,a).pipe(vi(p=>p.map(Ws.fromObject)))}find(e,i,o,r,a=new Mr){let p=this._codeStore.codingSystem(e);return i&&(a=a.set("query",i)),o&&(a=a.set("numberOfDigits",o.toString())),r&&(a=a.set("limit",r)),this._httpClient.get(p,{params:a}).pipe(vi(f=>f.map(x=>gt(ve({},x),{codingSystem:e})).map(x=>Ws.fromObject(x))),Er(f=>{f.forEach(x=>{this._addToCache(e,x.name,x)})}))}getAgeGroupDistribution(e,i,o=new Mr){let r=this._codeStore.codeAgeGroupDistribution(e,i);return this._httpClient.get(r,{params:o}).pipe(vi(a=>f6.fromObj(e,a)))}prevalence(e,i,o=new Mr){let r=this._codeStore.codePrevalence(e,i);return this._httpClient.get(r,{params:o}).pipe(vi(a=>{let p={additionalInformation:a.additionalInformation,prevalencePerAdId:{}};return Object.keys(a.prevalencePerAdId).forEach(f=>{p.prevalencePerAdId[f]=gt(ve({},a.prevalencePerAdId[f]),{code:Ws.fromObject(a.prevalencePerAdId[f].code)})}),p}))}getCasesTimeSeries(e,i,o=new Mr){let r=`${this._codeStore.codeByCodeName(e,i)}/cases/timeseries`;return this._httpClient.get(r,{params:o})}getPatientMigration(e,i,o,r){return this._fetchPatientMigration(e,i,o,r)}treePath(e,i){let o=this._codeStore.treeParent(e,i),r=a=>{let p;return a.hasParent&&a.parent&&(p=r(a.parent)),{type:e,data:Gm.fromObject(a),parent:p,key:a.name,label:a.name,leaf:a.nodeType==="external"}};return this._httpClient.get(o).pipe(vi(a=>r(a)))}treeChildren(e,i,o){let r=i?this._codeStore.treeChildren(e):this._codeStore.codeGroup(e);return i?this._httpClient.post(r,{values:[i],year:o}).pipe(vi(a=>a[i]),vi(a=>a.map(p=>({data:Gm.fromObject(p),type:p.codingSystem,key:p.name,label:`${p.name} - ${p.description}`,leaf:p.nodeType==="external"})))):this._httpClient.get(r).pipe(vi(a=>a.map(p=>({data:Gm.fromObject(p),type:p.codingSystem,key:p.name,label:`${p.name} - ${p.description}`,leaf:p.nodeType==="external"}))))}static reverse(e){return e.parent?(e.parent.children=[e],this.reverse(e.parent)):e}_get(e,i,o){let r=this._codeStore.codeByCodeName(e,i);return this._httpClient.get(r,{params:o}).pipe(vi(a=>Gm.fromObject(a)))}_fetchPatientMigration(e,i,o,r){let a=`${this._codeStore.codingSystem(e)}patient-migration`,p={year:o?.toString(),codes:i.map(f=>({name:f,codingSystem:e,hierarchyElementType:"specific"})),administrativeDistrictIds:r?.map(f=>f.getNumericValue())};return this._httpClient.post(a,p)}_addToCache(e,i,o){this._codeCache[e]||(this._codeCache[e]={}),this._codeCache[e][i]=Ni(o)}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Fye={viewState:"responsive"};var g6=class{constructor(n){this._codeService=n,this.isValid=!1,this.code$=new mo,this.loading$=new mo(Cn.INIT)}resolve(n,e){return this.loading$.next(Cn.LOADING),F_(this._codeService.get$(n,e)).then(i=>{switch(i.name=e,n){case"OPS":case"PROCEDURE-AT":case"ICD-10-GM":case"ICD-10-AT":case"G-DRG":{this.isValid=!0;break}default:{this.isValid=!1;break}}return this.code$.next(i),this.loading$.next(Cn.SUCCESS),i}).catch(i=>(console.error(i),this.isValid=!1,this.loading$.next(Cn.ERROR),null))}};var Nye=(()=>{class t{static _getCodePath(e){return["/code-browser",e.codingSystem,e.name]}constructor(e){this._environmentService=e}get(e,i){return i.target==="_self"?Ni(this.internal(e)):Ni(this.external(e))}internal(e){return t._getCodePath(e)}external(e,i="ANALYTICS_APP_URL"){return this._environmentService.load(i)+t._getCodePath(e).join("/")}static{this.\u0275fac=function(i){return new(i||t)(ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Cit(t,n){if(t&1&&(K(0,"bd-link-internal",0)(1,"mat-icon",1),Ce(2,"open_in_new"),Z()()),t&2){let e=V(2);B("link",e.asType(e.link))}}function wit(t,n){if(t&1&&(K(0,"bd-link-external",0)(1,"mat-icon",1),Ce(2,"open_in_new"),Z()()),t&2){let e=V(2);B("link",e.asType(e.link))}}function Sit(t,n){if(t&1&&(Lt(0,Cit,3,1,"bd-link-internal",0),Lt(1,wit,3,1,"bd-link-external",0)),t&2){let e=V();Ft(e.options.target==="_self"?0:-1),L(),Ft(e.options.target==="_blank"?1:-1)}}var _6=(()=>{class t{constructor(e,i){this._codeLinkService=e,this._cdr=i,this.options=bz,this.link=null}ngOnChanges(e){e.code&&this._onCodeChange(e.code)}asType(e){return e}_onCodeChange(e){e.currentValue&&this._codeLinkService.get(e.currentValue,this.options).subscribe(i=>{this.link=i,this._cdr.detectChanges()})}static{this.\u0275fac=function(i){return new(i||t)(rt(Nye),rt(Ho))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-icon-link"]],inputs:{code:"code",options:"options"},features:[In],decls:1,vars:1,consts:[[3,"link"],["color","accent"]],template:function(i,o){i&1&&Lt(0,Sit,2,2),i&2&&Ft(o.link?0:-1)},dependencies:[vz,Ls,la,yz],encapsulation:2,changeDetection:0})}}return t})();function Iit(t,n){if(t&1&&(K(0,"div",3)(1,"p",4),Ce(2),Z()(),K(3,"div",5),Oe(4,"ays-code-icon-link",6),Z()),t&2){let e=V();L(2),qn(" ",e.code.description," "),L(2),B("code",e.code)("options",e.linkOptions)}}var Bye=(()=>{class t{constructor(e,i){this.ref=e,this._config=i,this.linkOptions={target:"_blank"},this.code=this._config.data?.code}static{this.\u0275fac=function(i){return new(i||t)(rt(tf),rt(jh))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:5,vars:1,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"flex","flex-row","gap-4","justify-end","w-full"],["mat-button","",3,"click"],[1,"flex-1"],[1,"mat-body"],[1,"basis-10"],[3,"code","options"]],template:function(i,o){i&1&&(K(0,"div",0),Lt(1,Iit,5,3),Z(),K(2,"div",1)(3,"button",2),Qe("click",function(){return o.ref.close()}),Ce(4,"Schlie\xDFen"),Z()()),i&2&&(L(),Ft(o.code?1:-1))},dependencies:[_6,Jo,_s],encapsulation:2})}}return t})();var zye=(()=>{class t{constructor(e){this._dialogService=e}ngOnInit(){this.resolver.code$.subscribe(e=>this.code=e)}openDialog(){let e=gt(ve({},nf),{header:this.code.name,data:{code:this.code}});this._dialogService.open(Bye,e)}static{this.\u0275fac=function(i){return new(i||t)(rt(Zd))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-info-dialog-button"]],inputs:{codeName:"codeName",resolver:"resolver",options:"options"},features:[Pi([Zd])],decls:4,vars:2,consts:[["mat-button","","color","accent",3,"click","disabled"]],template:function(i,o){i&1&&(K(0,"div")(1,"button",0),Qe("click",function(){return o.openDialog()}),K(2,"span"),Ce(3),Z()()()),i&2&&(L(),B("disabled",!o.resolver.isValid),L(2),Di((o.code==null?null:o.code.name)||o.codeName))},dependencies:[Jo,_s],encapsulation:2})}}return t})();var Vye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-loading-indicator-list-item"]],decls:6,vars:1,consts:[[1,"flex","flex-row","gap-6","items-center"],[1,"basis-24"],[3,"height"],[1,"flex-1"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1),Oe(2,"p-skeleton",2),Z(),K(3,"div",3),Oe(4,"p-skeleton")(5,"p-skeleton"),Z()()),i&2&&(L(2),B("height","36px"))},dependencies:[L5,VO],encapsulation:2})}}return t})();function Tit(t,n){if(t&1&&(K(0,"div"),Oe(1,"ays-code-icon-link",10),Z()),t&2){let e=V(2);L(),B("code",e.code)("options",e.linkOptions)}}function Eit(t,n){if(t&1&&(K(0,"div",4)(1,"div",5)(2,"span",6),Ce(3),Z()(),K(4,"div",7)(5,"div",8)(6,"div",7)(7,"span",9),Ce(8),Z()(),Lt(9,Tit,2,2,"div"),Z()()()),t&2){let e=V();L(3),Di(e.code.name),L(5),Di(e.code==null?null:e.code.description),L(),Ft(e.resolver.isValid?9:-1)}}function Ait(t,n){if(t&1&&(K(0,"div",11)(1,"div",5)(2,"span",6),Ce(3),Z()(),K(4,"div",7)(5,"span",9),Ce(6,"n/a"),Z()()()),t&2){let e=V();L(3),Di(e.codeName)}}function Dit(t,n){t&1&&Oe(0,"ays-code-loading-indicator-list-item")}var Uye=(()=>{class t{constructor(){this.linkOptions={target:"_blank"}}ngOnInit(){this.resolver.code$.pipe(Ko(1)).subscribe(e=>this.code=e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-info-inline"]],inputs:{codeName:"codeName",resolver:"resolver",options:"options"},decls:7,vars:4,consts:[["resultTpl",""],["errorTpl",""],["loadingIndicatorTpl",""],[3,"loadItem","customLoadingTemplate","successTemplate","errorTemplate"],[1,"flex","flex-row","gap-6"],[1,"basis-24"],[1,"mat-body-2"],[1,"flex-1"],[1,"flex","flex-col","lg:flex-row"],[1,"mat-body-1"],[3,"code","options"],[1,"flex","flex-row","gap-6","items-center"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",3),le(1,Eit,10,3,"ng-template",null,0,Hi)(3,Ait,7,1,"ng-template",null,1,Hi)(5,Dit,1,0,"ng-template",null,2,Hi)),i&2){let r=un(2),a=un(4),p=un(6);B("loadItem",o.resolver.loading$)("customLoadingTemplate",p)("successTemplate",r)("errorTemplate",a)}},dependencies:[mr,_6,Vye],encapsulation:2})}}return t})();function kit(t,n){if(t&1&&Oe(0,"ays-code-info-inline",0),t&2){let e=V();B("resolver",e.resolver)("codeName",e.name)("options",e.options)}}function Mit(t,n){if(t&1&&Oe(0,"ays-code-info-dialog-button",0),t&2){let e=V();B("resolver",e.resolver)("codeName",e.name)("options",e.options)}}var Hye=(()=>{class t extends qs{constructor(e,i,o){super(),this._breakpointObserver=e,this._codeService=i,this._cdr=o,this.options=Fye,this.resolver=new g6(this._codeService)}ngOnChanges(e){e.name&&e.codingSystem&&this._onCodeChange(),e.options&&this._onOptionsChange()}ngOnDestroy(){this._responsiveSub&&this._responsiveSub.unsubscribe()}_onOptionsChange(){this.options.viewState==="responsive"?this._initResponsiveListener():this._setActiveViewState(this.options.viewState)}_onCodeChange(){this.resolver.resolve(this.codingSystem,this.name).then(()=>this._cdr.detectChanges())}_initResponsiveListener(){this._responsiveSub&&(this._responsiveSub.unsubscribe(),this._responsiveSub=null),this._responsiveSub=this._breakpointObserver.observe([_d.Large,_d.XLarge,_d.Medium]).subscribe(e=>this._setActiveViewState(e.matches?"inline":"dialog"))}_setActiveViewState(e){this.activeViewState=e,this._cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(rt(Eu),rt(Sl),rt(Ho))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-info"]],inputs:{codingSystem:"codingSystem",name:"name",options:"options"},features:[Rt,In],decls:2,vars:1,consts:[[3,"resolver","codeName","options"]],template:function(i,o){i&1&&Lt(0,kit,1,3,"ays-code-info-inline",0)(1,Mit,1,3,"ays-code-info-dialog-button",0),i&2&&Ft(o.activeViewState==="inline"?0:1)},dependencies:[Uye,zye],encapsulation:2,changeDetection:0})}}return t})();var wb=class{constructor(n,e,i,o,r){this.__meta=n,this.__router=e,this.__activatedRoute=i,this.__pageTitleService=o,this.tabIndexMapping=r,this.tabIndex=0,this.helpButtonOptions=D5,this.__activatedRoute.queryParams.subscribe(a=>{if(a&&a.view){let p=a.view;this.tabIndex=this.tabIndexMapping.map(f=>f.toUpperCase().replace(" ","_")).indexOf(p)}})}onTabIndexChange(n){if(this.tabIndex=n,n>=0&&nMath.max(Math.min(t,e),n);function rP(t){return Sb(aP(t*2.55),0,255)}function Ib(t){return Sb(aP(t*255),0,255)}function H0(t){return Sb(aP(t/2.55)/100,0,1)}function jye(t){return Sb(aP(t*100),0,100)}var $h={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},rQ=[..."0123456789ABCDEF"],Rit=t=>rQ[t&15],Oit=t=>rQ[(t&240)>>4]+rQ[t&15],y6=t=>(t&240)>>4===(t&15),Pit=t=>y6(t.r)&&y6(t.g)&&y6(t.b)&&y6(t.a);function Lit(t){var n=t.length,e;return t[0]==="#"&&(n===4||n===5?e={r:255&$h[t[1]]*17,g:255&$h[t[2]]*17,b:255&$h[t[3]]*17,a:n===5?$h[t[4]]*17:255}:(n===7||n===9)&&(e={r:$h[t[1]]<<4|$h[t[2]],g:$h[t[3]]<<4|$h[t[4]],b:$h[t[5]]<<4|$h[t[6]],a:n===9?$h[t[7]]<<4|$h[t[8]]:255})),e}var Fit=(t,n)=>t<255?n(t):"";function Nit(t){var n=Pit(t)?Rit:Oit;return t?"#"+n(t.r)+n(t.g)+n(t.b)+Fit(t.a,n):void 0}var Bit=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wye(t,n,e){let i=n*Math.min(e,1-e),o=(r,a=(r+t/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[o(0),o(8),o(4)]}function zit(t,n,e){let i=(o,r=(o+t/60)%6)=>e-e*n*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function Vit(t,n,e){let i=Wye(t,1,.5),o;for(n+e>1&&(o=1/(n+e),n*=o,e*=o),o=0;o<3;o++)i[o]*=1-n-e,i[o]+=n;return i}function Uit(t,n,e,i,o){return t===o?(n-e)/i+(n.5?I/(2-r-a):I/(r+a),f=Uit(e,i,o,I,r),f=f*60+.5),[f|0,x||0,p]}function aQ(t,n,e,i){return(Array.isArray(n)?t(n[0],n[1],n[2]):t(n,e,i)).map(Ib)}function lQ(t,n,e){return aQ(Wye,t,n,e)}function Hit(t,n,e){return aQ(Vit,t,n,e)}function jit(t,n,e){return aQ(zit,t,n,e)}function Kye(t){return(t%360+360)%360}function Git(t){let n=Bit.exec(t),e=255,i;if(!n)return;n[5]!==i&&(e=n[6]?rP(+n[5]):Ib(+n[5]));let o=Kye(+n[2]),r=+n[3]/100,a=+n[4]/100;return n[1]==="hwb"?i=Hit(o,r,a):n[1]==="hsv"?i=jit(o,r,a):i=lQ(o,r,a),{r:i[0],g:i[1],b:i[2],a:e}}function $it(t,n){var e=sQ(t);e[0]=Kye(e[0]+n),e=lQ(e),t.r=e[0],t.g=e[1],t.b=e[2]}function qit(t){if(!t)return;let n=sQ(t),e=n[0],i=jye(n[1]),o=jye(n[2]);return t.a<255?`hsla(${e}, ${i}%, ${o}%, ${H0(t.a)})`:`hsl(${e}, ${i}%, ${o}%)`}var Gye={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"},$ye={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 Wit(){let t={},n=Object.keys($ye),e=Object.keys(Gye),i,o,r,a,p;for(i=0;i>16&255,r>>8&255,r&255]}return t}var v6;function Kit(t){v6||(v6=Wit(),v6.transparent=[0,0,0,0]);let n=v6[t.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}var Zit=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Yit(t){let n=Zit.exec(t),e=255,i,o,r;if(n){if(n[7]!==i){let a=+n[7];e=n[8]?rP(a):Sb(a*255,0,255)}return i=+n[1],o=+n[3],r=+n[5],i=255&(n[2]?rP(i):Sb(i,0,255)),o=255&(n[4]?rP(o):Sb(o,0,255)),r=255&(n[6]?rP(r):Sb(r,0,255)),{r:i,g:o,b:r,a:e}}}function Qit(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${H0(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}var oQ=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,rA=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Xit(t,n,e){let i=rA(H0(t.r)),o=rA(H0(t.g)),r=rA(H0(t.b));return{r:Ib(oQ(i+e*(rA(H0(n.r))-i))),g:Ib(oQ(o+e*(rA(H0(n.g))-o))),b:Ib(oQ(r+e*(rA(H0(n.b))-r))),a:t.a+e*(n.a-t.a)}}function b6(t,n,e){if(t){let i=sQ(t);i[n]=Math.max(0,Math.min(i[n]+i[n]*e,n===0?360:1)),i=lQ(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Zye(t,n){return t&&Object.assign(n||{},t)}function qye(t){var n={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(n={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(n.a=Ib(t[3]))):(n=Zye(t,{r:0,g:0,b:0,a:1}),n.a=Ib(n.a)),n}function Jit(t){return t.charAt(0)==="r"?Yit(t):Git(t)}var sP=class t{constructor(n){if(n instanceof t)return n;let e=typeof n,i;e==="object"?i=qye(n):e==="string"&&(i=Lit(n)||Kit(n)||Jit(n)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var n=Zye(this._rgb);return n&&(n.a=H0(n.a)),n}set rgb(n){this._rgb=qye(n)}rgbString(){return this._valid?Qit(this._rgb):void 0}hexString(){return this._valid?Nit(this._rgb):void 0}hslString(){return this._valid?qit(this._rgb):void 0}mix(n,e){if(n){let i=this.rgb,o=n.rgb,r,a=e===r?.5:e,p=2*a-1,f=i.a-o.a,x=((p*f===-1?p:(p+f)/(1+p*f))+1)/2;r=1-x,i.r=255&x*i.r+r*o.r+.5,i.g=255&x*i.g+r*o.g+.5,i.b=255&x*i.b+r*o.b+.5,i.a=a*i.a+(1-a)*o.a,this.rgb=i}return this}interpolate(n,e){return n&&(this._rgb=Xit(this._rgb,n._rgb,e)),this}clone(){return new t(this.rgb)}alpha(n){return this._rgb.a=Ib(n),this}clearer(n){let e=this._rgb;return e.a*=1-n,this}greyscale(){let n=this._rgb,e=aP(n.r*.3+n.g*.59+n.b*.11);return n.r=n.g=n.b=e,this}opaquer(n){let e=this._rgb;return e.a*=1+n,this}negate(){let n=this._rgb;return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,this}lighten(n){return b6(this._rgb,2,n),this}darken(n){return b6(this._rgb,2,-n),this}saturate(n){return b6(this._rgb,1,n),this}desaturate(n){return b6(this._rgb,1,-n),this}rotate(n){return $it(this._rgb,n),this}};function sf(){}var pQ=(()=>{let t=0;return()=>t++})();function Fr(t){return t==null}function Ma(t){if(Array.isArray&&Array.isArray(t))return!0;let n=Object.prototype.toString.call(t);return n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"}function os(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function gl(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Hu(t,n){return gl(t)?t:n}function xr(t,n){return typeof t>"u"?n:t}var hQ=(t,n)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/n,E6=(t,n)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*n:+t;function na(t,n,e){if(t&&typeof t.call=="function")return t.apply(e,n)}function Hs(t,n,e,i){let o,r,a;if(Ma(t))if(r=t.length,i)for(o=r-1;o>=0;o--)n.call(e,t[o],o);else for(o=0;ot,x:t=>t.x,y:t=>t.y};function lve(t){let n=t.split("."),e=[],i="";for(let o of n)i+=o,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function ent(t){let n=lve(t);return e=>{for(let i of n){if(i==="")break;e=e&&e[i]}return e}}function Qg(t,n){return(Yye[n]||(Yye[n]=ent(n)))(t)}function pP(t){return t.charAt(0).toUpperCase()+t.slice(1)}var UC=t=>typeof t<"u",Zg=t=>typeof t=="function",A6=(t,n)=>{if(t.size!==n.size)return!1;for(let e of t)if(!n.has(e))return!1;return!0};function mQ(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}var Fs=Math.PI,Ra=2*Fs,cve=Ra+Fs,dP=Number.POSITIVE_INFINITY,dve=Fs/180,Il=Fs/2,Tb=Fs/4,dQ=Fs*2/3,Yg=Math.log10,qh=Math.sign;function HC(t,n,e){return Math.abs(t-n)o-r).pop(),n}function tnt(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ab(t){return!tnt(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function gQ(t,n){let e=Math.round(t);return e-n<=t&&e+n>=t}function k6(t,n,e){let i,o,r;for(i=0,o=t.length;if&&x=Math.min(n,e)-i&&t<=Math.max(n,e)+i}function mP(t,n,e){e=e||(a=>t[a]1;)r=o+i>>1,e(r)?o=r:i=r;return{lo:o,hi:i}}var of=(t,n,e,i)=>mP(t,e,i?o=>{let r=t[o][n];return rt[o][n]mP(t,e,i=>t[i][n]>=e);function vQ(t,n,e){let i=0,o=t.length;for(;ii&&t[o-1]>e;)o--;return i>0||o{let i="_onData"+pP(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...r){let a=o.apply(this,r);return t._chartjs.listeners.forEach(p=>{typeof p[i]=="function"&&p[i](...r)}),a}})})}function O6(t,n){let e=t._chartjs;if(!e)return;let i=e.listeners,o=i.indexOf(n);o!==-1&&i.splice(o,1),!(i.length>0)&&(pve.forEach(r=>{delete t[r]}),delete t._chartjs)}function P6(t){let n=new Set(t);return n.size===t.length?t:Array.from(n)}var L6=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function F6(t,n){let e=[],i=!1;return function(...o){e=o,i||(i=!0,L6.call(window,()=>{i=!1,t.apply(n,e)}))}}function xQ(t,n){let e;return function(...i){return n?(clearTimeout(e),e=setTimeout(t,n,i)):t.apply(this,i),n}}var fP=t=>t==="start"?"left":t==="end"?"right":"center",ld=(t,n,e)=>t==="start"?n:t==="end"?e:(n+e)/2,CQ=(t,n,e,i)=>t===(i?"left":"right")?e:t==="center"?(n+e)/2:n;function N6(t,n,e){let i=n.length,o=0,r=i;if(t._sorted){let{iScale:a,vScale:p,_parsed:f}=t,x=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,I=a.axis,{min:D,max:P,minDefined:R,maxDefined:j}=a.getUserBounds();if(R){if(o=Math.min(of(f,I,D).lo,e?i:of(n,I,a.getPixelForValue(D)).lo),x){let $=f.slice(0,o+1).reverse().findIndex(W=>!Fr(W[p.axis]));o-=Math.max(0,$)}o=hc(o,0,i-1)}if(j){let $=Math.max(of(f,a.axis,P,!0).hi+1,e?0:of(n,I,a.getPixelForValue(P),!0).hi+1);if(x){let W=f.slice($-1).findIndex(Q=>!Fr(Q[p.axis]));$+=Math.max(0,W)}r=hc($,o,i)-o}else r=i-o}return{start:o,count:r}}function B6(t){let{xScale:n,yScale:e,_scaleRanges:i}=t,o={xmin:n.min,xmax:n.max,ymin:e.min,ymax:e.max};if(!i)return t._scaleRanges=o,!0;let r=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,o),r}var x6=t=>t===0||t===1,Qye=(t,n,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-n)*Ra/e)),Xye=(t,n,e)=>Math.pow(2,-10*t)*Math.sin((t-n)*Ra/e)+1,BC={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*Il)+1,easeOutSine:t=>Math.sin(t*Il),easeInOutSine:t=>-.5*(Math.cos(Fs*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=>x6(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=>x6(t)?t:Qye(t,.075,.3),easeOutElastic:t=>x6(t)?t:Xye(t,.075,.3),easeInOutElastic(t){return x6(t)?t:t<.5?.5*Qye(t*2,.1125,.45):.5+.5*Xye(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let n=1.70158;return(t/=.5)<1?.5*(t*t*(((n*=1.525)+1)*t-n)):.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:t=>1-BC.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?BC.easeInBounce(t*2)*.5:BC.easeOutBounce(t*2-1)*.5+.5};function z6(t){if(t&&typeof t=="object"){let n=t.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return!1}function V6(t){return z6(t)?t:new sP(t)}function I6(t){return z6(t)?t:new sP(t).saturate(.5).darken(.1).hexString()}var int=["x","y","borderWidth","radius","tension"],nnt=["color","borderColor","backgroundColor"];function ont(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"}),t.set("animations",{colors:{type:"color",properties:nnt},numbers:{type:"number",properties:int}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}})}function rnt(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Jye=new Map;function snt(t,n){n=n||{};let e=t+JSON.stringify(n),i=Jye.get(e);return i||(i=new Intl.NumberFormat(t,n),Jye.set(e,i)),i}function GC(t,n,e){return snt(n,e).format(t)}var hve={values(t){return Ma(t)?t:""+t},numeric(t,n,e){if(t===0)return"0";let i=this.chart.options.locale,o,r=t;if(e.length>1){let x=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(x<1e-4||x>1e15)&&(o="scientific"),r=ant(t,e)}let a=Yg(Math.abs(r)),p=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),f={notation:o,minimumFractionDigits:p,maximumFractionDigits:p};return Object.assign(f,this.options.ticks.format),GC(t,i,f)},logarithmic(t,n,e){if(t===0)return"0";let i=e[n].significand||t/Math.pow(10,Math.floor(Yg(t)));return[1,2,3,5,10,15].includes(i)||n>.8*e.length?hve.numeric.call(this,t,n,e):""}};function ant(t,n){let e=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(e)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}var gP={formatters:hve};function lnt(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:gP.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"&&n!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"})}var Db=Object.create(null),U6=Object.create(null);function lP(t,n){if(!n)return t;let e=n.split(".");for(let i=0,o=e.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,o)=>I6(o.backgroundColor),this.hoverBorderColor=(i,o)=>I6(o.borderColor),this.hoverColor=(i,o)=>I6(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(n),this.apply(e)}set(n,e){return cQ(this,n,e)}get(n){return lP(this,n)}describe(n,e){return cQ(U6,n,e)}override(n,e){return cQ(Db,n,e)}route(n,e,i,o){let r=lP(this,n),a=lP(this,i),p="_"+e;Object.defineProperties(r,{[p]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let f=this[p],x=a[o];return os(f)?Object.assign({},x,f):xr(f,x)},set(f){this[p]=f}}})}apply(n){n.forEach(e=>e(this))}},Oa=new uQ({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ont,rnt,lnt]);function mve(t){return!t||Fr(t.size)||Fr(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function sA(t,n,e,i,o){let r=n[o];return r||(r=n[o]=t.measureText(o).width,e.push(o)),r>i&&(i=r),i}function wQ(t,n,e,i){i=i||{};let o=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==n&&(o=i.data={},r=i.garbageCollect=[],i.font=n),t.save(),t.font=n;let a=0,p=e.length,f,x,I,D,P;for(f=0;fe.length){for(f=0;f0&&t.stroke()}}function rf(t,n,e){return e=e||.5,!n||t&&t.x>n.left-e&&t.xn.top-e&&t.y0&&r.strokeColor!=="",f,x;for(t.save(),t.font=o.string,cnt(t,r),f=0;f+t||0;function yP(t,n){let e={},i=os(n),o=i?Object.keys(n):n,r=os(t)?i?a=>xr(t[a],t[n[a]]):a=>t[a]:()=>t;for(let a of o)e[a]=mnt(r(a));return e}function G6(t){return yP(t,{top:"y",right:"x",bottom:"y",left:"x"})}function q0(t){return yP(t,["topLeft","topRight","bottomLeft","bottomRight"])}function mc(t){let n=G6(t);return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Tl(t,n){t=t||{},n=n||Oa.font;let e=xr(t.size,n.size);typeof e=="string"&&(e=parseInt(e,10));let i=xr(t.style,n.style);i&&!(""+i).match(hnt)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let o={family:xr(t.family,n.family),lineHeight:fve(xr(t.lineHeight,n.lineHeight),e),size:e,style:i,weight:xr(t.weight,n.weight),string:""};return o.string=mve(o),o}function Ta(t,n,e,i){let o=!0,r,a,p;for(r=0,a=t.length;re&&p===0?0:p+f;return{min:a(i,-Math.abs(r)),max:a(o,r)}}function Xg(t,n){return Object.assign(Object.create(t),n)}function vP(t,n=[""],e,i,o=()=>t[0]){let r=e||t;typeof i>"u"&&(i=yve("_fallback",t));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:o,override:p=>vP([p,...t],n,r,i)};return new Proxy(a,{deleteProperty(p,f){return delete p[f],delete p._keys,delete t[0][f],!0},get(p,f){return gve(p,f,()=>Cnt(f,n,t,p))},getOwnPropertyDescriptor(p,f){return Reflect.getOwnPropertyDescriptor(p._scopes[0],f)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(p,f){return tve(p).includes(f)},ownKeys(p){return tve(p)},set(p,f,x){let I=p._storage||(p._storage=o());return p[f]=I[f]=x,delete p._keys,!0}})}function Eb(t,n,e,i){let o={_cacheable:!1,_proxy:t,_context:n,_subProxy:e,_stack:new Set,_descriptors:$6(t,i),setContext:r=>Eb(t,r,e,i),override:r=>Eb(t.override(r),n,e,i)};return new Proxy(o,{deleteProperty(r,a){return delete r[a],delete t[a],!0},get(r,a,p){return gve(r,a,()=>gnt(r,a,p))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(r,a,p){return t[a]=p,delete r[a],!0}})}function $6(t,n={scriptable:!0,indexable:!0}){let{_scriptable:e=n.scriptable,_indexable:i=n.indexable,_allKeys:o=n.allKeys}=t;return{allKeys:o,scriptable:e,indexable:i,isScriptable:Zg(e)?e:()=>e,isIndexable:Zg(i)?i:()=>i}}var fnt=(t,n)=>t?t+pP(n):n,EQ=(t,n)=>os(n)&&t!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function gve(t,n,e){if(Object.prototype.hasOwnProperty.call(t,n)||n==="constructor")return t[n];let i=e();return t[n]=i,i}function gnt(t,n,e){let{_proxy:i,_context:o,_subProxy:r,_descriptors:a}=t,p=i[n];return Zg(p)&&a.isScriptable(n)&&(p=_nt(n,p,t,e)),Ma(p)&&p.length&&(p=ynt(n,p,t,a.isIndexable)),EQ(n,p)&&(p=Eb(p,o,r&&r[n],a)),p}function _nt(t,n,e,i){let{_proxy:o,_context:r,_subProxy:a,_stack:p}=e;if(p.has(t))throw new Error("Recursion detected: "+Array.from(p).join("->")+"->"+t);p.add(t);let f=n(r,a||i);return p.delete(t),EQ(t,f)&&(f=AQ(o._scopes,o,t,f)),f}function ynt(t,n,e,i){let{_proxy:o,_context:r,_subProxy:a,_descriptors:p}=e;if(typeof r.index<"u"&&i(t))return n[r.index%n.length];if(os(n[0])){let f=n,x=o._scopes.filter(I=>I!==f);n=[];for(let I of f){let D=AQ(x,o,t,I);n.push(Eb(D,r,a&&a[t],p))}}return n}function _ve(t,n,e){return Zg(t)?t(n,e):t}var vnt=(t,n)=>t===!0?n:typeof t=="string"?Qg(n,t):void 0;function bnt(t,n,e,i,o){for(let r of n){let a=vnt(e,r);if(a){t.add(a);let p=_ve(a._fallback,e,o);if(typeof p<"u"&&p!==e&&p!==i)return p}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function AQ(t,n,e,i){let o=n._rootScopes,r=_ve(n._fallback,e,i),a=[...t,...o],p=new Set;p.add(i);let f=eve(p,a,e,r||e,i);return f===null||typeof r<"u"&&r!==e&&(f=eve(p,a,r,f,i),f===null)?!1:vP(Array.from(p),[""],o,r,()=>xnt(n,e,i))}function eve(t,n,e,i,o){for(;e;)e=bnt(t,n,e,i,o);return e}function xnt(t,n,e){let i=t._getTarget();n in i||(i[n]={});let o=i[n];return Ma(o)&&os(e)?e:o||{}}function Cnt(t,n,e,i){let o;for(let r of n)if(o=yve(fnt(r,t),e),typeof o<"u")return EQ(t,o)?AQ(e,i,t,o):o}function yve(t,n){for(let e of n){if(!e)continue;let i=e[t];if(typeof i<"u")return i}}function tve(t){let n=t._keys;return n||(n=t._keys=wnt(t._scopes)),n}function wnt(t){let n=new Set;for(let e of t)for(let i of Object.keys(e).filter(o=>!o.startsWith("_")))n.add(i);return Array.from(n)}function q6(t,n,e,i){let{iScale:o}=t,{key:r="r"}=this._parsing,a=new Array(i),p,f,x,I;for(p=0,f=i;pnt==="x"?"y":"x";function bve(t,n,e,i){let o=t.skip?n:t,r=n,a=e.skip?n:e,p=uP(r,o),f=uP(a,r),x=p/(p+f),I=f/(p+f);x=isNaN(x)?0:x,I=isNaN(I)?0:I;let D=i*x,P=i*I;return{previous:{x:r.x-D*(a.x-o.x),y:r.y-D*(a.y-o.y)},next:{x:r.x+P*(a.x-o.x),y:r.y+P*(a.y-o.y)}}}function Int(t,n,e){let i=t.length,o,r,a,p,f,x=aA(t,0);for(let I=0;I!x.skip)),n.cubicInterpolationMode==="monotone")xve(t,o);else{let x=i?t[t.length-1]:t[0];for(r=0,a=t.length;rt.ownerDocument.defaultView.getComputedStyle(t,null);function Cve(t,n){return W6(t).getPropertyValue(n)}var Ant=["top","right","bottom","left"];function zC(t,n,e){let i={};e=e?"-"+e:"";for(let o=0;o<4;o++){let r=Ant[o];i[r]=parseFloat(t[n+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var Dnt=(t,n,e)=>(t>0||n>0)&&(!e||!e.shadowRoot);function knt(t,n){let e=t.touches,i=e&&e.length?e[0]:t,{offsetX:o,offsetY:r}=i,a=!1,p,f;if(Dnt(o,r,t.target))p=o,f=r;else{let x=n.getBoundingClientRect();p=i.clientX-x.left,f=i.clientY-x.top,a=!0}return{x:p,y:f,box:a}}function W0(t,n){if("native"in t)return t;let{canvas:e,currentDevicePixelRatio:i}=n,o=W6(e),r=o.boxSizing==="border-box",a=zC(o,"padding"),p=zC(o,"border","width"),{x:f,y:x,box:I}=knt(t,e),D=a.left+(I&&p.left),P=a.top+(I&&p.top),{width:R,height:j}=n;return r&&(R-=a.width+p.width,j-=a.height+p.height),{x:Math.round((f-D)/R*e.width/i),y:Math.round((x-P)/j*e.height/i)}}function Mnt(t,n,e){let i,o;if(n===void 0||e===void 0){let r=t&&xP(t);if(!r)n=t.clientWidth,e=t.clientHeight;else{let a=r.getBoundingClientRect(),p=W6(r),f=zC(p,"border","width"),x=zC(p,"padding");n=a.width-x.width-f.width,e=a.height-x.height-f.height,i=T6(p.maxWidth,r,"clientWidth"),o=T6(p.maxHeight,r,"clientHeight")}}return{width:n,height:e,maxWidth:i||dP,maxHeight:o||dP}}var w6=t=>Math.round(t*10)/10;function kQ(t,n,e,i){let o=W6(t),r=zC(o,"margin"),a=T6(o.maxWidth,t,"clientWidth")||dP,p=T6(o.maxHeight,t,"clientHeight")||dP,f=Mnt(t,n,e),{width:x,height:I}=f;if(o.boxSizing==="content-box"){let P=zC(o,"border","width"),R=zC(o,"padding");x-=R.width+P.width,I-=R.height+P.height}return x=Math.max(0,x-r.width),I=Math.max(0,i?x/i:I-r.height),x=w6(Math.min(x,a,f.maxWidth)),I=w6(Math.min(I,p,f.maxHeight)),x&&!I&&(I=w6(x/2)),(n!==void 0||e!==void 0)&&i&&f.height&&I>f.height&&(I=f.height,x=w6(Math.floor(I*i))),{width:x,height:I}}function K6(t,n,e){let i=n||1,o=Math.floor(t.height*i),r=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let 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!==i||a.height!==o||a.width!==r?(t.currentDevicePixelRatio=i,a.height=o,a.width=r,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}var MQ=(function(){let t=!1;try{let n={get passive(){return t=!0,!1}};bP()&&(window.addEventListener("test",null,n),window.removeEventListener("test",null,n))}catch{}return t})();function Z6(t,n){let e=Cve(t,n),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function j0(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:t.y+e*(n.y-t.y)}}function RQ(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:i==="middle"?e<.5?t.y:n.y:i==="after"?e<1?t.y:n.y:e>0?n.y:t.y}}function OQ(t,n,e,i){let o={x:t.cp2x,y:t.cp2y},r={x:n.cp1x,y:n.cp1y},a=j0(t,o,e),p=j0(o,r,e),f=j0(r,n,e),x=j0(a,p,e),I=j0(p,f,e);return j0(x,I,e)}var Rnt=function(t,n){return{x(e){return t+t+n-e},setWidth(e){n=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Ont=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,n){return t+n},leftForLtr(t,n){return t}}};function kb(t,n,e){return t?Rnt(n,e):Ont()}function Y6(t,n){let e,i;(n==="ltr"||n==="rtl")&&(e=t.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",n,"important"),t.prevTextDirection=i)}function Q6(t,n){n!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",n[0],n[1]))}function wve(t){return t==="angle"?{between:jC,compare:uve,normalize:ad}:{between:af,compare:(n,e)=>n-e,normalize:n=>n}}function ive({start:t,end:n,count:e,loop:i,style:o}){return{start:t%e,end:n%e,loop:i&&(n-t+1)%e===0,style:o}}function Pnt(t,n,e){let{property:i,start:o,end:r}=e,{between:a,normalize:p}=wve(i),f=n.length,{start:x,end:I,loop:D}=t,P,R;if(D){for(x+=f,I+=f,P=0,R=f;Pf(o,ge,Q)&&p(o,ge)!==0,Se=()=>p(r,Q)===0||f(r,ge,Q),fe=()=>$||Re(),be=()=>!$||Se();for(let je=I,st=I;je<=D;++je)se=n[je%a],!se.skip&&(Q=x(se[i]),Q!==ge&&($=f(Q,o,r),W===null&&fe()&&(W=p(Q,o)===0?je:st),W!==null&&be()&&(j.push(ive({start:W,end:je,loop:P,count:a,style:R})),W=null),st=je,ge=Q));return W!==null&&j.push(ive({start:W,end:D,loop:P,count:a,style:R})),j}function J6(t,n){let e=[],i=t.segments;for(let o=0;oo&&t[r%n].skip;)r--;return r%=n,{start:o,end:r}}function Fnt(t,n,e,i){let o=t.length,r=[],a=n,p=t[n],f;for(f=n+1;f<=e;++f){let x=t[f%o];x.skip||x.stop?p.skip||(i=!1,r.push({start:n%o,end:(f-1)%o,loop:i}),n=a=x.stop?f:null):(a=f,p.skip&&(n=f)),p=x}return a!==null&&r.push({start:n%o,end:a%o,loop:i}),r}function PQ(t,n){let e=t.points,i=t.options.spanGaps,o=e.length;if(!o)return[];let r=!!t._loop,{start:a,end:p}=Lnt(e,o,r,i);if(i===!0)return nve(t,[{start:a,end:p,loop:r}],e,n);let f=pp({chart:n,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=L6.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let e=0;this._charts.forEach((i,o)=>{if(!i.running||!i.items.length)return;let r=i.items,a=r.length-1,p=!1,f;for(;a>=0;--a)f=r[a],f._active?(f._total>i.duration&&(i.duration=f._total),f.tick(n),p=!0):(r[a]=r[r.length-1],r.pop());p&&(o.draw(),this._notify(o,i,n,"progress")),r.length||(i.running=!1,this._notify(o,i,n,"complete"),i.initial=!1),e+=r.length}),this._lastDate=n,e===0&&(this._running=!1)}_getAnims(n){let e=this._charts,i=e.get(n);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(n,i)),i}listen(n,e,i){this._getAnims(n).listeners[e].push(i)}add(n,e){!e||!e.length||this._getAnims(n).items.push(...e)}has(n){return this._getAnims(n).items.length>0}start(n){let e=this._charts.get(n);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,o)=>Math.max(i,o._duration),0),this._refresh())}running(n){if(!this._running)return!1;let e=this._charts.get(n);return!(!e||!e.running||!e.items.length)}stop(n){let e=this._charts.get(n);if(!e||!e.items.length)return;let i=e.items,o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(n,e,Date.now(),"complete")}remove(n){return this._charts.delete(n)}},K0=new qQ,Sve="transparent",Vnt={boolean(t,n,e){return e>.5?n:t},color(t,n,e){let i=V6(t||Sve),o=i.valid&&V6(n||Sve);return o&&o.valid?o.mix(i,e).hexString():n},number(t,n,e){return t+(n-t)*e}},WQ=class{constructor(n,e,i,o){let r=e[i];o=Ta([n.to,o,r,n.from]);let a=Ta([n.from,r,o]);this._active=!0,this._fn=n.fn||Vnt[n.type||typeof a],this._easing=BC[n.easing]||BC.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=e,this._prop=i,this._from=a,this._to=o,this._promises=void 0}active(){return this._active}update(n,e,i){if(this._active){this._notify(!1);let o=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,n.duration)),this._total+=r,this._loop=!!n.loop,this._to=Ta([n.to,e,o,n.from]),this._from=Ta([n.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){let e=n-this._start,i=this._duration,o=this._prop,r=this._from,a=this._loop,p=this._to,f;if(this._active=r!==p&&(a||e1?2-f:f,f=this._easing(Math.min(1,Math.max(0,f))),this._target[o]=this._fn(r,p,f)}wait(){let n=this._promises||(this._promises=[]);return new Promise((e,i)=>{n.push({res:e,rej:i})})}_notify(n){let e=n?"res":"rej",i=this._promises||[];for(let o=0;o{let r=n[o];if(!os(r))return;let a={};for(let p of e)a[p]=r[p];(Ma(r.properties)&&r.properties||[o]).forEach(p=>{(p===o||!i.has(p))&&i.set(p,a)})})}_animateOptions(n,e){let i=e.options,o=Hnt(n,i);if(!o)return[];let r=this._createAnimations(o,i);return i.$shared&&Unt(n.options.$animations,i).then(()=>{n.options=i},()=>{}),r}_createAnimations(n,e){let i=this._properties,o=[],r=n.$animations||(n.$animations={}),a=Object.keys(e),p=Date.now(),f;for(f=a.length-1;f>=0;--f){let x=a[f];if(x.charAt(0)==="$")continue;if(x==="options"){o.push(...this._animateOptions(n,e));continue}let I=e[x],D=r[x],P=i.get(x);if(D)if(P&&D.active()){D.update(P,I,p);continue}else D.cancel();if(!P||!P.duration){n[x]=I;continue}r[x]=D=new WQ(P,n,x,I),o.push(D)}return o}update(n,e){if(this._properties.size===0){Object.assign(n,e);return}let i=this._createAnimations(n,e);if(i.length)return K0.add(this._chart,i),!0}};function Unt(t,n){let e=[],i=Object.keys(n);for(let o=0;o0||!e&&r<0)return o.index}return null}function Ave(t,n){let{chart:e,_cachedMeta:i}=t,o=e._stacks||(e._stacks={}),{iScale:r,vScale:a,index:p}=i,f=r.axis,x=a.axis,I=qnt(r,a,i),D=n.length,P;for(let R=0;Re[i].axis===n).shift()}function Znt(t,n){return Xg(t,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function Ynt(t,n,e){return Xg(t,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:e,index:n,mode:"default",type:"data"})}function CP(t,n){let e=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){n=n||t._parsed;for(let o of n){let r=o._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e],r[i]._visualValues!==void 0&&r[i]._visualValues[e]!==void 0&&delete r[i]._visualValues[e]}}}var NQ=t=>t==="reset"||t==="none",Dve=(t,n)=>n?t:Object.assign({},t),Qnt=(t,n,e)=>t&&!n.hidden&&n._stacked&&{keys:Sbe(e,!0),values:null},Rb=(()=>{class t{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,i){this.chart=e,this._ctx=e.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=LQ(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&&CP(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,i=this._cachedMeta,o=this.getDataset(),r=(P,R,j,$)=>P==="x"?R:P==="r"?$:j,a=i.xAxisID=xr(o.xAxisID,FQ(e,"x")),p=i.yAxisID=xr(o.yAxisID,FQ(e,"y")),f=i.rAxisID=xr(o.rAxisID,FQ(e,"r")),x=i.indexAxis,I=i.iAxisID=r(x,a,p,f),D=i.vAxisID=r(x,p,a,f);i.xScale=this.getScaleForId(a),i.yScale=this.getScaleForId(p),i.rScale=this.getScaleForId(f),i.iScale=this.getScaleForId(I),i.vScale=this.getScaleForId(D)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let i=this._cachedMeta;return e===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&O6(this._data,this),e._stacked&&CP(e)}_dataCheck(){let e=this.getDataset(),i=e.data||(e.data=[]),o=this._data;if(os(i)){let r=this._cachedMeta;this._data=$nt(i,r)}else if(o!==i){if(o){O6(o,this);let r=this._cachedMeta;CP(r),r._parsed=[]}i&&Object.isExtensible(i)&&bQ(i,this),this._syncList=[],this._data=i}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let i=this._cachedMeta,o=this.getDataset(),r=!1;this._dataCheck();let a=i._stacked;i._stacked=LQ(i.vScale,i),i.stack!==o.stack&&(r=!0,CP(i),i.stack=o.stack),this._resyncElements(e),(r||a!==i._stacked)&&(Ave(this,i._parsed),i._stacked=LQ(i.vScale,i))}configure(){let e=this.chart.config,i=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),i,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,i){let{_cachedMeta:o,_data:r}=this,{iScale:a,_stacked:p}=o,f=a.axis,x=e===0&&i===r.length?!0:o._sorted,I=e>0&&o._parsed[e-1],D,P,R;if(this._parsing===!1)o._parsed=r,o._sorted=!0,R=r;else{Ma(r[e])?R=this.parseArrayData(o,r,e,i):os(r[e])?R=this.parseObjectData(o,r,e,i):R=this.parsePrimitiveData(o,r,e,i);let j=()=>P[f]===null||I&&P[f]W||P=0;--R)if(!$()){this.updateRangeFromParsed(I,e,j,x);break}}return I}getAllParsedValues(e){let i=this._cachedMeta._parsed,o=[],r,a,p;for(r=0,a=i.length;r=0&&ethis.getContext(o,r,i),W=I.resolveNamedOptions(R,j,$,P);return W.$shared&&(W.$shared=x,a[p]=Object.freeze(Dve(W,x))),W}_resolveAnimations(e,i,o){let r=this.chart,a=this._cachedDataOpts,p=`animation-${i}`,f=a[p];if(f)return f;let x;if(r.options.animation!==!1){let D=this.chart.config,P=D.datasetAnimationScopeKeys(this._type,i),R=D.getOptionScopes(this.getDataset(),P);x=D.createResolver(R,this.getContext(e,o,i))}let I=new cU(r,x&&x.animations);return x&&x._cacheable&&(a[p]=Object.freeze(I)),I}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,i){return!i||NQ(e)||this.chart._animationsDisabled}_getSharedOptions(e,i){let o=this.resolveDataElementOptions(e,i),r=this._sharedOptions,a=this.getSharedOptions(o),p=this.includeOptions(i,a)||a!==r;return this.updateSharedOptions(a,i,o),{sharedOptions:a,includeOptions:p}}updateElement(e,i,o,r){NQ(r)?Object.assign(e,o):this._resolveAnimations(i,r).update(e,o)}updateSharedOptions(e,i,o){e&&!NQ(i)&&this._resolveAnimations(void 0,i).update(e,o)}_setStyle(e,i,o,r){e.active=r;let a=this.getStyle(i,r);this._resolveAnimations(i,o,r).update(e,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(e,i,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,i,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let i=this._data,o=this._cachedMeta.data;for(let[f,x,I]of this._syncList)this[f](x,I);this._syncList=[];let r=o.length,a=i.length,p=Math.min(a,r);p&&this.parse(0,p),a>r?this._insertElements(r,a-r,e):a{for(I.length+=i,f=I.length-1;f>=p;f--)I[f]=I[f-i]};for(x(a),f=e;fo-r))}return t._cache.$bar}function Jnt(t){let n=t.iScale,e=Xnt(n,t.type),i=n._length,o,r,a,p,f=()=>{a===32767||a===-32768||(UC(p)&&(i=Math.min(i,Math.abs(a-p)||i)),p=a)};for(o=0,r=e.length;o0?o[t-1]:null,p=tMath.abs(p)&&(f=p,x=a),n[e.axis]=x,n._custom={barStart:f,barEnd:x,start:o,end:r,min:a,max:p}}function Ibe(t,n,e,i){return Ma(t)?iot(t,n,e,i):n[e.axis]=e.parse(t,i),n}function kve(t,n,e,i){let o=t.iScale,r=t.vScale,a=o.getLabels(),p=o===r,f=[],x,I,D,P;for(x=e,I=e+i;x=e?1:-1)}function oot(t){let n,e,i,o,r;return t.horizontal?(n=t.base>t.x,e="left",i="right"):(n=t.base{class t extends Rb{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,i,o,r){return kve(e,i,o,r)}parseArrayData(e,i,o,r){return kve(e,i,o,r)}parseObjectData(e,i,o,r){let{iScale:a,vScale:p}=e,{xAxisKey:f="x",yAxisKey:x="y"}=this._parsing,I=a.axis==="x"?f:x,D=p.axis==="x"?f:x,P=[],R,j,$,W;for(R=o,j=o+r;RD.controller.options.grouped),a=o.options.stacked,p=[],f=this._cachedMeta.controller.getParsed(i),x=f&&f[o.axis],I=D=>{let P=D._parsed.find(j=>j[o.axis]===x),R=P&&P[D.vScale.axis];if(Fr(R)||isNaN(R))return!0};for(let D of r)if(!(i!==void 0&&I(D))&&((a===!1||p.indexOf(D.stack)===-1||a===void 0&&D.stack===void 0)&&p.push(D.stack),D.index===e))break;return p.length||p.push(void 0),p}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,i=this.chart.options.indexAxis;return Object.keys(e).filter(o=>e[o].axis===i).shift()}_getAxis(){let e={},i=this.getFirstScaleIdForIndexAxis();for(let o of this.chart.data.datasets)e[xr(this.chart.options.indexAxis==="x"?o.xAxisID:o.yAxisID,i)]=!0;return Object.keys(e)}_getStackIndex(e,i,o){let r=this._getStacks(e,o),a=i!==void 0?r.indexOf(i):-1;return a===-1?r.length-1:a}_getRuler(){let e=this.options,i=this._cachedMeta,o=i.iScale,r=[],a,p;for(a=0,p=i.data.length;a{class t extends Rb{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,i,o,r){let a=super.parsePrimitiveData(e,i,o,r);for(let p=0;p=0;--o)i=Math.max(i,e[o].size(this.resolveDataElementOptions(o))/2);return i>0&&i}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:a}=i,p=this.getParsed(e),f=r.getLabelForValue(p.x),x=a.getLabelForValue(p.y),I=p._custom;return{label:o[e]||"",value:"("+f+", "+x+(I?", "+I:"")+")"}}update(e){let i=this._cachedMeta.data;this.updateElements(i,0,i.length,e)}updateElements(e,i,o,r){let a=r==="reset",{iScale:p,vScale:f}=this._cachedMeta,{sharedOptions:x,includeOptions:I}=this._getSharedOptions(i,r),D=p.axis,P=f.axis;for(let R=i;RjC(ge,p,f,!0)?1:Math.max(Re,Re*e,Se,Se*e),j=(ge,Re,Se)=>jC(ge,p,f,!0)?-1:Math.min(Re,Re*e,Se,Se*e),$=R(0,x,D),W=R(Il,I,P),Q=j(Fs,x,D),se=j(Fs+Il,I,P);i=($-Q)/2,o=(W-se)/2,r=-($+Q)/2,a=-(W+se)/2}return{ratioX:i,ratioY:o,offsetX:r,offsetY:a}}var uX=(()=>{class t extends Rb{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let i=e.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:o,color:r}}=e.legend.options;return i.labels.map((a,p)=>{let x=e.getDatasetMeta(0).controller.getStyle(p);return{text:a,fillStyle:x.backgroundColor,strokeStyle:x.borderColor,fontColor:r,lineWidth:x.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(p),index:p}})}return[]}},onClick(e,i,o){o.chart.toggleDataVisibility(i.index),o.chart.update()}}}};constructor(e,i){super(e,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,i){let o=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=o;else{let a=x=>+o[x];if(os(o[e])){let{key:x="value"}=this._parsing;a=I=>+Qg(o[I],x)}let p,f;for(p=e,f=e+i;p0&&!isNaN(e)?Ra*(Math.abs(e)/i):0}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],a=GC(i._parsed[e],o.options.locale);return{label:r[e]||"",value:a}}getMaxBorderWidth(e){let i=0,o=this.chart,r,a,p,f,x;if(!e){for(r=0,a=o.data.datasets.length;r{class t extends Rb{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let i=this._cachedMeta,{dataset:o,data:r=[],_dataset:a}=i,p=this.chart._animationsDisabled,{start:f,count:x}=N6(i,r,p);this._drawStart=f,this._drawCount=x,B6(i)&&(f=0,x=r.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=r;let I=this.resolveDatasetElementOptions(e);this.options.showLine||(I.borderWidth=0),I.segment=this.options.segment,this.updateElement(o,void 0,{animated:!p,options:I},e),this.updateElements(r,f,x,e)}updateElements(e,i,o,r){let a=r==="reset",{iScale:p,vScale:f,_stacked:x,_dataset:I}=this._cachedMeta,{sharedOptions:D,includeOptions:P}=this._getSharedOptions(i,r),R=p.axis,j=f.axis,{spanGaps:$,segment:W}=this.options,Q=Ab($)?$:Number.POSITIVE_INFINITY,se=this.chart._animationsDisabled||a||r==="none",ge=i+o,Re=e.length,Se=i>0&&this.getParsed(i-1);for(let fe=0;fe=ge){je.skip=!0;continue}let st=this.getParsed(fe),Fe=Fr(st[j]),ht=je[R]=p.getPixelForValue(st[R],fe),ue=je[j]=a||Fe?f.getBasePixel():f.getPixelForValue(x?this.applyStack(f,st,x):st[j],fe);je.skip=isNaN(ht)||isNaN(ue)||Fe,je.stop=fe>0&&Math.abs(st[R]-Se[R])>Q,W&&(je.parsed=st,je.raw=I.data[fe]),P&&(je.options=D||this.resolveDataElementOptions(fe,be.active?"active":r)),se||this.updateElement(be,fe,je,r),Se=st}}getMaxOverflow(){let e=this._cachedMeta,i=e.dataset,o=i.options&&i.options.borderWidth||0,r=e.data||[];if(!r.length)return o;let a=r[0].size(this.resolveDataElementOptions(0)),p=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(o,a,p)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}return t})(),Tbe=(()=>{class t extends Rb{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let i=e.data;if(i.labels.length&&i.datasets.length){let{labels:{pointStyle:o,color:r}}=e.legend.options;return i.labels.map((a,p)=>{let x=e.getDatasetMeta(0).controller.getStyle(p);return{text:a,fillStyle:x.backgroundColor,strokeStyle:x.borderColor,fontColor:r,lineWidth:x.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(p),index:p}})}return[]}},onClick(e,i,o){o.chart.toggleDataVisibility(i.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,i){super(e,i),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let i=this._cachedMeta,o=this.chart,r=o.data.labels||[],a=GC(i._parsed[e].r,o.options.locale);return{label:r[e]||"",value:a}}parseObjectData(e,i,o,r){return q6.bind(this)(e,i,o,r)}update(e){let i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,e)}getMinMax(){let e=this._cachedMeta,i={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,r)=>{let a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(ai.max&&(i.max=a))}),i}_updateRadius(){let e=this.chart,i=e.chartArea,o=e.options,r=Math.min(i.right-i.left,i.bottom-i.top),a=Math.max(r/2,0),p=Math.max(o.cutoutPercentage?a/100*o.cutoutPercentage:1,0),f=(a-p)/e.getVisibleDatasetCount();this.outerRadius=a-f*this.index,this.innerRadius=this.outerRadius-f}updateElements(e,i,o,r){let a=r==="reset",p=this.chart,x=p.options.animation,I=this._cachedMeta.rScale,D=I.xCenter,P=I.yCenter,R=I.getIndexAngle(0)-.5*Fs,j=R,$,W=360/this.countVisibleElements();for($=0;${!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&i++}),i}_computeAngle(e,i,o){return this.chart.getDataVisibility(e)?rh(this.resolveDataElementOptions(e,i).angle||o):0}}return t})(),pot=(()=>{class t extends uX{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return t})(),hot=(()=>{class t extends Rb{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let i=this._cachedMeta.vScale,o=this.getParsed(e);return{label:i.getLabels()[e],value:""+i.getLabelForValue(o[i.axis])}}parseObjectData(e,i,o,r){return q6.bind(this)(e,i,o,r)}update(e){let i=this._cachedMeta,o=i.dataset,r=i.data||[],a=i.iScale.getLabels();if(o.points=r,e!=="resize"){let p=this.resolveDatasetElementOptions(e);this.options.showLine||(p.borderWidth=0);let f={_loop:!0,_fullLoop:a.length===r.length,options:p};this.updateElement(o,void 0,f,e)}this.updateElements(r,0,r.length,e)}updateElements(e,i,o,r){let a=this._cachedMeta.rScale,p=r==="reset";for(let f=i;f{class t extends Rb{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){let i=this._cachedMeta,o=this.chart.data.labels||[],{xScale:r,yScale:a}=i,p=this.getParsed(e),f=r.getLabelForValue(p.x),x=a.getLabelForValue(p.y);return{label:o[e]||"",value:"("+f+", "+x+")"}}update(e){let i=this._cachedMeta,{data:o=[]}=i,r=this.chart._animationsDisabled,{start:a,count:p}=N6(i,o,r);if(this._drawStart=a,this._drawCount=p,B6(i)&&(a=0,p=o.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:f,_dataset:x}=i;f._chart=this.chart,f._datasetIndex=this.index,f._decimated=!!x._decimated,f.points=o;let I=this.resolveDatasetElementOptions(e);I.segment=this.options.segment,this.updateElement(f,void 0,{animated:!r,options:I},e)}else this.datasetElementType&&(delete i.dataset,this.datasetElementType=!1);this.updateElements(o,a,p,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,i,o,r){let a=r==="reset",{iScale:p,vScale:f,_stacked:x,_dataset:I}=this._cachedMeta,D=this.resolveDataElementOptions(i,r),P=this.getSharedOptions(D),R=this.includeOptions(r,P),j=p.axis,$=f.axis,{spanGaps:W,segment:Q}=this.options,se=Ab(W)?W:Number.POSITIVE_INFINITY,ge=this.chart._animationsDisabled||a||r==="none",Re=i>0&&this.getParsed(i-1);for(let Se=i;Se0&&Math.abs(be[j]-Re[j])>se,Q&&(je.parsed=be,je.raw=I.data[Se]),R&&(je.options=P||this.resolveDataElementOptions(Se,fe.active?"active":r)),ge||this.updateElement(fe,Se,je,r),Re=be}this.updateSharedOptions(P,r,D)}getMaxOverflow(){let e=this._cachedMeta,i=e.data||[];if(!this.options.showLine){let f=0;for(let x=i.length-1;x>=0;--x)f=Math.max(f,i[x].size(this.resolveDataElementOptions(x))/2);return f>0&&f}let o=e.dataset,r=o.options&&o.options.borderWidth||0;if(!i.length)return r;let a=i[0].size(this.resolveDataElementOptions(0)),p=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,p)/2}}return t})(),fot=Object.freeze({__proto__:null,BarController:lot,BubbleController:cot,DoughnutController:uX,LineController:uot,PieController:pot,PolarAreaController:Tbe,RadarController:hot,ScatterController:mot});function qC(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var KQ=class t{static override(n){Object.assign(t.prototype,n)}options;constructor(n){this.options=n||{}}init(){}formats(){return qC()}parse(){return qC()}format(){return qC()}add(){return qC()}diff(){return qC()}startOf(){return qC()}endOf(){return qC()}},got={_date:KQ};function _ot(t,n,e,i){let{controller:o,data:r,_sorted:a}=t,p=o._cachedMeta.iScale,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(p&&n===p.axis&&n!=="r"&&a&&r.length){let x=p._reversePixels?yQ:of;if(i){if(o._sharedOptions){let I=r[0],D=typeof I.getRange=="function"&&I.getRange(n);if(D){let P=x(r,n,e-D),R=x(r,n,e+D);return{lo:P.lo,hi:R.hi}}}}else{let I=x(r,n,e);if(f){let{vScale:D}=o._cachedMeta,{_parsed:P}=t,R=P.slice(0,I.lo+1).reverse().findIndex($=>!Fr($[D.axis]));I.lo-=Math.max(0,R);let j=P.slice(I.hi).findIndex($=>!Fr($[D.axis]));I.hi+=Math.max(0,j)}return I}}return{lo:0,hi:r.length-1}}function PP(t,n,e,i,o){let r=t.getSortedVisibleDatasetMetas(),a=e[n];for(let p=0,f=r.length;p{f[a]&&f[a](n[e],o)&&(r.push({element:f,datasetIndex:x,index:I}),p=p||f.inRange(n.x,n.y,o))}),i&&!p?[]:r}var xot={evaluateInteractionItems:PP,modes:{index(t,n,e,i){let o=W0(n,t),r=e.axis||"x",a=e.includeInvisible||!1,p=e.intersect?zQ(t,o,r,i,a):VQ(t,o,r,!1,i,a),f=[];return p.length?(t.getSortedVisibleDatasetMetas().forEach(x=>{let I=p[0].index,D=x.data[I];D&&!D.skip&&f.push({element:D,datasetIndex:x.index,index:I})}),f):[]},dataset(t,n,e,i){let o=W0(n,t),r=e.axis||"xy",a=e.includeInvisible||!1,p=e.intersect?zQ(t,o,r,i,a):VQ(t,o,r,!1,i,a);if(p.length>0){let f=p[0].datasetIndex,x=t.getDatasetMeta(f).data;p=[];for(let I=0;Ie.pos===n)}function Pve(t,n){return t.filter(e=>Ebe.indexOf(e.pos)===-1&&e.box.axis===n)}function SP(t,n){return t.sort((e,i)=>{let o=n?i:e,r=n?e:i;return o.weight===r.weight?o.index-r.index:o.weight-r.weight})}function Cot(t){let n=[],e,i,o,r,a,p;for(e=0,i=(t||[]).length;ex.box.fullSize),!0),i=SP(wP(n,"left"),!0),o=SP(wP(n,"right")),r=SP(wP(n,"top"),!0),a=SP(wP(n,"bottom")),p=Pve(n,"x"),f=Pve(n,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:o.concat(f).concat(a).concat(p),chartArea:wP(n,"chartArea"),vertical:i.concat(o).concat(f),horizontal:r.concat(a).concat(p)}}function Lve(t,n,e,i){return Math.max(t[e],n[e])+Math.max(t[i],n[i])}function Abe(t,n){t.top=Math.max(t.top,n.top),t.left=Math.max(t.left,n.left),t.bottom=Math.max(t.bottom,n.bottom),t.right=Math.max(t.right,n.right)}function Tot(t,n,e,i){let{pos:o,box:r}=e,a=t.maxPadding;if(!os(o)){e.size&&(t[o]-=e.size);let D=i[e.stack]||{size:0,count:1};D.size=Math.max(D.size,e.horizontal?r.height:r.width),e.size=D.size/D.count,t[o]+=e.size}r.getPadding&&Abe(a,r.getPadding());let p=Math.max(0,n.outerWidth-Lve(a,t,"left","right")),f=Math.max(0,n.outerHeight-Lve(a,t,"top","bottom")),x=p!==t.w,I=f!==t.h;return t.w=p,t.h=f,e.horizontal?{same:x,other:I}:{same:I,other:x}}function Eot(t){let n=t.maxPadding;function e(i){let o=Math.max(n[i]-t[i],0);return t[i]+=o,o}t.y+=e("top"),t.x+=e("left"),e("right"),e("bottom")}function Aot(t,n){let e=n.maxPadding;function i(o){let r={left:0,top:0,right:0,bottom:0};return o.forEach(a=>{r[a]=Math.max(n[a],e[a])}),r}return i(t?["left","right"]:["top","bottom"])}function EP(t,n,e,i){let o=[],r,a,p,f,x,I;for(r=0,a=t.length,x=0;r{typeof $.beforeLayout=="function"&&$.beforeLayout()});let I=f.reduce(($,W)=>W.box.options&&W.box.options.display===!1?$:$+1,0)||1,D=Object.freeze({outerWidth:n,outerHeight:e,padding:o,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/I,hBoxMaxHeight:a/2}),P=Object.assign({},o);Abe(P,mc(i));let R=Object.assign({maxPadding:P,w:r,h:a,x:o.left,y:o.top},o),j=Sot(f.concat(x),D);EP(p.fullSize,R,D,j),EP(f,R,D,j),EP(x,R,D,j)&&EP(f,R,D,j),Eot(R),Fve(p.leftAndTop,R,D,j),R.x+=R.w,R.y+=R.h,Fve(p.rightAndBottom,R,D,j),t.chartArea={left:R.left,top:R.top,right:R.left+R.w,bottom:R.top+R.h,height:R.h,width:R.w},Hs(p.chartArea,$=>{let W=$.box;Object.assign(W,t.chartArea),W.update(R.w,R.h,{left:0,top:0,right:0,bottom:0})})}},dU=class{acquireContext(n,e){}releaseContext(n){return!1}addEventListener(n,e,i){}removeEventListener(n,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(n,e,i,o){return e=Math.max(0,e||n.width),i=i||n.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(n){return!0}updateConfig(n){}},ZQ=class extends dU{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}},aU="$chartjs",Dot={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nve=t=>t===null||t==="";function kot(t,n){let e=t.style,i=t.getAttribute("height"),o=t.getAttribute("width");if(t[aU]={initial:{height:i,width:o,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Nve(o)){let r=Z6(t,"width");r!==void 0&&(t.width=r)}if(Nve(i))if(t.style.height==="")t.height=t.width/(n||2);else{let r=Z6(t,"height");r!==void 0&&(t.height=r)}return t}var Dbe=MQ?{passive:!0}:!1;function Mot(t,n,e){t&&t.addEventListener(n,e,Dbe)}function Rot(t,n,e){t&&t.canvas&&t.canvas.removeEventListener(n,e,Dbe)}function Oot(t,n){let e=Dot[t.type]||t.type,{x:i,y:o}=W0(t,n);return{type:e,chart:n,native:t,x:i!==void 0?i:null,y:o!==void 0?o:null}}function uU(t,n){for(let e of t)if(e===n||e.contains(n))return!0}function Pot(t,n,e){let i=t.canvas,o=new MutationObserver(r=>{let a=!1;for(let p of r)a=a||uU(p.addedNodes,i),a=a&&!uU(p.removedNodes,i);a&&e()});return o.observe(document,{childList:!0,subtree:!0}),o}function Lot(t,n,e){let i=t.canvas,o=new MutationObserver(r=>{let a=!1;for(let p of r)a=a||uU(p.removedNodes,i),a=a&&!uU(p.addedNodes,i);a&&e()});return o.observe(document,{childList:!0,subtree:!0}),o}var DP=new Map,Bve=0;function kbe(){let t=window.devicePixelRatio;t!==Bve&&(Bve=t,DP.forEach((n,e)=>{e.currentDevicePixelRatio!==t&&n()}))}function Fot(t,n){DP.size||window.addEventListener("resize",kbe),DP.set(t,n)}function Not(t){DP.delete(t),DP.size||window.removeEventListener("resize",kbe)}function Bot(t,n,e){let i=t.canvas,o=i&&xP(i);if(!o)return;let r=F6((p,f)=>{let x=o.clientWidth;e(p,f),x{let f=p[0],x=f.contentRect.width,I=f.contentRect.height;x===0&&I===0||r(x,I)});return a.observe(o),Fot(t,r),a}function UQ(t,n,e){e&&e.disconnect(),n==="resize"&&Not(t)}function zot(t,n,e){let i=t.canvas,o=F6(r=>{t.ctx!==null&&e(Oot(r,t))},t);return Mot(i,n,o),o}var YQ=class extends dU{acquireContext(n,e){let i=n&&n.getContext&&n.getContext("2d");return i&&i.canvas===n?(kot(n,e),i):null}releaseContext(n){let e=n.canvas;if(!e[aU])return!1;let i=e[aU].initial;["height","width"].forEach(r=>{let a=i[r];Fr(a)?e.removeAttribute(r):e.setAttribute(r,a)});let o=i.style||{};return Object.keys(o).forEach(r=>{e.style[r]=o[r]}),e.width=e.width,delete e[aU],!0}addEventListener(n,e,i){this.removeEventListener(n,e);let o=n.$proxies||(n.$proxies={}),a={attach:Pot,detach:Lot,resize:Bot}[e]||zot;o[e]=a(n,e,i)}removeEventListener(n,e){let i=n.$proxies||(n.$proxies={}),o=i[e];if(!o)return;({attach:UQ,detach:UQ,resize:UQ}[e]||Rot)(n,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,e,i,o){return kQ(n,e,i,o)}isAttached(n){let e=n&&xP(n);return!!(e&&e.isConnected)}};function Vot(t){return!bP()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ZQ:YQ}var lf=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(n){let{x:e,y:i}=this.getProps(["x","y"],n);return{x:e,y:i}}hasValue(){return Ab(this.x)&&Ab(this.y)}getProps(n,e){let i=this.$animations;if(!e||!i)return this;let o={};return n.forEach(r=>{o[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),o}};function Uot(t,n){let e=t.options.ticks,i=Hot(t),o=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?Got(n):[],a=r.length,p=r[0],f=r[a-1],x=[];if(a>o)return $ot(n,x,r,a/o),x;let I=jot(r,n,o);if(a>0){let D,P,R=a>1?Math.round((f-p)/(a-1)):null;for(iU(n,x,I,Fr(R)?0:p-R,p),D=0,P=a-1;Do)return f}return Math.max(o,1)}function Got(t){let n=[],e,i;for(e=0,i=t.length;et==="left"?"right":t==="right"?"left":t,zve=(t,n,e)=>n==="top"||n==="left"?t[n]+e:t[n]-e,Vve=(t,n)=>Math.min(n||t,t);function Uve(t,n){let e=[],i=t.length/n,o=t.length,r=0;for(;ra+p)))return f}function Zot(t,n){Hs(t,e=>{let i=e.gc,o=i.length/2,r;if(o>n){for(r=0;ri?i:e,i=o&&e>i?e:i,{min:Hu(e,Hu(i,e)),max:Hu(i,Hu(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}getLabelItems(n=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(n))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){na(this.options.beforeUpdate,[this])}update(n,e,i){let{beginAtZero:o,grace:r,ticks:a}=this.options,p=a.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=TQ(this,r,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let f=p=r||i<=1||!this.isHorizontal()){this.labelRotation=o;return}let I=this._getLabelSizes(),D=I.widest.width,P=I.highest.height,R=hc(this.chart.width-D,0,this.maxWidth);p=n.offset?this.maxWidth/i:R/(i-1),D+6>p&&(p=R/(i-(n.offset?.5:1)),f=this.maxHeight-IP(n.grid)-e.padding-Hve(n.title,this.chart.options.font),x=Math.sqrt(D*D+P*P),a=hP(Math.min(Math.asin(hc((I.highest.height+6)/p,-1,1)),Math.asin(hc(f/x,-1,1))-Math.asin(hc(P/x,-1,1)))),a=Math.max(o,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){na(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){na(this.options.beforeFit,[this])}fit(){let n={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:r}}=this,a=this._isVisible(),p=this.isHorizontal();if(a){let f=Hve(o,e.options.font);if(p?(n.width=this.maxWidth,n.height=IP(r)+f):(n.height=this.maxHeight,n.width=IP(r)+f),i.display&&this.ticks.length){let{first:x,last:I,widest:D,highest:P}=this._getLabelSizes(),R=i.padding*2,j=rh(this.labelRotation),$=Math.cos(j),W=Math.sin(j);if(p){let Q=i.mirror?0:W*D.width+$*P.height;n.height=Math.min(this.maxHeight,n.height+Q+R)}else{let Q=i.mirror?0:$*D.width+W*P.height;n.width=Math.min(this.maxWidth,n.width+Q+R)}this._calculatePadding(x,I,W,$)}}this._handleMargins(),p?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,e,i,o){let{ticks:{align:r,padding:a},position:p}=this.options,f=this.labelRotation!==0,x=p!=="top"&&this.axis==="x";if(this.isHorizontal()){let I=this.getPixelForTick(0)-this.left,D=this.right-this.getPixelForTick(this.ticks.length-1),P=0,R=0;f?x?(P=o*n.width,R=i*e.height):(P=i*n.height,R=o*e.width):r==="start"?R=e.width:r==="end"?P=n.width:r!=="inner"&&(P=n.width/2,R=e.width/2),this.paddingLeft=Math.max((P-I+a)*this.width/(this.width-I),0),this.paddingRight=Math.max((R-D+a)*this.width/(this.width-D),0)}else{let I=e.height/2,D=n.height/2;r==="start"?(I=0,D=n.height):r==="end"&&(I=e.height,D=0),this.paddingTop=I+a,this.paddingBottom=D+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(){na(this.options.afterFit,[this])}isHorizontal(){let{axis:n,position:e}=this.options;return e==="top"||e==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let e,i;for(e=0,i=n.length;e({width:a[st]||0,height:p[st]||0});return{first:je(0),last:je(e-1),widest:je(fe),highest:je(be),widths:a,heights:p}}getLabelForValue(n){return n}getPixelForValue(n,e){return NaN}getValueForPixel(n){}getPixelForTick(n){let e=this.ticks;return n<0||n>e.length-1?null:this.getPixelForValue(e[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);let e=this._startPixel+n*this._length;return _Q(this._alignToPixels?G0(this.chart,e,0):e)}getDecimalForPixel(n){let e=(n-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:n,max:e}=this;return n<0&&e<0?e:n>0&&e>0?n:0}getContext(n){let e=this.ticks||[];if(n>=0&&np*o?p/i:f/o:f*o0}_computeGridLineItems(n){let e=this.axis,i=this.chart,o=this.options,{grid:r,position:a,border:p}=o,f=r.offset,x=this.isHorizontal(),D=this.ticks.length+(f?1:0),P=IP(r),R=[],j=p.setContext(this.getContext()),$=j.display?j.width:0,W=$/2,Q=function(Bi){return G0(i,Bi,$)},se,ge,Re,Se,fe,be,je,st,Fe,ht,ue,Pt;if(a==="top")se=Q(this.bottom),be=this.bottom-P,st=se-W,ht=Q(n.top)+W,Pt=n.bottom;else if(a==="bottom")se=Q(this.top),ht=n.top,Pt=Q(n.bottom)-W,be=se+W,st=this.top+P;else if(a==="left")se=Q(this.right),fe=this.right-P,je=se-W,Fe=Q(n.left)+W,ue=n.right;else if(a==="right")se=Q(this.left),Fe=n.left,ue=Q(n.right)-W,fe=se+W,je=this.left+P;else if(e==="x"){if(a==="center")se=Q((n.top+n.bottom)/2+.5);else if(os(a)){let Bi=Object.keys(a)[0],qt=a[Bi];se=Q(this.chart.scales[Bi].getPixelForValue(qt))}ht=n.top,Pt=n.bottom,be=se+W,st=be+P}else if(e==="y"){if(a==="center")se=Q((n.left+n.right)/2);else if(os(a)){let Bi=Object.keys(a)[0],qt=a[Bi];se=Q(this.chart.scales[Bi].getPixelForValue(qt))}fe=se-W,je=fe-P,Fe=n.left,ue=n.right}let ki=xr(o.ticks.maxTicksLimit,D),zt=Math.max(1,Math.ceil(D/ki));for(ge=0;ge0&&(Wi-=vn/2);break}Ei={left:Wi,top:Gn,width:vn+qi.width,height:zi+qi.height,color:zt.backdropColor}}W.push({label:Re,font:st,textOffset:ue,options:{rotation:$,color:qt,strokeColor:en,strokeWidth:_t,textAlign:St,textBaseline:Pt,translation:[Se,fe],backdrop:Ei}})}return W}_getXAxisLabelAlignment(){let{position:n,ticks:e}=this.options;if(-rh(this.labelRotation))return n==="top"?"left":"right";let o="center";return e.align==="start"?o="left":e.align==="end"?o="right":e.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(n){let{position:e,ticks:{crossAlign:i,mirror:o,padding:r}}=this.options,a=this._getLabelSizes(),p=n+r,f=a.widest.width,x,I;return e==="left"?o?(I=this.right+r,i==="near"?x="left":i==="center"?(x="center",I+=f/2):(x="right",I+=f)):(I=this.right-p,i==="near"?x="right":i==="center"?(x="center",I-=f/2):(x="left",I=this.left)):e==="right"?o?(I=this.left+r,i==="near"?x="right":i==="center"?(x="center",I-=f/2):(x="left",I-=f)):(I=this.left+p,i==="near"?x="left":i==="center"?(x="center",I+=f/2):(x="right",I=this.right)):x="right",{textAlign:x,x:I}}_computeLabelArea(){if(this.options.ticks.mirror)return;let n=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){let{ctx:n,options:{backgroundColor:e},left:i,top:o,width:r,height:a}=this;e&&(n.save(),n.fillStyle=e,n.fillRect(i,o,r,a),n.restore())}getLineWidthForValue(n){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let o=this.ticks.findIndex(r=>r.value===n);return o>=0?e.setContext(this.getContext(o)).lineWidth:0}drawGrid(n){let e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n)),r,a,p=(f,x,I)=>{!I.width||!I.color||(i.save(),i.lineWidth=I.width,i.strokeStyle=I.color,i.setLineDash(I.borderDash||[]),i.lineDashOffset=I.borderDashOffset,i.beginPath(),i.moveTo(f.x,f.y),i.lineTo(x.x,x.y),i.stroke(),i.restore())};if(e.display)for(r=0,a=o.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(n){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[],r,a;for(r=0,a=e.length;r{let i=e.split("."),o=i.pop(),r=[t].concat(i).join("."),a=n[e].split("."),p=a.pop(),f=a.join(".");Oa.route(r,o,f,p)})}function irt(t){return"id"in t&&"defaults"in t}var QQ=class{constructor(){this.controllers=new pA(Rb,"datasets",!0),this.elements=new pA(lf,"elements"),this.plugins=new pA(Object,"plugins"),this.scales=new pA(KC,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,e,i){[...e].forEach(o=>{let r=i||this._getRegistryForType(o);i||r.isForType(o)||r===this.plugins&&o.id?this._exec(n,r,o):Hs(o,a=>{let p=i||this._getRegistryForType(a);this._exec(n,p,a)})})}_exec(n,e,i){let o=pP(n);na(i["before"+o],[],i),e[n](i),na(i["after"+o],[],i)}_getRegistryForType(n){for(let e=0;er.filter(p=>!a.some(f=>p.plugin.id===f.plugin.id));this._notify(o(e,i),n,"stop"),this._notify(o(i,e),n,"start")}};function nrt(t){let n={},e=[],i=Object.keys(e_.plugins.items);for(let r=0;r1&&jve(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Gve(t,n,e){if(e[n+"AxisID"]===t)return{axis:n}}function drt(t,n){if(n.data&&n.data.datasets){let e=n.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(e.length)return Gve(t,"x",e[0])||Gve(t,"y",e[0])}return{}}function urt(t,n){let e=Db[t.type]||{scales:{}},i=n.scales||{},o=JQ(t.type,n),r=Object.create(null);return Object.keys(i).forEach(a=>{let p=i[a];if(!os(p))return console.error(`Invalid scale configuration for scale: ${a}`);if(p._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let f=eX(a,p,drt(a,t),Oa.scales[p.type]),x=lrt(f,o),I=e.scales||{};r[a]=VC(Object.create(null),[{axis:f},p,I[f],I[x]])}),t.data.datasets.forEach(a=>{let p=a.type||t.type,f=a.indexAxis||JQ(p,n),I=(Db[p]||{}).scales||{};Object.keys(I).forEach(D=>{let P=art(D,f),R=a[P+"AxisID"]||P;r[R]=r[R]||Object.create(null),VC(r[R],[{axis:P},i[R],I[D]])})}),Object.keys(r).forEach(a=>{let p=r[a];VC(p,[Oa.scales[p.type],Oa.scale])}),r}function Mbe(t){let n=t.options||(t.options={});n.plugins=xr(n.plugins,{}),n.scales=urt(t,n)}function Rbe(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function prt(t){return t=t||{},t.data=Rbe(t.data),Mbe(t),t}var $ve=new Map,Obe=new Set;function nU(t,n){let e=$ve.get(t);return e||(e=n(),$ve.set(t,e),Obe.add(e)),e}var TP=(t,n,e)=>{let i=Qg(n,e);i!==void 0&&t.add(i)},tX=class{constructor(n){this._config=prt(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Rbe(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){let n=this._config;this.clearCache(),Mbe(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return nU(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,e){return nU(`${n}.transition.${e}`,()=>[[`datasets.${n}.transitions.${e}`,`transitions.${e}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,e){return nU(`${n}-${e}`,()=>[[`datasets.${n}.elements.${e}`,`datasets.${n}`,`elements.${e}`,""]])}pluginScopeKeys(n){let e=n.id,i=this.type;return nU(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,e){let i=this._scopeCache,o=i.get(n);return(!o||e)&&(o=new Map,i.set(n,o)),o}getOptionScopes(n,e,i){let{options:o,type:r}=this,a=this._cachedScopes(n,i),p=a.get(e);if(p)return p;let f=new Set;e.forEach(I=>{n&&(f.add(n),I.forEach(D=>TP(f,n,D))),I.forEach(D=>TP(f,o,D)),I.forEach(D=>TP(f,Db[r]||{},D)),I.forEach(D=>TP(f,Oa,D)),I.forEach(D=>TP(f,U6,D))});let x=Array.from(f);return x.length===0&&x.push(Object.create(null)),Obe.has(e)&&a.set(e,x),x}chartOptionScopes(){let{options:n,type:e}=this;return[n,Db[e]||{},Oa.datasets[e]||{},{type:e},Oa,U6]}resolveNamedOptions(n,e,i,o=[""]){let r={$shared:!0},{resolver:a,subPrefixes:p}=qve(this._resolverCache,n,o),f=a;if(mrt(a,e)){r.$shared=!1,i=Zg(i)?i():i;let x=this.createResolver(n,i,p);f=Eb(a,i,x)}for(let x of e)r[x]=f[x];return r}createResolver(n,e,i=[""],o){let{resolver:r}=qve(this._resolverCache,n,i);return os(e)?Eb(r,e,void 0,o):r}};function qve(t,n,e){let i=t.get(n);i||(i=new Map,t.set(n,i));let o=e.join(),r=i.get(o);return r||(r={resolver:vP(n,e),subPrefixes:e.filter(p=>!p.toLowerCase().includes("hover"))},i.set(o,r)),r}var hrt=t=>os(t)&&Object.getOwnPropertyNames(t).some(n=>Zg(t[n]));function mrt(t,n){let{isScriptable:e,isIndexable:i}=$6(t);for(let o of n){let r=e(o),a=i(o),p=(a||r)&&t[o];if(r&&(Zg(p)||hrt(p))||a&&Ma(p))return!0}return!1}var frt="4.5.0",grt=["top","bottom","left","right","chartArea"];function Wve(t,n){return t==="top"||t==="bottom"||grt.indexOf(t)===-1&&n==="x"}function Kve(t,n){return function(e,i){return e[t]===i[t]?e[n]-i[n]:e[t]-i[t]}}function Zve(t){let n=t.chart,e=n.options.animation;n.notifyPlugins("afterRender"),na(e&&e.onComplete,[t],n)}function _rt(t){let n=t.chart,e=n.options.animation;na(e&&e.onProgress,[t],n)}function Pbe(t){return bP()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var lU={},Yve=t=>{let n=Pbe(t);return Object.values(lU).filter(e=>e.canvas===n).pop()};function yrt(t,n,e){let i=Object.keys(t);for(let o of i){let r=+o;if(r>=n){let a=t[o];delete t[o],(e>0||r>n)&&(t[r+e]=a)}}}function vrt(t,n,e,i){return!e||t.type==="mouseout"?null:i?n:t}var El=(()=>{class t{static defaults=Oa;static instances=lU;static overrides=Db;static registry=e_;static version=frt;static getChart=Yve;static register(...e){e_.add(...e),Qve()}static unregister(...e){e_.remove(...e),Qve()}constructor(e,i){let o=this.config=new tX(i),r=Pbe(e),a=Yve(r);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 p=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Vot(r)),this.platform.updateConfig(o);let f=this.platform.acquireContext(r,p.aspectRatio),x=f&&f.canvas,I=x&&x.height,D=x&&x.width;if(this.id=pQ(),this.ctx=f,this.canvas=x,this.width=D,this.height=I,this._options=p,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 XQ,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=xQ(P=>this.update(P),p.resizeDelay||0),this._dataChanges=[],lU[this.id]=this,!f||!x){console.error("Failed to create chart: can't acquire context from the given item");return}K0.listen(this,"complete",Zve),K0.listen(this,"progress",_rt),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:i},width:o,height:r,_aspectRatio:a}=this;return Fr(e)?i&&a?a:r?o/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return e_}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():K6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return H6(this.canvas,this.ctx),this}stop(){return K0.stop(this),this}resize(e,i){K0.running(this)?this._resizeBeforeDraw={width:e,height:i}:this._resize(e,i)}_resize(e,i){let o=this.options,r=this.canvas,a=o.maintainAspectRatio&&this.aspectRatio,p=this.platform.getMaximumSize(r,e,i,a),f=o.devicePixelRatio||this.platform.getDevicePixelRatio(),x=this.width?"resize":"attach";this.width=p.width,this.height=p.height,this._aspectRatio=this.aspectRatio,K6(this,f,!0)&&(this.notifyPlugins("resize",{size:p}),na(o.onResize,[this,p],this),this.attached&&this._doResize(x)&&this.render())}ensureScalesHaveIDs(){let i=this.options.scales||{};Hs(i,(o,r)=>{o.id=r})}buildOrUpdateScales(){let e=this.options,i=e.scales,o=this.scales,r=Object.keys(o).reduce((p,f)=>(p[f]=!1,p),{}),a=[];i&&(a=a.concat(Object.keys(i).map(p=>{let f=i[p],x=eX(p,f),I=x==="r",D=x==="x";return{options:f,dposition:I?"chartArea":D?"bottom":"left",dtype:I?"radialLinear":D?"category":"linear"}}))),Hs(a,p=>{let f=p.options,x=f.id,I=eX(x,f),D=xr(f.type,p.dtype);(f.position===void 0||Wve(f.position,I)!==Wve(p.dposition))&&(f.position=p.dposition),r[x]=!0;let P=null;if(x in o&&o[x].type===D)P=o[x];else{let R=e_.getScale(D);P=new R({id:x,type:D,ctx:this.ctx,chart:this}),o[P.id]=P}P.init(f,e)}),Hs(r,(p,f)=>{p||delete o[f]}),Hs(o,p=>{Yd.configure(this,p,p.options),Yd.addBox(this,p)})}_updateMetasets(){let e=this._metasets,i=this.data.datasets.length,o=e.length;if(e.sort((r,a)=>r.index-a.index),o>i){for(let r=i;ri.length&&delete this._stacks,e.forEach((o,r)=>{i.filter(a=>a===o._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let e=[],i=this.data.datasets,o,r;for(this._removeUnreferencedMetasets(),o=0,r=i.length;o{this.getDatasetMeta(i).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let i=this.config;i.update();let o=this._options=i.createResolver(i.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let p=0;for(let I=0,D=this.data.datasets.length;I{I.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Kve("z","_idx"));let{_active:f,_lastEvent:x}=this;x?this._eventHandler(x,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){Hs(this.scales,e=>{Yd.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,i=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!A6(i,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,i=this._getUniformDataChanges()||[];for(let{method:o,start:r,count:a}of i){let p=o==="_removeElements"?-a:a;yrt(e,r,p)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let i=this.data.datasets.length,o=a=>new Set(e.filter(p=>p[0]===a).map((p,f)=>f+","+p.splice(1).join(","))),r=o(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;Yd.update(this,this.width,this.height,e);let i=this.chartArea,o=i.width<=0||i.height<=0;this._layers=[],Hs(this.boxes,r=>{o&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let i=0,o=this.data.datasets.length;i=0;--i)this._drawDataset(e[i]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let i=this.ctx,o={meta:e,index:e.index,cancelable:!0},r=eU(this,e);this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&cA(i,r),e.controller.draw(),r&&dA(i),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return rf(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,i,o,r){let a=xot.modes[i];return typeof a=="function"?a(this,e,o,r):[]}getDatasetMeta(e){let i=this.data.datasets[e],o=this._metasets,r=o.filter(a=>a&&a._dataset===i).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:i&&i.order||0,index:e,_dataset:i,_parsed:[],_sorted:!1},o.push(r)),r}getContext(){return this.$context||(this.$context=Xg(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let i=this.data.datasets[e];if(!i)return!1;let o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!i.hidden}setDatasetVisibility(e,i){let o=this.getDatasetMeta(e);o.hidden=!i}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,i,o){let r=o?"show":"hide",a=this.getDatasetMeta(e),p=a.controller._resolveAnimations(void 0,r);UC(i)?(a.data[i].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),p.update(a,{visible:o}),this.update(f=>f.datasetIndex===e?r:void 0))}hide(e,i){this._updateVisibility(e,i,!1)}show(e,i){this._updateVisibility(e,i,!0)}_destroyDatasetMeta(e){let i=this._metasets[e];i&&i.controller&&i.controller._destroy(),delete this._metasets[e]}_stop(){let e,i;for(this.stop(),K0.remove(this),e=0,i=this.data.datasets.length;e{i.addEventListener(this,a,p),e[a]=p},r=(a,p,f)=>{a.offsetX=p,a.offsetY=f,this._eventHandler(a)};Hs(this.options.events,a=>o(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,o=(x,I)=>{i.addEventListener(this,x,I),e[x]=I},r=(x,I)=>{e[x]&&(i.removeEventListener(this,x,I),delete e[x])},a=(x,I)=>{this.canvas&&this.resize(x,I)},p,f=()=>{r("attach",f),this.attached=!0,this.resize(),o("resize",a),o("detach",p)};p=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),o("attach",f)},i.isAttached(this.canvas)?f():p()}unbindEvents(){Hs(this._listeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._listeners={},Hs(this._responsiveListeners,(e,i)=>{this.platform.removeEventListener(this,i,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,i,o){let r=o?"set":"remove",a,p,f,x;for(i==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),f=0,x=e.length;f{let f=this.getDatasetMeta(a);if(!f)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:f.data[p],index:p}});!lA(o,i)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,i))}notifyPlugins(e,i,o){return this._plugins.notify(this,e,i,o)}isPluginEnabled(e){return this._plugins._cache.filter(i=>i.plugin.id===e).length===1}_updateHoverStyles(e,i,o){let r=this.options.hover,a=(x,I)=>x.filter(D=>!I.some(P=>D.datasetIndex===P.datasetIndex&&D.index===P.index)),p=a(i,e),f=o?e:a(e,i);p.length&&this.updateHoverStyle(p,r.mode,!1),f.length&&r.mode&&this.updateHoverStyle(f,r.mode,!0)}_eventHandler(e,i){let o={event:e,replay:i,cancelable:!0,inChartArea:this.isPointInArea(e)},r=p=>(p.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,r)===!1)return;let a=this._handleEvent(e,i,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,r),(a||o.changed)&&this.render(),this}_handleEvent(e,i,o){let{_active:r=[],options:a}=this,p=i,f=this._getActiveElements(e,r,o,p),x=mQ(e),I=vrt(e,this._lastEvent,o,x);o&&(this._lastEvent=null,na(a.onHover,[e,f,this],this),x&&na(a.onClick,[e,f,this],this));let D=!lA(f,r);return(D||i)&&(this._active=f,this._updateHoverStyles(f,r,i)),this._lastEvent=I,D}_getActiveElements(e,i,o,r){if(e.type==="mouseout")return[];if(!o)return i;let a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,r)}}return t})();function Qve(){return Hs(El.instances,t=>t._plugins.invalidate())}function brt(t,n,e){let{startAngle:i,x:o,y:r,outerRadius:a,innerRadius:p,options:f}=n,{borderWidth:x,borderJoinStyle:I}=f,D=Math.min(x/a,ad(i-e));if(t.beginPath(),t.arc(o,r,a-x/2,i+D/2,e-D/2),p>0){let P=Math.min(x/p,ad(i-e));t.arc(o,r,p+x/2,e-P/2,i+P/2,!0)}else{let P=Math.min(x/2,a*ad(i-e));if(I==="round")t.arc(o,r,P,e-Fs/2,i+Fs/2,!0);else if(I==="bevel"){let R=2*P*P,j=-R*Math.cos(e+Fs/2)+o,$=-R*Math.sin(e+Fs/2)+r,W=R*Math.cos(i+Fs/2)+o,Q=R*Math.sin(i+Fs/2)+r;t.lineTo(j,$),t.lineTo(W,Q)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function xrt(t,n,e){let{startAngle:i,pixelMargin:o,x:r,y:a,outerRadius:p,innerRadius:f}=n,x=o/p;t.beginPath(),t.arc(r,a,p,i-x,e+x),f>o?(x=o/f,t.arc(r,a,f,e+x,i-x,!0)):t.arc(r,a,o,e+Il,i-Il),t.closePath(),t.clip()}function Crt(t){return yP(t,["outerStart","outerEnd","innerStart","innerEnd"])}function wrt(t,n,e,i){let o=Crt(t.options.borderRadius),r=(e-n)/2,a=Math.min(r,i*n/2),p=f=>{let x=(e-Math.min(r,f))*i/2;return hc(f,0,Math.min(r,x))};return{outerStart:p(o.outerStart),outerEnd:p(o.outerEnd),innerStart:hc(o.innerStart,0,a),innerEnd:hc(o.innerEnd,0,a)}}function uA(t,n,e,i){return{x:e+t*Math.cos(n),y:i+t*Math.sin(n)}}function pU(t,n,e,i,o,r){let{x:a,y:p,startAngle:f,pixelMargin:x,innerRadius:I}=n,D=Math.max(n.outerRadius+i+e-x,0),P=I>0?I+i+e+x:0,R=0,j=o-f;if(i){let zt=I>0?I-i:0,Bi=D>0?D-i:0,qt=(zt+Bi)/2,en=qt!==0?j*qt/(qt+i):j;R=(j-en)/2}let $=Math.max(.001,j*D-e/Fs)/D,W=(j-$)/2,Q=f+W+R,se=o-W-R,{outerStart:ge,outerEnd:Re,innerStart:Se,innerEnd:fe}=wrt(n,P,D,se-Q),be=D-ge,je=D-Re,st=Q+ge/be,Fe=se-Re/je,ht=P+Se,ue=P+fe,Pt=Q+Se/ht,ki=se-fe/ue;if(t.beginPath(),r){let zt=(st+Fe)/2;if(t.arc(a,p,D,st,zt),t.arc(a,p,D,zt,Fe),Re>0){let _t=uA(je,Fe,a,p);t.arc(_t.x,_t.y,Re,Fe,se+Il)}let Bi=uA(ue,se,a,p);if(t.lineTo(Bi.x,Bi.y),fe>0){let _t=uA(ue,ki,a,p);t.arc(_t.x,_t.y,fe,se+Il,ki+Math.PI)}let qt=(se-fe/P+(Q+Se/P))/2;if(t.arc(a,p,P,se-fe/P,qt,!0),t.arc(a,p,P,qt,Q+Se/P,!0),Se>0){let _t=uA(ht,Pt,a,p);t.arc(_t.x,_t.y,Se,Pt+Math.PI,Q-Il)}let en=uA(be,Q,a,p);if(t.lineTo(en.x,en.y),ge>0){let _t=uA(be,st,a,p);t.arc(_t.x,_t.y,ge,Q-Il,st)}}else{t.moveTo(a,p);let zt=Math.cos(st)*D+a,Bi=Math.sin(st)*D+p;t.lineTo(zt,Bi);let qt=Math.cos(Fe)*D+a,en=Math.sin(Fe)*D+p;t.lineTo(qt,en)}t.closePath()}function Srt(t,n,e,i,o){let{fullCircles:r,startAngle:a,circumference:p}=n,f=n.endAngle;if(r){pU(t,n,e,i,f,o);for(let x=0;x=Fs&&R===0&&I!=="miter"&&brt(t,n,$),r||(pU(t,n,e,i,$,o),t.stroke())}var kP=class extends lf{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(n){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,e,i){let o=this.getProps(["x","y"],i),{angle:r,distance:a}=R6(o,{x:n,y:e}),{startAngle:p,endAngle:f,innerRadius:x,outerRadius:I,circumference:D}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),P=(this.options.spacing+this.options.borderWidth)/2,R=xr(D,f-p),j=jC(r,p,f)&&p!==f,$=R>=Ra||j,W=af(a,x+P,I+P);return $&&W}getCenterPoint(n){let{x:e,y:i,startAngle:o,endAngle:r,innerRadius:a,outerRadius:p}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:f,spacing:x}=this.options,I=(o+r)/2,D=(a+p+x+f)/2;return{x:e+Math.cos(I)*D,y:i+Math.sin(I)*D}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){let{options:e,circumference:i}=this,o=(e.offset||0)/4,r=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>Ra?Math.floor(i/Ra):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let p=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(p)*o,Math.sin(p)*o);let f=1-Math.sin(Math.min(Fs,i||0)),x=o*f;n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,Srt(n,this,x,r,a),Irt(n,this,x,r,a),n.restore()}};function Lbe(t,n,e=n){t.lineCap=xr(e.borderCapStyle,n.borderCapStyle),t.setLineDash(xr(e.borderDash,n.borderDash)),t.lineDashOffset=xr(e.borderDashOffset,n.borderDashOffset),t.lineJoin=xr(e.borderJoinStyle,n.borderJoinStyle),t.lineWidth=xr(e.borderWidth,n.borderWidth),t.strokeStyle=xr(e.borderColor,n.borderColor)}function Trt(t,n,e){t.lineTo(e.x,e.y)}function Ert(t){return t.stepped?SQ:t.tension||t.cubicInterpolationMode==="monotone"?IQ:Trt}function Fbe(t,n,e={}){let i=t.length,{start:o=0,end:r=i-1}=e,{start:a,end:p}=n,f=Math.max(o,a),x=Math.min(r,p),I=op&&r>p;return{count:i,start:f,loop:n.loop,ilen:x(a+(x?p-Re:Re))%r,ge=()=>{$!==W&&(t.lineTo(I,W),t.lineTo(I,$),t.lineTo(I,Q))};for(f&&(R=o[se(0)],t.moveTo(R.x,R.y)),P=0;P<=p;++P){if(R=o[se(P)],R.skip)continue;let Re=R.x,Se=R.y,fe=Re|0;fe===j?(Se<$?$=Se:Se>W&&(W=Se),I=(D*I+Re)/++D):(ge(),t.lineTo(Re,Se),j=fe,D=0,$=W=Se),Q=Se}ge()}function iX(t){let n=t.options,e=n.borderDash&&n.borderDash.length;return!t._decimated&&!t._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!e?Drt:Art}function krt(t){return t.stepped?RQ:t.tension||t.cubicInterpolationMode==="monotone"?OQ:j0}function Mrt(t,n,e,i){let o=n._path;o||(o=n._path=new Path2D,n.path(o,e,i)&&o.closePath()),Lbe(t,n.options),t.stroke(o)}function Rrt(t,n,e,i){let{segments:o,options:r}=n,a=iX(n);for(let p of o)Lbe(t,r,p.style),t.beginPath(),a(t,n,p,{start:e,end:e+i-1})&&t.closePath(),t.stroke()}var Ort=typeof Path2D=="function";function Prt(t,n,e,i){Ort&&!n.options.segment?Mrt(t,n,e,i):Rrt(t,n,e,i)}var fU=(()=>{class t extends lf{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,i){let o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){let r=o.spanGaps?this._loop:this._fullLoop;DQ(this._points,o,e,r,i),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=PQ(this,this.options.segment))}first(){let e=this.segments,i=this.points;return e.length&&i[e[0].start]}last(){let e=this.segments,i=this.points,o=e.length;return o&&i[e[o-1].end]}interpolate(e,i){let o=this.options,r=e[i],a=this.points,p=J6(this,{property:i,start:r,end:r});if(!p.length)return;let f=[],x=krt(o),I,D;for(I=0,D=p.length;I{class t extends lf{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,o){let r=this.options,{x:a,y:p}=this.getProps(["x","y"],o);return Math.pow(e-a,2)+Math.pow(i-p,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Bbe(t){return nX[t%nX.length]}function zbe(t){return Jve[t%Jve.length]}function Urt(t,n){return t.borderColor=Bbe(n),t.backgroundColor=zbe(n),++n}function Hrt(t,n){return t.backgroundColor=t.data.map(()=>Bbe(n++)),n}function jrt(t,n){return t.backgroundColor=t.data.map(()=>zbe(n++)),n}function Grt(t){let n=0;return(e,i)=>{let o=t.getDatasetMeta(i).controller;o instanceof uX?n=Hrt(e,n):o instanceof Tbe?n=jrt(e,n):o&&(n=Urt(e,n))}}function ebe(t){let n;for(n in t)if(t[n].borderColor||t[n].backgroundColor)return!0;return!1}function $rt(t){return t&&(t.borderColor||t.backgroundColor)}function qrt(){return Oa.borderColor!=="rgba(0,0,0,0.1)"||Oa.backgroundColor!=="rgba(0,0,0,0.1)"}var Wrt={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,n,e){if(!e.enabled)return;let{data:{datasets:i},options:o}=t.config,{elements:r}=o,a=ebe(i)||$rt(o)||r&&ebe(r)||qrt();if(!e.forceOverride&&a)return;let p=Grt(t);i.forEach(p)}};function Krt(t,n,e,i,o){let r=o.samples||i;if(r>=e)return t.slice(n,n+e);let a=[],p=(e-2)/(r-2),f=0,x=n+e-1,I=n,D,P,R,j,$;for(a[f++]=t[I],D=0;DR&&(R=j,P=t[se],$=se);a[f++]=P,I=$}return a[f++]=t[x],a}function Zrt(t,n,e,i){let o=0,r=0,a,p,f,x,I,D,P,R,j,$,W=[],Q=n+e-1,se=t[n].x,Re=t[Q].x-se;for(a=n;a$&&($=x,P=a),o=(r*o+p.x)/++r;else{let fe=a-1;if(!Fr(D)&&!Fr(P)){let be=Math.min(D,P),je=Math.max(D,P);be!==R&&be!==fe&&W.push(gt(ve({},t[be]),{x:o})),je!==R&&je!==fe&&W.push(gt(ve({},t[je]),{x:o}))}a>0&&fe!==R&&W.push(t[fe]),W.push(p),I=Se,r=0,j=$=x,D=P=R=a}}return W}function Vbe(t){if(t._decimated){let n=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:n})}}function tbe(t){t.data.datasets.forEach(n=>{Vbe(n)})}function Yrt(t,n){let e=n.length,i=0,o,{iScale:r}=t,{min:a,max:p,minDefined:f,maxDefined:x}=r.getUserBounds();return f&&(i=hc(of(n,r.axis,a).lo,0,e-1)),x?o=hc(of(n,r.axis,p).hi+1,i,e)-i:o=e-i,{start:i,count:o}}var Qrt={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,n,e)=>{if(!e.enabled){tbe(t);return}let i=t.width;t.data.datasets.forEach((o,r)=>{let{_data:a,indexAxis:p}=o,f=t.getDatasetMeta(r),x=a||o.data;if(Ta([p,t.options.indexAxis])==="y"||!f.controller.supportsDecimation)return;let I=t.scales[f.xAxisID];if(I.type!=="linear"&&I.type!=="time"||t.options.parsing)return;let{start:D,count:P}=Yrt(f,x),R=e.threshold||4*i;if(P<=R){Vbe(o);return}Fr(a)&&(o._data=x,delete o.data,Object.defineProperty(o,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function($){this._data=$}}));let j;switch(e.algorithm){case"lttb":j=Krt(x,D,P,i,e);break;case"min-max":j=Zrt(x,D,P,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}o._decimated=j})},destroy(t){tbe(t)}};function Xrt(t,n,e){let i=t.segments,o=t.points,r=n.points,a=[];for(let p of i){let{start:f,end:x}=p;x=gU(f,x,o);let I=oX(e,o[f],o[x],p.loop);if(!n.segments){a.push({source:p,target:I,start:o[f],end:o[x]});continue}let D=J6(n,I);for(let P of D){let R=oX(e,r[P.start],r[P.end],P.loop),j=X6(p,o,R);for(let $ of j)a.push({source:$,target:P,start:{[e]:ibe(I,R,"start",Math.max)},end:{[e]:ibe(I,R,"end",Math.min)}})}}return a}function oX(t,n,e,i){if(i)return;let o=n[t],r=e[t];return t==="angle"&&(o=ad(o),r=ad(r)),{property:t,start:o,end:r}}function Jrt(t,n){let{x:e=null,y:i=null}=t||{},o=n.points,r=[];return n.segments.forEach(({start:a,end:p})=>{p=gU(a,p,o);let f=o[a],x=o[p];i!==null?(r.push({x:f.x,y:i}),r.push({x:x.x,y:i})):e!==null&&(r.push({x:e,y:f.y}),r.push({x:e,y:x.y}))}),r}function gU(t,n,e){for(;n>t;n--){let i=e[n];if(!isNaN(i.x)&&!isNaN(i.y))break}return n}function ibe(t,n,e,i){return t&&n?i(t[e],n[e]):t?t[e]:n?n[e]:0}function Ube(t,n){let e=[],i=!1;return Ma(t)?(i=!0,e=t):e=Jrt(t,n),e.length?new fU({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function nbe(t){return t&&t.fill!==!1}function est(t,n,e){let o=t[n].fill,r=[n],a;if(!e)return o;for(;o!==!1&&r.indexOf(o)===-1;){if(!gl(o))return o;if(a=t[o],!a)return!1;if(a.visible)return o;r.push(o),o=a.fill}return!1}function tst(t,n,e){let i=rst(t);if(os(i))return isNaN(i.value)?!1:i;let o=parseFloat(i);return gl(o)&&Math.floor(o)===o?ist(i[0],n,o,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ist(t,n,e,i){return(t==="-"||t==="+")&&(e=n+e),e===n||e<0||e>=i?!1:e}function nst(t,n){let e=null;return t==="start"?e=n.bottom:t==="end"?e=n.top:os(t)?e=n.getPixelForValue(t.value):n.getBasePixel&&(e=n.getBasePixel()),e}function ost(t,n,e){let i;return t==="start"?i=e:t==="end"?i=n.options.reverse?n.min:n.max:os(t)?i=t.value:i=n.getBaseValue(),i}function rst(t){let n=t.options,e=n.fill,i=xr(e&&e.target,e);return i===void 0&&(i=!!n.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function sst(t){let{scale:n,index:e,line:i}=t,o=[],r=i.segments,a=i.points,p=ast(n,e);p.push(Ube({x:null,y:n.bottom},i));for(let f=0;f=0;--a){let p=o[a].$filler;p&&(p.line.updateControlPoints(r,p.axis),i&&p.fill&&GQ(t.ctx,p,r))}},beforeDatasetsDraw(t,n,e){if(e.drawTime!=="beforeDatasetsDraw")return;let i=t.getSortedVisibleDatasetMetas();for(let o=i.length-1;o>=0;--o){let r=i[o].$filler;nbe(r)&&GQ(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,n,e){let i=n.meta.$filler;!nbe(i)||e.drawTime!=="beforeDatasetDraw"||GQ(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},abe=(t,n)=>{let{boxHeight:e=n,boxWidth:i=n}=t;return t.usePointStyle&&(e=Math.min(e,n),i=t.pointStyleWidth||Math.min(i,n)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(n,e)}},yst=(t,n)=>t!==null&&n!==null&&t.datasetIndex===n.datasetIndex&&t.index===n.index,mU=class extends lf{constructor(n){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,e,i){this.maxWidth=n,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let n=this.options.labels||{},e=na(n.generateLabels,[this.chart],this)||[];n.filter&&(e=e.filter(i=>n.filter(i,this.chart.data))),n.sort&&(e=e.sort((i,o)=>n.sort(i,o,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:n,ctx:e}=this;if(!n.display){this.width=this.height=0;return}let i=n.labels,o=Tl(i.font),r=o.size,a=this._computeTitleHeight(),{boxWidth:p,itemHeight:f}=abe(i,r),x,I;e.font=o.string,this.isHorizontal()?(x=this.maxWidth,I=this._fitRows(a,r,p,f)+10):(I=this.maxHeight,x=this._fitCols(a,o,p,f)+10),this.width=Math.min(x,n.maxWidth||this.maxWidth),this.height=Math.min(I,n.maxHeight||this.maxHeight)}_fitRows(n,e,i,o){let{ctx:r,maxWidth:a,options:{labels:{padding:p}}}=this,f=this.legendHitBoxes=[],x=this.lineWidths=[0],I=o+p,D=n;r.textAlign="left",r.textBaseline="middle";let P=-1,R=-I;return this.legendItems.forEach((j,$)=>{let W=i+e/2+r.measureText(j.text).width;($===0||x[x.length-1]+W+2*p>a)&&(D+=I,x[x.length-($>0?0:1)]=0,R+=I,P++),f[$]={left:0,top:R,row:P,width:W,height:o},x[x.length-1]+=W+p}),D}_fitCols(n,e,i,o){let{ctx:r,maxHeight:a,options:{labels:{padding:p}}}=this,f=this.legendHitBoxes=[],x=this.columnSizes=[],I=a-n,D=p,P=0,R=0,j=0,$=0;return this.legendItems.forEach((W,Q)=>{let{itemWidth:se,itemHeight:ge}=vst(i,e,r,W,o);Q>0&&R+ge+2*p>I&&(D+=P+p,x.push({width:P,height:R}),j+=P+p,$++,P=R=0),f[Q]={left:j,top:R,col:$,width:se,height:ge},P=Math.max(P,se),R+=ge+p}),D+=P,x.push({width:P,height:R}),D}adjustHitBoxes(){if(!this.options.display)return;let n=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:r}}=this,a=kb(r,this.left,this.width);if(this.isHorizontal()){let p=0,f=ld(i,this.left+o,this.right-this.lineWidths[p]);for(let x of e)p!==x.row&&(p=x.row,f=ld(i,this.left+o,this.right-this.lineWidths[p])),x.top+=this.top+n+o,x.left=a.leftForLtr(a.x(f),x.width),f+=x.width+o}else{let p=0,f=ld(i,this.top+n+o,this.bottom-this.columnSizes[p].height);for(let x of e)x.col!==p&&(p=x.col,f=ld(i,this.top+n+o,this.bottom-this.columnSizes[p].height)),x.top=f,x.left+=this.left+o,x.left=a.leftForLtr(a.x(x.left),x.width),f+=x.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let n=this.ctx;cA(n,this),this._draw(),dA(n)}}_draw(){let{options:n,columnSizes:e,lineWidths:i,ctx:o}=this,{align:r,labels:a}=n,p=Oa.color,f=kb(n.rtl,this.left,this.width),x=Tl(a.font),{padding:I}=a,D=x.size,P=D/2,R;this.drawTitle(),o.textAlign=f.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=x.string;let{boxWidth:j,boxHeight:$,itemHeight:W}=abe(a,D),Q=function(fe,be,je){if(isNaN(j)||j<=0||isNaN($)||$<0)return;o.save();let st=xr(je.lineWidth,1);if(o.fillStyle=xr(je.fillStyle,p),o.lineCap=xr(je.lineCap,"butt"),o.lineDashOffset=xr(je.lineDashOffset,0),o.lineJoin=xr(je.lineJoin,"miter"),o.lineWidth=st,o.strokeStyle=xr(je.strokeStyle,p),o.setLineDash(xr(je.lineDash,[])),a.usePointStyle){let Fe={radius:$*Math.SQRT2/2,pointStyle:je.pointStyle,rotation:je.rotation,borderWidth:st},ht=f.xPlus(fe,j/2),ue=be+P;j6(o,Fe,ht,ue,a.pointStyleWidth&&j)}else{let Fe=be+Math.max((D-$)/2,0),ht=f.leftForLtr(fe,j),ue=q0(je.borderRadius);o.beginPath(),Object.values(ue).some(Pt=>Pt!==0)?$C(o,{x:ht,y:Fe,w:j,h:$,radius:ue}):o.rect(ht,Fe,j,$),o.fill(),st!==0&&o.stroke()}o.restore()},se=function(fe,be,je){$0(o,je.text,fe,be+W/2,x,{strikethrough:je.hidden,textAlign:f.textAlign(je.textAlign)})},ge=this.isHorizontal(),Re=this._computeTitleHeight();ge?R={x:ld(r,this.left+I,this.right-i[0]),y:this.top+I+Re,line:0}:R={x:this.left+I,y:ld(r,this.top+Re+I,this.bottom-e[0].height),line:0},Y6(this.ctx,n.textDirection);let Se=W+I;this.legendItems.forEach((fe,be)=>{o.strokeStyle=fe.fontColor,o.fillStyle=fe.fontColor;let je=o.measureText(fe.text).width,st=f.textAlign(fe.textAlign||(fe.textAlign=a.textAlign)),Fe=j+P+je,ht=R.x,ue=R.y;f.setWidth(this.width),ge?be>0&&ht+Fe+I>this.right&&(ue=R.y+=Se,R.line++,ht=R.x=ld(r,this.left+I,this.right-i[R.line])):be>0&&ue+Se>this.bottom&&(ht=R.x=ht+e[R.line].width+I,R.line++,ue=R.y=ld(r,this.top+Re+I,this.bottom-e[R.line].height));let Pt=f.x(ht);if(Q(Pt,ue,fe),ht=CQ(st,ht+j+P,ge?ht+Fe:this.right,n.rtl),se(f.x(ht),ue,fe),ge)R.x+=Fe+I;else if(typeof fe.text!="string"){let ki=x.lineHeight;R.y+=Hbe(fe,ki)+I}else R.y+=Se}),Q6(this.ctx,n.textDirection)}drawTitle(){let n=this.options,e=n.title,i=Tl(e.font),o=mc(e.padding);if(!e.display)return;let r=kb(n.rtl,this.left,this.width),a=this.ctx,p=e.position,f=i.size/2,x=o.top+f,I,D=this.left,P=this.width;if(this.isHorizontal())P=Math.max(...this.lineWidths),I=this.top+x,D=ld(n.align,D,this.right-P);else{let j=this.columnSizes.reduce(($,W)=>Math.max($,W.height),0);I=x+ld(n.align,this.top,this.bottom-j-n.labels.padding-this._computeTitleHeight())}let R=ld(p,D,D+P);a.textAlign=r.textAlign(fP(p)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,$0(a,e.text,R,I,i)}_computeTitleHeight(){let n=this.options.title,e=Tl(n.font),i=mc(n.padding);return n.display?e.lineHeight+i.height:0}_getLegendItemAt(n,e){let i,o,r;if(af(n,this.left,this.right)&&af(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>a.length?r:a)),n+e.size/2+i.measureText(o).width}function xst(t,n,e){let i=t;return typeof n.text!="string"&&(i=Hbe(n,e)),i}function Hbe(t,n){let e=t.text?t.text.length:0;return n*e}function Cst(t,n){return!!((t==="mousemove"||t==="mouseout")&&(n.onHover||n.onLeave)||n.onClick&&(t==="click"||t==="mouseup"))}var wst={id:"legend",_element:mU,start(t,n,e){let i=t.legend=new mU({ctx:t.ctx,options:e,chart:t});Yd.configure(t,i,e),Yd.addBox(t,i)},stop(t){Yd.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,n,e){let i=t.legend;Yd.configure(t,i,e),i.options=e},afterUpdate(t){let n=t.legend;n.buildLabels(),n.adjustHitBoxes()},afterEvent(t,n){n.replay||t.legend.handleEvent(n.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,n,e){let i=n.datasetIndex,o=e.chart;o.isDatasetVisible(i)?(o.hide(i),n.hidden=!0):(o.show(i),n.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let n=t.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:o,color:r,useBorderRadius:a,borderRadius:p}}=t.legend.options;return t._getSortedDatasetMetas().map(f=>{let x=f.controller.getStyle(e?0:void 0),I=mc(x.borderWidth);return{text:n[f.index].label,fillStyle:x.backgroundColor,fontColor:r,hidden:!f.visible,lineCap:x.borderCapStyle,lineDash:x.borderDash,lineDashOffset:x.borderDashOffset,lineJoin:x.borderJoinStyle,lineWidth:(I.width+I.height)/4,strokeStyle:x.borderColor,pointStyle:i||x.pointStyle,rotation:x.rotation,textAlign:o||x.textAlign,borderRadius:a&&(p||x.borderRadius),datasetIndex:f.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)}}},RP=class extends lf{constructor(n){super(),this.chart=n.chart,this.options=n.options,this.ctx=n.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(n,e){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=n,this.height=this.bottom=e;let o=Ma(i.text)?i.text.length:1;this._padding=mc(i.padding);let r=o*Tl(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let n=this.options.position;return n==="top"||n==="bottom"}_drawArgs(n){let{top:e,left:i,bottom:o,right:r,options:a}=this,p=a.align,f=0,x,I,D;return this.isHorizontal()?(I=ld(p,i,r),D=e+n,x=r-i):(a.position==="left"?(I=i+n,D=ld(p,o,e),f=Fs*-.5):(I=r-n,D=ld(p,e,o),f=Fs*.5),x=o-e),{titleX:I,titleY:D,maxWidth:x,rotation:f}}draw(){let n=this.ctx,e=this.options;if(!e.display)return;let i=Tl(e.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:p,maxWidth:f,rotation:x}=this._drawArgs(r);$0(n,e.text,0,0,i,{color:e.color,maxWidth:f,rotation:x,textAlign:fP(e.align),textBaseline:"middle",translation:[a,p]})}};function Sst(t,n){let e=new RP({ctx:t.ctx,options:n,chart:t});Yd.configure(t,e,n),Yd.addBox(t,e),t.titleBlock=e}var Ist={id:"title",_element:RP,start(t,n,e){Sst(t,e)},stop(t){let n=t.titleBlock;Yd.removeBox(t,n),delete t.titleBlock},beforeUpdate(t,n,e){let i=t.titleBlock;Yd.configure(t,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},oU=new WeakMap,Tst={id:"subtitle",start(t,n,e){let i=new RP({ctx:t.ctx,options:e,chart:t});Yd.configure(t,i,e),Yd.addBox(t,i),oU.set(t,i)},stop(t){Yd.removeBox(t,oU.get(t)),oU.delete(t)},beforeUpdate(t,n,e){let i=oU.get(t);Yd.configure(t,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},AP={average(t){if(!t.length)return!1;let n,e,i=new Set,o=0,r=0;for(n=0,e=t.length;np+f)/i.size,y:o/r}},nearest(t,n){if(!t.length)return!1;let e=n.x,i=n.y,o=Number.POSITIVE_INFINITY,r,a,p;for(r=0,a=t.length;r-1?t.split(` `):t}function Est(t,n){let{element:e,datasetIndex:i,index:o}=n,r=t.getDatasetMeta(i).controller,{label:a,value:p}=r.getLabelAndValue(o);return{chart:t,label:a,parsed:r.getParsed(o),raw:t.data.datasets[i].data[o],formattedValue:p,dataset:r.getDataset(),dataIndex:o,datasetIndex:i,element:e}}function lbe(t,n){let e=t.chart.ctx,{body:i,footer:o,title:r}=t,{boxWidth:a,boxHeight:p}=n,f=Tl(n.bodyFont),x=Tl(n.titleFont),I=Tl(n.footerFont),D=r.length,P=o.length,R=i.length,j=mc(n.padding),$=j.height,W=0,Q=i.reduce((Re,Se)=>Re+Se.before.length+Se.lines.length+Se.after.length,0);if(Q+=t.beforeBody.length+t.afterBody.length,D&&($+=D*x.lineHeight+(D-1)*n.titleSpacing+n.titleMarginBottom),Q){let Re=n.displayColors?Math.max(p,f.lineHeight):f.lineHeight;$+=R*Re+(Q-R)*f.lineHeight+(Q-1)*n.bodySpacing}P&&($+=n.footerMarginTop+P*I.lineHeight+(P-1)*n.footerSpacing);let se=0,ge=function(Re){W=Math.max(W,e.measureText(Re).width+se)};return e.save(),e.font=x.string,Hs(t.title,ge),e.font=f.string,Hs(t.beforeBody.concat(t.afterBody),ge),se=n.displayColors?a+2+n.boxPadding:0,Hs(i,Re=>{Hs(Re.before,ge),Hs(Re.lines,ge),Hs(Re.after,ge)}),se=0,e.font=I.string,Hs(t.footer,ge),e.restore(),W+=j.width,{width:W,height:$}}function Ast(t,n){let{y:e,height:i}=n;return et.height-i/2?"bottom":"center"}function Dst(t,n,e,i){let{x:o,width:r}=i,a=e.caretSize+e.caretPadding;if(t==="left"&&o+r+a>n.width||t==="right"&&o-r-a<0)return!0}function kst(t,n,e,i){let{x:o,width:r}=e,{width:a,chartArea:{left:p,right:f}}=t,x="center";return i==="center"?x=o<=(p+f)/2?"left":"right":o<=r/2?x="left":o>=a-r/2&&(x="right"),Dst(x,t,n,e)&&(x="center"),x}function cbe(t,n,e){let i=e.yAlign||n.yAlign||Ast(t,e);return{xAlign:e.xAlign||n.xAlign||kst(t,n,e,i),yAlign:i}}function Mst(t,n){let{x:e,width:i}=t;return n==="right"?e-=i:n==="center"&&(e-=i/2),e}function Rst(t,n,e){let{y:i,height:o}=t;return n==="top"?i+=e:n==="bottom"?i-=o+e:i-=o/2,i}function dbe(t,n,e,i){let{caretSize:o,caretPadding:r,cornerRadius:a}=t,{xAlign:p,yAlign:f}=e,x=o+r,{topLeft:I,topRight:D,bottomLeft:P,bottomRight:R}=q0(a),j=Mst(n,p),$=Rst(n,f,x);return f==="center"?p==="left"?j+=x:p==="right"&&(j-=x):p==="left"?j-=Math.max(I,P)+o:p==="right"&&(j+=Math.max(D,R)+o),{x:hc(j,0,i.width-n.width),y:hc($,0,i.height-n.height)}}function rU(t,n,e){let i=mc(e.padding);return n==="center"?t.x+t.width/2:n==="right"?t.x+t.width-i.right:t.x+i.left}function ube(t){return Jg([],Z0(t))}function Ost(t,n,e){return Xg(t,{tooltip:n,tooltipItems:e,type:"tooltip"})}function pbe(t,n){let e=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return e?t.override(e):t}var jbe={beforeTitle:sf,title(t){if(t.length>0){let n=t[0],e=n.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(i>0&&n.dataIndex"u"?jbe[n].call(e,i):o}var hbe=(()=>{class t extends lf{static positioners=AP;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let i=this.chart,o=this.options.setContext(this.getContext()),r=o.enabled&&i.options.animation&&o.animations,a=new cU(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Ost(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,i){let{callbacks:o}=i,r=vp(o,"beforeTitle",this,e),a=vp(o,"title",this,e),p=vp(o,"afterTitle",this,e),f=[];return f=Jg(f,Z0(r)),f=Jg(f,Z0(a)),f=Jg(f,Z0(p)),f}getBeforeBody(e,i){return ube(vp(i.callbacks,"beforeBody",this,e))}getBody(e,i){let{callbacks:o}=i,r=[];return Hs(e,a=>{let p={before:[],lines:[],after:[]},f=pbe(o,a);Jg(p.before,Z0(vp(f,"beforeLabel",this,a))),Jg(p.lines,vp(f,"label",this,a)),Jg(p.after,Z0(vp(f,"afterLabel",this,a))),r.push(p)}),r}getAfterBody(e,i){return ube(vp(i.callbacks,"afterBody",this,e))}getFooter(e,i){let{callbacks:o}=i,r=vp(o,"beforeFooter",this,e),a=vp(o,"footer",this,e),p=vp(o,"afterFooter",this,e),f=[];return f=Jg(f,Z0(r)),f=Jg(f,Z0(a)),f=Jg(f,Z0(p)),f}_createItems(e){let i=this._active,o=this.chart.data,r=[],a=[],p=[],f=[],x,I;for(x=0,I=i.length;xe.filter(D,P,R,o))),e.itemSort&&(f=f.sort((D,P)=>e.itemSort(D,P,o))),Hs(f,D=>{let P=pbe(e.callbacks,D);r.push(vp(P,"labelColor",this,D)),a.push(vp(P,"labelPointStyle",this,D)),p.push(vp(P,"labelTextColor",this,D))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=p,this.dataPoints=f,f}update(e,i){let o=this.options.setContext(this.getContext()),r=this._active,a,p=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{let f=AP[o.position].call(this,r,this._eventPosition);p=this._createItems(o),this.title=this.getTitle(p,o),this.beforeBody=this.getBeforeBody(p,o),this.body=this.getBody(p,o),this.afterBody=this.getAfterBody(p,o),this.footer=this.getFooter(p,o);let x=this._size=lbe(this,o),I=Object.assign({},f,x),D=cbe(this.chart,o,I),P=dbe(o,I,D,this.chart);this.xAlign=D.xAlign,this.yAlign=D.yAlign,a={opacity:1,x:P.x,y:P.y,width:x.width,height:x.height,caretX:f.x,caretY:f.y}}this._tooltipItems=p,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:i})}drawCaret(e,i,o,r){let a=this.getCaretPosition(e,o,r);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)}getCaretPosition(e,i,o){let{xAlign:r,yAlign:a}=this,{caretSize:p,cornerRadius:f}=o,{topLeft:x,topRight:I,bottomLeft:D,bottomRight:P}=q0(f),{x:R,y:j}=e,{width:$,height:W}=i,Q,se,ge,Re,Se,fe;return a==="center"?(Se=j+W/2,r==="left"?(Q=R,se=Q-p,Re=Se+p,fe=Se-p):(Q=R+$,se=Q+p,Re=Se-p,fe=Se+p),ge=Q):(r==="left"?se=R+Math.max(x,D)+p:r==="right"?se=R+$-Math.max(I,P)-p:se=this.caretX,a==="top"?(Re=j,Se=Re-p,Q=se-p,ge=se+p):(Re=j+W,Se=Re+p,Q=se+p,ge=se-p),fe=Re),{x1:Q,x2:se,x3:ge,y1:Re,y2:Se,y3:fe}}drawTitle(e,i,o){let r=this.title,a=r.length,p,f,x;if(a){let I=kb(o.rtl,this.x,this.width);for(e.x=rU(this,o.titleAlign,o),i.textAlign=I.textAlign(o.titleAlign),i.textBaseline="middle",p=Tl(o.titleFont),f=o.titleSpacing,i.fillStyle=o.titleColor,i.font=p.string,x=0;xge!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,$C(e,{x:W,y:$,w:I,h:x,radius:se}),e.fill(),e.stroke(),e.fillStyle=p.backgroundColor,e.beginPath(),$C(e,{x:Q,y:$+1,w:I-2,h:x-2,radius:se}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(W,$,I,x),e.strokeRect(W,$,I,x),e.fillStyle=p.backgroundColor,e.fillRect(Q,$+1,I-2,x-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,i,o){let{body:r}=this,{bodySpacing:a,bodyAlign:p,displayColors:f,boxHeight:x,boxWidth:I,boxPadding:D}=o,P=Tl(o.bodyFont),R=P.lineHeight,j=0,$=kb(o.rtl,this.x,this.width),W=function(st){i.fillText(st,$.x(e.x+j),e.y+R/2),e.y+=R+a},Q=$.textAlign(p),se,ge,Re,Se,fe,be,je;for(i.textAlign=p,i.textBaseline="middle",i.font=P.string,e.x=rU(this,Q,o),i.fillStyle=o.bodyColor,Hs(this.beforeBody,W),j=f&&Q!=="right"?p==="center"?I/2+D:I+2+D:0,Se=0,be=r.length;Se0&&i.stroke()}_updateAnimationTarget(e){let i=this.chart,o=this.$animations,r=o&&o.x,a=o&&o.y;if(r||a){let p=AP[e.position].call(this,this._active,this._eventPosition);if(!p)return;let f=this._size=lbe(this,e),x=Object.assign({},p,this._size),I=cbe(i,e,x),D=dbe(e,x,I,i);(r._to!==D.x||a._to!==D.y)&&(this.xAlign=I.xAlign,this.yAlign=I.yAlign,this.width=f.width,this.height=f.height,this.caretX=p.x,this.caretY=p.y,this._resolveAnimations().update(this,D))}}_willRender(){return!!this.opacity}draw(e){let i=this.options.setContext(this.getContext()),o=this.opacity;if(!o)return;this._updateAnimationTarget(i);let r={width:this.width,height:this.height},a={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;let p=mc(i.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;i.enabled&&f&&(e.save(),e.globalAlpha=o,this.drawBackground(a,e,r,i),Y6(e,i.textDirection),a.y+=p.top,this.drawTitle(a,e,i),this.drawBody(a,e,i),this.drawFooter(a,e,i),Q6(e,i.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,i){let o=this._active,r=e.map(({datasetIndex:f,index:x})=>{let I=this.chart.getDatasetMeta(f);if(!I)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:I.data[x],index:x}}),a=!lA(o,r),p=this._positionChanged(r,i);(a||p)&&(this._active=r,this._eventPosition=i,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,i,o=!0){if(i&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,a=this._active||[],p=this._getActiveElements(e,a,i,o),f=this._positionChanged(p,e),x=i||!lA(p,a)||f;return x&&(this._active=p,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,i))),x}_getActiveElements(e,i,o,r){let a=this.options;if(e.type==="mouseout")return[];if(!r)return i.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);let p=this.chart.getElementsAtEventForMode(e,a.mode,a,o);return a.reverse&&p.reverse(),p}_positionChanged(e,i){let{caretX:o,caretY:r,options:a}=this,p=AP[a.position].call(this,e,i);return p!==!1&&(o!==p.x||r!==p.y)}}return t})(),Pst={id:"tooltip",_element:hbe,positioners:AP,afterInit(t,n,e){e&&(t.tooltip=new hbe({chart:t,options:e}))},beforeUpdate(t,n,e){t.tooltip&&t.tooltip.initialize(e)},reset(t,n,e){t.tooltip&&t.tooltip.initialize(e)},afterDraw(t){let n=t.tooltip;if(n&&n._willRender()){let e={tooltip:n};if(t.notifyPlugins("beforeTooltipDraw",gt(ve({},e),{cancelable:!0}))===!1)return;n.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,n){if(t.tooltip){let e=n.replay;t.tooltip.handleEvent(n.event,e,n.inChartArea)&&(n.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,n)=>n.bodyFont.size,boxWidth:(t,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jbe},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"]},Lst=Object.freeze({__proto__:null,Colors:Wrt,Decimation:Qrt,Filler:_st,Legend:wst,SubTitle:Tst,Title:Ist,Tooltip:Pst}),Fst=(t,n,e,i)=>(typeof n=="string"?(e=t.push(n)-1,i.unshift({index:e,label:n})):isNaN(n)&&(e=null),e);function Nst(t,n,e,i){let o=t.indexOf(n);if(o===-1)return Fst(t,n,e,i);let r=t.lastIndexOf(n);return o!==r?e:o}var Bst=(t,n)=>t===null?null:hc(Math.round(t),0,n);function mbe(t){let n=this.getLabels();return t>=0&&t{class t extends KC{static id="category";static defaults={ticks:{callback:mbe}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let i=this._addedLabels;if(i.length){let o=this.getLabels();for(let{index:r,label:a}of i)o[r]===a&&o.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,i){if(Fr(e))return null;let o=this.getLabels();return i=isFinite(i)&&o[i]===e?i:Nst(o,e,xr(i,e),this._addedLabels),Bst(i,o.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:o,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),i||(r=this.getLabels().length-1)),this.min=o,this.max=r}buildTicks(){let e=this.min,i=this.max,o=this.options.offset,r=[],a=this.getLabels();a=e===0&&i===a.length-1?a:a.slice(e,i+1),this._valueRange=Math.max(a.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let p=e;p<=i;p++)r.push({value:p});return r}getLabelForValue(e){return mbe.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let i=this.ticks;return e<0||e>i.length-1?null:this.getPixelForValue(i[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}return t})();function Vst(t,n){let e=[],{bounds:o,step:r,min:a,max:p,precision:f,count:x,maxTicks:I,maxDigits:D,includeBounds:P}=t,R=r||1,j=I-1,{min:$,max:W}=n,Q=!Fr(a),se=!Fr(p),ge=!Fr(x),Re=(W-$)/(D+1),Se=D6((W-$)/j/R)*R,fe,be,je,st;if(Se<1e-14&&!Q&&!se)return[{value:$},{value:W}];st=Math.ceil(W/Se)-Math.floor($/Se),st>j&&(Se=D6(st*Se/j/R)*R),Fr(f)||(fe=Math.pow(10,f),Se=Math.ceil(Se*fe)/fe),o==="ticks"?(be=Math.floor($/Se)*Se,je=Math.ceil(W/Se)*Se):(be=$,je=W),Q&&se&&r&&gQ((p-a)/r,Se/1e3)?(st=Math.round(Math.min((p-a)/Se,I)),Se=(p-a)/st,be=a,je=p):ge?(be=Q?a:be,je=se?p:je,st=x-1,Se=(je-be)/st):(st=(je-be)/Se,HC(st,Math.round(st),Se/1e3)?st=Math.round(st):st=Math.ceil(st));let Fe=Math.max(M6(Se),M6(be));fe=Math.pow(10,Fr(f)?Fe:f),be=Math.round(be*fe)/fe,je=Math.round(je*fe)/fe;let ht=0;for(Q&&(P&&be!==a?(e.push({value:a}),bep)break;e.push({value:ue})}return se&&P&&je!==p?e.length&&HC(e[e.length-1].value,p,fbe(p,Re,t))?e[e.length-1].value=p:e.push({value:p}):(!se||je===p)&&e.push({value:je}),e}function fbe(t,n,{horizontal:e,minRotation:i}){let o=rh(i),r=(e?Math.sin(o):Math.cos(o))||.001,a=.75*n*(""+t).length;return Math.min(n/r,a)}var hA=class extends KC{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,e){return Fr(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){let{beginAtZero:n}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:o,max:r}=this,a=f=>o=e?o:f,p=f=>r=i?r:f;if(n){let f=qh(o),x=qh(r);f<0&&x<0?p(0):f>0&&x>0&&a(0)}if(o===r){let f=r===0?1:Math.abs(r*.05);p(r+f),n||a(o-f)}this.min=o,this.max=r}getTickLimit(){let n=this.options.ticks,{maxTicksLimit:e,stepSize:i}=n,o;return i?(o=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),e=e||11),e&&(o=Math.min(e,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let n=this.options,e=n.ticks,i=this.getTickLimit();i=Math.max(2,i);let o={maxTicks:i,bounds:n.bounds,min:n.min,max:n.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,a=Vst(o,r);return n.bounds==="ticks"&&k6(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let n=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&n.length){let o=(i-e)/Math.max(n.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(n){return GC(n,this.chart.options.locale,this.options.ticks.format)}},rX=class extends hA{static id="linear";static defaults={ticks:{callback:gP.formatters.numeric}};determineDataLimits(){let{min:n,max:e}=this.getMinMax(!0);this.min=gl(n)?n:0,this.max=gl(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let n=this.isHorizontal(),e=n?this.width:this.height,i=rh(this.options.ticks.minRotation),o=(n?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/o))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}},OP=t=>Math.floor(Yg(t)),WC=(t,n)=>Math.pow(10,OP(t)+n);function gbe(t){return t/Math.pow(10,OP(t))===1}function _be(t,n,e){let i=Math.pow(10,e),o=Math.floor(t/i);return Math.ceil(n/i)-o}function Ust(t,n){let e=n-t,i=OP(e);for(;_be(t,n,i)>10;)i++;for(;_be(t,n,i)<10;)i--;return Math.min(i,OP(t))}function Hst(t,{min:n,max:e}){n=Hu(t.min,n);let i=[],o=OP(n),r=Ust(n,e),a=r<0?Math.pow(10,Math.abs(r)):1,p=Math.pow(10,r),f=o>r?Math.pow(10,o):0,x=Math.round((n-f)*a)/a,I=Math.floor((n-f)/p/10)*p*10,D=Math.floor((x-I)/Math.pow(10,r)),P=Hu(t.min,Math.round((f+I+D*Math.pow(10,r))*a)/a);for(;P=10?D=D<15?15:20:D++,D>=20&&(r++,D=2,a=r>=0?1:a),P=Math.round((f+I+D*Math.pow(10,r))*a)/a;let R=Hu(t.max,P);return i.push({value:R,major:gbe(R),significand:D}),i}var sX=class extends KC{static id="logarithmic";static defaults={ticks:{callback:gP.formatters.logarithmic,major:{enabled:!0}}};constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,e){let i=hA.prototype.parse.apply(this,[n,e]);if(i===0){this._zero=!0;return}return gl(i)&&i>0?i:null}determineDataLimits(){let{min:n,max:e}=this.getMinMax(!0);this.min=gl(n)?Math.max(0,n):null,this.max=gl(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!gl(this._userMin)&&(this.min=n===WC(this.min,0)?WC(this.min,-1):WC(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:n,maxDefined:e}=this.getUserBounds(),i=this.min,o=this.max,r=p=>i=n?i:p,a=p=>o=e?o:p;i===o&&(i<=0?(r(1),a(10)):(r(WC(i,-1)),a(WC(o,1)))),i<=0&&r(WC(o,-1)),o<=0&&a(WC(i,1)),this.min=i,this.max=o}buildTicks(){let n=this.options,e={min:this._userMin,max:this._userMax},i=Hst(e,this);return n.bounds==="ticks"&&k6(i,this,"value"),n.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(n){return n===void 0?"0":GC(n,this.chart.options.locale,this.options.ticks.format)}configure(){let n=this.min;super.configure(),this._startValue=Yg(n),this._valueRange=Yg(this.max)-Yg(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(Yg(n)-this._startValue)/this._valueRange)}getValueForPixel(n){let e=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+e*this._valueRange)}};function aX(t){let n=t.ticks;if(n.display&&t.display){let e=mc(n.backdropPadding);return xr(n.font&&n.font.size,Oa.font.size)+e.height}return 0}function jst(t,n,e){return e=Ma(e)?e:[e],{w:wQ(t,n.string,e),h:e.length*n.lineHeight}}function ybe(t,n,e,i,o){return t===i||t===o?{start:n-e/2,end:n+e/2}:to?{start:n-e,end:n}:{start:n,end:n+e}}function Gst(t){let n={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},e=Object.assign({},n),i=[],o=[],r=t._pointLabels.length,a=t.options.pointLabels,p=a.centerPointLabels?Fs/r:0;for(let f=0;fn.r&&(p=(i.end-n.r)/r,t.r=Math.max(t.r,n.r+p)),o.startn.b&&(f=(o.end-n.b)/a,t.b=Math.max(t.b,n.b+f))}function qst(t,n,e){let i=t.drawingArea,{extra:o,additionalAngle:r,padding:a,size:p}=e,f=t.getPointPosition(n,i+o+a,r),x=Math.round(hP(ad(f.angle+Il))),I=Qst(f.y,p.h,x),D=Zst(x),P=Yst(f.x,p.w,D);return{visible:!0,x:f.x,y:I,textAlign:D,left:P,top:I,right:P+p.w,bottom:I+p.h}}function Wst(t,n){if(!n)return!0;let{left:e,top:i,right:o,bottom:r}=t;return!(rf({x:e,y:i},n)||rf({x:e,y:r},n)||rf({x:o,y:i},n)||rf({x:o,y:r},n))}function Kst(t,n,e){let i=[],o=t._pointLabels.length,r=t.options,{centerPointLabels:a,display:p}=r.pointLabels,f={extra:aX(r)/2,additionalAngle:a?Fs/o:0},x;for(let I=0;I270||e<90)&&(t-=n),t}function Xst(t,n,e){let{left:i,top:o,right:r,bottom:a}=e,{backdropColor:p}=n;if(!Fr(p)){let f=q0(n.borderRadius),x=mc(n.backdropPadding);t.fillStyle=p;let I=i-x.left,D=o-x.top,P=r-i+x.width,R=a-o+x.height;Object.values(f).some(j=>j!==0)?(t.beginPath(),$C(t,{x:I,y:D,w:P,h:R,radius:f}),t.fill()):t.fillRect(I,D,P,R)}}function Jst(t,n){let{ctx:e,options:{pointLabels:i}}=t;for(let o=n-1;o>=0;o--){let r=t._pointLabelItems[o];if(!r.visible)continue;let a=i.setContext(t.getPointLabelContext(o));Xst(e,a,r);let p=Tl(a.font),{x:f,y:x,textAlign:I}=r;$0(e,t._pointLabels[o],f,x+p.lineHeight/2,p,{color:a.color,textAlign:I,textBaseline:"middle"})}}function Gbe(t,n,e,i){let{ctx:o}=t;if(e)o.arc(t.xCenter,t.yCenter,n,0,Ra);else{let r=t.getPointPosition(0,n);o.moveTo(r.x,r.y);for(let a=1;a{let o=na(this.options.pointLabels.callback,[e,i],this);return o||o===0?o:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let n=this.options;n.display&&n.pointLabels.display?Gst(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,e,i,o){this.xCenter+=Math.floor((n-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,e,i,o))}getIndexAngle(n){let e=Ra/(this._pointLabels.length||1),i=this.options.startAngle||0;return ad(n*e+rh(i))}getDistanceFromCenterForValue(n){if(Fr(n))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*e:(n-this.min)*e}getValueForDistanceFromCenter(n){if(Fr(n))return NaN;let e=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(n){let e=this._pointLabels||[];if(n>=0&&n{if(D!==0||D===0&&this.min<0){f=this.getDistanceFromCenterForValue(I.value);let P=this.getContext(D),R=o.setContext(P),j=r.setContext(P);eat(this,R,f,a,j)}}),i.display){for(n.save(),p=a-1;p>=0;p--){let I=i.setContext(this.getPointLabelContext(p)),{color:D,lineWidth:P}=I;!P||!D||(n.lineWidth=P,n.strokeStyle=D,n.setLineDash(I.borderDash),n.lineDashOffset=I.borderDashOffset,f=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),x=this.getPointPosition(p,f),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(x.x,x.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let n=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let o=this.getIndexAngle(0),r,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(o),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((p,f)=>{if(f===0&&this.min>=0&&!e.reverse)return;let x=i.setContext(this.getContext(f)),I=Tl(x.font);if(r=this.getDistanceFromCenterForValue(this.ticks[f].value),x.showLabelBackdrop){n.font=I.string,a=n.measureText(p.label).width,n.fillStyle=x.backdropColor;let D=mc(x.backdropPadding);n.fillRect(-a/2-D.left,-r-I.size/2-D.top,a+D.width,I.size+D.height)}$0(n,p.label,0,-r,I,{color:x.color,strokeColor:x.textStrokeColor,strokeWidth:x.textStrokeWidth})}),n.restore()}drawTitle(){}},_U={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}},bp=Object.keys(_U);function vbe(t,n){return t-n}function bbe(t,n){if(Fr(n))return null;let e=t._adapter,{parser:i,round:o,isoWeekday:r}=t._parseOpts,a=n;return typeof i=="function"&&(a=i(a)),gl(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(o&&(a=o==="week"&&(Ab(r)||r===!0)?e.startOf(a,"isoWeek",r):e.startOf(a,o)),+a)}function xbe(t,n,e,i){let o=bp.length;for(let r=bp.indexOf(t);r=bp.indexOf(e);r--){let a=bp[r];if(_U[a].common&&t._adapter.diff(o,i,a)>=n-1)return a}return bp[e?bp.indexOf(e):0]}function nat(t){for(let n=bp.indexOf(t)+1,e=bp.length;n=n?e[i]:e[o];t[r]=!0}}function oat(t,n,e,i){let o=t._adapter,r=+o.startOf(n[0].value,i),a=n[n.length-1].value,p,f;for(p=r;p<=a;p=+o.add(p,1,i))f=e[p],f>=0&&(n[f].major=!0);return n}function wbe(t,n,e){let i=[],o={},r=n.length,a,p;for(a=0;a{class t extends KC{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,i={}){let o=e.time||(e.time={}),r=this._adapter=new got._date(e.adapters.date);r.init(i),VC(o.displayFormats,r.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=i.normalized}parse(e,i){return e===void 0?null:bbe(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,i=this._adapter,o=e.time.unit||"day",{min:r,max:a,minDefined:p,maxDefined:f}=this.getUserBounds();function x(I){!p&&!isNaN(I.min)&&(r=Math.min(r,I.min)),!f&&!isNaN(I.max)&&(a=Math.max(a,I.max))}(!p||!f)&&(x(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&x(this.getMinMax(!1))),r=gl(r)&&!isNaN(r)?r:+i.startOf(Date.now(),o),a=gl(a)&&!isNaN(a)?a:+i.endOf(Date.now(),o)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){let e=this.getLabelTimestamps(),i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(i=e[0],o=e[e.length-1]),{min:i,max:o}}buildTicks(){let e=this.options,i=e.time,o=e.ticks,r=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);let a=this.min,p=this.max,f=vQ(r,a,p);return this._unit=i.unit||(o.autoSkip?xbe(i.minUnit,this.min,this.max,this._getLabelCapacity(a)):iat(this,f.length,i.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:nat(this._unit),this.initOffsets(r),e.reverse&&f.reverse(),wbe(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let i=0,o=0,r,a;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?i=1-r:i=(this.getDecimalForValue(e[1])-r)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?o=a:o=(a-this.getDecimalForValue(e[e.length-2]))/2);let p=e.length<3?.5:.25;i=hc(i,0,p),o=hc(o,0,p),this._offsets={start:i,end:o,factor:1/(i+1+o)}}_generate(){let e=this._adapter,i=this.min,o=this.max,r=this.options,a=r.time,p=a.unit||xbe(a.minUnit,i,o,this._getLabelCapacity(i)),f=xr(r.ticks.stepSize,1),x=p==="week"?a.isoWeekday:!1,I=Ab(x)||x===!0,D={},P=i,R,j;if(I&&(P=+e.startOf(P,"isoWeek",x)),P=+e.startOf(P,I?"day":p),e.diff(o,i,p)>1e5*f)throw new Error(i+" and "+o+" are too far apart with stepSize of "+f+" "+p);let $=r.ticks.source==="data"&&this.getDataTimestamps();for(R=P,j=0;R+W)}getLabelForValue(e){let i=this._adapter,o=this.options.time;return o.tooltipFormat?i.format(e,o.tooltipFormat):i.format(e,o.displayFormats.datetime)}format(e,i){let r=this.options.time.displayFormats,a=this._unit,p=i||r[a];return this._adapter.format(e,p)}_tickFormatFunction(e,i,o,r){let a=this.options,p=a.ticks.callback;if(p)return na(p,[e,i,o],this);let f=a.time.displayFormats,x=this._unit,I=this._majorUnit,D=x&&f[x],P=I&&f[I],R=o[i],j=I&&P&&R&&R.major;return this._adapter.format(e,r||(j?P:D))}generateTickLabels(e){let i,o,r;for(i=0,o=e.length;i0?f:1}getDataTimestamps(){let e=this._cache.data||[],i,o;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(i=0,o=r.length;i=t[i].pos&&n<=t[o].pos&&({lo:i,hi:o}=of(t,"pos",n)),{pos:r,time:p}=t[i],{pos:a,time:f}=t[o]):(n>=t[i].time&&n<=t[o].time&&({lo:i,hi:o}=of(t,"time",n)),{time:r,pos:p}=t[i],{time:a,pos:f}=t[o]);let x=a-r;return x?p+(f-p)*(n-r)/x:p}var dX=class extends cX{static id="timeseries";static defaults=cX.defaults;constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let n=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(n);this._minPos=sU(e,this.min),this._tableRange=sU(e,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){let{min:e,max:i}=this,o=[],r=[],a,p,f,x,I;for(a=0,p=n.length;a=e&&x<=i&&o.push(x);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,p=o.length;ao-r)}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?n=this.normalize(e.concat(i)):n=e.length?e:i,n=this._cache.all=n,n}getDecimalForValue(n){return(sU(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){let e=this._offsets,i=this.getDecimalForPixel(n)/e.factor-e.end;return sU(this._table,i*this._tableRange+this._minPos,!0)}},rat=Object.freeze({__proto__:null,CategoryScale:zst,LinearScale:rX,LogarithmicScale:sX,RadialLinearScale:lX,TimeScale:cX,TimeSeriesScale:dX}),$be=[fot,Vrt,Lst,rat];var sat={callback:t=>new Intl.NumberFormat().format(t)},aat={color:"rgba(0,0,0,0.07)",drawOnChartArea:!0,tickLength:4},lat={family:"Roboto"},qbe={type:"linear",ticks:sat,grid:aat,scaleLabel:lat};var hX=gt(ve({},El.defaults.plugins.tooltip),{backgroundColor:"rgb(255,255,255)",titleFont:{family:"Roboto, sans-serif",size:12,style:"normal",lineHeight:El.defaults.font.lineHeight,weight:El.defaults.font.weight},bodyFont:{family:"Roboto, sans-serif",size:14,style:El.defaults.font.style,lineHeight:El.defaults.font.lineHeight,weight:El.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});function Wh(t){let n=ve({},hX);return n.callbacks=t||n.callbacks,n}var Wbe=(()=>{class t{constructor(e){this._sanitizer=e}ngOnChanges(e){e.watermarkOptions&&(this.watermarkImage=this._sanitizer.bypassSecurityTrustResourceUrl(this.watermarkOptions.config.background_image))}backgroundPositionStyle(){return this.watermarkOptions.config.background_position==="left"?`left: ${this.watermarkOptions.config.background_position_offset}`:`right: ${this.watermarkOptions.config.background_position_offset}`}static{this.\u0275fac=function(i){return new(i||t)(rt(a1))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-chart-option-watermark"]],inputs:{watermarkOptions:"watermarkOptions"},features:[In],decls:1,vars:7,consts:[["alt","Copyright BinDoc GmbH",1,"watermark-container",3,"src"]],template:function(i,o){i&1&&mn(0,"img",0),i&2&&(Gr(o.backgroundPositionStyle()),zr("height",o.watermarkOptions.config.height)("width",o.watermarkOptions.config.width),Bo("src",o.watermarkImage,ja))},styles:[".watermark-container[_ngcontent-%COMP%]{opacity:.3;top:40px;position:absolute;height:100px;width:150px}"]})}}return t})();var LP={enabled:!1,config:{background_image:null,background_position:null,background_position_offset:null,height:null,width:null}},Kbe={enabled:!0,config:{background_image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABmUAAARSCAMAAABmJwS4AAAAyVBMVEVMaXFFKnFFKnE/mEb1iyX1iyWmIWtFKnFFKnFFKnGmIWumIWs/mEZFKnFFKnFFKnFFKnFFKnFFKnE/mEZFKnFFKnFFKnFFKnH1iyX1iyX1iyX1iyX1iyX1iyX1iyX1iyX1iyWmIWumIWs/mEY/mEb1iyX1iyX1iyU/mEb1iyU/mEY/mEamIWs/mEamIWs/mEamIWumIWs/mEamIWumIWs/mEamIWs/mEY/mEamIWumIWumIWs/mEb1iyU/mEZFKnH1iyWmIWs/mEY/PJYzAAAAP3RSTlMAEPDAwEDAgMBAQICAYKDgMNAgQLCQUHCA8BCgIGDQ4DAQ8BDwsFBwoJAgYGAwMOCg0NDgIHCQkLBQsHBQxMQoMYk1AAAACXBIWXMAAC4jAAAuIwF4pT92AAAgAElEQVR4nOzdeXvbtrawfdtNKruNp9RDkqat26bzPI/v6579/T/UY0FRLMCAFkgRWIvA/fvrnH2ds8XQFG8RAMm9PQAAAABAjrOj48Xi8PDw9NZz95+cLBZHR/va21fd48dfPPvq0aNHz//b9PzuP/nq2bPHj7U3T8d77z158sdbb7316n+bXt39J388+e2997Q3r76P33nn3Xd/fPvtt//P88vdf/Luu9++87329lX29Ohqsbg4PDz3zyLnh4cXi8Xx0VPt7VPT+9lk/+j6MmxLzPnF4vhMe2NrePn42fvB0RD16P1nn7/U3thavvv3yZ9v/U/06q0vn7z3tfbGVvH9t+/+/dP/iX55+/d/3vlYe2PLu/uRGrYl5vTw8rqrn6zZZ5PPnn1+o72xRewfLXL64rXm5Lrh1Lz8/FnOEeEdHV990Hhqvv7mj4y++K158m/Lqfn+nx8z+rLpk7ffbTc1R9cnGX3xWnOxONLe6vLGnU1utDd7SvvHQw+Ne4ctHiMvP3j/o2GHxBvPP/viRnvzy/jutz9fyVWJ+uHLb1oszTvvvv3JsMK88dOP3/6qvflTu/udOvYscn551e5FDWeTu2PjcnRhXju4uG5okPXF56OPiTfHxvsfvND+Z0zr02++HFuY+9L8+6n2P2NCv/7z99jCvCnN739p/ysmc3Y9ujBvSrNocGSEs8nyIubiYNeD4/UhctnEIfLyi892PCbWPvyimcGzr3/7ecfCrP3ZyCXN978PHCVL+eTvbxsYPDu6HDjWnnJwcqX9b5nSyw84m9wlZppj47XTuYfm5RcfTnRQzP3Q2DBdYlZ+/m3uVzTf//7LNIl5beahOTqZ6IfqSjOhefEBZ5O9q2kPjpXT+Q6dvZjsd4d3aMz7YvfTb6ZNzMqf32j/u8b79Z9pE7Py41yHzp5OdRWz6eBk5j9X75Q5m3wxq7PJ00WBg2Pl4lj7HzfGzfsDF4Bke/7+bBfAv/dlgcQ4r778TvsfN8pffxdIjPPLuzNcDHC881xMyun1nBcDvPyq1Nnkv/mcTY6mHSl7cIQs5nZBM/G1beijOV7QfPrbD6Ua47w1uwuaX98tcRlz7+93tP+Fgzy9LDAYsuFkrmtXP3hU9mwyiwua42KXMRtHyIwueV88K/bD443nz2Y2pvr1H7suKZP98GROMzTf/1g0Mc4v32r/K7MV/qXqHM5wWOTFs12XlGWcTd43fjbZX5T9AXJ/hMzkl8jL94sfFCvWj4xNXxcbKvO9+mMuS87eeVtuxBQ+eXcWKwHKDZX5TmfWmZcVfrGuziY32v/UtGqNWZpDZ6o1xh0ZM+nMewPv7t/Jl3PoTK3GzKQzNUZD1g4W85mgqXo2eWR0gqZqY5asd6bqUbE0h858XbMxs+hMzcbMoDM1G7N0sND+F+epfjYx2ZnajVmy3JkXX1U+Kpasd6bWWJnH9PxM7casOqP9r0462vVBISPMYdysxuyu/bNJ7V8gaydG15upHBX/LdcBGF4h8ukfCo258+qJ9r885dcKc/4xRtcBnFWajwmdGv616nyhczb57ytLZxOto2PJ5MDq5+VXgqQ8/0D7H5/yW/l1ZSk//Kv9j4/5+N1dH1U23tv21jXvX+qdRQ6N/lp1HiueTb7Q/sevaR4dd07NPTLiZdkV7ZJHN9o7IOa9Erf553vL3vTMX2Xvj5H8aGx65lphyH2DyV+rSy9L3Oaf70Mb0zPHukfHrbUfIi+eqR4VS6YudB2twbINxobNflWYkPF9YmnYTHM4ZMXer1VHaeh9w/v6Z5On6kfHnYNr7d1wT/Hy9t5Hn2vvBt+/eoNl93629Bbnf/QGy+69beaxMwvtU8jShb3LmZuyjw3J81z7bKJ8mfvGuZGnAaisLIv5TP8HyBuf/qkdmNf+sLLaTP9CZuWTf7T3hHOktHYodGDtckZ/WGRF9Wxi4kJmxcbljIkLmZXnNsZT94xcyKz8bOMpmiYuZFYsXM6YuJBZMXU5Y+JCZkXxcubKyIXMioHZGSs/PVZszM58qnGLTJqB2ZmPjVzIrKjPzpwp3CKTdmBnUbOts4nS7Mz+ifYREdC+3n1p56fHyoc3ujtk6buyj14eTn2x2V92LmRWdBeb6S8eClxq7o17L3QXqj700Y3CXrD1E2RF9QD5XH0xyAP69878ph2Vh17p3jvzu3ZUHvrle7W9sV/h2ctDnesPiuztPbZ3Nvmv/r0z5n6COIoHiJVpf5/uKkQz0/4+xVGzj3/STkqM2qiZxZ+q+oMie9ZGy9ZqLwKwNlq2pjWs+sLaaNnah4rPIvpO90bMtLe01pq9Y220bO1Hld1h86fqHeUnaL7QvREzreoY/L7JnyArKo++uzF4ffua3lozQ2vLQj/orDX7VjsmaT8pTM7oPjNkK9W1ZobWloUqrjU7M7K8Pe6k2n544wO7kbmjNDljcErmnsrkjNKjMfN8UntyxuKUzD3FsXeDE7wbak3O2FrA/NBh7d8hNgdR771feX84thYwP/RN7R1iawHzQ5/8VXV3WB4PWTrQus/7A+3ThaDO2eRY++8vqvw7pPbrhYarvwbg09ovKxvuy7p7xOa8v6fmGoAz4z9V7zKj89oZ+2eTRxXOJoYHU9+o+TvE7Ezdpg8rZ+ZTq/P+m6pm5nur8/6bfq+2O+xH5lZnitd+ZGqcTawuLvPVy4zZxWW+upn5eg6R+d//fq631GwWkam31Mz+eIhTfamZuVsx40rfoDmPyNRb0TyTyNRdg/id3cVlvmqZmUlkamVmJpGpvpJoNmeT5zcld8NcInNb6XJ3NodF6QNj02wiUy0zhlcwh/6usKJ5NpGpnBnOJku21x6GKmRmRodFvczMKDKVMjOjyNS4cWZGkamaGc4mzqwiUyEzszosamVmVpGpkplZRaZ8ZmYVmYqZ4WzizGi4bKVwZmZ2WNTJzMwiUyEzf2lnY6i/i+6OmUWmWmY4mzizi8ztbdGVZrM7LO4OjOIrzWYXmeKZmc3E/72SSwBmF5lKmZnj2eRm+t0ww8gUXdA8w8Oi/ILmT629TSZH0czMMDIlMzPDyNze1ngN7xzPJtP/aJ3DzZgPFczMPFa2h8pmZhY3Yz5U8PbMWUam3O2Zs7gZ86HyC4nmcDPmQ1OfTWb5G+TOaalnms3zsPjvv88K7Q9nnpEpmJkZPFYmrszDZmYamdvb0i+cmevZZNrMXGn/mUc7L5MZm+8sy1HwYXfWH5CZ9luZHTLbyPzf/5V4dOa+6We5b1P4WSLWH5CZNuXZZLa/QW4Lzd3N97Ao+OjuJ9qt2EGZJzSbftT/dgVeBGD9KczbHJR8zvvn2qeEHXw12V6Y72+QpcvJ9sMbN9p/250UehHRN9ql2MWrEq81e1c7Fbv4ZPLbZua4fuiNQmMiS4ZfgZhhsrdXzfg3yNLkc3cvZ31YFFroPsM1zJt+mH6h2czuxgz9NPHuuNY+D+ym2HrmFx9pnxB2czPNbpj1b5DbAoOqc1x1uKnEQrNZrmHe9NbUe2Smy8vuTbue+Uj7NLCrUuuZ57lY9d4065nnurzs3sQLzea6IORegYVm9t9aJvlj2h0y45n/tSkXmj2d8dTua2Ue8z7fdURrjybYC3Oe+V+7mGA/vDHnmf+1yVcAzHnmf+3fSffI39qN2N2UKwBmPuq+VGQFwJxn/td2XwEw54Uh9ya82p33XN3azXQ7ZOk97UJM4dXXE+6Rf7QTMYVfJlsBMM+bugOHU+2NezOf4n1t5/VEc5+UeW2yqZlZPljmoY8mnZr5dN4z/2s/T7dHvtcOxDSmmpqZ7/12nunfndnG2WTXqZlGDo/ppmbmP4y6MunUzPwnZVaeTLVDGpiUWZlmama/gVF3Z+qpmWfap4GJ7DY108Cc3WsT3TXTwjDqymTr3Pf2ftOuw2Tem2iP/K5dh6l88usUu+NQ+9s/lYnXET3WPglMZqeJ3mYOj4keRfSiiWFU5/nLKXbI0tdtjJctTXTXzDvacZjO2xPsjpnfKbNp0rtm5n6nzKab8buhocNjmhUin2n/MSc0xQJEZ67PyIyZZDnzx3O/U2bTPzvvjnYGRG6nfW5mK6PvSx9yeDgTLGduZ7xsaaLlzO2Mly1NMWY248eXPbT7mFlDAyKTLmduZ7xs6RmHh7Pz1F1D42VL04yZNTRetjTBmFlD42VLu46ZtTQgcjvhYxFbGi9bGnk2mf9N/76dp+5ausJdmmSdWSvry9Z2HjP7+BftLkxst3VmzawvW5tqnVkr68vWxo3AN3d47Lrcva0r3KUJns78r3YVJrfr05ln/STmmN2eznyh/a2f2umOx8drL7W//JMbtWq1idt1fU93Oi7auINq0+73ZjZyP+amHR+b+at2FKa3y72Zs39I5kPT3Js594dkPjTm3swz7T9mATs9IuIL7b9iAaOn7Nb+0G5CAbu90ext7SYU8M743THrV1PFHez2Y3WlhachhkY8z6yxqf+VHdYhNjb1v7LrAoCvtYtQwqtdFgD8pV2EEsYvAGhs6n9lgptmWpv6X7kZuhtaebSMb4cx1dam/ld2fG93a1P/K7s8aKa1qf+VsQsA2pvbdXZfANDa1P/K4AUADV7pLo0eU21vsm7l8dgdstTEo5gf2uHhzE08ivmhX0bujgbndpd2fjhzkwMj/w0+mzR5pXu7w01VLd31v2mnJwC0dNf/pi/H7pCm7vrf9O6o3fFU++teyq5PAJj/ixDjPhq0Fxq90r0dfTHT3irmtR0uZr7RrkExYy9mmlvFvDZuNXMjrw15aMfVzK0OjAxczbzQ/jMWM/Jipr11h2vjH0C094N2DIoZeTHT7KXMuIuZZi9lbm+Pxx0gr7V6KTPsYqbdS5mRFzPtXsrs8AqAdi9lxj7OrNlLmXEXM81eyux4MdPupcygs0m7lzIjL2bavZQZOpa6od1Lmf/9788xO6ThS5kxFzMNX8rsdjHT7qXMkLNJy5cyoy5mWr6UGf2cmZYvZcbNzDR8KTPmYqbhS5mdLmZavpQZcDHT8qXMqIuZVheYrYxcZtbypcyomZmmL2WGX8w0fSmzy8VMy5cyAy5mGr1XZm3wxUzbPz5GLjNr7zGZvuEXM01fytxdzAzcHU1fytzeng8+Pl5r/WySeTHT2hP/QwdDj4u2f3yMfANAm7f93xv+BoA2b/u/N+wBAPvaX/PSxj4AoM3b/u9lDo00fikz+GL3hfbfrbgRTzP7TrsCpQ1+mtm32hUobdgDANoedr8d/e7dVm/7v5c1NNLgs7oDAy92W//xMeppZl9qV6C43wbukZ+0K1DcoEczN72CyBn3aOYWH8bsyzqbND6eujTsYrfJx6d6hr8Z4lPtBpT3w7A98r12A8r7e8DuaH3Y/Xbsu5nbP5vkDI00vjTEGfTo7vZ/fIy4M/M37QZUMOzOzB+1G1DBr/m7o8kXh/gGz+8utX1TxErGW6uaH09dGrKYue1lzCuDHzPT9jLmlUF3Zn6sXYAa8hcz9/BbddRi5tZXEi1lLGZufu5/6Tr/sGh94eHKzbDvSqOP/A8Mmf9vfu5/KX/+v9FH/vtGvACg/ZVES+J93u3P/S8NmP9vf+5/aeD8f/tz/0tD5v/bn/tf+it3d7Q/9780fP6/h+H3jLNJB3P/S2fZx0UHs3V3ng/6rnz6SjsAVfycv0c6mPtf+jFzd7T5pt0Hhj+s6kPtL3od0mqiPn6E5K8PudH+g1Uy6GFmbT/C7N532Xvkd+3zfyWZDzPr5Lfq4IeZ9TH8Lq4m6mABopN9fHyl/QerZNCQ2Z/ap/9K8u//b/2+/7W8+/+bv+9/LX9IZKWP4XfxaSIX2n+3WnKPj+bv1F0bcMtMBzfLrGTfMtPJgFnuLTO9/FYdfMtMH8Pv/wlnk25+hOQeHz0sb18ZMGTWy4BZ/pBZLwNmmUNm3fxWHThkdqP9Ja9m65BZJ7N2t9nHRy8DZoOGzHoZMMsfMutlwCxvyKyf36oDh8x6GTAThsw6mbVbyjs+urnEHbDKrJsBs+xVZt0MmOUNmfXzW3XgkFknK8yWtg2ZdbLCbClrFeKN9h+rouwhs9bfLLMp7y0zjb9ZZlPOW2Y6+q066MG7vawwW9oyZNbHLZkrWcfHF9p/rIq+yv2y9HFL5krejZl93JK5kvFg5o5+qw66MbOPWzJXtgzAd/FciLWcZ5k90v5jVZT9KtUenmG2lvUss4+1z/w1/S7ujjPtb3ZNA55V1cUTEde2DMCfa//Nasp41l0fTx1ay3yXWfPvL/Pk7JEunmG29pO4O7p43u7akHeZdXNXxNJNai90tDbkNuvx/59r/6mqynz8fw8P/b+X8/j/Hh76f09cy9zBQ//vDXj8fz93RSx9kdoNHa0Nuc1ay9zPOualzLXM/axjXnqSsUf6Wce8JK5l1v5i15W/lrmfdcxLj1K7oatpmZyJu45WHv6XPTHTx5My196Sd8iv2uf9uqSJmZ6WEN0OmZjpaZL3Tmo3dDUtkzEx09e0TObETF/TMjkTM11Ny8gTM11NywyZmNH+eld2E98LfU3LZEzM9DWQmjkx09e0TM7ETD+Pl1kRJma6mpYZMDFzo/31riwxMdPZpa58x0xfA6mZd8z0dLfMknzHTE93yywJd8z0dLfMUu4dMz3de7eUeMhMZ5e6t7fScdHZQGp6wm5TT3fLLMl3zGif9Wt7d+ve6OpumaWMOyKc97W/3pUlpnm7eZLq2pFwXHS1vn0p47vS0UPMVsSn/7+jfdav7e2tu6Obp/6v5T7KrK+lRP+lHmV2qv33qk1YHtLTY4dWbuTvynvaZ/3qPhX2yD/aZ/3aftm6O7obETmUvzSO9pe7usexvdDb5L84/d/b5H/W9H9vk//y9H9f92QubZ3+72zyP3v6v7+zybPYbuht8l/8FdLb5H/iuPD1NvkvT/+/rX3Sr27r9H9vk/+50/+9Tf4n7vK+1v5r1bf9uOjp4XYrGdP/b2mf9KuT3mSmfc6v758te6O/ERFxenelr+eILEXPJp3d+b+0/VdIb0vMsu7+1z7n1yfc/d/Znf9L2+7+729EJO9NVR2eTf6L7YbuBlSlXyHafyQF4neluyVm//vfq+17pLslZtsXmXU4IpK3yKyft+6+EXuWSHdLzIRFZr09X2YpuixkU39LzKRnzHS3xGz7IrPulpjlLjLT/moriJ1NtP9YCrZe6/a3KCSjMt9on/IVbF9k1tHbmN/Ysjs6HBHJeLh7f8+XWYo8Y+ap9h9LwdZfIT29P3VNXGT2RPuUr2B7ZfpbYvZ///d9end0WBnxGSJLPf5mjZxNOpy2216Z/hYyZ1Smv4XM0itmeqzMlqXM2l9pDTlLmftbyBx9kllfrzB7bdtx0d/Sw4ylzP0tZJYq84n2KV/BlheZaX+jNeQsZe7xN2vkbNLhtN32ynS49JDKxGx/Xqb2GV9D+nmZ3T0rc+lK+tbs9feszKUPH+6GLiuzv+W46LEy4g0z2md8DVtvmPlY+4yvIV2ZHsfds26Y6fFs8t/D3dDdE5mXtl3rdrjAXb5hRvuMr2FrZTq8XWbbDTNUJoHKOD0uDtlaGe0/kQrpy6J9xlexbYdQGU+HN2Xm3ZbZ5W/Wh7dlUpmA9p9IRfydEG/0eFMmlXkgXZkux91zbsvU/mKreHj7XZeV2Xatq/0nUiHclkllQh3e+r/t5n8qw9nk3sOzifafSsWWytxo/4lUUJmIbXukx1v/t9z8T2UStL/YKqiMs6UyPd6sS2WivtuyR6iM50T7G60hozI9PhSRyrxGZQJUJmLbI2aojKfLcffz7V+afs8mDx9kpv2nUkFlAkJlenyMGZV5KLk7uqxMxoPM+jybPHxglfZfSgWVCVCZCCoTSu4OKsPZ5B6VcahMgMpEUJlQcndQGc4m96iMQ2UCVCaCyoSSu4PKcDa5R2UcKhOgMhFUJpTcHVSGs8k9KuNQmQCViaAyoeTuoDKcTe5RGYfKBKhMBJUJJXcHleFsco/KOFQmIFTmG+0TvgoqE0ruji4rc7D9S9Pv2YTKOFQmwF2ZEVQmlNwdXVYm497/G+0vtorPH+wH7T+VCioToDIRn27ZI1TGw3PMErS/2Coenk1Otf9WGrZUhicPRfRZmW17hMp4qEyC9hdbBU/+d445Lnw3278rVCb0l/YJXwPvl/FQmQQq4/AWs4DwXfla+4SvYtse4S1mni4rcyF8a7o9m1AZh8oEpC+L9glfww/bdgiV8Vxpf6M1bHsX4toj7W+2hoe74VL7b6XhjOPCJ31ZtM/4Gt7atkO+1z7ja/gxuTuOtL/RGqhMwsPd0OW1LseF75H0ZflB+5SvYGtl9rTP+BreTe6NLitzLX1rOj2bPH+4G661/1Yath0Xn2n/kRSIlXlL+5Sv4I+te0T7jK8hXZl97W+0hm3j7mvPtL/aCiJnkx5/hZxyXPjel74sPVbmydY98pP2KV/BO+ndof2V1kBl4qiMs3UJYo/HxcNHQgR6fJDZN1v3yNvap3wFWyrT42130pdm6XPtr7aCryL7QftvpeBk23HR483/H0hflh4rs+0BM3t7P2qf8hV8nN4dPS5Vlb40vZ5NYr9Ztf9WCrYuDrnR/iMpEG797/O2zK+37pEeb/7fsjtOtL/T9eXclNnlo0QePsasy18hV1sPDO0/koKX0pflO+1TvoLte6TDm//Tt8t0uVQ156bMLs8msd+sF9p/rfq2T9t9pP1Xqk/+smif8uv7efsO6fC2zL+37I4Ob8vMuV2my6XMsd3Q4a8QjgufuJC5xxtm/hT2iPY5v770Qua9vTPt73R92x6GeK+/GyM+iu2G/n6FbF3IvLf3lfafqbrP5C9Lf0uZty9k3tv7RfukX91f23aH9pe6vpyFzD0uWY3+Zu3vV4gwbfeB9p+pOnEhc4+LzP4V9kh/S5m/37Y7zrW/1dXJX5ql/pYyx88m2n+t6oQB1f4WH4pLzPb2/tU+6Vf3nbBH+ltktnV3dDe9K4yIrL3U/nJXF78tortFZtuXmHW4LERcYtbjIjNpj3S3yGzbErMOp3fzlpjt7T3X/nbXdhPdDd09lfmpcFx8qP13qizydLuHtE/6tW1/VuadX7XP+rWln8i81N0zRPKWmHW4mCi+G461/16VHUjHxfvaf6fKMib/+5v+3/6szKVPtE/7lX27dW9097zMvMn//qb/EwtWe5v+F+/Z7W36P2Pyv7/pf2nyf2/vb+3TfmVbJ//7m/7P+dIs9Tb9H3uK2dKB9h+sLvFS90b7D1VZxuR/f9P/258vs9TZ9P8nwu7o7Bkz5zlfmqXenjETe77MUmfLQ+RL3c4m7LK+LJ9qn/br2vo65pXO7v7fPvnf3cD7Zda3ZqmzZ4mklhJ19iIz+bjo637djDv/l37WPvFX9WXGHtE+79e17c7/pafa3+u6pIWq9/qa5o3e+b/U18RMxqNUv9D+U1WVNS2zt/eH9om/qu0vl1np675MYVqmt1fM7Od9a/Z6m+ZNvxCxq4mZjBWIN9p/qqqypmV6m5iRp2U6m5iRpmU6m5jJnpbp7b7M1LRMZxMzZxkHRldDqZlflq4mZjKmZfb2vtc+89e07YHMK11NzORPy3R2/90Ljo/bjLtllnoaSs26W2appztm5Ltllnq6Y2b73TJLXd0xkz8t09fjdz9M74aeJu62vo15raeh1C9yvyy/aZ/6K5Lvllnq6a3Mv8q7o6M7ZrJ+q6719GDEbZO8HR0fWW+F6GmNe8ZDzFZ6epRZ3h75VvvUX89PGbujo7WquQ8xW+nozoibLbuho0fd5a0N6Wct85ZL3FA/bzKT3mD22sfa5/56fs/YHR2tVc17g9laPwPwyXXMfR0fmT9C+lnLnLmOeamftcw565iX+nnIjLiOeamftcz565iX+hmATz1eprPjI/NHSD+rD2/yvyz9DJl9mrlHuhky+yVrd3TzdPdhA2YdDcCn1zF3dXzk/gjpZfXh1kvcUC9DZpkDZh0NmeUMmHU0JDJswKyfAXjhbNLL8ZH9I6SXi9zsFWZLvQyZ5Q6Y9TNkljVg1s+QyLABs37OJtsHzLpZZZb9I6SXi9zsFWZLnQyZvcodMOtmyCxvwKybVUQDB8z2ullldiPshj5WIR7k/wjp4yJ3wAqzpT6emJnzpMzXPu7jxsx/MndHJzfeDR0w62WVmTj83seNu1m3ZK708fKhD4Z9Wfq4MfO9AXukjxszM27JXDnU/obXMOiWzJU+bsyUh9+7eJZZ7ltUl3q4yH2efupQVBfPMst6htlaFy+ZkZ9httbFs6qGPMNsrYsnI8rD71faf7sKToccFz08fSj9mO6EL7UTUMGTQXvkF+0EVPBX/u7o4fHuTwd+aZZ6uAEv54mIHawPuR5yXPRwy8zN0C/Le9oJqCDnof/3/tFOQHm5c/9LHdwSkfGCqod6WE20/WaZlfbXhwyY+19qf/5/4Nz/Uvu3zAyY+1/qYP5fekvmpg7m/4fP/S+1P/+fdetd+/P/A+b+l9qfsRs497/0jXYEihsy97/U/vz/x0N2R/Pz/4OG3e/daH/Zi8u79a75d90NHU9tfcZu0H3/r336SrsChf08dI/8qh2B0n4ctDuOtL/lpWW8azfqkfbXvbDMlUStX+wOHk9t/Y7dAQ/KvPdEOwOF5d/3v9b6/f/Zy5hXGp/fHTjsfq/1s4l03/9a44uZhyxjXml7MfPQZcwrX2tnoKxBy5hXGl/M/PbA3dH4YuaBw+4bGh8ayX2KSNsXuyOWhjzT/ssVNepSpvXFzMMvZfb23tYOQVHvDN0dbV/MjFnGvNL2xUz+TRFNz9wNv5TZe9H0xcygR5jda/pi5tWYPdL0xczQS5nGL2bGX8o0fjGTfzZp+WJm1NKQli9mBt+RudbyxcywOzLXWr6YGXwp0/bFzPhLmbYvZoacTRq+mLkac1y0fDEz8lKm6YuZAU9j3tTwxczwS5jbg7YAACAASURBVJmmL2Z2uZRp+mJmyNmk3YuZUTfstnwxM3JWZqndi5kxszJL7V7MjLiUafliZpdLmZYvZoYNjDR7MTNiVmap2YuZcQvMVpq9mBmxwGyl2YuZMZcyDV/M7HYp0/DFzLCBkVbfmTnyUqbdnx87XMq0e8/M2EuZdi9mMt+RGWr0Ymb0vTJrrZ5Ncu+VWWv0AQBnow+MNn9+fLTDpUyzDwAYfNv/vUYfADDstv97jY68j73t/16bDwAYPDDytMlHd+9wpdvm08xGPMFsU5tvMxv6BLNNTT7N7JOBt/3fa3Lk/XTXS5lWzybDB0ZafDTzTle6Lf78GPEwZl+Lj2b+c5cd0uSjmYc8jNnX5Mj7uIcx+1p8NPOY5yE2OKa605Vui++ZebzLDllq8D0zr4a9VybU4Htmfhn0MGZfg++ZGT23u+llg8uJxpxN2htTPd/twGhvNfPoGzLv/akdhcmNuyHz3k/aUZjcgFdkPrDf3sj7+LndTe2dTXJekflQcw/NHLmKee1FawsAdlnFvPZ1awsARq9iXmtuNfPfO+2O5t7wfrnrAfLah9pf/4k9H3d7d2sLAHY+PFqbsttx6n+ltQUAu0z9r/yunYVpjZ/6X2lsAcAEU/8rrZ1N8l5e9tC19l90Ujsvcm/t3cyPdt4fzlvaXZjUH7vvkI9/0Q7DpP7ZcXc09mN1xwGRDV9pnwAmNX4hUVM/Q0Y9wMzX1BMARl7hPvCddhim9MO4B5j5/tIOw5TG3fW/qakfqxcTHB+vtTUCfzN6P7T0M2SSw+Nz7b/lhMZe4T7Q0hMAdh8vW2rorZm7jpctNfRjdYIBkXstjZnt8gyRdn6GTHR4tDNmNtF42VI7Y2YTjJctNTRmtut42VJDP1anGy9bamfMbLcb75pZZzbR4dHMVe4U68vWmllnNsl42VIz68x2Hy9bauapmVOtL3vtRSvrzHYcfW9luftkh0crV7mfT7VDlr7RzsNEvptsjzSyzuyTHe7H3NTIj9XzKcfLlm60TwMT2XW1ahv3Zu54P+amNu6mGvrwVEEbb5r5bcI90sa9mbvcj7lpv4kHiRxMcz/mpi+0TwSTGHc/5qYWnmd2sNtLh3wtPM/swwnHy5Y+/Vm7EBPY6flloV9beJ7Z75PtjiaeZzbF88tCLUz07vZg95UGVohMsIj5XgPLmadaxHzvu/lPzUw2KbPSwHLmnybcHQ2sI9r11WVRLUz03kywH+Y/NTPxnN38p2YmnZRZmf/UzHSTMiuzn5qZalJmZfYvrJp8UmblZvY/Wid5hMjsr3YneYbqprkPpu70fsyUP7QrsaPx78dMmft7M0e+HzNh/1z7PLCbApMyK3N/b+YEj9x15r0QcbIHD92b98shdp+ri5r3XTNfTr9DPp73CoBvJ94dM79rZto7ZTbN+66ZnV9R9cacr3aL/AaZ8zr3qWf+12a9AuCtEnvk+zmvABj7Eua0WS9XvZ58d9yb8wqAKWb+12a83n3Smf+1Gc/ZTT/zvzbjFQA/TzvzvzbjmzOnuR3TN+MxkSIz/2szvjnz+c2E+2G+g6olVh/uzXjObtLDIjDb52bu+HrMtG+1YzHWT5PO/K/N9sWZk0/t+ub74sydX7brmettVRMvL7t3o/33HWmaBSEJM11o9mrq5WX3ZrrQbNrlZfdmOvReaHnZvbn+aJ36bHI2y7m7ghe681waUjQyc83MNA9ijvtROxhjfDLt8rINs7z5rnhk5vqjdbLHur8xx8wUHU2dY2YKR2ae65mnX8O8aYaZKReZWQ69F1vDvGmOZ5Op1jBvml9mJnx6Wcz8DowSh0Vgfk80KxuZGd42UzAyc8xMlchwNlmb20rE4he6czswKkRmfpkpHZn53TYz9Y0yvrllplJkOJuszWslYoXR1HkdGFUiM7fMFI/M7DJTNjJzy0y1yHA2WTue0aBZhcjM68CoFJl5ZaZCZGaWmdKRmVdmKkaGs8nafOZmqkRmTgdGtcjMKTNVInOXmdnMzXzyToXdMZ/MVI0MZ5O1uWSm6OqyTXM5MKZfdLjFXDJTKTJ7s1lpVnTi/95cMlM5MvM5m5T+yTqPzFSLzFwOjOJLmH2zuG/mVb3IzCQzlSJzl5lZPLKq0njIps9ncXtm+Z+sT2fwO6TYHf8xj+0fGM8rR2YWmSl4x3/MDJ4C8FOtyOzN4ikACpGZx1MAapxN7F/uFnp2WYr5A6Pks8tS3rP+6Mwf6kZmBs80K/PsshTzb3o/0YjM3dnE+qMznxd4B2KM7d8hB0WewryN8WeqfnhTe4csffeDdke2KvQU5m3esf0igB+rRsb8fRFVx0M2GT+b1PvJavl3yGntGbs7Lyy/1uxRoffJSEy/b6bAS8tk31te0fxu9d1heoq38niIx/LZpNTbqWKuzB4ghzrXuc+0//pJX6nsD8fuUrPfdHaI3RXNn/ylsDvsTvFWX1zms/vK94r3Q9w5M3qAqF3nGl0cUn/ef5PRNQCvSj6EeTujawBqzvtv2Dc69q4y77/J6oqi2mcTkwdI/SmZey8tDqfqTMncMzk583Opd5bl+Mvi5Mzfladk7pmcnFH7qXrvxSPtU0fERzf1d8S1uVGz86f198KGr7SPggfeV5qSuffpn9pNeeAP3T3yq73JmX8Ud8eZudcjav5U3WBvDP4zlbOJtVEz9Z8gxkbNdEfL1n6ztaRZcbRszdiomdJo2Zq1QZFD3Z+q96yNmlV9esiGfUvv8T49UtoLG0xd5374Unt3rHxnaa3Zn/UXMD/0zi/aZdnwu9po2ZqppUQL7b1x78Vn2qeQDZpj70dmrncvtCfsVr4w8wPkmfauuPdEuy1rr5TWloU+NvO8mV9qPB1T8tTMe5rPddeWhT7gbOIYuZwxMpZ656WNyxntaX+fkcuZtzSn/X1/2bic0b+QWTEyx2voQmblpY3LGf2ziYXLmUsbFzIrBi5nnmuNoSYZuJyp+nBM0ccGZmdMXMisWHh8prELmRULc70mhkW0nwRwbmBGZpP6eOpnRmZkNn39lnJkvrQwI7PpHe3FZu8auZBZuVL+tXpwrb0H4l5oL119ZORsojquavHoeKx578xHlZ5mN9S/mvfO/Ky/tOyhfzTvnXn7V+1/fmBf9deq0rMxczzWHIS3dDbRGzYzenSoDZs9N3F5G/XpE61FzbYGy+7prQIwNFh276nasNmhseGQgNoqgOfP1O+48xyrzN8dWhxKdV7o3FWlfx/mNl+rPNns1RNrg2X3flV5stknmvdhbnOkMipyqvlozCwvnql05n0jg2X39hfVO2P7F8jL+o9WtXdUhL6u/yyAL+2sLIt5p3pnPrE1IeOrPz1jccj9IYXHvluZkPFV7oztxixV7oz9xiy9V3cZgPHGLNXtjOnGLB1X7czBwuaQ+0OVzyaPHmv/g1MqdsZ+Y5YqHhnzaMzSe/WuZ2bQmKV6nTHfmKV6nTmdTWOWKp5N7DZmaf+6yhFyMYvGLL38qsqI6nwas1RnfubVk3k0Zumdv2s05pc5NGbpqsr8jP35mFCl+ZkZnE2OSx8hBydWHmiX5cUXHxU+KD4ythIkw9fF15v98I3dOf+YX38sva75p2+1/40DnBV/iOahmeeFDPHig9Jnk+fP7Ddm6eyk4MDZ6fWcLnJXPi95n+YjE49eHu6bkhM0f1q8P0bw8bcFHzvzyY+6j14ebn9RcFjk4HJWv1Q9jzmbrOwfl3krwMHJbIbKfC+flfkJ8tFX8/jhEfX1H2UuaH74bT5DZb7vC13Q/PTtTIbKfFeFLmgOZzdU5ntZaHjk+ezOJk8vJ/8pcnE8v8uYe4/fn3pM9fn7hm7MHeffL6cOzasvv9P+R+3i428nn6H55Xdrt/nnK/Bz9fx6vpcx926mn++d6dnkbMrQzDsxK59PGJoGErPyzYShefXlv9r/nN1NGppffp/bSFno6fWEoTm/NHsf92CTnk0++2B2c7v3ziY5RA5OGkjMyuOvprjY/eirRhKz8u+XUzzj7Oc/Zn0Vs+njbycZOvvpn7knZmX/+GKKmd7DJq5iNt18NcUTEz9q4Afr/tXJTpc0h4t2fn44Lz/4bJcfIc8/+2Juo6cZvvvtz10uaX748pu5zsWkfP/uTnfR/PLjX7Oci0k5Wuy0dvX88qqVH6q+lx+8v8vv1ruzyY32P2EqT68ux1zTHFwsZjrbL7n54P0xv0I+er+dY+Khu9KMuab5ub3CrL3z7t9jrml++v3b+U7FbHFXmjHXNIetFmbt5cizSUOFeePo+jL/58jp4eKqtevbwIvHzwYcHB9+9uzxjIdOc3363pM/89+s+daXv81wyfIwv/717tv5S5zf/v0fi49bns7Tq8Vh9tjIweHlcWMjIUmPv3g//xUBjZ9N9o+uFxfbfpGcH14urhq9gol5+fjZs0fbDo9Hj7569vhGezPr+u69J3+8teV+mldvvfXkt/davYKJeeevd39/e8t7zz55++93/3mnySuYmKOrxcnhluGR08OLxfFR21cwMS8ff3F3NtkyIN/X2SRxVdNRXgKJo0J7s3TFG/P/a2+WnncSVzDa26XkKH4WWWhvl7r/j7PJEpUJUJmIxDiZ9mbpoTIeKpOQGBzR3qzaqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTQWUCVMZDZRKojENlAlQmgsoEqIyHyiRQGYfKBKhMBJUJUBkPlUmgMg6VCVCZCCoToDIeKpNAZRwqE6AyEVQmQGU8VCaByjhUJkBlIqhMgMp4qEwClXGoTIDKRFCZAJXxUJkEKuNQmQCViaAyASrjoTIJVMahMgEqE0FlAlTGQ2USqIxDZQJUJoLKBKiMh8okUBmHygSoTASVCVAZD5VJoDIOlQlQmQgqE6AyHiqTQGUcKhOgMhFUJkBlPFQmgco4VCZAZSKoTIDKeKhMApVxqEyAykRQmQCV8VCZBCrjUJkAlYmgMgEq46EyCVTGoTIBKhNBZQJUxkNlEqiMQ2UCVCaCygSojIfKJFAZh8oEqEwElQlQGQ+VSaAyDpUJUJkIKhOgMh4qk0BlHCoToDIRVCZAZTxUJoHKOFQmQGUiqEyAynioTAKVcahMgMpEUJkAlfFQmQQq41CZAJWJoDIBKuOhMglUxqEyASoTEa/MD0/Gee+7cVvx8TvfvmvEj1RmE5VJoDIOlQlQmYh4ZcZ79eXXg7fh27fjZ3ZLqAyV8VAZh8oEqEzE1JW582TYFnz/k3ZBclAZKuOhMg6VCVCZiAKV+d/Pnw7YgG8/0Q5IFipDZTxUxqEyASoTUaIyQzLzl3Y+MlEZKuOhMg6VCVCZiCKV+d8fuR//6zyuZKgMlQlQGYfKBKhMRJnK/O+9zI9PrOiyh8pQGQ+VcahMgMpEFKrMn3mf/qt2PLJRGSrjoTIOlQlQmYhClflf3szM79rxyEZlqIyHyjhUJkBlbDqnDgAAIABJREFUIkpV5pusT5/FImaHylAZD5VxqEyAykSUqkzeTTPa7chHZaiMh8o4VCZAZSKoTB4qQ2U8VMahMgEqE0Fl8lAZKuOhMg6VCVCZCCqT58fCfwerqEwClXGoTIDKRPxMZbK8W/jvYBWVSaAyDpUJUJmIP6hMlu8L/x2sojIJVMahMgEqE/EdlcnxS+E/g1lUJoHKOFQmQGVi3qIyGb4t/Fcwi8okUBmHygSoTEyhi5m2KtPrCjMqk0RlHCoToDJR31AZySe/Fv4b2EVlEqiMQ2UCVCauSGZaqswnvU7971GZJCrjUJkAlUl47wcqs8XbHxfe/5ZRmQQq41CZAJVJ+fTJ5J1ppjJvv1N459tGZRKojENlAlRmi+++eTLOl9NX5pd3zfir5+uYJSqTQGUcKhOgMiW8N31l+l3RZQ+VSaAyDpUJUJkSqEzTqEwClXGoTIDKlEBlmkZlEqiMQ2UCVKYEKtM0KpNAZRwqE6AyJVCZplGZBCrjUJkAlSmByjSNyiRQGYfKBKhMCVSmaVQmgco4VCZAZUqgMk2jMglUxqEyASpTApVpGpVJoDIOlQlQmRKoTNOoTAKVcahMgMqUQGWaRmUSqIxDZQJUpgQq0zQqk0BlHCoToDIlUJmmUZkEKuNQmQCVKYHKNI3KJFAZh8oEqEwJVKZpVCaByjhUJkBlSqAyTaMyCVTGoTIBKlMClWkalUmgMg6VCVCZEqhM06hMApVxqEyAypRAZZpGZRKojENlAlSmBCrTNCqTQGUcKhOgMiVQmaZRmQQq41CZAJUpgco0jcokUBmHygSoTAlUpmlUJoHKOFQmQGVKoDJNozIJVMahMgEqUwKVaRqVSaAyDpUJJCrzCEmfffFS2qt6lTlbHKK0cyoTR2UcKhNIVAZbPXq8fa9qVeb4NH58owYqQ2UcKhOoenJuyFdb96pOZfYTRzfqoDJUxqEygaqn5pa8v22vqlRmPzGQg0qoDJVxqEyg6pm5Kdsyo1IZIqOMylAZh8oEqp6Y2/J5eq9qVGZR95SKB6gMlXGoTKDqebktH6X3qkJlntY9o+IhKkNlHCoTqHpebkz6YkahMpd1z6h4iMpQGYfKBKqelhuTnplRqAxrmNVRGSrjUJlA1dNyY9JDZvUrs1/3hIoIKkNlHCoTqHpabk1yr9avTOKhJ6iIylAZh8oEqp6VW5Pcq1SmR1SGyjhUJvC87nm5Lcm9SmV6RGWojENlAonjAjmSe5XK9Oh6wPeuTVTGoTKBr+qel9uS3KtUpkf9nkXWqIxDZQKf1z0vtyW5V6lMhw4GfO0aRWUcKhP6qO6JuSnJnUplOsS0DJVZoTKhD+qemJuS3KlUpj8H+wO+dY2iMg6VeeCzumfmliT3KZXpz9WA71yrqIxDZR548WHdU3NDkvuUynTncsBXrllUxqEyD71gNfNIyV1KZXrDKuYlKuNQmZgvuDdzlOQOpTJ9Oez8BLJGZRwqE/Xig88IzXDJ/UllOnJ60vvp4w0q41AZjDDbyhwO+EcCO6IyDpXBCFQGkFEZh8pgBCoDyKiMQ2UwApUBZFTGoTIYgcoAMirjUBmMQGUAGZVxqAxGoDKAjMo4VAYjUBlARmUcKoMRqAwgozIOlcEIVAaQURmHymAEKgPIqIxDZTAClQFkVMahMhiBygAyKuNQGYxAZQAZlXGoDEagMoCMyjhUBiNQGUBGZRwqgxGoDCCjMg6VwQhUBpBRGYfKYAQqA8iojENlMAKVAWRUxqEyGIHKADIq41AZjEBlABmVcRKVOVmgU9c5vzCoDCCjMk6iMujZiRgaKgPIqIxDZRBxsr/9sKEygIzKOFQGMefbM0NlABmVcagMorZnhsoAMirjUBnEXWw7bKgMIKMyDpVBwrYlAFQGkFEZh8ogYdsJufHKvHwMTOBDKrNEZZDyNH3YtFyZDz5L/OuAaWQd9g2hMkg5Th82Q78986nM5x/VPN2gS1mHfUOoDFIW6cNm6LdnNpX5qubJBp3KOuwbQmWQsmWV2dBvz1wq837Ncw16lXXYN4TKIGXLGXnot2cmlfmi5qkG3co67BtyWffEhRnprjIvn9c81aBbWYd9Q67rnrgwI91VhvEyVJF12Dfkad0TF2aku8pwKYMqsg77lpzXPXNhPnqrzOOaJxp0LOuwb8lV3TMX5qO3yjyreaJBx7IO+6Zc1D11YTaoDFBC1mHflH3GzBBFZYASsg77tpAZRFEZoISsw74x+yd1z16YByoDFPBR1mHfnCM6gweoDFDA+1mHfYuOrhfoVOI3BpUBCvg867AHWjL8jJz4+iT/76kM8FqnA2boG5VxqAxq4FIGHaIyDpVBBV9lHfRAW6iMQ2VQXr9T/+galXGoDIp7lnXIA62hMg6VQWGf3WQd8UBzqIyTqMyHj4AJfPXBy6zjHWgQlXESlXmctZEAgBQq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoAgq41AZACiCyjhUBgCKoDIOlQGAIqiMQ2UAoIizw6jL9P/Ho7jk//13b0V9k7V5b0f9PvW/ae+D+D/qJmsjAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKBHZ0cL5/roqfamAACasn98cbvh9ORKe4sAAK3YXxzchk6PtbcKANCEq4eNWTo/094wAJiJw+hpdBqHdxaLxdHRvva/cqST1L/sgMsZRYvpj9OTxeJqtocpYFvJymw4PbxczG7qPBmZO2RGz9SVuXd+uDg+0v7nAY2pVJmVg8PL4/mkZvvJjEEzNeUqs3J+cU1qgMlUrYxzcHE9izP0kfDPYHxFS+nKOIeXLCYEJlG/MksHJ8fmT9Knwr/hRHsDu1WlMkuH8/g9BNimU5mlC9uhkU9ljKooqVaZO6eXhAbYjV5l7lwYHpSIr2HedKi9ib2qWZlbQgPsSLUyt7cHC6OrAY4zNt7opjevcmXunF+bvu4GTFOuzJ0Tk78UL+QNv73W3shO1a/MnRMGSIFx9Ctze3to8Auctd3aG9kplcrcXdBwjxQwhoXK3J2vrQ0+CcuYX9Peyk4pVeb29pSBM2A4G5W5vT2x9f3NmZZhlZkStcos5xFtHafADFipjLFHg+WdyKiMCsXK3B2nzMYBw5ipjK1hs7wT2UJ7M/ukWhne/AAMZKgyli5ncpaYURklypWxuVwFMMtSZQzNzlAZw9QrY+hABeyzVZnbcyOjZoyYGWagMpauuwHjjFXm9sDGPZrM/htmoTK2phEBy6xVxsj7wa6zNpXKqLBRGVabAXnsVcZEZrgr0zAjlbm7nGF2BpAZrIyJzORs57n2RnbKTGVuD7iaBUQWK2MhMzmLzJj812GnMhwDgMxkZQxkhif/22WpMoyaARKblTGw0oy3mJllqjK3p/rHKmCazcrcHqj/QuSNzGbZqgy3zgDbGa2MgZn1U2ELT7Q3sFvGKmNhgBcwzGplbi+198zZ9u07Vb/a6pa5yvCLA9hCrMz50RhXi8Xi8vBQntxIUx+Q2roAwMDMUbcyBjOzHd8dqCeHO//WIjNAkvj92nGO++xocXI+6ourf7Fwkt44IqNIrsyI/9K7H0YX4w5Uh8wAKaUrs3K0GPFrUX3MLH01Q2Q0FanMytH1xcjr73P1H0WAUXUqs3R1MvT7q38qP4v/uuW576oKVmbp7HrUABqZAeLqVebOVd5rW0p89FjHDztzoj5j1LnClbmzfzzsSF0dF1P824D2VK3M3t7TQRc0V5N+9khni41FDKcnx/xk1Va+MnvL0AyepSEzQEzlytx9ey/zv7anE3/2aPurBUn6Q3jYq1SZO2dbln9EkRkgonpl7q5n8oe9ud0ND9WqzN2vi8WwuUTeOAM8pFCZvb3r3O+umYsZGFKvMoM7w88i4AGVyuw9zR3zZqIdD9SszLIzmcfqEkvcgQd0KrO3nznkfVHk0zFrdStz95towIIz/ce8AtYoVWbrjfWbeIcLQrUrs7d3JT069Z7+Y14BY9Qqk5kZ3kWIUP3KZF9731p4ZAVgi15l8jLD/D9CCpW5u5zJXgVg4i4vwA7FyuxnLQFgOhUBlcrkr1g5YJQX2KRYmb2znJ+HDEAgoFOZ7KlEpmYAj2Zl9q4zvrIMmSGgVZntbxzawGQisEG1Mns5gxCMP8CnVpm9o8zJGYZ5gXu6lTnK+Mby1A749CqTN8jLmBmwSbcy8sdzYyZCipXJzQxjZsAbypXJuJg5KLoBmB/NyuRmhnFeYE25MjkzM3xh4VGtTGZmLLyBD7BBuzIZy3Z4zi08upXJzAxHLfCadmX25e8rY9zwKFcma83K7SmPzQRWtCuzJz/vlsEHeLQrk3ffDD+OgBX1ysjfWKb/4VGvTN5TAJhPBBz1yjyVv66FtwAzo1+ZnBX4tyfFtwKYBfXK7Mmv7uCFmdhkoDL7OSsAuJgBlvQrI0/MUBlsMlCZrBUA3E8MLOlXRj5nMI+KTRYqs3eZkRl+HgF7Fioj/yqkMthkojI59xNzMQPsWajMGV9WDGKjMvJxy8wMsKRfmT3xu8oNM9hkozI5Y2YsMwNMVEZcrkNlsMlIZfbl1ZFczAAmKmNgE/pzdrRYXBwevtn3p3f/8+Xi+mgO798yUpmcRwDM9H3i+0dXq8PjzS/A89fHR18LGs6OrheLw42vye3yf1ksjo/4+TCEgVO8fIdb8U3oyf7R4mLbr/Dzi8WR7WdwWalMxpF7YHtPRhxdn2z/Zx0cXl6335qz48Xh9mtV+98TO6hMV64uc16CffcVurzS3tQ0M5XJuGlmTm963c89Ou4cXl41e4o9WuQ82sE5PTnmqkZmoDLybZnFNyFmIah/dD3dbYP2j+U9veni2Oh5xExlMg7d01qbsquzRXZh1s4XcxhfHebpdXZh3uyGy/Z2w8QMVMbOScMjbVT9UQPhp/P2DboalpiVE5NDI3YOmIyH8Jncg6Gzy4yVDDGnTZ1h2Q2FUJkUaaPmVJmni5Ffn9tTg2/jMnTAyA9ntr+Y+en12INjdYQoXNWXsH89+GLO2w3XRq/8LaAyKdJGzacyT7MeVJ9irzOGDpiMixnjJ5+jnQ6OlYtZXLBtdTbBbjjhgibBQGXkv2/xTYiRNspcZRLz9bs1ZunU2EoAQ5XJWLpiLtKbjnf6/X7P3k+RQY4GT8bEHc4/t0UYqIzRNWbSRpmrTPRxb/sT/Ea7OwhMDYpYqoy8zOy83sYMdbzTUJlvxp2ZqjFLdCaGyqRIGzWLylznvAclh6UnllqqTMZDM00VesPVhI1ZmmlnpmzMkq1fZDbMoTI69/5LWzWDypxNNB6ydGhnfsFUZeQHANi8ZWbqk+vS+fx+yD8ds/RScGnnq2KEgVO8+FejMitDKyOfjYc4MHMKMVUZ+a2ZFofMphlIfehkZifYxVTX+p4DYxOZ6uZQGZ0n/0tbZb0yU17IrFgZETFVmYzFK/aGUI6LnFyXDmxeucVN/xVZu5hZbQvTr4zVt5hJW2WuMv6dGSVOJEae/WirMvJ7ZqydeJ8WGCy7N595iWmv9X1czmzSr8y1+BfT+ZZKW2WuMt5fqsyIiI1bDG1VZk+cRDf2TPGrYhcyKzM5wZa7kFkx8pPMBP3KyOdDnQkBe1uVX5n9Ut8gE5kxVhn5bWaWhk9KzchsmsPsTLlBw7XzGeyFSvQrI6+n1PlrSVtluDJnE69R3WDhF5qxyshDZlYmtPbK/4JfOTc/alahtbcHPAvgNfXKyM/oUHqsrbRZditzVvJnmoEzprHKyL+TTFwBOqVHy9bsLEiMKnatHzDwZTFBvTLy/QY6S8zmW5nCYwH65w9rlRGHzMw8/r/kfHfA8gm24LV+wNrCDyXqlZHvilL6S0mbZa4yr8+tGe8J3on+6x+tVUZeJWlk6KTGMNEbFsZW44pe6wfsXMZq0q5MxkNtlb6i0mYZrUzpyBhYMmWtMnviWcvET9r9oguYH7J6gi0/7z+HvVCVdmXkdcxaww3SdtmsTPnI6D/TzFxlxOtxpUFfT625iHs2T7A1viH290Jd2pWRR0i1rryl7TJZmTqDAcoDQOYqI564DipvUET9yJh69t0btSNDZvbUK5PxN9c6pUnbZbEylUaclcfMzFVGHvZVX9mrERmLj3CrHxkyo14Z+VJGbX2OtGH2KrO/X2vtjO4CInOVkQ9j7RVXOpGxd4KV720qQfuvr063Mhm/LNSWqkgbZq8yV9VOJaeqQyH2KiNOzGgvuFKKjLXM1Fxdtqn3zKhWRn5quuJYg7Rh9ipT8VSiugDAXmXENSzKY4wjlzCfHh6eLJYuDw/HHlyWMpNzvok5PDy8dPvh5PBw1HBB708BUK1MxhuE9FbnSFtmrzKZzl+fOl6fPkZ981RvmrFXGfkvU3uLPPKT1h78fQ8XV+GZcf/o+mREa+z8jh8xbHh4efzge352tRi8Jlz34l+dZmWuMv48enea29uy3SsTOXcs/3uPh589NC9m7FVGfkeS5o/ZoTPe54v01u4fnwz9WWLmEc0Dr+jOL7d8xa8uh13UqN9kpkqxMk8zDlfFP460aXOrzMHJtq/7/vGwV9NqXswYrIxYacVT7bAZ79NrcYz6atjp2spwkXxr3uZuWIi74WhQb03cmKtFrzJZ16+KD82yt2m7VGZrYlb2j4f8PFMcCDFYGfG8q3ftN2gy4jDvqN5fDDlUbDwCf0hsL3J3w4B9a6S1KvQqk/PbWfM6U9q2GVXmQP5h9voT8gecFZ8AabAy4ibpHckD5hAyG+MM+Uli4tEH+dt7kr/iaEBn7N07VI9aZbKuujVvZpO2bTaVOVgM+C2Zf/LQu8w0WBnxT6N2jsl/DPP5wL/ogB/yBoaLskf5hqT2zn720grtBzMp0qpM1h9d9S4DaePmUpnLYeMV2e9S1FuiarAy8t3/1TdpJXuc6GB4Cfbzp/LUh4tyVhq53TB8JDj7xXDqD4BQo1OZvONTd/mftHXzqMz58O935jNr9Z7NZbAyVheZZY8THY46BWa/FE17aiZ3cupi1HZmXs70u85MpTJP8+qv+74se1s3ojKjrtIz75BWWzZlsTLi90jnYM4dzhk7mpP9NgHlhx9k7oexI3uZtdV/AaASjcoc5f1NlA9Me4fM4MqcjvwBnZcZtSEzi5URL85VpiYyj5hd3p+c2zHVM2zefthhyXXe2zfNvDO1tvqVyZ0u077IlrbPfmXGP3g9KzNqQ2YWKyNuk8rcb9542YhR1Q2Z93yqnmGzxk7Od5k3yXuugJ3nINRVvTJHmSPF6vdySRtovjK7XAtmfZTWkNksK6OxmjdvfdmuP+cyB1gVl1hl3Y+5427IykyvFzOVK/M0e0Gh+nMppA20XpndfjflnKC0hjQtVkb82yhM/eY8XGOKMYO8zByoLbHKmvrfeTdkZabTi5mqldnPX7yvv8Je2kLjldn1eM6Y1tW6B2SWlVH4GZu1kHOKgem8zKjdm5lz1plgN+RkptOLmYqVyb+OMfG8cGkTbVdm5x9NOTdaKM2cWazMvr1tyjpcppn9zMuM0gKAnEuZSR7Ll7NsvM9lZrUqs3885GnZBiIz78pMcGWesUhDaVTTYmXkG2aqb1HOF26qW9LyijbNZw2V8eN2okngjNhaeNhOfVUqM/SBvxYiM+vKTDH8m/ETUGlCd56Vqb2aJedomW6JTdZKM5VZCfmxDNNtWMZe6PIBAMUr8/TqcujLS0xEZs6VmeZLI5/MlW5mNlkZc7dl5qzlnPBiNGc4XGVWImNWZrplLPIAQJdPMytXmbOjq8XJ4JfK3VqJzIwrM9EOzPgROM0HDUVlMuRcXEx6xjO6xCrjknzCkTx5aqbL+X/xy3FwONyod2OvGYnMfCsz2RWG/PNU5/J/npWpPImV8R2c+CaFjEl2hVNsxqXMlGOZ8ndU+z5ADWMuNorSX8L8mrShVisz3Vss5efY6kz/m6yMOPNYd6gk41iZ+gaWnMce17+YkWs77R9G/Gmm/OAsFcYqc6B+M+Yb0qZarcyE2yX+OtUZZDZZGWOPmMn4Xk/+VcuYmqk+kycPHE58fSWO0PU4ZGarMrs9UWla0rYarcyUP5XE04bOukwqI8q422n6E37OjSm1vzXy+W3qLRIPhA5XmZmqzMAXbpUlbazNykz6S0kcA9FZZEZlRBmXFQVOdhljZpVnXeUVLNM/DVhqrZk5gXoMVcbQaNmStLk2KzPpVhm8oX2JykjkP1yZzck4m9T9JS+vLJ5+9EQ6Ejq8MdNOZU4sXcjszbQyE/9UFFenTvtxmeZZmZonF/khxNOtEdmUsfi97i95ce6/wLWVlHi9l8yqsVKZU3MP+JG22GJlpj53iD8FVf5q86xMzdFFeWFVocVe8rVD1clveQivxESwNFxpaPK5EhuVOTA4Vilts8XKTD0MIq7QoTLZG1WxMvKBUupcn7EAoOYhI05PFfmjSG0zeLIrzEJlDhbGBsscaasNVmbyc4f4iSpPpqIyAnnuv9jfTf7b1Jz/F5tX5kssXEpaue+8Hv3KHJzYXNonbbfBykx/7pA+UeWGGSojEE+u5Yat5IuZitMS4oBZof0gjBtqvZdJj3ZlbF7HLElbbrAy03+kdM6gMtkbVa8y8p2IBf9s8h+n3lJS8Zqu0NiVVLcyn2qYdmUOj6lMLoXKSIeHysU/ldlOfs1Gwe+cvMys3jEjXleV2g/Cx3Y3/a9dmVuzoZE2u4vKSCcsldsyqcx24u4pep4XLyCqDZmJD0AotrhcOKuaW09bmoHK3DkxuN+lbe6iMtK5k8pkb1S1XSUv3y166MoL3Gp9c8Q/idYaiO7eMWOjMre35yqrlbaRtpjK3FKZARtVbVeJFxOFb1kRb9ap9VRi8dxWbAxF+KZSGTWnxjojbS+VuaUyAzaq2q4Sz/KFT3LigwcqrbESH7NT7mkMwkcrvWNWj53KWOuMtLVdVEYafTH6jl2LG1Xr1CI/jrnwnQPy/H+deVjx61Lw7sjt6w6ojKpDQ/Mz0rZ2URmFj5RRmW30LyXENW51fk1qPoJ/+2m1u1fM2KqMpYf/S1tKZcp8pIzKbCOe44tPi4j369SZmJFObSXP9cIfoeAnm2StMnYemyltKJUp85EyKrONuHOK360hDpnVmZiRtqLkem7haCj4ySaZq4yZF2NLm0llynykjMpsIU7LVLhdRXxhRI0BC3FHlBy3ozIeg5W5PTfxYDNpK6lMmY+UUZktxGmZCrfei/uixndHHLczcZbpg8XK3B5YGDWTNpLKlPlIGZXZwsLUu3jU1LhhRHrVTYcvE1NjsjJKT5T3SZtIZcp8pIzKbCHeLVPjJ7z0ALEa7w2VzmwdvhhZjdHKGLg9VtpCKlPmI2VUJk28FbHKT3jN5V1rJh8n3imrldF/1Y+0gVSmzEfKqEya+Aer8hNe3Bnlp//F3NZ7AQHEyuzy5dg/Ojq6Xlweyq8hj9DOjLR9VKbMR8qoTJo4+V/lJ7x42JT/8oibwOR/PUUrc+/o+FJc3hhSzoy0eVSmzEfKqEya+KjMKoeteCFR8OEur4m5Lb4FeKNSZZb2ry6HXdToLgGQto7KlPlIGZVJ03sOsUf6ope/opL+Hv29FllRxcosnQ0KjWpmpI2jMmU+UkZl0qQ570rrd/Xffied2Lp7YqWmypW5c5W/4OBA89Wl0sZRmTIfKZtnZao80kIcqqp0ctW/kpDOMiwxq6h+Ze4uaMTB47VTxWdnSttGZcp8pGyelbEx7V7p8U3i+zqLbwELmQ3RqMzdlyH3ekbx1ilp06hMmY+UUZkk8exeftrd0V/hJW2AhceLdEOnMndfB+m3Rt1vRYS9w5TKrJisjPRAkzqVMfEEsSXt7RCHDqlMRVqV2dsXH7i0ojY1Y+8wpTIrJisjfpFsVKbW10najtL3RIoHrpn3WPVArTIZK9odtRWH0oZRmTIfKaMy47eixkbkbEjpvWHywO2WYmX2zrJGzbSm6aTtojJlPlI2z8pUOV6ozGv6yw9wT7MyeZk5UHoUhLRdVKbMR8pMVka8D6zK8SI9YKPaXSLSNFXpB3voL6XGPdXK5GVGaZ2ZtFlUpsxHykxWRtymKseLtBHVKiP9jUpviPbnY5NuZfIyo7McxN5WUZmVeVamyiW5tBHVng2ofZbX/nxsUq6M/HZutSNC2ioqU+YjZRYrIx/HVTZD2ohqk5yXIArAAAARc0lEQVTSvAiV6Yl2ZeTXc98qXczY2ygqs2KxMuKOqrJN4l0i1Soj7Y/Sz1OT5oV4U2ZN6pWRX1Su9MND2igqU+YjZRYrI/5YqjLdLP65qt3krH3gaK9xwyb9yuxnTM1oXMzY2yYqs2KxMjYeyWzg7WG5W1L486mMJfqVkZe267zQTNomKlPmI2UWKyM+ALbKIUxl1qiMJQYqI2+DyvMgpE2iMmU+UmaxMjZu/acya1TGEguVyVhnpvDQTGmTqEyZj5RZrIx4U2aVI9hOZcSvT+GPpzKWWKiMPNxwe1phKwLSJlGZMh8ps1gZcZOqHC5UZo3KWGKiMhkXM/UfzSxtEZUp85Eyg5WRFzJXuSmTyqxRGUtMVCZjZqbSO/42SFtEZcp8pMxgZeS7vqpshqHn3SvvDypjiY3KyF/S+kNm0hZRmTIfKTNYGXGT6jyd0dCfS3lLqIwlNiojvqW70ojDJmmDqEyZj5QZrIz4Napzr7mdP5f2llAZS4xURp7/r77KTNogKlPmI2UGKyP+SqpzVrPz59LeEipjiZHKyHdmVn/wkLRBVKbMR8rsVeapuEWl30C8YufPpb0lVMYSI5WRV4KWfrze4C2iMmU+UmavMvKPpDoDvnZm/7UPHCpjiZXKyM/MrL2WWdoeKlPmI2X2KiM9AbjWFtlZyax94FAZS6xU5lrajtvjOhvyhrQ9VKbMR8rsVUZ6EXKtbxGVWZN+tVKZmqxURr6trfZxIW0PlSnzkTJzlRFf61Lr4BXnh6odtOK9CYU/XzpGqExNViojT8zUfsmMtD1UpsxHysxVRp6WqTP5b+igFf9Gyp9PZWoyUxlx0KH29L+0PVSmzEfKzFVGnpapdbeXtB1U5jWNd4n0y0xl5On/ShuyJm0OlVH4ozjmKiP+Qqr25AppQ6pNbkrhLf0sBOkYUXn9brfMVEY+dVReZCZtDpUp85Eya5WR75ap9stZuju02kCRdF4pfVqhMpaYqYz8KLPKp3Vjm7NHZdasVUY+dKtdQphZwKtdGWmqjMrUZKYy8iKzys+YkTaHypT5SJm1ysiDvdUewid9nc1cVJV+lId04NZ5eilWZlSZystCpM2hMmU+UmasMvI65noPFJeCV+0nvLRLSn+ZTR643TJTGXkpM5Wp/80x+WU1Vhl5wKzegiZp19T6CS9OVZX+MosbUPjzsWlGlan8IjNpc6hMmY+UGauMPGBW624Z/QXEa+JxU3yXSBtQ731umFNlKk/YSZtDZcp8pMxWZeQBs4pnNCuPyxQfGFX826O+AbhHZcZuD5Up85EyW5WRn8BX8aUVVh5kJv6Jiq+HkE5sVKYiO5U5NbMlK9LmUJkyHymzVRnxuK26OFLalkprqsXTivoW8IiZiuxUxs6WrEibQ2XKfKTMVGXktZFVXyYubUulk6uU3vKrEKSHD1CZiuyc2+1syYq0OVSmzEfKTFVGfpd41VsztO+GfE3aJ+U3g5v/DbFzbrezJSvS5lCZMh8ps1QZ+ekyde8mlqJX55mz4mFT/kpCuvmf2zIrsnNulzaEylCZFUuVkbel6oCZgWn3JXFFRPnpIZNHbq+ozNjtoTJlPlJmqDL70pNUah+2+jeqLIm3EFX48kibUPsN7z2bUWUqLgjN2R4qU+YjZYYqk3EpU/dN4uo33TviujsD21DvVlnMqDI8YUbapCY+UmanMhmXMgeVbzKXtqjG91lMXY1JEZYy22GmMjwtU0RlVuxUJuNSpvZLGfXvVMl4sluNncIiMzuoTIq0OVSmzEfKzFQm41Km+vC/uHMqjBSJq7trLLuTFpnVfsN7z8xURn5QR90Bbiqj9JEyM5XJuJSpvmBWOrnWeOisOC1TI71nFjYCjpnKSPfq8q5MKvOalcpk3CtT+6dRxsM7y7/sRjy/17mMkC40K78VsWdmKiNuCJWhMitWKiMfshrDMufSNhW/Y0YclqizWlT681Res9ozM5WRh7grbciatDlURuGP4hipjDg2dauykEkcFCj+G17sXJ2rCOkwYWKmGiuVEa+yqQyVec1GZfblhzGrvCtLjF/pqSJ5ILHOjIh47DIxU4uVysiT/7VXHkrbQ2XKfKTMRmXkicT6y5iX5LeqFR4yE7/KlS4ixB1R8ELzaLFVuQ+2yUpl5Nfa1v7GSttDZcp8pMxEZTKe+F/5EWZr4le68ElOHDCr9U2WNqTgRZ1wiJb7YJusVEaelqn9A0DaHipT5iNlFiqTc6uMyqVMxrVE2VVm8th3rXV3ik8OFe4YKva5RhmpTMZMau2zurXtoTJrFiojX3vfKl3KZJzmi96YKb9wp9ZklXjwlluFsP202t1bB4xURj40q0+kSttDZcp8pMxAZTLux9S6lFF+t7l8kVdvBbG0KeUu6vT2v0k2KpMx/lD+ZrKAtEFUpsxHyvQrkzUpo3Qpk7MuoeCWic8wq3ijqnjBWWqVmXA5qfXzQ42NysiHZv17qKQNojJlPlKmXpmznEkZvYf+ykNmBU9z8vrueoMSak/tFKbGWGMWqlKZjFsPqj8PQtogKlPmI2XaldkXV1Et1X7k/wb561TsYkb+vVjx56K4lrnU30i4iKp/6lBmojIZlzL1b6GSNojKlPlImXJl8iKj+Zgs+eazYhczcuBqPtlNHDIrdFUhXOvq/f5QYqIyGZcy9R8HIW0RlSnzkTLlymSsVLnVXUeU8RjPQhcz8u/Fql9kcXPKzPYKK2arTzGrs1CZnEuZ+hNm0hZRmTIfKdOtTF5kdEdF1O5xln8vVv0iy89BKHJlJez+7ib/LVQm6wa3+m/plraIypT5SJlqZTIjo3sm0br9LOP3Yt2Rb/GvVeK6QrqUrP42CHUGKpPzQCiFoUxpi6hMmY+UaVYmMzKKU/+OfE1RYkQv4/di5VtF5CXnBabPpONTa4W7Hv3KZN17oPAuCGmTqEyZj5TpVWY/45UyTv1Lb1/GXaMFTq8Zvxdr/44Xczv97wGptf1Ny+hXJmu8TONbK20SlSnzkTK1ymSuLjPwgqyMb9XB5D+pM34vVj/DysvtJn9DtXR4VngltjXqlcn6dajxwiFpm6hMmY+UaVXmLOeNMkva42V7WSN7U3+zc164U/1+RHn+f+qZoqdS4Dt8rY12ZfLGuTXyL20TlSnzkTKlyhxnXXUvaY+X7WUtZp76lJ8xXqaQX/kEM/EMlbS+r8MBM+3K5CxivtWZL5O2icqU+UiZTmWyFqk4JoZEcn6+Tfqr2ugLqjNyO+lWibtB8W5dNbqVyYyMyjNMpY2iMmU+UqZRmbPcKZm738b642V7eRczpxNuac6z3VRGEjPe0TBhbeUJMRNHR2WqlcmMjM4dbvY2isqsKFTmOnu07PbAyLh7zsXMdINFWQsjVJ4SmbMmYbozv3g+7e+WzD3dyuSOQeiMZEpbRWXKfKSsemXOchcwL1m5506chV6a7JyX81Y3pUURGX+8yU5yctq7e1Lmkl5l9jNvcNP63to7XKjMSuXK7Ge9smzNxKSMk7XZE11eZH2XlR54n3ND3kS1lQdnunuBmaNWmfyBbqVFGdJmUZkyHymrW5n8pWVLhs4iOSuLJ/oJlxUZtcVVOVs3yZx8xgxAl5cyapUZMNCt9Iext1lUZqVmZY5z75FZsTHz/1retOcEmckblVBb352zEGKK3ZCxvw39CKlJpzJPBwx0a/1hpO2iMmU+UlavMgMbU+B++p3kfct2Pr/mRUbxBJs1AbzzbsiJep+XMiqVGTbQrfXFtXfAUJmVSpXZvx7YGDPLy9ayfsTvPCmROb+qGOC8p1jtOG2Uc1JTf/KQkvqV2V8MGuhWe0e2tGFUpsxHyqpU5ih7cco9Y5HJXABwd/LbYZwv9wGiqu+6zxs73KW2eWuZbF3q1lO7MgMbM+mNY8NIW0ZlynykrHxlzi6HXsYsWVnDvCFzic356D7mPttN89Whe7ljh+Nn1fLWMqmWVlPdylwN/oGoN5Bpb8uozErhyhyNSozJyGTdkb90MHKNlfzI49eUL/Oybh662w0jVyjkrWXq8QlmKxUrc3Uy7DJmSbH+0qZRmTIfKStYmbPri+EH6YrFyAzIwOGI0Zz8RTzqv+Jz98OYwcPc3dDp1P9ercrsHy2G3D79huZ1tr1jhsqslKnM0fHlqGP0NZuRybsp3zlYDDzBDljEY2ABb+7f9mDoHzJ7DsDO/brVla7M2dH14nDcCITywlBp46hMmY+UTVuZo6PjxeXoQ/S1A7O/U/PuzXROB51gB9ytauB9O7ljZsN3Q+7+NXUrVWViZQ4Ox8v9u6aofnXtbRyVWZErk3uAjh0dC1lbwrzpbMC/4/Q681Q4bJW3iQTnvJlgvRtyO7M/4IYqw4dIcTuXoCDdQQhp66hMmY+UDbrdqobxS7RqyH3yuXNwkvFvORs2w6o+KbOS/4Kgu91wmbMbLgfsBqsjqlUYrozyM7KlzaMyZT5SZq0y1sdChpxe75xuP8MOXuVt5ln3w85158JuuM5/45ClnaDCbmW0/y7S9lGZMh8pM1YZ7QNVlr0CYO3gYnEUSef+0WL4Ejw7DR4wRbV1N+wdXZ8M/K+ysxNUmK2M+sMYpA2kMmU+UmarMjMYCsl6xdgDB4cni8XVkXO1WJyMm8WydH7NvXvId3ixWFyvdsPR9WJxOGJnWlj+oMlqZfQPTmkLqUyZj5RZqsyp6SmZtXGZmYKtdRE5r5ppficoMFoZA6MQ0iZSmTIfKTNUmV2eAFZT3vMip2ft/DpoJUSrO6E+m5UxEBkqo/SRMjOVGftcFgXjBot23kHmzq8amVF7sY4ZJitj4i5ZaSOpTJmPlFmpzJiHsqjRyIy9yGhkZgYTd6VZrIyNP4u0lVSmzEfKbFRmRhcyTv3MWIxM9cwMfmJNi+xVxsqxKW0nlSnzkTITlZnVhYxTewmA1YURVTNj5Wymy1xlDq3Mp0obSmXKfKTMQGVO5zjWXjcz+qtEUypmhsg41ipj5GkUe1RG6yNl6pUZ/PhiI/Je6DgNy6vvrmoNHtotbV22KmPpgVDStlKZMh8p067MyewGy96otuvs/FqMyX3D544sl7YqU5UxdWhKG0tlynykTLcy85uQ2VTnZ/zYd05WU2XwcGbLQwoyVBljX19pc6lMmY+UaVbm0MRT7HeQ94b63Zzb+iZHDXyE6HCncz9SJmSmMub+KNIGU5kyHynTq0zOY/Gt2y9+fjU1JJFU+KqO0bINRioz7P10VUibTGXKfKRMqTIHlzP4iZ7jqOj51dzPxZSnBc995ocM6zJRGYONoTJaHylTqczpcTs/TkuuNZvT8rvrUrnlQsZnoDKHFhtDZbQ+Ula/Mgcnc/mBnumo0CKrw3kNKT4d/OadHLO5mqtGuzJZb4BVIW05lSnzkbLalblo6DLmjUWB3/EmxyS2mz63B/OYlqpKtzKWv7/StlOZMh8pq1oZy4foTiYfNpvp6XXiYbPLRg+XnShWxvj3V9p8KlPmI2XVKnN6cmX6EN3R0yk7M9fnIdzldsLLuhnfsFuSUmVm8P2V/glUpsxHyqpU5uDi2upY7nSenkx0gj2dbWOW9heTjJsd0JgEhcqcnhzP4a8h/TOoTJmPlBWvzPlJB4VZmeQEez6/+ZjQ8c43q847tGXVrcz5xeJoLn8L6d9CZcp8pKxgZQ4OL697WyF0tdtCK7vrd4Y52+m67oIbZLaoU5mDw8PF4mheR6P0b6IyZT5SVqIyh4cni+PZ/AKa2P7oX/IHJy2dXcf29vx6DoMzio4XZR0fHc30uyv9y+ofWE+lTWriI2VHuQdfjuu7A5RzxF1oLgb/lD9tKjErVydDRxBJDADkOVocZpfmtN3FEWfXF7mlOT2xvU4WAKw5O76UUnN6uLhq/ef706vFxfZRxIMO9gIAFHJ0tVhcHPq5OT08vJjd5Or/G2VAgFOcXZSDQxAtGEbwDN4oGAWjYBSMglEwCkbBKBgFo2AUDAAAAFCZMt867vBhAAAAAElFTkSuQmCC",background_position:"right",background_position_offset:"20px",height:"100px",width:"150px"}};var cat=["chartCanvas"];function dat(t,n){if(t&1&&Oe(0,"bd-chart-option-watermark",2),t&2){let e=V();B("watermarkOptions",e.watermarkOptions)}}var Zbe=(()=>{class t{constructor(){this.canvasId="canvas",this.watermarkOptions=LP,this.chartChange=new yt,El.register(...$be)}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 El(e,this.chartConfig),this.chartChange.emit(this._chart)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-chart-canvas"]],viewQuery:function(i,o){if(i&1&&Qi(cat,7),i&2){let r;Je(r=et())&&(o.chartCanvas=r.first)}},inputs:{canvasId:"canvasId",chartConfig:"chartConfig",watermarkOptions:"watermarkOptions"},outputs:{chartChange:"chartChange"},features:[In],decls:4,vars:2,consts:[["chartCanvas",""],[1,"chart-container"],[3,"watermarkOptions"],[3,"contextmenu","id"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",1),Lt(1,dat,1,1,"bd-chart-option-watermark",2),K(2,"canvas",3,0),Qe("contextmenu",function(p){return Ee(r),Ae(p.preventDefault())}),Z()()}i&2&&(L(),Ft(o.watermarkOptions.enabled?1:-1),L(),B("id",o.canvasId))},dependencies:[Wbe],styles:[".chart-container[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"]})}}return t})();var Ybe=(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})(),NP={toTextLines:function(t){var n=[],e;for(t=[].concat(t);t.length;)e=t.pop(),typeof e=="string"?n.unshift.apply(n,e.split(` `)):Array.isArray(e)?t.push.apply(t,e):Fr(t)||n.unshift(""+e);return n},textSize:function(t,n,e){var i=[].concat(n),o=i.length,r=t.font,a=0,p;for(t.font=e.string,p=0;pe.right&&(i|=Jbe),ne.bottom&&(i|=exe),i}function hat(t,n){for(var e=t.x0,i=t.y0,o=t.x1,r=t.y1,a=yU(e,i,n),p=yU(o,r,n),f,x,I;!(!(a|p)||a&p);)f=a||p,f&txe?(x=e+(o-e)*(n.top-i)/(r-i),I=n.top):f&exe?(x=e+(o-e)*(n.bottom-i)/(r-i),I=n.bottom):f&Jbe?(I=i+(r-i)*(n.right-e)/(o-e),x=n.right):f&Xbe&&(I=i+(r-i)*(n.left-e)/(o-e),x=n.left),f===a?(e=x,i=I,a=yU(e,i,n)):(o=x,r=I,p=yU(o,r,n));return{x0:e,x1:o,y0:i,y1:r}}function vU(t,n){var e=n.anchor,i=t,o,r;return n.clamp&&(i=hat(i,n.area)),e==="start"?(o=i.x0,r=i.y0):e==="end"?(o=i.x1,r=i.y1):(o=(i.x0+i.x1)/2,r=(i.y0+i.y1)/2),uat(o,r,t.vx,t.vy,n.align)}var bU={arc:function(t,n){var e=(t.startAngle+t.endAngle)/2,i=Math.cos(e),o=Math.sin(e),r=t.innerRadius,a=t.outerRadius;return vU({x0:t.x+i*r,y0:t.y+o*r,x1:t.x+i*a,y1:t.y+o*a,vx:i,vy:o},n)},point:function(t,n){var e=mX(t,n.origin),i=e.x*t.options.radius,o=e.y*t.options.radius;return vU({x0:t.x-i,y0:t.y-o,x1:t.x+i,y1:t.y+o,vx:e.x,vy:e.y},n)},bar:function(t,n){var e=mX(t,n.origin),i=t.x,o=t.y,r=0,a=0;return t.horizontal?(i=Math.min(t.x,t.base),r=Math.abs(t.base-t.x)):(o=Math.min(t.y,t.base),a=Math.abs(t.base-t.y)),vU({x0:i,y0:o+a,x1:i+r,y1:o,vx:e.x,vy:e.y},n)},fallback:function(t,n){var e=mX(t,n.origin);return vU({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:e.x,vy:e.y},n)}},Y0=NP.rasterize;function mat(t){var n=t.borderWidth||0,e=t.padding,i=t.size.height,o=t.size.width,r=-o/2,a=-i/2;return{frame:{x:r-e.left-n,y:a-e.top-n,w:o+e.width+n*2,h:i+e.height+n*2},text:{x:r,y:a,w:o,h:i}}}function fat(t,n){var e=n.chart.getDatasetMeta(n.datasetIndex).vScale;if(!e)return null;if(e.xCenter!==void 0&&e.yCenter!==void 0)return{x:e.xCenter,y:e.yCenter};var i=e.getBasePixel();return t.horizontal?{x:i,y:null}:{x:null,y:i}}function gat(t){return t instanceof kP?bU.arc:t instanceof pX?bU.point:t instanceof MP?bU.bar:bU.fallback}function _at(t,n,e,i,o,r){var a=Math.PI/2;if(r){var p=Math.min(r,o/2,i/2),f=n+p,x=e+p,I=n+i-p,D=e+o-p;t.moveTo(n,x),fi.x+i.w+e*2||t.y>i.y+i.h+e*2)},intersects:function(t){var n=this._points(),e=t._points(),i=[xU(n[0],n[1]),xU(n[0],n[3])],o,r,a;for(this._rotation!==t._rotation&&i.push(xU(e[0],e[1]),xU(e[0],e[3])),o=0;o=0;--e)for(o=t[e].$layout,i=e-1;i>=0&&o._visible;--i)r=t[i].$layout,r._visible&&o._box.intersects(r._box)&&n(o,r);return t}function Iat(t){var n,e,i,o,r,a,p;for(n=0,e=t.length;nf.getProps([x],!0)[x]}),r=i.geometry(),a=oxe(p,i.model(),r),o._box.update(a,r,i.rotation()));return Sat(t,function(f,x){var I=f._hidable,D=x._hidable;I&&D||D?x._visible=!1:I&&(f._visible=!1)})}var BP={prepare:function(t){var n=[],e,i,o,r,a;for(e=0,o=t.length;e=0;--e)if(i=t[e].$layout,i&&i._visible&&i._box.contains(n))return t[e];return null},draw:function(t,n){var e,i,o,r,a,p;for(e=0,i=n.length;e{class t{constructor(e){this._authService=e,this.canvasId=null,this.watermarkOptions=LP,this._authService.authentication$.subscribe(i=>{i?this.watermarkOptions=LP:this.watermarkOptions=Kbe})}static{this.\u0275fac=function(i){return new(i||t)(rt(Hg))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-canvas-watermarked"]],inputs:{canvasId:"canvasId",chartConfig:"chartConfig"},decls:1,vars:3,consts:[[3,"canvasId","chartConfig","watermarkOptions"]],template:function(i,o){i&1&&Oe(0,"bd-chart-canvas",0),i&2&&B("canvasId",o.canvasId)("chartConfig",o.chartConfig)("watermarkOptions",o.watermarkOptions)},dependencies:[Zbe],encapsulation:2})}}return t})();var sxe=(()=>{class t{constructor(e,i,o){this._costDepartmentPipe=e,this._currencyPipe=i,this._percentPipe=o}ngOnInit(){this.chartConfiguration=this._initDepartmentChart(this.drgData)}_initDepartmentChart(e){let i=this._percentPipe,o=this._currencyPipe,r=this._costDepartmentPipe,a=e.costTable.departments.map(I=>zW[I]),p=Object.keys(e.costTable.departmentSums).map(I=>e.costTable.departmentSums[I]).reduce((I,D)=>I+D,0),f={datasets:[{data:e.costTable.departments.map(I=>e.costTable.departmentSums[I]),backgroundColor:a,borderColor:a}],labels:e.costTable.departments},x={responsive:!0,aspectRatio:5/3,plugins:{legend:{position:"bottom",labels:{generateLabels:()=>{let I=[];return e.costTable.departments.forEach((D,P)=>{let R=e.costTable.departments[P],j=this._costDepartmentPipe.transform(R),$=zW[R],W={datasetIndex:P,text:j,fillStyle:$,strokeStyle:$};I.push(W)}),I}}},tooltip:Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(I){let D=r.transform(I.label),P=o.transform(I.raw,"EUR");return`${D}: ${P}`},title(){return""}})),datalabels:{formatter:I=>i.transform(I/p),color:"#FFFFFF",display:I=>I.dataset.data[I.dataIndex]/p*100>5}}};return{type:"pie",data:f,options:x,plugins:[mA]}}static{this.\u0275fac=function(i){return new(i||t)(rt(u6),rt(Su),rt(wu))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-distribution-departments"]],inputs:{drgData:"drgData"},features:[Pi([Su,wu,u6])],decls:5,vars:1,consts:[[1,"flex","flex-col","gap-6"],[1,"mat-title"],[3,"chartConfig"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"span",1),Ce(2,"Kostenstellen"),Z(),K(3,"div"),Oe(4,"ays-code-browser-canvas-watermarked",2),Z()()),i&2&&(L(4),B("chartConfig",o.chartConfiguration))},dependencies:[Kh],encapsulation:2})}}return t})();var axe=(()=>{class t{constructor(e,i,o){this._costSectionPipe=e,this._currencyPipe=i,this._percentPipe=o}ngOnInit(){this.chartConfiguration=this._initSectionChart(this.drgData)}_initSectionChart(e){let i=this._percentPipe,o=this._currencyPipe,r=this._costSectionPipe,a=Zp.map(I=>BW[I]),p=Object.keys(e.costTable.sectionSums).map(I=>e.costTable.sectionSums[I]).reduce((I,D)=>I+D,0),f={datasets:[{data:Zp.map(I=>e.costTable.sectionSums[I]),backgroundColor:a,borderColor:a}],labels:Zp},x={responsive:!0,aspectRatio:5/3,plugins:{legend:{position:"bottom",labels:{generateLabels:()=>{let I=[];return Zp.forEach((D,P)=>{let R=this._costSectionPipe.transform(D),j=BW[D],$={datasetIndex:P,text:R,fillStyle:j,strokeStyle:j};I.push($)}),I}}},tooltip:Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(I){let D=r.transform(I.label),P=o.transform(I.raw,"EUR");return`${D}: ${P}`},title(){return""}})),datalabels:{formatter:I=>i.transform(I/p),color:"#FFFFFF",display:I=>I.dataset.data[I.dataIndex]/p*100>5}}};return{type:"pie",data:f,options:x,plugins:[mA]}}static{this.\u0275fac=function(i){return new(i||t)(rt(p6),rt(Su),rt(wu))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-distribution-sections"]],inputs:{drgData:"drgData"},features:[Pi([Su,wu,p6])],decls:5,vars:1,consts:[[1,"flex","flex-col","gap-6"],[1,"mat-title"],[3,"chartConfig"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"span",1),Ce(2,"Kostenarten"),Z(),K(3,"div"),Oe(4,"ays-code-browser-canvas-watermarked",2),Z()()),i&2&&(L(4),B("chartConfig",o.chartConfiguration))},dependencies:[Kh],encapsulation:2})}}return t})();var lxe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-distribution"]],inputs:{drgData:"drgData"},decls:5,vars:2,consts:[[1,"flex","flex-col","md:flex-row","gap-0","md:gap-6"],[1,"flex-1"],[3,"drgData"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1),Oe(2,"ays-code-browser-result-distribution-sections",2),Z(),K(3,"div",1),Oe(4,"ays-code-browser-result-distribution-departments",2),Z()()),i&2&&(L(2),B("drgData",o.drgData),L(2),B("drgData",o.drgData))},dependencies:[axe,sxe],encapsulation:2})}}return t})();function Rat(t,n){if(t&1&&Oe(0,"ays-code-drg-inek-table",5),t&2){let e=V();B("inekTable",e.proceedsTable)("exportConfig",e.exportConfig)}}function Oat(t,n){t&1&&Oe(0,"bd-message-empty",6)}var cxe=(()=>{class t{constructor(e){this._drgCodeService=e,this.globalBaseRate={year:dp,state:Vu[0]},this.loading$=new mo(1),this.baseRate=this.globalBaseRate}onBaseRateSubmit(e){this.baseRate=e,this.loading$.next(Cn.LOADING);let i=new Mr().append("year",this.year.toString());this._drgCodeService.proceedsTable(this.code.name,this.globalBaseRate,i).subscribe({next:o=>{this.proceedsTable=o,this.loading$.next(Cn.SUCCESS)},error:()=>this.loading$.next(Cn.ERROR)})}static{this.\u0275fac=function(i){return new(i||t)(rt(Zz))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-drg-proceeds-table"]],inputs:{year:"year",code:"code",exportConfig:"exportConfig"},decls:9,vars:4,consts:[["successTpl",""],["errorTpl",""],[1,"flex","flex-col","gap-6"],[3,"baseRateChange","baseRate"],[3,"loadItem","successTemplate","errorTemplate"],[3,"inekTable","exportConfig"],["message","Die InEK Erl\xF6stabelle f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",2)(1,"div")(2,"ays-drg-base-rate",3),Qe("baseRateChange",function(p){return Ee(r),Ae(o.onBaseRateSubmit(p))}),Z()(),K(3,"div"),Oe(4,"bd-loader",4),Z()(),le(5,Rat,1,2,"ng-template",null,0,Hi)(7,Oat,1,0,"ng-template",null,1,Hi)}if(i&2){let r=un(6),a=un(8);L(2),B("baseRate",o.globalBaseRate),L(2),B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[m6,mr,d6,Ca],encapsulation:2})}}return t})();var Ob=class extends Hd{constructor(n,e=!0){super(),this.mainDiagnoses=n,this.showPercentage=e}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getFields(){return this.showPercentage?["Type","Name","Prozent"]:["Type","Name"]}_getData(){return this.mainDiagnoses.sort((n,e)=>e.percentage-n.percentage).map(n=>this.showPercentage?[{value:n.code.codingSystem,type:"string"},{value:n.code.name,type:"string"},{value:n.percentage,type:"number"}]:[{value:n.code.codingSystem,type:"string"},{value:n.code.name,type:"string"}])}};var Pa=gt(ve({},FC),{authenticationStrategy:"contact",authenticationStrategyConfig:{formId:"2af0174c-517f-4bfd-b87f-fe728f532403",portalId:"5251653"},form:{defaultLabels:["Code-Browser"],availableExportTypes:["csv","xlsx"]}});function Pat(t,n){t&1&&(K(0,"th"),Ce(1,"Anteil"),Z())}function Lat(t,n){if(t&1&&(K(0,"tr")(1,"th"),Ce(2,"Code"),Z(),Lt(3,Pat,2,0,"th"),Z()),t&2){let e=V(2);L(3),Ft(e.showPercentage?3:-1)}}function Fat(t,n){if(t&1&&(K(0,"td"),Ce(1),el(2,"percent"),Z()),t&2){let e=V().$implicit;L(),Di(Ec(2,1,e.percentage,"1.0-0"))}}function Nat(t,n){if(t&1&&(K(0,"tr")(1,"td"),Oe(2,"ays-code-info",5),Z(),Lt(3,Fat,3,4,"td"),Z()),t&2){let e=n.$implicit,i=V(2);L(2),B("codingSystem",i.codingSystem)("name",e.code.name)("options",i.codeInfoOptions),L(),Ft(i.showPercentage?3:-1)}}function Bat(t,n){if(t&1&&(K(0,"p-table",1),le(1,Lat,4,1,"ng-template",3)(2,Nat,4,4,"ng-template",4),Z()),t&2){let e=V();B("value",e.codeReferences)("paginator",!0)("showCurrentPageReport",!0)("pageLinks",!1)("rows",10)("sortOrder",-1)("defaultSortOrder",-1)}}function zat(t,n){t&1&&Oe(0,"bd-message-empty",2)}var fA=(()=>{class t{constructor(){this.showPercentage=!0,this.codeInfoOptions={viewState:"responsive"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-codes"]],inputs:{codeReferences:"codeReferences",codingSystem:"codingSystem",showPercentage:"showPercentage"},decls:3,vars:1,consts:[[1,"result-top-codes"],["currentPageReportTemplate","{first} - {last} von {totalRecords}","sortField","percentage","sortMode","single",3,"value","paginator","showCurrentPageReport","pageLinks","rows","sortOrder","defaultSortOrder"],["message","Keine Ziffern gefunden"],["pTemplate","header"],["pTemplate","body"],[3,"codingSystem","name","options"]],template:function(i,o){i&1&&(K(0,"div",0),Lt(1,Bat,3,7,"p-table",1)(2,zat,1,0,"bd-message-empty",2),Z()),i&2&&(L(),Ft(o.codeReferences&&(o.codeReferences==null?null:o.codeReferences.length)>0?1:2))},dependencies:[gp,sd,Uo,kn,Ca,Hye,wu],encapsulation:2})}}return t})();var Qd=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-export"]],inputs:{data:"data",filename:"filename",exportConfig:"exportConfig"},decls:1,vars:3,consts:[[3,"data","filename","config"]],template:function(i,o){i&1&&Oe(0,"bd-export-as-file",0),i&2&&B("data",o.data)("filename",o.filename)("config",o.exportConfig)},dependencies:[s6],encapsulation:2})}}return t})();var CU=(()=>{class t{constructor(){this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-top-codes-ops"})}),this.showPercentage=!1}ngOnInit(){this.year?this.filename=`${this.code.name}_Prozeduren_${this.year}`:this.filename=`${this.code.name}_Prozeduren`}getProceduresData(){return new Ob(this.procedures,this.showPercentage)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-codes-ops"]],inputs:{year:"year",code:"code",procedures:"procedures"},decls:7,vars:5,consts:[[1,"flex","flex-row","gap-4"],[1,"grow"],[1,"mat-title"],[1,"grow-0"],[3,"data","filename","exportConfig"],["codingSystem","OPS",3,"codeReferences","showPercentage"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"span",2),Ce(3,"Top OPS (Prozeduren)"),Z()(),K(4,"div",3),Oe(5,"ays-code-browser-result-export",4),Z()(),Oe(6,"ays-code-browser-result-top-codes",5)),i&2&&(L(5),B("data",o.getProceduresData())("filename",o.filename)("exportConfig",o.exportConfig),L(),B("codeReferences",o.procedures)("showPercentage",o.showPercentage))},dependencies:[Qd,fA],encapsulation:2})}}return t})();var wU=(()=>{class t{constructor(){this.showPercentage=!0,this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-top-codes-icd"})})}ngOnInit(){this.year?this.filename=`${this.code.name}_Hauptdiagnosen_${this.year}`:this.filename=`${this.code.name}_Hauptdiagnosen`}getMainDiagnosesData(){return new Ob(this.mainDiagnoses,this.showPercentage)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-codes-icd"]],inputs:{year:"year",code:"code",showPercentage:"showPercentage",mainDiagnoses:"mainDiagnoses"},decls:7,vars:5,consts:[[1,"flex","flex-row","gap-4"],[1,"grow"],[1,"mat-title"],[1,"grow-0"],[3,"data","filename","exportConfig"],["codingSystem","ICD-10-GM",3,"codeReferences","showPercentage"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"span",2),Ce(3,"Top ICD (Hauptdiagnosen)"),Z()(),K(4,"div",3),Oe(5,"ays-code-browser-result-export",4),Z()(),Oe(6,"ays-code-browser-result-top-codes",5)),i&2&&(L(5),B("data",o.getMainDiagnosesData())("filename",o.filename)("exportConfig",o.exportConfig),L(),B("codeReferences",o.mainDiagnoses)("showPercentage",o.showPercentage))},dependencies:[Qd,fA],encapsulation:2})}}return t})();var zP=class{constructor(n=""){this.q=n}toHttpParams(){let n=new Mr;return n=n.append("q",this.q),n}};var SU=class{constructor(n){this._environmentService=n}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/administrative_districts/`}casesAll(n){return`${this.index()}cases/${n}/all`}byAdministrativeDistrictId(n){return`${this.index()}${n}`}postalCodes(){return`${this.index()}postal-codes`}centerPoints(){return`${this.index()}center-points`}};var Vat=20,dxe=(()=>{class t{constructor(){this.cache=new LT(Vat)}set(e){this.cache.set(e.id.toString(),e)}get(e){let i=this.cache.get(e.value);if(i)return L0.fromObject(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cf=(()=>{class t{constructor(e,i,o){this._httpClient=e,this._districtCache=i,this._environmentService=o,this._store=new SU(this._environmentService)}find(e=new zP){let i=this._store.index();return this._httpClient.get(i,{params:e.toHttpParams()}).pipe(vi(o=>L0.fromObjectArray(o)))}findAll(e){let i=this._store.index();return this._httpClient.post(i,{administrativeDistrictIds:e.map(o=>o.getNumericValue())}).pipe(vi(o=>{let r={};return Object.keys(o).forEach(a=>r[a]=L0.fromObject(o[a])),r}))}byAdministrativeDistrictId(e){let i=this._districtCache.get(e),o;if(i)o=Ni(i);else{let r=this._store.byAdministrativeDistrictId(e.value);o=this._httpClient.get(r).pipe(vi(a=>L0.fromObject(a)),vi(a=>(this._districtCache.set(a),a)))}return o}findPostalCodes(e){let i=this._store.postalCodes(),o={administrativeDistrictIds:e.map(r=>r.getNumericValue())};return this._httpClient.post(i,o)}findCenterPoint(e){let i=this._store.centerPoints(),o={administrativeDistrictIds:e.map(r=>r.getNumericValue())};return this._httpClient.post(i,o).pipe(vi(r=>{let a=new Map;return Object.entries(r).forEach(p=>{a.set(Ps.createFromString(p[0]),p[1])}),a}))}cases(e,i,o,r){if(!o.every(f=>f.codingSystem===i))return console.error(`type of some codes did not match ${i}, returning empty array !`),Ni([]);let a=this._store.casesAll(i),p={administrativeDistrictIds:e.map(f=>f.getNumericValue()),codes:o,years:r};return this._httpClient.post(a,p).pipe(vi(f=>f.map(x=>({code:Ws.fromObject(x.code),administrativeDistrictId:Ps.createFromNumber(x.administrativeDistrictId),year:parseInt(x.year,10),count:x.count,agmId:x.agmId}))))}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(dxe),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function IU(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 _X(t,n,e,i){i===void 0&&(i={});var o=IU(t),r=H5(o[0]),a=H5(o[1]),p=H5(e),f=q0e(n,i.units),x=Math.asin(Math.sin(a)*Math.cos(f)+Math.cos(a)*Math.sin(f)*Math.cos(p)),I=r+Math.atan2(Math.sin(p)*Math.sin(f)*Math.cos(a),Math.cos(f)-Math.sin(a)*Math.sin(x)),D=RY(I),P=RY(x);return Gg([D,P],i.properties)}function Hat(t,n,e){e===void 0&&(e={});for(var i=e.steps||64,o=e.properties?e.properties:!Array.isArray(t)&&t.type==="Feature"&&t.properties?t.properties:{},r=[],a=0;ar.properties.GEN,messageFnc:(r,a)=>a?a[r.properties.AGS]:null}}},_A=class extends QO{constructor(n,e,i){super(n,e),this.config=e,this._districtService=i}layer(){return gt(ve({},WO),{id:this.config.layerId})}source(){return{sourceId:this.config.sourceId,sourceData:ve({},DY)}}initBounds(){this.bounds=this.data$.asObservable().pipe(Er(()=>console.debug(`[${this.layerControlId}] update bounds`)),wo(n=>{let e=Object.keys(n).map(i=>Ps.createFromString(i));return this._districtService.findCenterPoint(e)}),vi(n=>n.size<3?Array.from(n.values()).map(e=>TU([e.lon,e.lat],15,{units:"kilometers"})):Array.from(n.values()).map(e=>Gg([e.lon,e.lat]))),vi(n=>{let e=nh(n);return $g.fromBbox(N0(e),e)}),vi(n=>n.bounds))}};var hxe=fu(XE()),mxe=fu(pxe());var VP=class{constructor(n){this._environmentService=n}token(){return this._environmentService.load("BD_MAP_ACCESS_TOKEN_MAPBOX")}};function Xat(t,n){t&1&&(K(0,"div",1),Oe(1,"mat-progress-bar",3),Z())}function Jat(t,n){if(t&1&&(K(0,"div",0),Lt(1,Xat,2,0,"div",1),Oe(2,"div",2),Z()),t&2){let e=V();L(),Ft(e.isLoading?1:-1),L(),B("id",e.mapOptions.container)}}function elt(t,n){t&1&&(K(0,"div")(1,"div",4)(2,"div",5)(3,"div",6)(4,"span",7),Ce(5,"Die Karten Funktionen werden von Ihrem Browser nicht unters\xFCtzt."),Z()()()()())}var tlt="mapboxEvent_IsIdle",t_=(()=>{class t{constructor(e,i,o){this._environmentService=e,this._cdr=i,this._zone=o,this.mapOptions=ef,this.mapLoaded=new yt,this.mapClick=new yt,this.isLoading=!1,this.mapSupported=!0,this._loading$=new Ms(!0),this.mapSupported=(0,mxe.supported)(),this._loading$.pipe(Fp()).subscribe(r=>{this.isLoading=r,this._cdr.markForCheck()})}ngOnInit(){let e=new VP(this._environmentService);this.mapOptions=gt(ve({},this.mapOptions),{container:this._randomizeContainerId(this.mapOptions.container),accessToken:e.token()})}ngAfterViewInit(){this.mapSupported&&this._zone.runOutsideAngular(()=>{this.map=new hxe.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(tlt,null)),this._loading$.next(!1)})})}ngOnChanges(e){e.mapOptions&&(this.mapOptions.style&&this.map&&this.map.setStyle(this.mapOptions.style),this.mapOptions.zoom&&this.map&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions.center&&this.map&&this.map.setCenter(this.mapOptions.center))}ngOnDestroy(){this.map&&(this.map.remove(),this.map=null)}_onLoad(){this.map.getLayer("country-label")&&this.map.setLayoutProperty("country-label","text-field",["get","name_de"]),this.mapOptions&&this.mapOptions.zoom&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions&&this.mapOptions.center&&this.map.setCenter(this.mapOptions.center),this.controls={idle$:new xi,clickHandlers:[]},this._initClickHandler()}_initClickHandler(){this.map.on("click",e=>this._onClick(e)),this.map.on("touchstart",e=>this._onClick(e)),this.map.on("touchend",e=>this._onClick(e))}_onClick(e){let i=new W5(e,this.map,this.controls),o=!0;this.controls.clickHandlers.every(r=>{let a=r.onClick(i);return o=a.propagate,a.propagate}),o&&this.mapClick.emit(i)}_randomizeContainerId(e){let i=Math.round(Math.random()*1e4);return e+"-"+i.toString()}static{this.\u0275fac=function(i){return new(i||t)(rt(br),rt(Ho),rt(on))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map"]],inputs:{mapOptions:"mapOptions"},outputs:{mapLoaded:"mapLoaded",mapClick:"mapClick"},features:[In],decls:2,vars:1,consts:[[1,"bd-map-container"],[1,"idle-overlay"],[1,"map",3,"id"],["mode","query"],[1,"flex","flex-row","items-center","justify-center"],[1,"basis-full"],[1,"bd-container"],[1,"mat-caption"]],template:function(i,o){i&1&&Lt(0,Jat,3,2,"div",0)(1,elt,6,0,"div"),i&2&&Ft(o.mapSupported?0:1)},dependencies:[mz,hz],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 yA=class t{static fromObject(n){return new t(n.street,n.postalCode,n.city,n.location,n.note,n.administrativeDistrictId)}constructor(n,e,i,o,r,a){this.street=n,this.postalCode=e,this.city=i,this.location=o,this.note=r,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(...n){return new t(this.street,this.postalCode,this.city,this.location,this.note,this.administrativeDistrictId)}};var Nl=class t{static fromString(n){let e=n.split("_"),i=e[2]?parseInt(e[2],10):void 0;return new t(e[0],e[1],i)}static fromObj(n={}){return new t(n.ik.toString(),n.sn.toString(),n.year)}constructor(n,e,i){this.ik=n,this.sn=e,this.year=i}toString(){let n=null;return this.ik&&this.sn!==null&&this.sn!==void 0&&(n=`${this.ik}_${this.sn}`,this.year&&(n=`${n}_${this.year}`)),n}clone(){return new t(this.ik,this.sn,this.year)}equals(n){return!!this&&!!n&&this.toString()===n.toString()}equalsByIkAndSn(n){return ko.equals(this.ik,n.ik)&&ko.equals(this.sn,n.sn)}};var UP=(function(t){return t.WITH_UNIVERSITIES="WITH_UNIVERSITIES",t.WITHOUT_UNIVERSITIES="WITHOUT_UNIVERSITIES",t.ONLY_UNIVERSITIES="ONLY_UNIVERSITIES",t})(UP||{}),N7i={[UP.WITH_UNIVERSITIES]:"Mit Universit\xE4ts-Kliniken",[UP.WITHOUT_UNIVERSITIES]:"Ohne Universit\xE4ts-Kliniken",[UP.ONLY_UNIVERSITIES]:"Nur Universit\xE4ts-Kliniken"};function fxe(t,n){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;let e=document.implementation.createHTMLDocument(),i=e.createElement("base"),o=e.createElement("a");return e.head.appendChild(i),e.body.appendChild(o),n&&(i.href=n),o.href=t,o.href}var gxe=(()=>{let t=0,n=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${n()}${t}`)})();function df(t){let n=[];for(let e=0,i=t.length;esh||t.height>sh)&&(t.width>sh&&t.height>sh?t.width>t.height?(t.height*=sh/t.width,t.width=sh):(t.width*=sh/t.height,t.height=sh):t.width>sh?(t.height*=sh/t.width,t.width=sh):(t.width*=sh/t.height,t.height=sh))}function bA(t){return new Promise((n,e)=>{let i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>n(i))})},i.onerror=e,i.crossOrigin="anonymous",i.decoding="async",i.src=t})}function olt(t){return tt(this,null,function*(){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(n=>`data:image/svg+xml;charset=utf-8,${n}`)})}function vxe(t,n,e){return tt(this,null,function*(){let i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),r=document.createElementNS(i,"foreignObject");return o.setAttribute("width",`${n}`),o.setAttribute("height",`${e}`),o.setAttribute("viewBox",`0 0 ${n} ${e}`),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("x","0"),r.setAttribute("y","0"),r.setAttribute("externalResourcesRequired","true"),o.appendChild(r),r.appendChild(t),olt(o)})}var Xd=(t,n)=>{if(t instanceof n)return!0;let e=Object.getPrototypeOf(t);return e===null?!1:e.constructor.name===n.name||Xd(e,n)};function rlt(t){let n=t.getPropertyValue("content");return`${t.cssText} content: '${n.replace(/'|"/g,"")}';`}function slt(t,n){return AU(n).map(e=>{let i=t.getPropertyValue(e),o=t.getPropertyPriority(e);return`${e}: ${i}${o?" !important":""};`}).join(" ")}function alt(t,n,e,i){let o=`.${t}:${n}`,r=e.cssText?rlt(e):slt(e,i);return document.createTextNode(`${o}{${r}}`)}function bxe(t,n,e,i){let o=window.getComputedStyle(t,e),r=o.getPropertyValue("content");if(r===""||r==="none")return;let a=gxe();try{n.className=`${n.className} ${a}`}catch{return}let p=document.createElement("style");p.appendChild(alt(a,e,o,i)),n.appendChild(p)}function xxe(t,n,e){bxe(t,n,":before",e),bxe(t,n,":after",e)}var Cxe="application/font-woff",wxe="image/jpeg",llt={woff:Cxe,woff2:Cxe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:wxe,jpeg:wxe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function clt(t){let n=/\.([^./]*?)$/g.exec(t);return n?n[1]:""}function xA(t){let n=clt(t).toLowerCase();return llt[n]||""}function dlt(t){return t.split(/,/)[1]}function HP(t){return t.search(/^(data:)/)!==-1}function SX(t,n){return`data:${n};base64,${t}`}function IX(t,n,e){return tt(this,null,function*(){let i=yield fetch(t,n);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);let o=yield i.blob();return new Promise((r,a)=>{let p=new FileReader;p.onerror=a,p.onloadend=()=>{try{r(e({res:i,result:p.result}))}catch(f){a(f)}},p.readAsDataURL(o)})})}var wX={};function ult(t,n,e){let i=t.replace(/\?.*/,"");return e&&(i=t),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),n?`[${n}]${i}`:i}function CA(t,n,e){return tt(this,null,function*(){let i=ult(t,n,e.includeQueryParams);if(wX[i]!=null)return wX[i];e.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let o;try{let r=yield IX(t,e.fetchRequestInit,({res:a,result:p})=>(n||(n=a.headers.get("Content-Type")||""),dlt(p)));o=SX(r,n)}catch(r){o=e.imagePlaceholder||"";let a=`Failed to fetch resource: ${t}`;r&&(a=typeof r=="string"?r:r.message),a&&console.warn(a)}return wX[i]=o,o})}function plt(t){return tt(this,null,function*(){let n=t.toDataURL();return n==="data:,"?t.cloneNode(!1):bA(n)})}function hlt(t,n){return tt(this,null,function*(){if(t.currentSrc){let r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.clientWidth,r.height=t.clientHeight,a?.drawImage(t,0,0,r.width,r.height);let p=r.toDataURL();return bA(p)}let e=t.poster,i=xA(e),o=yield CA(e,i,n);return bA(o)})}function mlt(t,n){return tt(this,null,function*(){var e;try{if(!((e=t?.contentDocument)===null||e===void 0)&&e.body)return yield jP(t.contentDocument.body,n,!0)}catch{}return t.cloneNode(!1)})}function flt(t,n){return tt(this,null,function*(){return Xd(t,HTMLCanvasElement)?plt(t):Xd(t,HTMLVideoElement)?hlt(t,n):Xd(t,HTMLIFrameElement)?mlt(t,n):t.cloneNode(Sxe(t))})}var glt=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",Sxe=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";function _lt(t,n,e){return tt(this,null,function*(){var i,o;if(Sxe(n))return n;let r=[];return glt(t)&&t.assignedNodes?r=df(t.assignedNodes()):Xd(t,HTMLIFrameElement)&&(!((i=t.contentDocument)===null||i===void 0)&&i.body)?r=df(t.contentDocument.body.childNodes):r=df(((o=t.shadowRoot)!==null&&o!==void 0?o:t).childNodes),r.length===0||Xd(t,HTMLVideoElement)||(yield r.reduce((a,p)=>a.then(()=>jP(p,e)).then(f=>{f&&n.appendChild(f)}),Promise.resolve())),n})}function ylt(t,n,e){let i=n.style;if(!i)return;let o=window.getComputedStyle(t);o.cssText?(i.cssText=o.cssText,i.transformOrigin=o.transformOrigin):AU(e).forEach(r=>{let a=o.getPropertyValue(r);r==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),Xd(t,HTMLIFrameElement)&&r==="display"&&a==="inline"&&(a="block"),r==="d"&&n.getAttribute("d")&&(a=`path(${n.getAttribute("d")})`),i.setProperty(r,a,o.getPropertyPriority(r))})}function vlt(t,n){Xd(t,HTMLTextAreaElement)&&(n.innerHTML=t.value),Xd(t,HTMLInputElement)&&n.setAttribute("value",t.value)}function blt(t,n){if(Xd(t,HTMLSelectElement)){let e=n,i=Array.from(e.children).find(o=>t.value===o.getAttribute("value"));i&&i.setAttribute("selected","")}}function xlt(t,n,e){return Xd(n,Element)&&(ylt(t,n,e),xxe(t,n,e),vlt(t,n),blt(t,n)),n}function Clt(t,n){return tt(this,null,function*(){let e=t.querySelectorAll?t.querySelectorAll("use"):[];if(e.length===0)return t;let i={};for(let r=0;rflt(i,n)).then(i=>_lt(t,i,n)).then(i=>xlt(t,i,n)).then(i=>Clt(i,n))})}var Ixe=/url\((['"]?)([^'"]+?)\1\)/g,wlt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Slt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Ilt(t){let n=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${n})(['"]?\\))`,"g")}function Tlt(t){let n=[];return t.replace(Ixe,(e,i,o)=>(n.push(o),e)),n.filter(e=>!HP(e))}function Elt(t,n,e,i,o){return tt(this,null,function*(){try{let r=e?fxe(n,e):n,a=xA(n),p;if(o){let f=yield o(r);p=SX(f,a)}else p=yield CA(r,a,i);return t.replace(Ilt(n),`$1${p}$3`)}catch{}return t})}function Alt(t,{preferredFontFormat:n}){return n?t.replace(Slt,e=>{for(;;){let[i,,o]=wlt.exec(e)||[];if(!o)return"";if(o===n)return`src: ${i};`}}):t}function TX(t){return t.search(Ixe)!==-1}function DU(t,n,e){return tt(this,null,function*(){if(!TX(t))return t;let i=Alt(t,e);return Tlt(i).reduce((r,a)=>r.then(p=>Elt(p,a,n,e)),Promise.resolve(i))})}function wA(t,n,e){return tt(this,null,function*(){var i;let o=(i=n.style)===null||i===void 0?void 0:i.getPropertyValue(t);if(o){let r=yield DU(o,null,e);return n.style.setProperty(t,r,n.style.getPropertyPriority(t)),!0}return!1})}function Dlt(t,n){return tt(this,null,function*(){(yield wA("background",t,n))||(yield wA("background-image",t,n)),(yield wA("mask",t,n))||(yield wA("-webkit-mask",t,n))||(yield wA("mask-image",t,n))||(yield wA("-webkit-mask-image",t,n))})}function klt(t,n){return tt(this,null,function*(){let e=Xd(t,HTMLImageElement);if(!(e&&!HP(t.src))&&!(Xd(t,SVGImageElement)&&!HP(t.href.baseVal)))return;let i=e?t.src:t.href.baseVal,o=yield CA(i,xA(i),n);yield new Promise((r,a)=>{t.onload=r,t.onerror=n.onImageErrorHandler?(...f)=>{try{r(n.onImageErrorHandler(...f))}catch(x){a(x)}}:a;let p=t;p.decode&&(p.decode=r),p.loading==="lazy"&&(p.loading="eager"),e?(t.srcset="",t.src=o):t.href.baseVal=o})})}function Mlt(t,n){return tt(this,null,function*(){let i=df(t.childNodes).map(o=>EX(o,n));yield Promise.all(i).then(()=>t)})}function EX(t,n){return tt(this,null,function*(){Xd(t,Element)&&(yield Dlt(t,n),yield klt(t,n),yield Mlt(t,n))})}function Txe(t,n){let{style:e}=t;n.backgroundColor&&(e.backgroundColor=n.backgroundColor),n.width&&(e.width=`${n.width}px`),n.height&&(e.height=`${n.height}px`);let i=n.style;return i!=null&&Object.keys(i).forEach(o=>{e[o]=i[o]}),t}var Exe={};function Axe(t){return tt(this,null,function*(){let n=Exe[t];if(n!=null)return n;let i=yield(yield fetch(t)).text();return n={url:t,cssText:i},Exe[t]=n,n})}function Dxe(t,n){return tt(this,null,function*(){let e=t.cssText,i=/url\(["']?([^"')]+)["']?\)/g,r=(e.match(/url\([^)]+\)/g)||[]).map(a=>tt(null,null,function*(){let p=a.replace(i,"$1");return p.startsWith("https://")||(p=new URL(p,t.url).href),IX(p,n.fetchRequestInit,({result:f})=>(e=e.replace(a,`url(${f})`),[a,f]))}));return Promise.all(r).then(()=>e)})}function kxe(t){if(t==null)return[];let n=[],e=/(\/\*[\s\S]*?\*\/)/gi,i=t.replace(e,""),o=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let f=o.exec(i);if(f===null)break;n.push(f[0])}i=i.replace(o,"");let r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",p=new RegExp(a,"gi");for(;;){let f=r.exec(i);if(f===null){if(f=p.exec(i),f===null)break;r.lastIndex=p.lastIndex}else p.lastIndex=r.lastIndex;n.push(f[0])}return n}function Rlt(t,n){return tt(this,null,function*(){let e=[],i=[];return t.forEach(o=>{if("cssRules"in o)try{df(o.cssRules||[]).forEach((r,a)=>{if(r.type===CSSRule.IMPORT_RULE){let p=a+1,f=r.href,x=Axe(f).then(I=>Dxe(I,n)).then(I=>kxe(I).forEach(D=>{try{o.insertRule(D,D.startsWith("@import")?p+=1:o.cssRules.length)}catch(P){console.error("Error inserting rule from remote css",{rule:D,error:P})}})).catch(I=>{console.error("Error loading remote css",I.toString())});i.push(x)}})}catch(r){let a=t.find(p=>p.href==null)||document.styleSheets[0];o.href!=null&&i.push(Axe(o.href).then(p=>Dxe(p,n)).then(p=>kxe(p).forEach(f=>{a.insertRule(f,a.cssRules.length)})).catch(p=>{console.error("Error loading remote stylesheet",p)})),console.error("Error inlining remote css file",r)}}),Promise.all(i).then(()=>(t.forEach(o=>{if("cssRules"in o)try{df(o.cssRules||[]).forEach(r=>{e.push(r)})}catch(r){console.error(`Error while reading CSS rules from ${o.href}`,r)}}),e))})}function Olt(t){return t.filter(n=>n.type===CSSRule.FONT_FACE_RULE).filter(n=>TX(n.style.getPropertyValue("src")))}function Plt(t,n){return tt(this,null,function*(){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");let e=df(t.ownerDocument.styleSheets),i=yield Rlt(e,n);return Olt(i)})}function Mxe(t){return t.trim().replace(/["']/g,"")}function Llt(t){let n=new Set;function e(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(r=>{n.add(Mxe(r))}),Array.from(i.children).forEach(r=>{r instanceof HTMLElement&&e(r)})}return e(t),n}function Rxe(t,n){return tt(this,null,function*(){let e=yield Plt(t,n),i=Llt(t);return(yield Promise.all(e.filter(r=>i.has(Mxe(r.style.fontFamily))).map(r=>{let a=r.parentStyleSheet?r.parentStyleSheet.href:null;return DU(r.cssText,a,n)}))).join(` `)})}function Oxe(t,n){return tt(this,null,function*(){let e=n.fontEmbedCSS!=null?n.fontEmbedCSS:n.skipFonts?null:yield Rxe(t,n);if(e){let i=document.createElement("style"),o=document.createTextNode(e);i.appendChild(o),t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i)}})}function Flt(e){return tt(this,arguments,function*(t,n={}){let{width:i,height:o}=CX(t,n),r=yield jP(t,n,!0);return yield Oxe(r,n),yield EX(r,n),Txe(r,n),yield vxe(r,i,o)})}function Nlt(e){return tt(this,arguments,function*(t,n={}){let{width:i,height:o}=CX(t,n),r=yield Flt(t,n),a=yield bA(r),p=document.createElement("canvas"),f=p.getContext("2d"),x=n.pixelRatio||_xe(),I=n.canvasWidth||i,D=n.canvasHeight||o;return p.width=I*x,p.height=D*x,n.skipAutoScale||yxe(p),p.style.width=`${I}`,p.style.height=`${D}`,n.backgroundColor&&(f.fillStyle=n.backgroundColor,f.fillRect(0,0,p.width,p.height)),f.drawImage(a,0,0,p.width,p.height),p})}function Pxe(e){return tt(this,arguments,function*(t,n={}){return(yield Nlt(t,n)).toDataURL()})}var Blt={format:"image/png",quality:.92,width:void 0,height:void 0,Canvas:void 0,crossOrigin:void 0},zlt=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n={}),new Promise(function(e){n=Object.assign({},Blt,n);var i=n.Canvas?new n.Canvas:window.document.createElement("canvas"),o=n.Image||window.Image,r=t.map(function(p){return new Promise(function(f,x){p.constructor.name!=="Object"&&(p={src:p});var I=new o;I.crossOrigin=n.crossOrigin,I.onerror=function(){return x(new Error("Couldn't load image"))},I.onload=function(){return f(Object.assign({},p,{img:I}))},I.src=p.src})}),a=i.getContext("2d");e(Promise.all(r).then(function(p){var f=function(x){return n[x]||Math.max.apply(Math,p.map(function(I){return I.img[x]}))};return i.width=f("width"),i.height=f("height"),p.forEach(function(x){return a.globalAlpha=x.opacity?x.opacity:1,a.drawImage(x.img,x.x||0,x.y||0)}),n.Canvas&&n.format==="image/jpeg"?new Promise(function(x,I){i.toDataURL(n.format,{quality:n.quality,progressive:!1},function(D,P){if(D){I(D);return}x(P)})}):i.toDataURL(n.format,n.quality)}))})},AX=zlt;var DX="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAD6AAAAAeCAYAAAA49+HuAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3Xd4VNW+PvB3Jp2ShCR0pPfee0Ckd5AmvaiAiARBwaO/c67n3GPDI4qiooJKERGQ3qvSSyjSu0iREiAEEkgh5Pe8i7vHmckkIYF7VXzX8/CAM2uvvfZnrT3+9a6vLSUlJQVqEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPCXF7ApgP6X3wMCkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkYAQUQNdGkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEjoAC6NoIEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJGAEF0LURJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSMAIpBlAT0lJwZ07d5CcnAwfHx94eXk5yPhZYmIivL29zXds7J+UlGT++Pn5me/Y7t69a/ryb35ujcMx+Bn/22azmT9s/JxjWf2szz2tF8e12+2Oa3gdm6+vr8t801pr9ucYbJzbw270oweN+G/O1Xoe+qT3bA97Llkd79dff8WxY8dQtGhR8+dhNXqwWfvkYY37Rx5n165duHnzJqpVq4agoKA/8lQdczt48CCioqIe+pz53vE9/d9sfPf4O8L37lFo/G10/h1+FJ5JzyABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQwB9PwGMAncHszZu2Y/709Ui4lYLaTUqh/ZPN4e1tx5E9m5G8fz6ypcTiWnA1FKnXCTmCgrFyy2psurgZSXeTUCG4AjrWbodsfgHYvXIzolccQnLiHQQ2LI4aXZ/AnbspWL9iK47uP4cUpKBGw1J4onlD3ElKwMmdq+F15SfY7iYj5bFGKFGtAfLmK+BRbtzrk3D8wCXY7TbY7Dbgbgps3nbkLRCIclULo1ylUihZqhiyZcvm8frIHbvxn7/NQXirihgwrBOyZ8/+0FaIYdHtWyMx+d1lsHkBdi87fHzsCAwJQFBIAPIVDkHDxrVQsmSJP3QQ/ccff8S2bdtQoUIFtGvX7oF8du/ejcOHD+PKlSuIj483Y/n7+yMsLAzlypVD9erVszz+5MmTHWP27t0buXLl8jjW9OnTERMTY75r3749ihQpkuV7ZvbCCRMmmDl27NgRZcuWzezlv0v/L7/80gTQO3XqhDJlymR5DjxwYMOGDfjll18QHR1tDmbgAQx85/LmzYtatWo9lLU4fvw4Nm/ebO5hHS4REBCA3Llzo0WLFggNDc3yM/weF/LQgh07diA2NtYc2MHGAy3oVqpUKVStWhUhISGOqfH9YuP++iMecMH1j4uLQ+HChZEjR45UpEuWLMHp06fN540aNULlypU9sq9du9b8lrDxQIcGDRr8Hsuje0pAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQeSQGPAfTr169jRO/3cOmXOLCoeGCIL/qPaYPS2U8ix57PEXz3GlivPNnujV05W+NQSBEsilqNBFsi+IUNNtS2V0PVS4WQPOc47LF3TNDc5ueF5E5lcORWAnZvOI/kRFYsT4FPgB2te1ZGlcJxKPXLFORMuWnuG2sPQlSpPijdaqjHaskvPfsOTuy/ijrNiiF/sRD42O1ITLyLsz9fxMHtl5EjlzfaPlUb7Tu3cFRqd17FkydPYcYXi1GlRmm0at/EhKEfVmMA/ccftuDdUQtRrFIwajQoAbuXDdev3MCl89G4ePoWcuTywQt/744yZUo/rNs+9HEeRgCdVb/nzJljgswMnebPnx8FCxY0cz1//jwuXLhgArYMCXfr1g05c+bM9HO8++67joBuiRIl0LVr11RjnDhxAt9//73j8w4dOpjg+/9V+6sG0M+ePWvcExISTAA8X758Zv25L3799Vez/gyL85CD1q1bZ6nKNwPuixYtAgPoVmMAm4dpOP93eHg46tWr93+15Fm+Dz2mTJmCGzdupPk8/ILh+hEjRpg+/M35z3/+Y/49cuRI+Pn5Zfn+/1sXTpw40QTQ27Rpg0qVKqW6zddff41Lly6Zz/l7HBERkaoP9xHfJWtty5cvbw6TUJOABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4OEIeAygR0buwd+fnonkO8nmLl4+djTrWRM9i21F6LnlSL5XiBew2XHIqxzmBhTBdhwxIXPzcYoNxRIKou6uAsi19SbuJN/5n+42xNXNj3UXYxF14V4F7HvD2FGxXig6145Fpeh58LMns5g5/H1sOBnYCMFt/o3cefO6PDHDhyP6vYXL527i+b93RO36Vc33drsd0dei8Z9/TsOBLZdQsW4+jH1jgKmy7d5YUZjBZ1YUZpDzYTaGQX9YvwnjxyzB451KYeiLPU2InuFJ/tm6cQ++/2ozKtQsiOdG9cxS6PphzjetsR40gM6A+cyZM01YtGnTpqhRo4bHW7HSM6saMzTcq1cvR0D9fp/ROYDOa4YNG5bKlFXSr1696hhSAfSMdR+0Avr27dvxww8/mDB0ly5d8Nhjj6W6Kd+V5cuX4+DBg+Y9HDJkSKbD00uXLsWBAwfM2Kyu3bJlS1MZnO84Q+7z58/HrVu3zPedO3dG6dJ/3EMfOMcFCxbg6NGjZr58Z3hQAkP7/O24ePEijhw5gp9++smEtB/VADqf3VNQfc2aNeDvhdUUQM/4PVYPCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQQGYEPAbQDx8+itG9JuNO4r0Auo+/HV2GNkHbkHUIPL3EUXmWwfFIn1pYFJAHkckH/id+DtgBlLxdBLUPF0LOH67ibtK9cRgujq1XABsux+LS+QSk4F6SnZ+XrRWCHuFxqBA1D37ed00A3cfbjgshDZGj3TsICQlN9Vwj+r2JqF9j8dyrHdDw8domfM4WHx+PyR9+h5WzjiJPoQD885OBKFSoUKrrk5KSwGrvDMcGBgam+p6haQY+OV62bNlw69ZtU5GY1ZYZJg8NDTEBUM7fvTFUu2njNox7cQFa9SqHIRF9XKq4X716DRPemo5zx29g0EtN0TC8fprrZs3j5o2biI2LM/1yZM+O4FzBHiu7uw/E+cbF3cKtuDgkJiUZp5CQXOaZPM3d+foHCaDTgBWPGQIeNGgQgoKCzNDXrl1zVD1nSJiBYa5BTEwMGHjm/IYPH56pSthWAJ3ryDViYJcBc6sxhDx9+nSzBvTgnNwD6FxnBuZ5PcPK9MmVKxeKFi2aam1YoZrz5Xh8Ll7z888/m6reDFnzj7UfrYudK6CXLFkS586dM3845+LFi5vq8J4a159VwtmXpgwi84+Xl5ejO+fOe7Oxyrj7vTnGlStXzPecL+d9P+1BAui8H69nZfu+ffvC29vb/HYwQM0/fBZ+Z1mdPHkSc+fORbFixdC9e/f7mZ7pw3f4s88+M/+uWLEi2rZt6/F95AEE7GuFtq29z4rcXO/s2bObNWcF7tOnT5t3g3PhHNNqPNCA68K9YD2L+zq67xWuE8ePjo5Gnjx5TBjefb1YyZw+1apVQ4sWLTzennM+dOgQatasafY0vadOnWr69u7d2xHipzv3MVtUVJR5LucDOfg+8hCOnDlzOu7D94NrxGfj7ySr1vM9ZT9P7X76c37ffPON+T2tX78+ypYt6xjKMrYqoFvvMdeEvwVW43N+8MEHxobOPEDEPYDOPnxf6Mvvudc5HtfS0/ydTfh7z7XhHuAz892/33flvjesOkpAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAT+4AIeA+gMNkb0exdnjt4AM+Ih+f0w6s2nEBj7E/z3fI6wlMuwIwW3bdmwu0A/HPP1x6KolYi3xcMGG3xsPmjqF44ysflx8+s98Ll2B0i5i7v+dti6l0OUnw/WzDuKhNspSEm5C78AL7TtVxnVStpR8PBEhKZcM2H2aATjZqWnUabFsx6D0i/0fRNXLsRi6KvtEf54HUeIk4HPmVPnY+Hn+xFa0A//nvSsCRM6NwZhjxw5ikVz1qFq9fJo0bZxqnswyLgrch82r4tExeolceLIGeza+DOSE5OR57GcqN2oPJq3boygoNThdQYyd+7Yg/8eNgutelXAkIjeLuFHBh1ncY5f/4QqdYvgtXHPmICue+M8z587j+1b9mLvjuM4c+wafH3tKFYuNxo2q4Z6DWqnG0JnAHPHtt04uPcEju+7gOgrt1CoRC7UCi+LJs0bOIKpae3TBwmgL1682ARku3XrZgLWDN6yEjXDoe6tXr16aNSoEU6dOoU5c+akCpVm9B5ZAfR27dphyZIlZi1feOEFR2X7GTNmmHB548aNsWnTJhNgdQ6gM0jMgLKnxgBqp06dTIDVaqw+vWLFChPyzZs3L86cOeNyKQO//fr1M2Fnq1kBdIbPGVbnHJxb69atUblyZZfPGA7+9ttvTZDWuXFOdLUOVvjll18wa9Ys04XB3o4dO7r0X7ZsGfbv32/ekWeeeSbDdbcuzmoAnfv2008/NcFuVqNnsJthZudK5NY9OCcGzosUKYLVq1dj9+7dqQ4HSG/9Fy5caCqCc5yIiIg0A8Nnz57FzJkzzVDcJxUqVDD//v7773HixAkTBr99+7YjyG/d0/0wA37O5+I+ZUjbuXHfNWzY0ASs3fcKq7szxG1VNre+p82AAQNcAuDjxo0zYf3q1aujefPmGW1/8/x0SGv/vvjii+bZPvzwQ9OFa7Jo0SLzTvA+bGPHjjV/8/2cPXu2CYo7N4a3+R7wXXZu99Of9+AzpdU4HwbgrQB6gwYNsH37dhOsd65Yv3XrVmzYsMHse74/vLd7AH38+PEmNO/euD+4NvytsZqzCa2599yfuVevXqn+/5HhgqiDBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4E8s4DGAzvD0ssWrMWvSRiQnp6Be8xLo2b89/P39sH/VNISdWQhvWwrO56iG3PX7wjdnDkxbNwOHEo6AyfEivkUwoH4fZPPyx47pK5G4/jRsd1KQUiM3qj/TGtmDAvH9Nyuxb/tZ3LlzFxXrFMDAoV3g5WXH8XUzEXBxI7Ilx+LKY21Qpklvl2q9ljUDjRED3sKlM7GI+OeTqBdewxEgZzh04rhvsGHhCZSvlQevjnsawcHBLsvE67ds2ob3X1uA1t3qYNDwzqkC6AkJiZgzfQnmfrENoQUCkHznLkLyZcPN64m4fOYWgkL9MeRvrVG/YZ1U15oA+vZd+Nfzs9G0a1kMG9XbJYzM8OSaVRvx+b9Xm3FeG98LJUqWSLWVGKafNW0hFn4dCZuXHQVL5EQKqxOfjkNIvgAMHNkatevU9BjQ5zNu3bwTU8Yvw+WzschXJCeyB/ngwulY2OzAMy+1QNMWqYP3zpPIagCdAVAGQVndmQFSNgaSWSmcQdYaNWoYD4aSWfm6VKlSjn4MKR87dgyjRo26rwrvHNsKoDNczSAuqxpXqVIFrVq1MpWQP//8cxPwZxCX83IPoLM685QpU0xgnYcVMAzLAC6D4nwWVhtnoJ2BczYrgG5ZMRDOKs7ce7wfG6uU9+nTx8FpBdCtD1iJnFWcWW2ZQVu2p59+2rHfeUjBRx99ZOZKM1ryGWjD4Czb4MGDHWHyjRs3YsuWLeZz54A1A88LFiwwnzNAXKZMmfv+ycpqAN0KRLdp0waVKlUyoe5JkyaZyvN8Fxm05zOz2jSr01v9uGcnTpxovBlKvp/GgwN4gACfi8+XXqMn14j7r1mzZqarFUC3rmMgnFXkuScs5/DwcEeonM/AIDfXh+vOZ+G8ediC1b9Lly7gQQOe9grXkHuFz899yuZe9Z0GrMzOvjyYgCHr9BqD8KtWrXIc7sA9TEM2Vv/mYQvOYWsG5a3gufVvBtCdD2LgIQoM3/MQhOPHj5t9yBD3888/bw4UYMtMfx4CwbXmfTkn54rrPEyB75YVQOdhFHz/duzYAb4nQ4cONfd7//33wd/E/v37O57XPYDO6vF8Jhpwr/F+3Gf0ZONhB9ZhEs4m/I7Px7WnHd9LXmv9brhXqb+fvak+EpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQggT+jgMcAOh+EIc1Z0xciKCgYjZvVRmhoiAn1RV+7igM/zoOffzYUrd4UoWG5TWiPQcRvf5gFf5sfWtZriUL5Ct37/MoVbJu9BimXY1FrSDvkzpvHjHMj5gY2b4rE7bjbaNYq3AQS+XlcbCx+OXkUNy+dRLk6LREYFJSm6+jB7+CXw9Ho9XxjVK1d1oQG7yQl4eSJXzDrkx+REJ+Mdn1qoFuv9h6ri++O3Is3Rn6Dzv3C0Wdwh1T3uX07Ht/PXIYZE7agSPkgtO9ZG5WqlsOVqGtYtWgbItedNuP3H9zFUX3dGoTh0vVrNmD82GVo0rkUIv42wBFeZh8TgN+8He++NA82LxsGvdwU7Tu1SDUHhiBfH/kZfH39EN66HKrXqgRvH2+sXboFy2btRZmqeTBs7FMoUCB/qmsZ4Pzo7enY9eNZ1G1eFI1b1UTu3CHYHXkAS2dGIjiPP9788EVHUNUTdFYD6FZF7qeeespUtt63bx+WL19ubsEAK4PXVrNC2wxss7lfez8vlnMAnWHn7777zlERm5XYWeG6bt26pgI6A6ruAXSGinkdw67OjQFVhoH5vadQMffsE088gZo1azouYwicYXA254C4FUBn+JhjWffiOjGczUCzcxB56dKlOHDggAk5P/fcc44DDLi3GJa/fv16qpC7Vemd796zzz5r1tYKfnOOTZs2vR9OR5+sBtDXrFljqkmPGTPGjDVv3jwTYuahA6xS7twuX75sPudvAJv7tRlN2Aols7I1g8vptalTp5qq5UWLFkWPHj1MVyuAzgA0D0vgfrWa5ck14OEFbOvXrzfBaH7GQwkYULba3LlzzYEKzqFp67AC7hXuQYbZ+W+2devWYefOnWadXnrpJcc4zu8LP+S9wsLCkD9/flNFnfuEhxI4N+5p7m22kSNHuvze8DPnsDXvx3eBVeAZJufe4/Nb680K471793YZ39q/1sEO/DKz/a1gvXXggPtaOQfQeUgA78l3j2vFwyv4G8L3Z9CgQZg2bZrHCug8AILheff2xRdfmDA9DwxgqN/dhJ/zUALLlWH56dOnm358b5zf8Yz2pL6XgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJ/JkF0gygs+rz6hXrwCBiparlHYFJBhUP7d6C7DmDULpidZdnX7x+CQJ8AxBeqyH8fO9VimbQeuf6rUi8EIOGve+F/qzPjx8/hYTbt1GxcgWXCt43YmJw/vQxlChXxQQv02pjhr6L/VsuIkewL/xz2OHlbcOdpBTE3biD3PmC0KFvDTRuWt+l0q7zWJHbd+Gtl75Dh1710W9ox1RVxG/fuo3vZy7H/Gk78MzYZmje8nFH2PTMmbN488VvUapKKJ4d2c0RnrXGp9+KZevw6etr0KRzCUS8MsjlWeiybctOjBszG4m3U9B1SB0MHNI91aNO/2oO1i88jD7DH0d443qOcOSNGzfx0dszsHfTWfQYVg9derRLNf8DBw5i0luLUaJCXgwa9iSCgu+Fqzm3pfNXY/YXW/DZvLFp+rBvVgPomzZtwubNmzF69GhjxhA4K0Q7B3PTWlcGrN977z00aNAADRs2vK/3yzmAzgrGVrV1Bmx5XwZ+GXzmfvIUQHe+CQPxDP4z8BobG2vCxqy6zLlwTmxWqJhVnD1V6ub8+RwtWrRAtWrVzDVWgLdjx44oW7asy3NZoXWGgBkeZvvggw9MMPjxxx9HnTp1XPoz5MywMxsrV1uN8/zkk0/MdQz5M4jO52BwuV+/fvdl6dwpqwF0hoMZ6OdhA2wff/yxsXQO/6Y1Gat6+sCBA5EnT54M5/zOO++YPgwVc/z0mhUQZ0CZhwOwWQF07hVWjndurILOsD+bdXCCVUXd0/7kQQccj+4vv/xyhnvFuYI4A+hW1XJeuGfPHqxdu9YcluDeuJ9ZYZ3ztX4jMxNAHzFiBAICAlyG5Z7hnmMbMGAA8ubN6/I9w98MxrOyOCuQZ7Y/B8tMAJ0HClj3ZPieBzVwD1mHWqQVQHd+F3i4QUxMjNmLBw8eNFXtCxQogL59+5puzqF8HpZgHQxgjWEdQFC8eHGwSruaBCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI4K8gkGYAneHCFcvWomCBQqhRu5JLAP34wb3wDwhAyXKuYc9Vm1aZarVN6jZxBNAZity1bisSo2LRsFcrhykD2IcPHwdS7qJc+TIuwb/o6Gu4dPYkipau5Kj67L4YvH7kwLdx4qdrCCvkh8Awf3jBhvj4ZFy/nIAbVxNQrmY+DH+ti6kW7On6dat+wKdvLkerJ+tg0AudU1UxvxV3CzOmLMSPyw5g5L+6oGatao55XrxwEf81bDpyF/bD8690R/78+Vxuwedev3YDPnhlGZp1L4shEb1cAp902rY1EhP+vgAxV26h+7B6GDT0XkVmq7HPqyPex+3YZET8vRuKl/jtORhunjdrJWZMWG8C5uO/eilVePL7WUuxfNZP6Ny/Nlp1aOIIt9LuxPFTWLlkM57s0QwFChZIc69nNYC+YMECUwmaAXS2b775BufOnUO5cuXQoUPqavPuE2BIvHTp0vfVl9e6B9APHz6MRYsWOYatWrUqWrZsaf47rQA6r2H1bQbQPTXnwHFGAfTJkyeD4WLnquPpBdCtqu8MwFpVw61gNcO+DP06Nyukz8+GDh3qUrmdoVtWkuY6s7G6OCuop3eYQ1obIKsBdIa0Q0JCHFW0rUA+1557IL1mhb7vpy/HscZm9XOGltNrVqC4YMGC6NOnj+maXgCd348bN85Y9urVC4899pjjv7lW7oFl9ud7y8aK6TRPb684h7g9VS3nOHyPTp06ZSq304aHDFjN+UCHzATQPYWtz5w5g2+//dYMzQC9e7OeixXTWfk9s/05XmYD6HwXeY21l4ODgzFkyBAztbQC6DRauHChsfLUrAA9v8sogM4DACIjI031+aeffjrdvaUvJSABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAo+KwJ87gD7obVw6cxMDRzVHw8drm5AiQ5JHDx/H9I9X4tieK6ga/hheffvpVBXK2fdBA+j/GDYdeQr7YtjY7ihQIL/LnrivAPqWnZjwjwW4GZ2A7s/VxYDBrhXQGaB8Y8wU5Aj0x4jXeiN37jDHPTj+2pUb8PHrS5EzKCemrvh/LtWT2fGjd6Zh27qf0WtYI7Ru39hjqDSjjZzVADqrn7MK+qhRo0zVdquSMatyW1Wx07o3K7SPHz/epeJ4RvN0D6Cb5//oIxMmZ0iYgVmr4rOnALo1X17H+TKgzNApK5xv377djJOZAPpXX30FBsGrVKmCVq3uHbyQXgCd4eKpU6eafqxo7hyMZYV1zsO9WQH13r17o1ChQi5fW5W++aFz5faMHN2/z2oA3b0C+qRJk0wl6vLly6N9+/bpTsM6PGDQoEHInTt3hlO2xvZUwdz94k8//dRUhHdel4wC6Nbe6tq1q9kXXEc27mXniuXu92JgmXspvQC680ECaQXQ3cfl7wIPV4iKijJf9ejRA0WLFjWV0rm32TyNlVHYmtXN+Z6yMdieVuPBAt27dzfV0DPTn+NlNoDOa+bPn49jx46Z6XTu3NkcTMHmKYDOUPysWbPM/wv43rPaOd9jPs/PP/+Ms2fPOiq4c4yMTKzfP+egf4YbUh0kIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACf3KBNAPoDAGvXrHOVPytWKWcSwX0Q7u3IHvOIJSuWN3l8RevX4IA3wCE12roqIDOIGDkD9uQ+GsMGvR2rYB+/PgpJMbHo0Kl8i6VhG/ExOD86WMoUa5KulWbxwx9F2eORSPiX11Qt0F1xxgMof+4bismvLoMNp9kvPDPtniiWXiqpYpVNcalAAAXEklEQVTcvgtvvfQdOvSqj35DO6aqZnz71m18P3M5ln63E2Pe7oGq1as4+sTE3MBrgycjT1F/DB3dFXny5HEZn34rlq3Dp6+vQZPOJRDxyiCXZ6HLpg3bMP5v8+Ht5Y2nX2mGVm2fcBmDYcn3/usb5ArJiRf/0Q+Bgb+FkHn9mpUbMOG1xQjIFoAvl41xCSnz+/Gvf4VtP5zE4L81R7OWjT1Wa85o/2Y1gG5V9LbCsYcOHcLixYvN7RjMZSjUagxfX79+HWXLljUfnT59Gt999x2eeuopFClSJKMpmu89BdD37NmDVatWpaq67imAboXDixcvji5duriE9RkM5xwzE0D/5JNPcPPmTTzxxBOoVauWmWN6AfTjx49j3rx5JrDM0D6bVXnbU8DcuXK2e0CdQdvZs2c73BjEZZjb2fy+UAFkNYDOSvK7d+92VHNnReojR46Yd4CHAXh7ezumwL3BoLkVNl+9ejW4dlYl+IzmymflM7PSe0RERJrdGYBnWJ2tefPmqF793u9XegF0/pZwb7FZlebdK6JnNL+HHUDn/WJjY/Hxxx+bWzdt2hQ1a9Z84AA6f29mzpxpfifuxz6z/TlXK4DeunVrVK5cORXd119/jUuXLsG5mr21btmzZ8fw4cMd13gKoFtrySrt/J3h31bbsGEDtm7dmqkA+pIlS3Dw4EEULlwYPXv2zGip9b0EJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUjgkRBIM4DOarqrljOAXhgVq5RxPGxiQgIO7tqM7IGBKF2xpgvConWLEeDjj0Z1GjkC6AxwRq7fgoRzMQjv39bRnwHpo0eOIyExAZUrV3QJRzNceebkYZQqX9UEctNqowe/g3PHYzD6ze6oXa+qS7djR07hxV6fAsk2dBteCwOe7ZZqmN2Re/HGyG/QuV84+gzukOr727fj8f3MZVgwfQfGjuuGmrV+C7nHx8djdL+PkaeIP174W0+wKrBzY2Xj9Ws2YPzYZWjSuRQi/jYAfn5+ji70XTRvBb4a9yMeKxGGf0wYgLx5XUPsdPjnS5Pg7+eDl/81EIFBgY7r6Tp31nJ8+fY6hObOgc8XjQEDms5t4rszsGnZUTz9clM0a506gM4x7HZ7uhs5qwF0q7JzyZIlTaCbbfLkybh69apZawa9GRhm2JQVnVnVmNWN2awQ6ejRo12CyulN1FMAPa3+7gF0rqVV1bpv376marJzy2wA3Tno3KtXL3OIA1t6AXQr6BoaGopnnnnG9P/www9NhWYG2Blkd2779+/HsmXLUoWFGXr/7LPPTBi5Ro0apnI0P2P19+eeey7d98mTV1YD6EePHsWCBQtM9XdWG+dzMDDNeTGEXqJECXD/nTt3DnFxcWjTpg0qVapkPmM/VhZnsP5+mnVgAftaYWxP1/FQA/blnh8xYoTjfUwvgL53716sXLnSxfmjjz7CrVu3ULFiRbRt+9tvWlpzzWwAne/O5s2bzYEHzkF95/ETExPx/vvvm49YmZ2e/E1lOJ6Nax0Y+NvvBT/LqNq385jOlcbTeq7M9uc4VgX6tNbJUwA9rft7CqBb70zdunXRuHFjl0uzEkC33llP7+D97E31kYAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCfwZBdIMoDMEuXL5OhQsUBBVqv9WoZyhw6M/7YR/tgCUquBaAX35huVIvpOMJvWaIHtAdhM25Z89rIB+8SbC+7kG0A8eOAKbLQUVKpZ3sbt54wbOnT6KEmXTroDOsGXEgLdw6UwsIv75JOqF13AJsTOA/srALxEfn4C+LzZAz36dXO7B67ds2ob3X52PNt3qYuALnVNVCE9ISMTsaUuw+NudGPXGk6hTt6ajz/XrMRg76HOEFfLDiNd6IG/evC7jM0i7c/su/Ov52WjatSyGjeptAtdWY+h20oQZ2LT0FFp1r4TBI3qnuj/n+FrE+7gZnYiX3+iNwoXvBZnZWGH960/mYMHU3agaXgj//f6IVGFyBtznTdmJzoNqoX3nFo7vOe7ly1E4sP8I6jeoZcLJabWsBtA53tKlS3HgwAETQGcQnVW7GZpmKNq5MZDMQCorIp84ccIE0O833GuN8yABdOcq16yKzerYbKZK/aZNpmoy/+2pAjrXlGFfPgMbQ77Tp09HdHS0qUjvHKK2wqxWKNuaO6t3z5kzx9zD+TvLnmHs/v37OyqE82CCKVOmgMF554A/n4Ph8xs3bsAKsrOy/BdffGGC3QzCMxCfmZbVADrvwbAx50oDHo7AgwZYCZ1/Ozc6cY/wHWLYm6HvTp06oUyZ3w6+yGjOM2bMwPnz5023hg0bmrWyGn/L5s+fj1OnTpmPnKtr87+tAHrRokXRo0cPx3Wses+K4HzXKlSogHbt2pnvtmzZgo0bN5p/t2jRAtWqVXOZ3s6dO8EDAlh1ni2zAXTrQAQevsG5MsDvfBAH58X3KCoqyrzTL774oiOobh2u4P6M1t5kQJuNFc55EIR7sxwZfKdFoUKFHF3427927Vrzm25ZZLV/wYIF0adPn1T3f9AAOvc/9zz3PyugW8/IAxFoxmfIly+feZ/cTawK9/yc7yJ/v1j9nGNwD+fIkSOjbajvJSABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAo+EQJoBdIYuVy5fi7xh+VCjbmVHeJkBvsN7t8M/wB9lKtVyQVi7ZS22nYhENi9/NCxZF2e3H0UKUpB0NRZFa5ZH3fZNHP1NBfSjJ+BlB0qVLuUyTkzMdVw6cwpFy1R0BHs9ab/Q901cuRCLoa+2R/jjdRxzZAh4zsylmPfZHnj7JWPUW0+ifsPaLkOYcPEPW/H+/1uI5h1rYPDoLqbqsnPjsy6auwbzp23Gy292R5VqlR2BxsuXLuP14dMQnNcHw17pikKFCrpcawLoO/bgv4fNQqteFTAkorcjRMpQ7r6fDuGbT9cgMDgAz47qaCqCuzfOcea0+Vg95yd06l8HrTs0dVRtvnz5Mj749zSc2h+NAS89jlZt74WmnduB/fsx8V+Lkb9YMJ4Z0REF/2eODLguW7wWq+fvxn++GJWqcrrzGA8SQKfBxIkTwQDwwIEDkStXLjM0P2cldDqwcnxQUJD5nKHtr776yoRphw8fnmF1dud5PkgAneM4B5gZ9mUon5XDuQZW8xRA53cMqDKcyr+dr3Gufs5+VgCd/2Z/PjcNWDGdjT6DBw923I9ODAwzuM+xGdCmza+//moMGT5+/vnnkS1bNnMNK44zaMt9zFA8Q99sVrV0/js8PBz169dPtVfS+uBBAuhcYwblGQZmZXkrpM/3ivuXzxAWFuaY//HjxzFv3jxTzZtVvTPTGLpn8J+ebDQIDg424XHnNSlcuDB69uzpMrQVQOeHNGUgntexyjkb9wP3ozV/fvb555+b/crm5+dn1o79rXuxL4PhbFkNoDtPkuNxPblX6Ga1J598EqVK/fb7+e233+LMmTPmaz4/9w29Of+MKqDzGvpNmjTJhMzZaMG9yvtaHs5B/cz2Zzh/3bp1ZmzuW/6hI8PfvM+DBtCdDwfgs/Md45pYz8P7phVAt+bE9eR+sq5xfu8zsyfVVwISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPBnFUg3gL5u1QaEhIahRu1KLgH0fVvXIvH6BQTkLY6UlLvw8vJB8p0kxN6MRoqXD7aeP4zaBWrgdlQcElgVOu4WgkKDERgSiLt3U+DlZYfdZsPFS9dQukxRVKpcwcUvOvoaLp07jeIZBNBH9HsTv56+iba9q6FU+cdggw1eDOieu4iF03Yg6uwtlK9VAGPf7OuoHm3dyFRA37AN419bgGYda2LwqCczH0B/YTpC8ntj2NjuKFAgv8szMLy4aeM2jHtxAWo1K4RWnerhTnIyYm/E4vTJi4jccArxt5PRc2gDtGrbLNW9rcGOHj2Gt17+Ftly+KJZp0qo27AG/Px8sW7lZsz/ejuKlQ3D6Nf7myC3e2M4dMKbM7Bn42nUaV4cHXo0QZ48YTh04Cjmfr0edi9vvDUxIt2Q/4ME0DmfCxcumHA3vRs3bow6dep4fFe2b98O3ouhUVZGzp/f1TOjF8wKoD/77LMeLZyvt6pEd+zYEWXLljVfMVzLatcMTVuNc2G499q1a6Zqt3NlbStUzD4MKDPkazUGhRmgZtDVuTFMzhAww+3827kx1Msq4AyYOzeGz2fPnm1C586NgWdWqLbC+6w0z4rNbLw3Q9zOjRXArcrzrP7sPre0fB8kgM4xIyMjTdVsBqg7d+4MPqd74wEFS5YsMeF5BpKHDBmS7p5Ma64MZq9evdoE7p0Dx+zP+zdt2hSVK1dOdbkVQOc6ci7Ohw5wH3br1s2smXPjvVgFfceOHS6BcPZhX1ZFZ9ifbd++fVi+fDkCAwPNwQDOjfPkfmRjYN0KuXM9WQme6+48H+va3Llzo23btuZQAufGsDX3MauAW83f3x8RERHmIIMPPvjAfDx27Ni0GM3e5HpYFePd9x2rq1vvDb/LbP+5c+fi5MmTLvdnQJ7vzdSpU8EK7/ytqFu3bppz5Bc8cIA+5cuXR/v27R19Fy1ahMOHD7tcSy8edsDPuab9+vUz3zuH8hm2p5/V+C42b97c455Jd2L6UgISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJPAnF0gzgM5g5NqVPyIoVy5UqVbOBDNNqDMlBSf2RyJ633LYUlJgxx3Y7DYksyivtx9yeCVhs3cYqheqh58PnMfpc1cQEJAC2OxISkpBUmIy7LYU+PjY4e3ri2Yd6qNsubKOgDuDnTdvxODaxXMoVbGao2q4uzNDmSP7v4UT+6/BP7sP7CylDpsJxMfHJYJFgouUzYUBL7RAnfquldo5Fq/fumUnxr82D2271sGA5zs5qptb90pISMSc6UuweNZOvPRGV9SsXd3R5/r1GLz6zBcIK+yL4a88hTx58rhMkVY/rN+E915aDG9fLwTk9EVy0l3cuplo5mi3A7WbFsHwV/ogNDR1eNwaLC4uDhPfm44NC07BN8COyvUKIHtOPxzYdhaJSSkYOPoJtGzd1OM2pOWyJasx/f0fEXcjEcUrhqJwqVAc2f0roi7Eodfweujeq3Oq53Ye7EED6ByLz8DQKYOlDBgz/Fyw4L2K8efPnzefMwDOzxmetip3/x7vFoPmrM7NEDHn6Fz12nk+7lWtWSGaVZO5D1hBOaPGoCufm41VuTO6hgF3WnFfcV7ugeiM7pfV7x80gM77MiTM9WfYl1W5uc4FChQw1bb5TJcuXTK/LwyHt2zZ0vFbkNU58zqOzfsyVJ7eOrKvFUCvUKEC2rRpYypyx8fHm3myknpGjfeKiooye4Uh54zWMqPx3L/n+FYFch48wMMmWKk9vcZreHAC9wkr0GfUP62xaMFxGM7mfd0PSHC/7n77MwxPM47HcdN6zzJrZfXn+8W9xfEZ0uf8PTX3qvD8bz4vDwvgHzUJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpDAX1EgzQA6w8ubN23DhbOXkS2HH1IA2G12U8GcQW+7Daait80G2Gx23IpLRL6CeRD48zysu+OHWiWaIupMNPx9YpA7fzDsvtnuBZ1TeL0ZgqMgxZZiKpen3OXfgM3LjjtJSfANyIkK1eqkG3icMG4Kju77FXa7DXeS7ppKxDZbCrx9vFC0dB40aVkHNWtXS3Ndjxw+ii8nLsQTrWqjVfvHU/Vj6Hftyo1YvSgSz4zsgPIVyjn68Lt3/+tL5C4QhJ4D2qUKODIovHfPfkx+bxHu3LkLX39v84xe3nYEZPdBwSJhaNa2HsqVL5NuOJRB+f37DmLBrHW4ePo6bl6/V2k7R7Av6jQpg579O6UbeGUgdP7sFdi34xRiribgdmwScgb7omTFfOg/pDPy5Xet0u2O8DAC6NaYrATNCsQMeDNwzsZAOkPb5cqV+1NVGnYPoD+qPx4PI4BOG74PmzZtwi+//GKqzPP94e8Bg8EMeteqVQuFChX6XRidA+jt2rX7Xeagm/4+Au4BdPP/KDUJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpDAX1wgzQA6XRgSjY2NQ3z8bRMW9fX1g4+PN5KT7yIpMRHJd1nN3A4/fz+cPXMdp07+jMLXV+DHu9lRvVgjXD0fA6+YvShWvT7ylqgEbx8fE7ZmwJx/mDj38fUzVYZZAdl8xkLq3t7Ilj2HCSen11iplnNhSDshPt4E4r29vJAte3bkyJE9w0rEDMWyknlAgL/He3FcVtKNi41DWO6wVNXYea2Xl91U7PZUYZgh66ioK/Dz9TXPnpiQcO+ZfXzN/Pz9/dOtPm49O4P1rCJ+9eo1XLsaA19vL4TmCUVYWGiaFeKd3VhtmHO9EnUF8fFJCA0LQu7cue+r0vjDDKA7z4nPxJbVysy/93urAPqDrQDf94yqaT/YHe7/agXQ79/qUeupAPqjtqJ6HglIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISeBgC6QbQM3MDhrUZKmbYmYFyHx8fEwxn0JT//rMGjTNj8Cj2jYyMNJWrq1evjkaNGj2Kj5ilZ2I19+XLl5sK3sOGDcvSGH+Gi+bNm4czZ86gc+fOKFKkyJ9hypmeowLomSZ7ZC6Ij4/HhAkTzPOMGTPmvg4EeWQeXg8iAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISSEPgoQXQJSyBv5pAcnKyCazqcIU/98pbh2dwHbmean8tAb7HbDw4RU0CEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAUABdO0CCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEjACCqBrI0hAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCAEVAAXRtBAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABIyAAujaCBKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCRgBP4/C5zgD79OML0AAAAASUVORK5CYII=";function Vlt(t,n){if(t&1&&(K(0,"div",1),Oe(1,"img",9),K(2,"div",2)(3,"div",10)(4,"a",11),Ce(5," Als Bild speichern "),Z()()()()),t&2){let e=V();L(),B("src",e.dataUrl,ja),L(3),B("href",e.dataUrl,ja)}}var Lxe=(()=>{class t{constructor(e,i){this._config=e,this._document=i,this.options=[{displayName:"Oben links",value:"top-left"},{displayName:"Oben rechts",value:"top-right"},{displayName:"Unten links",value:"bottom-left"},{displayName:"Unten rechts",value:"bottom-right"}],this.loading$=new mo(1),this.legendConfig={show:!0,position:"bottom-right"},this._createMapDataUrl()}updateLegendPosition(e){this.legendConfig=gt(ve({},this.legendConfig),{position:e.value}),this._createMapDataUrl()}onLegendConfigShowChange(e){this.legendConfig=gt(ve({},this.legendConfig),{show:e}),this._createMapDataUrl()}_createMapDataUrl(){this.loading$.next(Cn.LOADING);let e;this._document.getElementById(this._config.data.mapRef.getContainer().id).closest(".map-wrapper")?e=this._document.getElementById(this._config.data.mapRef.getContainer().id).closest(".map-wrapper").querySelector("#map-legend"):e=this._document.getElementById("map-legend");let i=JSON.parse(JSON.stringify(e.style));e.style.background="#fff",e.style.padding="12px";let o=this._config.data.mapRef.getCanvas(),r=e.offsetWidth*window.devicePixelRatio,a=e.offsetHeight*window.devicePixelRatio,p=32,f=32;switch(this.legendConfig.position){case"top-left":{p=32,f=32;break}case"top-right":{p=o.width-r-32,f=32;break}case"bottom-left":{p=32,f=o.height-a-32;break}case"bottom-right":{p=o.width-r-32,f=o.height-a-32;break}}Pxe(e).then(x=>this.legendConfig.show?AX([{src:o.toDataURL()},{src:x,x:p,y:f},{src:DX,y:o.height,opacity:.7}],{width:o.width,height:o.height+30}):AX([{src:o.toDataURL()},{src:DX,y:o.height,opacity:.7}],{width:o.width,height:o.height+30})).then(x=>{this.dataUrl=x,e.style.padding=i.padding,e.style.background=i.background,this.loading$.next(Cn.SUCCESS)}).catch(x=>{console.error(x),this.loading$.next(Cn.ERROR)})}static{this.\u0275fac=function(i){return new(i||t)(rt(jh),rt(zn))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[["successTpl",""],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[1,"mat-subtitle-1"],[1,"flex","flex-row"],[3,"change","checked"],["inputId","map-global-options-export-position","optionLabel","displayName","optionValue","value","fluid","","variant","filled",3,"onChange","ngModel","disabled","options"],["for","map-global-options-export-position"],[3,"loadItem","successTemplate"],["alt","Export of map",3,"src"],[1,"flex","flex-row-reverse"],["mat-raised-button","","target","_blank","download","Karte als Bild","color","accent",3,"href"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",1)(1,"div",2)(2,"h2",3),Ce(3,"Karte als Bild speichern"),Z(),K(4,"div",4)(5,"div",2)(6,"mat-checkbox",5),Qe("change",function(p){return Ee(r),Ae(o.onLegendConfigShowChange(p.checked))}),Ce(7,"Legende "),Z()(),K(8,"div",2)(9,"p-iftalabel")(10,"p-select",6),Qe("onChange",function(p){return Ee(r),Ae(o.updateLegendPosition(p))}),Z(),K(11,"label",7),Ce(12,"Position Legende"),Z()()()()(),K(13,"div",2),Oe(14,"bd-loader",8),le(15,Vlt,6,2,"ng-template",null,0,Hi),Z()()}if(i&2){let r=un(16);L(6),B("checked",o.legendConfig.show),L(4),B("ngModel",o.legendConfig.position)("disabled",!o.legendConfig.show)("options",o.options),L(4),B("loadItem",o.loading$)("successTemplate",r)}},dependencies:[Jo,_s,mr,oA,NC,vg,bg,Au,il,Rh],encapsulation:2})}}return t})();var Ult=["mat-menu-item",""],Hlt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],jlt=["mat-icon, [matMenuItemIcon]","*"];function Glt(t,n){t&1&&(oi(),K(0,"svg",2),Oe(1,"polygon",3),Z())}var $lt=["*"];function qlt(t,n){if(t&1){let e=Bt();jn(0,"div",0),yB("click",function(){Ee(e);let o=V();return Ae(o.closed.emit("click"))})("animationstart",function(o){Ee(e);let r=V();return Ae(r._onAnimationStart(o.animationName))})("animationend",function(o){Ee(e);let r=V();return Ae(r._onAnimationDone(o.animationName))})("animationcancel",function(o){Ee(e);let r=V();return Ae(r._onAnimationDone(o.animationName))}),jn(1,"div",1),yn(2),Yn()()}if(t&2){let e=V();Ge(e._classList),fo("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating),Bo("id",e.panelId),Xe("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var MX=new ii("MAT_MENU_PANEL"),GP=(()=>{class t{_elementRef=re(_n);_document=re(zn);_focusMonitor=re(dg);_parentMenu=re(MX,{optional:!0});_changeDetectorRef=re(Ho);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new xi;_focused=new xi;_highlighted=!1;_triggersSubmenu=!1;constructor(){re(Ol).load(hg),this._parentMenu?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o{class t{_elementRef=re(_n);_changeDetectorRef=re(Ho);_injector=re(Zn);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=xa();_allItems;_directDescendantItems=new Z_;_classList={};_panelAnimationState="void";_animationDone=new xi;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(e){let i=this._previousPanelClass,o=ve({},this._classList);i&&i.length&&i.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new yt;close=this.closed;panelId=re(qa).getId("mat-menu-panel-");constructor(){let e=re(Klt);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 SM(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ja(this._directDescendantItems),wo(e=>xc(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let i=this._keyManager;if(this._panelAnimationState==="enter"&&i.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,i.activeItemIndex||0));o[r]&&!o[r].disabled?i.setActiveItem(r):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Ja(this._directDescendantItems),wo(i=>xc(...i.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,o=this._keyManager;switch(i){case 27:Pl(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(i===38||i===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ic(()=>{let i=this._resolvePanel();if(!i||!i.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&i&&i.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,i=this.yPosition){this._classList=gt(ve({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":i==="above","mat-menu-below":i==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let i=e===kU;(i||e===kX)&&(i&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(i?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(e){(e===kX||e===kU)&&(this._isAnimating=!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let i=this._resolvePanel();i&&(i.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(kU),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?kX:kU)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Ja(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-menu"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,Wlt,5),Ht(r,GP,5),Ht(r,GP,4)),i&2){let a;Je(a=et())&&(o.lazyContent=a.first),Je(a=et())&&(o._allItems=a),Je(a=et())&&(o.items=a)}},viewQuery:function(i,o){if(i&1&&Qi(Ml,5),i&2){let r;Je(r=et())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(i,o){i&2&&Xe("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",lt],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:lt(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[Pi([{provide:MX,useExisting:t}])],ngContentSelectors:$lt,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(i,o){i&1&&(eo(),wI(0,qlt,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})(),Fxe=new ii("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=re(Zn);return()=>Nd(t)}});function Ylt(t){let n=re(Zn);return()=>Nd(n)}var Qlt={provide:Fxe,deps:[],useFactory:Ylt};var SA=new WeakMap,Xlt=(()=>{class t{_canHaveBackdrop;_element=re(_n);_viewContainerRef=re(Ga);_menuItemInstance=re(GP,{optional:!0,self:!0});_dir=re(kc,{optional:!0});_focusMonitor=re(dg);_ngZone=re(on);_injector=re(Zn);_scrollStrategy=re(Fxe);_changeDetectorRef=re(Ho);_animationsDisabled=xa();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=Dr.EMPTY;_menuCloseSubscription=Dr.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),(i==="click"||i==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal;constructor(e){this._canHaveBackdrop=e;let i=re(MX,{optional:!0});this._parentMaterialMenu=i instanceof IA?i:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&SA.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){let i=this._menu;if(this._menuOpen||!i)return;this._pendingRemoval?.unsubscribe();let o=SA.get(i);SA.set(i,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(i),a=r.getConfig(),p=a.positionStrategy;this._setPosition(i,p),this._canHaveBackdrop?a.hasBackdrop=i.hasBackdrop==null?!this._triggersSubmenu():i.hasBackdrop:a.hasBackdrop=!1,r.hasAttached()||(r.attach(this._getPortal(i)),i.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),i.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,i.direction=this.dir,e&&i.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),i instanceof IA&&(i._setIsOpen(!0),i._directDescendantItems.changes.pipe(Wr(i.close)).subscribe(()=>{p.withLockedPosition(!1).reapplyLastPosition(),p.withLockedPosition(!0)}))}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}_destroyMenu(e){let i=this._overlayRef,o=this._menu;!i||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof IA&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(Ko(1)).subscribe(()=>{i.detach(),SA.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(i.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&SA.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=Pm(this._injector,i),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof IA&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new Om({positionStrategy:o0(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,i){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,p]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[f,x]=[a,p],[I,D]=[o,r],P=0;if(this._triggersSubmenu()){if(D=o=e.xPosition==="before"?"start":"end",r=I=o==="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||(f=a==="top"?"bottom":"top",x=p==="top"?"bottom":"top");i.withPositions([{originX:o,originY:f,overlayX:I,overlayY:a,offsetY:P},{originX:r,originY:f,overlayX:D,overlayY:a,offsetY:P},{originX:o,originY:x,overlayX:I,overlayY:p,offsetY:-P},{originX:r,originY:x,overlayX:D,overlayY:p,offsetY:-P}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),i=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Ni(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ro(a=>this._menuOpen&&a!==this._menuItemInstance)):Ni();return xc(e,o,r,i)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Dm(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return SA.get(e)===this}static \u0275fac=function(i){Ck()};static \u0275dir=Ki({type:t})}return t})(),Nxe=(()=>{class t extends Xlt{_cleanupTouchstart;_hoverSubscription=Dr.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 yt;onMenuOpen=this.menuOpened;menuClosed=new yt;onMenuClose=this.menuClosed;constructor(){super(!0);let e=re(Kr);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",i=>{f1(i)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){m1(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let i=e.keyCode;(i===13||i===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(i===39&&this.dir==="ltr"||i===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(i,o){i&1&&Qe("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),i&2&&Xe("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[Rt]})}return t})();var Bxe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({providers:[Qlt],imports:[Cv,Xo,Gp,Mm,Xo]})}return t})(),zxe={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:{}}},G9i=zxe.fadeInItems,$9i=zxe.transformMenu;var Vxe=(()=>{class t{constructor(e,i){this.config=e,this._ref=i,this.mapStyleInitialValue={styleKey:"streets",displayName:""},this.mapStyleConfig={id:"map-global-options-style",selectLabel:"Ansicht / Karten-Typ",option:{sortFnc:()=>0,searchOptionAccessor:o=>o.displayName,uniqueFnc:o=>o.styleKey}},this.mapStyleOptions=Ni(["streets","outdoors","light","dark","satellite","satellite-streets","navigation-day","navigation-night"].map(o=>o).map(o=>({styleKey:o,displayName:X0e[o]}))),this._assertAndSetStyle("light"),this._assertAndSetStyle("dark"),this._assertAndSetStyle("navigation-day"),this._assertAndSetStyle("navigation-night"),this._assertAndSetStyle("outdoors"),this._assertAndSetStyle("streets"),this._assertAndSetStyle("satellite"),this._assertAndSetStyle("satellite-streets")}updateMapStyle(e){this.config.data.mapboxOptions.style=K5.fromStyleKey(e.styleKey),this._ref.close(this.config.data.mapboxOptions.style)}_assertAndSetStyle(e){typeof this.config.data.mapboxOptions.style=="string"&&this.config.data.mapboxOptions.style.includes(e)&&(this.mapStyleInitialValue={styleKey:e,displayName:""})}static{this.\u0275fac=function(i){return new(i||t)(rt(jh),rt(tf))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"flex","flex-col"],[1,"flex-1","grow"],[1,"mat-subtitle-1"],[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"h2",2),Ce(3,"Karte"),Z(),K(4,"bd-ui-single-select",3),Qe("selection",function(a){return o.updateMapStyle(a)}),Z()()()),i&2&&(L(4),B("config",o.mapStyleConfig)("initialSelection",o.mapStyleInitialValue)("selectOptions",o.mapStyleOptions))},dependencies:[Wg],encapsulation:2})}}return t})();var RX=(()=>{class t{constructor(e){this._dialogService=e,this.mapboxOptionsChange=new yt}openMapOptionsDialog(){this.controller.mapRef$.pipe(vi(e=>gt(ve({},nf),{header:"Karte Einstellungen",data:{mapRef:e,mapboxOptions:this.mapboxOptions}})),wo(e=>this._dialogService.open(Vxe,e).onClose),ro(e=>!!e)).subscribe(e=>{this.mapboxOptionsChange.emit(gt(ve({},this.mapboxOptions),{style:e}))})}openMapExportDialog(){this.controller.mapRef$.pipe(vi(e=>gt(ve({},nf),{header:"Karte als Bild",data:{mapRef:e,mapboxOptions:this.mapboxOptions}})),wo(e=>this._dialogService.open(Lxe,e).onClose)).subscribe()}static{this.\u0275fac=function(i){return new(i||t)(rt(Zd))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map-global-control"]],inputs:{mapboxOptions:"mapboxOptions",controller:"controller"},outputs:{mapboxOptionsChange:"mapboxOptionsChange"},features:[Pi([Zd])],decls:11,vars:3,consts:[["menu","matMenu"],["mat-icon-button","",1,"mapbox-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disabled"]],template:function(i,o){if(i&1){let r=Bt();K(0,"button",1)(1,"mat-icon"),Ce(2,"menu"),Z()(),K(3,"mat-menu",null,0)(5,"button",2),Qe("click",function(){return Ee(r),Ae(o.openMapOptionsDialog())}),K(6,"span"),Ce(7,"Karte"),Z()(),K(8,"button",2),Qe("click",function(){return Ee(r),Ae(o.openMapExportDialog())}),K(9,"span"),Ce(10,"Als Bild speichern"),Z()()()}if(i&2){let r=un(4);B("matMenuTriggerFor",r),L(5),B("disabled",!o.controller.config.global.styleMenu),L(3),B("disabled",!o.controller.config.global.exportMenu)}},dependencies:[Ls,la,Jo,yd,Bxe,IA,GP,Nxe],styles:["[_nghost-%COMP%]{width:40px;min-width:40px;display:block;background:none;top:20px;font:12px/20px Roboto,Helvetica Neue,sans-serif;padding:0;position:absolute;right:20px;z-index:1}.mapbox-button[_ngcontent-%COMP%]{background-color:#fff;border-radius:0}"]})}}return t})();var ect=t=>({background:t});function tct(t,n){t&1&&(K(0,"div",3),Ce(1,"-"),Z())}function ict(t,n){if(t&1&&(K(0,"div",0)(1,"div"),Oe(2,"div",1),Z(),K(3,"div")(4,"div",2)(5,"div",3)(6,"span",4),Ce(7),el(8,"number"),Z()(),Lt(9,tct,2,0,"div",3),K(10,"div",5)(11,"span",4),Ce(12),el(13,"number"),Z()()()()()),t&2){let e=n.$implicit;B("ngClass",e.alignment==="row"?"flex-row items-center gap-2":"flex-col"),L(2),B("ngStyle",rn(11,ect,e.backgroundExpression)),L(5),Di(Ec(8,5,e.from,"1.0-0")),L(2),Ft(e.alignment==="row"?9:-1),L(3),Di(Ec(13,8,e.to,"1.0-0"))}}var Uxe=(()=>{class t{constructor(){this.min=0,this.colorFactory=new Sg,this.ranges=[]}ngOnChanges(e){(e.min||e.max||e.colorFactory)&&this._updateColors(this.min,this.max)}_updateColors(e,i){switch(this.colorFactory.type){case"lightness":case"scheme":case"judgement":{let o=[this.colorFactory.getColorForValue(e,e,i)??new Us("#ffffff"),this.colorFactory.getColorForValue(e+(i-e)*.25,e,i)??new Us("#ffffff"),this.colorFactory.getColorForValue(e+(i-e)*.75,e,i)??new Us("#ffffff"),this.colorFactory.getColorForValue(i,e,i)??new Us("#ffffff")],r="90deg";this.ranges=[{from:this.min,to:this.max,alignment:"col",backgroundExpression:`linear-gradient( ${r}, ${o[0]} 0%, ${o[1]} 25%, ${o[2]} 75%, ${o[3]} 100% )`}];break}case"custom":{this.ranges=this.colorFactory.ranges.map(o=>({alignment:"row",from:o.from,to:o.to,backgroundExpression:`linear-gradient(90deg, ${o.color.toString()} 0%, ${o.color.toString()} 100%)`}));break}}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map-feature-heat-map-color-legend"]],inputs:{min:"min",max:"max",colorFactory:"colorFactory"},features:[In],decls:2,vars:0,consts:[[1,"flex",3,"ngClass"],[1,"legend-item",3,"ngStyle"],[1,"flex","flex-row"],[1,"flex-1"],[1,"mat-caption"],[1,"flex-1","legend-item-label"]],template:function(i,o){i&1&&ea(0,ict,14,13,"div",0,ed),i&2&&ta(o.ranges)},dependencies:[Rs,fs,yl],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 Hxe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map-legend-layer-color"]],inputs:{ref:"ref"},decls:3,vars:3,consts:[[1,"flex","flex-row","gap-6"],[3,"colorFactory","max","min"]],template:function(i,o){i&1&&(K(0,"div",0),Oe(1,"div")(2,"bd-map-feature-heat-map-color-legend",1),Z()),i&2&&(L(2),B("colorFactory",o.ref.colorFactory)("max",o.ref.maxValue)("min",o.ref.minValue))},dependencies:[Ls,Uxe],encapsulation:2,changeDetection:0})}}return t})();function nct(t,n){t&1&&Oe(0,"p-skeleton")}function oct(t,n){if(t&1&&(K(0,"mat-icon",4),Ce(1),Z()),t&2){let e=V(2);B("inline",!0),L(),qn("",e.layerInfo.visible==="visible"?"visibility":"visibility_off"," ")}}function rct(t,n){if(t&1&&Oe(0,"img",7),t&2){let e=V(3);B("src",e.ref.icon,ja)("width",16)}}function sct(t,n){if(t&1&&(K(0,"mat-icon",4),Ce(1),Z()),t&2){let e=V(3);zr("color",e.ref.iconColor),B("inline",!0),L(),qn("",e.ref.icon," ")}}function act(t,n){if(t&1&&Lt(0,rct,1,2,"img",7)(1,sct,2,4,"mat-icon",8),t&2){let e=V(2);Ft(e.ref.refType==="image-ref"?0:1)}}function lct(t,n){if(t&1){let e=Bt();K(0,"mat-icon",9),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.openActionDialog())}),Ce(1,"edit "),Z()}t&2&&B("inline",!0)}function cct(t,n){if(t&1&&(K(0,"div",1),Oe(1,"bd-map-legend-layer-color",10),Z()),t&2){let e=V(2);L(),B("ref",e.layerRefAs(e.ref))}}function dct(t,n){if(t&1){let e=Bt();K(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),Qe("click",function(){Ee(e);let o=V();return Ae(o.onToggleChange())}),Lt(4,oct,2,2,"mat-icon",4)(5,act,2,1),K(6,"span",5),Ce(7),Z()(),Lt(8,lct,2,1,"mat-icon",6),Z()(),Lt(9,cct,2,1,"div",1),Z()}if(t&2){let e=V();L(4),Ft(e.hover?4:5),L(2),fo("visibility_off",e.layerInfo.visible==="none"),L(),Di(e.ref.text),L(),Ft(e.hover&&e.ref.legend?8:-1),L(),Ft((e.ref==null?null:e.ref.refType)==="color-factory-ref"?9:-1)}}var jxe=(()=>{class t extends qs{constructor(e,i){super(),this._dialogService=e,this._cdr=i,this.visibleChange=new yt,this.actionChange=new yt,this.hover=!1}ngOnInit(){this.layerInfo.ref.subscribe(e=>{this.ref=e,this._cdr.markForCheck()})}ngOnDestroy(){this.unsubscribeAll()}mouseover(e){this.hover=!0}mouseleave(e){this.hover=!1}layerRefAs(e){return e}onToggleChange(){this.layerInfo.visible=this.layerInfo.visible==="visible"?"none":"visible",this.visibleChange.emit(this.layerInfo.visible)}openActionDialog(){if(this.ref.legend){let e=gt(ve({},nf),{header:this.ref.legend.action.title,data:gt(ve({},this.ref.legend.action.data),{commands:this.ref.legend.action.commands})}),i=this._dialogService.open(this.ref.legend.action.component,e).onClose.pipe(ro(o=>!!o)).subscribe(o=>{this.actionChange.emit(o)});this._subs.push(i)}}static{this.\u0275fac=function(i){return new(i||t)(rt(Zd),rt(Ho))}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map-legend-layer"]],hostBindings:function(i,o){i&1&&Qe("mouseenter",function(){return o.mouseover()})("mouseleave",function(){return o.mouseleave()})},inputs:{layerInfo:"layerInfo"},outputs:{visibleChange:"visibleChange",actionChange:"actionChange"},features:[Pi([Zd]),Rt],decls:2,vars:1,consts:[[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-row","gap-2","items-center"],[1,"flex-1","flex","flex-row","gap-2","items-center","cursor-pointer",3,"click"],[3,"inline"],[1,"flex-1","mat-body"],[1,"cursor-pointer",3,"inline"],["alt","Legend Image",3,"src","width"],[3,"inline","color"],[1,"cursor-pointer",3,"click","inline"],[3,"ref"]],template:function(i,o){i&1&&Lt(0,nct,1,0,"p-skeleton")(1,dct,10,6,"div",0),i&2&&Ft(o.ref?1:0)},dependencies:[Hxe,L5,VO,Ls,la],styles:[".visibility_off[_ngcontent-%COMP%]{text-decoration:line-through}"]})}}return t})();var uct=(t,n)=>n.layerControlId;function pct(t,n){if(t&1){let e=Bt();K(0,"div",1)(1,"bd-map-legend-layer",2),Qe("visibleChange",function(o){let r=Ee(e).$implicit,a=V();return Ae(a.onVisibleChange(r.layerControlId,o))})("actionChange",function(o){let r=Ee(e).$implicit,a=V();return Ae(a.onActionChange(r.layerControlId,o))}),Z()()}if(t&2){let e=n.$implicit;L(),B("layerInfo",e)}}function hct(t,n){if(t&1&&(K(0,"div",1),Ce(1),Z()),t&2){let e=n.$implicit;L(),Di(e)}}var Q0=(()=>{class t extends qs{constructor(){super(...arguments),this.staticInfo=[],this.layerInfos=[]}ngOnInit(){this._subs.push(this.controller.layerControls$.asObservable().pipe(ro(e=>e.action==="ACTIVE"),ro(e=>e.layerControl.legend.showInLegend)).subscribe(e=>{this.layerInfos.some(i=>i.layerControlId===e.layerControl.layerControlId)||(this.layerInfos.push({layerControlId:e.layerControl.layerControlId,visible:e.layerControl.visible,zIndex:e.layerControl.zIndex,ref:e.layerControl.legendRef}),this.layerInfos.sort((i,o)=>o.zIndex-i.zIndex))})),this._subs.push(this.controller.layerControls$.asObservable().pipe(ro(e=>e.action==="NOT_ACTIVE")).subscribe(e=>{this.layerInfos=this.layerInfos.filter(i=>i.layerControlId!==e.layerControl.layerControlId)}))}ngOnDestroy(){this.unsubscribeAll()}onVisibleChange(e,i){this.controller.setVisibility(e,i)}onActionChange(e,i){this.controller.setActionChange(e,i)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})()}static{this.\u0275cmp=Le({type:t,selectors:[["bd-map-legend"]],inputs:{controller:"controller",staticInfo:"staticInfo"},features:[Rt],decls:5,vars:0,consts:[["id","map-legend",1,"flex","flex-col","gap-2"],[1,"flex-1"],[3,"visibleChange","actionChange","layerInfo"]],template:function(i,o){i&1&&(K(0,"div",0),ea(1,pct,2,1,"div",1,uct),ea(3,hct,2,1,"div",1,ed),Z()),i&2&&(L(),ta(o.layerInfos),L(2),ta(o.staticInfo))},dependencies:[jxe],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 _ct=fu(Xxe(),1);var Ns=11102230246251565e-32;var RU=(3+8*Ns)*Ns;function hn(t){return new Float64Array(t)}var N$i=(3+16*Ns)*Ns,B$i=(2+12*Ns)*Ns,z$i=(9+64*Ns)*Ns*Ns,V$i=hn(4),U$i=hn(8),H$i=hn(12),j$i=hn(16),G$i=hn(4);var W$i=(7+56*Ns)*Ns,K$i=(3+28*Ns)*Ns,Z$i=(26+288*Ns)*Ns*Ns,Y$i=hn(4),Q$i=hn(4),X$i=hn(4),J$i=hn(4),eqi=hn(4),tqi=hn(4),iqi=hn(4),nqi=hn(4),oqi=hn(4),rqi=hn(8),sqi=hn(8),aqi=hn(8),lqi=hn(4),cqi=hn(8),dqi=hn(8),uqi=hn(8),pqi=hn(12),hqi=hn(192),mqi=hn(192);var _qi=(10+96*Ns)*Ns,yqi=(4+48*Ns)*Ns,vqi=(44+576*Ns)*Ns*Ns,bqi=hn(4),xqi=hn(4),Cqi=hn(4),wqi=hn(4),Sqi=hn(4),Iqi=hn(4),Tqi=hn(4),Eqi=hn(4),Aqi=hn(8),Dqi=hn(8),kqi=hn(8),Mqi=hn(8),Rqi=hn(8),Oqi=hn(8),Pqi=hn(8),Lqi=hn(8),Fqi=hn(8),Nqi=hn(4),Bqi=hn(4),zqi=hn(4),Vqi=hn(8),Uqi=hn(16),Hqi=hn(16),jqi=hn(16),Gqi=hn(32),$qi=hn(32),qqi=hn(48),Wqi=hn(64),Kqi=hn(1152),Zqi=hn(1152);var Jqi=(16+224*Ns)*Ns,eWi=(5+72*Ns)*Ns,tWi=(71+1408*Ns)*Ns*Ns,iWi=hn(4),nWi=hn(4),oWi=hn(4),rWi=hn(4),sWi=hn(4),aWi=hn(4),lWi=hn(4),cWi=hn(4),dWi=hn(4),uWi=hn(4),pWi=hn(24),hWi=hn(24),mWi=hn(24),fWi=hn(24),gWi=hn(24),_Wi=hn(24),yWi=hn(24),vWi=hn(24),bWi=hn(24),xWi=hn(24),CWi=hn(1152),wWi=hn(1152),SWi=hn(1152),IWi=hn(1152),TWi=hn(1152),EWi=hn(2304),AWi=hn(2304),DWi=hn(3456),kWi=hn(5760),MWi=hn(8),RWi=hn(8),OWi=hn(8),PWi=hn(16),LWi=hn(24),FWi=hn(48),NWi=hn(48),BWi=hn(96),zWi=hn(192),VWi=hn(384),UWi=hn(384),HWi=hn(384),jWi=hn(768);var GWi=hn(96),$Wi=hn(96),qWi=hn(96),WWi=hn(1152);var ydt=fu(D1e(),1);var Sdt=fu(XE());var WP={includeBund:!1,resetOption:!0};var KP=class extends qs{constructor(){super(),this.valid=!0,this.searching=!0,this.selectCtrl=new dc(this.emptySelection()),this.allOptions=new mo(1),this._onDestroy=new xi}init(n){this.placeholderLabel=`${n.selectLabel} suchen`,this.noEntriesFoundLabel=`Keine ${n.selectLabel} gefunden`,this.selectedItemsLabel=`{0} ${n.selectLabel} ausgew\xE4hlt`,this.selectCtrl.valueChanges.pipe(Wr(this._onDestroy),vi(e=>e||this.emptySelection())).subscribe(e=>this.onSelectionChange(e)),n.valid$&&n.valid$.pipe(Wr(this._onDestroy)).subscribe(e=>{this.valid=e.isValid,this.errorMessage=e.isValid?null:e.errorMessage??""})}setSelection(n,e){this.selectCtrl.setValue(n,e)}};var Adt=()=>["searchTerm"];function Ddt(t,n){if(t&1&&(K(0,"small",2),Ce(1),Z()),t&2){let e=V();B("id",e.selectConfig.id+"-help"),L(),Di(e.errorMessage)}}var XX=(()=>{class t extends KP{constructor(){super(),this.initialSelection=[],this.selectOptions=Ni([]),this.selection=new yt,this.optionsChange=new yt,this.overlayOptions={mode:"overlay",appendTo:"body"},this.selectConfig={id:"multi-select-option-group",selectLabel:"Element",option:{uniqueFnc:e=>"",sortFnc:(e,i)=>0,searchOptionAccessor:e=>"",searchOptionDisplayName:e=>""},emitEventOnInitialSelection:!1,valid$:new mo(1)},this._initialSelection$=new pm,this._subs.push(_u([this._initialSelection$.pipe(Ko(1),vi(e=>e.map(i=>this.transformToWrapper(i)))),this.optionsChange]).subscribe(e=>{this.setSelection(e[0],{emitEvent:this.selectConfig.emitEventOnInitialSelection})}))}ngOnChanges(e){e.config&&(this.selectConfig=gt(ve({id:`multi-select-option-group-${this.config.selectLabel}`,emitEventOnInitialSelection:!1,valid$:new mo(1)},this.config),{option:ve({searchOptionDisplayName:i=>this.config.option.searchOptionAccessor(i)},this.config.option)}),this.init(this.selectConfig)),e.selectOptions&&this._updateSelectOptions(),e.initialSelection&&e.initialSelection.currentValue&&(this.initialSelection instanceof Co?this._subs.push(this.initialSelection.subscribe(i=>{this._initialSelection$.next(i),this._initialSelection$.complete()})):(this._initialSelection$.next(this.initialSelection),this._initialSelection$.complete()))}ngOnDestroy(){this.unsubscribeAll(),this._onDestroy.next(),this._onDestroy.complete()}emptySelection(){return new Array}onSelectionChange(e){this.selection.emit(e.map(i=>i.realValue))}transformToWrapper(e){return{realValue:e,dataKey:this.selectConfig.option.uniqueFnc(e),searchTerm:this.selectConfig.option.searchOptionAccessor(e),displayName:this.selectConfig.option.searchOptionDisplayName(e)}}_updateSelectOptions(){this.searching=!0,this._subs.push(this.selectOptions.pipe(vi(e=>e.map(i=>this.transformToWrapper(i)))).subscribe({next:e=>{this.allOptions.next(e.slice().sort((i,o)=>this.selectConfig.option.sortFnc(i.realValue,o.realValue))),this.searching=!1,this.optionsChange.emit(e.map(i=>i.realValue))},error:e=>{console.warn(`Laden von ${this.selectConfig.selectLabel} nicht m\xF6glich`,e)}}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-ui-multi-select"]],inputs:{config:"config",initialSelection:"initialSelection",selectOptions:"selectOptions"},outputs:{selection:"selection",optionsChange:"optionsChange"},features:[Rt,In],decls:6,vars:22,consts:[["fluid","","variant","filled","dataKey","dataKey","optionLabel","displayName","filterBy","searchTerm",3,"inputId","data-test","formControl","options","loading","showClear","filter","filterFields","filterPlaceHolder","emptyFilterMessage","emptyMessage","overlayOptions","maxSelectedLabels","selectedItemsLabel"],[3,"for"],[1,"ng-invalid",3,"id"]],template:function(i,o){i&1&&(K(0,"p-iftalabel"),Oe(1,"p-multiSelect",0),el(2,"async"),K(3,"label",1),Ce(4),Z(),Lt(5,Ddt,2,2,"small",2),Z()),i&2&&(L(),Ge(o.valid?"mb-4":o.errorMessage?"ng-invalid ng-dirty":"mb-4 ng-invalid ng-dirty"),B("inputId",o.selectConfig.id)("data-test",o.selectConfig.id)("formControl",o.selectCtrl)("options",Dk(2,19,o.allOptions))("loading",o.searching)("showClear",!0)("filter",!0)("filterFields",Is(21,Adt))("filterPlaceHolder",o.placeholderLabel)("emptyFilterMessage",o.noEntriesFoundLabel)("emptyMessage",o.noEntriesFoundLabel)("overlayOptions",o.overlayOptions)("maxSelectedLabels",3)("selectedItemsLabel",o.selectedItemsLabel),L(2),B("for",o.selectConfig.id),L(),Di(o.selectConfig==null?null:o.selectConfig.selectLabel),L(),Ft(o.errorMessage?5:-1))},dependencies:[vg,k0e,N5,rp,il,$p,Ru,Vk],encapsulation:2,changeDetection:0})}}return t})();var M1e=(()=>{class t{constructor(){this.options=WP,this.stateSelect=new yt,this.config={id:"maps-state-select-inline-multiple",selectLabel:"Bundesland",option:{sortFnc:(e,i)=>e.name.localeCompare(i.name),uniqueFnc:e=>e.id.toString(),searchOptionAccessor:e=>e.name}},this.options$=zx}ngOnChanges(e){e.states&&e.states.currentValue&&(this.options$=Ni(this.states)),e.initialStateIds&&e.initialStateIds.currentValue&&(this.initialStates=this.initialStateIds.map(i=>({id:i,name:""})))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["bd-maps-state-select-inline-multiple"]],inputs:{states:"states",initialStateIds:"initialStateIds",options:"options"},outputs:{stateSelect:"stateSelect"},features:[In],decls:1,vars:3,consts:[[3,"selection","config","initialSelection","selectOptions"]],template:function(i,o){i&1&&(K(0,"bd-ui-multi-select",0),Qe("selection",function(a){return o.stateSelect.emit(a)}),Z()),i&2&&B("config",o.config)("initialSelection",o.initialStates)("selectOptions",o.options$)},dependencies:[XX],encapsulation:2,changeDetection:0})}}return t})();var VU=class extends Hd{constructor(n,e){super(),this._prevalence=n,this._administrativeDistricts=e}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getData(){return Object.keys(this._prevalence.prevalencePerAdId).map(e=>this._prevalence.prevalencePerAdId[e]).map(e=>{let i=this._administrativeDistricts[e.administrativeDistrictId],o=Xm.byId(i.id.getStateId());return[{value:e.administrativeDistrictId,type:"number"},{value:i.displayName(),type:"string"},{value:o?.name,type:"string"},{value:e.caseCount,type:"number"},{value:e.prevalencePer1Thousand,type:"number"},{value:e.prevalencePer100Thousand,type:"number"},{value:e.year,type:"string"}]})}_getFields(){return["Kreisschl\xFCssel","Landkreis/Kreis","Bundesland","Anzahl F\xE4lle","F\xE4lle pro 1000 Einwohner","F\xE4lle pro 100.000 Einwohner","Jahr"]}};var Fb=class{static translateFieldName(n){return n==="caseCount"?"Anzahl F\xE4lle":n==="prevalencePer1Thousand"?"F\xE4lle pro 1.000 Einwohner":n==="prevalencePer100Thousand"?"F\xE4lle pro 100.000 Einwohner":""}};function Rdt(t,n){if(t&1&&(K(0,"tr")(1,"th"),Ce(2,"Bereich"),Z(),K(3,"th",3),Ce(4),Oe(5,"p-sortIcon",4),Z()()),t&2){let e=V();L(3),B("pSortableColumn",e.prevalenceFieldSelection),L(),qn(" ",e.prevalenceFieldSelectionText," "),L(),B("field",e.prevalenceFieldSelection)}}function Odt(t,n){if(t&1&&(K(0,"tr")(1,"td")(2,"div"),Ce(3),Z()(),K(4,"td")(5,"span",5),Ce(6),el(7,"number"),Z()()()),t&2){let e=n.$implicit,i=V();L(3),Di(e.administrativeDistrict.otherName),L(3),Di(Ec(7,2,e[i.prevalenceFieldSelection],"1.0-2"))}}var R1e=(()=>{class t{constructor(){this.tableItems=[]}ngOnInit(){this.prevalenceFieldSelectionText=Fb.translateFieldName(this.prevalenceFieldSelection)}ngOnChanges(e){e.prevalence&&e.prevalence.currentValue&&this._onPrevalenceChange()}_onPrevalenceChange(){this.tableItems=Object.values(this.prevalence.prevalencePerAdId).map(e=>{let i=this.administrativeDistricts[e.administrativeDistrictId];return gt(ve({},e),{administrativeDistrict:i})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-prevalence-table"]],inputs:{prevalence:"prevalence",administrativeDistricts:"administrativeDistricts",prevalenceFieldSelection:"prevalenceFieldSelection"},features:[In],decls:3,vars:5,consts:[[3,"value","paginator","rows","sortField","sortOrder"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[1,"mat-body-2"]],template:function(i,o){i&1&&(K(0,"p-table",0),le(1,Rdt,6,3,"ng-template",1)(2,Odt,8,5,"ng-template",2),Z()),i&2&&B("value",o.tableItems)("paginator",!0)("rows",10)("sortField",o.prevalenceFieldSelection)("sortOrder",-1)},dependencies:[gp,sd,Uo,GE,$E,kn,yl],encapsulation:2})}}return t})();var O1e=(()=>{class t{constructor(e){this._districtService=e,this.prevalenceFieldSelection="prevalencePer100Thousand",this.colorFactory=new Sg({low:new Us("hsl(120, 100%, 50%)"),high:new Us("hsl(0, 100%, 50%)")}),this.mapOptions=gt(ve({},ef),{center:[10.447683,51.163361],zoom:5}),this.mapController=new Jm;let i=Fb.translateFieldName(this.prevalenceFieldSelection);this._districtLayer=new _A("districts",new gA(i),this._districtService),this._districtLayer.colorFactory$.next(this.colorFactory),this.mapController.registerLayer(this._districtLayer)}ngOnInit(){this.prevalenceFieldSelectionText=Fb.translateFieldName(this.prevalenceFieldSelection),this._districtLayer.displayName=Fb.translateFieldName(this.prevalenceFieldSelection),this._districtLayer.data$.next(this._fieldNameFromPrevalence(this.prevalenceFieldSelection))}onMapLoaded(e){this.mapController.addMapRef(e)}_fieldNameFromPrevalence(e){let i=Object.keys(this.prevalence.prevalencePerAdId).map(r=>Ps.create(r)),o={};return i.forEach(r=>{o[r.value]=this.prevalence.prevalencePerAdId[r.getNumericValue()][e]}),o}static{this.\u0275fac=function(i){return new(i||t)(rt(cf))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-prevalence-map"]],inputs:{prevalence:"prevalence",prevalenceFieldSelection:"prevalenceFieldSelection"},decls:3,vars:2,consts:[[1,"map-container"],[3,"mapLoaded","mapOptions"],[3,"controller"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"bd-map",1),Qe("mapLoaded",function(a){return o.onMapLoaded(a)}),Z(),Oe(2,"bd-map-legend",2),Z()),i&2&&(L(),B("mapOptions",o.mapOptions),L(),B("controller",o.mapController))},dependencies:[t_,Q0],styles:[".map-container[_ngcontent-%COMP%]{min-height:600px;height:600px;position:relative}"]})}}return t})();function Pdt(t,n){if(t&1&&(K(0,"div"),Oe(1,"ays-code-browser-result-export",11),Z()),t&2){let e=V();L(),B("filename",e.filename)("data",e.getPrevalenceData())("exportConfig",e.exportConfig)}}function Ldt(t,n){if(t&1&&(K(0,"span",9),Ce(1),Z()),t&2){let e=V();L(),Di(e.prevalence.additionalInformation.text)}}function Fdt(t,n){if(t&1&&(K(0,"div",12)(1,"div",3),Oe(2,"ays-code-browser-result-prevalence-map",13),Z(),K(3,"div",3),Oe(4,"ays-code-browser-result-prevalence-table",14),Z()()),t&2){let e=V();L(2),B("prevalenceFieldSelection",e.prevalenceFieldSelection)("prevalence",e.prevalence),L(2),B("prevalenceFieldSelection",e.prevalenceFieldSelection)("prevalence",e.prevalence)("administrativeDistricts",e.administrativeDistricts)}}function Ndt(t,n){t&1&&Oe(0,"bd-message-empty",15)}var EA=(()=>{class t{constructor(e,i){this._codeService=e,this._administrativeDistrictService=i,this.year=dp,this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-prevalence"})}),this.loading$=new mo(1),this.prevalenceSelectionCtrl=new pT("prevalencePer100Thousand",[]),this.filename="",this.prevalenceFieldSelection=this.prevalenceSelectionCtrl.value}ngOnInit(){this.filename=`${this.code.name}_Verteilung`,this.prevalenceSelectionCtrl.valueChanges.subscribe(e=>this._onPrevalenceSelectionChange(e)),this.prevalenceSelectionCtrl.patchValue("prevalencePer100Thousand")}getPrevalenceData(){return new VU(this.prevalence,this.administrativeDistricts)}_onPrevalenceSelectionChange(e){this.loading$.next(Cn.LOADING),this._codeService.prevalence(this.code.codingSystem,this.code.name,new Mr().append("year",this.year.toString())).pipe(wo(i=>{let o=Object.keys(i.prevalencePerAdId).map(r=>Ps.create(r));return Hl([Ni(i),this._administrativeDistrictService.findAll(o)])})).subscribe({next:i=>{this.prevalence=i[0],this.administrativeDistricts=i[1],this.prevalenceFieldSelection=e,this.loading$.next(Cn.SUCCESS)},error:i=>{console.error(i),this.loading$.next(Cn.ERROR)}})}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl),rt(cf))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-prevalence"]],inputs:{code:"code",year:"year"},decls:22,vars:6,consts:[["successTpl",""],["errorTpl",""],[1,"flex","flex-col"],[1,"flex-1"],[1,"flex","flex-row-reverse","gap-6","items-center"],[3,"formControl"],["value","caseCount"],["value","prevalencePer1Thousand"],["value","prevalencePer100Thousand"],[1,"flex-1","mat-caption","justify-self-start"],[3,"loadItem","successTemplate","errorTemplate"],[3,"filename","data","exportConfig"],[1,"flex","flex-col","md:flex-row","md:gap-6"],[3,"prevalenceFieldSelection","prevalence"],[3,"prevalenceFieldSelection","prevalence","administrativeDistricts"],["message","Die Verteilung f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1&&(K(0,"div",2)(1,"div",3)(2,"div",4),Lt(3,Pdt,2,3,"div"),K(4,"div")(5,"mat-form-field")(6,"mat-label"),Ce(7,"Ansicht"),Z(),K(8,"mat-select",5)(9,"mat-option",6),Ce(10,"Anzahl F\xE4lle"),Z(),K(11,"mat-option",7),Ce(12,"F\xE4lle pro 1.000 Einwohner "),Z(),K(13,"mat-option",8),Ce(14,"F\xE4lle pro 100.000 Einwohner "),Z()()()(),Lt(15,Ldt,2,1,"span",9),Z()(),K(16,"div",3),Oe(17,"bd-loader",10),Z()(),le(18,Fdt,5,5,"ng-template",null,0,Hi)(20,Ndt,1,0,"ng-template",null,1,Hi)),i&2){let r=un(19),a=un(21);L(3),Ft(o.prevalence&&o.administrativeDistricts?3:-1),L(5),B("formControl",o.prevalenceSelectionCtrl),L(7),Ft(!(o.prevalence==null||o.prevalence.additionalInformation==null)&&o.prevalence.additionalInformation.text?15:-1),L(2),B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[zd,vd,Lm,A1,E1,sp,rp,il,$p,qp,Qd,mr,O1e,R1e,Ca],encapsulation:2})}}return t})();var AA=(function(t){return t[t.SEARCH=0]="SEARCH",t[t.EXPLORER=1]="EXPLORER",t})(AA||{}),uf="#1a5e7d",YP="#009179",UU="#ffa600";var HU=class extends Hd{constructor(n){super(),this._casesTimeSeries=n}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getData(){let n=[];return Object.keys(this._casesTimeSeries.timeseries).map(e=>{let i=Vu.find(o=>o.id.toString()===e);Object.keys(this._casesTimeSeries.timeseries[e]).map(o=>{let r=this._casesTimeSeries.timeseries[e][o];n.push([{value:i.name,type:"string"},{value:o,type:"string"},{value:r,type:"number"}])})}),n}_getFields(){return["Bundesland","Jahr","Anzahl F\xE4lle"]}};var L1e=(()=>{class t{constructor(){this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-cases-time-series"})})}ngOnInit(){this.data=new HU(this.casesTimeSeries)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-cases-time-series-export"]],inputs:{casesTimeSeries:"casesTimeSeries"},decls:1,vars:2,consts:[["filename","Fall-Entwicklung",3,"data","exportConfig"]],template:function(i,o){i&1&&Oe(0,"ays-code-browser-result-export",0),i&2&&B("data",o.data)("exportConfig",o.exportConfig)},dependencies:[Qd],encapsulation:2})}}return t})();function Bdt(t,n){if(t&1&&(K(0,"div",4)(1,"span",11),Ce(2),Z()()),t&2){let e=V(2);L(2),Di(e.casesTimeSeries.additionalInformation.text)}}function zdt(t,n){if(t&1){let e=Bt();K(0,"div",4)(1,"bd-maps-state-select-inline-multiple",12),Qe("stateSelect",function(o){Ee(e);let r=V(2);return Ae(r.onStateSelectionChange(o))}),Z()()}if(t&2){let e=V(2);L(),B("states",e.availableStates)("initialStateIds",e.selectedStates)}}function Vdt(t,n){if(t&1&&(K(0,"div",3),Lt(1,Bdt,3,1,"div",4),K(2,"div",5)(3,"div",6),Lt(4,zdt,2,2,"div",4),K(5,"div",7),Oe(6,"ays-code-browser-cases-time-series-export",8),Z()()()(),K(7,"div",9),Oe(8,"ays-code-browser-canvas-watermarked",10),Z()),t&2){let e=V();L(),Ft(!(e.casesTimeSeries==null||e.casesTimeSeries.additionalInformation==null)&&e.casesTimeSeries.additionalInformation.text?1:-1),L(3),Ft(e.availableStates.length>1?4:-1),L(2),B("casesTimeSeries",e.casesTimeSeries),L(2),B("canvasId","cases-time-series")("chartConfig",e.chartConfig)}}function Udt(t,n){t&1&&Oe(0,"bd-message-empty",13)}var DA=(()=>{class t{constructor(e,i){this._codeService=e,this._decimalPipe=i,this.availableStates=Vu,this.loading$=new mo(1),this.selectedStates=Vu.filter(o=>o.id===-1).map(o=>o.id)}ngOnInit(){this.loading$.next(Cn.LOADING),this._codeService.getCasesTimeSeries(this.codingSystem,this.codeName).subscribe({next:e=>{this.casesTimeSeries=e,this._validate(this.casesTimeSeries)?(this.availableStates=Object.keys(this.casesTimeSeries.timeseries).map(i=>parseInt(i,10)).map(i=>Xm.byId(i)),this.chartConfig=this._createChartConfig(this.selectedStates.map(i=>Xm.byId(i))),this.loading$.next(Cn.SUCCESS)):this.loading$.next(Cn.ERROR)},error:()=>this.loading$.next(Cn.ERROR)})}onStateSelectionChange(e){this.chartConfig=this._createChartConfig(e)}_createChartConfig(e){let i=Object.keys(this.casesTimeSeries.timeseries[-1]),o=this._decimalPipe;return{type:"line",data:{labels:i,datasets:e.sort((r,a)=>r.id-a.id).filter(r=>Object.keys(this.casesTimeSeries.timeseries[r.id]).length>0).map(r=>this._chartDataSet(r))},options:{responsive:!0,aspectRatio:4/3,maintainAspectRatio:!1,plugins:{legend:{position:"bottom"},tooltip:Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(r){return`${r.dataset.label}: ${o.transform(r.raw)} F\xE4lle`}}))},elements:{line:{fill:!1,tension:0}},scales:{y:{beginAtZero:!0}}}}}_chartDataSet(e){return{data:Object.keys(this.casesTimeSeries.timeseries[e.id]).map(i=>this.casesTimeSeries.timeseries[e.id][i]),label:e.name,backgroundColor:this._stateToColor(e),borderColor:this._stateToColor(e)}}_validate(e){return e.timeseries[-1]&&Object.keys(e.timeseries[-1]).length>0}_stateToColor(e){let i=uf;switch(e.id){case-1:{i=UU;break}case 1:{i="#cce9e4";break}case 2:{i="#d1dfe5";break}case 3:{i="#a3bfcb";break}case 4:{i="#99d3c9";break}case 5:{i="#66bdaf";break}case 6:{i="#769eb1";break}case 7:{i="#33a794";break}case 8:{i="#487e97";break}case 9:{i="#009179";break}case 10:{i="#007461";break}case 11:{i="#1a5e7d";break}case 12:{i="#005749";break}case 13:{i="#154b64";break}case 14:{i="#124258";break}case 15:{i="#003a30";break}case 16:{i="#03090d";break}}return i}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl),rt(yl))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-cases-time-series"]],inputs:{codingSystem:"codingSystem",codeName:"codeName"},features:[Pi([yl])],decls:5,vars:3,consts:[["successTpl",""],["errorTpl",""],[3,"loadItem","successTemplate","errorTemplate"],[1,"flex","flex-col","md:flex-row","gap-4","md:justify-end"],[1,"grow"],[1,"grow","md:grow-0"],[1,"flex","flex-row","gap-4"],[1,"grow-0"],[3,"casesTimeSeries"],[2,"height","300px"],[3,"canvasId","chartConfig"],[1,"mat-caption"],[3,"stateSelect","states","initialStateIds"],["message","Die Fall-Entwicklung f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",2),le(1,Vdt,9,5,"ng-template",null,0,Hi)(3,Udt,1,0,"ng-template",null,1,Hi)),i&2){let r=un(2),a=un(4);B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[mr,M1e,L1e,Kh,Ca],encapsulation:2})}}return t})();function Hdt(t,n){if(t&1&&(K(0,"div",3),Oe(1,"ays-code-browser-canvas-watermarked",4),Z()),t&2){let e=V();L(),B("canvasId","drg-main-department-time-series")("chartConfig",e.chartConfig)}}function jdt(t,n){t&1&&Oe(0,"bd-message-empty",5)}var F1e=(()=>{class t{constructor(e){this._drgCodeService=e,this.loading$=new mo(1)}ngOnInit(){this.loading$.next(Cn.LOADING),this._drgCodeService.mainDepartmentTimeSeries(this.drgCode.name).subscribe({next:e=>{Object.keys(e.timeSeries).length>0?(this._updateChart(e),this.loading$.next(Cn.SUCCESS)):this.loading$.next(Cn.ERROR)},error:()=>this.loading$.next(Cn.ERROR)})}_updateChart(e){let i=Object.keys(e.timeSeries),o=i,r=[{label:"Mittlere Verweildauer",data:i.map(a=>e.timeSeries[a].mittlereVerweildauer),backgroundColor:uf,borderColor:uf},{label:"Untere Verweildauer",data:i.map(a=>e.timeSeries[a].mdLowerStayDay),backgroundColor:YP,borderColor:YP}];this.chartConfig={type:"line",options:this._chartConfigOptions(),data:{labels:o,datasets:r}}}_chartConfigOptions(){return{responsive:!0,aspectRatio:4/3,maintainAspectRatio:!1,elements:{line:{fill:!1,tension:0}},plugins:{legend:{position:"bottom"},tooltip:Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(e){return`${e.raw} Tage`}}))},scales:{y:gt(ve({},qbe),{beginAtZero:!0,ticks:{callback:e=>`${e} Tage`}})}}}static{this.\u0275fac=function(i){return new(i||t)(rt(Zz))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-drg-main-department-time-series"]],inputs:{drgCode:"drgCode"},decls:5,vars:3,consts:[["successTpl",""],["errorTpl",""],[3,"loadItem","successTemplate","errorTemplate"],[2,"height","300px"],[3,"canvasId","chartConfig"],["message","Die Verweildauer-Entwicklung f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",2),le(1,Hdt,2,2,"ng-template",null,0,Hi)(3,jdt,1,0,"ng-template",null,1,Hi)),i&2){let r=un(2),a=un(4);B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[mr,Kh,Ca],encapsulation:2})}}return t})();var kA=class t extends Hd{static percentageByGender(n,e){return e.percentageCountByGender[n]?e.percentageCountByGender[n].percentage:0}constructor(n){super(),this._ageGroupDistribution=n}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFieldNames()})}_getData(){return Object.keys(this._ageGroupDistribution.percentageByAgmId).map(n=>{let e=this._ageGroupDistribution.year,i=Mye[n],o=this._ageGroupDistribution.percentageByAgmId[n],r=t.percentageByGender("FEMALE",o)*100,a=t.percentageByGender("MALE",o)*100,p=t.percentageByGender("UNKNOWN",o)*100;return[{value:e,type:"string"},{value:i,type:"string"},{value:o.percentage*100,type:"number",format:{minimumFractionDigits:2,maximumFractionDigits:2}},{value:r,type:"number",format:{minimumFractionDigits:2,maximumFractionDigits:2}},{value:a,type:"number",format:{minimumFractionDigits:2,maximumFractionDigits:2}},{value:p,type:"number",format:{minimumFractionDigits:2,maximumFractionDigits:2}}]})}_getFieldNames(){return["Jahr","Altersgruppe","Verteilung","Verteilung (weiblich)","Verteilung (m\xE4nnlich)","Verteilung (unbekannt)"]}};var Un=class{constructor(n){this.type=n}equals(n){return!!n&&this.type===n.type}valid(){let n=this.toValue();return n instanceof Array?!!n&&n.length>0:!!n}hasRelativeTimeSelection(){return!1}getChildResources(){return{}}overrideClone(n){return this.clone()}getOverrideProperties(n,e){return[]}};var QP=class{static fromObject(n,e){switch(n.kind){case"AND":return ZC.fromObject(n,e);case"OR":return Nb.fromObject(n,e);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(n)}]`)}}static fromConditionJson(n,e,i){switch(n){case qO:return ZC.fromConditionJson(e,i);case $O:return Nb.fromConditionJson(e,i);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(e)}]`)}}},jU=class{static fromObject(n,e){throw new Error(JSON.stringify([n,e]))}static fromConditionJson(n,e){throw new Error(JSON.stringify([n,e]))}constructor(n){this.expression=n,this.type="combination"}equals(n){return ko.equals(this,n,(e,i)=>e.type===i.type)&&ko.equals(this.kind,n.kind)&&ko.equals(this.expression,n.expression,(e,i)=>e.length===i.length)&&this.expression.every((e,i)=>ju.equals(e,n.expression.at(i)))}valid(){return!!this.kind&&(this.expression.length===0||this.expression.every(n=>n.valid()))}getChildResources(){return this.expression.map(n=>n.getChildResources()).reduce((n,e)=>I5.merge(n,e),{})}getOverrideProperties(n,e){return this.expression.map(i=>i.getOverrideProperties(n,e)).reduce((i,o)=>[...i,...o],[])}hasRelativeTimeSelection(){return this.expression.some(n=>n.hasRelativeTimeSelection())}toJSON(){return{type:this.type,kind:this.kind,expression:this.expression.filter(n=>!!n).map(n=>n.toJSON())}}toText(){return this.expression.filter(n=>!!n).map(n=>n.type==="combination"?`( ${n.toText()} )`:n.toText()).join(` ${this.kindToText()} `)}},ZC=class t extends jU{static fromObject(n,e){return Promise.all(n.expression.map(i=>ju.fromObject(i,e))).then(i=>new t(i))}static fromConditionJson(n,e){return Promise.all(n.conditions.map(i=>ju.fromConditionJson(i,e))).then(i=>new t(i))}constructor(n){super(n),this.kind="AND"}clone(){return new t([...this.expression.map(n=>n.clone())])}overrideClone(n){return new t(this.expression.map(e=>e.overrideClone(n)).filter(e=>!!e))}toCondition(n){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(n))).then(e=>new jg(e))}kindToText(){return"und"}},Nb=class t extends jU{static fromObject(n,e){return Promise.all(n.expression.map(i=>ju.fromObject(i,e))).then(i=>new t(i))}static fromConditionJson(n,e){let i=n.conditions.map(o=>ju.fromConditionJson(o,e));return Promise.all(i).then(o=>new t(o))}constructor(n){super(n),this.kind="OR"}clone(){return new t([...this.expression.map(n=>n.clone())])}overrideClone(n){return new t(this.expression.map(e=>e.overrideClone(n)).filter(e=>!!e))}toCondition(n){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(n))).then(e=>new YE(e))}kindToText(){return"oder"}};var Gdt="administrativeDistrictId",N1e={type:"administrativeDistrictIds",category:"person",displayName:{de:"Landkreise"},sortingIndex:4,occurrence:"single",fromObject(t){return Promise.resolve(new Bb(t.administrativeDistrictIds.map(n=>Ps.create(n))))},fromCondition(t){return Promise.resolve(new Bb(t?.includes?.map(n=>Ps.create(n))))},newInstance(){return Promise.resolve(new Bb([]))}},Bb=(()=>{class t extends Un{static{this.Specification=N1e}constructor(e){super(N1e.type),this.administrativeDistrictIds=e}clone(){return new t([...this.administrativeDistrictIds.map(e=>e.clone())])}equals(e){return super.equals(e)&&go.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(i,o)=>i.value===o.value)}validationToText(){return this.administrativeDistrictIds.length===0?"Mindestens einen Landkreis ausw\xE4hlen":""}toCondition(){return Promise.resolve(new XP(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})(),XP=class extends Eo{constructor(n,e){super(Gdt,n?n.map(i=>i.getNumericValue()):null,e?e.map(i=>i.getNumericValue()):null)}};var $dt="administrativeRegion",B1e={type:"administrativeRegionIds",category:"person",displayName:{de:"Regierungsbezirke"},sortingIndex:2,occurrence:"single",fromObject(t){return Promise.resolve(new YC(t.administrativeRegionIds))},fromCondition(t){return Promise.resolve(new YC(t.includes))},newInstance(){return Promise.resolve(new YC([]))}},YC=(()=>{class t extends Un{static{this.Specification=B1e}constructor(e){super(B1e.type),this.administrativeRegionIds=e}clone(){return new t([...this.administrativeRegionIds?this.administrativeRegionIds:[]])}equals(e){return super.equals(e)&&go.equals(this.administrativeRegionIds,e.administrativeRegionIds)}validationToText(){return this.administrativeRegionIds.length===0?"Mindestens einen Regierungsbezirk ausw\xE4hlen":""}toCondition(){return Promise.resolve(new JX(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})(),JX=class extends Eo{constructor(n,e){super($dt,n,e)}};var Kdt="careServiceArea",z1e={type:"careServiceAreaIds",category:"person",displayName:{de:"Versorgungsgebiete"},sortingIndex:3,occurrence:"single",fromObject(t){return Promise.resolve(new QC(t.careServiceAreaIds))},fromCondition(t){return Promise.resolve(new QC(t.includes))},newInstance(){return Promise.resolve(new QC([]))}},QC=(()=>{class t extends Un{static{this.Specification=z1e}constructor(e){super(z1e.type),this.careServiceAreaIds=e}clone(){return new t([...this.careServiceAreaIds?this.careServiceAreaIds:[]])}equals(e){return super.equals(e)&&go.equals(this.careServiceAreaIds,e.careServiceAreaIds)}validationToText(){return this.careServiceAreaIds.length===0?"Mindestens ein Versorgungsgebiet ausw\xE4hlen":""}toCondition(){return Promise.resolve(new eJ(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})(),eJ=class extends Eo{constructor(n,e){super(Kdt,n,e)}};var Zdt="clinicBeds",V1e={type:"clinicBeds",category:"clinic",displayName:{de:"Klinik-Betten"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new JP(t.from,t.to))},fromCondition(t){return Promise.resolve(new JP(t.from,t.to))},newInstance(){return Promise.resolve(new JP(null,null))}},JP=(()=>{class t extends Un{static{this.Specification=V1e}constructor(e,i){super(V1e.type),this.from=e,this.to=i}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&ko.equals(this.from,e.from)&&ko.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.from{class t extends Un{static{this.Specification=U1e}constructor(e,i){super(U1e.type),this.nrwServiceGroupId=e,this.qualification=i}clone(){return new t(this.nrwServiceGroupId,this.qualification)}equals(e){return super.equals(e)&&ko.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&ko.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 iJ(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})(),iJ=class extends pa{constructor(n,e){super(Ydt),this.lgNr=n,this.flag=e}toJSON(){return{[this.id]:{lgNr:this.lgNr,flag:this.flag}}}};var Qdt="clinicLevel",H1e={type:"clinicLevels",category:"clinic",displayName:{de:"Versorgungslevel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new tL(t.includes))},fromCondition(t){return Promise.resolve(new tL(t.includes))},newInstance(){return Promise.resolve(new tL([]))}},tL=(()=>{class t extends Un{static{this.Specification=H1e}constructor(e){super(H1e.type),this.includes=e}clone(){return new t([...this.includes])}equals(e){return super.equals(e)&&go.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens ein Versorgungslevel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new nJ(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})(),nJ=class extends Eo{constructor(n,e){super(Qdt,n,e)}};var Xdt="physicianRequirements",j1e={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 Un{static{this.Specification=j1e}constructor(e,i,o){super(j1e.type),this.nrwServiceGroupId=e,this.qualification=i,this.availability=o}clone(){return new t(this.nrwServiceGroupId,this.qualification,this.availability)}equals(e){return super.equals(e)&&ko.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&ko.equals(this.availability,e.availability)&&ko.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 oJ(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})(),oJ=class extends pa{constructor(n,e,i){super(Xdt),this.lgNr=n,this.qualification=e,this.availability=i}toJSON(){return{[this.id]:{lgNr:this.lgNr,qualification:this.qualification,availability:this.availability}}}};var Jdt="clinicType",G1e={type:"clinicTypes",category:"clinic",displayName:{de:"Tr\xE4gerart"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new nL(t.clinicTypes))},fromCondition(t){return Promise.resolve(new nL(t.includes))},newInstance(){return Promise.resolve(new nL([]))}},nL=(()=>{class t extends Un{static{this.Specification=G1e}constructor(e){super(G1e.type),this.clinicTypes=e}clone(){return new t([...this.clinicTypes])}equals(e){return super.equals(e)&&go.equals(this.clinicTypes,e.clinicTypes)}validationToText(){return this.clinicTypes.length===0?"Mindestens eine Tr\xE4gerart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new rJ(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})(),rJ=class extends Eo{constructor(n,e){super(Jdt,n,e)}};var oL=class t extends Ws{static fromObject(n){return new t(n.name,n.description,n.codingSystem,n.hierarchyElementType,n.year,n.codeSpectrumId,n.weight)}constructor(n,e,i,o,r,a,p){super(n,e,i,o,r),this.codeSpectrumId=a,this.weight=p}clone(){return new t(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year,this.codeSpectrumId,this.weight)}toJSON(){return gt(ve({},super.toJSON()),{codeSpectrumId:this.codeSpectrumId,weight:this.weight})}};var eut="drgCode";var rL=class extends Eo{constructor(n,e){super(eut,n,e)}};var $U={type:"codes",category:"case",displayName:{de:"Ziffer-Spektra"},sortingIndex:8,occurrence:"multiple",fromObject(t){let n=t.matching||"exact",e;return t.codeTypeSpecification&&(e=t.codeTypeSpecification),Promise.resolve(new sL(t.codeSpectrumIds||[],t.codingSystem,n,e,t.codeTypeClassification,t.includes,t.grouperVersionYear))},fromCondition(t){let n=[];return t.includes&&(n=t.includes.map(e=>e).map(e=>new oL(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),t.excludes&&(n=t.excludes.map(e=>e).map(e=>new oL(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),Promise.resolve(new sL(t.codeSpectrumIds,t.codingSystem,t.matching,t.codeTypeSpecification,t.codeTypeClassification,!t?.excludes,t.grouperVersionYear,n))},newInstance(){return Promise.resolve(new sL([],"OPS"))}},sL=(()=>{class t extends Un{static{this.Specification=$U}constructor(e,i,o="exact",r,a,p=!0,f,x=[]){super($U.type),this.codeSpectrumIds=e,this.codingSystem=i,this.matching=o,this.codeTypeSpecification=r,this.codeTypeClassification=a,this.includes=p,this.grouperVersionYear=f,this.codes=x}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)&&go.equals(this.codeSpectrumIds,e.codeSpectrumIds)&&ko.equals(this.codingSystem,e.codingSystem)&&ko.equals(this.matching,e.matching)&&ko.equals(this.codeTypeClassification,e.codeTypeClassification,(i,o)=>ko.equals(i?.name,o?.name)&&ko.equals(i?.numberOfDigit,o?.numberOfDigit))&&ko.equals(this.codeTypeSpecification,e.codeTypeSpecification,(i,o)=>JSON.stringify(i)===JSON.stringify(o))&&ko.equals(this.includes,e.includes)&&ko.equals(this.grouperVersionYear,e.grouperVersionYear)}getChildResources(){let e=[];return this.codeSpectrumIds.forEach(i=>{e.indexOf(i)===-1&&e.push(i)}),{[jo.CODE_SPECTRUM]:e}}valid(){return super.valid()&&this.codeSpectrumIds&&this.codeSpectrumIds.length>0}validationToText(){return this.codeSpectrumIds.length===0?"Mindestens ein Ziffer-Spektrum ausw\xE4hlen":""}toText(){return this.codeSpectrumIds.length===1?"ein Ziffer-Spektrum":`${this.codeSpectrumIds.length} Ziffer-Spektra`}toJSON(){return{type:this.type,codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem,codeTypeSpecification:this.codeTypeSpecification,codeTypeClassification:this.codeTypeClassification,matching:this.matching,includes:this.includes,grouperVersionYear:this.grouperVersionYear}}toValue(){return this}toCondition(e){if(!e.codeSpectra)throw new Error("Missing dependency resolver: codeSpectra");return e.codeSpectra.resolve({codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem}).then(o=>{this.codes=o;let r=null;switch(this.codingSystem){case"ICD-10-UK":case"ICD-10-AT":case"ICD-10-GM":r=this._toIcdCondition();break;case"OPS":r=this._toOpsCondition();break;case"G-DRG":this.grouperVersionYear?r=this.includes?new GO(this.grouperVersionYear,this.codes,null):new GO(this.grouperVersionYear,null,this.codes):r=this.includes?new rL(this.codes,null):new rL(null,this.codes);break;default:throw new Error(`Invalid coding system: ${this.codingSystem}`)}return r})}_toIcdCondition(){let e=this.codeTypeSpecification,i;switch(e){case"secondaryDiagnosis":{i=this._toSecondaryDiagnosisCondition();break}case"skCode":{i=this._toIcdSecondaryCode();break}default:{i=this._toMainDiagnosisCondition();break}}return this.includes?i.includes=this.codes:i.excludes=this.codes,i}_toMainDiagnosisCondition(){return this.matching==="exact"?new JO(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new eP(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 tP(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new iP(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toOpsCondition(){let e=this.codeTypeSpecification,i;switch(e){case"mainProcedure":{i=this._toOpsMainProcedure();break}default:{i=this._toOpsCode();break}}return this.includes?i.includes=this.codes:i.excludes=this.codes,i}_toOpsMainProcedure(){return this.matching==="exact"?new Y5(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Q5(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 J5(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new e6(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 tA(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new X5(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}}return t})();var iut="fabKey",$1e={type:"fabKeys",category:"case",displayName:{de:"\xA7301 Fachabteilungsschl\xFCssel"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new aL(t.fabKeys))},fromCondition(t){return Promise.resolve(new aL(t.includes))},newInstance(){return Promise.resolve(new aL([]))}},aL=(()=>{class t extends Un{static{this.Specification=$1e}constructor(e){super($1e.type),this.fabKeys=e}clone(){return new t([...this.fabKeys])}equals(e){return super.equals(e)&&go.equals(this.fabKeys,e.fabKeys)}overrideClone(e){let i=this.fabKeys?wg.overrideProperties(this.fabKeys,"fabKey",e,o=>o):null;return new t(i)}getOverrideProperties(e,i){return this.fabKeys.map(o=>new Cg(e,"fabKey",o,o,"possible",i))}validationToText(){return this.fabKeys.length===0?"Mindestens einen \xA7301 Fachabteilungsschl\xFCssel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new aJ(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})(),aJ=class extends Eo{constructor(n,e){super(iut,n,e)}};var nut="fullyInpatientCases",q1e={type:"fullyInpatientCases",category:"clinic",displayName:{de:"Fallzahl"},sortingIndex:8,occurrence:"multiple",fromObject(t){return Promise.resolve(new lL(t.from,t.to))},fromCondition(t){return Promise.resolve(new lL(t.from,t.to))},newInstance(){return Promise.resolve(new lL(null,null))}},lL=(()=>{class t extends Un{static{this.Specification=q1e}constructor(e,i){super(q1e.type),this.from=e,this.to=i}clone(){return new t(this.from,this.to)}equals(e){return super.equals(e)&&ko.equals(this.from,e.from)&&ko.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.fromPs.create(n))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new cL(t.coordinate,t.value,Nl.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Ps.create(n))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new cL(null,null,null,[],[]))}},cL=(()=>{class t extends Un{static{this.Specification=W1e}constructor(e,i,o,r,a){super(W1e.type),this.coordinate=e,this.value=i,this.clinicId=o,this.administrativeDistricts=r,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)&&ko.equals(this.value,e.value)&&go.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 dJ(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 cJ(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),cJ=class{constructor(n,e,i,o,r){this.coordinate=n,this.value=e,this.clinicId=i,this.administrativeDistricts=o,this.postalCodes=r}},dJ=class extends pa{constructor(n){super(out),this._value=n}toJSON(){return{[this.id]:{value:this._value.value,coordinate:this._value.coordinate,clinicId:this._value.clinicId,postalCodes:this._value.postalCodes,administrativeDistricts:this._value.administrativeDistricts.map(n=>n.getNumericValue())}}}};var rut="drivingTimeAroundClinicId",K1e={type:"drivingTimeAroundClinicId",category:"clinic",displayName:{de:"Fahrzeit"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new dL(t.coordinate,t.value,Nl.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Ps.create(n))],[...t.postalCodes]))},fromCondition(t){return Promise.resolve(new dL(t.coordinate,t.value,Nl.fromObj(t.clinicId),[...t.administrativeDistricts.map(n=>Ps.create(n))],[...t.postalCodes]))},newInstance(){return Promise.resolve(new dL(null,10,null,[],[]))}},dL=(()=>{class t extends Un{static{this.Specification=K1e}constructor(e,i,o,r,a){super(K1e.type),this.coordinate=e,this.value=i,this.clinicId=o,this.administrativeDistricts=r,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)&&ko.equals(this.value,e.value)&&go.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 pJ(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 uJ(this.coordinate,this.value,this.clinicId,this.administrativeDistricts,this.postalCodes)}}return t})(),uJ=class{constructor(n,e,i,o,r){this.coordinate=n,this.value=e,this.clinicId=i,this.administrativeDistricts=o,this.postalCodes=r}},pJ=class extends pa{constructor(n){super(rut),this._value=n}toJSON(){return{[this.id]:{value:this._value.value,coordinate:this._value.coordinate,clinicId:this._value.clinicId,postalCodes:this._value.postalCodes,administrativeDistricts:this._value.administrativeDistricts.map(n=>n.getNumericValue())}}}};var sut="inekCalculationLocation",Z1e={type:"inekCalculationLocation",category:"clinic",displayName:{de:"InEK Kalkulationskrankenh\xE4user"},sortingIndex:8,occurrence:"single",fromObject(t){return Promise.resolve(new uL(t.inekCalculationLocation))},fromCondition(t){return Promise.resolve(new uL(t.flag))},newInstance(){return Promise.resolve(new uL(!0))}},uL=(()=>{class t extends Un{static{this.Specification=Z1e}constructor(e){super(Z1e.type),this.bool=e}clone(){return new t(this.bool)}equals(e){return super.equals(e)&&ko.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 hJ(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})(),hJ=class extends V5{constructor(n){super(sut,n),this.flag=n}};var lut="stateId",Y1e={type:"stateIds",category:"person",displayName:{de:"Bundesl\xE4nder"},sortingIndex:1,occurrence:"single",fromObject(t){return Promise.resolve(new XC(t.stateIds))},fromCondition(t){return Promise.resolve(new XC(t.includes))},newInstance(){return Promise.resolve(new XC([]))}},XC=(()=>{class t extends Un{static{this.Specification=Y1e}constructor(e){super(Y1e.type),this.stateIds=e}clone(){return new t([...this.stateIds??[]])}equals(e){return super.equals(e)&&go.equals(this.stateIds,e.stateIds)}validationToText(){return this.stateIds.length===0?"Mindestens ein Bundesland ausw\xE4hlen":""}toCondition(){return Promise.resolve(new pL(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})(),pL=class extends Eo{constructor(n,e){super(lut,n,e)}};var cut="postalCode",Q1e={type:"postalCodes",category:"person",displayName:{de:"Postleitzahlen"},sortingIndex:5,occurrence:"single",fromObject(t){return Promise.resolve(new zb(t.postalCodes))},fromCondition(t){return Promise.resolve(new zb(t.includes))},newInstance(){return Promise.resolve(new zb([]))}},zb=(()=>{class t extends Un{static{this.Specification=Q1e}constructor(e){super(Q1e.type),this.postalCodes=e}clone(){return new t([...this.postalCodes])}equals(e){return super.equals(e)&&go.equals(this.postalCodes,e.postalCodes)}validationToText(){return this.postalCodes.length===0?"Mindestens eine Postleitzahl ausw\xE4hlen":""}toCondition(){return Promise.resolve(new hL(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})(),hL=class extends Eo{constructor(n,e){super(cut,n,e)}};var dut="specialEquipment",X1e={type:"specialEquipment",category:"clinic",displayName:{de:"Klinik-Ausstattung"},occurrence:"single",sortingIndex:8,fromObject(t){return Promise.resolve(new mL(t.includeSpecialEquipmentKeys))},newInstance(){return Promise.resolve(new mL)},fromCondition(t){return Promise.resolve(new mL(t.includes,t.excludes))}},mL=(()=>{class t extends Un{static{this.Specification=X1e}constructor(e=[],i=[]){super(X1e.type),this.includeKeys=e,this.excludeKeys=i}toCondition(){return Promise.resolve(new mJ(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)&&go.equals(this.includeKeys,e.includeKeys)&&go.equals(this.excludeKeys,e.excludeKeys)}}return t})(),mJ=class extends Eo{constructor(n=[],e=[]){super(dut,n,e)}};var ju=class t{static EMPTY(){return new ZC([])}static equals(n,e){return ko.equals(n,e,()=>{if(n.type!==e.type)return!1;switch(n.type){case"combination":return n.equals(e);default:return n.equals(e)}})}static fromConditionJson(n,e){let i=Object.keys(n);if(i.length===0||i.length>1)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`);let o=i[0],r=n[i[0]];switch(o){case $O:case qO:return QP.fromConditionJson(o,r,e);case ZY:case YY:case UY:case HY:case jY:case GY:case $Y:case qY:case WY:case KY:return $U.fromCondition(r);default:{let a=e.find(p=>p.filterConditionId===o);return a?a.filterConditionPluginSpecification.fromCondition(r):Promise.reject(new Error(`No filter plugin found for ${o}, input [${JSON.stringify(n)}]`))}}}static fromObject(n,e){if(!n.type)throw new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`);switch(n.type){case"combination":return QP.fromObject(n,e);default:{let i=e.find(o=>o.filterType===n.type);return i?i.filterConditionPluginSpecification.fromObject(n):Promise.reject(new Error(`${t.name}.fromObject not possible for input [${JSON.stringify(n)}]`))}}}static withoutType(n,e){switch(n.type){case"combination":{let i=n;return i.expression=i.expression.map(o=>t.withoutType(o,e)).filter(o=>!!o),i}default:return n.type===e.type?null:n}}static findAll(n,e){switch(e.type){case"combination":return e.expression.map(i=>this.findAll(n,i)).flat();case n.type:return[e];default:return[]}}static and(n,e){return n.type==="combination"&&n.kind==="AND"?(n.expression.push(e),n):e.type==="combination"&&e.kind==="AND"?(e.expression.push(n),e):new ZC([n,e])}static or(n,e){return n.type==="combination"&&n.kind==="OR"?(n.expression.push(e),n):e.type==="combination"&&e.kind==="OR"?(e.expression.push(n),e):new Nb([n,e])}static formatter(n){switch(n.type){case"combination":{let e=n.kindToText();return n.expression.map(i=>({kind:e,expressionText:this.formatter(i)}))}default:return n.toText()}}};var MA=class{constructor(n,e){this.type=n,this.expression=e}getOverrideProperties(n,e){return[...this.expression.getOverrideProperties(n,e)]}toJSON(){return{type:this.type,expression:this.expression.toJSON()}}getChildResources(){return this.expression.getChildResources()}toRequestBody(n){return this.expression.toCondition(n)}equals(n){return ko.equals(this.type,n.type)&&ju.equals(this.expression,n.expression)}};var J1e=class t extends MA{static{this.TYPES=[{specification:zb.Specification},{specification:XC.Specification},{specification:Bb.Specification},{specification:YC.Specification},{specification:QC.Specification},{specification:dL.Specification},{specification:cL.Specification}]}static EMPTY(){return new Nb([])}constructor(n=t.EMPTY()){super("market-filter",n)}clone(){return new t(this.expression.clone())}overrideClone(n){return new t(this.expression.overrideClone(n))}};var eCe={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 tCe=(()=>{class t{constructor(){this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-age-group-distribution"})})}ngOnInit(){this.filename=`Altersverteilung_${this.ageGroupDistribution.year}`,this.data=new kA(this.ageGroupDistribution)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-age-group-distribution-export"]],inputs:{ageGroupDistribution:"ageGroupDistribution"},decls:1,vars:3,consts:[[3,"filename","data","exportConfig"]],template:function(i,o){i&1&&Oe(0,"ays-code-browser-result-export",0),i&2&&B("filename",o.filename)("data",o.data)("exportConfig",o.exportConfig)},dependencies:[Qd],encapsulation:2})}}return t})();function uut(t,n){if(t&1&&(K(0,"div")(1,"div",3)(2,"span",4),Ce(3),Z(),K(4,"span",5),Oe(5,"ays-code-browser-age-group-distribution-export",6),Z()()(),K(6,"div")(7,"div",7),Oe(8,"ays-code-browser-canvas-watermarked",8),Z()()),t&2){let e=V();L(3),Di(e.ageGroupDistribution==null?null:e.ageGroupDistribution.additionalInformation),L(2),B("ageGroupDistribution",e.ageGroupDistribution),L(3),B("canvasId","age-group-distribution")("chartConfig",e.chartConfig)}}function put(t,n){t&1&&Oe(0,"bd-message-empty",9)}var RA=(()=>{class t{constructor(e,i){this._codeService=e,this._percentPipe=i,this.year=dp,this.loading$=new mo(1)}ngOnInit(){this.loading$.next(Cn.LOADING),this._codeService.getAgeGroupDistribution(this.code.codingSystem,this.code.name,new Mr().append("year",this.year.toString())).subscribe({next:e=>{this.ageGroupDistribution=e,this._updateChartOptions(),this._updateChartConfig(),this.loading$.next(Cn.SUCCESS)},error:()=>this.loading$.next(Cn.ERROR)})}_updateChartConfig(){let i=Object.keys(this.ageGroupDistribution.percentageByAgmId).map(r=>eCe[r]).map(r=>r.replace("Im Alter von ","")),o=[this._chartDataSetByGender("MALE","m\xE4nnlich",YP),this._chartDataSetByGender("FEMALE","weiblich",UU),this._chartDataSetByGender("UNKNOWN","unbekannt")];this.chartConfig={type:"bar",options:this.chartOptions,data:{labels:i,datasets:o}}}_chartDataSetByGender(e,i,o=uf){let r=Object.keys(this.ageGroupDistribution.percentageByAgmId);return{label:i,data:r.map(a=>this.ageGroupDistribution.percentageByAgmId[a]).map(a=>kA.percentageByGender(e,a)),backgroundColor:o,borderColor:o}}_updateChartOptions(){this.chartOptions={responsive:!0,aspectRatio:4/3,maintainAspectRatio:!1,elements:{line:{fill:!1,tension:0}},plugins:{tooltip:this._chartOptionsTooltips(this.ageGroupDistribution),legend:{position:"bottom"}},scales:{x:{stacked:!0},y:{stacked:!0,ticks:{callback:e=>this._percentPipe.transform(e)}}}}}_chartOptionsTooltips(e){let i=this._percentPipe,o=Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(r){return`${r.dataset.label} : ${i.transform(r.raw,"1.0-2")}`},title(r){return r[0].label},afterTitle(r){let a=r[0].dataIndex+1,p=e.percentageByAgmId[a].percentage;return`Gesamt ${i.transform(p,"1.0-2")}`}}));return o.mode="x",o.position="nearest",o}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl),rt(wu))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-age-group-distribution"]],inputs:{code:"code",year:"year"},features:[Pi([wu])],decls:5,vars:3,consts:[["successTpl",""],["errorTpl",""],[3,"loadItem","successTemplate","errorTemplate"],[1,"flex","flex-row","gap-4"],[1,"grow","mat-caption"],[1,"grow-0"],[3,"ageGroupDistribution"],[2,"height","300px"],[3,"canvasId","chartConfig"],["message","Die Altersverteilung f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",2),le(1,uut,9,4,"ng-template",null,0,Hi)(3,put,1,0,"ng-template",null,1,Hi)),i&2){let r=un(2),a=un(4);B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[Ca,tCe,Kh,mr],encapsulation:2})}}return t})();var iCe=(t,n)=>n.field;function hut(t,n){if(t&1&&(K(0,"th"),Ce(1),Z()),t&2){let e=n.$implicit;Ge(e.cssClass),L(),qn(" ",e.header," ")}}function mut(t,n){if(t&1&&(K(0,"tr"),ea(1,hut,2,3,"th",10,iCe),Z()),t&2){let e=n.$implicit;L(),ta(e)}}function fut(t,n){if(t&1&&(K(0,"td"),Ce(1),Z()),t&2){let e=n.$implicit,i=V().$implicit;Ge(e.cssClass),L(),qn(" ",e.valueFn(i[e.field])," ")}}function gut(t,n){if(t&1&&(K(0,"tr"),ea(1,fut,2,3,"td",10,iCe),Z()),t&2){let e=n.columns;L(),ta(e)}}function _ut(t,n){if(t&1){let e=Bt();K(0,"div",0)(1,"div",2)(2,"div",3)(3,"div",4),Oe(4,"ays-code-browser-canvas-watermarked",5),Z()(),K(5,"div",3)(6,"div")(7,"div",0)(8,"ays-drg-base-rate",6),Qe("baseRateChange",function(o){Ee(e);let r=V();return Ae(r.onBaseRateSubmit(o))}),Z()(),K(9,"p-table",7),le(10,mut,3,0,"ng-template",8)(11,gut,3,0,"ng-template",9),Z()()()()()}if(t&2){let e=V();L(4),B("canvasId","drg-main-department")("chartConfig",e.chartConfig),L(4),B("baseRate",e.globalBaseRate),L(),B("value",e.rows)("columns",e.columns)}}function yut(t,n){t&1&&Oe(0,"bd-message-empty",1)}var nCe=(()=>{class t extends qs{constructor(e,i,o){super(),this._decimalPipe=e,this._currencyPipe=i,this._breakpointObserver=o,this.globalBaseRate={year:dp,state:Vu[0]},this.selectedBaseRate=this.globalBaseRate,this.columns=[],this.rows=[]}ngOnInit(){this._updateValues(),this._subs=[this._breakpointObserver.observe([_d.XSmall,_d.Small]).subscribe(e=>{e.matches?this.columns=[{field:"title",header:"",valueFn:i=>i},{field:"days",header:"Tage",valueFn:i=>i,cssClass:"mat-column-days"},{field:"relation",header:"Bewertungs-Relation",valueFn:i=>this._decimalPipe.transform(i,"1.0-4"),cssClass:"mat-column-relation"}]:this.columns=[{field:"title",header:"",valueFn:i=>i},{field:"days",header:"Tage",valueFn:i=>i,cssClass:"mat-column-days"},{field:"relation",header:"Bewertungs-Relation",valueFn:i=>this._decimalPipe.transform(i,"1.0-4"),cssClass:"mat-column-relation"},{field:"amount",header:"Betrag",valueFn:i=>this._currencyPipe.transform(i,"EUR","symbol","1.0-2"),cssClass:"mat-column-amount"}]})]}onBaseRateSubmit(e){this.selectedBaseRate=e,this._updateValues()}_updateValues(){this.rows=this._calcTableRows(this.drgCode.mainDepartment);let e=this._calcChartData(this.drgCode.mainDepartment);this.chartConfig={type:"line",options:this._updateChartOptions(this.drgCode,this.selectedBaseRate,this._currencyPipe),plugins:[mA],data:{labels:this._calcChartDataLabels(e),datasets:[e]}}}_updateChartOptions(e,i,o){let r=Wh(gt(ve({},El.defaults.plugins.tooltip.callbacks),{label(p){let f=p.raw;return o.transform(f.y,"EUR")},title:p=>{let f=parseFloat(p[0].label);return this._isLowerStayDay(f)?`Tag ${f} Untere Grenz-Verweildauer`:this._isUpperStayDay(f)?`Tag ${f} Obere Grenz-Verweildauer`:this._isMittlereVerweildauer(f)?`Tag ${f} Mittlere Verweildauer`:`Tag ${f}`}}));r.displayColors=!1;let a={responsive:!0,aspectRatio:4/3,maintainAspectRatio:!1,elements:{line:{fill:!1,tension:0},point:{pointStyle:p=>{let f=p.raw;return this._isSpecialDay(f.x)?"circle":"cross"}}},plugins:{tooltip:r,legend:{position:"bottom"},datalabels:{align:"end",padding:{bottom:4,left:4,right:4,top:4},backgroundColor:function(p){return p.active?p.dataset.backgroundColor:"white"},borderColor:function(p){return p.dataset.backgroundColor},borderRadius:0,borderWidth:function(p){return p.active?1:0},color:function(p){return p.active?"white":p.dataset.backgroundColor},font:{weight:"bold"},formatter:p=>this._isLowerStayDay(p.x)?`UGV ${p.x} Tage`:this._isUpperStayDay(p.x)?`OGV ${p.x} Tage`:this._isMittlereVerweildauer(p.x)?`\xD8 VWD ${p.x} Tage`:p.x,offset:8,textAlign:"center",display:p=>{let f=p.dataset.data[p.dataIndex],x=this._isLowerStayDay(f.x),I=this._isUpperStayDay(f.x),D=this._isMittlereVerweildauer(f.x);return x||D||I}}},scales:{y:{suggestedMax:this._chartDataMaxValue(e,i,e.mainDepartment.mdLowerStayDay),beginAtZero:!0,ticks:{stepSize:2500,callback:p=>o.transform(p,"EUR")}},x:{type:"linear",ticks:{stepSize:1,callback:(p,f)=>f%2===0?`${p}. Tag`:""}}}};return a.plugins.annotation=this._chartOptionPluginAnnotations(e),a}_calcTableRows(e){let i=e.relativgewicht*this.selectedBaseRate.value;return[{title:"Normal",days:`${e.mdLowerStayDay} bis ${e.mdUpperStayDay} (\xD8 ${this._decimalPipe.transform(e.mittlereVerweildauer)})`,relation:e.relativgewicht,amount:i},{title:"Erster Tag mit Abschlag",days:e.mdLowerStayDay+"",relation:e.mdLowerStayRatio,amount:i-e.mdLowerStayRatio*this.selectedBaseRate.value-i},{title:"Erster Tag mit Zuschlag",days:e.mdUpperStayDay+"",relation:e.mdUpperStayRatio,amount:i-(i-e.mdUpperStayRatio*this.selectedBaseRate.value)},{title:"Externe Verlegung Abschlag/Tag",days:null,relation:e.mdShiftRatio,amount:i-e.mdShiftRatio*this.selectedBaseRate.value-i}]}_calcChartData(e){let i=e.relativgewicht*this.selectedBaseRate.value,o=e.mdLowerStayDay,r=e.mdUpperStayDay,a=[];this._calcChartDataLowerDays(o,e.mdLowerStayRatio,i,this.selectedBaseRate).forEach(f=>a.push(f)),Array.from(new Array(Math.max(0,r-o-1)).keys()).forEach(()=>a.push(i)),this._calcChartDataUpperDays(o+1,e.mdUpperStayRatio,i,this.selectedBaseRate).forEach(f=>a.push(f));let p=[{y:i,x:e.mittlereVerweildauer}];return a.map((f,x)=>({y:f,x:x+1})).forEach(f=>p.push(f)),{label:"DRG Erl\xF6s und Verweildauer",data:p.sort((f,x)=>x.x-f.x),backgroundColor:uf,borderColor:uf}}_calcChartDataLabels(e){let i=[];return e.data.forEach((o,r)=>i.push(`Tag ${r+1}`)),i}_chartOptionPluginAnnotations(e){return{annotations:{lowerUpperPeriod:{type:"box",xMin:e.mainDepartment.mdLowerStayDay,xMax:e.mainDepartment.mdUpperStayDay,backgroundColor:"rgba(0, 0, 0, 0.1)",borderWidth:0},mittlereVerweildauer:{type:"line",xMin:e.mainDepartment.mittlereVerweildauer,xMax:e.mainDepartment.mittlereVerweildauer,borderColor:uf,borderDash:[5,5]}}}}_calcChartDataLowerDays(e,i,o,r){return Array.from(new Array(e).keys()).map((a,p)=>{let f=p+1;return o-f*i*r.value}).reverse()}_calcChartDataUpperDays(e,i,o,r){return Array.from(new Array(e).keys()).map((a,p)=>{let f=p+1;return o+f*i*r.value})}_chartDataMaxValue(e,i,o){return e.mainDepartment.relativgewicht*this.selectedBaseRate.value+o*e.mainDepartment.mdUpperStayRatio*i.value+2500}_isLowerStayDay(e){return e===this.drgCode.mainDepartment.mdLowerStayDay}_isUpperStayDay(e){return e===this.drgCode.mainDepartment.mdUpperStayDay}_isMittlereVerweildauer(e){return e===this.drgCode.mainDepartment.mittlereVerweildauer}_isSpecialDay(e){return this._isLowerStayDay(e)||this._isMittlereVerweildauer(e)||this._isUpperStayDay(e)}static{this.\u0275fac=function(i){return new(i||t)(rt(yl),rt(Su),rt(Eu))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-drg-main-department"]],inputs:{drgCode:"drgCode"},features:[Pi([Su,yl]),Rt],decls:2,vars:1,consts:[[1,"flex","flex-col","gap-4"],["message","Die Erstattung f\xFCr diese Ziffer kann nicht ermittelt werden"],[1,"flex","flex-col","md:flex-row","gap-4"],[1,"basis-1/2"],[2,"height","300px"],[3,"canvasId","chartConfig"],[3,"baseRateChange","baseRate"],[3,"value","columns"],["pTemplate","header"],["pTemplate","body"],[3,"class"]],template:function(i,o){i&1&&Lt(0,_ut,12,5,"div",0)(1,yut,1,0,"bd-message-empty",1),i&2&&Ft(!(o.drgCode==null||o.drgCode.mainDepartment==null)&&o.drgCode.mainDepartment.mittlereVerweildauer?0:1)},dependencies:[Kh,m6,Ca,gp,sd,Uo],styles:[".mat-column-days[_ngcontent-%COMP%], .mat-column-relation[_ngcontent-%COMP%], .mat-column-amount[_ngcontent-%COMP%]{text-align:right}"]})}}return t})();var oCe=` .p-breadcrumb { background: dt('breadcrumb.background'); padding: dt('breadcrumb.padding'); overflow-x: auto; } .p-breadcrumb-list { margin: 0; padding: 0; list-style-type: none; display: flex; align-items: center; flex-wrap: nowrap; gap: dt('breadcrumb.gap'); } .p-breadcrumb-separator { display: flex; align-items: center; color: dt('breadcrumb.separator.color'); } .p-breadcrumb-separator-icon:dir(rtl) { transform: rotate(180deg); } .p-breadcrumb::-webkit-scrollbar { display: none; } .p-breadcrumb-item-link { text-decoration: none; display: flex; align-items: center; gap: dt('breadcrumb.item.gap'); transition: background dt('breadcrumb.transition.duration'), color dt('breadcrumb.transition.duration'), outline-color dt('breadcrumb.transition.duration'), box-shadow dt('breadcrumb.transition.duration'); border-radius: dt('breadcrumb.item.border.radius'); outline-color: transparent; color: dt('breadcrumb.item.color'); } .p-breadcrumb-item-link:focus-visible { box-shadow: dt('breadcrumb.item.focus.ring.shadow'); outline: dt('breadcrumb.item.focus.ring.width') dt('breadcrumb.item.focus.ring.style') dt('breadcrumb.item.focus.ring.color'); outline-offset: dt('breadcrumb.item.focus.ring.offset'); } .p-breadcrumb-item-link:hover .p-breadcrumb-item-label { color: dt('breadcrumb.item.hover.color'); } .p-breadcrumb-item-label { transition: inherit; } .p-breadcrumb-item-icon { color: dt('breadcrumb.item.icon.color'); transition: inherit; } .p-breadcrumb-item-link:hover .p-breadcrumb-item-icon { color: dt('breadcrumb.item.icon.hover.color'); } `;var vut=["item"],but=["separator"],sCe=t=>({$implicit:t}),aCe=()=>({exact:!1}),xut=t=>({menuitem:t});function Cut(t,n){}function wut(t,n){t&1&&le(0,Cut,0,0,"ng-template")}function Sut(t,n){if(t&1&&le(0,wut,1,0,null,8),t&2){let e=V(2);B("ngTemplateOutlet",e.itemTemplate||e._itemTemplate)("ngTemplateOutletContext",rn(2,sCe,e.home))}}function Iut(t,n){if(t&1&&Oe(0,"span",15),t&2){let e=V(4);Ge(e.cn(e.cx("itemIcon"),e.home.icon)),B("ngStyle",e.home==null?null:e.home.style)}}function Tut(t,n){if(t&1&&(oi(),Oe(0,"svg",16)),t&2){let e=V(4);Ge(e.cx("itemIcon"))}}function Eut(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(5);Ge(e.cx("itemLabel")),L(),Di(e.home.label)}}function Aut(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(5);Ge(e.cx("itemLabel")),B("innerHTML",e.home.label,xm)}}function Dut(t,n){if(t&1&&(Mi(0),le(1,Eut,2,3,"span",17)(2,Aut,1,3,"ng-template",null,0,Hi),Ri()),t&2){let e=un(3),i=V(4);L(),B("ngIf",i.home.escape!==!1)("ngIfElse",e)}}function kut(t,n){if(t&1){let e=Bt();K(0,"a",11),Qe("click",function(o){Ee(e);let r=V(3);return Ae(r.onClick(o,r.home))}),le(1,Iut,1,3,"span",12)(2,Tut,1,2,"svg",13)(3,Dut,4,2,"ng-container",14),Z()}if(t&2){let e=V(3);Ge(e.cx("itemLink")),B("href",e.home.url?e.home.url:null,ja)("target",e.home.target),Xe("aria-label",e.homeAriaLabel)("title",e.home.title)("tabindex",e.home.disabled?null:"0"),L(),B("ngIf",e.home.icon),L(),B("ngIf",!e.home.icon),L(),B("ngIf",e.home.label)}}function Mut(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(4);Gr(e.home.iconStyle),Ge(e.cn(e.cx("itemIcon"),e.home.icon))}}function Rut(t,n){if(t&1&&(oi(),Oe(0,"svg",16)),t&2){let e=V(4);Ge(e.cx("itemIcon"))}}function Out(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(5);Ge(e.cx("itemLabel")),L(),Di(e.home.label)}}function Put(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(5);Ge(e.cx("itemLabel")),B("innerHTML",e.home.label,xm)}}function Lut(t,n){if(t&1&&(Mi(0),le(1,Out,2,3,"span",17)(2,Put,1,3,"ng-template",null,1,Hi),Ri()),t&2){let e=un(3),i=V(4);L(),B("ngIf",i.home.escape!==!1)("ngIfElse",e)}}function Fut(t,n){if(t&1){let e=Bt();K(0,"a",19),Qe("click",function(o){Ee(e);let r=V(3);return Ae(r.onClick(o,r.home))}),le(1,Mut,1,4,"span",20)(2,Rut,1,2,"svg",13)(3,Lut,4,2,"ng-container",14),Z()}if(t&2){let e=V(3);Ge(e.cx("itemLink")),B("routerLink",e.home.routerLink)("queryParams",e.home.queryParams)("routerLinkActiveOptions",e.home.routerLinkActiveOptions||Is(18,aCe))("target",e.home.target)("fragment",e.home.fragment)("queryParamsHandling",e.home.queryParamsHandling)("preserveFragment",e.home.preserveFragment)("skipLocationChange",e.home.skipLocationChange)("replaceUrl",e.home.replaceUrl)("state",e.home.state),Xe("aria-label",e.homeAriaLabel)("title",e.home.title)("tabindex",e.home.disabled?null:"0"),L(),B("ngIf",e.home.icon),L(),B("ngIf",!e.home.icon),L(),B("ngIf",e.home.label)}}function Nut(t,n){if(t&1&&le(0,kut,4,10,"a",9)(1,Fut,4,19,"a",10),t&2){let e=V(2);B("ngIf",!e.home.routerLink),L(),B("ngIf",e.home.routerLink)}}function But(t,n){if(t&1&&(K(0,"li",7),Lt(1,Sut,1,4)(2,Nut,2,2),Z()),t&2){let e=V();Ge(e.cn(e.cx("homeItem"),e.home.styleClass)),B("ngStyle",e.home.style)("tooltipOptions",e.home.tooltipOptions),Xe("id",e.home.id)("data-pc-section","home"),L(),Ft(e.itemTemplate||e._itemTemplate?1:2)}}function zut(t,n){t&1&&(oi(),Oe(0,"svg",23))}function Vut(t,n){}function Uut(t,n){t&1&&le(0,Vut,0,0,"ng-template")}function Hut(t,n){if(t&1&&(K(0,"li"),le(1,zut,1,0,"svg",21)(2,Uut,1,0,null,22),Z()),t&2){let e=V();Ge(e.cx("separator")),Xe("data-pc-section","separator"),L(),B("ngIf",!e.separatorTemplate&&!e._separatorTemplate),L(),B("ngTemplateOutlet",e.separatorTemplate||e._separatorTemplate)}}function jut(t,n){}function Gut(t,n){t&1&&le(0,jut,0,0,"ng-template")}function $ut(t,n){if(t&1&&le(0,Gut,1,0,null,8),t&2){let e=V(2).$implicit,i=V();B("ngTemplateOutlet",i.itemTemplate||i._itemTemplate)("ngTemplateOutletContext",rn(2,sCe,e))}}function qut(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(5).$implicit,i=V();Gr(e==null?null:e.iconStyle),Ge(i.cn(i.cx("itemIcon"),e==null?null:e.icon))}}function Wut(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(6).$implicit,i=V();Ge(i.cx("itemLabel")),L(),Di(e==null?null:e.label)}}function Kut(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(6).$implicit,i=V();Ge(i.cx("itemLabel")),B("innerHTML",e==null?null:e.label,xm)}}function Zut(t,n){if(t&1&&(Mi(0),le(1,Wut,2,3,"span",17)(2,Kut,1,3,"ng-template",null,2,Hi),Ri()),t&2){let e=un(3),i=V(5).$implicit;L(),B("ngIf",(i==null?null:i.escape)!==!1)("ngIfElse",e)}}function Yut(t,n){if(t&1&&(Mi(0),le(1,qut,1,4,"span",20)(2,Zut,4,2,"ng-container",14),Ri()),t&2){let e=V(4).$implicit;L(),B("ngIf",e==null?null:e.icon),L(),B("ngIf",e==null?null:e.label)}}function Qut(t,n){if(t&1){let e=Bt();K(0,"a",27),Qe("click",function(o){Ee(e);let r=V(3).$implicit,a=V();return Ae(a.onClick(o,r))}),le(1,Yut,3,2,"ng-container",14),Z()}if(t&2){let e=V(3).$implicit,i=V();Ge(i.cx("itemLink")),B("target",e==null?null:e.target),Xe("href",e!=null&&e.url?e==null?null:e.url:null,ja)("title",e==null?null:e.title)("tabindex",e!=null&&e.disabled?null:"0"),L(),B("ngIf",!i.itemTemplate&&!i._itemTemplate)}}function Xut(t,n){if(t&1&&Oe(0,"span"),t&2){let e=V(4).$implicit,i=V();Gr(e==null?null:e.iconStyle),Ge(i.cn(i.cx("itemIcon"),e==null?null:e.icon))}}function Jut(t,n){if(t&1&&(K(0,"span"),Ce(1),Z()),t&2){let e=V(5).$implicit,i=V();Ge(i.cx("itemLabel")),L(),Di(e==null?null:e.label)}}function ept(t,n){if(t&1&&Oe(0,"span",18),t&2){let e=V(5).$implicit,i=V();Ge(i.cx("itemLabel")),B("innerHTML",e==null?null:e.label,xm)}}function tpt(t,n){if(t&1&&(Mi(0),le(1,Jut,2,3,"span",17)(2,ept,1,3,"ng-template",null,3,Hi),Ri()),t&2){let e=un(3),i=V(4).$implicit;L(),B("ngIf",(i==null?null:i.escape)!==!1)("ngIfElse",e)}}function ipt(t,n){if(t&1){let e=Bt();K(0,"a",19),Qe("click",function(o){Ee(e);let r=V(3).$implicit,a=V();return Ae(a.onClick(o,r))}),le(1,Xut,1,4,"span",20)(2,tpt,4,2,"ng-container",14),Z()}if(t&2){let e=V(3).$implicit,i=V();Ge(i.cx("itemLink")),B("routerLink",e==null?null:e.routerLink)("queryParams",e==null?null:e.queryParams)("routerLinkActiveOptions",(e==null?null:e.routerLinkActiveOptions)||Is(16,aCe))("target",e==null?null:e.target)("fragment",e==null?null:e.fragment)("queryParamsHandling",e==null?null:e.queryParamsHandling)("preserveFragment",e==null?null:e.preserveFragment)("skipLocationChange",e==null?null:e.skipLocationChange)("replaceUrl",e==null?null:e.replaceUrl)("state",e==null?null:e.state),Xe("title",e==null?null:e.title)("tabindex",e!=null&&e.disabled?null:"0"),L(),B("ngIf",e==null?null:e.icon),L(),B("ngIf",e==null?null:e.label)}}function npt(t,n){if(t&1&&le(0,Qut,2,7,"a",26)(1,ipt,3,17,"a",10),t&2){let e=V(2).$implicit;B("ngIf",!(e!=null&&e.routerLink)),L(),B("ngIf",e==null?null:e.routerLink)}}function opt(t,n){if(t&1&&(K(0,"li",25),Lt(1,$ut,1,4)(2,npt,2,2),Z()),t&2){let e=V().$implicit,i=V();Gr(e.style),Ge(i.cn(i.cx("item",rn(8,xut,e)),e.styleClass)),B("tooltipOptions",e.tooltipOptions),Xe("id",e.id)("data-pc-section","menuitem"),L(),Ft(i.itemTemplate||i._itemTemplate?1:2)}}function rpt(t,n){t&1&&(oi(),Oe(0,"svg",23))}function spt(t,n){}function apt(t,n){t&1&&le(0,spt,0,0,"ng-template")}function lpt(t,n){if(t&1&&(K(0,"li"),le(1,rpt,1,0,"svg",21)(2,apt,1,0,null,22),Z()),t&2){let e=V(2);Ge(e.cx("separator")),Xe("data-pc-section","separator"),L(),B("ngIf",!e.separatorTemplate&&!e._separatorTemplate),L(),B("ngTemplateOutlet",e.separatorTemplate||e._separatorTemplate)}}function cpt(t,n){if(t&1&&le(0,opt,3,10,"li",24)(1,lpt,3,5,"li",5),t&2){let e=n.$implicit,i=n.last;B("ngIf",e.visible!==!1),L(),B("ngIf",!i&&e.visible!==!1)}}var dpt={root:()=>["p-breadcrumb p-component"],list:"p-breadcrumb-list",homeItem:"p-breadcrumb-home-item",separator:"p-breadcrumb-separator",item:({menuitem:t})=>["p-breadcrumb-item",{"p-disabled":t.disabled}],itemLink:"p-breadcrumb-item-link",itemIcon:"p-breadcrumb-item-icon",itemLabel:"p-breadcrumb-item-label"},rCe=(()=>{class t extends to{name="breadcrumb";theme=oCe;classes=dpt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=jt(t)))(o||t)}})();static \u0275prov=ct({token:t,factory:t.\u0275fac})}return t})();var fJ=(()=>{class t extends Ao{router;model;style;styleClass;home;homeAriaLabel;onItemClick=new yt;_componentStyle=re(rCe);constructor(e){super(),this.router=e}onClick(e,i){if(i.disabled){e.preventDefault();return}!i.url&&!i.routerLink&&e.preventDefault(),i.command&&i.command({originalEvent:e,item:i}),this.onItemClick.emit({originalEvent:e,item:i})}itemTemplate;separatorTemplate;templates;_separatorTemplate;_itemTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"separator":this._separatorTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}static \u0275fac=function(i){return new(i||t)(rt(aa))};static \u0275cmp=Le({type:t,selectors:[["p-breadcrumb"]],contentQueries:function(i,o,r){if(i&1&&(Ht(r,vut,5),Ht(r,but,5),Ht(r,Uo,4)),i&2){let a;Je(a=et())&&(o.itemTemplate=a.first),Je(a=et())&&(o.separatorTemplate=a.first),Je(a=et())&&(o.templates=a)}},inputs:{model:"model",style:"style",styleClass:"styleClass",home:"home",homeAriaLabel:"homeAriaLabel"},outputs:{onItemClick:"onItemClick"},features:[Pi([rCe]),Rt],decls:5,vars:12,consts:[["htmlHomeLabel",""],["htmlHomeRouteLabel",""],["htmlLabel",""],["htmlRouteLabel",""],["pTooltip","",3,"class","ngStyle","tooltipOptions",4,"ngIf"],[3,"class",4,"ngIf"],["ngFor","",3,"ngForOf"],["pTooltip","",3,"ngStyle","tooltipOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"href","class","target","click",4,"ngIf"],[3,"routerLink","queryParams","routerLinkActiveOptions","class","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","click",4,"ngIf"],[3,"click","href","target"],[3,"class","ngStyle",4,"ngIf"],["data-p-icon","home",3,"class",4,"ngIf"],[4,"ngIf"],[3,"ngStyle"],["data-p-icon","home"],[3,"class",4,"ngIf","ngIfElse"],[3,"innerHTML"],[3,"click","routerLink","queryParams","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"class","style",4,"ngIf"],["data-p-icon","chevron-right",4,"ngIf"],[4,"ngTemplateOutlet"],["data-p-icon","chevron-right"],["pTooltip","",3,"class","style","tooltipOptions",4,"ngIf"],["pTooltip","",3,"tooltipOptions"],[3,"class","target","click",4,"ngIf"],[3,"click","target"]],template:function(i,o){i&1&&(K(0,"nav")(1,"ol"),le(2,But,3,7,"li",4)(3,Hut,3,5,"li",5)(4,cpt,2,2,"ng-template",6),Z()()),i&2&&(Gr(o.style),Ge(o.cn(o.cx("root"),o.styleClass)),Xe("data-pc-name","breadcrumb")("data-pc-section","root"),L(),Ge(o.cx("list")),Xe("data-pc-section","menu"),L(),B("ngIf",o.home&&o.home.visible!==!1),L(),B("ngIf",o.model&&o.home),L(),B("ngForOf",o.model))},dependencies:[po,Rl,Zr,Vo,fs,fd,ba,eR,Bv,DT,_me,kn],encapsulation:2,changeDetection:0})}return t})(),lCe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[fJ,kn,kn]})}return t})();var ppt=()=>({border:"none"}),OA=(()=>{class t{constructor(){this.nodes=[]}ngOnInit(){this._addNextNode(this.node),this.items=this.nodes.reverse().map(e=>({label:e.name,title:e.description,routerLink:["/code-browser",this.codingSystem],queryParams:this.queryParamsForNode(e)}))}queryParamsForNode(e){let i={view:"explorer"},o=this.nodes.findIndex(r=>r.name===e.name);return this.nodes.slice(0,o+1).forEach((r,a)=>i[`select${a}`]=r.name),i}_addNextNode(e){this.nodes.push(e.data),e.parent&&this._addNextNode(e.parent)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-breadcrumbs"]],inputs:{codingSystem:"codingSystem",node:"node"},decls:1,vars:4,consts:[[3,"model"]],template:function(i,o){i&1&&Oe(0,"p-breadcrumb",0),i&2&&(Gr(Is(3,ppt)),B("model",o.items))},dependencies:[lCe,fJ],encapsulation:2,changeDetection:0})}}return t})();function hpt(t,n){if(t&1&&(K(0,"mat-option",1),Ce(1),Z()),t&2){let e=n.$implicit;B("value",e),L(),qn(" ",e," ")}}var PA=(()=>{class t{constructor(){this.yearChange=new yt,this.yearCtrl=new pT,this.yearsAvailable=lfe,this.yearCtrl.valueChanges.subscribe(e=>this.yearChange.emit(e))}compareYearFn(e,i){return e.toString()===i.toString()}ngOnChanges(e){e.year&&e.year.currentValue&&this.yearCtrl.setValue(this.year,{emitEvent:!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-year-select"]],inputs:{year:"year"},outputs:{yearChange:"yearChange"},features:[In],decls:4,vars:2,consts:[["data-test","code-browser-year-select",3,"valueChange","value","compareWith"],[3,"value"]],template:function(i,o){i&1&&(K(0,"mat-form-field")(1,"mat-select",0),Qe("valueChange",function(a){return o.yearChange.emit(a)}),ea(2,hpt,2,2,"mat-option",1,ed),Z()()),i&2&&(L(),B("value",o.year)("compareWith",o.compareYearFn),L(),ta(o.yearsAvailable))},dependencies:[zd,vd,A1,E1,sp,qp],styles:["mat-form-field[_ngcontent-%COMP%]{width:100px}"]})}}return t})();var mpt=t=>["/code-browser",t];function fpt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div",13)(3,"div",14)(4,"span",15),Ce(5,"Erstattung"),Z()(),K(6,"div",14),Oe(7,"ays-code-browser-result-drg-main-department",16),Z(),K(8,"div",14)(9,"span",15),Ce(10,"Altersverteilung"),Z()(),K(11,"div",14),Oe(12,"ays-code-browser-age-group-distribution",17),Z(),K(13,"div",14)(14,"span",15),Ce(15,"Verweildauer-Entwicklung"),Z()(),K(16,"div",14),Oe(17,"ays-code-browser-result-drg-main-department-time-series",16),Z(),K(18,"div",14)(19,"span",15),Ce(20,"Fall-Entwicklung "),Z()(),K(21,"div",14),Oe(22,"ays-code-browser-cases-time-series",18),Z()()()()),t&2){let e=V(2);B("value",0),L(7),B("drgCode",e.drgData),L(5),B("year",e.year)("code",e.drgData),L(5),B("drgCode",e.drgData),L(5),B("codingSystem",e.codingSystem)("codeName",e.drgData.name)}}function gpt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div",13)(3,"span",15),Ce(4,"Verteilung"),Z(),K(5,"div"),Oe(6,"ays-code-browser-result-prevalence",17),Z()()()()),t&2){let e=V(2);B("value",1),L(6),B("year",e.year)("code",e.drgData)}}function _pt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-icd",19),Z()()),t&2){let e=V(2);B("value",2),L(2),B("code",e.drgData)("mainDiagnoses",e.drgData.mainDiagnoses)("year",e.year)}}function ypt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-ops",20),Z()()),t&2){let e=V(2);B("value",3),L(2),B("code",e.drgData)("procedures",e.drgData.procedures)("year",e.year)}}function vpt(t,n){if(t&1&&Oe(0,"ays-code-drg-inek-table",21),t&2){let e=V(3);B("inekTable",e.drgData.costTable)("exportConfig",e.exportConfig)}}function bpt(t,n){t&1&&Oe(0,"bd-message-empty",22)}function xpt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Lt(2,vpt,1,2,"ays-code-drg-inek-table",21)(3,bpt,1,0,"bd-message-empty",22),Z()()),t&2){let e=V(2);B("value",4),L(2),Ft(e.drgData.costTable?2:3)}}function Cpt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-drg-proceeds-table",23),Z()()),t&2){let e=V(2);B("value",5),L(2),B("year",e.year)("code",e.drgData)("exportConfig",e.exportConfig)}}function wpt(t,n){if(t&1&&Oe(0,"ays-code-browser-result-distribution",24),t&2){let e=V(3);B("drgData",e.drgData)}}function Spt(t,n){t&1&&Oe(0,"bd-message-empty",22)}function Ipt(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Lt(2,wpt,1,1,"ays-code-browser-result-distribution",24)(3,Spt,1,0,"bd-message-empty",22),Z()()),t&2){let e=V(2);B("value",6),L(2),Ft(e.drgData.costTable?2:3)}}function Tpt(t,n){if(t&1){let e=Bt();K(0,"div",8)(1,"span",9),Ce(2),Z()(),Oe(3,"mat-divider")(4,"ays-code-browser-breadcrumbs",10)(5,"mat-divider"),K(6,"div")(7,"p-tabs",11),Qe("valueChange",function(o){Ee(e);let r=V();return Ae(r.onTabIndexChange(o))}),K(8,"p-tablist")(9,"p-tab",12),Ce(10,"Erstattung"),Z(),K(11,"p-tab",12),Ce(12,"Verteilung"),Z(),K(13,"p-tab",12),Ce(14,"Top ICD"),Z(),K(15,"p-tab",12),Ce(16,"Top OPS"),Z(),K(17,"p-tab",12),Ce(18,"InEK Kostentabelle"),Z(),K(19,"p-tab",12),Ce(20,"InEK Erl\xF6stabelle"),Z(),K(21,"p-tab",12),Ce(22,"InEK Graphisch"),Z()(),K(23,"p-tabpanels"),Lt(24,fpt,23,7,"p-tabpanel",12),Lt(25,gpt,7,3,"p-tabpanel",12),Lt(26,_pt,3,4,"p-tabpanel",12),Lt(27,ypt,3,4,"p-tabpanel",12),Lt(28,xpt,4,2,"p-tabpanel",12),Lt(29,Cpt,3,4,"p-tabpanel",12),Lt(30,Ipt,4,2,"p-tabpanel",12),Z()()(),Oe(31,"mat-divider")}if(t&2){let e=V();L(2),qn("",e.drgData==null?null:e.drgData.description," "),L(2),B("codingSystem",e.codingSystem)("node",e.drgNode),L(3),B("value",e.tabIndex),L(2),B("value",0),L(2),B("value",1),L(2),B("value",2),L(2),B("value",3),L(2),B("value",4),L(2),B("value",5),L(2),B("value",6),L(3),Ft(e.tabIndex===0?24:-1),L(),Ft(e.tabIndex===1?25:-1),L(),Ft(e.tabIndex===2?26:-1),L(),Ft(e.tabIndex===3?27:-1),L(),Ft(e.tabIndex===4?28:-1),L(),Ft(e.tabIndex===5?29:-1),L(),Ft(e.tabIndex===6?30:-1)}}var cCe=(()=>{class t extends wb{constructor(e,i,o,r,a){super(e,o,r,i,["Allgemein","Verteilung","Top ICD","Top OPS","InEK Kostentabelle","InEK Erl\xF6stabelle","InEK Graphisch"]),this._activatedRoute=r,this._codeService=a,this.codingSystem="G-DRG",this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"code-browser-inek-table"})}),this.year=dp,this.loading$=new mo(1),this._activatedRoute.params.subscribe(p=>this._onRouteParamsChange(p))}onYearChange(e){this.year=e,this._fetchCodeDetails(this.drgData.name,e)}onTabIndexChange(e){super.onTabIndexChange(e)}_onRouteParamsChange(e){e.drgCode&&this._fetchCodeDetails(e.drgCode,this.year)}_fetchCodeDetails(e,i){this.loading$.next(Cn.LOADING),this.updatePageInfoForFirstImpression(this.codingSystem,e);let o=new Mr().append("year",i.toString());Hl([this._codeService.get$(this.codingSystem,e,o).pipe(Xa(()=>this._codeService.get$(this.codingSystem,e))),this._codeService.treePath(this.codingSystem,e)]).subscribe(r=>{this.drgData=r[0],this.drgNode=r[1],this.year=this.drgData.year,this.updatePageInfo(this.drgData),this.loading$.next(Cn.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(rt(rg),rt(jd),rt(aa),rt(Ac),rt(Sl))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],features:[Rt],decls:14,vars:9,consts:[["content",""],[1,"flex-1","mat-body-strong"],[3,"yearChange","year"],["key","ays_code_browser_drg",3,"options"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"routerLink"],[1,"bd-container"],[1,"mat-subheading-1"],[3,"codingSystem","node"],[3,"valueChange","value"],[3,"value"],[1,"flex","flex-col","gap-6"],[1,"flex-1"],[1,"mat-title"],[3,"drgCode"],[3,"year","code"],[3,"codingSystem","codeName"],[3,"code","mainDiagnoses","year"],[3,"code","procedures","year"],[3,"inekTable","exportConfig"],["message","InEK Kostentabelle f\xFCr diese Ziffer nicht verf\xFCgbar"],[3,"year","code","exportConfig"],[3,"drgData"]],template:function(i,o){if(i&1){let r=Bt();K(0,"bd-toolbar")(1,"h1",1),Ce(2),Z(),K(3,"ays-code-browser-year-select",2),Qe("yearChange",function(p){return Ee(r),Ae(o.onYearChange(p))}),Z(),Oe(4,"bd-help-button",3),Z(),Oe(5,"bd-loader",4),K(6,"div",5)(7,"div",6)(8,"div")(9,"a",7)(10,"span"),Ce(11,"Neue Suche"),Z()()()()(),le(12,Tpt,32,18,"ng-template",null,0,Hi)}if(i&2){let r=un(13);L(2),td(" ",o.codingSystem," ",o.drgData==null?null:o.drgData.name," "),L(),B("year",o.year),L(),B("options",o.helpButtonOptions),L(),B("loadItem",o.loading$)("successTemplate",r),L(4),B("routerLink",rn(7,mpt,o.codingSystem))}},dependencies:[Mu,PA,yb,mr,Jo,_s,ba,Wd,th,OA,Cb,Gh,U0,V0,Kg,z0,nCe,RA,F1e,DA,EA,wU,CU,d6,Ca,cxe,lxe],encapsulation:2})}}return t})();var qU=class t{static fromObj(n){let e=n.topClinics.map(i=>{let o=yA.fromObject(i.clinicAddress),r=Nl.fromObj(i.clinicLocation.clinicId);return{clinicAddress:o,clinicLocation:gt(ve({},i.clinicLocation),{clinicId:r}),count:i.count}});return new t(n.additionalInformation,e,n.usedYear)}constructor(n,e,i){this.additionalInformation=n,this.topClinics=e,this.usedYear=i}};var WU=(()=>{class t{constructor(e,i){this._environmentService=e,this._http=i,this._store=new xg(this._environmentService)}getTopOpsCodes(e,i){let o=`${this._store.codeByCodeName("ICD-10-GM",e)}/OPS/`,r=new Mr().append("year",i.toString());return this._http.get(o,{params:r})}getTopDrgCodes(e,i){let o=`${this._store.codeByCodeName("ICD-10-GM",e)}/G-DRG/`,r=new Mr().append("year",i.toString());return this._http.get(o,{params:r})}getTopClinics(e,i,o){let r=`${this._store.codeByCodeName(i,e)}/top-clinics/`,a=new Mr().append("year",o.toString());return this._http.get(r,{params:a}).pipe(vi(p=>qU.fromObj(p)))}static{this.\u0275fac=function(i){return new(i||t)(ui(br),ui(va))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var KU=class extends Hd{constructor(n,e){super(),this._year=n,this._data=e}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getData(){return this._data.map(n=>[{value:n.districtId.value,type:"string"},{value:n.districtName,type:"string"},{value:Xm.byId(n.districtId.getStateId()).name,type:"string"},{value:n.aggregated,type:"number"},{value:this._year,type:"number"}])}_getFields(){return["Kreisschl\xFCssel","Landkreis/Kreis","Bundesland","Differenz","Jahr"]}};function Ept(t,n){t&1&&(K(0,"tr")(1,"th",3),Ce(2," Bereich "),Oe(3,"p-sortIcon",4),Z(),K(4,"th",5),Ce(5," Differenz "),Oe(6,"p-sortIcon",6),Z(),K(7,"th"),Ce(8,"Zu-/Abwanderung"),Z()())}function Apt(t,n){t&1&&(K(0,"span",7),Ce(1,"Zuwanderung"),Z())}function Dpt(t,n){t&1&&(K(0,"span",7),Ce(1,"Abwanderung"),Z())}function kpt(t,n){if(t&1&&(K(0,"tr")(1,"td"),Ce(2),Z(),K(3,"td"),Ce(4),Z(),K(5,"td"),Lt(6,Apt,2,0,"span",7),Lt(7,Dpt,2,0,"span",7),Z()()),t&2){let e=n.$implicit;L(2),Di(e.districtName),L(2),Di(e.aggregated),L(2),Ft(e.aggregated>0?6:-1),L(),Ft(e.aggregated<0?7:-1)}}var uCe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-patient-migration-table"]],inputs:{patientMigrationData:"patientMigrationData"},decls:3,vars:4,consts:[["sortField","aggregated",3,"value","paginator","rows","sortOrder"],["pTemplate","header"],["pTemplate","body"],["pSortableColumn","districtName"],["field","districtName"],["pSortableColumn","aggregated"],["field","aggregated"],[1,"mat-body-1"]],template:function(i,o){i&1&&(K(0,"p-table",0),le(1,Ept,9,0,"ng-template",1)(2,kpt,8,4,"ng-template",2),Z()),i&2&&B("value",o.patientMigrationData)("paginator",!0)("rows",10)("sortOrder",-1)},dependencies:[gp,sd,Uo,GE,$E,kn,Hz],styles:["p-sortIcon[_ngcontent-%COMP%]{display:inline-block}"]})}}return t})();var ZU=class extends _A{constructor(n,e,i){super(n,e,i),this.colorFactory=new sR(new Us("#00ff00"),new Us("#ff0000"))}getFillColorExpression(n,e,i){let o=JSON.parse(JSON.stringify(this.baseFilterExpression())),r=this.colorFactory;return n.forEach(function(a){let p=e[a],f="rgba(0, 0, 0, 0)";p!==0&&(f=r.getColorForValue(p,i.min,i.max)?.toHslString()??"rgba(0, 0, 0, 0)"),o.push(a,f)}),o.push("rgba(0,0,0,0)"),o}getFillOpacityExpression(){return .7}updateLegendRef(n,e){return super.updateLegendRef(this.colorFactory,e)}};var pCe=(()=>{class t{constructor(e,i){this._decimalPipe=e,this._districtService=i,this.mapController=new Jm,this.mapOptions=gt(ve({},ef),{zoom:5});let o=new gA("Differenz Behandlungen zu Patienten");o.popup={popupType:"default",messagePrefix:"",titleFnc:r=>r.properties.GEN,messageFnc:(r,a)=>a?this._popupHandlerMessageText(a[r.properties.AGS]):null},this._layer=new ZU("districts",o,this._districtService),this.mapController.registerLayer(this._layer)}ngOnInit(){let e=this.patientMigrationData.reduce((i,o)=>(i[o.districtId.value]=o.aggregated,i),{});this._layer.data$.next(e)}onMapLoaded(e){this.mapController.addMapRef(e)}onMapOptionsChanged(e){this.mapOptions=JSON.parse(JSON.stringify(e))}_popupHandlerMessageText(e){return e>0?`${this._decimalPipe.transform(e)} F\xE4lle (Zuwanderung)`:e<0?`${this._decimalPipe.transform(e)} F\xE4lle (Abwanderung)`:"Keine Wanderung"}static{this.\u0275fac=function(i){return new(i||t)(rt(yl),rt(cf))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-patient-migration-map"]],inputs:{patientMigrationData:"patientMigrationData"},features:[Pi([yl])],decls:4,vars:4,consts:[[1,"map-container"],[3,"mapLoaded","mapOptions"],[3,"mapboxOptionsChange","controller","mapboxOptions"],[3,"controller"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"bd-map",1),Qe("mapLoaded",function(a){return o.onMapLoaded(a)}),Z(),K(2,"bd-map-global-control",2),Qe("mapboxOptionsChange",function(a){return o.onMapOptionsChanged(a)}),Z(),Oe(3,"bd-map-legend",3),Z()),i&2&&(L(),B("mapOptions",o.mapOptions),L(),B("controller",o.mapController)("mapboxOptions",o.mapOptions),L(),B("controller",o.mapController))},dependencies:[t_,Q0,RX],styles:[".map-container[_ngcontent-%COMP%]{min-height:600px;height:600px;position:relative}"]})}}return t})();function Mpt(t,n){if(t&1&&(K(0,"span",5),Ce(1),Z()),t&2){let e=V(2);L(),Di(e.patientMigrationResponse.additionalInformation.text)}}function Rpt(t,n){if(t&1&&(K(0,"div",6),Oe(1,"ays-code-browser-result-export",10),Z()),t&2){let e=V(2);L(),B("filename",e.filename)("data",e.exportData)("exportConfig",e.exportConfig)}}function Opt(t,n){if(t&1&&(K(0,"div",3)(1,"div",4),Lt(2,Mpt,2,1,"span",5),Z(),Lt(3,Rpt,2,3,"div",6),Z(),K(4,"div",7)(5,"div",8),Oe(6,"ays-code-browser-patient-migration-map",9),Z(),K(7,"div",8),Oe(8,"ays-code-browser-patient-migration-table",9),Z()()),t&2){let e=V();L(2),Ft(!(e.patientMigrationResponse==null||e.patientMigrationResponse.additionalInformation==null)&&e.patientMigrationResponse.additionalInformation.text?2:-1),L(),Ft(e.exportData?3:-1),L(3),B("patientMigrationData",e.patientMigrationData),L(2),B("patientMigrationData",e.patientMigrationData)}}function Ppt(t,n){t&1&&Oe(0,"bd-message-empty",11)}var YU=(()=>{class t{constructor(e,i){this._codeService=e,this._administrativeDistrictService=i,this.loading$=new mo(1),this.filename="",this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-patient-migration"})})}ngOnInit(){this.codingSystem&&this.codeName&&this.year&&this._fetchPatientMigration()}_fetchPatientMigration(){this.loading$.next(Cn.LOADING),this.year?this.filename=`${this.codeName}_Wanderungssaldo_${this.year}`:this.filename=`${this.codeName}_Wanderungssaldo`,this._codeService.getPatientMigration(this.codingSystem,[this.codeName],this.year).pipe(wo(e=>{let i=Object.keys(e.patientMigration).map(o=>Ps.create(o));return Hl([this._administrativeDistrictService.findAll(i),Ni(e)])})).subscribe({next:e=>{this._administrativeDistricts=e[0],this.patientMigrationResponse=e[1],this.patientMigrationData=Object.keys(this.patientMigrationResponse.patientMigration).map(i=>{let o=this._administrativeDistricts[i],r=Object.keys(this.patientMigrationResponse.patientMigration[i]);if(!r||r.length===0)throw new Error("Invalid year data in patient migration response");return this.patientMigrationYear=parseInt(r[0]),{districtId:o.id,districtName:o.otherName||o.name,aggregated:this.patientMigrationResponse.patientMigration[i][r[0]].aggregated,abwanderung:this.patientMigrationResponse.patientMigration[i][r[0]].abwanderung,zuwanderung:this.patientMigrationResponse.patientMigration[i][r[0]].zuwanderung}}),this.patientMigrationData.sort((i,o)=>i.aggregated-o.aggregated),this.exportData=new KU(this.patientMigrationYear,this.patientMigrationData),this.loading$.next(Cn.SUCCESS)},error:()=>this.loading$.next(Cn.ERROR)})}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl),rt(cf))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-patient-migration"]],inputs:{codingSystem:"codingSystem",codeName:"codeName",year:"year"},decls:5,vars:3,consts:[["successTpl",""],["errorTpl",""],[3,"loadItem","successTemplate","errorTemplate"],[1,"flex","flex-row","gap-4","justify-center"],[1,"grow"],[1,"mat-caption"],[1,"grow-0"],[1,"flex","flex-col","lg:flex-row"],[1,"lg:w-1/2"],[3,"patientMigrationData"],[3,"filename","data","exportConfig"],["message","Die Patienten-Wanderung f\xFCr diese Ziffer kann nicht ermittelt werden"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",2),le(1,Opt,9,4,"ng-template",null,0,Hi)(3,Ppt,1,0,"ng-template",null,1,Hi)),i&2){let r=un(2),a=un(4);B("loadItem",o.loading$)("successTemplate",r)("errorTemplate",a)}},dependencies:[mr,Qd,pCe,uCe,Ca],encapsulation:2})}}return t})();var QU=class extends Hd{constructor(n){super(),this.clinics=n}getExport(){return Promise.resolve({data:this._getData(),fields:this._getFields()})}_getData(){return this.clinics.map(n=>[{value:n.clinicLocation.clinicId.ik,type:"string"},{value:n.clinicLocation.clinicId.sn,type:"string"},{value:n.clinicLocation.name,type:"string"},{value:n.count,type:"number"}])}_getFields(){return["IK","SN","Name","Anzahl"]}};var fCe=(()=>{class t{static _getClinicPath(e){return["/clinics","single",e.ik,e.sn]}constructor(e){this._environmentService=e}get(e,i){let o;return i.target==="_self"?o=this.internal(e):o=this.external(e),o}internal(e){return t._getClinicPath(e)}external(e){return this._environmentService.load("ANALYTICS_APP_URL")+t._getClinicPath(e).join("/")}static{this.\u0275fac=function(i){return new(i||t)(ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Vpt(t,n){if(t&1&&(K(0,"bd-link-internal",0)(1,"mat-icon",1),Ce(2,"open_in_new"),Z()()),t&2){let e=V();B("link",e.asType(e.link))}}function Upt(t,n){if(t&1&&(K(0,"bd-link-external",0)(1,"mat-icon",1),Ce(2,"open_in_new"),Z()()),t&2){let e=V();B("link",e.asType(e.link))}}var gCe=(()=>{class t{constructor(e){this._clinicLinkService=e,this.options=bz,this.link=null}ngOnChanges(e){e.clinicId&&this._onClinicIdChange(e.clinicId)}asType(e){return e}_onClinicIdChange(e){e.currentValue&&(this.link=this._clinicLinkService.get(e.currentValue,this.options))}static{this.\u0275fac=function(i){return new(i||t)(rt(fCe))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-clinic-icon-link"]],inputs:{clinicId:"clinicId",options:"options"},features:[In],decls:2,vars:2,consts:[[3,"link"],["color","accent"]],template:function(i,o){i&1&&(Lt(0,Vpt,3,1,"bd-link-internal",0),Lt(1,Upt,3,1,"bd-link-external",0)),i&2&&(Ft(o.options.target==="_self"?0:-1),L(),Ft(o.options.target==="_blank"?1:-1))},dependencies:[vz,Ls,la,yz],encapsulation:2})}}return t})();var _Ce=fu(EK());var jpt=["*"];var Gpt=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],$pt=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], [matCardTitle], [matCardSubtitle]`,"*"],qpt=new ii("MAT_CARD_CONFIG"),yCe=(()=>{class t{appearance;constructor(){let e=re(qpt,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(i,o){i&2&&fo("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")("mat-mdc-card-filled",o.appearance==="filled")("mdc-card--filled",o.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:jpt,decls:1,vars:0,template:function(i,o){i&1&&(eo(),yn(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end} `],encapsulation:2,changeDetection:0})}return t})(),vCe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return t})();var bCe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"]})}return t})(),xCe=(()=>{class t{align="start";static \u0275fac=function(i){return new(i||t)};static \u0275dir=Ki({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(i,o){i&2&&fo("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return t})(),CCe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:$pt,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(i,o){i&1&&(eo(Gpt),yn(0),jn(1,"div",0),yn(2,1),Yn(),yn(3,2))},encapsulation:2,changeDetection:0})}return t})();var wCe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=yi({type:t});static \u0275inj=gi({imports:[Xo,Xo]})}return t})();var Kpt=fu(lR());var SCe={type:"clinicIds",category:"clinic",displayName:{de:"Kliniken"},sortingIndex:8,occurrence:"single",fromObject(t){let n=null,e=null;return t.includes&&(n=t.includes.map(i=>Nl.fromString(i))),t.excludes&&(e=t.excludes.map(i=>Nl.fromString(i))),Promise.resolve(new gL(n,e))},fromCondition(t){let n=null,e=null;return t.includes&&(n=t.includes.map(i=>Nl.fromObj(i))),t.excludes&&(e=t.excludes.map(i=>Nl.fromObj(i))),Promise.resolve(new gL(n,e))},newInstance(){return Promise.resolve(new gL([]))}},gL=(()=>{class t extends Un{static{this.Specification=SCe}constructor(e,i=null){super(SCe.type),this.includes=e,this.excludes=i}clone(){return new t(this.includes?[...this.includes.map(e=>e.clone())]:null,this.excludes?[...this.excludes.map(e=>e.clone())]:null)}equals(e){return super.equals(e)&&go.equals(this.includes,e.includes,(i,o)=>i.equals(o))&&go.equals(this.excludes,e.excludes,(i,o)=>i.equals(o))}valid(){return!0}validationToText(){return this.valid()?"":"Mindestens eine Klinik als Basismenge oder Ausschluss ausw\xE4hlen"}toCondition(e){if(e&&e.clinicIds){let i=this.includes?this.includes.map(r=>e.clinicIds.resolve(r)):[],o=this.excludes?this.excludes.map(r=>e.clinicIds.resolve(r)):[];return Promise.all(i).then(r=>Promise.all(o).then(a=>({includes:r,excludes:a}))).then(r=>new KE(r.includes,r.excludes))}else return Promise.resolve(new KE(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 _J=class t extends MA{static fromObj(n,e){let i=null,o=null;n.createdDate&&(i=new Date(n.createdDate)),n.modifiedDate&&(o=new Date(n.modifiedDate));let r=Promise.resolve(ju.EMPTY());return n.condition&&(r=ju.fromConditionJson(n.condition,e)),r.then(a=>new t(n.id,n.name,i,o,n.highestPermission,a))}static{this.SPECIFICATION=[{specification:XC.Specification,needsAuthentication:!1},{specification:Bb.Specification,needsAuthentication:!1},{specification:YC.Specification,needsAuthentication:!1},{specification:QC.Specification,needsAuthentication:!1},{specification:zb.Specification,needsAuthentication:!1},{specification:gL.Specification,needsAuthentication:!0},{specification:aL.Specification,needsAuthentication:!1},{specification:tL.Specification,needsAuthentication:!1},{specification:nL.Specification,needsAuthentication:!1},{specification:uL.Specification,needsAuthentication:!1},{specification:lL.Specification,needsAuthentication:!1},{specification:JP.Specification,needsAuthentication:!1},{specification:iL.Specification,needsAuthentication:!1},{specification:eL.Specification,needsAuthentication:!1},{specification:sL.Specification,needsAuthentication:!0},{specification:mL.Specification,needsAuthentication:!1}]}constructor(n,e,i,o,r,a=ju.EMPTY()){super("clinics-filter",a),this.id=n,this.name=e,this.createdDate=i,this.modifiedDate=o,this.highestPermission=r,this.resourceName=jo.CLINICS_FILTER}toJSON(){return gt(ve({},super.toJSON()),{id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission})}clone(){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.expression.clone())}overrideClone(n){return new t(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.expression.overrideClone(n))}equals(n){return super.equals(n)&&ko.equals(this.id,n.id)&&ko.equals(this.name,n.name)}toRequestFormat(n){return this.toRequestBody(n).then(e=>({id:this.id,name:this.name,createdDate:this.createdDate,modifiedDate:this.modifiedDate,highestPermission:this.highestPermission,condition:e}))}};var XU=class{constructor(n){this._environmentService=n}indexResource(){return`${this._environmentService.load("AYS_FAB_RESOURCE_URL")}/`}byFabKeyResource(n){return`${this.indexResource()}${n}`}};var ICe=(()=>{class t{constructor(e,i){this._http=e,this._environmentService=i,this._store=new XU(this._environmentService)}index(){let e=this._store.indexResource();return this._http.get(e).pipe(vi(i=>i.map(o=>new Mt(o.fabKey,o.name))))}get(e){let i=this._store.byFabKeyResource(e);return this._http.get(i).pipe(Ko(1),vi(o=>new Mt(o.fabKey,o.name)))}getAll(e){let i=e.map(o=>vr(this.get(o)).pipe(Xa(()=>Ni(null))));return Hl(i).pipe(vi(o=>o.filter(r=>!!r).reduce((r,a)=>(r[a.fabKey]=a,r),{})))}static{this.\u0275fac=function(i){return new(i||t)(ui(va),ui(br))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var dr=class{constructor(n,e){this.specialityName=n,this.specialityId=e}parent(){let n=this.specialityId.slice(0,3).concat("0");return eht.find(e=>e.specialityId===n)}},eht=[new dr("Allgemeinchirurgie","1000"),new dr("Allgemeinmedizin","1100"),new dr("An\xE4sthesiologie","1200"),new dr("Arbeitsmedizin","1300"),new dr("Augenheilkunde","1400"),new dr("Biochemie","1500"),new dr("Diagnostische Radiologie","1600"),new dr("Frauenheilkunde und Geburtshilfe","1700"),new dr("Gef\xE4\xDFchirurgie","1800"),new dr("Hals-Nasen-Ohrenheilkunde","1900"),new dr("Haut- und Geschlechtskrankheiten","2000"),new dr("Herzchirurgie","2100"),new dr("Humangenetik","2200"),new dr("Hygiene und Umweltmedizin","2300"),new dr("Innere Medizin","2400"),new dr("Angiologie","2401"),new dr("Endokrinologie und Diabetologie","2402"),new dr("Gastroenterologie","2403"),new dr("Geriatrie","2404"),new dr("H\xE4matologie und Onkologie","2405"),new dr("Kardiologie","2406"),new dr("Nephrologie","2407"),new dr("Pneumologie","2408"),new dr("Rheumatologie","2409"),new dr("Mund-Kiefer-Gesichtschirurgie","2500"),new dr("Kinderheilkunde / Kinder- und Jugendmedizin","2600"),new dr("Kinderchirurgie","2700"),new dr("Pharmakologie und Toxikologie","2800"),new dr("Laboratoriumsmedizin","2900"),new dr("Mikrobiologie","3000"),new dr("Neurochirurgie","3100"),new dr("Neurologie","3200"),new dr("Neurologie und Psychiatrie","3300"),new dr("Neuropathologie","3400"),new dr("Nuklearmedizin","3500"),new dr("Orthop\xE4die und Unfallchirurgie","3600"),new dr("Pathologie","3700"),new dr("Phoniatrie und P\xE4daudiologie","3800"),new dr("Physikalische und Rehabilitative Medizin","3900"),new dr("Plastische Chirurgie","4000"),new dr("Psychiatrie und Psychotherapie","4100"),new dr("Rechtsmedizin","4200"),new dr("Strahlentherapie","4300"),new dr("Thoraxchirurgie","4400"),new dr("Transfusionsmedizin","4500"),new dr("Urologie","4600"),new dr("Virologie","4700"),new dr("Viszeralchirurgie","4800")];var sr=class{constructor(n,e,i,o,r){this.specialityName=n,this.children=e,this.level=i,this.expandable=o,this.specialityId=r}},tht=[new sr("Allgemeinchirurgie",[],0,!1,"1000"),new sr("Allgemeinmedizin",[],0,!1,"1100"),new sr("An\xE4sthesiologie",[],0,!1,"1200"),new sr("Arbeitsmedizin",[],0,!1,"1300"),new sr("Augenheilkunde",[],0,!1,"1400"),new sr("Biochemie",[],0,!1,"1500"),new sr("Diagnostische Radiologie",[],0,!1,"1600"),new sr("Frauenheilkunde und Geburtshilfe",[],0,!1,"1700"),new sr("Gef\xE4\xDFchirurgie",[],0,!1,"1800"),new sr("Hals-Nasen-Ohrenheilkunde",[],0,!1,"1900"),new sr("Haut- und Geschlechtskrankheiten",[],0,!1,"2000"),new sr("Herzchirurgie",[],0,!1,"2100"),new sr("Humangenetik",[],0,!1,"2200"),new sr("Hygiene und Umweltmedizin",[],0,!1,"2300"),new sr("Innere Medizin",[new sr("Angiologie",[],1,!1,"2401"),new sr("Endokrinologie und Diabetologie",[],1,!1,"2402"),new sr("Gastroenterologie",[],1,!1,"2403"),new sr("Geriatrie",[],1,!1,"2404"),new sr("H\xE4matologie und Onkologie",[],1,!1,"2405"),new sr("Kardiologie",[],1,!1,"2406"),new sr("Nephrologie",[],1,!1,"2407"),new sr("Pneumologie",[],1,!1,"2408"),new sr("Rheumatologie",[],1,!1,"2409")],0,!0,"2400"),new sr("Mund-Kiefer-Gesichtschirurgie",[],0,!1,"2500"),new sr("Kinderheilkunde / Kinder- und Jugendmedizin",[],0,!1,"2600"),new sr("Kinderchirurgie",[],0,!1,"2700"),new sr("Pharmakologie und Toxikologie",[],0,!1,"2800"),new sr("Laboratoriumsmedizin",[],0,!1,"2900"),new sr("Mikrobiologie",[],0,!1,"3000"),new sr("Neurochirurgie",[],0,!1,"3100"),new sr("Neurologie",[],0,!1,"3200"),new sr("Neurologie und Psychiatrie",[],0,!1,"3300"),new sr("Neuropathologie",[],0,!1,"3400"),new sr("Nuklearmedizin",[],0,!1,"3500"),new sr("Orthop\xE4die und Unfallchirurgie",[],0,!1,"3600"),new sr("Pathologie",[],0,!1,"3700"),new sr("Phoniatrie und P\xE4daudiologie",[],0,!1,"3800"),new sr("Physikalische und Rehabilitative Medizin",[],0,!1,"3900"),new sr("Plastische Chirurgie",[],0,!1,"4000"),new sr("Psychiatrie und Psychotherapie",[],0,!1,"4100"),new sr("Rechtsmedizin",[],0,!1,"4200"),new sr("Strahlentherapie",[],0,!1,"4300"),new sr("Thoraxchirurgie",[],0,!1,"4400"),new sr("Transfusionsmedizin",[],0,!1,"4500"),new sr("Urologie",[],0,!1,"4600"),new sr("Virologie",[],0,!1,"4700"),new sr("Viszeralchirurgie",[],0,!1,"4800")];var y0n=new ii("FILTER_REGISTRATION");function sht(t,n){if(t&1&&(K(0,"tr")(1,"th"),Ce(2,"Klinik"),Z(),K(3,"th"),Ce(4),Z(),K(5,"th"),Ce(6,"Klinik-Browser"),Z()()),t&2){let e=V(2);L(4),qn("F\xE4lle (",e.year,")")}}function aht(t,n){if(t&1&&(K(0,"tr")(1,"td")(2,"div"),Ce(3),Z(),K(4,"div")(5,"span",5),Ce(6),Z()()(),K(7,"td"),Ce(8),el(9,"number"),Z(),K(10,"td"),Oe(11,"ays-clinic-icon-link",6),Z()()),t&2){let e=n.$implicit,i=V(2);L(3),Di(e.clinicLocation.name),L(3),td(" (IK: ",e.clinicLocation.clinicId.ik,", SN: ",e.clinicLocation.clinicId.sn,") "),L(2),Di(Ec(9,6,e.count,"1.0-0")),L(3),B("clinicId",e.clinicLocation.clinicId)("options",i.linkOptions)}}function lht(t,n){if(t&1&&(K(0,"p-table",1),le(1,sht,7,1,"ng-template",3)(2,aht,12,9,"ng-template",4),Z()),t&2){let e=V();B("value",e.displayedClinics)}}function cht(t,n){t&1&&Oe(0,"bd-message-empty",2)}var ECe=(()=>{class t{constructor(){this.linkOptions={target:"_blank"},this.displayedClinics=[]}ngOnChanges(e){e.clinics&&(this.displayedClinics=this.clinics.slice(0,10))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-clinics-list"]],inputs:{year:"year",clinics:"clinics"},features:[In],decls:3,vars:1,consts:[[1,"result-top-codes"],[3,"value"],["message","Keine Kliniken gefunden"],["pTemplate","header"],["pTemplate","body"],[1,"mat-caption"],[3,"clinicId","options"]],template:function(i,o){i&1&&(K(0,"div",0),Lt(1,lht,3,1,"p-table",1)(2,cht,1,0,"bd-message-empty",2),Z()),i&2&&(L(),Ft(o.clinics&&(o.clinics==null?null:o.clinics.length)>0?1:2))},dependencies:[gp,sd,Uo,kn,gCe,Ca,yl],styles:[".result-top-codes-list-header[_ngcontent-%COMP%]{padding:0 24px}.result-top-codes-list-item[_ngcontent-%COMP%]{padding:12px 24px}.result-top-codes-list-item[_ngcontent-%COMP%]:hover{background-color:#efefef}"]})}}return t})();function dht(t,n){if(t&1&&(K(0,"div",2)(1,"div",3)(2,"span",4),Ce(3,"Top Kliniken"),Z()(),K(4,"div",5),Oe(5,"ays-code-browser-result-export",6),Z()(),Oe(6,"ays-code-browser-result-top-clinics-list",7)),t&2){let e=V();L(5),B("data",e.getTopClinics())("filename",e.filename)("exportConfig",e.exportConfig),L(),B("year",e.topClinics.usedYear)("clinics",e.topClinics.topClinics)}}var JU=(()=>{class t{constructor(e){this._codeIcdService=e,this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-top-clinics"})}),this.loading$=new mo(1)}ngOnInit(){this.year?this.filename=`${this.code.name}_Kliniken_${this.year}`:this.filename=`${this.code.name}_Kliniken`,this.loading$.next(Cn.LOADING),this._codeIcdService.getTopClinics(this.code.name,this.codingSystem,this.year).subscribe(e=>{this.topClinics=e,this.loading$.next(Cn.SUCCESS)})}getTopClinics(){return new QU(this.topClinics.topClinics)}static{this.\u0275fac=function(i){return new(i||t)(rt(WU))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-clinics"]],inputs:{year:"year",code:"code",codingSystem:"codingSystem"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[1,"flex","flex-row"],[1,"grow"],[1,"mat-title"],[1,"grow-0"],[3,"data","filename","exportConfig"],[3,"year","clinics"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",1),le(1,dht,7,5,"ng-template",null,0,Hi)),i&2){let r=un(2);B("loadItem",o.loading$)("successTemplate",r)}},dependencies:[mr,Qd,ECe],encapsulation:2})}}return t})();var e8=(()=>{class t{constructor(){this.exportConfig=gt(ve({},Pa),{trigger:gt(ve({},Pa.trigger),{dataTestKey:"export-top-codes-drg"})}),this.showPercentage=!1}ngOnInit(){this.year?this.filename=`${this.code.name}_DRGs_${this.year}`:this.filename=`${this.code.name}_DRGs`,this.displayedDrgCodes=this.drgCodes.slice(0,10)}getDrgData(){return new Ob(this.drgCodes,this.showPercentage)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-result-top-codes-drg"]],inputs:{year:"year",code:"code",drgCodes:"drgCodes"},decls:7,vars:5,consts:[[1,"flex","flex-row","gap-4"],[1,"grow"],[1,"mat-title"],[1,"grow-0"],[3,"data","filename","exportConfig"],["codingSystem","G-DRG",3,"codeReferences","showPercentage"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"span",2),Ce(3,"Top DRGs"),Z()(),K(4,"div",3),Oe(5,"ays-code-browser-result-export",4),Z()(),Oe(6,"ays-code-browser-result-top-codes",5)),i&2&&(L(5),B("data",o.getDrgData())("filename",o.filename)("exportConfig",o.exportConfig),L(),B("codeReferences",o.displayedDrgCodes)("showPercentage",o.showPercentage))},dependencies:[Qd,fA],encapsulation:2})}}return t})();var ACe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-icd-result-item"]],inputs:{displayTitle:"displayTitle",displayText:"displayText"},decls:7,vars:2,consts:[[1,"flex","flex-col","md:flex-row","gap-2","md:gap-4"],[1,"grow","md:grow-0","md:w-1/4"],[1,"mat-body-1"],[1,"grow","md:grow-0","md:w-3/4"],[1,"mat-body-strong"]],template:function(i,o){i&1&&(jn(0,"div",0)(1,"div",1)(2,"span",2),Ce(3),Yn()(),jn(4,"div",3)(5,"span",4),Ce(6),Yn()()()),i&2&&(L(3),Di(o.displayTitle),L(3),Di(o.displayText))},styles:["[_nghost-%COMP%]{padding:12px 24px}"],changeDetection:0})}}return t})();var uht=t=>["/code-browser",t];function pht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div"),Oe(3,"ays-code-browser-icd-result-item",13)(4,"ays-code-browser-icd-result-item",14)(5,"ays-code-browser-icd-result-item",15)(6,"ays-code-browser-icd-result-item",16)(7,"ays-code-browser-icd-result-item",17)(8,"ays-code-browser-icd-result-item",18)(9,"ays-code-browser-icd-result-item",19),Z(),K(10,"div")(11,"div")(12,"span",20),Ce(13,"Altersverteilung"),Z()(),K(14,"div"),Oe(15,"ays-code-browser-age-group-distribution",21),Z()(),K(16,"div")(17,"div")(18,"span",20),Ce(19,"Fall-Entwicklung "),Z()(),K(20,"div"),Oe(21,"ays-code-browser-cases-time-series",22),Z()()()()),t&2){let e=V(2);B("value",0),L(3),B("displayText",e.icdData==null||e.icdData.agereject==null?null:e.icdData.agereject.description),L(),B("displayText",e.icdData==null||e.icdData.paragraph295==null?null:e.icdData.paragraph295.description),L(),B("displayText",e.icdData==null||e.icdData.paragraph301==null?null:e.icdData.paragraph301.description),L(),B("displayText",e.displayTextContent),L(),B("displayText",e.displayTextRare),L(),B("displayText",e.displayTextAnsteckend),L(),B("displayText",e.icdData==null||e.icdData.sexcode==null?null:e.icdData.sexcode.description),L(6),B("code",e.icdData)("year",e.year),L(6),B("codingSystem",e.codingSystem)("codeName",e.icdData.name)}}function hht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div")(3,"span",20),Ce(4,"Verteilung"),Z()(),K(5,"div"),Oe(6,"ays-code-browser-result-prevalence",21),Z()()()),t&2){let e=V(2);B("value",1),L(6),B("code",e.icdData)("year",e.year)}}function mht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-drg",23),Z()()),t&2){let e=V(2);B("value",2),L(2),B("code",e.icdData)("drgCodes",e.drgs)("year",e.year)}}function fht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-ops",24),Z()()),t&2){let e=V(2);B("value",3),L(2),B("code",e.icdData)("procedures",e.procedures)("year",e.year)}}function ght(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-clinics",25),Z()()),t&2){let e=V(2);B("value",4),L(2),B("code",e.icdData)("year",e.year)("codingSystem",e.codingSystem)}}function _ht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-patient-migration",26),Z()()),t&2){let e=V(2);B("value",5),L(2),B("codingSystem",e.codingSystem)("codeName",e.icdData.name)("year",e.year)}}function yht(t,n){if(t&1){let e=Bt();K(0,"div",8)(1,"span",9),Ce(2),Z()(),Oe(3,"mat-divider")(4,"ays-code-browser-breadcrumbs",10)(5,"mat-divider"),K(6,"div")(7,"p-tabs",11),Qe("valueChange",function(o){Ee(e);let r=V();return Ae(r.onTabIndexChange(o))}),K(8,"p-tablist")(9,"p-tab",12),Ce(10,"Allgemein"),Z(),K(11,"p-tab",12),Ce(12,"Verteilung"),Z(),K(13,"p-tab",12),Ce(14,"Top DRG"),Z(),K(15,"p-tab",12),Ce(16,"Top OPS"),Z(),K(17,"p-tab",12),Ce(18,"Top Kliniken"),Z(),K(19,"p-tab",12),Ce(20,"Patienten-Wanderung"),Z()(),K(21,"p-tabpanels"),Lt(22,pht,22,12,"p-tabpanel",12),Lt(23,hht,7,3,"p-tabpanel",12),Lt(24,mht,3,4,"p-tabpanel",12),Lt(25,fht,3,4,"p-tabpanel",12),Lt(26,ght,3,4,"p-tabpanel",12),Lt(27,_ht,3,4,"p-tabpanel",12),Z()()(),Oe(28,"mat-divider")}if(t&2){let e=V();L(2),Di(e.icdData==null?null:e.icdData.description),L(2),B("codingSystem",e.codingSystem)("node",e.icdNode),L(3),B("value",e.tabIndex),L(2),B("value",0),L(2),B("value",1),L(2),B("value",2),L(2),B("value",3),L(2),B("value",4),L(2),B("value",5),L(3),Ft(e.tabIndex===0?22:-1),L(),Ft(e.tabIndex===1?23:-1),L(),Ft(e.tabIndex===2?24:-1),L(),Ft(e.tabIndex===3?25:-1),L(),Ft(e.tabIndex===4?26:-1),L(),Ft(e.tabIndex===5?27:-1)}}var DCe=(()=>{class t extends wb{constructor(e,i,o,r,a,p){super(e,o,r,i,["Allgemein","Verteilung","Top DRG","Top OPS","Top Kliniken","Patienten-Wanderung"]),this._activatedRoute=r,this._codeService=a,this._codeIcdService=p,this.codingSystem="ICD-10-GM",this.loading$=new mo(1),this.year=dp,this.displayTextContent="",this.displayTextRare="",this.displayTextAnsteckend="",this._activatedRoute.params.subscribe(f=>this._onRouteParamsChange(f))}onTabIndexChange(e){super.onTabIndexChange(e)}onYearChange(e){this.year=e,this._fetchCodeDetails(this.icdData.name,e)}_onRouteParamsChange(e){e.icdCode&&this._fetchCodeDetails(e.icdCode,this.year)}_fetchCodeDetails(e,i){this.loading$.next(Cn.LOADING),this.updatePageInfoForFirstImpression(this.codingSystem,e);let o=new Mr().append("year",i.toString());Hl([this._codeService.get$(this.codingSystem,e,o).pipe(Xa(()=>this._codeService.get$(this.codingSystem,e))),this._codeService.treePath(this.codingSystem,e),this._codeIcdService.getTopOpsCodes(e,i),this._codeIcdService.getTopDrgCodes(e,i)]).subscribe(r=>{this.icdData=r[0],this.icdNode=r[1],this.procedures=r[2],this.drgs=r[3],this.year=this.icdData.year,this.updatePageInfo(this.icdData),this.displayTextContent=`Schl\xFCsselnummer ${this.icdData?.content?"nicht ":""}mit Inhalt belegt`,this.displayTextRare=`Krankheit in Mitteleuropa ${this.icdData?.rare?"selten ":"h\xE4ufig"}`,this.displayTextAnsteckend=`${this.icdData?.ansteckend?" ":"nicht "}ansteckend`,this.loading$.next(Cn.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(rt(rg),rt(jd),rt(aa),rt(Ac),rt(Sl),rt(WU))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],features:[Rt],decls:14,vars:9,consts:[["content",""],[1,"flex-1","mat-body-strong"],[3,"yearChange","year"],["key","ays_code_browser_icd",3,"options"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"routerLink"],[1,"bd-container"],[1,"mat-subheading-1"],[3,"codingSystem","node"],[3,"valueChange","value"],[3,"value"],["displayTitle","Alter",3,"displayText"],["displayTitle","\xA7295 SGB V",3,"displayText"],["displayTitle","\xA7301 SGB V",3,"displayText"],["displayTitle","Inhalt",3,"displayText"],["displayTitle","Selten/H\xE4ufig",3,"displayText"],["displayTitle","Ansteckend",3,"displayText"],["displayTitle","Geschlechtsbezug",3,"displayText"],[1,"mat-title"],[3,"code","year"],[3,"codingSystem","codeName"],[3,"code","drgCodes","year"],[3,"code","procedures","year"],[3,"code","year","codingSystem"],[3,"codingSystem","codeName","year"]],template:function(i,o){if(i&1){let r=Bt();K(0,"bd-toolbar")(1,"h1",1),Ce(2),Z(),K(3,"ays-code-browser-year-select",2),Qe("yearChange",function(p){return Ee(r),Ae(o.onYearChange(p))}),Z(),Oe(4,"bd-help-button",3),Z(),Oe(5,"bd-loader",4),K(6,"div",5)(7,"div",6)(8,"div")(9,"a",7)(10,"span"),Ce(11,"Neue Suche"),Z()()()()(),le(12,yht,29,16,"ng-template",null,0,Hi)}if(i&2){let r=un(13);L(2),td(" ",o.codingSystem," ",o.icdData==null?null:o.icdData.name," "),L(),B("year",o.year),L(),B("options",o.helpButtonOptions),L(),B("loadItem",o.loading$)("successTemplate",r),L(4),B("routerLink",rn(7,uht,o.codingSystem))}},dependencies:[Mu,PA,yb,mr,Jo,_s,ba,Wd,th,OA,Cb,Gh,U0,V0,Kg,z0,ACe,RA,DA,EA,e8,CU,JU,YU],styles:["mat-list-item[_ngcontent-%COMP%]:hover{background-color:#ededed}.mat-tab-container[_ngcontent-%COMP%]{width:calc(100vw - 48px)}"]})}}return t})();var kCe=(()=>{class t{constructor(e,i){this._environmentService=e,this._http=i,this._store=new xg(this._environmentService)}getTopIcdCodes(e,i){let o=`${this._store.codeByCodeName("OPS",e)}/ICD-10-GM/`,r=new Mr().append("year",i.toString());return this._http.get(o,{params:r})}getTopDrgCodes(e,i){let o=`${this._store.codeByCodeName("OPS",e)}/G-DRG/`,r=new Mr().append("year",i.toString());return this._http.get(o,{params:r})}static{this.\u0275fac=function(i){return new(i||t)(ui(br),ui(va))}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var bht=t=>["/code-browser",t];function xht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div",13)(3,"span",14),Ce(4,"Altersverteilung"),Z(),K(5,"div",15),Oe(6,"ays-code-browser-age-group-distribution",16),Z(),K(7,"span",14),Ce(8,"Fall-Entwicklung "),Z(),K(9,"div",15),Oe(10,"ays-code-browser-cases-time-series",17),Z()()()()),t&2){let e=V(2);B("value",0),L(6),B("code",e.opsData)("year",e.year),L(4),B("codingSystem",e.codingSystem)("codeName",e.opsData.name)}}function Cht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8)(2,"div",13)(3,"span",14),Ce(4,"Verteilung"),Z(),K(5,"div",15),Oe(6,"ays-code-browser-result-prevalence",16),Z()()()()),t&2){let e=V(2);B("value",1),L(6),B("code",e.opsData)("year",e.year)}}function wht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-drg",18),Z()()),t&2){let e=V(2);B("value",2),L(2),B("code",e.opsData)("drgCodes",e.drgs)("year",e.year)}}function Sht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-codes-icd",19),Z()()),t&2){let e=V(2);B("value",3),L(2),B("code",e.opsData)("showPercentage",!1)("mainDiagnoses",e.mainDiagnoses)("year",e.year)}}function Iht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-result-top-clinics",20),Z()()),t&2){let e=V(2);B("value",4),L(2),B("code",e.opsData)("year",e.year)("codingSystem",e.codingSystem)}}function Tht(t,n){if(t&1&&(K(0,"p-tabpanel",12)(1,"div",8),Oe(2,"ays-code-browser-patient-migration",21),Z()()),t&2){let e=V(2);B("value",5),L(2),B("codingSystem",e.codingSystem)("codeName",e.opsData.name)("year",e.year)}}function Eht(t,n){if(t&1){let e=Bt();K(0,"div",8)(1,"span",9),Ce(2),Z()(),Oe(3,"mat-divider")(4,"ays-code-browser-breadcrumbs",10)(5,"mat-divider"),K(6,"div")(7,"p-tabs",11),Qe("valueChange",function(o){Ee(e);let r=V();return Ae(r.onTabIndexChange(o))}),K(8,"p-tablist")(9,"p-tab",12),Ce(10,"Allgemein"),Z(),K(11,"p-tab",12),Ce(12,"Verteilung"),Z(),K(13,"p-tab",12),Ce(14,"Top DRG"),Z(),K(15,"p-tab",12),Ce(16,"Top ICD"),Z(),K(17,"p-tab",12),Ce(18,"Top Kliniken"),Z(),K(19,"p-tab",12),Ce(20,"Patienten-Wanderung"),Z()(),K(21,"p-tabpanels"),Lt(22,xht,11,5,"p-tabpanel",12),Lt(23,Cht,7,3,"p-tabpanel",12),Lt(24,wht,3,4,"p-tabpanel",12),Lt(25,Sht,3,5,"p-tabpanel",12),Lt(26,Iht,3,4,"p-tabpanel",12),Lt(27,Tht,3,4,"p-tabpanel",12),Z()()(),Oe(28,"mat-divider")}if(t&2){let e=V();L(2),Di(e.opsData==null?null:e.opsData.description),L(2),B("codingSystem",e.codingSystem)("node",e.opsNode),L(3),B("value",e.tabIndex),L(2),B("value",0),L(2),B("value",1),L(2),B("value",2),L(2),B("value",3),L(2),B("value",4),L(2),B("value",5),L(3),Ft(e.tabIndex===0?22:-1),L(),Ft(e.tabIndex===1?23:-1),L(),Ft(e.tabIndex===2?24:-1),L(),Ft(e.tabIndex===3?25:-1),L(),Ft(e.tabIndex===4?26:-1),L(),Ft(e.tabIndex===5?27:-1)}}var MCe=(()=>{class t extends wb{constructor(e,i,o,r,a,p){super(e,o,r,i,["Allgemein","Verteilung","Top DRG","Top ICD","Top Kliniken","Patienten-Wanderung"]),this._activatedRoute=r,this._codeService=a,this._codeOpsService=p,this.codingSystem="OPS",this.year=dp,this.loading$=new mo(1),this._activatedRoute.params.subscribe(f=>this._onRouteParamsChange(f))}onYearChange(e){this.year=e,this._fetchCodeDetails(this.opsData.name,e)}onTabIndexChange(e){super.onTabIndexChange(e)}_onRouteParamsChange(e){e.opsCode&&this._fetchCodeDetails(e.opsCode,this.year)}_fetchCodeDetails(e,i){this.loading$.next(Cn.LOADING),this.updatePageInfoForFirstImpression(this.codingSystem,e);let o=new Mr().append("year",i.toString());Hl([this._codeService.get$(this.codingSystem,e,o).pipe(Xa(()=>this._codeService.get$(this.codingSystem,e))),this._codeService.treePath(this.codingSystem,e),this._codeOpsService.getTopIcdCodes(e,i),this._codeOpsService.getTopDrgCodes(e,i)]).subscribe(r=>{this.opsData=r[0],this.opsNode=r[1],this.mainDiagnoses=r[2],this.drgs=r[3],this.year=this.opsData.year,this.updatePageInfo(this.opsData),this.loading$.next(Cn.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(rt(rg),rt(jd),rt(aa),rt(Ac),rt(Sl),rt(kCe))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],features:[Rt],decls:14,vars:9,consts:[["content",""],[1,"flex-1","mat-body-strong"],[3,"yearChange","year"],["key","ays_code_browser_ops",3,"options"],[3,"loadItem","successTemplate"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-raised-button","","color","accent",3,"routerLink"],[1,"bd-container"],[1,"mat-subheading-1"],[3,"codingSystem","node"],[3,"valueChange","value"],[3,"value"],[1,"flex","flex-col","gap-6"],[1,"flex-1","mat-title"],[1,"flex-1"],[3,"code","year"],[3,"codingSystem","codeName"],[3,"code","drgCodes","year"],[3,"code","showPercentage","mainDiagnoses","year"],[3,"code","year","codingSystem"],[3,"codingSystem","codeName","year"]],template:function(i,o){if(i&1){let r=Bt();K(0,"bd-toolbar")(1,"h1",1),Ce(2),Z(),K(3,"ays-code-browser-year-select",2),Qe("yearChange",function(p){return Ee(r),Ae(o.onYearChange(p))}),Z(),Oe(4,"bd-help-button",3),Z(),Oe(5,"bd-loader",4),K(6,"div",5)(7,"div",6)(8,"div")(9,"a",7)(10,"span"),Ce(11,"Neue Suche"),Z()()()()(),le(12,Eht,29,16,"ng-template",null,0,Hi)}if(i&2){let r=un(13);L(2),td(" ",o.codingSystem," ",o.opsData==null?null:o.opsData.name," "),L(),B("year",o.year),L(),B("options",o.helpButtonOptions),L(),B("loadItem",o.loading$)("successTemplate",r),L(4),B("routerLink",rn(7,bht,o.codingSystem))}},dependencies:[Mu,PA,yb,mr,Jo,_s,ba,Wd,th,OA,Cb,Gh,U0,V0,Kg,z0,RA,DA,EA,e8,wU,JU,YU],styles:[".mat-tab-container[_ngcontent-%COMP%]{width:calc(100vw - 48px)}"]})}}return t})();var t8=(()=>{class t{constructor(){this._selectNodeSource=new mo(1),this._collapseOthersSource=new mo(1),this.selectNode$=this._selectNodeSource.asObservable(),this.collapseOthers$=this._collapseOthersSource.asObservable()}selectNode(e,i=null,o=[],r=!1){this._selectNodeSource.next(new yJ(e?e.data:void 0,i,o,r))}collapseOthers(e){this._collapseOthersSource.next(e)}selectNodeFromQueryParams(e){let i=[];Object.keys(e).filter(o=>o.startsWith("select")).forEach(o=>i.push(e[o])),this.selectNode(null,i.slice().pop(),i,!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),yJ=class{constructor(n,e,i,o){this.code=n,this.selectionTarget=e,this.selectionPath=i,this.scroll=o}};var OCe=(()=>{class t{constructor(){this.items=[]}ngOnInit(){let e=["ICD-10-GM","OPS","G-DRG"];this.items=e.map(i=>({label:`${i}-Ziffern`,disabled:this.activeCodingSystem===i,routerLink:["/code-browser",i]}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-code-types"]],inputs:{activeCodingSystem:"activeCodingSystem"},decls:3,vars:2,consts:[["menu",""],["label","Suche nach..","variant","text",3,"click"],["appendTo","body",3,"model","popup"]],template:function(i,o){if(i&1){let r=Bt();K(0,"p-button",1),Qe("click",function(p){Ee(r);let f=un(2);return Ae(f.toggle(p))}),Z(),Oe(1,"p-tieredMenu",2,0)}i&2&&(L(),B("model",o.items)("popup",!0))},dependencies:[jm,gY],encapsulation:2})}}return t})();var Aht=6,PCe="bd.ays.code.browser.search.history",LA=(()=>{class t{deleteAll(e){let i=this._load().filter(o=>o.codingSystem!==e);this._store(i)}get(e){return this._load().filter(i=>i.codingSystem===e).reverse()}push(e){let i=this._load(),o=i.filter(a=>a.codingSystem!==e.codingSystem),r=i.filter(a=>a.codingSystem===e.codingSystem).filter(a=>a.name!==e.name);for(r.push(e);r.length>Aht;)r.shift();o.push(...r),this._store(o)}_store(e){let i=JSON.stringify(e);localStorage.setItem(PCe,i)}_load(){let e=[],i=localStorage.getItem(PCe);return i&&(e=JSON.parse(i)),e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ct({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dht=t=>({"browser-search-explorer-node-title-selected":t}),bJ=(t,n)=>["/code-browser",t,n],kht=(t,n)=>n.key;function Mht(t,n){t&1&&(K(0,"div")(1,"mat-icon",7),Ce(2," folder"),Z()())}function Rht(t,n){if(t&1&&(K(0,"span",4),Ce(1),Z()),t&2){let e=V();L(),td("",e.node.data.name," - ",e.node.data.description," ")}}function Oht(t,n){if(t&1){let e=Bt();K(0,"a",8),Qe("click",function(){Ee(e);let o=V();return Ae(o.saveCodeToHistory())}),Ce(1),Z()}if(t&2){let e=V();B("routerLink",kr(3,bJ,e.codingSystem,e.node.data.name)),L(),td("",e.node.data.name,"- ",e.node.data.description," ")}}function Pht(t,n){if(t&1){let e=Bt();K(0,"div")(1,"a",9),Qe("click",function(){Ee(e);let o=V();return Ae(o.saveCodeToHistory())}),K(2,"mat-icon"),Ce(3,"open_in_new"),Z()()()}if(t&2){let e=V();L(),B("routerLink",kr(1,bJ,e.codingSystem,e.node.data.name))}}function Lht(t,n){if(t&1&&Oe(0,"ays-code-browser-search-explorer-node",11),t&2){let e=n.$implicit,i=V(2);B("codingSystem",i.codingSystem)("node",e)("nodeParent",i.node)}}function Fht(t,n){if(t&1){let e=Bt();K(0,"div",12)(1,"a",13),Qe("click",function(){Ee(e);let o=V(2);return Ae(o.saveCodeToHistory())}),Ce(2),Z()()}if(t&2){let e=V(2);L(),B("routerLink",kr(3,bJ,e.codingSystem,e.node.key)),L(),td("",e.node.data.name," - ",e.node.data.description)}}function Nht(t,n){if(t&1&&(K(0,"div",10),ea(1,Lht,1,3,"ays-code-browser-search-explorer-node",11,kht),Z(),Lt(3,Fht,3,6,"div",12)),t&2){let e=V();L(),ta(e.children),L(2),Ft(e.children.length===0&&!e.node.leaf?3:-1)}}var LCe=(()=>{class t extends qs{constructor(e,i,o,r){super(),this._elementRef=e,this._codeService=i,this._explorerService=o,this._searchHistoryService=r,this.loading$=new mo(1),this.codeBrowserLinkEnabled=!1,this.nodeSelected=!1,this._isOpen=!1}ngOnInit(){this.codeBrowserLinkEnabled=!this._isChapterNode()&&Ws.validateCodeName(this.node.data.name,this.codingSystem)&&!this.node.data.name.includes("..."),this._subs=[this._explorerService.collapseOthers$.subscribe(e=>{this._isChapterNode()&&this.node.key!==e.key&&this._closeNodeAndItsChildren()}),this._explorerService.selectNode$.subscribe(e=>{this._isNodeOfTree(e.selectionPath)?(this._openNodeAndItsChildren(),e.selectionTarget===this.node.key&&(this.nodeSelected=!0,e.scroll&&this._elementRef.nativeElement.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}))):this._closeNodeAndItsChildren()})]}ngOnDestroy(){this.unsubscribeAll()}closeOrOpenChildren(){this._isOpen?this._closeNodeAndItsChildren():(this._isChapterNode()&&this._explorerService.collapseOthers(this.node),this.node.leaf||this._openNodeAndItsChildren())}saveCodeToHistory(){this._searchHistoryService.push(this.node.data)}_openNodeAndItsChildren(){this._isOpen=!0,this.node.leaf||(this.loading$.next(Cn.LOADING),this._subs.push(this._codeService.treeChildren(this.codingSystem,this.node.key).subscribe(e=>{this.children=e.sort((i,o)=>i.key.localeCompare(o.key)),this.loading$.next(Cn.SUCCESS)})))}_closeNodeAndItsChildren(){this.loading$.next(Cn.INIT),this.children=null,this._isOpen=!1}_isNodeOfTree(e){return e.indexOf(this.node.key)>-1}_isChapterNode(){return!this.nodeParent}static{this.\u0275fac=function(i){return new(i||t)(rt(_n),rt(Sl),rt(t8),rt(LA))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-explorer-node"]],inputs:{codingSystem:"codingSystem",nodeParent:"nodeParent",node:"node"},features:[Rt],decls:10,vars:8,consts:[["childrenTpl",""],[1,"browser-search-explorer-node-title",3,"ngClass"],[1,"flex","flex-row","gap-6","items-center"],[1,"flex-1",3,"click"],[1,"mat-body-strong","browser-search-explorer-node-title-text"],["mat-button","","color","accent",3,"routerLink"],[3,"loadItem","successTemplate"],[1,"black-icon"],["mat-button","","color","accent",3,"click","routerLink"],["color","accent","matTooltip","Ziffer \xF6ffnen","mat-icon-button","",3,"click","routerLink"],[1,"browser-search-explorer-node-children"],[3,"codingSystem","node","nodeParent"],[1,"browser-search-explorer-node-open-button"],["color","accent","mat-button","",3,"click","routerLink"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",1)(1,"div",2),Lt(2,Mht,3,0,"div"),K(3,"div",3),Qe("click",function(){return Ee(r),Ae(o.closeOrOpenChildren())}),Lt(4,Rht,2,2,"span",4)(5,Oht,2,6,"a",5),Z(),Lt(6,Pht,4,4,"div"),Z()(),Oe(7,"bd-loader",6),le(8,Nht,4,1,"ng-template",null,0,Hi)}if(i&2){let r=un(9);B("ngClass",rn(6,Dht,o.nodeSelected)),L(2),Ft(o.node!=null&&o.node.leaf?-1:2),L(2),Ft(o.node.leaf?5:4),L(2),Ft(o.codeBrowserLinkEnabled?6:-1),L(),B("loadItem",o.loading$)("successTemplate",r)}},dependencies:[t,Rs,Ls,la,Jo,_s,yd,ba,Nm,Fm,mr],styles:[".browser-search-explorer-node-children[_ngcontent-%COMP%]{margin:0 0 0 32px;border-left:2px solid rgba(0,0,0,.1)}.browser-search-explorer-node-open-button[_ngcontent-%COMP%]{margin:0 0 12px 24px}.browser-search-explorer-node-title[_ngcontent-%COMP%]{padding:12px 0 12px 24px}.browser-search-explorer-node-title[_ngcontent-%COMP%]:hover, .browser-search-explorer-node-title-selected[_ngcontent-%COMP%]{background-color:#efefef}.browser-search-explorer-node-title-text[_ngcontent-%COMP%]{cursor:pointer}.black-icon[_ngcontent-%COMP%]{color:#000}.mat-button[_ngcontent-%COMP%]{white-space:normal;text-align:inherit}"]})}}return t})();var Bht=(t,n)=>n.key;function zht(t,n){if(t&1&&Oe(0,"ays-code-browser-search-explorer-node",2),t&2){let e=n.$implicit,i=V(2);B("codingSystem",i.codingSystem)("node",e)}}function Vht(t,n){if(t&1&&ea(0,zht,1,2,"ays-code-browser-search-explorer-node",2,Bht),t&2){let e=V();ta(e.nodes)}}var FCe=(()=>{class t{constructor(e){this._codeService=e,this.loading$=new mo(1)}ngOnInit(){this.loading$.next(Cn.LOADING),this._codeService.treeChildren(this.codingSystem).subscribe(e=>{this.nodes=e.sort((i,o)=>parseInt(i.key,10)-parseInt(o.key,10)),this.loading$.next(Cn.SUCCESS)})}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-explorer"]],inputs:{codingSystem:"codingSystem"},decls:3,vars:2,consts:[["successTpl",""],[3,"loadItem","successTemplate"],[3,"codingSystem","node"]],template:function(i,o){if(i&1&&(Oe(0,"bd-loader",1),le(1,Vht,2,0,"ng-template",null,0,Hi)),i&2){let r=un(2);B("loadItem",o.loading$)("successTemplate",r)}},dependencies:[mr,LCe],encapsulation:2})}}return t})();var Uht=()=>["140"],Hht=(t,n)=>["/code-browser",t,n],NCe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-history-item"]],inputs:{code:"code"},decls:10,vars:10,consts:[["mat-button","",3,"routerLink"]],template:function(i,o){i&1&&(K(0,"mat-card")(1,"mat-card-header")(2,"mat-card-title"),Ce(3),Z(),K(4,"mat-card-subtitle"),Ce(5),el(6,"truncate"),Z()(),K(7,"mat-card-actions")(8,"a",0),Ce(9,"\xD6ffnen"),Z()()()),i&2&&(L(3),Di(o.code.name),L(2),qn("",Ec(6,3,o.code.description,Is(6,Uht))," "),L(3),B("routerLink",kr(7,Hht,o.code.codingSystem,o.code.name)))},dependencies:[wCe,yCe,xCe,CCe,bCe,vCe,Jo,_s,ba,rV],styles:["mat-card-header[_ngcontent-%COMP%]{height:85px;overflow:hidden}"]})}}return t})();function jht(t,n){if(t&1&&(K(0,"div",3)(1,"span",8),Ce(2),Z()()),t&2){let e=V();L(2),qn("Keine ",e.codingSystem," Ziffern vorhanden.")}}function Ght(t,n){if(t&1&&(K(0,"div",9),Oe(1,"ays-code-browser-search-history-item",10),Z()),t&2){let e=n.$implicit;L(),B("code",e)}}function $ht(t,n){if(t&1&&(K(0,"div",4),ea(1,Ght,2,1,"div",9,ed),Z()),t&2){let e=V();L(),ta(e.history)}}function qht(t,n){if(t&1){let e=Bt();K(0,"button",11),Qe("click",function(){Ee(e);let o=V();return Ae(o.deleteHistory())}),Ce(1," Historie l\xF6schen "),Z()}}var BCe=(()=>{class t{constructor(e){this._historyService=e}ngOnInit(){this.history=this._historyService.get(this.codingSystem)}deleteHistory(){this._historyService.deleteAll(this.codingSystem),this.history=[]}static{this.\u0275fac=function(i){return new(i||t)(rt(LA))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-history"]],inputs:{codingSystem:"codingSystem"},decls:17,vars:3,consts:[[1,"flex","flex-col","gap-6"],[1,"flex","flex-row","gap-6"],[1,"mat-subheading-2"],[1,"empty-container"],[1,"grid","grid-cols-3","gap-6"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse"],["mat-button",""],[1,"mat-caption"],[1,"basic-1","sm:basic-1/2","md:basic-1/3"],[3,"code"],["mat-button","",3,"click"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div")(2,"div",1)(3,"div")(4,"mat-icon"),Ce(5,"history"),Z()(),K(6,"div")(7,"span",2),Ce(8,"Zuletzt gesucht"),Z()()()(),K(9,"div")(10,"div"),Lt(11,jht,3,1,"div",3),Lt(12,$ht,3,0,"div",4),Z()(),K(13,"div")(14,"div",5)(15,"div",6),Lt(16,qht,2,0,"button",7),Z()()()()),i&2&&(L(11),Ft(!o.history||o.history.length===0?11:-1),L(),Ft(o.history&&o.history.length>0?12:-1),L(4),Ft((o.history==null?null:o.history.length)>0?16:-1))},dependencies:[Ls,la,NCe,Jo,_s],encapsulation:2})}}return t})();function Wht(t,n){if(t&1&&(K(0,"div",3)(1,"div",4)(2,"span",5),Ce(3),Z()(),K(4,"div",6)(5,"span",7),Ce(6),Z()()()),t&2){let e=n.$implicit;L(3),Di(e.name),L(3),Di(e.description)}}var zCe=(()=>{class t{constructor(e,i,o){this._codeService=e,this._searchHistoryService=i,this._router=o,this.placeholderText="Ziffer oder anderen Suchbegriff...",this.displayCode=r=>r&&r.name?r.name:"",this.searchCode=r=>this._codeService.find(this.codingSystem,r)}ngOnInit(){this.placeholderText=`${this.codingSystem} Ziffer oder anderen Suchbegriff...`}onCodeSelect(e){this._searchHistoryService.push(e),this._router.navigate(["/code-browser",this.codingSystem,e.name]).catch(console.error)}static{this.\u0275fac=function(i){return new(i||t)(rt(Sl),rt(LA),rt(aa))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search-autocomplete"]],inputs:{codingSystem:"codingSystem"},decls:4,vars:4,consts:[["optionsTpl",""],[1,"search-container"],[3,"optionSelect","placeholderText","optionsTemplate","queryServiceFn","displayWithFn"],[1,"flex","flex-row","gap-4"],[1,"basis-16"],[1,"mat-body-2"],[1,"basis-full"],[1,"mat-caption"]],template:function(i,o){if(i&1){let r=Bt();K(0,"div",1)(1,"bd-autocomplete",2),Qe("optionSelect",function(p){return Ee(r),Ae(o.onCodeSelect(p))}),Z()(),le(2,Wht,7,2,"ng-template",null,0,Hi)}if(i&2){let r=un(3);L(),B("placeholderText",o.placeholderText)("optionsTemplate",r)("queryServiceFn",o.searchCode)("displayWithFn",o.displayCode)}},dependencies:[Zpe],styles:[".search-container[_ngcontent-%COMP%]{padding:48px 0}"]})}}return t})();var Kht=["*"],VCe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-centering"]],ngContentSelectors:Kht,decls:3,vars:0,consts:[[1,"flex","flex-row","items-center","justify-center"],[1,"basis-11/12","md:basis-10/12"]],template:function(i,o){i&1&&(eo(),jn(0,"div",0)(1,"div",1),yn(2),Yn()())},encapsulation:2})}}return t})();var Zht=()=>["/code-browser"],i8=(()=>{class t extends qs{constructor(e,i,o){super(),this._meta=e,this._activatedRoute=i,this._explorerService=o,this.helpButtonOptions=D5,this.viewMode=AA.SEARCH,console.log("viewMode",this.viewMode)}ngOnInit(){this._subs=[this._activatedRoute.data.subscribe(e=>{e.codingSystem&&(this.codingSystem=e.codingSystem),e.description&&this._meta.addTags([{name:"description",content:e.description},{name:"robots",content:"index, follow"}])}),this._activatedRoute.queryParams.subscribe(e=>{e.view&&e.view==="explorer"&&(this.viewMode=AA.EXPLORER),e.select0&&this._explorerService.selectNodeFromQueryParams(e)})]}ngOnDestroy(){this.unsubscribeAll()}onViewModeChange(e){this.viewMode=e===0?AA.SEARCH:AA.EXPLORER}static{this.\u0275fac=function(i){return new(i||t)(rt(rg),rt(Ac),rt(t8))}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-search"]],features:[Rt],decls:28,vars:13,consts:[[1,"flex-1","mat-body-strong"],["key","ays_code_browser_ops",3,"options"],[3,"valueChange","value"],[3,"value"],[3,"codingSystem"],[1,"history"],[1,"bd-container-inner"],[1,"flex","flex-row-reverse","gap-6","items-center"],[3,"activeCodingSystem"],["mat-button","","color","accent",3,"routerLink"]],template:function(i,o){i&1&&(K(0,"bd-toolbar")(1,"h1",0),Ce(2),Z(),Oe(3,"bd-help-button",1),Z(),K(4,"div")(5,"p-tabs",2),Qe("valueChange",function(a){return o.onViewModeChange(a)}),K(6,"p-tablist")(7,"p-tab",3),Ce(8,"Suche"),Z(),K(9,"p-tab",3),Ce(10,"Durchsuchen"),Z()(),K(11,"p-tabpanels")(12,"p-tabpanel",3)(13,"ays-code-browser-centering")(14,"div"),Oe(15,"ays-code-browser-search-autocomplete",4),Z(),K(16,"div",5),Oe(17,"ays-code-browser-search-history",4),Z()()(),K(18,"p-tabpanel",3),Oe(19,"ays-code-browser-search-explorer",4),Z()()()(),Oe(20,"mat-divider"),K(21,"div",6)(22,"div",7)(23,"div"),Oe(24,"ays-code-browser-search-code-types",8),Z(),K(25,"div")(26,"a",9),Ce(27," Start "),Z()()()()),i&2&&(L(2),Di(o.codingSystem),L(),B("options",o.helpButtonOptions),L(2),B("value",o.viewMode),L(2),B("value",0),L(2),B("value",1),L(3),B("value",0),L(3),B("codingSystem",o.codingSystem),L(2),B("codingSystem",o.codingSystem),L(),B("value",1),L(),B("codingSystem",o.codingSystem),L(5),B("activeCodingSystem",o.codingSystem),L(2),B("routerLink",Is(12,Zht)))},dependencies:[Mu,yb,Cb,Gh,U0,V0,Kg,z0,VCe,zCe,BCe,FCe,Wd,th,Jo,_s,ba,OCe],styles:[".history[_ngcontent-%COMP%]{margin:24px 0}"]})}}return t})();var Vb={};function n8(t){return Object.isFrozen(t)&&Object.isFrozen(t.raw)}function o8(t){return t.toString().indexOf("`")===-1}var Obn=o8(t=>t``)||o8(t=>t`\0`)||o8(t=>t`\n`)||o8(t=>t`\u0000`),Pbn=n8``&&n8`\0`&&n8`\n`&&n8`\u0000`;var Yht="google#safe",UCe=Yht,CJ=globalThis.trustedTypes,HCe=CJ,xJ;function Qht(){let t=null;if(UCe===""||!HCe)return t;try{let n=e=>e;t=HCe.createPolicy(UCe,{createHTML:n,createScript:n,createScriptURL:n})}catch{}return t}function r8(){return xJ===void 0&&(xJ=Qht()),xJ}function X0(t){return{valueOf:t}.valueOf()}var _L=class{constructor(n,e){this.privateDoNotAccessOrElseWrappedResourceUrl=e}toString(){return this.privateDoNotAccessOrElseWrappedResourceUrl+""}},Xht=_L;function Jht(t){return new Xht(Vb,t)}function wJ(t){let n=t,e=r8();return Jht(e?e.createScriptURL(n):n)}function SJ(t){return t instanceof _L}function ah(t){if(SJ(t))return t.privateDoNotAccessOrElseWrappedResourceUrl;{let n="";throw new Error(n)}}var nmt="display:inline-block;clip-path:inset(0);overflow:hidden;vertical-align:top;text-decoration:inherit",omt=`:host{${nmt}}`;var vL=class{constructor(n,e,i,o,r){this.allowedElements=n,this.elementPolicies=e,this.allowedGlobalAttributes=i,this.globalAttributePolicies=o,this.globallyAllowedAttributePrefixes=r}isAllowedElement(n){return n!=="FORM"&&(this.allowedElements.has(n)||this.elementPolicies.has(n))}getAttributePolicy(n,e){let i=this.elementPolicies.get(e);if(i?.has(n))return i.get(n);if(this.allowedGlobalAttributes.has(n))return{policyAction:fc.KEEP};let o=this.globalAttributePolicies.get(n);return o||(this.globallyAllowedAttributePrefixes&&[...this.globallyAllowedAttributePrefixes].some(r=>n.indexOf(r)===0)?{policyAction:fc.KEEP}:{policyAction:fc.DROP})}},fc=(function(t){return t[t.DROP=0]="DROP",t[t.KEEP=1]="KEEP",t[t.KEEP_AND_SANITIZE_URL=2]="KEEP_AND_SANITIZE_URL",t[t.KEEP_AND_NORMALIZE=3]="KEEP_AND_NORMALIZE",t[t.KEEP_AND_SANITIZE_STYLE=4]="KEEP_AND_SANITIZE_STYLE",t[t.KEEP_AND_USE_RESOURCE_URL_POLICY=5]="KEEP_AND_USE_RESOURCE_URL_POLICY",t[t.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET=6]="KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET",t})(fc||{});var smt=["ARTICLE","SECTION","NAV","ASIDE","H1","H2","H3","H4","H5","H6","HEADER","FOOTER","ADDRESS","P","HR","PRE","BLOCKQUOTE","OL","UL","LH","LI","DL","DT","DD","FIGURE","FIGCAPTION","MAIN","DIV","EM","STRONG","SMALL","S","CITE","Q","DFN","ABBR","RUBY","RB","RT","RTC","RP","DATA","TIME","CODE","VAR","SAMP","KBD","SUB","SUP","I","B","U","MARK","BDI","BDO","SPAN","BR","WBR","NOBR","INS","DEL","PICTURE","PARAM","TRACK","MAP","TABLE","CAPTION","COLGROUP","COL","TBODY","THEAD","TFOOT","TR","TD","TH","SELECT","DATALIST","OPTGROUP","OPTION","OUTPUT","PROGRESS","METER","FIELDSET","LEGEND","DETAILS","SUMMARY","MENU","DIALOG","SLOT","CANVAS","FONT","CENTER","ACRONYM","BASEFONT","BIG","DIR","HGROUP","STRIKE","TT"],amt=[["A",new Map([["href",{policyAction:fc.KEEP_AND_SANITIZE_URL}]])],["AREA",new Map([["href",{policyAction:fc.KEEP_AND_SANITIZE_URL}]])],["LINK",new Map([["href",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY,conditions:new Map([["rel",new Set(["alternate","author","bookmark","canonical","cite","help","icon","license","next","prefetch","dns-prefetch","prerender","preconnect","preload","prev","search","subresource"])]])}]])],["SOURCE",new Map([["src",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["IMG",new Map([["src",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY}],["srcset",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY_FOR_SRCSET}]])],["VIDEO",new Map([["src",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY}]])],["AUDIO",new Map([["src",{policyAction:fc.KEEP_AND_USE_RESOURCE_URL_POLICY}]])]],lmt=["title","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-current","aria-disabled","aria-dropeffect","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","alt","align","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","bgcolor","border","cellpadding","cellspacing","checked","cite","color","cols","colspan","controls","controlslist","datetime","disabled","download","draggable","enctype","face","formenctype","frameborder","height","hreflang","hidden","ismap","label","lang","loop","max","maxlength","media","minlength","min","multiple","muted","nonce","open","placeholder","poster","preload","rel","required","reversed","role","rows","rowspan","selected","shape","size","sizes","slot","span","spellcheck","start","step","summary","translate","type","valign","value","width","wrap","itemscope","itemtype","itemid","itemprop","itemref"],cmt=[["dir",{policyAction:fc.KEEP_AND_NORMALIZE,conditions:X0(()=>new Map([["dir",new Set(["auto","ltr","rtl"])]]))}],["async",{policyAction:fc.KEEP_AND_NORMALIZE,conditions:X0(()=>new Map([["async",new Set(["async"])]]))}],["loading",{policyAction:fc.KEEP_AND_NORMALIZE,conditions:X0(()=>new Map([["loading",new Set(["eager","lazy"])]]))}],["target",{policyAction:fc.KEEP_AND_NORMALIZE,conditions:X0(()=>new Map([["target",new Set(["_self","_blank"])]]))}]],WCe=new vL(new Set(smt),new Map(amt),new Set(lmt),new Map(cmt),void 0);function IJ(t,...n){if(n.length===0)return wJ(t[0]);let e=t[0].toLowerCase(),i=t[0];for(let o=0;o{class t{videoId;width;height;isLoading;buttonLabel;quality;_getBackgroundImage(){let e;return this.quality==="low"?e=`https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg`:this.quality==="high"?e=`https://i.ytimg.com/vi/${this.videoId}/maxresdefault.jpg`:e=`https://i.ytimg.com/vi_webp/${this.videoId}/sddefault.webp`,`url(${e})`}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["youtube-player-placeholder"]],hostAttrs:[1,"youtube-player-placeholder"],hostVars:8,hostBindings:function(i,o){i&2&&(zr("background-image",o._getBackgroundImage())("width",o.width,"px")("height",o.height,"px"),fo("youtube-player-placeholder-loading",o.isLoading))},inputs:{videoId:"videoId",width:"width",height:"height",isLoading:"isLoading",buttonLabel:"buttonLabel",quality:"quality"},decls:4,vars:1,consts:[["type","button",1,"youtube-player-placeholder-button"],["height","100%","version","1.1","viewBox","0 0 68 48","focusable","false","aria-hidden","true"],["d","M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z","fill","#f00"],["d","M 45,24 27,14 27,34","fill","#fff"]],template:function(i,o){i&1&&(jn(0,"button",0),oi(),jn(1,"svg",1),mn(2,"path",2)(3,"path",3),Yn()()),i&2&&Xe("aria-label",o.buttonLabel)},styles:[`.youtube-player-placeholder{display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden;cursor:pointer;background-color:#000;background-position:center center;background-size:cover;transition:box-shadow 300ms ease;box-shadow:inset 0 120px 90px -90px rgba(0,0,0,.8)}:fullscreen .youtube-player-placeholder{min-width:100vw;min-height:100vh}.youtube-player-placeholder-button{transition:opacity 300ms ease;-moz-appearance:none;-webkit-appearance:none;background:none;border:none;padding:0;display:flex}.youtube-player-placeholder-button svg{width:68px;height:48px}.youtube-player-placeholder-loading{box-shadow:none}.youtube-player-placeholder-loading .youtube-player-placeholder-button{opacity:0} `],encapsulation:2,changeDetection:0})}return t})(),Dmt=new ii("YOUTUBE_PLAYER_CONFIG"),KCe=640,ZCe=390;function YCe(t){return t==null?t:wn(t,0)}var n_=(function(t){return t[t.UNSTARTED=-1]="UNSTARTED",t[t.ENDED=0]="ENDED",t[t.PLAYING=1]="PLAYING",t[t.PAUSED=2]="PAUSED",t[t.BUFFERING=3]="BUFFERING",t[t.CUED=5]="CUED",t})(n_||{}),QCe=(()=>{class t{_ngZone=re(on);_nonce=re(ov,{optional:!0});_changeDetectorRef=re(Ho);_elementRef=re(_n);_player;_pendingPlayer;_existingApiReadyCallback;_pendingPlayerState;_destroyed=new xi;_playerChanges=new Ms(void 0);_isLoading=!1;_hasPlaceholder=!0;_isBrowser;videoId;get height(){return this._height}set height(e){this._height=e==null||isNaN(e)?ZCe:e}_height=ZCe;get width(){return this._width}set width(e){this._width=e==null||isNaN(e)?KCe:e}_width=KCe;startSeconds;endSeconds;suggestedQuality;playerVars;disableCookies=!1;loadApi;disablePlaceholder=!1;showBeforeIframeApiLoads=!1;placeholderButtonLabel;placeholderImageQuality;ready=new yt;stateChange=this._getLazyEmitter("onStateChange");error=this._getLazyEmitter("onError");apiChange=this._getLazyEmitter("onApiChange");playbackQualityChange=this._getLazyEmitter("onPlaybackQualityChange");playbackRateChange=this._getLazyEmitter("onPlaybackRateChange");youtubeContainer;constructor(){let e=re(Xc),i=re(Dmt,{optional:!0});this.loadApi=i?.loadApi??!0,this.disablePlaceholder=!!i?.disablePlaceholder,this.placeholderButtonLabel=i?.placeholderButtonLabel||"Play video",this.placeholderImageQuality=i?.placeholderImageQuality||"standard",this._isBrowser=ns(e)}ngAfterViewInit(){this._conditionallyLoad()}ngOnChanges(e){this._shouldRecreatePlayer(e)?this._conditionallyLoad():this._player&&((e.width||e.height)&&this._setSize(),e.suggestedQuality&&this._setQuality(),(e.startSeconds||e.endSeconds||e.suggestedQuality)&&this._cuePlayer())}ngOnDestroy(){this._pendingPlayer?.destroy(),this._player&&(this._player.destroy(),window.onYouTubeIframeAPIReady=this._existingApiReadyCallback),this._playerChanges.complete(),this._destroyed.next(),this._destroyed.complete()}playVideo(){this._player?this._player.playVideo():(this._getPendingState().playbackState=n_.PLAYING,this._load(!0))}pauseVideo(){this._player?this._player.pauseVideo():this._getPendingState().playbackState=n_.PAUSED}stopVideo(){this._player?this._player.stopVideo():this._getPendingState().playbackState=n_.CUED}seekTo(e,i){this._player?this._player.seekTo(e,i):this._getPendingState().seek={seconds:e,allowSeekAhead:i}}mute(){this._player?this._player.mute():this._getPendingState().muted=!0}unMute(){this._player?this._player.unMute():this._getPendingState().muted=!1}isMuted(){return this._player?this._player.isMuted():this._pendingPlayerState?!!this._pendingPlayerState.muted:!1}setVolume(e){this._player?this._player.setVolume(e):this._getPendingState().volume=e}getVolume(){return this._player?this._player.getVolume():this._pendingPlayerState&&this._pendingPlayerState.volume!=null?this._pendingPlayerState.volume:0}setPlaybackRate(e){if(this._player)return this._player.setPlaybackRate(e);this._getPendingState().playbackRate=e}getPlaybackRate(){return this._player?this._player.getPlaybackRate():this._pendingPlayerState&&this._pendingPlayerState.playbackRate!=null?this._pendingPlayerState.playbackRate:0}getAvailablePlaybackRates(){return this._player?this._player.getAvailablePlaybackRates():[]}getVideoLoadedFraction(){return this._player?this._player.getVideoLoadedFraction():0}getPlayerState(){if(!(!this._isBrowser||!window.YT))return this._player?this._player.getPlayerState():this._pendingPlayerState&&this._pendingPlayerState.playbackState!=null?this._pendingPlayerState.playbackState:n_.UNSTARTED}getCurrentTime(){return this._player?this._player.getCurrentTime():this._pendingPlayerState&&this._pendingPlayerState.seek?this._pendingPlayerState.seek.seconds:0}getPlaybackQuality(){return this._player?this._player.getPlaybackQuality():"default"}getAvailableQualityLevels(){return this._player?this._player.getAvailableQualityLevels():[]}getDuration(){return this._player?this._player.getDuration():0}getVideoUrl(){return this._player?this._player.getVideoUrl():""}getVideoEmbedCode(){return this._player?this._player.getVideoEmbedCode():""}requestFullscreen(e){return tt(this,null,function*(){let i=this._elementRef.nativeElement;return i.requestFullscreen?i.requestFullscreen(e):Promise.reject(new Error("Fullscreen API not supported by browser."))})}_load(e){this._isBrowser&&(!window.YT||!window.YT.Player?(this.loadApi?(this._isLoading=!0,kmt(this._nonce)):this.showBeforeIframeApiLoads,this._existingApiReadyCallback=window.onYouTubeIframeAPIReady,window.onYouTubeIframeAPIReady=()=>{this._existingApiReadyCallback?.(),this._ngZone.run(()=>this._createPlayer(e))}):this._createPlayer(e))}_conditionallyLoad(){this._shouldShowPlaceholder()?this.playerVars?.autoplay===1&&this._load(!0):this._load(!1)}_shouldShowPlaceholder(){return this.disablePlaceholder?!1:this._isBrowser?this._hasPlaceholder&&!!this.videoId&&!this._player:!0}_getPendingState(){return this._pendingPlayerState||(this._pendingPlayerState={}),this._pendingPlayerState}_shouldRecreatePlayer(e){let i=e.videoId||e.playerVars||e.disableCookies||e.disablePlaceholder;return!!i&&!i.isFirstChange()}_createPlayer(e){if(this._player?.destroy(),this._pendingPlayer?.destroy(),typeof YT>"u"||!this.videoId&&!this.playerVars?.list)return;let i={host:this.disableCookies?"https://www.youtube-nocookie.com":void 0,width:this.width,height:this.height,playerVars:e?gt(ve({},this.playerVars||{}),{autoplay:1}):this.playerVars};this.videoId&&(i.videoId=this.videoId);let o=this._ngZone.runOutsideAngular(()=>new YT.Player(this.youtubeContainer.nativeElement,i)),r=a=>{this._ngZone.run(()=>{this._isLoading=!1,this._hasPlaceholder=!1,this._player=o,this._pendingPlayer=void 0,o.removeEventListener("onReady",r),this._playerChanges.next(o),this.ready.emit(a),this._setSize(),this._setQuality(),this._pendingPlayerState&&(this._applyPendingPlayerState(o,this._pendingPlayerState),this._pendingPlayerState=void 0);let p=o.getPlayerState();p===n_.UNSTARTED||p===n_.CUED||p==null?this._cuePlayer():e&&this.startSeconds&&this.startSeconds>0&&o.seekTo(this.startSeconds,!0),this._changeDetectorRef.markForCheck()})};this._pendingPlayer=o,o.addEventListener("onReady",r)}_applyPendingPlayerState(e,i){let{playbackState:o,playbackRate:r,volume:a,muted:p,seek:f}=i;switch(o){case n_.PLAYING:e.playVideo();break;case n_.PAUSED:e.pauseVideo();break;case n_.CUED:e.stopVideo();break}r!=null&&e.setPlaybackRate(r),a!=null&&e.setVolume(a),p!=null&&(p?e.mute():e.unMute()),f!=null&&e.seekTo(f.seconds,f.allowSeekAhead)}_cuePlayer(){this._player&&this.videoId&&this._player.cueVideoById({videoId:this.videoId,startSeconds:this.startSeconds,endSeconds:this.endSeconds,suggestedQuality:this.suggestedQuality})}_setSize(){this._player?.setSize(this.width,this.height)}_setQuality(){this._player&&this.suggestedQuality&&this._player.setPlaybackQuality(this.suggestedQuality)}_getLazyEmitter(e){return this._playerChanges.pipe(wo(i=>i?qN(o=>{i.addEventListener(e,o)},o=>{try{i?.removeEventListener?.(e,o)}catch{}}):Ni()),i=>new Co(o=>i.subscribe({next:r=>this._ngZone.run(()=>o.next(r)),error:r=>o.error(r),complete:()=>o.complete()})),Wr(this._destroyed))}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Le({type:t,selectors:[["youtube-player"]],viewQuery:function(i,o){if(i&1&&Qi(Tmt,7),i&2){let r;Je(r=et())&&(o.youtubeContainer=r.first)}},inputs:{videoId:"videoId",height:[2,"height","height",wn],width:[2,"width","width",wn],startSeconds:[2,"startSeconds","startSeconds",YCe],endSeconds:[2,"endSeconds","endSeconds",YCe],suggestedQuality:"suggestedQuality",playerVars:"playerVars",disableCookies:[2,"disableCookies","disableCookies",lt],loadApi:[2,"loadApi","loadApi",lt],disablePlaceholder:[2,"disablePlaceholder","disablePlaceholder",lt],showBeforeIframeApiLoads:[2,"showBeforeIframeApiLoads","showBeforeIframeApiLoads",lt],placeholderButtonLabel:"placeholderButtonLabel",placeholderImageQuality:"placeholderImageQuality"},outputs:{ready:"ready",stateChange:"stateChange",error:"error",apiChange:"apiChange",playbackQualityChange:"playbackQualityChange",playbackRateChange:"playbackRateChange"},features:[In],decls:4,vars:3,consts:[["youtubeContainer",""],[3,"videoId","width","height","isLoading","buttonLabel","quality"],[3,"click","videoId","width","height","isLoading","buttonLabel","quality"]],template:function(i,o){i&1&&(Lt(0,Emt,1,6,"youtube-player-placeholder",1),K(1,"div"),Oe(2,"div",null,0),Z()),i&2&&(Ft(o._shouldShowPlaceholder()?0:-1),L(),zr("display",o._shouldShowPlaceholder()?"none":""))},dependencies:[Amt],styles:[`youtube-player:fullscreen,youtube-player:fullscreen iframe{min-width:100vw;min-height:100vh} `],encapsulation:2,changeDetection:0})}return t})(),EJ=!1;function kmt(t){if(EJ)return;let n=IJ`https://www.youtube.com/iframe_api`,e=document.createElement("script"),i=o=>{e.removeEventListener("load",i),e.removeEventListener("error",i),o.type==="error"&&(EJ=!1)};e.addEventListener("load",i),e.addEventListener("error",i),a8(e,n),e.async=!0,t&&e.setAttribute("nonce",t),EJ=!0,document.body.appendChild(e)}var XCe=(()=>{class t{constructor(){this.apiLoaded=!1,this.videoWidth=200}ngOnInit(){if(!this.apiLoaded){let e=document.createElement("script");e.src="https://www.youtube.com/iframe_api",document.body.appendChild(e),this.apiLoaded=!0}}updateVideoWidth(e){this.videoWidth=e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Le({type:t,selectors:[["ays-code-browser-start-slider-ad"]],decls:31,vars:2,consts:[[1,"flex","flex-col","xl:flex-row","gap-0","xl:gap-6"],["bd-window-resize-listener","",1,"flex-1"],["bd-width-measurement","",1,"flex","flex-col","gap-6",3,"widthChange"],[1,"mat-headline-6"],["videoId","7kcPtUNXslg",3,"width"],[1,"mat-body"],[1,"flex-1"],[1,"flex","flex-col","gap-6"],["videoId","gx0cLSSQgDk",3,"width"],["mat-raised-button","","color","accent","href","https://www.bindoc.de/online-meeting","target","_blank","rel","noopener"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"div",2),Qe("widthChange",function(a){return o.updateVideoWidth(a)}),K(3,"div")(4,"span",3),Ce(5,"Tutorial zum Code-Browser"),Z()(),K(6,"div"),Oe(7,"youtube-player",4),Z(),K(8,"div")(9,"ul")(10,"li",5),Ce(11," Analysen nach allen DRG, ICD und OPS Ziffern mit der dazugeh\xF6rigen Altersverteilung sowie geographischen Verteilung in Deutschland "),Z(),K(12,"li",5),Ce(13," Transparenter \xDCberblick \xFCber die Top-Kliniken mit den h\xE4ufigsten Diagnosen und Prozeduren "),Z(),K(14,"li",5),Ce(15," Alle Zahlen und Berechnungen basieren auf dem aktuellsten Stand "),Z(),K(16,"li",5),Ce(17," Ver\xE4nderungen in Bezug auf die DRG, ICD und OPS Ziffern lassen sich bis in das Jahr 2010 r\xFCckwirkend verfolgen "),Z()()()()(),K(18,"div",6)(19,"div",7)(20,"div")(21,"span",3),Ce(22,"Mehr zu BinDoc Analytics"),Z()(),K(23,"div"),Oe(24,"youtube-player",8),Z(),K(25,"div")(26,"span",5),Ce(27,"Wir machen aus Daten Informationen, um den Fortschritt im Gesundheitswesen voranzutreiben. Unsere webbasierten Plattformen unterst\xFCtzen Krankenh\xE4usern, Medizintechnikunternehmen, \xC4rzte, LifeScience-Unternehmen und Unternehmensberatungen."),Z()(),K(28,"div")(29,"a",9),Ce(30,"Erfahren Sie mehr zu unseren L\xF6sungen"),Z()()()()()),i&2&&(L(7),B("width",o.videoWidth),L(17),B("width",o.videoWidth))},dependencies:[QCe,Jo,_s,zde,Vde],encapsulation:2})}}return t})();var JCe=(()=>{class t{constructor(e){this._meta=e,this._meta.addTags([{name:"description",content:"Suche oder Durchsuchen im Code Browser ICD DRG OPS Codes oder Ziffern kostenlos und immer aktuell"},{name:"robots",content:"index, follow"}])}static{this.\u0275fac=function(i){return new(i||t)(rt(rg))}}static{this.\u0275cmp=Le({type:t,selectors:[["ng-component"]],decls:42,vars:0,consts:[[1,"code-browser-start-hero","bd-primary"],[1,"flex","flex-col"],[1,"flex","flex-col","xl:flex-row","gap-0","xl:gap-6","justify-around","xl:justify-center","items-center"],[1,"mat-headline-3"],[1,"flex","flex-row","justify-around","items-center"],[1,"mat-headline-6"],[1,"flex","flex-col","md:flex-row","gap-6","md:gap-16"],["mat-raised-button","","color","accent","routerLink","/code-browser/drg"],["mat-raised-button","","color","accent","routerLink","/code-browser/icd"],["mat-raised-button","","color","accent","routerLink","/code-browser/ops"],[1,"code-browser-features","bd-primary"],[1,"flex","flex-col","lg:flex-row","gap-6","lg:gap-16","justify-around","items-start"],[1,"flex-1"],[1,"mat-body"],[1,"code-browser-videos"]],template:function(i,o){i&1&&(K(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"span",3),Ce(5,"BinDoc"),Z()(),K(6,"div")(7,"span",3),Ce(8,"Code-Browser"),Z()()(),K(9,"div",4)(10,"h1",5),Ce(11,"DRG, ICD und OPS Ziffern analysieren"),Z()(),K(12,"div",4)(13,"div",6)(14,"a",7),Ce(15,"DRG-Ziffer suchen"),Z(),K(16,"a",8),Ce(17,"ICD-Ziffer suchen"),Z(),K(18,"a",9),Ce(19,"OPS-Ziffer suchen"),Z()()()()(),K(20,"div",10)(21,"div",11)(22,"div",12)(23,"div",1)(24,"h2",5),Ce(25,"Kostenlos"),Z(),K(26,"span",13),Ce(27,"In der kostenfreien Variante sind Analysen nach allen Ziffern m\xF6glich. Die Altersverteilung der einzelnen Ziffern, sowie die geographische Verteilung in Deutschland sind zus\xE4tzlich enthalten."),Z()()(),K(28,"div",12)(29,"div",1)(30,"h2",5),Ce(31,"Verst\xE4ndlich"),Z(),K(32,"span",13),Ce(33,"Einfache und verst\xE4ndliche Texte und Grafiken zeigen und erl\xE4utern den Sachverhalt der einzelnen Ziffern."),Z()()(),K(34,"div",12)(35,"div",1)(36,"h2",5),Ce(37,"Immer aktuell"),Z(),K(38,"span",13),Ce(39,"Unsere Zahlen und Berechnungen sind immer auf den neuesten Stand, zus\xE4tzlich lassen sich alle Ver\xE4nderungen bis in das Jahr 2010 zur\xFCckverfolgen."),Z()()()()(),K(40,"div",14),Oe(41,"ays-code-browser-start-slider-ad"),Z())},dependencies:[Jo,_s,ba,XCe],styles:[".code-browser-start-hero[_ngcontent-%COMP%]{padding:62px 12px 0;min-height:300px}.code-browser-features[_ngcontent-%COMP%]{padding:24px 62px}.code-browser-videos[_ngcontent-%COMP%]{padding:24px 62px 62px}@media only screen and (max-width: 600px){.code-browser-start-hero[_ngcontent-%COMP%]{padding:24px 12px 0}.code-browser-features[_ngcontent-%COMP%]{padding:12px}.code-browser-videos[_ngcontent-%COMP%]{padding:12px 24px}}"]})}}return t})();var ewe=[{path:"",pathMatch:"full",component:JCe},{path:"DRG",redirectTo:"G-DRG"},{path:"drg",redirectTo:"G-DRG"},{path:"G-DRG",children:[{path:"",pathMatch:"full",data:{codingSystem:"G-DRG",description:"Suche nach G-DRG oder Ziffer oder durchsuchen von allen Ziffern",pageTitle:jd.title("G-DRG Ziffern suchen oder durchsuchen")},component:i8},{path:":drgCode",data:{pageTitle:jd.title("G-DRG Ziffer")},component:cCe}]},{path:"OPS",redirectTo:"ops"},{path:"ops",children:[{path:"",pathMatch:"full",data:{codingSystem:"OPS",description:"Suche nach OPS oder Ziffer oder durchsuchen von allen Ziffern",pageTitle:jd.title("OPS Ziffern suchen oder durchsuchen")},component:i8},{path:":opsCode",data:{pageTitle:jd.title("OPS Ziffer")},component:MCe}]},{path:"ICD",redirectTo:"ICD-10-GM"},{path:"icd",redirectTo:"ICD-10-GM"},{path:"ICD-10-GM",children:[{path:"",pathMatch:"full",data:{codingSystem:"ICD-10-GM",description:"Suche nach ICD-10-GM oder Ziffer oder durchsuchen von allen Ziffern",pageTitle:jd.title("ICD-10-GM Ziffern suchen oder durchsuchen")},component:i8},{path:":icdCode",data:{pageTitle:jd.title("ICD-10-GM Ziffer")},component:DCe}]}];var HIn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=yi({type:t})}static{this.\u0275inj=gi({imports:[fd.forChild(ewe),fd]})}}return t})();export{fn as a,ct as b,gi as c,ui as d,zn as e,fk as f,ja as g,L as h,dl as i,Le as j,yi as k,on as l,Lt as m,Ft as n,B as o,K as p,Z as q,Oe as r,jn as s,Yn as t,V as u,Ce as v,tp as w,DRe as x,qAt as y,E$ as z,YRe as A,JRe as B,aLe as C,Ude as D,jLe as E,nLt as F,eq as G,fd as H,kv as I,$M as J,_he as K,mg as L,U3e as M,i6t as N,hl as O,hW as P,mW as Q,H3e as R,b6t as S,Z6t as T,ofe as U,i$t as V,pY as W,C_e as X,w_e as Y,sui as Z,Tui as _,_Y as $,K7e as aa,Bhi as ba,aQt as ca,jd as da,I8e as ea,wb as fa,Ma as ga,os as ha,gl as ia,xr as ja,na as ka,UC as la,Zg as ma,Fs as na,Ra as oa,dve as pa,Il as qa,Tb as ra,dQ as sa,Ab as ta,rh as ua,hP as va,R6 as wa,uP as xa,Oa as ya,cA as za,dA as Aa,$C as Ba,q0 as Ca,mc as Da,Tl as Ea,cU as Fa,uX as Ga,lf as Ha,El as Ia,$be as Ja,AA as Ka,uf as La,YP as Ma,UU as Na,cCe as Oa,ICe as Pa,DCe as Qa,MCe as Ra,i8 as Sa,ewe as Ta,HIn as Ua};