var Fy=Object.create;var pc=Object.defineProperty,Py=Object.defineProperties,Ly=Object.getOwnPropertyDescriptor,Vy=Object.getOwnPropertyDescriptors,jy=Object.getOwnPropertyNames,rf=Object.getOwnPropertySymbols,By=Object.getPrototypeOf,sf=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable;var of=(e,n,t)=>n in e?pc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,X=(e,n)=>{for(var t in n||={})sf.call(n,t)&&of(e,t,n[t]);if(rf)for(var t of rf(n))Hy.call(n,t)&&of(e,t,n[t]);return e},_e=(e,n)=>Py(e,Vy(n));var Ni=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Uy=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var zy=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of jy(n))!sf.call(e,i)&&i!==t&&pc(e,i,{get:()=>n[i],enumerable:!(r=Ly(n,i))||r.enumerable});return e};var $y=(e,n,t)=>(t=e!=null?Fy(By(e)):{},zy(n||!e||!e.__esModule?pc(t,"default",{value:e,enumerable:!0}):t,e));var Be=(e,n,t)=>new Promise((r,i)=>{var o=c=>{try{a(t.next(c))}catch(l){i(l)}},s=c=>{try{a(t.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((t=t.apply(e,n)).next())});var xy=Uy((My,ef)=>{"use strict";(function(e){typeof My=="object"&&typeof ef<"u"?ef.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=e()})(function(){return(function e(n,t,r){function i(a,c){if(!t[a]){if(!n[a]){var l=typeof Ni=="function"&&Ni;if(!c&&l)return l(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var u=t[a]={exports:{}};n[a][0].call(u.exports,function(p){var d=n[a][1][p];return i(d||p)},u,u.exports,e,n,t,r)}return t[a].exports}for(var o=typeof Ni=="function"&&Ni,s=0;s>2,u=(3&a)<<4|c>>4,p=1<_?(15&c)<<2|l>>6:64,d=2<_?63&l:64,m.push(o.charAt(f)+o.charAt(u)+o.charAt(p)+o.charAt(d));return m.join("")},t.decode=function(s){var a,c,l,f,u,p,d=0,m=0,y="data:";if(s.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var v,_=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===o.charAt(64)&&_--,s.charAt(s.length-2)===o.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|_):new Array(0|_);d>4,c=(15&f)<<4|(u=o.indexOf(s.charAt(d++)))>>2,l=(3&u)<<6|(p=o.indexOf(s.charAt(d++))),v[m++]=a,u!==64&&(v[m++]=c),p!==64&&(v[m++]=l);return v}},{"./support":30,"./utils":32}],2:[function(e,n,t){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(c,l,f,u,p){this.compressedSize=c,this.uncompressedSize=l,this.crc32=f,this.compression=u,this.compressedContent=p}a.prototype={getContentWorker:function(){var c=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),l=this;return c.on("end",function(){if(this.streamInfo.data_length!==l.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(c,l,f){return c.pipe(new o).pipe(new s("uncompressedSize")).pipe(l.compressWorker(f)).pipe(new s("compressedSize")).withStreamInfo("compression",l)},n.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,n,t){"use strict";var r=e("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,n,t){"use strict";var r=e("./utils"),i=(function(){for(var o,s=[],a=0;a<256;a++){o=a;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;s[a]=o}return s})();n.exports=function(o,s){return o!==void 0&&o.length?r.getTypeOf(o)!=="string"?(function(a,c,l,f){var u=i,p=f+l;a^=-1;for(var d=f;d>>8^u[255&(a^c[d])];return-1^a})(0|s,o,o.length,0):(function(a,c,l,f){var u=i,p=f+l;a^=-1;for(var d=f;d>>8^u[255&(a^c.charCodeAt(d))];return-1^a})(0|s,o,o.length,0):0}},{"./utils":32}],5:[function(e,n,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(e,n,t){"use strict";var r=null;r=typeof Promise<"u"?Promise:e("lie"),n.exports={Promise:r}},{lie:37}],7:[function(e,n,t){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=r?"uint8array":"array";function c(l,f){s.call(this,"FlateWorker/"+l),this._pako=null,this._pakoAction=l,this._pakoOptions=f,this.meta={}}t.magic="\b\0",o.inherits(c,s),c.prototype.processChunk=function(l){this.meta=l.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(a,l.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var l=this;this._pako.onData=function(f){l.push({data:f,meta:l.meta})}},t.compressWorker=function(l){return new c("Deflate",l)},t.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,n,t){"use strict";function r(u,p){var d,m="";for(d=0;d>>=8;return m}function i(u,p,d,m,y,v){var _,b,E=u.file,S=u.compression,A=v!==a.utf8encode,P=o.transformTo("string",v(E.name)),N=o.transformTo("string",a.utf8encode(E.name)),j=E.comment,J=o.transformTo("string",v(j)),C=o.transformTo("string",a.utf8encode(j)),O=N.length!==E.name.length,g=C.length!==j.length,k="",ce="",B="",me=E.dir,H=E.date,le={crc32:0,compressedSize:0,uncompressedSize:0};p&&!d||(le.crc32=u.crc32,le.compressedSize=u.compressedSize,le.uncompressedSize=u.uncompressedSize);var T=0;p&&(T|=8),A||!O&&!g||(T|=2048);var x=0,se=0;me&&(x|=16),y==="UNIX"?(se=798,x|=(function(W,Le){var Je=W;return W||(Je=Le?16893:33204),(65535&Je)<<16})(E.unixPermissions,me)):(se=20,x|=(function(W){return 63&(W||0)})(E.dosPermissions)),_=H.getUTCHours(),_<<=6,_|=H.getUTCMinutes(),_<<=5,_|=H.getUTCSeconds()/2,b=H.getUTCFullYear()-1980,b<<=4,b|=H.getUTCMonth()+1,b<<=5,b|=H.getUTCDate(),O&&(ce=r(1,1)+r(c(P),4)+N,k+="up"+r(ce.length,2)+ce),g&&(B=r(1,1)+r(c(J),4)+C,k+="uc"+r(B.length,2)+B);var Z="";return Z+=` \0`,Z+=r(T,2),Z+=S.magic,Z+=r(_,2),Z+=r(b,2),Z+=r(le.crc32,4),Z+=r(le.compressedSize,4),Z+=r(le.uncompressedSize,4),Z+=r(P.length,2),Z+=r(k.length,2),{fileRecord:l.LOCAL_FILE_HEADER+Z+P+k,dirRecord:l.CENTRAL_FILE_HEADER+r(se,2)+Z+r(J.length,2)+"\0\0\0\0"+r(x,4)+r(m,4)+P+k+J}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),c=e("../crc32"),l=e("../signature");function f(u,p,d,m){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=d,this.encodeFileName=m,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(f,s),f.prototype.push=function(u){var p=u.meta.percent||0,d=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,s.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:d?(p+100*(d-m-1))/d:100}}))},f.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var p=this.streamFiles&&!u.file.dir;if(p){var d=i(u,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(u){this.accumulate=!1;var p=this.streamFiles&&!u.file.dir,d=i(u,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),p)this.push({data:(function(m){return l.DATA_DESCRIPTOR+r(m.crc32,4)+r(m.compressedSize,4)+r(m.uncompressedSize,4)})(u),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var u=this.bytesWritten,p=0;p=this.index;s--)a=(a<<8)+this.byteAt(s);return this.index+=o,a},readString:function(o){return r.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=i},{"../utils":32}],19:[function(e,n,t){"use strict";var r=e("./Uint8ArrayReader");function i(o){r.call(this,o)}e("../utils").inherits(i,r),i.prototype.readData=function(o){this.checkOffset(o);var s=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},n.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,n,t){"use strict";var r=e("./DataReader");function i(o){r.call(this,o)}e("../utils").inherits(i,r),i.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},i.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},i.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},i.prototype.readData=function(o){this.checkOffset(o);var s=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},n.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,n,t){"use strict";var r=e("./ArrayReader");function i(o){r.call(this,o)}e("../utils").inherits(i,r),i.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,s},n.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,n,t){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");n.exports=function(l){var f=r.getTypeOf(l);return r.checkSupport(f),f!=="string"||i.uint8array?f==="nodebuffer"?new a(l):i.uint8array?new c(r.transformTo("uint8array",l)):new o(r.transformTo("array",l)):new s(l)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,n,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,n,t){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(s){r.call(this,"ConvertWorker to "+s),this.destType=s}i.inherits(o,r),o.prototype.processChunk=function(s){this.push({data:i.transformTo(this.destType,s.data),meta:s.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,n,t){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(s){this.streamInfo.crc32=i(s.data,this.streamInfo.crc32||0),this.push(s)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,n,t){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(s){i.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}r.inherits(o,i),o.prototype.processChunk=function(s){if(s){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+s.data.length}i.prototype.processChunk.call(this,s)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,n,t){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(s){i.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(c){a.dataIsReady=!0,a.data=c,a.max=c&&c.length||0,a.type=r.getTypeOf(c),a.isPaused||a._tickAndRepeat()},function(c){a.error(c)})}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,a);break;case"uint8array":s=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":s=this.data.slice(this.index,a)}return this.index=a,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,n,t){"use strict";function r(i){this.name=i||"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}r.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,o){return this._listeners[i].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,o){if(this._listeners[i])for(var s=0;s "+i:i}},n.exports=r},{}],29:[function(e,n,t){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),s=e("../base64"),a=e("../support"),c=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(p,d){return new c.Promise(function(m,y){var v=[],_=p._internalType,b=p._outputType,E=p._mimeType;p.on("data",function(S,A){v.push(S),d&&d(A)}).on("error",function(S){v=[],y(S)}).on("end",function(){try{var S=(function(A,P,N){switch(A){case"blob":return r.newBlob(r.transformTo("arraybuffer",P),N);case"base64":return s.encode(P);default:return r.transformTo(A,P)}})(b,(function(A,P){var N,j=0,J=null,C=0;for(N=0;N"u")t.blob=!1;else{var r=new ArrayBuffer(0);try{t.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),t.blob=i.getBlob("application/zip").size===0}catch{t.blob=!1}}}try{t.nodestream=!!e("readable-stream").Readable}catch{t.nodestream=!1}},{"readable-stream":16}],31:[function(e,n,t){"use strict";for(var r=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),c=0;c<256;c++)a[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function f(){s.call(this,"utf-8 encode")}t.utf8encode=function(u){return i.nodebuffer?o.newBufferFrom(u,"utf-8"):(function(p){var d,m,y,v,_,b=p.length,E=0;for(v=0;v>>6:(m<65536?d[_++]=224|m>>>12:(d[_++]=240|m>>>18,d[_++]=128|m>>>12&63),d[_++]=128|m>>>6&63),d[_++]=128|63&m);return d})(u)},t.utf8decode=function(u){return i.nodebuffer?r.transformTo("nodebuffer",u).toString("utf-8"):(function(p){var d,m,y,v,_=p.length,b=new Array(2*_);for(d=m=0;d<_;)if((y=p[d++])<128)b[m++]=y;else if(4<(v=a[y]))b[m++]=65533,d+=v-1;else{for(y&=v===2?31:v===3?15:7;1>10&1023,b[m++]=56320|1023&y)}return b.length!==m&&(b.subarray?b=b.subarray(0,m):b.length=m),r.applyFromCharCode(b)})(u=r.transformTo(i.uint8array?"uint8array":"array",u))},r.inherits(l,s),l.prototype.processChunk=function(u){var p=r.transformTo(i.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var d=p;(p=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),p.set(d,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var m=(function(v,_){var b;for((_=_||v.length)>v.length&&(_=v.length),b=_-1;0<=b&&(192&v[b])==128;)b--;return b<0||b===0?_:b+a[v[b]]>_?b:_})(p),y=p;m!==p.length&&(i.uint8array?(y=p.subarray(0,m),this.leftOver=p.subarray(m,p.length)):(y=p.slice(0,m),this.leftOver=p.slice(m,p.length))),this.push({data:t.utf8decode(y),meta:u.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=l,r.inherits(f,s),f.prototype.processChunk=function(u){this.push({data:t.utf8encode(u.data),meta:u.meta})},t.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,n,t){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),s=e("./external");function a(d){return d}function c(d,m){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var p,d,m,y=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4>>6:(u<65536?f[m++]=224|u>>>12:(f[m++]=240|u>>>18,f[m++]=128|u>>>12&63),f[m++]=128|u>>>6&63),f[m++]=128|63&u);return f},t.buf2binstring=function(l){return c(l,l.length)},t.binstring2buf=function(l){for(var f=new r.Buf8(l.length),u=0,p=f.length;u>10&1023,v[p++]=56320|1023&d)}return c(v,p)},t.utf8border=function(l,f){var u;for((f=f||l.length)>l.length&&(f=l.length),u=f-1;0<=u&&(192&l[u])==128;)u--;return u<0||u===0?f:u+s[l[u]]>f?u:f}},{"./common":41}],43:[function(e,n,t){"use strict";n.exports=function(r,i,o,s){for(var a=65535&r|0,c=r>>>16&65535|0,l=0;o!==0;){for(o-=l=2e3>>1:i>>>1;o[s]=i}return o})();n.exports=function(i,o,s,a){var c=r,l=a+s;i^=-1;for(var f=a;f>>8^c[255&(i^o[f])];return-1^i}},{}],46:[function(e,n,t){"use strict";var r,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),c=e("./messages"),l=0,f=4,u=0,p=-2,d=-1,m=4,y=2,v=8,_=9,b=286,E=30,S=19,A=2*b+1,P=15,N=3,j=258,J=j+N+1,C=42,O=113,g=1,k=2,ce=3,B=4;function me(h,F){return h.msg=c[F],F}function H(h){return(h<<1)-(4h.avail_out&&(R=h.avail_out),R!==0&&(i.arraySet(h.output,F.pending_buf,F.pending_out,R,h.next_out),h.next_out+=R,F.pending_out+=R,h.total_out+=R,h.avail_out-=R,F.pending-=R,F.pending===0&&(F.pending_out=0))}function x(h,F){o._tr_flush_block(h,0<=h.block_start?h.block_start:-1,h.strstart-h.block_start,F),h.block_start=h.strstart,T(h.strm)}function se(h,F){h.pending_buf[h.pending++]=F}function Z(h,F){h.pending_buf[h.pending++]=F>>>8&255,h.pending_buf[h.pending++]=255&F}function W(h,F){var R,w,D=h.max_chain_length,I=h.strstart,L=h.prev_length,V=h.nice_match,M=h.strstart>h.w_size-J?h.strstart-(h.w_size-J):0,U=h.window,Y=h.w_mask,z=h.prev,re=h.strstart+j,Se=U[I+L-1],Ce=U[I+L];h.prev_length>=h.good_match&&(D>>=2),V>h.lookahead&&(V=h.lookahead);do if(U[(R=F)+L]===Ce&&U[R+L-1]===Se&&U[R]===U[I]&&U[++R]===U[I+1]){I+=2,R++;do;while(U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&U[++I]===U[++R]&&IM&&--D!=0);return L<=h.lookahead?L:h.lookahead}function Le(h){var F,R,w,D,I,L,V,M,U,Y,z=h.w_size;do{if(D=h.window_size-h.lookahead-h.strstart,h.strstart>=z+(z-J)){for(i.arraySet(h.window,h.window,z,z,0),h.match_start-=z,h.strstart-=z,h.block_start-=z,F=R=h.hash_size;w=h.head[--F],h.head[F]=z<=w?w-z:0,--R;);for(F=R=z;w=h.prev[--F],h.prev[F]=z<=w?w-z:0,--R;);D+=z}if(h.strm.avail_in===0)break;if(L=h.strm,V=h.window,M=h.strstart+h.lookahead,U=D,Y=void 0,Y=L.avail_in,U=N)for(I=h.strstart-h.insert,h.ins_h=h.window[I],h.ins_h=(h.ins_h<=N&&(h.ins_h=(h.ins_h<=N)if(w=o._tr_tally(h,h.strstart-h.match_start,h.match_length-N),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=N){for(h.match_length--;h.strstart++,h.ins_h=(h.ins_h<=N&&(h.ins_h=(h.ins_h<=N&&h.match_length<=h.prev_length){for(D=h.strstart+h.lookahead-N,w=o._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-N),h.lookahead-=h.prev_length-1,h.prev_length-=2;++h.strstart<=D&&(h.ins_h=(h.ins_h<h.pending_buf_size-5&&(R=h.pending_buf_size-5);;){if(h.lookahead<=1){if(Le(h),h.lookahead===0&&F===l)return g;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var w=h.block_start+R;if((h.strstart===0||h.strstart>=w)&&(h.lookahead=h.strstart-w,h.strstart=w,x(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-J&&(x(h,!1),h.strm.avail_out===0))return g}return h.insert=0,F===f?(x(h,!0),h.strm.avail_out===0?ce:B):(h.strstart>h.block_start&&(x(h,!1),h.strm.avail_out),g)}),new Ee(4,4,8,4,Je),new Ee(4,5,16,8,Je),new Ee(4,6,32,32,Je),new Ee(4,4,16,16,we),new Ee(8,16,32,32,we),new Ee(8,16,128,128,we),new Ee(8,32,128,256,we),new Ee(32,128,258,1024,we),new Ee(32,258,258,4096,we)],t.deflateInit=function(h,F){return St(h,F,v,15,8,0)},t.deflateInit2=St,t.deflateReset=zt,t.deflateResetKeep=Ve,t.deflateSetHeader=function(h,F){return h&&h.state?h.state.wrap!==2?p:(h.state.gzhead=F,u):p},t.deflate=function(h,F){var R,w,D,I;if(!h||!h.state||5>8&255),se(w,w.gzhead.time>>16&255),se(w,w.gzhead.time>>24&255),se(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),se(w,255&w.gzhead.os),w.gzhead.extra&&w.gzhead.extra.length&&(se(w,255&w.gzhead.extra.length),se(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(h.adler=a(h.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=69):(se(w,0),se(w,0),se(w,0),se(w,0),se(w,0),se(w,w.level===9?2:2<=w.strategy||w.level<2?4:0),se(w,3),w.status=O);else{var L=v+(w.w_bits-8<<4)<<8;L|=(2<=w.strategy||w.level<2?0:w.level<6?1:w.level===6?2:3)<<6,w.strstart!==0&&(L|=32),L+=31-L%31,w.status=O,Z(w,L),w.strstart!==0&&(Z(w,h.adler>>>16),Z(w,65535&h.adler)),h.adler=1}if(w.status===69)if(w.gzhead.extra){for(D=w.pending;w.gzindex<(65535&w.gzhead.extra.length)&&(w.pending!==w.pending_buf_size||(w.gzhead.hcrc&&w.pending>D&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),T(h),D=w.pending,w.pending!==w.pending_buf_size));)se(w,255&w.gzhead.extra[w.gzindex]),w.gzindex++;w.gzhead.hcrc&&w.pending>D&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=73)}else w.status=73;if(w.status===73)if(w.gzhead.name){D=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>D&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),T(h),D=w.pending,w.pending===w.pending_buf_size)){I=1;break}I=w.gzindexD&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),I===0&&(w.gzindex=0,w.status=91)}else w.status=91;if(w.status===91)if(w.gzhead.comment){D=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>D&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),T(h),D=w.pending,w.pending===w.pending_buf_size)){I=1;break}I=w.gzindexD&&(h.adler=a(h.adler,w.pending_buf,w.pending-D,D)),I===0&&(w.status=103)}else w.status=103;if(w.status===103&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&T(h),w.pending+2<=w.pending_buf_size&&(se(w,255&h.adler),se(w,h.adler>>8&255),h.adler=0,w.status=O)):w.status=O),w.pending!==0){if(T(h),h.avail_out===0)return w.last_flush=-1,u}else if(h.avail_in===0&&H(F)<=H(R)&&F!==f)return me(h,-5);if(w.status===666&&h.avail_in!==0)return me(h,-5);if(h.avail_in!==0||w.lookahead!==0||F!==l&&w.status!==666){var V=w.strategy===2?(function(M,U){for(var Y;;){if(M.lookahead===0&&(Le(M),M.lookahead===0)){if(U===l)return g;break}if(M.match_length=0,Y=o._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,Y&&(x(M,!1),M.strm.avail_out===0))return g}return M.insert=0,U===f?(x(M,!0),M.strm.avail_out===0?ce:B):M.last_lit&&(x(M,!1),M.strm.avail_out===0)?g:k})(w,F):w.strategy===3?(function(M,U){for(var Y,z,re,Se,Ce=M.window;;){if(M.lookahead<=j){if(Le(M),M.lookahead<=j&&U===l)return g;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=N&&0M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=N?(Y=o._tr_tally(M,1,M.match_length-N),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(Y=o._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),Y&&(x(M,!1),M.strm.avail_out===0))return g}return M.insert=0,U===f?(x(M,!0),M.strm.avail_out===0?ce:B):M.last_lit&&(x(M,!1),M.strm.avail_out===0)?g:k})(w,F):r[w.level].func(w,F);if(V!==ce&&V!==B||(w.status=666),V===g||V===ce)return h.avail_out===0&&(w.last_flush=-1),u;if(V===k&&(F===1?o._tr_align(w):F!==5&&(o._tr_stored_block(w,0,0,!1),F===3&&(le(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),T(h),h.avail_out===0))return w.last_flush=-1,u}return F!==f?u:w.wrap<=0?1:(w.wrap===2?(se(w,255&h.adler),se(w,h.adler>>8&255),se(w,h.adler>>16&255),se(w,h.adler>>24&255),se(w,255&h.total_in),se(w,h.total_in>>8&255),se(w,h.total_in>>16&255),se(w,h.total_in>>24&255)):(Z(w,h.adler>>>16),Z(w,65535&h.adler)),T(h),0=R.w_size&&(I===0&&(le(R.head),R.strstart=0,R.block_start=0,R.insert=0),U=new i.Buf8(R.w_size),i.arraySet(U,F,Y-R.w_size,R.w_size,0),F=U,Y=R.w_size),L=h.avail_in,V=h.next_in,M=h.input,h.avail_in=Y,h.next_in=0,h.input=F,Le(R);R.lookahead>=N;){for(w=R.strstart,D=R.lookahead-(N-1);R.ins_h=(R.ins_h<>>=N=P>>>24,_-=N,(N=P>>>16&255)===0)k[c++]=65535&P;else{if(!(16&N)){if((64&N)==0){P=b[(65535&P)+(v&(1<>>=N,_-=N),_<15&&(v+=g[s++]<<_,_+=8,v+=g[s++]<<_,_+=8),P=E[v&A];n:for(;;){if(v>>>=N=P>>>24,_-=N,!(16&(N=P>>>16&255))){if((64&N)==0){P=E[(65535&P)+(v&(1<>>=N,_-=N,(N=c-l)>3,v&=(1<<(_-=j<<3))-1,r.next_in=s,r.next_out=c,r.avail_in=s>>24&255)+(C>>>8&65280)+((65280&C)<<8)+((255&C)<<24)}function v(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(C){var O;return C&&C.state?(O=C.state,C.total_in=C.total_out=O.total=0,C.msg="",O.wrap&&(C.adler=1&O.wrap),O.mode=p,O.last=0,O.havedict=0,O.dmax=32768,O.head=null,O.hold=0,O.bits=0,O.lencode=O.lendyn=new r.Buf32(d),O.distcode=O.distdyn=new r.Buf32(m),O.sane=1,O.back=-1,f):u}function b(C){var O;return C&&C.state?((O=C.state).wsize=0,O.whave=0,O.wnext=0,_(C)):u}function E(C,O){var g,k;return C&&C.state?(k=C.state,O<0?(g=0,O=-O):(g=1+(O>>4),O<48&&(O&=15)),O&&(O<8||15=B.wsize?(r.arraySet(B.window,O,g-B.wsize,B.wsize,0),B.wnext=0,B.whave=B.wsize):(k<(ce=B.wsize-B.wnext)&&(ce=k),r.arraySet(B.window,O,g-k,ce,B.wnext),(k-=ce)?(r.arraySet(B.window,O,g-k,k,0),B.wnext=k,B.whave=B.wsize):(B.wnext+=ce,B.wnext===B.wsize&&(B.wnext=0),B.whave>>8&255,g.check=o(g.check,I,2,0),x=T=0,g.mode=2;break}if(g.flags=0,g.head&&(g.head.done=!1),!(1&g.wrap)||(((255&T)<<8)+(T>>8))%31){C.msg="incorrect header check",g.mode=30;break}if((15&T)!=8){C.msg="unknown compression method",g.mode=30;break}if(x-=4,h=8+(15&(T>>>=4)),g.wbits===0)g.wbits=h;else if(h>g.wbits){C.msg="invalid window size",g.mode=30;break}g.dmax=1<>8&1),512&g.flags&&(I[0]=255&T,I[1]=T>>>8&255,g.check=o(g.check,I,2,0)),x=T=0,g.mode=3;case 3:for(;x<32;){if(H===0)break e;H--,T+=k[B++]<>>8&255,I[2]=T>>>16&255,I[3]=T>>>24&255,g.check=o(g.check,I,4,0)),x=T=0,g.mode=4;case 4:for(;x<16;){if(H===0)break e;H--,T+=k[B++]<>8),512&g.flags&&(I[0]=255&T,I[1]=T>>>8&255,g.check=o(g.check,I,2,0)),x=T=0,g.mode=5;case 5:if(1024&g.flags){for(;x<16;){if(H===0)break e;H--,T+=k[B++]<>>8&255,g.check=o(g.check,I,2,0)),x=T=0}else g.head&&(g.head.extra=null);g.mode=6;case 6:if(1024&g.flags&&(H<(W=g.length)&&(W=H),W&&(g.head&&(h=g.head.extra_len-g.length,g.head.extra||(g.head.extra=new Array(g.head.extra_len)),r.arraySet(g.head.extra,k,B,W,h)),512&g.flags&&(g.check=o(g.check,k,W,B)),H-=W,B+=W,g.length-=W),g.length))break e;g.length=0,g.mode=7;case 7:if(2048&g.flags){if(H===0)break e;for(W=0;h=k[B+W++],g.head&&h&&g.length<65536&&(g.head.name+=String.fromCharCode(h)),h&&W>9&1,g.head.done=!0),C.adler=g.check=0,g.mode=12;break;case 10:for(;x<32;){if(H===0)break e;H--,T+=k[B++]<>>=7&x,x-=7&x,g.mode=27;break}for(;x<3;){if(H===0)break e;H--,T+=k[B++]<>>=1)){case 0:g.mode=14;break;case 1:if(j(g),g.mode=20,O!==6)break;T>>>=2,x-=2;break e;case 2:g.mode=17;break;case 3:C.msg="invalid block type",g.mode=30}T>>>=2,x-=2;break;case 14:for(T>>>=7&x,x-=7&x;x<32;){if(H===0)break e;H--,T+=k[B++]<>>16^65535)){C.msg="invalid stored block lengths",g.mode=30;break}if(g.length=65535&T,x=T=0,g.mode=15,O===6)break e;case 15:g.mode=16;case 16:if(W=g.length){if(H>>=5,x-=5,g.ndist=1+(31&T),T>>>=5,x-=5,g.ncode=4+(15&T),T>>>=4,x-=4,286>>=3,x-=3}for(;g.have<19;)g.lens[L[g.have++]]=0;if(g.lencode=g.lendyn,g.lenbits=7,R={bits:g.lenbits},F=a(0,g.lens,0,19,g.lencode,0,g.work,R),g.lenbits=R.bits,F){C.msg="invalid code lengths set",g.mode=30;break}g.have=0,g.mode=19;case 19:for(;g.have>>16&255,We=65535&D,!((we=D>>>24)<=x);){if(H===0)break e;H--,T+=k[B++]<>>=we,x-=we,g.lens[g.have++]=We;else{if(We===16){for(w=we+2;x>>=we,x-=we,g.have===0){C.msg="invalid bit length repeat",g.mode=30;break}h=g.lens[g.have-1],W=3+(3&T),T>>>=2,x-=2}else if(We===17){for(w=we+3;x>>=we)),T>>>=3,x-=3}else{for(w=we+7;x>>=we)),T>>>=7,x-=7}if(g.have+W>g.nlen+g.ndist){C.msg="invalid bit length repeat",g.mode=30;break}for(;W--;)g.lens[g.have++]=h}}if(g.mode===30)break;if(g.lens[256]===0){C.msg="invalid code -- missing end-of-block",g.mode=30;break}if(g.lenbits=9,R={bits:g.lenbits},F=a(c,g.lens,0,g.nlen,g.lencode,0,g.work,R),g.lenbits=R.bits,F){C.msg="invalid literal/lengths set",g.mode=30;break}if(g.distbits=6,g.distcode=g.distdyn,R={bits:g.distbits},F=a(l,g.lens,g.nlen,g.ndist,g.distcode,0,g.work,R),g.distbits=R.bits,F){C.msg="invalid distances set",g.mode=30;break}if(g.mode=20,O===6)break e;case 20:g.mode=21;case 21:if(6<=H&&258<=le){C.next_out=me,C.avail_out=le,C.next_in=B,C.avail_in=H,g.hold=T,g.bits=x,s(C,Z),me=C.next_out,ce=C.output,le=C.avail_out,B=C.next_in,k=C.input,H=C.avail_in,T=g.hold,x=g.bits,g.mode===12&&(g.back=-1);break}for(g.back=0;Ee=(D=g.lencode[T&(1<>>16&255,We=65535&D,!((we=D>>>24)<=x);){if(H===0)break e;H--,T+=k[B++]<>Ve)])>>>16&255,We=65535&D,!(Ve+(we=D>>>24)<=x);){if(H===0)break e;H--,T+=k[B++]<>>=Ve,x-=Ve,g.back+=Ve}if(T>>>=we,x-=we,g.back+=we,g.length=We,Ee===0){g.mode=26;break}if(32&Ee){g.back=-1,g.mode=12;break}if(64&Ee){C.msg="invalid literal/length code",g.mode=30;break}g.extra=15&Ee,g.mode=22;case 22:if(g.extra){for(w=g.extra;x>>=g.extra,x-=g.extra,g.back+=g.extra}g.was=g.length,g.mode=23;case 23:for(;Ee=(D=g.distcode[T&(1<>>16&255,We=65535&D,!((we=D>>>24)<=x);){if(H===0)break e;H--,T+=k[B++]<>Ve)])>>>16&255,We=65535&D,!(Ve+(we=D>>>24)<=x);){if(H===0)break e;H--,T+=k[B++]<>>=Ve,x-=Ve,g.back+=Ve}if(T>>>=we,x-=we,g.back+=we,64&Ee){C.msg="invalid distance code",g.mode=30;break}g.offset=We,g.extra=15&Ee,g.mode=24;case 24:if(g.extra){for(w=g.extra;x>>=g.extra,x-=g.extra,g.back+=g.extra}if(g.offset>g.dmax){C.msg="invalid distance too far back",g.mode=30;break}g.mode=25;case 25:if(le===0)break e;if(W=Z-le,g.offset>W){if((W=g.offset-W)>g.whave&&g.sane){C.msg="invalid distance too far back",g.mode=30;break}Le=W>g.wnext?(W-=g.wnext,g.wsize-W):g.wnext-W,W>g.length&&(W=g.length),Je=g.window}else Je=ce,Le=me-g.offset,W=g.length;for(leA?(N=Le[Je+m[O]],x[se+m[O]]):(N=96,0),v=1<>me)+(_-=v)]=P<<24|N<<16|j|0,_!==0;);for(v=1<>=1;if(v!==0?(T&=v-1,T+=v):T=0,O++,--Z[C]==0){if(C===k)break;C=l[f+m[O]]}if(ce>>7)]}function se(D,I){D.pending_buf[D.pending++]=255&I,D.pending_buf[D.pending++]=I>>>8&255}function Z(D,I,L){D.bi_valid>y-L?(D.bi_buf|=I<>y-D.bi_valid,D.bi_valid+=L-y):(D.bi_buf|=I<>>=1,L<<=1,0<--I;);return L>>>1}function Je(D,I,L){var V,M,U=new Array(m+1),Y=0;for(V=1;V<=m;V++)U[V]=Y=Y+L[V-1]<<1;for(M=0;M<=I;M++){var z=D[2*M+1];z!==0&&(D[2*M]=Le(U[z]++,z))}}function we(D){var I;for(I=0;I>1;1<=L;L--)Ve(D,U,L);for(M=re;L=D.heap[1],D.heap[1]=D.heap[D.heap_len--],Ve(D,U,1),V=D.heap[1],D.heap[--D.heap_max]=L,D.heap[--D.heap_max]=V,U[2*M]=U[2*L]+U[2*V],D.depth[M]=(D.depth[L]>=D.depth[V]?D.depth[L]:D.depth[V])+1,U[2*L+1]=U[2*V+1]=M,D.heap[1]=M++,Ve(D,U,1),2<=D.heap_len;);D.heap[--D.heap_max]=D.heap[1],(function(Ce,yt){var Ti,$t,Si,je,$o,hc,sn=yt.dyn_tree,tf=yt.max_code,Ry=yt.stat_desc.static_tree,Oy=yt.stat_desc.has_stree,ky=yt.stat_desc.extra_bits,nf=yt.stat_desc.extra_base,Ai=yt.stat_desc.max_length,Wo=0;for(je=0;je<=m;je++)Ce.bl_count[je]=0;for(sn[2*Ce.heap[Ce.heap_max]+1]=0,Ti=Ce.heap_max+1;Ti>=7;M>>=1)if(1&Se&&z.dyn_ltree[2*re]!==0)return i;if(z.dyn_ltree[18]!==0||z.dyn_ltree[20]!==0||z.dyn_ltree[26]!==0)return o;for(re=32;re>>3,(U=D.static_len+3+7>>>3)<=M&&(M=U)):M=U=L+5,L+4<=M&&I!==-1?w(D,I,L,V):D.strategy===4||U===M?(Z(D,2+(V?1:0),3),zt(D,J,C)):(Z(D,4+(V?1:0),3),(function(z,re,Se,Ce){var yt;for(Z(z,re-257,5),Z(z,Se-1,5),Z(z,Ce-4,4),yt=0;yt>>8&255,D.pending_buf[D.d_buf+2*D.last_lit+1]=255&I,D.pending_buf[D.l_buf+D.last_lit]=255&L,D.last_lit++,I===0?D.dyn_ltree[2*L]++:(D.matches++,I--,D.dyn_ltree[2*(g[L]+l+1)]++,D.dyn_dtree[2*x(I)]++),D.last_lit===D.lit_bufsize-1},t._tr_align=function(D){Z(D,2,3),W(D,_,J),(function(I){I.bi_valid===16?(se(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(D)}},{"../utils/common":41}],53:[function(e,n,t){"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(e,n,t){(function(r){(function(i,o){"use strict";if(!i.setImmediate){var s,a,c,l,f=1,u={},p=!1,d=i.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(i);m=m&&m.setTimeout?m:i,s={}.toString.call(i.process)==="[object process]"?function(b){process.nextTick(function(){v(b)})}:(function(){if(i.postMessage&&!i.importScripts){var b=!0,E=i.onmessage;return i.onmessage=function(){b=!1},i.postMessage("","*"),i.onmessage=E,b}})()?(l="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(b){i.postMessage(l+b,"*")}):i.MessageChannel?((c=new MessageChannel).port1.onmessage=function(b){v(b.data)},function(b){c.port2.postMessage(b)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,function(b){var E=d.createElement("script");E.onreadystatechange=function(){v(b),E.onreadystatechange=null,a.removeChild(E),E=null},a.appendChild(E)}):function(b){setTimeout(v,0,b)},m.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var E=new Array(arguments.length-1),S=0;S"u"?r===void 0?this:r:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var gc;function Go(){return gc}function Wt(e){let n=gc;return gc=e,n}var af=Symbol("NotFound");function Ar(e){return e===af||e?.name==="\u0275NotFound"}var et=null,qo=!1,mc=1,Wy=null,Ke=Symbol("SIGNAL");function ue(e){let n=et;return et=e,n}function Qo(){return et}var Kn={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 Nr(e){if(qo)throw new Error("");if(et===null)return;et.consumerOnSignalRead(e);let n=et.producersTail;if(n!==void 0&&n.producer===e)return;let t,r=et.recomputing;if(r&&(t=n!==void 0?n.nextProducer:et.producers,t!==void 0&&t.producer===e)){et.producersTail=t,t.lastReadVersion=e.version;return}let i=e.consumersTail;if(i!==void 0&&i.consumer===et&&(!r||qy(i,et)))return;let o=kr(et),s={producer:e,consumer:et,nextProducer:t,prevConsumer:i,lastReadVersion:e.version,nextConsumer:void 0};et.producersTail=s,n!==void 0?n.nextProducer=s:et.producers=s,o&&df(e,s)}function cf(){mc++}function Xo(e){if(!(kr(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===mc)){if(!e.producerMustRecompute(e)&&!Or(e)){Ko(e);return}e.producerRecomputeValue(e),Ko(e)}}function yc(e){if(e.consumers===void 0)return;let n=qo;qo=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let r=t.consumer;r.dirty||Gy(r)}}finally{qo=n}}function vc(){return et?.consumerAllowSignalWrites!==!1}function Gy(e){e.dirty=!0,yc(e),e.consumerMarkedDirty?.(e)}function Ko(e){e.dirty=!1,e.lastCleanEpoch=mc}function Qn(e){return e&&lf(e),ue(e)}function lf(e){e.producersTail=void 0,e.recomputing=!0}function Rr(e,n){ue(n),e&&uf(e)}function uf(e){e.recomputing=!1;let n=e.producersTail,t=n!==void 0?n.nextProducer:e.producers;if(t!==void 0){if(kr(e))do t=_c(t);while(t!==void 0);n!==void 0?n.nextProducer=void 0:e.producers=void 0}}function Or(e){for(let n=e.producers;n!==void 0;n=n.nextProducer){let t=n.producer,r=n.lastReadVersion;if(r!==t.version||(Xo(t),r!==t.version))return!0}return!1}function Xn(e){if(kr(e)){let n=e.producers;for(;n!==void 0;)n=_c(n)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function df(e,n){let t=e.consumersTail,r=kr(e);if(t!==void 0?(n.nextConsumer=t.nextConsumer,t.nextConsumer=n):(n.nextConsumer=void 0,e.consumers=n),n.prevConsumer=t,e.consumersTail=n,!r)for(let i=e.producers;i!==void 0;i=i.nextProducer)df(i.producer,i)}function _c(e){let n=e.producer,t=e.nextProducer,r=e.nextConsumer,i=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=i:n.consumersTail=i,i!==void 0)i.nextConsumer=r;else if(n.consumers=r,!kr(n)){let o=n.producers;for(;o!==void 0;)o=_c(o)}return t}function kr(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Jo(e){Wy?.(e)}function qy(e,n){let t=n.producersTail;if(t!==void 0){let r=n.producers;do{if(r===e)return!0;if(r===t)break;r=r.nextProducer}while(r!==void 0)}return!1}function es(e,n){return Object.is(e,n)}function Oi(e,n){let t=Object.create(Zy);t.computation=e,n!==void 0&&(t.equal=n);let r=()=>{if(Xo(t),Nr(t),t.value===Ri)throw t.error;return t.value};return r[Ke]=t,Jo(t),r}var Zo=Symbol("UNSET"),Yo=Symbol("COMPUTING"),Ri=Symbol("ERRORED"),Zy=_e(X({},Kn),{value:Zo,dirty:!0,error:null,equal:es,kind:"computed",producerMustRecompute(e){return e.value===Zo||e.value===Yo},producerRecomputeValue(e){if(e.value===Yo)throw new Error("");let n=e.value;e.value=Yo;let t=Qn(e),r,i=!1;try{r=e.computation(),ue(null),i=n!==Zo&&n!==Ri&&r!==Ri&&e.equal(n,r)}catch(o){r=Ri,e.error=o}finally{Rr(e,t)}if(i){e.value=n;return}e.value=r,e.version++}});function Yy(){throw new Error}var ff=Yy;function hf(e){ff(e)}function Dc(e){ff=e}var Ky=null;function wc(e,n){let t=Object.create(ts);t.value=e,n!==void 0&&(t.equal=n);let r=()=>pf(t);return r[Ke]=t,Jo(t),[r,s=>Fr(t,s),s=>Cc(t,s)]}function pf(e){return Nr(e),e.value}function Fr(e,n){vc()||hf(e),e.equal(e.value,n)||(e.value=n,Qy(e))}function Cc(e,n){vc()||hf(e),Fr(e,n(e.value))}var ts=_e(X({},Kn),{equal:es,value:void 0,kind:"signal"});function Qy(e){e.version++,cf(),yc(e),Ky?.(e)}function fe(e){return typeof e=="function"}function Pr(e){let t=e(r=>{Error.call(r),r.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var ns=Pr(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription: ${t.map((r,i)=>`${i+1}) ${r.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=t});function ki(e,n){if(e){let t=e.indexOf(n);0<=t&&e.splice(t,1)}}var nt=class e{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:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:r}=this;if(fe(r))try{r()}catch(o){n=o instanceof ns?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{gf(o)}catch(s){n=n??[],s instanceof ns?n=[...n,...s.errors]:n.push(s)}}if(n)throw new ns(n)}}add(n){var t;if(n&&n!==this)if(this.closed)gf(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(n)}}_hasParent(n){let{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){let{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&ki(t,n)}remove(n){let{_finalizers:t}=this;t&&ki(t,n),n instanceof e&&n._removeParent(this)}};nt.EMPTY=(()=>{let e=new nt;return e.closed=!0,e})();var bc=nt.EMPTY;function rs(e){return e instanceof nt||e&&"closed"in e&&fe(e.remove)&&fe(e.add)&&fe(e.unsubscribe)}function gf(e){fe(e)?e():e.unsubscribe()}var At={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Lr={setTimeout(e,n,...t){let{delegate:r}=Lr;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){let{delegate:n}=Lr;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function is(e){Lr.setTimeout(()=>{let{onUnhandledError:n}=At;if(n)n(e);else throw e})}function Fi(){}var mf=Ec("C",void 0,void 0);function yf(e){return Ec("E",void 0,e)}function vf(e){return Ec("N",e,void 0)}function Ec(e,n,t){return{kind:e,value:n,error:t}}var Jn=null;function Vr(e){if(At.useDeprecatedSynchronousErrorHandling){let n=!Jn;if(n&&(Jn={errorThrown:!1,error:null}),e(),n){let{errorThrown:t,error:r}=Jn;if(Jn=null,t)throw r}}else e()}function _f(e){At.useDeprecatedSynchronousErrorHandling&&Jn&&(Jn.errorThrown=!0,Jn.error=e)}var er=class extends nt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,rs(n)&&n.add(this)):this.destination=ev}static create(n,t,r){return new an(n,t,r)}next(n){this.isStopped?Mc(vf(n),this):this._next(n)}error(n){this.isStopped?Mc(yf(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Mc(mf,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()}}},Xy=Function.prototype.bind;function Ic(e,n){return Xy.call(e,n)}var xc=class{constructor(n){this.partialObserver=n}next(n){let{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){os(r)}}error(n){let{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){os(r)}else os(n)}complete(){let{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){os(t)}}},an=class extends er{constructor(n,t,r){super();let i;if(fe(n)||!n)i={next:n??void 0,error:t??void 0,complete:r??void 0};else{let o;this&&At.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe(),i={next:n.next&&Ic(n.next,o),error:n.error&&Ic(n.error,o),complete:n.complete&&Ic(n.complete,o)}):i=n}this.destination=new xc(i)}};function os(e){At.useDeprecatedSynchronousErrorHandling?_f(e):is(e)}function Jy(e){throw e}function Mc(e,n){let{onStoppedNotification:t}=At;t&&Lr.setTimeout(()=>t(e,n))}var ev={closed:!0,next:Fi,error:Jy,complete:Fi};var jr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Br(e){return e}function Df(e){return e.length===0?Br:e.length===1?e[0]:function(t){return e.reduce((r,i)=>i(r),t)}}var be=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){let r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,i){let o=nv(t)?t:new an(t,r,i);return Vr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return r=wf(r),new r((i,o)=>{let s=new an({next:a=>{try{t(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)}[jr](){return this}pipe(...t){return Df(t)(this)}toPromise(t){return t=wf(t),new t((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=n=>new e(n),e})();function wf(e){var n;return(n=e??At.Promise)!==null&&n!==void 0?n:Promise}function tv(e){return e&&fe(e.next)&&fe(e.error)&&fe(e.complete)}function nv(e){return e&&e instanceof er||tv(e)&&rs(e)}function rv(e){return fe(e?.lift)}function Ne(e){return n=>{if(rv(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Re(e,n,t,r,i){return new Tc(e,n,t,r,i)}var Tc=class extends er{constructor(n,t,r,i,o,s){super(n),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(c){n.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){n.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((n=this.onFinalize)===null||n===void 0||n.call(this))}}};var Cf=Pr(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Ue=(()=>{class e extends be{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let r=new ss(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new Cf}next(t){Vr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(t)}})}error(t){Vr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){Vr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:r,isStopped:i,observers:o}=this;return r||i?bc:(this.currentObservers=null,o.push(t),new nt(()=>{this.currentObservers=null,ki(o,t)}))}_checkFinalizedStatuses(t){let{hasError:r,thrownError:i,isStopped:o}=this;r?t.error(i):o&&t.complete()}asObservable(){let t=new be;return t.source=this,t}}return e.create=(n,t)=>new ss(n,t),e})(),ss=class extends Ue{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.next)===null||r===void 0||r.call(t,n)}error(n){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.error)===null||r===void 0||r.call(t,n)}complete(){var n,t;(t=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||t===void 0||t.call(n)}_subscribe(n){var t,r;return(r=(t=this.source)===null||t===void 0?void 0:t.subscribe(n))!==null&&r!==void 0?r:bc}};var Pi=class extends Ue{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){let{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}};var Sc={now(){return(Sc.delegate||Date).now()},delegate:void 0};var as=class extends Ue{constructor(n=1/0,t=1/0,r=Sc){super(),this._bufferSize=n,this._windowTime=t,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,t)}next(n){let{isStopped:t,_buffer:r,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;t||(r.push(n),!i&&r.push(o.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(n),{_infiniteTimeWindow:r,_buffer:i}=this,o=i.slice();for(let s=0;se.complete());function bf(e){return e&&fe(e.schedule)}function Ac(e){return e[e.length-1]}function Ef(e){return fe(Ac(e))?e.pop():void 0}function Hr(e){return bf(Ac(e))?e.pop():void 0}function If(e,n){return typeof Ac(e)=="number"?e.pop():n}function xf(e,n,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(f){try{l(r.next(f))}catch(u){s(u)}}function c(f){try{l(r.throw(f))}catch(u){s(u)}}function l(f){f.done?o(f.value):i(f.value).then(a,c)}l((r=r.apply(e,n||[])).next())})}function Mf(e){var n=typeof Symbol=="function"&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function tr(e){return this instanceof tr?(this.v=e,this):new tr(e)}function Tf(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(e,n||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(d){return function(m){return Promise.resolve(m).then(d,u)}}function a(d,m){r[d]&&(i[d]=function(y){return new Promise(function(v,_){o.push([d,y,v,_])>1||c(d,y)})},m&&(i[d]=m(i[d])))}function c(d,m){try{l(r[d](m))}catch(y){p(o[0][3],y)}}function l(d){d.value instanceof tr?Promise.resolve(d.value.v).then(f,u):p(o[0][2],d)}function f(d){c("next",d)}function u(d){c("throw",d)}function p(d,m){d(m),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Sf(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e[Symbol.asyncIterator],t;return n?n.call(e):(e=typeof Mf=="function"?Mf(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var Ur=e=>e&&typeof e.length=="number"&&typeof e!="function";function ls(e){return fe(e?.then)}function us(e){return fe(e[jr])}function ds(e){return Symbol.asyncIterator&&fe(e?.[Symbol.asyncIterator])}function fs(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function iv(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var hs=iv();function ps(e){return fe(e?.[hs])}function gs(e){return Tf(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:r,done:i}=yield tr(t.read());if(i)return yield tr(void 0);yield yield tr(r)}}finally{t.releaseLock()}})}function ms(e){return fe(e?.getReader)}function Ae(e){if(e instanceof be)return e;if(e!=null){if(us(e))return ov(e);if(Ur(e))return sv(e);if(ls(e))return av(e);if(ds(e))return Af(e);if(ps(e))return cv(e);if(ms(e))return lv(e)}throw fs(e)}function ov(e){return new be(n=>{let t=e[jr]();if(fe(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function sv(e){return new be(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,is)})}function cv(e){return new be(n=>{for(let t of e)if(n.next(t),n.closed)return;n.complete()})}function Af(e){return new be(n=>{uv(e,n).catch(t=>n.error(t))})}function lv(e){return Af(gs(e))}function uv(e,n){var t,r,i,o;return xf(this,void 0,void 0,function*(){try{for(t=Sf(e);r=yield t.next(),!r.done;){let s=r.value;if(n.next(s),n.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=t.return)&&(yield o.call(t))}finally{if(i)throw i.error}}n.complete()})}function vt(e,n,t,r=0,i=!1){let o=n.schedule(function(){t(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function ys(e,n=0){return Ne((t,r)=>{t.subscribe(Re(r,i=>vt(r,e,()=>r.next(i),n),()=>vt(r,e,()=>r.complete(),n),i=>vt(r,e,()=>r.error(i),n)))})}function vs(e,n=0){return Ne((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function Nf(e,n){return Ae(e).pipe(vs(n),ys(n))}function Rf(e,n){return Ae(e).pipe(vs(n),ys(n))}function Of(e,n){return new be(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}function kf(e,n){return new be(t=>{let r;return vt(t,n,()=>{r=e[hs](),vt(t,n,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){t.error(s);return}o?t.complete():t.next(i)},0,!0)}),()=>fe(r?.return)&&r.return()})}function _s(e,n){if(!e)throw new Error("Iterable cannot be null");return new be(t=>{vt(t,n,()=>{let r=e[Symbol.asyncIterator]();vt(t,n,()=>{r.next().then(i=>{i.done?t.complete():t.next(i.value)})},0,!0)})})}function Ff(e,n){return _s(gs(e),n)}function Pf(e,n){if(e!=null){if(us(e))return Nf(e,n);if(Ur(e))return Of(e,n);if(ls(e))return Rf(e,n);if(ds(e))return _s(e,n);if(ps(e))return kf(e,n);if(ms(e))return Ff(e,n)}throw fs(e)}function cn(e,n){return n?Pf(e,n):Ae(e)}function ln(...e){let n=Hr(e);return cn(e,n)}function Mn(e){return!!e&&(e instanceof be||fe(e.lift)&&fe(e.subscribe))}var Ds=Pr(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Qe(e,n){return Ne((t,r)=>{let i=0;t.subscribe(Re(r,o=>{r.next(e.call(n,o,i++))}))})}var{isArray:dv}=Array;function fv(e,n){return dv(n)?e(...n):e(n)}function ws(e){return Qe(n=>fv(e,n))}var{isArray:hv}=Array,{getPrototypeOf:pv,prototype:gv,keys:mv}=Object;function Lf(e){if(e.length===1){let n=e[0];if(hv(n))return{args:n,keys:null};if(yv(n)){let t=mv(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}function yv(e){return e&&typeof e=="object"&&pv(e)===gv}function Vf(e,n){return e.reduce((t,r,i)=>(t[r]=n[i],t),{})}function jf(e,n,t,r,i,o,s,a){let c=[],l=0,f=0,u=!1,p=()=>{u&&!c.length&&!l&&n.complete()},d=y=>l{o&&n.next(y),l++;let v=!1;Ae(t(y,f++)).subscribe(Re(n,_=>{i?.(_),o?d(_):n.next(_)},()=>{v=!0},void 0,()=>{if(v)try{for(l--;c.length&&lm(_)):m(_)}p()}catch(_){n.error(_)}}))};return e.subscribe(Re(n,d,()=>{u=!0,p()})),()=>{a?.()}}function xn(e,n,t=1/0){return fe(n)?xn((r,i)=>Qe((o,s)=>n(r,o,i,s))(Ae(e(r,i))),t):(typeof n=="number"&&(t=n),Ne((r,i)=>jf(r,i,e,t)))}function Cs(e=1/0){return xn(Br,e)}function Bf(){return Cs(1)}function bs(...e){return Bf()(cn(e,Hr(e)))}function Es(e){return new be(n=>{Ae(e()).subscribe(n)})}function Li(...e){let n=Ef(e),{args:t,keys:r}=Lf(e),i=new be(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let f=0;f{u||(u=!0,l--),a[f]=p},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(r?Vf(r,a):a),o.complete())}))}});return n?i.pipe(ws(n)):i}var vv=["addListener","removeListener"],_v=["addEventListener","removeEventListener"],Dv=["on","off"];function Gt(e,n,t,r){if(fe(t)&&(r=t,t=void 0),r)return Gt(e,n,t).pipe(ws(r));let[i,o]=bv(e)?_v.map(s=>a=>e[s](n,a,t)):wv(e)?vv.map(Hf(e,n)):Cv(e)?Dv.map(Hf(e,n)):[];if(!i&&Ur(e))return xn(s=>Gt(s,n,t))(Ae(e));if(!i)throw new TypeError("Invalid event target");return new be(s=>{let a=(...c)=>s.next(1o(a)})}function Hf(e,n){return t=>r=>e[t](n,r)}function wv(e){return fe(e.addListener)&&fe(e.removeListener)}function Cv(e){return fe(e.on)&&fe(e.off)}function bv(e){return fe(e.addEventListener)&&fe(e.removeEventListener)}function Is(...e){let n=Hr(e),t=If(e,1/0),r=e;return r.length?r.length===1?Ae(r[0]):Cs(t)(cn(r,n)):cs}function Vi(e,n){return Ne((t,r)=>{let i=0;t.subscribe(Re(r,o=>e.call(n,o,i++)&&r.next(o)))})}function ji(e,n){return fe(n)?xn(e,n,1):xn(e,1)}function Uf(e){return Ne((n,t)=>{let r=!1;n.subscribe(Re(t,i=>{r=!0,t.next(i)},()=>{r||t.next(e),t.complete()}))})}function Tn(e){return e<=0?()=>cs:Ne((n,t)=>{let r=0;n.subscribe(Re(t,i=>{++r<=e&&(t.next(i),e<=r&&t.complete())}))})}function zf(e=Ev){return Ne((n,t)=>{let r=!1;n.subscribe(Re(t,i=>{r=!0,t.next(i)},()=>r?t.complete():t.error(e())))})}function Ev(){return new Ds}function Nc(e){return Ne((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}function Rc(e,n){let t=arguments.length>=2;return r=>r.pipe(e?Vi((i,o)=>e(i,o,r)):Br,Tn(1),t?Uf(n):zf(()=>new Ds))}function $f(e={}){let{connector:n=()=>new Ue,resetOnError:t=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=e;return o=>{let s,a,c,l=0,f=!1,u=!1,p=()=>{a?.unsubscribe(),a=void 0},d=()=>{p(),s=c=void 0,f=u=!1},m=()=>{let y=s;d(),y?.unsubscribe()};return Ne((y,v)=>{l++,!u&&!f&&p();let _=c=c??n();v.add(()=>{l--,l===0&&!u&&!f&&(a=Oc(m,i))}),_.subscribe(v),!s&&l>0&&(s=new an({next:b=>_.next(b),error:b=>{u=!0,p(),a=Oc(d,t,b),_.error(b)},complete:()=>{f=!0,p(),a=Oc(d,r),_.complete()}}),Ae(y).subscribe(s))})(o)}}function Oc(e,n,...t){if(n===!0){e();return}if(n===!1)return;let r=new an({next:()=>{r.unsubscribe(),e()}});return Ae(n(...t)).subscribe(r)}function Ms(e,n,t){let r,i=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:n=1/0,refCount:i=!1,scheduler:t}=e:r=e??1/0,$f({connector:()=>new as(r,n,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function zr(e,n){return Ne((t,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();t.subscribe(Re(r,c=>{i?.unsubscribe();let l=0,f=o++;Ae(e(c,f)).subscribe(i=Re(r,u=>r.next(n?n(c,u,f,l++):u),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function xs(e){return Ne((n,t)=>{Ae(e).subscribe(Re(t,()=>t.complete(),Fi)),!t.closed&&n.subscribe(t)})}function Wf(e){let n=ue(null);try{return e()}finally{ue(n)}}var Gf=_e(X({},Kn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function qf(e){if(e.dirty=!1,e.version>0&&!Or(e))return;e.version++;let n=Qn(e);try{e.cleanup(),e.fn()}finally{Rr(e,n)}}var Ns="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",te=class extends Error{code;constructor(n,t){super(Rn(n,t)),this.code=n}};function Iv(e){return`NG0${Math.abs(e)}`}function Rn(e,n){return`${Iv(e)}${n?": "+n:""}`}var Wr=globalThis;function Te(e){for(let n in e)if(e[n]===Te)return n;throw Error("")}function Kf(e,n){for(let t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function Sn(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(Sn).join(", ")}]`;if(e==null)return""+e;let n=e.overriddenName||e.name;if(n)return`${n}`;let t=e.toString();if(t==null)return""+t;let r=t.indexOf(` `);return r>=0?t.slice(0,r):t}function $c(e,n){return e?n?`${e} ${n}`:e:n||""}var Mv=Te({__forward_ref__:Te});function Rt(e){return e.__forward_ref__=Rt,e.toString=function(){return Sn(this())},e}function Xe(e){return Wc(e)?e():e}function Wc(e){return typeof e=="function"&&e.hasOwnProperty(Mv)&&e.__forward_ref__===Rt}function he(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function _t(e){return{providers:e.providers||[],imports:e.imports||[]}}function Rs(e){return xv(e,Os)}function xv(e,n){return e.hasOwnProperty(n)&&e[n]||null}function Tv(e){let n=e?.[Os]??null;return n||null}function Fc(e){return e&&e.hasOwnProperty(Ss)?e[Ss]:null}var Os=Te({\u0275prov:Te}),Ss=Te({\u0275inj:Te}),ne=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,t){this._desc=n,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=he({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Gc(e){return e&&!!e.\u0275providers}var qc=Te({\u0275cmp:Te}),Zc=Te({\u0275dir:Te}),Yc=Te({\u0275pipe:Te});var Hi=Te({\u0275fac:Te}),sr=Te({__NG_ELEMENT_ID__:Te}),Zf=Te({__NG_ENV_ID__:Te});function ar(e){return typeof e=="string"?e:e==null?"":String(e)}function Qf(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():ar(e)}var Xf=Te({ngErrorCode:Te}),Sv=Te({ngErrorMessage:Te}),Av=Te({ngTokenPath:Te});function Kc(e,n){return Jf("",-200,n)}function ks(e,n){throw new te(-201,!1)}function Jf(e,n,t){let r=new te(n,e);return r[Xf]=n,r[Sv]=e,t&&(r[Av]=t),r}function Nv(e){return e[Xf]}var Pc;function eh(){return Pc}function rt(e){let n=Pc;return Pc=e,n}function Qc(e,n,t){let r=Rs(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(t&8)return null;if(n!==void 0)return n;ks(e,"Injector")}var Rv={},nr=Rv,Ov="__NG_DI_FLAG__",Lc=class{injector;constructor(n){this.injector=n}retrieve(n,t){let r=rr(t)||0;try{return this.injector.get(n,r&8?null:nr,r)}catch(i){if(Ar(i))return i;throw i}}};function kv(e,n=0){let t=Go();if(t===void 0)throw new te(-203,!1);if(t===null)return Qc(e,void 0,n);{let r=Fv(n),i=t.retrieve(e,r);if(Ar(i)){if(r.optional)return null;throw i}return i}}function ve(e,n=0){return(eh()||kv)(Xe(e),n)}function $(e,n){return ve(e,rr(n))}function rr(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Fv(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Vc(e){let n=[];for(let t=0;tArray.isArray(t)?Fs(t,n):n(t))}function Xc(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function $i(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function rh(e,n,t,r){let i=e.length;if(i==n)e.push(t,r);else if(i===1)e.push(r,e[0]),e[0]=t;else{for(i--,e.push(e[i-1],e[i]);i>n;){let o=i-2;e[i]=e[o],i--}e[n]=t,e[n+1]=r}}function ih(e,n,t){let r=Gr(e,n);return r>=0?e[r|1]=t:(r=~r,rh(e,r,n,t)),r}function Ps(e,n){let t=Gr(e,n);if(t>=0)return e[t|1]}function Gr(e,n){return Lv(e,n,1)}function Lv(e,n,t){let r=0,i=e.length>>t;for(;i!==r;){let o=r+(i-r>>1),s=e[o<n?i=o:r=o+1}return~(i<{t.push(s)};return Fs(n,s=>{let a=s;As(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&sh(i,o),t}function sh(e,n){for(let t=0;t{n(o,r)})}}function As(e,n,t,r){if(e=Xe(e),!e)return!1;let i=null,o=Fc(e),s=!o&&cr(e);if(!o&&!s){let c=e.ngModule;if(o=Fc(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)As(l,n,t,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let l;try{Fs(o.imports,f=>{As(f,n,t,r)&&(l||=[],l.push(f))})}finally{}l!==void 0&&sh(l,n)}if(!a){let l=An(i)||(()=>new i);n({provide:i,useFactory:l,deps:ct},i),n({provide:el,useValue:i,multi:!0},i),n({provide:kn,useValue:()=>ve(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=e;rl(c,f=>{n(f,l)})}}else return!1;return i!==e&&e.providers!==void 0}function rl(e,n){for(let t of e)Gc(t)&&(t=t.\u0275providers),Array.isArray(t)?rl(t,n):n(t)}var Vv=Te({provide:String,useValue:Te});function ah(e){return e!==null&&typeof e=="object"&&Vv in e}function jv(e){return!!(e&&e.useExisting)}function Bv(e){return!!(e&&e.useFactory)}function ir(e){return typeof e=="function"}function ch(e){return!!e.useClass}var Wi=new ne(""),Ts={},Yf={},kc;function Gi(){return kc===void 0&&(kc=new Ui),kc}var lt=class{},or=class extends lt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,t,r,i){super(),this.parent=t,this.source=r,this.scopes=i,Bc(n,s=>this.processProvider(s)),this.records.set(Jc,$r(void 0,this)),i.has("environment")&&this.records.set(lt,$r(void 0,this));let o=this.records.get(Wi);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(el,ct,{self:!0}))}retrieve(n,t){let r=rr(t)||0;try{return this.get(n,nr,r)}catch(i){if(Ar(i))return i;throw i}}destroy(){Bi(this),this._destroyed=!0;let n=ue(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ue(n)}}onDestroy(n){return Bi(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){Bi(this);let t=Wt(this),r=rt(void 0),i;try{return n()}finally{Wt(t),rt(r)}}get(n,t=nr,r){if(Bi(this),n.hasOwnProperty(Zf))return n[Zf](this);let i=rr(r),o,s=Wt(this),a=rt(void 0);try{if(!(i&4)){let l=this.records.get(n);if(l===void 0){let f=Wv(n)&&Rs(n);f&&this.injectableDefInScope(f)?l=$r(jc(n),Ts):l=null,this.records.set(n,l)}if(l!=null)return this.hydrate(n,l,i)}let c=i&2?Gi():this.parent;return t=i&8&&t===nr?null:t,c.get(n,t)}catch(c){let l=Nv(c);throw l===-200||l===-201?new te(l,null):c}finally{rt(a),Wt(s)}}resolveInjectorInitializers(){let n=ue(null),t=Wt(this),r=rt(void 0),i;try{let o=this.get(kn,ct,{self:!0});for(let s of o)s()}finally{Wt(t),rt(r),ue(n)}}toString(){let n=[],t=this.records;for(let r of t.keys())n.push(Sn(r));return`R3Injector[${n.join(", ")}]`}processProvider(n){n=Xe(n);let t=ir(n)?n:Xe(n&&n.provide),r=Uv(n);if(!ir(n)&&n.multi===!0){let i=this.records.get(t);i||(i=$r(void 0,Ts,!0),i.factory=()=>Vc(i.multi),this.records.set(t,i)),t=n,i.multi.push(n)}this.records.set(t,r)}hydrate(n,t,r){let i=ue(null);try{if(t.value===Yf)throw Kc(Sn(n));return t.value===Ts&&(t.value=Yf,t.value=t.factory(void 0,r)),typeof t.value=="object"&&t.value&&$v(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{ue(i)}}injectableDefInScope(n){if(!n.providedIn)return!1;let t=Xe(n.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){let t=this._onDestroyHooks.indexOf(n);t!==-1&&this._onDestroyHooks.splice(t,1)}};function jc(e){let n=Rs(e),t=n!==null?n.factory:An(e);if(t!==null)return t;if(e instanceof ne)throw new te(204,!1);if(e instanceof Function)return Hv(e);throw new te(204,!1)}function Hv(e){if(e.length>0)throw new te(204,!1);let t=Tv(e);return t!==null?()=>t.factory(e):()=>new e}function Uv(e){if(ah(e))return $r(void 0,e.useValue);{let n=il(e);return $r(n,Ts)}}function il(e,n,t){let r;if(ir(e)){let i=Xe(e);return An(i)||jc(i)}else if(ah(e))r=()=>Xe(e.useValue);else if(Bv(e))r=()=>e.useFactory(...Vc(e.deps||[]));else if(jv(e))r=(i,o)=>ve(Xe(e.useExisting),o!==void 0&&o&8?8:void 0);else{let i=Xe(e&&(e.useClass||e.provide));if(zv(e))r=()=>new i(...Vc(e.deps));else return An(i)||jc(i)}return r}function Bi(e){if(e.destroyed)throw new te(205,!1)}function $r(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function zv(e){return!!e.deps}function $v(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function Wv(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function Bc(e,n){for(let t of e)Array.isArray(t)?Bc(t,n):t&&Gc(t)?Bc(t.\u0275providers,n):n(t)}function Zr(e,n){let t;e instanceof or?(Bi(e),t=e):t=new Lc(e);let r,i=Wt(t),o=rt(void 0);try{return n()}finally{Wt(i),rt(o)}}function lh(){return eh()!==void 0||Go()!=null}var Ot=0,ie=1,de=2,ze=3,Dt=4,wt=5,Yr=6,Kr=7,He=8,dn=9,qt=10,Oe=11,Qr=12,ol=13,lr=14,ht=15,Fn=16,ur=17,Zt=18,qi=19,sl=20,un=21,Vs=22,fn=23,pt=24,dr=25,fr=26,ke=27,uh=1,al=6,Pn=7,Zi=8,hr=9,Fe=10;function Yt(e){return Array.isArray(e)&&typeof e[uh]=="object"}function kt(e){return Array.isArray(e)&&e[uh]===!0}function cl(e){return(e.flags&4)!==0}function Ln(e){return e.componentOffset>-1}function Xr(e){return(e.flags&1)===1}function Kt(e){return!!e.template}function Jr(e){return(e[de]&512)!==0}function pr(e){return(e[de]&256)===256}var dh="svg",fh="math";function Ct(e){for(;Array.isArray(e);)e=e[Ot];return e}function ll(e,n){return Ct(n[e])}function Ft(e,n){return Ct(n[e.index])}function Yi(e,n){return e.data[n]}function js(e,n){return e[n]}function ul(e,n,t,r){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=r}function bt(e,n){let t=n[e];return Yt(t)?t:t[Ot]}function hh(e){return(e[de]&4)===4}function Bs(e){return(e[de]&128)===128}function ph(e){return kt(e[ze])}function Qt(e,n){return n==null?null:e[n]}function dl(e){e[ur]=0}function fl(e){e[de]&1024||(e[de]|=1024,Bs(e)&&Vn(e))}function gh(e,n){for(;e>0;)n=n[lr],e--;return n}function Ki(e){return!!(e[de]&9216||e[pt]?.dirty)}function Hs(e){e[qt].changeDetectionScheduler?.notify(8),e[de]&64&&(e[de]|=1024),Ki(e)&&Vn(e)}function Vn(e){e[qt].changeDetectionScheduler?.notify(0);let n=Nn(e);for(;n!==null&&!(n[de]&8192||(n[de]|=8192,!Bs(n)));)n=Nn(n)}function hl(e,n){if(pr(e))throw new te(911,!1);e[un]===null&&(e[un]=[]),e[un].push(n)}function mh(e,n){if(e[un]===null)return;let t=e[un].indexOf(n);t!==-1&&e[un].splice(t,1)}function Nn(e){let n=e[ze];return kt(n)?n[ze]:n}function pl(e){return e[Kr]??=[]}function gl(e){return e.cleanup??=[]}function yh(e,n,t,r){let i=pl(n);i.push(t),e.firstCreatePass&&gl(e).push(r,i.length-1)}var ye={lFrame:kh(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Hc=!1;function vh(){return ye.lFrame.elementDepthCount}function _h(){ye.lFrame.elementDepthCount++}function Dh(){ye.lFrame.elementDepthCount--}function Us(){return ye.bindingsEnabled}function wh(){return ye.skipHydrationRootTNode!==null}function Ch(e){return ye.skipHydrationRootTNode===e}function bh(){ye.skipHydrationRootTNode=null}function ge(){return ye.lFrame.lView}function Ge(){return ye.lFrame.tView}function K(e){return ye.lFrame.contextLView=e,e[He]}function Q(e){return ye.lFrame.contextLView=null,e}function it(){let e=ml();for(;e!==null&&e.type===64;)e=e.parent;return e}function ml(){return ye.lFrame.currentTNode}function Eh(){let e=ye.lFrame,n=e.currentTNode;return e.isParent?n:n.parent}function ei(e,n){let t=ye.lFrame;t.currentTNode=e,t.isParent=n}function yl(){return ye.lFrame.isParent}function Ih(){ye.lFrame.isParent=!1}function Mh(){return ye.lFrame.contextLView}function vl(){return Hc}function ti(e){let n=Hc;return Hc=e,n}function Qi(){let e=ye.lFrame,n=e.bindingRootIndex;return n===-1&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function xh(){return ye.lFrame.bindingIndex}function Th(e){return ye.lFrame.bindingIndex=e}function ni(){return ye.lFrame.bindingIndex++}function _l(e){let n=ye.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function Sh(){return ye.lFrame.inI18n}function Ah(e,n){let t=ye.lFrame;t.bindingIndex=t.bindingRootIndex=e,zs(n)}function Nh(){return ye.lFrame.currentDirectiveIndex}function zs(e){ye.lFrame.currentDirectiveIndex=e}function Rh(e){let n=ye.lFrame.currentDirectiveIndex;return n===-1?null:e[n]}function $s(){return ye.lFrame.currentQueryIndex}function Xi(e){ye.lFrame.currentQueryIndex=e}function Gv(e){let n=e[ie];return n.type===2?n.declTNode:n.type===1?e[wt]:null}function Dl(e,n,t){if(t&4){let i=n,o=e;for(;i=i.parent,i===null&&!(t&1);)if(i=Gv(o),i===null||(o=o[lr],i.type&10))break;if(i===null)return!1;n=i,e=o}let r=ye.lFrame=Oh();return r.currentTNode=n,r.lView=e,!0}function Ws(e){let n=Oh(),t=e[ie];ye.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function Oh(){let e=ye.lFrame,n=e===null?null:e.child;return n===null?kh(e):n}function kh(e){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:e,child:null,inI18n:!1};return e!==null&&(e.child=n),n}function Fh(){let e=ye.lFrame;return ye.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var wl=Fh;function Gs(){let e=Fh();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Ph(e){return(ye.lFrame.contextLView=gh(e,ye.lFrame.contextLView))[He]}function hn(){return ye.lFrame.selectedIndex}function jn(e){ye.lFrame.selectedIndex=e}function Cl(){let e=ye.lFrame;return Yi(e.tView,e.selectedIndex)}function Lh(){return ye.lFrame.currentNamespace}var Vh=!0;function qs(){return Vh}function Ji(e){Vh=e}function Uc(e,n=null,t=null,r){let i=jh(e,n,t,r);return i.resolveInjectorInitializers(),i}function jh(e,n=null,t=null,r,i=new Set){let o=[t||ct,Ls(e)];return r=r||(typeof e=="object"?void 0:Sn(e)),new or(o,n||Gi(),r||null,i)}var dt=class e{static THROW_IF_NOT_FOUND=nr;static NULL=new Ui;static create(n,t){if(Array.isArray(n))return Uc({name:""},t,n,"");{let r=n.name??"";return Uc({name:r},n.parent,n.providers,r)}}static \u0275prov=he({token:e,providedIn:"any",factory:()=>ve(Jc)});static __NG_ELEMENT_ID__=-1},ot=new ne(""),Et=(()=>{class e{static __NG_ELEMENT_ID__=qv;static __NG_ENV_ID__=t=>t}return e})(),zi=class extends Et{_lView;constructor(n){super(),this._lView=n}get destroyed(){return pr(this._lView)}onDestroy(n){let t=this._lView;return hl(t,n),()=>mh(t,n)}};function qv(){return new zi(ge())}var ft=class{_console=console;handleError(n){this._console.error("ERROR",n)}},Xt=new ne("",{providedIn:"root",factory:()=>{let e=$(lt),n;return t=>{e.destroyed&&!n?setTimeout(()=>{throw t}):(n??=e.get(ft),n.handleError(t))}}}),Bh={provide:kn,useValue:()=>void $(ft),multi:!0};function De(e,n){let[t,r,i]=wc(e,n?.equal),o=t,s=o[Ke];return o.set=r,o.update=i,o.asReadonly=bl.bind(o),o}function bl(){let e=this[Ke];if(e.readonlyFn===void 0){let n=()=>this();n[Ke]=e,e.readonlyFn=n}return e.readonlyFn}var ri=(()=>{class e{view;node;constructor(t,r){this.view=t,this.node=r}static __NG_ELEMENT_ID__=Zv}return e})();function Zv(){return new ri(ge(),it())}var Nt=class{},ii=new ne("",{providedIn:"root",factory:()=>!1});var El=new ne(""),Il=new ne(""),Bn=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Pi(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new be(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),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=he({token:e,providedIn:"root",factory:()=>new e})}return e})(),eo=(()=>{class e{internalPendingTasks=$(Bn);scheduler=$(Nt);errorHandler=$(Xt);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let r=this.add();t().catch(this.errorHandler).finally(r)}static \u0275prov=he({token:e,providedIn:"root",factory:()=>new e})}return e})();function gr(...e){}var to=(()=>{class e{static \u0275prov=he({token:e,providedIn:"root",factory:()=>new zc})}return e})(),zc=class{dirtyEffectCount=0;queues=new Map;add(n){this.enqueue(n),this.schedule(n)}schedule(n){n.dirty&&this.dirtyEffectCount++}remove(n){let t=n.zone,r=this.queues.get(t);r.has(n)&&(r.delete(n),n.dirty&&this.dirtyEffectCount--)}enqueue(n){let t=n.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(n)||r.add(n)}flush(){for(;this.dirtyEffectCount>0;){let n=!1;for(let[t,r]of this.queues)t===null?n||=this.flushQueue(r):n||=t.run(()=>this.flushQueue(r));n||(this.dirtyEffectCount=0)}}flushQueue(n){let t=!1;for(let r of n)r.dirty&&(this.dirtyEffectCount--,t=!0,r.run());return t}};function po(e){return{toString:e}.toString()}function o_(e){return typeof e=="function"}var ta=class{previousValue;currentValue;firstChange;constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}};function Dp(e,n,t,r){n!==null?n.applyValueToInputSignal(n,r):e[t]=r}var li=(()=>{let e=()=>wp;return e.ngInherit=!0,e})();function wp(e){return e.type.prototype.ngOnChanges&&(e.setInput=a_),s_}function s_(){let e=bp(this),n=e?.current;if(n){let t=e.previous;if(t===On)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function a_(e,n,t,r,i){let o=this.declaredInputs[r],s=bp(e)||c_(e,{previous:On,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new ta(l&&l.currentValue,t,c===On),Dp(e,n,i,t)}var Cp="__ngSimpleChanges__";function bp(e){return e[Cp]||null}function c_(e,n){return e[Cp]=n}var Hh=[];var Ie=function(e,n=null,t){for(let r=0;r=r)break}else n[c]<0&&(e[ur]+=65536),(a>14>16&&(e[de]&3)===n&&(e[de]+=16384,Uh(a,o)):Uh(a,o)}var si=-1,yr=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(n,t,r,i){this.factory=n,this.name=i,this.canSeeViewProviders=t,this.injectImpl=r}};function d_(e){return(e.flags&8)!==0}function f_(e){return(e.flags&16)!==0}function h_(e,n,t){let r=0;for(;rn){s=o-1;break}}}for(;o>16}function ra(e,n){let t=m_(e),r=n;for(;t>0;)r=r[lr],t--;return r}var Ll=!0;function ia(e){let n=Ll;return Ll=e,n}var y_=256,xp=y_-1,Tp=5,v_=0,Jt={};function __(e,n,t){let r;typeof t=="string"?r=t.charCodeAt(0)||0:t.hasOwnProperty(sr)&&(r=t[sr]),r==null&&(r=t[sr]=v_++);let i=r&xp,o=1<>Tp)]|=o}function oa(e,n){let t=Sp(e,n);if(t!==-1)return t;let r=n[ie];r.firstCreatePass&&(e.injectorIndex=n.length,xl(r.data,e),xl(n,null),xl(r.blueprint,null));let i=bu(e,n),o=e.injectorIndex;if(Mp(i)){let s=na(i),a=ra(i,n),c=a[ie].data;for(let l=0;l<8;l++)n[o+l]=a[s+l]|c[s+l]}return n[o+8]=i,o}function xl(e,n){e.push(0,0,0,0,0,0,0,0,n)}function Sp(e,n){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||n[e.injectorIndex+8]===null?-1:e.injectorIndex}function bu(e,n){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let t=0,r=null,i=n;for(;i!==null;){if(r=kp(i),r===null)return si;if(t++,i=i[lr],r.injectorIndex!==-1)return r.injectorIndex|t<<16}return si}function Vl(e,n,t){__(e,n,t)}function Ap(e,n,t){if(t&8||e!==void 0)return e;ks(n,"NodeInjector")}function Np(e,n,t,r){if(t&8&&r===void 0&&(r=null),(t&3)===0){let i=e[dn],o=rt(void 0);try{return i?i.get(n,r,t&8):Qc(n,r,t&8)}finally{rt(o)}}return Ap(r,n,t)}function Rp(e,n,t,r=0,i){if(e!==null){if(n[de]&2048&&!(r&2)){let s=b_(e,n,t,r,Jt);if(s!==Jt)return s}let o=Op(e,n,t,r,Jt);if(o!==Jt)return o}return Np(n,t,r,i)}function Op(e,n,t,r,i){let o=w_(t);if(typeof o=="function"){if(!Dl(n,e,r))return r&1?Ap(i,t,r):Np(n,t,r,i);try{let s;if(s=o(r),s==null&&!(r&8))ks(t);else return s}finally{wl()}}else if(typeof o=="number"){let s=null,a=Sp(e,n),c=si,l=r&1?n[ht][wt]:null;for((a===-1||r&4)&&(c=a===-1?bu(e,n):n[a+8],c===si||!Wh(r,!1)?a=-1:(s=n[ie],a=na(c),n=ra(c,n)));a!==-1;){let f=n[ie];if($h(o,a,f.data)){let u=D_(a,n,t,s,r,l);if(u!==Jt)return u}c=n[a+8],c!==si&&Wh(r,n[ie].data[a+8]===l)&&$h(o,a,n)?(s=f,a=na(c),n=ra(c,n)):a=-1}}return i}function D_(e,n,t,r,i,o){let s=n[ie],a=s.data[e+8],c=r==null?Ln(a)&&Ll:r!=s&&(a.type&3)!==0,l=i&1&&o===a,f=Js(a,s,t,c,l);return f!==null?oo(n,s,f,a,i):Jt}function Js(e,n,t,r,i){let o=e.providerIndexes,s=n.data,a=o&1048575,c=e.directiveStart,l=e.directiveEnd,f=o>>20,u=r?a:a+f,p=i?a+f:l;for(let d=u;d=c&&m.type===t)return d}if(i){let d=s[c];if(d&&Kt(d)&&d.type===t)return c}return null}function oo(e,n,t,r,i){let o=e[t],s=n.data;if(o instanceof yr){let a=o;if(a.resolving){let d=Qf(s[t]);throw Kc(d)}let c=ia(a.canSeeViewProviders);a.resolving=!0;let l=s[t].type||s[t],f,u=a.injectImpl?rt(a.injectImpl):null,p=Dl(e,r,0);try{o=e[t]=a.factory(void 0,i,s,e,r),n.firstCreatePass&&t>=r.directiveStart&&l_(t,s[t],n)}finally{u!==null&&rt(u),ia(c),a.resolving=!1,wl()}}return o}function w_(e){if(typeof e=="string")return e.charCodeAt(0)||0;let n=e.hasOwnProperty(sr)?e[sr]:void 0;return typeof n=="number"?n>=0?n&xp:C_:n}function $h(e,n,t){let r=1<>Tp)]&r)}function Wh(e,n){return!(e&2)&&!(e&1&&n)}var mr=class{_tNode;_lView;constructor(n,t){this._tNode=n,this._lView=t}get(n,t,r){return Rp(this._tNode,this._lView,n,rr(r),t)}};function C_(){return new mr(it(),ge())}function Lt(e){return po(()=>{let n=e.prototype.constructor,t=n[Hi]||jl(n),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[Hi]||jl(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function jl(e){return Wc(e)?()=>{let n=jl(Xe(e));return n&&n()}:An(e)}function b_(e,n,t,r,i){let o=e,s=n;for(;o!==null&&s!==null&&s[de]&2048&&!Jr(s);){let a=Op(o,s,t,r|2,Jt);if(a!==Jt)return a;let c=o.parent;if(!c){let l=s[sl];if(l){let f=l.get(t,Jt,r);if(f!==Jt)return f}c=kp(s),s=s[lr]}o=c}return i}function kp(e){let n=e[ie],t=n.type;return t===2?n.declTNode:t===1?e[wt]:null}function E_(){return ui(it(),ge())}function ui(e,n){return new It(Ft(e,n))}var It=(()=>{class e{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=E_}return e})();function Fp(e){return e instanceof It?e.nativeElement:e}function I_(){return this._results[Symbol.iterator]()}var sa=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 Ue}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,t){return this._results.reduce(n,t)}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,t){this.dirty=!1;let r=nh(n);(this._changesDetected=!th(this._results,r,t))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[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]=I_};function Pp(e){return(e.flags&128)===128}var Eu=(function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e})(Eu||{}),Lp=new Map,M_=0;function x_(){return M_++}function T_(e){Lp.set(e[qi],e)}function Bl(e){Lp.delete(e[qi])}var Gh="__ngContext__";function ai(e,n){Yt(n)?(e[Gh]=n[qi],T_(n)):e[Gh]=n}function Vp(e){return Bp(e[Qr])}function jp(e){return Bp(e[Dt])}function Bp(e){for(;e!==null&&!kt(e);)e=e[Dt];return e}var Hl;function Iu(e){Hl=e}function Hp(){if(Hl!==void 0)return Hl;if(typeof document<"u")return document;throw new te(210,!1)}var ma=new ne("",{providedIn:"root",factory:()=>S_}),S_="ng",ya=new ne(""),go=new ne("",{providedIn:"platform",factory:()=>"unknown"});var va=new ne("",{providedIn:"root",factory:()=>Hp().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var A_="h",N_="b";var Up="r";var zp="di";var $p=!1,Wp=new ne("",{providedIn:"root",factory:()=>$p});var R_=(e,n,t,r)=>{};function O_(e,n,t,r){R_(e,n,t,r)}function Mu(e){return(e.flags&32)===32}var k_=()=>null;function Gp(e,n,t=!1){return k_(e,n,t)}function qp(e,n){let t=e.contentQueries;if(t!==null){let r=ue(null);try{for(let i=0;ie,createScript:e=>e,createScriptURL:e=>e})}catch{}return Zs}function _a(e){return F_()?.createHTML(e)||e}var gn=class{changingThisBreaksApplicationSecurity;constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Ns})`}},zl=class extends gn{getTypeName(){return"HTML"}},$l=class extends gn{getTypeName(){return"Style"}},Wl=class extends gn{getTypeName(){return"Script"}},Gl=class extends gn{getTypeName(){return"URL"}},ql=class extends gn{getTypeName(){return"ResourceURL"}};function yn(e){return e instanceof gn?e.changingThisBreaksApplicationSecurity:e}function Un(e,n){let t=Zp(e);if(t!=null&&t!==n){if(t==="ResourceURL"&&n==="URL")return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${Ns})`)}return t===n}function Zp(e){return e instanceof gn&&e.getTypeName()||null}function Tu(e){return new zl(e)}function Su(e){return new $l(e)}function Au(e){return new Wl(e)}function Nu(e){return new Gl(e)}function Ru(e){return new ql(e)}function P_(e){let n=new Yl(e);return L_()?new Zl(n):n}var Zl=class{inertDocumentHelper;constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{let t=new window.DOMParser().parseFromString(_a(n),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(n):(t.firstChild?.remove(),t)}catch{return null}}},Yl=class{defaultDoc;inertDocument;constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){let t=this.inertDocument.createElement("template");return t.innerHTML=_a(n),t}};function L_(){try{return!!new window.DOMParser().parseFromString(_a(""),"text/html")}catch{return!1}}var V_=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function mo(e){return e=String(e),e.match(V_)?e:"unsafe:"+e}function vn(e){let n={};for(let t of e.split(","))n[t]=!0;return n}function yo(...e){let n={};for(let t of e)for(let r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}var Yp=vn("area,br,col,hr,img,wbr"),Kp=vn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Qp=vn("rp,rt"),j_=yo(Qp,Kp),B_=yo(Kp,vn("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")),H_=yo(Qp,vn("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")),qh=yo(Yp,B_,H_,j_),Xp=vn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),U_=vn("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"),z_=vn("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"),$_=yo(Xp,U_,z_),W_=vn("script,style,template"),Kl=class{sanitizedSomething=!1;buf=[];sanitizeChildren(n){let t=n.firstChild,r=!0,i=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){i.push(t),t=Z_(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=q_(t);if(o){t=o;break}t=i.pop()}}return this.buf.join("")}startElement(n){let t=Zh(n).toLowerCase();if(!qh.hasOwnProperty(t))return this.sanitizedSomething=!0,!W_.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=n.attributes;for(let i=0;i"),!0}endElement(n){let t=Zh(n).toLowerCase();qh.hasOwnProperty(t)&&!Yp.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Yh(n))}};function G_(e,n){return(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function q_(e){let n=e.nextSibling;if(n&&e!==n.previousSibling)throw Jp(n);return n}function Z_(e){let n=e.firstChild;if(n&&G_(e,n))throw Jp(n);return n}function Zh(e){let n=e.nodeName;return typeof n=="string"?n:"FORM"}function Jp(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var Y_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,K_=/([^\#-~ |!])/g;function Yh(e){return e.replace(/&/g,"&").replace(Y_,function(n){let t=n.charCodeAt(0),r=n.charCodeAt(1);return"&#"+((t-55296)*1024+(r-56320)+65536)+";"}).replace(K_,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}var Ys;function Ou(e,n){let t=null;try{Ys=Ys||P_(e);let r=n?String(n):"";t=Ys.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=Ys.getInertBodyElement(r)}while(r!==o);let a=new Kl().sanitizeChildren(Kh(t)||t);return _a(a)}finally{if(t){let r=Kh(t)||t;for(;r.firstChild;)r.firstChild.remove()}}}function Kh(e){return"content"in e&&Q_(e)?e.content:null}function Q_(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var X_=/^>|^->||--!>|)/g,e0="\u200B$1\u200B";function t0(e){return e.replace(X_,n=>n.replace(J_,e0))}function n0(e,n){return e.createText(n)}function r0(e,n,t){e.setValue(n,t)}function i0(e,n){return e.createComment(t0(n))}function eg(e,n,t){return e.createElement(n,t)}function aa(e,n,t,r,i){e.insertBefore(n,t,r,i)}function tg(e,n,t){e.appendChild(n,t)}function Qh(e,n,t,r,i){r!==null?aa(e,n,t,r,i):tg(e,n,t)}function ng(e,n,t,r){e.removeChild(null,n,t,r)}function o0(e,n,t){e.setAttribute(n,"style",t)}function s0(e,n,t){t===""?e.removeAttribute(n,"class"):e.setAttribute(n,"class",t)}function rg(e,n,t){let{mergedAttrs:r,classes:i,styles:o}=t;r!==null&&h_(e,n,r),i!==null&&s0(e,n,i),o!==null&&o0(e,n,o)}var tn=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e})(tn||{});function vo(e){let n=a0();return n?n.sanitize(tn.URL,e)||"":Un(e,"URL")?yn(e):mo(ar(e))}function a0(){let e=ge();return e&&e[qt].sanitizer}function zn(e){return e.ownerDocument.defaultView}function c0(e,n,t){let r=e.length;for(;;){let i=e.indexOf(n,t);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let o=n.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}t=i+1}}var ig="ng-template";function l0(e,n,t,r){let i=0;if(r){for(;i-1){let o;for(;++io?u="":u=i[f+1].toLowerCase(),r&2&&l!==u){if(Pt(r))return!1;s=!0}}}}return Pt(r)||s}function Pt(e){return(e&1)===0}function f0(e,n,t,r){if(n===null)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!Pt(s)&&(n+=Xh(o,i),i=""),r=s,o=o||!Pt(r);t++}return i!==""&&(n+=Xh(o,i)),n}function y0(e){return e.map(m0).join(",")}function v0(e){let n=[],t=[],r=1,i=2;for(;rnull),s=r;if(n&&typeof n=="object"){let c=n;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:i,error:o,complete:s});return n instanceof nt&&n.add(a),a}wrapInTimeout(n){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{n(t)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},gt=Xl;function lg(e){let n,t;function r(){e=gr;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),n!==void 0&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{e(),r()})),()=>r()}function ep(e){return queueMicrotask(()=>e()),()=>{e=gr}}var ju="isAngularZone",ca=ju+"_ID",b0=0,Pe=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new gt(!1);onMicrotaskEmpty=new gt(!1);onStable=new gt(!1);onError=new gt(!1);constructor(n){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=cg}=n;if(typeof Zone>"u")throw new te(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,M0(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(ju)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new te(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new te(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,n,E0,gr,gr);try{return o.runTask(s,t,r)}finally{o.cancelTask(s)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}},E0={};function Bu(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function I0(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function n(){lg(()=>{e.callbackScheduled=!1,Jl(e),e.isCheckStableRunning=!0,Bu(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{n()}):e._outer.run(()=>{n()}),Jl(e)}function M0(e){let n=()=>{I0(e)},t=b0++;e._inner=e._inner.fork({name:"angular",properties:{[ju]:!0,[ca]:t,[ca+t]:!0},onInvokeTask:(r,i,o,s,a,c)=>{if(x0(c))return r.invokeTask(o,s,a,c);try{return tp(e),r.invokeTask(o,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&n(),np(e)}},onInvoke:(r,i,o,s,a,c,l)=>{try{return tp(e),r.invoke(o,s,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!T0(c)&&n(),np(e)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,Jl(e),Bu(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function Jl(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function tp(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function np(e){e._nesting--,Bu(e)}var la=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new gt;onMicrotaskEmpty=new gt;onStable=new gt;onError=new gt;run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,i){return n.apply(t,r)}};function x0(e){return ug(e,"__ignore_ng_zone__")}function T0(e){return ug(e,"__scheduler_tick__")}function ug(e,n){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[n]===!0}var Hu=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=he({token:e,providedIn:"root",factory:()=>new e})}return e})(),dg=[0,1,2,3],fg=(()=>{class e{ngZone=$(Pe);scheduler=$(Nt);errorHandler=$(ft,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){$(Cr,{optional:!0})}execute(){let t=this.sequences.size>0;t&&Ie(16),this.executing=!0;for(let r of dg)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&Ie(17)}register(t){let{view:r}=t;r!==void 0?((r[dr]??=[]).push(t),Vn(r),r[de]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,r){return r?r.run(wa.AFTER_NEXT_RENDER,t):t()}static \u0275prov=he({token:e,providedIn:"root",factory:()=>new e})}return e})(),ua=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(n,t,r,i,o,s=null){this.impl=n,this.hooks=t,this.view=r,this.once=i,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let n=this.view?.[dr];n&&(this.view[dr]=n.filter(t=>t!==this))}};function Uu(e,n){let t=n?.injector??$(dt);return $n("NgAfterNextRender"),A0(e,t,n,!0)}function S0(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function A0(e,n,t,r){let i=n.get(Hu);i.impl??=n.get(fg);let o=n.get(Cr,null,{optional:!0}),s=t?.manualCleanup!==!0?n.get(Et):null,a=n.get(ri,null,{optional:!0}),c=new ua(i.impl,S0(e),a?.view,r,s,o?.snapshot(null));return i.impl.register(c),c}var hg=new ne("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function pg(e,n,t){let r=e.get(hg);if(Array.isArray(n))for(let i of n)r.queue.add(i),t?.detachedLeaveAnimationFns?.push(i);else r.queue.add(n),t?.detachedLeaveAnimationFns?.push(n);r.scheduler&&r.scheduler(e)}function N0(e,n){let t=e.get(hg);if(n.detachedLeaveAnimationFns){for(let r of n.detachedLeaveAnimationFns)t.queue.delete(r);n.detachedLeaveAnimationFns=void 0}}function R0(e,n){for(let[t,r]of n)pg(e,r.animateFns)}function rp(e,n,t,r){let i=e?.[fr]?.enter;n!==null&&i&&i.has(t.index)&&R0(r,i)}function oi(e,n,t,r,i,o,s,a){if(i!=null){let c,l=!1;kt(i)?c=i:Yt(i)&&(l=!0,i=i[Ot]);let f=Ct(i);e===0&&r!==null?(rp(a,r,o,t),s==null?tg(n,r,f):aa(n,r,f,s||null,!0)):e===1&&r!==null?(rp(a,r,o,t),aa(n,r,f,s||null,!0)):e===2?ip(a,o,t,u=>{ng(n,f,l,u)}):e===3&&ip(a,o,t,()=>{n.destroyNode(f)}),c!=null&&W0(n,e,t,c,o,r,s)}}function O0(e,n){gg(e,n),n[Ot]=null,n[wt]=null}function k0(e,n,t,r,i,o){r[Ot]=i,r[wt]=n,ba(e,r,t,1,i,o)}function gg(e,n){n[qt].changeDetectionScheduler?.notify(9),ba(e,n,n[Oe],2,null,null)}function F0(e){let n=e[Qr];if(!n)return Tl(e[ie],e);for(;n;){let t=null;if(Yt(n))t=n[Qr];else{let r=n[Fe];r&&(t=r)}if(!t){for(;n&&!n[Dt]&&n!==e;)Yt(n)&&Tl(n[ie],n),n=n[ze];n===null&&(n=e),Yt(n)&&Tl(n[ie],n),t=n&&n[Dt]}n=t}}function zu(e,n){let t=e[hr],r=t.indexOf(n);t.splice(r,1)}function Ca(e,n){if(pr(n))return;let t=n[Oe];t.destroyNode&&ba(e,n,t,3,null,null),F0(n)}function Tl(e,n){if(pr(n))return;let t=ue(null);try{n[de]&=-129,n[de]|=256,n[pt]&&Xn(n[pt]),V0(e,n),L0(e,n),n[ie].type===1&&n[Oe].destroy();let r=n[Fn];if(r!==null&&kt(n[ze])){r!==n[ze]&&zu(r,n);let i=n[Zt];i!==null&&i.detachView(e)}Bl(n)}finally{ue(t)}}function ip(e,n,t,r){let i=e?.[fr];if(i==null||i.leave==null||!i.leave.has(n.index))return r(!1);e&&vr.add(e),pg(t,()=>{if(i.leave&&i.leave.has(n.index)){let s=i.leave.get(n.index),a=[];if(s){for(let c=0;c{e[fr].running=void 0,vr.delete(e),n(!0)});return}n(!1)}function L0(e,n){let t=e.cleanup,r=n[Kr];if(t!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[t[s+1]];t[s].call(a)}r!==null&&(n[Kr]=null);let i=n[un];if(i!==null){n[un]=null;for(let s=0;ske&&ag(e,n,ke,!1),Ie(s?2:0,i,t),t(r,i)}finally{jn(o),Ie(s?3:1,i,t)}}function Ea(e,n,t){eD(e,n,t),(t.flags&64)===64&&tD(e,n,t)}function Ia(e,n,t=Ft){let r=n.localNames;if(r!==null){let i=n.index+1;for(let o=0;onull;function K0(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function Q0(e,n,t,r,i,o){let s=n[ie];if(qu(e,s,n,t,r)){Ln(e)&&J0(n,e.index);return}e.type&3&&(t=K0(t)),X0(e,n,t,r,i,o)}function X0(e,n,t,r,i,o){if(e.type&3){let s=Ft(e,n);r=o!=null?o(r,e.value||"",t):r,i.setProperty(s,t,r)}else e.type&12}function J0(e,n){let t=bt(n,e);t[de]&16||(t[de]|=64)}function eD(e,n,t){let r=t.directiveStart,i=t.directiveEnd;Ln(t)&&w0(n,t,e.data[r+t.componentOffset]),e.firstCreatePass||oa(t,n);let o=t.initialInputs;for(let s=r;s{Vn(e.lView)},consumerOnSignalRead(){this.lView[pt]=this}});function pD(e){let n=e[pt]??Object.create(gD);return n.lView=e,n}var gD=_e(X({},Kn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let n=Nn(e.lView);for(;n&&!bg(n[ie]);)n=Nn(n);n&&fl(n)},consumerOnSignalRead(){this.lView[pt]=this}});function bg(e){return e.type!==2}function Eg(e){if(e[fn]===null)return;let n=!0;for(;n;){let t=!1;for(let r of e[fn])r.dirty&&(t=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));n=t&&!!(e[de]&8192)}}var mD=100;function Ig(e,n=0){let r=e[qt].rendererFactory,i=!1;i||r.begin?.();try{yD(e,n)}finally{i||r.end?.()}}function yD(e,n){let t=vl();try{ti(!0),tu(e,n);let r=0;for(;Ki(e);){if(r===mD)throw new te(103,!1);r++,tu(e,1)}}finally{ti(t)}}function vD(e,n,t,r){if(pr(n))return;let i=n[de],o=!1,s=!1;Ws(n);let a=!0,c=null,l=null;o||(bg(e)?(l=uD(n),c=Qn(l)):Qo()===null?(a=!1,l=pD(n),c=Qn(l)):n[pt]&&(Xn(n[pt]),n[pt]=null));try{dl(n),Th(e.bindingStartIndex),t!==null&&yg(e,n,t,2,r);let f=(i&3)===3;if(!o)if(f){let d=e.preOrderCheckHooks;d!==null&&Qs(n,d,null)}else{let d=e.preOrderHooks;d!==null&&Xs(n,d,0,null),Ml(n,0)}if(s||_D(n),Eg(n),Mg(n,0),e.contentQueries!==null&&qp(e,n),!o)if(f){let d=e.contentCheckHooks;d!==null&&Qs(n,d)}else{let d=e.contentHooks;d!==null&&Xs(n,d,1),Ml(n,1)}wD(e,n);let u=e.components;u!==null&&Tg(n,u,0);let p=e.viewQuery;if(p!==null&&Ul(2,p,r),!o)if(f){let d=e.viewCheckHooks;d!==null&&Qs(n,d)}else{let d=e.viewHooks;d!==null&&Xs(n,d,2),Ml(n,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),n[Vs]){for(let d of n[Vs])d();n[Vs]=null}o||(wg(n),n[de]&=-73)}catch(f){throw o||Vn(n),f}finally{l!==null&&(Rr(l,c),a&&fD(l)),Gs()}}function Mg(e,n){for(let t=Vp(e);t!==null;t=jp(t))for(let r=Fe;r0&&(e[t-1][Dt]=r[Dt]);let o=$i(e,Fe+n);O0(r[ie],r);let s=o[Zt];s!==null&&s.detachView(o[ie]),r[ze]=null,r[Dt]=null,r[de]&=-129}return r}function CD(e,n,t,r){let i=Fe+r,o=t.length;r>0&&(t[i-1][Dt]=n),r-1&&(co(n,r),$i(t,r))}this._attachedToViewContainer=!1}Ca(this._lView[ie],this._lView)}onDestroy(n){hl(this._lView,n)}markForCheck(){Yu(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[de]&=-129}reattach(){Hs(this._lView),this._lView[de]|=128}detectChanges(){this._lView[de]|=1024,Ig(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new te(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let n=Jr(this._lView),t=this._lView[Fn];t!==null&&!n&&zu(t,this._lView),gg(this._lView[ie],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new te(902,!1);this._appRef=n;let t=Jr(this._lView),r=this._lView[Fn];r!==null&&!t&&Rg(r,this._lView),Hs(this._lView)}};var _r=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=bD;constructor(t,r,i){this._declarationLView=t,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,r){return this.createEmbeddedViewImpl(t,r)}createEmbeddedViewImpl(t,r,i){let o=Ma(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:r,dehydratedView:i});return new Hn(o)}}return e})();function bD(){return Ku(it(),ge())}function Ku(e,n){return e.type&4?new _r(n,e,ui(e,n)):null}function Ta(e,n,t,r,i){let o=e.data[n];if(o===null)o=ED(e,n,t,r,i),Sh()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=r,o.attrs=i;let s=Eh();o.injectorIndex=s===null?-1:s.injectorIndex}return ei(o,!0),o}function ED(e,n,t,r,i){let o=ml(),s=yl(),a=s?o:o&&o.parent,c=e.data[n]=MD(e,a,t,n,r,i);return ID(e,c,o,s),c}function ID(e,n,t,r){e.firstChild===null&&(e.firstChild=n),t!==null&&(r?t.child==null&&n.parent!==null&&(t.child=n):t.next===null&&(t.next=n,n.prev=t))}function MD(e,n,t,r,i,o){let s=n?n.injectorIndex:-1,a=0;return wh()&&(a|=128),{type:t,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var FA=new RegExp(`^(\\d+)*(${N_}|${A_})*(.*)`);function xD(e){let n=e[al]??[],r=e[ze][Oe],i=[];for(let o of n)o.data[zp]!==void 0?i.push(o):TD(o,r);e[al]=i}function TD(e,n){let t=0,r=e.firstChild;if(r){let i=e.data[Up];for(;tnull,AD=()=>null;function nu(e,n){return SD(e,n)}function Og(e,n,t){return AD(e,n,t)}var kg=class{},Sa=class{},ru=class{resolveComponentFactory(n){throw new te(917,!1)}},Aa=class{static NULL=new ru},Dr=class{},br=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>ND()}return e})();function ND(){let e=ge(),n=it(),t=bt(n.index,e);return(Yt(t)?t:e)[Oe]}var Fg=(()=>{class e{static \u0275prov=he({token:e,providedIn:"root",factory:()=>null})}return e})();var ea={},iu=class{injector;parentInjector;constructor(n,t){this.injector=n,this.parentInjector=t}get(n,t,r){let i=this.injector.get(n,ea,r);return i!==ea||t===ea?i:this.parentInjector.get(n,t,r)}};function sp(e,n,t){let r=t?e.styles:null,i=t?e.classes:null,o=0;if(n!==null)for(let s=0;s0&&(t.directiveToIndex=new Map);for(let p=0;p0;){let t=e[--n];if(typeof t=="number"&&t<0)return t}return 0}function jD(e,n,t){if(t){if(n.exportAs)for(let r=0;rr(Ct(y[e.index])):e.index;Bg(m,n,t,o,a,d,!1)}}return l}function UD(e){return e.startsWith("animation")||e.startsWith("transition")}function zD(e,n,t,r){let i=e.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function Bg(e,n,t,r,i,o,s){let a=n.firstCreatePass?gl(n):null,c=pl(t),l=c.length;c.push(i,o),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function dp(e,n,t,r,i,o){let s=n[t],a=n[ie],l=a.data[t].outputs[r],u=s[l].subscribe(o);Bg(e.index,a,n,i,o,u,!0)}var ou=Symbol("BINDING");var su=class extends Aa{ngModule;constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){let t=cr(n);return new lo(t,this.ngModule)}};function $D(e){return Object.keys(e).map(n=>{let[t,r,i]=e[n],o={propName:t,templateName:n,isSignal:(r&Da.SignalBased)!==0};return i&&(o.transform=i),o})}function WD(e){return Object.keys(e).map(n=>({propName:e[n],templateName:n}))}function GD(e,n,t){let r=n instanceof lt?n:n?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new iu(t,r):t}function qD(e){let n=e.get(Dr,null);if(n===null)throw new te(407,!1);let t=e.get(Fg,null),r=e.get(Nt,null);return{rendererFactory:n,sanitizer:t,changeDetectionScheduler:r,ngReflect:!1}}function ZD(e,n){let t=Hg(e);return eg(n,t,t==="svg"?dh:t==="math"?fh:null)}function Hg(e){return(e.selectors[0][0]||"div").toLowerCase()}var lo=class extends Sa{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=$D(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=WD(this.componentDef.outputs),this.cachedOutputs}constructor(n,t){super(),this.componentDef=n,this.ngModule=t,this.componentType=n.type,this.selector=y0(n.selectors),this.ngContentSelectors=n.ngContentSelectors??[],this.isBoundToModule=!!t}create(n,t,r,i,o,s){Ie(22);let a=ue(null);try{let c=this.componentDef,l=YD(r,c,s,o),f=GD(c,i||this.ngModule,n),u=qD(f),p=u.rendererFactory.createRenderer(null,c),d=r?q0(p,r,c.encapsulation,f):ZD(c,p),m=s?.some(fp)||o?.some(_=>typeof _!="function"&&_.bindings.some(fp)),y=Pu(null,l,null,512|og(c),null,null,u,p,f,null,Gp(d,f,!0));y[ke]=d,Ws(y);let v=null;try{let _=Qu(ke,y,2,"#host",()=>l.directiveRegistry,!0,0);rg(p,d,_),ai(d,y),Ea(l,y,_),xu(l,_,y),Xu(l,_),t!==void 0&&QD(_,this.ngContentSelectors,t),v=bt(_.index,y),y[He]=v[He],Zu(l,y,null)}catch(_){throw v!==null&&Bl(v),Bl(y),_}finally{Ie(23),Gs()}return new da(this.componentType,y,!!m)}finally{ue(a)}}};function YD(e,n,t,r){let i=e?["ng-version","20.3.16"]:v0(n.selectors[0]),o=null,s=null,a=0;if(t)for(let f of t)a+=f[ou].requiredVars,f.create&&(f.targetIdx=0,(o??=[]).push(f)),f.update&&(f.targetIdx=0,(s??=[]).push(f));if(r)for(let f=0;f{if(t&1&&e)for(let r of e)r.create();if(t&2&&n)for(let r of n)r.update()}}function fp(e){let n=e[ou].kind;return n==="input"||n==="twoWay"}var da=class extends kg{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(n,t,r){super(),this._rootLView=t,this._hasInputBindings=r,this._tNode=Yi(t[ie],ke),this.location=ui(this._tNode,t),this.instance=bt(this._tNode.index,t)[He],this.hostView=this.changeDetectorRef=new Hn(t,void 0),this.componentType=n}setInput(n,t){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),t))return;let i=this._rootLView,o=qu(r,i[ie],i,n,t);this.previousInputValues.set(n,t);let s=bt(r.index,i);Yu(s,1)}get injector(){return new mr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}};function QD(e,n,t){let r=e.projection=[];for(let i=0;i{class e{static __NG_ELEMENT_ID__=XD}return e})();function XD(){let e=it();return zg(e,ge())}var JD=di,Ug=class extends JD{_lContainer;_hostTNode;_hostLView;constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return ui(this._hostTNode,this._hostLView)}get injector(){return new mr(this._hostTNode,this._hostLView)}get parentInjector(){let n=bu(this._hostTNode,this._hostLView);if(Mp(n)){let t=ra(n,this._hostLView),r=na(n),i=t[ie].data[r+8];return new mr(i,t)}else return new mr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){let t=hp(this._lContainer);return t!==null&&t[n]||null}get length(){return this._lContainer.length-Fe}createEmbeddedView(n,t,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=nu(this._lContainer,n.ssrId),a=n.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,i,so(this._hostTNode,s)),a}createComponent(n,t,r,i,o,s,a){let c=n&&!o_(n),l;if(c)l=t;else{let v=t||{};l=v.index,r=v.injector,i=v.projectableNodes,o=v.environmentInjector||v.ngModuleRef,s=v.directives,a=v.bindings}let f=c?n:new lo(cr(n)),u=r||this.parentInjector;if(!o&&f.ngModule==null){let _=(c?u:this.parentInjector).get(lt,null);_&&(o=_)}let p=cr(f.componentType??{}),d=nu(this._lContainer,p?.id??null),m=d?.firstChild??null,y=f.create(u,i,m,o,s,a);return this.insertImpl(y.hostView,l,so(this._hostTNode,d)),y}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){let i=n._lView;if(ph(i)){let a=this.indexOf(n);if(a!==-1)this.detach(a);else{let c=i[ze],l=new Ug(c,c[wt],c[ze]);l.detach(l.indexOf(n))}}let o=this._adjustIndex(t),s=this._lContainer;return xa(s,i,o,r),n.attachToViewContainerRef(),Xc(Al(s),o,n),n}move(n,t){return this.insert(n,t)}indexOf(n){let t=hp(this._lContainer);return t!==null?t.indexOf(n):-1}remove(n){let t=this._adjustIndex(n,-1),r=co(this._lContainer,t);r&&($i(Al(this._lContainer),t),Ca(r[ie],r))}detach(n){let t=this._adjustIndex(n,-1),r=co(this._lContainer,t);return r&&$i(Al(this._lContainer),t)!=null?new Hn(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function hp(e){return e[Zi]}function Al(e){return e[Zi]||(e[Zi]=[])}function zg(e,n){let t,r=n[e.index];return kt(r)?t=r:(t=Sg(r,n,null,e),n[e.index]=t,Lu(n,t)),tw(t,n,e,r),new Ug(t,e,n)}function ew(e,n){let t=e[Oe],r=t.createComment(""),i=Ft(n,e),o=t.parentNode(i);return aa(t,o,r,t.nextSibling(i),!1),r}var tw=iw,nw=()=>!1;function rw(e,n,t){return nw(e,n,t)}function iw(e,n,t,r){if(e[Pn])return;let i;t.type&8?i=Ct(r):i=ew(n,t),e[Pn]=i}var au=class e{queryList;matches=null;constructor(n){this.queryList=n}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},cu=class e{queries;constructor(n=[]){this.queries=n}createEmbeddedView(n){let t=n.queries;if(t!==null){let r=n.contentQueries!==null?n.contentQueries[0]:t.length,i=[];for(let o=0;o0)r.push(s[a/2]);else{let l=o[a+1],f=n[-c];for(let u=Fe;un.trim())}function dw(e,n,t){e.queries===null&&(e.queries=new uu),e.queries.track(new du(n,t))}function ed(e,n){return e.queries.getByIndex(n)}function Gg(e,n){let t=e[ie],r=ed(t,n);return r.crossesNgTemplate?fu(t,e,n,[]):$g(t,e,r,n)}function fw(e,n,t){let r,i=Oi(()=>{r._dirtyCounter();let o=pw(r,e);if(n&&o===void 0)throw new te(-951,!1);return o});return r=i[Ke],r._dirtyCounter=De(0),r._flatValue=void 0,i}function qg(e){return fw(!1,!1,e)}function hw(e,n){let t=e[Ke];t._lView=ge(),t._queryIndex=n,t._queryList=Ju(t._lView,n),t._queryList.onDirty(()=>t._dirtyCounter.update(r=>r+1))}function pw(e,n){let t=e._lView,r=e._queryIndex;if(t===void 0||r===void 0||t[de]&4)return n?void 0:ct;let i=Ju(t,r),o=Gg(t,r);return i.reset(o,Fp),n?i.first:i._changesDetected||e._flatValue===void 0?e._flatValue=i.toArray():e._flatValue}var uo=class{};var fo=class extends uo{injector;componentFactoryResolver=new su(this);instance=null;constructor(n){super();let t=new or([...n.providers,{provide:uo,useValue:this},{provide:Aa,useValue:this.componentFactoryResolver}],n.parent||Gi(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}};function Zg(e,n,t=null){return new fo({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}var gw=(()=>{class e{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let r=nl(!1,t.type),i=r.length>0?Zg([r],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,i)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=he({token:e,providedIn:"environment",factory:()=>new e(ve(lt))})}return e})();function _n(e){return po(()=>{let n=Yg(e),t=_e(X({},n),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Eu.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:n.standalone?i=>i.get(gw).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||pn.Emulated,styles:e.styles||ct,_:null,schemas:e.schemas||null,tView:null,id:""});n.standalone&&$n("NgStandalone"),Kg(t);let r=e.dependencies;return t.directiveDefs=pp(r,mw),t.pipeDefs=pp(r,oh),t.id=_w(t),t})}function mw(e){return cr(e)||tl(e)}function Vt(e){return po(()=>({type:e.type,bootstrap:e.bootstrap||ct,declarations:e.declarations||ct,imports:e.imports||ct,exports:e.exports||ct,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function yw(e,n){if(e==null)return On;let t={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o,s,a,c;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,c=i[3]||null):(o=i,s=i,a=Da.None,c=null),t[o]=[r,a,c],n[o]=s}return t}function vw(e){if(e==null)return On;let n={};for(let t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}function tt(e){return po(()=>{let n=Yg(e);return Kg(n),n})}function Na(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function Yg(e){let n={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputConfig:e.inputs||On,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||ct,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:yw(e.inputs,n),outputs:vw(e.outputs),debugInfo:null}}function Kg(e){e.features?.forEach(n=>n(e))}function pp(e,n){return e?()=>{let t=typeof e=="function"?e():e,r=[];for(let i of t){let o=n(i);o!==null&&r.push(o)}return r}:null}function _w(e){let n=0,t=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,t,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let o of r.join("|"))n=Math.imul(31,n)+o.charCodeAt(0)<<0;return n+=2147483648,"c"+n}function Dw(e){return Object.getPrototypeOf(e.prototype).constructor}function jt(e){let n=Dw(e.type),t=!0,r=[e];for(;n;){let i;if(Kt(e))i=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new te(903,!1);i=n.\u0275dir}if(i){if(t){r.push(i);let s=e;s.inputs=Nl(e.inputs),s.declaredInputs=Nl(e.declaredInputs),s.outputs=Nl(e.outputs);let a=i.hostBindings;a&&Iw(e,a);let c=i.viewQuery,l=i.contentQueries;if(c&&bw(e,c),l&&Ew(e,l),ww(e,i),Kf(e.outputs,i.outputs),Kt(i)&&i.data.animation){let f=e.data;f.animation=(f.animation||[]).concat(i.data.animation)}}let o=i.features;if(o)for(let s=0;s=0;r--){let i=e[r];i.hostVars=n+=i.hostVars,i.hostAttrs=io(i.hostAttrs,t=io(t,i.hostAttrs))}}function Nl(e){return e===On?{}:e===ct?[]:e}function bw(e,n){let t=e.viewQuery;t?e.viewQuery=(r,i)=>{n(r,i),t(r,i)}:e.viewQuery=n}function Ew(e,n){let t=e.contentQueries;t?e.contentQueries=(r,i,o)=>{n(r,i,o),t(r,i,o)}:e.contentQueries=n}function Iw(e,n){let t=e.hostBindings;t?e.hostBindings=(r,i)=>{n(r,i),t(r,i)}:e.hostBindings=n}function Qg(e,n,t,r,i,o,s,a){if(t.firstCreatePass){e.mergedAttrs=io(e.mergedAttrs,e.attrs);let f=e.tView=Fu(2,e,i,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,e),f.queries=t.queries.embeddedTView(e))}a&&(e.flags|=a),ei(e,!1);let c=xw(t,n,e,r);qs()&&$u(t,n,c,e),ai(c,n);let l=Sg(c,n,c,e);n[r+ke]=l,Lu(n,l),rw(l,e,n)}function Mw(e,n,t,r,i,o,s,a,c,l,f){let u=t+ke,p;return n.firstCreatePass?(p=Ta(n,u,4,s||null,a||null),Us()&&Pg(n,e,p,Qt(n.consts,l),Gu),Ep(n,p)):p=n.data[u],Qg(p,e,n,t,r,i,o,c),Xr(p)&&Ea(n,e,p),l!=null&&Ia(e,p,f),p}function fa(e,n,t,r,i,o,s,a,c,l,f){let u=t+ke,p;if(n.firstCreatePass){if(p=Ta(n,u,4,s||null,a||null),l!=null){let d=Qt(n.consts,l);p.localNames=[];for(let m=0;m{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r});appInits=$(Xg,{optional:!0})??[];injector=$(dt);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let i of this.appInits){let o=Zr(this.injector,i);if(hi(o))t.push(o);else if(nd(o)){let s=new Promise((a,c)=>{o.subscribe({complete:a,error:c})});t.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),t.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Jg=new ne("");function em(){Dc(()=>{let e="";throw new te(600,e)})}function tm(e){return e.isBoundToModule}var Sw=10;var Wn=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=$(Xt);afterRenderManager=$(Hu);zonelessEnabled=$(ii);rootEffectScheduler=$(to);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Ue;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=$(Bn);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Qe(t=>!t))}constructor(){$(Cr,{optional:!0})}whenStable(){let t;return new Promise(r=>{t=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{t.unsubscribe()})}_injector=$(lt);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,r){return this.bootstrapImpl(t,r)}bootstrapImpl(t,r,i=dt.NULL){return this._injector.get(Pe).run(()=>{Ie(10);let s=t instanceof Sa;if(!this._injector.get(rd).done){let m="";throw new te(405,m)}let c;s?c=t:c=this._injector.get(Aa).resolveComponentFactory(t),this.componentTypes.push(c.componentType);let l=tm(c)?void 0:this._injector.get(uo),f=r||c.selector,u=c.create(i,[],f,l),p=u.location.nativeElement,d=u.injector.get(td,null);return d?.registerApplication(p),u.onDestroy(()=>{this.detachView(u.hostView),ro(this.components,u),d?.unregisterApplication(p)}),this._loadComponent(u),Ie(11,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Ie(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(wa.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new te(101,!1);let t=ue(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ue(t),this.afterTick.next(),Ie(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Dr,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++Ki(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){let r=t;ro(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(i){this.internalErrorHandler(i)}this.components.push(t),this._injector.get(Jg,[]).forEach(i=>i(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>ro(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new te(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ro(e,n){let t=e.indexOf(n);t>-1&&e.splice(t,1)}function pi(e,n,t,r){let i=ge(),o=ni();if(mn(i,o,n)){let s=Ge(),a=Cl();rD(a,i,e,n,t,r)}return pi}var HA=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var hu=class{destroy(n){}updateValue(n,t){}swap(n,t){let r=Math.min(n,t),i=Math.max(n,t),o=this.detach(i);if(i-r>1){let s=this.detach(r);this.attach(r,o),this.attach(i,s)}else this.attach(r,o)}move(n,t){this.attach(t,this.detach(n))}};function Rl(e,n,t,r,i){return e===t&&Object.is(n,r)?1:Object.is(i(e,n),i(t,r))?-1:0}function Aw(e,n,t){let r,i,o=0,s=e.length-1,a=void 0;if(Array.isArray(n)){let c=n.length-1;for(;o<=s&&o<=c;){let l=e.at(o),f=n[o],u=Rl(o,l,o,f,t);if(u!==0){u<0&&e.updateValue(o,f),o++;continue}let p=e.at(s),d=n[c],m=Rl(s,p,c,d,t);if(m!==0){m<0&&e.updateValue(s,d),s--,c--;continue}let y=t(o,l),v=t(s,p),_=t(o,f);if(Object.is(_,v)){let b=t(c,d);Object.is(b,y)?(e.swap(o,s),e.updateValue(s,d),c--,s--):e.move(s,o),e.updateValue(o,f),o++;continue}if(r??=new ha,i??=mp(e,o,s,t),pu(e,r,o,_))e.updateValue(o,f),o++,s++;else if(i.has(_))r.set(y,e.detach(o)),s--;else{let b=e.create(o,n[o]);e.attach(o,b),o++,s++}}for(;o<=c;)gp(e,r,t,o,n[o]),o++}else if(n!=null){let c=n[Symbol.iterator](),l=c.next();for(;!l.done&&o<=s;){let f=e.at(o),u=l.value,p=Rl(o,f,o,u,t);if(p!==0)p<0&&e.updateValue(o,u),o++,l=c.next();else{r??=new ha,i??=mp(e,o,s,t);let d=t(o,u);if(pu(e,r,o,d))e.updateValue(o,u),o++,s++,l=c.next();else if(!i.has(d))e.attach(o,e.create(o,u)),o++,s++,l=c.next();else{let m=t(o,f);r.set(m,e.detach(o)),s--}}}for(;!l.done;)gp(e,r,t,e.length,l.value),l=c.next()}for(;o<=s;)e.destroy(e.detach(s--));r?.forEach(c=>{e.destroy(c)})}function pu(e,n,t,r){return n!==void 0&&n.has(r)?(e.attach(t,n.get(r)),n.delete(r),!0):!1}function gp(e,n,t,r,i){if(pu(e,n,r,t(r,i)))e.updateValue(r,i);else{let o=e.create(r,i);e.attach(r,o)}}function mp(e,n,t,r){let i=new Set;for(let o=n;o<=t;o++)i.add(r(o,e.at(o)));return i}var ha=class{kvMap=new Map;_vMap=void 0;has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;let t=this.kvMap.get(n);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(n,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,t){if(this.kvMap.has(n)){let r=this.kvMap.get(n);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(r);)r=i.get(r);i.set(r,t)}else this.kvMap.set(n,t)}forEach(n){for(let[t,r]of this.kvMap)if(n(r,t),this._vMap!==void 0){let i=this._vMap;for(;i.has(r);)r=i.get(r),n(r,t)}}};function Bt(e,n,t,r,i,o,s,a){$n("NgControlFlow");let c=ge(),l=Ge(),f=Qt(l.consts,o);return fa(c,l,e,n,t,r,i,f,256,s,a),id}function id(e,n,t,r,i,o,s,a){$n("NgControlFlow");let c=ge(),l=Ge(),f=Qt(l.consts,o);return fa(c,l,e,n,t,r,i,f,512,s,a),id}function Ht(e,n){$n("NgControlFlow");let t=ge(),r=ni(),i=t[r]!==Mt?t[r]:-1,o=i!==-1?pa(t,ke+i):void 0,s=0;if(mn(t,r,e)){let a=ue(null);try{if(o!==void 0&&Ng(o,s),e!==-1){let c=ke+e,l=pa(t,c),f=vu(t[ie],c),u=Og(l,f,t),p=Ma(t,f,n,{dehydratedView:u});xa(l,p,s,so(f,u))}}finally{ue(a)}}else if(o!==void 0){let a=Ag(o,s);a!==void 0&&(a[He]=n)}}var gu=class{lContainer;$implicit;$index;constructor(n,t,r){this.lContainer=n,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-Fe}};var mu=class{hasEmptyBlock;trackByFn;liveCollection;constructor(n,t,r){this.hasEmptyBlock=n,this.trackByFn=t,this.liveCollection=r}};function od(e,n,t,r,i,o,s,a,c,l,f,u,p){$n("NgControlFlow");let d=ge(),m=Ge(),y=c!==void 0,v=ge(),_=a?s.bind(v[ht][He]):s,b=new mu(y,_);v[ke+e]=b,fa(d,m,e+1,n,t,r,i,Qt(m.consts,o),256),y&&fa(d,m,e+2,c,l,f,u,Qt(m.consts,p),512)}var yu=class extends hu{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(n,t,r){super(),this.lContainer=n,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-Fe}at(n){return this.getLView(n)[He].$implicit}attach(n,t){let r=t[Yr];this.needsIndexUpdate||=n!==this.length,xa(this.lContainer,t,n,so(this.templateTNode,r)),Nw(this.lContainer,n)}detach(n){return this.needsIndexUpdate||=n!==this.length-1,Rw(this.lContainer,n),Ow(this.lContainer,n)}create(n,t){let r=nu(this.lContainer,this.templateTNode.tView.ssrId),i=Ma(this.hostLView,this.templateTNode,new gu(this.lContainer,t,n),{dehydratedView:r});return this.operationsCounter?.recordCreate(),i}destroy(n){Ca(n[ie],n),this.operationsCounter?.recordDestroy()}updateValue(n,t){this.getLView(n)[He].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n0){let o=r[dn];N0(o,i),vr.delete(r),i.detachedLeaveAnimationFns=void 0}}function Rw(e,n){if(e.length<=Fe)return;let t=Fe+n,r=e[t],i=r?r[fr]:void 0;i&&i.leave&&i.leave.size>0&&(i.detachedLeaveAnimationFns=[])}function Ow(e,n){return co(e,n)}function kw(e,n){return Ag(e,n)}function vu(e,n){return Yi(e,n)}function xe(e,n,t){let r=ge(),i=ni();if(mn(r,i,n)){let o=Ge(),s=Cl();Q0(s,r,e,n,r[Oe],t)}return xe}function yp(e,n,t,r,i){qu(n,e,t,i?"class":"style",r)}function G(e,n,t,r){let i=ge(),o=i[ie],s=e+ke,a=o.firstCreatePass?Qu(s,i,2,n,Gu,Us(),t,r):o.data[s];if(vg(a,i,e,n,Fw),Xr(a)){let c=i[ie];Ea(c,i,a),xu(c,a,i)}return r!=null&&Ia(i,a),G}function q(){let e=Ge(),n=it(),t=_g(n);return e.firstCreatePass&&Xu(e,t),Ch(t)&&bh(),Dh(),t.classesWithoutHost!=null&&d_(t)&&yp(e,t,ge(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&f_(t)&&yp(e,t,ge(),t.stylesWithoutHost,!1),q}function qe(e,n,t,r){return G(e,n,t,r),q(),qe}var Fw=(e,n,t,r,i)=>(Ji(!0),eg(n[Oe],r,Lh()));function Ra(e,n,t){let r=ge(),i=r[ie],o=e+ke,s=i.firstCreatePass?Qu(o,r,8,"ng-container",Gu,Us(),n,t):i.data[o];if(vg(s,r,e,"ng-container",Pw),Xr(s)){let a=r[ie];Ea(a,r,s),xu(a,s,r)}return t!=null&&Ia(r,s),Ra}function Oa(){let e=Ge(),n=it(),t=_g(n);return e.firstCreatePass&&Xu(e,t),Oa}var Pw=(e,n,t,r,i)=>(Ji(!0),i0(n[Oe],""));function ut(){return ge()}var _o="en-US";var Lw=_o;function nm(e){typeof e=="string"&&(Lw=e.toLowerCase().replace(/_/g,"-"))}function ae(e,n,t){let r=ge(),i=Ge(),o=it();return Vw(i,r,r[Oe],o,e,n,t),ae}function Vw(e,n,t,r,i,o,s){let a=!0,c=null;if((r.type&3||s)&&(c??=Sl(r,n,o),HD(r,e,n,s,t,i,o,c)&&(a=!1)),a){let l=r.outputs?.[i],f=r.hostDirectiveOutputs?.[i];if(f&&f.length)for(let u=0;u>17&32767}function jw(e){return(e&2)==2}function Bw(e,n){return e&131071|n<<17}function _u(e){return e|2}function ci(e){return(e&131068)>>2}function Ol(e,n){return e&-131069|n<<2}function Hw(e){return(e&1)===1}function Du(e){return e|1}function Uw(e,n,t,r,i,o){let s=o?n.classBindings:n.styleBindings,a=wr(s),c=ci(s);e[r]=t;let l=!1,f;if(Array.isArray(t)){let u=t;f=u[1],(f===null||Gr(u,f)>0)&&(l=!0)}else f=t;if(i)if(c!==0){let p=wr(e[a+1]);e[r+1]=Ks(p,a),p!==0&&(e[p+1]=Ol(e[p+1],r)),e[a+1]=Bw(e[a+1],r)}else e[r+1]=Ks(a,0),a!==0&&(e[a+1]=Ol(e[a+1],r)),a=r;else e[r+1]=Ks(c,0),a===0?a=r:e[c+1]=Ol(e[c+1],r),c=r;l&&(e[r+1]=_u(e[r+1])),vp(e,f,r,!0),vp(e,f,r,!1),zw(n,f,e,r,o),s=Ks(a,c),o?n.classBindings=s:n.styleBindings=s}function zw(e,n,t,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof n=="string"&&Gr(o,n)>=0&&(t[r+1]=Du(t[r+1]))}function vp(e,n,t,r){let i=e[t+1],o=n===null,s=r?wr(i):ci(i),a=!1;for(;s!==0&&(a===!1||o);){let c=e[s],l=e[s+1];$w(c,n)&&(a=!0,e[s+1]=r?Du(l):_u(l)),s=r?wr(l):ci(l)}a&&(e[t+1]=r?_u(i):Du(i))}function $w(e,n){return e===null||n==null||(Array.isArray(e)?e[1]:e)===n?!0:Array.isArray(e)&&typeof n=="string"?Gr(e,n)>=0:!1}function st(e,n,t){return rm(e,n,t,!1),st}function xt(e,n){return rm(e,n,null,!0),xt}function rm(e,n,t,r){let i=ge(),o=Ge(),s=_l(2);if(o.firstUpdatePass&&Gw(o,e,s,r),n!==Mt&&mn(i,s,n)){let a=o.data[hn()];Qw(o,a,i,i[Oe],e,i[s+1]=Xw(n,t),r,s)}}function Ww(e,n){return n>=e.expandoStartIndex}function Gw(e,n,t,r){let i=e.data;if(i[t+1]===null){let o=i[hn()],s=Ww(e,t);Jw(o,r)&&n===null&&!s&&(n=!1),n=qw(i,o,n,r),Uw(i,o,n,t,s,r)}}function qw(e,n,t,r){let i=Rh(e),o=r?n.residualClasses:n.residualStyles;if(i===null)(r?n.classBindings:n.styleBindings)===0&&(t=kl(null,e,n,t,r),t=ho(t,n.attrs,r),o=null);else{let s=n.directiveStylingLast;if(s===-1||e[s]!==i)if(t=kl(i,e,n,t,r),o===null){let c=Zw(e,n,r);c!==void 0&&Array.isArray(c)&&(c=kl(null,e,n,c[1],r),c=ho(c,n.attrs,r),Yw(e,n,r,c))}else o=Kw(e,n,r)}return o!==void 0&&(r?n.residualClasses=o:n.residualStyles=o),t}function Zw(e,n,t){let r=t?n.classBindings:n.styleBindings;if(ci(r)!==0)return e[wr(r)]}function Yw(e,n,t,r){let i=t?n.classBindings:n.styleBindings;e[wr(i)]=r}function Kw(e,n,t){let r,i=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0;){let c=e[i],l=Array.isArray(c),f=l?c[1]:c,u=f===null,p=t[i+1];p===Mt&&(p=u?ct:void 0);let d=u?Ps(p,r):f===r?p:void 0;if(l&&!ga(d)&&(d=Ps(c,r)),ga(d)&&(a=d,s))return a;let m=e[i+1];i=s?wr(m):ci(m)}if(n!==null){let c=o?n.residualClasses:n.residualStyles;c!=null&&(a=Ps(c,r))}return a}function ga(e){return e!==void 0}function Xw(e,n){return e==null||e===""||(typeof n=="string"?e=e+n:typeof e=="object"&&(e=Sn(yn(e)))),e}function Jw(e,n){return(e.flags&(n?8:16))!==0}function pe(e,n=""){let t=ge(),r=Ge(),i=e+ke,o=r.firstCreatePass?Ta(r,i,1,n,null):r.data[i],s=eC(r,t,o,n,e);t[i]=s,qs()&&$u(r,t,s,o),ei(o,!1)}var eC=(e,n,t,r,i)=>(Ji(!0),n0(n[Oe],r));function tC(e,n,t,r=""){return mn(e,ni(),t)?n+ar(t)+r:Mt}function nC(e,n,t,r,i,o=""){let s=xh(),a=jg(e,s,t,i);return _l(2),a?n+ar(t)+r+ar(i)+o:Mt}function Gn(e){return at("",e),Gn}function at(e,n,t){let r=ge(),i=tC(r,e,n,t);return i!==Mt&&im(r,hn(),i),at}function ka(e,n,t,r,i){let o=ge(),s=nC(o,e,n,t,r,i);return s!==Mt&&im(o,hn(),s),ka}function im(e,n,t){let r=ll(n,e);r0(e[Oe],r,t)}function rC(e,n,t){let r=Ge();if(r.firstCreatePass){let i=Kt(e);wu(t,r.data,r.blueprint,i,!0),wu(n,r.data,r.blueprint,i,!1)}}function wu(e,n,t,r,i){if(e=Xe(e),Array.isArray(e))for(let o=0;o>20;if(ir(e)||!e.multi){let d=new yr(l,i,Me,null),m=Pl(c,n,i?f:f+p,u);m===-1?(Vl(oa(a,s),o,c),Fl(o,e,n.length),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),t.push(d),s.push(d)):(t[m]=d,s[m]=d)}else{let d=Pl(c,n,f+p,u),m=Pl(c,n,f,f+p),y=d>=0&&t[d],v=m>=0&&t[m];if(i&&!v||!i&&!y){Vl(oa(a,s),o,c);let _=sC(i?oC:iC,t.length,i,r,l,e);!i&&v&&(t[m].providerFactory=_),Fl(o,e,n.length,0),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),t.push(_),s.push(_)}else{let _=om(t[i?m:d],l,!i&&r);Fl(o,e,d>-1?d:m,_)}!i&&r&&v&&t[m].componentProviders++}}}function Fl(e,n,t,r){let i=ir(n),o=ch(n);if(i||o){let c=(o?Xe(n.useClass):n).prototype.ngOnDestroy;if(c){let l=e.destroyHooks||(e.destroyHooks=[]);if(!i&&n.multi){let f=l.indexOf(t);f===-1?l.push(t,[r,c]):l[f+1].push(r,c)}else l.push(t,c)}}}function om(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Pl(e,n,t,r){for(let i=t;i{t.providersResolver=(r,i)=>rC(r,i?i(e):e,n)}}function ld(e,n,t,r){return am(ge(),Qi(),e,n,t,r)}function ud(e,n,t,r,i){return cm(ge(),Qi(),e,n,t,r,i)}function sm(e,n){let t=e[n];return t===Mt?void 0:t}function am(e,n,t,r,i,o){let s=n+t;return mn(e,s,i)?Vg(e,s+1,o?r.call(o,i):r(i)):sm(e,s+1)}function cm(e,n,t,r,i,o,s){let a=n+t;return jg(e,a,i,o)?Vg(e,a+2,s?r.call(s,i,o):r(i,o)):sm(e,a+2)}function $e(e,n){let t=Ge(),r,i=e+ke;t.firstCreatePass?(r=aC(n,t.pipeRegistry),t.data[i]=r,r.onDestroy&&(t.destroyHooks??=[]).push(i,r.onDestroy)):r=t.data[i];let o=r.factory||(r.factory=An(r.type,!0)),s,a=rt(Me);try{let c=ia(!1),l=o();return ia(c),ul(t,ge(),i,l),l}finally{rt(a)}}function aC(e,n){if(n)for(let t=n.length-1;t>=0;t--){let r=n[t];if(e===r.name)return r}}function Ze(e,n,t){let r=e+ke,i=ge(),o=js(i,r);return lm(i,r)?am(i,Qi(),n,o.transform,t,o):o.transform(t)}function dd(e,n,t,r){let i=e+ke,o=ge(),s=js(o,i);return lm(o,i)?cm(o,Qi(),n,s.transform,t,r,s):s.transform(t,r)}function lm(e,n){return e[ie].data[n].pure}var cC=(()=>{class e{zone=$(Pe);changeDetectionScheduler=$(Nt);applicationRef=$(Wn);applicationErrorHandler=$(Xt);_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(t){this.applicationErrorHandler(t)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),um=new ne("",{factory:()=>!1});function fd({ngZoneFactory:e,ignoreChangesOutsideZone:n,scheduleInRootZone:t}){return e??=()=>new Pe(_e(X({},pd()),{scheduleInRootZone:t})),[{provide:Pe,useFactory:e},{provide:kn,multi:!0,useFactory:()=>{let r=$(cC,{optional:!0});return()=>r.initialize()}},{provide:kn,multi:!0,useFactory:()=>{let r=$(lC);return()=>{r.initialize()}}},n===!0?{provide:El,useValue:!0}:[],{provide:Il,useValue:t??cg},{provide:Xt,useFactory:()=>{let r=$(Pe),i=$(lt),o;return s=>{r.runOutsideAngular(()=>{i.destroyed&&!o?setTimeout(()=>{throw s}):(o??=i.get(ft),o.handleError(s))})}}}]}function hd(e){let n=e?.ignoreChangesOutsideZone,t=e?.scheduleInRootZone,r=fd({ngZoneFactory:()=>{let i=pd(e);return i.scheduleInRootZone=t,i.shouldCoalesceEventChangeDetection&&$n("NgZone_CoalesceEvent"),new Pe(i)},ignoreChangesOutsideZone:n,scheduleInRootZone:t});return qr([{provide:um,useValue:!0},{provide:ii,useValue:!1},r])}function pd(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var lC=(()=>{class e{subscription=new nt;initialized=!1;zone=$(Pe);pendingTasks=$(Bn);initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Pe.assertNotInAngularZone(),queueMicrotask(()=>{t!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Pe.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var dm=(()=>{class e{applicationErrorHandler=$(Xt);appRef=$(Wn);taskService=$(Bn);ngZone=$(Pe);zonelessEnabled=$(ii);tracing=$(Cr,{optional:!0});disableScheduling=$(El,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new nt;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ca):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&($(Il,{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 la||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&t===5)return;let r=!1;switch(t){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,r=!0;break}case 12:{this.appRef.dirtyFlags|=16,r=!0;break}case 13:{this.appRef.dirtyFlags|=2,r=!0;break}case 11:{r=!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(r))return;let i=this.useMicrotaskScheduler?ep:lg;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(t){return!(this.disableScheduling&&!t||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ca+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 t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.taskService.remove(t),this.applicationErrorHandler(r)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,ep(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uC(){return typeof $localize<"u"&&$localize.locale||_o}var Fa=new ne("",{providedIn:"root",factory:()=>$(Fa,{optional:!0,skipSelf:!0})||uC()});var Pa=class{destroyed=!1;listeners=null;errorHandler=$(ft,{optional:!0});destroyRef=$(Et);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(n){if(this.destroyed)throw new te(953,!1);return(this.listeners??=[]).push(n),{unsubscribe:()=>{let t=this.listeners?.indexOf(n);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(n){if(this.destroyed){console.warn(Rn(953,!1));return}if(this.listeners===null)return;let t=ue(null);try{for(let r of this.listeners)try{r(n)}catch(i){this.errorHandler?.handleError(i)}}finally{ue(t)}}};function Dn(e){return Wf(e)}function Ye(e,n){return Oi(e,n?.equal)}var gd=class{[Ke];constructor(n){this[Ke]=n}destroy(){this[Ke].destroy()}};function La(e,n){let t=n?.injector??$(dt),r=n?.manualCleanup!==!0?t.get(Et):null,i,o=t.get(ri,null,{optional:!0}),s=t.get(Nt);return o!==null?(i=hC(o.view,s,e),r instanceof zi&&r._lView===o.view&&(r=null)):i=pC(e,t.get(to),s),i.injector=t,r!==null&&(i.onDestroyFn=r.onDestroy(()=>i.destroy())),new gd(i)}var fm=_e(X({},Gf),{cleanupFns:void 0,zone:null,onDestroyFn:gr,run(){let e=ti(!1);try{qf(this)}finally{ti(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=ue(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ue(e)}}}),dC=_e(X({},fm),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Xn(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),fC=_e(X({},fm),{consumerMarkedDirty(){this.view[de]|=8192,Vn(this.view),this.notifier.notify(13)},destroy(){Xn(this),this.onDestroyFn(),this.cleanup(),this.view[fn]?.delete(this)}});function hC(e,n,t){let r=Object.create(fC);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=n,r.fn=hm(r,t),e[fn]??=new Set,e[fn].add(r),r.consumerMarkedDirty(r),r}function pC(e,n,t){let r=Object.create(dC);return r.fn=hm(r,e),r.scheduler=n,r.notifier=t,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function hm(e,n){return()=>{n(t=>(e.cleanupFns??=[]).push(t))}}var mm=Symbol("InputSignalNode#UNSET"),AC=_e(X({},ts),{transformFn:void 0,applyValueToInputSignal(e,n){Fr(e,n)}});function ym(e,n){let t=Object.create(AC);t.value=e,t.transformFn=n?.transform;function r(){if(Nr(t),t.value===mm){let i=null;throw new te(-950,i)}return t.value}return r[Ke]=t,r}var NC=new ne("");NC.__NG_ELEMENT_ID__=e=>{let n=it();if(n===null)throw new te(204,!1);if(n.type&2)return n.value;if(e&8)return null;throw new te(204,!1)};function Ut(e){return new Pa}function pm(e,n){return ym(e,n)}function RC(e){return ym(mm,e)}var Co=(pm.required=RC,pm);function vm(e,n){return qg(n)}var md=new ne(""),OC=new ne("");function wo(e){return!e.moduleRef}function kC(e){let n=wo(e)?e.r3Injector:e.moduleRef.injector,t=n.get(Pe);return t.run(()=>{wo(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=n.get(Xt),i;if(t.runOutsideAngular(()=>{i=t.onError.subscribe({next:r})}),wo(e)){let o=()=>n.destroy(),s=e.platformInjector.get(md);s.add(o),n.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>e.moduleRef.destroy(),s=e.platformInjector.get(md);s.add(o),e.moduleRef.onDestroy(()=>{ro(e.allPlatformModules,e.moduleRef),i.unsubscribe(),s.delete(o)})}return PC(r,t,()=>{let o=n.get(Bn),s=o.add(),a=n.get(rd);return a.runInitializers(),a.donePromise.then(()=>{let c=n.get(Fa,_o);if(nm(c||_o),!n.get(OC,!0))return wo(e)?n.get(Wn):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(wo(e)){let f=n.get(Wn);return e.rootComponent!==void 0&&f.bootstrap(e.rootComponent),f}else return FC?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>void o.remove(s))})})}var FC;function PC(e,n,t){try{let r=t();return hi(r)?r.catch(i=>{throw n.runOutsideAngular(()=>e(i)),i}):r}catch(r){throw n.runOutsideAngular(()=>e(r)),r}}var Va=null;function LC(e=[],n){return dt.create({name:n,providers:[{provide:Wi,useValue:"platform"},{provide:md,useValue:new Set([()=>Va=null])},...e]})}function VC(e=[]){if(Va)return Va;let n=LC(e);return Va=n,em(),jC(n),n}function jC(e){let n=e.get(ya,null);Zr(e,()=>{n?.forEach(t=>t())})}var gi=(()=>{class e{static __NG_ELEMENT_ID__=BC}return e})();function BC(e){return HC(it(),ge(),(e&16)===16)}function HC(e,n,t){if(Ln(e)&&!t){let r=bt(e.index,n);return new Hn(r,r)}else if(e.type&175){let r=n[ht];return new Hn(r,n)}return null}function _m(e){let{rootComponent:n,appProviders:t,platformProviders:r,platformRef:i}=e;Ie(8);try{let o=i?.injector??VC(r),s=[fd({}),{provide:Nt,useExisting:dm},Bh,...t||[]],a=new fo({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return kC({r3Injector:a.injector,platformInjector:o,rootComponent:n})}catch(o){return Promise.reject(o)}finally{Ie(9)}}function Dm(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}var wm=null;function wn(){return wm}function yd(e){wm??=e}var bo=class{};var vd=(()=>{class e{_viewContainer;_context=new ja;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(t,r){this._viewContainer=t,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Cm(t,!1),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Cm(t,!1),this._elseTemplateRef=t,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(t,r){return!0}static \u0275fac=function(r){return new(r||e)(Me(di),Me(_r))};static \u0275dir=tt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return e})(),ja=class{$implicit=null;ngIf=null};function Cm(e,n){if(e&&!e.createEmbeddedView)throw new te(2020,!1)}var Zn=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=Vt({type:e});static \u0275inj=_t({})}return e})();function Eo(e,n){n=encodeURIComponent(n);for(let t of e.split(";")){let r=t.indexOf("="),[i,o]=r==-1?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===n)return decodeURIComponent(o)}return null}var xr=class{};var bm="browser";var Io=class{_doc;constructor(n){this._doc=n}manager},Ba=(()=>{class e extends Io{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i,o){return t.addEventListener(r,i,o),()=>this.removeEventListener(t,r,i,o)}removeEventListener(t,r,i,o){return t.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||e)(ve(ot))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Ua=new ne(""),bd=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,r){this._zone=r,t.forEach(s=>{s.manager=this});let i=t.filter(s=>!(s instanceof Ba));this._plugins=i.slice().reverse();let o=t.find(s=>s instanceof Ba);o&&this._plugins.push(o)}addEventListener(t,r,i,o){return this._findPluginFor(r).addEventListener(t,r,i,o)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(o=>o.supports(t)),!r)throw new te(5101,!1);return this._eventNameToPlugin.set(t,r),r}static \u0275fac=function(r){return new(r||e)(ve(Ua),ve(Pe))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),_d="ng-app-id";function Em(e){for(let n of e)n.remove()}function Im(e,n){let t=n.createElement("style");return t.textContent=e,t}function zC(e,n,t,r){let i=e.head?.querySelectorAll(`style[${_d}="${n}"],link[${_d}="${n}"]`);if(i)for(let o of i)o.removeAttribute(_d),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function wd(e,n){let t=n.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),t}var Ed=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,r,i,o={}){this.doc=t,this.appId=r,this.nonce=i,zC(t,r,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,r){for(let i of t)this.addUsage(i,this.inline,Im);r?.forEach(i=>this.addUsage(i,this.external,wd))}removeStyles(t,r){for(let i of t)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(t,r,i){let o=r.get(t);o?o.usage++:r.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(t,this.doc)))})}removeUsage(t,r){let i=r.get(t);i&&(i.usage--,i.usage<=0&&(Em(i.elements),r.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])Em(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(t,Im(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(t,wd(r,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,r){return this.nonce&&r.setAttribute("nonce",this.nonce),t.appendChild(r)}static \u0275fac=function(r){return new(r||e)(ve(ot),ve(ma),ve(va,8),ve(go))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Dd={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"},Id=/%COMP%/g;var xm="%COMP%",$C=`_nghost-${xm}`,WC=`_ngcontent-${xm}`,GC=!0,qC=new ne("",{providedIn:"root",factory:()=>GC});function ZC(e){return WC.replace(Id,e)}function YC(e){return $C.replace(Id,e)}function Tm(e,n){return n.map(t=>t.replace(Id,e))}var Md=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(t,r,i,o,s,a,c=null,l=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=l,this.platformIsServer=!1,this.defaultRenderer=new Mo(t,s,a,this.platformIsServer,this.tracingService)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(t,r);return i instanceof Ha?i.applyToHost(t):i instanceof xo&&i.applyStyles(),i}getOrCreateRenderer(t,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,u=this.platformIsServer,p=this.tracingService;switch(r.encapsulation){case pn.Emulated:o=new Ha(c,l,r,this.appId,f,s,a,u,p);break;case pn.ShadowDom:return new Cd(c,l,t,r,s,a,this.nonce,u,p);default:o=new xo(c,l,r,f,s,a,u,p);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(r){return new(r||e)(ve(bd),ve(Ed),ve(ma),ve(qC),ve(ot),ve(Pe),ve(va),ve(Cr,8))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Mo=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,t,r,i,o){this.eventManager=n,this.doc=t,this.ngZone=r,this.platformIsServer=i,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,t){return t?this.doc.createElementNS(Dd[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(Mm(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(Mm(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){t.remove()}selectRootElement(n,t){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new te(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,i){if(i){t=i+":"+t;let o=Dd[i];o?n.setAttributeNS(o,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){let i=Dd[r];i?n.removeAttributeNS(i,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,i){i&(en.DashCase|en.Important)?n.style.setProperty(t,r,i&en.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&en.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){n!=null&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r,i){if(typeof n=="string"&&(n=wn().getGlobalEventTarget(this.doc,n),!n))throw new te(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,t,o)),this.eventManager.addEventListener(n,t,o,i)}decoratePreventDefault(n){return t=>{if(t==="__ngUnwrap__")return n;n(t)===!1&&t.preventDefault()}}};function Mm(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Cd=class extends Mo{sharedStylesHost;hostEl;shadowRoot;constructor(n,t,r,i,o,s,a,c,l){super(n,o,s,c,l),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let f=i.styles;f=Tm(i.id,f);for(let p of f){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=p,this.shadowRoot.appendChild(d)}let u=i.getExternalStyles?.();if(u)for(let p of u){let d=wd(p,o);a&&d.setAttribute("nonce",a),this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(null,t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xo=class extends Mo{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,t,r,i,o,s,a,c,l){super(n,o,s,a,c),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=i;let f=r.styles;this.styles=l?Tm(l,f):f,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&vr.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ha=class extends xo{contentAttr;hostAttr;constructor(n,t,r,i,o,s,a,c,l){let f=i+"-"+r.id;super(n,t,r,o,s,a,c,l,f),this.contentAttr=ZC(f),this.hostAttr=YC(f)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){let r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}};var za=class e extends bo{supportsDOMEvents=!0;static makeCurrent(){yd(new e)}onAndCancel(n,t,r,i){return n.addEventListener(t,r,i),()=>{n.removeEventListener(t,r,i)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.remove()}createElement(n,t){return t=t||this.getDefaultDocument(),t.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,t){return t==="window"?window:t==="document"?n:t==="body"?n.body:null}getBaseHref(n){let t=KC();return t==null?null:QC(t)}resetBaseElement(){To=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Eo(document.cookie,n)}},To=null;function KC(){return To=To||document.head.querySelector("base"),To?To.getAttribute("href"):null}function QC(e){return new URL(e,document.baseURI).pathname}var XC=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Sm=["alt","control","meta","shift"],JC={"\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"},eb={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},Am=(()=>{class e extends Io{constructor(t){super(t)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,r,i,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>wn().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let r=t.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Sm.forEach(l=>{let f=r.indexOf(l);f>-1&&(r.splice(f,1),s+=l+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(t,r){let i=JC[t.key]||t.key,o="";return r.indexOf("code.")>-1&&(i=t.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Sm.forEach(s=>{if(s!==i){let a=eb[s];a(t)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(t,r,i){return o=>{e.matchEventFullKeyCode(o,t)&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(r){return new(r||e)(ve(ot))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();function xd(e,n,t){let r=X({rootComponent:e,platformRef:t?.platformRef},tb(n));return _m(r)}function tb(e){return{appProviders:[...sb,...e?.providers??[]],platformProviders:ob}}function nb(){za.makeCurrent()}function rb(){return new ft}function ib(){return Iu(document),document}var ob=[{provide:go,useValue:bm},{provide:ya,useValue:nb,multi:!0},{provide:ot,useFactory:ib}];var sb=[{provide:Wi,useValue:"root"},{provide:ft,useFactory:rb},{provide:Ua,useClass:Ba,multi:!0,deps:[ot]},{provide:Ua,useClass:Am,multi:!0,deps:[ot]},Md,Ed,bd,{provide:Dr,useExisting:Md},{provide:xr,useClass:XC},[]];var yi=class{},En=class{},rn=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(n){n?typeof n=="string"?this.lazyInit=()=>{this.headers=new Map,n.split(` `).forEach(t=>{let r=t.indexOf(":");if(r>0){let i=t.slice(0,r),o=t.slice(r+1).trim();this.addHeaderEntry(i,o)}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();let t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof e?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(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){let t=new e;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){let t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(n.name,t);let i=(n.op==="a"?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":let o=n.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(n,t){let r=n.toLowerCase();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(n,t){let r=(Array.isArray(t)?t:[t]).map(o=>o.toString()),i=n.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(n,i)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}};var Ga=class{encodeKey(n){return Nm(n)}encodeValue(n){return Nm(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}};function ab(e,n){let t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(i=>{let o=i.indexOf("="),[s,a]=o==-1?[n.decodeKey(i),""]:[n.decodeKey(i.slice(0,o)),n.decodeValue(i.slice(o+1))],c=t.get(s)||[];c.push(a),t.set(s,c)}),t}var cb=/%(\d[a-f0-9])/gi,lb={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Nm(e){return encodeURIComponent(e).replace(cb,(n,t)=>lb[t]??n)}function $a(e){return`${e}`}var Cn=class e{map;encoder;updates=null;cloneFrom=null;constructor(n={}){if(this.encoder=n.encoder||new Ga,n.fromString){if(n.fromObject)throw new te(2805,!1);this.map=ab(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{let r=n.fromObject[t],i=Array.isArray(r)?r.map($a):[$a(r)];this.map.set(t,i)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();let t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){let t=[];return Object.keys(n).forEach(r=>{let i=n[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{let t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>n!=="").join("&")}clone(n){let t=new e({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}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 t=(n.op==="a"?this.map.get(n.param):void 0)||[];t.push($a(n.value)),this.map.set(n.param,t);break;case"d":if(n.value!==void 0){let r=this.map.get(n.param)||[],i=r.indexOf($a(n.value));i!==-1&&r.splice(i,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}else{this.map.delete(n.param);break}}}),this.cloneFrom=this.updates=null)}};var qa=class{map=new Map;set(n,t){return this.map.set(n,t),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 ub(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Rm(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Om(e){return typeof Blob<"u"&&e instanceof Blob}function km(e){return typeof FormData<"u"&&e instanceof FormData}function db(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var So="Content-Type",Za="Accept",Rd="X-Request-URL",Pm="text/plain",Lm="application/json",Vm=`${Lm}, ${Pm}, */*`,mi=class e{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,t,r,i){this.url=t,this.method=n.toUpperCase();let o;if(ub(this.method)||i?(this.body=r!==void 0?r:null,o=i):o=r,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new te(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new rn,this.context??=new qa,!this.params)this.params=new Cn,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),c=a===-1?"?":aA.set(P,n.setHeaders[P]),b)),n.setParams&&(E=Object.keys(n.setParams).reduce((A,P)=>A.set(P,n.setParams[P]),E)),new e(t,r,y,{params:E,headers:b,context:S,reportProgress:_,responseType:i,withCredentials:v,transferCache:d,keepalive:o,cache:a,priority:s,timeout:m,mode:c,redirect:l,credentials:f,referrer:u,integrity:p})}},bn=(function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e})(bn||{}),vi=class{headers;status;statusText;url;ok;type;redirected;constructor(n,t=200,r="OK"){this.headers=n.headers||new rn,this.status=n.status!==void 0?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.redirected=n.redirected,this.ok=this.status>=200&&this.status<300}},Ao=class e extends vi{constructor(n={}){super(n)}type=bn.ResponseHeader;clone(n={}){return new e({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})}},_i=class e extends vi{body;constructor(n={}){super(n),this.body=n.body!==void 0?n.body:null}type=bn.Response;clone(n={}){return new e({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})}},nn=class extends vi{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}},jm=200,fb=204;function Td(e,n){return{body:n,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,credentials:e.credentials,transferCache:e.transferCache,timeout:e.timeout,keepalive:e.keepalive,priority:e.priority,cache:e.cache,mode:e.mode,redirect:e.redirect,integrity:e.integrity,referrer:e.referrer}}var Di=(()=>{class e{handler;constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof mi)o=t;else{let c;i.headers instanceof rn?c=i.headers:c=new rn(i.headers);let l;i.params&&(i.params instanceof Cn?l=i.params:l=new Cn({fromObject:i.params})),o=new mi(t,r,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:l,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,credentials:i.credentials,referrer:i.referrer,integrity:i.integrity,timeout:i.timeout})}let s=ln(o).pipe(ji(c=>this.handler.handle(c)));if(t instanceof mi||i.observe==="events")return s;let a=s.pipe(Vi(c=>c instanceof _i));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Qe(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new te(2806,!1);return c.body}));case"blob":return a.pipe(Qe(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new te(2807,!1);return c.body}));case"text":return a.pipe(Qe(c=>{if(c.body!==null&&typeof c.body!="string")throw new te(2808,!1);return c.body}));case"json":default:return a.pipe(Qe(c=>c.body))}case"response":return a;default:throw new te(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new Cn().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,Td(i,r))}post(t,r,i={}){return this.request("POST",t,Td(i,r))}put(t,r,i={}){return this.request("PUT",t,Td(i,r))}static \u0275fac=function(r){return new(r||e)(ve(yi))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),hb=/^\)\]\}',?\n/;function Fm(e){if(e.url)return e.url;let n=Rd.toLocaleLowerCase();return e.headers.get(n)}var Bm=new ne(""),Wa=(()=>{class e{fetchImpl=$(Sd,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=$(Pe);destroyRef=$(Et);handle(t){return new be(r=>{let i=new AbortController;this.doRequest(t,i.signal,r).then(Ad,s=>r.error(new nn({error:s})));let o;return t.timeout&&(o=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{i.signal.aborted||i.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{o!==void 0&&clearTimeout(o),i.abort()}})}doRequest(t,r,i){return Be(this,null,function*(){let o=this.createRequestInit(t),s;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,X({signal:r},o)));pb(m),i.next({type:bn.Sent}),s=yield m}catch(m){i.error(new nn({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let a=new rn(s.headers),c=s.statusText,l=Fm(s)??t.urlWithParams,f=s.status,u=null;if(t.reportProgress&&i.next(new Ao({headers:a,status:f,statusText:c,url:l})),s.body){let m=s.headers.get("content-length"),y=[],v=s.body.getReader(),_=0,b,E,S=typeof Zone<"u"&&Zone.current,A=!1;if(yield this.ngZone.runOutsideAngular(()=>Be(this,null,function*(){for(;;){if(this.destroyRef.destroyed){yield v.cancel(),A=!0;break}let{done:N,value:j}=yield v.read();if(N)break;if(y.push(j),_+=j.length,t.reportProgress){E=t.responseType==="text"?(E??"")+(b??=new TextDecoder).decode(j,{stream:!0}):void 0;let J=()=>i.next({type:bn.DownloadProgress,total:m?+m:void 0,loaded:_,partialText:E});S?S.run(J):J()}}})),A){i.complete();return}let P=this.concatChunks(y,_);try{let N=s.headers.get(So)??"";u=this.parseBody(t,P,N,f)}catch(N){i.error(new nn({error:N,headers:new rn(s.headers),status:s.status,statusText:s.statusText,url:Fm(s)??t.urlWithParams}));return}}f===0&&(f=u?jm:0);let p=f>=200&&f<300,d=s.redirected;p?(i.next(new _i({body:u,headers:a,status:f,statusText:c,url:l,redirected:d})),i.complete()):i.error(new nn({error:u,headers:a,status:f,statusText:c,url:l,redirected:d}))})}parseBody(t,r,i,o){switch(t.responseType){case"json":let s=new TextDecoder().decode(r).replace(hb,"");if(s==="")return null;try{return JSON.parse(s)}catch(a){if(o<200||o>=300)return s;throw a}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:i});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},i;if(i=t.credentials,t.withCredentials&&(i="include"),t.headers.forEach((o,s)=>r[o]=s.join(",")),t.headers.has(Za)||(r[Za]=Vm),!t.headers.has(So)){let o=t.detectContentTypeHeader();o!==null&&(r[So]=o)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:i,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let i=new Uint8Array(r),o=0;for(let s of t)i.set(s,o),o+=s.length;return i}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Sd=class{};function Ad(){}function pb(e){e.then(Ad,Ad)}function gb(e,n){return n(e)}function mb(e,n,t){return(r,i)=>Zr(t,()=>n(r,o=>e(o,i)))}var Hm=new ne(""),Um=new ne(""),zm=new ne("",{providedIn:"root",factory:()=>!0});var Ya=(()=>{class e extends yi{backend;injector;chain=null;pendingTasks=$(eo);contributeToStability=$(zm);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(Hm),...this.injector.get(Um,[])]));this.chain=r.reduceRight((i,o)=>mb(i,o,this.injector),gb)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,i=>this.backend.handle(i)).pipe(Nc(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||e)(ve(En),ve(lt))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();var yb=/^\)\]\}',?\n/,vb=RegExp(`^${Rd}:`,"m");function _b(e){return"responseURL"in e&&e.responseURL?e.responseURL:vb.test(e.getAllResponseHeaders())?e.getResponseHeader(Rd):null}var Nd=(()=>{class e{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new te(-2800,!1);let r=this.xhrFactory;return ln(null).pipe(zr(()=>new be(o=>{let s=r.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((v,_)=>s.setRequestHeader(v,_.join(","))),t.headers.has(Za)||s.setRequestHeader(Za,Vm),!t.headers.has(So)){let v=t.detectContentTypeHeader();v!==null&&s.setRequestHeader(So,v)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let v=t.responseType.toLowerCase();s.responseType=v!=="json"?v:"text"}let a=t.serializeBody(),c=null,l=()=>{if(c!==null)return c;let v=s.statusText||"OK",_=new rn(s.getAllResponseHeaders()),b=_b(s)||t.url;return c=new Ao({headers:_,status:s.status,statusText:v,url:b}),c},f=()=>{let{headers:v,status:_,statusText:b,url:E}=l(),S=null;_!==fb&&(S=typeof s.response>"u"?s.responseText:s.response),_===0&&(_=S?jm:0);let A=_>=200&&_<300;if(t.responseType==="json"&&typeof S=="string"){let P=S;S=S.replace(yb,"");try{S=S!==""?JSON.parse(S):null}catch(N){S=P,A&&(A=!1,S={error:N,text:S})}}A?(o.next(new _i({body:S,headers:v,status:_,statusText:b,url:E||void 0})),o.complete()):o.error(new nn({error:S,headers:v,status:_,statusText:b,url:E||void 0}))},u=v=>{let{url:_}=l(),b=new nn({error:v,status:s.status||0,statusText:s.statusText||"Unknown Error",url:_||void 0});o.error(b)},p=u;t.timeout&&(p=v=>{let{url:_}=l(),b=new nn({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:_||void 0});o.error(b)});let d=!1,m=v=>{d||(o.next(l()),d=!0);let _={type:bn.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),t.responseType==="text"&&s.responseText&&(_.partialText=s.responseText),o.next(_)},y=v=>{let _={type:bn.UploadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),o.next(_)};return s.addEventListener("load",f),s.addEventListener("error",u),s.addEventListener("timeout",p),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",m),a!==null&&s.upload&&s.upload.addEventListener("progress",y)),s.send(a),o.next({type:bn.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",f),s.removeEventListener("timeout",p),t.reportProgress&&(s.removeEventListener("progress",m),a!==null&&s.upload&&s.upload.removeEventListener("progress",y)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||e)(ve(xr))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),$m=new ne(""),Db="XSRF-TOKEN",wb=new ne("",{providedIn:"root",factory:()=>Db}),Cb="X-XSRF-TOKEN",bb=new ne("",{providedIn:"root",factory:()=>Cb}),No=class{},Eb=(()=>{class e{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Eo(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||e)(ve(ot),ve(wb))};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Ib=/^(?:https?:)?\/\//i;function Mb(e,n){if(!$($m)||e.method==="GET"||e.method==="HEAD"||Ib.test(e.url))return n(e);let t=$(No).getToken(),r=$(bb);return t!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,t)})),n(e)}var Od=(function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e})(Od||{});function xb(e,n){return{\u0275kind:e,\u0275providers:n}}function kd(...e){let n=[Di,Nd,Ya,{provide:yi,useExisting:Ya},{provide:En,useFactory:()=>$(Bm,{optional:!0})??$(Nd)},{provide:Hm,useValue:Mb,multi:!0},{provide:$m,useValue:!0},{provide:No,useClass:Eb}];for(let t of e)n.push(...t.\u0275providers);return qr(n)}function Fd(){return xb(Od.Fetch,[Wa,{provide:Bm,useExisting:Wa},{provide:En,useExisting:Wa}])}var Pd=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:function(r){let i=null;return r?i=new(r||e):i=ve(Tb),i},providedIn:"root"})}return e})(),Tb=(()=>{class e extends Pd{_doc;constructor(t){super(),this._doc=t}sanitize(t,r){if(r==null)return null;switch(t){case tn.NONE:return r;case tn.HTML:return Un(r,"HTML")?yn(r):Ou(this._doc,String(r)).toString();case tn.STYLE:return Un(r,"Style")?yn(r):r;case tn.SCRIPT:if(Un(r,"Script"))return yn(r);throw new te(5200,!1);case tn.URL:return Un(r,"URL")?yn(r):mo(String(r));case tn.RESOURCE_URL:if(Un(r,"ResourceURL"))return yn(r);throw new te(5201,!1);default:throw new te(5202,!1)}}bypassSecurityTrustHtml(t){return Tu(t)}bypassSecurityTrustStyle(t){return Su(t)}bypassSecurityTrustScript(t){return Au(t)}bypassSecurityTrustUrl(t){return Nu(t)}bypassSecurityTrustResourceUrl(t){return Ru(t)}static \u0275fac=function(r){return new(r||e)(ve(ot))};static \u0275prov=he({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ko=class{},Ab=(()=>{class e{handle(t){return t.key}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),wi=class{},Nb=(()=>{class e extends wi{compile(t,r){return t}compileTranslations(t,r){return t}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),on=class{},Rb=(()=>{class e extends on{getTranslation(t){return ln({})}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();function Ka(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,r=typeof n,i;if(t==r&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((i=e.length)==n.length){for(let o=0;oXa(n));if(In(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=Xa(e[t])}),n}else return e}function jd(e,n){if(!Oo(e))return Xa(n);let t=Xa(e);return Oo(t)&&Oo(n)&&Object.keys(n).forEach(r=>{In(n[r])?r in e?t[r]=jd(e[r],n[r]):Object.assign(t,{[r]:n[r]}):Object.assign(t,{[r]:n[r]})}),t}function qm(e,n){let t=n.split(".");n="";do{n+=t.shift();let r=!t.length;if(Yn(e)){if(In(e)&&Wm(e[n])&&(In(e[n])||Tr(e[n])||r)){e=e[n],n="";continue}if(Tr(e)){let i=parseInt(n,10);if(Wm(e[i])&&(In(e[i])||Tr(e[i])||r)){e=e[i],n="";continue}}}if(r){e=void 0;continue}n+="."}while(t.length);return e}function kb(e,n,t){return jd(e,Fb(n,t))}function Fb(e,n){return e.split(".").reduceRight((t,r)=>({[r]:t}),n)}var Ci=class{},Pb=(()=>{class e extends Ci{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,r){if(Qa(t))return this.interpolateString(t,r);if(Ob(t))return this.interpolateFunction(t,r)}interpolateFunction(t,r){return t(r)}interpolateString(t,r){return r?t.replace(this.templateMatcher,(i,o)=>{let s=this.getInterpolationReplacement(r,o);return s!==void 0?s:i}):t}getInterpolationReplacement(t,r){return this.formatValue(qm(t,r))}formatValue(t){if(Qa(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(Tr(t))return t.join(", ");if(Oo(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Ld=(()=>{class e{_onTranslationChange=new Ue;_onLangChange=new Ue;_onFallbackLangChange=new Ue;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,r,i){this.translations[t]=i&&this.hasTranslationFor(t)?jd(this.translations[t],r):r,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,r=!0){this.fallbackLang=t,r&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,r=!0){this.currentLang=t,r&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let r=this.getValue(this.currentLang,t);return r===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(r=this.getValue(this.fallbackLang,t)),r}getValue(t,r){return qm(this.getTranslations(t),r)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})(),Vd=new ne("TRANSLATE_CONFIG"),Ro=e=>Mn(e)?e:ln(e);var Fo=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=$(on);compiler=$(wi);parser=$(Ci);missingTranslationHandler=$(ko);store=$(Ld);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=X({extend:!1,fallbackLang:null},$(Vd,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let r=this.loadOrExtendLanguage(t);return Mn(r)?(r.pipe(Tn(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),r):(this.store.setFallbackLang(t),ln(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let r=this.loadOrExtendLanguage(t);return Mn(r)?(r.pipe(Tn(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),r):(this.changeLang(t),ln(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let r=this.currentLoader.getTranslation(t).pipe(Ms(1),Tn(1));return this.loadingTranslations=r.pipe(Qe(i=>this.compiler.compileTranslations(i,t)),Ms(1),Tn(1)),this.loadingTranslations.subscribe({next:i=>{this.store.setTranslations(t,i,this.extend),this.pending=!1},error:i=>{this.pending=!1}}),r}setTranslation(t,r,i=!1){let o=this.compiler.compileTranslations(r,t);this.store.setTranslations(t,o,i||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,r){let i=this.getTextToInterpolate(t);if(Yn(i))return this.runInterpolation(i,r);let o=this.missingTranslationHandler.handle(X({key:t,translateService:this},r!==void 0&&{interpolateParams:r}));return o!==void 0?o:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,r){if(Yn(t))return Tr(t)?this.runInterpolationOnArray(t,r):In(t)?this.runInterpolationOnDict(t,r):this.parser.interpolate(t,r)}runInterpolationOnArray(t,r){return t.map(i=>this.runInterpolation(i,r))}runInterpolationOnDict(t,r){let i={};for(let o in t){let s=this.runInterpolation(t[o],r);s!==void 0&&(i[o]=s)}return i}getParsedResult(t,r){return t instanceof Array?this.getParsedResultForArray(t,r):this.getParsedResultForKey(t,r)}getParsedResultForArray(t,r){let i={},o=!1;for(let a of t)i[a]=this.getParsedResultForKey(a,r),o=o||Mn(i[a]);if(!o)return i;let s=t.map(a=>Ro(i[a]));return Li(s).pipe(Qe(a=>{let c={};return a.forEach((l,f)=>{c[t[f]]=l}),c}))}get(t,r){if(!Yn(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(ji(()=>Ro(this.getParsedResult(t,r)))):Ro(this.getParsedResult(t,r))}getStreamOnTranslationChange(t,r){if(!Yn(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return bs(Es(()=>this.get(t,r)),this.onTranslationChange.pipe(zr(()=>{let i=this.getParsedResult(t,r);return Ro(i)})))}stream(t,r){if(!Yn(t)||!t.length)throw new Error('Parameter "key" required');return bs(Es(()=>this.get(t,r)),this.onLangChange.pipe(zr(()=>{let i=this.getParsedResult(t,r);return Ro(i)})))}instant(t,r){if(!Yn(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let i=this.getParsedResult(t,r);return Mn(i)?Array.isArray(t)?t.reduce((o,s)=>(o[s]=s,o),{}):t:i}set(t,r,i=this.getCurrentLang()){this.store.setTranslations(i,kb(this.store.getTranslations(i),t,Qa(r)?this.compiler.compile(r,i):this.compiler.compileTranslations(r,i)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();var Ja=(()=>{class e{translate=$(Fo);_ref=$(gi);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,r,i){let o=s=>{this.value=s!==void 0?s:t,this.lastKey=t,this._ref.markForCheck()};if(i){let s=this.translate.getParsedResult(t,r);Mn(s)?s.subscribe(o):o(s)}this.translate.get(t,r).subscribe(o)}transform(t,...r){if(!t||!t.length)return t;if(Ka(t,this.lastKey)&&Ka(r,this.lastParams))return this.value;let i;if(Yn(r[0])&&r.length)if(Qa(r[0])&&r[0].length){let o=r[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{i=JSON.parse(o)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${r[0]}`)}}else In(r[0])&&(i=r[0]);return this.lastKey=t,this.lastParams=r,this.updateValue(t,i),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(o=>{(this.lastKey&&o.lang===this.translate.getCurrentLang()||o.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,i,o.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(o=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i,o.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(r){return new(r||e)};static \u0275pipe=Na({name:"translate",type:e,pure:!1});static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();function Lb(e){return{provide:on,useClass:e}}function Vb(e){return{provide:wi,useClass:e}}function jb(e){return{provide:Ci,useClass:e}}function Bb(e){return{provide:ko,useClass:e}}function Gm(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(Ld),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let r={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:Vd,useValue:r}),t.push({provide:Fo,useClass:Fo,deps:[Ld,on,wi,Ci,ko,Vd]}),t}var bi=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[...Gm(X({compiler:Vb(Nb),parser:jb(Pb),loader:Lb(Rb),missingTranslationHandler:Bb(Ab)},t),!0)]}}static forChild(t={}){return{ngModule:e,providers:[...Gm(t,t.isolate??!1)]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=Vt({type:e});static \u0275inj=_t({})}return e})();var Bd=new ne("TRANSLATE_HTTP_LOADER_CONFIG"),Hd=(()=>{class e{http;config;constructor(){this.config=X({prefix:"/assets/i18n/",suffix:".json",enforceLoading:!1,useHttpBackend:!1},$(Bd)),this.http=this.config.useHttpBackend?new Di($(En)):$(Di)}getTranslation(t){let r=this.config.enforceLoading?`?enforceLoading=${Date.now()}`:"";return this.http.get(`${this.config.prefix}${t}${this.config.suffix}${r}`)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=he({token:e,factory:e.\u0275fac})}return e})();function Ym(e={}){let n=e.useHttpBackend??!1;return[{provide:Bd,useValue:e},{provide:on,useClass:Hd,deps:[n?En:Di,Bd]}]}var Km={providers:[hd({eventCoalescing:!0}),kd(Fd()),...Ym({prefix:"./assets/i18n/",suffix:".json"}),Ls(bi.forRoot({loader:{provide:on,useClass:Hd},defaultLanguage:"en"}))]};var Hb=["wrapper"],Ub=["sourceImage"];function zb(e,n){if(e&1){let t=ut();G(0,"img",5,0),ae("load",function(){K(t);let i=ee();return Q(i.imageLoadedInView())})("mousedown",function(i){K(t);let o=ee();return Q(o.startMove(i,o.moveTypes.Drag))})("touchstart",function(i){K(t);let o=ee();return Q(o.startMove(i,o.moveTypes.Drag))})("error",function(i){K(t);let o=ee();return Q(o.loadImageError(i))}),q()}if(e&2){let t=n.ngIf,r=ee();st("visibility",r.imageVisible?"visible":"hidden")("transform",r.safeTransformStyle()),xt("ngx-ic-draggable",!r.disabled&&r.allowMoveImage),xe("src",t,vo),pi("alt",r.imageAltText)}}function $b(e,n){if(e&1){let t=ut();Ra(0),G(1,"span",9),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"topleft"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"topleft"))}),qe(2,"span",10),q(),G(3,"span",11),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"topright"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"topright"))}),qe(4,"span",10),q(),G(5,"span",12),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottomright"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottomright"))}),qe(6,"span",10),q(),G(7,"span",13),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottomleft"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottomleft"))}),qe(8,"span",10),q(),G(9,"span",14),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"top"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"top"))}),q(),G(10,"span",15),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"top"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"top"))}),qe(11,"span",10),q(),G(12,"span",16),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"right"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"right"))}),q(),G(13,"span",17),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"right"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"right"))}),qe(14,"span",10),q(),G(15,"span",18),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottom"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottom"))}),q(),G(16,"span",19),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottom"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"bottom"))}),qe(17,"span",10),q(),G(18,"span",20),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"left"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"left"))}),q(),G(19,"span",21),ae("mousedown",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"left"))})("touchstart",function(i){K(t);let o=ee(2);return Q(o.startMove(i,o.moveTypes.Resize,"left"))}),qe(20,"span",10),q(),Oa()}}function Wb(e,n){if(e&1){let t=ut();G(0,"div",6),ae("keydown",function(i){K(t);let o=ee();return Q(o.keyboardAccess(i))}),G(1,"div",7),ae("mousedown",function(i){K(t);let o=ee();return Q(o.startMove(i,o.moveTypes.Move))})("touchstart",function(i){K(t);let o=ee();return Q(o.startMove(i,o.moveTypes.Move))}),q(),fi(2,$b,21,0,"ng-container",8),q()}if(e&2){let t=ee();st("top",t.state.cropper().y1,"px")("left",t.state.cropper().x1,"px")("width",t.state.cropper().x2-t.state.cropper().x1,"px")("height",t.state.cropper().y2-t.state.cropper().y1,"px")("margin-left",t.state.options.alignImage==="center"?t.marginLeft:null)("visibility",t.imageVisible?"visible":"hidden"),xt("ngx-ic-round",t.state.options.roundCropper),pi("aria-label",t.state.options.cropperFrameAriaLabel),oe(2),xe("ngIf",!t.state.options.hideResizeSquares&&!(t.state.options.cropperStaticWidth&&t.state.options.cropperStaticHeight))}}function Po(e,n,t){return e=Gb(e,n),ec(e,n,t)}function Gb(e,n){let t=e.x2-e.x1,r=e.y2-e.y1,i=e.x1+t/2,o=e.y1+r/2;n.options.cropperStaticHeight&&n.options.cropperStaticWidth?(t=n.maxSize().width>n.options.cropperStaticWidth?n.options.cropperStaticWidth:n.maxSize().width,r=n.maxSize().height>n.options.cropperStaticHeight?n.options.cropperStaticHeight:n.maxSize().height):(t=Math.max(n.cropperScaledMinWidth,Math.min(t,n.cropperScaledMaxWidth,n.maxSize().width)),r=Math.max(n.cropperScaledMinHeight,Math.min(r,n.cropperScaledMaxHeight,n.maxSize().height)),n.options.maintainAspectRatio&&(n.maxSize().width/n.options.aspectRation.maxSize().width&&(e=_e(X({},e),{x1:e.x1-(t?e.x2-n.maxSize().width:0),x2:n.maxSize().width})),e.y2>n.maxSize().height&&(e=_e(X({},e),{y1:e.y1-(t?e.y2-n.maxSize().height:0),y2:n.maxSize().height})),e}function qb(e,n){let t=tc(e)-n.clientX,r=nc(e)-n.clientY;return{x1:n.cropper.x1+t,y1:n.cropper.y1+r,x2:n.cropper.x2+t,y2:n.cropper.y2+r}}function Qm(e,n,t){let r=X({},t.cropper()),i=tc(e)-n.clientX,o=nc(e)-n.clientY;switch(n.position){case"left":r.x1=Math.min(Math.max(n.cropper.x1+i,r.x2-t.cropperScaledMaxWidth),r.x2-t.cropperScaledMinWidth);break;case"topleft":r.x1=Math.min(Math.max(n.cropper.x1+i,r.x2-t.cropperScaledMaxWidth),r.x2-t.cropperScaledMinWidth),r.y1=Math.min(Math.max(n.cropper.y1+o,r.y2-t.cropperScaledMaxHeight),r.y2-t.cropperScaledMinHeight);break;case"top":r.y1=Math.min(Math.max(n.cropper.y1+o,r.y2-t.cropperScaledMaxHeight),r.y2-t.cropperScaledMinHeight);break;case"topright":r.x2=Math.max(Math.min(n.cropper.x2+i,r.x1+t.cropperScaledMaxWidth),r.x1+t.cropperScaledMinWidth),r.y1=Math.min(Math.max(n.cropper.y1+o,r.y2-t.cropperScaledMaxHeight),r.y2-t.cropperScaledMinHeight);break;case"right":r.x2=Math.max(Math.min(n.cropper.x2+i,r.x1+t.cropperScaledMaxWidth),r.x1+t.cropperScaledMinWidth);break;case"bottomright":r.x2=Math.max(Math.min(n.cropper.x2+i,r.x1+t.cropperScaledMaxWidth),r.x1+t.cropperScaledMinWidth),r.y2=Math.max(Math.min(n.cropper.y2+o,r.y1+t.cropperScaledMaxHeight),r.y1+t.cropperScaledMinHeight);break;case"bottom":r.y2=Math.max(Math.min(n.cropper.y2+o,r.y1+t.cropperScaledMaxHeight),r.y1+t.cropperScaledMinHeight);break;case"bottomleft":r.x1=Math.min(Math.max(n.cropper.x1+i,r.x2-t.cropperScaledMaxWidth),r.x2-t.cropperScaledMinWidth),r.y2=Math.max(Math.min(n.cropper.y2+o,r.y1+t.cropperScaledMaxHeight),r.y1+t.cropperScaledMinHeight);break;case"center":let s="scale"in e?e.scale:1,a=Math.min(Math.max(t.cropperScaledMinWidth,Math.abs(n.cropper.x2-n.cropper.x1)*s),t.cropperScaledMaxWidth),c=Math.min(Math.max(t.cropperScaledMinHeight,Math.abs(n.cropper.y2-n.cropper.y1)*s),t.cropperScaledMaxHeight);r.x1=n.clientX-a/2,r.x2=n.clientX+a/2,r.y1=n.clientY-c/2,r.y2=n.clientY+c/2,r.x1<0?(r.x2-=r.x1,r.x1=0):r.x2>t.maxSize().width&&(r.x1-=r.x2-t.maxSize().width,r.x2=t.maxSize().width),r.y1<0?(r.y2-=r.y1,r.y1=0):r.y2>t.maxSize().height&&(r.y1-=r.y2-t.maxSize().height,r.y2=t.maxSize().height);break}return t.options.maintainAspectRatio?Zb(n.position,r,t):r}function Zb(e,n,t){n=X({},n);let r=0,i=0;switch(e){case"top":n.x2=n.x1+(n.y2-n.y1)*t.options.aspectRatio,r=Math.max(n.x2-t.maxSize().width,0),i=Math.max(0-n.y1,0),(r>0||i>0)&&(n.x2-=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y1+=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"bottom":n.x2=n.x1+(n.y2-n.y1)*t.options.aspectRatio,r=Math.max(n.x2-t.maxSize().width,0),i=Math.max(n.y2-t.maxSize().height,0),(r>0||i>0)&&(n.x2-=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y2-=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"topleft":n.y1=n.y2-(n.x2-n.x1)/t.options.aspectRatio,r=Math.max(0-n.x1,0),i=Math.max(0-n.y1,0),(r>0||i>0)&&(n.x1+=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y1+=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"topright":n.y1=n.y2-(n.x2-n.x1)/t.options.aspectRatio,r=Math.max(n.x2-t.maxSize().width,0),i=Math.max(0-n.y1,0),(r>0||i>0)&&(n.x2-=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y1+=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"right":case"bottomright":n.y2=n.y1+(n.x2-n.x1)/t.options.aspectRatio,r=Math.max(n.x2-t.maxSize().width,0),i=Math.max(n.y2-t.maxSize().height,0),(r>0||i>0)&&(n.x2-=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y2-=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"left":case"bottomleft":n.y2=n.y1+(n.x2-n.x1)/t.options.aspectRatio,r=Math.max(0-n.x1,0),i=Math.max(n.y2-t.maxSize().height,0),(r>0||i>0)&&(n.x1+=i*t.options.aspectRatio>r?i*t.options.aspectRatio:r,n.y2-=i*t.options.aspectRatio>r?i:r/t.options.aspectRatio);break;case"center":n.x2=n.x1+(n.y2-n.y1)*t.options.aspectRatio,n.y2=n.y1+(n.x2-n.x1)/t.options.aspectRatio;let o=Math.max(0-n.x1,0),s=Math.max(n.x2-t.maxSize().width,0),a=Math.max(n.y2-t.maxSize().height,0),c=Math.max(0-n.y1,0);(o>0||s>0||a>0||c>0)&&(n.x1+=a*t.options.aspectRatio>o?a*t.options.aspectRatio:o,n.x2-=c*t.options.aspectRatio>s?c*t.options.aspectRatio:s,n.y1+=c*t.options.aspectRatio>s?c:s/t.options.aspectRatio,n.y2-=a*t.options.aspectRatio>o?a:o/t.options.aspectRatio);break}return n}function tc(e){return"touches"in e&&e.touches[0]?e.touches[0].clientX:"clientX"in e?e.clientX:0}function nc(e){return"touches"in e&&e.touches[0]?e.touches[0].clientY:"clientX"in e?e.clientY:0}var Ud=class{constructor(){this.cropper=De({x1:0,x2:0,y1:0,y2:0}),this.maxSize=De({width:0,height:0}),this.transform={},this.options={format:"png",output:"blob",autoCrop:!0,maintainAspectRatio:!0,aspectRatio:1,resetCropOnAspectRatioChange:!0,resizeToWidth:0,resizeToHeight:0,cropperMinWidth:0,cropperMinHeight:0,cropperMaxHeight:0,cropperMaxWidth:0,cropperStaticWidth:0,cropperStaticHeight:0,canvasRotation:0,roundCropper:!1,onlyScaleDown:!1,imageQuality:92,backgroundColor:void 0,containWithinAspectRatio:!1,hideResizeSquares:!1,alignImage:"center",cropperFrameAriaLabel:void 0,checkImageType:!0},this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=3}setOptionsFromChanges(n){n.options?.currentValue&&this.setOptions(n.options.currentValue);let t=Object.entries(n).filter(([r])=>r in this.options).reduce((r,[i,o])=>_e(X({},r),{[i]:o.currentValue}),{});Object.keys(t).length>0&&this.setOptions(t)}setOptions(n){if(this.options=X(X({},this.options),n||{}),this.validateOptions(),!this.loadedImage?.transformed.image.complete||!this.maxSize)return;let t=!1;this.options.maintainAspectRatio&&n.aspectRatio||"maintainAspectRatio"in n?(this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.options.maintainAspectRatio&&(this.options.resetCropOnAspectRatioChange||!this.aspectRatioIsCorrect())&&(this.cropper.set(this.maxSizeCropperPosition()),t=!0)):((n.cropperMinWidth||n.cropperMinHeight)&&(this.setCropperScaledMinSize(),t=!0),(n.cropperMaxWidth||n.cropperMaxHeight)&&(this.setCropperScaledMaxSize(),t=!0),(n.cropperStaticWidth||n.cropperStaticHeight)&&(t=!0)),t&&this.cropper.update(r=>Po(r,this,!1))}validateOptions(){if(this.options.maintainAspectRatio&&!this.options.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}setMaxSize(n,t){this.maxSize.set({width:n,height:t}),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize()}setCropperScaledMinSize(){this.loadedImage?.transformed.size?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.cropperScaledMinWidth=this.options.cropperMinWidth>0?Math.max(20,this.options.cropperMinWidth/this.loadedImage.transformed.size.width*this.maxSize().width):20}setCropperScaledMinHeight(){this.options.maintainAspectRatio?this.cropperScaledMinHeight=Math.max(20,this.cropperScaledMinWidth/this.options.aspectRatio):this.options.cropperMinHeight>0?this.cropperScaledMinHeight=Math.max(20,this.options.cropperMinHeight/this.loadedImage.transformed.size.height*this.maxSize().height):this.cropperScaledMinHeight=20}setCropperScaledMaxSize(){if(this.loadedImage?.transformed.size){let n=this.loadedImage.transformed.size.width/this.maxSize().width;this.cropperScaledMaxWidth=this.options.cropperMaxWidth>20?this.options.cropperMaxWidth/n:this.maxSize().width,this.cropperScaledMaxHeight=this.options.cropperMaxHeight>20?this.options.cropperMaxHeight/n:this.maxSize().height,this.options.maintainAspectRatio&&(this.cropperScaledMaxWidth>this.cropperScaledMaxHeight*this.options.aspectRatio?this.cropperScaledMaxWidth=this.cropperScaledMaxHeight*this.options.aspectRatio:this.cropperScaledMaxWidth({x1:t.x1*this.maxSize().width/n.width,x2:t.x2*this.maxSize().width/n.width,y1:t.y1*this.maxSize().height/n.height,y2:t.y2*this.maxSize().height/n.height}))}maxSizeCropperPosition(){return{x1:0,y1:0,x2:this.maxSize().width,y2:this.maxSize().height}}toCropInput(){return{cropper:this.cropper(),maxSize:this.maxSize(),transform:this.transform,loadedImage:this.loadedImage,options:X({},this.options)}}},mt=(function(e){return e.Drag="drag",e.Move="move",e.Resize="resize",e.Pinch="pinch",e})(mt||{});function Yb(e,n,t){let r=e.width,i=e.height;n=Math.round(n),t=Math.round(t);let o=r/n,s=i/t,a=Math.ceil(o/2),c=Math.ceil(s/2),l=e.getContext("2d");if(l){let f=l.getImageData(0,0,r,i),u=l.createImageData(n,t),p=f.data,d=u.data;for(let m=0;m=1)continue;b=2*T*T*T-3*T*T+1;let x=4*(H+k*r);j+=b*p[x+3],S+=b,p[x+3]<255&&(b=b*p[x+3]/250),A+=b*p[x],P+=b*p[x+1],N+=b*p[x+2],E+=b}}d[v]=A/E,d[v+1]=P/E,d[v+2]=N/E,d[v+3]=j/S}e.width=n,e.height=t,l.putImageData(u,0,0)}}function Xm(e,n){return e/100*n}var zd=class{crop(n,t){let r=this.getImagePosition(n),i=r.x2-r.x1,o=r.y2-r.y1,s=document.createElement("canvas");s.width=i,s.height=o;let a=s.getContext("2d");if(!a)return null;n.options?.backgroundColor!=null&&(a.fillStyle=n.options.backgroundColor,a.fillRect(0,0,i,o));let c=(n.transform?.scale||1)*(n.transform?.flipH?-1:1),l=(n.transform?.scale||1)*(n.transform?.flipV?-1:1),{translateH:f,translateV:u}=this.getCanvasTranslate(n),p=n.loadedImage.transformed;a.setTransform(c,0,0,l,p.size.width/2+f,p.size.height/2+u),a.translate(-r.x1/c,-r.y1/l),a.rotate((n.transform?.rotate||0)*Math.PI/180),a.drawImage(p.image,-p.size.width/2,-p.size.height/2);let d={width:i,height:o,imagePosition:r,cropperPosition:X({},n.cropper)};n.options?.containWithinAspectRatio&&(d.offsetImagePosition=this.getOffsetImagePosition(n));let m=this.getResizeRatio(i,o,n.options);return m!==1&&(d.width=Math.round(i*m),d.height=n.options?.maintainAspectRatio?Math.round(d.width/(n.options?.aspectRatio??1)):Math.round(o*m),Yb(s,d.width,d.height)),t==="blob"?this.cropToBlob(d,s,n):(d.base64=s.toDataURL("image/"+(n.options?.format??"png"),this.getQuality(n.options)),d)}cropToBlob(n,t,r){return Be(this,null,function*(){return n.blob=yield new Promise(i=>t.toBlob(i,"image/"+(r.options?.format??"png"),this.getQuality(r.options))),n.blob&&(n.objectUrl=URL.createObjectURL(n.blob)),n})}getCanvasTranslate(n){if(n.transform?.translateUnit==="px"){let t=this.getRatio(n);return{translateH:(n.transform?.translateH||0)*t,translateV:(n.transform?.translateV||0)*t}}else return{translateH:n.transform?.translateH?Xm(n.transform.translateH,n.loadedImage.transformed.size.width):0,translateV:n.transform?.translateV?Xm(n.transform.translateV,n.loadedImage.transformed.size.height):0}}getRatio(n){return n.loadedImage.transformed.size.width/n.maxSize.width}getImagePosition(n){let t=this.getRatio(n),r={x1:Math.round(n.cropper.x1*t),y1:Math.round(n.cropper.y1*t),x2:Math.round(n.cropper.x2*t),y2:Math.round(n.cropper.y2*t)};return n.options?.containWithinAspectRatio||(r.x1=Math.max(r.x1,0),r.y1=Math.max(r.y1,0),r.x2=Math.min(r.x2,n.loadedImage.transformed.size.width),r.y2=Math.min(r.y2,n.loadedImage.transformed.size.height)),r}getOffsetImagePosition(n){let t=(n.options?.canvasRotation??0)+n.loadedImage.exifTransform.rotate,r=this.getRatio(n),i,o;t%2?(i=(n.loadedImage.transformed.size.width-n.loadedImage.original.size.height)/2,o=(n.loadedImage.transformed.size.height-n.loadedImage.original.size.width)/2):(i=(n.loadedImage.transformed.size.width-n.loadedImage.original.size.width)/2,o=(n.loadedImage.transformed.size.height-n.loadedImage.original.size.height)/2);let s=n.cropper,a={x1:Math.round(s.x1*r)-i,y1:Math.round(s.y1*r)-o,x2:Math.round(s.x2*r)-i,y2:Math.round(s.y2*r)-o};return n.options?.containWithinAspectRatio||(a.x1=Math.max(a.x1,0),a.y1=Math.max(a.y1,0),a.x2=Math.min(a.x2,n.loadedImage.transformed.size.width),a.y2=Math.min(a.y2,n.loadedImage.transformed.size.height)),a}getResizeRatio(n,t,r){let i=new Array;r?.resizeToWidth&&r.resizeToWidth>0&&i.push(r.resizeToWidth/n),r?.resizeToHeight&&r.resizeToHeight>0&&i.push(r.resizeToHeight/t);let o=i.length===0?1:Math.min(...i);return o>1&&!r?.onlyScaleDown?o:Math.min(o,1)}getQuality(n){return Math.min(1,Math.max(0,(n?.imageQuality??92)/100))}},Kb=[new Uint8Array([255,216,255,225,0,34,69,120,105,102,0,0,77,77,0,42,0,0,0,8,0,1,1,18,0,3,0,0,0,1,0,6,0,0,0,0,0,0,255,219,0,132,0,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,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,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,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,1,255,192,0,17,8,0,1,0,2,3,1,17,0,2,17,1,3,17,1,255,196,0,74,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,218,0,12,3,1,0,2,17,3,17,0,63,0,63,240,127,255,217])],Qb=URL.createObjectURL(new Blob(Kb,{type:"image/jpeg"}));function Xb(){return new Promise(e=>{let n=new Image;n.onload=()=>{let t=n.width===1&&n.height===2;e(t)},n.src=Qb})}function Jb(e){switch(typeof e=="object"&&(e=eE(e)),e){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}function eE(e){let n=new DataView(e);if(n.getUint16(0,!1)!==65496)return-2;let t=n.byteLength,r=2;for(;rBe(this,null,function*(){try{let a=new Blob([n],r?{type:r}:void 0),c=URL.createObjectURL(a),l=new Image,u=r==="image/svg+xml"?yield this.getSvgImageSize(a):void 0;l.onload=()=>o({originalImage:l,originalImageSize:u,originalObjectUrl:c,originalArrayBuffer:n}),l.onerror=s,l.src=c}catch(a){s(a)}}));return yield this.transformImageFromArrayBuffer(i,t,i.originalImageSize!=null)})}getSvgImageSize(n){return Be(this,null,function*(){let i=new DOMParser().parseFromString(yield n.text(),"image/svg+xml").querySelector("svg");if(!i)throw Error("Failed to parse SVG image");let o=i.getAttribute("width"),s=i.getAttribute("height");if(o&&s)return null;let a=i.getAttribute("viewBox")||i.getAttribute("viewbox");if(a){let c=a.split(" ");return{width:+c[2],height:+c[3]}}throw Error("Failed to load SVG image. SVG must have width + height or viewBox definition.")})}transformImageFromArrayBuffer(n,t,r=!1){return Be(this,null,function*(){let i=yield this.autoRotateSupported,o=Jb(i?-1:n.originalArrayBuffer);if(!n.originalImage||!n.originalImage.complete)return Promise.reject(new Error("No image loaded"));let s={original:{objectUrl:n.originalObjectUrl,image:n.originalImage,size:n.originalImageSize??{width:n.originalImage.naturalWidth,height:n.originalImage.naturalHeight}},exifTransform:o};return this.transformLoadedImage(s,t,r)})}transformLoadedImage(n,t,r=!1){return Be(this,null,function*(){let i=(t.canvasRotation??0)+n.exifTransform.rotate,o=n.original.size;if(!r&&i===0&&!n.exifTransform.flip&&!t.containWithinAspectRatio)return{original:{objectUrl:n.original.objectUrl,image:n.original.image,size:X({},o)},transformed:{objectUrl:n.original.objectUrl,image:n.original.image,size:X({},o)},exifTransform:n.exifTransform};let s=this.getTransformedSize(o,n.exifTransform,t),a=document.createElement("canvas");a.width=s.width,a.height=s.height;let c=a.getContext("2d");c?.setTransform(n.exifTransform.flip?-1:1,0,0,1,a.width/2,a.height/2),c?.rotate(Math.PI*(i/2)),c?.drawImage(n.original.image,-o.width/2,-o.height/2);let l=yield new Promise(p=>a.toBlob(p,"image/"+(t.format??"png")));if(!l)throw new Error("Failed to get Blob for transformed image.");let f=URL.createObjectURL(l),u=yield this.loadImageFromObjectUrl(f);return{original:{objectUrl:n.original.objectUrl,image:n.original.image,size:X({},o)},transformed:{objectUrl:f,image:u,size:{width:u.width,height:u.height}},exifTransform:n.exifTransform}})}loadImageFromObjectUrl(n){return new Promise((t,r)=>{let i=new Image;i.onload=()=>t(i),i.onerror=r,i.src=n})}getTransformedSize(n,t,r){let i=(r.canvasRotation??0)+t.rotate;if(r.containWithinAspectRatio)if(i%2){let o=n.width*(r.aspectRatio??1),s=n.height/(r.aspectRatio??1);return{width:Math.max(n.height,o),height:Math.max(n.width,s)}}else{let o=n.height*(r.aspectRatio??1),s=n.width/(r.aspectRatio??1);return{width:Math.max(n.width,o),height:Math.max(n.height,s)}}return i%2?{height:n.width,width:n.height}:{width:n.width,height:n.height}}};function tE(e){switch(e){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}function nE(e){switch(e){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}function rE(e,n){switch(e){case"ArrowUp":return{clientX:0,clientY:n*-1};case"ArrowRight":return{clientX:n,clientY:0};case"ArrowDown":return{clientX:0,clientY:n};case"ArrowLeft":default:return{clientX:n*-1,clientY:0}}}var Wd=(()=>{let n=class n{get alignImageStyle(){return this.state.options.alignImage}constructor(r){this.sanitizer=r,this.pinchStart$=new Ue,this.cropService=new zd,this.loadImageService=new $d,this.setImageMaxSizeRetries=0,this.resizedWhileHidden=!1,this.moveTypes=mt,this.state=new Ud,this.safeImgDataUrl=De(void 0),this.safeTransformStyle=De(void 0),this.marginLeft="0px",this.imageVisible=!1,this.allowMoveImage=!1,this.checkImageType=!0,this.disabled=!1,this.hidden=!1,this.imageCropped=Ut(),this.startCropImage=Ut(),this.imageLoaded=Ut(),this.cropperReady=Ut(),this.loadImageFailed=Ut(),this.transformChange=Ut(),this.cropperChange=Ut(),this.reset()}ngOnInit(){this.state.stepSize=this.initialStepSize||this.state.stepSize}ngOnChanges(r){let i=this.state.cropper(),o=this.state.transform,s=this.state.options.backgroundColor;if(this.state.setOptionsFromChanges(r),this.onChangesInputImage(r),r.transform&&this.transform&&(this.state.transform=this.transform,this.setCssTransform()),!this.state.loadedImage?.transformed.image.complete||!this.state.maxSize)return;if(this.containWithinAspectRatio&&r.aspectRatio||r.containWithinAspectRatio||r.canvasRotation){this.loadImageService.transformLoadedImage(this.state.loadedImage,this.state.options).then(c=>this.setLoadedImage(c)).catch(c=>this.loadImageError(c));return}r.cropper&&this.cropper&&this.state.cropper.set(Po(this.cropper,this.state,!0));let a=!this.state.equalsCropperPosition(i);a&&(!this.cropper||!this.state.equalsCropperPosition(this.cropper))&&this.cropperChange.emit(this.state.cropper()),(a||!this.state.equalsTransform(o)||this.state.options.backgroundColor!==s)&&this.doAutoCrop(),r.hidden&&this.resizedWhileHidden&&!this.hidden&&setTimeout(()=>{this.onResize(),this.resizedWhileHidden=!1})}onChangesInputImage(r){(r.imageChangedEvent||r.imageURL||r.imageBase64||r.imageFile)&&this.reset(),r.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),r.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),r.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),r.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){let r=this.imageChangedEvent?.target?.files;return r instanceof FileList&&r.length>0}reset(){this.state.loadedImage=void 0,this.state.maxSize.set({width:0,height:0}),this.imageVisible=!1}loadImageFile(r){this.loadImageService.loadImageFile(r,this.state.options).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadBase64Image(r){this.loadImageService.loadBase64Image(r,this.state.options).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadImageFromURL(r){this.loadImageService.loadImageFromURL(r,this.state.options).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}setLoadedImage(r){this.state.loadedImage=r,this.safeImgDataUrl.set(this.sanitizer.bypassSecurityTrustResourceUrl(r.transformed.objectUrl))}loadImageError(r){console.error(r),this.loadImageFailed.emit()}setCssTransform(){let r=this.state.transform?.translateUnit||"%";this.safeTransformStyle.set(this.sanitizer.bypassSecurityTrustStyle(`translate(${this.state.transform.translateH||0}${r}, ${this.state.transform.translateV||0}${r}) scaleX(`+(this.state.transform.scale||1)*(this.state.transform.flipH?-1:1)+") scaleY("+(this.state.transform.scale||1)*(this.state.transform.flipV?-1:1)+") rotate("+(this.state.transform.rotate||0)+"deg)"))}imageLoadedInView(){this.state.loadedImage!=null&&(this.imageLoaded.emit(this.state.loadedImage),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.cropper&&(!this.maintainAspectRatio||this.state.aspectRatioIsCorrect())?(this.state.cropper.set(Po(this.cropper,this.state,!0)),this.emitCropperPositionChange(this.cropper)):(this.state.cropper.set(Po(this.state.maxSizeCropperPosition(),this.state,!0)),this.cropperChange.emit(this.state.cropper())),this.imageVisible=!0,this.cropperReady.emit(this.state.maxSize()),this.doAutoCrop()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){return this.sourceImage?.nativeElement?.offsetWidth>1}onResize(){if(this.state.loadedImage)if(this.hidden)this.resizedWhileHidden=!0;else{let r=this.state.maxSize();this.setMaxSize(),this.state.resizeCropperPosition(r)}}keyboardAccess(r){this.changeKeyboardStepSize(r),this.keyboardMoveCropper(r)}changeKeyboardStepSize(r){let i=+r.key;i>=1&&i<=9&&(this.state.stepSize=i)}keyboardMoveCropper(r){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(r.key))return;let o=r.shiftKey?mt.Resize:mt.Move,s=r.altKey?nE(r.key):tE(r.key),a=rE(r.key,this.state.stepSize);r.preventDefault(),r.stopPropagation(),this.moveStart={type:o,position:s,clientX:0,clientY:0,transform:this.state.transform,cropper:this.state.cropper()},this.handleMouseMove(a),this.handleMouseUp()}startMove(r,i,o=null){this.disabled||this.moveStart&&this.moveStart.type===mt.Pinch||i===mt.Drag&&!this.allowMoveImage||("preventDefault"in r&&r.preventDefault(),this.moveStart={type:i,position:o,clientX:tc(r),clientY:nc(r),transform:this.state.transform,cropper:this.state.cropper()},this.initMouseMove())}initMouseMove(){Is(Gt(document,"mousemove"),Gt(document,"touchmove")).pipe(xs(Is(Gt(document,"mouseup"),Gt(document,"touchend"),this.pinchStart$).pipe(Rc()))).subscribe({next:r=>this.handleMouseMove(r),complete:()=>this.handleMouseUp()})}handleMouseMove(r){if(this.moveStart){if("stopPropagation"in r&&r.stopPropagation(),"preventDefault"in r&&r.preventDefault(),this.moveStart.type===mt.Move)this.state.cropper.set(ec(qb(r,this.moveStart),this.state,!0));else if(this.moveStart.type===mt.Resize)!this.cropperStaticWidth&&!this.cropperStaticHeight&&this.state.cropper.set(ec(Qm(r,this.moveStart,this.state),this.state,!1));else if(this.moveStart.type===mt.Drag){let i=tc(r)-this.moveStart.clientX,o=nc(r)-this.moveStart.clientY;this.state.transform=_e(X({},this.state.transform),{translateH:(this.moveStart.transform?.translateH||0)+i,translateV:(this.moveStart.transform?.translateV||0)+o}),this.setCssTransform()}}}handleMouseUp(){!this.moveStart||this.moveStart.type===mt.Pinch||((!this.state.equalsCropperPosition(this.moveStart.cropper)||this.moveStart.transform&&!this.state.equalsTransform(this.moveStart.transform))&&(this.moveStart.type===mt.Drag?this.transformChange.emit(this.state.transform):this.cropperChange.emit(this.state.cropper()),this.doAutoCrop()),this.moveStart=void 0)}startPinch(r){if(this.disabled||!this.sourceImageLoaded()||r.touches.length<2)return;"preventDefault"in r&&r.preventDefault();let i=this.state.cropper();this.moveStart={type:mt.Pinch,position:"center",clientX:i.x1+(i.x2-i.x1)/2,clientY:i.y1+(i.y2-i.y1)/2,cropper:i},this.initPinch()}initPinch(){this.pinchStart$.next(),Gt(document,"touchmove").pipe(xs(Gt(document,"touchend"))).subscribe({next:r=>this.handlePinchMove(r),complete:()=>this.handlePinchStop()})}handlePinchMove(r){this.moveStart&&(r.preventDefault&&r.preventDefault(),this.moveStart.type===mt.Pinch&&!this.cropperStaticWidth&&!this.cropperStaticHeight&&this.state.cropper.set(ec(Qm(r,this.moveStart,this.state),this.state,!1)))}handlePinchStop(){this.moveStart&&(this.state.equalsCropperPosition(this.moveStart.cropper)||(this.emitCropperPositionChange(this.moveStart.cropper),this.doAutoCrop()),this.moveStart=void 0)}setMaxSize(){if(this.sourceImage){let r=getComputedStyle(this.sourceImage.nativeElement);this.state.setMaxSize(parseFloat(r.width),parseFloat(r.height)),this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.state.maxSize().width/2+"px)")}}emitCropperPositionChange(r){this.state.equalsCropperPosition(r)||this.cropperChange.emit(this.state.cropper())}doAutoCrop(){this.state.options.autoCrop&&this.crop()}crop(r=this.state.options.output){if(this.state.loadedImage?.transformed?.image!=null){if(this.startCropImage.emit(),r==="blob")return this.cropToBlob();if(r==="base64")return this.cropToBase64()}return null}cropToBlob(){return new Promise((r,i)=>Be(this,null,function*(){let o=yield this.cropService.crop(this.state.toCropInput(),"blob");o?(this.imageCropped.emit(o),r(o)):i("Crop image failed")}))}cropToBase64(){let r=this.cropService.crop(this.state.toCropInput(),"base64");return r?(this.imageCropped.emit(r),r):null}resetCropperPosition(){this.state.cropper.set(Po(this.state.maxSizeCropperPosition(),this.state,!0)),this.cropperChange.emit(this.state.cropper())}ngOnDestroy(){this.pinchStart$.complete()}};n.\u0275fac=function(i){return new(i||n)(Me(Pd))},n.\u0275cmp=_n({type:n,selectors:[["image-cropper"]],viewQuery:function(i,o){if(i&1&&(Er(Hb,7),Er(Ub,5)),i&2){let s;Ir(s=Mr())&&(o.wrapper=s.first),Ir(s=Mr())&&(o.sourceImage=s.first)}},hostVars:6,hostBindings:function(i,o){i&1&&ae("resize",function(){return o.onResize()},zn),i&2&&(st("text-align",o.alignImageStyle),xt("disabled",o.disabled)("ngx-ic-hidden",o.hidden))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",imageAltText:"imageAltText",options:"options",cropperFrameAriaLabel:"cropperFrameAriaLabel",output:"output",format:"format",autoCrop:"autoCrop",cropper:"cropper",transform:"transform",maintainAspectRatio:"maintainAspectRatio",aspectRatio:"aspectRatio",resetCropOnAspectRatioChange:"resetCropOnAspectRatioChange",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperMaxHeight:"cropperMaxHeight",cropperMaxWidth:"cropperMaxWidth",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",backgroundColor:"backgroundColor",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",allowMoveImage:"allowMoveImage",checkImageType:"checkImageType",alignImage:"alignImage",disabled:"disabled",hidden:"hidden"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed",transformChange:"transformChange",cropperChange:"cropperChange"},features:[li],decls:4,vars:10,consts:[["sourceImage",""],[3,"touchstart"],["class","ngx-ic-source-image","role","presentation",3,"src","visibility","transform","ngx-ic-draggable","load","mousedown","touchstart","error",4,"ngIf"],[1,"ngx-ic-overlay"],["class","ngx-ic-cropper","tabindex","0",3,"ngx-ic-round","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],["role","presentation",1,"ngx-ic-source-image",3,"load","mousedown","touchstart","error","src"],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],["role","presentation",1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-top",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left",3,"mousedown","touchstart"]],template:function(i,o){i&1&&(G(0,"div",1),ae("touchstart",function(a){return o.startPinch(a)}),fi(1,zb,2,8,"img",2),qe(2,"div",3),fi(3,Wb,3,16,"div",4),q()),i&2&&(st("background",o.imageVisible&&o.state.options.backgroundColor),oe(),xe("ngIf",o.safeImgDataUrl()),oe(),st("width",o.state.maxSize().width||0,"px")("height",o.state.maxSize().height||0,"px")("margin-left",o.state.options.alignImage==="center"?o.marginLeft:null),oe(),xe("ngIf",o.imageVisible))},dependencies:[vd],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.ngx-ic-source-image[_ngcontent-%COMP%]{display:inline;max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.ngx-ic-source-image.ngx-ic-draggable[_ngcontent-%COMP%]{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}[_nghost-%COMP%] .ngx-ic-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:var(--cropper-color, #53535C);background:transparent;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{outline-width:100vh}}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{width:100%;cursor:move;border:var(--cropper-border, 1px solid rgba(255, 255, 255, .5))}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:hover .ngx-ic-move[_ngcontent-%COMP%]{border:var(--cropper-hover-border, var(--cropper-border, 1px solid rgba(255, 255, 255, .5)))}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:focus .ngx-ic-move[_ngcontent-%COMP%]{border:var(--cropper-focus-border, 2px solid dodgerblue)}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:focus .ngx-ic-resize[_ngcontent-%COMP%] .ngx-ic-square[_ngcontent-%COMP%]{background:var(--cropper-resize-square-focus-bg, var(--cropper-resize-square-bg, #53535C));border:var(--cropper-resize-square-focus-border, var(--cropper-resize-square-border, 1px solid rgba(255, 255, 255, .5)))}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%] .ngx-ic-square[_ngcontent-%COMP%]{display:inline-block;width:6px;height:6px;box-sizing:content-box;background:var(--cropper-resize-square-bg, #53535C);border:var(--cropper-resize-square-border, 1px solid rgba(255, 255, 255, .5))}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%]:hover .ngx-ic-square[_ngcontent-%COMP%]{background:var(--cropper-resize-square-hover-bg, var(--cropper-resize-square-bg, #53535C));border:var(--cropper-resize-square-hover-border, var(--cropper-resize-square-border, 1px solid rgba(255, 255, 255, .5)))}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{display:none}.ngx-ic-hidden[_nghost-%COMP%]{display:none}'],changeDetection:0});let e=n;return e})();var ay=(()=>{class e{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,r){this._renderer=t,this._elementRef=r}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(r){return new(r||e)(Me(br),Me(It))};static \u0275dir=tt({type:e})}return e})(),Uo=(()=>{class e extends ay{static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275dir=tt({type:e,features:[jt]})}return e})(),Mi=new ne(""),iE={provide:Mi,useExisting:Rt(()=>Qd),multi:!0},Qd=(()=>{class e extends Uo{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275dir=tt({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(s){return i.onChange(s.target.checked)})("blur",function(){return i.onTouched()})},standalone:!1,features:[qn([iE]),jt]})}return e})(),oE={provide:Mi,useExisting:Rt(()=>xi),multi:!0};function sE(){let e=wn()?wn().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var aE=new ne(""),xi=(()=>{class e extends ay{_compositionMode;_composing=!1;constructor(t,r,i){super(t,r),this._compositionMode=i,this._compositionMode==null&&(this._compositionMode=!sE())}writeValue(t){let r=t??"";this.setProperty("value",r)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(r){return new(r||e)(Me(br),Me(It),Me(aE,8))};static \u0275dir=tt({type:e,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(r,i){r&1&&ae("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},standalone:!1,features:[qn([oE]),jt]})}return e})();var cE=new ne(""),lE=new ne("");function cy(e){return e!=null}function ly(e){return hi(e)?cn(e):e}function uy(e){let n={};return e.forEach(t=>{n=t!=null?X(X({},n),t):n}),Object.keys(n).length===0?null:n}function dy(e,n){return n.map(t=>t(e))}function uE(e){return!e.validate}function fy(e){return e.map(n=>uE(n)?n:t=>n.validate(t))}function dE(e){if(!e)return null;let n=e.filter(cy);return n.length==0?null:function(t){return uy(dy(t,n))}}function hy(e){return e!=null?dE(fy(e)):null}function fE(e){if(!e)return null;let n=e.filter(cy);return n.length==0?null:function(t){let r=dy(t,n).map(ly);return Li(r).pipe(Qe(uy))}}function py(e){return e!=null?fE(fy(e)):null}function Jm(e,n){return e===null?[n]:Array.isArray(e)?[...e,n]:[e,n]}function hE(e){return e._rawValidators}function pE(e){return e._rawAsyncValidators}function Gd(e){return e?Array.isArray(e)?e:[e]:[]}function ic(e,n){return Array.isArray(e)?e.includes(n):e===n}function ey(e,n){let t=Gd(n);return Gd(e).forEach(i=>{ic(t,i)||t.push(i)}),t}function ty(e,n){return Gd(n).filter(t=>!ic(e,t))}var oc=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=hy(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=py(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,t){return this.control?this.control.hasError(n,t):!1}getError(n,t){return this.control?this.control.getError(n,t):null}},qd=class extends oc{name;get formDirective(){return null}get path(){return null}},Ho=class extends oc{_parent=null;name=null;valueAccessor=null},Zd=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}},gE={"[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"},oB=_e(X({},gE),{"[class.ng-submitted]":"isSubmitted"}),ac=(()=>{class e extends Zd{constructor(t){super(t)}static \u0275fac=function(r){return new(r||e)(Me(Ho,2))};static \u0275dir=tt({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){r&2&&xt("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},standalone:!1,features:[jt]})}return e})();var Lo="VALID",rc="INVALID",Ei="PENDING",Vo="DISABLED",Sr=class{},sc=class extends Sr{value;source;constructor(n,t){super(),this.value=n,this.source=t}},jo=class extends Sr{pristine;source;constructor(n,t){super(),this.pristine=n,this.source=t}},Bo=class extends Sr{touched;source;constructor(n,t){super(),this.touched=n,this.source=t}},Ii=class extends Sr{status;source;constructor(n,t){super(),this.status=n,this.source=t}};var Yd=class extends Sr{source;constructor(n){super(),this.source=n}};function mE(e){return(cc(e)?e.validators:e)||null}function yE(e){return Array.isArray(e)?hy(e):e||null}function vE(e,n){return(cc(n)?n.asyncValidators:e)||null}function _E(e){return Array.isArray(e)?py(e):e||null}function cc(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}var Kd=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,t){this._assignValidators(n),this._assignAsyncValidators(t)}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 Dn(this.statusReactive)}set status(n){Dn(()=>this.statusReactive.set(n))}_status=Ye(()=>this.statusReactive());statusReactive=De(void 0);get valid(){return this.status===Lo}get invalid(){return this.status===rc}get pending(){return this.status==Ei}get disabled(){return this.status===Vo}get enabled(){return this.status!==Vo}errors;get pristine(){return Dn(this.pristineReactive)}set pristine(n){Dn(()=>this.pristineReactive.set(n))}_pristine=Ye(()=>this.pristineReactive());pristineReactive=De(!0);get dirty(){return!this.pristine}get touched(){return Dn(this.touchedReactive)}set touched(n){Dn(()=>this.touchedReactive.set(n))}_touched=Ye(()=>this.touchedReactive());touchedReactive=De(!1);get untouched(){return!this.touched}_events=new Ue;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(ey(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(ey(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(ty(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(ty(n,this._rawAsyncValidators))}hasValidator(n){return ic(this._rawValidators,n)}hasAsyncValidator(n){return ic(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let t=this.touched===!1;this.touched=!0;let r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsTouched(_e(X({},n),{sourceControl:r})),t&&n.emitEvent!==!1&&this._events.next(new Bo(!0,r))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(n))}markAsUntouched(n={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=n.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,r),t&&n.emitEvent!==!1&&this._events.next(new Bo(!1,r))}markAsDirty(n={}){let t=this.pristine===!0;this.pristine=!1;let r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsDirty(_e(X({},n),{sourceControl:r})),t&&n.emitEvent!==!1&&this._events.next(new jo(!1,r))}markAsPristine(n={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=n.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n,r),t&&n.emitEvent!==!1&&this._events.next(new jo(!0,r))}markAsPending(n={}){this.status=Ei;let t=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new Ii(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.markAsPending(_e(X({},n),{sourceControl:t}))}disable(n={}){let t=this._parentMarkedDirty(n.onlySelf);this.status=Vo,this.errors=null,this._forEachChild(i=>{i.disable(_e(X({},n),{onlySelf:!0}))}),this._updateValue();let r=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new sc(this.value,r)),this._events.next(new Ii(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(_e(X({},n),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){let t=this._parentMarkedDirty(n.onlySelf);this.status=Lo,this._forEachChild(r=>{r.enable(_e(X({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(_e(X({},n),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,t){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Lo||this.status===Ei)&&this._runAsyncValidator(r,n.emitEvent)}let t=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new sc(this.value,t)),this._events.next(new Ii(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(_e(X({},n),{sourceControl:t}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Vo:Lo}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,t){if(this.asyncValidator){this.status=Ei,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:n!==!1};let r=ly(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:t,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,t={}){this.errors=n,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(n){let t=n;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((r,i)=>r&&r._find(i),this)}getError(n,t){let r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,t,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new Ii(this.status,t)),this._parent&&this._parent._updateControlsErrors(n,t,r)}_initObservables(){this.valueChanges=new gt,this.statusChanges=new gt}_calculateStatus(){return this._allControlsDisabled()?Vo:this.errors?rc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ei)?Ei:this._anyControlsHaveStatus(rc)?rc:Lo}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,t){let r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,this._parent&&!n.onlySelf&&this._parent._updatePristine(n,t),i&&this._events.next(new jo(this.pristine,t))}_updateTouched(n={},t){this.touched=this._anyControlsTouched(),this._events.next(new Bo(this.touched,t)),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,t)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){cc(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){let t=this._parent&&this._parent.dirty;return!n&&!!t&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=yE(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=_E(this._rawAsyncValidators)}};var gy=new ne("",{providedIn:"root",factory:()=>Xd}),Xd="always";function DE(e,n){return[...n.path,e]}function wE(e,n,t=Xd){bE(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||t==="always")&&n.valueAccessor.setDisabledState?.(e.disabled),EE(e,n),ME(e,n),IE(e,n),CE(e,n)}function ny(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function CE(e,n){if(n.valueAccessor.setDisabledState){let t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}function bE(e,n){let t=hE(e);n.validator!==null?e.setValidators(Jm(t,n.validator)):typeof t=="function"&&e.setValidators([t]);let r=pE(e);n.asyncValidator!==null?e.setAsyncValidators(Jm(r,n.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let i=()=>e.updateValueAndValidity();ny(n._rawValidators,i),ny(n._rawAsyncValidators,i)}function EE(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&my(e,n)})}function IE(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&my(e,n),e.updateOn!=="submit"&&e.markAsTouched()})}function my(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function ME(e,n){let t=(r,i)=>{n.valueAccessor.writeValue(r),i&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}function xE(e,n){if(!e.hasOwnProperty("model"))return!1;let t=e.model;return t.isFirstChange()?!0:!Object.is(n,t.currentValue)}function TE(e){return Object.getPrototypeOf(e.constructor)===Uo}function SE(e,n){if(!n)return null;Array.isArray(n);let t,r,i;return n.forEach(o=>{o.constructor===xi?t=o:TE(o)?r=o:i=o}),i||r||t||null}function ry(e,n){let t=e.indexOf(n);t>-1&&e.splice(t,1)}function iy(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var AE=class extends Kd{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,t,r){super(mE(t),vE(r,t)),this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),cc(t)&&(t.nonNullable||t.initialValueIsDefault)&&(iy(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new Yd(this))}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){ry(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){ry(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){iy(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}};var NE={provide:Ho,useExisting:Rt(()=>zo)},oy=Promise.resolve(),zo=(()=>{class e extends Ho{_changeDetectorRef;callSetDisabledState;control=new AE;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new gt;constructor(t,r,i,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=SE(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),xE(t,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(t){this.viewModel=t,this.update.emit(t)}_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(){wE(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(t){oy.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let r=t.isDisabled.currentValue,i=r!==0&&Dm(r);oy.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?DE(t,this._parent):[t]}static \u0275fac=function(r){return new(r||e)(Me(qd,9),Me(cE,10),Me(lE,10),Me(Mi,10),Me(gi,8),Me(gy,8))};static \u0275dir=tt({type:e,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:[qn([NE]),jt,li]})}return e})();var RE={provide:Mi,useExisting:Rt(()=>Jd),multi:!0},Jd=(()=>{class e extends Uo{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=r=>{t(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275dir=tt({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(s){return i.onChange(s.target.value)})("input",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},standalone:!1,features:[qn([RE]),jt]})}return e})();var OE={provide:Mi,useExisting:Rt(()=>lc),multi:!0};function yy(e,n){return e==null?`${n}`:(n&&typeof n=="object"&&(n="Object"),`${e}: ${n}`.slice(0,50))}function kE(e){return e.split(":")[0]}var lc=(()=>{class e extends Uo{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=$(Wn).injector;destroyRef=$(Et);cdr=$(gi);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Uu({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let r=this._getOptionId(t),i=yy(r,t);this.setProperty("value",i)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){let r=kE(t);return this._optionMap.has(r)?this._optionMap.get(r):t}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275dir=tt({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){r&1&&ae("change",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[qn([OE]),jt]})}return e})(),vy=(()=>{class e{_element;_renderer;_select;id;constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(yy(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select&&this._select._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(r){return new(r||e)(Me(It),Me(br),Me(lc,9))};static \u0275dir=tt({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),FE={provide:Mi,useExisting:Rt(()=>_y),multi:!0};function sy(e,n){return e==null?`${n}`:(typeof n=="string"&&(n=`'${n}'`),n&&typeof n=="object"&&(n="Object"),`${e}: ${n}`.slice(0,50))}function PE(e){return e.split(":")[0]}var _y=(()=>{class e extends Uo{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let r;if(Array.isArray(t)){let i=t.map(o=>this._getOptionId(o));r=(o,s)=>{o._setSelected(i.indexOf(s.toString())>-1)}}else r=(i,o)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{let i=[],o=r.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a{let t;return function(i){return(t||(t=Lt(e)))(i||e)}})();static \u0275dir=tt({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(s){return i.onChange(s.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[qn([FE]),jt]})}return e})(),Dy=(()=>{class e{_element;_renderer;_select;id;_value;constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(sy(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(sy(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||e)(Me(It),Me(br),Me(_y,9))};static \u0275dir=tt({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();var LE=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=Vt({type:e});static \u0275inj=_t({})}return e})();var uc=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:gy,useValue:t.callSetDisabledState??Xd}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=Vt({type:e});static \u0275inj=_t({imports:[LE]})}return e})();var VE=[{width:128,height:896,ratio:.14,label:"1:7"},{width:192,height:832,ratio:.23,label:"3:13"},{width:256,height:768,ratio:.33,label:"1:3"},{width:320,height:704,ratio:.45,label:"5:11"},{width:384,height:640,ratio:.6,label:"3:5"},{width:448,height:576,ratio:.78,label:"7:9"},{width:512,height:512,ratio:1,label:"1:1"},{width:576,height:448,ratio:1.29,label:"9:7"},{width:640,height:384,ratio:1.67,label:"5:3"},{width:704,height:320,ratio:2.2,label:"11:5"},{width:768,height:256,ratio:3,label:"3:1"},{width:832,height:192,ratio:4.33,label:"13:3"},{width:896,height:128,ratio:7,label:"7:1"}],jE=[{width:256,height:1280,ratio:.2,label:"1:5"},{width:320,height:1216,ratio:.26,label:"5:19"},{width:384,height:1152,ratio:.33,label:"1:3"},{width:448,height:1088,ratio:.41,label:"7:17"},{width:512,height:1024,ratio:.5,label:"1:2"},{width:576,height:960,ratio:.6,label:"3:5"},{width:640,height:896,ratio:.71,label:"5:7"},{width:704,height:832,ratio:.85,label:"11:13"},{width:768,height:768,ratio:1,label:"1:1"},{width:832,height:704,ratio:1.18,label:"13:11"},{width:896,height:640,ratio:1.4,label:"7:5"},{width:960,height:576,ratio:1.67,label:"5:3"},{width:1024,height:512,ratio:2,label:"2:1"},{width:1088,height:448,ratio:2.43,label:"17:7"},{width:1152,height:384,ratio:3,label:"3:1"},{width:1216,height:320,ratio:3.8,label:"19:5"},{width:1280,height:256,ratio:5,label:"5:1"}],BE=[{width:256,height:1792,ratio:.14,label:"1:7"},{width:320,height:1728,ratio:.19,label:"5:27"},{width:384,height:1664,ratio:.23,label:"3:13"},{width:448,height:1600,ratio:.28,label:"7:25"},{width:512,height:1536,ratio:.33,label:"1:3"},{width:576,height:1472,ratio:.39,label:"9:23"},{width:640,height:1408,ratio:.45,label:"5:11"},{width:704,height:1344,ratio:.52,label:"11:21"},{width:768,height:1280,ratio:.6,label:"3:5"},{width:832,height:1216,ratio:.68,label:"13:19"},{width:896,height:1152,ratio:.78,label:"7:9"},{width:960,height:1088,ratio:.88,label:"15:17"},{width:1024,height:1024,ratio:1,label:"1:1"},{width:1088,height:960,ratio:1.13,label:"17:15"},{width:1152,height:896,ratio:1.29,label:"9:7"},{width:1216,height:832,ratio:1.46,label:"19:13"},{width:1280,height:768,ratio:1.67,label:"5:3"},{width:1344,height:704,ratio:1.91,label:"21:11"},{width:1408,height:640,ratio:2.2,label:"11:5"},{width:1472,height:576,ratio:2.56,label:"23:9"},{width:1536,height:512,ratio:3,label:"3:1"},{width:1600,height:448,ratio:3.57,label:"25:7"},{width:1664,height:384,ratio:4.33,label:"13:3"},{width:1728,height:320,ratio:5.4,label:"27:5"},{width:1792,height:256,ratio:7,label:"7:1"}],Cy={512:VE,768:jE,1024:BE};function by(e){let{width:n,height:t}=e,r=Math.min(n,t);if(n>=t){let o=(n-r)/2;return{x1:o,y1:0,x2:o+r,y2:r}}let i=(t-r)/2;return{x1:0,y1:i,x2:r,y2:i+r}}function Ey(e,n){return e.reduce((t,r)=>Math.abs(r.ratio-n)n.width){let A=E-n.width;_-=A,E=n.width}if(S>n.height){let A=S-n.height;b-=A,S=n.height}return _=Math.max(0,_),b=Math.max(0,b),E=Math.min(n.width,E),S=Math.min(n.height,S),{x1:_,y1:b,x2:E,y2:S}}var HE=["cropperWrapper"],UE=e=>({rotate:e}),zE=(e,n)=>({width:e,height:n});function $E(e,n){if(e&1&&(G(0,"span",4),pe(1),q()),e&2){let t=ee();oe(),ka(" (",t.baseImageNaturalSize().width,"x",t.baseImageNaturalSize().height,") ")}}function WE(e,n){if(e&1&&qe(0,"div",18),e&2){let t=ee();st("left",t.currentDrawingPos().x1{class e{image=Co.required();bucketSize=Co.required();allowNonSquare=Co.required();panelWidth=Co.required();remove=Ut();duplicate=Ut();cropper;cropperWrapper;math=Math;rotation=De(0);croppedEvent=De(null);cropperPosition=De(null);isDrawingNew=De(!1);manualAspectRatio=De(null);currentDrawingPos=De({x1:0,y1:0,x2:0,y2:0});isCtrlDown=De(!1);imageUrl=De("");isSettingPosition=!1;pendingCropperPosition=De(null);hasPendingCropper=Ye(()=>this.pendingCropperPosition()!==null);cropperReadySize=De(null);shouldApplyDefaultSelection=De(!0);baseImageNaturalSize=De(null);displayedImageRect=Ye(()=>{let t=this.baseImageNaturalSize(),r=this.panelWidth();if(!t||r<=0)return null;let i=Math.min(r/t.width,r/t.height),o=t.width*i,s=t.height*i,a=(r-o)/2,c=(r-s)/2;return{width:o,height:s,offsetX:a,offsetY:c}});currentBucketRatios=Ye(()=>Cy[this.bucketSize()]||[]);selectionSize=Ye(()=>{if(this.isDrawingNew()){let r=this.currentDrawingPos();return{width:Math.abs(r.x2-r.x1),height:Math.abs(r.y2-r.y1)}}let t=this.cropperPosition();return t?{width:Math.abs(t.x2-t.x1),height:Math.abs(t.y2-t.y1)}:null});closestRatio=Ye(()=>{let t=this.croppedEvent(),r=1,i=this.selectionSize();if(i&&i.height>0)r=i.width/i.height;else if(t?.imagePosition){let o=Math.abs(t.imagePosition.x2-t.imagePosition.x1),s=Math.abs(t.imagePosition.y2-t.imagePosition.y1);s>0&&(r=o/s)}return this.allowNonSquare()?this.currentBucketRatios().reduce((o,s)=>Math.abs(s.ratio-r)o.ratio===1)||this.currentBucketRatios()[0]});aspectRatio=Ye(()=>this.isDrawingNew()?0:this.allowNonSquare()?this.manualAspectRatio()||this.closestRatio().ratio:1);maintainAspectRatio=Ye(()=>!this.isDrawingNew()&&!this.isCtrlDown());isResolutionValid=Ye(()=>{let t=this.closestRatio(),r=this.baseImageNaturalSize(),i=this.cropperReadySize(),o=this.cropperPosition();if(!r||!i||!o)return!0;let s=r.width/i.width,a=r.height/i.height,c=Math.abs(o.x2-o.x1)*s,l=Math.abs(o.y2-o.y1)*a;return c>=t.width&&l>=t.height});willUpscale=Ye(()=>{let t=this.closestRatio(),r=this.baseImageNaturalSize(),i=this.cropperReadySize(),o=this.cropperPosition();if(!r||!i||!o)return!1;let s=r.width/i.width,a=r.height/i.height,c=Math.abs(o.x2-o.x1)*s,l=Math.abs(o.y2-o.y1)*a;return cthis.willUpscale());startX=0;startY=0;constructor(){La(t=>{let r=URL.createObjectURL(this.image().file);this.imageUrl.set(r),t(()=>URL.revokeObjectURL(r))}),La(()=>{this.image(),this.cropperReadySize.set(null),this.cropperPosition.set(null),this.manualAspectRatio.set(1),this.pendingCropperPosition.set(null),this.shouldApplyDefaultSelection.set(!0)})}onMouseMove(t){if(!this.isDrawingNew())return;let r=this.cropperWrapper.nativeElement.getBoundingClientRect(),i=Math.max(0,Math.min(r.width,t.clientX-r.left)),o=Math.max(0,Math.min(r.height,t.clientY-r.top));this.currentDrawingPos.set({x1:this.startX,y1:this.startY,x2:i,y2:o})}onMouseUp(){if(this.isDrawingNew()){let t=this.currentDrawingPos();this.isDrawingNew.set(!1);let r=this.cropperWrapper.nativeElement.getBoundingClientRect(),i=this.displayedImageRect();if(!i){console.warn("No base image size yet; cannot map selection. Try again after image loads."),this.cropperPosition.set(null),this.manualAspectRatio.set(null);return}let o=t.x2>=t.x1&&t.y2>=t.y1,s=o?t.x1:Math.min(t.x1,t.x2),a=o?t.y1:Math.min(t.y1,t.y2),c=o?t.x2:Math.max(t.x1,t.x2),l=o?t.y2:Math.max(t.y1,t.y2),f=Math.max(s,Math.min(r.width,c)),u=Math.max(a,Math.min(r.height,l)),p=j=>Math.max(0,Math.min(i.width,j-i.offsetX)),d=j=>Math.max(0,Math.min(i.height,j-i.offsetY)),m=p(s),y=d(a),v=p(f),_=d(u),b=Math.min(m,v),E=Math.min(y,_),S=Math.max(m,v),A=Math.max(y,_),P=S-b,N=A-E;if(P>2&&N>2){let j=P/N,J=this.currentBucketRatios().reduce((k,ce)=>Math.abs(ce.ratio-j)J.ratio?C=b+N*J.ratio:O=E+P/J.ratio,C=Math.max(b+2,Math.min(i.width,C)),O=Math.max(E+2,Math.min(i.height,O)),console.log(`Action: RELEASE (img-px). Ratio=${J.label}. TL=[${b.toFixed(1)},${E.toFixed(1)}] BR=[${C.toFixed(1)},${O.toFixed(1)}]`),console.log(`Action: WRAPPER TL=[${s.toFixed(1)},${a.toFixed(1)}] BR=[${f.toFixed(1)},${u.toFixed(1)}] | imgOffset=[${i.offsetX.toFixed(1)},${i.offsetY.toFixed(1)}] imgSize=[${i.width.toFixed(1)},${i.height.toFixed(1)}]`),this.isSettingPosition=!0,this.manualAspectRatio.set(J.ratio);let g={x1:b,y1:E,x2:C,y2:O};this.pendingCropperPosition.set(g),setTimeout(()=>{this.isSettingPosition=!1},200)}else this.cropperPosition.set(null),this.manualAspectRatio.set(null),this.pendingCropperPosition.set(null)}}onMouseDown(t){let r=t.target;if(t.button===2){console.log("Action: RIGHT CLICK -> Deselecting"),this.cropperPosition.set(null),this.manualAspectRatio.set(null),this.pendingCropperPosition.set(null),this.cropperReadySize.set(null);return}if(r.classList.contains("ngx-ic-handle")||r.classList.contains("ngx-ic-move")||r.closest(".ngx-ic-cropper"))return;let i=this.cropperWrapper.nativeElement.getBoundingClientRect();this.startX=Math.max(0,Math.min(i.width,t.clientX-i.left)),this.startY=Math.max(0,Math.min(i.height,t.clientY-i.top)),this.isDrawingNew.set(!0),this.isSettingPosition=!0,this.manualAspectRatio.set(null),this.cropperPosition.set(null),this.pendingCropperPosition.set(null),this.currentDrawingPos.set({x1:this.startX,y1:this.startY,x2:this.startX,y2:this.startY}),t.stopPropagation(),t.preventDefault()}onContextMenu(t){let r=this.cropperWrapper.nativeElement.getBoundingClientRect();t.clientX>=r.left&&t.clientX<=r.right&&t.clientY>=r.top&&t.clientY<=r.bottom&&t.preventDefault()}onImageCropped(t){this.croppedEvent.set(t)}onCropperReady(t){console.log("Library: Ready.",t),this.cropperReadySize.set(t),this.isSettingPosition=!0;let r=this.pendingCropperPosition();if(r){let i={x1:Math.max(0,Math.min(t.width,r.x1)),y1:Math.max(0,Math.min(t.height,r.y1)),x2:Math.max(0,Math.min(t.width,r.x2)),y2:Math.max(0,Math.min(t.height,r.y2))};this.applyCropperPosition(i),this.pendingCropperPosition.set(null),this.shouldApplyDefaultSelection.set(!1)}this.shouldApplyDefaultSelection()&&(this.manualAspectRatio.set(1),this.applyCropperPosition(by(t)),this.shouldApplyDefaultSelection.set(!1)),setTimeout(()=>{this.isSettingPosition=!1},250)}onCropperChange(t){this.isSettingPosition||this.isDrawingNew()||this.cropperPosition.set(t)}onKeyDown(t){t.key==="Control"&&this.isCtrlDown.set(!0)}onKeyUp(t){if(t.key!=="Control")return;this.isCtrlDown.set(!1);let r=this.cropperPosition(),i=this.cropperReadySize();if(!r||!i)return;let o=Math.abs(r.x2-r.x1),s=Math.abs(r.y2-r.y1);if(o<=0||s<=0)return;let a=1;this.allowNonSquare()?(a=Ey(this.currentBucketRatios(),o/s).ratio,this.manualAspectRatio.set(a)):this.manualAspectRatio.set(1);let c=Iy(r,i,a);this.applyCropperPosition(c)}onBaseImageLoaded(t){let r=t.target;r&&this.baseImageNaturalSize.set({width:r.naturalWidth,height:r.naturalHeight})}loadImageFailed(){console.error("Library: Load Failed")}rotateLeft(){this.rotation.update(t=>(t-90)%360)}rotateRight(){this.rotation.update(t=>(t+90)%360)}resetPosition(){this.rotation.set(0),this.manualAspectRatio.set(1);let t=this.panelWidth(),r={x1:t*.25,y1:t*.25,x2:t*.75,y2:t*.75};this.pendingCropperPosition.set(r)}getFileName(){let r=this.image().fileName.split(".");return r.length>1&&r.pop(),`${r.join(".")}_cropped.png`}getCroppedBlob(){return Be(this,null,function*(){if(!this.cropperPosition()||!this.cropper)return null;let t=yield this.cropper.crop("blob");if(!t?.blob)return null;let r=this.closestRatio();return yield this.resizeBlob(t.blob,r.width,r.height)})}applyCropperPosition(t){this.isSettingPosition=!0,this.cropperPosition.set(X({},t)),this.pendingCropperPosition.set(null),setTimeout(()=>{this.isSettingPosition=!1},500)}resizeBlob(t,r,i){return Be(this,null,function*(){let o=document.createElement("canvas");o.width=r,o.height=i;let s=o.getContext("2d");if(!s)return t;s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high";try{let a=yield createImageBitmap(t);s.drawImage(a,0,0,r,i)}catch{let a=new Image,c=URL.createObjectURL(t);yield new Promise(l=>{a.onload=()=>l(),a.onerror=()=>l(),a.src=c}),URL.revokeObjectURL(c),a.width>0&&a.height>0&&s.drawImage(a,0,0,r,i)}return yield new Promise(a=>{o.toBlob(c=>a(c??t),"image/png",1)})})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=_n({type:e,selectors:[["app-image-cropper"]],viewQuery:function(r,i){if(r&1&&(Er(Wd,5),Er(HE,5)),r&2){let o;Ir(o=Mr())&&(i.cropper=o.first),Ir(o=Mr())&&(i.cropperWrapper=o.first)}},hostBindings:function(r,i){r&1&&ae("keydown",function(s){return i.onKeyDown(s)},zn)("keyup",function(s){return i.onKeyUp(s)},zn)("mousemove",function(s){return i.onMouseMove(s)},zn)("mouseup",function(){return i.onMouseUp()},zn)("contextmenu",function(s){return i.onContextMenu(s)})},inputs:{image:[1,"image"],bucketSize:[1,"bucketSize"],allowNonSquare:[1,"allowNonSquare"],panelWidth:[1,"panelWidth"]},outputs:{remove:"remove",duplicate:"duplicate"},decls:33,vars:27,consts:[["cropperWrapper",""],[1,"cropper-card"],[1,"cropper-header"],[1,"file-info",3,"title"],[1,"file-resolution"],[1,"action-buttons"],[1,"icon-btn",3,"click","title"],[1,"icon-btn","danger",3,"click","title"],[1,"cropper-body",3,"mousedown"],[1,"base-image-preview",2,"object-fit","contain","position","absolute","top","0","left","0",3,"load","src","alt"],[1,"drawing-overlay",3,"left","top","width","height"],[3,"imageFile","maintainAspectRatio","aspectRatio","cropper","pending-cropper","transform","format","resizeToWidth","resizeToHeight","onlyScaleDown","alignImage","roundCropper","allowMoveImage","imageQuality","autoCrop"],[1,"cropper-controls"],[1,"control-row"],["title","Rotate Left",1,"icon-btn",3,"click"],["title","Rotate Right",1,"icon-btn",3,"click"],["title","Reset Position",1,"icon-btn",3,"click"],["type","range","min","-180","max","180",1,"rotation-slider",3,"ngModelChange","ngModel"],[1,"drawing-overlay"],[3,"imageCropped","cropperReady","cropperChange","loadImageFailed","imageFile","maintainAspectRatio","aspectRatio","cropper","transform","format","resizeToWidth","resizeToHeight","onlyScaleDown","alignImage","roundCropper","allowMoveImage","imageQuality","autoCrop"],[1,"resolution-info"],[1,"scale-indicator",3,"title"],[1,"scale-indicator","down",3,"title"],[1,"ratio-label"]],template:function(r,i){if(r&1){let o=ut();G(0,"div",1)(1,"div",2)(2,"span",3),pe(3),Bt(4,$E,2,2,"span",4),q(),G(5,"div",5)(6,"button",6),$e(7,"translate"),ae("click",function(){return K(o),Q(i.duplicate.emit())}),G(8,"span"),pe(9,"+"),q()(),G(10,"button",7),$e(11,"translate"),ae("click",function(){return K(o),Q(i.remove.emit())}),G(12,"span"),pe(13,"\u2715"),q()()()(),G(14,"div",8,0),ae("mousedown",function(a){return K(o),Q(i.onMouseDown(a))}),G(16,"img",9),ae("load",function(a){return K(o),Q(i.onBaseImageLoaded(a))}),q(),Bt(17,WE,1,8,"div",10),Bt(18,GE,1,18,"image-cropper",11),q(),G(19,"div",12),Bt(20,YE,8,13,"div",13),G(21,"div",13)(22,"div",5)(23,"button",14),ae("click",function(){return K(o),Q(i.rotateLeft())}),G(24,"span"),pe(25,"\u21BA"),q()(),G(26,"button",15),ae("click",function(){return K(o),Q(i.rotateRight())}),G(27,"span"),pe(28,"\u21BB"),q()(),G(29,"button",16),ae("click",function(){return K(o),Q(i.resetPosition())}),G(30,"span"),pe(31,"\u27F2"),q()()(),G(32,"input",17),ae("ngModelChange",function(a){return K(o),Q(i.rotation.set(a))}),q()()()()}r&2&&(st("width",i.panelWidth(),"px"),oe(2),xe("title",i.image().fileName),oe(),at(" ",i.image().fileName," "),oe(),Ht(i.baseImageNaturalSize()?4:-1),oe(2),xe("title",Ze(7,23,"IMAGE_PROCESSING.ACTIONS.DUPLICATE")),oe(4),xe("title",Ze(11,25,"IMAGE_PROCESSING.ACTIONS.REMOVE")),oe(4),st("height",i.panelWidth(),"px"),xt("no-selection",!i.cropperPosition()),oe(2),st("width",i.panelWidth(),"px")("height",i.panelWidth(),"px")("transform","rotate("+i.rotation()+"deg)"),xe("src",i.imageUrl(),vo)("alt",i.image().fileName),oe(),Ht(i.isDrawingNew()?17:-1),oe(),Ht(i.hasPendingCropper()||i.cropperPosition()||i.shouldApplyDefaultSelection()?18:-1),oe(2),Ht(i.cropperPosition()||i.isDrawingNew()?20:-1),oe(12),xe("ngModel",i.rotation()))},dependencies:[Zn,bi,Wd,uc,xi,Jd,ac,zo,Ja],styles:[".cropper-card[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 1px 3px #0000001a;overflow:hidden;display:flex;flex-direction:column}.cropper-header[_ngcontent-%COMP%]{padding:.5rem;background:#f9fafb;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}.file-info[_ngcontent-%COMP%]{font-size:.75rem;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-resolution[_ngcontent-%COMP%]{margin-left:.375rem;color:#6b7280;font-weight:600;font-size:.7rem}.cropper-body[_ngcontent-%COMP%]{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;background:#f3f4f6;-webkit-user-select:none;user-select:none}.base-image-preview[_ngcontent-%COMP%]{display:block;pointer-events:none;z-index:1}.cropper-controls[_ngcontent-%COMP%]{padding:.5rem;display:flex;flex-direction:column;gap:.5rem}.control-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}.resolution-info[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600}.scale-indicator[_ngcontent-%COMP%]{margin-left:.375rem;font-weight:800;color:#dc2626}.scale-indicator.down[_ngcontent-%COMP%], .resolution-info.valid[_ngcontent-%COMP%]{color:#059669}.resolution-info.invalid[_ngcontent-%COMP%]{color:#dc2626}.action-buttons[_ngcontent-%COMP%]{display:flex;gap:.25rem}.icon-btn[_ngcontent-%COMP%]{padding:.25rem;background:transparent;border:none;cursor:pointer;border-radius:4px;display:flex;align-items:center;justify-content:center;color:#6b7280;transition:all .2s}.icon-btn[_ngcontent-%COMP%]:hover{background:#e5e7eb;color:#111827}.icon-btn.danger[_ngcontent-%COMP%]:hover{background:#fee2e2;color:#dc2626}.rotation-slider[_ngcontent-%COMP%]{width:100%}.ratio-label[_ngcontent-%COMP%]{font-size:.7rem;background:#eef2ff;color:#4f46e5;padding:.125rem .375rem;border-radius:9999px;font-weight:600}.drawing-overlay[_ngcontent-%COMP%]{position:absolute;border:2px dashed #dc2626;background:#dc26261a;pointer-events:none;z-index:1000}image-cropper[_ngcontent-%COMP%]{z-index:10}image-cropper.pending-cropper[_ngcontent-%COMP%]{opacity:0;pointer-events:none;position:absolute;inset:0} .ngx-ic-handle{width:14px!important;height:14px!important;background-color:#dc2626!important;border:2px solid white!important;border-radius:50%!important;box-shadow:0 0 6px #0009!important;z-index:100!important;pointer-events:auto!important;opacity:1!important;visibility:visible!important} .ngx-ic-source{cursor:crosshair!important} .ngx-ic-cropper{border:2px solid #dc2626!important;pointer-events:auto!important} .ngx-ic-overlay{pointer-events:auto!important} .ngx-ic-move{cursor:move!important}"],changeDetection:0})}return e})();var Sy=$y(xy());function fc(e){return e.replace(/[^A-Za-z0-9_-]/g,"")}function Ty(e,n){let t=fc(e),r=Math.max(1,Math.floor(n));return`${t}-${String(r).padStart(4,"0")}.png`}var KE=(e,n)=>n.id;function QE(e,n){if(e&1){let t=ut();G(0,"div",20)(1,"label",32),pe(2),$e(3,"translate"),q(),G(4,"input",33),ae("ngModelChange",function(i){K(t);let o=ee();return Q(o.onDatasetPrefixChange(i))}),q()()}if(e&2){let t=ee();oe(2),Gn(Ze(3,2,"IMAGE_PROCESSING.SETTINGS.DATASET_PREFIX")),oe(2),xe("ngModel",t.datasetPrefix())}}function XE(e,n){if(e&1){let t=ut();G(0,"div",34),ae("drop",function(i){K(t);let o=ee();return Q(o.onDrop(i))})("dragover",function(i){K(t);let o=ee();return Q(o.onDragOver(i))})("click",function(){K(t),ee();let i=Do(72);return Q(i.click())})("keyup.enter",function(){K(t),ee();let i=Do(72);return Q(i.click())}),G(1,"p",35),pe(2),$e(3,"translate"),q()()}e&2&&(oe(2),Gn(Ze(3,1,"IMAGE_PROCESSING.NO_IMAGES")))}function JE(e,n){if(e&1){let t=ut();G(0,"app-image-cropper",39),ae("remove",function(){let i=K(t).$implicit,o=ee(2);return Q(o.removeImage(i.id))})("duplicate",function(){let i=K(t).$implicit,o=ee(2);return Q(o.duplicateImage(i))}),q()}if(e&2){let t=n.$implicit,r=ee(2);xe("image",t)("bucketSize",r.bucketSize())("allowNonSquare",r.allowNonSquare())("panelWidth",r.imagePanelWidth)}}function eI(e,n){if(e&1){let t=ut();G(0,"div",36),od(1,JE,1,4,"app-image-cropper",37,KE),q(),G(3,"div",38)(4,"button",28),ae("click",function(){K(t);let i=ee();return Q(i.downloadDataset())}),pe(5),$e(6,"translate"),q(),G(7,"button",29),ae("click",function(){K(t);let i=ee();return Q(i.resetAll())}),pe(8),$e(9,"translate"),q()()}if(e&2){let t=ee();oe(),sd(t.images()),oe(3),xe("disabled",t.images().length===0),oe(),at(" ",Ze(6,4,"IMAGE_PROCESSING.ACTIONS.DOWNLOAD_DATASET")," "),oe(2),xe("disabled",t.images().length===0),oe(),at(" ",Ze(9,6,"IMAGE_PROCESSING.ACTIONS.RESET")," ")}}function tI(e,n){if(e&1&&(G(0,"div",31)(1,"p"),pe(2),q(),G(3,"div",40),qe(4,"div",41),q()()),e&2){let t=ee();oe(2),Gn(t.progressText()),oe(2),st("width",t.progressPercent(),"%")}}var Ay=(()=>{class e{images=De([]);bucketSize=De(512);allowNonSquare=De(!0);imagePanelWidth=512;renameDataset=De(!1);datasetPrefix=De("");isProcessing=De(!1);progressPercent=De(0);progressText=De("");croppers=vm(dc);datasetPrefixSanitized=Ye(()=>fc(this.datasetPrefix()));onFilesSelected(t){let r=t.target;r.files&&this.addFiles(r.files)}onDrop(t){t.preventDefault(),t.dataTransfer?.files&&this.addFiles(t.dataTransfer.files)}onDragOver(t){t.preventDefault()}addFiles(t){let r=[];for(let i of Array.from(t))i.type.startsWith("image/")&&r.push({id:Math.random().toString(36).substring(2,9),file:i,fileName:i.name});this.images.update(i=>[...i,...r])}removeImage(t){this.images.update(r=>r.filter(i=>i.id!==t))}duplicateImage(t){let r=_e(X({},t),{id:Math.random().toString(36).substring(2,9),fileName:this.getDuplicatedFileName(t.fileName)});this.images.update(i=>{let o=i.findIndex(a=>a.id===t.id),s=[...i];return s.splice(o+1,0,r),s})}getDuplicatedFileName(t){let r=t.split(".");if(r.length>1){let i=r.pop();return`${r.join(".")}_copy.${i}`}return`${t}_copy`}resetAll(){this.images.set([])}toggleRenameDataset(t){this.renameDataset.set(t),t&&!this.datasetPrefix()&&this.datasetPrefix.set("dataset")}onDatasetPrefixChange(t){this.datasetPrefix.set(fc(t))}downloadDataset(){return Be(this,null,function*(){let t=this.croppers();if(t.length===0)return;this.isProcessing.set(!0),this.progressPercent.set(0);let r=new Sy.default,i=t.length;try{for(let c=0;cURL.revokeObjectURL(s),100)}catch(o){console.error("Error generating dataset:",o)}finally{this.isProcessing.set(!1)}})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=_n({type:e,selectors:[["app-image-processing"]],viewQuery:function(r,i){r&1&&ad(i.croppers,dc,5),r&2&&cd()},decls:82,vars:32,consts:[["fileInput",""],[1,"app-container"],[1,"app-header"],[1,"title-row"],[1,"title-info"],["aria-label","Info",1,"title-info-trigger"],["role","note","aria-label","Legend",1,"title-info-popover"],[1,"legend-green"],[1,"legend-red"],["aria-label","Profile links",1,"profile-links"],["href","https://reddit.com/r/malcolmrey","target","_blank","rel","noopener noreferrer","aria-label","Reddit","title","Reddit",1,"profile-link"],[1,"profile-icon"],["href","https://huggingface.com/malcolmrey","target","_blank","rel","noopener noreferrer","aria-label","HuggingFace","title","HuggingFace",1,"profile-link"],["href","https://civitai.com/user/malcolmrey","target","_blank","rel","noopener noreferrer","aria-label","CivitAI","title","CivitAI",1,"profile-link"],["href","https://buymeacoffee.com/malcolmrey","target","_blank","rel","noopener noreferrer","aria-label","Buy Me A Coffee","title","Buy Me A Coffee",1,"profile-link","buymeacoffee"],[1,"buymeacoffee-text"],[1,"main-content"],[1,"image-processing-container"],[1,"header"],[1,"settings"],[1,"setting-group"],["for","bucket-size"],["id","bucket-size",3,"ngModelChange","ngModel"],[3,"ngValue"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"actions"],[1,"btn","btn-secondary",3,"click"],["type","file","multiple","","accept","image/*",2,"display","none",3,"change"],[1,"btn","btn-primary",3,"click","disabled"],[1,"btn","btn-danger",3,"click","disabled"],["tabindex","0","role","button",1,"dropzone-container"],[1,"progress-overlay"],["for","dataset-prefix"],["id","dataset-prefix","type","text","inputmode","text","autocomplete","off","placeholder","dataset",3,"ngModelChange","ngModel"],["tabindex","0","role","button",1,"dropzone-container",3,"drop","dragover","click","keyup.enter"],[1,"dropzone-text"],[1,"images-grid"],[3,"image","bucketSize","allowNonSquare","panelWidth"],[1,"actions","bottom-actions"],[3,"remove","duplicate","image","bucketSize","allowNonSquare","panelWidth"],[1,"progress-bar"],[1,"progress-fill"]],template:function(r,i){if(r&1){let o=ut();G(0,"div",1)(1,"header",2)(2,"div",3)(3,"h1"),pe(4),$e(5,"translate"),q(),G(6,"details",4)(7,"summary",5),pe(8,"i"),q(),G(9,"div",6)(10,"ul")(11,"li"),pe(12,"Right click deselects current selection"),q(),G(13,"li"),pe(14," By default resizing maintains ratio; hold "),G(15,"strong"),pe(16,"CTRL"),q(),pe(17," to freely resize, then on release it snaps to the closest allowed bucket ratio "),q(),G(18,"li"),pe(19," If the resolution text changes from "),G(20,"span",7),pe(21,"green"),q(),pe(22," to "),G(23,"span",8),pe(24,"red"),q(),pe(25,", we are doing an upscale which may inflict quality loss "),q()()()()(),G(26,"div",9)(27,"a",10)(28,"span",11),pe(29,"R"),q()(),G(30,"a",12)(31,"span",11),pe(32,"HF"),q()(),G(33,"a",13)(34,"span",11),pe(35,"C"),q()(),G(36,"a",14)(37,"span",11),pe(38,"\u2615"),q(),G(39,"span",15),pe(40,"BuyMeACoffee"),q()()()(),G(41,"main",16)(42,"div",17)(43,"header",18)(44,"div",19)(45,"div",20)(46,"label",21),pe(47),$e(48,"translate"),q(),G(49,"select",22),ae("ngModelChange",function(a){return K(o),Q(i.bucketSize.set(a))}),G(50,"option",23),pe(51,"512"),q(),G(52,"option",23),pe(53,"768"),q(),G(54,"option",23),pe(55,"1024"),q()()(),G(56,"div",20)(57,"label")(58,"input",24),ae("ngModelChange",function(a){return K(o),Q(i.allowNonSquare.set(a))}),q(),pe(59),$e(60,"translate"),q()(),G(61,"div",20)(62,"label")(63,"input",24),ae("ngModelChange",function(a){return K(o),Q(i.toggleRenameDataset(a))}),q(),pe(64),$e(65,"translate"),q()(),Bt(66,QE,5,4,"div",20),q(),G(67,"div",25)(68,"button",26),ae("click",function(){K(o);let a=Do(72);return Q(a.click())}),pe(69),$e(70,"translate"),q(),G(71,"input",27,0),ae("change",function(a){return K(o),Q(i.onFilesSelected(a))}),q(),G(73,"button",28),ae("click",function(){return K(o),Q(i.downloadDataset())}),pe(74),$e(75,"translate"),q(),G(76,"button",29),ae("click",function(){return K(o),Q(i.resetAll())}),pe(77),$e(78,"translate"),q()()(),Bt(79,XE,4,3,"div",30)(80,eI,10,8),q()(),Bt(81,tI,5,3,"div",31),q()}r&2&&(oe(4),Gn(Ze(5,18,"IMAGE_PROCESSING.TITLE")),oe(43),Gn(Ze(48,20,"IMAGE_PROCESSING.SETTINGS.BUCKET_SIZE")),oe(2),xe("ngModel",i.bucketSize()),oe(),xe("ngValue",512),oe(2),xe("ngValue",768),oe(2),xe("ngValue",1024),oe(4),xe("ngModel",i.allowNonSquare()),oe(),at(" ",Ze(60,22,"IMAGE_PROCESSING.SETTINGS.ALLOW_NON_SQUARE")," "),oe(4),xe("ngModel",i.renameDataset()),oe(),at(" ",Ze(65,24,"IMAGE_PROCESSING.SETTINGS.RENAME_DATASET")," "),oe(2),Ht(i.renameDataset()?66:-1),oe(3),at(" ",Ze(70,26,"IMAGE_PROCESSING.ACTIONS.UPLOAD")," "),oe(4),xe("disabled",i.images().length===0),oe(),at(" ",Ze(75,28,"IMAGE_PROCESSING.ACTIONS.DOWNLOAD_DATASET")," "),oe(2),xe("disabled",i.images().length===0),oe(),at(" ",Ze(78,30,"IMAGE_PROCESSING.ACTIONS.RESET")," "),oe(2),Ht(i.images().length===0?79:80),oe(2),Ht(i.isProcessing()?81:-1))},dependencies:[Zn,bi,dc,uc,vy,Dy,xi,Qd,lc,ac,zo,Ja],styles:[".image-processing-container[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;background:#fff;padding:1rem;border-radius:8px;box-shadow:0 1px 3px #0000001a}.settings[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap}.setting-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.setting-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:600;font-size:.875rem;color:#374151}.setting-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .setting-group[_ngcontent-%COMP%] input[type=range][_ngcontent-%COMP%]{padding:.375rem .5rem;border:1px solid #d1d5db;border-radius:4px;font-size:.875rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}.bottom-actions[_ngcontent-%COMP%]{justify-content:flex-end;padding:0 .25rem .5rem}.btn[_ngcontent-%COMP%]{padding:.5rem 1rem;border-radius:6px;font-weight:500;font-size:.875rem;cursor:pointer;transition:all .2s;border:none}.btn-primary[_ngcontent-%COMP%]{background-color:#4f46e5;color:#fff}.btn-primary[_ngcontent-%COMP%]:hover{background-color:#4338ca}.btn-secondary[_ngcontent-%COMP%]{background-color:#e5e7eb;color:#374151}.btn-secondary[_ngcontent-%COMP%]:hover{background-color:#d1d5db}.btn-danger[_ngcontent-%COMP%]{background-color:#ef4444;color:#fff}.btn-danger[_ngcontent-%COMP%]:hover{background-color:#dc2626}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.dropzone-container[_ngcontent-%COMP%]{border:2px dashed #d1d5db;border-radius:8px;padding:2rem;text-align:center;background:#fff;cursor:pointer;transition:border-color .2s}.dropzone-container[_ngcontent-%COMP%]:hover, .dropzone-container.drag-over[_ngcontent-%COMP%]{border-color:#4f46e5;background-color:#f5f3ff}.dropzone-text[_ngcontent-%COMP%]{color:#6b7280}.images-grid[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.5rem;justify-content:flex-start}.no-images[_ngcontent-%COMP%]{text-align:center;padding:3rem;background:#fff;border-radius:8px;color:#6b7280}.progress-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000;color:#fff}.progress-bar[_ngcontent-%COMP%]{width:300px;height:20px;background:#e5e7eb;border-radius:10px;overflow:hidden;margin-top:1rem}.progress-fill[_ngcontent-%COMP%]{height:100%;background:#4f46e5;transition:width .1s}"],changeDetection:0})}return e})();var Ny=(()=>{class e{translate=$(Fo);constructor(){this.translate.setDefaultLang("en"),this.translate.use("en")}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=_n({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(r,i){r&1&&qe(0,"app-image-processing")},dependencies:[Zn,Ay],styles:["[_nghost-%COMP%]{display:block;height:100vh;overflow:hidden}"],changeDetection:0})}return e})();xd(Ny,Km).catch(e=>console.error(e));