marketplacepos 3.9.2 → 3.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-HTEDNGSI.js → chunk-223IHKLH.js} +1 -1
- package/Marketplace/chunk-24E4KX5X.js +1 -0
- package/Marketplace/{chunk-42URWJWL.js → chunk-24FH5K25.js} +1 -1
- package/Marketplace/{chunk-2GEKKULX.js → chunk-2FPWKSK6.js} +1 -1
- package/Marketplace/{chunk-K2D3HYO3.js → chunk-2VBEH64C.js} +1 -1
- package/Marketplace/{chunk-USTIBZQZ.js → chunk-3FP6R342.js} +1 -1
- package/Marketplace/{chunk-XH2RYIXU.js → chunk-3WYTYS4I.js} +1 -1
- package/Marketplace/{chunk-DAOVB2Q7.js → chunk-4X7WAYU2.js} +1 -1
- package/Marketplace/{chunk-YMW3PRQO.js → chunk-6EOCCEBR.js} +1 -1
- package/Marketplace/{chunk-62YVBX6C.js → chunk-6JIO3MDW.js} +1 -1
- package/Marketplace/{chunk-ZOAWBPA4.js → chunk-6P3BIWG5.js} +1 -1
- package/Marketplace/{chunk-5MVSVVTZ.js → chunk-75ETOW5V.js} +1 -1
- package/Marketplace/{chunk-PTD6INQZ.js → chunk-7CFOLDEA.js} +1 -1
- package/Marketplace/{chunk-3MUKJETU.js → chunk-7HNQOPUO.js} +1 -1
- package/Marketplace/{chunk-OHUTMYI3.js → chunk-7O7ZV66V.js} +1 -1
- package/Marketplace/{chunk-5G6F6KM6.js → chunk-A6ED3RSO.js} +1 -1
- package/Marketplace/{chunk-KPVSCTPE.js → chunk-AN2CINQU.js} +1 -1
- package/Marketplace/{chunk-MSDWP3Z5.js → chunk-AR5AIUY5.js} +1 -1
- package/Marketplace/{chunk-YWSTU35G.js → chunk-BCZIDBRQ.js} +2 -2
- package/Marketplace/{chunk-7DWQVDUN.js → chunk-BHYLQ3XF.js} +1 -1
- package/Marketplace/{chunk-P5FK7XH7.js → chunk-CMAYHYOO.js} +1 -1
- package/Marketplace/{chunk-VK5MBCEQ.js → chunk-D6V2KDUQ.js} +1 -1
- package/Marketplace/{chunk-HWGOH7QS.js → chunk-DCYKOVAM.js} +1 -1
- package/Marketplace/{chunk-UU4FCLSH.js → chunk-DWNMRBOC.js} +1 -1
- package/Marketplace/{chunk-MU6WSNWI.js → chunk-FYZEL73T.js} +1 -1
- package/Marketplace/{chunk-QC2RB3LW.js → chunk-GD7CSSWB.js} +1 -1
- package/Marketplace/{chunk-RB4PODHN.js → chunk-HAGHCF7F.js} +1 -1
- package/Marketplace/{chunk-X7OCPOXW.js → chunk-IWPOHMOJ.js} +1 -1
- package/Marketplace/{chunk-DR77LMQ5.js → chunk-J4BS5HHW.js} +1 -1
- package/Marketplace/{chunk-XBFPNQRE.js → chunk-J7DEYKP6.js} +1 -1
- package/Marketplace/{chunk-PEROEQOW.js → chunk-JBVB4OVI.js} +1 -1
- package/Marketplace/{chunk-JZNKYXRR.js → chunk-JLAIVCSP.js} +1 -1
- package/Marketplace/{chunk-6GHDH7BV.js → chunk-K7OHC2AW.js} +1 -1
- package/Marketplace/{chunk-WDVFAXEE.js → chunk-KFK76TSL.js} +1 -1
- package/Marketplace/{chunk-A4NDARMD.js → chunk-KLFNBFWY.js} +1 -1
- package/Marketplace/{chunk-MNQTYXTP.js → chunk-LQIHGVQQ.js} +1 -1
- package/Marketplace/{chunk-7NUYZDNH.js → chunk-PIHDABAW.js} +1 -1
- package/Marketplace/{chunk-GIXQOMAF.js → chunk-PNDM4FNI.js} +1 -1
- package/Marketplace/{chunk-T726PSLZ.js → chunk-SG7ZTVRN.js} +1 -1
- package/Marketplace/{chunk-6TL753XX.js → chunk-SPVU5YQJ.js} +1 -1
- package/Marketplace/{chunk-NUQYRQUS.js → chunk-T5LEJVUT.js} +1 -1
- package/Marketplace/{chunk-TEMOBJ6P.js → chunk-TA2OMI4I.js} +1 -1
- package/Marketplace/{chunk-TH3YEBZM.js → chunk-TPZUQ3VA.js} +1 -1
- package/Marketplace/{chunk-CQDJKHRJ.js → chunk-TQJUXGLM.js} +1 -1
- package/Marketplace/{chunk-NDL2OQM7.js → chunk-TUNUG7JP.js} +1 -1
- package/Marketplace/{chunk-ZKFCU6QY.js → chunk-TXDNQ6BP.js} +1 -1
- package/Marketplace/{chunk-WGRN55OQ.js → chunk-U3XVBY4L.js} +1 -1
- package/Marketplace/{chunk-NO7WERYV.js → chunk-USTXSCDN.js} +1 -1
- package/Marketplace/{chunk-TTTBABPM.js → chunk-UT3B5YJG.js} +1 -1
- package/Marketplace/{chunk-5KWI6CNM.js → chunk-V2ASIO3I.js} +1 -1
- package/Marketplace/{chunk-OGZ4S2OZ.js → chunk-V5N4EKHO.js} +1 -1
- package/Marketplace/{chunk-LSG32F4X.js → chunk-VBDYQMXW.js} +1 -1
- package/Marketplace/{chunk-KES3BFYS.js → chunk-VGSJMM76.js} +1 -1
- package/Marketplace/{chunk-WOVAE35N.js → chunk-VM6WJ77V.js} +1 -1
- package/Marketplace/{chunk-3ADBD6TU.js → chunk-VSHN3JTN.js} +1 -1
- package/Marketplace/{chunk-253CGPDL.js → chunk-VTBELDVB.js} +1 -1
- package/Marketplace/chunk-WBV2UEPL.js +1 -0
- package/Marketplace/{chunk-LLITFBOE.js → chunk-WKCOG4BN.js} +1 -1
- package/Marketplace/{chunk-AYOR2E3R.js → chunk-XRNBSITS.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-A64TEOJA.js → main-KGKJNXZE.js} +1 -1
- package/Marketplace/{styles-XF7HDZPE.css → styles-6PSCDOW2.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-JRVVHEWT.js +0 -1
- package/Marketplace/chunk-YJA6GNVB.js +0 -1
- /package/Marketplace/{chunk-3OPATVPE.js → chunk-AFZN3DRI.js} +0 -0
- /package/Marketplace/{chunk-PXXT4AMP.js → chunk-SLQJFLQ4.js} +0 -0
- /package/Marketplace/{chunk-CRNJ2Q5T.js → chunk-SVMOHTLO.js} +0 -0
- /package/Marketplace/{chunk-FXU7TISG.js → chunk-WGOJPXER.js} +0 -0
- /package/Marketplace/{polyfills-JB4R6HHU.js → polyfills-FTWUMK2G.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ss,b as as,c as ns,k as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{a as ss,b as as,c as ns,k as Ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-6JIO3MDW.js";import{b as ts,c as rs}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-KLFNBFWY.js";import{c as Xr,g as Kr,h as es}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TPZUQ3VA.js";import{Q as Xe,R as Ke,S as Et,T as Qr}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-2VBEH64C.js";import{$ as Er,$a as $r,Fa as Rt,Ja as jr,Oa as Ft,Pa as zr,Za as Ct,_a as It,ba as Ur,ca as Pt,db as Zr,ea as Hr,hb as Lt,ja as Vr,ka as Gr,mb as qr,ob as At,tb as Br,ub as Jr}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";import{c as Ar,d as lo,f as Qe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SVMOHTLO.js";var be=lo((Ht,ye)=>{(function(x,o){typeof Ht=="object"&&typeof ye<"u"?ye.exports=o():typeof define=="function"&&define.amd?define(o):x.moment=o()})(Ht,function(){"use strict";var x;function o(){return x.apply(null,arguments)}function xe(e){x=e}function u(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function c(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function W(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(m(e,t))return!1;return!0}function O(e){return e===void 0}function P(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function pe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Vt(e,t){var r=[],s,a=e.length;for(s=0;s<a;++s)r.push(t(e[s],s));return r}function K(e,t){for(var r in t)m(t,r)&&(e[r]=t[r]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function U(e,t,r,s){return _r(e,t,r,s,!0).utc()}function ls(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(e){return e._pf==null&&(e._pf=ls()),e._pf}var et;Array.prototype.some?et=Array.prototype.some:et=function(e){var t=Object(this),r=t.length>>>0,s;for(s=0;s<r;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};function tt(e){var t=null,r=!1,s=e._d&&!isNaN(e._d.getTime());if(s&&(t=y(e),r=et.call(t.parsedDateParts,function(a){return a!=null}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(s=s&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=s;else return s;return e._isValid}function Ne(e){var t=U(NaN);return e!=null?K(y(t),e):y(t).userInvalidated=!0,t}var Gt=o.momentProperties=[],rt=!1;function st(e,t){var r,s,a,n=Gt.length;if(O(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),O(t._i)||(e._i=t._i),O(t._f)||(e._f=t._f),O(t._l)||(e._l=t._l),O(t._strict)||(e._strict=t._strict),O(t._tzm)||(e._tzm=t._tzm),O(t._isUTC)||(e._isUTC=t._isUTC),O(t._offset)||(e._offset=t._offset),O(t._pf)||(e._pf=y(t)),O(t._locale)||(e._locale=t._locale),n>0)for(r=0;r<n;r++)s=Gt[r],a=t[s],O(a)||(e[s]=a);return e}function Me(e){st(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),rt===!1&&(rt=!0,o.updateOffset(this),rt=!1)}function L(e){return e instanceof Me||e!=null&&e._isAMomentObject!=null}function jt(e){o.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function F(e,t){var r=!0;return K(function(){if(o.deprecationHandler!=null&&o.deprecationHandler(null,e),r){var s=[],a,n,i,d=arguments.length;for(n=0;n<d;n++){if(a="",typeof arguments[n]=="object"){a+=`
|
|
2
2
|
[`+n+"] ";for(i in arguments[0])m(arguments[0],i)&&(a+=i+": "+arguments[0][i]+", ");a=a.slice(0,-2)}else a=arguments[n];s.push(a)}jt(e+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(s).join("")+`
|
|
4
4
|
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var zt={};function $t(e,t){o.deprecationHandler!=null&&o.deprecationHandler(e,t),zt[e]||(jt(t),zt[e]=!0)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null;function H(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function us(e){var t,r;for(r in e)m(e,r)&&(t=e[r],H(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function at(e,t){var r=K({},e),s;for(s in t)m(t,s)&&(c(e[s])&&c(t[s])?(r[s]={},K(r[s],e[s]),K(r[s],t[s])):t[s]!=null?r[s]=t[s]:delete r[s]);for(s in e)m(e,s)&&!m(t,s)&&c(e[s])&&(r[s]=K({},r[s]));return r}function nt(e){e!=null&&this.set(e)}var it;Object.keys?it=Object.keys:it=function(e){var t,r=[];for(t in e)m(e,t)&&r.push(t);return r};var ds={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function hs(e,t,r){var s=this._calendar[e]||this._calendar.sameElse;return H(s)?s.call(t,r):s}function V(e,t,r){var s=""+Math.abs(e),a=t-s.length,n=e>=0;return(n?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+s}var ot=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,We=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,lt={},oe={};function f(e,t,r,s){var a=s;typeof s=="string"&&(a=function(){return this[s]()}),e&&(oe[e]=a),t&&(oe[t[0]]=function(){return V(a.apply(this,arguments),t[1],t[2])}),r&&(oe[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function fs(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function cs(e){var t=e.match(ot),r,s;for(r=0,s=t.length;r<s;r++)oe[t[r]]?t[r]=oe[t[r]]:t[r]=fs(t[r]);return function(a){var n="",i;for(i=0;i<s;i++)n+=H(t[i])?t[i].call(a,e):t[i];return n}}function Pe(e,t){return e.isValid()?(t=Zt(t,e.localeData()),lt[t]=lt[t]||cs(t),lt[t](e)):e.localeData().invalidDate()}function Zt(e,t){var r=5;function s(a){return t.longDateFormat(a)||a}for(We.lastIndex=0;r>=0&&We.test(e);)e=e.replace(We,s),We.lastIndex=0,r-=1;return e}var ms={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function _s(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ot).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[e])}var ys="Invalid date";function ps(){return this._invalidDate}var Ms="%d",ws=/\d{1,2}/;function gs(e){return this._ordinal.replace("%d",e)}var Ds={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ks(e,t,r,s){var a=this._relativeTime[r];return H(a)?a(e,t,r,s):a.replace(/%d/i,e)}function Ss(e,t){var r=this._relativeTime[e>0?"future":"past"];return H(r)?r(t):r.replace(/%s/i,t)}var qt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function C(e){return typeof e=="string"?qt[e]||qt[e.toLowerCase()]:void 0}function ut(e){var t={},r,s;for(s in e)m(e,s)&&(r=C(s),r&&(t[r]=e[s]));return t}var vs={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ys(e){var t=[],r;for(r in e)m(e,r)&&t.push({unit:r,priority:vs[r]});return t.sort(function(s,a){return s.priority-a.priority}),t}var Bt=/\d/,R=/\d\d/,Jt=/\d{3}/,dt=/\d{4}/,Re=/[+-]?\d{6}/,k=/\d\d?/,Qt=/\d\d\d\d?/,Xt=/\d\d\d\d\d\d?/,Fe=/\d{1,3}/,ht=/\d{1,4}/,Ce=/[+-]?\d{1,6}/,le=/\d+/,Ie=/[+-]?\d+/,Os=/Z|[+-]\d\d:?\d\d/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,Ts=/[+-]?\d+(\.\d{1,3})?/,we=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue=/^[1-9]\d?/,ft=/^([1-9]\d|\d)/,Ae;Ae={};function h(e,t,r){Ae[e]=H(t)?t:function(s,a){return s&&r?r:t}}function bs(e,t){return m(Ae,e)?Ae[e](t._strict,t._locale):new RegExp(xs(e))}function xs(e){return j(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,s,a,n){return r||s||a||n}))}function j(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function I(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function p(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=I(t)),r}var ct={};function D(e,t){var r,s=t,a;for(typeof e=="string"&&(e=[e]),P(t)&&(s=function(n,i){i[t]=p(n)}),a=e.length,r=0;r<a;r++)ct[e[r]]=s}function ge(e,t){D(e,function(r,s,a,n){a._w=a._w||{},t(r,a._w,a,n)})}function Ns(e,t,r){t!=null&&m(ct,e)&&ct[e](t,r._a,r,e)}function Ee(e){return e%4===0&&e%100!==0||e%400===0}var b=0,z=1,G=2,T=3,A=4,$=5,se=6,Ws=7,Ps=8;f("Y",0,0,function(){var e=this.year();return e<=9999?V(e,4):"+"+e}),f(0,["YY",2],0,function(){return this.year()%100}),f(0,["YYYY",4],0,"year"),f(0,["YYYYY",5],0,"year"),f(0,["YYYYYY",6,!0],0,"year"),h("Y",Ie),h("YY",k,R),h("YYYY",ht,dt),h("YYYYY",Ce,Re),h("YYYYYY",Ce,Re),D(["YYYYY","YYYYYY"],b),D("YYYY",function(e,t){t[b]=e.length===2?o.parseTwoDigitYear(e):p(e)}),D("YY",function(e,t){t[b]=o.parseTwoDigitYear(e)}),D("Y",function(e,t){t[b]=parseInt(e,10)});function De(e){return Ee(e)?366:365}o.parseTwoDigitYear=function(e){return p(e)+(p(e)>68?1900:2e3)};var Kt=de("FullYear",!0);function Rs(){return Ee(this.year())}function de(e,t){return function(r){return r!=null?(er(this,e,r),o.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){if(!e.isValid())return NaN;var r=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return s?r.getUTCSeconds():r.getSeconds();case"Minutes":return s?r.getUTCMinutes():r.getMinutes();case"Hours":return s?r.getUTCHours():r.getHours();case"Date":return s?r.getUTCDate():r.getDate();case"Day":return s?r.getUTCDay():r.getDay();case"Month":return s?r.getUTCMonth():r.getMonth();case"FullYear":return s?r.getUTCFullYear():r.getFullYear();default:return NaN}}function er(e,t,r){var s,a,n,i,d;if(!(!e.isValid()||isNaN(r))){switch(s=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?s.setUTCMilliseconds(r):s.setMilliseconds(r));case"Seconds":return void(a?s.setUTCSeconds(r):s.setSeconds(r));case"Minutes":return void(a?s.setUTCMinutes(r):s.setMinutes(r));case"Hours":return void(a?s.setUTCHours(r):s.setHours(r));case"Date":return void(a?s.setUTCDate(r):s.setDate(r));case"FullYear":break;default:return}n=r,i=e.month(),d=e.date(),d=d===29&&i===1&&!Ee(n)?28:d,a?s.setUTCFullYear(n,i,d):s.setFullYear(n,i,d)}}function Fs(e){return e=C(e),H(this[e])?this[e]():this}function Cs(e,t){if(typeof e=="object"){e=ut(e);var r=Ys(e),s,a=r.length;for(s=0;s<a;s++)this[r[s].unit](e[r[s].unit])}else if(e=C(e),H(this[e]))return this[e](t);return this}function Is(e,t){return(e%t+t)%t}var Y;Array.prototype.indexOf?Y=Array.prototype.indexOf:Y=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function mt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Is(t,12);return e+=(t-r)/12,r===1?Ee(e)?29:28:31-r%7%2}f("M",["MM",2],"Mo",function(){return this.month()+1}),f("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),f("MMMM",0,0,function(e){return this.localeData().months(this,e)}),h("M",k,ue),h("MM",k,R),h("MMM",function(e,t){return t.monthsShortRegex(e)}),h("MMMM",function(e,t){return t.monthsRegex(e)}),D(["M","MM"],function(e,t){t[z]=p(e)-1}),D(["MMM","MMMM"],function(e,t,r,s){var a=r._locale.monthsParse(e,s,r._strict);a!=null?t[z]=a:y(r).invalidMonth=e});var Ls="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,As=we,Es=we;function Us(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||rr).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone}function Hs(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[rr.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Vs(e,t,r){var s,a,n,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)n=U([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(n,"").toLocaleLowerCase();return r?t==="MMM"?(a=Y.call(this._shortMonthsParse,i),a!==-1?a:null):(a=Y.call(this._longMonthsParse,i),a!==-1?a:null):t==="MMM"?(a=Y.call(this._shortMonthsParse,i),a!==-1?a:(a=Y.call(this._longMonthsParse,i),a!==-1?a:null)):(a=Y.call(this._longMonthsParse,i),a!==-1?a:(a=Y.call(this._shortMonthsParse,i),a!==-1?a:null))}function Gs(e,t,r){var s,a,n;if(this._monthsParseExact)return Vs.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(a=U([2e3,s]),r&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!r&&!this._monthsParse[s]&&(n="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[s]=new RegExp(n.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[s].test(e))return s;if(r&&t==="MMM"&&this._shortMonthsParse[s].test(e))return s;if(!r&&this._monthsParse[s].test(e))return s}}function sr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=p(t);else if(t=e.localeData().monthsParse(t),!P(t))return e}var r=t,s=e.date();return s=s<29?s:Math.min(s,mt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,s):e._d.setMonth(r,s),e}function ar(e){return e!=null?(sr(this,e),o.updateOffset(this,!0),this):ke(this,"Month")}function js(){return mt(this.year(),this.month())}function zs(e){return this._monthsParseExact?(m(this,"_monthsRegex")||nr.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=As),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function $s(e){return this._monthsParseExact?(m(this,"_monthsRegex")||nr.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Es),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function nr(){function e(_,M){return M.length-_.length}var t=[],r=[],s=[],a,n,i,d;for(a=0;a<12;a++)n=U([2e3,a]),i=j(this.monthsShort(n,"")),d=j(this.months(n,"")),t.push(i),r.push(d),s.push(d),s.push(i);t.sort(e),r.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Zs(e,t,r,s,a,n,i){var d;return e<100&&e>=0?(d=new Date(e+400,t,r,s,a,n,i),isFinite(d.getFullYear())&&d.setFullYear(e)):d=new Date(e,t,r,s,a,n,i),d}function Se(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,r){var s=7+t-r,a=(7+Se(e,0,s).getUTCDay()-t)%7;return-a+s-1}function ir(e,t,r,s,a){var n=(7+r-s)%7,i=Ue(e,s,a),d=1+7*(t-1)+n+i,_,M;return d<=0?(_=e-1,M=De(_)+d):d>De(e)?(_=e+1,M=d-De(e)):(_=e,M=d),{year:_,dayOfYear:M}}function ve(e,t,r){var s=Ue(e.year(),t,r),a=Math.floor((e.dayOfYear()-s-1)/7)+1,n,i;return a<1?(i=e.year()-1,n=a+Z(i,t,r)):a>Z(e.year(),t,r)?(n=a-Z(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function Z(e,t,r){var s=Ue(e,t,r),a=Ue(e+1,t,r);return(De(e)-s+a)/7}f("w",["ww",2],"wo","week"),f("W",["WW",2],"Wo","isoWeek"),h("w",k,ue),h("ww",k,R),h("W",k,ue),h("WW",k,R),ge(["w","ww","W","WW"],function(e,t,r,s){t[s.substr(0,1)]=p(e)});function qs(e){return ve(e,this._week.dow,this._week.doy).week}var Bs={dow:0,doy:6};function Js(){return this._week.dow}function Qs(){return this._week.doy}function Xs(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ks(e){var t=ve(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}f("d",0,"do","day"),f("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),f("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),f("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),f("e",0,0,"weekday"),f("E",0,0,"isoWeekday"),h("d",k),h("e",k),h("E",k),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,r,s){var a=r._locale.weekdaysParse(e,s,r._strict);a!=null?t.d=a:y(r).invalidWeekday=e}),ge(["d","e","E"],function(e,t,r,s){t[s]=p(e)});function ea(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function ta(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function _t(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ra="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),or="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sa="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),aa=we,na=we,ia=we;function oa(e,t){var r=u(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?_t(r,this._week.dow):e?r[e.day()]:r}function la(e){return e===!0?_t(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ua(e){return e===!0?_t(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function da(e,t,r){var s,a,n,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)n=U([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(n,"").toLocaleLowerCase();return r?t==="dddd"?(a=Y.call(this._weekdaysParse,i),a!==-1?a:null):t==="ddd"?(a=Y.call(this._shortWeekdaysParse,i),a!==-1?a:null):(a=Y.call(this._minWeekdaysParse,i),a!==-1?a:null):t==="dddd"?(a=Y.call(this._weekdaysParse,i),a!==-1||(a=Y.call(this._shortWeekdaysParse,i),a!==-1)?a:(a=Y.call(this._minWeekdaysParse,i),a!==-1?a:null)):t==="ddd"?(a=Y.call(this._shortWeekdaysParse,i),a!==-1||(a=Y.call(this._weekdaysParse,i),a!==-1)?a:(a=Y.call(this._minWeekdaysParse,i),a!==-1?a:null)):(a=Y.call(this._minWeekdaysParse,i),a!==-1||(a=Y.call(this._weekdaysParse,i),a!==-1)?a:(a=Y.call(this._shortWeekdaysParse,i),a!==-1?a:null))}function ha(e,t,r){var s,a,n;if(this._weekdaysParseExact)return da.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(a=U([2e3,1]).day(s),r&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(n="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[s]=new RegExp(n.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[s].test(e))return s;if(r&&t==="ddd"&&this._shortWeekdaysParse[s].test(e))return s;if(r&&t==="dd"&&this._minWeekdaysParse[s].test(e))return s;if(!r&&this._weekdaysParse[s].test(e))return s}}function fa(e){if(!this.isValid())return e!=null?this:NaN;var t=ke(this,"Day");return e!=null?(e=ea(e,this.localeData()),this.add(e-t,"d")):t}function ca(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function ma(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=ta(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function _a(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||yt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=aa),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ya(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||yt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=na),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function pa(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||yt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ia),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function yt(){function e(N,X){return X.length-N.length}var t=[],r=[],s=[],a=[],n,i,d,_,M;for(n=0;n<7;n++)i=U([2e3,1]).day(n),d=j(this.weekdaysMin(i,"")),_=j(this.weekdaysShort(i,"")),M=j(this.weekdays(i,"")),t.push(d),r.push(_),s.push(M),a.push(d),a.push(_),a.push(M);t.sort(e),r.sort(e),s.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function pt(){return this.hours()%12||12}function Ma(){return this.hours()||24}f("H",["HH",2],0,"hour"),f("h",["hh",2],0,pt),f("k",["kk",2],0,Ma),f("hmm",0,0,function(){return""+pt.apply(this)+V(this.minutes(),2)}),f("hmmss",0,0,function(){return""+pt.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),f("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),f("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)});function lr(e,t){f(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}lr("a",!0),lr("A",!1);function ur(e,t){return t._meridiemParse}h("a",ur),h("A",ur),h("H",k,ft),h("h",k,ue),h("k",k,ue),h("HH",k,R),h("hh",k,R),h("kk",k,R),h("hmm",Qt),h("hmmss",Xt),h("Hmm",Qt),h("Hmmss",Xt),D(["H","HH"],T),D(["k","kk"],function(e,t,r){var s=p(e);t[T]=s===24?0:s}),D(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),D(["h","hh"],function(e,t,r){t[T]=p(e),y(r).bigHour=!0}),D("hmm",function(e,t,r){var s=e.length-2;t[T]=p(e.substr(0,s)),t[A]=p(e.substr(s)),y(r).bigHour=!0}),D("hmmss",function(e,t,r){var s=e.length-4,a=e.length-2;t[T]=p(e.substr(0,s)),t[A]=p(e.substr(s,2)),t[$]=p(e.substr(a)),y(r).bigHour=!0}),D("Hmm",function(e,t,r){var s=e.length-2;t[T]=p(e.substr(0,s)),t[A]=p(e.substr(s))}),D("Hmmss",function(e,t,r){var s=e.length-4,a=e.length-2;t[T]=p(e.substr(0,s)),t[A]=p(e.substr(s,2)),t[$]=p(e.substr(a))});function wa(e){return(e+"").toLowerCase().charAt(0)==="p"}var ga=/[ap]\.?m?\.?/i,Da=de("Hours",!0);function ka(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var dr={calendar:ds,longDateFormat:ms,invalidDate:ys,ordinal:Ms,dayOfMonthOrdinalParse:ws,relativeTime:Ds,months:Ls,monthsShort:tr,week:Bs,weekdays:ra,weekdaysMin:sa,weekdaysShort:or,meridiemParse:ga},v={},Ye={},Oe;function Sa(e,t){var r,s=Math.min(e.length,t.length);for(r=0;r<s;r+=1)if(e[r]!==t[r])return r;return s}function hr(e){return e&&e.toLowerCase().replace("_","-")}function va(e){for(var t=0,r,s,a,n;t<e.length;){for(n=hr(e[t]).split("-"),r=n.length,s=hr(e[t+1]),s=s?s.split("-"):null;r>0;){if(a=He(n.slice(0,r).join("-")),a)return a;if(s&&s.length>=r&&Sa(n,s)>=r-1)break;r--}t++}return Oe}function Ya(e){return!!(e&&e.match("^[^/\\\\]*$"))}function He(e){var t=null,r;if(v[e]===void 0&&typeof ye<"u"&&ye&&ye.exports&&Ya(e))try{t=Oe._abbr,r=Ar,r("./locale/"+e),ee(t)}catch{v[e]=null}return v[e]}function ee(e,t){var r;return e&&(O(t)?r=q(e):r=Mt(e,t),r?Oe=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Oe._abbr}function Mt(e,t){if(t!==null){var r,s=dr;if(t.abbr=e,v[e]!=null)$t("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=v[e]._config;else if(t.parentLocale!=null)if(v[t.parentLocale]!=null)s=v[t.parentLocale]._config;else if(r=He(t.parentLocale),r!=null)s=r._config;else return Ye[t.parentLocale]||(Ye[t.parentLocale]=[]),Ye[t.parentLocale].push({name:e,config:t}),null;return v[e]=new nt(at(s,t)),Ye[e]&&Ye[e].forEach(function(a){Mt(a.name,a.config)}),ee(e),v[e]}else return delete v[e],null}function Oa(e,t){if(t!=null){var r,s,a=dr;v[e]!=null&&v[e].parentLocale!=null?v[e].set(at(v[e]._config,t)):(s=He(e),s!=null&&(a=s._config),t=at(a,t),s==null&&(t.abbr=e),r=new nt(t),r.parentLocale=v[e],v[e]=r),ee(e)}else v[e]!=null&&(v[e].parentLocale!=null?(v[e]=v[e].parentLocale,e===ee()&&ee(e)):v[e]!=null&&delete v[e]);return v[e]}function q(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Oe;if(!u(e)){if(t=He(e),t)return t;e=[e]}return va(e)}function Ta(){return it(v)}function wt(e){var t,r=e._a;return r&&y(e).overflow===-2&&(t=r[z]<0||r[z]>11?z:r[G]<1||r[G]>mt(r[b],r[z])?G:r[T]<0||r[T]>24||r[T]===24&&(r[A]!==0||r[$]!==0||r[se]!==0)?T:r[A]<0||r[A]>59?A:r[$]<0||r[$]>59?$:r[se]<0||r[se]>999?se:-1,y(e)._overflowDayOfYear&&(t<b||t>G)&&(t=G),y(e)._overflowWeeks&&t===-1&&(t=Ws),y(e)._overflowWeekday&&t===-1&&(t=Ps),y(e).overflow=t),e}var ba=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Na=/Z|[+-]\d\d(?::?\d\d)?/,Ve=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Wa=/^\/?Date\((-?\d+)/i,Pa=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ra={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fr(e){var t,r,s=e._i,a=ba.exec(s)||xa.exec(s),n,i,d,_,M=Ve.length,N=gt.length;if(a){for(y(e).iso=!0,t=0,r=M;t<r;t++)if(Ve[t][1].exec(a[1])){i=Ve[t][0],n=Ve[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(a[3]){for(t=0,r=N;t<r;t++)if(gt[t][1].exec(a[3])){d=(a[2]||" ")+gt[t][0];break}if(d==null){e._isValid=!1;return}}if(!n&&d!=null){e._isValid=!1;return}if(a[4])if(Na.exec(a[4]))_="Z";else{e._isValid=!1;return}e._f=i+(d||"")+(_||""),kt(e)}else e._isValid=!1}function Fa(e,t,r,s,a,n){var i=[Ca(e),tr.indexOf(t),parseInt(r,10),parseInt(s,10),parseInt(a,10)];return n&&i.push(parseInt(n,10)),i}function Ca(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ia(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function La(e,t,r){if(e){var s=or.indexOf(e),a=new Date(t[0],t[1],t[2]).getDay();if(s!==a)return y(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Aa(e,t,r){if(e)return Ra[e];if(t)return 0;var s=parseInt(r,10),a=s%100,n=(s-a)/100;return n*60+a}function cr(e){var t=Pa.exec(Ia(e._i)),r;if(t){if(r=Fa(t[4],t[3],t[2],t[5],t[6],t[7]),!La(t[1],r,e))return;e._a=r,e._tzm=Aa(t[8],t[9],t[10]),e._d=Se.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function Ea(e){var t=Wa.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(fr(e),e._isValid===!1)delete e._isValid;else return;if(cr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:o.createFromInputFallback(e)}o.createFromInputFallback=F("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function he(e,t,r){return e??t??r}function Ua(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Dt(e){var t,r,s=[],a,n,i;if(!e._d){for(a=Ua(e),e._w&&e._a[G]==null&&e._a[z]==null&&Ha(e),e._dayOfYear!=null&&(i=he(e._a[b],a[b]),(e._dayOfYear>De(i)||e._dayOfYear===0)&&(y(e)._overflowDayOfYear=!0),r=Se(i,0,e._dayOfYear),e._a[z]=r.getUTCMonth(),e._a[G]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=s[t]=a[t];for(;t<7;t++)e._a[t]=s[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[T]===24&&e._a[A]===0&&e._a[$]===0&&e._a[se]===0&&(e._nextDay=!0,e._a[T]=0),e._d=(e._useUTC?Se:Zs).apply(null,s),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[T]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==n&&(y(e).weekdayMismatch=!0)}}function Ha(e){var t,r,s,a,n,i,d,_,M;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(n=1,i=4,r=he(t.GG,e._a[b],ve(S(),1,4).year),s=he(t.W,1),a=he(t.E,1),(a<1||a>7)&&(_=!0)):(n=e._locale._week.dow,i=e._locale._week.doy,M=ve(S(),n,i),r=he(t.gg,e._a[b],M.year),s=he(t.w,M.week),t.d!=null?(a=t.d,(a<0||a>6)&&(_=!0)):t.e!=null?(a=t.e+n,(t.e<0||t.e>6)&&(_=!0)):a=n),s<1||s>Z(r,n,i)?y(e)._overflowWeeks=!0:_!=null?y(e)._overflowWeekday=!0:(d=ir(r,s,a,n,i),e._a[b]=d.year,e._dayOfYear=d.dayOfYear)}o.ISO_8601=function(){},o.RFC_2822=function(){};function kt(e){if(e._f===o.ISO_8601){fr(e);return}if(e._f===o.RFC_2822){cr(e);return}e._a=[],y(e).empty=!0;var t=""+e._i,r,s,a,n,i,d=t.length,_=0,M,N;for(a=Zt(e._f,e._locale).match(ot)||[],N=a.length,r=0;r<N;r++)n=a[r],s=(t.match(bs(n,e))||[])[0],s&&(i=t.substr(0,t.indexOf(s)),i.length>0&&y(e).unusedInput.push(i),t=t.slice(t.indexOf(s)+s.length),_+=s.length),oe[n]?(s?y(e).empty=!1:y(e).unusedTokens.push(n),Ns(n,s,e)):e._strict&&!s&&y(e).unusedTokens.push(n);y(e).charsLeftOver=d-_,t.length>0&&y(e).unusedInput.push(t),e._a[T]<=12&&y(e).bigHour===!0&&e._a[T]>0&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[T]=Va(e._locale,e._a[T],e._meridiem),M=y(e).era,M!==null&&(e._a[b]=e._locale.erasConvertYear(M,e._a[b])),Dt(e),wt(e)}function Va(e,t,r){var s;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(s=e.isPM(r),s&&t<12&&(t+=12),!s&&t===12&&(t=0)),t)}function Ga(e){var t,r,s,a,n,i,d=!1,_=e._f.length;if(_===0){y(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<_;a++)n=0,i=!1,t=st({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],kt(t),tt(t)&&(i=!0),n+=y(t).charsLeftOver,n+=y(t).unusedTokens.length*10,y(t).score=n,d?n<s&&(s=n,r=t):(s==null||n<s||i)&&(s=n,r=t,i&&(d=!0));K(e,r||t)}function ja(e){if(!e._d){var t=ut(e._i),r=t.day===void 0?t.date:t.day;e._a=Vt([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(s){return s&&parseInt(s,10)}),Dt(e)}}function za(e){var t=new Me(wt(mr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function mr(e){var t=e._i,r=e._f;return e._locale=e._locale||q(e._l),t===null||r===void 0&&t===""?Ne({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),L(t)?new Me(wt(t)):(pe(t)?e._d=t:u(r)?Ga(e):r?kt(e):$a(e),tt(e)||(e._d=null),e))}function $a(e){var t=e._i;O(t)?e._d=new Date(o.now()):pe(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Ea(e):u(t)?(e._a=Vt(t.slice(0),function(r){return parseInt(r,10)}),Dt(e)):c(t)?ja(e):P(t)?e._d=new Date(t):o.createFromInputFallback(e)}function _r(e,t,r,s,a){var n={};return(t===!0||t===!1)&&(s=t,t=void 0),(r===!0||r===!1)&&(s=r,r=void 0),(c(e)&&W(e)||u(e)&&e.length===0)&&(e=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=a,n._l=r,n._i=e,n._f=t,n._strict=s,za(n)}function S(e,t,r,s){return _r(e,t,r,s,!1)}var Za=F("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=S.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ne()}),qa=F("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=S.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ne()});function yr(e,t){var r,s;if(t.length===1&&u(t[0])&&(t=t[0]),!t.length)return S();for(r=t[0],s=1;s<t.length;++s)(!t[s].isValid()||t[s][e](r))&&(r=t[s]);return r}function Ba(){var e=[].slice.call(arguments,0);return yr("isBefore",e)}function Ja(){var e=[].slice.call(arguments,0);return yr("isAfter",e)}var Qa=function(){return Date.now?Date.now():+new Date},Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xa(e){var t,r=!1,s,a=Te.length;for(t in e)if(m(e,t)&&!(Y.call(Te,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(s=0;s<a;++s)if(e[Te[s]]){if(r)return!1;parseFloat(e[Te[s]])!==p(e[Te[s]])&&(r=!0)}return!0}function Ka(){return this._isValid}function en(){return E(NaN)}function Ge(e){var t=ut(e),r=t.year||0,s=t.quarter||0,a=t.month||0,n=t.week||t.isoWeek||0,i=t.day||0,d=t.hour||0,_=t.minute||0,M=t.second||0,N=t.millisecond||0;this._isValid=Xa(t),this._milliseconds=+N+M*1e3+_*6e4+d*1e3*60*60,this._days=+i+n*7,this._months=+a+s*3+r*12,this._data={},this._locale=q(),this._bubble()}function je(e){return e instanceof Ge}function St(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function tn(e,t,r){var s=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),n=0,i;for(i=0;i<s;i++)(r&&e[i]!==t[i]||!r&&p(e[i])!==p(t[i]))&&n++;return n+a}function pr(e,t){f(e,0,0,function(){var r=this.utcOffset(),s="+";return r<0&&(r=-r,s="-"),s+V(~~(r/60),2)+t+V(~~r%60,2)})}pr("Z",":"),pr("ZZ",""),h("Z",Le),h("ZZ",Le),D(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=vt(Le,e)});var rn=/([\+\-]|\d\d)/gi;function vt(e,t){var r=(t||"").match(e),s,a,n;return r===null?null:(s=r[r.length-1]||[],a=(s+"").match(rn)||["-",0,0],n=+(a[1]*60)+p(a[2]),n===0?0:a[0]==="+"?n:-n)}function Yt(e,t){var r,s;return t._isUTC?(r=t.clone(),s=(L(e)||pe(e)?e.valueOf():S(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+s),o.updateOffset(r,!1),r):S(e).local()}function Ot(e){return-Math.round(e._d.getTimezoneOffset())}o.updateOffset=function(){};function sn(e,t,r){var s=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=vt(Le,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(a=Ot(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),s!==e&&(!t||this._changeInProgress?Dr(this,E(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?s:Ot(this)}function an(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function nn(e){return this.utcOffset(0,e)}function on(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ot(this),"m")),this}function ln(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=vt(Os,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function un(e){return this.isValid()?(e=e?S(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function dn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hn(){if(!O(this._isDSTShifted))return this._isDSTShifted;var e={},t;return st(e,this),e=mr(e),e._a?(t=e._isUTC?U(e._a):S(e._a),this._isDSTShifted=this.isValid()&&tn(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function fn(){return this.isValid()?!this._isUTC:!1}function cn(){return this.isValid()?this._isUTC:!1}function Mr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var mn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function E(e,t){var r=e,s=null,a,n,i;return je(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:P(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(s=mn.exec(e))?(a=s[1]==="-"?-1:1,r={y:0,d:p(s[G])*a,h:p(s[T])*a,m:p(s[A])*a,s:p(s[$])*a,ms:p(St(s[se]*1e3))*a}):(s=_n.exec(e))?(a=s[1]==="-"?-1:1,r={y:ae(s[2],a),M:ae(s[3],a),w:ae(s[4],a),d:ae(s[5],a),h:ae(s[6],a),m:ae(s[7],a),s:ae(s[8],a)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=yn(S(r.from),S(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),n=new Ge(r),je(e)&&m(e,"_locale")&&(n._locale=e._locale),je(e)&&m(e,"_isValid")&&(n._isValid=e._isValid),n}E.fn=Ge.prototype,E.invalid=en;function ae(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function wr(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function yn(e,t){var r;return e.isValid()&&t.isValid()?(t=Yt(t,e),e.isBefore(t)?r=wr(e,t):(r=wr(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function gr(e,t){return function(r,s){var a,n;return s!==null&&!isNaN(+s)&&($t(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=r,r=s,s=n),a=E(r,s),Dr(this,a,e),this}}function Dr(e,t,r,s){var a=t._milliseconds,n=St(t._days),i=St(t._months);e.isValid()&&(s=s??!0,i&&sr(e,ke(e,"Month")+i*r),n&&er(e,"Date",ke(e,"Date")+n*r),a&&e._d.setTime(e._d.valueOf()+a*r),s&&o.updateOffset(e,n||i))}var pn=gr(1,"add"),Mn=gr(-1,"subtract");function kr(e){return typeof e=="string"||e instanceof String}function wn(e){return L(e)||pe(e)||kr(e)||P(e)||Dn(e)||gn(e)||e===null||e===void 0}function gn(e){var t=c(e)&&!W(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,n,i=s.length;for(a=0;a<i;a+=1)n=s[a],r=r||m(e,n);return t&&r}function Dn(e){var t=u(e),r=!1;return t&&(r=e.filter(function(s){return!P(s)&&kr(e)}).length===0),t&&r}function kn(e){var t=c(e)&&!W(e),r=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,n;for(a=0;a<s.length;a+=1)n=s[a],r=r||m(e,n);return t&&r}function Sn(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function vn(e,t){arguments.length===1&&(arguments[0]?wn(arguments[0])?(e=arguments[0],t=void 0):kn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||S(),s=Yt(r,this).startOf("day"),a=o.calendarFormat(this,s)||"sameElse",n=t&&(H(t[a])?t[a].call(this,r):t[a]);return this.format(n||this.localeData().calendar(a,this,S(r)))}function Yn(){return new Me(this)}function On(e,t){var r=L(e)?e:S(e);return this.isValid()&&r.isValid()?(t=C(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Tn(e,t){var r=L(e)?e:S(e);return this.isValid()&&r.isValid()?(t=C(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function bn(e,t,r,s){var a=L(e)?e:S(e),n=L(t)?t:S(t);return this.isValid()&&a.isValid()&&n.isValid()?(s=s||"()",(s[0]==="("?this.isAfter(a,r):!this.isBefore(a,r))&&(s[1]===")"?this.isBefore(n,r):!this.isAfter(n,r))):!1}function xn(e,t){var r=L(e)?e:S(e),s;return this.isValid()&&r.isValid()?(t=C(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(s=r.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf())):!1}function Nn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Wn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Pn(e,t,r){var s,a,n;if(!this.isValid())return NaN;if(s=Yt(e,this),!s.isValid())return NaN;switch(a=(s.utcOffset()-this.utcOffset())*6e4,t=C(t),t){case"year":n=ze(this,s)/12;break;case"month":n=ze(this,s);break;case"quarter":n=ze(this,s)/3;break;case"second":n=(this-s)/1e3;break;case"minute":n=(this-s)/6e4;break;case"hour":n=(this-s)/36e5;break;case"day":n=(this-s-a)/864e5;break;case"week":n=(this-s-a)/6048e5;break;default:n=this-s}return r?n:I(n)}function ze(e,t){if(e.date()<t.date())return-ze(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),s=e.clone().add(r,"months"),a,n;return t-s<0?(a=e.clone().add(r-1,"months"),n=(t-s)/(s-a)):(a=e.clone().add(r+1,"months"),n=(t-s)/(a-s)),-(r+n)||0}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Rn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Fn(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?Pe(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):H(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Pe(r,"Z")):Pe(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Cn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,s,a,n;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",n=t+'[")]',this.format(r+s+a+n)}function In(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Pe(this,e);return this.localeData().postformat(t)}function Ln(e,t){return this.isValid()&&(L(e)&&e.isValid()||S(e).isValid())?E({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function An(e){return this.from(S(),e)}function En(e,t){return this.isValid()&&(L(e)&&e.isValid()||S(e).isValid())?E({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Un(e){return this.to(S(),e)}function Sr(e){var t;return e===void 0?this._locale._abbr:(t=q(e),t!=null&&(this._locale=t),this)}var vr=F("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Yr(){return this._locale}var $e=1e3,fe=60*$e,Ze=60*fe,Or=(365*400+97)*24*Ze;function ce(e,t){return(e%t+t)%t}function Tr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Or:new Date(e,t,r).valueOf()}function br(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Or:Date.UTC(e,t,r)}function Hn(e){var t,r;if(e=C(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?br:Tr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ce(t+(this._isUTC?0:this.utcOffset()*fe),Ze);break;case"minute":t=this._d.valueOf(),t-=ce(t,fe);break;case"second":t=this._d.valueOf(),t-=ce(t,$e);break}return this._d.setTime(t),o.updateOffset(this,!0),this}function Vn(e){var t,r;if(e=C(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?br:Tr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ze-ce(t+(this._isUTC?0:this.utcOffset()*fe),Ze)-1;break;case"minute":t=this._d.valueOf(),t+=fe-ce(t,fe)-1;break;case"second":t=this._d.valueOf(),t+=$e-ce(t,$e)-1;break}return this._d.setTime(t),o.updateOffset(this,!0),this}function Gn(){return this._d.valueOf()-(this._offset||0)*6e4}function jn(){return Math.floor(this.valueOf()/1e3)}function zn(){return new Date(this.valueOf())}function $n(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Zn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function qn(){return this.isValid()?this.toISOString():null}function Bn(){return tt(this)}function Jn(){return K({},y(this))}function Qn(){return y(this).overflow}function Xn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}f("N",0,0,"eraAbbr"),f("NN",0,0,"eraAbbr"),f("NNN",0,0,"eraAbbr"),f("NNNN",0,0,"eraName"),f("NNNNN",0,0,"eraNarrow"),f("y",["y",1],"yo","eraYear"),f("y",["yy",2],0,"eraYear"),f("y",["yyy",3],0,"eraYear"),f("y",["yyyy",4],0,"eraYear"),h("N",Tt),h("NN",Tt),h("NNN",Tt),h("NNNN",ui),h("NNNNN",di),D(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,s){var a=r._locale.erasParse(e,s,r._strict);a?y(r).era=a:y(r).invalidEra=e}),h("y",le),h("yy",le),h("yyy",le),h("yyyy",le),h("yo",hi),D(["y","yy","yyy","yyyy"],b),D(["yo"],function(e,t,r,s){var a;r._locale._eraYearOrdinalRegex&&(a=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[b]=r._locale.eraYearOrdinalParse(e,a):t[b]=parseInt(e,10)});function Kn(e,t){var r,s,a,n=this._eras||q("en")._eras;for(r=0,s=n.length;r<s;++r){switch(typeof n[r].since){case"string":a=o(n[r].since).startOf("day"),n[r].since=a.valueOf();break}switch(typeof n[r].until){case"undefined":n[r].until=1/0;break;case"string":a=o(n[r].until).startOf("day").valueOf(),n[r].until=a.valueOf();break}}return n}function ei(e,t,r){var s,a,n=this.eras(),i,d,_;for(e=e.toUpperCase(),s=0,a=n.length;s<a;++s)if(i=n[s].name.toUpperCase(),d=n[s].abbr.toUpperCase(),_=n[s].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(d===e)return n[s];break;case"NNNN":if(i===e)return n[s];break;case"NNNNN":if(_===e)return n[s];break}else if([i,d,_].indexOf(e)>=0)return n[s]}function ti(e,t){var r=e.since<=e.until?1:-1;return t===void 0?o(e.since).year():o(e.since).year()+(t-e.offset)*r}function ri(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].name;return""}function si(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].narrow;return""}function ai(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until||s[e].until<=r&&r<=s[e].since)return s[e].abbr;return""}function ni(){var e,t,r,s,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(r=a[e].since<=a[e].until?1:-1,s=this.clone().startOf("day").valueOf(),a[e].since<=s&&s<=a[e].until||a[e].until<=s&&s<=a[e].since)return(this.year()-o(a[e].since).year())*r+a[e].offset;return this.year()}function ii(e){return m(this,"_erasNameRegex")||bt.call(this),e?this._erasNameRegex:this._erasRegex}function oi(e){return m(this,"_erasAbbrRegex")||bt.call(this),e?this._erasAbbrRegex:this._erasRegex}function li(e){return m(this,"_erasNarrowRegex")||bt.call(this),e?this._erasNarrowRegex:this._erasRegex}function Tt(e,t){return t.erasAbbrRegex(e)}function ui(e,t){return t.erasNameRegex(e)}function di(e,t){return t.erasNarrowRegex(e)}function hi(e,t){return t._eraYearOrdinalRegex||le}function bt(){var e=[],t=[],r=[],s=[],a,n,i,d,_,M=this.eras();for(a=0,n=M.length;a<n;++a)i=j(M[a].name),d=j(M[a].abbr),_=j(M[a].narrow),t.push(i),e.push(d),r.push(_),s.push(i),s.push(d),s.push(_);this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}f(0,["gg",2],0,function(){return this.weekYear()%100}),f(0,["GG",2],0,function(){return this.isoWeekYear()%100});function qe(e,t){f(0,[e,e.length],0,t)}qe("gggg","weekYear"),qe("ggggg","weekYear"),qe("GGGG","isoWeekYear"),qe("GGGGG","isoWeekYear"),h("G",Ie),h("g",Ie),h("GG",k,R),h("gg",k,R),h("GGGG",ht,dt),h("gggg",ht,dt),h("GGGGG",Ce,Re),h("ggggg",Ce,Re),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,s){t[s.substr(0,2)]=p(e)}),ge(["gg","GG"],function(e,t,r,s){t[s]=o.parseTwoDigitYear(e)});function fi(e){return xr.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ci(e){return xr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function mi(){return Z(this.year(),1,4)}function _i(){return Z(this.isoWeekYear(),1,4)}function yi(){var e=this.localeData()._week;return Z(this.year(),e.dow,e.doy)}function pi(){var e=this.localeData()._week;return Z(this.weekYear(),e.dow,e.doy)}function xr(e,t,r,s,a){var n;return e==null?ve(this,s,a).year:(n=Z(e,s,a),t>n&&(t=n),Mi.call(this,e,t,r,s,a))}function Mi(e,t,r,s,a){var n=ir(e,t,r,s,a),i=Se(n.year,0,n.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}f("Q",0,"Qo","quarter"),h("Q",Bt),D("Q",function(e,t){t[z]=(p(e)-1)*3});function wi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}f("D",["DD",2],"Do","date"),h("D",k,ue),h("DD",k,R),h("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),D(["D","DD"],G),D("Do",function(e,t){t[G]=p(e.match(k)[0])});var Nr=de("Date",!0);f("DDD",["DDDD",3],"DDDo","dayOfYear"),h("DDD",Fe),h("DDDD",Jt),D(["DDD","DDDD"],function(e,t,r){r._dayOfYear=p(e)});function gi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}f("m",["mm",2],0,"minute"),h("m",k,ft),h("mm",k,R),D(["m","mm"],A);var Di=de("Minutes",!1);f("s",["ss",2],0,"second"),h("s",k,ft),h("ss",k,R),D(["s","ss"],$);var ki=de("Seconds",!1);f("S",0,0,function(){return~~(this.millisecond()/100)}),f(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),f(0,["SSS",3],0,"millisecond"),f(0,["SSSS",4],0,function(){return this.millisecond()*10}),f(0,["SSSSS",5],0,function(){return this.millisecond()*100}),f(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),f(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),f(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),f(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),h("S",Fe,Bt),h("SS",Fe,R),h("SSS",Fe,Jt);var te,Wr;for(te="SSSS";te.length<=9;te+="S")h(te,le);function Si(e,t){t[se]=p(("0."+e)*1e3)}for(te="S";te.length<=9;te+="S")D(te,Si);Wr=de("Milliseconds",!1),f("z",0,0,"zoneAbbr"),f("zz",0,0,"zoneName");function vi(){return this._isUTC?"UTC":""}function Yi(){return this._isUTC?"Coordinated Universal Time":""}var l=Me.prototype;l.add=pn,l.calendar=vn,l.clone=Yn,l.diff=Pn,l.endOf=Vn,l.format=In,l.from=Ln,l.fromNow=An,l.to=En,l.toNow=Un,l.get=Fs,l.invalidAt=Qn,l.isAfter=On,l.isBefore=Tn,l.isBetween=bn,l.isSame=xn,l.isSameOrAfter=Nn,l.isSameOrBefore=Wn,l.isValid=Bn,l.lang=vr,l.locale=Sr,l.localeData=Yr,l.max=qa,l.min=Za,l.parsingFlags=Jn,l.set=Cs,l.startOf=Hn,l.subtract=Mn,l.toArray=$n,l.toObject=Zn,l.toDate=zn,l.toISOString=Fn,l.inspect=Cn,typeof Symbol<"u"&&Symbol.for!=null&&(l[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),l.toJSON=qn,l.toString=Rn,l.unix=jn,l.valueOf=Gn,l.creationData=Xn,l.eraName=ri,l.eraNarrow=si,l.eraAbbr=ai,l.eraYear=ni,l.year=Kt,l.isLeapYear=Rs,l.weekYear=fi,l.isoWeekYear=ci,l.quarter=l.quarters=wi,l.month=ar,l.daysInMonth=js,l.week=l.weeks=Xs,l.isoWeek=l.isoWeeks=Ks,l.weeksInYear=yi,l.weeksInWeekYear=pi,l.isoWeeksInYear=mi,l.isoWeeksInISOWeekYear=_i,l.date=Nr,l.day=l.days=fa,l.weekday=ca,l.isoWeekday=ma,l.dayOfYear=gi,l.hour=l.hours=Da,l.minute=l.minutes=Di,l.second=l.seconds=ki,l.millisecond=l.milliseconds=Wr,l.utcOffset=sn,l.utc=nn,l.local=on,l.parseZone=ln,l.hasAlignedHourOffset=un,l.isDST=dn,l.isLocal=fn,l.isUtcOffset=cn,l.isUtc=Mr,l.isUTC=Mr,l.zoneAbbr=vi,l.zoneName=Yi,l.dates=F("dates accessor is deprecated. Use date instead.",Nr),l.months=F("months accessor is deprecated. Use month instead",ar),l.years=F("years accessor is deprecated. Use year instead",Kt),l.zone=F("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",an),l.isDSTShifted=F("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",hn);function Oi(e){return S(e*1e3)}function Ti(){return S.apply(null,arguments).parseZone()}function Pr(e){return e}var g=nt.prototype;g.calendar=hs,g.longDateFormat=_s,g.invalidDate=ps,g.ordinal=gs,g.preparse=Pr,g.postformat=Pr,g.relativeTime=ks,g.pastFuture=Ss,g.set=us,g.eras=Kn,g.erasParse=ei,g.erasConvertYear=ti,g.erasAbbrRegex=oi,g.erasNameRegex=ii,g.erasNarrowRegex=li,g.months=Us,g.monthsShort=Hs,g.monthsParse=Gs,g.monthsRegex=$s,g.monthsShortRegex=zs,g.week=qs,g.firstDayOfYear=Qs,g.firstDayOfWeek=Js,g.weekdays=oa,g.weekdaysMin=ua,g.weekdaysShort=la,g.weekdaysParse=ha,g.weekdaysRegex=_a,g.weekdaysShortRegex=ya,g.weekdaysMinRegex=pa,g.isPM=wa,g.meridiem=ka;function Be(e,t,r,s){var a=q(),n=U().set(s,t);return a[r](n,e)}function Rr(e,t,r){if(P(e)&&(t=e,e=void 0),e=e||"",t!=null)return Be(e,t,r,"month");var s,a=[];for(s=0;s<12;s++)a[s]=Be(e,s,r,"month");return a}function xt(e,t,r,s){typeof e=="boolean"?(P(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,P(t)&&(r=t,t=void 0),t=t||"");var a=q(),n=e?a._week.dow:0,i,d=[];if(r!=null)return Be(t,(r+n)%7,s,"day");for(i=0;i<7;i++)d[i]=Be(t,(i+n)%7,s,"day");return d}function bi(e,t){return Rr(e,t,"months")}function xi(e,t){return Rr(e,t,"monthsShort")}function Ni(e,t,r){return xt(e,t,r,"weekdays")}function Wi(e,t,r){return xt(e,t,r,"weekdaysShort")}function Pi(e,t,r){return xt(e,t,r,"weekdaysMin")}ee("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=p(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),o.lang=F("moment.lang is deprecated. Use moment.locale instead.",ee),o.langData=F("moment.langData is deprecated. Use moment.localeData instead.",q);var B=Math.abs;function Ri(){var e=this._data;return this._milliseconds=B(this._milliseconds),this._days=B(this._days),this._months=B(this._months),e.milliseconds=B(e.milliseconds),e.seconds=B(e.seconds),e.minutes=B(e.minutes),e.hours=B(e.hours),e.months=B(e.months),e.years=B(e.years),this}function Fr(e,t,r,s){var a=E(t,r);return e._milliseconds+=s*a._milliseconds,e._days+=s*a._days,e._months+=s*a._months,e._bubble()}function Fi(e,t){return Fr(this,e,t,1)}function Ci(e,t){return Fr(this,e,t,-1)}function Cr(e){return e<0?Math.floor(e):Math.ceil(e)}function Ii(){var e=this._milliseconds,t=this._days,r=this._months,s=this._data,a,n,i,d,_;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Cr(Nt(r)+t)*864e5,t=0,r=0),s.milliseconds=e%1e3,a=I(e/1e3),s.seconds=a%60,n=I(a/60),s.minutes=n%60,i=I(n/60),s.hours=i%24,t+=I(i/24),_=I(Ir(t)),r+=_,t-=Cr(Nt(_)),d=I(r/12),r%=12,s.days=t,s.months=r,s.years=d,this}function Ir(e){return e*4800/146097}function Nt(e){return e*146097/4800}function Li(e){if(!this.isValid())return NaN;var t,r,s=this._milliseconds;if(e=C(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+s/864e5,r=this._months+Ir(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Nt(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return t*24+s/36e5;case"minute":return t*1440+s/6e4;case"second":return t*86400+s/1e3;case"millisecond":return Math.floor(t*864e5)+s;default:throw new Error("Unknown unit "+e)}}function J(e){return function(){return this.as(e)}}var Lr=J("ms"),Ai=J("s"),Ei=J("m"),Ui=J("h"),Hi=J("d"),Vi=J("w"),Gi=J("M"),ji=J("Q"),zi=J("y"),$i=Lr;function Zi(){return E(this)}function qi(e){return e=C(e),this.isValid()?this[e+"s"]():NaN}function ne(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bi=ne("milliseconds"),Ji=ne("seconds"),Qi=ne("minutes"),Xi=ne("hours"),Ki=ne("days"),eo=ne("months"),to=ne("years");function ro(){return I(this.days()/7)}var Q=Math.round,me={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function so(e,t,r,s,a){return a.relativeTime(t||1,!!r,e,s)}function ao(e,t,r,s){var a=E(e).abs(),n=Q(a.as("s")),i=Q(a.as("m")),d=Q(a.as("h")),_=Q(a.as("d")),M=Q(a.as("M")),N=Q(a.as("w")),X=Q(a.as("y")),re=n<=r.ss&&["s",n]||n<r.s&&["ss",n]||i<=1&&["m"]||i<r.m&&["mm",i]||d<=1&&["h"]||d<r.h&&["hh",d]||_<=1&&["d"]||_<r.d&&["dd",_];return r.w!=null&&(re=re||N<=1&&["w"]||N<r.w&&["ww",N]),re=re||M<=1&&["M"]||M<r.M&&["MM",M]||X<=1&&["y"]||["yy",X],re[2]=t,re[3]=+e>0,re[4]=s,so.apply(null,re)}function no(e){return e===void 0?Q:typeof e=="function"?(Q=e,!0):!1}function io(e,t){return me[e]===void 0?!1:t===void 0?me[e]:(me[e]=t,e==="s"&&(me.ss=t-1),!0)}function oo(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,s=me,a,n;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(s=Object.assign({},me,t),t.s!=null&&t.ss==null&&(s.ss=t.s-1)),a=this.localeData(),n=ao(this,!r,s,a),r&&(n=a.pastFuture(+this,n)),a.postformat(n)}var Wt=Math.abs;function _e(e){return(e>0)-(e<0)||+e}function Je(){if(!this.isValid())return this.localeData().invalidDate();var e=Wt(this._milliseconds)/1e3,t=Wt(this._days),r=Wt(this._months),s,a,n,i,d=this.asSeconds(),_,M,N,X;return d?(s=I(e/60),a=I(s/60),e%=60,s%=60,n=I(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",_=d<0?"-":"",M=_e(this._months)!==_e(d)?"-":"",N=_e(this._days)!==_e(d)?"-":"",X=_e(this._milliseconds)!==_e(d)?"-":"",_+"P"+(n?M+n+"Y":"")+(r?M+r+"M":"")+(t?N+t+"D":"")+(a||s||e?"T":"")+(a?X+a+"H":"")+(s?X+s+"M":"")+(e?X+i+"S":"")):"P0D"}var w=Ge.prototype;w.isValid=Ka,w.abs=Ri,w.add=Fi,w.subtract=Ci,w.as=Li,w.asMilliseconds=Lr,w.asSeconds=Ai,w.asMinutes=Ei,w.asHours=Ui,w.asDays=Hi,w.asWeeks=Vi,w.asMonths=Gi,w.asQuarters=ji,w.asYears=zi,w.valueOf=$i,w._bubble=Ii,w.clone=Zi,w.get=qi,w.milliseconds=Bi,w.seconds=Ji,w.minutes=Qi,w.hours=Xi,w.days=Ki,w.weeks=ro,w.months=eo,w.years=to,w.humanize=oo,w.toISOString=Je,w.toString=Je,w.toJSON=Je,w.locale=Sr,w.localeData=Yr,w.toIsoString=F("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Je),w.lang=vr,f("X",0,0,"unix"),f("x",0,0,"valueOf"),h("x",Ie),h("X",Ts),D("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),D("x",function(e,t,r){r._d=new Date(p(e))});return o.version="2.30.1",xe(S),o.fn=l,o.min=Ba,o.max=Ja,o.now=Qa,o.utc=U,o.unix=Oi,o.months=bi,o.isDate=pe,o.locale=ee,o.invalid=Ne,o.duration=E,o.isMoment=L,o.weekdays=Ni,o.parseZone=Ti,o.localeData=q,o.isDuration=je,o.monthsShort=xi,o.weekdaysMin=Pi,o.defineLocale=Mt,o.updateLocale=Oa,o.locales=Ta,o.weekdaysShort=Wi,o.normalizeUnits=C,o.relativeTimeRounding=no,o.relativeTimeThreshold=io,o.calendarFormat=Sn,o.prototype=l,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o})});var ho=Qe(be(),1),is=Qe(be(),1),ie=is.default||ho,fo=new Ur("MAT_MOMENT_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:co});function co(){return{useUtc:!1}}function mo(x,o){let xe=Array(x);for(let u=0;u<x;u++)xe[u]=o(u);return xe}var os=(()=>{let o=class o extends Ke{constructor(u,c){super(),this._options=c,this.setLocale(u||ie.locale())}setLocale(u){super.setLocale(u);let c=ie.localeData(u);this._localeData={firstDayOfWeek:c.firstDayOfWeek(),longMonths:c.months(),shortMonths:c.monthsShort(),dates:mo(31,m=>this.createDate(2017,0,m+1).format("D")),longDaysOfWeek:c.weekdays(),shortDaysOfWeek:c.weekdaysShort(),narrowDaysOfWeek:c.weekdaysMin()}}getYear(u){return this.clone(u).year()}getMonth(u){return this.clone(u).month()}getDate(u){return this.clone(u).date()}getDayOfWeek(u){return this.clone(u).day()}getMonthNames(u){return u=="long"?this._localeData.longMonths:this._localeData.shortMonths}getDateNames(){return this._localeData.dates}getDayOfWeekNames(u){return u=="long"?this._localeData.longDaysOfWeek:u=="short"?this._localeData.shortDaysOfWeek:this._localeData.narrowDaysOfWeek}getYearName(u){return this.clone(u).format("YYYY")}getFirstDayOfWeek(){return this._localeData.firstDayOfWeek}getNumDaysInMonth(u){return this.clone(u).daysInMonth()}clone(u){return u.clone().locale(this.locale)}createDate(u,c,m){let W=this._createMoment({year:u,month:c,date:m}).locale(this.locale);return W.isValid(),W}today(){return this._createMoment().locale(this.locale)}parse(u,c){return u&&typeof u=="string"?this._createMoment(u,c,this.locale):u?this._createMoment(u).locale(this.locale):null}format(u,c){return u=this.clone(u),this.isValid(u),u.format(c)}addCalendarYears(u,c){return this.clone(u).add({years:c})}addCalendarMonths(u,c){return this.clone(u).add({months:c})}addCalendarDays(u,c){return this.clone(u).add({days:c})}toIso8601(u){return this.clone(u).format()}deserialize(u){let c;if(u instanceof Date)c=this._createMoment(u).locale(this.locale);else if(this.isDateInstance(u))return this.clone(u);if(typeof u=="string"){if(!u)return null;c=this._createMoment(u,ie.ISO_8601).locale(this.locale)}return c&&this.isValid(c)?this._createMoment(c).locale(this.locale):super.deserialize(u)}isDateInstance(u){return ie.isMoment(u)}isValid(u){return this.clone(u).isValid()}invalid(){return ie.invalid()}_createMoment(u,c,m){let{strict:W,useUtc:O}=this._options||{};return O?ie.utc(u,c,m,W):ie(u,c,m,W)}};o.\u0275fac=function(c){return new(c||o)(Pt(Xe,8),Pt(fo,8))},o.\u0275prov=Er({token:o,factory:o.\u0275fac});let x=o;return x})();var Ho=Qe(be()),_o=Qe(be());var yo={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Vo=(()=>{let o=class o{ngAfterViewInit(){}change(u){console.log(u);let c=u.toDate();console.log(c),this.dateChange.emit(c)}constructor(){this.disabled=!1,this.dateChange=new jr,this.width="100%",this.displayToggle=!0}onOpenDatepicker(){var u=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));u&&(u._config.autoClose="inside")}onCloseDatepicker(){var u=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));u&&(u._config.autoClose="outside")}};o.\u0275fac=function(c){return new(c||o)},o.\u0275cmp=Hr({type:o,selectors:[["datepicker"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",width:"width"},outputs:{dateChange:"dateChange"},standalone:!0,features:[Br([Ut,{provide:Ke,useClass:os,deps:[Xe]},{provide:Et,useValue:yo}]),Jr],decls:5,vars:6,consts:[[1,"date-picker"],["matInput","",3,"matDatepicker","placeholder","value","dateChange","click"],["matSuffix","",3,"for"],[3,"opened","closed"],["picker1",""]],template:function(c,m){if(c&1){let W=Zr();Ct(0,"mat-form-field",0)(1,"input",1),Lt("dateChange",function(P){return m.change(P.value)})("click",function(){Vr(W);let P=At(4);return Gr(P.open())}),It(),$r(2,"mat-datepicker-toggle",2),Ct(3,"mat-datepicker",3,4),Lt("opened",function(){return m.onOpenDatepicker()})("closed",function(){return m.onCloseDatepicker()}),It()()}if(c&2){let W=At(4);zr("width",m.width),Rt(1),qr("placeholder",m.placeholder||""),Ft("matDatepicker",W)("value",m.date),Rt(1),Ft("for",W)}},dependencies:[Qr,Ut,ss,as,ns,es,Kr,Xr,rs,ts],styles:[`mat-form-field.date-picker.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{background-color:#fff!important;height:45px!important;font-size:14px;padding-left:4px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{e as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-FYZEL73T.js";import{c as d}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SLQJFLQ4.js";import{$ as b,B as h,F as p,O as c,Q as l,V as g,X as m,Y as f,c as u,ca as P,d as n,q as s}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";var j=(()=>{let i=class i{constructor(t){this.http=t,this.pagination$=new n(null),this.destroy$=new u,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this.footerPageNumber=t.PageNumber}setPaginationButtonState(t,e){e==0?this.disableNextButton=!0:this.disableNextButton=!(e<t.RowCount*t.PageNumber)}reloadPagination(t){d.IsEmpty(t.PageNumber)&&(t.PageNumber=1),this.pagination$.next(t),this.hideCount=!0,this.goToLastPage=!1}getAllData(t,e){t.RowCount=e,this.pagination$.next(t),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new n(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe(g(this.destroy$),h(t=>t!=null),p(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(s(e=>e.Data))),f(this.pagination$),c((t,e)=>{let[N,o]=t,[r]=e;return o.PageNumber==1?[r,o]:[N.concat(r),o]}),m(([t,e])=>{this.setPageNumberFooter(e),this.setPaginationButtonState(e,t.length)}),s(([t])=>t),l())}};i.\u0275fac=function(e){return new(e||i)(P($))},i.\u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"});let a=i;return a})();export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Ue,e as $e,h as Ze}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-TH3YEBZM.js";import{b as Le,e as Ve,f as We,m as Z,n as T,o as E,p as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MSDWP3Z5.js";import{$ as Ye,B as Fe,F as Pe,J,K as je,M as Ke,N as Ne,O as qe,U as He,Y as Ge,Z as Qe,_ as ze,a as b,aa as Xe,b as Te,ba as ee,g as U,r as Ee,s as $,u as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-K2D3HYO3.js";import{e as Ie,g as xe,j as Ae,n as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-ZKFCU6QY.js";import{$a as fe,A as O,Ac as D,B as L,Ba as he,Bc as Se,Cc as ke,Fa as u,Ga as l,I as V,Ia as pe,Ib as f,Ja as w,Jb as I,K as ae,Ka as me,Kb as x,La as ue,Lb as y,Na as S,Oa as q,Qa as _e,S as W,Sa as ge,T as B,Ua as k,V as m,Va as H,Yb as Oe,Za as h,_a as _,aa as ne,ba as M,c as C,da as re,db as ye,ea as se,fa as oe,gc as Me,hb as v,ia as le,ja as j,jb as g,ka as K,kb as ve,la as N,lb as G,ma as ce,oa as de,ob as be,pb as Q,q as P,qb as z,tb as Ce,tc as Y,uc as X,v as ie,xc as A,yc as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";var ut=["trigger"],_t=["panel"];function gt(n,r){if(n&1&&(h(0,"span",9),Q(1),_()),n&2){let s=g();u(1),z(s.placeholder)}}function ft(n,r){n&1&&G(0)}function yt(n,r){if(n&1&&(h(0,"span",11),Q(1),_()),n&2){let s=g(2);u(1),z(s.triggerValue)}}function vt(n,r){if(n&1&&(h(0,"span",10),k(1,ft,1,0)(2,yt,2,1),_()),n&2){let s=g();u(1),H(1,s.customTrigger?1:2)}}function bt(n,r){if(n&1){let s=ye();N(),ce(),h(0,"div",12,13),v("@transformPanel.done",function(t){j(s);let i=g();return K(i._panelDoneAnimatingStream.next(t.toState))})("keydown",function(t){j(s);let i=g();return K(i._handleKeydown(t))}),G(2,1),_()}if(n&2){let s=g();ge("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",s._getPanelTheme(),""),q("ngClass",s.panelClass)("@transformPanel","showing"),S("id",s.id+"-panel")("aria-multiselectable",s.multiple)("aria-label",s.ariaLabel||null)("aria-labelledby",s._getPanelAriaLabelledby())}}var Ct=[[["mat-select-trigger"]],"*"],Ot=["mat-select-trigger","*"],Mt={transformPanelWrap:Y("transformPanelWrap",[D("* => void",ke("@transformPanel",[Se()],{optional:!0}))]),transformPanel:Y("transformPanel",[we("void",A({opacity:0,transform:"scale(1, 0.8)"})),D("void => showing",X("120ms cubic-bezier(0, 0, 0.2, 1)",A({opacity:1,transform:"scale(1, 1)"}))),D("* => void",X("100ms linear",A({opacity:0})))])};var at=0,nt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Z);return()=>n.scrollStrategies.reposition()}});function wt(n){return()=>n.scrollStrategies.reposition()}var St=new M("MAT_SELECT_CONFIG"),kt={provide:nt,deps:[Z],useFactory:wt},It=new M("MatSelectTrigger"),te=class{constructor(r,s){this.source=r,this.value=s}},xt=Ke(Ne(je(qe(class{constructor(n,r,s,e,t){this._elementRef=n,this._defaultErrorStateMatcher=r,this._parentForm=s,this._parentFormGroup=e,this.ngControl=t,this.stateChanges=new C}})))),pi=(()=>{let r=class r extends xt{_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Ye(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Xe(o.offsetTop,o.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new te(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=b(e),this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ie.required)??!1}set required(e){this._required=b(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=b(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=b(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Te(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,t,i,a,o,p,c,rt,st,ot,lt,ct,dt,R){super(o,a,c,rt,ot),this._viewportRuler=e,this._changeDetectorRef=t,this._ngZone=i,this._dir=p,this._parentFormField=st,this._liveAnnouncer=dt,this._defaultOptions=R,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(d,F)=>d===F,this._uid=`mat-select-${at++}`,this._triggerAriaLabelledBy=null,this._destroy=new C,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${at++}`,this._panelDoneAnimatingStream=new C,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=ie(()=>{let d=this.options;return d?d.changes.pipe(W(d),B(()=>O(...d.map(F=>F.onSelectionChange)))):this._ngZone.onStable.pipe(V(1),B(()=>this.optionSelectionChanges))}),this.openedChange=new w,this._openedStream=this.openedChange.pipe(L(d=>d),P(()=>{})),this._closedStream=this.openedChange.pipe(L(d=>!d),P(()=>{})),this.selectionChange=new w,this.valueChange=new w,this._trackedModal=null,this._skipPredicate=d=>this.panelOpen?!1:d.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),R?.typeaheadDebounceInterval!=null&&(this._typeaheadDebounceInterval=R.typeaheadDebounceInterval),this._scrollStrategyFactory=ct,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(lt)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Le(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ae(),m(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(m(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(m(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(W(null),m(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck()),this.stateChanges.next()}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&$(this._trackedModal,"aria-owns",t),Ee(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched()),this.stateChanges.next()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&a&&!U(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let c=this.selected;c&&p!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,o=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!o&&(i===13||i===32)&&t.activeItem&&!U(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(p?c.select():c.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(V(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return i.value!=null&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof T?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Re(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(m(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(m(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};r.\u0275fac=function(t){return new(t||r)(l(Ve),l(pe),l(me),l(He),l(he),l(Pe,8),l(Ae,8),l(De,8),l($e,8),l(xe,10),de("tabindex"),l(nt),l(Fe),l(St,8))},r.\u0275cmp=se({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&(x(a,It,5),x(a,ze,5),x(a,Qe,5)),t&2){let o;f(o=y())&&(i.customTrigger=o.first),f(o=y())&&(i.options=o),f(o=y())&&(i.optionGroups=o)}},viewQuery:function(t,i){if(t&1&&(I(ut,5),I(_t,5),I(E,5)),t&2){let a;f(a=y())&&(i.trigger=a.first),f(a=y())&&(i.panel=a.first),f(a=y())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){t&1&&v("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(S("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),_e("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ce([{provide:Ue,useExisting:r},{provide:Ge,useExisting:r}]),ue,le],ngContentSelectors:Ot,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(t&1&&(ve(Ct),h(0,"div",0,1),v("click",function(){return i.toggle()}),h(3,"div",2),k(4,gt,2,1,"span",3)(5,vt,3,1),_(),h(6,"div",4)(7,"div",5),N(),h(8,"svg",6),fe(9,"path",7),_()()()(),k(10,bt,3,9,"ng-template",8),v("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),t&2){let a=be(1);u(3),S("id",i._valueId),u(1),H(4,i.empty?4:5),u(6),q("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Oe,E,T],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Mt.transformPanel]},changeDetection:0});let n=r;return n})();var mi=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[kt],imports:[Me,Be,ee,J,We,Ze,ee,J]});let n=r;return n})();export{pi as a,mi as b};
|
|
1
|
+
import{d as Ue,e as $e,h as Ze}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TPZUQ3VA.js";import{b as Le,e as Ve,f as We,m as Z,n as T,o as E,p as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-AR5AIUY5.js";import{$ as Ye,B as Fe,F as Pe,J,K as je,M as Ke,N as Ne,O as qe,U as He,Y as Ge,Z as Qe,_ as ze,a as b,aa as Xe,b as Te,ba as ee,g as U,r as Ee,s as $,u as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-2VBEH64C.js";import{e as Ie,g as xe,j as Ae,n as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-TXDNQ6BP.js";import{$a as fe,A as O,Ac as D,B as L,Ba as he,Bc as Se,Cc as ke,Fa as u,Ga as l,I as V,Ia as pe,Ib as f,Ja as w,Jb as I,K as ae,Ka as me,Kb as x,La as ue,Lb as y,Na as S,Oa as q,Qa as _e,S as W,Sa as ge,T as B,Ua as k,V as m,Va as H,Yb as Oe,Za as h,_a as _,aa as ne,ba as M,c as C,da as re,db as ye,ea as se,fa as oe,gc as Me,hb as v,ia as le,ja as j,jb as g,ka as K,kb as ve,la as N,lb as G,ma as ce,oa as de,ob as be,pb as Q,q as P,qb as z,tb as Ce,tc as Y,uc as X,v as ie,xc as A,yc as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";var ut=["trigger"],_t=["panel"];function gt(n,r){if(n&1&&(h(0,"span",9),Q(1),_()),n&2){let s=g();u(1),z(s.placeholder)}}function ft(n,r){n&1&&G(0)}function yt(n,r){if(n&1&&(h(0,"span",11),Q(1),_()),n&2){let s=g(2);u(1),z(s.triggerValue)}}function vt(n,r){if(n&1&&(h(0,"span",10),k(1,ft,1,0)(2,yt,2,1),_()),n&2){let s=g();u(1),H(1,s.customTrigger?1:2)}}function bt(n,r){if(n&1){let s=ye();N(),ce(),h(0,"div",12,13),v("@transformPanel.done",function(t){j(s);let i=g();return K(i._panelDoneAnimatingStream.next(t.toState))})("keydown",function(t){j(s);let i=g();return K(i._handleKeydown(t))}),G(2,1),_()}if(n&2){let s=g();ge("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",s._getPanelTheme(),""),q("ngClass",s.panelClass)("@transformPanel","showing"),S("id",s.id+"-panel")("aria-multiselectable",s.multiple)("aria-label",s.ariaLabel||null)("aria-labelledby",s._getPanelAriaLabelledby())}}var Ct=[[["mat-select-trigger"]],"*"],Ot=["mat-select-trigger","*"],Mt={transformPanelWrap:Y("transformPanelWrap",[D("* => void",ke("@transformPanel",[Se()],{optional:!0}))]),transformPanel:Y("transformPanel",[we("void",A({opacity:0,transform:"scale(1, 0.8)"})),D("void => showing",X("120ms cubic-bezier(0, 0, 0.2, 1)",A({opacity:1,transform:"scale(1, 1)"}))),D("* => void",X("100ms linear",A({opacity:0})))])};var at=0,nt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Z);return()=>n.scrollStrategies.reposition()}});function wt(n){return()=>n.scrollStrategies.reposition()}var St=new M("MAT_SELECT_CONFIG"),kt={provide:nt,deps:[Z],useFactory:wt},It=new M("MatSelectTrigger"),te=class{constructor(r,s){this.source=r,this.value=s}},xt=Ke(Ne(je(qe(class{constructor(n,r,s,e,t){this._elementRef=n,this._defaultErrorStateMatcher=r,this._parentForm=s,this._parentFormGroup=e,this.ngControl=t,this.stateChanges=new C}})))),pi=(()=>{let r=class r extends xt{_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Ye(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Xe(o.offsetTop,o.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new te(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=b(e),this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ie.required)??!1}set required(e){this._required=b(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=b(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=b(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=Te(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,t,i,a,o,p,c,rt,st,ot,lt,ct,dt,R){super(o,a,c,rt,ot),this._viewportRuler=e,this._changeDetectorRef=t,this._ngZone=i,this._dir=p,this._parentFormField=st,this._liveAnnouncer=dt,this._defaultOptions=R,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(d,F)=>d===F,this._uid=`mat-select-${at++}`,this._triggerAriaLabelledBy=null,this._destroy=new C,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${at++}`,this._panelDoneAnimatingStream=new C,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this.optionSelectionChanges=ie(()=>{let d=this.options;return d?d.changes.pipe(W(d),B(()=>O(...d.map(F=>F.onSelectionChange)))):this._ngZone.onStable.pipe(V(1),B(()=>this.optionSelectionChanges))}),this.openedChange=new w,this._openedStream=this.openedChange.pipe(L(d=>d),P(()=>{})),this._closedStream=this.openedChange.pipe(L(d=>!d),P(()=>{})),this.selectionChange=new w,this.valueChange=new w,this._trackedModal=null,this._skipPredicate=d=>this.panelOpen?!1:d.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),R?.typeaheadDebounceInterval!=null&&(this._typeaheadDebounceInterval=R.typeaheadDebounceInterval),this._scrollStrategyFactory=ct,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(lt)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Le(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(ae(),m(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(m(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(m(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(W(null),m(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck()),this.stateChanges.next()}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&$(this._trackedModal,"aria-owns",t),Ee(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched()),this.stateChanges.next()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&a&&!U(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let c=this.selected;c&&p!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,o=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!o&&(i===13||i===32)&&t.activeItem&&!U(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(p?c.select():c.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(V(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return i.value!=null&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof T?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Re(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(m(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(m(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),t=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};r.\u0275fac=function(t){return new(t||r)(l(Ve),l(pe),l(me),l(He),l(he),l(Pe,8),l(Ae,8),l(De,8),l($e,8),l(xe,10),de("tabindex"),l(nt),l(Fe),l(St,8))},r.\u0275cmp=se({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&(x(a,It,5),x(a,ze,5),x(a,Qe,5)),t&2){let o;f(o=y())&&(i.customTrigger=o.first),f(o=y())&&(i.options=o),f(o=y())&&(i.optionGroups=o)}},viewQuery:function(t,i){if(t&1&&(I(ut,5),I(_t,5),I(E,5)),t&2){let a;f(a=y())&&(i.trigger=a.first),f(a=y())&&(i.panel=a.first),f(a=y())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(t,i){t&1&&v("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(S("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),_e("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",hideSingleSelectionIndicator:"hideSingleSelectionIndicator",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[Ce([{provide:Ue,useExisting:r},{provide:Ge,useExisting:r}]),ue,le],ngContentSelectors:Ot,decls:11,vars:8,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,i){if(t&1&&(ve(Ct),h(0,"div",0,1),v("click",function(){return i.toggle()}),h(3,"div",2),k(4,gt,2,1,"span",3)(5,vt,3,1),_(),h(6,"div",4)(7,"div",5),N(),h(8,"svg",6),fe(9,"path",7),_()()()(),k(10,bt,3,9,"ng-template",8),v("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),t&2){let a=be(1);u(3),S("id",i._valueId),u(1),H(4,i.empty?4:5),u(6),q("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[Oe,E,T],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Mt.transformPanel]},changeDetection:0});let n=r;return n})();var mi=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[kt],imports:[Me,Be,ee,J,We,Ze,ee,J]});let n=r;return n})();export{pi as a,mi as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as cr,b as dr,e as js,g as re,h as a,i as it}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-CRNJ2Q5T.js";var ur=function(n){let e=[],t=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);r<128?e[t++]=r:r<2048?(e[t++]=r>>6|192,e[t++]=r&63|128):(r&64512)===55296&&i+1<n.length&&(n.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),e[t++]=r>>18|240,e[t++]=r>>12&63|128,e[t++]=r>>6&63|128,e[t++]=r&63|128):(e[t++]=r>>12|224,e[t++]=r>>6&63|128,e[t++]=r&63|128)}return e},Gs=function(n){let e=[],t=0,i=0;for(;t<n.length;){let r=n[t++];if(r<128)e[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=n[t++];e[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=n[t++],o=n[t++],c=n[t++],d=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;e[i++]=String.fromCharCode(55296+(d>>10)),e[i++]=String.fromCharCode(56320+(d&1023))}else{let s=n[t++],o=n[t++];e[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},hr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,e){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();let t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r<n.length;r+=3){let s=n[r],o=r+1<n.length,c=o?n[r+1]:0,d=r+2<n.length,l=d?n[r+2]:0,h=s>>2,f=(s&3)<<4|c>>4,m=(c&15)<<2|l>>6,S=l&63;d||(S=64,o||(m=64)),i.push(t[h],t[f],t[m],t[S])}return i.join("")},encodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(n):this.encodeByteArray(ur(n),e)},decodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(n):Gs(this.decodeStringToByteArray(n,e))},decodeStringToByteArray(n,e){this.init_();let t=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<n.length;){let s=t[n.charAt(r++)],c=r<n.length?t[n.charAt(r)]:0;++r;let l=r<n.length?t[n.charAt(r)]:64;++r;let f=r<n.length?t[n.charAt(r)]:64;if(++r,s==null||c==null||l==null||f==null)throw new qt;let m=s<<2|c>>4;if(i.push(m),l!==64){let S=c<<4&240|l>>2;if(i.push(S),f!==64){let ie=l<<6&192|f;i.push(ie)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}},qt=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},qs=function(n){let e=ur(n);return hr.encodeByteArray(e,!0)},Yt=function(n){return qs(n).replace(/\./g,"")},Jt=function(n){try{return hr.decodeString(n,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function Ne(n,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let t=e;return new Date(t.getTime());case Object:n===void 0&&(n={});break;case Array:n=[];break;default:return e}for(let t in e)!e.hasOwnProperty(t)||!Ks(t)||(n[t]=Ne(n[t],e[t]));return n}function Ks(n){return n!=="__proto__"}function Ys(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var Js=()=>Ys().__FIREBASE_DEFAULTS__,Xs=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},Qs=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=n&&Jt(n[1]);return e&&JSON.parse(e)},Xt=()=>{try{return Js()||Xs()||Qs()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}};var Qt=()=>{var n;return(n=Xt())===null||n===void 0?void 0:n.config},fr=n=>{var e;return(e=Xt())===null||e===void 0?void 0:e[`_${n}`]};var rt=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,i)=>{t?this.reject(t):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,i))}}};function v(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function pr(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(v())}function Zt(){var n;let e=(n=Xt())===null||n===void 0?void 0:n.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function mr(){return typeof self=="object"&&self.self===self}function st(){let n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Oe(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function ot(){let n=v();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Ee(){try{return typeof indexedDB=="object"}catch{return!1}}function gr(){return new Promise((n,e)=>{try{let t=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(t){e(t)}})}var Zs="FirebaseError",T=class n extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name=Zs,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,C.prototype.create)}},C=class{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){let i=t[0]||{},r=`${this.service}/${e}`,s=this.errors[e],o=s?eo(s,i):"Error",c=`${this.serviceName}: ${o} (${r}).`;return new T(r,c,i)}};function eo(n,e){return n.replace(to,(t,i)=>{let r=e[i];return r!=null?String(r):`<${i}?>`})}var to=/\{\$([^}]+)}/g;function en(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function _r(n){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}function De(n,e){if(n===e)return!0;let t=Object.keys(n),i=Object.keys(e);for(let r of t){if(!i.includes(r))return!1;let s=n[r],o=e[r];if(lr(s)&&lr(o)){if(!De(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!t.includes(r))return!1;return!0}function lr(n){return n!==null&&typeof n=="object"}function se(n){let e=[];for(let[t,i]of Object.entries(n))Array.isArray(i)?i.forEach(r=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function Y(n){let e={};return n.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[r,s]=i.split("=");e[decodeURIComponent(r)]=decodeURIComponent(s)}}),e}function ye(n){let e=n.indexOf("?");if(!e)return"";let t=n.indexOf("#",e);return n.substring(e,t>0?t:void 0)}function at(n,e){let t=new Kt(n,e);return t.subscribe.bind(t)}var Kt=class{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,i){let r;if(e===void 0&&t===void 0&&i===void 0)throw new Error("Missing Observer.");no(e,["next","error","complete"])?r=e:r={next:e,error:t,complete:i},r.next===void 0&&(r.next=Gt),r.error===void 0&&(r.error=Gt),r.complete===void 0&&(r.complete=Gt);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function no(n,e){if(typeof n!="object"||n===null)return!1;for(let t of e)if(t in n&&typeof n[t]=="function")return!0;return!1}function Gt(){}var al=4*60*60*1e3;function p(n){return n&&n._delegate?n._delegate:n}var R=class{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var oe="[DEFAULT]";var tn=class{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let i=new rt;if(this.instancesDeferred.set(t,i),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let i=this.normalizeInstanceIdentifier(e?.identifier),r=(t=e?.optional)!==null&&t!==void 0?t:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ro(e))try{this.getOrInitializeService({instanceIdentifier:oe})}catch{}for(let[t,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(t);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch{}}}}clearInstance(e=oe){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return a(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=oe){return this.instances.has(e)}getOptions(e=oe){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:i,options:t});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(e,t){var i;let r=this.normalizeInstanceIdentifier(t),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){let i=this.onInitCallbacks.get(t);if(i)for(let r of i)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:io(e),options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=oe){return this.component?this.component.multipleInstances?e:oe:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function io(n){return n===oe?void 0:n}function ro(n){return n.instantiationMode==="EAGER"}var ct=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new tn(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}};var En={};js(En,{FirebaseError:()=>T,SDK_VERSION:()=>j,_DEFAULT_ENTRY_NAME:()=>U,_addComponent:()=>xe,_addOrOverwriteComponent:()=>mn,_apps:()=>X,_clearComponents:()=>Go,_components:()=>Le,_getProvider:()=>gn,_registerComponent:()=>$,_removeServiceInstance:()=>jo,deleteApp:()=>_n,getApp:()=>Or,getApps:()=>Ko,initializeApp:()=>lt,onLog:()=>vn,registerVersion:()=>O,setLogLevel:()=>In});var nn=[],g=function(n){return n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",n}(g||{}),vr={debug:g.DEBUG,verbose:g.VERBOSE,info:g.INFO,warn:g.WARN,error:g.ERROR,silent:g.SILENT},so=g.INFO,oo={[g.DEBUG]:"log",[g.VERBOSE]:"log",[g.INFO]:"info",[g.WARN]:"warn",[g.ERROR]:"error"},ao=(n,e,...t)=>{if(e<n.logLevel)return;let i=new Date().toISOString(),r=oo[e];if(r)console[r](`[${i}] ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},J=class{constructor(e){this.name=e,this._logLevel=so,this._logHandler=ao,this._userLogHandler=null,nn.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in g))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?vr[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,g.DEBUG,...e),this._logHandler(this,g.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,g.VERBOSE,...e),this._logHandler(this,g.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,g.INFO,...e),this._logHandler(this,g.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,g.WARN,...e),this._logHandler(this,g.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,g.ERROR,...e),this._logHandler(this,g.ERROR,...e)}};function Ir(n){nn.forEach(e=>{e.setLogLevel(n)})}function Er(n,e){for(let t of nn){let i=null;e&&e.level&&(i=vr[e.level]),n===null?t.userLogHandler=null:t.userLogHandler=(r,s,...o)=>{let c=o.map(d=>{if(d==null)return null;if(typeof d=="string")return d;if(typeof d=="number"||typeof d=="boolean")return d.toString();if(d instanceof Error)return d.message;try{return JSON.stringify(d)}catch{return null}}).filter(d=>d).join(" ");s>=(i??r.logLevel)&&n({level:g[s].toLowerCase(),message:c,args:o,type:r.name})}}}var co=(n,e)=>e.some(t=>n instanceof t),yr,wr;function lo(){return yr||(yr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function uo(){return wr||(wr=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Tr=new WeakMap,sn=new WeakMap,br=new WeakMap,rn=new WeakMap,an=new WeakMap;function ho(n){let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(x(n.result)),r()},o=()=>{i(n.error),r()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&Tr.set(t,n)}).catch(()=>{}),an.set(e,n),e}function fo(n){if(sn.has(n))return;let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});sn.set(n,e)}var on={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return sn.get(n);if(e==="objectStoreNames")return n.objectStoreNames||br.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return x(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function Ar(n){on=n(on)}function po(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){let i=n.call(dt(this),e,...t);return br.set(i,e.sort?e.sort():[e]),x(i)}:uo().includes(n)?function(...e){return n.apply(dt(this),e),x(Tr.get(this))}:function(...e){return x(n.apply(dt(this),e))}}function mo(n){return typeof n=="function"?po(n):(n instanceof IDBTransaction&&fo(n),co(n,lo())?new Proxy(n,on):n)}function x(n){if(n instanceof IDBRequest)return ho(n);if(rn.has(n))return rn.get(n);let e=mo(n);return e!==n&&(rn.set(n,e),an.set(e,n)),e}var dt=n=>an.get(n);function Rr(n,e,{blocked:t,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(n,e),c=x(o);return i&&o.addEventListener("upgradeneeded",d=>{i(x(o.result),d.oldVersion,d.newVersion,x(o.transaction),d)}),t&&o.addEventListener("blocked",d=>t(d.oldVersion,d.newVersion,d)),c.then(d=>{s&&d.addEventListener("close",()=>s()),r&&d.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}var go=["get","getKey","getAll","getAllKeys","count"],_o=["put","add","delete","clear"],cn=new Map;function Sr(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(cn.get(e))return cn.get(e);let t=e.replace(/FromIndex$/,""),i=e!==t,r=_o.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(r||go.includes(t)))return;let s=function(o,...c){return a(this,null,function*(){let d=this.transaction(o,r?"readwrite":"readonly"),l=d.store;return i&&(l=l.index(c.shift())),(yield Promise.all([l[t](...c),r&&d.done]))[0]})};return cn.set(e,s),s}Ar(n=>dr(cr({},n),{get:(e,t,i)=>Sr(e,t)||n.get(e,t,i),has:(e,t)=>!!Sr(e,t)||n.has(e,t)}));var ln=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(vo(t)){let i=t.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(t=>t).join(" ")}};function vo(n){let e=n.getComponent();return e?.type==="VERSION"}var un="@firebase/app",Pr="0.9.25";var ae=new J("@firebase/app"),Io="@firebase/app-compat",Eo="@firebase/analytics-compat",yo="@firebase/analytics",wo="@firebase/app-check-compat",To="@firebase/app-check",bo="@firebase/auth",Ao="@firebase/auth-compat",So="@firebase/database",Ro="@firebase/database-compat",Po="@firebase/functions",ko="@firebase/functions-compat",Co="@firebase/installations",No="@firebase/installations-compat",Oo="@firebase/messaging",Do="@firebase/messaging-compat",Lo="@firebase/performance",Mo="@firebase/performance-compat",xo="@firebase/remote-config",Uo="@firebase/remote-config-compat",Fo="@firebase/storage",Vo="@firebase/storage-compat",Wo="@firebase/firestore",Ho="@firebase/firestore-compat",Bo="firebase",zo="10.7.1";var U="[DEFAULT]",$o={[un]:"fire-core",[Io]:"fire-core-compat",[yo]:"fire-analytics",[Eo]:"fire-analytics-compat",[To]:"fire-app-check",[wo]:"fire-app-check-compat",[bo]:"fire-auth",[Ao]:"fire-auth-compat",[So]:"fire-rtdb",[Ro]:"fire-rtdb-compat",[Po]:"fire-fn",[ko]:"fire-fn-compat",[Co]:"fire-iid",[No]:"fire-iid-compat",[Oo]:"fire-fcm",[Do]:"fire-fcm-compat",[Lo]:"fire-perf",[Mo]:"fire-perf-compat",[xo]:"fire-rc",[Uo]:"fire-rc-compat",[Fo]:"fire-gcs",[Vo]:"fire-gcs-compat",[Wo]:"fire-fst",[Ho]:"fire-fst-compat","fire-js":"fire-js",[Bo]:"fire-js-all"};var X=new Map,Le=new Map;function xe(n,e){try{n.container.addComponent(e)}catch(t){ae.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`,t)}}function mn(n,e){n.container.addOrOverwriteComponent(e)}function $(n){let e=n.name;if(Le.has(e))return ae.debug(`There were multiple attempts to register component ${e}.`),!1;Le.set(e,n);for(let t of X.values())xe(t,n);return!0}function gn(n,e){let t=n.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),n.container.getProvider(e)}function jo(n,e,t=U){gn(n,e).clearInstance(t)}function Go(){Le.clear()}var qo={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},z=new C("app","Firebase",qo);var hn=class{constructor(e,t,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new R("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw z.create("app-deleted",{appName:this._name})}};var j=zo;function lt(n,e={}){let t=n;typeof e!="object"&&(e={name:e});let i=Object.assign({name:U,automaticDataCollectionEnabled:!1},e),r=i.name;if(typeof r!="string"||!r)throw z.create("bad-app-name",{appName:String(r)});if(t||(t=Qt()),!t)throw z.create("no-options");let s=X.get(r);if(s){if(De(t,s.options)&&De(i,s.config))return s;throw z.create("duplicate-app",{appName:r})}let o=new ct(r);for(let d of Le.values())o.addComponent(d);let c=new hn(t,i,o);return X.set(r,c),c}function Or(n=U){let e=X.get(n);if(!e&&n===U&&Qt())return lt();if(!e)throw z.create("no-app",{appName:n});return e}function Ko(){return Array.from(X.values())}function _n(n){return a(this,null,function*(){let e=n.name;X.has(e)&&(X.delete(e),yield Promise.all(n.container.getProviders().map(t=>t.delete())),n.isDeleted=!0)})}function O(n,e,t){var i;let r=(i=$o[n])!==null&&i!==void 0?i:n;t&&(r+=`-${t}`);let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let c=[`Unable to register library "${r}" with version "${e}":`];s&&c.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${e}" contains illegal characters (whitespace or "/")`),ae.warn(c.join(" "));return}$(new R(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}function vn(n,e){if(n!==null&&typeof n!="function")throw z.create("invalid-log-argument");Er(n,e)}function In(n){Ir(n)}var Yo="firebase-heartbeat-database",Jo=1,Me="firebase-heartbeat-store",dn=null;function Dr(){return dn||(dn=Rr(Yo,Jo,{upgrade:(n,e)=>{switch(e){case 0:n.createObjectStore(Me)}}}).catch(n=>{throw z.create("idb-open",{originalErrorMessage:n.message})})),dn}function Xo(n){return a(this,null,function*(){try{return yield(yield Dr()).transaction(Me).objectStore(Me).get(Lr(n))}catch(e){if(e instanceof T)ae.warn(e.message);else{let t=z.create("idb-get",{originalErrorMessage:e?.message});ae.warn(t.message)}}})}function kr(n,e){return a(this,null,function*(){try{let i=(yield Dr()).transaction(Me,"readwrite");yield i.objectStore(Me).put(e,Lr(n)),yield i.done}catch(t){if(t instanceof T)ae.warn(t.message);else{let i=z.create("idb-set",{originalErrorMessage:t?.message});ae.warn(i.message)}}})}function Lr(n){return`${n.name}!${n.options.appId}`}var Qo=1024,Zo=30*24*60*60*1e3,fn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new pn(t),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return a(this,null,function*(){var e,t;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Cr();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let c=new Date(o.date).valueOf();return Date.now()-c<=Zo}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return a(this,null,function*(){var e;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let t=Cr(),{heartbeatsToSend:i,unsentEntries:r}=ea(this._heartbeatsCache.heartbeats),s=Yt(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s})}};function Cr(){return new Date().toISOString().substring(0,10)}function ea(n,e=Qo){let t=[],i=n.slice();for(let r of n){let s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Nr(t)>e){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),Nr(t)>e){t.pop();break}i=i.slice(1)}return{heartbeatsToSend:t,unsentEntries:i}}var pn=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return a(this,null,function*(){return Ee()?gr().then(()=>!0).catch(()=>!1):!1})}read(){return a(this,null,function*(){if(yield this._canUseIndexedDBPromise){let t=yield Xo(this.app);return t?.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return kr(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return kr(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function Nr(n){return Yt(JSON.stringify({version:2,heartbeats:n})).length}function ta(n){$(new R("platform-logger",e=>new ln(e),"PRIVATE")),$(new R("heartbeat",e=>new fn(e),"PRIVATE")),O(un,Pr,n),O(un,Pr,"esm2017"),O("fire-js","")}ta("");var yn=class{constructor(e,t){this._delegate=e,this.firebase=t,xe(e,new R("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),_n(this._delegate)))}_getService(e,t=U){var i;this._delegate.checkDestroyed();let r=this._delegate.container.getProvider(e);return!r.isInitialized()&&((i=r.getComponent())===null||i===void 0?void 0:i.instantiationMode)==="EXPLICIT"&&r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=U){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){xe(this._delegate,e)}_addOrOverwriteComponent(e){mn(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}};var na={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},Mr=new C("app-compat","Firebase",na);function ia(n){let e={},t={__esModule:!0,initializeApp:s,app:r,registerVersion:O,setLogLevel:In,onLog:vn,apps:null,SDK_VERSION:j,INTERNAL:{registerComponent:c,removeApp:i,useAsService:d,modularAPIs:En}};t.default=t,Object.defineProperty(t,"apps",{get:o});function i(l){delete e[l]}function r(l){if(l=l||U,!en(e,l))throw Mr.create("no-app",{appName:l});return e[l]}r.App=n;function s(l,h={}){let f=lt(l,h);if(en(e,f.name))return e[f.name];let m=new n(f,t);return e[f.name]=m,m}function o(){return Object.keys(e).map(l=>e[l])}function c(l){let h=l.name,f=h.replace("-compat","");if($(l)&&l.type==="PUBLIC"){let m=(S=r())=>{if(typeof S[f]!="function")throw Mr.create("invalid-app-argument",{appName:h});return S[f]()};l.serviceProps!==void 0&&Ne(m,l.serviceProps),t[f]=m,n.prototype[f]=function(...S){return this._getService.bind(this,h).apply(this,l.multipleInstances?S:[])}}return l.type==="PUBLIC"?t[f]:null}function d(l,h){return h==="serverAuth"?null:h}return t}function Ur(){let n=ia(yn);n.INTERNAL=Object.assign(Object.assign({},n.INTERNAL),{createFirebaseNamespace:Ur,extendNamespace:e,createSubscribe:at,ErrorFactory:C,deepExtend:Ne});function e(t){Ne(n,t)}return n}var ra=Ur();var xr=new J("@firebase/app-compat"),sa="@firebase/app-compat",oa="0.2.25";function aa(n){O(sa,oa,n)}if(mr()&&self.firebase!==void 0){xr.warn(`
|
|
1
|
+
import{a as cr,b as dr,e as js,g as re,h as a,i as it}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SVMOHTLO.js";var ur=function(n){let e=[],t=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);r<128?e[t++]=r:r<2048?(e[t++]=r>>6|192,e[t++]=r&63|128):(r&64512)===55296&&i+1<n.length&&(n.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),e[t++]=r>>18|240,e[t++]=r>>12&63|128,e[t++]=r>>6&63|128,e[t++]=r&63|128):(e[t++]=r>>12|224,e[t++]=r>>6&63|128,e[t++]=r&63|128)}return e},Gs=function(n){let e=[],t=0,i=0;for(;t<n.length;){let r=n[t++];if(r<128)e[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=n[t++];e[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=n[t++],o=n[t++],c=n[t++],d=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;e[i++]=String.fromCharCode(55296+(d>>10)),e[i++]=String.fromCharCode(56320+(d&1023))}else{let s=n[t++],o=n[t++];e[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},hr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,e){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();let t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r<n.length;r+=3){let s=n[r],o=r+1<n.length,c=o?n[r+1]:0,d=r+2<n.length,l=d?n[r+2]:0,h=s>>2,f=(s&3)<<4|c>>4,m=(c&15)<<2|l>>6,S=l&63;d||(S=64,o||(m=64)),i.push(t[h],t[f],t[m],t[S])}return i.join("")},encodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(n):this.encodeByteArray(ur(n),e)},decodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(n):Gs(this.decodeStringToByteArray(n,e))},decodeStringToByteArray(n,e){this.init_();let t=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<n.length;){let s=t[n.charAt(r++)],c=r<n.length?t[n.charAt(r)]:0;++r;let l=r<n.length?t[n.charAt(r)]:64;++r;let f=r<n.length?t[n.charAt(r)]:64;if(++r,s==null||c==null||l==null||f==null)throw new qt;let m=s<<2|c>>4;if(i.push(m),l!==64){let S=c<<4&240|l>>2;if(i.push(S),f!==64){let ie=l<<6&192|f;i.push(ie)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}},qt=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},qs=function(n){let e=ur(n);return hr.encodeByteArray(e,!0)},Yt=function(n){return qs(n).replace(/\./g,"")},Jt=function(n){try{return hr.decodeString(n,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function Ne(n,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let t=e;return new Date(t.getTime());case Object:n===void 0&&(n={});break;case Array:n=[];break;default:return e}for(let t in e)!e.hasOwnProperty(t)||!Ks(t)||(n[t]=Ne(n[t],e[t]));return n}function Ks(n){return n!=="__proto__"}function Ys(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var Js=()=>Ys().__FIREBASE_DEFAULTS__,Xs=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},Qs=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=n&&Jt(n[1]);return e&&JSON.parse(e)},Xt=()=>{try{return Js()||Xs()||Qs()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}};var Qt=()=>{var n;return(n=Xt())===null||n===void 0?void 0:n.config},fr=n=>{var e;return(e=Xt())===null||e===void 0?void 0:e[`_${n}`]};var rt=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,i)=>{t?this.reject(t):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,i))}}};function v(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function pr(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(v())}function Zt(){var n;let e=(n=Xt())===null||n===void 0?void 0:n.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function mr(){return typeof self=="object"&&self.self===self}function st(){let n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Oe(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function ot(){let n=v();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Ee(){try{return typeof indexedDB=="object"}catch{return!1}}function gr(){return new Promise((n,e)=>{try{let t=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(t){e(t)}})}var Zs="FirebaseError",T=class n extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name=Zs,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,C.prototype.create)}},C=class{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){let i=t[0]||{},r=`${this.service}/${e}`,s=this.errors[e],o=s?eo(s,i):"Error",c=`${this.serviceName}: ${o} (${r}).`;return new T(r,c,i)}};function eo(n,e){return n.replace(to,(t,i)=>{let r=e[i];return r!=null?String(r):`<${i}?>`})}var to=/\{\$([^}]+)}/g;function en(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function _r(n){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}function De(n,e){if(n===e)return!0;let t=Object.keys(n),i=Object.keys(e);for(let r of t){if(!i.includes(r))return!1;let s=n[r],o=e[r];if(lr(s)&&lr(o)){if(!De(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!t.includes(r))return!1;return!0}function lr(n){return n!==null&&typeof n=="object"}function se(n){let e=[];for(let[t,i]of Object.entries(n))Array.isArray(i)?i.forEach(r=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function Y(n){let e={};return n.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[r,s]=i.split("=");e[decodeURIComponent(r)]=decodeURIComponent(s)}}),e}function ye(n){let e=n.indexOf("?");if(!e)return"";let t=n.indexOf("#",e);return n.substring(e,t>0?t:void 0)}function at(n,e){let t=new Kt(n,e);return t.subscribe.bind(t)}var Kt=class{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,i){let r;if(e===void 0&&t===void 0&&i===void 0)throw new Error("Missing Observer.");no(e,["next","error","complete"])?r=e:r={next:e,error:t,complete:i},r.next===void 0&&(r.next=Gt),r.error===void 0&&(r.error=Gt),r.complete===void 0&&(r.complete=Gt);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function no(n,e){if(typeof n!="object"||n===null)return!1;for(let t of e)if(t in n&&typeof n[t]=="function")return!0;return!1}function Gt(){}var al=4*60*60*1e3;function p(n){return n&&n._delegate?n._delegate:n}var R=class{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var oe="[DEFAULT]";var tn=class{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let i=new rt;if(this.instancesDeferred.set(t,i),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let i=this.normalizeInstanceIdentifier(e?.identifier),r=(t=e?.optional)!==null&&t!==void 0?t:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ro(e))try{this.getOrInitializeService({instanceIdentifier:oe})}catch{}for(let[t,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(t);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch{}}}}clearInstance(e=oe){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return a(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=oe){return this.instances.has(e)}getOptions(e=oe){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:i,options:t});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(e,t){var i;let r=this.normalizeInstanceIdentifier(t),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){let i=this.onInitCallbacks.get(t);if(i)for(let r of i)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:io(e),options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=oe){return this.component?this.component.multipleInstances?e:oe:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function io(n){return n===oe?void 0:n}function ro(n){return n.instantiationMode==="EAGER"}var ct=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new tn(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}};var En={};js(En,{FirebaseError:()=>T,SDK_VERSION:()=>j,_DEFAULT_ENTRY_NAME:()=>U,_addComponent:()=>xe,_addOrOverwriteComponent:()=>mn,_apps:()=>X,_clearComponents:()=>Go,_components:()=>Le,_getProvider:()=>gn,_registerComponent:()=>$,_removeServiceInstance:()=>jo,deleteApp:()=>_n,getApp:()=>Or,getApps:()=>Ko,initializeApp:()=>lt,onLog:()=>vn,registerVersion:()=>O,setLogLevel:()=>In});var nn=[],g=function(n){return n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",n}(g||{}),vr={debug:g.DEBUG,verbose:g.VERBOSE,info:g.INFO,warn:g.WARN,error:g.ERROR,silent:g.SILENT},so=g.INFO,oo={[g.DEBUG]:"log",[g.VERBOSE]:"log",[g.INFO]:"info",[g.WARN]:"warn",[g.ERROR]:"error"},ao=(n,e,...t)=>{if(e<n.logLevel)return;let i=new Date().toISOString(),r=oo[e];if(r)console[r](`[${i}] ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},J=class{constructor(e){this.name=e,this._logLevel=so,this._logHandler=ao,this._userLogHandler=null,nn.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in g))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?vr[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,g.DEBUG,...e),this._logHandler(this,g.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,g.VERBOSE,...e),this._logHandler(this,g.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,g.INFO,...e),this._logHandler(this,g.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,g.WARN,...e),this._logHandler(this,g.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,g.ERROR,...e),this._logHandler(this,g.ERROR,...e)}};function Ir(n){nn.forEach(e=>{e.setLogLevel(n)})}function Er(n,e){for(let t of nn){let i=null;e&&e.level&&(i=vr[e.level]),n===null?t.userLogHandler=null:t.userLogHandler=(r,s,...o)=>{let c=o.map(d=>{if(d==null)return null;if(typeof d=="string")return d;if(typeof d=="number"||typeof d=="boolean")return d.toString();if(d instanceof Error)return d.message;try{return JSON.stringify(d)}catch{return null}}).filter(d=>d).join(" ");s>=(i??r.logLevel)&&n({level:g[s].toLowerCase(),message:c,args:o,type:r.name})}}}var co=(n,e)=>e.some(t=>n instanceof t),yr,wr;function lo(){return yr||(yr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function uo(){return wr||(wr=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Tr=new WeakMap,sn=new WeakMap,br=new WeakMap,rn=new WeakMap,an=new WeakMap;function ho(n){let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(x(n.result)),r()},o=()=>{i(n.error),r()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&Tr.set(t,n)}).catch(()=>{}),an.set(e,n),e}function fo(n){if(sn.has(n))return;let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});sn.set(n,e)}var on={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return sn.get(n);if(e==="objectStoreNames")return n.objectStoreNames||br.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return x(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function Ar(n){on=n(on)}function po(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){let i=n.call(dt(this),e,...t);return br.set(i,e.sort?e.sort():[e]),x(i)}:uo().includes(n)?function(...e){return n.apply(dt(this),e),x(Tr.get(this))}:function(...e){return x(n.apply(dt(this),e))}}function mo(n){return typeof n=="function"?po(n):(n instanceof IDBTransaction&&fo(n),co(n,lo())?new Proxy(n,on):n)}function x(n){if(n instanceof IDBRequest)return ho(n);if(rn.has(n))return rn.get(n);let e=mo(n);return e!==n&&(rn.set(n,e),an.set(e,n)),e}var dt=n=>an.get(n);function Rr(n,e,{blocked:t,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(n,e),c=x(o);return i&&o.addEventListener("upgradeneeded",d=>{i(x(o.result),d.oldVersion,d.newVersion,x(o.transaction),d)}),t&&o.addEventListener("blocked",d=>t(d.oldVersion,d.newVersion,d)),c.then(d=>{s&&d.addEventListener("close",()=>s()),r&&d.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}var go=["get","getKey","getAll","getAllKeys","count"],_o=["put","add","delete","clear"],cn=new Map;function Sr(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(cn.get(e))return cn.get(e);let t=e.replace(/FromIndex$/,""),i=e!==t,r=_o.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(r||go.includes(t)))return;let s=function(o,...c){return a(this,null,function*(){let d=this.transaction(o,r?"readwrite":"readonly"),l=d.store;return i&&(l=l.index(c.shift())),(yield Promise.all([l[t](...c),r&&d.done]))[0]})};return cn.set(e,s),s}Ar(n=>dr(cr({},n),{get:(e,t,i)=>Sr(e,t)||n.get(e,t,i),has:(e,t)=>!!Sr(e,t)||n.has(e,t)}));var ln=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(vo(t)){let i=t.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(t=>t).join(" ")}};function vo(n){let e=n.getComponent();return e?.type==="VERSION"}var un="@firebase/app",Pr="0.9.25";var ae=new J("@firebase/app"),Io="@firebase/app-compat",Eo="@firebase/analytics-compat",yo="@firebase/analytics",wo="@firebase/app-check-compat",To="@firebase/app-check",bo="@firebase/auth",Ao="@firebase/auth-compat",So="@firebase/database",Ro="@firebase/database-compat",Po="@firebase/functions",ko="@firebase/functions-compat",Co="@firebase/installations",No="@firebase/installations-compat",Oo="@firebase/messaging",Do="@firebase/messaging-compat",Lo="@firebase/performance",Mo="@firebase/performance-compat",xo="@firebase/remote-config",Uo="@firebase/remote-config-compat",Fo="@firebase/storage",Vo="@firebase/storage-compat",Wo="@firebase/firestore",Ho="@firebase/firestore-compat",Bo="firebase",zo="10.7.1";var U="[DEFAULT]",$o={[un]:"fire-core",[Io]:"fire-core-compat",[yo]:"fire-analytics",[Eo]:"fire-analytics-compat",[To]:"fire-app-check",[wo]:"fire-app-check-compat",[bo]:"fire-auth",[Ao]:"fire-auth-compat",[So]:"fire-rtdb",[Ro]:"fire-rtdb-compat",[Po]:"fire-fn",[ko]:"fire-fn-compat",[Co]:"fire-iid",[No]:"fire-iid-compat",[Oo]:"fire-fcm",[Do]:"fire-fcm-compat",[Lo]:"fire-perf",[Mo]:"fire-perf-compat",[xo]:"fire-rc",[Uo]:"fire-rc-compat",[Fo]:"fire-gcs",[Vo]:"fire-gcs-compat",[Wo]:"fire-fst",[Ho]:"fire-fst-compat","fire-js":"fire-js",[Bo]:"fire-js-all"};var X=new Map,Le=new Map;function xe(n,e){try{n.container.addComponent(e)}catch(t){ae.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`,t)}}function mn(n,e){n.container.addOrOverwriteComponent(e)}function $(n){let e=n.name;if(Le.has(e))return ae.debug(`There were multiple attempts to register component ${e}.`),!1;Le.set(e,n);for(let t of X.values())xe(t,n);return!0}function gn(n,e){let t=n.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),n.container.getProvider(e)}function jo(n,e,t=U){gn(n,e).clearInstance(t)}function Go(){Le.clear()}var qo={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},z=new C("app","Firebase",qo);var hn=class{constructor(e,t,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new R("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw z.create("app-deleted",{appName:this._name})}};var j=zo;function lt(n,e={}){let t=n;typeof e!="object"&&(e={name:e});let i=Object.assign({name:U,automaticDataCollectionEnabled:!1},e),r=i.name;if(typeof r!="string"||!r)throw z.create("bad-app-name",{appName:String(r)});if(t||(t=Qt()),!t)throw z.create("no-options");let s=X.get(r);if(s){if(De(t,s.options)&&De(i,s.config))return s;throw z.create("duplicate-app",{appName:r})}let o=new ct(r);for(let d of Le.values())o.addComponent(d);let c=new hn(t,i,o);return X.set(r,c),c}function Or(n=U){let e=X.get(n);if(!e&&n===U&&Qt())return lt();if(!e)throw z.create("no-app",{appName:n});return e}function Ko(){return Array.from(X.values())}function _n(n){return a(this,null,function*(){let e=n.name;X.has(e)&&(X.delete(e),yield Promise.all(n.container.getProviders().map(t=>t.delete())),n.isDeleted=!0)})}function O(n,e,t){var i;let r=(i=$o[n])!==null&&i!==void 0?i:n;t&&(r+=`-${t}`);let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let c=[`Unable to register library "${r}" with version "${e}":`];s&&c.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${e}" contains illegal characters (whitespace or "/")`),ae.warn(c.join(" "));return}$(new R(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}function vn(n,e){if(n!==null&&typeof n!="function")throw z.create("invalid-log-argument");Er(n,e)}function In(n){Ir(n)}var Yo="firebase-heartbeat-database",Jo=1,Me="firebase-heartbeat-store",dn=null;function Dr(){return dn||(dn=Rr(Yo,Jo,{upgrade:(n,e)=>{switch(e){case 0:n.createObjectStore(Me)}}}).catch(n=>{throw z.create("idb-open",{originalErrorMessage:n.message})})),dn}function Xo(n){return a(this,null,function*(){try{return yield(yield Dr()).transaction(Me).objectStore(Me).get(Lr(n))}catch(e){if(e instanceof T)ae.warn(e.message);else{let t=z.create("idb-get",{originalErrorMessage:e?.message});ae.warn(t.message)}}})}function kr(n,e){return a(this,null,function*(){try{let i=(yield Dr()).transaction(Me,"readwrite");yield i.objectStore(Me).put(e,Lr(n)),yield i.done}catch(t){if(t instanceof T)ae.warn(t.message);else{let i=z.create("idb-set",{originalErrorMessage:t?.message});ae.warn(i.message)}}})}function Lr(n){return`${n.name}!${n.options.appId}`}var Qo=1024,Zo=30*24*60*60*1e3,fn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new pn(t),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return a(this,null,function*(){var e,t;let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Cr();if(!(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null))&&!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let c=new Date(o.date).valueOf();return Date.now()-c<=Zo}),this._storage.overwrite(this._heartbeatsCache)})}getHeartbeatsHeader(){return a(this,null,function*(){var e;if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let t=Cr(),{heartbeatsToSend:i,unsentEntries:r}=ea(this._heartbeatsCache.heartbeats),s=Yt(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s})}};function Cr(){return new Date().toISOString().substring(0,10)}function ea(n,e=Qo){let t=[],i=n.slice();for(let r of n){let s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Nr(t)>e){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),Nr(t)>e){t.pop();break}i=i.slice(1)}return{heartbeatsToSend:t,unsentEntries:i}}var pn=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return a(this,null,function*(){return Ee()?gr().then(()=>!0).catch(()=>!1):!1})}read(){return a(this,null,function*(){if(yield this._canUseIndexedDBPromise){let t=yield Xo(this.app);return t?.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return kr(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return kr(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function Nr(n){return Yt(JSON.stringify({version:2,heartbeats:n})).length}function ta(n){$(new R("platform-logger",e=>new ln(e),"PRIVATE")),$(new R("heartbeat",e=>new fn(e),"PRIVATE")),O(un,Pr,n),O(un,Pr,"esm2017"),O("fire-js","")}ta("");var yn=class{constructor(e,t){this._delegate=e,this.firebase=t,xe(e,new R("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),_n(this._delegate)))}_getService(e,t=U){var i;this._delegate.checkDestroyed();let r=this._delegate.container.getProvider(e);return!r.isInitialized()&&((i=r.getComponent())===null||i===void 0?void 0:i.instantiationMode)==="EXPLICIT"&&r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=U){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){xe(this._delegate,e)}_addOrOverwriteComponent(e){mn(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}};var na={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},Mr=new C("app-compat","Firebase",na);function ia(n){let e={},t={__esModule:!0,initializeApp:s,app:r,registerVersion:O,setLogLevel:In,onLog:vn,apps:null,SDK_VERSION:j,INTERNAL:{registerComponent:c,removeApp:i,useAsService:d,modularAPIs:En}};t.default=t,Object.defineProperty(t,"apps",{get:o});function i(l){delete e[l]}function r(l){if(l=l||U,!en(e,l))throw Mr.create("no-app",{appName:l});return e[l]}r.App=n;function s(l,h={}){let f=lt(l,h);if(en(e,f.name))return e[f.name];let m=new n(f,t);return e[f.name]=m,m}function o(){return Object.keys(e).map(l=>e[l])}function c(l){let h=l.name,f=h.replace("-compat","");if($(l)&&l.type==="PUBLIC"){let m=(S=r())=>{if(typeof S[f]!="function")throw Mr.create("invalid-app-argument",{appName:h});return S[f]()};l.serviceProps!==void 0&&Ne(m,l.serviceProps),t[f]=m,n.prototype[f]=function(...S){return this._getService.bind(this,h).apply(this,l.multipleInstances?S:[])}}return l.type==="PUBLIC"?t[f]:null}function d(l,h){return h==="serverAuth"?null:h}return t}function Ur(){let n=ia(yn);n.INTERNAL=Object.assign(Object.assign({},n.INTERNAL),{createFirebaseNamespace:Ur,extendNamespace:e,createSubscribe:at,ErrorFactory:C,deepExtend:Ne});function e(t){Ne(n,t)}return n}var ra=Ur();var xr=new J("@firebase/app-compat"),sa="@firebase/app-compat",oa="0.2.25";function aa(n){O(sa,oa,n)}if(mr()&&self.firebase!==void 0){xr.warn(`
|
|
2
2
|
Warning: Firebase is already defined in the global scope. Please make sure
|
|
3
3
|
Firebase library is only loaded once.
|
|
4
4
|
`);let n=self.firebase.SDK_VERSION;n&&n.indexOf("LITE")>=0&&xr.warn(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as f,A as b,E as F,Hb as X,I as L,Ia as q,Ja as V,Jc as Z,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-CRNJ2Q5T.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|
|
1
|
+
import{$ as f,A as b,E as F,Hb as X,I as L,Ia as q,Ja as V,Jc as Z,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-VM6WJ77V.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.5/Marketplace/chunk-SVMOHTLO.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|