@bbn/bbn 2.0.164 → 2.0.171

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/dist/bbn.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bbn={})}(this,function(e){"use strict";function t(e,t,r,o,i){return n(t,((e,t)=>{const n=e[t];if(void 0===n)throw new TypeError(So(t));return n})(e,t),r,o,i)}function n(e,t,n,r,o,i){const a=E(t,n,r);if(o&&t!==a)throw new RangeError(Mo(e,t,n,r,i));return a}function r(e){return null!==e&&/object|function/.test(typeof e)}function o(e,t=Map){const n=new t;return(t,...r)=>{if(n.has(t))return n.get(t);const o=e(t,...r);return n.set(t,o),o}}function i(e){return a({name:e},1)}function a(e,t){return l(e=>({value:e,configurable:1,writable:!t}),e)}function s(e){return l(e=>({get:e,configurable:1}),e)}function u(e){return{[Symbol.toStringTag]:{value:e,configurable:1}}}function c(e,t){const n={};let r=e.length;for(const o of t)n[e[--r]]=o;return n}function l(e,t,n){const r={};for(const o in t)r[o]=e(t[o],o,n);return r}function f(e,t,n){const r={};for(let o=0;o<t.length;o++){const i=t[o];r[i]=e(i,o,n)}return r}function d(e,t,n){const r={};for(let o=0;o<e.length;o++)r[t[o]]=n[e[o]];return r}function h(e,t){const n=Object.create(null);for(const r of e)n[r]=t[r];return n}function m(e,t){for(const n of t)if(n in e)return 1;return 0}function p(e,t,n){for(const r of e)if(t[r]!==n[r])return 0;return 1}function b(e,t,n){const r={...n};for(let n=0;n<t;n++)r[e[n]]=0;return r}function g(e,...t){return(...n)=>e(...t,...n)}function w(e){return e[0].toUpperCase()+e.substring(1)}function y(e){return e.slice().sort()}function v(e,t){return String(t).padStart(e,"0")}function M(e,t){return Math.sign(e-t)}function E(e,t,n){return Math.min(Math.max(e,t),n)}function S(e,t){return[Math.floor(e/t),D(e,t)]}function D(e,t){return(e%t+t)%t}function T(e,t){return[k(e,t),I(e,t)]}function k(e,t){return Math.trunc(e/t)||0}function I(e,t){return e%t||0}function _(e){return.5===Math.abs(e%1)}function O(e,t,n){let r=0,o=0;for(let i=0;i<=t;i++){const t=e[n[i]],a=wi[i],s=gi/a,[u,c]=T(t,s);r+=c*a,o+=u}const[i,a]=T(r,gi);return[o+i,a]}function x(e,t,n){const r={};for(let o=t;o>=0;o--){const t=wi[o];r[n[o]]=k(e,t),e=I(e,t)}return r}function j(e){if(void 0!==e)return N(e)}function P(e){return F(N(e))}function N(e){return A(Wi(e))}function C(e,t){if(null==t)throw new RangeError(So(e));return t}function R(e){if(!r(e))throw new TypeError(vo);return e}function Y(e,t,n=e){if(typeof t!==e)throw new TypeError(Eo(n,t));return t}function A(e,t="number"){if(!Number.isInteger(e))throw new RangeError(mo(t,e));return e||0}function F(e,t="number"){if(e<=0)throw new RangeError(po(t,e));return e}function L(e){if("symbol"==typeof e)throw new TypeError(yo);return String(e)}function Z(e,t){return r(e)?String(e):Ui(e,t)}function H(e){if("string"==typeof e)return BigInt(e);if("bigint"!=typeof e)throw new TypeError(wo(e));return e}function B(e,t="number"){if("bigint"==typeof e)throw new TypeError(go(t));if(e=Number(e),!Number.isFinite(e))throw new RangeError(bo(t,e));return e}function U(e,t){return Math.trunc(B(e,t))||0}function $(e,t){return A(B(e,t),t)}function W(e,t){return F(U(e,t),t)}function z(e,t){let[n,r]=T(t,gi),o=e+n;const i=Math.sign(o);return i&&i===-Math.sign(r)&&(o-=i,r+=i*gi),[o,r]}function q(e,t,n=1){return z(e[0]+t[0]*n,e[1]+t[1]*n)}function V(e,t){return z(e[0],e[1]+t)}function J(e,t){return q(t,e,-1)}function G(e,t){return M(e[0],t[0])||M(e[1],t[1])}function K(e,t,n){return-1===G(e,t)||1===G(e,n)}function X(e,t=1){const n=BigInt(gi/t);return[Number(e/n),Number(e%n)*t]}function Q(e,t=1){const n=gi/t,[r,o]=T(e,n);return[r,o*t]}function ee(e,t=1,n){const[r,o]=e,[i,a]=T(o,t);return r*(gi/t)+(i+(n?a/t:0))}function te(e,t,n=S){const[r,o]=e,[i,a]=n(o,t);return[r*(gi/t)+i,a]}function ne(e){return t(e,"isoYear",ma,ha,1),e.isoYear===ma?t(e,"isoMonth",4,12,1):e.isoYear===ha&&t(e,"isoMonth",1,9,1),e}function re(e){return oe({...e,...sa,isoHour:12}),e}function oe(e){const n=t(e,"isoYear",ma,ha,1),r=n===ma?1:n===ha?-1:0;return r&&ie(le({...e,isoDay:e.isoDay+r,isoNanosecond:e.isoNanosecond-r})),e}function ie(e){if(!e||K(e,da,fa))throw new RangeError(Vo);return e}function ae(e){return O(e,5,ta)[1]}function se(e){const[t,n]=S(e,gi);return[x(n,5,ta),t]}function ue(e){return te(e,mi)}function ce(e){return he(e.isoYear,e.isoMonth,e.isoDay,e.isoHour,e.isoMinute,e.isoSecond,e.isoMillisecond)}function le(e){const t=ce(e);if(void 0!==t){const[n,r]=T(t,li);return[n,r*hi+(e.isoMicrosecond||0)*di+(e.isoNanosecond||0)]}}function fe(e,t){const[n,r]=se(ae(e)-t);return ie(le({...e,isoDay:e.isoDay+r,...n}))}function de(...e){return he(...e)/fi}function he(...e){const[t,n]=me(...e),r=t.valueOf();if(!isNaN(r))return r-n*li}function me(e,t=1,n=1,r=0,o=0,i=0,a=0){const s=e===ma?1:e===ha?-1:0,u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n+s),[u,s]}function pe(e,t){let[n,r]=V(e,t);r<0&&(r+=gi,n-=1);const[o,i]=S(r,hi),[a,s]=S(i,di);return be(n*li+o,a,s)}function be(e,t=0,n=0){const r=Math.ceil(Math.max(0,Math.abs(e)-la)/li)*Math.sign(e),o=new Date(e-r*li);return c(ra,[o.getUTCFullYear(),o.getUTCMonth()+1,o.getUTCDate()+r,o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds(),t,n])}function ge(e,t){if(t<-la)throw new RangeError(Vo);const n=e.formatToParts(t),r={};for(const e of n)r[e.type]=e.value;return r}function we(e){return[e.isoYear,e.isoMonth,e.isoDay]}function ye(e,t){return[t,0]}function ve(){return ya}function Me(e,t){switch(t){case 2:return Se(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Ee(e){return Se(e)?366:365}function Se(e){return e%4==0&&(e%100!=0||e%400==0)}function De(e){const[t,n]=me(e.isoYear,e.isoMonth,e.isoDay);return D(t.getUTCDay()-n,7)||7}function Te(e){return this.id===Fi?(({isoYear:e})=>e<1?["gregory-inverse",1-e]:["gregory",e])(e):this.id===Li?Ma(e):[]}function ke(e){const t=ce(e);if(t<va){const{isoYear:t}=e;return t<1?["japanese-inverse",1-t]:["japanese",t]}const n=ge(Ps(Li),t),{era:r,eraYear:o}=jr(n,Li);return[r,o]}function Ie(e){return _e(e),je(e,1),e}function _e(e){return xe(e,1),e}function Oe(e){return p(na,e,xe(e))}function xe(e,n){const{isoYear:r}=e,o=t(e,"isoMonth",1,ve(),n);return{isoYear:r,isoMonth:o,isoDay:t(e,"isoDay",1,Me(r,o),n)}}function je(e,n){return c(ta,[t(e,"isoHour",0,23,n),t(e,"isoMinute",0,59,n),t(e,"isoSecond",0,59,n),t(e,"isoMillisecond",0,999,n),t(e,"isoMicrosecond",0,999,n),t(e,"isoNanosecond",0,999,n)])}function Pe(e){return void 0===e?0:Za(R(e))}function Ne(e,t=0){e=Ue(e);const n=Ha(e),r=Ba(e,t);return[Za(e),r,n]}function Ce(e,t,n,r=9,o=0,i=4){t=Ue(t);let a=Fa(t,r,o),s=Ze(t),u=za(t,i);const c=Aa(t,r,o,1);return null==a?a=Math.max(n,c):Ve(a,c),s=He(s,c,1),e&&(u=(e=>e<4?(e+2)%4:e)(u)),[a,c,s,u]}function Re(e,t=6,n){let r=Ze(e=$e(e,Ea));const o=za(e,7);let i=Aa(e,t);return i=C(Ea,i),r=He(r,i,void 0,n),[i,r,o]}function Ye(e){return Ua(Ue(e))}function Ae(e,t){return Fe(Ue(e),t)}function Fe(e,t=4){const n=Be(e);return[za(e,4),...Le(Aa(e,t),n)]}function Le(e,t){return null!=e?[wi[e],e<4?9-3*e:-1]:[void 0===t?1:10**(9-t),t]}function Ze(e){const t=e[Da];return void 0===t?1:U(t,Da)}function He(e,t,r,o){const i=o?gi:wi[t+1];if(i){const r=wi[t];if(i%((e=n(Da,e,1,i/r-(o?0:1),1))*r))throw new RangeError(Eo(Da,e))}else e=n(Da,e,1,r?10**9:1,1);return e}function Be(e){let t=e[Ta];if(void 0!==t){if("number"!=typeof t){if("auto"===L(t))return;throw new RangeError(Eo(Ta,t))}t=n(Ta,Math.floor(t),0,9,1)}return t}function Ue(e){return void 0===e?{}:R(e)}function $e(e,t){return"string"==typeof e?{[t]:e}:R(e)}function We(e){return{overflow:Oa[e]}}function ze(e,t,r=9,o=0,i){let a=t[e];if(void 0===a)return i?o:void 0;if(a=L(a),"auto"===a)return i?o:null;let s=ui[a];if(void 0===s&&(s=Ki[a]),void 0===s)throw new RangeError(Io(e,a,ui));return n(e,s,o,r,1,ci),s}function qe(e,t,n,r=0){const o=n[e];if(void 0===o)return r;const i=L(o),a=t[i];if(void 0===a)throw new RangeError(Io(e,i,t));return a}function Ve(e,t){if(t>e)throw new RangeError(ei)}function Je(e){return{branding:Qa,epochNanoseconds:e}}function Ge(e,t,n){return{branding:Xa,calendar:n,timeZone:t,epochNanoseconds:e}}function Ke(e,t=e.calendar){return{branding:Ga,calendar:t,...h(aa,e)}}function Xe(e,t=e.calendar){return{branding:Ja,calendar:t,...h(oa,e)}}function Qe(e,t=e.calendar){return{branding:qa,calendar:t,...h(oa,e)}}function et(e,t=e.calendar){return{branding:Va,calendar:t,...h(oa,e)}}function tt(e){return{branding:Ka,...h(ia,e)}}function nt(e){return{branding:es,sign:gn(e),...h(qi,e)}}function rt(e){return te(e.epochNanoseconds,hi)[0]}function ot(e){return e.epochNanoseconds}function it(e,t){return ee(vn(e),wi[t],1)}function at(e,t,n,r,o,i,a){const s=zi[n],u={...t,[s]:t[s]+r},c=a(e,o,t),l=a(e,o,u);return[i(c),i(l)]}function st(e,t,n){const r=ee(J(t,n));if(!r)throw new RangeError(Fo);return ee(J(t,e))/r}function ut(e,t,n,r){return ct(e,dt(t,n),r)}function ct(e,t,n){const[r,o]=lt(e,t,n);return oe({...sn(e,o),...r})}function lt(e,t,n){return se(yt(ae(e),t,n))}function ft(e){return yt(e,pi,7)}function dt(e,t){return wi[e]*t}function ht(e){const t=mt(e);return[t,sn(t,1)]}function mt(e){return ua(6,e)}function pt(e,t,n){const r=Math.min(Dn(e),6);return Mn(wt(vn(e,r),t,n),r)}function bt(e,t,n,r,o,i,a,s,u,c){if(0===r&&1===o)return e;const l=hn(r,s)?dn(s)&&r<6&&n>=6?Et:Mt:St;let[f,d,h]=l(e,t,n,r,o,i,a,s,u,c);return h&&7!==r&&(f=((e,t,n,r,o,i,a,s)=>{const u=gn(e);for(let c=r+1;c<=n;c++){if(7===c&&7!==n)continue;const r=ea(c,e);r[zi[c]]+=u;const l=ee(J(a(s(o,i,r)),t));if(l&&Math.sign(l)!==u)break;e=r}return e})(f,d,n,Math.max(6,r),a,s,u,c)),f}function gt(e,t,n,r,o){if(6===t){const t=(e=>e[0]+e[1]/gi)(e);return[yt(t,n,r),0]}return wt(e,dt(t,n),r,o)}function wt(e,t,n,r){let[o,i]=e;r&&i<0&&(i+=gi,o-=1);const[a,s]=S(yt(i,t,n),gi);return z(o+a,s)}function yt(e,t,n){return vt(e/t,n)*t}function vt(e,t){return ts[t](e)}function Mt(e,t,n,r,o,i){const a=gn(e),s=vn(e),u=gt(s,r,o,i),c=J(s,u),l=Math.sign(u[0]-s[0])===a,f=Mn(u,Math.min(n,6));return[{...e,...f},q(t,c),l]}function Et(e,t,n,r,o,i,a,s,u,c){const l=gn(e)||1,f=ee(vn(e,5)),d=dt(r,o);let h=yt(f,d,i);const[m,p]=at(a,{...e,...Qi},6,l,s,u,c),b=h-ee(J(m,p));let g=0;b&&Math.sign(b)!==l?t=V(m,h):(g+=l,h=yt(b,d,i),t=V(p,h));const w=En(h);return[{...e,...w,days:e.days+g},t,Boolean(g)]}function St(e,t,n,r,o,i,a,s,u,c){const l=gn(e),f=zi[r],d=ea(r,e);7===r&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});const h=k(e[f],o)*o;d[f]=h;const[m,p]=at(a,d,r,o*l,s,u,c),b=h+st(t,m,p)*l*o,g=yt(b,o,i),w=Math.sign(g-b)===l;return d[f]=g,[d,w?p:m,w]}function Dt(e,t,n,r){const[o,i,a,s]=(e=>{const t=Fe(e=Ue(e));return[e.timeZone,...t]})(r),u=void 0!==o;return((e,t,n,r,o,i)=>{n=wt(n,o,r,1);const a=t.R(n);return Ct(pe(n,a),i)+(e?Lt(ft(a)):"Z")})(u,t(u?e(o):ns),n.epochNanoseconds,i,a,s)}function Tt(e,t,n){const[r,o,i,a,s,u]=(e=>{e=Ue(e);const t=Ua(e),n=Be(e),r=Wa(e),o=za(e,4),i=Aa(e,4);return[t,$a(e),r,o,...Le(i,n)]})(n);return((e,t,n,r,o,i,a,s,u,c)=>{r=wt(r,u,s,1);const l=e(n).R(r);return Ct(pe(r,l),c)+Lt(ft(l),a)+((e,t)=>1!==t?"["+(2===t?"!":"")+e+"]":"")(n,i)+Zt(t,o)})(e,t.calendar,t.timeZone,t.epochNanoseconds,r,o,i,a,s,u)}function kt(e,t){const[n,r,o,i]=(e=>(e=Ue(e),[Ua(e),...Fe(e)]))(t);return a=e.calendar,s=n,u=i,Ct(ct(e,o,r),u)+Zt(a,s);var a,s,u}function It(e,t){return n=e.calendar,r=e,o=Ye(t),Rt(r)+Zt(n,o);var n,r,o}function _t(e,t){return Pt(e.calendar,Yt,e,Ye(t))}function Ot(e,t){return Pt(e.calendar,At,e,Ye(t))}function xt(e,t){const[n,r,o]=Ae(t);return i=o,Ft(lt(e,r,n)[0],i);var i}function jt(e,t){const[n,r,o]=Ae(t,3);return r>1&&wn(e={...e,...pt(e,r,n)}),((e,t)=>{const{sign:n}=e,r=-1===n?bn(e):e,{hours:o,minutes:i}=r,[a,s]=te(vn(r,3),mi,T);yn(a);const u=Bt(s,t),c=t>=0||!n||u;return(n<0?"-":"")+"P"+Nt({Y:$t(r.years),M:$t(r.months),W:$t(r.weeks),D:$t(r.days)})+(o||i||a||c?"T"+Nt({H:$t(o),M:$t(i),S:$t(a,c)+u}):"")})(e,o)}function Pt(e,t,n,r){const o=r>1||0===r&&e!==Ai;return 1===r?e===Ai?t(n):Rt(n):o?Rt(n)+Ht(e,2===r):t(n)}function Nt(e){const t=[];for(const n in e){const r=e[n];r&&t.push(r,n)}return t.join("")}function Ct(e,t){return Rt(e)+"T"+Ft(e,t)}function Rt(e){return Yt(e)+"-"+si(e.isoDay)}function Yt(e){const{isoYear:t}=e;return(t<0||t>9999?Ut(t)+v(6,Math.abs(t)):v(4,t))+"-"+si(e.isoMonth)}function At(e){return si(e.isoMonth)+"-"+si(e.isoDay)}function Ft(e,t){const n=[si(e.isoHour),si(e.isoMinute)];return-1!==t&&n.push(si(e.isoSecond)+((e,t,n,r)=>Bt(e*hi+t*di+n,r))(e.isoMillisecond,e.isoMicrosecond,e.isoNanosecond,t)),n.join(":")}function Lt(e,t=0){if(1===t)return"";const[n,r]=S(Math.abs(e),bi),[o,i]=S(r,pi),[a,s]=S(i,mi);return Ut(e)+si(n)+":"+si(o)+(a||s?":"+si(a)+Bt(s):"")}function Zt(e,t){return 1!==t&&(t>1||0===t&&e!==Ai)?Ht(e,2===t):""}function Ht(e,t){return"["+(t?"!":"")+"u-ca="+e+"]"}function Bt(e,t){let n=v(9,e);return n=void 0===t?n.replace(as,""):n.slice(0,t),n?"."+n:""}function Ut(e){return e<0?"-":"+"}function $t(e,t){return e||t?e.toLocaleString("fullwide",{useGrouping:0}):""}function Wt(e,t){const{epochNanoseconds:n}=e,r=(t.R?t:t(e.timeZone)).R(n),o=pe(n,r);return{calendar:e.calendar,...o,offsetNanoseconds:r}}function zt(e,t,n,r=0,o=0,i,a){if(void 0!==n&&1===r&&(1===r||a))return fe(t,n);const s=e.I(t);if(void 0!==n&&3!==r){const e=((e,t,n,r)=>{const o=le(t);r&&(n=ft(n));for(const t of e){let e=ee(J(t,o));if(r&&(e=ft(e)),e===n)return t}})(s,t,n,i);if(void 0!==e)return e;if(0===r)throw new RangeError(zo)}return a?le(t):qt(e,t,o,s)}function qt(e,t,n=0,r=e.I(t)){if(1===r.length)return r[0];if(1===n)throw new RangeError(qo);if(r.length)return r[3===n?1:0];const o=le(t),i=((e,t)=>{const n=e.R(V(t,-gi));return(e=>{if(e>gi)throw new RangeError(Wo);return e})(e.R(V(t,gi))-n)})(e,o),a=i*(2===n?-1:1);return(r=e.I(pe(o,a)))[2===n?0:r.length-1]}function Vt(e,t){const n=e.I(t);if(n.length)return n[0];const r=V(le(t),-gi);return e.O(r,1)}function Jt(e,t,n){return Je(ie(q(t.epochNanoseconds,(e=>{if(Sn(e))throw new RangeError(Xo);return vn(e,5)})(e?bn(n):n))))}function Gt(e,t,n,r,o,i=Object.create(null)){const a=t(r.timeZone),s=e(r.calendar);return{...r,...tn(a,s,r,n?bn(o):o,i)}}function Kt(e,t,n,r,o=Object.create(null)){const{calendar:i}=n;return Ke(nn(e(i),n,t?bn(r):r,o),i)}function Xt(e,t,n,r,o){const{calendar:i}=n;return Xe(rn(e(i),n,t?bn(r):r,o),i)}function Qt(e,t,n,r,o){const i=n.calendar,a=e(i);let s=re(on(a,n));t&&(r=pn(r)),r.sign<0&&(s=a.P(s,{...Xi,months:1}),s=sn(s,-1));const u=a.P(s,r,o);return Qe(on(a,u),i)}function en(e,t,n){return tt(an(t,e?bn(n):n)[0])}function tn(e,t,n,r,o){const i=vn(r,5);let a=n.epochNanoseconds;if(Sn(r)){const s=ss(n,e);a=q(qt(e,{...rn(t,s,{...r,...Qi},o),...h(ta,s)}),i)}else a=q(a,i),Pe(o);return{epochNanoseconds:ie(a)}}function nn(e,t,n,r){const[o,i]=an(t,n);return oe({...rn(e,t,{...n,...Qi,days:n.days+i},r),...o})}function rn(e,t,n,r){if(n.years||n.months||n.weeks)return e.P(t,n,r);Pe(r);const o=n.days+vn(n,5)[0];return o?re(sn(t,o)):t}function on(e,t,n=1){return sn(t,n-e.day(t))}function an(e,t){const[n,r]=vn(t,5),[o,i]=se(ae(e)+r);return[o,n+i]}function sn(e,t){return t?{...e,...be(ce(e)+t*li)}:e}function un(e,t,n){const r=e(n.calendar);return dn(n)?[n,r,t(n.timeZone)]:[{...n,...sa},r]}function cn(e){return e?ot:le}function ln(e){return e?g(tn,e):nn}function fn(e){return e?g(sr,e):ur}function dn(e){return e&&e.epochNanoseconds}function hn(e,t){return e<=6-(dn(t)?1:0)}function mn(e,t,n,r,o,i,a){const s=e(Ue(a).relativeTo),u=Math.max(Dn(o),Dn(i));if(hn(u,s))return nt(wn(((e,t,n,r)=>{const o=q(vn(e),vn(t),r?-1:1);if(!Number.isFinite(o[0]))throw new RangeError(Vo);return{...Xi,...Mn(o,n)}})(o,i,u,r)));if(!s)throw new RangeError(Ko);r&&(i=bn(i));const[c,l,f]=un(t,n,s),d=ln(f),h=fn(f),m=d(l,c,o);return nt(h(l,c,d(l,m,i),u))}function pn(e){return nt(bn(e))}function bn(e){const t={};for(const n of zi)t[n]=-1*e[n]||0;return t}function gn(e,t=zi){let n=0;for(const r of t){const t=Math.sign(e[r]);if(t){if(n&&n!==t)throw new RangeError(Go);n=t}}return n}function wn(e){for(const t of Gi)n(t,e[t],-us,us,1);return yn(ee(vn(e),mi)),e}function yn(e){if(!Number.isSafeInteger(e))throw new RangeError(Jo)}function vn(e,t=6){return O(e,t,zi)}function Mn(e,t=6){const[n,r]=e,o=x(r,t,zi);if(o[zi[t]]+=n*(gi/wi[t]),!Number.isFinite(o[zi[t]]))throw new RangeError(Vo);return o}function En(e,t=5){return x(e,t,zi)}function Sn(e){return Boolean(gn(e,Ji))}function Dn(e){let t=9;for(;t>0&&!e[zi[t]];t--);return t}function Tn(e,t){return[e,t]}function kn(e){const t=Math.floor(e/rs)*rs;return[t,t+rs]}function In(e){const t=An(e);if(void 0===t)throw new RangeError(ti(e));return t}function _n(e,t,n){let r=Cn(Ui(e));if(!r||r.j)throw new RangeError(ti(e));return t?r.calendar===Ai&&(r=-271821===r.isoYear&&4===r.isoMonth?{...r,isoDay:20,...sa}:{...r,isoDay:1,...sa}):n&&r.calendar===Ai&&(r={...r,isoYear:wa}),Xe(r.C?jn(r):Pn(r))}function On(e){if(e.calendar!==Ai)throw new RangeError(ni(e.calendar))}function xn(e,t,n=0,r=0){const o=Wn(e.timeZone),i=cs(o);let a;return Ie(e),a=e.C?zt(i,e,t,n,r,!i.$,e.j):Vt(i,e),Ge(a,o,Ur(e.calendar))}function jn(e){return Nn(oe(Ie(e)))}function Pn(e){return Nn(re(_e(e)))}function Nn(e){return{...e,calendar:Ur(e.calendar)}}function Cn(e){const t=Es.exec(e);return t?(e=>{const t=e[10],n="Z"===(t||"").toUpperCase();return{isoYear:Fn(e),isoMonth:parseInt(e[4]),isoDay:parseInt(e[5]),...Ln(e.slice(5)),...Zn(e[16]),C:Boolean(e[6]),j:n,offset:n?void 0:t}})(t):void 0}function Rn(e){const t=vs.exec(e);return t?(e=>({isoYear:Fn(e),isoMonth:parseInt(e[4]),isoDay:1,...Zn(e[5])}))(t):void 0}function Yn(e){const t=Ms.exec(e);return t?(e=>({isoYear:wa,isoMonth:parseInt(e[1]),isoDay:parseInt(e[2]),...Zn(e[3])}))(t):void 0}function An(e,t){const n=Ds.exec(e);return n?((e,t)=>{const n=e[4]||e[5];if(t&&n)throw new RangeError(ni(n));return(e=>{if(Math.abs(e)>=gi)throw new RangeError($o);return e})(($n(e[2])*bi+$n(e[3])*pi+$n(e[4])*mi+Hn(e[5]||""))*Un(e[1]))})(n,t):void 0}function Fn(e){const t=Un(e[1]),n=parseInt(e[2]||e[3]);if(t<0&&!n)throw new RangeError(ni(-0));return t*n}function Ln(e){const t=$n(e[3]);return{...se(Hn(e[4]||""))[0],isoHour:$n(e[1]),isoMinute:$n(e[2]),isoSecond:60===t?59:t}}function Zn(e){let t,n;const r=[];if(e.replace(Ts,(e,o,i)=>{const a=Boolean(o),[s,u]=i.split("=").reverse();if(u){if("u-ca"===u)r.push(s),t||(t=a);else if(a||/[A-Z]/.test(u))throw new RangeError(ni(e))}else{if(n)throw new RangeError(ni(e));n=s}return""}),r.length>1&&t)throw new RangeError(ni(e));return{timeZone:n,calendar:r[0]||Ai}}function Hn(e){return parseInt(e.padEnd(9,"0"))}function Bn(e){return new RegExp(`^${e}$`,"i")}function Un(e){return e&&"+"!==e?-1:1}function $n(e){return void 0===e?0:parseInt(e)}function Wn(e){const t=qn(e);return"number"==typeof t?Lt(t):t?(e=>{if(Os.test(e))throw new RangeError(Ho(e));if(_s.test(e))throw new RangeError(Uo);return e.toLowerCase().split("/").map((e,t)=>(e.length<=3||/\d/.test(e))&&!/etc|yap/.test(e)?e.toUpperCase():e.replace(/baja|dumont|[a-z]+/g,(e,n)=>e.length<=2&&!t||"in"===e||"chat"===e?e.toUpperCase():e.length>2||!n?w(e).replace(/island|noronha|murdo|rivadavia|urville/,w):e)).join("/")})(e):ns}function zn(e){const t=qn(e);return"number"==typeof t?t:t?t.resolvedOptions().timeZone:ns}function qn(e){const t=An(e=e.toUpperCase(),1);return void 0!==t?t:e!==ns?Is(e):void 0}function Vn(e,t){return G(e.epochNanoseconds,t.epochNanoseconds)}function Jn(e,t){return G(e.epochNanoseconds,t.epochNanoseconds)}function Gn(e,t){return Kn(e,t)||Xn(e,t)}function Kn(e,t){return M(ce(e),ce(t))}function Xn(e,t){return M(ae(e),ae(t))}function Qn(e,t){if(e===t)return 1;try{return zn(e)===zn(t)}catch(e){}}function er(e,t,n,r){const o=Ce(e,r,3,5),i=fr(t.epochNanoseconds,n.epochNanoseconds,...o);return nt(e?bn(i):i)}function tr(e,t,n,r,o,i){const a=br(r.calendar,o.calendar),[s,u,c,l]=Ce(n,i,5),f=r.epochNanoseconds,d=o.epochNanoseconds,h=G(d,f);let m;if(h)if(s<6)m=fr(f,d,s,u,c,l);else{const n=t(((e,t)=>{if(!Qn(e,t))throw new RangeError(Bo);return e})(r.timeZone,o.timeZone)),f=e(a);m=cr(f,n,r,o,h,s,i),m=bt(m,d,s,u,c,l,f,r,ot,g(tn,n))}else m=Xi;return nt(n?bn(m):m)}function nr(e,t,n,r,o){const i=br(n.calendar,r.calendar),[a,s,u,c]=Ce(t,o,6),l=le(n),f=le(r),d=G(f,l);let h;if(d)if(a<=6)h=fr(l,f,a,s,u,c);else{const t=e(i);h=lr(t,n,r,d,a,o),h=bt(h,f,a,s,u,c,t,n,le,nn)}else h=Xi;return nt(t?bn(h):h)}function rr(e,t,n,r,o){const i=br(n.calendar,r.calendar);return ir(t,()=>e(i),n,r,...Ce(t,o,6,9,6))}function or(e,t,n,r,o){const i=br(n.calendar,r.calendar),a=Ce(t,o,9,9,8),s=e(i),u=on(s,n),c=on(s,r);return u.isoYear===c.isoYear&&u.isoMonth===c.isoMonth&&u.isoDay===c.isoDay?nt(Xi):ir(t,()=>s,re(u),re(c),...a,8)}function ir(e,t,n,r,o,i,a,s,u=6){const c=le(n),l=le(r);if(void 0===c||void 0===l)throw new RangeError(Vo);let f;if(G(l,c))if(6===o)f=fr(c,l,o,i,a,s);else{const e=t();f=e.N(n,r,o),i===u&&1===a||(f=bt(f,l,o,i,a,s,e,n,le,rn))}else f=Xi;return nt(e?bn(f):f)}function ar(e,t,n,r){const[o,i,a,s]=Ce(e,r,5,5),u=yt(pr(t,n),dt(i,a),s),c={...Xi,...En(u,o)};return nt(e?bn(c):c)}function sr(e,t,n,r,o,i){const a=G(r.epochNanoseconds,n.epochNanoseconds);return a?o<6?dr(n.epochNanoseconds,r.epochNanoseconds,o):cr(t,e,n,r,a,o,i):Xi}function ur(e,t,n,r,o){const i=le(t),a=le(n),s=G(a,i);return s?r<=6?dr(i,a,r):lr(e,t,n,s,r,o):Xi}function cr(e,t,n,r,o,i,a){const[s,u,c]=((e,t,n,r)=>{function o(){return f={...sn(s,c++*-r),...a},d=qt(e,f),G(u,d)===-r}const i=ss(t,e),a=h(ta,i),s=ss(n,e),u=n.epochNanoseconds;let c=0;const l=pr(i,s);let f,d;if(Math.sign(l)===-r&&c++,o()&&(-1===r||o()))throw new RangeError(Fo);const m=ee(J(d,u));return[i,f,m]})(t,n,r,o);var l,f;return{...6===i?(l=s,f=u,{...Xi,days:hr(l,f)}):e.N(s,u,i,a),...En(c)}}function lr(e,t,n,r,o,i){const[a,s,u]=((e,t,n)=>{let r=t,o=pr(e,t);return Math.sign(o)===-n&&(r=sn(t,-n),o+=gi*n),[e,r,o]})(t,n,r);return{...e.N(a,s,o,i),...En(u)}}function fr(e,t,n,r,o,i){return{...Xi,...Mn(gt(J(e,t),r,o,i),n)}}function dr(e,t,n){return{...Xi,...Mn(J(e,t),n)}}function hr(e,t){return mr(ce(e),ce(t))}function mr(e,t){return Math.trunc((t-e)/li)}function pr(e,t){return ae(t)-ae(e)}function br(e,t){if(e!==t)throw new RangeError(Zo);return e}function gr(e){return this.m(e)[0]}function wr(e){return this.m(e)[1]}function yr(e){const[t]=this.v(e);return mr(this.p(t),ce(e))+1}function vr(e){const t=xs.exec(e);if(!t)throw new RangeError(Co(e));return[parseInt(t[1]),Boolean(t[2])]}function Mr(e,t){return"M"+si(e)+(t?"L":"")}function Er(e,t,n){return e+(t||n&&e>=n?1:0)}function Sr(e,t){return e-(t&&e>=t?1:0)}function Dr(e,t){return(t+e)*(Math.sign(t)||1)||0}function Tr(e){return Zi[Ir(e)]}function kr(e){return Bi[Ir(e)]}function Ir(e){return $r(e.id||Ai)}function _r(e){function t(e){return((e,t)=>({...jr(e,t),o:e.month,day:parseInt(e.day)}))(ge(n,e),r)}const n=Ps(e),r=$r(e);return{id:e,h:Or(t),l:xr(t)}}function Or(e){return o(t=>{const n=ce(t);return e(n)},WeakMap)}function xr(e){const t=e(0).year-ga;return o(n=>{let r,o=he(n-t),i=0;const a=[],s=[];do{o+=400*li}while((r=e(o)).year<=n);do{if(o+=(1-r.day)*li,r.year===n&&(a.push(o),s.push(r.o)),o-=li,++i>100||o<-la)throw new RangeError(Fo)}while((r=e(o)).year>=n);return{i:a.reverse(),u:ii(s.reverse())}})}function jr(e,t){let n,r,o=Pr(e);if(e.era){const i=Zi[t],a=Hi[t]||{};void 0!==i&&(n="islamic"===t?"ah":e.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,""),"bc"===n||"b"===n?n="bce":"ad"===n||"a"===n?n="ce":"beforeroc"===n&&(n="broc"),n=a[n]||n,r=o,o=Dr(r,i[n]||0))}return{era:n,eraYear:r,year:o}}function Pr(e){return parseInt(e.relatedYear||e.year)}function Nr(e){const{year:t,o:n,day:r}=this.h(e),{u:o}=this.l(t);return[t,o[n]+1,r]}function Cr(e,t=1,n=1){return this.l(e).i[t-1]+(n-1)*li}function Rr(e,t){const n=Yr.call(this,e);return[Sr(t,n),n===t]}function Yr(e){const t=Hr(this,e),n=Hr(this,e-1),r=t.length;if(r>n.length){const e=kr(this);if(e<0)return-e;for(let e=0;e<r;e++)if(t[e]!==n[e])return e+1}}function Ar(e){return mr(Cr.call(this,e),Cr.call(this,e+1))}function Fr(e,t){const{i:n}=this.l(e);let r=t+1,o=n;return r>n.length&&(r=1,o=this.l(e+1).i),mr(n[t-1],o[r-1])}function Lr(e){return this.l(e).i.length}function Zr(e){const t=this.h(e);return[t.era,t.eraYear]}function Hr(e,t){return Object.keys(e.l(t).u)}function Br(e){return Ur(Ui(e))}function Ur(e){if((e=e.toLowerCase())!==Ai&&e!==Fi){const t=Ps(e).resolvedOptions().calendar;if($r(e)!==$r(t))throw new RangeError(Lo(e));return t}return e}function $r(e){return"islamicc"===e&&(e="islamic"),e.split("-")[0]}function Wr(e,t){return n=>n===Ai?e:n===Fi||n===Li?Object.assign(Object.create(e),{id:n}):Object.assign(Object.create(t),js(n))}function zr(e,t,n,r){const o=qr(n,r,Ni,[],Di);if(void 0!==o.timeZone){const r=n.F(o),i=Jr(o),a=e(o.timeZone);return{epochNanoseconds:zt(t(a),{...r,...i},void 0!==o.offset?In(o.offset):void 0),timeZone:a}}return{...n.F(o),...sa}}function qr(e,t,n,r=[],o=[]){return Vr(t,[...e.fields(n),...o].sort(),r)}function Vr(e,t,n,r=!n){const o={};let i,a=0;for(const r of t){if(r===i)throw new RangeError(To(r));if("constructor"===r||"__proto__"===r)throw new RangeError(Do(r));let t=e[r];if(void 0!==t)a=1,Us[r]&&(t=Us[r](t,r)),o[r]=t;else if(n){if(n.includes(r))throw new TypeError(So(r));o[r]=Yi[r]}i=r}if(r&&!a)throw new TypeError(ko(t));return o}function Jr(e,t){return je($s({...Yi,...e}),t)}function Gr(e,t,n,r,o){t=h(n=e.fields(n),t),r=Vr(r,o=e.fields(o),[]);let i=e.k(t,r);return i=Vr(i,[...n,...o].sort(),[]),e.F(i)}function Kr(e,t){const n=Tr(e),r=Hi[e.id||""]||{};let{era:o,eraYear:i,year:a}=t;if(void 0!==o||void 0!==i){if(void 0===o||void 0===i)throw new TypeError(xo);if(!n)throw new RangeError(Oo);const e=n[r[o]||o];if(void 0===e)throw new RangeError(Po(o));const t=Dr(i,e);if(void 0!==a&&a!==t)throw new RangeError(jo);a=t}else if(void 0===a)throw new TypeError(No(n));return a}function Xr(e,t,r,o){let{month:i,monthCode:a}=t;if(void 0!==a){const t=((e,t,n,r)=>{const o=e.L(n),[i,a]=vr(t);let s=Er(i,a,o);if(a){const t=kr(e);if(void 0===t)throw new RangeError(Ao);if(t>0){if(s>t)throw new RangeError(Ao);if(void 0===o){if(1===r)throw new RangeError(Ao);s--}}else{if(s!==-t)throw new RangeError(Ao);if(void 0===o&&1===r)throw new RangeError(Ao)}}return s})(e,a,r,o);if(void 0!==i&&i!==t)throw new RangeError(Ro);i=t,o=1}else if(void 0===i)throw new TypeError(Yo);return n("month",i,1,e.B(r),o)}function Qr(e,n,r,o,i){return t(n,"day",1,e.U(o,r),i)}function eo(e,t,n,r){let o=0;const i=[];for(const e of n)void 0!==t[e]?o=1:i.push(e);if(Object.assign(e,t),o)for(const t of r||i)delete e[t]}function to(e){const t=Hs(e.calendar),[n,r,o]=t.v(e),[i,a]=t.q(n,r);return{year:n,monthCode:Mr(i,a),day:o}}function no(e,t){return Ke(ss(t,e))}function ro(e,t){return Xe(ss(t,e))}function oo(e,t){return tt(ss(t,e))}function io(e,t,n){const r=new Set(n);return(o,i)=>{const a=n&&m(o,n);if(!m(o=((e,t)=>{const n={};for(const r in t)e.has(r)||(n[r]=t[r]);return n})(r,o),e)){if(i&&a)throw new TypeError("Invalid formatting options");o={...t,...o}}return n&&(o.timeZone=ns,["full","long"].includes(o.J)&&(o.J="medium")),o}}function ao(e,t=so,n=0){const[r,,,o]=e;return(i,a=Mu,...s)=>{const u=t(o&&o(...s),i,a,r,n),c=u.resolvedOptions();return[u,...uo(e,c,s)]}}function so(e,t,n,r,o){if(n=r(n,o),e){if(void 0!==n.timeZone)throw new TypeError(oi);n.timeZone=e}return new pa(t,n)}function uo(e,t,n){const[,r,o]=e;return n.map(e=>(e.calendar&&((e,t,n)=>{if((n||e!==Ai)&&e!==t)throw new RangeError(Zo)})(e.calendar,t.calendar,o),r(e,t)))}function co(e,t){return{...e,calendar:t}}function lo(e){const t=fo();return pe(t,e.R(t))}function fo(){return Q(Date.now(),hi)}function ho(){return xu||(xu=(new pa).resolvedOptions().timeZone)}const mo=(e,t)=>`Non-integer ${e}: ${t}`,po=(e,t)=>`Non-positive ${e}: ${t}`,bo=(e,t)=>`Non-finite ${e}: ${t}`,go=e=>`Cannot convert bigint to ${e}`,wo=e=>`Invalid bigint: ${e}`,yo="Cannot convert Symbol to string",vo="Invalid object",Mo=(e,t,n,r,o)=>o?Mo(e,o[t],o[n],o[r]):Eo(e,t)+`; must be between ${n}-${r}`,Eo=(e,t)=>`Invalid ${e}: ${t}`,So=e=>`Missing ${e}`,Do=e=>`Invalid field ${e}`,To=e=>`Duplicate field ${e}`,ko=e=>"No valid fields: "+e.join(),Io=(e,t,n)=>Eo(e,t)+"; must be "+Object.keys(n).join(),_o="Invalid calling context",Oo="Forbidden era/eraYear",xo="Mismatching era/eraYear",jo="Mismatching year/eraYear",Po=e=>`Invalid era: ${e}`,No=e=>"Missing year"+(e?"/era/eraYear":""),Co=e=>`Invalid monthCode: ${e}`,Ro="Mismatching month/monthCode",Yo="Missing month/monthCode",Ao="Invalid leap month",Fo="Invalid protocol results",Lo=e=>Eo("Calendar",e),Zo="Mismatching Calendars",Ho=e=>Eo("TimeZone",e),Bo="Mismatching TimeZones",Uo="Forbidden ICU TimeZone",$o="Out-of-bounds offset",Wo="Out-of-bounds TimeZone gap",zo="Invalid TimeZone offset",qo="Ambiguous offset",Vo="Out-of-bounds date",Jo="Out-of-bounds duration",Go="Cannot mix duration signs",Ko="Missing relativeTo",Xo="Cannot use large units",Qo="Required smallestUnit or largestUnit",ei="smallestUnit > largestUnit",ti=e=>`Cannot parse: ${e}`,ni=e=>`Invalid substring: ${e}`,ri="Mismatching types for formatting",oi="Cannot specify TimeZone",ii=g(f,(e,t)=>t),ai=g(f,(e,t,n)=>n),si=g(v,2),ui={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},ci=Object.keys(ui),li=864e5,fi=1e3,di=1e3,hi=1e6,mi=1e9,pi=6e10,bi=36e11,gi=864e11,wi=[1,di,hi,mi,pi,bi,gi],yi=ci.slice(0,6),vi=y(yi),Mi=["offset"],Ei=["timeZone"],Si=yi.concat(Mi),Di=Si.concat(Ei),Ti=["era","eraYear"],ki=Ti.concat(["year"]),Ii=["year"],_i=["monthCode"],Oi=["month"].concat(_i),xi=["day"],ji=Oi.concat(Ii),Pi=_i.concat(Ii),Ni=xi.concat(ji),Ci=xi.concat(Oi),Ri=xi.concat(_i),Yi=ai(yi,0),Ai="iso8601",Fi="gregory",Li="japanese",Zi={[Fi]:{"gregory-inverse":-1,gregory:0},[Li]:{"japanese-inverse":-1,japanese:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018},ethiopic:{ethioaa:0,ethiopic:5500},coptic:{"coptic-inverse":-1,coptic:0},roc:{"roc-inverse":-1,roc:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0}},Hi={[Fi]:{bce:"gregory-inverse",ce:"gregory"},[Li]:{bce:"japanese-inverse",ce:"japanese"},ethiopic:{era0:"ethioaa",era1:"ethiopic"},coptic:{era0:"coptic-inverse",era1:"coptic"},roc:{broc:"roc-inverse",minguo:"roc"}},Bi={chinese:13,dangi:13,hebrew:-6},Ui=g(Y,"string"),$i=g(Y,"boolean"),Wi=g(Y,"number"),zi=ci.map(e=>e+"s"),qi=y(zi),Vi=zi.slice(0,6),Ji=zi.slice(6),Gi=Ji.slice(1),Ki=ii(zi),Xi=ai(zi,0),Qi=ai(Vi,0),ea=g(b,zi),ta=["isoNanosecond","isoMicrosecond","isoMillisecond","isoSecond","isoMinute","isoHour"],na=["isoDay","isoMonth","isoYear"],ra=ta.concat(na),oa=y(na),ia=y(ta),aa=y(ra),sa=ai(ia,0),ua=g(b,ra),ca=1e8,la=ca*li,fa=[ca,0],da=[-ca,0],ha=275760,ma=-271821,pa=Intl.DateTimeFormat,ba="en-GB",ga=1970,wa=1972,ya=12,va=he(1868,9,8),Ma=o(ke,WeakMap),Ea="smallestUnit",Sa="unit",Da="roundingIncrement",Ta="fractionalSecondDigits",ka="relativeTo",Ia="direction",_a={constrain:0,reject:1},Oa=Object.keys(_a),xa={compatible:0,reject:1,earlier:2,later:3},ja={reject:0,use:1,prefer:2,ignore:3},Pa={auto:0,never:1,critical:2,always:3},Na={auto:0,never:1,critical:2},Ca={auto:0,never:1},Ra={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Ya={previous:-1,next:1},Aa=g(ze,Ea),Fa=g(ze,"largestUnit"),La=g(ze,Sa),Za=g(qe,"overflow",_a),Ha=g(qe,"disambiguation",xa),Ba=g(qe,"offset",ja),Ua=g(qe,"calendarName",Pa),$a=g(qe,"timeZoneName",Na),Wa=g(qe,"offset",Ca),za=g(qe,"roundingMode",Ra),qa="PlainYearMonth",Va="PlainMonthDay",Ja="PlainDate",Ga="PlainDateTime",Ka="PlainTime",Xa="ZonedDateTime",Qa="Instant",es="Duration",ts=[Math.floor,e=>_(e)?Math.floor(e):Math.round(e),Math.ceil,e=>_(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>_(e)?Math.trunc(e)||0:Math.round(e),e=>e<0?Math.floor(e):Math.ceil(e),e=>Math.sign(e)*Math.round(Math.abs(e))||0,e=>_(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],ns="UTC",rs=5184e3,os=de(1847),is=de((new Date).getUTCFullYear()+10),as=/0+$/,ss=o(Wt,WeakMap),us=2**32-1,cs=o(e=>{const t=qn(e);return"object"==typeof t?new fs(t):new ls(t||0)});class ls{constructor(e){this.$=e}R(){return this.$}I(e){return(e=>{const t=le({...e,...sa});if(!t||Math.abs(t[0])>1e8)throw new RangeError(Vo)})(e),[fe(e,this.$)]}O(){}}class fs{constructor(e){this.nn=(e=>{function t(e){const t=E(e,a,s),[o,u]=kn(t),c=r(o),l=r(u);return c===l?c:n(i(o,u),c,l,e)}function n(t,n,r,o){let i,a;for(;(void 0===o||void 0===(i=o<t[0]?n:o>=t[1]?r:void 0))&&(a=t[1]-t[0]);){const n=t[0]+Math.floor(a/2);e(n)===r?t[1]=n:t[0]=n+1}return i}const r=o(e),i=o(Tn);let a=os,s=is;return{tn(e){const n=t(e-86400),r=t(e+86400),o=e-n,i=e-r;if(n===r)return[o];const a=t(o);return a===t(i)?[e-a]:n>r?[o,i]:[]},rn:t,O(e,t){const o=E(e,a,s);let[u,c]=kn(o);const l=rs*t,f=t<0?()=>c>a||(a=o,0):()=>u<s||(s=o,0);for(;f();){const o=r(u),a=r(c);if(o!==a){const r=i(u,c);n(r,o,a);const s=r[0];if((M(s,e)||1)===t)return s}u+=l,c+=l}}}})((e=>t=>{const n=ge(e,t*fi);return de(Pr(n),parseInt(n.month),parseInt(n.day),parseInt(n.hour),parseInt(n.minute),parseInt(n.second))-t})(e))}R(e){return this.nn.rn((e=>ue(e)[0])(e))*mi}I(e){const[t,n]=[de((r=e).isoYear,r.isoMonth,r.isoDay,r.isoHour,r.isoMinute,r.isoSecond),r.isoMillisecond*hi+r.isoMicrosecond*di+r.isoNanosecond];var r;return this.nn.tn(t).map(e=>ie(V(Q(e,mi),n)))}O(e,t){const[n,r]=ue(e),o=this.nn.O(n+(t>0||r?1:0),t);if(void 0!==o)return Q(o,mi)}}const ds="([+-])",hs="(?:[.,](\\d{1,9}))?",ms=`(?:(?:${ds}(\\d{6}))|(\\d{4}))-?(\\d{2})`,ps="(\\d{2})(?::?(\\d{2})(?::?(\\d{2})"+hs+")?)?",bs=ds+ps,gs=ms+"-?(\\d{2})(?:[T ]"+ps+"(Z|"+bs+")?)?",ws="\\[(!?)([^\\]]*)\\]",ys=`((?:${ws}){0,9})`,vs=Bn(ms+ys),Ms=Bn("(?:--)?(\\d{2})-?(\\d{2})"+ys),Es=Bn(gs+ys),Ss=Bn("T?"+ps+"(?:"+bs+")?"+ys),Ds=Bn(bs),Ts=new RegExp(ws,"g"),ks=Bn(`${ds}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${hs}H)?(?:(\\d+)${hs}M)?(?:(\\d+)${hs}S)?)?`),Is=o(e=>new pa(ba,{timeZone:e,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),_s=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Os=/[^\w\/:+-]+/,xs=/^M(\d{2})(L?)$/,js=o(_r),Ps=o(e=>new pa(ba,{calendar:e,timeZone:ns,era:"short",year:"numeric",month:"short",day:"numeric"})),Ns={P(e,t,r){const o=Pe(r);let i,{years:a,months:s,weeks:u,days:c}=t;if(c+=vn(t,5)[0],a||s)i=((e,t,r,o,i)=>{let[a,s,u]=e.v(t);if(r){const[t,o]=e.q(a,s);a+=r,s=Er(t,o,e.L(a)),s=n("month",s,1,e.B(a),i)}return o&&([a,s]=e.un(a,s,o)),u=n("day",u,1,e.U(a,s),i),e.p(a,s,u)})(this,e,a,s,o);else{if(!u&&!c)return e;i=ce(e)}if(void 0===i)throw new RangeError(Vo);return i+=(7*u+c)*li,re(be(i))},N(e,t,n){if(n<=7){let r=0,o=hr({...e,...sa},{...t,...sa});return 7===n&&([r,o]=T(o,7)),{...Xi,weeks:r,days:o}}const r=this.v(e),o=this.v(t);let[i,a,s]=((e,t,n,r,o,i,a)=>{let s=o-t,u=i-n,c=a-r;if(s||u){const l=Math.sign(s||u);let f=e.U(o,i),d=0;if(Math.sign(c)===-l){const r=f;[o,i]=e.un(o,i,-l),s=o-t,u=i-n,f=e.U(o,i),d=l<0?-r:f}if(c=a-Math.min(r,f)+d,s){const[r,a]=e.q(t,n),[c,f]=e.q(o,i);if(u=c-r||Number(f)-Number(a),Math.sign(u)===-l){const n=l<0&&-e.B(o);s=(o-=l)-t,u=i-Er(r,a,e.L(o))+(n||e.B(o))}}}return[s,u,c]})(this,...r,...o);return 8===n&&(a+=this.cn(i,r[0]),i=0),{...Xi,years:i,months:a,days:s}},F(e,t){const n=Pe(t),r=Kr(this,e),o=Xr(this,e,r,n),i=Qr(this,e,o,r,n);return Xe(re(this.V(r,o,i)),this.id||Ai)},K(e,t){const n=Pe(t),r=Kr(this,e),o=Xr(this,e,r,n);return Qe(ne(this.V(r,o,1)),this.id||Ai)},_(e,t){const n=Pe(t);let r,o,i,a=void 0!==e.eraYear||void 0!==e.year?Kr(this,e):void 0;const s=!this.id;if(void 0===a&&s&&(a=wa),void 0!==a){const t=Xr(this,e,a,n);r=Qr(this,e,t,a,n);const s=this.L(a);o=Sr(t,s),i=t===s}else{if(void 0===e.monthCode)throw new TypeError(Yo);if([o,i]=vr(e.monthCode),this.id&&this.id!==Fi&&this.id!==Li)if(this.id&&"coptic"===$r(this.id)&&0===n){const t=i||13!==o?30:6;r=e.day,r=E(r,1,t)}else if(this.id&&"chinese"===$r(this.id)&&0===n){const t=!i||1!==o&&9!==o&&10!==o&&11!==o&&12!==o?30:29;r=e.day,r=E(r,1,t)}else r=e.day;else r=Qr(this,e,Xr(this,e,wa,n),wa,n)}const u=this.G(o,i,r);if(!u)throw new RangeError("Cannot guess year");const[c,l]=u;return et(re(this.V(c,l,r)),this.id||Ai)},fields(e){return Tr(this)&&e.includes("year")?[...e,...Ti]:e},k(e,t){const n=Object.assign(Object.create(null),e);return eo(n,t,Oi),Tr(this)&&(eo(n,t,ki),this.id===Li&&eo(n,t,Ci,Ti)),n},inLeapYear(e){const[t]=this.v(e);return this.sn(t)},monthsInYear(e){const[t]=this.v(e);return this.B(t)},daysInMonth(e){const[t,n]=this.v(e);return this.U(t,n)},daysInYear(e){const[t]=this.v(e);return this.fn(t)},dayOfYear:yr,era(e){return this.hn(e)[0]},eraYear(e){return this.hn(e)[1]},monthCode(e){const[t,n]=this.v(e),[r,o]=this.q(t,n);return Mr(r,o)},dayOfWeek:De,daysInWeek:()=>7},Cs={v:we,hn:Te,q:ye},Rs={dayOfYear:yr,v:we,p:he},Ys=Object.assign({},Rs,{weekOfYear:gr,yearOfWeek:wr,m(e){function t(e){return(7-e<r?7:0)-e}function n(e){const n=Ee(d+e),r=e||1,o=t(D(u+n*r,7));return l=(n+(o-c)*r)/7}const r=this.id?1:4,o=De(e),i=this.dayOfYear(e),a=D(o-1,7),s=i-1,u=D(a-s,7),c=t(u);let l,f=Math.floor((s-c)/7)+1,d=e.isoYear;return f?f>n(0)&&(f=1,d++):(f=n(-1),d--),[f,d,l]}}),As=Object.assign({},Ns,Ys,{v:we,hn:Te,q:ye,G(e,t){if(!t)return[wa,e]},sn:Se,L(){},B:ve,cn:e=>e*ya,U:Me,fn:Ee,V:(e,t,n)=>({isoYear:e,isoMonth:t,isoDay:n}),p:he,un:(e,t,n)=>(e+=k(n,ya),(t+=I(n,ya))<1?(e--,t+=ya):t>ya&&(e++,t-=ya),[e,t]),year:e=>e.isoYear,month:e=>e.isoMonth,day:e=>e.isoDay}),Fs={v:Nr,hn:Zr,q:Rr},Ls={dayOfYear:yr,v:Nr,p:Cr,weekOfYear:gr,yearOfWeek:wr,m:()=>[]},Zs=Object.assign({},Ns,Ls,{v:Nr,hn:Zr,q:Rr,G(e,t,n){const r=this.id&&"chinese"===$r(this.id)?((e,t,n)=>{if(t)switch(e){case 1:return 1651;case 2:return n<30?1947:1765;case 3:return n<30?1966:1955;case 4:return n<30?1963:1944;case 5:return n<30?1971:1952;case 6:return n<30?1960:1941;case 7:return n<30?1968:1938;case 8:return n<30?1957:1718;case 9:return 1832;case 10:return 1870;case 11:return 1814;case 12:return 1890}return 1972})(e,t,n):wa;let[o,i,a]=Nr.call(this,{isoYear:r,isoMonth:ya,isoDay:31});const s=Yr.call(this,o),u=i===s;1===(M(e,Sr(i,s))||M(Number(t),Number(u))||M(n,a))&&o--;for(let r=0;r<100;r++){const i=o-r,a=Yr.call(this,i),s=Er(e,t,a);if(t===(s===a)&&n<=Fr.call(this,i,s))return[i,s]}},sn(e){const t=Ar.call(this,e);return t>Ar.call(this,e-1)&&t>Ar.call(this,e+1)},L:Yr,B:Lr,cn(e,t){const n=t+e,r=Math.sign(e),o=r<0?-1:0;let i=0;for(let e=t;e!==n;e+=r)i+=Lr.call(this,e+o);return i},U:Fr,fn:Ar,V(e,t,n){return be(Cr.call(this,e,t,n))},p:Cr,un(e,t,n){if(n){if(t+=n,!Number.isSafeInteger(t))throw new RangeError(Vo);if(n<0)for(;t<1;)t+=Lr.call(this,--e);else{let n;for(;t>(n=Lr.call(this,e));)t-=n,e++}}return[e,t]},year(e){return this.h(e).year},month(e){const{year:t,o:n}=this.h(e),{u:r}=this.l(t);return r[n]+1},day(e){return this.h(e).day}}),Hs=Wr(Cs,Fs),Bs=Wr(As,Zs),Us={...{era:Z,eraYear:U,year:U,month:W,monthCode(e){const t=Z(e);return vr(t),t},day:W},...ai(yi,U),...ai(zi,$),offset(e){const t=Z(e);return In(t),t}},$s=g(d,yi,ta),Ws=g(d,ta,yi),zs="numeric",qs=["timeZoneName"],Vs={month:zs,day:zs},Js={year:zs,month:zs},Gs=Object.assign({},Js,{day:zs}),Ks={hour:zs,minute:zs,second:zs},Xs=Object.assign({},Gs,Ks),Qs=Object.assign({},Xs,{timeZoneName:"short"}),eu=Object.keys(Js),tu=Object.keys(Vs),nu=Object.keys(Gs),ru=Object.keys(Ks),ou=["dateStyle"],iu=eu.concat(ou),au=tu.concat(ou),su=nu.concat(ou,["weekday"]),uu=ru.concat(["dayPeriod","timeStyle","fractionalSecondDigits"]),cu=su.concat(uu),lu=qs.concat(uu),fu=qs.concat(su),du=qs.concat(["day","weekday"],uu),hu=qs.concat(["year","weekday"],uu),mu=io(cu,Xs),pu=io(cu,Qs),bu=io(cu,Xs,qs),gu=io(su,Gs,lu),wu=io(uu,Ks,fu),yu=io(iu,Js,du),vu=io(au,Vs,hu),Mu={},Eu=new pa(void 0,{calendar:Ai}).resolvedOptions().calendar===Ai,Su=[mu,rt],Du=[pu,rt,0,(e,t)=>{const n=e.timeZone;if(t&&t.timeZone!==n)throw new RangeError(Bo);return n}],Tu=[bu,ce],ku=[gu,ce],Iu=[wu,e=>ae(e)/hi],_u=[yu,ce,Eu],Ou=[vu,ce,Eu];let xu;function ju(e,t,n,r,o){function c(...e){if(!(this instanceof c))throw new TypeError(_o);rc(this,t(...e))}function f(e,t){return Object.defineProperties(function(...t){return e.call(this,d(this),...t)},i(t))}function d(t){const n=nc(t);if(!n||n.branding!==e)throw new TypeError(_o);return n}return Object.defineProperties(c.prototype,{...s(l(f,n)),...a(l(f,r)),...u("Temporal."+e)}),Object.defineProperties(c,{...a(o),...i(e)}),[c,e=>{const t=Object.create(c.prototype);return rc(t,e),t},d]}function Pu(e){if(nc(e)||void 0!==e.calendar||void 0!==e.timeZone)throw new TypeError("Invalid bag");return e}function Nu(e){return Cu(e)||Ai}function Cu(e){const{calendar:t}=e;if(void 0!==t)return Ru(t)}function Ru(e){if(r(e)){const{calendar:t}=nc(e)||{};if(!t)throw new TypeError(Lo(e));return t}return(e=>Ur(function(e){const t=Cn(e)||Rn(e)||Yn(e);return t?t.calendar:e}(Ui(e))))(e)}function Yu(e){const t={};for(const n in e)t[n]=e=>{const{calendar:t}=e;return Bs(t)[n](e)};return t}function Au(){throw new TypeError("Cannot use valueOf")}function Fu(e){if(r(e)){const{timeZone:t}=nc(e)||{};if(!t)throw new TypeError(Ho(e));return t}return(e=>Wn(function(e){const t=Cn(e);return t&&(t.timeZone||t.j&&ns||t.offset)||e}(Ui(e))))(e)}function Lu(e){if(r(e)){const t=nc(e);return t&&t.branding===es?t:function(e){const t=Vr(e,qi);return nt(wn({...Xi,...t}))}(e)}return function(e){const t=(e=>{const t=ks.exec(e);return t?(e=>{function t(e,t,i){let a=0,s=0;if(i&&([a,o]=S(o,wi[i])),void 0!==e){if(r)throw new RangeError(ni(e));s=(e=>{const t=parseInt(e);if(!Number.isFinite(t))throw new RangeError(ni(e));return t})(e),n=1,t&&(o=Hn(t)*(wi[i]/mi),r=1)}return a+s}let n=0,r=0,o=0,i={...c(zi,[t(e[2]),t(e[3]),t(e[4]),t(e[5]),t(e[6],e[7],5),t(e[8],e[9],4),t(e[10],e[11],3)]),...x(o,2,zi)};if(!n)throw new RangeError(ko(zi));return Un(e[1])<0&&(i=bn(i)),i})(t):void 0})(Ui(e));if(!t)throw new RangeError(ti(e));return nt(wn(t))}(e)}function Zu(e){if(void 0!==e){if(r(e)){const t=nc(e)||{};switch(t.branding){case Xa:case Ja:return t;case Ga:return Xe(t)}const n=Nu(e);return{...zr(Fu,cs,Bs(n),e),calendar:n}}return function(e){const t=Cn(Ui(e));if(!t)throw new RangeError(ti(e));if(t.timeZone)return xn(t,t.offset?In(t.offset):void 0);if(t.j)throw new RangeError(ti(e));return Pn(t)}(e)}}function Hu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ka:return Pe(t),n;case Ga:return Pe(t),tt(n);case Xa:return Pe(t),oo(cs,n)}return function(e,t){return tt(Jr(Vr(e,vi,[],1),Pe(t)))}(e,t)}const n=function(e){let t,n=(e=>{const t=Ss.exec(e);return t?(Zn(t[10]),Ln(t)):void 0})(Ui(e));if(!n){if(n=Cn(e),!n)throw new RangeError(ti(e));if(!n.C)throw new RangeError(ti(e));if(n.j)throw new RangeError(ni("Z"));On(n)}if((t=Rn(e))&&Oe(t))throw new RangeError(ti(e));if((t=Yn(e))&&Oe(t))throw new RangeError(ti(e));return tt(je(n,1))}(e);return Pe(t),n}function Bu(e){return void 0===e?void 0:Hu(e)}function Uu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ga:return Pe(t),n;case Ja:return Pe(t),Ke({...n,...sa});case Xa:return Pe(t),no(cs,n)}return function(e,t,n){const r=qr(e,t,Ni,[],yi),o=Pe(n);return Ke(oe({...e.F(r,We(o)),...Jr(r,o)}))}(Bs(Nu(e)),e,t)}const n=function(e){const t=Cn(Ui(e));if(!t||t.j)throw new RangeError(ti(e));return Ke(jn(t))}(e);return Pe(t),n}function $u(e,t){if(r(e)){const n=nc(e);if(n&&n.branding===Va)return Pe(t),n;const r=Cu(e);return function(e,t,n,r){const o=qr(e,n,Ni,xi);return t&&void 0!==o.month&&void 0===o.monthCode&&void 0===o.year&&(o.year=wa),e._(o,r)}(Bs(r||Ai),!r,e,t)}const n=function(e,t){const n=Yn(Ui(t));if(n)return On(n),et(_e(n));const r=_n(t,0,1),{calendar:o}=r,i=e(o),[a,s,u]=i.v(r),[c,l]=i.q(a,s),[f,d]=i.G(c,l,u);return et(re(i.V(f,d,u)),o)}(Bs,e);return Pe(t),n}function Wu(e,t){if(r(e)){const n=nc(e);return n&&n.branding===qa?(Pe(t),n):function(e,t,n,r){const o=qr(e,t,ji,r);return e.K(o,n)}(Bs(Nu(e)),e,t)}const n=function(e,t){const n=Rn(Ui(t));if(n)return On(n),Qe(ne(_e(n)));const r=_n(t,1);return Qe(on(e(r.calendar),r))}(Bs,e);return Pe(t),n}function zu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ja:return Pe(t),n;case Ga:return Pe(t),Xe(n);case Xa:return Pe(t),ro(cs,n)}return function(e,t,n,r=[]){const o=qr(e,t,Ni,r);return e.F(o,n)}(Bs(Nu(e)),e,t)}const n=_n(e);return Pe(t),n}function qu(e,t){if(r(e)){const n=nc(e);if(n&&n.branding===Xa)return Ne(t),n;const r=Nu(e);return function(e,t,n,r,o,i){const a=qr(n,o,Ni,Ei,Di),s=e(a.timeZone),[u,c,l]=Ne(i),f=n.F(a,We(u)),d=Jr(a,u);return Ge(zt(t(s),{...f,...d},void 0!==a.offset?In(a.offset):void 0,c,l),s,r)}(Fu,cs,Bs(r),r,e,t)}return function(e,t){const n=Cn(Ui(e));if(!n||!n.timeZone)throw new RangeError(ti(e));const{offset:r}=n,o=r?In(r):void 0,[,i,a]=Ne(t);return xn(n,o,i,a)}(e,t)}function Vu(e){return l(e=>t=>e(Ju(t)),e)}function Ju(e){return ss(e,cs)}function Gu(e){if(r(e)){const t=nc(e);if(t)switch(t.branding){case Qa:return t;case Xa:return Je(t.epochNanoseconds)}}return function(e){const t=Cn(e=Z(e));if(!t)throw new RangeError(ti(e));let n;if(t.j)n=0;else{if(!t.offset)throw new RangeError(ti(e));n=In(t.offset)}return t.timeZone&&An(t.timeZone,1),Je(fe(Ie(t),n))}(e)}function Ku(){function e(e,n){return new t(e,n)}function t(e,t=Object.create(null)){Bc.set(this,((e,t)=>{const n=new pa(e,t),r=n.resolvedOptions(),i=r.locale,a=h(Object.keys(t),r),s=o(ec),u=(e,...t)=>{if(e){if(2!==t.length)throw new TypeError(ri);for(const e of t)if(void 0===e)throw new TypeError(ri)}e||void 0!==t[0]||(t=[]);const r=t.map(e=>nc(e)||Number(e));let o,u=0;for(const e of r){const t="object"==typeof e?e.branding:void 0;if(u++&&t!==o)throw new TypeError(ri);o=t}return o?s(o)(i,a,...r):[n,...r]};return u.X=n,u})(e,t))}const n=pa.prototype,r=Object.getOwnPropertyDescriptors(n),a=Object.getOwnPropertyDescriptors(pa);for(const t in r){const n=r[t],o=t.startsWith("format")&&Xu(t);"function"==typeof n.value?n.value="constructor"===t?e:o||Qu(t):o&&(n.get=function(){if(!Bc.has(this))throw new TypeError(_o);return(...e)=>o.apply(this,e)},Object.defineProperties(n.get,i(`get ${t}`)))}return a.prototype.value=t.prototype=Object.create({},r),Object.defineProperties(e,a),e}function Xu(e){return Object.defineProperties(function(...t){const n=Bc.get(this),[r,...o]=n(e.includes("Range"),...t);return r[e](...o)},i(e))}function Qu(e){return Object.defineProperties(function(...t){return Bc.get(this).X[e](...t)},i(e))}function ec(e){const t=gc[e];if(!t)throw new TypeError((e=>`Cannot format ${e}`)(e));return ao(t,o(so),1)}const tc=new WeakMap,nc=tc.get.bind(tc),rc=tc.set.bind(tc),oc={era:function(e){if(void 0!==e)return Ui(e)},eraYear:j,year:N,month:P,daysInMonth:P,daysInYear:P,inLeapYear:$i,monthsInYear:P},ic={monthCode:Ui},ac={day:P},sc={dayOfWeek:P,dayOfYear:P,weekOfYear:function(e){if(void 0!==e)return P(e)},yearOfWeek:j,daysInWeek:P},uc=Yu(Object.assign({},oc,ic,ac,sc)),cc=Yu({...oc,...ic}),lc=Yu({...ic,...ac}),fc={calendarId:e=>e.calendar},dc=f(e=>t=>t[e],zi.concat("sign")),hc=f((e,t)=>e=>e[ta[t]],yi),mc={epochMilliseconds:rt,epochNanoseconds:function(e){return((e,t=1)=>{const[n,r]=e,o=Math.floor(r/t),i=gi/t;return BigInt(n)*BigInt(i)+BigInt(o)})(e.epochNanoseconds)}},[pc,bc]=ju(es,function(e=0,t=0,n=0,r=0,o=0,i=0,a=0,s=0,u=0,f=0){return nt(wn(l($,c(zi,[e,t,n,r,o,i,a,s,u,f]))))},{...dc,blank:function(e){return!e.sign}},{with:(e,t)=>bc(function(e,t){return nt((n=e,r=t,wn({...n,...Vr(r,qi)})));var n,r}(e,t)),negated:e=>bc(pn(e)),abs:e=>bc(function(e){return-1===e.sign?pn(e):e}(e)),add:(e,t,n)=>bc(mn(Zu,Bs,cs,0,e,Lu(t),n)),subtract:(e,t,n)=>bc(mn(Zu,Bs,cs,1,e,Lu(t),n)),round:(e,t)=>bc(function(e,t,n,r,o){const i=Dn(r),[a,s,u,c,l]=((e,t,n)=>{e=$e(e,Ea);let r=Fa(e);const o=n(e[ka]);let i=Ze(e);const a=za(e,7);let s=Aa(e);if(void 0===r&&void 0===s)throw new RangeError(Qo);if(null==s&&(s=0),null==r&&(r=Math.max(s,t)),Ve(r,s),i=He(i,s,1),i>1&&s>5&&r!==s)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");return[r,s,i,a,o]})(o,i,e),f=Math.max(i,a);if(!l&&f<=6)return nt(wn(((e,t,n,r,o)=>{const i=gt(vn(e),n,r,o);return{...Xi,...Mn(i,t)}})(r,a,s,u,c)));if(!dn(l)&&!r.sign)return r;if(!l)throw new RangeError(Ko);const[d,h,m]=un(t,n,l),p=cn(m),b=ln(m),g=fn(m),w=b(h,d,r);dn(l)||(oe(d),oe(w));let y=g(h,d,w,a);const v=r.sign,M=gn(y);if(v&&M&&v!==M)throw new RangeError(Fo);return y=bt(y,p(w),a,s,u,c,h,d,p,b),nt(y)}(Zu,Bs,cs,e,t)),total:(e,t)=>function(e,t,n,r,o){const i=Dn(r),[a,s]=((e,t)=>{const n=t((e=$e(e,Sa))[ka]);let r=La(e);return r=C(Sa,r),[r,n]})(o,e),u=Math.max(a,i);if(!s&&hn(u,s))return it(r,a);if(!s)throw new RangeError(Ko);if(!r.sign)return 0;const[c,l,f]=un(t,n,s),d=cn(f),h=ln(f),m=fn(f),p=h(l,c,r);dn(s)||(oe(c),oe(p));const b=m(l,c,p,a);return hn(a,s)?it(b,a):((e,t,n,r,o,i,a)=>{const s=gn(e),[u,c]=at(r,ea(n,e),n,s,o,i,a),l=st(t,u,c);return e[zi[n]]+l*s})(b,d(p),a,l,c,d,h)}(Zu,Bs,cs,e,t),toLocaleString(e,t,n){return Intl.DurationFormat?new Intl.DurationFormat(t,n).format(this):jt(e)},toString:jt,toJSON:e=>jt(e),valueOf:Au},{from:e=>bc(Lu(e)),compare:(e,t,n)=>function(e,t,n,r,o,i){const a=e(Ue(i).relativeTo),s=Math.max(Dn(r),Dn(o));if(p(zi,r,o))return 0;if(hn(s,a))return G(vn(r),vn(o));if(!a)throw new RangeError(Ko);const[u,c,l]=un(t,n,a),f=cn(l),d=ln(l);return G(f(d(c,u,r)),f(d(c,u,o)))}(Zu,Bs,cs,Lu(e),Lu(t),n)}),gc={Instant:Su,PlainDateTime:Tu,PlainDate:ku,PlainTime:Iu,PlainYearMonth:_u,PlainMonthDay:Ou},wc=ao(Su),yc=ao(Du),vc=ao(Tu),Mc=ao(ku),Ec=ao(Iu),Sc=ao(_u),Dc=ao(Ou),[Tc,kc]=ju(Ka,function(e=0,t=0,n=0,r=0,o=0,i=0){return tt(je(l(U,c(ta,[e,t,n,r,o,i])),1))},hc,{with(e,t,n){return kc(function(e,t,n){return tt(((e,t,n)=>Jr({...h(vi,e),...Vr(t,vi)},Pe(n)))(e,t,n))}(this,Pu(t),n))},add:(e,t)=>kc(en(0,e,Lu(t))),subtract:(e,t)=>kc(en(1,e,Lu(t))),until:(e,t,n)=>bc(ar(0,e,Hu(t),n)),since:(e,t,n)=>bc(ar(1,e,Hu(t),n)),round:(e,t)=>kc(function(e,t){const[n,r,o]=Re(t,5);var i;return tt((i=o,lt(e,dt(n,r),i)[0]))}(e,t)),equals:(e,t)=>function(e,t){return!Xn(e,t)}(e,Hu(t)),toLocaleString(e,t,n){const[r,o]=Ec(t,n,e);return r.format(o)},toString:xt,toJSON:e=>xt(e),valueOf:Au},{from:(e,t)=>kc(Hu(e,t)),compare:(e,t)=>Xn(Hu(e),Hu(t))}),[Ic,_c]=ju(Ga,g(function(e,t,n,r,o=0,i=0,a=0,s=0,u=0,f=0,d=Ai){return Ke(oe(Ie(l(U,c(ra,[t,n,r,o,i,a,s,u,f])))),e(d))},Br),{...fc,...uc,...hc},{with:(e,t,n)=>_c(function(e,t,n,r){const o=e(t.calendar),i=[...o.fields(Ni),...yi].sort(),a={...to(s=t),hour:s.isoHour,minute:s.isoMinute,second:s.isoSecond,millisecond:s.isoMillisecond,microsecond:s.isoMicrosecond,nanosecond:s.isoNanosecond};var s;const u=Vr(n,i),c=Pe(r),l=o.k(a,u),f={...a,...u};return Ke(oe({...o.F(l,We(c)),...je($s(f),c)}))}(Bs,e,Pu(t),n)),withCalendar:(e,t)=>_c(co(e,Ru(t))),withPlainTime:(e,t)=>_c(function(e,t=sa){return Ke(oe({...e,...t}))}(e,Bu(t))),add:(e,t,n)=>_c(Kt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>_c(Kt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(nr(Bs,0,e,Uu(t),n)),since:(e,t,n)=>bc(nr(Bs,1,e,Uu(t),n)),round:(e,t)=>_c(function(e,t){return Ke(ut(e,...Re(t)),e.calendar)}(e,t)),equals:(e,t)=>function(e,t){return!Gn(e,t)&&e.calendar===t.calendar}(e,Uu(t)),toZonedDateTime:(e,t,n)=>Yc(function(e,t,n,r){const o=((e,t,n,r)=>{const o=(e=>Ha(Ue(e)))(r);return qt(e(t),n,o)})(e,n,t,r);return Ge(ie(o),n,t.calendar)}(cs,e,Fu(t),n)),toPlainDate:e=>Cc(Xe(e)),toPlainTime:e=>kc(tt(e)),toLocaleString(e,t,n){const[r,o]=vc(t,n,e);return r.format(o)},toString:kt,toJSON:e=>kt(e),valueOf:Au},{from:(e,t)=>_c(Uu(e,t)),compare:(e,t)=>Gn(Uu(e),Uu(t))}),[Oc,xc]=ju(Va,g(function(e,t,n,r=Ai,o=wa){const i=U(t),a=U(n),s=e(r);return et(re(_e({isoYear:U(o),isoMonth:i,isoDay:a})),s)},Br),{...fc,...lc},{with:(e,t,n)=>xc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(Ni).sort(),a=(e=>{const t=Hs(e.calendar),[n,r,o]=t.v(e),[i,a]=t.q(n,r);return{monthCode:Mr(i,a),day:o}})(t),s=Vr(n,i),u=o.k(a,s);return o._(u,r)}(Bs,e,Pu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,$u(t)),toPlainDate(e,t){return Cc(function(e,t,n,r){return((e,t,n)=>Gr(e,t,Ri,R(n),Ii))(e(t.calendar),n,r)}(Bs,e,this,t))},toLocaleString(e,t,n){const[r,o]=Dc(t,n,e);return r.format(o)},toString:Ot,toJSON:e=>Ot(e),valueOf:Au},{from:(e,t)=>xc($u(e,t))}),[jc,Pc]=ju(qa,g(function(e,t,n,r=Ai,o=1){const i=U(t),a=U(n),s=e(r);return Qe(ne(_e({isoYear:i,isoMonth:a,isoDay:U(o)})),s)},Br),{...fc,...cc},{with:(e,t,n)=>Pc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(ji).sort(),a=(e=>{const t=Hs(e.calendar),[n,r]=t.v(e),[o,i]=t.q(n,r);return{year:n,monthCode:Mr(o,i)}})(t),s=Vr(n,i),u=o.k(a,s);return o.K(u,r)}(Bs,e,Pu(t),n)),add:(e,t,n)=>Pc(Qt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>Pc(Qt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(or(Bs,0,e,Wu(t),n)),since:(e,t,n)=>bc(or(Bs,1,e,Wu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,Wu(t)),toPlainDate(e,t){return Cc(function(e,t,n,r){return((e,t,n)=>Gr(e,t,Pi,R(n),xi))(e(t.calendar),n,r)}(Bs,e,this,t))},toLocaleString(e,t,n){const[r,o]=Sc(t,n,e);return r.format(o)},toString:_t,toJSON:e=>_t(e),valueOf:Au},{from:(e,t)=>Pc(Wu(e,t)),compare:(e,t)=>Kn(Wu(e),Wu(t))}),[Nc,Cc]=ju(Ja,g(function(e,t,n,r,o=Ai){return Xe(re(_e(l(U,{isoYear:t,isoMonth:n,isoDay:r}))),e(o))},Br),{...fc,...uc},{with:(e,t,n)=>Cc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(Ni).sort(),a=to(t),s=Vr(n,i),u=o.k(a,s);return o.F(u,r)}(Bs,e,Pu(t),n)),withCalendar:(e,t)=>Cc(co(e,Ru(t))),add:(e,t,n)=>Cc(Xt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>Cc(Xt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(rr(Bs,0,e,zu(t),n)),since:(e,t,n)=>bc(rr(Bs,1,e,zu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,zu(t)),toZonedDateTime(e,t){const n=r(t)?t:{timeZone:t};return Yc(function(e,t,n,r,o){const i=e(o.timeZone),a=o.plainTime,s=void 0!==a?t(a):void 0,u=n(i);let c;return c=s?qt(u,{...r,...s}):Vt(u,{...r,...sa}),Ge(c,i,r.calendar)}(Fu,Hu,cs,e,n))},toPlainDateTime:(e,t)=>_c(function(e,t=sa){return Ke(oe({...e,...t}))}(e,Bu(t))),toPlainYearMonth(e){return Pc(function(e,t,n){return((e,t)=>{const n=qr(e,t,Pi);return e.K(n,void 0)})(e(t.calendar),n)}(Bs,e,this))},toPlainMonthDay(e){return xc(function(e,t,n){return((e,t)=>{const n=qr(e,t,Ri);return e._(n)})(e(t.calendar),n)}(Bs,e,this))},toLocaleString(e,t,n){const[r,o]=Mc(t,n,e);return r.format(o)},toString:It,toJSON:e=>It(e),valueOf:Au},{from:(e,t)=>Cc(zu(e,t)),compare:(e,t)=>Kn(zu(e),zu(t))}),[Rc,Yc]=ju(Xa,g(function(e,t,n,r,o=Ai){return Ge(ie(X(H(n))),t(r),e(o))},Br,function(e){return Wn(Ui(e))}),{...mc,...fc,...Vu(uc),...Vu(hc),offset:e=>Lt(Ju(e).offsetNanoseconds),offsetNanoseconds:e=>Ju(e).offsetNanoseconds,timeZoneId:e=>e.timeZone,hoursInDay:e=>function(e,t){const n=e(t.timeZone),r=ss(t,n),[o,i]=ht(r),a=ee(J(Vt(n,o),Vt(n,i)),bi,1);if(a<=0)throw new RangeError(Fo);return a}(cs,e)},{with:(e,t,n)=>Yc(function(e,t,n,r,o){const{calendar:i,timeZone:a}=n,s=e(i),u=t(a),c=[...s.fields(Ni),...Si].sort(),l=(e=>{const t=ss(e,cs),n=Lt(t.offsetNanoseconds),r=Hs(e.calendar),[o,i,a]=r.v(t),[s,u]=r.q(o,i),c=Mr(s,u);return{...Ws(t),year:o,monthCode:c,day:a,offset:n}})(n),f=Vr(r,c),d=s.k(l,f),h={...l,...f},[m,p,b]=Ne(o,2);return Ge(zt(u,{...s.F(d,We(m)),...je($s(h),m)},In(h.offset),p,b),a,i)}(Bs,cs,e,Pu(t),n)),withCalendar:(e,t)=>Yc(co(e,Ru(t))),withTimeZone:(e,t)=>Yc(function(e,t){return{...e,timeZone:t}}(e,Fu(t))),withPlainTime:(e,t)=>Yc(function(e,t,n){const r=t.timeZone,o=e(r),i={...ss(t,o),...n||sa};let a;return a=n?zt(o,i,i.offsetNanoseconds,2):Vt(o,i),Ge(a,r,t.calendar)}(cs,e,Bu(t))),add:(e,t,n)=>Yc(Gt(Bs,cs,0,e,Lu(t),n)),subtract:(e,t,n)=>Yc(Gt(Bs,cs,1,e,Lu(t),n)),until:(e,t,n)=>bc(nt(tr(Bs,cs,0,e,qu(t),n))),since:(e,t,n)=>bc(nt(tr(Bs,cs,1,e,qu(t),n))),round:(e,t)=>Yc(function(e,t,n){let{epochNanoseconds:r,timeZone:o,calendar:i}=t;const[a,s,u]=Re(n);if(0===a&&1===s)return t;const c=e(o);if(6===a)r=((e,t,n,r)=>{const o=ss(n,t),[i,a]=e(o),s=n.epochNanoseconds,u=Vt(t,i),c=Vt(t,a);if(K(s,u,c))throw new RangeError(Fo);return vt(st(s,u,c),r)?c:u})(ht,c,t,u);else{const e=c.R(r);r=zt(c,ut(pe(r,e),a,s,u),e,2,0,1)}return Ge(r,o,i)}(cs,e,t)),startOfDay:e=>Yc(function(e,t){const{timeZone:n,calendar:r}=t,o=((e,t,n)=>Vt(t,e(ss(n,t))))(mt,e(n),t);return Ge(o,n,r)}(cs,e)),equals:(e,t)=>function(e,t){return!Jn(e,t)&&!!Qn(e.timeZone,t.timeZone)&&e.calendar===t.calendar}(e,qu(t)),toInstant:e=>Fc(function(e){return Je(e.epochNanoseconds)}(e)),toPlainDateTime:e=>_c(no(cs,e)),toPlainDate:e=>Cc(ro(cs,e)),toPlainTime:e=>kc(oo(cs,e)),toLocaleString(e,t,n={}){const[r,o]=yc(t,n,e);return r.format(o)},toString:(e,t)=>Tt(cs,e,t),toJSON:e=>Tt(cs,e),valueOf:Au,getTimeZoneTransition(e,t){const{timeZone:n,epochNanoseconds:r}=e,o=function(e){const t=$e(e,Ia),n=qe(Ia,Ya,t,0);if(!n)throw new RangeError(Eo(Ia,n));return n}(t),i=cs(n).O(r,o);return i?Yc({...e,epochNanoseconds:i}):null}},{from:(e,t)=>Yc(qu(e,t)),compare:(e,t)=>Jn(qu(e),qu(t))}),[Ac,Fc]=ju(Qa,function(e){return Je(ie(X(H(e))))},mc,{add:(e,t)=>Fc(Jt(0,e,Lu(t))),subtract:(e,t)=>Fc(Jt(1,e,Lu(t))),until:(e,t,n)=>bc(er(0,e,Gu(t),n)),since:(e,t,n)=>bc(er(1,e,Gu(t),n)),round:(e,t)=>Fc(function(e,t){const[n,r,o]=Re(t,5,1);return Je(gt(e.epochNanoseconds,n,r,o,1))}(e,t)),equals:(e,t)=>function(e,t){return!Vn(e,t)}(e,Gu(t)),toZonedDateTimeISO:(e,t)=>Yc(function(e,t,n=Ai){return Ge(e.epochNanoseconds,t,n)}(e,Fu(t))),toLocaleString(e,t,n){const[r,o]=wc(t,n,e);return r.format(o)},toString:(e,t)=>Dt(Fu,cs,e,t),toJSON:e=>Dt(Fu,cs,e),valueOf:Au},{from:e=>Fc(Gu(e)),fromEpochMilliseconds:e=>Fc(function(e){return Je(ie(Q($(e),hi)))}(e)),fromEpochNanoseconds:e=>Fc(function(e){return Je(ie(X(H(e))))}(e)),compare:(e,t)=>Vn(Gu(e),Gu(t))}),Lc=Object.defineProperties({},{...u("Temporal.Now"),...a({timeZoneId:()=>ho(),instant:()=>Fc(Je(fo())),zonedDateTimeISO:(e=ho())=>Yc(Ge(fo(),Fu(e),Ai)),plainDateTimeISO:(e=ho())=>_c(Ke(lo(cs(Fu(e))),Ai)),plainDateISO:(e=ho())=>Cc(Xe(lo(cs(Fu(e))),Ai)),plainTimeISO:(e=ho())=>kc(tt(lo(cs(Fu(e)))))})}),Zc=Object.defineProperties({},{...u("Temporal"),...a({PlainYearMonth:jc,PlainMonthDay:Oc,PlainDate:Nc,PlainTime:Tc,PlainDateTime:Ic,ZonedDateTime:Rc,Instant:Ac,Duration:pc,Now:Lc})}),Hc=Ku(),Bc=new WeakMap;function Uc(e,...t){let n=bbn.lng[e]||e;if(t.length){let e=0;return n.replace(/\%([d|s])/g,(n,r)=>{let o=t[e++];o||(o="d"===r?0:"");const i=typeof o;return"d"===r&&"number"!==i?(o=parseFloat(o),isNaN(o)&&(o=0)):"s"===r&&"string"!==i&&(o=""+o),o})}return n}Object.create(Intl),a({DateTimeFormat:Hc});var $c={loggers:{_num:0},datatypes:["xml","html","script","json","jsonp","text","blob"],shortenLen:30,keys:{upDown:[33,34,35,36,38,40],leftRight:[36,35,37,39],dels:[8,46,45],confirm:[13,9],alt:[20,16,17,18,144],numbers:[48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105],numsigns:[109,110,189,190]},comparators:[">=","<=",">","<","="],operators:["+","-","/","*"],tags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],colors:{darkgrey:"#5a6a62",black:"#000000",anthracite:"#454545",grey:"#d3d3d3",white:"#ffffff",beige:"#fdfdfd",lightgrey:"#dcdcdc",pastelblue:"#ddebf6",cyan:"#00c8f8",blue:"#6e9ecf",indigo:"#3f51b5",navy:"#354458",webblue:"#2196f3",teal:"#009688",turquoise:"#1fda9a",pastelgreen:"#e2efda",palegreen:"#ccffcc",green:"#00a03e",olive:"#92b06a",pastelorange:"#fff2cc",yellow:"#fdf200",orange:"#ff9900",pink:"#eb65a0",purple:"#a333c8",red:"#db3340",brown:"#8c6954"},reserved:["abstract","boolean","break","byte","case","catch","char","class","continue","const","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","new","null","package","return","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","while","with"],mockText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",regexp:{url:new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),ip:/^((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$/,hostname:/^[a-z\d]([a-z\d-]{0,61}[a-z\d])?(\.[a-z\d]([a-z\d-]{0,61}[a-z\d])?)*$/i}},Wc={siteTitle:window.document.title,logging:!1,cdn:"",lang:"en",host:window.location.protocol+"//"+window.location.hostname,url:window.location.href,old_path:null,loading:!1,_enumerated:[],get isEnumerating(){return this._enumerated.length>0},width:0,height:0,focused:!1,last_focus:(new Date).getTime(),sleep:!1,theme:"dark",loaders:[],loadersHistory:[],maxLoadersHistory:50,resizeTimer:!1,hashChanged:0,params:[],isInit:!1,isFocused:!1,isVisible:!document.hidden,timeoff:Math.round((new Date).getTime()/1e3),loggingLevel:5,ignoreUnload:!1,historyDisabled:!1,nav:"ajax",online:window.navigator.onLine},zc=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};class qc extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const Vc=["POST","PUT","PATCH","DELETE"],Jc=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=Vc.includes(e.toUpperCase()),a=new Promise((r,a)=>{o.open(e.toUpperCase(),t,!0);const{body:s,headers:u}=((e,t)=>{const n=new Headers(t||{});let r=e;return null==e||e instanceof FormData||"object"!=typeof e||(n.set("Content-Type","application/json"),r=JSON.stringify(e)),{body:r,headers:n}})(n.data,n.headers);u.forEach((e,t)=>{o.setRequestHeader(t,e)}),"function"==typeof n.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",e=>{const t=e.lengthComputable?e.total:void 0;n.onUploadProgress({loaded:e.loaded,total:t,progress:t?e.loaded/t:void 0})}),o.onreadystatechange=()=>{if(4!==o.readyState)return;const e=(e=>{const t={};return e?(e.trim().split(/[\r\n]+/).forEach(e=>{const n=e.split(": "),r=n.shift(),o=n.join(": ");r&&(t[r.toLowerCase()]=o)}),t):t})(o.getAllResponseHeaders()),t=1223===o.status?204:o.status,i=o.statusText||"";let s=o.responseText;if((e["content-type"]||"").includes("application/json"))try{s=JSON.parse(o.responseText)}catch(e){}const u={data:s,status:t,statusText:i,headers:e,config:n,request:o};if(t>=200&&t<300)r(u);else{const e=new Error("Request failed with status code "+t);e.response=u,e.config=n,e.request=o,a(e)}},o.onerror=()=>{const e=new Error("Network Error");e.config=n,e.request=o,a(e)},o.onabort=()=>{a(new qc("Request canceled"))},i?o.send(s):o.send()});return a.cancel=()=>o.abort(),a};var Gc={isCancel:e=>!(!e||!0!==e.__BBN_CANCEL__),run:(e,t,n={},r)=>{n.baseURL&&!/^https?:\/\//i.test(t)&&(t=n.baseURL.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")),t=((e,t)=>{if(!t)return e;const n=new URLSearchParams(t).toString();return n?e+(e.includes("?")?"&":"?")+n:e})(t,n.params);return"function"==typeof n.onUploadProgress&&Vc.includes(e.toUpperCase())?Jc(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=Vc.includes(e.toUpperCase());if(null!=n.data&&i&&(bbn.fn.log("DATA",n.data),"object"!=typeof n.data||n.data instanceof FormData?o.body=n.data:(o.headers.set("Content-Type","application/json"),o.body=JSON.stringify(n.data))),n.params){const e=new URLSearchParams(n.params).toString();t+=(t.includes("?")?"&":"?")+e}const a=fetch(t,o).then(e=>zc(void 0,void 0,void 0,function*(){let t;const r=e.headers.get("content-type")||"";try{t=r.includes("application/json")?yield e.json():r.startsWith("text/")?yield e.text():r.includes("multipart/")?yield e.arrayBuffer():yield e.blob()}catch(n){t=yield e.text()}const o={data:t,status:e.status,statusText:e.statusText,headers:Object.fromEntries(e.headers.entries()),config:n,request:e};if(!e.ok){const t=new Error("Request failed with status code "+e.status);throw t.response=o,t.config=n,t.request=e,t}return o})).catch(e=>{if("AbortError"===e.name)throw new qc("Request canceled");throw e});return a.cancel=()=>r.abort(),a})(e,t,n,r)}};function Kc(...e){if(!e.length)return!1;for(let t of e)if(["boolean","object","symbol"].includes(typeof t)||""===t||isNaN(t))return!1;return!0}function Xc(...e){if(!e.length)return!1;for(let t of e)if(!t||"object"!=typeof t||!(Symbol.iterator in Object(t)))return!1;return!0}function Qc(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function el(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function tl(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function nl(...e){var t,n,r;if((null===(t=bbn.env)||void 0===t?void 0:t.isDev)&&void 0!==(null===window||void 0===window?void 0:window.console)){let t,o=5,i="log";e[0]&&"object"==typeof e[0]&&e[0]._bbn_console_style&&(e[0]._bbn_console_mode&&tl(console[e[0]._bbn_console_mode])?i=e[0]._bbn_console_mode:(t=e[0]._bbn_console_style,o=e[0]._bbn_console_level),e.shift());const a=window.console[i];if((null===(r=null===(n=window.bbn)||void 0===n?void 0:n.env)||void 0===r?void 0:r.loggingLevel)>=o){let n=0;for(;n<e.length;){let r=typeof e[n],o=[e[n]];"string"!==r&&"number"!==r||o.unshift("%c %s ",t),a.apply(window.console,o),n++}}}return this}function rl(e,t,n){if(!Qc(e)||!el(t))throw nl(arguments),new Error(bbn._("The substr function should be applied to a string and at least a `from` argument should be given"));return t<0&&(t=e.length+t),el(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function ol(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)rl(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=ol(e[r],!0):n[r]=e[r]);return n||!1}function il(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?ol(e):e);r&&o.reverse();for(let n of o)if(!1===t(e[n],n))break}return e}function al(e,t){if(!(Kc(e)&&e>0)){if(Xc(e)){for(let n=0;n<e.length;n++)if(!1===t(e[n],n))return;return e}return il(e,t)}for(let n=0;n<e;n++)if(!1===t(n,n))return}function sl(...e){if(!e.length)return!1;for(let t of e)if("[object Object]"!=={}.toString.apply(t))return!1;return!0}function ul(...e){if(!e.length)return!1;for(let t of e)if(!Array.isArray(t))return!1;return!0}function cl(...e){let t=!1,n=[];for(let r=0;r<e.length;r++)if(!0===e[r])t=!0;else{if(!e[r])continue;if("object"!=typeof e[r])throw new Error(bbn._("Error in extend: all arguments should be object, you have given ")+typeof e[r]);n.push(e[r])}if(!n.length)throw new Error("No argument given");let r,o=n[0];for(let e=1;e<n.length;e++)il(n[e],(e,n)=>{t?ul(e)?(o[n]=ul(o[n])?o[n]:[],al(e,(e,t)=>{if(e&&"object"==typeof e){let r=o[n][t];ul(e)?ul(r)||(r=[]):sl(r)||(r={}),o[n][t]=cl(!0,r,e)}else o[n][t]=e})):sl(e)?o[n]=cl(!0,o[n]&&"object"==typeof o[n]?o[n]:Object.create(Object.getPrototypeOf(e)),e):o[n]=e:(o[n]!==e||void 0===e&&!Object.prototype.hasOwnProperty.apply(o,[n]))&&(o[n]=e)}),r||(r=!!n[e].__bbnNoData);return r&&"bbnData"in window&&(o.__bbnData&&o.__bbnData.unset(),Object.defineProperty(o,"__bbnNoData",{value:!0,enumerable:!1,configurable:!1,writable:!1})),o}const ll=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,fl=(e,t)=>{if(null==t?void 0:t.length){let n={};return il(e,(e,r)=>{t.indexOf(r)>-1&&(n[r]=e)}),n}return e},dl=function(e){const t=hl._connections[e],n=hl._structures[e];let r=null;const o=(e,t)=>{e.onerror=()=>{r=e.error,nl(e.error),t(e.error)}},i=(e,n)=>{const o=t.transaction([e],0===n.toLowerCase().indexOf("r")?"readonly":"readwrite");return o.onabort=()=>{throw r=o.error,new Error(o.error)},[o,o.objectStore(e)]};this.lastError=()=>r,this.insert=(e,t)=>(Array.isArray(t)||(t=[t]),new Promise(n=>{const[r,o]=i(e,"w");let a=t.length;al(t,e=>{const t=o.put(e);t.onerror=()=>{nl(t.error),a--}}),r.oncomplete=()=>{n(a)}})),this.update=(e,t,r,a)=>new Promise(s=>{this.selectAll(e,[],r).then(r=>{if(!r.length)return void s(0);const[u,c]=i(e,"w"),l=n[e],f=l.keys.PRIMARY.columns.length>1?l.keys.PRIMARY.columns:l.keys.PRIMARY.columns[0];let d=0;for(let e=0;e<r.length;e++){const n=cl({},a?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Uc("No primary key in the data"));const i=c.put(n);o(i,s),i.onsuccess=()=>{d++}}u.oncomplete=()=>{s(d)}})}),this.delete=(e,t)=>new Promise(r=>{const[a,s]=i(e,"w"),u=n[e],c=u.keys.PRIMARY.columns.length>1?u.keys.PRIMARY.columns:u.keys.PRIMARY.columns[0];if(!t[c])throw new Error(Uc("No "));const l=s.delete(t[c]);o(l,r),a.oncomplete=()=>{r(1)}}),this.selectOne=(e,t,n,r,o,i)=>new Promise(i=>{this.selectAll(e,[t],n,r,o,1).then(e=>{var n,r;i(null!==(r=null===(n=null==e?void 0:e[0])||void 0===n?void 0:n[t])&&void 0!==r?r:void 0)})}),this.select=(e,t,n,r,o)=>new Promise(i=>{this.selectAll(e,t,n,r,o,1).then(e=>{i(e.length?e[0]:null)})}),this.selectAll=(e,t=[],r=null,a=null,s=0,u=null)=>new Promise(a=>{const[c,l]=i(e,"r"),f=n[e],d=f.keys.PRIMARY.columns.length>1?f.keys.PRIMARY.columns:f.keys.PRIMARY.columns[0],h=sl(r)?Object.keys(r)[0]:!r||ul(r)?null:d,m=[];if(h===d)if(bbn.fn.isArray(null==r?void 0:r[d])){const e=Math.min(r[d].length,u||9999999);for(let n=s||0;n<e;n++){let i=l.get(r[d][n]);i.onsuccess=()=>{let n=i.result;m.push(fl(n,t)),m.length===e&&a(m)},o(i,a)}}else{let e=l.get((null==r?void 0:r[d])||r);e.onsuccess=()=>{let n=e.result;m.push(fl(n,t)),a(m)},o(e,a)}else{const e=l.openCursor();let n=0;e.onsuccess=e=>{const o=e.target.result;o?(r&&bbn.fn.search([o.value],r)||(n>=s&&(m.push(fl(o.value,t)),m.length===u&&a(m)),n++),o.continue()):a(m)},o(e,a)}}),this.getColumnValues=(e,n,r,o,i,a)=>new Promise(n=>{t.transaction([e],"read").objectStore(e)}),this.copyTable=(r,o,i=[],a=null,s=null,u=0,c=null)=>new Promise(l=>{if(t.objectStoreNames.contains(r)||hl.add(e,r,n[o]),!t.objectStoreNames.contains(r))throw l(0),new Error(Uc("The target table %s does not exist",r));this.selectAll(o,i,a,s,u,c).then(e=>{e.length?this.insert(r,e).then(e=>{l(e)}):l(0)})}),this.deleteTable=e=>new Promise(n=>{t.deleteObjectStore(e),n(!0)})},hl={_structures:{},_connections:{},_stores:{},ok:void 0!==ll,updateStructure(e,t,n){const r=t.keys.PRIMARY.columns.length>1?t.keys.PRIMARY.columns:t.keys.PRIMARY.columns[0];if(!n.objectStoreNames.contains(e)){const o=n.createObjectStore(e,{keyPath:r});il(t.keys,(e,t)=>{"PRIMARY"!==t&&o.createIndex(t,e.columns.length>1?e.columns:e.columns[0],{unique:!!e.unique})})}},open(e){return new Promise(t=>{if(hl._connections[e])t(new dl(e));else{if(!hl._structures[e])throw new Error(Uc("Impossible to find a structure for the database %s",e));let n=Math.max.apply(this,[1].concat(Object.keys(hl._structures[e]).map(t=>hl._structures[e][t].num||1)));const r=ll.open(e,n);r.onupgradeneeded=()=>{const t=r.result;il(hl._structures[e],(e,n)=>{this.updateStructure(n,e,t)})},r.onsuccess=()=>{hl._connections[e]=r.result;let n=new dl(e);t(n)}}})},add(e,t,n){var r;if(!(null===(r=null==n?void 0:n.keys)||void 0===r?void 0:r.PRIMARY)||!(null==n?void 0:n.fields))throw new Error(Uc("The database structure for %s is not valid (are there keys and field? Is there a primary?",t));hl._structures[e]||(hl._structures[e]={}),hl._structures[e][t]=n,hl._connections[e]&&this.updateStructure(t,n,hl._connections[e])}};function ml(e,t,n){let r=(new Date).getTime(),o={key:e,url:rl(e,0,e.length-33),loader:t,aborter:n,loading:!0,error:!1,abort:!1,errorMessage:!1,success:!1,start:r};bbn.env.loaders.push(o),bbn.env.loadersHistory.unshift(o);let i=bbn.env.loadersHistory.length;for(;i&&bbn.env.loadersHistory.length>bbn.env.maxLoadersHistory;)i--,bbn.env.loading||bbn.env.loadersHistory.splice(i,1);return r}function pl(e,...t){if("object"==typeof e){const n=[];return 1===t.length&&"string"==typeof t[0]?n.push(...t[0].split(".")):n.push(...t),n.reduce((e,t)=>{if(e)return e[e instanceof Array?parseInt(t):t]},e)}}function bl(e){if(!Qc(e)){if(!e.toString)throw nl(e),new Error(bbn._("removeAccent expects a string"));e=e.toString()}return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function gl(...e){if(!e.length)return!1;for(let t of e)if("[object Date]"!=={}.toString.apply(t))return!1;return!0}function wl(e,t,n,r="asc"){let o=pl(e,n),i=pl(t,n),a=(typeof o).toLowerCase(),s=(typeof i).toLowerCase();if("asc"!==r&&Qc(r)&&"desc"===r.toLowerCase()&&(r="desc"),a!==s)o=a,i=s;else switch(a){case"string":o=bl(o).toLowerCase(),i=bl(i).toLowerCase();break;case"boolean":o=o?1:0,i=i?1:0;break;case"object":gl(o)&&(o=o.getTime(),i=gl(i)?i.getTime():0)}return o<i?"desc"===r?1:-1:o>i?"desc"===r?-1:1:0}function yl(e){return e&&"object"==typeof e?Object.keys(e).length:0}function vl(e){return!e||(ul(e)?!e.length:"object"==typeof e&&!yl(e))}function Ml(...e){if(!e.length)return!1;for(let t of e)if("[object Null]"!=={}.toString.apply(t))return!1;return!0}function El(e){let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return Math.abs(t).toString(16)}function Sl(e){let t=0;for(let n=0;n<e.length;n++){t=e.charCodeAt(n)+(t<<6)+(t<<16)-t,t|=0}return Math.abs(t).toString(16)}function Dl(e){return El(e).padStart(8,"0")+Sl(e).padStart(8,"0")}function Tl(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLElement))return!1;return!0}function kl(e){let t="",n=e;if(e.id)return"#"+e.id;for(;n&&n!==document.body;){let e=n,r=e.localName,o=0;if(!r)break;if(e===document.body)break;e.id&&(t="#"+e.id+">"+t,o=1);let i=n.parentNode,a=Array.from(i.children).filter(t=>t.tagName===e.tagName);if(!o&&a.length>1){let t=Array.from(i.children).indexOf(e)+1;t>1&&(r+=":nth-child("+t+")")}t=r+(t?">"+t:""),n=i}return t}function Il(...e){var t;if(!e.length)return!1;if(!("cp"in bbn)||!("isComponent"in bbn.cp)||"function"!=typeof bbn.cp.isComponent)return!1;for(let n of e){if(!bbn.cp.isComponent(n)||Tl(n)||!(null===(t=n.$el)||void 0===t?void 0:t.bbnCid))return!1}return!0}function _l(e,t=null,n=0,r=null,o=null){if(n||r||(r=new WeakSet),void 0===e)e="__BBN_UNDEFINED__";else if(null===e)e="__BBN_NULL__";else if(null===e)e="__BBN_NULL__";else if("function"==typeof e)e="__BBN_FUNCTION__"+e.toString();else if("symbol"==typeof e)e="__BBN_SYMBOL__"+e.toString();else if("string"==typeof e)e="__BBN_STRING__"+e;else if("number"==typeof e)e="__BBN_NUMBER__"+e.toString();else if("boolean"==typeof e)e="__BBN_BOOLEAN__"+e.toString();else if([void 0,Object,Array,null].includes(null==e?void 0:e.constructor)){if(bbn.fn.isArray(e))if(r.has(e)||t&&t<n)e="__BBN_ARRAY__"+e.constructor.toString();else{r.add(e);let i="";for(let a=0;a<e.length;a++)i+="__BBN_ITEM"+a.toString()+"__"+o(e[a],t,n+1,r,o);e="__BBN_ARRAY__"+i}else if("object"==typeof e)if(r.has(e)||t&&t<n)e="__BBN_OBJECT__"+(e.constructor?e.constructor.toString():"");else{r.add(e);let i="";for(let a in e){let s=a;"string"!=typeof s&&(s=o(s,o,1,1)),i+="__BBN_PROP_"+s+"__"+o(e[a],t,n+1,r,o)}e="__BBN_OBJECT__"+i}}else e=Tl(e)?Il(e)?"__BBN_CP__"+e.$cid:e.bbnId?"__BBN_DOM__"+e.tagName+"/"+e.bbnId+e.bbnHash:"__BBN_DOM__"+kl(e):"__BBN_UNKNOWN_OBJECT__"+e.constructor.toString();return e}function Ol(...e){let t="",n=null;2===e.length&&"number"==typeof e[1]&&(n=e[1],e=[e[0]]);for(let r in e)t+=_l(e[r],n,0,null,_l);return Dl(t)}function xl(e){var t="0123456789abcdef";function n(e){var n,r="";for(n=0;n<=3;n++)r+=t.charAt(e>>8*n+4&15)+t.charAt(e>>8*n&15);return r}function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r(function(e,t){return e<<t|e>>>32-t}(r(r(t,e),r(o,a)),i),n)}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}var c,l,f,d,h,m=function(e){var t,n=1+(e.length+8>>6),r=new Array(16*n);for(t=0;t<16*n;t++)r[t]=0;for(t=0;t<e.length;t++)r[t>>2]|=e.charCodeAt(t)<<t%4*8;return r[t>>2]|=128<<t%4*8,r[16*n-2]=8*e.length,r}(e),p=1732584193,b=-271733879,g=-1732584194,w=271733878;for(c=0;c<m.length;c+=16)l=p,f=b,d=g,h=w,p=i(p,b,g,w,m[c+0],7,-680876936),w=i(w,p,b,g,m[c+1],12,-389564586),g=i(g,w,p,b,m[c+2],17,606105819),b=i(b,g,w,p,m[c+3],22,-1044525330),p=i(p,b,g,w,m[c+4],7,-176418897),w=i(w,p,b,g,m[c+5],12,1200080426),g=i(g,w,p,b,m[c+6],17,-1473231341),b=i(b,g,w,p,m[c+7],22,-45705983),p=i(p,b,g,w,m[c+8],7,1770035416),w=i(w,p,b,g,m[c+9],12,-1958414417),g=i(g,w,p,b,m[c+10],17,-42063),b=i(b,g,w,p,m[c+11],22,-1990404162),p=i(p,b,g,w,m[c+12],7,1804603682),w=i(w,p,b,g,m[c+13],12,-40341101),g=i(g,w,p,b,m[c+14],17,-1502002290),p=a(p,b=i(b,g,w,p,m[c+15],22,1236535329),g,w,m[c+1],5,-165796510),w=a(w,p,b,g,m[c+6],9,-1069501632),g=a(g,w,p,b,m[c+11],14,643717713),b=a(b,g,w,p,m[c+0],20,-373897302),p=a(p,b,g,w,m[c+5],5,-701558691),w=a(w,p,b,g,m[c+10],9,38016083),g=a(g,w,p,b,m[c+15],14,-660478335),b=a(b,g,w,p,m[c+4],20,-405537848),p=a(p,b,g,w,m[c+9],5,568446438),w=a(w,p,b,g,m[c+14],9,-1019803690),g=a(g,w,p,b,m[c+3],14,-187363961),b=a(b,g,w,p,m[c+8],20,1163531501),p=a(p,b,g,w,m[c+13],5,-1444681467),w=a(w,p,b,g,m[c+2],9,-51403784),g=a(g,w,p,b,m[c+7],14,1735328473),p=s(p,b=a(b,g,w,p,m[c+12],20,-1926607734),g,w,m[c+5],4,-378558),w=s(w,p,b,g,m[c+8],11,-2022574463),g=s(g,w,p,b,m[c+11],16,1839030562),b=s(b,g,w,p,m[c+14],23,-35309556),p=s(p,b,g,w,m[c+1],4,-1530992060),w=s(w,p,b,g,m[c+4],11,1272893353),g=s(g,w,p,b,m[c+7],16,-155497632),b=s(b,g,w,p,m[c+10],23,-1094730640),p=s(p,b,g,w,m[c+13],4,681279174),w=s(w,p,b,g,m[c+0],11,-358537222),g=s(g,w,p,b,m[c+3],16,-722521979),b=s(b,g,w,p,m[c+6],23,76029189),p=s(p,b,g,w,m[c+9],4,-640364487),w=s(w,p,b,g,m[c+12],11,-421815835),g=s(g,w,p,b,m[c+15],16,530742520),p=u(p,b=s(b,g,w,p,m[c+2],23,-995338651),g,w,m[c+0],6,-198630844),w=u(w,p,b,g,m[c+7],10,1126891415),g=u(g,w,p,b,m[c+14],15,-1416354905),b=u(b,g,w,p,m[c+5],21,-57434055),p=u(p,b,g,w,m[c+12],6,1700485571),w=u(w,p,b,g,m[c+3],10,-1894986606),g=u(g,w,p,b,m[c+10],15,-1051523),b=u(b,g,w,p,m[c+1],21,-2054922799),p=u(p,b,g,w,m[c+8],6,1873313359),w=u(w,p,b,g,m[c+15],10,-30611744),g=u(g,w,p,b,m[c+6],15,-1560198380),b=u(b,g,w,p,m[c+13],21,1309151649),p=u(p,b,g,w,m[c+4],6,-145523070),w=u(w,p,b,g,m[c+11],10,-1120210379),g=u(g,w,p,b,m[c+2],15,718787259),b=u(b,g,w,p,m[c+9],21,-343485551),p=r(p,l),b=r(b,f),g=r(g,d),w=r(w,h);return n(p)+n(b)+n(g)+n(w)}function jl(e){const t="function"==typeof e?e.toString():e;if("string"!=typeof t)throw Error("Unexpected type "+typeof e+" while parsing function");let n,r="",o=!1,i=!1,a=!1,s="",u=0,c=0,l=[],f={},d="",h=['"',"'","`"],m=!1,p=!1,b=!1,g=!1,w=!1,y=!1,v="";for(let e=0;e<t.length;e++)if(b||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])b=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(b||g)continue;if(t[e]===d&&!m&&d)d="",r+=t[e];else if(d)m="\\"===t[e]&&!m,r+=t[e];else if(h.includes(t[e])&&!m)d=t[e],r+=t[e];else if("("===t[e]){if(u++,""!==r.trim()){if("function"===r.trim())a=!0;else if("async"!==r.trim()){s=r.trim();let e=s.match(/^([a-zA-Z0-9_]+)<[a-zA-Z0-9_]+>$/);e&&(s=e[1])}r=""}}else if(")"===t[e])u===c+1&&(p?(f.default=r.trim(),p=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(l.push(f),f={}),r=""),c++;else if(w&&"}"!==t[e])r+=t[e];else{if(u&&u===c&&":"===t[e]){const r=t.substring(e+1).trim().match(/^\s*([a-zA-Z0-9_]+)\s*\{/);if(!r)throw Error("Unexpected ':' while parsing function");v=r[1],n=t.substring(e+r[0].length).trim();break}if(!(r||"="!==t[e]||">"!==t[e+1]||u!==c||c||o)){f.name=t.slice(0,e).trim(),l.push(f),f={},o=!0,n=bbn.fn.substr(t,e+2).trim();break}if(u===c&&"="===t[e]&&">"===t[e+1]){""!==r.trim()&&(f.name=r.trim(),l.push(f),f={},r=""),o=!0,e++;continue}if("="===t[e]&&u>c&&!p)f.name=r.trim(),r="",p=!0;else if(","===t[e])if(w)r+=t[e];else{if(!(u>c))throw Error("Unexpected ',' while parsing function");p?(f.default=r.trim(),p=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(l.push(f),f={}),r=""}else if("{"===t[e]||"}"===t[e]){if(u===c){n=t.substring(e).trim();break}u>c?"{"!==t[e]||w?"}"===t[e]&&w&&(w=!1,r+=t[e]):(w=!0,r=t[e]):r=""}else{if(o){n=t.substring(t.indexOf("=>")+2).trim();break}" "===t[e]?""!==r.trim()&&("async"===r.trim()&&(i=!0),u>c?r+=t[e]:r=""):r+=t[e]}}}else g=!0,r="";else b=!0,r="";if(!n){if(!o)throw Error("Unexpected end of function while parsing function");n=r}n.substr(0,25).indexOf("[native code]")>-1&&(y=!0);const M=l.map(e=>e.name+(e.default?" = "+e.default:"")).join(", ");return{body:n,args:l,argString:M,isArrow:o,hasFunction:a,name:s,isAsync:i,isBinary:y,hash:xl(n+(s?"-"+s:"")+(M?"-"+M:"")),returnType:v}}function Pl(e,t,n){if(n||(n=[]),e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(![void 0,Object,Array,null].includes(null==e?void 0:e.constructor)||![void 0,Object,Array,null].includes(null==t?void 0:t.constructor))return!1;let r=Object.keys(e).sort(),o=Object.keys(t).sort();if(Ol(r)!==Ol(o))return!1;let i=!0;if(e&&"object"==typeof e){if(n.includes(e))return i;n.push(e)}return al(r,n=>{if(!Pl(e[n],t[n]))return i=!1,!1}),i}if(e&&t&&"function"==typeof e&&"function"==typeof t){let n=jl(e),r=jl(t),o=n.hash===r.hash;return o&&n.isBinary&&(o=!1),o}return!1}function Nl(e,t,n){switch(n){case"===":case"=":case"equal":case"eq":case"is":return e===t;case"!==":case"notequal":case"neq":case"isnot":return e!==t;case"!=":case"different":return e!=t;case"contains":case"contain":case"icontains":case"icontain":return!vl(e)&&!vl(t)&&-1!==bl(e).toLowerCase().indexOf(bl(t).toLowerCase());case"doesnotcontain":case"donotcontain":return!(!Ml(e)&&!Ml(t))||-1===bl(e.toLowerCase()).indexOf(bl(t.toLowerCase()));case"starts":case"start":return!Ml(e)&&!Ml(t)&&("string"!=typeof e&&(e=e.toString()||""),"string"!=typeof t&&(t=t.toString()||""),0===e.indexOf(t));case"startswith":case"startsi":case"starti":case"istarts":case"istart":return!Ml(e)&&!Ml(t)&&0===bl(e).toLowerCase().indexOf(bl(t).toLowerCase());case"endswith":case"endsi":case"endi":case"iends":case"iend":return!Ml(e)&&!Ml(t)&&e.lastIndexOf(t)===e.length-t.length;case"like":return!Ml(e)&&!Ml(t)&&bl(e).toLowerCase()===bl(t).toLowerCase();case"gt":case">":return e>t;case"gte":case">=":return e>=t;case"lt":case"<":return e<t;case"lte":case"<=":return e<=t;case"isnull":return null===e;case"isnotnull":return null!==e;case"isempty":return""===e;case"isnotempty":return""!==e;case"==":if(sl(e,t))return Pl(e,t);default:return e==t}}function Cl(e,t){if(!t.conditions||!t.logic||!ul(t.conditions))throw new Error("Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects");let n="AND"===t.logic;return al(t.conditions,r=>{let o;if(r.conditions&&ul(r.conditions))o=Cl(e,r);else if(o=Nl(pl(e,r.field),r.value,r.operator),o){let t=r.field.split("."),n=t.pop();t.length&&al(t,t=>e=e[t]),void 0===pl(e,n)&&void 0!==r.value&&(o=!1)}if(o){if("OR"===t.logic)return n=!0,!1}else if("AND"===t.logic)return n=!1,!1}),n}function Rl(e,t="="){if(!sl(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!ul(e.conditions)){let n=[];il(e,(e,r)=>{sl(e)&&"object"==typeof e.conditions?n.push(Rl(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function Yl(e,t,n=null,r="=",o=0,i=!1){if(!Xc(e))throw new Error(bbn._("The first argument for a search should be iterable")+" "+typeof e+" "+bbn._("given"));if(!e.length)return-1;let a,s,u=!1;if(t)if("string"==typeof t)a={conditions:[{field:t,value:n,operator:r||"="}]};else if(i=!0===r,o="number"==typeof n?n:i?e.length-1:0,"function"==typeof t)u=!0,s=t;else if(sl(t))if("field"in t&&"value"in t)a={conditions:[t],logic:"AND"};else if("conditions"in t)a=t;else{const e=[];for(let n in t)e.push({field:n,value:t[n],operator:"="});a={conditions:e,logic:"AND"}}else ul(t)&&(a={conditions:t,logic:"AND"});else u=!0,s=e=>Cl({value:e},Rl({logic:"AND",conditions:[{field:"value",operator:r||"=",value:n}]}));if(u||a){if("number"!=typeof o&&(o=i?e.length-1:0),!s){const e=Rl(a);s=t=>Cl(t,e)}if(i)for(let t=o;t>=0;t--){if(bbn.env._enumerated.push(!0),s(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}else for(let t=o;t<e.length;t++){if(bbn.env._enumerated.push(!0),s(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}}return-1}function Al(e,t,n=null,r="=",o=0,i=!1,a=!1){let s=Yl(e,t,n,r,o,i);return s>-1?e[s]:t&&["object","function"].includes(typeof t)&&5 in arguments?i:a}function Fl(e,t=null,n=!1){let r=Yl(bbn.env.loaders,{key:e});if(r>-1){let o=bbn.env.loaders.splice(r,1)[0],i=Al(bbn.env.loadersHistory,{key:e,start:o.start});return i&&(i.loading=!1,i.duration=(new Date).getTime()-o.start,"string"==typeof t?(i.errorMessage=t,i.error=!n,i.abort=n):sl(t)&&(i.success=!0)),!0}return!1}function Ll(e){let t=Yl(bbn.env.loaders,{key:e});return t>-1?bbn.env.loaders[t]:null}function Zl(e,t,n=null,r="=",o=0){if(!ul(e))try{e=Array.from(e)}catch(t){throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array")}let i={};const a=[],s="function"==typeof t;if(!t||!e.length)return e;if("object"==typeof t)i=t;else if("string"==typeof t)i[t]=n;else if(!s)throw new Error("Search function error: The prop argument should be a string or an object");let u;u="function"==typeof t?t:(e,t)=>Cl(e,i);for(let t=0;t<e.length&&(bbn.env._enumerated.push(!0),!(u(e[t],t)&&(bbn.env._enumerated.pop(),a.push(e[t]),bbn.env._enumerated.push(!0),o&&a.length>=o)));t++)bbn.env._enumerated.pop();return a}function Hl(e){if(yl(e)){bbn.var.colors||(bbn.var.colors={});let t=document.createElement("style");document.head.appendChild(t);let n=t.sheet,r=0;il(e,(e,t)=>{bbn.var.colors[t]=e,n.insertRule(".bbn-"+t+", .bbn-color-text-"+t+" {color: "+e+" !important;}",r),n.insertRule("svg.bbn-"+t+", .bbn-"+t+" svg, svg.bbn-color-text-"+t+", .bbn-color-text-"+t+" svg {fill: "+e+";}",r),n.insertRule(".bbn-bg-"+t+", .bbn-color-bg-"+t+", .bbn-color-background-"+t+" {background-color: "+e+" !important;}",r),n.insertRule(".bbn-border-"+t+", .bbn-color-border-"+t+" {border-color: "+e+" !important;}",r),n.insertRule(".bbn-color-"+t+" {border-color: "+e+"; background-color: "+e+"; color: "+e+";}",r)})}}function Bl(e,t=null,n=""){if(e&&"FORM"===e.tagName){let r=(t,n)=>{let r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)};t=JSON.parse(JSON.stringify(t||{})),n=n||"",t&&il(t,(t,o)=>{let i=n?`${n}[${o}]`:o;t instanceof Date?r(i,t.toISOString()):t instanceof Array?t.forEach((t,n)=>{const o=`${i}[${n}]`;"object"==typeof t?Bl(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):Bl(e,t,i)})}}function Ul(e,t){let n=0;al(t,t=>{t.style[e]="auto"}),al(t,(t,r)=>{let o=t.getBoundingClientRect(),i=o[e]%1?o[e]-o[e]%1+1:o[e];i>n&&(n=i)}),al(t,(t,r)=>{n&&(t.style[e]=n+"px")})}function $l(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Wl(e,t,n,r=""){return n.toString().replace(sl(e)?e:new RegExp($l(e),"g"+r),t)}function zl(e,t,n){let r={};return t&&il(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+xl((n||"json")+JSON.stringify(r))}function ql(e,t=null,n=null,r=null,o=null,i=null){if(null===t&&e&&"object"==typeof e&&e.url&&(e.abort&&(i=e.abort),e.failure&&(o=e.failure),e.success&&(r=e.success),e.data&&(n=e.data),e.datatype&&(t=e.datatype),e=e.url),e&&e&&"string"==typeof e){-1===e.indexOf("://")&&(e=Wl("//","/",e)),t||(t="json");let a=zl(e,n,t),s=Ll(a);if(null==s?void 0:s.loader)return s.loader;bbn.env.token&&cl(n||{},{_bbn_token:bbn.env.token});const u=new AbortController;let c={responseType:t,signal:u.signal};"text"===t?c.headers={accept:"text/javascript","Content-Type":"text/javascript"}:"json"===t?c.headers={accept:"application/json","Content-Type":"application/json"}:"html"===t&&(c.headers={accept:"text/html","Content-Type":"text/html"});let l="get";sl(n)&&yl(n)>0&&(c.data=n,l="post");let f=Gc.run(l,e,c).then(t=>{if(Fl(a,t),bbn.fn.defaultEndLoadingFunction(e,d,n,t),200===t.status)tl(r)&&r(t.data,t.headers);else{let e=1;tl(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t)}return t}).catch(t=>{let r=Gc.isCancel(t);if(Fl(a,t.message||t.response.data,r),bbn.fn.defaultEndLoadingFunction(e,d,n,t),r){let n=1;tl(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;tl(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t.response)}return t.response}),d=ml(a,f,u);return bbn.fn.defaultStartLoadingFunction(e,d,n,a),f}}const Vl=new TextDecoder;function Jl(e){return Vl.decode(e)}function Gl(e,t){if(e&&Qc(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&rl(n,-r)===t)return rl(n,0,n.length-r)}return""}const Kl=[["y","year",31536e6],["m","month",2592e6],["w","week",6048e5],["d","day",864e5],["h","hour",36e5],["i","minute",6e4],["s","second",1e3],["l","millisecond",1]],Xl={years:"y",year:"y",YEARS:"y",YEAR:"y",Years:"y",Year:"y",YYYY:"y",YY:"y",yyyy:"y",yy:"y",months:"m",month:"m",Months:"m",Month:"m",MONTHS:"m",MONTH:"m",MMMM:"m",MMM:"m",MM:"m",weekday:"e",WEEKDAY:"e",ee:"e",EE:"e",ddd:"e",days:"d",day:"d",Days:"d",Day:"d",DAYS:"d",DAY:"d",DD:"d",dd:"d",hours:"h",hour:"h",Hours:"h",Hour:"h",HOURS:"h",HOUR:"h",HH:"h",hr:"h",hh:"h",minutes:"i",minute:"i",Minutes:"i",Minute:"i",MINUTES:"i",MINUTE:"i",II:"i",ii:"i",mn:"i",mm:"i",min:"i",ms:"l",SSS:"l",sss:"l",SS:"s",ss:"s",seconds:"s",second:"s",Seconds:"s",Second:"s",SECONDS:"s",SECOND:"s",sec:"s",WW:"w",Y:"y",y:"y",M:"m",m:"m",e:"e",E:"e",D:"d",d:"d",H:"h",h:"h",n:"i",i:"i",s:"s",S:"s",W:"w",w:"w",ZZ:"z",Z:"z"},Ql={y:"YYYY",m:"MM",d:"DD",e:"EE",w:"WW",h:"HH",i:"II",s:"SS",z:"Z"};function ef(...e){if(!e.length)return!1;for(let t of e)if(null!==t&&("object"==typeof t||"function"==typeof t))return!1;return!0}var tf,nf,rf,of,af=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},sf=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const uf=Zc.ZonedDateTime.from("1970-01-01T00:00Z[UTC]");class cf{static fromUnit(e,t){const n=Xl[t]||"ms",r=["y"===n?e:0,"m"===n?e:0,"w"===n?e:0,"d"===n?e:0,"h"===n?e:0,"i"===n?e:0,"s"===n?e:0,["y","m","w","d","h","i","s"].includes(n)?0:e],o=new Zc.Duration(...r);return new cf(o)}constructor(e,t,n,r,o,i,a,s,u){tf.add(this),nf.set(this,void 0),rf.set(this,void 0),e instanceof Zc.Duration?af(this,nf,e,"f"):af(this,nf,"object"==typeof e?new Zc.Duration(e.years||0,e.months||0,e.weeks||0,e.days||0,e.hours||0,e.minutes||0,e.seconds||0,e.milliseconds||0,0,0):new Zc.Duration(e||0,t||0,n||0,r||0,o||0,i||0,a||0,s||0,0,0),"f");const c=Xl[u||""]||u;af(this,rf,c||"ms","f"),Al(Kl,e=>e[0]===c),Object.defineProperty(this,"isValid",{value:!1,writable:!1,configurable:!0})}setValid(e){Object.defineProperty(this,"isValid",{value:e,writable:!1,configurable:!1})}get value(){return sf(this,nf,"f")}years(e=!1){return sf(this,tf,"m",of).call(this,"year",e)}months(e=!1){return sf(this,tf,"m",of).call(this,"month",e)}weeks(e=!1){return sf(this,tf,"m",of).call(this,"week",e)}days(e=!1){return sf(this,tf,"m",of).call(this,"day",e)}hours(e=!1){return sf(this,tf,"m",of).call(this,"hour",e)}minutes(e=!1){return sf(this,tf,"m",of).call(this,"minute",e)}seconds(e=!1){return sf(this,tf,"m",of).call(this,"second",e)}toJSON(){return this.value.toJSON()}asYears(){return sf(this,nf,"f").total({unit:"year",relativeTo:uf})}asMonths(){return sf(this,nf,"f").total({unit:"month",relativeTo:uf})}asWeeks(){return sf(this,nf,"f").total({unit:"week",relativeTo:uf})}asDays(){return sf(this,nf,"f").total({unit:"day",relativeTo:uf})}asHours(){return sf(this,nf,"f").total({unit:"hour",relativeTo:uf})}asMinutes(){return sf(this,nf,"f").total({unit:"minute",relativeTo:uf})}asSeconds(){return sf(this,nf,"f").total({unit:"second",relativeTo:uf})}add(e,t){let n=sf(this,rf,"f");if(t)if(Xl[t]){const e=Al(Kl,e=>e[0]===Xl[t]);e&&(n=e[1])}else n=t;const r=n+"s";if(!["years","months","weeks","days","hours","minutes","seconds","milliseconds"].includes(r))throw new Error("Invalid unit for duration: "+(null!=t?t:n));const o={[r]:e},i=sf(this,nf,"f").add(o);return new cf(i,void 0,void 0,void 0,void 0,void 0,void 0,void 0,sf(this,rf,"f"))}subtract(e,t){return this.add(-e,t)}toMilliseconds(){const e=sf(this,nf,"f");return e.years||e.months||e.weeks||e.days?e.total({unit:"millisecond",relativeTo:uf}):e.total({unit:"millisecond"})}}nf=new WeakMap,rf=new WeakMap,tf=new WeakSet,of=function(e,t){const n=sf(this,nf,"f");if(t)switch(e){case"year":return n.years;case"month":return n.months;case"week":return n.weeks;case"day":return n.days;case"hour":return n.hours;case"minute":return n.minutes;case"second":return n.seconds}const r=n.total({unit:e,relativeTo:uf});return Math.floor(r)};var lf,ff=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},df=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class hf{constructor(e){this.__bbnNoData=!0,this.__isBbnDt=!0,lf.set(this,void 0),this.getWeekdayIndex=(e,t)=>{const n=t||bbn.env.lang,r=e.trim().toLowerCase(),o=[n,...navigator.languages];for(let e=0;e<o.length;e++){if(!o[e])continue;const t=new Intl.DateTimeFormat(o[e],{weekday:"long"});for(let e=0;e<7;e++){const n=new Date(2023,0,1+e);if(t.format(n).toLowerCase()===r)return e}}throw new Error(`Unknown weekday name '${e}' for locale '${n}'`)},Object.defineProperty(this,"isValid",{value:!0,writable:!1,configurable:!0}),ff(this,lf,e,"f");const t=new Date;Object.defineProperty(this,"defaultValue",{value:{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()},writable:!1,configurable:!1})}setValid(e){Object.defineProperty(this,"isValid",{value:e,writable:!1,configurable:!1})}get value(){return df(this,lf,"f")}get hasFullDate(){return"year"in this.value&&"month"in this.value&&"day"in this.value}toEpochMs(){if("zoned"===this.kind){return this.value.toInstant().epochMilliseconds}const e=hf.systemTimeZoneId;let t;switch(this.kind){case"dateTime":return this.value.toZonedDateTime(e).toInstant().epochMilliseconds;case"date":return this.value.toZonedDateTime({timeZone:e,plainTime:{hour:this.defaultValue.hour,minute:this.defaultValue.minute,second:this.defaultValue.second,millisecond:this.defaultValue.millisecond}}).toInstant().epochMilliseconds;case"time":{const n=this.value;t=`${Zc.Now.plainDateISO().toString()}T${n.toString()}[${e}]`}case"yearMonth":t=`${this.value.toPlainDate({day:1}).toString()}T00:00[${e}]`;case"monthDay":{const n=this.value,r=Zc.Now.plainDateISO();t=`${n.toPlainDate({year:r.year}).toString()}T00:00[${e}]`}}if(t){return Zc.ZonedDateTime.from(t).toInstant().epochMilliseconds}throw new Error(`Unsupported kind '${this.kind}' in toEpochMs`)}static nowForKind(e){switch(e){case"zoned":return Zc.Now.zonedDateTimeISO();case"dateTime":return Zc.Now.plainDateTimeISO();case"date":return Zc.Now.plainDateISO();case"time":return Zc.Now.plainTimeISO();case"yearMonth":{const e=Zc.Now.plainDateISO();return new Zc.PlainYearMonth(e.year,e.month)}case"monthDay":{const e=Zc.Now.plainDateISO();return new Zc.PlainMonthDay(e.month,e.day,void 0,e.year)}default:throw new Error(`Unsupported kind '${e}' in nowForKind`)}}withValue(e){return new(0,this.constructor)(e)}static compare(e,t,n){if(!e||!t)throw new TypeError("Both arguments must be Temporal values");const r=Zc.Now.timeZoneId(),o=Xl[n]?Al(Kl,e=>e[0]===Xl[n])[1]:void 0,i=e=>e instanceof hf,a=e=>i(e)?e.value:e,s=e=>{if(i(e))switch(e.kind){case"zoned":return e.value;case"dateTime":{const t=`${e.value.toString()}[${r}]`;return Zc.ZonedDateTime.from(t)}case"date":{const t=`${e.value.toString()}T00:00[${r}]`;return Zc.ZonedDateTime.from(t)}case"yearMonth":{const t=`${e.value.toPlainDate({day:1}).toString()}T00:00[${r}]`;return Zc.ZonedDateTime.from(t)}default:throw new TypeError(`Cannot convert kind '${e.kind}' to ZonedDateTime for comparison`)}if(e instanceof Zc.ZonedDateTime)return e;throw new TypeError("toZdt expects a bbnDt wrapper or ZonedDateTime")},u=a(e),c=a(t);if(u.constructor===c.constructor){const e=u.constructor;if(void 0===o){if("function"!=typeof e.compare)throw new TypeError("This Temporal type has no static compare");return e.compare(u,c)}if("function"!=typeof u.until)throw new TypeError("This Temporal type does not support until/since");return u.until(c,{smallestUnit:o,largestUnit:o,roundingMode:"floor"}).sign}const l=new Set(["zoned","dateTime","date","yearMonth"]);if(i(e)&&i(t)&&l.has(e.kind)&&l.has(t.kind)){const n=s(e),r=s(t);if(void 0===o)return Zc.ZonedDateTime.compare(n,r);if("function"!=typeof n.until)throw new TypeError("ZonedDateTime does not support until/since");return n.until(r,{smallestUnit:o,largestUnit:o,roundingMode:"floor"}).sign}throw new TypeError("Cannot compare different Temporal or bbnDt types")}static parse(e,t,n="auto",r){return bbn.dt(e,t,n,r)}parse(e,t,n){return hf.parse(e,t,n||this.kind)}compare(e,t){return e instanceof hf||(e=bbn.dt(e,null,this.kind)),hf.compare(this,e,t)}add(e,t){if(this.value){if(this.value instanceof Zc.PlainMonthDay||"function"!=typeof this.value.add)throw new TypeError("This Temporal type does not support add/subtract");if(e instanceof cf){const t=this.value.add(e.value);return new this.constructor(t)}if("object"==typeof e){const t=new cf(e),n=this.value.add(t.value);return new this.constructor(n)}{if(!t)throw new Error("Unit must be specified when adding a number");const n=cf.fromUnit(e,t),r=this.value.add(n.value);return new this.constructor(r)}}}subtract(e,t){if(this.value){if(this.value instanceof Zc.PlainMonthDay||"function"!=typeof this.value.subtract)throw new TypeError("This Temporal type does not support add/subtract");if(e instanceof cf){const t=this.value.subtract(e.value);return new this.constructor(t)}if("object"==typeof e){const t=new cf(e),n=this.value.subtract(t.value);return new this.constructor(n)}{if(!t)throw new Error("Unit must be specified when adding a number");const n=cf.fromUnit(e,t),r=this.value.subtract(n.value);return new this.constructor(r)}}}duration(e,t){return cf.fromUnit(e,t)}isBefore(e,t){return this.compare(e,t)<0}isBeforeOrSame(e,t){return this.compare(e,t)<=0}isAfter(e,t){return this.compare(e,t)>0}isAfterOrSame(e,t){return this.compare(e,t)>=0}isSame(e,t){return 0===this.compare(e,t)}equals(e){return this.isSame(e)}toJSON(){if("toZonedDateTime"in df(this,lf,"f")){const e=df(this,lf,"f").toZonedDateTime(hf.systemTimeZoneId).withTimeZone("UTC");return bbn.dt(e).format("YYYY-MM-DDTHH:II:SS.SSS")+"Z"}if("zoned"===this.kind)return this.timezone("America/New_York").format("YYYY-MM-DDTHH:II:SS.SSS")+"Z"}timezone(e){switch(this.kind){case"zoned":if(void 0===e){return this.value.timeZoneId}{const t=this.value.withTimeZone(e);return bbn.dt(t)}case"dateTime":if(void 0===e){const e=`${this.value.toString()}[${hf.systemTimeZoneId}]`;return Zc.ZonedDateTime.from(e).timeZoneId}{const t=`${this.value.toString()}[${e}]`,n=Zc.ZonedDateTime.from(t);return bbn.dt(n)}default:throw new Error(`timezone() is not supported for kind '${this.kind}'`)}}toString(){return new Date(this.valueOf()).toString()}year(e){if(this.value){if(!("year"in this.value))throw new Error("year() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({year:e});return new this.constructor(t)}return this.value.year}}month(e){if(this.value){if(!("month"in this.value))throw new Error("month() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({month:e});return new this.constructor(t)}return this.value.month}}day(e){if(this.value){if(!("day"in this.value))throw new Error("day() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({day:e});return new this.constructor(t)}return this.value.day}}hour(e){if(this.value){if(!("hour"in this.value)){if(this.hasFullDate)return 0;throw new Error("hour() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({hour:e});return new this.constructor(t)}return this.value.hour}}minute(e){if(this.value){if(!("minute"in this.value)){if(this.hasFullDate)return 0;throw new Error("minute() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({minute:e});return new this.constructor(t)}return this.value.minute}}second(e){if(this.value){if(!("second"in this.value)){if(this.hasFullDate)return 0;throw new Error("second() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({second:e});return new this.constructor(t)}return this.value.second}}millisecond(e){if(this.value){if(!("millisecond"in this.value)){if(this.hasFullDate)return 0;throw new Error("millisecond() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({millisecond:e});return new this.constructor(t)}return this.value.millisecond}}weekday(e,t){if(this.value){if(!("dayOfWeek"in this.value))throw new Error("weekday() is not supported for this type");return void 0===e||e instanceof Event?this.value.dayOfWeek%7:this.setWeekday(e,t)}}date(e){if(this.value){if(!this.hasFullDate)throw new Error("date() is not supported for this type");return!(0 in arguments)||void 0===e||e instanceof Event?this.YYYY+"-"+this.MM+"-"+this.DD:this.parse(e,"Y-m-d")}}datetime(e){return!(0 in arguments)||void 0===e||e instanceof Event?this.YYYY+"-"+this.MM+"-"+this.DD+" "+this.HH+":"+this.II+":"+this.SS:"date"===this.kind?this.parse(this.date()+" "+e,"Y-m-d 00:00:00","dateTime"):this.parse(e,"Y-m-d H:i:s")}time(e){return!(0 in arguments)||void 0===e||e instanceof Event?this.HH+":"+this.II+":"+this.SS:"zoned"===this.kind?this.parse(this.date()+" "+e+" GMT"+this.value.timeZoneId,"Y-m-d H:i:s[ GMT]Z","dateTime"):["dateTime","date"].includes(this.kind)?this.parse(this.date()+" "+e,"Y-m-d H:i:s","dateTime"):this.parse(e,"H:i:s")}fdate(e=!1,t=!1){return this.value?bbn.dt.locales.formatters[e?"long":"numeric"].format(new Date(this.toEpochMs())):""}ftime(e=!0){return this.value?this.format("HH:II"+(e?":SS":"")):""}week(){if(!this.value)return;const e=this.year(),t=new Date(Date.UTC(e,this.month()-1,this.day())),n=new Date(Date.UTC(e,0,1)),r=Math.floor((t.getTime()-n.getTime())/864e5),o=n.getUTCDay();let i=(bbn.dt.locales.firstDayOfWeek-o+7)%7;const a=0===i?7:i;if(r<a)return 1;const s=r-a;return 2+Math.floor(s/7)}get YYYY(){if("year"in this.value)return this.year().toString()}get YY(){if("year"in this.value)return rl(this.year().toString(),2,2)}get MMMM(){if("month"in this.value)return bbn.dt.locales.monthsLong[this.month()-1]}get MMM(){if("month"in this.value)return bbn.dt.locales.monthsShort[this.month()-1]}get MM(){if("month"in this.value){const e=parseInt(this.month().toString());return e<10?"0"+e.toString():e.toString()}}get M(){if("month"in this.value)return this.month().toString()}get EE(){if("dayOfWeek"in this.value)return this.value.dayOfWeek.toString()}get DD(){if("day"in this.value){const e=parseInt(this.day().toString());return e<10?"0"+e.toString():e.toString()}}get d(){if("day"in this.value)return this.day().toString()}get dddd(){if("dayOfWeek"in this.value)return this.getWeekday(this.value.dayOfWeek,"long")}get ddd(){if("dayOfWeek"in this.value)return this.getWeekday(this.value.dayOfWeek,"short")}get D(){if("day"in this.value)return this.day().toString()}get HH(){if("hour"in this.value){const e=parseInt(this.hour().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.hour.toString().padStart(2,"0")}get H(){return"hour"in this.value?this.hour().toString():this.hasFullDate?"0":void 0}get II(){if("minute"in this.value){const e=parseInt(this.minute().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.minute.toString().padStart(2,"0")}get mm(){if("minute"in this.value){const e=parseInt(this.minute().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.minute.toString().padStart(2,"0")}get I(){return"minute"in this.value?this.minute().toString():this.hasFullDate?"0":void 0}get SS(){if("second"in this.value){const e=parseInt(this.second().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.second.toString().padStart(2,"0")}get SSS(){if("millisecond"in this.value){const e=parseInt(this.millisecond().toString());return e<10?"00"+e.toString():e<100?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.millisecond.toString().padStart(3,"0")}get S(){return"second"in this.value?this.second().toString():this.hasFullDate?"0":void 0}get WW(){if("weekOfYear"in this.value)return this.value.weekOfYear.toString().padStart(2,"0")}get W(){if("weekOfYear"in this.value)return this.value.weekOfYear.toString()}get Z(){if("zoned"===this.kind){return this.value.offset}}get ZZ(){if("zoned"===this.kind){return this.value.offset.replace(":","")}}unix(e=!1){if("number"==typeof e){return new(0,this.constructor)(new Date(e))}return e?this.toEpochMs():Math.floor(this.toEpochMs()/1e3)}format(e="YYYY-MM-DD HH:II:SS"){let t="";if(e){const n=new RegExp("([|]|"+Object.keys(Xl).join("|")+")","g");let r=0;al(e.split(n),e=>{if("["!==e)if("]"!==e)if(r>0)t+=e;else if(e in Xl)if(e in this&&ef(this[e]))t+=this[e];else{t+=this[Ql[Xl[e]]]||""}else t+=e;else r--;else r++})}return t}calendar(e){const t=new this.constructor,n=this.startOf("day"),r=t.startOf("day"),o=n.diff(r,"day"),i={numeric:"auto"};e&&(i.style="short");const a=new Intl.RelativeTimeFormat(bbn.env.lang,i);let s="",u=[],c="";if(o>=-1&&o<=1)u=a.formatToParts(o,"day");else if(o>=-6&&o<-1)c=this.dddd+", ",u=a.formatToParts(o,"day");else{if(!(o<=6&&o>1))return this.fdate();c=this.dddd,u=[]}return bbn.fn.each(u,e=>{s+=e.value}),`${c}${s} ${this.ftime()}`}matchFormat(e,t){try{return this.parse(e,t),!0}catch(e){return!1}}getWeekday(e,t="long",n){if(!t){const t=this.getWeekday(e,"narrow",n),r=this.getWeekday(e,"short",n),o=this.getWeekday(e,"long",n);return{letter:t,abbr:r,full:o,long:o,short:r,narrow:t}}let r;if("letter"===t)r="narrow";else if("abbr"===t)r="short";else if("full"===t)r="long";else{if(!["long","short","narrow"].includes(t))throw new Error("Invalid mode for getWeekDay: "+t+'. Allowed values are "long", "short", "narrow", "letter", "abbr", "full".');r=t}return new Date(2023,0,1+e).toLocaleDateString([n||bbn.env.lang,...navigator.languages],{weekday:r})}setWeekday(e,t=!1,n){let r;if("string"==typeof e&&(e=this.getWeekdayIndex(e,n)),"number"!=typeof e)throw new TypeError("weekday must be a number (0–6) or a string");if(e<0||e>6)throw new RangeError("weekday number must be between 0 and 6");r=e;const o=this.weekday();let i;return t?(i=(o-r+7)%7,0===i&&(i=7),i=-i):(i=(r-o+7)%7,0===i&&(i=7)),this.add(i,"d")}diff(e,t="",n=!1){let r;if(e instanceof hf)r=e.toEpochMs();else if(e instanceof Zc.ZonedDateTime||e instanceof Zc.PlainDateTime||e instanceof Zc.PlainDate||e instanceof Zc.PlainTime||e instanceof Zc.PlainYearMonth||e instanceof Zc.PlainMonthDay){r={kind:this.kind,value:e}.toEpochMs()}else{if("string"!=typeof e&&"number"!=typeof e)throw bbn.fn.log("DATE??",e),new TypeError("Unsupported date argument for diff");r=this.parse(String(e),"").toEpochMs()}let o=this.toEpochMs()-r;if(n&&(o=Math.abs(o)),!t)return o;const i=Xl[t]||t,a=Al(Kl,e=>e[0]===i);if(!a)throw new Error("Invalid unit for diff: "+t);const[,,s]=a;return Math.floor(o/s)}guessUnit(e){const t=Math.abs(e);for(const[e,n,r]of Kl)if(t>=r||"millisecond"===n)return e;return null}fromNow(e=""){hf.nowForKind(this.kind);const t=bbn.dt(void 0,null,this.kind),n=this.diff(t),r=Xl[e]||this.guessUnit(n);if(!r)throw new Error("Cannot guess unit for fromNow");const o=this.diff(t,r),i=new Intl.RelativeTimeFormat([bbn.env.lang,...navigator.languages],{numeric:"auto"}),a=Al(Kl,e=>e[0]===r);if(!a)throw new Error("Invalid unit for fromNow: "+e);const[,s]=a;return i.format(o,s)}from(e,t=""){const n=this.diff(e),r=Xl[t]||this.guessUnit(n);if(!r)throw new Error("Cannot guess unit for fromDate");const o=this.diff(e,r),i=r;return o>0?Uc("%d %s before",o,i):o<0?Uc("%d %s after",-o,i):Uc("The same %s",i)}startOf(e="d"){var t,n;const r=Xl[e]||e;if(!r)throw new Error("Invalid unit for startOf: "+e);let o=this.value;const i=e=>{const t={};return"hour"in e?(Object.assign(t,{hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),e.with(t)):e};switch(r){case"y":if(!("year"in o))throw new Error('startOf("y") only valid for year-based types');o=i(o.with({month:1,day:1}));break;case"m":if(!("month"in o))throw new Error('startOf("m") only valid for month-based types');o=i(o.with({day:1}));break;case"w":{const e="toPlainDate"in o?o.toPlainDate():o,r=e.dayOfWeek-1,a=e.subtract({days:r});o="toPlainDateTime"in o?i(a.toPlainDateTime(null!==(n=null===(t=o.toPlainTime)||void 0===t?void 0:t.call(o))&&void 0!==n?n:Zc.PlainTime.from("00:00"))):a;break}case"d":o=i(o);break;case"h":o=o.with({minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});break;case"i":o=o.with({second:0,millisecond:0,microsecond:0,nanosecond:0});break;case"s":o=o.with({millisecond:0,microsecond:0,nanosecond:0});break;default:throw new Error("Invalid unit for startOf: "+e)}return this.withValue(o)}endOf(e="d"){const t=Zc.Now.timeZoneId(),n=Xl[e]||e;let r,o=(()=>{switch(this.kind){case"zoned":return this.value;case"dateTime":{const e=`${this.value.toString()}[${t}]`;return Zc.ZonedDateTime.from(e)}case"date":{const e=`${this.value.toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(e)}case"time":{const e=this.value,n=`${Zc.Now.plainDateISO().toString()}T${e.toString()}[${t}]`;return Zc.ZonedDateTime.from(n)}case"yearMonth":{const e=`${this.value.toPlainDate({day:1}).toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(e)}case"monthDay":{const e=this.value,n=Zc.Now.plainDateISO(),r=`${e.toPlainDate({year:n.year}).toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(r)}default:throw new Error("Unsupported kind in endOf")}})(this.value);switch(n){case"y":r=o.with({month:1,day:1,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({years:1});break;case"m":r=o.with({day:1,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({months:1});break;case"w":{const e=-(o.toPlainDate().dayOfWeek-1);r=o.add({days:e}).with({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({weeks:1});break}case"d":r=o.with({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({days:1});break;case"h":r=o.with({minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({hours:1});break;case"i":case"n":case"min":r=o.with({second:0,millisecond:0,microsecond:0,nanosecond:0}).add({minutes:1});break;case"s":r=o.with({millisecond:0,microsecond:0,nanosecond:0}).add({seconds:1});break;default:throw new Error("Invalid unit for endOf: "+e)}const i=r.subtract({milliseconds:1});switch(this.kind){case"zoned":return this.withValue(i);case"dateTime":return this.withValue(i.toPlainDateTime());case"date":return this.withValue(i.toPlainDate());case"time":return this.withValue(i.toPlainTime());case"yearMonth":{const e=i.toPlainDate();return this.withValue(new Zc.PlainYearMonth(e.year,e.month))}case"monthDay":{const e=i.toPlainDate();return this.withValue(new Zc.PlainMonthDay(e.month,e.day))}default:throw new Error("Unsupported kind in endOf")}}clone(){return this.withValue(this.value)}isLeapYear(){if(this.isValid){const e=this.year();return e%4==0&&e%100!=0||e%400==0}return!1}daysInMonth(){if(this.isValid)switch(this.month()){case 2:return this.year()%4==0?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}}valueOf(){return this.unix(!0)}}lf=new WeakMap,hf.systemTimeZoneId=Zc.Now.timeZoneId();class mf extends hf{constructor(e,t,n,r,o,i,a){let s;if(e)if(void 0===t)if(e instanceof Zc.PlainDateTime)s=e;else if(e instanceof Date)s=new Zc.PlainDateTime(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");s=Zc.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(hf.systemTimeZoneId).toPlainDateTime()}else s=new Zc.PlainDateTime(e,t,n||1,r||0,o||0,i||0,a||0);else s=Zc.PlainDateTime.from(Zc.Now.plainDateTimeISO());super(s),this.kind="dateTime"}format(e){return[!0,"long","full"].includes(e)&&(e=Al(bbn.dt.locales.date,{year:"numeric",month:"long",day:"long",weekday:"long",hour:"2-digit",minute:"2-digit",second:void 0}).pattern),e||(e=Al(bbn.dt.locales.date,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:void 0}).pattern),hf.prototype.format.call(this,e)}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1,this.day(),this.hour(),this.minute(),this.second()),o=Object.assign(Object.assign({year:"numeric",month:e?"long":"2-digit",day:"2-digit"},n?{weekday:e?"long":"short"}:{}),t?{hour:e?"2-digit":"numeric",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}class pf extends hf{constructor(e,t,n){let r;if(e)if(void 0===t)if(e instanceof Zc.PlainDate)r=e;else if(e instanceof Date)r=new Zc.PlainDate(e.getFullYear(),e.getMonth()+1,e.getDate());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");{const t=new Date(e);r=new Zc.PlainDate(t.getFullYear(),t.getMonth()+1,t.getDate())}}else r=new Zc.PlainDate(e,t,n||1);else r=Zc.PlainDate.from(Zc.Now.plainDateISO());super(r),this.kind="date"}compareSameKind(e){const t=Zc.PlainDate.compare(this.value,e.value);return t<0?-1:t>0?1:0}format(e){return!0===e&&(e=Al(bbn.dt.locales.date,{year:"numeric",month:"long",day:"long",weekday:"long"}).pattern),e||(e=Al(bbn.dt.locales.date,{year:"numeric",month:"numeric",day:"numeric"}).pattern),hf.prototype.format.call(this,e)}ftime(e=!1){return"00:00"+(e?":00":"")}fdate(e=!1,t=!1){const n=new Date(this.year(),this.month()-1,this.day()),r=Object.assign({year:"numeric",month:e?"long":"numeric",day:"numeric"},t?{weekday:e?"long":"short"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],r).format(n)}}class bf extends hf{constructor(e,t,n,r,o,i,a,s){let u;if(e)if(void 0===t)if(e instanceof Zc.ZonedDateTime)u=e;else if(e instanceof Date)u=function(e,t=!1,n=Zc.Now.timeZoneId()){const r=Zc.Instant.fromEpochMilliseconds(e.getTime()).toZonedDateTimeISO(n);return t?r:r.toPlainDateTime()}(e,!0);else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtZoned");u=Zc.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(Intl.DateTimeFormat().resolvedOptions().timeZone)}else{u=new Zc.PlainDateTime(t,n,r||1,o||0,i||0,a||0,s||0).toZonedDateTime(e||Zc.Now.timeZoneId())}else u=Zc.Now.zonedDateTimeISO(Intl.DateTimeFormat().resolvedOptions().timeZone);super(u),this.kind="zoned"}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1,this.day(),this.hour(),this.minute(),this.second()),o=Object.assign(Object.assign({year:"numeric",month:e?"long":"numeric",day:"numeric"},n?{weekday:e?"long":"short"}:{}),t?{hour:e?"2-digit":"numeric",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}class gf extends hf{constructor(e,t){let n;if(e)if(void 0===t)if(e instanceof Zc.PlainYearMonth)n=e;else if(e instanceof Date)n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1);else{if("number"!=typeof t)throw new Error("Invalid value for bbnDtDateTime");{const e=new Date(t);n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1)}}else n=new Zc.PlainYearMonth(e,t);else{const e=new Date;n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1)}super(n),this.kind="yearMonth"}format(e){return!0===e&&(e=Al(bbn.dt.locales.date,e=>"numeric"===e.year&&"long"===e.month&&!("day"in e)).pattern),e||(e=Al(bbn.dt.locales.date,e=>"numeric"===e.year&&"numeric"===e.month&&!("day"in e)).pattern),hf.prototype.format.call(this,e)}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1),o={year:"numeric",month:e?"long":"numeric"};return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}}class wf extends hf{constructor(e,t){let n;if(e)if(void 0===t)if(e instanceof Zc.PlainMonthDay)n=e;else if(e instanceof Date)n=new Zc.PlainMonthDay(e.getMonth()+1,e.getDate());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");{const t=new Date(e);n=new Zc.PlainMonthDay(t.getMonth()+1,t.getDate())}}else n=new Zc.PlainMonthDay(e,t);else{const e=new Date;n=new Zc.PlainMonthDay(e.getMonth()+1,e.getDate())}super(n),this.kind="monthDay"}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(2e3,this.month()-1,this.day()),o={month:e?"long":"numeric",day:"numeric"};return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}}function yf(e,t,n){let r="";const o=e.some(e=>"dayPeriod"===e.type),i=o||"h12"===t||"h11"===t,a=!!n.weekday,s="short"===n.month||"long"===n.month,u="numeric"===n.year&&"numeric"===n.month&&"numeric"===n.day&&!a&&!s;for(const t of e)switch(t.type){case"year":"2-digit"===n.year?r+="YY":r+="YYYY";break;case"month":if("short"===n.month){r+="MMM";break}if("long"===n.month){r+="MMMM";break}if(u){r+="M";break}/^\d+$/.test(t.value)?r+=2===t.value.length?"MM":"M":r+=t.value.length>3?"MMMM":"MMM";break;case"day":if(u){r+="D";break}r+=2===t.value.length?"DD":"D";break;case"weekday":"short"===n.weekday||"narrow"===n.weekday?r+="ddd":"long"===n.weekday?r+="dddd":r+=t.value.length>3?"dddd":"ddd";break;case"hour":r+=i?2===t.value.length?"hh":"h":2===t.value.length?"HH":"H";break;case"minute":r+="II";break;case"second":r+="SS";break;case"dayPeriod":r+="A";break;case"timeZoneName":r+="z";break;case"literal":if(!t.value)break;if(/[A-Za-zÀ-ÖØ-öø-ÿ]/.test(t.value)){r+=`[${t.value.replace(/]/g,"\\]")}]`}else r+=t.value;break;default:r+=t.value}return r}const vf=()=>{if(Object.keys(bbn.dt.locales).length)return;const e=[bbn.env.lang,...navigator.languages],t=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),r=new Intl.DateTimeFormat(e,{weekday:"long"}),o=new Intl.DateTimeFormat(e,{weekday:"short"}),i=new Intl.DateTimeFormat(e,{dateStyle:"short",timeStyle:"short"}),a=new Intl.DateTimeFormat(e,{dateStyle:"long",timeStyle:"long"}),s=new Intl.DateTimeFormat(e,{year:"numeric",month:"numeric",day:"numeric"}),u=new Intl.RelativeTimeFormat(e,{numeric:"auto"}),c=new Intl.Locale(e[0]),l=[],f=[];for(let e=0;e<12;e++){const r=new Date(2020,e,1);l.push(t.format(r)),f.push(n.format(r))}const d=new Date(2020,1,2),h=[],m=[];for(let e=0;e<7;e++){const t=new Date(d.getTime()+864e5*e);h.push(r.format(t)),m.push(o.format(t))}const{date:p,time:b,datetime:g}=(e=>{e||(e=[bbn.env.lang,...navigator.languages]);const t=new Date(Date.UTC(2e3,0,2,13,45,30)),n=[],r=[],o=[],i=new Set,a=new Set,s=new Set,u=[{year:"numeric",month:"2-digit",day:"2-digit"},{year:"numeric",month:"numeric",day:"numeric"},{year:"numeric",month:"short",day:"numeric"},{year:"numeric",month:"long",day:"numeric"},{weekday:"short",year:"numeric",month:"short",day:"numeric"},{weekday:"long",year:"numeric",month:"long",day:"numeric"},{year:"numeric",month:"numeric"},{year:"numeric",month:"2-digit"},{year:"numeric",month:"short"},{year:"numeric",month:"long"},{month:"numeric",day:"numeric"},{month:"2-digit",day:"2-digit"},{month:"short",day:"numeric"},{month:"long",day:"numeric"}],c=[];for(const r of u){const o=new Intl.DateTimeFormat(e,r),a=yf(o.formatToParts(t),o.resolvedOptions().hourCycle,r);i.has(a)||(i.add(a),n.push({pattern:a,sample:o.format(t),options:r})),r.year&&r.month&&r.day&&c.push(r)}const l=[{hour:"numeric"},{hour:"2-digit",minute:"2-digit"},{hour:"2-digit",minute:"2-digit",second:"2-digit"},{hour:"2-digit",minute:"2-digit",timeZoneName:"short"},{hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"},{hour:"2-digit",minute:"2-digit",timeZoneName:"long"}];for(const n of l){const o=new Intl.DateTimeFormat(e,n),i=yf(o.formatToParts(t),o.resolvedOptions().hourCycle,n);a.has(i)||(a.add(i),r.push({pattern:i,sample:o.format(t),options:n}))}for(const n of c)for(const r of l){const i=Object.assign(Object.assign({},n),r),a=new Intl.DateTimeFormat(e,i),u=yf(a.formatToParts(t),a.resolvedOptions().hourCycle,i);s.has(u)||(s.add(u),o.push({pattern:u,sample:a.format(t),options:i}))}return{date:n,time:r,datetime:o}})(e),w=c.getWeekInfo?c.getWeekInfo():{firstDay:1};cl(bbn.dt.locales,{formatters:{short:i,long:a,numeric:s,relative:u},firstDayOfWeek:w.firstDay,monthsLong:l,monthsShort:f,weekdaysLong:h,weekdaysShort:m,locale:c,date:p,time:b,datetime:g})};class Mf extends hf{constructor(e,t,n,r){let o;if(e)if(void 0===e)if(e instanceof Zc.PlainTime)o=e;else if(e instanceof Date)o=new Zc.PlainTime(e.getHours(),e.getMinutes(),e.getSeconds(),1e6*e.getMilliseconds());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");if(void 0!==t)o=new Zc.PlainTime(e,t,n||0,r||0);else{const t=new Date(e);o=new Zc.PlainTime(t.getHours(),t.getMinutes(),t.getSeconds(),1e6*t.getMilliseconds())}}else o=new Zc.PlainTime(e,t||0,n||0,r||0);else{const e=new Date;o=new Zc.PlainTime(e.getHours(),e.getMinutes(),e.getSeconds(),1e6*e.getMilliseconds())}super(o),this.kind="time"}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}const Ef=function(e,t){try{return t?e.toLocaleLowerCase(t):e.toLowerCase()}catch(t){return e.toLowerCase()}};function Sf(e,t,n="auto",r,o){var i,a,s,u,c,l,f;vf();const d=globalThis.Temporal;if(!d)throw new Error("Temporal API is required (load @js-temporal/polyfill)");const h=d;let m=!0;o||(o=(null===(i=null===bbn||void 0===bbn?void 0:bbn.dt)||void 0===i?void 0:i.locales)||{});const p={monthsLong:null!==(a=null==o?void 0:o.monthsLong)&&void 0!==a?a:bbn.dt.locales.monthsLong,monthsShort:null!==(s=null==o?void 0:o.monthsShort)&&void 0!==s?s:bbn.dt.locales.monthsShort,weekdaysLong:null!==(u=null==o?void 0:o.weekdaysLong)&&void 0!==u?u:bbn.dt.locales.weekdaysLong,weekdaysShort:null!==(c=null==o?void 0:o.weekdaysShort)&&void 0!==c?c:bbn.dt.locales.weekdaysShort},b=(null===bbn||void 0===bbn?void 0:bbn.env)&&(null===(l=bbn.env)||void 0===l?void 0:l.lang)||(null===bbn||void 0===bbn?void 0:bbn.dt)&&(null===(f=bbn.dt)||void 0===f?void 0:f.locale)||Intl.DateTimeFormat().resolvedOptions().locale,g=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function w(t,n="auto"){var o;const i=new mf,a={year:i.year(),month:1,day:1,hour:0,minute:0,second:0,ms:0,hasYear:!1,hasMonth:!1,hasDay:!1,hasHour:!1,hasMinute:!1,hasSecond:!1,hasMs:!1},s="auto"===n,u="zoned"===n.toLowerCase(),c="datetime"===n.toLowerCase(),l="date"===n.toLowerCase(),f="time"===n.toLowerCase(),d="yearmonth"===n.toLowerCase(),w="monthday"===n.toLowerCase(),y=[{token:"YYYY",regex:"\\d{4}",apply:(e,t)=>{t.year=parseInt(e,10),t.hasYear=!0}},{token:"YY",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);t.year=n>=70?1900+n:2e3+n,t.hasYear=!0}},{token:"Y",regex:"[+-]?\\d{1,6}",apply:(e,t)=>{t.year=parseInt(e,10),t.hasYear=!0}},{token:"MMMM",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.monthsLong.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid month name: "+e);t.month=r+1,t.hasMonth=!0}},{token:"MMM",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.monthsShort.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid short month name: "+e);t.month=r+1,t.hasMonth=!0}},{token:"MM",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"mm",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"M",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"m",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"DD",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"D",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"d",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"dddd",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.weekdaysLong.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid weekday name: "+e);t.weekday=r}},{token:"ddd",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.weekdaysShort.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid short weekday name: "+e);t.weekday=r}},{token:"EE",regex:"\\d{1}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>7)throw new Error("Invalid weekday number: "+n);t.weekday=n}},{token:"hh",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid 12-hour clock hour: "+n);t.hour=n,t.hasHour=!0,t.uses12Hour=!0}},{token:"HH",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"H",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"h",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"II",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"I",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"i",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"SS",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"S",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"ss",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"s",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"ms",regex:"\\d{1,3}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>999)throw new Error("Invalid millisecond: "+n);t.ms=n,t.hasMs=!0}},{token:"WWWW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"WWW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"WW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"W",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"ZZ",regex:"(?:Z?[+-]\\d{2}\\d{2})",apply:(e,t)=>{if("Z"===e||"z"===e)return void(t.offsetMinutes=0);const n="-"===e[0]?-1:1,r=e.slice(1),o=parseInt(r.slice(0,2),10),i=parseInt(r.slice(2),10);if(o<0||o>23||i<0||i>59)throw new Error("Invalid timezone offset: "+e);t.offsetMinutes=n*(60*o+i)}},{token:"Z",regex:"(?:Z?[+-]\\d{2}\\:{1}\\d{2})",apply:(e,t)=>{if("Z"===e||"z"===e)return void(t.offsetMinutes=0);const n="-"===e[0]?-1:1,r=e.slice(1),[o,i]=r.split(":");let a=parseInt(o,10),s=parseInt(i,10);if(a<0||a>23||s<0||s>59)throw new Error("Invalid timezone offset: "+e);t.offsetMinutes=n*(60*a+s)}},{token:"z",regex:"[A-Za-z_\\/]+",apply:(e,t)=>{t.timeZone=e}},{token:"A",regex:"(?:AM|PM|am|pm)",apply:(e,t)=>{t.isPM=/pm/i.test(e),t.hasAmPm=!0}},{token:"a",regex:"(?:AM|PM|am|pm)",apply:(e,t)=>{t.isPM=/pm/i.test(e),t.hasAmPm=!0}}],v=[...y].sort((e,t)=>t.token.length-e.token.length);let M="";const E=[];let S=0,D=0;for(;S<t.length;){if("["===t[S]){let e=S+1,n="";for(;e<t.length&&"]"!==t[e];)n+=t[e],e++;if(e<t.length&&"]"===t[e]){const t=n.replace(/\\]/g,"]");M+=g(t),S=e+1;continue}}let e=null;for(const n of v)if(t.startsWith(n.token,S)){e=n;break}e?(M+=`(${e.regex})`,D=M.length,e.apply?E.push(t=>e.apply(t,a)):E.push(()=>{}),S+=e.token.length):(M+=g(t[S]),S+=1)}const T=new RegExp("^"+bbn.fn.substr(M,0,D));let k=T.exec(e);if(!k){if(!r)throw new Error(`Date string "${e}" does not match format "${t}"`);{const n=new mf(i.year(),1,1,0,0,0,0);e=n.format(t),m=!1,k=T.exec(e)}}for(let e=1;e<k.length;e++){const t=k[e],n=E[e-1];null!=t&&n&&n(t)}if(a.uses12Hour){if(!a.hasAmPm)throw new Error("AM/PM marker (A or a) is required with 12-hour format (hh)");let e=a.hour;a.isPM?e<12&&(e+=12):12===e&&(e=0),a.hour=e}const I=a.hasYear||a.hasMonth||a.hasDay,_=a.hasYear&&a.hasMonth&&a.hasDay,O=a.hasYear&&a.hasMonth&&!a.hasDay,x=!a.hasYear&&a.hasMonth&&a.hasDay,j=a.hasHour||a.hasMinute||a.hasSecond||a.hasMs,P=null!=a.timeZone||null!=a.offsetMinutes;let N;if(u||P&&s){let e;try{e=new h.PlainDateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,1e6*a.ms)}catch(e){throw new Error("Invalid date/time components")}if(a.timeZone){const t=h.TimeZone.from(a.timeZone),n=e.toZonedDateTime(t);N=new bf(n)}else{const e=Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute,a.second,a.ms)-6e4*(null!==(o=a.offsetMinutes)&&void 0!==o?o:0);N=new bf(h.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(h.Now.timeZoneId()))}}else if(c||s&&(m||I&&j)){if(!_&&!m)throw new Error("PlainDateTime requires year, month and day");const e=new h.PlainDateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,1e6*a.ms);N=new mf(e)}else if(l||d||w||s&&I&&!j)if(l||_&&s){const e=new h.PlainDate(a.year,a.month,a.day);N=new pf(e)}else if(d||O&&s){const e=new h.PlainYearMonth(a.year,a.month);N=new gf(e)}else if(w||x&&s){const e=new h.PlainMonthDay(a.month,a.day,1972);N=new wf(e)}else{if(!s||!a.hasYear)throw new Error("Not enough date components for a known Temporal type");{const e=new h.PlainDate(a.year,1,1);N=new pf(e)}}else{if(!(f||s&&!I&&j))throw new Error("No date or time information found in input");{const e=new h.PlainTime(a.hour,a.minute,a.second,1e6*a.ms);N=new Mf(e)}}return N.setValid(m),N}if(Array.isArray(t)){let e=null;for(const r of t)try{return w(r,n)}catch(t){e=t}throw null!=e?e:new Error("No format matched")}return w(t,n)}const Df=["YYYY-MM-DD HH:II:SS.ms","YYYY-MM-DD HH:II:SS","YYYY-MM-DD HH:II:SS[ GMT]Z","YYYY-MM-DD HH:II","YYYY-MM-DDTHH:II:SS.msZ","YYYY-MM-DDTHH:II:SSZ","YYYY-MM-DDTHH:II:SS","YYYY-MM-DDTHH:II","ddd[, ]DD MMM YYYY HH:II:SS[ GMT]","ddd MMM DD YYYY HH:II:SS[ GMT]Z","ddd MMM DD YYYY HH:II:SS","D MMM","D MMMM","D/M","YYYY-MM-DD","YYYY-MM","HH:II:SS","HH:II"];function Tf(e,t,n){const r=e.trim();if(!r)return null;vf();const o=e=>{for(const t of e)try{return Sf(r,t),t}catch(e){}return null};if(t){return o(Array.isArray(t)?t:[t])}const i=new Set,a=Df.filter(e=>!i.has(e)&&(i.add(e),!0)),s=[...bbn.dt.locales.datetime.map(e=>e.pattern),...bbn.dt.locales.date.map(e=>e.pattern),...bbn.dt.locales.time.map(e=>e.pattern)].filter(e=>!i.has(e)&&(i.add(e),!0)),u=o([...a,...s]);return u||null}const kf=(e,t=null,n="auto")=>{if(!e)return new mf;if("string"==typeof e){if(t)return Sf(e,t,n,!0);{const t=Tf(e);if(t)return Sf(e,t,n);throw new Error(Uc("Could not guess the date format for value: %s",e))}}if("number"==typeof e)return new mf(Math.abs(e)<99999999999?1e3*e:e);if(e.__isBbnDt)return e;if(e instanceof Date){const t=e;return new mf(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}if(e instanceof Zc.PlainDateTime)return new mf(e);if(e instanceof Zc.PlainDate)return new pf(e);if(e instanceof Zc.PlainTime)return new bf(e);if(e instanceof Zc.PlainYearMonth)return new gf(e);if(e instanceof Zc.PlainMonthDay)return new wf(e);if(e instanceof Zc.ZonedDateTime)return new bf(e);if(e instanceof Zc.Duration)return new cf(e);throw bbn.fn.log("Invalid date value",e),new Error(Uc("Invalid date value"))};function If(e){if(arguments.length>1){const e=[];for(let t=1;t<arguments.length;t++)e.push(arguments[t]);e.unshift({_bbn_console_mode:"error",_bbn_console_level:1,_bbn_console_style:"color: #E64141; background: #F7E195; font-size: 14px"}),nl.apply(this,e)}throw new Error(e)}function _f(e,t=null,n=null,r=null,o=null){let i=!1;if(t){i=!0;let a,s="object"===(typeof t).toLowerCase();if(s&&t.prescript)try{new Function(t.prescript)()}catch(e){If(e.message||"")}if(s&&void 0===t.url&&(t.url=e),i=n&&tl(n)?n(t,o):bbn.fn.defaultLinkFunction(t,o),o&&s&&void 0!==t.content&&("value"in o?o.value=t.content:o.innerHTML=t.content),i&&s&&t.script&&(i="function"==typeof t.script?t.script(t.data?t.data:{},o||null):((e,n)=>{let r=null;try{r=new Function(t.script)(),tl(r)&&(r=r(e,n))}catch(e){nl(e,t),If(tl(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&tl(r)?r(t):s&&bbn.fn.defaultPostLinkFunction&&bbn.fn.defaultPostLinkFunction(t,o),i&&s&&t.postscript){new Function(t.postscript)(t.postscript)}s&&t.error&&(a=t.errorTitle||bbn.lng.server_response,bbn.fn.defaultErrorFunction(t.error,a))}else bbn.fn.defaultErrorFunction(bbn.lng.errorText,bbn.lng.error);return i}function Of(e,t,n=!1){let r={error:!1,result:!0};if("string"==typeof t&&(t=[t]),ul(t)||(r.error=bbn._("checkProps must receive a string or an array as props argument")),sl(e)||(r.error=bbn._("checkProps must receive an object as obj argument")),!r.error){let o;al(t,t=>{let i=(t=t.trim().split(":"))[1]||!1;if(t=t[0],void 0===e[t]?r.error=t+" "+bbn._("is not defined"):i?(o="is"+rl(i,0,1).toUpperCase()+rl(i,1).toLowerCase(),void 0===bbn.fn[o]?r.error=i+" "+bbn._("is not a valid type"):bbn.fn[o](e[t])||(r.error=t+" "+bbn._("is not a")+" "+i)):n&&!e[t]&&(r.error=t+" "+bbn._("is empty")),r.error)return!1})}return r.error&&(r.result=!1),r}function xf(e){return e.replace(/[A-z]{1}/,e=>e.toUpperCase())}function jf(e,t,n,...r){let o=!1;ul(t)||(t=[t]);const i=[];if(al(t,t=>{var n;if(t===String?t="string":t===Number?t="number":t===Array?t="array":t===Boolean?t="boolean":t===Object?t="object":t===Function&&(t="function"),tl(t)){if(i.push(t.name||(null===(n=t.constructor)||void 0===n?void 0:n.name)||t.toString()),e instanceof t)return o=!0,!1}else if(Qc(t)&&tl(bbn.fn["is"+xf(t)])){if(bbn.fn["is"+xf(t)](e))return o=!0,!1;i.push(t)}else If(`The type ${t} is not recognized`)}),!o)throw nl(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&nl(r),new Error((n?n+" - ":"")+bbn._("The value should be a %s",i.join(" "+bbn._("or a")+" ")))}function Pf(e){if(ul(e))return e.slice().map(e=>"object"==typeof e?Pf(e):e);if(sl(e)){return cl(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}kf.locales=Object.create(null),kf.parse=Sf,kf.guessFormat=Tf,kf.time=()=>{},kf.date=()=>{},kf.dateTime=()=>{},kf.duration=(e,t)=>e instanceof Zc.Duration?new cf(e):cf.fromUnit(e,t),kf.zoned=()=>{},kf.monthDay=()=>{},kf.yearMonth=()=>{};const Nf=(e,t="text/plain")=>{const n=new DataTransfer;n.setData(t,e);const r=new ClipboardEvent("copy",{bubbles:!0,cancelable:!0,clipboardData:n});document.dispatchEvent(r)};function Cf(e,t,n=null,r="="){if(!ul(e))throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array");let o={};const i=[],a="function"==typeof t;if(!t||!e.length)return e;if("object"==typeof t)r=n,o=t;else if("string"==typeof t)o[t]=n;else if(!a)throw new Error("Search function error: The prop argument should be a string or an object");if("function"==typeof t)for(let n=0;n<e.length;n++)t(e[n],n)&&i.push(e[n]);else if(o=Rl(o,r),o.conditions&&o.logic)for(let t=0;t<e.length;t++)Cl(e[t],o)&&i.push(e[t]);return i}const Rf=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=1&t?3988292384^t>>>1:t>>>1;Rf.push(t)}function Yf(...e){const t=Object.create(null);return e.length&&cl(t,...e),t}function Af(e){let t=typeof e;if(void 0===e)return new Date;if("number"===t||Kc(e)&&""!==e)return e<1e10&&(e*=1e3),new Date(e);if("string"===t){if(10===e.length)return new Date(parseInt(rl(e,0,4)),parseInt(rl(e,5,2))-1,parseInt(rl(e,8,2)),12);if(19===e.length)return new Date(parseInt(rl(e,0,4)),parseInt(rl(e,5,2))-1,parseInt(rl(e,8,2)),parseInt(rl(e,11,2)),parseInt(rl(e,14,2)),parseInt(rl(e,17,2)))}else if(gl(e))return e;return!1}function Ff(e,t=""){nl(e)}function Lf(e,t=null,n=null){nl(t,n)}function Zf(e,t,n=null,r=null){return!0}function Hf(...e){if(!e.length)return!1;for(let t of e)if("object"==typeof t&&!Ml(t))return!1;return!0}let Bf=[];function Uf(e){if(Qc(e)&&e){for(;"/"===rl(e,e.length-1);)e=rl(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return rl(e,0,t);if(0===t)return"/"}return""}function $f(...e){if(!e.length)return!1;for(let t of e)if("[object Blob]"!=={}.toString.apply(t))return!1;return!0}function Wf(e){if(e&&Qc(e)){let t=e.split(".");if(t[0]&&t.length>1)return t[t.length-1].toLowerCase()}return""}function zf(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLCanvasElement))return!1;return!0}function qf(e,t,n=null){if(zf(t))return void t.toBlob(t=>{let n=document.createElement("a");n.download=e,n.href=window.URL.createObjectURL(t),n.className="bbn-no",n.click(),window.URL.revokeObjectURL(n.href)},n||"image/png");n?-1===n.indexOf("/")&&(n="text/"+n):n=sl(t)&&t.type?t.type:"octet/stream";let r=window.document.createElement("a");r.className="bbn-no";let o=null;if(Qc(t))o=new Blob([t],{type:n});else try{o=t}catch(e){nl(e)}r.href=window.URL.createObjectURL(o),r.download=e,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(r.href),document.body.removeChild(r)}var Vf=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};function Jf(){return Vf(this,void 0,void 0,function*(){var e;(null===(e=window.scheduler)||void 0===e?void 0:e.yield)?yield window.scheduler.yield():yield new Promise(requestAnimationFrame)})}var Gf=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};function Kf(e){let t;return"checkbox"===e.type?e.checked?(t=e.value,t||(t=1)):t=0:"radio"===e.type?e.checked&&(t=e.value):t=e.value,t}function Xf(e){let t,n,r=e.querySelectorAll("input[name],select[name],textarea[name],button[name]"),o={};return al(r,(e,r)=>{if(n=Kf(e),void 0!==n&&!e.disabled){let r=e.name;if(-1===r.indexOf("[]")&&r.indexOf("[")>-1&&r.indexOf("]")>-1&&r.lastIndexOf("]")===r.length-1&&(r=Wl("][",".",r),r=Wl("[",".",r),r=Wl("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=rl(r,0,r.length-2),void 0===o[t]&&(o[t]=[]),o[t].push(n);else if(r.indexOf(".")>-1){let e,t=r.split(".");e=o;for(let r=0;r<t.length;r++)void 0===o[t[r]]&&(r<t.length-1?e[t[r]]={}:e[t[r]]=n),e=e[t[r]]}else o[r]=n}}),o}function Qf(e){return e.filter((e,t,n)=>t===n.indexOf(e))}function ed(e,t=null){let n=[];if("string"==typeof e&&(e=document.querySelector(e)),e instanceof HTMLElement&&e.parentElement)if("string"==typeof t)for(;e=e.parentElement.closest(t);)n.push(e);else for(!0===t&&n.push(e);e=e.parentElement;)n.push(e);return n}function td(e){0!==e.indexOf("--")&&(e="--"+e);let t=getComputedStyle(document.documentElement).getPropertyValue(e);return"string"==typeof t&&(t=t.trim()),t}function nd(){const e=navigator.userAgent.toLowerCase();return/iPhone|Android/i.test(navigator.userAgent)?"mobile":/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(e)?"tablet":"desktop"}function rd(){let e,t=window.getSelection();if(t.rangeCount>0){e=t.getRangeAt(0),nl("RANGE",e);let n=e.cloneContents();nl("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function od(e){return Qc(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function id(e){let t=document.createElement("div");return t.innerHTML=e,e=t.innerText}function ad(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}function sd(e){let t,n,r={};if(sl(e[0])&&1===e.length)return e[0];for(n=0;n<e.length;n++)t=typeof e[n],t=t.toLowerCase(),tl(e[n])?(r.errorFn&&!r.abortFn&&(r.abortFn=e[n]),r.successFn&&!r.errorFn?r.errorFn=e[n]:r.successFn||(r.successFn=e[n])):1===e[n]||!0===e[n]?r.force=!0:"string"===t?r.url?r.datatype=e[n]:0===e[n].indexOf("#")||0===e[n].indexOf(bbn.env.root+"#")?r.url=rl(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=rl(r.url,bbn.env.root.length))):e[n]&&"object"===t&&(e[n]instanceof Event?r.e=e[n]:r.ele||1!==e[n].nodeType?"object"===t.toLowerCase()&&(r.obj=e[n]):r.ele=e[n]);return!r.url&&yl(r)&&(r.url=bbn.env.path),void 0===r.obj&&(r.obj={_bbn:"public"}),r.datatype||(r.datatype="json"),r}function ud(e,t,n=null,r=!1){bbn.env.old_path=bbn.env.path,bbn.env.url=["https:/","http://"].includes(rl(e,0,7))?e:bbn.env.root+e,bbn.env.path=rl(bbn.env.url,bbn.env.root.length),bbn.env.params=bbn.env.path.split("/").filter(e=>""!==e);let o=window.history;if(o){let e=o.state,i={url:bbn.env.path,old_path:bbn.env.old_path||null,data:n||{},reload:!1};e&&e.url===bbn.env.path&&(e.data&&cl(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?id(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function cd(...e){let t=sd(e),n=1;if(!0===t)return!0;if(!t)return cd(window.location.href);if(0===t.url.indexOf("javascript:"))return!0;if(0===t.url.indexOf("data:"))return!0;if(0===t.url.indexOf("#"))return location.href=bbn.env.url+t.url,!0;if(0===t.url.indexOf("mailto:"))return bbn.env.ignoreUnload=!0,window.location.href=t.url,setTimeout(()=>{bbn.env.ignoreUnload=!1},0),!1;if(Ll(t.url))return!1;if((0===t.url.indexOf("http://")||0===t.url.indexOf("https://"))&&0!==t.url.indexOf(bbn.env.host))return t.e&&t.e.preventDefault(),window.open(t.url),!1;if(t.url!==bbn.env.params.join("/")||1===t.force){if(t.successFn)n=t.successFn(t.url);else if(bbn.fn.defaultPreLinkFunction){let e=bbn.fn.defaultPreLinkFunction(t.url,t.force,t.ele);void 0!==e.data?(cl(t.obj,e.data),n=1):n=e}if(n){1!==n&&"string"==typeof n&&(t.url=n);let e=bbn._("The Ajax call to")+" "+t.url+" ";return ql(t.url,t.datatype,t.obj,n=>{n||nl(e+bbn._("returned no answer")),sl(n)&&(0===Object.keys(n).length&&nl(e+bbn._("returned an empty object")),n.new_url?(n.old_path=t.url,t.url=n.new_url):n.url&&t.url!==n.url&&(n.old_path=t.url)),_f(t.url,n,t.successFn,null,t.ele)&&void 0===n.noNav&&0!==bbn.env.path.indexOf(t.url)&&ud(t.url,(n.title?n.title+" - ":"")+bbn.env.siteTitle)},t.errorFn||null)}}return!0}function ld(){let e=bbn.env.width!==window.innerWidth,t=bbn.env.height!==window.innerHeight;if(e||t){e&&(bbn.env.width=window.innerWidth||window.document.documentElement.clientWidth||window.document.body.clientWidth,document.documentElement.style.setProperty("--vw",.01*bbn.env.width+"px")),t&&(bbn.env.height=window.innerHeight||window.document.documentElement.clientHeight||window.document.body.clientHeight,document.documentElement.style.setProperty("--vh",.01*bbn.env.height+"px"));let n=parseInt(td("mobile-limit"))||650,r="bbn-screen-"+(bbn.env.width<n?"small":"regular"),o=(document.body.className||"").split(" "),i=!1;al(o,(e,t)=>{if(3===e.split("-").length&&0===e.indexOf("bbn-screen-"))return i=!0,e!==r&&o.splice(t,1,r),!1}),i||o.push(r),bbn.fn.defaultResizeFunction(),document.body.className=o.join(" ")}}function fd(){return"mobile"===nd()}function dd(){return"tablet"===nd()}function hd(){return fd()||dd()}function md(e=!1){let t=(new Date).getTime();return e?Math.round(t/1e3):t}const pd=e=>{if(bbn.env.last_focus=bbn.dt().unix(),"ajax"!==bbn.env.nav)return;let t=e.target;if(t instanceof HTMLElement&&"A"!==t.tagName){let e=t;for(;e&&"A"!==e.tagName&&"BODY"!==e.tagName;)e=e.parentElement;t=e&&"A"===e.tagName?e:null}return t instanceof HTMLElement&&t.hasAttribute("href")&&!t.hasAttribute("target")&&!t.classList.contains("bbn-no")?(e.preventDefault(),e.stopPropagation(),cd(t.getAttribute("href")),!1):void 0};function bd(e){if("string"==typeof e&&e.length>0&&(0===e.indexOf("calc")||Kc(rl(e,0,1)))){let t=document.createElement("div");t.style.width=e;let n=!!t.style.width.length;return t.remove(),n}return!1}function gd(...e){if(!e.length)return!1;for(let t of e)if(!Qc(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function wd(...e){if(!e.length)return!1;for(let t of e)if("[object Symbol]"!=={}.toString.apply(t))return!1;return!0}function yd(e){const t=["BBN: "+e];t.unshift({_bbn_console_mode:"warn",_bbn_console_level:2,_bbn_console_style:"color: #E64141; background: #F7E195; font-size: 14px"}),nl.apply(this,t)}function vd(e,t="",n=null){let r=new FormData,o=(e,t="")=>{(!n||ul(n)&&!n.includes(t))&&(e instanceof File?r.append(t,e):ul(e)?al(e,(e,n)=>{o(e,t+"["+n+"]")}):sl(e)&&Object.keys(e).length?il(e,(n,r)=>{r in e&&o(n,t?t+"["+r+"]":r)}):Ml(e)||void 0===e||r.append(t,e))};return o(e,t),r}function Md(e){return"string"==typeof e?document.querySelector(e):e}function Ed(...e){let t=sd(e);if(t.url)return ql(t.url,t.datatype,t.obj,e=>{_f(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Sd(e,t,n,r){if("object"==typeof e&&"string"==typeof t){let o=e;const i=t.split(".");al(i,(e,t)=>{if(!o){if(!r)throw new Error(bbn._("The object is invalid"));o={}}i.length-1===t?o[e]=n:o=o[e]})}}function Dd(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Td(e,t=" "){if(" "===t)return e.trim();if(!t)return e;if(t===e)return"";for(;0===e.indexOf(t);)e=rl(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=rl(e,0,e.length-t.length);return e}function kd(e,t,n){return"string"==typeof e.toLowerCase()&&(t||(t=bbn.var.shortenLen),void 0!==n&&Qc(n)||(n="..."),e.length>t&&(e=rl(e,0,t)+n)),e}var Id={_addLoader:ml,_compareValues:wl,_deleteLoader:Fl,abort:function(e){let t=Ll(e);(null==t?void 0:t.aborter)&&t.aborter.abort("Operation canceled by the user.")},abortURL:function(e){al(Zl(bbn.env.loaders,{url:e}),t=>{if(!t||!t.source)throw new Error("Impossible to find the loader with URL "+e);t.source.cancel("Operation canceled by the user.")})},addColors:Hl,addInputs:Bl,addStyle:function(e,t){sl(t)&&il(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&Xc(e[0])&&(e=e[0]),Ul("height",e)},adjustSize:Ul,adjustWidth:function(){let e=arguments;return 1===e.length&&Xc(e[0])&&(e=e[0]),Ul("width",e)},ajax:ql,analyzeFunction:jl,animateCss:function(e,t,n){e.classList.add("animated"),e.classList.add(t),e.addEventListener("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function e(r){r.target.removeEventListener(r.type,e),"function"==typeof n&&n.call(this),r.target.classList.remove(t)})},arrayBuffer2String:Jl,arrayFromProp:function(e,t){let n=[];return al(e,(e,r)=>{n.push(pl(e,t))}),n},autoExtend:function(e,t){bbn[e]||(bbn[e]={}),cl(bbn[e],t)},baseName:Gl,br2nl:function(e){return Wl("<br />","\n",Wl("<br/>","\n",Wl("<br>","\n",e)))},calendar:function(e,t=!1){let n=kf(e);return n.isValid?n.calendar():t&&Qc(t)?t:""},callback:_f,camelize:function(e){return e.replace(/^([A-Z])|[\s-](\w)/g,function(e,t,n,r){return n?n.toUpperCase():t.toLowerCase()})},camelToCss:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}).replace("/^./",function(e){return e.toLowerCase()})},canvasToImage:function(e){let t=new Image;return t.src=e.toDataURL("image/png"),t},cast:function(e){var t;return e?"object"==typeof e?bbn.fn.isArray(e)?"Array ("+e.length+")":(null===(t=e.constructor)||void 0===t?void 0:t.name)||"{}":e.toString?e.toString():"string"==typeof e?e:"":""},center:function(e){let t=e.parentNode,n=t.clientWidth,r=t.clientHeight;for(;t&&(!n||!r);)t=e.parentNode,n=t.clientWidth,r=t.clientHeight;return e.style.position="absolute",e.style.top=Math.max(0,(r-e.offsetHeight)/2+t.scrollTop)+"px",e.style.left=Math.max(0,(r-e.offsetWidth)/2+t.scrollLeft)+"px",e},checkProps:function(e,t,n=!1){return Of(e,t,n).result},checkPropsDetails:Of,checkPropsOrDie:function(e,t,n=!1){let r=Of(e,t,n);if(r.error)throw new Error(r.error);return!0},checkType:jf,circularReplacer:function(){const e=new WeakSet;return(t,n)=>{if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n),[void 0,Object,Array,null].includes(n.constructor)||(n=Tl(n)?n.bbnId?"__BBN_DOM__"+n.tagName+"/"+n.bbnId+n.bbnHash:"__BBN_DOM__"+n.tagName+"/"+n.className:Il(n)?"__BBN_CP__"+n.$options.name+"/"+n.$cid:n.constructor.toString())}return n}},clone:Pf,colorToHex:function(e){let t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle},compare:Nl,compareConditions:Cl,copy:function(e,t){return new Promise(n=>{if(e){if(navigator&&navigator.clipboard)return void(e instanceof Blob?(navigator.clipboard.write([new ClipboardItem({[e.type.toString()]:e})]).then(()=>{n(!0)}),t||Nf(e,e.type.toString())):sl(e)&&tl(e.toBlob)?e.toBlob(r=>{const o=new ClipboardItem({[r.type.toString()]:r});navigator.clipboard.write([o]).then(()=>{t||Nf(e,r.type.toString()),n(!0)})}):(navigator.clipboard.writeText(e),t||Nf(e),n(!0)));let r=document.createElement("textarea");r.style.opacity="0",r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),t||Nf(e),n(!0)}n(!1)})},correctCase:xf,count:function(e,t,n=null,r="="){return Cf(e,t,n,r).length||0},crc32:function(e){let t=~0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t>>>8^Rf[255&(t^r)]}return(-1^t)>>>0},createObject:Yf,cssExists:function(e){let t,n,r=document.styleSheets;for(let o=0;o<r.length;o++){t=1;try{n=r[o].rules||r[o].cssRules}catch(e){if(t=!1,"SecurityError"!==e.name)throw e}if(t)for(let t=0;t<n.length;t++)if(new RegExp("(^|\\s)"+$l(e)+"(\\{|\\s)","g").test(n[t].selectorText))return!0}return!1},data2Html:function e(t,n=""){const r=!ul(t);let o='<ul class="bbn-bottom-xspadding '+(n||"bbn-ul")+'">';for(let i in t)o+="<li>",r&&(o+="<em>"+i+"</em>: "),t[i]&&(ul(t[i])||sl(t[i]))?o+=e(t[i],n):o+=null===t[i]?"<em>null</em>":t[i].toString?t[i].toString():t[i],o+="</li>";return o+='</ul><div class="bbn-bottom-xspadding '+(n||"bbn-div")+'"></div>',o},date:Af,dateSQL:function(e,t){let n=kf(e);if(n)return n.format("YYYY-MM-DD"+(t?"":" HH:mm:ss"))},deepPath:function e(t,n,r,o=[]){let i;return(i=Yl(t,n,0))>-1?(o.push(i),o):(al(t,(t,i)=>{if(ul(t[r])){let a=o.slice();a.push(i);let s=e(t[r],n,r,a);if(!1!==s)return s}}),!1)},defaultAjaxAbortFunction:Ff,defaultAjaxErrorFunction:Lf,defaultAlertFunction:function(e,t=null){alert(e)},defaultConfirmFunction:function(e,t,n=null){let r=0;confirm(e)&&tl(t)&&(t(),r=1),!r&&tl(n)&&n()},defaultEndLoadingFunction:Zf,defaultErrorFunction:function(e){nl(e)},defaultHistoryFunction:function(e){return!0},defaultLinkFunction:function(e,t){return!0},defaultPostLinkFunction:function(e,t=null){return!0},defaultPreLinkFunction:function(e,t=!1,n=null){return nl("defaultPreLinkFunction",e,t,n),!0},defaultResizeFunction:function(){return!0},defaultStartLoadingFunction:function(e,t,n,r){return!0},deleteProp:function(e,t){jf(e,"object",bbn._("The obj must be an object in setProp")),jf(t,"string",bbn._("The prop must be a string in setProp")),delete e[t]},diffObj:function e(t,n,r=!1,o=!1){o||(Bf=[]);let i="unchanged";void 0===o&&(o=!1);let a=Yf();if(!tl(t)&&!tl(n)){if(Hf(t)||Hf(n)){let e=(s=t)===(u=n)||gl(s)&&gl(u)&&s.getTime()===u.getTime()?i:void 0===s?"created":void 0===u?"deleted":"updated";if(r||e!==i){let r=Yf();return Object.defineProperty(r,"type",{value:e,enumerable:!1}),Object.defineProperty(r,"data",{value:void 0===t?n:t,enumerable:!1}),Object.defineProperty(r,"_bbnDiffObjProof",{value:!0,enumerable:!1}),void 0!==t&&Object.defineProperty(r,"newData",{value:n,enumerable:!1}),r}return!1}if(Tl(t)||Tl(n))return!1;if(Bf.includes(t)||Bf.includes(n))return!1;Bf.push(t,n);for(let o in t){if(tl(t[o]))continue;let i;void 0!==n[o]&&(i=n[o]);let s=e(t[o],i,r,!0);s&&(a[o]=s)}for(let o in n){if(tl(n[o])||void 0!==t[o])continue;let i=e(void 0,n[o],r,!0);i&&(a[o]=i)}}var s,u;return!(o&&!r&&!yl(a))&&a},dirName:Uf,download:function(e,t="",n=null){return t&&"object"==typeof t&&(n=t,t=""),ql(e,"blob",n||{_bbn_download:1},(n,r)=>{if(!t){let n="content-disposition",o="attachment; filename=";t=(null==r?void 0:r[n])&&0===r[n].indexOf(o)?rl(r[n],o.length+1,r[n].length-o.length-2):Gl(e)}if($f(n)){let e=Wf(t),r=["php","html"];if("string"==typeof t&&("type"in n&&"text/html"!==n.type||r.includes(e)))return void qf(t,n)}},e=>{bbn.fn.defaultAjaxErrorFunction(e)})},downloadContent:qf,each:al,eraseCookie:function(e){document.cookie=e+"=; Max-Age=-99999999;"},error:If,escapeDquotes:function(e){return Qc(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:$l,escapeSquotes:function(e){return Qc(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Qc(e)?e.replace(/`/g,"\\`"):e},escapeUrl:function(e,t){let n="";e.match("^(http|https)://")&&(n+="http","s"===(e=e.substring(4)).substr(0,1)&&(n+="s",e=e.substring(1)),n+="://",e=e.substring(3)),al(Uf(e).split("/"),e=>{n+=encodeURIComponent(e)+"/"});let r=Gl(e),o="?",i="";if(r.indexOf(o)){let e=r.split("?");o="&",i="?"+e[1],r=e[0]}return t&&Qc(t)?(t.match("^(\\&|\\?)")&&(t=t.substring(1)),t=o+t):t="",n+encodeURIComponent(r)+i+t},executeSlowly:function(e,t){return Gf(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){yield Jf();let r=t(e[n],n);if(r instanceof Promise&&(r=yield r),!1===r)return!1}return!0})},extend:cl,extendOut:function e(...t){let n=null;for(let r of t){if(!sl(r))throw new Error("Each argument for extendOut must be an object, "+typeof r+" given");if(null===n)n=r;else for(let t in r)sl(n[t],r[t])?e(n[t],r[t]):void 0===n[t]&&(n[t]=r[t])}return n},fdate:function(e,t=!1){let n=kf(e),r=!1;return!0===t&&(r=!0),n.isValid?n.fdate(!1,r):t&&Qc(t)?t:""},fdatetime:function(e,t=!1){let n=kf(e);return n.isValid?n.fdate(!1,!0):t&&Qc(t)?t:""},fieldValue:Kf,fileExt:Wf,filter:Cf,filterToConditions:Rl,findAll:function e(t,n,r,o=[]){let i,a=0;for(;(i=Yl(t,n,a))>-1;)o.push(t[i]),a=i+1;return al(t,t=>{ul(t[r])&&e(t[r],n,r,o)}),o},firstVarElement:function(e){const t=e.indexOf("["),n=e.indexOf(".");return-1===t&&-1===n?e:-1===t?e.substring(0,n):-1===n?e.substring(0,t):e.substring(0,Math.min(t,n))},fori:function(e,t,n=e.length-1,r=0){if(ul(e)){let o=e.length-1;Kc(n)&&0<n&&n<=o||(n=o),(!Kc(r)||!(0<=r&&r<o)||r>n)&&(r=0);for(let o=r;o<=n;o++)if(!1===t(e[o],o))return}},forir:function(e,t,n=e.length-1,r=0){if(ul(e)){let o=e.length-1;Kc(n)&&0<n&&n<=o||(n=o),(!Kc(r)||!(0<=r&&r<o)||r>n)&&(r=0);for(let o=n;o>=r;o--)if(!1===t(e[o],o))return}},format:function(e){let t=Array.prototype.slice.call(arguments,1);if(t.length){let n=0;return e.replace(/\%([d|s])/g,(e,r)=>{let o=t[n++];return jf(o,"d"===r?"number":"string",bbn._("The value doesn't correspond to the format")),o})}return e},formatBytes:function(e,t=2){if(!e)return"0 B";const n=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,n)).toFixed(t<0?0:t))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},formatDate:function(e,t){const n=kf(e);return n.isValid?n.format(t):""},formatSize:function(e,t){return Kc(e)?e+"px":Qc(e)?e:!t&&"auto"},formdata:Xf,fphone:function(e){var t;if(Kc(e)&&(e=e.toString()),Qc(e)){const n=(null===(t=bbn.var)||void 0===t?void 0:t.phoneCodes)||[];let r="",o="",i="";if(n.length&&al(n,t=>{e.startsWith(t.prefix)&&t.prefix.length>o.length&&(o=t.prefix,i=t.mask||"")}),!i.length&&e.startsWith("+")){o.length||(o=e.substr(0,3));const t=e.slice(o.length);for(let e=0;e<t.length;e++)e+1<=t.length&&e%2==0&&(i+="0"+(t[e+1]?"0":"")+" ");i=i.trim()}if(i.length){o.length&&(r=o+" ",e=e.slice(o.length));let t=0;return r+=i.replace(/[0-9]/g,()=>e[t++]||""),r}}return e},fromXml:function(e,t){let n=null;if(window.DOMParser)n=(new DOMParser).parseFromString(e,"text/xml");else{if(!window.ActiveXObject)throw new Error("cannot parse xml string!");if(n=new window.ActiveXObject("Microsoft.XMLDOM"),n.async=!1,!n.loadXML(e))throw n.parseError.reason+" "+n.parseError.srcText}function r(e,n){if("#text"==e.nodeName){let t=e.nodeValue;return void(t.trim()&&(n["#text"]=t))}let o={},i=n[e.nodeName];if(i?Array.isArray(i)?n[e.nodeName].push(o):n[e.nodeName]=[i,o]:t&&-1!=t.indexOf(e.nodeName)?n[e.nodeName]=[o]:n[e.nodeName]=o,e.attributes)for(let t of e.attributes)o[t.nodeName]=t.nodeValue;for(let t of e.childNodes)r(t,o)}let o={};for(let e of n.childNodes)r(e,o);return o},ftime:function(e,t){let n=kf(e);return n.isValid?n.ftime():t&&Qc(t)?t:""},getAllTags:function(){return Qf(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:ed,getAttributes:function(e){e.getAttributeNames||If("The element is not a proper HTML Element");let t=Object.create(null);return e.getAttributeNames().forEach(n=>{t[n]=e.getAttribute(n)}),t},getBrowserName:function(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("edge"):case e.includes("edg/"):return"Edge";case e.includes("opr")&&!!window.opr:return"Opera";case e.includes("chrome")&&!!window.chrome:return"Chrome";case e.includes("trident"):return"Internet Explorer";case e.includes("firefox"):return"Firefox";case e.includes("safari"):return"Safari";default:return"Other"}},getBrowserVersion:function(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("edge/"):return e.split("edge/")[1].split(" ")[0];case e.includes("edg/"):return e.split("edg/")[1].split(" ")[0];case e.includes("opr/")&&!!window.opr:return e.split("opr/")[1].split(" ")[0];case e.includes("chrome/")&&!!window.chrome:return e.split("chrome/")[1].split(" ")[0];case e.includes("trident/"):return e.split("trident/")[1].split(" ")[0];case e.includes("firefox/"):return e.split("firefox/")[1].split(" ")[0];case e.includes("safari/"):return e.split("version/")[1].split(" ")[0];default:return""}},getChrono:function(e="default"){return bbn.fn.microtimestamp()-this.constructor.chronos[e]},getCookie:function(e){let t=e+"=",n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t)){let e=r.substring(t.length,r.length);if(e)return JSON.parse(unescape(e)).value}}return null},getCssVar:td,getDay:function(e){let t=Af(e);if(t){let e=t.getTime(),r=t.getYear(),o=365*(r-1970);t.getMonth()<2&&r--;for(var n=1972;n<=r;n+=4)o++;return o+Math.floor(e/864e5)}return!1},getDeviceType:nd,getEventData:function(e){let t=e.dataTransfer||e.clipboardData,n=t.getData("Text"),r={raw:n,files:[],str:[]};return new Promise((o,i)=>{let a=!(t instanceof DataTransfer);if(!n&&"copy"===e.type){let e=window.getSelection();r.raw=e.toString();let t=rd();r.str.push({type:"text/plain",data:r.raw}),t!==r.raw?r.str.push({type:"text/html",data:t}):0===r.raw.trim().indexOf("<")&&r.str.push({type:"text/html",data:"<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n"+r.raw+"\n</code>"}),a=!0,o(r)}if(!a){let e=[],n=t.items.length;al(t.items,(i,s)=>{let u=i.kind,c=i.type;if("file"===u){let u=t.files[s];if(!c&&u.name){let e=u.name.split(".");c=e[e.length-1]}let l=u?u.name:bbn._("untitled"),f=u?u.size:null,d=u?u.lastModified:null,h=i.getAsFile();h?(a=!0,n--,r.files.push({type:c,data:h,name:l,size:f,mdate:d}),e.push(l),n||(r.raw||(r.raw=e.join(", ")),o(r))):bbn.fn.defaultErrorFunction(bbn._("Impossible to read the file")+" "+l)}else a=!0,i.getAsString(t=>{n--,r.str.push({type:c,data:t}),"text/plain"===c&&e.push(name),n||(r.raw||(r.raw=e.join(", ")),o(r))})})}a||setTimeout(()=>{o(r)})})},getField:function(e,t,n="",r=null,o="=",i=0,a=!1,s=void 0){let u;return n&&["object","function"].includes(typeof n)&&6 in arguments&&(s=a),t?(u=Al(e,n,r,o,i,a,void 0),void 0===u?s:u[t]):s},getFieldValues:function(e,t,n,r,o){jf(t,"string"),n&&(e=Zl(e,n,r,o));let i=[];return al(e,e=>-1===i.indexOf(e[t])?i.push(e[t]):null),i},getIndex:function(e,t=""){return e.parentElement?(t||Array.from(e.parentElement.children).indexOf(e),Array.from(e.parentElement.children).filter(e=>e.matches(t)).indexOf(e)):-1},getHtml:function(e,t=!1){let n=e.innerHTML();return t&&(n=od(n)),n.trim()},getHTMLOfSelection:rd,getLoader:Ll,getPath:kl,getProp:function(e,t){return jf(e,"object",bbn._("The obj must be an object in setProp")),jf(t,"string",bbn._("The prop must be a string in setProp")),e[t]},getProperty:pl,getRequestId:zl,getRow:Al,getScrollBarSize:function(){if(void 0===bbn.env.scrollBarSize){let e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px","msOverflowStyle"in e.style&&(e.style.msOverflowStyle="scrollbar"),document.body.appendChild(e);let t=e.offsetWidth;e.style.overflow="scroll";let n=document.createElement("div");n.style.width="100%",e.appendChild(n);let r=n.offsetWidth;e.parentNode.removeChild(e);let o=t-r;bbn.env.scrollBarSize=o?o+1:0}return bbn.env.scrollBarSize},getSortingMoves:function(e,t){if(e.length!==t.length)throw new Error("Lengths must match.");const n=new Set(t);if(n.size!==t.length)throw new Error("dst has duplicates.");const r=new Set(e);if(r.size!==e.length)throw new Error("src has duplicates.");if(e.length!==n.size||Array.from(r).some(e=>!n.has(e)))throw new Error("Arrays must contain the same unique values.");const o=new Map(t.map((e,t)=>[e,t])),i=e.map(e=>o.get(e)),a=(e=>{const t=e.length,n=[],r=Array(t).fill(-1);for(let o=0;o<t;o++){let t=e[o],i=0,a=n.length;for(;i<a;){const r=i+a>>1;e[n[r]]<t?i=r+1:a=r}i>0&&(r[o]=n[i-1]),n[i]=o}const o=[];for(let e=n.length?n[n.length-1]:-1;-1!==e;e=r[e])o.push(e);return o.reverse()})(i),s=new Set(a.map(t=>e[t])),u=Array(t.length).fill(-1);for(let e=t.length-2;e>=0;e--)u[e]=u[e+1],s.has(t[e+1])&&(u[e]=e+1);const c=e.slice(),l=new Map(c.map((e,t)=>[e,t])),f=[];for(let e=0;e<t.length;e++){const n=t[e];if(s.has(n))continue;const r=l.get(n);if(void 0===r)throw new Error("Inconsistent state");const o=u[e],i=-1!==o?l.get(t[o]):c.length;if(void 0===i)throw new Error("Inconsistent state");const a=r<i?i-1:i;if(r!==a){const[e]=c.splice(r,1);c.splice(a,0,e),f.push({from:r,to:a,value:n}),l.clear();for(let e=0;e<c.length;e++)l.set(c[e],e)}}return f},getText:function(e){return e.innerText().trim()},getTimeoff:function(){return bbn.env.isFocused?0:Math.round((new Date).getTime()/1e3-bbn.env.timeoff)},happy:function(...e){return e.unshift({_bbn_console_level:3,_bbn_console_style:"color: white; background: green; font-size: 18px;"}),nl.apply(this,e),this},hash:Ol,hex2rgb:function(e){"#"!==e.charAt(0)&&(e="#"+e),4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},history:function(){return window.history||!1},html2text:id,imageToCanvas:ad,imgToBase64:function(e,t="image/png"){return ad(e).toDataURL(t)},info:function(...e){return e.unshift({_bbn_console_level:4,_bbn_console_style:"color: #EEE; background: blue; font-size: 12px;"}),nl.apply(this,e),this},init:function(e,t){let n;bbn.env.isInit||(bbn.env.root=document.baseURI.length>0?document.baseURI:bbn.env.host,bbn.env.root.length&&"/"!==rl(bbn.env.root,-1)&&(bbn.env.root+="/"),"object"==typeof e&&cl(!0,bbn,e),bbn.env.path=rl(bbn.env.url,bbn.env.root.length),n=bbn.env.path.split("/"),al(n,(e,t)=>{""!==(e=decodeURI(e.trim()))&&bbn.env.params.push(e)}),bbn.var.colors&&Hl(bbn.var.colors),document.addEventListener("visibilitychange",()=>{document.hidden?bbn.env.isVisible=!1:bbn.env.isVisible=!0}),document.addEventListener("focus",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.isFocused=!0,bbn.env.last_focus=md()}),document.addEventListener("blur",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.isFocused=!1,bbn.env.last_focus=md()}),document.addEventListener("click",pd),document.addEventListener("keydown",pd),document.addEventListener("focusin",pd),document.addEventListener("focusout",pd),window.addEventListener("hashchange",()=>{bbn.env.hashChanged=(new Date).getTime()},!1),window.addEventListener("resize",()=>{ld()}),window.addEventListener("orientationchange",()=>{ld()}),ld(),hd()&&(document.body.classList.add("bbn-mobile"),dd()&&document.body.classList.add("bbn-tablet")),window.history&&(window.onpopstate=function(e){let t=window.history;if(!bbn.env.historyDisabled&&t&&bbn.fn.defaultHistoryFunction(t.state)){let e=t.state;e?cd(e.url,cl({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&tl(e.data.script)&&e.data.script()}}),window.addEventListener("online",()=>{bbn.env.online=!0}),window.addEventListener("offline",()=>{bbn.env.online=!1}),bbn.env.isInit=!0,document.dispatchEvent(new Event("bbninit")),bbn.env.logging&&nl("Logging in bbn is enabled"))},isActiveInterface:function(e=600){return!!bbn.env.last_focus&&(new Date).getTime()-bbn.env.last_focus<1e3*e},isArray:ul,isBlob:$f,isBoolean:function(...e){if(!e.length)return!1;for(let t of e)if(![!0,!1].includes(t))return!1;return!0},isCanvas:zf,isColor:function(...e){if(!e.length)return!1;var t=new RegExp("^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$","i");for(let n of e){if(!Qc(n))return!1;if(!t.test(n))return!1}return!0},isComment:function(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof Comment))return!1;return!0},isCp:Il,isDataURL:function(...e){if(!e.length)return!1;for(let t of e)if(!/^data:([a-z]+\/[a-z0-9\-\+\.]+(;[a-z\-]+\=[a-z0-9\-\.]+)?)?(;base64)?,/i.test(t))return!1;return!0},isDate:gl,isDesktopDevice:function(){return"desktop"===nd()},isDimension:function(...e){if(!e.length)return!1;for(let t of e){if("number"!=typeof t||t<0)return!1;if(!bd(t))return!1}return!0},isDom:Tl,isEmail:function(...e){if(!e.length)return!1;let t=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;for(let n of e){if(!Qc(n))return!1;if(!t.test(n))return!1}return!0},isEmpty:vl,isEvent:function(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof Event))return!1;return!0},isFocused:function(e,t=!1){return e===document.activeElement||t&&e.contains&&e.contains(document.activeElement)},isFunction:tl,isHex:function(e){return Boolean(e.match(/^(0x)?[0-9a-f]+$/i))},isHostname:function(...e){if(!e.length)return!1;for(let t of e){if(!Qc(t))return!1;if(!gd(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=ed(e);if(n.length){if(Qc(t)){let e=!1;return al(n,n=>{if(n.matches&&n.matches(t))return e=!0,!1}),e}if(t instanceof HTMLElement)return n.indexOf(t)>-1}return!1},isInt:el,isInViewport:function(e,t=!1){const n=e.getBoundingClientRect();if(t)return n.top>=0&&n.left>=0&&n.right<=(window.innerWidth||document.documentElement.clientWidth)&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight);const r=e.offsetHeight,o=e.offsetWidth;return n.top>=-r&&n.left>=-o&&n.right<=(window.innerWidth||document.documentElement.clientWidth)+o&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)+r},isIP:gd,isIterable:Xc,isMobile:hd,isMobileDevice:fd,isNotObject:Hf,isNull:Ml,isNumber:Kc,isObject:sl,isPercent:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^\d+(?:\.\d+)?%$/))return!1;return!0},isPrimitive:ef,isPromise:function(...e){if(!e.length)return!1;for(let t of e)if("[object Promise]"!=={}.toString.apply(t))return!1;return!0},isPropSize:function(e){let t=!1;return al(["width","height","gap","margin","padding","top","left","right","bottom"],n=>{if(-1!==e.indexOf(n))return t=!0,!1}),t},isSame:Pl,isSQLDate:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^([1-2]\d{3})-((0\d)|(1[12]))-(([0-2]\d)|(3[01]))(?:( [0-2]\d):([0-5]\d):([0-5]\d))?$/))return!1;return!0},isString:Qc,isSymbol:wd,isTabletDevice:dd,isURL:function(...e){if(!e.length)return!1;for(let t of e)if(!bbn.var.regexp.url.test(t))return!1;return!0},isUid:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^[0-9a-f]{32}$/i))return!1;return!0},isValidDimension:bd,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Qc(t)||!/^[$A-Z_][0-9A-Z_$]*$/i.test(t))return!1;return!0},isVue:function(...e){if(!e.length)return!1;if("vue"in bbn&&window.Vue)if("app"in bbn.vue){for(let t of e)if(!t||"function"!=typeof t.render)return!1}else for(let t of e)if(!(t instanceof window.Vue))return!1;return!("cp"in bbn)||!("isComponent"in bbn.cp)||"function"!=typeof bbn.cp.isComponent||bbn.cp.isComponent(...e)},isWritable:function(e,t){let n;for(;e&&(n=Object.getOwnPropertyDescriptor(e,t),!n);)e=Object.getPrototypeOf(e);return!n||Boolean(n.writable||n.set)},iterate:il,lightenDarkenHex:function(e,t){if(e&&t){let n="#"===e[0];e=n?e.slice(1):e;let r=parseInt(e,16),o=(r>>16)+t,i=(r>>8&255)+t,a=(255&r)+t;return o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0),a>255?a=255:a<0&&(a=0),(n?"#":"")+(a|i<<8|o<<16).toString(16)}},link:cd,log:nl,makeReactive:function e(t,n,r,o){const i=(null==r?void 0:r.$cid)||"",a="__bbn_"+(i?i+"_":"");if(t&&"object"==typeof t&&[void 0,Object,Array].includes(t.constructor)){if(t.__bbnIsProxy&&t.__bbnParent===r)return t;r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["MAKING bbn-loadbar",t]),t.__bbnWatchers||Reflect.defineProperty(t,"__bbnWatchers",{value:Yf(),writable:!0,configurable:!0,enumerable:!1});return new Proxy(t,{get(s,u){const c=Reflect.get(s,u),l=s.__bbnRoot||s;if(wd(u))return Reflect.get(l,u);const f=o?o+"."+u:u,d=a+(Kc(u)?u.toString():u);if(["fill","pop","push","reverse","shift","sort","splice","unshift"].includes(u)&&ul(s))return function(...e){let t=l[u](...e);return yd("DOING ARRAY STUFF"),nl(s.__bbnParent),n(s,"length",r),t};if(tl(c))return c;if("__bbnRoot"===u){let e=t;for(;e&&(null==e?void 0:e.__bbnTarget);)e=e.__bbnTarget;return e}return"__bbnIsProxy"===u||("__bbnTarget"===u?s:"__bbnParent"===u?r:"__bbnWatchers"===u?s.__bbnWatchers:0===u.indexOf("__bbn_")?Reflect.get(s,u):"length"===u&&ul(s.__bbnRoot||s)?l.length:u in s&&c&&"object"==typeof c&&[void 0,Object,Array].includes(c.constructor)?(c.__bbnIsProxy&&c.__bbnParent===r||(d in l||Reflect.defineProperty(l,d,{value:e(c,n,r,f),writable:!0,configurable:!0,enumerable:!1}),l[d].__bbnIsProxy&&!l.__bbnWatchers[i]&&(l.__bbnWatchers[i]=f)),l[d]):c)},set(t,s,u){if(wd(s))return Reflect.get(t,s,u);const c=t.__bbnRoot||t,l=o?o+"."+s:s;if(wd(s))return Reflect.get(t,s);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["Setting proxy prop in "+r.$options.name,t,s,u]),!Pl(c[s],u)){if(0===s.indexOf("__bbn_"))Reflect.defineProperty(c,s,{value:e(u,n,r,l),writable:!0,configurable:!0,enumerable:!1});else if(u&&"object"==typeof u&&[void 0,Object,Array].includes(u.constructor)){const t=a+(Kc(s)?s.toString():s);Reflect.defineProperty(c,t,{value:e(u,n,r,l),writable:!0,configurable:!0,enumerable:!1}),c[t].__bbnIsProxy&&!c.__bbnWatchers[i]&&(c.__bbnWatchers[i]=l)}r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["Setting proxy prop in "+r.$options.name+" "+(Kc(s)?s.toString():s),u,t]),Reflect.set(c,s,u),n(t,s,r)}return!0},defineProperty(t,i,s){const u=t,c=o?o+"."+i:i;if("__bbnWatchers"===i||wd(i)||0===i.indexOf("__bbn_"))Reflect.defineProperty(u,i,s);else{const t=a+(Kc(i)?i.toString():i);Reflect.defineProperty(u,t,{value:e(s.value,n,r,c),writable:!0,configurable:!0,enumerable:!1})}return n(t,i,r),!0},deleteProperty(e,t){const n=e;if(0===t.indexOf("__bbn_"))Reflect.deleteProperty(n,t);else{const r=a+(Kc(t)?t.toString():t);Reflect.deleteProperty(n,r),Reflect.deleteProperty(e,t)}return!0}})}return t},map:function e(t,n,r,o=0){return t.map((t,i)=>(t=n(t,i,o),r&&t[r]&&ul(t[r])&&(t[r]=e(t[r],n,r,o+1)),t))},md5:xl,microtimestamp:function(){return window.performance.now()+performance.timeOrigin},money:function(e,t,n,r,o,i,a){if(o||(o=void 0===o&&bbn.env.money&&void 0!==bbn.env.money.decimal?bbn.env.money.decimal:"."),n||(n=void 0===n&&bbn.env.money&&void 0!==bbn.env.money.currency?bbn.env.money.currency:""),i||(i=void 0===i&&bbn.env.money&&void 0!==bbn.env.money.thousands?bbn.env.money.thousands:" "),a||(a=void 0===a&&bbn.env.money&&void 0!==bbn.env.money.precision?bbn.env.money.precision:0),t||(t=!(void 0!==t||!bbn.env.money||void 0===bbn.env.money.kilo)&&bbn.env.money.kilo),r||(r=!(void 0!==r||!bbn.env.money||void 0===bbn.env.money.novalue)&&bbn.env.money.novalue),Kc(a)||(a=t?3:0),0===e&&"number"==typeof a&&a>0){let r=e.toFixed(a).replace(".",o);return n&&(r+=" "+(t?"K"+n:n)),r}if((isNaN(e)||!e)&&r)return r;if(isNaN(e)||!e)return 0+(n?" "+n:"");if("string"==typeof e&&(e=Number(e)),"number"!=typeof e)throw new Error("The value must be a number");t&&e&&(e/=1e3,n&&(n="K"+n));let s=e.toFixed(a),u=0,c=1e4;return s&&(c=s.indexOf("."),c<=0?c=1e4:u=s.length-c),s.replace(/./g,function(e,t,n){return"."===e?o:t&&(n.length-t-u)%3==0&&t<c?i+e:e})+(n?" "+n:"")},move:function(e,t,n){if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e},multiorder:function(e,t){if(!t)return e;let n;if(Array.isArray(t)||"object"!=typeof t)n=t;else for(var r in n=[],t)n.push({field:r,dir:t[r]});if(!Array.isArray(n))throw new Error("The orders argument must be an array");return e.slice().sort((e,t)=>{let r;for(let o of n)if(r=wl(e,t,o.field,o.dir),0!==r)return r;return 0})},mutateArray:function(e,t,n=null){if(!ul(e,t))throw new TypeError("mutateArray can only be called with arrays");n?jf(n,"function","The hash function must be a function"):n=Ol;const r=new Map(t.map(e=>[n(e),e]));let o=[];t.forEach(e=>{o.push(e)});let i=e.length;for(;i--;)r.has(n(e[i]))||e.splice(i,1);for(let t=0;t<o.length;t++)if(t>=e.length||!Pl(e[t],o[t])){const n=Yl(e,o[t]);if(-1!==n){const[r]=e.splice(n,1);e.splice(t,0,r)}else e.splice(t,0,o[t])}return e.length>o.length&&e.splice(o.length,e.length-o.length),e},mutateObject:function(e,t,n){if(!sl(e,t))throw new TypeError("mutateObject can only be called with arrays");n?jf(n,"function","The hash function must be a function"):n=Ol;const r=Object.keys(t);for(let t in e)r.includes(t)||delete e[t];return r.forEach(n=>{Pl(e[n],t[n])||(e[n]=t[n])}),e},nl2br:function(e,t){return Wl("\n","<br>"+(t?"\n":""),e)},numProperties:yl,objectToFormData:vd,order:function(e,t,n="asc"){return e?e.sort(function(e,r){return wl(e,r,t,n)}):e},outerHeight:function(e){if((e=Md(e))&&"offsetHeight"in e){let t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom);return Math.ceil(e.offsetHeight+n)}},outerWidth:function(e){e=Md(e);let t=window.getComputedStyle(e),n=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return Math.ceil(e.offsetWidth+n)},percent:function(e,t){return t/100*e},pickValue:function(e){if(Array.isArray(e)&&e.length)return e[Math.floor(Math.random()*e.length)]},post:Ed,postOut:function(e,t,n=null,r=""){let o=document.body.querySelector("form#bbn-form_out");o||(o=document.createElement("form"),o.classList.add("bbn-no"),o.setAttribute("id","bbn-form_out"),o.setAttribute("method","post"),o.setAttribute("enctype","multipart/form-data-encoded"),Sd(o,"style.display","none"),document.body.appendChild(o)),o instanceof HTMLFormElement&&(o.innerHTML="",o.setAttribute("action",e),o.setAttribute("target",r||"_blank"),t||(t={}),(t=Yf(t)).bbn||(t.bbn="public"),Bl(o,t),o.submit(),n&&n())},printf:function(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return void 0!==t[n]?t[n]:e})},quotes2html:function(e,t){return t&&0!==t.toLowerCase().indexOf("s")||(e=Wl("'","&#39;",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=Wl('"',"&quot;",e)),e},randomInt:Dd,randomString:function(e,t,n){let r,o,i={n:"0123456789",l:"abcdefghijklmnopqrstuvwxyz",u:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};n||(n="nlu"),e||(r=Dd(8,14)),"string"==typeof t?(n="n",delete i.l,delete i.u,i.n=t,r||(r=e)):"number"==typeof t&&e<t?r=Dd(e,t):e&&(r=e);let a="";for(let e=0;e<r;e++)0===e?"n"!==n&&(o=-1===n.indexOf("u")?"l":"u"):o=n[Math.floor(Math.random()*n.length)],a+=i[o][Math.floor(Math.random()*i[o].length)];return a},range:function(e,t,n){return Array.from({length:(t-e)/n+1},(t,r)=>e+r*n)},removeAccents:bl,removeEmpty:function(e){var t=[];if(ul(e))for(let n=0;n<e.length;n++){let r=!1;e[n]&&(ul(e[n])?e[n].length&&(r=!0):sl(e[n])?yl(e[n])&&(r=!0):r=!0),r&&t.push(e[n])}return t},removeExtraSpaces:function(e){return e.replace(/\s+/g," ").trim()},removeHtmlComments:od,removePrivateProp:ol,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;rl(e,-t.length)===t;)e=rl(e,0,e.length-t.length);for(;rl(e,0,t.length)===t;)e=rl(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:Wl,replaceSelection:function(e,t){let n,r,o;if(n=window.getSelection(),n.getRangeAt&&n.rangeCount){if(r=window.getSelection().getRangeAt(0),r.deleteContents(),r.createContextualFragment)o=r.createContextualFragment(e);else{const t=document.createElement("div");let n;for(t.innerHTML=e,o=document.createDocumentFragment();n=t.firstChild;)o.appendChild(n)}const i=o.firstChild,a=o.lastChild;r.insertNode(o),n.removeAllRanges(),t?(i&&(r.setStartBefore(i),r.setEndAfter(a)),n.addRange(r)):(r.setStartAfter(a),n.addRange(r))}},resize:ld,rgb2hex:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},riterate:function(e,t,n=!1){return il(e,t,n,!0)},roundDecimal:function(e,t){return Number(Math.round(parseFloat(e+"e"+t+"e-"+t)))},sanitize:function(e,t="_"){let n=["[","]","{","}","(",")","-","+","*","/"],r="[";for(let e=0;e<t.length;e++)n.includes(t[e])&&(r+="\\"),r+=t[e];r+="]+";let o=new RegExp(r,"g");return Td(bl(e).replace(/[^a-z0-9]/gi,t).replace(o,t),t)},search:Yl,selectElementText:function(e,t=null){if(t=t||window,e instanceof HTMLInputElement)return void e.select();let n,r,o=t.document;t.getSelection&&o.createRange?(n=t.getSelection(),r=o.createRange(),r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r)):"createTextRange"in o.body&&"function"==typeof o.body.createTextRange&&(r=o.body.createTextRange(),r.moveToElementText(e),r.select())},selector:Md,setCookie:function(e,t,n){let r="";if(n){let e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),r="; expires="+e.toUTCString()}let o=escape(JSON.stringify({value:t}));document.cookie=e+"="+o+r+"; path=/"},setCssVar:function(e,t){0!==e.indexOf("--")&&(e="--"+e),document.documentElement.style.setProperty(e,t)},setNavigationVars:ud,setProp:function(e,t,n,r=!0,o=!0){Object.defineProperty(e,t,{value:n,writable:r,configurable:o})},setProperty:Sd,shorten:kd,shortenObj:function e(t,n=100){let r=Pf(t);return al(r,(t,o)=>{Qc(t)&&t.length>n?r[o]=kd(t,n):t&&"object"==typeof t&&(r[o]=e(t))}),r},shuffle:function(e){let t,n=e.length;for(;0!=n;)t=Math.floor(Math.random()*n),n--,[e[n],e[t]]=[e[t],e[n]];return e},simpleHash:Dl,simpleHash1:El,simpleHash2:Sl,startChrono:function(e){let t=bbn.fn.microtimestamp();return this.constructor.chronos||Object.defineProperty(this.constructor,"chronos",{value:Object.create(null),writable:!1,configurable:!1}),this.constructor.chronos[e||"default"]=t,e},stopChrono:function(e,t){if(this.constructor.chronos[e||"default"]){let n=bbn.fn.microtimestamp()-this.constructor.chronos[e||"default"];return delete this.constructor.chronos[e||"default"],t&&(n=Math.round(n)/1e3),n}throw Error("No chrono with name "+(e||"default"))},stream:function(e,t,n,r,o,i){const a=zl(e,n,"json"),s=Ll(a);if(null==s?void 0:s.loader)return s.loader;n||(n={}),bbn.env.token&&(n._bbn_token=bbn.env.token);const u=new AbortController;let c="";const l=e=>{if(e.length){e=e.indexOf("\n")>-1?bbn.fn.removeEmpty(e.split("\n")):[e];for(let n in e)try{t(JSON.parse(e[n]))}catch(e){throw e}}},f=bbn.fn.startChrono(),d=fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:u.signal,body:JSON.stringify(n||{})}).then(e=>{if(bbn.fn.log("RESPONSE IN "+bbn.fn.stopChrono(f,!0)+" SECS"),e.body){const r=e.body.getReader(),o=tl(t);r.read().then(function e({done:s,value:u}){if(s)return Fl(a,n),c&&l(c),void(i&&i());if(o)if(c+=Jl(u).trim(),bbn.fn.log(["STREAM RESULT",c.length,c]),c)try{l(c),c=""}catch(e){}else t();else bbn.fn.log(["STREAM SUCCESS IS FN? "+o]);return r.read().then(e)})}}).catch(t=>{let i=!(!(s=t)||!0!==s.__BBN_CANCEL__);var s;if(Fl(a,n,i),i){let n=1;tl(o)&&(n=o(t.message,e)),n&&Ff(t.message,e)}else{let e=1;tl(r)&&(e=r(t.request,t)),e&&Lf(t.request,t.response?t.response.data:"",t.response?t.response.status:t)}});return ml(a,d,u),d},string2ArrayBuffer:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},submit:function(e,t,n){let r,o=e.getAttribute("action")||bbn.env.path;if(""===o&&(o="."),"string"==typeof o&&(0!==o.indexOf("http")||-1!==o.indexOf(window.document.location.hostname))&&!e.getAttribute("target")&&(t&&t.preventDefault(),r=Xf(e),r)){e.setAttribute("action",null);const t=[o,r];!n&&e.getAttribute("data-script")&&(n=(n=new Function(e.getAttribute("data-script")))()),n&&t.push(n),Ed(...t)}},substr:rl,sum:function(e,t,n,r,o){let i=0;return al(Cf(e,n,r,o),e=>{let n="function"==typeof t?t(e):e[t];n&&(i+=parseFloat(n)||0)}),i},timestamp:md,toCSV:function(e,t=",",n="",r='"'){t||(t=","),r||(r='"');let o="",i=e.length;return al(e,(e,a)=>{let s=ul(e)?e.length:Object.values(e).length,u=0;al(e,e=>{o+="string"==typeof e?r+Wl(r,"\\"+r,e)+r:0===e?"0":e&&e.toString?e.toString():r+r,u++,u<s&&(o+=t)}),a<i-1&&(o+=n+"\n")}),o},toggleFullScreen:function(){"mozRequestFullScreen"in window.document.documentElement?window.document.mozFullScreen?window.document.mozCancelFullScreen():"function"==typeof window.document.documentElement.mozRequestFullScreen&&window.document.documentElement.mozRequestFullScreen():"webkitRequestFullScreen"in window.document.documentElement?window.document.webkitIsFullScreen?window.document.webkitCancelFullScreen():"function"==typeof window.document.documentElement.webkitRequestFullScreen&&window.document.documentElement.webkitRequestFullScreen():"msRequestFullScreen"in window.document.documentElement?window.document.msFullscreenEnabled?window.document.msExitFullscreen():"function"==typeof window.document.documentElement.msRequestFullScreen&&window.document.documentElement.msRequestFullScreen():"requestFullscreen"in window.document&&(window.document.fullscreenEnabled?window.document.exitFullscreen():window.document.documentElement.requestFullscreen()),setTimeout(function(){ld()},0)},translate:function(e,t){let n=t?bbn.lng[0===t.indexOf("_")?t:"_"+t]:bbn.lng;il(e,(e,t)=>{n[t]=e})},treatAjaxArguments:sd,treatForHash:_l,trim:Td,uniqString:function(...e){for(var t="",n=0;n<e.length;n++)if(e[n])if("object"==typeof e[n])if(ul(e[n]))t+=JSON.stringify(e[n]);else{let r={};al(Object.keys(e[n]).sort(),t=>{r[t]=e[n][t]}),t+=JSON.stringify(r)}else"string"!=typeof e[n]?t+=e[n].toString():t+=e[n];else t+="__bbn_empty__";return xl(t)},unique:Qf,upload:function(e,t,n=null,r=null,o=null){const i=()=>Gc.run("post",e||bbn.env.path,{data:vd(t),headers:{},onUploadProgress(e){if(o){let t=Math.round(100*e.loaded/e.total);o(t,e.loaded,e.total)}}});return n||r?i().then(e=>{n&&(nl("SUCCESS",e),n(e))}).catch(e=>{r&&(nl("ERROR",e),r(e))}):i()},warning:yd,yieldToBrowser:Jf};const _d={version:"1.0.1",opt:{_cat:{}},app:{},_:Uc,$:function(e,t){if(null==t?void 0:t.querySelectorAll)return t.querySelectorAll(e);if(t)throw new Error("Invalid context");return document.body.querySelectorAll(e)},lng:{select_unselect_all:"Select/Clear all",select_all:"Select all",search:"Search",loading:"Loading...",choose:"Choose",error:"Error",server_response:"Server response",reload:"Reload",errorText:"Something went wrong",closeAll:"Close all",closeOthers:"Close others",pin:"Pin",arrange:"Arrange",cancel:"Cancel",unpin:"Unpin",yes:"Yes",no:"No",unknown:"Unknown",untitled:"Untitled",confirmation:"Confirmation",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},var:$c,dt:kf,com:Gc,env:Wc,db:hl,fn:Id,info:[{value:"ajax",label:"Loading and streaming",description:"Functions related to Ajax requests",icon:"nf nf-fa-rocket"},{value:"browser",label:"Browser-only",description:"Functions that can only be run in the browser",icon:"nf nf-fa-desktop"},{value:"convert",label:"Conversion",description:"Functions related to data conversion",icon:"nf nf-fa-exchange"},{value:"datetime",label:"Date and time",description:"Functions related to dates and times",icon:"nf nf-fa-calendar"},{value:"form",label:"Form manipulation",description:"Functions related to form manipulation and validation",icon:"nf nf-fa-edit"},{value:"html",label:"HTML manipulation",description:"Functions related to HTML manipulation and DOM interaction",icon:"nf nf-fa-html5"},{value:"loop",label:"Looping",description:"Functions related to looping through arrays and objects",icon:"nf nf-fa-repeat"},{value:"misc",label:"Miscellaneous",description:"Miscellaneous functions that do not fit into other categories",icon:"nf nf-fa-cubes"},{value:"object",label:"Object manipulation",description:"Functions related to object manipulation and inspection",icon:"nf nf-fa-object_group"},{value:"phone",label:"Phone and contact",description:"Functions related to phone numbers and contact information",icon:"nf nf-fa-phone"},{value:"string",label:"String manipulation",description:"Functions related to string manipulation and formatting",icon:"nf nf-fa-text_height"},{value:"style",label:"Styling and layout",description:"Functions related to styling and layout management",icon:"nf nf-fa-paint_brush"},{value:"type",label:"Type checking",description:"Functions related to type checking and validation",icon:"nf nf-fa-check_square"}]};"undefined"!=typeof window&&(window.bbn=_d,window.Temporal||(window.Temporal=Zc)),e.Temporal=Zc,e.bbn=_d,e.default=_d,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bbn={})}(this,function(e){"use strict";function t(e,t,r,o,i){return n(t,((e,t)=>{const n=e[t];if(void 0===n)throw new TypeError(So(t));return n})(e,t),r,o,i)}function n(e,t,n,r,o,i){const a=E(t,n,r);if(o&&t!==a)throw new RangeError(Mo(e,t,n,r,i));return a}function r(e){return null!==e&&/object|function/.test(typeof e)}function o(e,t=Map){const n=new t;return(t,...r)=>{if(n.has(t))return n.get(t);const o=e(t,...r);return n.set(t,o),o}}function i(e){return a({name:e},1)}function a(e,t){return l(e=>({value:e,configurable:1,writable:!t}),e)}function s(e){return l(e=>({get:e,configurable:1}),e)}function u(e){return{[Symbol.toStringTag]:{value:e,configurable:1}}}function c(e,t){const n={};let r=e.length;for(const o of t)n[e[--r]]=o;return n}function l(e,t,n){const r={};for(const o in t)r[o]=e(t[o],o,n);return r}function f(e,t,n){const r={};for(let o=0;o<t.length;o++){const i=t[o];r[i]=e(i,o,n)}return r}function d(e,t,n){const r={};for(let o=0;o<e.length;o++)r[t[o]]=n[e[o]];return r}function h(e,t){const n=Object.create(null);for(const r of e)n[r]=t[r];return n}function m(e,t){for(const n of t)if(n in e)return 1;return 0}function p(e,t,n){for(const r of e)if(t[r]!==n[r])return 0;return 1}function b(e,t,n){const r={...n};for(let n=0;n<t;n++)r[e[n]]=0;return r}function g(e,...t){return(...n)=>e(...t,...n)}function w(e){return e[0].toUpperCase()+e.substring(1)}function y(e){return e.slice().sort()}function v(e,t){return String(t).padStart(e,"0")}function M(e,t){return Math.sign(e-t)}function E(e,t,n){return Math.min(Math.max(e,t),n)}function S(e,t){return[Math.floor(e/t),D(e,t)]}function D(e,t){return(e%t+t)%t}function T(e,t){return[k(e,t),I(e,t)]}function k(e,t){return Math.trunc(e/t)||0}function I(e,t){return e%t||0}function _(e){return.5===Math.abs(e%1)}function O(e,t,n){let r=0,o=0;for(let i=0;i<=t;i++){const t=e[n[i]],a=wi[i],s=gi/a,[u,c]=T(t,s);r+=c*a,o+=u}const[i,a]=T(r,gi);return[o+i,a]}function x(e,t,n){const r={};for(let o=t;o>=0;o--){const t=wi[o];r[n[o]]=k(e,t),e=I(e,t)}return r}function j(e){if(void 0!==e)return N(e)}function P(e){return F(N(e))}function N(e){return A(Wi(e))}function C(e,t){if(null==t)throw new RangeError(So(e));return t}function R(e){if(!r(e))throw new TypeError(vo);return e}function Y(e,t,n=e){if(typeof t!==e)throw new TypeError(Eo(n,t));return t}function A(e,t="number"){if(!Number.isInteger(e))throw new RangeError(mo(t,e));return e||0}function F(e,t="number"){if(e<=0)throw new RangeError(po(t,e));return e}function L(e){if("symbol"==typeof e)throw new TypeError(yo);return String(e)}function Z(e,t){return r(e)?String(e):Ui(e,t)}function H(e){if("string"==typeof e)return BigInt(e);if("bigint"!=typeof e)throw new TypeError(wo(e));return e}function B(e,t="number"){if("bigint"==typeof e)throw new TypeError(go(t));if(e=Number(e),!Number.isFinite(e))throw new RangeError(bo(t,e));return e}function U(e,t){return Math.trunc(B(e,t))||0}function $(e,t){return A(B(e,t),t)}function W(e,t){return F(U(e,t),t)}function z(e,t){let[n,r]=T(t,gi),o=e+n;const i=Math.sign(o);return i&&i===-Math.sign(r)&&(o-=i,r+=i*gi),[o,r]}function q(e,t,n=1){return z(e[0]+t[0]*n,e[1]+t[1]*n)}function V(e,t){return z(e[0],e[1]+t)}function J(e,t){return q(t,e,-1)}function G(e,t){return M(e[0],t[0])||M(e[1],t[1])}function K(e,t,n){return-1===G(e,t)||1===G(e,n)}function X(e,t=1){const n=BigInt(gi/t);return[Number(e/n),Number(e%n)*t]}function Q(e,t=1){const n=gi/t,[r,o]=T(e,n);return[r,o*t]}function ee(e,t=1,n){const[r,o]=e,[i,a]=T(o,t);return r*(gi/t)+(i+(n?a/t:0))}function te(e,t,n=S){const[r,o]=e,[i,a]=n(o,t);return[r*(gi/t)+i,a]}function ne(e){return t(e,"isoYear",ma,ha,1),e.isoYear===ma?t(e,"isoMonth",4,12,1):e.isoYear===ha&&t(e,"isoMonth",1,9,1),e}function re(e){return oe({...e,...sa,isoHour:12}),e}function oe(e){const n=t(e,"isoYear",ma,ha,1),r=n===ma?1:n===ha?-1:0;return r&&ie(le({...e,isoDay:e.isoDay+r,isoNanosecond:e.isoNanosecond-r})),e}function ie(e){if(!e||K(e,da,fa))throw new RangeError(Vo);return e}function ae(e){return O(e,5,ta)[1]}function se(e){const[t,n]=S(e,gi);return[x(n,5,ta),t]}function ue(e){return te(e,mi)}function ce(e){return he(e.isoYear,e.isoMonth,e.isoDay,e.isoHour,e.isoMinute,e.isoSecond,e.isoMillisecond)}function le(e){const t=ce(e);if(void 0!==t){const[n,r]=T(t,li);return[n,r*hi+(e.isoMicrosecond||0)*di+(e.isoNanosecond||0)]}}function fe(e,t){const[n,r]=se(ae(e)-t);return ie(le({...e,isoDay:e.isoDay+r,...n}))}function de(...e){return he(...e)/fi}function he(...e){const[t,n]=me(...e),r=t.valueOf();if(!isNaN(r))return r-n*li}function me(e,t=1,n=1,r=0,o=0,i=0,a=0){const s=e===ma?1:e===ha?-1:0,u=new Date;return u.setUTCHours(r,o,i,a),u.setUTCFullYear(e,t-1,n+s),[u,s]}function pe(e,t){let[n,r]=V(e,t);r<0&&(r+=gi,n-=1);const[o,i]=S(r,hi),[a,s]=S(i,di);return be(n*li+o,a,s)}function be(e,t=0,n=0){const r=Math.ceil(Math.max(0,Math.abs(e)-la)/li)*Math.sign(e),o=new Date(e-r*li);return c(ra,[o.getUTCFullYear(),o.getUTCMonth()+1,o.getUTCDate()+r,o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds(),t,n])}function ge(e,t){if(t<-la)throw new RangeError(Vo);const n=e.formatToParts(t),r={};for(const e of n)r[e.type]=e.value;return r}function we(e){return[e.isoYear,e.isoMonth,e.isoDay]}function ye(e,t){return[t,0]}function ve(){return ya}function Me(e,t){switch(t){case 2:return Se(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Ee(e){return Se(e)?366:365}function Se(e){return e%4==0&&(e%100!=0||e%400==0)}function De(e){const[t,n]=me(e.isoYear,e.isoMonth,e.isoDay);return D(t.getUTCDay()-n,7)||7}function Te(e){return this.id===Fi?(({isoYear:e})=>e<1?["gregory-inverse",1-e]:["gregory",e])(e):this.id===Li?Ma(e):[]}function ke(e){const t=ce(e);if(t<va){const{isoYear:t}=e;return t<1?["japanese-inverse",1-t]:["japanese",t]}const n=ge(Ps(Li),t),{era:r,eraYear:o}=jr(n,Li);return[r,o]}function Ie(e){return _e(e),je(e,1),e}function _e(e){return xe(e,1),e}function Oe(e){return p(na,e,xe(e))}function xe(e,n){const{isoYear:r}=e,o=t(e,"isoMonth",1,ve(),n);return{isoYear:r,isoMonth:o,isoDay:t(e,"isoDay",1,Me(r,o),n)}}function je(e,n){return c(ta,[t(e,"isoHour",0,23,n),t(e,"isoMinute",0,59,n),t(e,"isoSecond",0,59,n),t(e,"isoMillisecond",0,999,n),t(e,"isoMicrosecond",0,999,n),t(e,"isoNanosecond",0,999,n)])}function Pe(e){return void 0===e?0:Za(R(e))}function Ne(e,t=0){e=Ue(e);const n=Ha(e),r=Ba(e,t);return[Za(e),r,n]}function Ce(e,t,n,r=9,o=0,i=4){t=Ue(t);let a=Fa(t,r,o),s=Ze(t),u=za(t,i);const c=Aa(t,r,o,1);return null==a?a=Math.max(n,c):Ve(a,c),s=He(s,c,1),e&&(u=(e=>e<4?(e+2)%4:e)(u)),[a,c,s,u]}function Re(e,t=6,n){let r=Ze(e=$e(e,Ea));const o=za(e,7);let i=Aa(e,t);return i=C(Ea,i),r=He(r,i,void 0,n),[i,r,o]}function Ye(e){return Ua(Ue(e))}function Ae(e,t){return Fe(Ue(e),t)}function Fe(e,t=4){const n=Be(e);return[za(e,4),...Le(Aa(e,t),n)]}function Le(e,t){return null!=e?[wi[e],e<4?9-3*e:-1]:[void 0===t?1:10**(9-t),t]}function Ze(e){const t=e[Da];return void 0===t?1:U(t,Da)}function He(e,t,r,o){const i=o?gi:wi[t+1];if(i){const r=wi[t];if(i%((e=n(Da,e,1,i/r-(o?0:1),1))*r))throw new RangeError(Eo(Da,e))}else e=n(Da,e,1,r?10**9:1,1);return e}function Be(e){let t=e[Ta];if(void 0!==t){if("number"!=typeof t){if("auto"===L(t))return;throw new RangeError(Eo(Ta,t))}t=n(Ta,Math.floor(t),0,9,1)}return t}function Ue(e){return void 0===e?{}:R(e)}function $e(e,t){return"string"==typeof e?{[t]:e}:R(e)}function We(e){return{overflow:Oa[e]}}function ze(e,t,r=9,o=0,i){let a=t[e];if(void 0===a)return i?o:void 0;if(a=L(a),"auto"===a)return i?o:null;let s=ui[a];if(void 0===s&&(s=Ki[a]),void 0===s)throw new RangeError(Io(e,a,ui));return n(e,s,o,r,1,ci),s}function qe(e,t,n,r=0){const o=n[e];if(void 0===o)return r;const i=L(o),a=t[i];if(void 0===a)throw new RangeError(Io(e,i,t));return a}function Ve(e,t){if(t>e)throw new RangeError(ei)}function Je(e){return{branding:Qa,epochNanoseconds:e}}function Ge(e,t,n){return{branding:Xa,calendar:n,timeZone:t,epochNanoseconds:e}}function Ke(e,t=e.calendar){return{branding:Ga,calendar:t,...h(aa,e)}}function Xe(e,t=e.calendar){return{branding:Ja,calendar:t,...h(oa,e)}}function Qe(e,t=e.calendar){return{branding:qa,calendar:t,...h(oa,e)}}function et(e,t=e.calendar){return{branding:Va,calendar:t,...h(oa,e)}}function tt(e){return{branding:Ka,...h(ia,e)}}function nt(e){return{branding:es,sign:gn(e),...h(qi,e)}}function rt(e){return te(e.epochNanoseconds,hi)[0]}function ot(e){return e.epochNanoseconds}function it(e,t){return ee(vn(e),wi[t],1)}function at(e,t,n,r,o,i,a){const s=zi[n],u={...t,[s]:t[s]+r},c=a(e,o,t),l=a(e,o,u);return[i(c),i(l)]}function st(e,t,n){const r=ee(J(t,n));if(!r)throw new RangeError(Fo);return ee(J(t,e))/r}function ut(e,t,n,r){return ct(e,dt(t,n),r)}function ct(e,t,n){const[r,o]=lt(e,t,n);return oe({...sn(e,o),...r})}function lt(e,t,n){return se(yt(ae(e),t,n))}function ft(e){return yt(e,pi,7)}function dt(e,t){return wi[e]*t}function ht(e){const t=mt(e);return[t,sn(t,1)]}function mt(e){return ua(6,e)}function pt(e,t,n){const r=Math.min(Dn(e),6);return Mn(wt(vn(e,r),t,n),r)}function bt(e,t,n,r,o,i,a,s,u,c){if(0===r&&1===o)return e;const l=hn(r,s)?dn(s)&&r<6&&n>=6?Et:Mt:St;let[f,d,h]=l(e,t,n,r,o,i,a,s,u,c);return h&&7!==r&&(f=((e,t,n,r,o,i,a,s)=>{const u=gn(e);for(let c=r+1;c<=n;c++){if(7===c&&7!==n)continue;const r=ea(c,e);r[zi[c]]+=u;const l=ee(J(a(s(o,i,r)),t));if(l&&Math.sign(l)!==u)break;e=r}return e})(f,d,n,Math.max(6,r),a,s,u,c)),f}function gt(e,t,n,r,o){if(6===t){const t=(e=>e[0]+e[1]/gi)(e);return[yt(t,n,r),0]}return wt(e,dt(t,n),r,o)}function wt(e,t,n,r){let[o,i]=e;r&&i<0&&(i+=gi,o-=1);const[a,s]=S(yt(i,t,n),gi);return z(o+a,s)}function yt(e,t,n){return vt(e/t,n)*t}function vt(e,t){return ts[t](e)}function Mt(e,t,n,r,o,i){const a=gn(e),s=vn(e),u=gt(s,r,o,i),c=J(s,u),l=Math.sign(u[0]-s[0])===a,f=Mn(u,Math.min(n,6));return[{...e,...f},q(t,c),l]}function Et(e,t,n,r,o,i,a,s,u,c){const l=gn(e)||1,f=ee(vn(e,5)),d=dt(r,o);let h=yt(f,d,i);const[m,p]=at(a,{...e,...Qi},6,l,s,u,c),b=h-ee(J(m,p));let g=0;b&&Math.sign(b)!==l?t=V(m,h):(g+=l,h=yt(b,d,i),t=V(p,h));const w=En(h);return[{...e,...w,days:e.days+g},t,Boolean(g)]}function St(e,t,n,r,o,i,a,s,u,c){const l=gn(e),f=zi[r],d=ea(r,e);7===r&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});const h=k(e[f],o)*o;d[f]=h;const[m,p]=at(a,d,r,o*l,s,u,c),b=h+st(t,m,p)*l*o,g=yt(b,o,i),w=Math.sign(g-b)===l;return d[f]=g,[d,w?p:m,w]}function Dt(e,t,n,r){const[o,i,a,s]=(e=>{const t=Fe(e=Ue(e));return[e.timeZone,...t]})(r),u=void 0!==o;return((e,t,n,r,o,i)=>{n=wt(n,o,r,1);const a=t.R(n);return Ct(pe(n,a),i)+(e?Lt(ft(a)):"Z")})(u,t(u?e(o):ns),n.epochNanoseconds,i,a,s)}function Tt(e,t,n){const[r,o,i,a,s,u]=(e=>{e=Ue(e);const t=Ua(e),n=Be(e),r=Wa(e),o=za(e,4),i=Aa(e,4);return[t,$a(e),r,o,...Le(i,n)]})(n);return((e,t,n,r,o,i,a,s,u,c)=>{r=wt(r,u,s,1);const l=e(n).R(r);return Ct(pe(r,l),c)+Lt(ft(l),a)+((e,t)=>1!==t?"["+(2===t?"!":"")+e+"]":"")(n,i)+Zt(t,o)})(e,t.calendar,t.timeZone,t.epochNanoseconds,r,o,i,a,s,u)}function kt(e,t){const[n,r,o,i]=(e=>(e=Ue(e),[Ua(e),...Fe(e)]))(t);return a=e.calendar,s=n,u=i,Ct(ct(e,o,r),u)+Zt(a,s);var a,s,u}function It(e,t){return n=e.calendar,r=e,o=Ye(t),Rt(r)+Zt(n,o);var n,r,o}function _t(e,t){return Pt(e.calendar,Yt,e,Ye(t))}function Ot(e,t){return Pt(e.calendar,At,e,Ye(t))}function xt(e,t){const[n,r,o]=Ae(t);return i=o,Ft(lt(e,r,n)[0],i);var i}function jt(e,t){const[n,r,o]=Ae(t,3);return r>1&&wn(e={...e,...pt(e,r,n)}),((e,t)=>{const{sign:n}=e,r=-1===n?bn(e):e,{hours:o,minutes:i}=r,[a,s]=te(vn(r,3),mi,T);yn(a);const u=Bt(s,t),c=t>=0||!n||u;return(n<0?"-":"")+"P"+Nt({Y:$t(r.years),M:$t(r.months),W:$t(r.weeks),D:$t(r.days)})+(o||i||a||c?"T"+Nt({H:$t(o),M:$t(i),S:$t(a,c)+u}):"")})(e,o)}function Pt(e,t,n,r){const o=r>1||0===r&&e!==Ai;return 1===r?e===Ai?t(n):Rt(n):o?Rt(n)+Ht(e,2===r):t(n)}function Nt(e){const t=[];for(const n in e){const r=e[n];r&&t.push(r,n)}return t.join("")}function Ct(e,t){return Rt(e)+"T"+Ft(e,t)}function Rt(e){return Yt(e)+"-"+si(e.isoDay)}function Yt(e){const{isoYear:t}=e;return(t<0||t>9999?Ut(t)+v(6,Math.abs(t)):v(4,t))+"-"+si(e.isoMonth)}function At(e){return si(e.isoMonth)+"-"+si(e.isoDay)}function Ft(e,t){const n=[si(e.isoHour),si(e.isoMinute)];return-1!==t&&n.push(si(e.isoSecond)+((e,t,n,r)=>Bt(e*hi+t*di+n,r))(e.isoMillisecond,e.isoMicrosecond,e.isoNanosecond,t)),n.join(":")}function Lt(e,t=0){if(1===t)return"";const[n,r]=S(Math.abs(e),bi),[o,i]=S(r,pi),[a,s]=S(i,mi);return Ut(e)+si(n)+":"+si(o)+(a||s?":"+si(a)+Bt(s):"")}function Zt(e,t){return 1!==t&&(t>1||0===t&&e!==Ai)?Ht(e,2===t):""}function Ht(e,t){return"["+(t?"!":"")+"u-ca="+e+"]"}function Bt(e,t){let n=v(9,e);return n=void 0===t?n.replace(as,""):n.slice(0,t),n?"."+n:""}function Ut(e){return e<0?"-":"+"}function $t(e,t){return e||t?e.toLocaleString("fullwide",{useGrouping:0}):""}function Wt(e,t){const{epochNanoseconds:n}=e,r=(t.R?t:t(e.timeZone)).R(n),o=pe(n,r);return{calendar:e.calendar,...o,offsetNanoseconds:r}}function zt(e,t,n,r=0,o=0,i,a){if(void 0!==n&&1===r&&(1===r||a))return fe(t,n);const s=e.I(t);if(void 0!==n&&3!==r){const e=((e,t,n,r)=>{const o=le(t);r&&(n=ft(n));for(const t of e){let e=ee(J(t,o));if(r&&(e=ft(e)),e===n)return t}})(s,t,n,i);if(void 0!==e)return e;if(0===r)throw new RangeError(zo)}return a?le(t):qt(e,t,o,s)}function qt(e,t,n=0,r=e.I(t)){if(1===r.length)return r[0];if(1===n)throw new RangeError(qo);if(r.length)return r[3===n?1:0];const o=le(t),i=((e,t)=>{const n=e.R(V(t,-gi));return(e=>{if(e>gi)throw new RangeError(Wo);return e})(e.R(V(t,gi))-n)})(e,o),a=i*(2===n?-1:1);return(r=e.I(pe(o,a)))[2===n?0:r.length-1]}function Vt(e,t){const n=e.I(t);if(n.length)return n[0];const r=V(le(t),-gi);return e.O(r,1)}function Jt(e,t,n){return Je(ie(q(t.epochNanoseconds,(e=>{if(Sn(e))throw new RangeError(Xo);return vn(e,5)})(e?bn(n):n))))}function Gt(e,t,n,r,o,i=Object.create(null)){const a=t(r.timeZone),s=e(r.calendar);return{...r,...tn(a,s,r,n?bn(o):o,i)}}function Kt(e,t,n,r,o=Object.create(null)){const{calendar:i}=n;return Ke(nn(e(i),n,t?bn(r):r,o),i)}function Xt(e,t,n,r,o){const{calendar:i}=n;return Xe(rn(e(i),n,t?bn(r):r,o),i)}function Qt(e,t,n,r,o){const i=n.calendar,a=e(i);let s=re(on(a,n));t&&(r=pn(r)),r.sign<0&&(s=a.P(s,{...Xi,months:1}),s=sn(s,-1));const u=a.P(s,r,o);return Qe(on(a,u),i)}function en(e,t,n){return tt(an(t,e?bn(n):n)[0])}function tn(e,t,n,r,o){const i=vn(r,5);let a=n.epochNanoseconds;if(Sn(r)){const s=ss(n,e);a=q(qt(e,{...rn(t,s,{...r,...Qi},o),...h(ta,s)}),i)}else a=q(a,i),Pe(o);return{epochNanoseconds:ie(a)}}function nn(e,t,n,r){const[o,i]=an(t,n);return oe({...rn(e,t,{...n,...Qi,days:n.days+i},r),...o})}function rn(e,t,n,r){if(n.years||n.months||n.weeks)return e.P(t,n,r);Pe(r);const o=n.days+vn(n,5)[0];return o?re(sn(t,o)):t}function on(e,t,n=1){return sn(t,n-e.day(t))}function an(e,t){const[n,r]=vn(t,5),[o,i]=se(ae(e)+r);return[o,n+i]}function sn(e,t){return t?{...e,...be(ce(e)+t*li)}:e}function un(e,t,n){const r=e(n.calendar);return dn(n)?[n,r,t(n.timeZone)]:[{...n,...sa},r]}function cn(e){return e?ot:le}function ln(e){return e?g(tn,e):nn}function fn(e){return e?g(sr,e):ur}function dn(e){return e&&e.epochNanoseconds}function hn(e,t){return e<=6-(dn(t)?1:0)}function mn(e,t,n,r,o,i,a){const s=e(Ue(a).relativeTo),u=Math.max(Dn(o),Dn(i));if(hn(u,s))return nt(wn(((e,t,n,r)=>{const o=q(vn(e),vn(t),r?-1:1);if(!Number.isFinite(o[0]))throw new RangeError(Vo);return{...Xi,...Mn(o,n)}})(o,i,u,r)));if(!s)throw new RangeError(Ko);r&&(i=bn(i));const[c,l,f]=un(t,n,s),d=ln(f),h=fn(f),m=d(l,c,o);return nt(h(l,c,d(l,m,i),u))}function pn(e){return nt(bn(e))}function bn(e){const t={};for(const n of zi)t[n]=-1*e[n]||0;return t}function gn(e,t=zi){let n=0;for(const r of t){const t=Math.sign(e[r]);if(t){if(n&&n!==t)throw new RangeError(Go);n=t}}return n}function wn(e){for(const t of Gi)n(t,e[t],-us,us,1);return yn(ee(vn(e),mi)),e}function yn(e){if(!Number.isSafeInteger(e))throw new RangeError(Jo)}function vn(e,t=6){return O(e,t,zi)}function Mn(e,t=6){const[n,r]=e,o=x(r,t,zi);if(o[zi[t]]+=n*(gi/wi[t]),!Number.isFinite(o[zi[t]]))throw new RangeError(Vo);return o}function En(e,t=5){return x(e,t,zi)}function Sn(e){return Boolean(gn(e,Ji))}function Dn(e){let t=9;for(;t>0&&!e[zi[t]];t--);return t}function Tn(e,t){return[e,t]}function kn(e){const t=Math.floor(e/rs)*rs;return[t,t+rs]}function In(e){const t=An(e);if(void 0===t)throw new RangeError(ti(e));return t}function _n(e,t,n){let r=Cn(Ui(e));if(!r||r.j)throw new RangeError(ti(e));return t?r.calendar===Ai&&(r=-271821===r.isoYear&&4===r.isoMonth?{...r,isoDay:20,...sa}:{...r,isoDay:1,...sa}):n&&r.calendar===Ai&&(r={...r,isoYear:wa}),Xe(r.C?jn(r):Pn(r))}function On(e){if(e.calendar!==Ai)throw new RangeError(ni(e.calendar))}function xn(e,t,n=0,r=0){const o=Wn(e.timeZone),i=cs(o);let a;return Ie(e),a=e.C?zt(i,e,t,n,r,!i.$,e.j):Vt(i,e),Ge(a,o,Ur(e.calendar))}function jn(e){return Nn(oe(Ie(e)))}function Pn(e){return Nn(re(_e(e)))}function Nn(e){return{...e,calendar:Ur(e.calendar)}}function Cn(e){const t=Es.exec(e);return t?(e=>{const t=e[10],n="Z"===(t||"").toUpperCase();return{isoYear:Fn(e),isoMonth:parseInt(e[4]),isoDay:parseInt(e[5]),...Ln(e.slice(5)),...Zn(e[16]),C:Boolean(e[6]),j:n,offset:n?void 0:t}})(t):void 0}function Rn(e){const t=vs.exec(e);return t?(e=>({isoYear:Fn(e),isoMonth:parseInt(e[4]),isoDay:1,...Zn(e[5])}))(t):void 0}function Yn(e){const t=Ms.exec(e);return t?(e=>({isoYear:wa,isoMonth:parseInt(e[1]),isoDay:parseInt(e[2]),...Zn(e[3])}))(t):void 0}function An(e,t){const n=Ds.exec(e);return n?((e,t)=>{const n=e[4]||e[5];if(t&&n)throw new RangeError(ni(n));return(e=>{if(Math.abs(e)>=gi)throw new RangeError($o);return e})(($n(e[2])*bi+$n(e[3])*pi+$n(e[4])*mi+Hn(e[5]||""))*Un(e[1]))})(n,t):void 0}function Fn(e){const t=Un(e[1]),n=parseInt(e[2]||e[3]);if(t<0&&!n)throw new RangeError(ni(-0));return t*n}function Ln(e){const t=$n(e[3]);return{...se(Hn(e[4]||""))[0],isoHour:$n(e[1]),isoMinute:$n(e[2]),isoSecond:60===t?59:t}}function Zn(e){let t,n;const r=[];if(e.replace(Ts,(e,o,i)=>{const a=Boolean(o),[s,u]=i.split("=").reverse();if(u){if("u-ca"===u)r.push(s),t||(t=a);else if(a||/[A-Z]/.test(u))throw new RangeError(ni(e))}else{if(n)throw new RangeError(ni(e));n=s}return""}),r.length>1&&t)throw new RangeError(ni(e));return{timeZone:n,calendar:r[0]||Ai}}function Hn(e){return parseInt(e.padEnd(9,"0"))}function Bn(e){return new RegExp(`^${e}$`,"i")}function Un(e){return e&&"+"!==e?-1:1}function $n(e){return void 0===e?0:parseInt(e)}function Wn(e){const t=qn(e);return"number"==typeof t?Lt(t):t?(e=>{if(Os.test(e))throw new RangeError(Ho(e));if(_s.test(e))throw new RangeError(Uo);return e.toLowerCase().split("/").map((e,t)=>(e.length<=3||/\d/.test(e))&&!/etc|yap/.test(e)?e.toUpperCase():e.replace(/baja|dumont|[a-z]+/g,(e,n)=>e.length<=2&&!t||"in"===e||"chat"===e?e.toUpperCase():e.length>2||!n?w(e).replace(/island|noronha|murdo|rivadavia|urville/,w):e)).join("/")})(e):ns}function zn(e){const t=qn(e);return"number"==typeof t?t:t?t.resolvedOptions().timeZone:ns}function qn(e){const t=An(e=e.toUpperCase(),1);return void 0!==t?t:e!==ns?Is(e):void 0}function Vn(e,t){return G(e.epochNanoseconds,t.epochNanoseconds)}function Jn(e,t){return G(e.epochNanoseconds,t.epochNanoseconds)}function Gn(e,t){return Kn(e,t)||Xn(e,t)}function Kn(e,t){return M(ce(e),ce(t))}function Xn(e,t){return M(ae(e),ae(t))}function Qn(e,t){if(e===t)return 1;try{return zn(e)===zn(t)}catch(e){}}function er(e,t,n,r){const o=Ce(e,r,3,5),i=fr(t.epochNanoseconds,n.epochNanoseconds,...o);return nt(e?bn(i):i)}function tr(e,t,n,r,o,i){const a=br(r.calendar,o.calendar),[s,u,c,l]=Ce(n,i,5),f=r.epochNanoseconds,d=o.epochNanoseconds,h=G(d,f);let m;if(h)if(s<6)m=fr(f,d,s,u,c,l);else{const n=t(((e,t)=>{if(!Qn(e,t))throw new RangeError(Bo);return e})(r.timeZone,o.timeZone)),f=e(a);m=cr(f,n,r,o,h,s,i),m=bt(m,d,s,u,c,l,f,r,ot,g(tn,n))}else m=Xi;return nt(n?bn(m):m)}function nr(e,t,n,r,o){const i=br(n.calendar,r.calendar),[a,s,u,c]=Ce(t,o,6),l=le(n),f=le(r),d=G(f,l);let h;if(d)if(a<=6)h=fr(l,f,a,s,u,c);else{const t=e(i);h=lr(t,n,r,d,a,o),h=bt(h,f,a,s,u,c,t,n,le,nn)}else h=Xi;return nt(t?bn(h):h)}function rr(e,t,n,r,o){const i=br(n.calendar,r.calendar);return ir(t,()=>e(i),n,r,...Ce(t,o,6,9,6))}function or(e,t,n,r,o){const i=br(n.calendar,r.calendar),a=Ce(t,o,9,9,8),s=e(i),u=on(s,n),c=on(s,r);return u.isoYear===c.isoYear&&u.isoMonth===c.isoMonth&&u.isoDay===c.isoDay?nt(Xi):ir(t,()=>s,re(u),re(c),...a,8)}function ir(e,t,n,r,o,i,a,s,u=6){const c=le(n),l=le(r);if(void 0===c||void 0===l)throw new RangeError(Vo);let f;if(G(l,c))if(6===o)f=fr(c,l,o,i,a,s);else{const e=t();f=e.N(n,r,o),i===u&&1===a||(f=bt(f,l,o,i,a,s,e,n,le,rn))}else f=Xi;return nt(e?bn(f):f)}function ar(e,t,n,r){const[o,i,a,s]=Ce(e,r,5,5),u=yt(pr(t,n),dt(i,a),s),c={...Xi,...En(u,o)};return nt(e?bn(c):c)}function sr(e,t,n,r,o,i){const a=G(r.epochNanoseconds,n.epochNanoseconds);return a?o<6?dr(n.epochNanoseconds,r.epochNanoseconds,o):cr(t,e,n,r,a,o,i):Xi}function ur(e,t,n,r,o){const i=le(t),a=le(n),s=G(a,i);return s?r<=6?dr(i,a,r):lr(e,t,n,s,r,o):Xi}function cr(e,t,n,r,o,i,a){const[s,u,c]=((e,t,n,r)=>{function o(){return f={...sn(s,c++*-r),...a},d=qt(e,f),G(u,d)===-r}const i=ss(t,e),a=h(ta,i),s=ss(n,e),u=n.epochNanoseconds;let c=0;const l=pr(i,s);let f,d;if(Math.sign(l)===-r&&c++,o()&&(-1===r||o()))throw new RangeError(Fo);const m=ee(J(d,u));return[i,f,m]})(t,n,r,o);var l,f;return{...6===i?(l=s,f=u,{...Xi,days:hr(l,f)}):e.N(s,u,i,a),...En(c)}}function lr(e,t,n,r,o,i){const[a,s,u]=((e,t,n)=>{let r=t,o=pr(e,t);return Math.sign(o)===-n&&(r=sn(t,-n),o+=gi*n),[e,r,o]})(t,n,r);return{...e.N(a,s,o,i),...En(u)}}function fr(e,t,n,r,o,i){return{...Xi,...Mn(gt(J(e,t),r,o,i),n)}}function dr(e,t,n){return{...Xi,...Mn(J(e,t),n)}}function hr(e,t){return mr(ce(e),ce(t))}function mr(e,t){return Math.trunc((t-e)/li)}function pr(e,t){return ae(t)-ae(e)}function br(e,t){if(e!==t)throw new RangeError(Zo);return e}function gr(e){return this.m(e)[0]}function wr(e){return this.m(e)[1]}function yr(e){const[t]=this.v(e);return mr(this.p(t),ce(e))+1}function vr(e){const t=xs.exec(e);if(!t)throw new RangeError(Co(e));return[parseInt(t[1]),Boolean(t[2])]}function Mr(e,t){return"M"+si(e)+(t?"L":"")}function Er(e,t,n){return e+(t||n&&e>=n?1:0)}function Sr(e,t){return e-(t&&e>=t?1:0)}function Dr(e,t){return(t+e)*(Math.sign(t)||1)||0}function Tr(e){return Zi[Ir(e)]}function kr(e){return Bi[Ir(e)]}function Ir(e){return $r(e.id||Ai)}function _r(e){function t(e){return((e,t)=>({...jr(e,t),o:e.month,day:parseInt(e.day)}))(ge(n,e),r)}const n=Ps(e),r=$r(e);return{id:e,h:Or(t),l:xr(t)}}function Or(e){return o(t=>{const n=ce(t);return e(n)},WeakMap)}function xr(e){const t=e(0).year-ga;return o(n=>{let r,o=he(n-t),i=0;const a=[],s=[];do{o+=400*li}while((r=e(o)).year<=n);do{if(o+=(1-r.day)*li,r.year===n&&(a.push(o),s.push(r.o)),o-=li,++i>100||o<-la)throw new RangeError(Fo)}while((r=e(o)).year>=n);return{i:a.reverse(),u:ii(s.reverse())}})}function jr(e,t){let n,r,o=Pr(e);if(e.era){const i=Zi[t],a=Hi[t]||{};void 0!==i&&(n="islamic"===t?"ah":e.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,""),"bc"===n||"b"===n?n="bce":"ad"===n||"a"===n?n="ce":"beforeroc"===n&&(n="broc"),n=a[n]||n,r=o,o=Dr(r,i[n]||0))}return{era:n,eraYear:r,year:o}}function Pr(e){return parseInt(e.relatedYear||e.year)}function Nr(e){const{year:t,o:n,day:r}=this.h(e),{u:o}=this.l(t);return[t,o[n]+1,r]}function Cr(e,t=1,n=1){return this.l(e).i[t-1]+(n-1)*li}function Rr(e,t){const n=Yr.call(this,e);return[Sr(t,n),n===t]}function Yr(e){const t=Hr(this,e),n=Hr(this,e-1),r=t.length;if(r>n.length){const e=kr(this);if(e<0)return-e;for(let e=0;e<r;e++)if(t[e]!==n[e])return e+1}}function Ar(e){return mr(Cr.call(this,e),Cr.call(this,e+1))}function Fr(e,t){const{i:n}=this.l(e);let r=t+1,o=n;return r>n.length&&(r=1,o=this.l(e+1).i),mr(n[t-1],o[r-1])}function Lr(e){return this.l(e).i.length}function Zr(e){const t=this.h(e);return[t.era,t.eraYear]}function Hr(e,t){return Object.keys(e.l(t).u)}function Br(e){return Ur(Ui(e))}function Ur(e){if((e=e.toLowerCase())!==Ai&&e!==Fi){const t=Ps(e).resolvedOptions().calendar;if($r(e)!==$r(t))throw new RangeError(Lo(e));return t}return e}function $r(e){return"islamicc"===e&&(e="islamic"),e.split("-")[0]}function Wr(e,t){return n=>n===Ai?e:n===Fi||n===Li?Object.assign(Object.create(e),{id:n}):Object.assign(Object.create(t),js(n))}function zr(e,t,n,r){const o=qr(n,r,Ni,[],Di);if(void 0!==o.timeZone){const r=n.F(o),i=Jr(o),a=e(o.timeZone);return{epochNanoseconds:zt(t(a),{...r,...i},void 0!==o.offset?In(o.offset):void 0),timeZone:a}}return{...n.F(o),...sa}}function qr(e,t,n,r=[],o=[]){return Vr(t,[...e.fields(n),...o].sort(),r)}function Vr(e,t,n,r=!n){const o={};let i,a=0;for(const r of t){if(r===i)throw new RangeError(To(r));if("constructor"===r||"__proto__"===r)throw new RangeError(Do(r));let t=e[r];if(void 0!==t)a=1,Us[r]&&(t=Us[r](t,r)),o[r]=t;else if(n){if(n.includes(r))throw new TypeError(So(r));o[r]=Yi[r]}i=r}if(r&&!a)throw new TypeError(ko(t));return o}function Jr(e,t){return je($s({...Yi,...e}),t)}function Gr(e,t,n,r,o){t=h(n=e.fields(n),t),r=Vr(r,o=e.fields(o),[]);let i=e.k(t,r);return i=Vr(i,[...n,...o].sort(),[]),e.F(i)}function Kr(e,t){const n=Tr(e),r=Hi[e.id||""]||{};let{era:o,eraYear:i,year:a}=t;if(void 0!==o||void 0!==i){if(void 0===o||void 0===i)throw new TypeError(xo);if(!n)throw new RangeError(Oo);const e=n[r[o]||o];if(void 0===e)throw new RangeError(Po(o));const t=Dr(i,e);if(void 0!==a&&a!==t)throw new RangeError(jo);a=t}else if(void 0===a)throw new TypeError(No(n));return a}function Xr(e,t,r,o){let{month:i,monthCode:a}=t;if(void 0!==a){const t=((e,t,n,r)=>{const o=e.L(n),[i,a]=vr(t);let s=Er(i,a,o);if(a){const t=kr(e);if(void 0===t)throw new RangeError(Ao);if(t>0){if(s>t)throw new RangeError(Ao);if(void 0===o){if(1===r)throw new RangeError(Ao);s--}}else{if(s!==-t)throw new RangeError(Ao);if(void 0===o&&1===r)throw new RangeError(Ao)}}return s})(e,a,r,o);if(void 0!==i&&i!==t)throw new RangeError(Ro);i=t,o=1}else if(void 0===i)throw new TypeError(Yo);return n("month",i,1,e.B(r),o)}function Qr(e,n,r,o,i){return t(n,"day",1,e.U(o,r),i)}function eo(e,t,n,r){let o=0;const i=[];for(const e of n)void 0!==t[e]?o=1:i.push(e);if(Object.assign(e,t),o)for(const t of r||i)delete e[t]}function to(e){const t=Hs(e.calendar),[n,r,o]=t.v(e),[i,a]=t.q(n,r);return{year:n,monthCode:Mr(i,a),day:o}}function no(e,t){return Ke(ss(t,e))}function ro(e,t){return Xe(ss(t,e))}function oo(e,t){return tt(ss(t,e))}function io(e,t,n){const r=new Set(n);return(o,i)=>{const a=n&&m(o,n);if(!m(o=((e,t)=>{const n={};for(const r in t)e.has(r)||(n[r]=t[r]);return n})(r,o),e)){if(i&&a)throw new TypeError("Invalid formatting options");o={...t,...o}}return n&&(o.timeZone=ns,["full","long"].includes(o.J)&&(o.J="medium")),o}}function ao(e,t=so,n=0){const[r,,,o]=e;return(i,a=Mu,...s)=>{const u=t(o&&o(...s),i,a,r,n),c=u.resolvedOptions();return[u,...uo(e,c,s)]}}function so(e,t,n,r,o){if(n=r(n,o),e){if(void 0!==n.timeZone)throw new TypeError(oi);n.timeZone=e}return new pa(t,n)}function uo(e,t,n){const[,r,o]=e;return n.map(e=>(e.calendar&&((e,t,n)=>{if((n||e!==Ai)&&e!==t)throw new RangeError(Zo)})(e.calendar,t.calendar,o),r(e,t)))}function co(e,t){return{...e,calendar:t}}function lo(e){const t=fo();return pe(t,e.R(t))}function fo(){return Q(Date.now(),hi)}function ho(){return xu||(xu=(new pa).resolvedOptions().timeZone)}const mo=(e,t)=>`Non-integer ${e}: ${t}`,po=(e,t)=>`Non-positive ${e}: ${t}`,bo=(e,t)=>`Non-finite ${e}: ${t}`,go=e=>`Cannot convert bigint to ${e}`,wo=e=>`Invalid bigint: ${e}`,yo="Cannot convert Symbol to string",vo="Invalid object",Mo=(e,t,n,r,o)=>o?Mo(e,o[t],o[n],o[r]):Eo(e,t)+`; must be between ${n}-${r}`,Eo=(e,t)=>`Invalid ${e}: ${t}`,So=e=>`Missing ${e}`,Do=e=>`Invalid field ${e}`,To=e=>`Duplicate field ${e}`,ko=e=>"No valid fields: "+e.join(),Io=(e,t,n)=>Eo(e,t)+"; must be "+Object.keys(n).join(),_o="Invalid calling context",Oo="Forbidden era/eraYear",xo="Mismatching era/eraYear",jo="Mismatching year/eraYear",Po=e=>`Invalid era: ${e}`,No=e=>"Missing year"+(e?"/era/eraYear":""),Co=e=>`Invalid monthCode: ${e}`,Ro="Mismatching month/monthCode",Yo="Missing month/monthCode",Ao="Invalid leap month",Fo="Invalid protocol results",Lo=e=>Eo("Calendar",e),Zo="Mismatching Calendars",Ho=e=>Eo("TimeZone",e),Bo="Mismatching TimeZones",Uo="Forbidden ICU TimeZone",$o="Out-of-bounds offset",Wo="Out-of-bounds TimeZone gap",zo="Invalid TimeZone offset",qo="Ambiguous offset",Vo="Out-of-bounds date",Jo="Out-of-bounds duration",Go="Cannot mix duration signs",Ko="Missing relativeTo",Xo="Cannot use large units",Qo="Required smallestUnit or largestUnit",ei="smallestUnit > largestUnit",ti=e=>`Cannot parse: ${e}`,ni=e=>`Invalid substring: ${e}`,ri="Mismatching types for formatting",oi="Cannot specify TimeZone",ii=g(f,(e,t)=>t),ai=g(f,(e,t,n)=>n),si=g(v,2),ui={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},ci=Object.keys(ui),li=864e5,fi=1e3,di=1e3,hi=1e6,mi=1e9,pi=6e10,bi=36e11,gi=864e11,wi=[1,di,hi,mi,pi,bi,gi],yi=ci.slice(0,6),vi=y(yi),Mi=["offset"],Ei=["timeZone"],Si=yi.concat(Mi),Di=Si.concat(Ei),Ti=["era","eraYear"],ki=Ti.concat(["year"]),Ii=["year"],_i=["monthCode"],Oi=["month"].concat(_i),xi=["day"],ji=Oi.concat(Ii),Pi=_i.concat(Ii),Ni=xi.concat(ji),Ci=xi.concat(Oi),Ri=xi.concat(_i),Yi=ai(yi,0),Ai="iso8601",Fi="gregory",Li="japanese",Zi={[Fi]:{"gregory-inverse":-1,gregory:0},[Li]:{"japanese-inverse":-1,japanese:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018},ethiopic:{ethioaa:0,ethiopic:5500},coptic:{"coptic-inverse":-1,coptic:0},roc:{"roc-inverse":-1,roc:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0}},Hi={[Fi]:{bce:"gregory-inverse",ce:"gregory"},[Li]:{bce:"japanese-inverse",ce:"japanese"},ethiopic:{era0:"ethioaa",era1:"ethiopic"},coptic:{era0:"coptic-inverse",era1:"coptic"},roc:{broc:"roc-inverse",minguo:"roc"}},Bi={chinese:13,dangi:13,hebrew:-6},Ui=g(Y,"string"),$i=g(Y,"boolean"),Wi=g(Y,"number"),zi=ci.map(e=>e+"s"),qi=y(zi),Vi=zi.slice(0,6),Ji=zi.slice(6),Gi=Ji.slice(1),Ki=ii(zi),Xi=ai(zi,0),Qi=ai(Vi,0),ea=g(b,zi),ta=["isoNanosecond","isoMicrosecond","isoMillisecond","isoSecond","isoMinute","isoHour"],na=["isoDay","isoMonth","isoYear"],ra=ta.concat(na),oa=y(na),ia=y(ta),aa=y(ra),sa=ai(ia,0),ua=g(b,ra),ca=1e8,la=ca*li,fa=[ca,0],da=[-ca,0],ha=275760,ma=-271821,pa=Intl.DateTimeFormat,ba="en-GB",ga=1970,wa=1972,ya=12,va=he(1868,9,8),Ma=o(ke,WeakMap),Ea="smallestUnit",Sa="unit",Da="roundingIncrement",Ta="fractionalSecondDigits",ka="relativeTo",Ia="direction",_a={constrain:0,reject:1},Oa=Object.keys(_a),xa={compatible:0,reject:1,earlier:2,later:3},ja={reject:0,use:1,prefer:2,ignore:3},Pa={auto:0,never:1,critical:2,always:3},Na={auto:0,never:1,critical:2},Ca={auto:0,never:1},Ra={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},Ya={previous:-1,next:1},Aa=g(ze,Ea),Fa=g(ze,"largestUnit"),La=g(ze,Sa),Za=g(qe,"overflow",_a),Ha=g(qe,"disambiguation",xa),Ba=g(qe,"offset",ja),Ua=g(qe,"calendarName",Pa),$a=g(qe,"timeZoneName",Na),Wa=g(qe,"offset",Ca),za=g(qe,"roundingMode",Ra),qa="PlainYearMonth",Va="PlainMonthDay",Ja="PlainDate",Ga="PlainDateTime",Ka="PlainTime",Xa="ZonedDateTime",Qa="Instant",es="Duration",ts=[Math.floor,e=>_(e)?Math.floor(e):Math.round(e),Math.ceil,e=>_(e)?Math.ceil(e):Math.round(e),Math.trunc,e=>_(e)?Math.trunc(e)||0:Math.round(e),e=>e<0?Math.floor(e):Math.ceil(e),e=>Math.sign(e)*Math.round(Math.abs(e))||0,e=>_(e)?(e=Math.trunc(e)||0)+e%2:Math.round(e)],ns="UTC",rs=5184e3,os=de(1847),is=de((new Date).getUTCFullYear()+10),as=/0+$/,ss=o(Wt,WeakMap),us=2**32-1,cs=o(e=>{const t=qn(e);return"object"==typeof t?new fs(t):new ls(t||0)});class ls{constructor(e){this.$=e}R(){return this.$}I(e){return(e=>{const t=le({...e,...sa});if(!t||Math.abs(t[0])>1e8)throw new RangeError(Vo)})(e),[fe(e,this.$)]}O(){}}class fs{constructor(e){this.nn=(e=>{function t(e){const t=E(e,a,s),[o,u]=kn(t),c=r(o),l=r(u);return c===l?c:n(i(o,u),c,l,e)}function n(t,n,r,o){let i,a;for(;(void 0===o||void 0===(i=o<t[0]?n:o>=t[1]?r:void 0))&&(a=t[1]-t[0]);){const n=t[0]+Math.floor(a/2);e(n)===r?t[1]=n:t[0]=n+1}return i}const r=o(e),i=o(Tn);let a=os,s=is;return{tn(e){const n=t(e-86400),r=t(e+86400),o=e-n,i=e-r;if(n===r)return[o];const a=t(o);return a===t(i)?[e-a]:n>r?[o,i]:[]},rn:t,O(e,t){const o=E(e,a,s);let[u,c]=kn(o);const l=rs*t,f=t<0?()=>c>a||(a=o,0):()=>u<s||(s=o,0);for(;f();){const o=r(u),a=r(c);if(o!==a){const r=i(u,c);n(r,o,a);const s=r[0];if((M(s,e)||1)===t)return s}u+=l,c+=l}}}})((e=>t=>{const n=ge(e,t*fi);return de(Pr(n),parseInt(n.month),parseInt(n.day),parseInt(n.hour),parseInt(n.minute),parseInt(n.second))-t})(e))}R(e){return this.nn.rn((e=>ue(e)[0])(e))*mi}I(e){const[t,n]=[de((r=e).isoYear,r.isoMonth,r.isoDay,r.isoHour,r.isoMinute,r.isoSecond),r.isoMillisecond*hi+r.isoMicrosecond*di+r.isoNanosecond];var r;return this.nn.tn(t).map(e=>ie(V(Q(e,mi),n)))}O(e,t){const[n,r]=ue(e),o=this.nn.O(n+(t>0||r?1:0),t);if(void 0!==o)return Q(o,mi)}}const ds="([+-])",hs="(?:[.,](\\d{1,9}))?",ms=`(?:(?:${ds}(\\d{6}))|(\\d{4}))-?(\\d{2})`,ps="(\\d{2})(?::?(\\d{2})(?::?(\\d{2})"+hs+")?)?",bs=ds+ps,gs=ms+"-?(\\d{2})(?:[T ]"+ps+"(Z|"+bs+")?)?",ws="\\[(!?)([^\\]]*)\\]",ys=`((?:${ws}){0,9})`,vs=Bn(ms+ys),Ms=Bn("(?:--)?(\\d{2})-?(\\d{2})"+ys),Es=Bn(gs+ys),Ss=Bn("T?"+ps+"(?:"+bs+")?"+ys),Ds=Bn(bs),Ts=new RegExp(ws,"g"),ks=Bn(`${ds}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${hs}H)?(?:(\\d+)${hs}M)?(?:(\\d+)${hs}S)?)?`),Is=o(e=>new pa(ba,{timeZone:e,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),_s=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Os=/[^\w\/:+-]+/,xs=/^M(\d{2})(L?)$/,js=o(_r),Ps=o(e=>new pa(ba,{calendar:e,timeZone:ns,era:"short",year:"numeric",month:"short",day:"numeric"})),Ns={P(e,t,r){const o=Pe(r);let i,{years:a,months:s,weeks:u,days:c}=t;if(c+=vn(t,5)[0],a||s)i=((e,t,r,o,i)=>{let[a,s,u]=e.v(t);if(r){const[t,o]=e.q(a,s);a+=r,s=Er(t,o,e.L(a)),s=n("month",s,1,e.B(a),i)}return o&&([a,s]=e.un(a,s,o)),u=n("day",u,1,e.U(a,s),i),e.p(a,s,u)})(this,e,a,s,o);else{if(!u&&!c)return e;i=ce(e)}if(void 0===i)throw new RangeError(Vo);return i+=(7*u+c)*li,re(be(i))},N(e,t,n){if(n<=7){let r=0,o=hr({...e,...sa},{...t,...sa});return 7===n&&([r,o]=T(o,7)),{...Xi,weeks:r,days:o}}const r=this.v(e),o=this.v(t);let[i,a,s]=((e,t,n,r,o,i,a)=>{let s=o-t,u=i-n,c=a-r;if(s||u){const l=Math.sign(s||u);let f=e.U(o,i),d=0;if(Math.sign(c)===-l){const r=f;[o,i]=e.un(o,i,-l),s=o-t,u=i-n,f=e.U(o,i),d=l<0?-r:f}if(c=a-Math.min(r,f)+d,s){const[r,a]=e.q(t,n),[c,f]=e.q(o,i);if(u=c-r||Number(f)-Number(a),Math.sign(u)===-l){const n=l<0&&-e.B(o);s=(o-=l)-t,u=i-Er(r,a,e.L(o))+(n||e.B(o))}}}return[s,u,c]})(this,...r,...o);return 8===n&&(a+=this.cn(i,r[0]),i=0),{...Xi,years:i,months:a,days:s}},F(e,t){const n=Pe(t),r=Kr(this,e),o=Xr(this,e,r,n),i=Qr(this,e,o,r,n);return Xe(re(this.V(r,o,i)),this.id||Ai)},K(e,t){const n=Pe(t),r=Kr(this,e),o=Xr(this,e,r,n);return Qe(ne(this.V(r,o,1)),this.id||Ai)},_(e,t){const n=Pe(t);let r,o,i,a=void 0!==e.eraYear||void 0!==e.year?Kr(this,e):void 0;const s=!this.id;if(void 0===a&&s&&(a=wa),void 0!==a){const t=Xr(this,e,a,n);r=Qr(this,e,t,a,n);const s=this.L(a);o=Sr(t,s),i=t===s}else{if(void 0===e.monthCode)throw new TypeError(Yo);if([o,i]=vr(e.monthCode),this.id&&this.id!==Fi&&this.id!==Li)if(this.id&&"coptic"===$r(this.id)&&0===n){const t=i||13!==o?30:6;r=e.day,r=E(r,1,t)}else if(this.id&&"chinese"===$r(this.id)&&0===n){const t=!i||1!==o&&9!==o&&10!==o&&11!==o&&12!==o?30:29;r=e.day,r=E(r,1,t)}else r=e.day;else r=Qr(this,e,Xr(this,e,wa,n),wa,n)}const u=this.G(o,i,r);if(!u)throw new RangeError("Cannot guess year");const[c,l]=u;return et(re(this.V(c,l,r)),this.id||Ai)},fields(e){return Tr(this)&&e.includes("year")?[...e,...Ti]:e},k(e,t){const n=Object.assign(Object.create(null),e);return eo(n,t,Oi),Tr(this)&&(eo(n,t,ki),this.id===Li&&eo(n,t,Ci,Ti)),n},inLeapYear(e){const[t]=this.v(e);return this.sn(t)},monthsInYear(e){const[t]=this.v(e);return this.B(t)},daysInMonth(e){const[t,n]=this.v(e);return this.U(t,n)},daysInYear(e){const[t]=this.v(e);return this.fn(t)},dayOfYear:yr,era(e){return this.hn(e)[0]},eraYear(e){return this.hn(e)[1]},monthCode(e){const[t,n]=this.v(e),[r,o]=this.q(t,n);return Mr(r,o)},dayOfWeek:De,daysInWeek:()=>7},Cs={v:we,hn:Te,q:ye},Rs={dayOfYear:yr,v:we,p:he},Ys=Object.assign({},Rs,{weekOfYear:gr,yearOfWeek:wr,m(e){function t(e){return(7-e<r?7:0)-e}function n(e){const n=Ee(d+e),r=e||1,o=t(D(u+n*r,7));return l=(n+(o-c)*r)/7}const r=this.id?1:4,o=De(e),i=this.dayOfYear(e),a=D(o-1,7),s=i-1,u=D(a-s,7),c=t(u);let l,f=Math.floor((s-c)/7)+1,d=e.isoYear;return f?f>n(0)&&(f=1,d++):(f=n(-1),d--),[f,d,l]}}),As=Object.assign({},Ns,Ys,{v:we,hn:Te,q:ye,G(e,t){if(!t)return[wa,e]},sn:Se,L(){},B:ve,cn:e=>e*ya,U:Me,fn:Ee,V:(e,t,n)=>({isoYear:e,isoMonth:t,isoDay:n}),p:he,un:(e,t,n)=>(e+=k(n,ya),(t+=I(n,ya))<1?(e--,t+=ya):t>ya&&(e++,t-=ya),[e,t]),year:e=>e.isoYear,month:e=>e.isoMonth,day:e=>e.isoDay}),Fs={v:Nr,hn:Zr,q:Rr},Ls={dayOfYear:yr,v:Nr,p:Cr,weekOfYear:gr,yearOfWeek:wr,m:()=>[]},Zs=Object.assign({},Ns,Ls,{v:Nr,hn:Zr,q:Rr,G(e,t,n){const r=this.id&&"chinese"===$r(this.id)?((e,t,n)=>{if(t)switch(e){case 1:return 1651;case 2:return n<30?1947:1765;case 3:return n<30?1966:1955;case 4:return n<30?1963:1944;case 5:return n<30?1971:1952;case 6:return n<30?1960:1941;case 7:return n<30?1968:1938;case 8:return n<30?1957:1718;case 9:return 1832;case 10:return 1870;case 11:return 1814;case 12:return 1890}return 1972})(e,t,n):wa;let[o,i,a]=Nr.call(this,{isoYear:r,isoMonth:ya,isoDay:31});const s=Yr.call(this,o),u=i===s;1===(M(e,Sr(i,s))||M(Number(t),Number(u))||M(n,a))&&o--;for(let r=0;r<100;r++){const i=o-r,a=Yr.call(this,i),s=Er(e,t,a);if(t===(s===a)&&n<=Fr.call(this,i,s))return[i,s]}},sn(e){const t=Ar.call(this,e);return t>Ar.call(this,e-1)&&t>Ar.call(this,e+1)},L:Yr,B:Lr,cn(e,t){const n=t+e,r=Math.sign(e),o=r<0?-1:0;let i=0;for(let e=t;e!==n;e+=r)i+=Lr.call(this,e+o);return i},U:Fr,fn:Ar,V(e,t,n){return be(Cr.call(this,e,t,n))},p:Cr,un(e,t,n){if(n){if(t+=n,!Number.isSafeInteger(t))throw new RangeError(Vo);if(n<0)for(;t<1;)t+=Lr.call(this,--e);else{let n;for(;t>(n=Lr.call(this,e));)t-=n,e++}}return[e,t]},year(e){return this.h(e).year},month(e){const{year:t,o:n}=this.h(e),{u:r}=this.l(t);return r[n]+1},day(e){return this.h(e).day}}),Hs=Wr(Cs,Fs),Bs=Wr(As,Zs),Us={...{era:Z,eraYear:U,year:U,month:W,monthCode(e){const t=Z(e);return vr(t),t},day:W},...ai(yi,U),...ai(zi,$),offset(e){const t=Z(e);return In(t),t}},$s=g(d,yi,ta),Ws=g(d,ta,yi),zs="numeric",qs=["timeZoneName"],Vs={month:zs,day:zs},Js={year:zs,month:zs},Gs=Object.assign({},Js,{day:zs}),Ks={hour:zs,minute:zs,second:zs},Xs=Object.assign({},Gs,Ks),Qs=Object.assign({},Xs,{timeZoneName:"short"}),eu=Object.keys(Js),tu=Object.keys(Vs),nu=Object.keys(Gs),ru=Object.keys(Ks),ou=["dateStyle"],iu=eu.concat(ou),au=tu.concat(ou),su=nu.concat(ou,["weekday"]),uu=ru.concat(["dayPeriod","timeStyle","fractionalSecondDigits"]),cu=su.concat(uu),lu=qs.concat(uu),fu=qs.concat(su),du=qs.concat(["day","weekday"],uu),hu=qs.concat(["year","weekday"],uu),mu=io(cu,Xs),pu=io(cu,Qs),bu=io(cu,Xs,qs),gu=io(su,Gs,lu),wu=io(uu,Ks,fu),yu=io(iu,Js,du),vu=io(au,Vs,hu),Mu={},Eu=new pa(void 0,{calendar:Ai}).resolvedOptions().calendar===Ai,Su=[mu,rt],Du=[pu,rt,0,(e,t)=>{const n=e.timeZone;if(t&&t.timeZone!==n)throw new RangeError(Bo);return n}],Tu=[bu,ce],ku=[gu,ce],Iu=[wu,e=>ae(e)/hi],_u=[yu,ce,Eu],Ou=[vu,ce,Eu];let xu;function ju(e,t,n,r,o){function c(...e){if(!(this instanceof c))throw new TypeError(_o);rc(this,t(...e))}function f(e,t){return Object.defineProperties(function(...t){return e.call(this,d(this),...t)},i(t))}function d(t){const n=nc(t);if(!n||n.branding!==e)throw new TypeError(_o);return n}return Object.defineProperties(c.prototype,{...s(l(f,n)),...a(l(f,r)),...u("Temporal."+e)}),Object.defineProperties(c,{...a(o),...i(e)}),[c,e=>{const t=Object.create(c.prototype);return rc(t,e),t},d]}function Pu(e){if(nc(e)||void 0!==e.calendar||void 0!==e.timeZone)throw new TypeError("Invalid bag");return e}function Nu(e){return Cu(e)||Ai}function Cu(e){const{calendar:t}=e;if(void 0!==t)return Ru(t)}function Ru(e){if(r(e)){const{calendar:t}=nc(e)||{};if(!t)throw new TypeError(Lo(e));return t}return(e=>Ur(function(e){const t=Cn(e)||Rn(e)||Yn(e);return t?t.calendar:e}(Ui(e))))(e)}function Yu(e){const t={};for(const n in e)t[n]=e=>{const{calendar:t}=e;return Bs(t)[n](e)};return t}function Au(){throw new TypeError("Cannot use valueOf")}function Fu(e){if(r(e)){const{timeZone:t}=nc(e)||{};if(!t)throw new TypeError(Ho(e));return t}return(e=>Wn(function(e){const t=Cn(e);return t&&(t.timeZone||t.j&&ns||t.offset)||e}(Ui(e))))(e)}function Lu(e){if(r(e)){const t=nc(e);return t&&t.branding===es?t:function(e){const t=Vr(e,qi);return nt(wn({...Xi,...t}))}(e)}return function(e){const t=(e=>{const t=ks.exec(e);return t?(e=>{function t(e,t,i){let a=0,s=0;if(i&&([a,o]=S(o,wi[i])),void 0!==e){if(r)throw new RangeError(ni(e));s=(e=>{const t=parseInt(e);if(!Number.isFinite(t))throw new RangeError(ni(e));return t})(e),n=1,t&&(o=Hn(t)*(wi[i]/mi),r=1)}return a+s}let n=0,r=0,o=0,i={...c(zi,[t(e[2]),t(e[3]),t(e[4]),t(e[5]),t(e[6],e[7],5),t(e[8],e[9],4),t(e[10],e[11],3)]),...x(o,2,zi)};if(!n)throw new RangeError(ko(zi));return Un(e[1])<0&&(i=bn(i)),i})(t):void 0})(Ui(e));if(!t)throw new RangeError(ti(e));return nt(wn(t))}(e)}function Zu(e){if(void 0!==e){if(r(e)){const t=nc(e)||{};switch(t.branding){case Xa:case Ja:return t;case Ga:return Xe(t)}const n=Nu(e);return{...zr(Fu,cs,Bs(n),e),calendar:n}}return function(e){const t=Cn(Ui(e));if(!t)throw new RangeError(ti(e));if(t.timeZone)return xn(t,t.offset?In(t.offset):void 0);if(t.j)throw new RangeError(ti(e));return Pn(t)}(e)}}function Hu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ka:return Pe(t),n;case Ga:return Pe(t),tt(n);case Xa:return Pe(t),oo(cs,n)}return function(e,t){return tt(Jr(Vr(e,vi,[],1),Pe(t)))}(e,t)}const n=function(e){let t,n=(e=>{const t=Ss.exec(e);return t?(Zn(t[10]),Ln(t)):void 0})(Ui(e));if(!n){if(n=Cn(e),!n)throw new RangeError(ti(e));if(!n.C)throw new RangeError(ti(e));if(n.j)throw new RangeError(ni("Z"));On(n)}if((t=Rn(e))&&Oe(t))throw new RangeError(ti(e));if((t=Yn(e))&&Oe(t))throw new RangeError(ti(e));return tt(je(n,1))}(e);return Pe(t),n}function Bu(e){return void 0===e?void 0:Hu(e)}function Uu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ga:return Pe(t),n;case Ja:return Pe(t),Ke({...n,...sa});case Xa:return Pe(t),no(cs,n)}return function(e,t,n){const r=qr(e,t,Ni,[],yi),o=Pe(n);return Ke(oe({...e.F(r,We(o)),...Jr(r,o)}))}(Bs(Nu(e)),e,t)}const n=function(e){const t=Cn(Ui(e));if(!t||t.j)throw new RangeError(ti(e));return Ke(jn(t))}(e);return Pe(t),n}function $u(e,t){if(r(e)){const n=nc(e);if(n&&n.branding===Va)return Pe(t),n;const r=Cu(e);return function(e,t,n,r){const o=qr(e,n,Ni,xi);return t&&void 0!==o.month&&void 0===o.monthCode&&void 0===o.year&&(o.year=wa),e._(o,r)}(Bs(r||Ai),!r,e,t)}const n=function(e,t){const n=Yn(Ui(t));if(n)return On(n),et(_e(n));const r=_n(t,0,1),{calendar:o}=r,i=e(o),[a,s,u]=i.v(r),[c,l]=i.q(a,s),[f,d]=i.G(c,l,u);return et(re(i.V(f,d,u)),o)}(Bs,e);return Pe(t),n}function Wu(e,t){if(r(e)){const n=nc(e);return n&&n.branding===qa?(Pe(t),n):function(e,t,n,r){const o=qr(e,t,ji,r);return e.K(o,n)}(Bs(Nu(e)),e,t)}const n=function(e,t){const n=Rn(Ui(t));if(n)return On(n),Qe(ne(_e(n)));const r=_n(t,1);return Qe(on(e(r.calendar),r))}(Bs,e);return Pe(t),n}function zu(e,t){if(r(e)){const n=nc(e)||{};switch(n.branding){case Ja:return Pe(t),n;case Ga:return Pe(t),Xe(n);case Xa:return Pe(t),ro(cs,n)}return function(e,t,n,r=[]){const o=qr(e,t,Ni,r);return e.F(o,n)}(Bs(Nu(e)),e,t)}const n=_n(e);return Pe(t),n}function qu(e,t){if(r(e)){const n=nc(e);if(n&&n.branding===Xa)return Ne(t),n;const r=Nu(e);return function(e,t,n,r,o,i){const a=qr(n,o,Ni,Ei,Di),s=e(a.timeZone),[u,c,l]=Ne(i),f=n.F(a,We(u)),d=Jr(a,u);return Ge(zt(t(s),{...f,...d},void 0!==a.offset?In(a.offset):void 0,c,l),s,r)}(Fu,cs,Bs(r),r,e,t)}return function(e,t){const n=Cn(Ui(e));if(!n||!n.timeZone)throw new RangeError(ti(e));const{offset:r}=n,o=r?In(r):void 0,[,i,a]=Ne(t);return xn(n,o,i,a)}(e,t)}function Vu(e){return l(e=>t=>e(Ju(t)),e)}function Ju(e){return ss(e,cs)}function Gu(e){if(r(e)){const t=nc(e);if(t)switch(t.branding){case Qa:return t;case Xa:return Je(t.epochNanoseconds)}}return function(e){const t=Cn(e=Z(e));if(!t)throw new RangeError(ti(e));let n;if(t.j)n=0;else{if(!t.offset)throw new RangeError(ti(e));n=In(t.offset)}return t.timeZone&&An(t.timeZone,1),Je(fe(Ie(t),n))}(e)}function Ku(){function e(e,n){return new t(e,n)}function t(e,t=Object.create(null)){Bc.set(this,((e,t)=>{const n=new pa(e,t),r=n.resolvedOptions(),i=r.locale,a=h(Object.keys(t),r),s=o(ec),u=(e,...t)=>{if(e){if(2!==t.length)throw new TypeError(ri);for(const e of t)if(void 0===e)throw new TypeError(ri)}e||void 0!==t[0]||(t=[]);const r=t.map(e=>nc(e)||Number(e));let o,u=0;for(const e of r){const t="object"==typeof e?e.branding:void 0;if(u++&&t!==o)throw new TypeError(ri);o=t}return o?s(o)(i,a,...r):[n,...r]};return u.X=n,u})(e,t))}const n=pa.prototype,r=Object.getOwnPropertyDescriptors(n),a=Object.getOwnPropertyDescriptors(pa);for(const t in r){const n=r[t],o=t.startsWith("format")&&Xu(t);"function"==typeof n.value?n.value="constructor"===t?e:o||Qu(t):o&&(n.get=function(){if(!Bc.has(this))throw new TypeError(_o);return(...e)=>o.apply(this,e)},Object.defineProperties(n.get,i(`get ${t}`)))}return a.prototype.value=t.prototype=Object.create({},r),Object.defineProperties(e,a),e}function Xu(e){return Object.defineProperties(function(...t){const n=Bc.get(this),[r,...o]=n(e.includes("Range"),...t);return r[e](...o)},i(e))}function Qu(e){return Object.defineProperties(function(...t){return Bc.get(this).X[e](...t)},i(e))}function ec(e){const t=gc[e];if(!t)throw new TypeError((e=>`Cannot format ${e}`)(e));return ao(t,o(so),1)}const tc=new WeakMap,nc=tc.get.bind(tc),rc=tc.set.bind(tc),oc={era:function(e){if(void 0!==e)return Ui(e)},eraYear:j,year:N,month:P,daysInMonth:P,daysInYear:P,inLeapYear:$i,monthsInYear:P},ic={monthCode:Ui},ac={day:P},sc={dayOfWeek:P,dayOfYear:P,weekOfYear:function(e){if(void 0!==e)return P(e)},yearOfWeek:j,daysInWeek:P},uc=Yu(Object.assign({},oc,ic,ac,sc)),cc=Yu({...oc,...ic}),lc=Yu({...ic,...ac}),fc={calendarId:e=>e.calendar},dc=f(e=>t=>t[e],zi.concat("sign")),hc=f((e,t)=>e=>e[ta[t]],yi),mc={epochMilliseconds:rt,epochNanoseconds:function(e){return((e,t=1)=>{const[n,r]=e,o=Math.floor(r/t),i=gi/t;return BigInt(n)*BigInt(i)+BigInt(o)})(e.epochNanoseconds)}},[pc,bc]=ju(es,function(e=0,t=0,n=0,r=0,o=0,i=0,a=0,s=0,u=0,f=0){return nt(wn(l($,c(zi,[e,t,n,r,o,i,a,s,u,f]))))},{...dc,blank:function(e){return!e.sign}},{with:(e,t)=>bc(function(e,t){return nt((n=e,r=t,wn({...n,...Vr(r,qi)})));var n,r}(e,t)),negated:e=>bc(pn(e)),abs:e=>bc(function(e){return-1===e.sign?pn(e):e}(e)),add:(e,t,n)=>bc(mn(Zu,Bs,cs,0,e,Lu(t),n)),subtract:(e,t,n)=>bc(mn(Zu,Bs,cs,1,e,Lu(t),n)),round:(e,t)=>bc(function(e,t,n,r,o){const i=Dn(r),[a,s,u,c,l]=((e,t,n)=>{e=$e(e,Ea);let r=Fa(e);const o=n(e[ka]);let i=Ze(e);const a=za(e,7);let s=Aa(e);if(void 0===r&&void 0===s)throw new RangeError(Qo);if(null==s&&(s=0),null==r&&(r=Math.max(s,t)),Ve(r,s),i=He(i,s,1),i>1&&s>5&&r!==s)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");return[r,s,i,a,o]})(o,i,e),f=Math.max(i,a);if(!l&&f<=6)return nt(wn(((e,t,n,r,o)=>{const i=gt(vn(e),n,r,o);return{...Xi,...Mn(i,t)}})(r,a,s,u,c)));if(!dn(l)&&!r.sign)return r;if(!l)throw new RangeError(Ko);const[d,h,m]=un(t,n,l),p=cn(m),b=ln(m),g=fn(m),w=b(h,d,r);dn(l)||(oe(d),oe(w));let y=g(h,d,w,a);const v=r.sign,M=gn(y);if(v&&M&&v!==M)throw new RangeError(Fo);return y=bt(y,p(w),a,s,u,c,h,d,p,b),nt(y)}(Zu,Bs,cs,e,t)),total:(e,t)=>function(e,t,n,r,o){const i=Dn(r),[a,s]=((e,t)=>{const n=t((e=$e(e,Sa))[ka]);let r=La(e);return r=C(Sa,r),[r,n]})(o,e),u=Math.max(a,i);if(!s&&hn(u,s))return it(r,a);if(!s)throw new RangeError(Ko);if(!r.sign)return 0;const[c,l,f]=un(t,n,s),d=cn(f),h=ln(f),m=fn(f),p=h(l,c,r);dn(s)||(oe(c),oe(p));const b=m(l,c,p,a);return hn(a,s)?it(b,a):((e,t,n,r,o,i,a)=>{const s=gn(e),[u,c]=at(r,ea(n,e),n,s,o,i,a),l=st(t,u,c);return e[zi[n]]+l*s})(b,d(p),a,l,c,d,h)}(Zu,Bs,cs,e,t),toLocaleString(e,t,n){return Intl.DurationFormat?new Intl.DurationFormat(t,n).format(this):jt(e)},toString:jt,toJSON:e=>jt(e),valueOf:Au},{from:e=>bc(Lu(e)),compare:(e,t,n)=>function(e,t,n,r,o,i){const a=e(Ue(i).relativeTo),s=Math.max(Dn(r),Dn(o));if(p(zi,r,o))return 0;if(hn(s,a))return G(vn(r),vn(o));if(!a)throw new RangeError(Ko);const[u,c,l]=un(t,n,a),f=cn(l),d=ln(l);return G(f(d(c,u,r)),f(d(c,u,o)))}(Zu,Bs,cs,Lu(e),Lu(t),n)}),gc={Instant:Su,PlainDateTime:Tu,PlainDate:ku,PlainTime:Iu,PlainYearMonth:_u,PlainMonthDay:Ou},wc=ao(Su),yc=ao(Du),vc=ao(Tu),Mc=ao(ku),Ec=ao(Iu),Sc=ao(_u),Dc=ao(Ou),[Tc,kc]=ju(Ka,function(e=0,t=0,n=0,r=0,o=0,i=0){return tt(je(l(U,c(ta,[e,t,n,r,o,i])),1))},hc,{with(e,t,n){return kc(function(e,t,n){return tt(((e,t,n)=>Jr({...h(vi,e),...Vr(t,vi)},Pe(n)))(e,t,n))}(this,Pu(t),n))},add:(e,t)=>kc(en(0,e,Lu(t))),subtract:(e,t)=>kc(en(1,e,Lu(t))),until:(e,t,n)=>bc(ar(0,e,Hu(t),n)),since:(e,t,n)=>bc(ar(1,e,Hu(t),n)),round:(e,t)=>kc(function(e,t){const[n,r,o]=Re(t,5);var i;return tt((i=o,lt(e,dt(n,r),i)[0]))}(e,t)),equals:(e,t)=>function(e,t){return!Xn(e,t)}(e,Hu(t)),toLocaleString(e,t,n){const[r,o]=Ec(t,n,e);return r.format(o)},toString:xt,toJSON:e=>xt(e),valueOf:Au},{from:(e,t)=>kc(Hu(e,t)),compare:(e,t)=>Xn(Hu(e),Hu(t))}),[Ic,_c]=ju(Ga,g(function(e,t,n,r,o=0,i=0,a=0,s=0,u=0,f=0,d=Ai){return Ke(oe(Ie(l(U,c(ra,[t,n,r,o,i,a,s,u,f])))),e(d))},Br),{...fc,...uc,...hc},{with:(e,t,n)=>_c(function(e,t,n,r){const o=e(t.calendar),i=[...o.fields(Ni),...yi].sort(),a={...to(s=t),hour:s.isoHour,minute:s.isoMinute,second:s.isoSecond,millisecond:s.isoMillisecond,microsecond:s.isoMicrosecond,nanosecond:s.isoNanosecond};var s;const u=Vr(n,i),c=Pe(r),l=o.k(a,u),f={...a,...u};return Ke(oe({...o.F(l,We(c)),...je($s(f),c)}))}(Bs,e,Pu(t),n)),withCalendar:(e,t)=>_c(co(e,Ru(t))),withPlainTime:(e,t)=>_c(function(e,t=sa){return Ke(oe({...e,...t}))}(e,Bu(t))),add:(e,t,n)=>_c(Kt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>_c(Kt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(nr(Bs,0,e,Uu(t),n)),since:(e,t,n)=>bc(nr(Bs,1,e,Uu(t),n)),round:(e,t)=>_c(function(e,t){return Ke(ut(e,...Re(t)),e.calendar)}(e,t)),equals:(e,t)=>function(e,t){return!Gn(e,t)&&e.calendar===t.calendar}(e,Uu(t)),toZonedDateTime:(e,t,n)=>Yc(function(e,t,n,r){const o=((e,t,n,r)=>{const o=(e=>Ha(Ue(e)))(r);return qt(e(t),n,o)})(e,n,t,r);return Ge(ie(o),n,t.calendar)}(cs,e,Fu(t),n)),toPlainDate:e=>Cc(Xe(e)),toPlainTime:e=>kc(tt(e)),toLocaleString(e,t,n){const[r,o]=vc(t,n,e);return r.format(o)},toString:kt,toJSON:e=>kt(e),valueOf:Au},{from:(e,t)=>_c(Uu(e,t)),compare:(e,t)=>Gn(Uu(e),Uu(t))}),[Oc,xc]=ju(Va,g(function(e,t,n,r=Ai,o=wa){const i=U(t),a=U(n),s=e(r);return et(re(_e({isoYear:U(o),isoMonth:i,isoDay:a})),s)},Br),{...fc,...lc},{with:(e,t,n)=>xc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(Ni).sort(),a=(e=>{const t=Hs(e.calendar),[n,r,o]=t.v(e),[i,a]=t.q(n,r);return{monthCode:Mr(i,a),day:o}})(t),s=Vr(n,i),u=o.k(a,s);return o._(u,r)}(Bs,e,Pu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,$u(t)),toPlainDate(e,t){return Cc(function(e,t,n,r){return((e,t,n)=>Gr(e,t,Ri,R(n),Ii))(e(t.calendar),n,r)}(Bs,e,this,t))},toLocaleString(e,t,n){const[r,o]=Dc(t,n,e);return r.format(o)},toString:Ot,toJSON:e=>Ot(e),valueOf:Au},{from:(e,t)=>xc($u(e,t))}),[jc,Pc]=ju(qa,g(function(e,t,n,r=Ai,o=1){const i=U(t),a=U(n),s=e(r);return Qe(ne(_e({isoYear:i,isoMonth:a,isoDay:U(o)})),s)},Br),{...fc,...cc},{with:(e,t,n)=>Pc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(ji).sort(),a=(e=>{const t=Hs(e.calendar),[n,r]=t.v(e),[o,i]=t.q(n,r);return{year:n,monthCode:Mr(o,i)}})(t),s=Vr(n,i),u=o.k(a,s);return o.K(u,r)}(Bs,e,Pu(t),n)),add:(e,t,n)=>Pc(Qt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>Pc(Qt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(or(Bs,0,e,Wu(t),n)),since:(e,t,n)=>bc(or(Bs,1,e,Wu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,Wu(t)),toPlainDate(e,t){return Cc(function(e,t,n,r){return((e,t,n)=>Gr(e,t,Pi,R(n),xi))(e(t.calendar),n,r)}(Bs,e,this,t))},toLocaleString(e,t,n){const[r,o]=Sc(t,n,e);return r.format(o)},toString:_t,toJSON:e=>_t(e),valueOf:Au},{from:(e,t)=>Pc(Wu(e,t)),compare:(e,t)=>Kn(Wu(e),Wu(t))}),[Nc,Cc]=ju(Ja,g(function(e,t,n,r,o=Ai){return Xe(re(_e(l(U,{isoYear:t,isoMonth:n,isoDay:r}))),e(o))},Br),{...fc,...uc},{with:(e,t,n)=>Cc(function(e,t,n,r){const o=e(t.calendar),i=o.fields(Ni).sort(),a=to(t),s=Vr(n,i),u=o.k(a,s);return o.F(u,r)}(Bs,e,Pu(t),n)),withCalendar:(e,t)=>Cc(co(e,Ru(t))),add:(e,t,n)=>Cc(Xt(Bs,0,e,Lu(t),n)),subtract:(e,t,n)=>Cc(Xt(Bs,1,e,Lu(t),n)),until:(e,t,n)=>bc(rr(Bs,0,e,zu(t),n)),since:(e,t,n)=>bc(rr(Bs,1,e,zu(t),n)),equals:(e,t)=>function(e,t){return!Kn(e,t)&&e.calendar===t.calendar}(e,zu(t)),toZonedDateTime(e,t){const n=r(t)?t:{timeZone:t};return Yc(function(e,t,n,r,o){const i=e(o.timeZone),a=o.plainTime,s=void 0!==a?t(a):void 0,u=n(i);let c;return c=s?qt(u,{...r,...s}):Vt(u,{...r,...sa}),Ge(c,i,r.calendar)}(Fu,Hu,cs,e,n))},toPlainDateTime:(e,t)=>_c(function(e,t=sa){return Ke(oe({...e,...t}))}(e,Bu(t))),toPlainYearMonth(e){return Pc(function(e,t,n){return((e,t)=>{const n=qr(e,t,Pi);return e.K(n,void 0)})(e(t.calendar),n)}(Bs,e,this))},toPlainMonthDay(e){return xc(function(e,t,n){return((e,t)=>{const n=qr(e,t,Ri);return e._(n)})(e(t.calendar),n)}(Bs,e,this))},toLocaleString(e,t,n){const[r,o]=Mc(t,n,e);return r.format(o)},toString:It,toJSON:e=>It(e),valueOf:Au},{from:(e,t)=>Cc(zu(e,t)),compare:(e,t)=>Kn(zu(e),zu(t))}),[Rc,Yc]=ju(Xa,g(function(e,t,n,r,o=Ai){return Ge(ie(X(H(n))),t(r),e(o))},Br,function(e){return Wn(Ui(e))}),{...mc,...fc,...Vu(uc),...Vu(hc),offset:e=>Lt(Ju(e).offsetNanoseconds),offsetNanoseconds:e=>Ju(e).offsetNanoseconds,timeZoneId:e=>e.timeZone,hoursInDay:e=>function(e,t){const n=e(t.timeZone),r=ss(t,n),[o,i]=ht(r),a=ee(J(Vt(n,o),Vt(n,i)),bi,1);if(a<=0)throw new RangeError(Fo);return a}(cs,e)},{with:(e,t,n)=>Yc(function(e,t,n,r,o){const{calendar:i,timeZone:a}=n,s=e(i),u=t(a),c=[...s.fields(Ni),...Si].sort(),l=(e=>{const t=ss(e,cs),n=Lt(t.offsetNanoseconds),r=Hs(e.calendar),[o,i,a]=r.v(t),[s,u]=r.q(o,i),c=Mr(s,u);return{...Ws(t),year:o,monthCode:c,day:a,offset:n}})(n),f=Vr(r,c),d=s.k(l,f),h={...l,...f},[m,p,b]=Ne(o,2);return Ge(zt(u,{...s.F(d,We(m)),...je($s(h),m)},In(h.offset),p,b),a,i)}(Bs,cs,e,Pu(t),n)),withCalendar:(e,t)=>Yc(co(e,Ru(t))),withTimeZone:(e,t)=>Yc(function(e,t){return{...e,timeZone:t}}(e,Fu(t))),withPlainTime:(e,t)=>Yc(function(e,t,n){const r=t.timeZone,o=e(r),i={...ss(t,o),...n||sa};let a;return a=n?zt(o,i,i.offsetNanoseconds,2):Vt(o,i),Ge(a,r,t.calendar)}(cs,e,Bu(t))),add:(e,t,n)=>Yc(Gt(Bs,cs,0,e,Lu(t),n)),subtract:(e,t,n)=>Yc(Gt(Bs,cs,1,e,Lu(t),n)),until:(e,t,n)=>bc(nt(tr(Bs,cs,0,e,qu(t),n))),since:(e,t,n)=>bc(nt(tr(Bs,cs,1,e,qu(t),n))),round:(e,t)=>Yc(function(e,t,n){let{epochNanoseconds:r,timeZone:o,calendar:i}=t;const[a,s,u]=Re(n);if(0===a&&1===s)return t;const c=e(o);if(6===a)r=((e,t,n,r)=>{const o=ss(n,t),[i,a]=e(o),s=n.epochNanoseconds,u=Vt(t,i),c=Vt(t,a);if(K(s,u,c))throw new RangeError(Fo);return vt(st(s,u,c),r)?c:u})(ht,c,t,u);else{const e=c.R(r);r=zt(c,ut(pe(r,e),a,s,u),e,2,0,1)}return Ge(r,o,i)}(cs,e,t)),startOfDay:e=>Yc(function(e,t){const{timeZone:n,calendar:r}=t,o=((e,t,n)=>Vt(t,e(ss(n,t))))(mt,e(n),t);return Ge(o,n,r)}(cs,e)),equals:(e,t)=>function(e,t){return!Jn(e,t)&&!!Qn(e.timeZone,t.timeZone)&&e.calendar===t.calendar}(e,qu(t)),toInstant:e=>Fc(function(e){return Je(e.epochNanoseconds)}(e)),toPlainDateTime:e=>_c(no(cs,e)),toPlainDate:e=>Cc(ro(cs,e)),toPlainTime:e=>kc(oo(cs,e)),toLocaleString(e,t,n={}){const[r,o]=yc(t,n,e);return r.format(o)},toString:(e,t)=>Tt(cs,e,t),toJSON:e=>Tt(cs,e),valueOf:Au,getTimeZoneTransition(e,t){const{timeZone:n,epochNanoseconds:r}=e,o=function(e){const t=$e(e,Ia),n=qe(Ia,Ya,t,0);if(!n)throw new RangeError(Eo(Ia,n));return n}(t),i=cs(n).O(r,o);return i?Yc({...e,epochNanoseconds:i}):null}},{from:(e,t)=>Yc(qu(e,t)),compare:(e,t)=>Jn(qu(e),qu(t))}),[Ac,Fc]=ju(Qa,function(e){return Je(ie(X(H(e))))},mc,{add:(e,t)=>Fc(Jt(0,e,Lu(t))),subtract:(e,t)=>Fc(Jt(1,e,Lu(t))),until:(e,t,n)=>bc(er(0,e,Gu(t),n)),since:(e,t,n)=>bc(er(1,e,Gu(t),n)),round:(e,t)=>Fc(function(e,t){const[n,r,o]=Re(t,5,1);return Je(gt(e.epochNanoseconds,n,r,o,1))}(e,t)),equals:(e,t)=>function(e,t){return!Vn(e,t)}(e,Gu(t)),toZonedDateTimeISO:(e,t)=>Yc(function(e,t,n=Ai){return Ge(e.epochNanoseconds,t,n)}(e,Fu(t))),toLocaleString(e,t,n){const[r,o]=wc(t,n,e);return r.format(o)},toString:(e,t)=>Dt(Fu,cs,e,t),toJSON:e=>Dt(Fu,cs,e),valueOf:Au},{from:e=>Fc(Gu(e)),fromEpochMilliseconds:e=>Fc(function(e){return Je(ie(Q($(e),hi)))}(e)),fromEpochNanoseconds:e=>Fc(function(e){return Je(ie(X(H(e))))}(e)),compare:(e,t)=>Vn(Gu(e),Gu(t))}),Lc=Object.defineProperties({},{...u("Temporal.Now"),...a({timeZoneId:()=>ho(),instant:()=>Fc(Je(fo())),zonedDateTimeISO:(e=ho())=>Yc(Ge(fo(),Fu(e),Ai)),plainDateTimeISO:(e=ho())=>_c(Ke(lo(cs(Fu(e))),Ai)),plainDateISO:(e=ho())=>Cc(Xe(lo(cs(Fu(e))),Ai)),plainTimeISO:(e=ho())=>kc(tt(lo(cs(Fu(e)))))})}),Zc=Object.defineProperties({},{...u("Temporal"),...a({PlainYearMonth:jc,PlainMonthDay:Oc,PlainDate:Nc,PlainTime:Tc,PlainDateTime:Ic,ZonedDateTime:Rc,Instant:Ac,Duration:pc,Now:Lc})}),Hc=Ku(),Bc=new WeakMap;function Uc(e,...t){let n=bbn.lng[e]||e;if(t.length){let e=0;return n.replace(/\%([d|s])/g,(n,r)=>{let o=t[e++];o||(o="d"===r?0:"");const i=typeof o;return"d"===r&&"number"!==i?(o=parseFloat(o),isNaN(o)&&(o=0)):"s"===r&&"string"!==i&&(o=""+o),o})}return n}Object.create(Intl),a({DateTimeFormat:Hc});var $c={loggers:{_num:0},datatypes:["xml","html","script","json","jsonp","text","blob"],shortenLen:30,keys:{upDown:[33,34,35,36,38,40],leftRight:[36,35,37,39],dels:[8,46,45],confirm:[13,9],alt:[20,16,17,18,144],numbers:[48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105],numsigns:[109,110,189,190]},comparators:[">=","<=",">","<","="],operators:["+","-","/","*"],tags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],colors:{darkgrey:"#5a6a62",black:"#000000",anthracite:"#454545",grey:"#d3d3d3",white:"#ffffff",beige:"#fdfdfd",lightgrey:"#dcdcdc",pastelblue:"#ddebf6",cyan:"#00c8f8",blue:"#6e9ecf",indigo:"#3f51b5",navy:"#354458",webblue:"#2196f3",teal:"#009688",turquoise:"#1fda9a",pastelgreen:"#e2efda",palegreen:"#ccffcc",green:"#00a03e",olive:"#92b06a",pastelorange:"#fff2cc",yellow:"#fdf200",orange:"#ff9900",pink:"#eb65a0",purple:"#a333c8",red:"#db3340",brown:"#8c6954"},reserved:["abstract","boolean","break","byte","case","catch","char","class","continue","const","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","new","null","package","return","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","while","with"],mockText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",regexp:{url:new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),ip:/^((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])$/,hostname:/^[a-z\d]([a-z\d-]{0,61}[a-z\d])?(\.[a-z\d]([a-z\d-]{0,61}[a-z\d])?)*$/i}},Wc={siteTitle:window.document.title,logging:!1,cdn:"",lang:"en",host:window.location.protocol+"//"+window.location.hostname,url:window.location.href,old_path:null,loading:!1,_enumerated:[],get isEnumerating(){return this._enumerated.length>0},width:0,height:0,focused:!1,last_focus:(new Date).getTime(),sleep:!1,theme:"dark",loaders:[],loadersHistory:[],maxLoadersHistory:50,resizeTimer:!1,hashChanged:0,params:[],isInit:!1,isFocused:!1,isVisible:!document.hidden,timeoff:Math.round((new Date).getTime()/1e3),loggingLevel:5,ignoreUnload:!1,historyDisabled:!1,nav:"ajax",online:window.navigator.onLine},zc=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};class qc extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const Vc=["POST","PUT","PATCH","DELETE"],Jc=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=Vc.includes(e.toUpperCase()),a=new Promise((r,a)=>{o.open(e.toUpperCase(),t,!0);const{body:s,headers:u}=((e,t)=>{const n=new Headers(t||{});let r=e;return null==e||e instanceof FormData||"object"!=typeof e||(n.set("Content-Type","application/json"),r=JSON.stringify(e)),{body:r,headers:n}})(n.data,n.headers);u.forEach((e,t)=>{o.setRequestHeader(t,e)}),"function"==typeof n.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",e=>{const t=e.lengthComputable?e.total:void 0;n.onUploadProgress({loaded:e.loaded,total:t,progress:t?e.loaded/t:void 0})}),o.onreadystatechange=()=>{if(4!==o.readyState)return;const e=(e=>{const t={};return e?(e.trim().split(/[\r\n]+/).forEach(e=>{const n=e.split(": "),r=n.shift(),o=n.join(": ");r&&(t[r.toLowerCase()]=o)}),t):t})(o.getAllResponseHeaders()),t=1223===o.status?204:o.status,i=o.statusText||"";let s=o.responseText;if((e["content-type"]||"").includes("application/json"))try{s=JSON.parse(o.responseText)}catch(e){}const u={data:s,status:t,statusText:i,headers:e,config:n,request:o};if(t>=200&&t<300)r(u);else{const e=new Error("Request failed with status code "+t);e.response=u,e.config=n,e.request=o,a(e)}},o.onerror=()=>{const e=new Error("Network Error");e.config=n,e.request=o,a(e)},o.onabort=()=>{a(new qc("Request canceled"))},i?o.send(s):o.send()});return a.cancel=()=>o.abort(),a};var Gc={isCancel:e=>!(!e||!0!==e.__BBN_CANCEL__),run:(e,t,n={},r)=>{n.baseURL&&!/^https?:\/\//i.test(t)&&(t=n.baseURL.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")),t=((e,t)=>{if(!t)return e;const n=new URLSearchParams(t).toString();return n?e+(e.includes("?")?"&":"?")+n:e})(t,n.params);return"function"==typeof n.onUploadProgress&&Vc.includes(e.toUpperCase())?Jc(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=Vc.includes(e.toUpperCase());if(null!=n.data&&i&&(bbn.fn.log("DATA",n.data),"object"!=typeof n.data||n.data instanceof FormData?o.body=n.data:(o.headers.set("Content-Type","application/json"),o.body=JSON.stringify(n.data))),n.params){const e=new URLSearchParams(n.params).toString();t+=(t.includes("?")?"&":"?")+e}const a=fetch(t,o).then(e=>zc(void 0,void 0,void 0,function*(){let t;const r=e.headers.get("content-type")||"";try{t=r.includes("application/json")?yield e.json():r.startsWith("text/")?yield e.text():r.includes("multipart/")?yield e.arrayBuffer():yield e.blob()}catch(n){t=yield e.text()}const o={data:t,status:e.status,statusText:e.statusText,headers:Object.fromEntries(e.headers.entries()),config:n,request:e};if(!e.ok){const t=new Error("Request failed with status code "+e.status);throw t.response=o,t.config=n,t.request=e,t}return o})).catch(e=>{if("AbortError"===e.name)throw new qc("Request canceled");throw e});return a.cancel=()=>r.abort(),a})(e,t,n,r)}};function Kc(...e){if(!e.length)return!1;for(let t of e)if(["boolean","object","symbol"].includes(typeof t)||""===t||isNaN(t))return!1;return!0}function Xc(...e){if(!e.length)return!1;for(let t of e)if(!t||"object"!=typeof t||!(Symbol.iterator in Object(t)))return!1;return!0}function Qc(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function el(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function tl(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function nl(...e){var t,n,r;if((null===(t=bbn.env)||void 0===t?void 0:t.isDev)&&void 0!==(null===window||void 0===window?void 0:window.console)){let t,o=5,i="log";e[0]&&"object"==typeof e[0]&&e[0]._bbn_console_style&&(e[0]._bbn_console_mode&&tl(console[e[0]._bbn_console_mode])?i=e[0]._bbn_console_mode:(t=e[0]._bbn_console_style,o=e[0]._bbn_console_level),e.shift());const a=window.console[i];if((null===(r=null===(n=window.bbn)||void 0===n?void 0:n.env)||void 0===r?void 0:r.loggingLevel)>=o){let n=0;for(;n<e.length;){let r=typeof e[n],o=[e[n]];"string"!==r&&"number"!==r||o.unshift("%c %s ",t),a.apply(window.console,o),n++}}}return this}function rl(e,t,n){if(!Qc(e)||!el(t))throw nl(arguments),new Error(bbn._("The substr function should be applied to a string and at least a `from` argument should be given"));return t<0&&(t=e.length+t),el(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function ol(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)rl(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=ol(e[r],!0):n[r]=e[r]);return n||!1}function il(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?ol(e):e);r&&o.reverse();for(let n of o)if(!1===t(e[n],n))break}return e}function al(e,t){if(!(Kc(e)&&e>0)){if(Xc(e)){for(let n=0;n<e.length;n++)if(!1===t(e[n],n))return;return e}return il(e,t)}for(let n=0;n<e;n++)if(!1===t(n,n))return}function sl(...e){if(!e.length)return!1;for(let t of e)if("[object Object]"!=={}.toString.apply(t))return!1;return!0}function ul(...e){if(!e.length)return!1;for(let t of e)if(!Array.isArray(t))return!1;return!0}function cl(...e){let t=!1,n=[];for(let r=0;r<e.length;r++)if(!0===e[r])t=!0;else{if(!e[r])continue;if("object"!=typeof e[r])throw new Error(bbn._("Error in extend: all arguments should be object, you have given ")+typeof e[r]);n.push(e[r])}if(!n.length)throw new Error("No argument given");let r,o=n[0];for(let e=1;e<n.length;e++)il(n[e],(e,n)=>{t?ul(e)?(o[n]=ul(o[n])?o[n]:[],al(e,(e,t)=>{if(e&&"object"==typeof e){let r=o[n][t];ul(e)?ul(r)||(r=[]):sl(r)||(r={}),o[n][t]=cl(!0,r,e)}else o[n][t]=e})):sl(e)?o[n]=cl(!0,o[n]&&"object"==typeof o[n]?o[n]:Object.create(Object.getPrototypeOf(e)),e):o[n]=e:(o[n]!==e||void 0===e&&!Object.prototype.hasOwnProperty.apply(o,[n]))&&(o[n]=e)}),r||(r=!!n[e].__bbnNoData);return r&&"bbnData"in window&&(o.__bbnData&&o.__bbnData.unset(),Object.defineProperty(o,"__bbnNoData",{value:!0,enumerable:!1,configurable:!1,writable:!1})),o}const ll=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,fl=(e,t)=>{if(null==t?void 0:t.length){let n={};return il(e,(e,r)=>{t.indexOf(r)>-1&&(n[r]=e)}),n}return e},dl=function(e){const t=hl._connections[e],n=hl._structures[e];let r=null;const o=(e,t)=>{e.onerror=()=>{r=e.error,nl(e.error),t(e.error)}},i=(e,n)=>{const o=t.transaction([e],0===n.toLowerCase().indexOf("r")?"readonly":"readwrite");return o.onabort=()=>{throw r=o.error,new Error(o.error)},[o,o.objectStore(e)]};this.lastError=()=>r,this.insert=(e,t)=>(Array.isArray(t)||(t=[t]),new Promise(n=>{const[r,o]=i(e,"w");let a=t.length;al(t,e=>{const t=o.put(e);t.onerror=()=>{nl(t.error),a--}}),r.oncomplete=()=>{n(a)}})),this.update=(e,t,r,a)=>new Promise(s=>{this.selectAll(e,[],r).then(r=>{if(!r.length)return void s(0);const[u,c]=i(e,"w"),l=n[e],f=l.keys.PRIMARY.columns.length>1?l.keys.PRIMARY.columns:l.keys.PRIMARY.columns[0];let d=0;for(let e=0;e<r.length;e++){const n=cl({},a?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Uc("No primary key in the data"));const i=c.put(n);o(i,s),i.onsuccess=()=>{d++}}u.oncomplete=()=>{s(d)}})}),this.delete=(e,t)=>new Promise(r=>{const[a,s]=i(e,"w"),u=n[e],c=u.keys.PRIMARY.columns.length>1?u.keys.PRIMARY.columns:u.keys.PRIMARY.columns[0];if(!t[c])throw new Error(Uc("No "));const l=s.delete(t[c]);o(l,r),a.oncomplete=()=>{r(1)}}),this.selectOne=(e,t,n,r,o,i)=>new Promise(i=>{this.selectAll(e,[t],n,r,o,1).then(e=>{var n,r;i(null!==(r=null===(n=null==e?void 0:e[0])||void 0===n?void 0:n[t])&&void 0!==r?r:void 0)})}),this.select=(e,t,n,r,o)=>new Promise(i=>{this.selectAll(e,t,n,r,o,1).then(e=>{i(e.length?e[0]:null)})}),this.selectAll=(e,t=[],r=null,a=null,s=0,u=null)=>new Promise(a=>{const[c,l]=i(e,"r"),f=n[e],d=f.keys.PRIMARY.columns.length>1?f.keys.PRIMARY.columns:f.keys.PRIMARY.columns[0],h=sl(r)?Object.keys(r)[0]:!r||ul(r)?null:d,m=[];if(h===d)if(bbn.fn.isArray(null==r?void 0:r[d])){const e=Math.min(r[d].length,u||9999999);for(let n=s||0;n<e;n++){let i=l.get(r[d][n]);i.onsuccess=()=>{let n=i.result;m.push(fl(n,t)),m.length===e&&a(m)},o(i,a)}}else{let e=l.get((null==r?void 0:r[d])||r);e.onsuccess=()=>{let n=e.result;m.push(fl(n,t)),a(m)},o(e,a)}else{const e=l.openCursor();let n=0;e.onsuccess=e=>{const o=e.target.result;o?(r&&bbn.fn.search([o.value],r)||(n>=s&&(m.push(fl(o.value,t)),m.length===u&&a(m)),n++),o.continue()):a(m)},o(e,a)}}),this.getColumnValues=(e,n,r,o,i,a)=>new Promise(n=>{t.transaction([e],"read").objectStore(e)}),this.copyTable=(r,o,i=[],a=null,s=null,u=0,c=null)=>new Promise(l=>{if(t.objectStoreNames.contains(r)||hl.add(e,r,n[o]),!t.objectStoreNames.contains(r))throw l(0),new Error(Uc("The target table %s does not exist",r));this.selectAll(o,i,a,s,u,c).then(e=>{e.length?this.insert(r,e).then(e=>{l(e)}):l(0)})}),this.deleteTable=e=>new Promise(n=>{t.deleteObjectStore(e),n(!0)})},hl={_structures:{},_connections:{},_stores:{},ok:void 0!==ll,updateStructure(e,t,n){const r=t.keys.PRIMARY.columns.length>1?t.keys.PRIMARY.columns:t.keys.PRIMARY.columns[0];if(!n.objectStoreNames.contains(e)){const o=n.createObjectStore(e,{keyPath:r});il(t.keys,(e,t)=>{"PRIMARY"!==t&&o.createIndex(t,e.columns.length>1?e.columns:e.columns[0],{unique:!!e.unique})})}},open(e){return new Promise(t=>{if(hl._connections[e])t(new dl(e));else{if(!hl._structures[e])throw new Error(Uc("Impossible to find a structure for the database %s",e));let n=Math.max.apply(this,[1].concat(Object.keys(hl._structures[e]).map(t=>hl._structures[e][t].num||1)));const r=ll.open(e,n);r.onupgradeneeded=()=>{const t=r.result;il(hl._structures[e],(e,n)=>{this.updateStructure(n,e,t)})},r.onsuccess=()=>{hl._connections[e]=r.result;let n=new dl(e);t(n)}}})},add(e,t,n){var r;if(!(null===(r=null==n?void 0:n.keys)||void 0===r?void 0:r.PRIMARY)||!(null==n?void 0:n.fields))throw new Error(Uc("The database structure for %s is not valid (are there keys and field? Is there a primary?",t));hl._structures[e]||(hl._structures[e]={}),hl._structures[e][t]=n,hl._connections[e]&&this.updateStructure(t,n,hl._connections[e])}};function ml(e,t,n){let r=(new Date).getTime(),o={key:e,url:rl(e,0,e.length-33),loader:t,aborter:n,loading:!0,error:!1,abort:!1,errorMessage:!1,success:!1,start:r};bbn.env.loaders.push(o),bbn.env.loadersHistory.unshift(o);let i=bbn.env.loadersHistory.length;for(;i&&bbn.env.loadersHistory.length>bbn.env.maxLoadersHistory;)i--,bbn.env.loading||bbn.env.loadersHistory.splice(i,1);return r}function pl(e,...t){if("object"==typeof e){const n=[];return 1===t.length&&"string"==typeof t[0]?n.push(...t[0].split(".")):n.push(...t),n.reduce((e,t)=>{if(e)return e[e instanceof Array?parseInt(t):t]},e)}}function bl(e){if(!Qc(e)){if(!e.toString)throw nl(e),new Error(bbn._("removeAccent expects a string"));e=e.toString()}return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function gl(...e){if(!e.length)return!1;for(let t of e)if("[object Date]"!=={}.toString.apply(t))return!1;return!0}function wl(e,t,n,r="asc"){let o=pl(e,n),i=pl(t,n),a=(typeof o).toLowerCase(),s=(typeof i).toLowerCase();if("asc"!==r&&Qc(r)&&"desc"===r.toLowerCase()&&(r="desc"),a!==s)o=a,i=s;else switch(a){case"string":o=bl(o).toLowerCase(),i=bl(i).toLowerCase();break;case"boolean":o=o?1:0,i=i?1:0;break;case"object":gl(o)&&(o=o.getTime(),i=gl(i)?i.getTime():0)}return o<i?"desc"===r?1:-1:o>i?"desc"===r?-1:1:0}function yl(e){return e&&"object"==typeof e?Object.keys(e).length:0}function vl(e){return!e||(ul(e)?!e.length:"object"==typeof e&&!yl(e))}function Ml(...e){if(!e.length)return!1;for(let t of e)if("[object Null]"!=={}.toString.apply(t))return!1;return!0}function El(e){let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return Math.abs(t).toString(16)}function Sl(e){let t=0;for(let n=0;n<e.length;n++){t=e.charCodeAt(n)+(t<<6)+(t<<16)-t,t|=0}return Math.abs(t).toString(16)}function Dl(e){return El(e).padStart(8,"0")+Sl(e).padStart(8,"0")}function Tl(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLElement))return!1;return!0}function kl(e){let t="",n=e;if(e.id)return"#"+e.id;for(;n&&n!==document.body;){let e=n,r=e.localName,o=0;if(!r)break;if(e===document.body)break;e.id&&(t="#"+e.id+">"+t,o=1);let i=n.parentNode,a=Array.from(i.children).filter(t=>t.tagName===e.tagName);if(!o&&a.length>1){let t=Array.from(i.children).indexOf(e)+1;t>1&&(r+=":nth-child("+t+")")}t=r+(t?">"+t:""),n=i}return t}function Il(...e){var t;if(!e.length)return!1;if(!("cp"in bbn)||!("isComponent"in bbn.cp)||"function"!=typeof bbn.cp.isComponent)return!1;for(let n of e){if(!bbn.cp.isComponent(n)||Tl(n)||!(null===(t=n.$el)||void 0===t?void 0:t.bbnCid))return!1}return!0}function _l(e,t=null,n=0,r=null,o=null){if(n||r||(r=new WeakSet),void 0===e)e="__BBN_UNDEFINED__";else if(null===e)e="__BBN_NULL__";else if(null===e)e="__BBN_NULL__";else if("function"==typeof e)e="__BBN_FUNCTION__"+e.toString();else if("symbol"==typeof e)e="__BBN_SYMBOL__"+e.toString();else if("string"==typeof e)e="__BBN_STRING__"+e;else if("number"==typeof e)e="__BBN_NUMBER__"+e.toString();else if("boolean"==typeof e)e="__BBN_BOOLEAN__"+e.toString();else if([void 0,Object,Array,null].includes(null==e?void 0:e.constructor)){if(bbn.fn.isArray(e))if(r.has(e)||t&&t<n)e="__BBN_ARRAY__"+e.constructor.toString();else{r.add(e);let i="";for(let a=0;a<e.length;a++)i+="__BBN_ITEM"+a.toString()+"__"+o(e[a],t,n+1,r,o);e="__BBN_ARRAY__"+i}else if("object"==typeof e)if(r.has(e)||t&&t<n)e="__BBN_OBJECT__"+(e.constructor?e.constructor.toString():"");else{r.add(e);let i="";for(let a in e){let s=a;"string"!=typeof s&&(s=o(s,o,1,1)),i+="__BBN_PROP_"+s+"__"+o(e[a],t,n+1,r,o)}e="__BBN_OBJECT__"+i}}else e=Tl(e)?Il(e)?"__BBN_CP__"+e.$cid:e.bbnId?"__BBN_DOM__"+e.tagName+"/"+e.bbnId+e.bbnHash:"__BBN_DOM__"+kl(e):"__BBN_UNKNOWN_OBJECT__"+e.constructor.toString();return e}function Ol(...e){let t="",n=null;2===e.length&&"number"==typeof e[1]&&(n=e[1],e=[e[0]]);for(let r in e)t+=_l(e[r],n,0,null,_l);return Dl(t)}function xl(e){var t="0123456789abcdef";function n(e){var n,r="";for(n=0;n<=3;n++)r+=t.charAt(e>>8*n+4&15)+t.charAt(e>>8*n&15);return r}function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,a){return r(function(e,t){return e<<t|e>>>32-t}(r(r(t,e),r(o,a)),i),n)}function i(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function a(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}var c,l,f,d,h,m=function(e){var t,n=1+(e.length+8>>6),r=new Array(16*n);for(t=0;t<16*n;t++)r[t]=0;for(t=0;t<e.length;t++)r[t>>2]|=e.charCodeAt(t)<<t%4*8;return r[t>>2]|=128<<t%4*8,r[16*n-2]=8*e.length,r}(e),p=1732584193,b=-271733879,g=-1732584194,w=271733878;for(c=0;c<m.length;c+=16)l=p,f=b,d=g,h=w,p=i(p,b,g,w,m[c+0],7,-680876936),w=i(w,p,b,g,m[c+1],12,-389564586),g=i(g,w,p,b,m[c+2],17,606105819),b=i(b,g,w,p,m[c+3],22,-1044525330),p=i(p,b,g,w,m[c+4],7,-176418897),w=i(w,p,b,g,m[c+5],12,1200080426),g=i(g,w,p,b,m[c+6],17,-1473231341),b=i(b,g,w,p,m[c+7],22,-45705983),p=i(p,b,g,w,m[c+8],7,1770035416),w=i(w,p,b,g,m[c+9],12,-1958414417),g=i(g,w,p,b,m[c+10],17,-42063),b=i(b,g,w,p,m[c+11],22,-1990404162),p=i(p,b,g,w,m[c+12],7,1804603682),w=i(w,p,b,g,m[c+13],12,-40341101),g=i(g,w,p,b,m[c+14],17,-1502002290),p=a(p,b=i(b,g,w,p,m[c+15],22,1236535329),g,w,m[c+1],5,-165796510),w=a(w,p,b,g,m[c+6],9,-1069501632),g=a(g,w,p,b,m[c+11],14,643717713),b=a(b,g,w,p,m[c+0],20,-373897302),p=a(p,b,g,w,m[c+5],5,-701558691),w=a(w,p,b,g,m[c+10],9,38016083),g=a(g,w,p,b,m[c+15],14,-660478335),b=a(b,g,w,p,m[c+4],20,-405537848),p=a(p,b,g,w,m[c+9],5,568446438),w=a(w,p,b,g,m[c+14],9,-1019803690),g=a(g,w,p,b,m[c+3],14,-187363961),b=a(b,g,w,p,m[c+8],20,1163531501),p=a(p,b,g,w,m[c+13],5,-1444681467),w=a(w,p,b,g,m[c+2],9,-51403784),g=a(g,w,p,b,m[c+7],14,1735328473),p=s(p,b=a(b,g,w,p,m[c+12],20,-1926607734),g,w,m[c+5],4,-378558),w=s(w,p,b,g,m[c+8],11,-2022574463),g=s(g,w,p,b,m[c+11],16,1839030562),b=s(b,g,w,p,m[c+14],23,-35309556),p=s(p,b,g,w,m[c+1],4,-1530992060),w=s(w,p,b,g,m[c+4],11,1272893353),g=s(g,w,p,b,m[c+7],16,-155497632),b=s(b,g,w,p,m[c+10],23,-1094730640),p=s(p,b,g,w,m[c+13],4,681279174),w=s(w,p,b,g,m[c+0],11,-358537222),g=s(g,w,p,b,m[c+3],16,-722521979),b=s(b,g,w,p,m[c+6],23,76029189),p=s(p,b,g,w,m[c+9],4,-640364487),w=s(w,p,b,g,m[c+12],11,-421815835),g=s(g,w,p,b,m[c+15],16,530742520),p=u(p,b=s(b,g,w,p,m[c+2],23,-995338651),g,w,m[c+0],6,-198630844),w=u(w,p,b,g,m[c+7],10,1126891415),g=u(g,w,p,b,m[c+14],15,-1416354905),b=u(b,g,w,p,m[c+5],21,-57434055),p=u(p,b,g,w,m[c+12],6,1700485571),w=u(w,p,b,g,m[c+3],10,-1894986606),g=u(g,w,p,b,m[c+10],15,-1051523),b=u(b,g,w,p,m[c+1],21,-2054922799),p=u(p,b,g,w,m[c+8],6,1873313359),w=u(w,p,b,g,m[c+15],10,-30611744),g=u(g,w,p,b,m[c+6],15,-1560198380),b=u(b,g,w,p,m[c+13],21,1309151649),p=u(p,b,g,w,m[c+4],6,-145523070),w=u(w,p,b,g,m[c+11],10,-1120210379),g=u(g,w,p,b,m[c+2],15,718787259),b=u(b,g,w,p,m[c+9],21,-343485551),p=r(p,l),b=r(b,f),g=r(g,d),w=r(w,h);return n(p)+n(b)+n(g)+n(w)}function jl(e){const t="function"==typeof e?e.toString():e;if("string"!=typeof t)throw Error("Unexpected type "+typeof e+" while parsing function");let n,r="",o=!1,i=!1,a=!1,s="",u=0,c=0,l=[],f={},d="",h=['"',"'","`"],m=!1,p=!1,b=!1,g=!1,w=!1,y=!1,v="";for(let e=0;e<t.length;e++)if(b||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])b=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(b||g)continue;if(t[e]===d&&!m&&d)d="",r+=t[e];else if(d)m="\\"===t[e]&&!m,r+=t[e];else if(h.includes(t[e])&&!m)d=t[e],r+=t[e];else if("("===t[e]){if(u++,""!==r.trim()){if("function"===r.trim())a=!0;else if("async"!==r.trim()){s=r.trim();let e=s.match(/^([a-zA-Z0-9_]+)<[a-zA-Z0-9_]+>$/);e&&(s=e[1])}r=""}}else if(")"===t[e])u===c+1&&(p?(f.default=r.trim(),p=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(l.push(f),f={}),r=""),c++;else if(w&&"}"!==t[e])r+=t[e];else{if(u&&u===c&&":"===t[e]){const r=t.substring(e+1).trim().match(/^\s*([a-zA-Z0-9_]+)\s*\{/);if(!r)throw Error("Unexpected ':' while parsing function");v=r[1],n=t.substring(e+r[0].length).trim();break}if(!(r||"="!==t[e]||">"!==t[e+1]||u!==c||c||o)){f.name=t.slice(0,e).trim(),l.push(f),f={},o=!0,n=bbn.fn.substr(t,e+2).trim();break}if(u===c&&"="===t[e]&&">"===t[e+1]){""!==r.trim()&&(f.name=r.trim(),l.push(f),f={},r=""),o=!0,e++;continue}if("="===t[e]&&u>c&&!p)f.name=r.trim(),r="",p=!0;else if(","===t[e])if(w)r+=t[e];else{if(!(u>c))throw Error("Unexpected ',' while parsing function");p?(f.default=r.trim(),p=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(l.push(f),f={}),r=""}else if("{"===t[e]||"}"===t[e]){if(u===c){n=t.substring(e).trim();break}u>c?"{"!==t[e]||w?"}"===t[e]&&w&&(w=!1,r+=t[e]):(w=!0,r=t[e]):r=""}else{if(o){n=t.substring(t.indexOf("=>")+2).trim();break}" "===t[e]?""!==r.trim()&&("async"===r.trim()&&(i=!0),u>c?r+=t[e]:r=""):r+=t[e]}}}else g=!0,r="";else b=!0,r="";if(!n){if(!o)throw Error("Unexpected end of function while parsing function");n=r}n.substr(0,25).indexOf("[native code]")>-1&&(y=!0);const M=l.map(e=>e.name+(e.default?" = "+e.default:"")).join(", ");return{body:n,args:l,argString:M,isArrow:o,hasFunction:a,name:s,isAsync:i,isBinary:y,hash:xl(n+(s?"-"+s:"")+(M?"-"+M:"")),returnType:v}}function Pl(e,t,n){if(n||(n=[]),e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(![void 0,Object,Array,null].includes(null==e?void 0:e.constructor)||![void 0,Object,Array,null].includes(null==t?void 0:t.constructor))return!1;let r=Object.keys(e).sort(),o=Object.keys(t).sort();if(Ol(r)!==Ol(o))return!1;let i=!0;if(e&&"object"==typeof e){if(n.includes(e))return i;n.push(e)}return al(r,n=>{if(!Pl(e[n],t[n]))return i=!1,!1}),i}if(e&&t&&"function"==typeof e&&"function"==typeof t){let n=jl(e),r=jl(t),o=n.hash===r.hash;return o&&n.isBinary&&(o=!1),o}return!1}function Nl(e,t,n){switch(n){case"===":case"=":case"equal":case"eq":case"is":return e===t;case"!==":case"notequal":case"neq":case"isnot":return e!==t;case"!=":case"different":return e!=t;case"contains":case"contain":case"icontains":case"icontain":return!vl(e)&&!vl(t)&&-1!==bl(e).toLowerCase().indexOf(bl(t).toLowerCase());case"doesnotcontain":case"donotcontain":return!(!Ml(e)&&!Ml(t))||-1===bl(e.toLowerCase()).indexOf(bl(t.toLowerCase()));case"starts":case"start":return!Ml(e)&&!Ml(t)&&("string"!=typeof e&&(e=e.toString()||""),"string"!=typeof t&&(t=t.toString()||""),0===e.indexOf(t));case"startswith":case"startsi":case"starti":case"istarts":case"istart":return!Ml(e)&&!Ml(t)&&0===bl(e).toLowerCase().indexOf(bl(t).toLowerCase());case"endswith":case"endsi":case"endi":case"iends":case"iend":return!Ml(e)&&!Ml(t)&&e.lastIndexOf(t)===e.length-t.length;case"like":return!Ml(e)&&!Ml(t)&&bl(e).toLowerCase()===bl(t).toLowerCase();case"gt":case">":return e>t;case"gte":case">=":return e>=t;case"lt":case"<":return e<t;case"lte":case"<=":return e<=t;case"isnull":return null===e;case"isnotnull":return null!==e;case"isempty":return""===e;case"isnotempty":return""!==e;case"==":if(sl(e,t))return Pl(e,t);default:return e==t}}function Cl(e,t){if(!t.conditions||!t.logic||!ul(t.conditions))throw new Error("Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects");let n="AND"===t.logic;return al(t.conditions,r=>{let o;if(r.conditions&&ul(r.conditions))o=Cl(e,r);else if(o=Nl(pl(e,r.field),r.value,r.operator),o){let t=r.field.split("."),n=t.pop();t.length&&al(t,t=>e=e[t]),void 0===pl(e,n)&&void 0!==r.value&&(o=!1)}if(o){if("OR"===t.logic)return n=!0,!1}else if("AND"===t.logic)return n=!1,!1}),n}function Rl(e,t="="){if(!sl(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!ul(e.conditions)){let n=[];il(e,(e,r)=>{sl(e)&&"object"==typeof e.conditions?n.push(Rl(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function Yl(e,t,n=null,r="=",o=0,i=!1){if(!Xc(e))throw new Error(bbn._("The first argument for a search should be iterable")+" "+typeof e+" "+bbn._("given"));if(!e.length)return-1;let a,s,u=!1;if(t)if("string"==typeof t)a={conditions:[{field:t,value:n,operator:r||"="}]};else if(i=!0===r,o="number"==typeof n?n:i?e.length-1:0,"function"==typeof t)u=!0,s=t;else if(sl(t))if("field"in t&&"value"in t)a={conditions:[t],logic:"AND"};else if("conditions"in t)a=t;else{const e=[];for(let n in t)e.push({field:n,value:t[n],operator:"="});a={conditions:e,logic:"AND"}}else ul(t)&&(a={conditions:t,logic:"AND"});else u=!0,s=e=>Cl({value:e},Rl({logic:"AND",conditions:[{field:"value",operator:r||"=",value:n}]}));if(u||a){if("number"!=typeof o&&(o=i?e.length-1:0),!s){const e=Rl(a);s=t=>Cl(t,e)}if(i)for(let t=o;t>=0;t--){if(bbn.env._enumerated.push(!0),s(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}else for(let t=o;t<e.length;t++){if(bbn.env._enumerated.push(!0),s(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}}return-1}function Al(e,t,n=null,r="=",o=0,i=!1,a=!1){let s=Yl(e,t,n,r,o,i);return s>-1?e[s]:t&&["object","function"].includes(typeof t)&&5 in arguments?i:a}function Fl(e,t=null,n=!1){let r=Yl(bbn.env.loaders,{key:e});if(r>-1){let o=bbn.env.loaders.splice(r,1)[0],i=Al(bbn.env.loadersHistory,{key:e,start:o.start});return i&&(i.loading=!1,i.duration=(new Date).getTime()-o.start,"string"==typeof t?(i.errorMessage=t,i.error=!n,i.abort=n):sl(t)&&(i.success=!0)),!0}return!1}function Ll(e){let t=Yl(bbn.env.loaders,{key:e});return t>-1?bbn.env.loaders[t]:null}function Zl(e,t,n=null,r="=",o=0){if(!ul(e))try{e=Array.from(e)}catch(t){throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array")}let i={};const a=[],s="function"==typeof t;if(!t||!e.length)return e;if("object"==typeof t)i=t;else if("string"==typeof t)i[t]=n;else if(!s)throw new Error("Search function error: The prop argument should be a string or an object");let u;u="function"==typeof t?t:(e,t)=>Cl(e,i);for(let t=0;t<e.length&&(bbn.env._enumerated.push(!0),!(u(e[t],t)&&(bbn.env._enumerated.pop(),a.push(e[t]),bbn.env._enumerated.push(!0),o&&a.length>=o)));t++)bbn.env._enumerated.pop();return a}function Hl(e){if(yl(e)){bbn.var.colors||(bbn.var.colors={});let t=document.createElement("style");document.head.appendChild(t);let n=t.sheet,r=0;il(e,(e,t)=>{bbn.var.colors[t]=e,n.insertRule(".bbn-"+t+", .bbn-color-text-"+t+" {color: "+e+" !important;}",r),n.insertRule("svg.bbn-"+t+", .bbn-"+t+" svg, svg.bbn-color-text-"+t+", .bbn-color-text-"+t+" svg {fill: "+e+";}",r),n.insertRule(".bbn-bg-"+t+", .bbn-color-bg-"+t+", .bbn-color-background-"+t+" {background-color: "+e+" !important;}",r),n.insertRule(".bbn-border-"+t+", .bbn-color-border-"+t+" {border-color: "+e+" !important;}",r),n.insertRule(".bbn-color-"+t+" {border-color: "+e+"; background-color: "+e+"; color: "+e+";}",r)})}}function Bl(e,t=null,n=""){if(e&&"FORM"===e.tagName){let r=(t,n)=>{let r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",t),r.setAttribute("value",n),e.appendChild(r)};t=JSON.parse(JSON.stringify(t||{})),n=n||"",t&&il(t,(t,o)=>{let i=n?`${n}[${o}]`:o;t instanceof Date?r(i,t.toISOString()):t instanceof Array?t.forEach((t,n)=>{const o=`${i}[${n}]`;"object"==typeof t?Bl(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):Bl(e,t,i)})}}function Ul(e,t){let n=0;al(t,t=>{t.style[e]="auto"}),al(t,(t,r)=>{let o=t.getBoundingClientRect(),i=o[e]%1?o[e]-o[e]%1+1:o[e];i>n&&(n=i)}),al(t,(t,r)=>{n&&(t.style[e]=n+"px")})}function $l(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Wl(e,t,n,r=""){return n.toString().replace(sl(e)?e:new RegExp($l(e),"g"+r),t)}function zl(e,t,n){let r={};return t&&il(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+xl((n||"json")+JSON.stringify(r))}function ql(e,t=null,n=null,r=null,o=null,i=null){if(null===t&&e&&"object"==typeof e&&e.url&&(e.abort&&(i=e.abort),e.failure&&(o=e.failure),e.success&&(r=e.success),e.data&&(n=e.data),e.datatype&&(t=e.datatype),e=e.url),e&&e&&"string"==typeof e){-1===e.indexOf("://")&&(e=Wl("//","/",e)),t||(t="json");let a=zl(e,n,t),s=Ll(a);if(null==s?void 0:s.loader)return s.loader;bbn.env.token&&cl(n||{},{_bbn_token:bbn.env.token});const u=new AbortController;let c={responseType:t,signal:u.signal};"text"===t?c.headers={accept:"text/javascript","Content-Type":"text/javascript"}:"json"===t?c.headers={accept:"application/json","Content-Type":"application/json"}:"html"===t&&(c.headers={accept:"text/html","Content-Type":"text/html"});let l="get";sl(n)&&yl(n)>0&&(c.data=n,l="post");let f=Gc.run(l,e,c).then(t=>{if(Fl(a,t),bbn.fn.defaultEndLoadingFunction(e,d,n,t),200===t.status)tl(r)&&r(t.data,t.headers);else{let e=1;tl(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t)}return t}).catch(t=>{let r=Gc.isCancel(t);if(Fl(a,t.message||t.response.data,r),bbn.fn.defaultEndLoadingFunction(e,d,n,t),r){let n=1;tl(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;tl(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t.response)}return t.response}),d=ml(a,f,u);return bbn.fn.defaultStartLoadingFunction(e,d,n,a),f}}const Vl=new TextDecoder;function Jl(e){return Vl.decode(e)}function Gl(e,t){if(e&&Qc(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&rl(n,-r)===t)return rl(n,0,n.length-r)}return""}const Kl=[["y","year",31536e6],["m","month",2592e6],["w","week",6048e5],["d","day",864e5],["h","hour",36e5],["i","minute",6e4],["s","second",1e3],["l","millisecond",1]],Xl={years:"y",year:"y",YEARS:"y",YEAR:"y",Years:"y",Year:"y",YYYY:"y",YY:"y",yyyy:"y",yy:"y",months:"m",month:"m",Months:"m",Month:"m",MONTHS:"m",MONTH:"m",MMMM:"m",MMM:"m",MM:"m",weekday:"e",WEEKDAY:"e",ee:"e",EE:"e",ddd:"e",days:"d",day:"d",Days:"d",Day:"d",DAYS:"d",DAY:"d",DD:"d",dd:"d",hours:"h",hour:"h",Hours:"h",Hour:"h",HOURS:"h",HOUR:"h",HH:"h",hr:"h",hh:"h",minutes:"i",minute:"i",Minutes:"i",Minute:"i",MINUTES:"i",MINUTE:"i",II:"i",ii:"i",mn:"i",mm:"i",min:"i",ms:"l",SSS:"l",sss:"l",SS:"s",ss:"s",seconds:"s",second:"s",Seconds:"s",Second:"s",SECONDS:"s",SECOND:"s",sec:"s",WW:"w",Y:"y",y:"y",M:"m",m:"m",e:"e",E:"e",D:"d",d:"d",H:"h",h:"h",n:"i",i:"i",s:"s",S:"s",W:"w",w:"w",ZZ:"z",Z:"z"},Ql={y:"YYYY",m:"MM",d:"DD",e:"EE",w:"WW",h:"HH",i:"II",s:"SS",z:"Z"};function ef(...e){if(!e.length)return!1;for(let t of e)if(null!==t&&("object"==typeof t||"function"==typeof t))return!1;return!0}var tf,nf,rf,of,af=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},sf=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const uf=Zc.ZonedDateTime.from("1970-01-01T00:00Z[UTC]");class cf{static fromUnit(e,t){const n=Xl[t]||"ms",r=["y"===n?e:0,"m"===n?e:0,"w"===n?e:0,"d"===n?e:0,"h"===n?e:0,"i"===n?e:0,"s"===n?e:0,["y","m","w","d","h","i","s"].includes(n)?0:e],o=new Zc.Duration(...r);return new cf(o)}constructor(e,t,n,r,o,i,a,s,u){tf.add(this),nf.set(this,void 0),rf.set(this,void 0),e instanceof Zc.Duration?af(this,nf,e,"f"):af(this,nf,"object"==typeof e?new Zc.Duration(e.years||0,e.months||0,e.weeks||0,e.days||0,e.hours||0,e.minutes||0,e.seconds||0,e.milliseconds||0,0,0):new Zc.Duration(e||0,t||0,n||0,r||0,o||0,i||0,a||0,s||0,0,0),"f");const c=Xl[u||""]||u;af(this,rf,c||"ms","f"),Al(Kl,e=>e[0]===c),Object.defineProperty(this,"isValid",{value:!1,writable:!1,configurable:!0})}setValid(e){Object.defineProperty(this,"isValid",{value:e,writable:!1,configurable:!1})}get value(){return sf(this,nf,"f")}years(e=!1){return sf(this,tf,"m",of).call(this,"year",e)}months(e=!1){return sf(this,tf,"m",of).call(this,"month",e)}weeks(e=!1){return sf(this,tf,"m",of).call(this,"week",e)}days(e=!1){return sf(this,tf,"m",of).call(this,"day",e)}hours(e=!1){return sf(this,tf,"m",of).call(this,"hour",e)}minutes(e=!1){return sf(this,tf,"m",of).call(this,"minute",e)}seconds(e=!1){return sf(this,tf,"m",of).call(this,"second",e)}toJSON(){return this.value.toJSON()}asYears(){return sf(this,nf,"f").total({unit:"year",relativeTo:uf})}asMonths(){return sf(this,nf,"f").total({unit:"month",relativeTo:uf})}asWeeks(){return sf(this,nf,"f").total({unit:"week",relativeTo:uf})}asDays(){return sf(this,nf,"f").total({unit:"day",relativeTo:uf})}asHours(){return sf(this,nf,"f").total({unit:"hour",relativeTo:uf})}asMinutes(){return sf(this,nf,"f").total({unit:"minute",relativeTo:uf})}asSeconds(){return sf(this,nf,"f").total({unit:"second",relativeTo:uf})}add(e,t){let n=sf(this,rf,"f");if(t)if(Xl[t]){const e=Al(Kl,e=>e[0]===Xl[t]);e&&(n=e[1])}else n=t;const r=n+"s";if(!["years","months","weeks","days","hours","minutes","seconds","milliseconds"].includes(r))throw new Error("Invalid unit for duration: "+(null!=t?t:n));const o={[r]:e},i=sf(this,nf,"f").add(o);return new cf(i,void 0,void 0,void 0,void 0,void 0,void 0,void 0,sf(this,rf,"f"))}subtract(e,t){return this.add(-e,t)}toMilliseconds(){const e=sf(this,nf,"f");return e.years||e.months||e.weeks||e.days?e.total({unit:"millisecond",relativeTo:uf}):e.total({unit:"millisecond"})}}nf=new WeakMap,rf=new WeakMap,tf=new WeakSet,of=function(e,t){const n=sf(this,nf,"f");if(t)switch(e){case"year":return n.years;case"month":return n.months;case"week":return n.weeks;case"day":return n.days;case"hour":return n.hours;case"minute":return n.minutes;case"second":return n.seconds}const r=n.total({unit:e,relativeTo:uf});return Math.floor(r)};var lf,ff=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},df=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class hf{constructor(e){this.__bbnNoData=!0,this.__isBbnDt=!0,lf.set(this,void 0),this.getWeekdayIndex=(e,t)=>{const n=t||bbn.env.lang,r=e.trim().toLowerCase(),o=[n,...navigator.languages];for(let e=0;e<o.length;e++){if(!o[e])continue;const t=new Intl.DateTimeFormat(o[e],{weekday:"long"});for(let e=0;e<7;e++){const n=new Date(2023,0,1+e);if(t.format(n).toLowerCase()===r)return e}}throw new Error(`Unknown weekday name '${e}' for locale '${n}'`)},Object.defineProperty(this,"isValid",{value:!0,writable:!1,configurable:!0}),ff(this,lf,e,"f");const t=new Date;Object.defineProperty(this,"defaultValue",{value:{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()},writable:!1,configurable:!1})}setValid(e){Object.defineProperty(this,"isValid",{value:e,writable:!1,configurable:!1})}get value(){return df(this,lf,"f")}get hasFullDate(){return"year"in this.value&&"month"in this.value&&"day"in this.value}toEpochMs(){if("zoned"===this.kind){return this.value.toInstant().epochMilliseconds}const e=hf.systemTimeZoneId;let t;switch(this.kind){case"dateTime":return this.value.toZonedDateTime(e).toInstant().epochMilliseconds;case"date":return this.value.toZonedDateTime({timeZone:e,plainTime:{hour:this.defaultValue.hour,minute:this.defaultValue.minute,second:this.defaultValue.second,millisecond:this.defaultValue.millisecond}}).toInstant().epochMilliseconds;case"time":{const n=this.value;t=`${Zc.Now.plainDateISO().toString()}T${n.toString()}[${e}]`}case"yearMonth":t=`${this.value.toPlainDate({day:1}).toString()}T00:00[${e}]`;case"monthDay":{const n=this.value,r=Zc.Now.plainDateISO();t=`${n.toPlainDate({year:r.year}).toString()}T00:00[${e}]`}}if(t){return Zc.ZonedDateTime.from(t).toInstant().epochMilliseconds}throw new Error(`Unsupported kind '${this.kind}' in toEpochMs`)}static nowForKind(e){switch(e){case"zoned":return Zc.Now.zonedDateTimeISO();case"dateTime":return Zc.Now.plainDateTimeISO();case"date":return Zc.Now.plainDateISO();case"time":return Zc.Now.plainTimeISO();case"yearMonth":{const e=Zc.Now.plainDateISO();return new Zc.PlainYearMonth(e.year,e.month)}case"monthDay":{const e=Zc.Now.plainDateISO();return new Zc.PlainMonthDay(e.month,e.day,void 0,e.year)}default:throw new Error(`Unsupported kind '${e}' in nowForKind`)}}withValue(e){return new(0,this.constructor)(e)}static compare(e,t,n){if(!e||!t)throw new TypeError("Both arguments must be Temporal values");const r=Zc.Now.timeZoneId(),o=Xl[n]?Al(Kl,e=>e[0]===Xl[n])[1]:void 0,i=e=>e instanceof hf,a=e=>i(e)?e.value:e,s=e=>{if(i(e))switch(e.kind){case"zoned":return e.value;case"dateTime":{const t=`${e.value.toString()}[${r}]`;return Zc.ZonedDateTime.from(t)}case"date":{const t=`${e.value.toString()}T00:00[${r}]`;return Zc.ZonedDateTime.from(t)}case"yearMonth":{const t=`${e.value.toPlainDate({day:1}).toString()}T00:00[${r}]`;return Zc.ZonedDateTime.from(t)}default:throw new TypeError(`Cannot convert kind '${e.kind}' to ZonedDateTime for comparison`)}if(e instanceof Zc.ZonedDateTime)return e;throw new TypeError("toZdt expects a bbnDt wrapper or ZonedDateTime")},u=a(e),c=a(t);if(u.constructor===c.constructor){const e=u.constructor;if(void 0===o){if("function"!=typeof e.compare)throw new TypeError("This Temporal type has no static compare");return e.compare(u,c)}if("function"!=typeof u.until)throw new TypeError("This Temporal type does not support until/since");return u.until(c,{smallestUnit:o,largestUnit:o,roundingMode:"floor"}).sign}const l=new Set(["zoned","dateTime","date","yearMonth"]);if(i(e)&&i(t)&&l.has(e.kind)&&l.has(t.kind)){const n=s(e),r=s(t);if(void 0===o)return Zc.ZonedDateTime.compare(n,r);if("function"!=typeof n.until)throw new TypeError("ZonedDateTime does not support until/since");return n.until(r,{smallestUnit:o,largestUnit:o,roundingMode:"floor"}).sign}throw new TypeError("Cannot compare different Temporal or bbnDt types")}static parse(e,t,n="auto",r){return bbn.dt(e,t,n,r)}parse(e,t,n){return hf.parse(e,t,n||this.kind)}compare(e,t){return e instanceof hf||(e=bbn.dt(e,null,this.kind)),hf.compare(this,e,t)}add(e,t){if(this.value){if(this.value instanceof Zc.PlainMonthDay||"function"!=typeof this.value.add)throw new TypeError("This Temporal type does not support add/subtract");if(e instanceof cf){const t=this.value.add(e.value);return new this.constructor(t)}if("object"==typeof e){const t=new cf(e),n=this.value.add(t.value);return new this.constructor(n)}{if(!t)throw new Error("Unit must be specified when adding a number");const n=cf.fromUnit(e,t),r=this.value.add(n.value);return new this.constructor(r)}}}subtract(e,t){if(this.value){if(this.value instanceof Zc.PlainMonthDay||"function"!=typeof this.value.subtract)throw new TypeError("This Temporal type does not support add/subtract");if(e instanceof cf){const t=this.value.subtract(e.value);return new this.constructor(t)}if("object"==typeof e){const t=new cf(e),n=this.value.subtract(t.value);return new this.constructor(n)}{if(!t)throw new Error("Unit must be specified when adding a number");const n=cf.fromUnit(e,t),r=this.value.subtract(n.value);return new this.constructor(r)}}}duration(e,t){return cf.fromUnit(e,t)}isBefore(e,t){return this.compare(e,t)<0}isBeforeOrSame(e,t){return this.compare(e,t)<=0}isAfter(e,t){return this.compare(e,t)>0}isAfterOrSame(e,t){return this.compare(e,t)>=0}isSame(e,t){return 0===this.compare(e,t)}equals(e){return this.isSame(e)}toJSON(){if("toZonedDateTime"in df(this,lf,"f")){const e=df(this,lf,"f").toZonedDateTime(hf.systemTimeZoneId).withTimeZone("UTC");return bbn.dt(e).format("YYYY-MM-DDTHH:II:SS.SSS")+"Z"}if("zoned"===this.kind)return this.timezone("America/New_York").format("YYYY-MM-DDTHH:II:SS.SSS")+"Z"}timezone(e){switch(this.kind){case"zoned":if(void 0===e){return this.value.timeZoneId}{const t=this.value.withTimeZone(e);return bbn.dt(t)}case"dateTime":if(void 0===e){const e=`${this.value.toString()}[${hf.systemTimeZoneId}]`;return Zc.ZonedDateTime.from(e).timeZoneId}{const t=`${this.value.toString()}[${e}]`,n=Zc.ZonedDateTime.from(t);return bbn.dt(n)}default:throw new Error(`timezone() is not supported for kind '${this.kind}'`)}}toString(){return new Date(this.valueOf()).toString()}year(e){if(this.value){if(!("year"in this.value))throw new Error("year() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({year:e});return new this.constructor(t)}return this.value.year}}month(e){if(this.value){if(!("month"in this.value))throw new Error("month() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({month:e});return new this.constructor(t)}return this.value.month}}day(e){if(this.value){if(!("day"in this.value))throw new Error("day() is not supported for this type");if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({day:e});return new this.constructor(t)}return this.value.day}}hour(e){if(this.value){if(!("hour"in this.value)){if(this.hasFullDate)return 0;throw new Error("hour() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({hour:e});return new this.constructor(t)}return this.value.hour}}minute(e){if(this.value){if(!("minute"in this.value)){if(this.hasFullDate)return 0;throw new Error("minute() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({minute:e});return new this.constructor(t)}return this.value.minute}}second(e){if(this.value){if(!("second"in this.value)){if(this.hasFullDate)return 0;throw new Error("second() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({second:e});return new this.constructor(t)}return this.value.second}}millisecond(e){if(this.value){if(!("millisecond"in this.value)){if(this.hasFullDate)return 0;throw new Error("millisecond() is not supported for this type")}if(void 0!==e&&!(e instanceof Event)){const t=this.value.with({millisecond:e});return new this.constructor(t)}return this.value.millisecond}}weekday(e,t){if(this.value){if(!("dayOfWeek"in this.value))throw new Error("weekday() is not supported for this type");return void 0===e||e instanceof Event?this.value.dayOfWeek%7:this.setWeekday(e,t)}}date(e){if(this.value){if(!this.hasFullDate)throw new Error("date() is not supported for this type");return!(0 in arguments)||void 0===e||e instanceof Event?this.YYYY+"-"+this.MM+"-"+this.DD:this.parse(e,"Y-m-d")}}datetime(e){return!(0 in arguments)||void 0===e||e instanceof Event?this.YYYY+"-"+this.MM+"-"+this.DD+" "+this.HH+":"+this.II+":"+this.SS:"date"===this.kind?this.parse(this.date()+" "+e,"Y-m-d 00:00:00","dateTime"):this.parse(e,"Y-m-d H:i:s")}time(e){return!(0 in arguments)||void 0===e||e instanceof Event?this.HH+":"+this.II+":"+this.SS:"zoned"===this.kind?this.parse(this.date()+" "+e+" GMT"+this.value.timeZoneId,"Y-m-d H:i:s[ GMT]Z","dateTime"):["dateTime","date"].includes(this.kind)?this.parse(this.date()+" "+e,"Y-m-d H:i:s","dateTime"):this.parse(e,"H:i:s")}fdate(e=!1,t=!1){return this.value?bbn.dt.locales.formatters[e?"long":"numeric"].format(new Date(this.toEpochMs())):""}ftime(e=!0){return this.value?this.format("HH:II"+(e?":SS":"")):""}week(){if(!this.value)return;const e=this.year(),t=new Date(Date.UTC(e,this.month()-1,this.day())),n=new Date(Date.UTC(e,0,1)),r=Math.floor((t.getTime()-n.getTime())/864e5),o=n.getUTCDay();let i=(bbn.dt.locales.firstDayOfWeek-o+7)%7;const a=0===i?7:i;if(r<a)return 1;const s=r-a;return 2+Math.floor(s/7)}get YYYY(){if("year"in this.value)return this.year().toString()}get YY(){if("year"in this.value)return rl(this.year().toString(),2,2)}get MMMM(){if("month"in this.value)return bbn.dt.locales.monthsLong[this.month()-1]}get MMM(){if("month"in this.value)return bbn.dt.locales.monthsShort[this.month()-1]}get MM(){if("month"in this.value){const e=parseInt(this.month().toString());return e<10?"0"+e.toString():e.toString()}}get M(){if("month"in this.value)return this.month().toString()}get EE(){if("dayOfWeek"in this.value)return this.value.dayOfWeek.toString()}get DD(){if("day"in this.value){const e=parseInt(this.day().toString());return e<10?"0"+e.toString():e.toString()}}get d(){if("day"in this.value)return this.day().toString()}get dddd(){if("dayOfWeek"in this.value)return this.getWeekday(this.value.dayOfWeek,"long")}get ddd(){if("dayOfWeek"in this.value)return this.getWeekday(this.value.dayOfWeek,"short")}get D(){if("day"in this.value)return this.day().toString()}get HH(){if("hour"in this.value){const e=parseInt(this.hour().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.hour.toString().padStart(2,"0")}get H(){return"hour"in this.value?this.hour().toString():this.hasFullDate?"0":void 0}get II(){if("minute"in this.value){const e=parseInt(this.minute().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.minute.toString().padStart(2,"0")}get mm(){if("minute"in this.value){const e=parseInt(this.minute().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.minute.toString().padStart(2,"0")}get I(){return"minute"in this.value?this.minute().toString():this.hasFullDate?"0":void 0}get SS(){if("second"in this.value){const e=parseInt(this.second().toString());return e<10?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.second.toString().padStart(2,"0")}get SSS(){if("millisecond"in this.value){const e=parseInt(this.millisecond().toString());return e<10?"00"+e.toString():e<100?"0"+e.toString():e.toString()}if(this.hasFullDate)return this.defaultValue.millisecond.toString().padStart(3,"0")}get S(){return"second"in this.value?this.second().toString():this.hasFullDate?"0":void 0}get WW(){if("weekOfYear"in this.value)return this.value.weekOfYear.toString().padStart(2,"0")}get W(){if("weekOfYear"in this.value)return this.value.weekOfYear.toString()}get Z(){if("zoned"===this.kind){return this.value.offset}}get ZZ(){if("zoned"===this.kind){return this.value.offset.replace(":","")}}unix(e=!1){if("number"==typeof e){return new(0,this.constructor)(new Date(e))}return e?this.toEpochMs():Math.floor(this.toEpochMs()/1e3)}format(e="YYYY-MM-DD HH:II:SS"){let t="";if(e){const n=new RegExp("([|]|"+Object.keys(Xl).join("|")+")","g");let r=0;al(e.split(n),e=>{if("["!==e)if("]"!==e)if(r>0)t+=e;else if(e in Xl)if(e in this&&ef(this[e]))t+=this[e];else{t+=this[Ql[Xl[e]]]||""}else t+=e;else r--;else r++})}return t}calendar(e){const t=new this.constructor,n=this.startOf("day"),r=t.startOf("day"),o=n.diff(r,"day"),i={numeric:"auto"};e&&(i.style="short");const a=new Intl.RelativeTimeFormat(bbn.env.lang,i);let s="",u=[],c="";if(o>=-1&&o<=1)u=a.formatToParts(o,"day");else if(o>=-6&&o<-1)c=this.dddd+", ",u=a.formatToParts(o,"day");else{if(!(o<=6&&o>1))return this.fdate();c=this.dddd,u=[]}return bbn.fn.each(u,e=>{s+=e.value}),`${c}${s} ${this.ftime()}`}matchFormat(e,t){try{return this.parse(e,t),!0}catch(e){return!1}}getWeekday(e,t="long",n){if(!t){const t=this.getWeekday(e,"narrow",n),r=this.getWeekday(e,"short",n),o=this.getWeekday(e,"long",n);return{letter:t,abbr:r,full:o,long:o,short:r,narrow:t}}let r;if("letter"===t)r="narrow";else if("abbr"===t)r="short";else if("full"===t)r="long";else{if(!["long","short","narrow"].includes(t))throw new Error("Invalid mode for getWeekDay: "+t+'. Allowed values are "long", "short", "narrow", "letter", "abbr", "full".');r=t}return new Date(2023,0,1+e).toLocaleDateString([n||bbn.env.lang,...navigator.languages],{weekday:r})}setWeekday(e,t=!1,n){let r;if("string"==typeof e&&(e=this.getWeekdayIndex(e,n)),"number"!=typeof e)throw new TypeError("weekday must be a number (0–6) or a string");if(e<0||e>6)throw new RangeError("weekday number must be between 0 and 6");r=e;const o=this.weekday();let i;return t?(i=(o-r+7)%7,0===i&&(i=7),i=-i):(i=(r-o+7)%7,0===i&&(i=7)),this.add(i,"d")}diff(e,t="",n=!1){let r;if(e instanceof hf)r=e.toEpochMs();else if(e instanceof Zc.ZonedDateTime||e instanceof Zc.PlainDateTime||e instanceof Zc.PlainDate||e instanceof Zc.PlainTime||e instanceof Zc.PlainYearMonth||e instanceof Zc.PlainMonthDay){r={kind:this.kind,value:e}.toEpochMs()}else{if("string"!=typeof e&&"number"!=typeof e)throw bbn.fn.log("DATE??",e),new TypeError("Unsupported date argument for diff");r=this.parse(String(e),"").toEpochMs()}let o=this.toEpochMs()-r;if(n&&(o=Math.abs(o)),!t)return o;const i=Xl[t]||t,a=Al(Kl,e=>e[0]===i);if(!a)throw new Error("Invalid unit for diff: "+t);const[,,s]=a;return Math.floor(o/s)}guessUnit(e){const t=Math.abs(e);for(const[e,n,r]of Kl)if(t>=r||"millisecond"===n)return e;return null}fromNow(e=""){hf.nowForKind(this.kind);const t=bbn.dt(void 0,null,this.kind),n=this.diff(t),r=Xl[e]||this.guessUnit(n);if(!r)throw new Error("Cannot guess unit for fromNow");const o=this.diff(t,r),i=new Intl.RelativeTimeFormat([bbn.env.lang,...navigator.languages],{numeric:"auto"}),a=Al(Kl,e=>e[0]===r);if(!a)throw new Error("Invalid unit for fromNow: "+e);const[,s]=a;return i.format(o,s)}from(e,t=""){const n=this.diff(e),r=Xl[t]||this.guessUnit(n);if(!r)throw new Error("Cannot guess unit for fromDate");const o=this.diff(e,r),i=r;return o>0?Uc("%d %s before",o,i):o<0?Uc("%d %s after",-o,i):Uc("The same %s",i)}startOf(e="d"){var t,n;const r=Xl[e]||e;if(!r)throw new Error("Invalid unit for startOf: "+e);let o=this.value;const i=e=>{const t={};return"hour"in e?(Object.assign(t,{hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),e.with(t)):e};switch(r){case"y":if(!("year"in o))throw new Error('startOf("y") only valid for year-based types');o=i(o.with({month:1,day:1}));break;case"m":if(!("month"in o))throw new Error('startOf("m") only valid for month-based types');o=i(o.with({day:1}));break;case"w":{const e="toPlainDate"in o?o.toPlainDate():o,r=e.dayOfWeek-1,a=e.subtract({days:r});o="toPlainDateTime"in o?i(a.toPlainDateTime(null!==(n=null===(t=o.toPlainTime)||void 0===t?void 0:t.call(o))&&void 0!==n?n:Zc.PlainTime.from("00:00"))):a;break}case"d":o=i(o);break;case"h":o=o.with({minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});break;case"i":o=o.with({second:0,millisecond:0,microsecond:0,nanosecond:0});break;case"s":o=o.with({millisecond:0,microsecond:0,nanosecond:0});break;default:throw new Error("Invalid unit for startOf: "+e)}return this.withValue(o)}endOf(e="d"){const t=Zc.Now.timeZoneId(),n=Xl[e]||e;let r,o=(()=>{switch(this.kind){case"zoned":return this.value;case"dateTime":{const e=`${this.value.toString()}[${t}]`;return Zc.ZonedDateTime.from(e)}case"date":{const e=`${this.value.toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(e)}case"time":{const e=this.value,n=`${Zc.Now.plainDateISO().toString()}T${e.toString()}[${t}]`;return Zc.ZonedDateTime.from(n)}case"yearMonth":{const e=`${this.value.toPlainDate({day:1}).toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(e)}case"monthDay":{const e=this.value,n=Zc.Now.plainDateISO(),r=`${e.toPlainDate({year:n.year}).toString()}T00:00[${t}]`;return Zc.ZonedDateTime.from(r)}default:throw new Error("Unsupported kind in endOf")}})(this.value);switch(n){case"y":r=o.with({month:1,day:1,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({years:1});break;case"m":r=o.with({day:1,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({months:1});break;case"w":{const e=-(o.toPlainDate().dayOfWeek-1);r=o.add({days:e}).with({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({weeks:1});break}case"d":r=o.with({hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({days:1});break;case"h":r=o.with({minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}).add({hours:1});break;case"i":case"n":case"min":r=o.with({second:0,millisecond:0,microsecond:0,nanosecond:0}).add({minutes:1});break;case"s":r=o.with({millisecond:0,microsecond:0,nanosecond:0}).add({seconds:1});break;default:throw new Error("Invalid unit for endOf: "+e)}const i=r.subtract({milliseconds:1});switch(this.kind){case"zoned":return this.withValue(i);case"dateTime":return this.withValue(i.toPlainDateTime());case"date":return this.withValue(i.toPlainDate());case"time":return this.withValue(i.toPlainTime());case"yearMonth":{const e=i.toPlainDate();return this.withValue(new Zc.PlainYearMonth(e.year,e.month))}case"monthDay":{const e=i.toPlainDate();return this.withValue(new Zc.PlainMonthDay(e.month,e.day))}default:throw new Error("Unsupported kind in endOf")}}clone(){return this.withValue(this.value)}isLeapYear(){if(this.isValid){const e=this.year();return e%4==0&&e%100!=0||e%400==0}return!1}daysInMonth(){if(this.isValid)switch(this.month()){case 2:return this.year()%4==0?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}}valueOf(){return this.unix(!0)}}lf=new WeakMap,hf.systemTimeZoneId=Zc.Now.timeZoneId();class mf extends hf{constructor(e,t,n,r,o,i,a){let s;if(e)if(void 0===t)if(e instanceof Zc.PlainDateTime)s=e;else if(e instanceof Date)s=new Zc.PlainDateTime(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");s=Zc.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(hf.systemTimeZoneId).toPlainDateTime()}else s=new Zc.PlainDateTime(e,t,n||1,r||0,o||0,i||0,a||0);else s=Zc.PlainDateTime.from(Zc.Now.plainDateTimeISO());super(s),this.kind="dateTime"}format(e){return[!0,"long","full"].includes(e)&&(e=Al(bbn.dt.locales.date,{year:"numeric",month:"long",day:"long",weekday:"long",hour:"2-digit",minute:"2-digit",second:void 0}).pattern),e||(e=Al(bbn.dt.locales.date,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:void 0}).pattern),hf.prototype.format.call(this,e)}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1,this.day(),this.hour(),this.minute(),this.second()),o=Object.assign(Object.assign({year:"numeric",month:e?"long":"2-digit",day:"2-digit"},n?{weekday:e?"long":"short"}:{}),t?{hour:e?"2-digit":"numeric",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}class pf extends hf{constructor(e,t,n){let r;if(e)if(void 0===t)if(e instanceof Zc.PlainDate)r=e;else if(e instanceof Date)r=new Zc.PlainDate(e.getFullYear(),e.getMonth()+1,e.getDate());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");{const t=new Date(e);r=new Zc.PlainDate(t.getFullYear(),t.getMonth()+1,t.getDate())}}else r=new Zc.PlainDate(e,t,n||1);else r=Zc.PlainDate.from(Zc.Now.plainDateISO());super(r),this.kind="date"}compareSameKind(e){const t=Zc.PlainDate.compare(this.value,e.value);return t<0?-1:t>0?1:0}format(e){return!0===e&&(e=Al(bbn.dt.locales.date,{year:"numeric",month:"long",day:"long",weekday:"long"}).pattern),e||(e=Al(bbn.dt.locales.date,{year:"numeric",month:"numeric",day:"numeric"}).pattern),hf.prototype.format.call(this,e)}ftime(e=!1){return"00:00"+(e?":00":"")}fdate(e=!1,t=!1){const n=new Date(this.year(),this.month()-1,this.day()),r=Object.assign({year:"numeric",month:e?"long":"numeric",day:"numeric"},t?{weekday:e?"long":"short"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],r).format(n)}}class bf extends hf{constructor(e,t,n,r,o,i,a,s){let u;if(e)if(void 0===t)if(e instanceof Zc.ZonedDateTime)u=e;else if(e instanceof Date)u=function(e,t=!1,n=Zc.Now.timeZoneId()){const r=Zc.Instant.fromEpochMilliseconds(e.getTime()).toZonedDateTimeISO(n);return t?r:r.toPlainDateTime()}(e,!0);else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtZoned");u=Zc.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(Intl.DateTimeFormat().resolvedOptions().timeZone)}else{u=new Zc.PlainDateTime(t,n,r||1,o||0,i||0,a||0,s||0).toZonedDateTime(e||Zc.Now.timeZoneId())}else u=Zc.Now.zonedDateTimeISO(Intl.DateTimeFormat().resolvedOptions().timeZone);super(u),this.kind="zoned"}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1,this.day(),this.hour(),this.minute(),this.second()),o=Object.assign(Object.assign({year:"numeric",month:e?"long":"numeric",day:"numeric"},n?{weekday:e?"long":"short"}:{}),t?{hour:e?"2-digit":"numeric",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}class gf extends hf{constructor(e,t){let n;if(e)if(void 0===t)if(e instanceof Zc.PlainYearMonth)n=e;else if(e instanceof Date)n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1);else{if("number"!=typeof t)throw new Error("Invalid value for bbnDtDateTime");{const e=new Date(t);n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1)}}else n=new Zc.PlainYearMonth(e,t);else{const e=new Date;n=new Zc.PlainYearMonth(e.getFullYear(),e.getMonth()+1)}super(n),this.kind="yearMonth"}format(e){return!0===e&&(e=Al(bbn.dt.locales.date,e=>"numeric"===e.year&&"long"===e.month&&!("day"in e)).pattern),e||(e=Al(bbn.dt.locales.date,e=>"numeric"===e.year&&"numeric"===e.month&&!("day"in e)).pattern),hf.prototype.format.call(this,e)}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(this.year(),this.month()-1),o={year:"numeric",month:e?"long":"numeric"};return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}}class wf extends hf{constructor(e,t){let n;if(e)if(void 0===t)if(e instanceof Zc.PlainMonthDay)n=e;else if(e instanceof Date)n=new Zc.PlainMonthDay(e.getMonth()+1,e.getDate());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");{const t=new Date(e);n=new Zc.PlainMonthDay(t.getMonth()+1,t.getDate())}}else n=new Zc.PlainMonthDay(e,t);else{const e=new Date;n=new Zc.PlainMonthDay(e.getMonth()+1,e.getDate())}super(n),this.kind="monthDay"}fdate(e=!1,t=!1,n=!1){if(!this.value)return"";const r=new Date(2e3,this.month()-1,this.day()),o={month:e?"long":"numeric",day:"numeric"};return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],o).format(r)}}function yf(e,t,n){let r="";const o=e.some(e=>"dayPeriod"===e.type),i=o||"h12"===t||"h11"===t,a=!!n.weekday,s="short"===n.month||"long"===n.month,u="numeric"===n.year&&"numeric"===n.month&&"numeric"===n.day&&!a&&!s;for(const t of e)switch(t.type){case"year":"2-digit"===n.year?r+="YY":r+="YYYY";break;case"month":if("short"===n.month){r+="MMM";break}if("long"===n.month){r+="MMMM";break}if(u){r+="M";break}/^\d+$/.test(t.value)?r+=2===t.value.length?"MM":"M":r+=t.value.length>3?"MMMM":"MMM";break;case"day":if(u){r+="D";break}r+=2===t.value.length?"DD":"D";break;case"weekday":"short"===n.weekday||"narrow"===n.weekday?r+="ddd":"long"===n.weekday?r+="dddd":r+=t.value.length>3?"dddd":"ddd";break;case"hour":r+=i?2===t.value.length?"hh":"h":2===t.value.length?"HH":"H";break;case"minute":r+="II";break;case"second":r+="SS";break;case"dayPeriod":r+="A";break;case"timeZoneName":r+="z";break;case"literal":if(!t.value)break;if(/[A-Za-zÀ-ÖØ-öø-ÿ]/.test(t.value)){r+=`[${t.value.replace(/]/g,"\\]")}]`}else r+=t.value;break;default:r+=t.value}return r}const vf=()=>{if(Object.keys(bbn.dt.locales).length)return;const e=[bbn.env.lang,...navigator.languages],t=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),r=new Intl.DateTimeFormat(e,{weekday:"long"}),o=new Intl.DateTimeFormat(e,{weekday:"short"}),i=new Intl.DateTimeFormat(e,{dateStyle:"short",timeStyle:"short"}),a=new Intl.DateTimeFormat(e,{dateStyle:"long",timeStyle:"long"}),s=new Intl.DateTimeFormat(e,{year:"numeric",month:"numeric",day:"numeric"}),u=new Intl.RelativeTimeFormat(e,{numeric:"auto"}),c=new Intl.Locale(e[0]),l=[],f=[];for(let e=0;e<12;e++){const r=new Date(2020,e,1);l.push(t.format(r)),f.push(n.format(r))}const d=new Date(2020,1,2),h=[],m=[];for(let e=0;e<7;e++){const t=new Date(d.getTime()+864e5*e);h.push(r.format(t)),m.push(o.format(t))}const{date:p,time:b,datetime:g}=(e=>{e||(e=[bbn.env.lang,...navigator.languages]);const t=new Date(Date.UTC(2e3,0,2,13,45,30)),n=[],r=[],o=[],i=new Set,a=new Set,s=new Set,u=[{year:"numeric",month:"2-digit",day:"2-digit"},{year:"numeric",month:"numeric",day:"numeric"},{year:"numeric",month:"short",day:"numeric"},{year:"numeric",month:"long",day:"numeric"},{weekday:"short",year:"numeric",month:"short",day:"numeric"},{weekday:"long",year:"numeric",month:"long",day:"numeric"},{year:"numeric",month:"numeric"},{year:"numeric",month:"2-digit"},{year:"numeric",month:"short"},{year:"numeric",month:"long"},{month:"numeric",day:"numeric"},{month:"2-digit",day:"2-digit"},{month:"short",day:"numeric"},{month:"long",day:"numeric"}],c=[];for(const r of u){const o=new Intl.DateTimeFormat(e,r),a=yf(o.formatToParts(t),o.resolvedOptions().hourCycle,r);i.has(a)||(i.add(a),n.push({pattern:a,sample:o.format(t),options:r})),r.year&&r.month&&r.day&&c.push(r)}const l=[{hour:"numeric"},{hour:"2-digit",minute:"2-digit"},{hour:"2-digit",minute:"2-digit",second:"2-digit"},{hour:"2-digit",minute:"2-digit",timeZoneName:"short"},{hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"},{hour:"2-digit",minute:"2-digit",timeZoneName:"long"}];for(const n of l){const o=new Intl.DateTimeFormat(e,n),i=yf(o.formatToParts(t),o.resolvedOptions().hourCycle,n);a.has(i)||(a.add(i),r.push({pattern:i,sample:o.format(t),options:n}))}for(const n of c)for(const r of l){const i=Object.assign(Object.assign({},n),r),a=new Intl.DateTimeFormat(e,i),u=yf(a.formatToParts(t),a.resolvedOptions().hourCycle,i);s.has(u)||(s.add(u),o.push({pattern:u,sample:a.format(t),options:i}))}return{date:n,time:r,datetime:o}})(e),w=c.getWeekInfo?c.getWeekInfo():{firstDay:1};cl(bbn.dt.locales,{formatters:{short:i,long:a,numeric:s,relative:u},firstDayOfWeek:w.firstDay,monthsLong:l,monthsShort:f,weekdaysLong:h,weekdaysShort:m,locale:c,date:p,time:b,datetime:g})};class Mf extends hf{constructor(e,t,n,r){let o;if(e)if(void 0===e)if(e instanceof Zc.PlainTime)o=e;else if(e instanceof Date)o=new Zc.PlainTime(e.getHours(),e.getMinutes(),e.getSeconds(),1e6*e.getMilliseconds());else{if("number"!=typeof e)throw new Error("Invalid value for bbnDtDateTime");if(void 0!==t)o=new Zc.PlainTime(e,t,n||0,r||0);else{const t=new Date(e);o=new Zc.PlainTime(t.getHours(),t.getMinutes(),t.getSeconds(),1e6*t.getMilliseconds())}}else o=new Zc.PlainTime(e,t||0,n||0,r||0);else{const e=new Date;o=new Zc.PlainTime(e.getHours(),e.getMinutes(),e.getSeconds(),1e6*e.getMilliseconds())}super(o),this.kind="time"}ftime(e=!1){if(!this.value)return"";const t=new Date(2e3,1,1,this.hour(),this.minute(),this.second()),n={hour:"2-digit",minute:"2-digit"};e&&(n.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],n).format(t)}}const Ef=function(e,t){try{return t?e.toLocaleLowerCase(t):e.toLowerCase()}catch(t){return e.toLowerCase()}};function Sf(e,t,n="auto",r,o){var i,a,s,u,c,l,f;vf();const d=globalThis.Temporal;if(!d)throw new Error("Temporal API is required (load @js-temporal/polyfill)");const h=d;let m=!0;o||(o=(null===(i=null===bbn||void 0===bbn?void 0:bbn.dt)||void 0===i?void 0:i.locales)||{});const p={monthsLong:null!==(a=null==o?void 0:o.monthsLong)&&void 0!==a?a:bbn.dt.locales.monthsLong,monthsShort:null!==(s=null==o?void 0:o.monthsShort)&&void 0!==s?s:bbn.dt.locales.monthsShort,weekdaysLong:null!==(u=null==o?void 0:o.weekdaysLong)&&void 0!==u?u:bbn.dt.locales.weekdaysLong,weekdaysShort:null!==(c=null==o?void 0:o.weekdaysShort)&&void 0!==c?c:bbn.dt.locales.weekdaysShort},b=(null===bbn||void 0===bbn?void 0:bbn.env)&&(null===(l=bbn.env)||void 0===l?void 0:l.lang)||(null===bbn||void 0===bbn?void 0:bbn.dt)&&(null===(f=bbn.dt)||void 0===f?void 0:f.locale)||Intl.DateTimeFormat().resolvedOptions().locale,g=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function w(t,n="auto"){var o;const i=new mf,a={year:i.year(),month:1,day:1,hour:0,minute:0,second:0,ms:0,hasYear:!1,hasMonth:!1,hasDay:!1,hasHour:!1,hasMinute:!1,hasSecond:!1,hasMs:!1},s="auto"===n,u="zoned"===n.toLowerCase(),c="datetime"===n.toLowerCase(),l="date"===n.toLowerCase(),f="time"===n.toLowerCase(),d="yearmonth"===n.toLowerCase(),w="monthday"===n.toLowerCase(),y=[{token:"YYYY",regex:"\\d{4}",apply:(e,t)=>{t.year=parseInt(e,10),t.hasYear=!0}},{token:"YY",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);t.year=n>=70?1900+n:2e3+n,t.hasYear=!0}},{token:"Y",regex:"[+-]?\\d{1,6}",apply:(e,t)=>{t.year=parseInt(e,10),t.hasYear=!0}},{token:"MMMM",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.monthsLong.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid month name: "+e);t.month=r+1,t.hasMonth=!0}},{token:"MMM",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.monthsShort.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid short month name: "+e);t.month=r+1,t.hasMonth=!0}},{token:"MM",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"mm",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"M",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"m",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid month: "+n);t.month=n,t.hasMonth=!0}},{token:"DD",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"D",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"d",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>31)throw new Error("Invalid day of month: "+n);t.day=n,t.hasDay=!0}},{token:"dddd",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.weekdaysLong.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid weekday name: "+e);t.weekday=r}},{token:"ddd",regex:"[^\\d\\s]+",apply:(e,t)=>{const n=Ef(e,b),r=p.weekdaysShort.findIndex(e=>Ef(e,b)===n);if(-1===r)throw new Error("Invalid short weekday name: "+e);t.weekday=r}},{token:"EE",regex:"\\d{1}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>7)throw new Error("Invalid weekday number: "+n);t.weekday=n}},{token:"hh",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>12)throw new Error("Invalid 12-hour clock hour: "+n);t.hour=n,t.hasHour=!0,t.uses12Hour=!0}},{token:"HH",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"H",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"h",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>23)throw new Error("Invalid hour: "+n);t.hour=n,t.hasHour=!0}},{token:"II",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"I",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"i",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid minute: "+n);t.minute=n,t.hasMinute=!0}},{token:"SS",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"S",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"ss",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"s",regex:"\\d{2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>59)throw new Error("Invalid second: "+n);t.second=n,t.hasSecond=!0}},{token:"ms",regex:"\\d{1,3}",apply:(e,t)=>{const n=parseInt(e,10);if(n<0||n>999)throw new Error("Invalid millisecond: "+n);t.ms=n,t.hasMs=!0}},{token:"WWWW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"WWW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"WW",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"W",regex:"\\d{1,2}",apply:(e,t)=>{const n=parseInt(e,10);if(n<1||n>53)throw new Error("Invalid week number: "+n);t.week=n}},{token:"ZZ",regex:"(?:Z?[+-]\\d{2}\\d{2})",apply:(e,t)=>{if("Z"===e||"z"===e)return void(t.offsetMinutes=0);const n="-"===e[0]?-1:1,r=e.slice(1),o=parseInt(r.slice(0,2),10),i=parseInt(r.slice(2),10);if(o<0||o>23||i<0||i>59)throw new Error("Invalid timezone offset: "+e);t.offsetMinutes=n*(60*o+i)}},{token:"Z",regex:"(?:Z?[+-]\\d{2}\\:{1}\\d{2})",apply:(e,t)=>{if("Z"===e||"z"===e)return void(t.offsetMinutes=0);const n="-"===e[0]?-1:1,r=e.slice(1),[o,i]=r.split(":");let a=parseInt(o,10),s=parseInt(i,10);if(a<0||a>23||s<0||s>59)throw new Error("Invalid timezone offset: "+e);t.offsetMinutes=n*(60*a+s)}},{token:"z",regex:"[A-Za-z_\\/]+",apply:(e,t)=>{t.timeZone=e}},{token:"A",regex:"(?:AM|PM|am|pm)",apply:(e,t)=>{t.isPM=/pm/i.test(e),t.hasAmPm=!0}},{token:"a",regex:"(?:AM|PM|am|pm)",apply:(e,t)=>{t.isPM=/pm/i.test(e),t.hasAmPm=!0}}],v=[...y].sort((e,t)=>t.token.length-e.token.length);let M="";const E=[];let S=0,D=0;for(;S<t.length;){if("["===t[S]){let e=S+1,n="";for(;e<t.length&&"]"!==t[e];)n+=t[e],e++;if(e<t.length&&"]"===t[e]){const t=n.replace(/\\]/g,"]");M+=g(t),S=e+1;continue}}let e=null;for(const n of v)if(t.startsWith(n.token,S)){e=n;break}e?(M+=`(${e.regex})`,D=M.length,e.apply?E.push(t=>e.apply(t,a)):E.push(()=>{}),S+=e.token.length):(M+=g(t[S]),S+=1)}const T=new RegExp("^"+bbn.fn.substr(M,0,D));let k=T.exec(e);if(!k){if(!r)throw new Error(`Date string "${e}" does not match format "${t}"`);{const n=new mf(i.year(),1,1,0,0,0,0);e=n.format(t),m=!1,k=T.exec(e)}}for(let e=1;e<k.length;e++){const t=k[e],n=E[e-1];null!=t&&n&&n(t)}if(a.uses12Hour){if(!a.hasAmPm)throw new Error("AM/PM marker (A or a) is required with 12-hour format (hh)");let e=a.hour;a.isPM?e<12&&(e+=12):12===e&&(e=0),a.hour=e}const I=a.hasYear||a.hasMonth||a.hasDay,_=a.hasYear&&a.hasMonth&&a.hasDay,O=a.hasYear&&a.hasMonth&&!a.hasDay,x=!a.hasYear&&a.hasMonth&&a.hasDay,j=a.hasHour||a.hasMinute||a.hasSecond||a.hasMs,P=null!=a.timeZone||null!=a.offsetMinutes;let N;if(u||P&&s){let e;try{e=new h.PlainDateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,1e6*a.ms)}catch(e){throw new Error("Invalid date/time components")}if(a.timeZone){const t=h.TimeZone.from(a.timeZone),n=e.toZonedDateTime(t);N=new bf(n)}else{const e=Date.UTC(a.year,a.month-1,a.day,a.hour,a.minute,a.second,a.ms)-6e4*(null!==(o=a.offsetMinutes)&&void 0!==o?o:0);N=new bf(h.Instant.fromEpochMilliseconds(e).toZonedDateTimeISO(h.Now.timeZoneId()))}}else if(c||s&&(m||I&&j)){if(!_&&!m)throw new Error("PlainDateTime requires year, month and day");const e=new h.PlainDateTime(a.year,a.month,a.day,a.hour,a.minute,a.second,1e6*a.ms);N=new mf(e)}else if(l||d||w||s&&I&&!j)if(l||_&&s){const e=new h.PlainDate(a.year,a.month,a.day);N=new pf(e)}else if(d||O&&s){const e=new h.PlainYearMonth(a.year,a.month);N=new gf(e)}else if(w||x&&s){const e=new h.PlainMonthDay(a.month,a.day,1972);N=new wf(e)}else{if(!s||!a.hasYear)throw new Error("Not enough date components for a known Temporal type");{const e=new h.PlainDate(a.year,1,1);N=new pf(e)}}else{if(!(f||s&&!I&&j))throw new Error("No date or time information found in input");{const e=new h.PlainTime(a.hour,a.minute,a.second,1e6*a.ms);N=new Mf(e)}}return N.setValid(m),N}if(Array.isArray(t)){let e=null;for(const r of t)try{return w(r,n)}catch(t){e=t}throw null!=e?e:new Error("No format matched")}return w(t,n)}const Df=["YYYY-MM-DD HH:II:SS.ms","YYYY-MM-DD HH:II:SS","YYYY-MM-DD HH:II:SS[ GMT]Z","YYYY-MM-DD HH:II","YYYY-MM-DDTHH:II:SS.msZ","YYYY-MM-DDTHH:II:SSZ","YYYY-MM-DDTHH:II:SS","YYYY-MM-DDTHH:II","ddd[, ]DD MMM YYYY HH:II:SS[ GMT]","ddd MMM DD YYYY HH:II:SS[ GMT]Z","ddd MMM DD YYYY HH:II:SS","D MMM","D MMMM","D/M","YYYY-MM-DD","YYYY-MM","HH:II:SS","HH:II"];function Tf(e,t,n){const r=e.trim();if(!r)return null;vf();const o=e=>{for(const t of e)try{return Sf(r,t),t}catch(e){}return null};if(t){return o(Array.isArray(t)?t:[t])}const i=new Set,a=Df.filter(e=>!i.has(e)&&(i.add(e),!0)),s=[...bbn.dt.locales.datetime.map(e=>e.pattern),...bbn.dt.locales.date.map(e=>e.pattern),...bbn.dt.locales.time.map(e=>e.pattern)].filter(e=>!i.has(e)&&(i.add(e),!0)),u=o([...a,...s]);return u||null}const kf=(e,t=null,n="auto")=>{if(void 0===e)return new mf;if(!e){const e=new mf;return e.setValid(!1),e}if("string"==typeof e){if(t)return Sf(e,t,n,!0);{const t=Tf(e);if(t)return Sf(e,t,n);throw new Error(Uc("Could not guess the date format for value: %s",e))}}if("number"==typeof e)return new mf(Math.abs(e)<99999999999?1e3*e:e);if(e.__isBbnDt)return e;if(e instanceof Date){const t=e;return new mf(t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}if(e instanceof Zc.PlainDateTime)return new mf(e);if(e instanceof Zc.PlainDate)return new pf(e);if(e instanceof Zc.PlainTime)return new bf(e);if(e instanceof Zc.PlainYearMonth)return new gf(e);if(e instanceof Zc.PlainMonthDay)return new wf(e);if(e instanceof Zc.ZonedDateTime)return new bf(e);if(e instanceof Zc.Duration)return new cf(e);throw bbn.fn.log("Invalid date value",e),new Error(Uc("Invalid date value"))};function If(e){if(arguments.length>1){const e=[];for(let t=1;t<arguments.length;t++)e.push(arguments[t]);e.unshift({_bbn_console_mode:"error",_bbn_console_level:1,_bbn_console_style:"color: #E64141; background: #F7E195; font-size: 14px"}),nl.apply(this,e)}throw new Error(e)}function _f(e,t=null,n=null,r=null,o=null){let i=!1;if(t){i=!0;let a,s="object"===(typeof t).toLowerCase();if(s&&t.prescript)try{new Function(t.prescript)()}catch(e){If(e.message||"")}if(s&&void 0===t.url&&(t.url=e),i=n&&tl(n)?n(t,o):bbn.fn.defaultLinkFunction(t,o),o&&s&&void 0!==t.content&&("value"in o?o.value=t.content:o.innerHTML=t.content),i&&s&&t.script&&(i="function"==typeof t.script?t.script(t.data?t.data:{},o||null):((e,n)=>{let r=null;try{r=new Function(t.script)(),tl(r)&&(r=r(e,n))}catch(e){nl(e,t),If(tl(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&tl(r)?r(t):s&&bbn.fn.defaultPostLinkFunction&&bbn.fn.defaultPostLinkFunction(t,o),i&&s&&t.postscript){new Function(t.postscript)(t.postscript)}s&&t.error&&(a=t.errorTitle||bbn.lng.server_response,bbn.fn.defaultErrorFunction(t.error,a))}else bbn.fn.defaultErrorFunction(bbn.lng.errorText,bbn.lng.error);return i}function Of(e,t,n=!1){let r={error:!1,result:!0};if("string"==typeof t&&(t=[t]),ul(t)||(r.error=bbn._("checkProps must receive a string or an array as props argument")),sl(e)||(r.error=bbn._("checkProps must receive an object as obj argument")),!r.error){let o;al(t,t=>{let i=(t=t.trim().split(":"))[1]||!1;if(t=t[0],void 0===e[t]?r.error=t+" "+bbn._("is not defined"):i?(o="is"+rl(i,0,1).toUpperCase()+rl(i,1).toLowerCase(),void 0===bbn.fn[o]?r.error=i+" "+bbn._("is not a valid type"):bbn.fn[o](e[t])||(r.error=t+" "+bbn._("is not a")+" "+i)):n&&!e[t]&&(r.error=t+" "+bbn._("is empty")),r.error)return!1})}return r.error&&(r.result=!1),r}function xf(e){return e.replace(/[A-z]{1}/,e=>e.toUpperCase())}function jf(e,t,n,...r){let o=!1;ul(t)||(t=[t]);const i=[];if(al(t,t=>{var n;if(t===String?t="string":t===Number?t="number":t===Array?t="array":t===Boolean?t="boolean":t===Object?t="object":t===Function&&(t="function"),tl(t)){if(i.push(t.name||(null===(n=t.constructor)||void 0===n?void 0:n.name)||t.toString()),e instanceof t)return o=!0,!1}else if(Qc(t)&&tl(bbn.fn["is"+xf(t)])){if(bbn.fn["is"+xf(t)](e))return o=!0,!1;i.push(t)}else If(`The type ${t} is not recognized`)}),!o)throw nl(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&nl(r),new Error((n?n+" - ":"")+bbn._("The value should be a %s",i.join(" "+bbn._("or a")+" ")))}function Pf(e){if(ul(e))return e.slice().map(e=>"object"==typeof e?Pf(e):e);if(sl(e)){return cl(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}kf.locales=Object.create(null),kf.parse=Sf,kf.guessFormat=Tf,kf.time=()=>{},kf.date=()=>{},kf.dateTime=()=>{},kf.duration=(e,t)=>e instanceof Zc.Duration?new cf(e):cf.fromUnit(e,t),kf.zoned=()=>{},kf.monthDay=()=>{},kf.yearMonth=()=>{};const Nf=(e,t="text/plain")=>{const n=new DataTransfer;n.setData(t,e);const r=new ClipboardEvent("copy",{bubbles:!0,cancelable:!0,clipboardData:n});document.dispatchEvent(r)};function Cf(e,t,n=null,r="="){if(!ul(e))throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array");let o={};const i=[],a="function"==typeof t;if(!t||!e.length)return e;if("object"==typeof t)r=n,o=t;else if("string"==typeof t)o[t]=n;else if(!a)throw new Error("Search function error: The prop argument should be a string or an object");if("function"==typeof t)for(let n=0;n<e.length;n++)t(e[n],n)&&i.push(e[n]);else if(o=Rl(o,r),o.conditions&&o.logic)for(let t=0;t<e.length;t++)Cl(e[t],o)&&i.push(e[t]);return i}const Rf=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=1&t?3988292384^t>>>1:t>>>1;Rf.push(t)}function Yf(...e){const t=Object.create(null);return e.length&&cl(t,...e),t}function Af(e){let t=typeof e;if(void 0===e)return new Date;if("number"===t||Kc(e)&&""!==e)return e<1e10&&(e*=1e3),new Date(e);if("string"===t){if(10===e.length)return new Date(parseInt(rl(e,0,4)),parseInt(rl(e,5,2))-1,parseInt(rl(e,8,2)),12);if(19===e.length)return new Date(parseInt(rl(e,0,4)),parseInt(rl(e,5,2))-1,parseInt(rl(e,8,2)),parseInt(rl(e,11,2)),parseInt(rl(e,14,2)),parseInt(rl(e,17,2)))}else if(gl(e))return e;return!1}function Ff(e,t=""){nl(e)}function Lf(e,t=null,n=null){nl(t,n)}function Zf(e,t,n=null,r=null){return!0}function Hf(...e){if(!e.length)return!1;for(let t of e)if("object"==typeof t&&!Ml(t))return!1;return!0}let Bf=[];function Uf(e){if(Qc(e)&&e){for(;"/"===rl(e,e.length-1);)e=rl(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return rl(e,0,t);if(0===t)return"/"}return""}function $f(...e){if(!e.length)return!1;for(let t of e)if("[object Blob]"!=={}.toString.apply(t))return!1;return!0}function Wf(e){if(e&&Qc(e)){let t=e.split(".");if(t[0]&&t.length>1)return t[t.length-1].toLowerCase()}return""}function zf(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLCanvasElement))return!1;return!0}function qf(e,t,n=null){if(zf(t))return void t.toBlob(t=>{let n=document.createElement("a");n.download=e,n.href=window.URL.createObjectURL(t),n.className="bbn-no",n.click(),window.URL.revokeObjectURL(n.href)},n||"image/png");n?-1===n.indexOf("/")&&(n="text/"+n):n=sl(t)&&t.type?t.type:"octet/stream";let r=window.document.createElement("a");r.className="bbn-no";let o=null;if(Qc(t))o=new Blob([t],{type:n});else try{o=t}catch(e){nl(e)}r.href=window.URL.createObjectURL(o),r.download=e,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(r.href),document.body.removeChild(r)}var Vf=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};function Jf(){return Vf(this,void 0,void 0,function*(){var e;(null===(e=window.scheduler)||void 0===e?void 0:e.yield)?yield window.scheduler.yield():yield new Promise(requestAnimationFrame)})}var Gf=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})};function Kf(e){let t;return"checkbox"===e.type?e.checked?(t=e.value,t||(t=1)):t=0:"radio"===e.type?e.checked&&(t=e.value):t=e.value,t}function Xf(e){let t,n,r=e.querySelectorAll("input[name],select[name],textarea[name],button[name]"),o={};return al(r,(e,r)=>{if(n=Kf(e),void 0!==n&&!e.disabled){let r=e.name;if(-1===r.indexOf("[]")&&r.indexOf("[")>-1&&r.indexOf("]")>-1&&r.lastIndexOf("]")===r.length-1&&(r=Wl("][",".",r),r=Wl("[",".",r),r=Wl("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=rl(r,0,r.length-2),void 0===o[t]&&(o[t]=[]),o[t].push(n);else if(r.indexOf(".")>-1){let e,t=r.split(".");e=o;for(let r=0;r<t.length;r++)void 0===o[t[r]]&&(r<t.length-1?e[t[r]]={}:e[t[r]]=n),e=e[t[r]]}else o[r]=n}}),o}function Qf(e){return e.filter((e,t,n)=>t===n.indexOf(e))}function ed(e,t=null){let n=[];if("string"==typeof e&&(e=document.querySelector(e)),e instanceof HTMLElement&&e.parentElement)if("string"==typeof t)for(;e=e.parentElement.closest(t);)n.push(e);else for(!0===t&&n.push(e);e=e.parentElement;)n.push(e);return n}function td(e){0!==e.indexOf("--")&&(e="--"+e);let t=getComputedStyle(document.documentElement).getPropertyValue(e);return"string"==typeof t&&(t=t.trim()),t}function nd(){const e=navigator.userAgent.toLowerCase();return/iPhone|Android/i.test(navigator.userAgent)?"mobile":/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(e)?"tablet":"desktop"}function rd(){let e,t=window.getSelection();if(t.rangeCount>0){e=t.getRangeAt(0),nl("RANGE",e);let n=e.cloneContents();nl("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function od(e){return Qc(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function id(e){let t=document.createElement("div");return t.innerHTML=e,e=t.innerText}function ad(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}function sd(e){let t,n,r={};if(sl(e[0])&&1===e.length)return e[0];for(n=0;n<e.length;n++)t=typeof e[n],t=t.toLowerCase(),tl(e[n])?(r.errorFn&&!r.abortFn&&(r.abortFn=e[n]),r.successFn&&!r.errorFn?r.errorFn=e[n]:r.successFn||(r.successFn=e[n])):1===e[n]||!0===e[n]?r.force=!0:"string"===t?r.url?r.datatype=e[n]:0===e[n].indexOf("#")||0===e[n].indexOf(bbn.env.root+"#")?r.url=rl(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=rl(r.url,bbn.env.root.length))):e[n]&&"object"===t&&(e[n]instanceof Event?r.e=e[n]:r.ele||1!==e[n].nodeType?"object"===t.toLowerCase()&&(r.obj=e[n]):r.ele=e[n]);return!r.url&&yl(r)&&(r.url=bbn.env.path),void 0===r.obj&&(r.obj={_bbn:"public"}),r.datatype||(r.datatype="json"),r}function ud(e,t,n=null,r=!1){bbn.env.old_path=bbn.env.path,bbn.env.url=["https:/","http://"].includes(rl(e,0,7))?e:bbn.env.root+e,bbn.env.path=rl(bbn.env.url,bbn.env.root.length),bbn.env.params=bbn.env.path.split("/").filter(e=>""!==e);let o=window.history;if(o){let e=o.state,i={url:bbn.env.path,old_path:bbn.env.old_path||null,data:n||{},reload:!1};e&&e.url===bbn.env.path&&(e.data&&cl(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?id(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function cd(...e){let t=sd(e),n=1;if(!0===t)return!0;if(!t)return cd(window.location.href);if(0===t.url.indexOf("javascript:"))return!0;if(0===t.url.indexOf("data:"))return!0;if(0===t.url.indexOf("#"))return location.href=bbn.env.url+t.url,!0;if(0===t.url.indexOf("mailto:"))return bbn.env.ignoreUnload=!0,window.location.href=t.url,setTimeout(()=>{bbn.env.ignoreUnload=!1},0),!1;if(Ll(t.url))return!1;if((0===t.url.indexOf("http://")||0===t.url.indexOf("https://"))&&0!==t.url.indexOf(bbn.env.host))return t.e&&t.e.preventDefault(),window.open(t.url),!1;if(t.url!==bbn.env.params.join("/")||1===t.force){if(t.successFn)n=t.successFn(t.url);else if(bbn.fn.defaultPreLinkFunction){let e=bbn.fn.defaultPreLinkFunction(t.url,t.force,t.ele);void 0!==e.data?(cl(t.obj,e.data),n=1):n=e}if(n){1!==n&&"string"==typeof n&&(t.url=n);let e=bbn._("The Ajax call to")+" "+t.url+" ";return ql(t.url,t.datatype,t.obj,n=>{n||nl(e+bbn._("returned no answer")),sl(n)&&(0===Object.keys(n).length&&nl(e+bbn._("returned an empty object")),n.new_url?(n.old_path=t.url,t.url=n.new_url):n.url&&t.url!==n.url&&(n.old_path=t.url)),_f(t.url,n,t.successFn,null,t.ele)&&void 0===n.noNav&&0!==bbn.env.path.indexOf(t.url)&&ud(t.url,(n.title?n.title+" - ":"")+bbn.env.siteTitle)},t.errorFn||null)}}return!0}function ld(){let e=bbn.env.width!==window.innerWidth,t=bbn.env.height!==window.innerHeight;if(e||t){e&&(bbn.env.width=window.innerWidth||window.document.documentElement.clientWidth||window.document.body.clientWidth,document.documentElement.style.setProperty("--vw",.01*bbn.env.width+"px")),t&&(bbn.env.height=window.innerHeight||window.document.documentElement.clientHeight||window.document.body.clientHeight,document.documentElement.style.setProperty("--vh",.01*bbn.env.height+"px"));let n=parseInt(td("mobile-limit"))||650,r="bbn-screen-"+(bbn.env.width<n?"small":"regular"),o=(document.body.className||"").split(" "),i=!1;al(o,(e,t)=>{if(3===e.split("-").length&&0===e.indexOf("bbn-screen-"))return i=!0,e!==r&&o.splice(t,1,r),!1}),i||o.push(r),bbn.fn.defaultResizeFunction(),document.body.className=o.join(" ")}}function fd(){return"mobile"===nd()}function dd(){return"tablet"===nd()}function hd(){return fd()||dd()}function md(e=!1){let t=(new Date).getTime();return e?Math.round(t/1e3):t}const pd=e=>{if(bbn.env.last_focus=bbn.dt().unix(),"ajax"!==bbn.env.nav)return;let t=e.target;if(t instanceof HTMLElement&&"A"!==t.tagName){let e=t;for(;e&&"A"!==e.tagName&&"BODY"!==e.tagName;)e=e.parentElement;t=e&&"A"===e.tagName?e:null}return t instanceof HTMLElement&&t.hasAttribute("href")&&!t.hasAttribute("target")&&!t.classList.contains("bbn-no")?(e.preventDefault(),e.stopPropagation(),cd(t.getAttribute("href")),!1):void 0};function bd(e){if("string"==typeof e&&e.length>0&&(0===e.indexOf("calc")||Kc(rl(e,0,1)))){let t=document.createElement("div");t.style.width=e;let n=!!t.style.width.length;return t.remove(),n}return!1}function gd(...e){if(!e.length)return!1;for(let t of e)if(!Qc(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function wd(...e){if(!e.length)return!1;for(let t of e)if("[object Symbol]"!=={}.toString.apply(t))return!1;return!0}function yd(e){const t=["BBN: "+e];t.unshift({_bbn_console_mode:"warn",_bbn_console_level:2,_bbn_console_style:"color: #E64141; background: #F7E195; font-size: 14px"}),nl.apply(this,t)}function vd(e,t="",n=null){let r=new FormData,o=(e,t="")=>{(!n||ul(n)&&!n.includes(t))&&(e instanceof File?r.append(t,e):ul(e)?al(e,(e,n)=>{o(e,t+"["+n+"]")}):sl(e)&&Object.keys(e).length?il(e,(n,r)=>{r in e&&o(n,t?t+"["+r+"]":r)}):Ml(e)||void 0===e||r.append(t,e))};return o(e,t),r}function Md(e){return"string"==typeof e?document.querySelector(e):e}function Ed(...e){let t=sd(e);if(t.url)return ql(t.url,t.datatype,t.obj,e=>{_f(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Sd(e,t,n,r){if("object"==typeof e&&"string"==typeof t){let o=e;const i=t.split(".");al(i,(e,t)=>{if(!o){if(!r)throw new Error(bbn._("The object is invalid"));o={}}i.length-1===t?o[e]=n:o=o[e]})}}function Dd(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Td(e,t=" "){if(" "===t)return e.trim();if(!t)return e;if(t===e)return"";for(;0===e.indexOf(t);)e=rl(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=rl(e,0,e.length-t.length);return e}function kd(e,t,n){return"string"==typeof e.toLowerCase()&&(t||(t=bbn.var.shortenLen),void 0!==n&&Qc(n)||(n="..."),e.length>t&&(e=rl(e,0,t)+n)),e}var Id={_addLoader:ml,_compareValues:wl,_deleteLoader:Fl,abort:function(e){let t=Ll(e);(null==t?void 0:t.aborter)&&t.aborter.abort("Operation canceled by the user.")},abortURL:function(e){al(Zl(bbn.env.loaders,{url:e}),t=>{if(!t||!t.source)throw new Error("Impossible to find the loader with URL "+e);t.source.cancel("Operation canceled by the user.")})},addColors:Hl,addInputs:Bl,addStyle:function(e,t){sl(t)&&il(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&Xc(e[0])&&(e=e[0]),Ul("height",e)},adjustSize:Ul,adjustWidth:function(){let e=arguments;return 1===e.length&&Xc(e[0])&&(e=e[0]),Ul("width",e)},ajax:ql,analyzeFunction:jl,animateCss:function(e,t,n){e.classList.add("animated"),e.classList.add(t),e.addEventListener("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function e(r){r.target.removeEventListener(r.type,e),"function"==typeof n&&n.call(this),r.target.classList.remove(t)})},arrayBuffer2String:Jl,arrayFromProp:function(e,t){let n=[];return al(e,(e,r)=>{n.push(pl(e,t))}),n},autoExtend:function(e,t){bbn[e]||(bbn[e]={}),cl(bbn[e],t)},baseName:Gl,br2nl:function(e){return Wl("<br />","\n",Wl("<br/>","\n",Wl("<br>","\n",e)))},calendar:function(e,t=!1){let n=kf(e);return n.isValid?n.calendar():t&&Qc(t)?t:""},callback:_f,camelize:function(e){return e.replace(/^([A-Z])|[\s-](\w)/g,function(e,t,n,r){return n?n.toUpperCase():t.toLowerCase()})},camelToCss:function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}).replace("/^./",function(e){return e.toLowerCase()})},canvasToImage:function(e){let t=new Image;return t.src=e.toDataURL("image/png"),t},cast:function(e){var t;return e?"object"==typeof e?bbn.fn.isArray(e)?"Array ("+e.length+")":(null===(t=e.constructor)||void 0===t?void 0:t.name)||"{}":e.toString?e.toString():"string"==typeof e?e:"":""},center:function(e){let t=e.parentNode,n=t.clientWidth,r=t.clientHeight;for(;t&&(!n||!r);)t=e.parentNode,n=t.clientWidth,r=t.clientHeight;return e.style.position="absolute",e.style.top=Math.max(0,(r-e.offsetHeight)/2+t.scrollTop)+"px",e.style.left=Math.max(0,(r-e.offsetWidth)/2+t.scrollLeft)+"px",e},checkProps:function(e,t,n=!1){return Of(e,t,n).result},checkPropsDetails:Of,checkPropsOrDie:function(e,t,n=!1){let r=Of(e,t,n);if(r.error)throw new Error(r.error);return!0},checkType:jf,circularReplacer:function(){const e=new WeakSet;return(t,n)=>{if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n),[void 0,Object,Array,null].includes(n.constructor)||(n=Tl(n)?n.bbnId?"__BBN_DOM__"+n.tagName+"/"+n.bbnId+n.bbnHash:"__BBN_DOM__"+n.tagName+"/"+n.className:Il(n)?"__BBN_CP__"+n.$options.name+"/"+n.$cid:n.constructor.toString())}return n}},clone:Pf,colorToHex:function(e){let t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle},compare:Nl,compareConditions:Cl,copy:function(e,t){return new Promise(n=>{if(e){if(navigator&&navigator.clipboard)return void(e instanceof Blob?(navigator.clipboard.write([new ClipboardItem({[e.type.toString()]:e})]).then(()=>{n(!0)}),t||Nf(e,e.type.toString())):sl(e)&&tl(e.toBlob)?e.toBlob(r=>{const o=new ClipboardItem({[r.type.toString()]:r});navigator.clipboard.write([o]).then(()=>{t||Nf(e,r.type.toString()),n(!0)})}):(navigator.clipboard.writeText(e),t||Nf(e),n(!0)));let r=document.createElement("textarea");r.style.opacity="0",r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),t||Nf(e),n(!0)}n(!1)})},correctCase:xf,count:function(e,t,n=null,r="="){return Cf(e,t,n,r).length||0},crc32:function(e){let t=~0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=t>>>8^Rf[255&(t^r)]}return(-1^t)>>>0},createObject:Yf,cssExists:function(e){let t,n,r=document.styleSheets;for(let o=0;o<r.length;o++){t=1;try{n=r[o].rules||r[o].cssRules}catch(e){if(t=!1,"SecurityError"!==e.name)throw e}if(t)for(let t=0;t<n.length;t++)if(new RegExp("(^|\\s)"+$l(e)+"(\\{|\\s)","g").test(n[t].selectorText))return!0}return!1},data2Html:function e(t,n=""){const r=!ul(t);let o='<ul class="bbn-bottom-xspadding '+(n||"bbn-ul")+'">';for(let i in t)o+="<li>",r&&(o+="<em>"+i+"</em>: "),t[i]&&(ul(t[i])||sl(t[i]))?o+=e(t[i],n):o+=null===t[i]?"<em>null</em>":t[i].toString?t[i].toString():t[i],o+="</li>";return o+='</ul><div class="bbn-bottom-xspadding '+(n||"bbn-div")+'"></div>',o},date:Af,dateSQL:function(e,t){let n=kf(e);if(n)return n.format("YYYY-MM-DD"+(t?"":" HH:mm:ss"))},deepPath:function e(t,n,r,o=[]){let i;return(i=Yl(t,n,0))>-1?(o.push(i),o):(al(t,(t,i)=>{if(ul(t[r])){let a=o.slice();a.push(i);let s=e(t[r],n,r,a);if(!1!==s)return s}}),!1)},defaultAjaxAbortFunction:Ff,defaultAjaxErrorFunction:Lf,defaultAlertFunction:function(e,t=null){alert(e)},defaultConfirmFunction:function(e,t,n=null){let r=0;confirm(e)&&tl(t)&&(t(),r=1),!r&&tl(n)&&n()},defaultEndLoadingFunction:Zf,defaultErrorFunction:function(e){nl(e)},defaultHistoryFunction:function(e){return!0},defaultLinkFunction:function(e,t){return!0},defaultPostLinkFunction:function(e,t=null){return!0},defaultPreLinkFunction:function(e,t=!1,n=null){return nl("defaultPreLinkFunction",e,t,n),!0},defaultResizeFunction:function(){return!0},defaultStartLoadingFunction:function(e,t,n,r){return!0},deleteProp:function(e,t){jf(e,"object",bbn._("The obj must be an object in setProp")),jf(t,"string",bbn._("The prop must be a string in setProp")),delete e[t]},diffObj:function e(t,n,r=!1,o=!1){o||(Bf=[]);let i="unchanged";void 0===o&&(o=!1);let a=Yf();if(!tl(t)&&!tl(n)){if(Hf(t)||Hf(n)){let e=(s=t)===(u=n)||gl(s)&&gl(u)&&s.getTime()===u.getTime()?i:void 0===s?"created":void 0===u?"deleted":"updated";if(r||e!==i){let r=Yf();return Object.defineProperty(r,"type",{value:e,enumerable:!1}),Object.defineProperty(r,"data",{value:void 0===t?n:t,enumerable:!1}),Object.defineProperty(r,"_bbnDiffObjProof",{value:!0,enumerable:!1}),void 0!==t&&Object.defineProperty(r,"newData",{value:n,enumerable:!1}),r}return!1}if(Tl(t)||Tl(n))return!1;if(Bf.includes(t)||Bf.includes(n))return!1;Bf.push(t,n);for(let o in t){if(tl(t[o]))continue;let i;void 0!==n[o]&&(i=n[o]);let s=e(t[o],i,r,!0);s&&(a[o]=s)}for(let o in n){if(tl(n[o])||void 0!==t[o])continue;let i=e(void 0,n[o],r,!0);i&&(a[o]=i)}}var s,u;return!(o&&!r&&!yl(a))&&a},dirName:Uf,download:function(e,t="",n=null){return t&&"object"==typeof t&&(n=t,t=""),ql(e,"blob",n||{_bbn_download:1},(n,r)=>{if(!t){let n="content-disposition",o="attachment; filename=";t=(null==r?void 0:r[n])&&0===r[n].indexOf(o)?rl(r[n],o.length+1,r[n].length-o.length-2):Gl(e)}if($f(n)){let e=Wf(t),r=["php","html"];if("string"==typeof t&&("type"in n&&"text/html"!==n.type||r.includes(e)))return void qf(t,n)}},e=>{bbn.fn.defaultAjaxErrorFunction(e)})},downloadContent:qf,each:al,eraseCookie:function(e){document.cookie=e+"=; Max-Age=-99999999;"},error:If,escapeDquotes:function(e){return Qc(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:$l,escapeSquotes:function(e){return Qc(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Qc(e)?e.replace(/`/g,"\\`"):e},escapeUrl:function(e,t){let n="";e.match("^(http|https)://")&&(n+="http","s"===(e=e.substring(4)).substr(0,1)&&(n+="s",e=e.substring(1)),n+="://",e=e.substring(3)),al(Uf(e).split("/"),e=>{n+=encodeURIComponent(e)+"/"});let r=Gl(e),o="?",i="";if(r.indexOf(o)){let e=r.split("?");o="&",i="?"+e[1],r=e[0]}return t&&Qc(t)?(t.match("^(\\&|\\?)")&&(t=t.substring(1)),t=o+t):t="",n+encodeURIComponent(r)+i+t},executeSlowly:function(e,t){return Gf(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){yield Jf();let r=t(e[n],n);if(r instanceof Promise&&(r=yield r),!1===r)return!1}return!0})},extend:cl,extendOut:function e(...t){let n=null;for(let r of t){if(!sl(r))throw new Error("Each argument for extendOut must be an object, "+typeof r+" given");if(null===n)n=r;else for(let t in r)sl(n[t],r[t])?e(n[t],r[t]):void 0===n[t]&&(n[t]=r[t])}return n},fdate:function(e,t=!1){let n=kf(e),r=!1;return!0===t&&(r=!0),n.isValid?n.fdate(!1,r):t&&Qc(t)?t:""},fdatetime:function(e,t=!1){let n=kf(e);return n.isValid?n.fdate(!1,!0):t&&Qc(t)?t:""},fieldValue:Kf,fileExt:Wf,filter:Cf,filterToConditions:Rl,findAll:function e(t,n,r,o=[]){let i,a=0;for(;(i=Yl(t,n,a))>-1;)o.push(t[i]),a=i+1;return al(t,t=>{ul(t[r])&&e(t[r],n,r,o)}),o},firstVarElement:function(e){const t=e.indexOf("["),n=e.indexOf(".");return-1===t&&-1===n?e:-1===t?e.substring(0,n):-1===n?e.substring(0,t):e.substring(0,Math.min(t,n))},fori:function(e,t,n=e.length-1,r=0){if(ul(e)){let o=e.length-1;Kc(n)&&0<n&&n<=o||(n=o),(!Kc(r)||!(0<=r&&r<o)||r>n)&&(r=0);for(let o=r;o<=n;o++)if(!1===t(e[o],o))return}},forir:function(e,t,n=e.length-1,r=0){if(ul(e)){let o=e.length-1;Kc(n)&&0<n&&n<=o||(n=o),(!Kc(r)||!(0<=r&&r<o)||r>n)&&(r=0);for(let o=n;o>=r;o--)if(!1===t(e[o],o))return}},format:function(e){let t=Array.prototype.slice.call(arguments,1);if(t.length){let n=0;return e.replace(/\%([d|s])/g,(e,r)=>{let o=t[n++];return jf(o,"d"===r?"number":"string",bbn._("The value doesn't correspond to the format")),o})}return e},formatBytes:function(e,t=2){if(!e)return"0 B";const n=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,n)).toFixed(t<0?0:t))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][n]},formatDate:function(e,t){const n=kf(e);return n.isValid?n.format(t):""},formatSize:function(e,t){return Kc(e)?e+"px":Qc(e)?e:!t&&"auto"},formdata:Xf,fphone:function(e){var t;if(Kc(e)&&(e=e.toString()),Qc(e)){const n=(null===(t=bbn.var)||void 0===t?void 0:t.phoneCodes)||[];let r="",o="",i="";if(n.length&&al(n,t=>{e.startsWith(t.prefix)&&t.prefix.length>o.length&&(o=t.prefix,i=t.mask||"")}),!i.length&&e.startsWith("+")){o.length||(o=e.substr(0,3));const t=e.slice(o.length);for(let e=0;e<t.length;e++)e+1<=t.length&&e%2==0&&(i+="0"+(t[e+1]?"0":"")+" ");i=i.trim()}if(i.length){o.length&&(r=o+" ",e=e.slice(o.length));let t=0;return r+=i.replace(/[0-9]/g,()=>e[t++]||""),r}}return e},fromXml:function(e,t){let n=null;if(window.DOMParser)n=(new DOMParser).parseFromString(e,"text/xml");else{if(!window.ActiveXObject)throw new Error("cannot parse xml string!");if(n=new window.ActiveXObject("Microsoft.XMLDOM"),n.async=!1,!n.loadXML(e))throw n.parseError.reason+" "+n.parseError.srcText}function r(e,n){if("#text"==e.nodeName){let t=e.nodeValue;return void(t.trim()&&(n["#text"]=t))}let o={},i=n[e.nodeName];if(i?Array.isArray(i)?n[e.nodeName].push(o):n[e.nodeName]=[i,o]:t&&-1!=t.indexOf(e.nodeName)?n[e.nodeName]=[o]:n[e.nodeName]=o,e.attributes)for(let t of e.attributes)o[t.nodeName]=t.nodeValue;for(let t of e.childNodes)r(t,o)}let o={};for(let e of n.childNodes)r(e,o);return o},ftime:function(e,t){let n=kf(e);return n.isValid?n.ftime():t&&Qc(t)?t:""},getAllTags:function(){return Qf(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:ed,getAttributes:function(e){e.getAttributeNames||If("The element is not a proper HTML Element");let t=Object.create(null);return e.getAttributeNames().forEach(n=>{t[n]=e.getAttribute(n)}),t},getBrowserName:function(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("edge"):case e.includes("edg/"):return"Edge";case e.includes("opr")&&!!window.opr:return"Opera";case e.includes("chrome")&&!!window.chrome:return"Chrome";case e.includes("trident"):return"Internet Explorer";case e.includes("firefox"):return"Firefox";case e.includes("safari"):return"Safari";default:return"Other"}},getBrowserVersion:function(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("edge/"):return e.split("edge/")[1].split(" ")[0];case e.includes("edg/"):return e.split("edg/")[1].split(" ")[0];case e.includes("opr/")&&!!window.opr:return e.split("opr/")[1].split(" ")[0];case e.includes("chrome/")&&!!window.chrome:return e.split("chrome/")[1].split(" ")[0];case e.includes("trident/"):return e.split("trident/")[1].split(" ")[0];case e.includes("firefox/"):return e.split("firefox/")[1].split(" ")[0];case e.includes("safari/"):return e.split("version/")[1].split(" ")[0];default:return""}},getChrono:function(e="default"){return bbn.fn.microtimestamp()-this.constructor.chronos[e]},getCookie:function(e){let t=e+"=",n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t)){let e=r.substring(t.length,r.length);if(e)return JSON.parse(unescape(e)).value}}return null},getCssVar:td,getDay:function(e){let t=Af(e);if(t){let e=t.getTime(),r=t.getYear(),o=365*(r-1970);t.getMonth()<2&&r--;for(var n=1972;n<=r;n+=4)o++;return o+Math.floor(e/864e5)}return!1},getDeviceType:nd,getEventData:function(e){let t=e.dataTransfer||e.clipboardData,n=t.getData("Text"),r={raw:n,files:[],str:[]};return new Promise((o,i)=>{let a=!(t instanceof DataTransfer);if(!n&&"copy"===e.type){let e=window.getSelection();r.raw=e.toString();let t=rd();r.str.push({type:"text/plain",data:r.raw}),t!==r.raw?r.str.push({type:"text/html",data:t}):0===r.raw.trim().indexOf("<")&&r.str.push({type:"text/html",data:"<meta charset='utf-8'><code style=\"white-space: pre; font-family: 'Courier New', sans-serif\">\n"+r.raw+"\n</code>"}),a=!0,o(r)}if(!a){let e=[],n=t.items.length;al(t.items,(i,s)=>{let u=i.kind,c=i.type;if("file"===u){let u=t.files[s];if(!c&&u.name){let e=u.name.split(".");c=e[e.length-1]}let l=u?u.name:bbn._("untitled"),f=u?u.size:null,d=u?u.lastModified:null,h=i.getAsFile();h?(a=!0,n--,r.files.push({type:c,data:h,name:l,size:f,mdate:d}),e.push(l),n||(r.raw||(r.raw=e.join(", ")),o(r))):bbn.fn.defaultErrorFunction(bbn._("Impossible to read the file")+" "+l)}else a=!0,i.getAsString(t=>{n--,r.str.push({type:c,data:t}),"text/plain"===c&&e.push(name),n||(r.raw||(r.raw=e.join(", ")),o(r))})})}a||setTimeout(()=>{o(r)})})},getField:function(e,t,n="",r=null,o="=",i=0,a=!1,s=void 0){let u;return n&&["object","function"].includes(typeof n)&&6 in arguments&&(s=a),t?(u=Al(e,n,r,o,i,a,void 0),void 0===u?s:u[t]):s},getFieldValues:function(e,t,n,r,o){jf(t,"string"),n&&(e=Zl(e,n,r,o));let i=[];return al(e,e=>-1===i.indexOf(e[t])?i.push(e[t]):null),i},getIndex:function(e,t=""){return e.parentElement?(t||Array.from(e.parentElement.children).indexOf(e),Array.from(e.parentElement.children).filter(e=>e.matches(t)).indexOf(e)):-1},getHtml:function(e,t=!1){let n=e.innerHTML();return t&&(n=od(n)),n.trim()},getHTMLOfSelection:rd,getLoader:Ll,getPath:kl,getProp:function(e,t){return jf(e,"object",bbn._("The obj must be an object in setProp")),jf(t,"string",bbn._("The prop must be a string in setProp")),e[t]},getProperty:pl,getRequestId:zl,getRow:Al,getScrollBarSize:function(){if(void 0===bbn.env.scrollBarSize){let e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px","msOverflowStyle"in e.style&&(e.style.msOverflowStyle="scrollbar"),document.body.appendChild(e);let t=e.offsetWidth;e.style.overflow="scroll";let n=document.createElement("div");n.style.width="100%",e.appendChild(n);let r=n.offsetWidth;e.parentNode.removeChild(e);let o=t-r;bbn.env.scrollBarSize=o?o+1:0}return bbn.env.scrollBarSize},getSortingMoves:function(e,t){if(e.length!==t.length)throw new Error("Lengths must match.");const n=new Set(t);if(n.size!==t.length)throw new Error("dst has duplicates.");const r=new Set(e);if(r.size!==e.length)throw new Error("src has duplicates.");if(e.length!==n.size||Array.from(r).some(e=>!n.has(e)))throw new Error("Arrays must contain the same unique values.");const o=new Map(t.map((e,t)=>[e,t])),i=e.map(e=>o.get(e)),a=(e=>{const t=e.length,n=[],r=Array(t).fill(-1);for(let o=0;o<t;o++){let t=e[o],i=0,a=n.length;for(;i<a;){const r=i+a>>1;e[n[r]]<t?i=r+1:a=r}i>0&&(r[o]=n[i-1]),n[i]=o}const o=[];for(let e=n.length?n[n.length-1]:-1;-1!==e;e=r[e])o.push(e);return o.reverse()})(i),s=new Set(a.map(t=>e[t])),u=Array(t.length).fill(-1);for(let e=t.length-2;e>=0;e--)u[e]=u[e+1],s.has(t[e+1])&&(u[e]=e+1);const c=e.slice(),l=new Map(c.map((e,t)=>[e,t])),f=[];for(let e=0;e<t.length;e++){const n=t[e];if(s.has(n))continue;const r=l.get(n);if(void 0===r)throw new Error("Inconsistent state");const o=u[e],i=-1!==o?l.get(t[o]):c.length;if(void 0===i)throw new Error("Inconsistent state");const a=r<i?i-1:i;if(r!==a){const[e]=c.splice(r,1);c.splice(a,0,e),f.push({from:r,to:a,value:n}),l.clear();for(let e=0;e<c.length;e++)l.set(c[e],e)}}return f},getText:function(e){return e.innerText().trim()},getTimeoff:function(){return bbn.env.isFocused?0:Math.round((new Date).getTime()/1e3-bbn.env.timeoff)},happy:function(...e){return e.unshift({_bbn_console_level:3,_bbn_console_style:"color: white; background: green; font-size: 18px;"}),nl.apply(this,e),this},hash:Ol,hex2rgb:function(e){"#"!==e.charAt(0)&&(e="#"+e),4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},history:function(){return window.history||!1},html2text:id,imageToCanvas:ad,imgToBase64:function(e,t="image/png"){return ad(e).toDataURL(t)},info:function(...e){return e.unshift({_bbn_console_level:4,_bbn_console_style:"color: #EEE; background: blue; font-size: 12px;"}),nl.apply(this,e),this},init:function(e,t){let n;bbn.env.isInit||(bbn.env.root=document.baseURI.length>0?document.baseURI:bbn.env.host,bbn.env.root.length&&"/"!==rl(bbn.env.root,-1)&&(bbn.env.root+="/"),"object"==typeof e&&cl(!0,bbn,e),bbn.env.path=rl(bbn.env.url,bbn.env.root.length),n=bbn.env.path.split("/"),al(n,(e,t)=>{""!==(e=decodeURI(e.trim()))&&bbn.env.params.push(e)}),bbn.var.colors&&Hl(bbn.var.colors),document.addEventListener("visibilitychange",()=>{document.hidden?bbn.env.isVisible=!1:bbn.env.isVisible=!0}),document.addEventListener("focus",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.isFocused=!0,bbn.env.last_focus=md()}),document.addEventListener("blur",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.isFocused=!1,bbn.env.last_focus=md()}),document.addEventListener("click",pd),document.addEventListener("keydown",pd),document.addEventListener("focusin",pd),document.addEventListener("focusout",pd),window.addEventListener("hashchange",()=>{bbn.env.hashChanged=(new Date).getTime()},!1),window.addEventListener("resize",()=>{ld()}),window.addEventListener("orientationchange",()=>{ld()}),ld(),hd()&&(document.body.classList.add("bbn-mobile"),dd()&&document.body.classList.add("bbn-tablet")),window.history&&(window.onpopstate=function(e){let t=window.history;if(!bbn.env.historyDisabled&&t&&bbn.fn.defaultHistoryFunction(t.state)){let e=t.state;e?cd(e.url,cl({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&tl(e.data.script)&&e.data.script()}}),window.addEventListener("online",()=>{bbn.env.online=!0}),window.addEventListener("offline",()=>{bbn.env.online=!1}),bbn.env.isInit=!0,document.dispatchEvent(new Event("bbninit")),bbn.env.logging&&nl("Logging in bbn is enabled"))},isActiveInterface:function(e=600){return!!bbn.env.last_focus&&(new Date).getTime()-bbn.env.last_focus<1e3*e},isArray:ul,isBlob:$f,isBoolean:function(...e){if(!e.length)return!1;for(let t of e)if(![!0,!1].includes(t))return!1;return!0},isCanvas:zf,isColor:function(...e){if(!e.length)return!1;var t=new RegExp("^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$","i");for(let n of e){if(!Qc(n))return!1;if(!t.test(n))return!1}return!0},isComment:function(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof Comment))return!1;return!0},isCp:Il,isDataURL:function(...e){if(!e.length)return!1;for(let t of e)if(!/^data:([a-z]+\/[a-z0-9\-\+\.]+(;[a-z\-]+\=[a-z0-9\-\.]+)?)?(;base64)?,/i.test(t))return!1;return!0},isDate:gl,isDesktopDevice:function(){return"desktop"===nd()},isDimension:function(...e){if(!e.length)return!1;for(let t of e){if("number"!=typeof t||t<0)return!1;if(!bd(t))return!1}return!0},isDom:Tl,isEmail:function(...e){if(!e.length)return!1;let t=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;for(let n of e){if(!Qc(n))return!1;if(!t.test(n))return!1}return!0},isEmpty:vl,isEvent:function(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof Event))return!1;return!0},isFocused:function(e,t=!1){return e===document.activeElement||t&&e.contains&&e.contains(document.activeElement)},isFunction:tl,isHex:function(e){return Boolean(e.match(/^(0x)?[0-9a-f]+$/i))},isHostname:function(...e){if(!e.length)return!1;for(let t of e){if(!Qc(t))return!1;if(!gd(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=ed(e);if(n.length){if(Qc(t)){let e=!1;return al(n,n=>{if(n.matches&&n.matches(t))return e=!0,!1}),e}if(t instanceof HTMLElement)return n.indexOf(t)>-1}return!1},isInt:el,isInViewport:function(e,t=!1){const n=e.getBoundingClientRect();if(t)return n.top>=0&&n.left>=0&&n.right<=(window.innerWidth||document.documentElement.clientWidth)&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight);const r=e.offsetHeight,o=e.offsetWidth;return n.top>=-r&&n.left>=-o&&n.right<=(window.innerWidth||document.documentElement.clientWidth)+o&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)+r},isIP:gd,isIterable:Xc,isMobile:hd,isMobileDevice:fd,isNotObject:Hf,isNull:Ml,isNumber:Kc,isObject:sl,isPercent:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^\d+(?:\.\d+)?%$/))return!1;return!0},isPrimitive:ef,isPromise:function(...e){if(!e.length)return!1;for(let t of e)if("[object Promise]"!=={}.toString.apply(t))return!1;return!0},isPropSize:function(e){let t=!1;return al(["width","height","gap","margin","padding","top","left","right","bottom"],n=>{if(-1!==e.indexOf(n))return t=!0,!1}),t},isSame:Pl,isSQLDate:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^([1-2]\d{3})-((0\d)|(1[12]))-(([0-2]\d)|(3[01]))(?:( [0-2]\d):([0-5]\d):([0-5]\d))?$/))return!1;return!0},isString:Qc,isSymbol:wd,isTabletDevice:dd,isURL:function(...e){if(!e.length)return!1;for(let t of e)if(!bbn.var.regexp.url.test(t))return!1;return!0},isUid:function(...e){if(!e.length)return!1;for(let t of e)if("string"!=typeof t||!t.match(/^[0-9a-f]{32}$/i))return!1;return!0},isValidDimension:bd,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Qc(t)||!/^[$A-Z_][0-9A-Z_$]*$/i.test(t))return!1;return!0},isVue:function(...e){if(!e.length)return!1;if("vue"in bbn&&window.Vue)if("app"in bbn.vue){for(let t of e)if(!t||"function"!=typeof t.render)return!1}else for(let t of e)if(!(t instanceof window.Vue))return!1;return!("cp"in bbn)||!("isComponent"in bbn.cp)||"function"!=typeof bbn.cp.isComponent||bbn.cp.isComponent(...e)},isWritable:function(e,t){let n;for(;e&&(n=Object.getOwnPropertyDescriptor(e,t),!n);)e=Object.getPrototypeOf(e);return!n||Boolean(n.writable||n.set)},iterate:il,lightenDarkenHex:function(e,t){if(e&&t){let n="#"===e[0];e=n?e.slice(1):e;let r=parseInt(e,16),o=(r>>16)+t,i=(r>>8&255)+t,a=(255&r)+t;return o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0),a>255?a=255:a<0&&(a=0),(n?"#":"")+(a|i<<8|o<<16).toString(16)}},link:cd,log:nl,makeReactive:function e(t,n,r,o){const i=(null==r?void 0:r.$cid)||"",a="__bbn_"+(i?i+"_":"");if(t&&"object"==typeof t&&[void 0,Object,Array].includes(t.constructor)){if(t.__bbnIsProxy&&t.__bbnParent===r)return t;r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["MAKING bbn-loadbar",t]),t.__bbnWatchers||Reflect.defineProperty(t,"__bbnWatchers",{value:Yf(),writable:!0,configurable:!0,enumerable:!1});return new Proxy(t,{get(s,u){const c=Reflect.get(s,u),l=s.__bbnRoot||s;if(wd(u))return Reflect.get(l,u);const f=o?o+"."+u:u,d=a+(Kc(u)?u.toString():u);if(["fill","pop","push","reverse","shift","sort","splice","unshift"].includes(u)&&ul(s))return function(...e){let t=l[u](...e);return yd("DOING ARRAY STUFF"),nl(s.__bbnParent),n(s,"length",r),t};if(tl(c))return c;if("__bbnRoot"===u){let e=t;for(;e&&(null==e?void 0:e.__bbnTarget);)e=e.__bbnTarget;return e}return"__bbnIsProxy"===u||("__bbnTarget"===u?s:"__bbnParent"===u?r:"__bbnWatchers"===u?s.__bbnWatchers:0===u.indexOf("__bbn_")?Reflect.get(s,u):"length"===u&&ul(s.__bbnRoot||s)?l.length:u in s&&c&&"object"==typeof c&&[void 0,Object,Array].includes(c.constructor)?(c.__bbnIsProxy&&c.__bbnParent===r||(d in l||Reflect.defineProperty(l,d,{value:e(c,n,r,f),writable:!0,configurable:!0,enumerable:!1}),l[d].__bbnIsProxy&&!l.__bbnWatchers[i]&&(l.__bbnWatchers[i]=f)),l[d]):c)},set(t,s,u){if(wd(s))return Reflect.get(t,s,u);const c=t.__bbnRoot||t,l=o?o+"."+s:s;if(wd(s))return Reflect.get(t,s);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["Setting proxy prop in "+r.$options.name,t,s,u]),!Pl(c[s],u)){if(0===s.indexOf("__bbn_"))Reflect.defineProperty(c,s,{value:e(u,n,r,l),writable:!0,configurable:!0,enumerable:!1});else if(u&&"object"==typeof u&&[void 0,Object,Array].includes(u.constructor)){const t=a+(Kc(s)?s.toString():s);Reflect.defineProperty(c,t,{value:e(u,n,r,l),writable:!0,configurable:!0,enumerable:!1}),c[t].__bbnIsProxy&&!c.__bbnWatchers[i]&&(c.__bbnWatchers[i]=l)}r&&r.$options&&"bbn-loadbar"===r.$options.name&&nl(["Setting proxy prop in "+r.$options.name+" "+(Kc(s)?s.toString():s),u,t]),Reflect.set(c,s,u),n(t,s,r)}return!0},defineProperty(t,i,s){const u=t,c=o?o+"."+i:i;if("__bbnWatchers"===i||wd(i)||0===i.indexOf("__bbn_"))Reflect.defineProperty(u,i,s);else{const t=a+(Kc(i)?i.toString():i);Reflect.defineProperty(u,t,{value:e(s.value,n,r,c),writable:!0,configurable:!0,enumerable:!1})}return n(t,i,r),!0},deleteProperty(e,t){const n=e;if(0===t.indexOf("__bbn_"))Reflect.deleteProperty(n,t);else{const r=a+(Kc(t)?t.toString():t);Reflect.deleteProperty(n,r),Reflect.deleteProperty(e,t)}return!0}})}return t},map:function e(t,n,r,o=0){return t.map((t,i)=>(t=n(t,i,o),r&&t[r]&&ul(t[r])&&(t[r]=e(t[r],n,r,o+1)),t))},md5:xl,microtimestamp:function(){return window.performance.now()+performance.timeOrigin},money:function(e,t,n,r,o,i,a){if(o||(o=void 0===o&&bbn.env.money&&void 0!==bbn.env.money.decimal?bbn.env.money.decimal:"."),n||(n=void 0===n&&bbn.env.money&&void 0!==bbn.env.money.currency?bbn.env.money.currency:""),i||(i=void 0===i&&bbn.env.money&&void 0!==bbn.env.money.thousands?bbn.env.money.thousands:" "),a||(a=void 0===a&&bbn.env.money&&void 0!==bbn.env.money.precision?bbn.env.money.precision:0),t||(t=!(void 0!==t||!bbn.env.money||void 0===bbn.env.money.kilo)&&bbn.env.money.kilo),r||(r=!(void 0!==r||!bbn.env.money||void 0===bbn.env.money.novalue)&&bbn.env.money.novalue),Kc(a)||(a=t?3:0),0===e&&"number"==typeof a&&a>0){let r=e.toFixed(a).replace(".",o);return n&&(r+=" "+(t?"K"+n:n)),r}if((isNaN(e)||!e)&&r)return r;if(isNaN(e)||!e)return 0+(n?" "+n:"");if("string"==typeof e&&(e=Number(e)),"number"!=typeof e)throw new Error("The value must be a number");t&&e&&(e/=1e3,n&&(n="K"+n));let s=e.toFixed(a),u=0,c=1e4;return s&&(c=s.indexOf("."),c<=0?c=1e4:u=s.length-c),s.replace(/./g,function(e,t,n){return"."===e?o:t&&(n.length-t-u)%3==0&&t<c?i+e:e})+(n?" "+n:"")},move:function(e,t,n){if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e},multiorder:function(e,t){if(!t)return e;let n;if(Array.isArray(t)||"object"!=typeof t)n=t;else for(var r in n=[],t)n.push({field:r,dir:t[r]});if(!Array.isArray(n))throw new Error("The orders argument must be an array");return e.slice().sort((e,t)=>{let r;for(let o of n)if(r=wl(e,t,o.field,o.dir),0!==r)return r;return 0})},mutateArray:function(e,t,n=null){if(!ul(e,t))throw new TypeError("mutateArray can only be called with arrays");n?jf(n,"function","The hash function must be a function"):n=Ol;const r=new Map(t.map(e=>[n(e),e]));let o=[];t.forEach(e=>{o.push(e)});let i=e.length;for(;i--;)r.has(n(e[i]))||e.splice(i,1);for(let t=0;t<o.length;t++)if(t>=e.length||!Pl(e[t],o[t])){const n=Yl(e,o[t]);if(-1!==n){const[r]=e.splice(n,1);e.splice(t,0,r)}else e.splice(t,0,o[t])}return e.length>o.length&&e.splice(o.length,e.length-o.length),e},mutateObject:function(e,t,n){if(!sl(e,t))throw new TypeError("mutateObject can only be called with arrays");n?jf(n,"function","The hash function must be a function"):n=Ol;const r=Object.keys(t);for(let t in e)r.includes(t)||delete e[t];return r.forEach(n=>{Pl(e[n],t[n])||(e[n]=t[n])}),e},nl2br:function(e,t){return Wl("\n","<br>"+(t?"\n":""),e)},numProperties:yl,objectToFormData:vd,order:function(e,t,n="asc"){return e?e.sort(function(e,r){return wl(e,r,t,n)}):e},outerHeight:function(e){if((e=Md(e))&&"offsetHeight"in e){let t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom);return Math.ceil(e.offsetHeight+n)}},outerWidth:function(e){e=Md(e);let t=window.getComputedStyle(e),n=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return Math.ceil(e.offsetWidth+n)},percent:function(e,t){return t/100*e},pickValue:function(e){if(Array.isArray(e)&&e.length)return e[Math.floor(Math.random()*e.length)]},post:Ed,postOut:function(e,t,n=null,r=""){let o=document.body.querySelector("form#bbn-form_out");o||(o=document.createElement("form"),o.classList.add("bbn-no"),o.setAttribute("id","bbn-form_out"),o.setAttribute("method","post"),o.setAttribute("enctype","multipart/form-data-encoded"),Sd(o,"style.display","none"),document.body.appendChild(o)),o instanceof HTMLFormElement&&(o.innerHTML="",o.setAttribute("action",e),o.setAttribute("target",r||"_blank"),t||(t={}),(t=Yf(t)).bbn||(t.bbn="public"),Bl(o,t),o.submit(),n&&n())},printf:function(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,n){return void 0!==t[n]?t[n]:e})},quotes2html:function(e,t){return t&&0!==t.toLowerCase().indexOf("s")||(e=Wl("'","&#39;",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=Wl('"',"&quot;",e)),e},randomInt:Dd,randomString:function(e,t,n){let r,o,i={n:"0123456789",l:"abcdefghijklmnopqrstuvwxyz",u:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};n||(n="nlu"),e||(r=Dd(8,14)),"string"==typeof t?(n="n",delete i.l,delete i.u,i.n=t,r||(r=e)):"number"==typeof t&&e<t?r=Dd(e,t):e&&(r=e);let a="";for(let e=0;e<r;e++)0===e?"n"!==n&&(o=-1===n.indexOf("u")?"l":"u"):o=n[Math.floor(Math.random()*n.length)],a+=i[o][Math.floor(Math.random()*i[o].length)];return a},range:function(e,t,n){return Array.from({length:(t-e)/n+1},(t,r)=>e+r*n)},removeAccents:bl,removeEmpty:function(e){var t=[];if(ul(e))for(let n=0;n<e.length;n++){let r=!1;e[n]&&(ul(e[n])?e[n].length&&(r=!0):sl(e[n])?yl(e[n])&&(r=!0):r=!0),r&&t.push(e[n])}return t},removeExtraSpaces:function(e){return e.replace(/\s+/g," ").trim()},removeHtmlComments:od,removePrivateProp:ol,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;rl(e,-t.length)===t;)e=rl(e,0,e.length-t.length);for(;rl(e,0,t.length)===t;)e=rl(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:Wl,replaceSelection:function(e,t){let n,r,o;if(n=window.getSelection(),n.getRangeAt&&n.rangeCount){if(r=window.getSelection().getRangeAt(0),r.deleteContents(),r.createContextualFragment)o=r.createContextualFragment(e);else{const t=document.createElement("div");let n;for(t.innerHTML=e,o=document.createDocumentFragment();n=t.firstChild;)o.appendChild(n)}const i=o.firstChild,a=o.lastChild;r.insertNode(o),n.removeAllRanges(),t?(i&&(r.setStartBefore(i),r.setEndAfter(a)),n.addRange(r)):(r.setStartAfter(a),n.addRange(r))}},resize:ld,rgb2hex:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},riterate:function(e,t,n=!1){return il(e,t,n,!0)},roundDecimal:function(e,t){return Number(Math.round(parseFloat(e+"e"+t+"e-"+t)))},sanitize:function(e,t="_"){let n=["[","]","{","}","(",")","-","+","*","/"],r="[";for(let e=0;e<t.length;e++)n.includes(t[e])&&(r+="\\"),r+=t[e];r+="]+";let o=new RegExp(r,"g");return Td(bl(e).replace(/[^a-z0-9]/gi,t).replace(o,t),t)},search:Yl,selectElementText:function(e,t=null){if(t=t||window,e instanceof HTMLInputElement)return void e.select();let n,r,o=t.document;t.getSelection&&o.createRange?(n=t.getSelection(),r=o.createRange(),r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r)):"createTextRange"in o.body&&"function"==typeof o.body.createTextRange&&(r=o.body.createTextRange(),r.moveToElementText(e),r.select())},selector:Md,setCookie:function(e,t,n){let r="";if(n){let e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),r="; expires="+e.toUTCString()}let o=escape(JSON.stringify({value:t}));document.cookie=e+"="+o+r+"; path=/"},setCssVar:function(e,t){0!==e.indexOf("--")&&(e="--"+e),document.documentElement.style.setProperty(e,t)},setNavigationVars:ud,setProp:function(e,t,n,r=!0,o=!0){Object.defineProperty(e,t,{value:n,writable:r,configurable:o})},setProperty:Sd,shorten:kd,shortenObj:function e(t,n=100){let r=Pf(t);return al(r,(t,o)=>{Qc(t)&&t.length>n?r[o]=kd(t,n):t&&"object"==typeof t&&(r[o]=e(t))}),r},shuffle:function(e){let t,n=e.length;for(;0!=n;)t=Math.floor(Math.random()*n),n--,[e[n],e[t]]=[e[t],e[n]];return e},simpleHash:Dl,simpleHash1:El,simpleHash2:Sl,startChrono:function(e){let t=bbn.fn.microtimestamp();return this.constructor.chronos||Object.defineProperty(this.constructor,"chronos",{value:Object.create(null),writable:!1,configurable:!1}),this.constructor.chronos[e||"default"]=t,e},stopChrono:function(e,t){if(this.constructor.chronos[e||"default"]){let n=bbn.fn.microtimestamp()-this.constructor.chronos[e||"default"];return delete this.constructor.chronos[e||"default"],t&&(n=Math.round(n)/1e3),n}throw Error("No chrono with name "+(e||"default"))},stream:function(e,t,n,r,o,i){const a=zl(e,n,"json"),s=Ll(a);if(null==s?void 0:s.loader)return s.loader;n||(n={}),bbn.env.token&&(n._bbn_token=bbn.env.token);const u=new AbortController;let c="";const l=e=>{if(e.length){e=e.indexOf("\n")>-1?bbn.fn.removeEmpty(e.split("\n")):[e];for(let n in e)try{t(JSON.parse(e[n]))}catch(e){throw e}}},f=bbn.fn.startChrono(),d=fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:u.signal,body:JSON.stringify(n||{})}).then(e=>{if(bbn.fn.log("RESPONSE IN "+bbn.fn.stopChrono(f,!0)+" SECS"),e.body){const r=e.body.getReader(),o=tl(t);r.read().then(function e({done:s,value:u}){if(s)return Fl(a,n),c&&l(c),void(i&&i());if(o)if(c+=Jl(u).trim(),bbn.fn.log(["STREAM RESULT",c.length,c]),c)try{l(c),c=""}catch(e){}else t();else bbn.fn.log(["STREAM SUCCESS IS FN? "+o]);return r.read().then(e)})}}).catch(t=>{let i=!(!(s=t)||!0!==s.__BBN_CANCEL__);var s;if(Fl(a,n,i),i){let n=1;tl(o)&&(n=o(t.message,e)),n&&Ff(t.message,e)}else{let e=1;tl(r)&&(e=r(t.request,t)),e&&Lf(t.request,t.response?t.response.data:"",t.response?t.response.status:t)}});return ml(a,d,u),d},string2ArrayBuffer:function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},submit:function(e,t,n){let r,o=e.getAttribute("action")||bbn.env.path;if(""===o&&(o="."),"string"==typeof o&&(0!==o.indexOf("http")||-1!==o.indexOf(window.document.location.hostname))&&!e.getAttribute("target")&&(t&&t.preventDefault(),r=Xf(e),r)){e.setAttribute("action",null);const t=[o,r];!n&&e.getAttribute("data-script")&&(n=(n=new Function(e.getAttribute("data-script")))()),n&&t.push(n),Ed(...t)}},substr:rl,sum:function(e,t,n,r,o){let i=0;return al(Cf(e,n,r,o),e=>{let n="function"==typeof t?t(e):e[t];n&&(i+=parseFloat(n)||0)}),i},timestamp:md,toCSV:function(e,t=",",n="",r='"'){t||(t=","),r||(r='"');let o="",i=e.length;return al(e,(e,a)=>{let s=ul(e)?e.length:Object.values(e).length,u=0;al(e,e=>{o+="string"==typeof e?r+Wl(r,"\\"+r,e)+r:0===e?"0":e&&e.toString?e.toString():r+r,u++,u<s&&(o+=t)}),a<i-1&&(o+=n+"\n")}),o},toggleFullScreen:function(){"mozRequestFullScreen"in window.document.documentElement?window.document.mozFullScreen?window.document.mozCancelFullScreen():"function"==typeof window.document.documentElement.mozRequestFullScreen&&window.document.documentElement.mozRequestFullScreen():"webkitRequestFullScreen"in window.document.documentElement?window.document.webkitIsFullScreen?window.document.webkitCancelFullScreen():"function"==typeof window.document.documentElement.webkitRequestFullScreen&&window.document.documentElement.webkitRequestFullScreen():"msRequestFullScreen"in window.document.documentElement?window.document.msFullscreenEnabled?window.document.msExitFullscreen():"function"==typeof window.document.documentElement.msRequestFullScreen&&window.document.documentElement.msRequestFullScreen():"requestFullscreen"in window.document&&(window.document.fullscreenEnabled?window.document.exitFullscreen():window.document.documentElement.requestFullscreen()),setTimeout(function(){ld()},0)},translate:function(e,t){let n=t?bbn.lng[0===t.indexOf("_")?t:"_"+t]:bbn.lng;il(e,(e,t)=>{n[t]=e})},treatAjaxArguments:sd,treatForHash:_l,trim:Td,uniqString:function(...e){for(var t="",n=0;n<e.length;n++)if(e[n])if("object"==typeof e[n])if(ul(e[n]))t+=JSON.stringify(e[n]);else{let r={};al(Object.keys(e[n]).sort(),t=>{r[t]=e[n][t]}),t+=JSON.stringify(r)}else"string"!=typeof e[n]?t+=e[n].toString():t+=e[n];else t+="__bbn_empty__";return xl(t)},unique:Qf,upload:function(e,t,n=null,r=null,o=null){const i=()=>Gc.run("post",e||bbn.env.path,{data:vd(t),headers:{},onUploadProgress(e){if(o){let t=Math.round(100*e.loaded/e.total);o(t,e.loaded,e.total)}}});return n||r?i().then(e=>{n&&(nl("SUCCESS",e),n(e))}).catch(e=>{r&&(nl("ERROR",e),r(e))}):i()},warning:yd,yieldToBrowser:Jf};const _d={version:"1.0.1",opt:{_cat:{}},app:{},_:Uc,$:function(e,t){if(null==t?void 0:t.querySelectorAll)return t.querySelectorAll(e);if(t)throw new Error("Invalid context");return document.body.querySelectorAll(e)},lng:{select_unselect_all:"Select/Clear all",select_all:"Select all",search:"Search",loading:"Loading...",choose:"Choose",error:"Error",server_response:"Server response",reload:"Reload",errorText:"Something went wrong",closeAll:"Close all",closeOthers:"Close others",pin:"Pin",arrange:"Arrange",cancel:"Cancel",unpin:"Unpin",yes:"Yes",no:"No",unknown:"Unknown",untitled:"Untitled",confirmation:"Confirmation",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},var:$c,dt:kf,com:Gc,env:Wc,db:hl,fn:Id,info:[{value:"ajax",label:"Loading and streaming",description:"Functions related to Ajax requests",icon:"nf nf-fa-rocket"},{value:"browser",label:"Browser-only",description:"Functions that can only be run in the browser",icon:"nf nf-fa-desktop"},{value:"convert",label:"Conversion",description:"Functions related to data conversion",icon:"nf nf-fa-exchange"},{value:"datetime",label:"Date and time",description:"Functions related to dates and times",icon:"nf nf-fa-calendar"},{value:"form",label:"Form manipulation",description:"Functions related to form manipulation and validation",icon:"nf nf-fa-edit"},{value:"html",label:"HTML manipulation",description:"Functions related to HTML manipulation and DOM interaction",icon:"nf nf-fa-html5"},{value:"loop",label:"Looping",description:"Functions related to looping through arrays and objects",icon:"nf nf-fa-repeat"},{value:"misc",label:"Miscellaneous",description:"Miscellaneous functions that do not fit into other categories",icon:"nf nf-fa-cubes"},{value:"object",label:"Object manipulation",description:"Functions related to object manipulation and inspection",icon:"nf nf-fa-object_group"},{value:"phone",label:"Phone and contact",description:"Functions related to phone numbers and contact information",icon:"nf nf-fa-phone"},{value:"string",label:"String manipulation",description:"Functions related to string manipulation and formatting",icon:"nf nf-fa-text_height"},{value:"style",label:"Styling and layout",description:"Functions related to styling and layout management",icon:"nf nf-fa-paint_brush"},{value:"type",label:"Type checking",description:"Functions related to type checking and validation",icon:"nf nf-fa-check_square"}]};"undefined"!=typeof window&&(window.bbn=_d,window.Temporal||(window.Temporal=Zc)),e.Temporal=Zc,e.bbn=_d,e.default=_d,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=bbn.js.map