@bbn/bbn 2.0.2 → 2.0.4
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 +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/date.d.ts +2 -1
- package/dist/date.js +16 -14
- package/dist/fn.d.ts +0 -2
- package/dist/fn.js +0 -2
- package/package.json +1 -1
- package/dist/fn/datetime/daysInMonth.d.ts +0 -16
- package/dist/fn/datetime/daysInMonth.js +0 -21
package/dist/bbn.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var bbn=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r={exports:{}};var o,i=(n||(n=1,r.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",i="minute",s="hour",a="day",u="week",l="month",c="quarter",f="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,l),i=n-o<0,s=t.clone().add(r+(i?-1:1),l);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:f,w:u,d:a,D:d,h:s,m:i,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",v={};v[w]=p;var _="$isDayjsObject",S=function(e){return e instanceof O||!(!e||!e[_])},M=function e(t,n,r){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();v[i]&&(o=i),n&&(v[i]=n,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;v[a]=t,o=a}return!r&&o&&(w=o),o||!r&&w},x=function(e,t){if(S(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},D=y;D.l=M,D.i=S,D.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function p(e){this.$L=M(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var g=p.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(D.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return D},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return D.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!D.u(t)||t,c=D.p(e),h=function(e,t){var o=D.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(a)},m=function(e,t){return D.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},b=this.$W,p=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case f:return r?h(1,0):h(31,11);case l:return r?h(1,p):h(0,p+1);case u:var w=this.$locale().weekStart||0,v=(b<w?b+7:b)-w;return h(r?g-v:g+(6-v),p);case a:case d:return m(y+"Hours",0);case s:return m(y+"Minutes",1);case i:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=D.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[a]=c+"Date",n[d]=c+"Date",n[l]=c+"Month",n[f]=c+"FullYear",n[s]=c+"Hours",n[i]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===a?this.$D+(t-this.$W):t;if(u===l||u===f){var b=this.clone().set(d,1);b.$d[h](m),b.init(),this.$d=b.set(d,Math.min(this.$D,b.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[D.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var m=D.p(c),b=function(e){var t=x(h);return D.w(t.date(t.date()+Math.round(e*r)),h)};if(m===l)return this.set(l,this.$M+r);if(m===f)return this.set(f,this.$y+r);if(m===a)return b(1);if(m===u)return b(7);var p=(d={},d[i]=t,d[s]=n,d[o]=e,d)[m]||1,g=this.$d.getTime()+r*p;return D.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=D.z(this),i=this.$H,s=this.$m,a=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,f=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},d=function(e){return D.s(i%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(b,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return D.s(t.$y,4,"0");case"M":return a+1;case"MM":return D.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,l,3);case"MMMM":return f(l,a);case"D":return t.$D;case"DD":return D.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,u,2);case"ddd":return f(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(i);case"HH":return D.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,s,!0);case"A":return m(i,s,!1);case"m":return String(s);case"mm":return D.s(s,2,"0");case"s":return String(t.$s);case"ss":return D.s(t.$s,2,"0");case"SSS":return D.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var m,b=this,p=D.p(d),g=x(r),y=(g.utcOffset()-this.utcOffset())*t,w=this-g,v=function(){return D.m(b,g)};switch(p){case f:m=v()/12;break;case l:m=v();break;case c:m=v()/3;break;case u:m=(w-y)/6048e5;break;case a:m=(w-y)/864e5;break;case s:m=w/n;break;case i:m=w/t;break;case o:m=w/e;break;default:m=w}return h?m:D.a(m)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return v[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=M(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return D.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},p}(),k=O.prototype;return x.prototype=k,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",l],["$y",f],["$D",d]].forEach(function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=M,x.isDayjs=S,x.unix=function(e){return x(1e3*e)},x.en=v[w],x.Ls=v,x.p={},x}()),r.exports),s=t(i),a={exports:{}};var u,l=(o||(o=1,a.exports=function(e,t,n){var r="h:mm A",o={lastDay:"[Yesterday at] "+r,sameDay:"[Today at] "+r,nextDay:"[Tomorrow at] "+r,nextWeek:"dddd [at] "+r,lastWeek:"[Last] dddd [at] "+r,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var r=t||this.$locale().calendar||o,i=n(e||void 0).startOf("d"),s=this.diff(i,"d",!0),a="sameElse",u=s<-6?a:s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":a,l=r[u]||o[u];return"function"==typeof l?l.call(this,n()):this.format(l)}}),a.exports),c=t(l),f={exports:{}};var d,h=(u||(u=1,f.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)},u=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},f=function(e,t){var n,r=s.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=f(e,!1)}],a:[i,function(e){this.afternoon=f(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[r,u("day")],Do:[i,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,u("week")],ww:[r,u("week")],M:[o,u("month")],MM:[r,u("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,u("year")],Z:l,ZZ:l};function h(n){var r,o;r=n,o=s&&s.formats;for(var i=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(t),a=i.length,u=0;u<a;u+=1){var l=i[u],c=d[l],f=c&&c[0],h=c&&c[1];i[u]=h?{regex:f,parser:h}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var o=i[n];if("string"==typeof o)r+=o.length;else{var s=o.regex,u=o.parser,l=e.slice(r),c=s.exec(l)[0];u.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,i=e.args;this.$u=r;var a=i[1];if("string"==typeof a){var u=!0===i[2],l=!0===i[3],c=u||l,f=i[2];l&&(f=i[2]),s=this.$locale(),!u&&f&&(s=n.Ls[f]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=h(t)(e),i=o.year,s=o.month,a=o.day,u=o.hours,l=o.minutes,c=o.seconds,f=o.milliseconds,d=o.zone,m=o.week,b=new Date,p=a||(i||s?1:b.getDate()),g=i||b.getFullYear(),y=0;i&&!s||(y=s>0?s-1:b.getMonth());var w,v=u||0,_=l||0,S=c||0,M=f||0;return d?new Date(Date.UTC(g,y,p,v,_,S,M+60*d.offset*1e3)):n?new Date(Date.UTC(g,y,p,v,_,S,M)):(w=new Date(g,y,p,v,_,S,M),m&&(w=r(w).week(m).toDate()),w)}catch(e){return new Date("")}}(t,a,r,n),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var d=a.length,m=1;m<=d;m+=1){i[1]=a[m-1];var b=n.apply(this,i);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}m===d&&(this.$d=new Date(""))}else o.call(this,e)}}}()),f.exports),m=t(h),b={exports:{}};var p,g=(d||(d=1,b.exports=function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf("day")-n(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"day")}}),b.exports),y=t(g),w={exports:{}};var v,_=(p||(p=1,w.exports=function(){var e,t,n=1e3,r=6e4,o=36e5,i=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,u=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:a,months:u,days:i,hours:o,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},f=function(e){return e instanceof y},d=function(e,t,n){return new y(e,n,t.$l)},h=function(e){return t.p(e)+"s"},m=function(e){return e<0},b=function(e){return m(e)?Math.ceil(e):Math.floor(e)},p=function(e){return Math.abs(e)},g=function(e,t){return e?m(e)?{negative:!0,format:""+p(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*c[h(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){r.$d[h(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var o=e.match(l);if(o){var i=o.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=i[0],this.$d.months=i[1],this.$d.weeks=i[2],this.$d.days=i[3],this.$d.hours=i[4],this.$d.minutes=i[5],this.$d.seconds=i[6],this.calMilliseconds(),this}}return this}var p=m.prototype;return p.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*c[n]},0)},p.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=b(e/a),e%=a,this.$d.months=b(e/u),e%=u,this.$d.days=b(e/i),e%=i,this.$d.hours=b(e/o),e%=o,this.$d.minutes=b(e/r),e%=r,this.$d.seconds=b(e/n),e%=n,this.$d.milliseconds=e},p.toISOString=function(){var e=g(this.$d.years,"Y"),t=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=g(n,"D"),o=g(this.$d.hours,"H"),i=g(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var a=g(s,"S"),u=e.negative||t.negative||r.negative||o.negative||i.negative||a.negative,l=o.format||i.format||a.format?"T":"",c=(u?"-":"")+"P"+e.format+t.format+r.format+l+o.format+i.format+a.format;return"P"===c||"-P"===c?"P0D":c},p.toJSON=function(){return this.toISOString()},p.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(s,function(e,t){return t||String(r[e])})},p.as=function(e){return this.$ms/c[h(e)]},p.get=function(e){var t=this.$ms,n=h(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?b(t/c[n]):this.$d[n],t||0},p.add=function(e,t,n){var r;return r=t?e*c[h(t)]:f(e)?e.$ms:d(e,this).$ms,d(this.$ms+r*(n?-1:1),this)},p.subtract=function(e,t){return this.add(e,t,!0)},p.locale=function(e){var t=this.clone();return t.$l=e,t},p.clone=function(){return d(this.$ms,this)},p.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},m}(),w=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,o){e=o,t=o().$utils(),o.duration=function(e,t){var n=o.locale();return d(e,{$l:n},t)},o.isDuration=f;var i=r.prototype.add,s=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?w(this,e,1):i.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?w(this,e,-1):s.bind(this)(e,t)}}}()),w.exports),S=t(_),M={exports:{}};var x,D=(v||(v=1,M.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var i=n(e),s=n(t),a="("===(o=o||"()")[0],u=")"===o[1];return(a?this.isAfter(i,r):!this.isBefore(i,r))&&(u?this.isBefore(s,r):!this.isAfter(s,r))||(a?this.isBefore(i,r):!this.isAfter(i,r))&&(u?this.isAfter(s,r):!this.isBefore(s,r))}}),M.exports),O=t(D),k={exports:{}};var $,E=(x||(x=1,k.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}),k.exports),T=t(E),A={exports:{}};var j,C,L=($||($=1,A.exports=(j="day",function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),j)},o=t.prototype;o.isoWeekYear=function(){return r(this).year()},o.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),j);var t,o,i,s=r(this),a=(t=this.isoWeekYear(),i=4-(o=(this.$u?n.utc:n)().year(t).startOf("year")).isoWeekday(),o.isoWeekday()>4&&(i+=7),o.add(i,j));return s.diff(a,"week")+1},o.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var i=o.startOf;o.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return"isoweek"===n.p(e)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):i.bind(this)(e,t)}})),A.exports),Y=t(L),F={exports:{}};var N,R=(C||(C=1,F.exports=function(e,t,n){var r=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},i=function(e,t,n,r,i){var s=e.name?e:e.$locale(),a=o(s[t]),u=o(s[n]),l=a||u.map(function(e){return e.slice(0,r)});if(!i)return l;var c=s.weekStart;return l.map(function(e,t){return l[(t+(c||0))%7]})},s=function(){return n.Ls[n.locale()]},a=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},u=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):i(e,"months")},monthsShort:function(t){return t?t.format("MMM"):i(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):i(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):i(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):i(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return a(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return u.bind(this)()},n.localeData=function(){var e=s();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return a(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return i(s(),"months")},n.monthsShort=function(){return i(s(),"monthsShort","months",3)},n.weekdays=function(e){return i(s(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return i(s(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return i(s(),"weekdaysMin","weekdays",2,e)}}),F.exports),I=t(R),P={exports:{}};var H,B=(N||(N=1,P.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,i=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,o){var i=o&&o.toUpperCase();return r||n[o]||e[o]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(t,void 0===n?{}:n);return i.call(this,r)}}}()),P.exports),U=t(B),W={exports:{}};var z,q=(H||(H=1,W.exports=function(e,t,n){var r=function(e,t){if(!t||!t.length||1===t.length&&!t[0]||1===t.length&&Array.isArray(t[0])&&!t[0].length)return null;var n;1===t.length&&t[0].length>0&&(t=t[0]),n=(t=t.filter(function(e){return e}))[0];for(var r=1;r<t.length;r+=1)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n};n.max=function(){var e=[].slice.call(arguments,0);return r("isAfter",e)},n.min=function(){var e=[].slice.call(arguments,0);return r("isBefore",e)}}),W.exports),V=t(q),Z={exports:{}};var J,X,G,K=(z||(z=1,Z.exports=(J="month",X="quarter",function(e,t){var n=t.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var r=n.add;n.add=function(e,t){return e=Number(e),this.$utils().p(t)===X?this.add(3*e,J):r.bind(this)(e,t)};var o=n.startOf;n.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;if(n.p(e)===X){var i=this.quarter()-1;return r?this.month(3*i).startOf(J).startOf("day"):this.month(3*i+2).endOf(J).endOf("day")}return o.bind(this)(e,t)}})),Z.exports),Q=t(K),ee={exports:{}};var te,ne=(G||(G=1,ee.exports=function(e,t,n){e=e||{};var r=t.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(e,t,n,o){return r.fromToBase(e,t,n,o)}n.en.relativeTime=o,r.fromToBase=function(t,r,i,s,a){for(var u,l,c,f=i.$locale().relativeTime||o,d=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=d.length,m=0;m<h;m+=1){var b=d[m];b.d&&(u=s?n(t).diff(i,b.d,!0):i.diff(t,b.d,!0));var p=(e.rounding||Math.round)(Math.abs(u));if(c=u>0,p<=b.r||!b.r){p<=1&&m>0&&(b=d[m-1]);var g=f[b.l];a&&(p=a(""+p)),l="string"==typeof g?g.replace("%d",p):g(p,r,b.l,c);break}}if(r)return l;var y=c?f.future:f.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(e,t){return i(e,t,this,!0)},r.from=function(e,t){return i(e,t,this)};var s=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(s(this),e)},r.fromNow=function(e){return this.from(s(this),e)}}),ee.exports),re=t(ne),oe={exports:{}};var ie,se=(te||(te=1,oe.exports=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,s=function(e,n,r){void 0===r&&(r={});var o=new Date(e),i=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r);return i.formatToParts(o)},a=function(t,n){for(var r=s(t,n),i=[],a=0;a<r.length;a+=1){var u=r[a],l=u.type,c=u.value,f=e[l];f>=0&&(i[f]=parseInt(c,10))}var d=i[3],h=24===d?0:d,m=i[0]+"-"+i[1]+"-"+i[2]+" "+h+":"+i[4]+":"+i[5]+":000",b=+t;return(o.utc(m).valueOf()-(b-=b%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(a))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(l)){if(n=o(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=n.utcOffset();n=n.add(r-c,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,s=n||t||i,u=a(+o(),s);if("string"!=typeof e)return o(e).tz(s);var l=function(e,t,n){var r=e-60*t*1e3,o=a(r,n);if(t===o)return[r,t];var i=a(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),u,s),c=l[0],f=l[1],d=o(c).utcOffset(f);return d.$x.$timezone=s,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}()),oe.exports),ae=t(se),ue={exports:{}};var le,ce=(ie||(ie=1,ue.exports=function(e,t,n){n.updateLocale=function(e,t){var r=n.Ls[e];if(r)return(t?Object.keys(t):[]).forEach(function(e){r[e]=t[e]}),r}}),ue.exports),fe=t(ce),de={exports:{}};var he,me=(le||(le=1,de.exports=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var s=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var u=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=s.utcOffset;s.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===i?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(o);var a=this.clone();if(o)return a.$offset=s,a.$u=!1,a;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(s+u,e)).$offset=s,a.$x.$localOffset=u,a};var c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=s.diff;s.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()),de.exports),be=t(me),pe={exports:{}};var ge,ye=(he||(he=1,pe.exports=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n<t?n+7:n)-t;return this.$utils().u(e)?r:this.subtract(r,"day").add(e,"day")}}),pe.exports),we=t(ye),ve={exports:{}};var _e=(ge||(ge=1,ve.exports=function(){var e="week",t="year";return function(n,r,o){var i=r.prototype;i.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var i=o(this).startOf(t).add(1,t).date(r),s=o(this).endOf(e);if(i.isBefore(s))return 1}var a=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),u=this.diff(a,e,!0);return u<0?o(this).startOf("week").week():Math.ceil(u)},i.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()),ve.exports),Se=t(_e);function Me(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}var xe={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}},De={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,timeoff:Math.round((new Date).getTime()/1e3),loggingLevel:5,ignoreUnload:!1,historyDisabled:!1,nav:"ajax",online:window.navigator.onLine},Oe=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};class ke extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const $e=["POST","PUT","PATCH","DELETE"],Ee=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=$e.includes(e.toUpperCase()),s=new Promise((r,s)=>{o.open(e,t,!0);const{body:a,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 a=o.responseText;if((e["content-type"]||"").includes("application/json"))try{a=JSON.parse(o.responseText)}catch(e){}const u={data:a,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,s(e)}},o.onerror=()=>{const e=new Error("Network Error");e.config=n,e.request=o,s(e)},o.onabort=()=>{s(new ke("Request canceled"))},i?o.send(a):o.send()});return s.cancel=()=>o.abort(),s};var Te={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&&$e.includes(e.toUpperCase())?Ee(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=$e.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 s=fetch(t,o).then(e=>Oe(void 0,void 0,void 0,function*(){let t;t=(e.headers.get("content-type")||"").includes("application/json")?yield e.json():yield e.text();const r={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=r,t.config=n,t.request=e,t}return r})).catch(e=>{if("AbortError"===e.name)throw new ke("Request canceled");throw e});return s.cancel=()=>r.abort(),s})(e,t,n,r)}};function Ae(...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 je(...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 Ce(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function Le(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function Ye(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function Fe(...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&&Ye(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 s=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),s.apply(window.console,o),n++}}}return this}function Ne(e,t,n){if(!Ce(e)||!Le(t))throw Fe(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),Le(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function Re(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)Ne(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=Re(e[r],!0):n[r]=e[r]);return n||!1}function Ie(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?Re(e):e);r&&o.reverse();for(let n of o)if(!1===t(e[n],n))break}return e}function Pe(e,t){if(!(Ae(e)&&e>0)){if(je(e)){for(let n=0;n<e.length;n++)if(!1===t(e[n],n))return;return e}return Ie(e,t)}for(let n=0;n<e;n++)if(!1===t(n,n))return}function He(...e){if(!e.length)return!1;for(let t of e)if("[object Object]"!=={}.toString.apply(t))return!1;return!0}function Be(...e){if(!e.length)return!1;for(let t of e)if(!Array.isArray(t))return!1;return!0}function Ue(...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++)Ie(n[e],(e,n)=>{t?Be(e)?(o[n]=Be(o[n])?o[n]:[],Pe(e,(e,t)=>{if(e&&"object"==typeof e){let r=o[n][t];Be(e)?Be(r)||(r=[]):He(r)||(r={}),o[n][t]=Ue(!0,r,e)}else o[n][t]=e})):He(e)?o[n]=Ue(!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 We=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,ze=(e,t)=>{if(null==t?void 0:t.length){let n={};return Ie(e,(e,r)=>{t.indexOf(r)>-1&&(n[r]=e)}),n}return e},qe=function(e){const t=Ve._connections[e],n=Ve._structures[e];let r=null;const o=(e,t)=>{e.onerror=()=>{r=e.error,Fe(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 s=t.length;Pe(t,e=>{const t=o.put(e);t.onerror=()=>{Fe(t.error),s--}}),r.oncomplete=()=>{n(s)}})),this.update=(e,t,r,s)=>new Promise(a=>{this.selectAll(e,[],r).then(r=>{if(!r.length)return void a(0);const[u,l]=i(e,"w"),c=n[e],f=c.keys.PRIMARY.columns.length>1?c.keys.PRIMARY.columns:c.keys.PRIMARY.columns[0];let d=0;for(let e=0;e<r.length;e++){const n=Ue({},s?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Me("No primary key in the data"));const i=l.put(n);o(i,a),i.onsuccess=()=>{d++}}u.oncomplete=()=>{a(d)}})}),this.delete=(e,t)=>new Promise(r=>{const[s,a]=i(e,"w"),u=n[e],l=u.keys.PRIMARY.columns.length>1?u.keys.PRIMARY.columns:u.keys.PRIMARY.columns[0];if(!t[l])throw new Error(Me("No "));const c=a.delete(t[l]);o(c,r),s.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,s=null,a=0,u=null)=>new Promise(s=>{const[l,c]=i(e,"r"),f=n[e],d=f.keys.PRIMARY.columns.length>1?f.keys.PRIMARY.columns:f.keys.PRIMARY.columns[0],h=He(r)?Object.keys(r)[0]:!r||Be(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=a||0;n<e;n++){let i=c.get(r[d][n]);i.onsuccess=()=>{let n=i.result;m.push(ze(n,t)),m.length===e&&s(m)},o(i,s)}}else{let e=c.get((null==r?void 0:r[d])||r);e.onsuccess=()=>{let n=e.result;m.push(ze(n,t)),s(m)},o(e,s)}else{const e=c.openCursor();let n=0;e.onsuccess=e=>{const o=e.target.result;o?(r&&bbn.fn.search([o.value],r)||(n>=a&&(m.push(ze(o.value,t)),m.length===u&&s(m)),n++),o.continue()):s(m)},o(e,s)}}),this.getColumnValues=(e,n,r,o,i,s)=>new Promise(n=>{t.transaction([e],"read").objectStore(e)}),this.copyTable=(r,o,i=[],s=null,a=null,u=0,l=null)=>new Promise(c=>{if(t.objectStoreNames.contains(r)||Ve.add(e,r,n[o]),!t.objectStoreNames.contains(r))throw c(0),new Error(Me("The target table %s does not exist",r));this.selectAll(o,i,s,a,u,l).then(e=>{e.length?this.insert(r,e).then(e=>{c(e)}):c(0)})}),this.deleteTable=e=>new Promise(n=>{t.deleteObjectStore(e),n(!0)})},Ve={_structures:{},_connections:{},_stores:{},ok:void 0!==We,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});Ie(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(Ve._connections[e])t(new qe(e));else{if(!Ve._structures[e])throw new Error(Me("Impossible to find a structure for the database %s",e));let n=Math.max.apply(this,[1].concat(Object.keys(Ve._structures[e]).map(t=>Ve._structures[e][t].num||1)));const r=We.open(e,n);r.onupgradeneeded=()=>{const t=r.result;Ie(Ve._structures[e],(e,n)=>{this.updateStructure(n,e,t)})},r.onsuccess=()=>{Ve._connections[e]=r.result;let n=new qe(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(Me("The database structure for %s is not valid (are there keys and field? Is there a primary?",t));Ve._structures[e]||(Ve._structures[e]={}),Ve._structures[e][t]=n,Ve._connections[e]&&this.updateStructure(t,n,Ve._connections[e])}};function Ze(e,t,n){let r=(new Date).getTime(),o={key:e,url:Ne(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 Je(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 Xe(e){if(!Ce(e)){if(!e.toString)throw Fe(e),new Error(bbn._("removeAccent expects a string"));e=e.toString()}return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Ge(...e){if(!e.length)return!1;for(let t of e)if("[object Date]"!=={}.toString.apply(t))return!1;return!0}function Ke(e,t,n,r="asc"){let o=Je(e,n),i=Je(t,n),s=(typeof o).toLowerCase(),a=(typeof i).toLowerCase();if("asc"!==r&&Ce(r)&&"desc"===r.toLowerCase()&&(r="desc"),s!==a)o=s,i=a;else switch(s){case"string":o=Xe(o).toLowerCase(),i=Xe(i).toLowerCase();break;case"boolean":o=o?1:0,i=i?1:0;break;case"object":Ge(o)&&(o=o.getTime(),i=Ge(i)?i.getTime():0)}return o<i?"desc"===r?1:-1:o>i?"desc"===r?-1:1:0}function Qe(e){return e&&"object"==typeof e?Object.keys(e).length:0}function et(e){return!e||(Be(e)?!e.length:"object"==typeof e&&!Qe(e))}function tt(...e){if(!e.length)return!1;for(let t of e)if("[object Null]"!=={}.toString.apply(t))return!1;return!0}function nt(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 rt(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 ot(e){return nt(e).padStart(8,"0")+rt(e).padStart(8,"0")}function it(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLElement))return!1;return!0}function st(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,s=Array.from(i.children).filter(t=>t.tagName===e.tagName);if(!o&&s.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 at(...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)||it(n)||!(null===(t=n.$el)||void 0===t?void 0:t.bbnCid))return!1}return!0}function ut(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 s=0;s<e.length;s++)i+="__BBN_ITEM"+s.toString()+"__"+o(e[s],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 s in e){let a=s;"string"!=typeof a&&(a=o(a,o,1,1)),i+="__BBN_PROP_"+a+"__"+o(e[s],t,n+1,r,o)}e="__BBN_OBJECT__"+i}}else e=it(e)?at(e)?"__BBN_CP__"+e.$cid:e.bbnId?"__BBN_DOM__"+e.tagName+"/"+e.bbnId+e.bbnHash:"__BBN_DOM__"+st(e):"__BBN_UNKNOWN_OBJECT__"+e.constructor.toString();return e}function lt(...e){let t="",n=null;2===e.length&&"number"==typeof e[1]&&(n=e[1],e=[e[0]]);for(let r in e)t+=ut(e[r],n,0,null,ut);return ot(t)}function ct(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,s){return r(function(e,t){return e<<t|e>>>32-t}(r(r(t,e),r(o,s)),i),n)}function i(e,t,n,r,i,s,a){return o(t&n|~t&r,e,t,i,s,a)}function s(e,t,n,r,i,s,a){return o(t&r|n&~r,e,t,i,s,a)}function a(e,t,n,r,i,s,a){return o(t^n^r,e,t,i,s,a)}function u(e,t,n,r,i,s,a){return o(n^(t|~r),e,t,i,s,a)}var l,c,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),b=1732584193,p=-271733879,g=-1732584194,y=271733878;for(l=0;l<m.length;l+=16)c=b,f=p,d=g,h=y,b=i(b,p,g,y,m[l+0],7,-680876936),y=i(y,b,p,g,m[l+1],12,-389564586),g=i(g,y,b,p,m[l+2],17,606105819),p=i(p,g,y,b,m[l+3],22,-1044525330),b=i(b,p,g,y,m[l+4],7,-176418897),y=i(y,b,p,g,m[l+5],12,1200080426),g=i(g,y,b,p,m[l+6],17,-1473231341),p=i(p,g,y,b,m[l+7],22,-45705983),b=i(b,p,g,y,m[l+8],7,1770035416),y=i(y,b,p,g,m[l+9],12,-1958414417),g=i(g,y,b,p,m[l+10],17,-42063),p=i(p,g,y,b,m[l+11],22,-1990404162),b=i(b,p,g,y,m[l+12],7,1804603682),y=i(y,b,p,g,m[l+13],12,-40341101),g=i(g,y,b,p,m[l+14],17,-1502002290),b=s(b,p=i(p,g,y,b,m[l+15],22,1236535329),g,y,m[l+1],5,-165796510),y=s(y,b,p,g,m[l+6],9,-1069501632),g=s(g,y,b,p,m[l+11],14,643717713),p=s(p,g,y,b,m[l+0],20,-373897302),b=s(b,p,g,y,m[l+5],5,-701558691),y=s(y,b,p,g,m[l+10],9,38016083),g=s(g,y,b,p,m[l+15],14,-660478335),p=s(p,g,y,b,m[l+4],20,-405537848),b=s(b,p,g,y,m[l+9],5,568446438),y=s(y,b,p,g,m[l+14],9,-1019803690),g=s(g,y,b,p,m[l+3],14,-187363961),p=s(p,g,y,b,m[l+8],20,1163531501),b=s(b,p,g,y,m[l+13],5,-1444681467),y=s(y,b,p,g,m[l+2],9,-51403784),g=s(g,y,b,p,m[l+7],14,1735328473),b=a(b,p=s(p,g,y,b,m[l+12],20,-1926607734),g,y,m[l+5],4,-378558),y=a(y,b,p,g,m[l+8],11,-2022574463),g=a(g,y,b,p,m[l+11],16,1839030562),p=a(p,g,y,b,m[l+14],23,-35309556),b=a(b,p,g,y,m[l+1],4,-1530992060),y=a(y,b,p,g,m[l+4],11,1272893353),g=a(g,y,b,p,m[l+7],16,-155497632),p=a(p,g,y,b,m[l+10],23,-1094730640),b=a(b,p,g,y,m[l+13],4,681279174),y=a(y,b,p,g,m[l+0],11,-358537222),g=a(g,y,b,p,m[l+3],16,-722521979),p=a(p,g,y,b,m[l+6],23,76029189),b=a(b,p,g,y,m[l+9],4,-640364487),y=a(y,b,p,g,m[l+12],11,-421815835),g=a(g,y,b,p,m[l+15],16,530742520),b=u(b,p=a(p,g,y,b,m[l+2],23,-995338651),g,y,m[l+0],6,-198630844),y=u(y,b,p,g,m[l+7],10,1126891415),g=u(g,y,b,p,m[l+14],15,-1416354905),p=u(p,g,y,b,m[l+5],21,-57434055),b=u(b,p,g,y,m[l+12],6,1700485571),y=u(y,b,p,g,m[l+3],10,-1894986606),g=u(g,y,b,p,m[l+10],15,-1051523),p=u(p,g,y,b,m[l+1],21,-2054922799),b=u(b,p,g,y,m[l+8],6,1873313359),y=u(y,b,p,g,m[l+15],10,-30611744),g=u(g,y,b,p,m[l+6],15,-1560198380),p=u(p,g,y,b,m[l+13],21,1309151649),b=u(b,p,g,y,m[l+4],6,-145523070),y=u(y,b,p,g,m[l+11],10,-1120210379),g=u(g,y,b,p,m[l+2],15,718787259),p=u(p,g,y,b,m[l+9],21,-343485551),b=r(b,c),p=r(p,f),g=r(g,d),y=r(y,h);return n(b)+n(p)+n(g)+n(y)}function ft(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,s=!1,a="",u=0,l=0,c=[],f={},d="",h=['"',"'","`"],m=!1,b=!1,p=!1,g=!1,y=!1,w=!1,v="";for(let e=0;e<t.length;e++)if(p||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])p=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(p||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())s=!0;else if("async"!==r.trim()){a=r.trim();let e=a.match(/^([a-zA-Z0-9_]+)<[a-zA-Z0-9_]+>$/);e&&(a=e[1])}r=""}}else if(")"===t[e])u===l+1&&(b?(f.default=r.trim(),b=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(c.push(f),f={}),r=""),l++;else if(y&&"}"!==t[e])r+=t[e];else{if(u&&u===l&&":"===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!==l||l||o)){f.name=t.slice(0,e).trim(),c.push(f),f={},o=!0,n=bbn.fn.substr(t,e+2).trim();break}if(u===l&&"="===t[e]&&">"===t[e+1]){""!==r.trim()&&(f.name=r.trim(),c.push(f),f={},r=""),o=!0,e++;continue}if("="===t[e]&&u>l&&!b)f.name=r.trim(),r="",b=!0;else if(","===t[e])if(y)r+=t[e];else{if(!(u>l))throw Error("Unexpected ',' while parsing function");b?(f.default=r.trim(),b=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(c.push(f),f={}),r=""}else if("{"===t[e]||"}"===t[e]){if(u===l){n=t.substring(e).trim();break}u>l?"{"!==t[e]||y?"}"===t[e]&&y&&(y=!1,r+=t[e]):(y=!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>l?r+=t[e]:r=""):r+=t[e]}}}else g=!0,r="";else p=!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&&(w=!0);const _=c.map(e=>e.name+(e.default?" = "+e.default:"")).join(", ");return{body:n,args:c,argString:_,isArrow:o,hasFunction:s,name:a,isAsync:i,isBinary:w,hash:ct(n+(a?"-"+a:"")+(_?"-"+_:"")),returnType:v}}function dt(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(lt(r)!==lt(o))return!1;let i=!0;if(e&&"object"==typeof e){if(n.includes(e))return i;n.push(e)}return Pe(r,n=>{if(!dt(e[n],t[n]))return i=!1,!1}),i}if(e&&t&&"function"==typeof e&&"function"==typeof t){let n=ft(e),r=ft(t),o=n.hash===r.hash;return o&&n.isBinary&&(o=!1),o}return!1}function ht(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!et(e)&&!et(t)&&-1!==Xe(e).toLowerCase().indexOf(Xe(t).toLowerCase());case"doesnotcontain":case"donotcontain":return!(!tt(e)&&!tt(t))||-1===Xe(e.toLowerCase()).indexOf(Xe(t.toLowerCase()));case"starts":case"start":return!tt(e)&&!tt(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!tt(e)&&!tt(t)&&0===Xe(e).toLowerCase().indexOf(Xe(t).toLowerCase());case"endswith":case"endsi":case"endi":case"iends":case"iend":return!tt(e)&&!tt(t)&&e.lastIndexOf(t)===e.length-t.length;case"like":return!tt(e)&&!tt(t)&&Xe(e).toLowerCase()===Xe(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(He(e,t))return dt(e,t);default:return e==t}}function mt(e,t){if(!t.conditions||!t.logic||!Be(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 Pe(t.conditions,r=>{let o;if(r.conditions&&Be(r.conditions))o=mt(e,r);else if(o=ht(Je(e,r.field),r.value,r.operator),o){let t=r.field.split("."),n=t.pop();t.length&&Pe(t,t=>e=e[t]),void 0===Je(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 bt(e,t="="){if(!He(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!Be(e.conditions)){let n=[];Ie(e,(e,r)=>{He(e)&&"object"==typeof e.conditions?n.push(bt(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function pt(e,t,n=null,r="=",o=0,i=!1){if(!je(e))throw new Error(bbn._("The first argument for a search should be iterable")+" "+typeof e+" "+bbn._("given"));if(!e.length)return-1;let s,a,u=!1;if(t)if("string"==typeof t)s={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,a=t;else if(He(t))if("field"in t&&"value"in t)s={conditions:[t],logic:"AND"};else if("conditions"in t)s=t;else{const e=[];for(let n in t)e.push({field:n,value:t[n],operator:"="});s={conditions:e,logic:"AND"}}else Be(t)&&(s={conditions:t,logic:"AND"});else u=!0,a=e=>mt({value:e},bt({logic:"AND",conditions:[{field:"value",operator:r||"=",value:n}]}));if(u||s){if("number"!=typeof o&&(o=i?e.length-1:0),!a){const e=bt(s);a=t=>mt(t,e)}if(i)for(let t=o;t>=0;t--){if(bbn.env._enumerated.push(!0),a(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),a(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}}return-1}function gt(e,t,n=null,r="=",o=0,i=!1,s=!1){let a=pt(e,t,n,r,o,i);return a>-1?e[a]:t&&["object","function"].includes(typeof t)&&5 in arguments?i:s}function yt(e,t=null,n=!1){let r=pt(bbn.env.loaders,{key:e});if(r>-1){let o=bbn.env.loaders.splice(r,1)[0],i=gt(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):He(t)&&(i.success=!0)),!0}return!1}function wt(e){let t=pt(bbn.env.loaders,{key:e});return t>-1?bbn.env.loaders[t]:null}function vt(e,t,n=null,r="=",o=0){if(!Be(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 s=[],a="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(!a)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)=>mt(e,i);for(let t=0;t<e.length&&(bbn.env._enumerated.push(!0),!(u(e[t],t)&&(bbn.env._enumerated.pop(),s.push(e[t]),bbn.env._enumerated.push(!0),o&&s.length>=o)));t++)bbn.env._enumerated.pop();return s}function _t(e){if(Qe(e)){bbn.var.colors||(bbn.var.colors={});let t=document.createElement("style");document.head.appendChild(t);let n=t.sheet,r=0;Ie(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 St(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&&Ie(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?St(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):St(e,t,i)})}}function Mt(e,t){let n=0;Pe(t,t=>{t.style[e]="auto"}),Pe(t,(t,r)=>{let o=t.getBoundingClientRect(),i=o[e]%1?o[e]-o[e]%1+1:o[e];i>n&&(n=i)}),Pe(t,(t,r)=>{n&&(t.style[e]=n+"px")})}function xt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Dt(e,t,n,r=""){return n.toString().replace(He(e)?e:new RegExp(xt(e),"g"+r),t)}function Ot(e,t,n){let r={};return t&&Ie(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+ct((n||"json")+JSON.stringify(r))}function kt(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=Dt("//","/",e)),t||(t="json");let s=Ot(e,n,t),a=wt(s);if(null==a?void 0:a.loader)return a.loader;bbn.env.token&&Ue(n||{},{_bbn_token:bbn.env.token});const u=new AbortController;let l={responseType:t,signal:u.signal};"text"===t?l.headers={accept:"text/javascript","Content-Type":"text/javascript"}:"json"===t?l.headers={accept:"application/json","Content-Type":"application/json"}:"html"===t&&(l.headers={accept:"text/html","Content-Type":"text/html"});let c="get";He(n)&&Qe(n)>0&&(l.data=n,c="post");let f=Te.run(c,e,l).then(t=>{if(yt(s,t),bbn.fn.defaultEndLoadingFunction(e,d,n,t),200===t.status)Ye(r)&&r(t.data,t.headers);else{let e=1;Ye(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t)}return t}).catch(t=>{let r=Te.isCancel(t);if(yt(s,t.message||t.response.data,r),bbn.fn.defaultEndLoadingFunction(e,d,n,t),r){let n=1;Ye(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;Ye(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t.response)}return t.response}),d=Ze(s,f,u);return bbn.fn.defaultStartLoadingFunction(e,d,n,s),f}}const $t=new TextDecoder;function Et(e){return $t.decode(e)}function Tt(e,t){if(e&&Ce(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&Ne(n,-r)===t)return Ne(n,0,n.length-r)}return""}function At(...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 jt,Ct,Lt,Yt,Ft,Nt,Rt,It,Pt=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},Ht=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 Bt=[{name:"mariadb-datetime",re:/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:+e[6]})},{name:"mariadb-datetime-no-sec",re:/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:0})},{name:"mariadb-date",re:/^(\d{4})-(\d{2})-(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:0,minutes:0,seconds:0})},{name:"iso-datetime",re:/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?(?:Z|[+\-]\d{2}:?\d{2})?$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:void 0!==e[6]?+e[6]:0})},{name:"slash-date",re:/^(\d{2})\/(\d{2})\/(\d{4})$/,map:e=>({year:+e[3],month:+e[2],day:+e[1],hours:0,minutes:0,seconds:0})},{name:"slash-datetime",re:/^(\d{2})\/(\d{2})\/(\d{4})[ T](\d{2}):(\d{2}):(\d{2})$/,map:e=>({year:+e[3],month:+e[2],day:+e[1],hours:+e[4],minutes:+e[5],seconds:+e[6]})}],Ut=[["y","year",31536e6],["m","month",2592e6],["w","week",6048e5],["d","day",864e5],["h","hour",36e5],["i","minute",6e4],["s","second",1e3]],Wt={y:"Year",m:"Month",d:"Date",w:"Week",h:"Hours",i:"Minutes",s:"Seconds"},zt={y:"YYYY",m:"MM",d:"DD",e:"EE",w:"WW",h:"HH",i:"II",s:"SS"},qt={years:"y",year:"y",YEARS:"y",YEAR:"y",Years:"y",Year:"y",YYYY:"y",YY:"y",yyyy:"y",yy:"y",Y:"y",y:"y",months:"m",month:"m",Months:"m",Month:"m",MONTHS:"m",MONTH:"m",MMMM:"m",MMM:"m",MM:"m",M:"m",m:"m",weekday:"e",WEEKDAY:"e",ee:"e",EE:"e",e:"e",E:"e",ddd:"e",days:"d",day:"d",Days:"d",Day:"d",DAYS:"d",DAY:"d",DD:"d",D:"d",dd:"d",d:"d",hours:"h",hour:"h",Hours:"h",Hour:"h",HOURS:"h",HOUR:"h",HH:"h",hr:"h",H:"h",hh:"h",h:"h",minutes:"i",minute:"i",Minutes:"i",Minute:"i",MINUTES:"i",MINUTE:"i",II:"i",ii:"i",mn:"i",mm:"i",min:"i",n:"i",i:"i",SS:"s",ss:"s",seconds:"s",second:"s",Seconds:"s",Second:"s",SECONDS:"s",SECOND:"s",sec:"s",s:"s",S:"s",WW:"w",W:"w",w:"w"};class Vt{constructor(e,t,n=!1){jt.add(this),Ct.set(this,0),Lt.set(this,"");const r=qt[t]||t;if(!r)throw new Error("Invalid unit for duration: "+t);Pt(this,Lt,r,"f");const o=bbn.fn.getRow(Ut,e=>e[0]===r);if(!o)throw new Error("Invalid unit for duration: "+r);const i=o[2];Pt(this,Ct,n?e:e*i,"f")}years(e=!1){return Ht(this,jt,"m",Ft).call(this,"year",e)}months(e=!1){return Ht(this,jt,"m",Ft).call(this,"month",e)}weeks(e=!1){return Ht(this,jt,"m",Ft).call(this,"week",e)}days(e=!1){return Ht(this,jt,"m",Ft).call(this,"day",e)}hours(e=!1){return Ht(this,jt,"m",Ft).call(this,"hour",e)}minutes(e=!1){return Ht(this,jt,"m",Ft).call(this,"minute",e)}seconds(e=!1){return Ht(this,jt,"m",Ft).call(this,"second",e)}asYears(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"year");return Ht(this,Ct,"f")/e}asMonths(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"month");return Ht(this,Ct,"f")/e}asWeeks(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"week");return Ht(this,Ct,"f")/e}asDays(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"day");return Ht(this,Ct,"f")/e}asHours(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"hour");return Ht(this,Ct,"f")/e}asMinutes(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"minute");return Ht(this,Ct,"f")/e}asSeconds(){const[,,e]=Ht(this,jt,"m",Yt).call(this,"second");return Ht(this,Ct,"f")/e}add(e,t){const n=t?qt[t]||t:Ht(this,Lt,"f"),r=bbn.fn.getRow(Ut,e=>e[0]===n);if(!r)throw new Error("Invalid unit for duration: "+(null!=t?t:n));return new Vt(Ht(this,Ct,"f")+e*r[2],Ht(this,Lt,"f"),!0)}subtract(e,t){return this.add(-e,t)}toMilliseconds(){return Ht(this,Ct,"f")}}Ct=new WeakMap,Lt=new WeakMap,jt=new WeakSet,Yt=function(e){const t=bbn.fn.getRow(Ut,t=>t[1]===e);if(!t)throw new Error("Unit name not found: "+e);return t},Ft=function(e,t){const n=Ut.findIndex(([,t])=>t===e);if(-1===n)throw new Error("Unit not found: "+e);const r=Ut[n][2];if(!t)return Math.floor(Ht(this,Ct,"f")/r);let o=Ht(this,Ct,"f");for(let e=0;e<n;e++){const[,,t]=Ut[e];o-=Math.floor(o/t)*t}return Math.floor(o/r)};class Zt{constructor(e,t=null){Nt.set(this,void 0),Rt.set(this,0),It.set(this,!1);let n=typeof e;if(e)if(t)Pt(this,Nt,new Date,"f");else if(("number"===n||Ae(e)&&""!==e)&&(e<5e3&&Ae(t)?e=Array.from(arguments):e<1e10&&(e*=1e3),Array.isArray(e)||Pt(this,Nt,new Date(e),"f")),"string"===n){for(const t of Bt){const n=e.match(t.re);if(n){const{year:e,month:r,day:o,hours:i,minutes:s,seconds:a}=t.map(n);Pt(this,Nt,new Date(e,r-1,o,i,s,a,0),"f")}}if(!Ht(this,Nt,"f"))throw new Error("Invalid date string format: "+e)}else Ge(e)?Pt(this,Nt,e,"f"):Array.isArray(e)&&Pt(this,Nt,new Date(...e),"f");else Pt(this,Nt,new Date,"f");if(void 0===Ht(this,Nt,"f"))return new Proxy(this,{get:(e,t)=>{}})}toString(){return Ht(this,Nt,"f")?this.format():""}year(e){if(0 in arguments){const t=this.copy();return t.setFullYear(e),new Zt(t)}return Ht(this,Nt,"f").getFullYear()}month(e){if(0 in arguments){const t=this.copy();return t.setMonth(e-1),new Zt(t)}return Ht(this,Nt,"f").getMonth()+1}day(e){if(0 in arguments){const t=this.copy();return t.setDate(e),new Zt(t)}return Ht(this,Nt,"f").getDate()}hours(e){if(0 in arguments){const t=this.copy();return t.setHours(e),new Zt(t)}return Ht(this,Nt,"f").getHours()}minutes(e){if(0 in arguments){const t=this.copy();return t.setMinutes(e),new Zt(t)}return Ht(this,Nt,"f").getMinutes()}seconds(e){if(0 in arguments){const t=this.copy();return t.setSeconds(e),new Zt(t)}return Ht(this,Nt,"f").getSeconds()}weekday(e,t=!1){return 0 in arguments?this.setWeekday(e,t):Ht(this,Nt,"f").getDay()}week(){const e=new Date(Date.UTC(this.year(),this.month()-1,this.day())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+(4-t));const n=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-n.getTime())/864e5+1)/7)}get tst(){return Math.ceil(Ht(this,Nt,"f").getTime()/1e3)}get mtst(){return Ht(this,Nt,"f").getTime()}get YYYY(){return this.year().toString()}get YY(){return Ne(this.year().toString(),2,2)}get MMMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"long"}).format(Ht(this,Nt,"f"))}get MMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"short"}).format(Ht(this,Nt,"f"))}get MM(){const e=parseInt(this.month().toString());return e<10?"0"+e.toString():e.toString()}get M(){return this.month().toString()}get EE(){return this.weekday().toString()}get DD(){const e=parseInt(this.day().toString());return e<10?"0"+e.toString():e.toString()}get d(){return this.day().toString()}get dddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"long"}).format(Ht(this,Nt,"f"))}get ddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"short"}).format(Ht(this,Nt,"f"))}get D(){return this.day().toString()}get HH(){const e=parseInt(this.hours().toString());return e<10?"0"+e.toString():e.toString()}get H(){return this.hours().toString()}get II(){const e=parseInt(this.minutes().toString());return e<10?"0"+e.toString():e.toString()}get I(){return this.minutes().toString()}get SS(){const e=parseInt(this.seconds().toString());return e<10?"0"+e.toString():e.toString()}get S(){return this.seconds().toString()}get WW(){const e=parseInt(this.year().toString()),t=new Date(e,0,1),n=(Ht(this,Nt,"f").getTime()-t.getTime())/864e5;return String(Math.ceil((n+t.getDay()+1)/7)).padStart(2,"0")}get isValid(){return void 0!==Ht(this,Nt,"f")}get daysInMonth(){if(this.isValid&&!Ht(this,Rt,"f"))switch(Ht(this,Nt,"f").getMonth()){case 1:Ht(this,Nt,"f").getFullYear()%4==0?Pt(this,Rt,29,"f"):Pt(this,Rt,28,"f");break;case 0:case 3:case 5:case 8:case 10:Pt(this,Rt,30,"f");break;default:Pt(this,Rt,31,"f")}return Ht(this,Rt,"f")}valueOf(){return this.mtst}add(e,t="d"){const n=Ht(this,Nt,"f")?new Date(Ht(this,Nt,"f").getTime()):new Date;if(qt[t]){const r=qt[t],o="y"===r?"FullYear":Wt[r],i="get"+o;return n["set"+o](n[i]()+e),new Zt(n)}return null}subtract(e,t){return this.add(-e,t)}dateFromFormat(e,t){return new Date}date(){return this.format("Y-m-d")}datetime(){return this.format("Y-m-d H:i:s")}time(){return this.format("H:i:s")}fdate(e=!1,t=!1,n=!1){if(!Ht(this,Nt,"f"))return"";const r=Object.assign(Object.assign({year:"numeric",month:e?"long":"short",day:"numeric"},n?{weekday:"long"}:{}),t?{hour:"2-digit",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],r).format(Ht(this,Nt,"f"))}ftime(e=!1){if(!Ht(this,Nt,"f"))return"";const t={hour:"2-digit",minute:"2-digit"};e&&(t.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],t).format(Ht(this,Nt,"f"))}format(e="y-m-d h:i:s"){let t="";if(e){const n=new RegExp("([|]|"+Object.keys(qt).join("|")+")","g");let r=0;Pe(e.split(n),e=>{if("["!==e)if("]"!==e)if(r>0)t+=e;else if(e in qt)if(e in this&&At(this[e]))t+=this[e];else{t+=this[zt[qt[e]]]}else t+=e;else r--;else r++})}return t}unix(e=!1){if("number"==typeof e){const t=this.copy();return t.setTime(1e3*e),new Zt(t)}return Ht(this,Nt,"f")?e?Ht(this,Nt,"f").getTime():Math.floor(Ht(this,Nt,"f").getTime()/1e3):0}sql(e=!1){return Ht(this,Nt,"f")?e?this.format("YYYY-MM-DD"):this.format("YYYY-MM-DD HH:II:SS"):""}compare(e,t=""){var n;const r=e instanceof Zt?e:new Zt(e),o=qt[t]||null;if(!o)return this.mtst<r.mtst?-1:this.mtst>r.mtst?1:0;const i=["y","m","d","h","i","s"];for(const e of i){const t=null===(n=bbn.fn.getRow(Ut,t=>t[0]===e))||void 0===n?void 0:n[1],i=this[t](),s=r[t]();if(i<s)return-1;if(i>s)return 1;if(e===o)break}return 0}isBefore(e,t=""){return-1===this.compare(e,t)}isAfter(e,t="day"){return 1===this.compare(e,t)}isSame(e,t="day"){return 0===this.compare(e,t)}isAfterOrSame(e,t=""){return[0,1].includes(this.compare(e,t))}isBeforeOrSame(e,t=""){return[-1,0].includes(this.compare(e,t))}fromNow(e=""){const t=new Date,n=qt[e]||this.guessUnit(this.diff(t)),r=this.diff(t,n),o=new Intl.RelativeTimeFormat([bbn.env.lang,...navigator.languages],{numeric:"auto"}),i=bbn.fn.getRow(Ut,e=>e[0]===n);if(!i)throw new Error("Invalid unit for fromDate: "+e);return o.format(r,i[1])}fromDate(e,t=""){const n=qt[t]||this.guessUnit(this.diff(e)),r=this.diff(e,n);return r>0?Me("%d %s before",r,t):r<0?Me("%d %s after",-r,t):Me("The same %s",t)}guessUnit(e){const t=Math.abs(e);for(const[e,n,r]of Ut)if(t>=r||"second"===n)return e}diff(e,t="",n=!1){const r=e instanceof Zt?e.mtst:new Date(e).getTime();let o=this.mtst-r;if(n&&(o=Math.abs(o)),!t)return o;const i=qt[t],s=bbn.fn.getRow(Ut,e=>e[0]===i);if(!s)throw new Error("Invalid unit for diff: "+t);const[a,u,l]=s;return Math.round(o/l)}calendar(e){return""}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})}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}'`)}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;t?(i=(o-r+7)%7,0===i&&(i=7),i=-i):(i=(r-o+7)%7,0===i&&(i=7));const s=this.copy();return s.setDate(s.getDate()+i),new Zt(s)}copy(){return new Date(Ht(this,Nt,"f").getTime())}clone(){return new Zt(Ht(this,Nt,"f")?new Date(Ht(this,Nt,"f").getTime()):void 0)}startOf(e="d"){const t=qt[e];if(!t)throw new Error("Invalid unit for startOf: "+e);let n;switch(t){case"y":n=new Date(this.year(),0,1,0,0,0,0);break;case"m":n=new Date(this.year(),this.month()-1,1,0,0,0,0);break;case"w":{const e=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),0),t=(e.getDay()+6)%7;n=new Date(e.getFullYear(),e.getMonth(),e.getDate()-t,0,0,0,0);break}case"d":n=new Date(this.year(),this.month()-1,this.day(),0,0,0,0);break;case"h":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),0,0,0);break;case"i":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),0,0);break;case"s":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),0);break;default:throw new Error("Invalid unit for startOf: "+e)}return new Zt(n)}endOf(e="d"){const t=qt[e];if(!t)throw new Error("Invalid unit for endOf: "+e);let n;switch(t){case"y":n=new Date(this.year(),11,31,23,59,59,999);break;case"m":n=new Date(this.year(),this.month(),0,23,59,59,999);break;case"w":{const e=this.startOf("w"),t=new Date(e.year(),e.month()-1,e.day(),23,59,59,999);t.setDate(t.getDate()+6),n=t;break}case"day":n=new Date(this.year(),this.month()-1,this.day(),23,59,59,999);break;case"hour":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),59,59,999);break;case"minute":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),59,999);break;case"second":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),999);break;default:n=new Date(this.mtst)}return new Zt(n)}duration(e,t="s"){return new Vt(e,t)}}function Jt(e,t=null){return e instanceof Zt?e:new Zt(e,t)}function Xt(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"}),Fe.apply(this,e)}throw new Error(e)}function Gt(e,t=null,n=null,r=null,o=null){let i=!1;if(t){i=!0;let s,a="object"===(typeof t).toLowerCase();if(a&&t.prescript)try{new Function(t.prescript)()}catch(e){Xt(e.message||"")}if(a&&void 0===t.url&&(t.url=e),i=n&&Ye(n)?n(t,o):bbn.fn.defaultLinkFunction(t,o),o&&a&&void 0!==t.content&&("value"in o?o.value=t.content:o.innerHTML=t.content),i&&a&&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)(),Ye(r)&&(r=r(e,n))}catch(e){Fe(e,t),Xt(Ye(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&Ye(r)?r(t):a&&bbn.fn.defaultPostLinkFunction&&bbn.fn.defaultPostLinkFunction(t,o),i&&a&&t.postscript){new Function(t.postscript)(t.postscript)}a&&t.error&&(s=t.errorTitle||bbn.lng.server_response,bbn.fn.defaultErrorFunction(t.error,s))}else bbn.fn.defaultErrorFunction(bbn.lng.errorText,bbn.lng.error);return i}function Kt(e,t,n=!1){let r={error:!1,result:!0};if("string"==typeof t&&(t=[t]),Be(t)||(r.error=bbn._("checkProps must receive a string or an array as props argument")),He(e)||(r.error=bbn._("checkProps must receive an object as obj argument")),!r.error){let o;Pe(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"+Ne(i,0,1).toUpperCase()+Ne(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 Qt(e){return e.replace(/[A-z]{1}/,e=>e.toUpperCase())}function en(e,t,n,...r){let o=!1;Be(t)||(t=[t]);const i=[];if(Pe(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"),Ye(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(Ce(t)&&Ye(bbn.fn["is"+Qt(t)])){if(bbn.fn["is"+Qt(t)](e))return o=!0,!1;i.push(t)}else Xt(`The type ${t} is not recognized`)}),!o)throw Fe(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&Fe(r),new Error((n?n+" - ":"")+bbn._("The value should be a %s",i.join(" "+bbn._("or a")+" ")))}function tn(e){if(Be(e))return e.slice().map(e=>"object"==typeof e?tn(e):e);if(He(e)){return Ue(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}Nt=new WeakMap,Rt=new WeakMap,It=new WeakMap,s.extend(c),s.extend(T);const nn=(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 rn(e,t,n=null,r="="){if(!Be(e))throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array");let o={};const i=[],s="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(!s)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=bt(o,r),o.conditions&&o.logic)for(let t=0;t<e.length;t++)mt(e[t],o)&&i.push(e[t]);return i}const on=[];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;on.push(t)}function sn(...e){const t=Object.create(null);return e.length&&Ue(t,...e),t}function an(e){let t=typeof e;if(void 0===e)return new Date;if("number"===t||Ae(e)&&""!==e)return e<1e10&&(e*=1e3),new Date(e);if("string"===t){if(10===e.length)return new Date(parseInt(Ne(e,0,4)),parseInt(Ne(e,5,2))-1,parseInt(Ne(e,8,2)),12);if(19===e.length)return new Date(parseInt(Ne(e,0,4)),parseInt(Ne(e,5,2))-1,parseInt(Ne(e,8,2)),parseInt(Ne(e,11,2)),parseInt(Ne(e,14,2)),parseInt(Ne(e,17,2)))}else if(Ge(e))return e;return!1}function un(e,t=""){Fe(e)}function ln(e,t=null,n=null){Fe(t,n)}function cn(e,t,n=null,r=null){return!0}function fn(...e){if(!e.length)return!1;for(let t of e)if("object"==typeof t&&!tt(t))return!1;return!0}let dn=[];function hn(e){if(Ce(e)&&e){for(;"/"===Ne(e,e.length-1);)e=Ne(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return Ne(e,0,t);if(0===t)return"/"}return""}function mn(...e){if(!e.length)return!1;for(let t of e)if("[object Blob]"!=={}.toString.apply(t))return!1;return!0}function bn(e){if(e&&Ce(e)){let t=e.split(".");if(t[0]&&t.length>1)return t[t.length-1].toLowerCase()}return""}function pn(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLCanvasElement))return!1;return!0}function gn(e,t,n=null){if(pn(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=He(t)&&t.type?t.type:"octet/stream";let r=window.document.createElement("a");r.className="bbn-no";let o=null;if(Ce(t))o=new Blob([t],{type:n});else try{o=t}catch(e){Fe(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 yn=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};function wn(){return yn(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 vn=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};function _n(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 Sn(e){let t,n,r=e.querySelectorAll("input[name],select[name],textarea[name],button[name]"),o={};return Pe(r,(e,r)=>{if(n=_n(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=Dt("][",".",r),r=Dt("[",".",r),r=Dt("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=Ne(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 Mn(e){return e.filter((e,t,n)=>t===n.indexOf(e))}function xn(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 Dn(e){0!==e.indexOf("--")&&(e="--"+e);let t=getComputedStyle(document.documentElement).getPropertyValue(e);return"string"==typeof t&&(t=t.trim()),t}function On(){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 kn(){let e,t=window.getSelection();if(t.rangeCount>0){e=t.getRangeAt(0),Fe("RANGE",e);let n=e.cloneContents();Fe("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function $n(e){return Ce(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function En(e){let t=document.createElement("div");return t.innerHTML=e,e=t.innerText}function Tn(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}function An(e){let t,n,r={};if(He(e[0])&&1===e.length)return e[0];for(n=0;n<e.length;n++)t=typeof e[n],t=t.toLowerCase(),Ye(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=Ne(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=Ne(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&&Qe(r)&&(r.url=bbn.env.path),void 0===r.obj&&(r.obj={_bbn:"public"}),r.datatype||(r.datatype="json"),r}function jn(e,t,n=null,r=!1){bbn.env.old_path=bbn.env.path,bbn.env.url=["https:/","http://"].includes(Ne(e,0,7))?e:bbn.env.root+e,bbn.env.path=Ne(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&&Ue(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?En(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function Cn(...e){let t=An(e),n=1;if(!0===t)return!0;if(!t)return Cn(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(wt(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?(Ue(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 kt(t.url,t.datatype,t.obj,n=>{n||Fe(e+bbn._("returned no answer")),He(n)&&(0===Object.keys(n).length&&Fe(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)),Gt(t.url,n,t.successFn,null,t.ele)&&void 0===n.noNav&&0!==bbn.env.path.indexOf(t.url)&&jn(t.url,(n.title?n.title+" - ":"")+bbn.env.siteTitle)},t.errorFn||null)}}return!0}function Ln(...e){let t=An(e);if(t.url)return kt(t.url,t.datatype,t.obj,e=>{Gt(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Yn(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=Sn(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),Ln(...t)}}function Fn(){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(Dn("mobile-limit"))||650,r="bbn-screen-"+(bbn.env.width<n?"small":"regular"),o=(document.body.className||"").split(" "),i=!1;Pe(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 Nn(){return"mobile"===On()}function Rn(){return"tablet"===On()}function In(){return Nn()||Rn()}function Pn(e=!1){let t=(new Date).getTime();return e?Math.round(t/1e3):t}function Hn(e){if("string"==typeof e&&e.length>0&&(0===e.indexOf("calc")||Ae(Ne(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 Bn(...e){if(!e.length)return!1;for(let t of e)if(!Ce(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function Un(...e){if(!e.length)return!1;for(let t of e)if("[object Symbol]"!=={}.toString.apply(t))return!1;return!0}function Wn(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"}),Fe.apply(this,t)}function zn(e,t="",n=null){let r=new FormData,o=(e,t="")=>{(!n||Be(n)&&!n.includes(t))&&(e instanceof File?r.append(t,e):Be(e)?Pe(e,(e,n)=>{o(e,t+"["+n+"]")}):He(e)&&Object.keys(e).length?Ie(e,(n,r)=>{r in e&&o(n,t?t+"["+r+"]":r)}):tt(e)||void 0===e||r.append(t,e))};return o(e,t),r}function qn(e){return"string"==typeof e?document.querySelector(e):e}function Vn(e,t,n,r){if("object"==typeof e&&"string"==typeof t){let o=e;const i=t.split(".");Pe(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 Zn(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Jn(e,t=" "){if(" "===t)return e.trim();if(!t)return e;if(t===e)return"";for(;0===e.indexOf(t);)e=Ne(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=Ne(e,0,e.length-t.length);return e}function Xn(e,t,n){return"string"==typeof e.toLowerCase()&&(t||(t=bbn.var.shortenLen),void 0!==n&&Ce(n)||(n="..."),e.length>t&&(e=Ne(e,0,t)+n)),e}var Gn={_addLoader:Ze,_compareValues:Ke,_deleteLoader:yt,abort:function(e){let t=wt(e);(null==t?void 0:t.aborter)&&t.aborter.abort("Operation canceled by the user.")},abortURL:function(e){Pe(vt(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:_t,addInputs:St,addStyle:function(e,t){He(t)&&Ie(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),Mt("height",e)},adjustSize:Mt,adjustWidth:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),Mt("width",e)},ajax:kt,analyzeFunction:ft,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:Et,arrayFromProp:function(e,t){let n=[];return Pe(e,(e,r)=>{n.push(Je(e,t))}),n},autoExtend:function(e,t){bbn[e]||(bbn[e]={}),Ue(bbn[e],t)},baseName:Tt,br2nl:function(e){return Dt("<br />","\n",Dt("<br/>","\n",Dt("<br>","\n",e)))},calendar:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate():t&&Ce(t)?t:""},callback:Gt,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 Kt(e,t,n).result},checkPropsDetails:Kt,checkPropsOrDie:function(e,t,n=!1){let r=Kt(e,t,n);if(r.error)throw new Error(r.error);return!0},checkType:en,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=it(n)?n.bbnId?"__BBN_DOM__"+n.tagName+"/"+n.bbnId+n.bbnHash:"__BBN_DOM__"+n.tagName+"/"+n.className:at(n)?"__BBN_CP__"+n.$options.name+"/"+n.$cid:n.constructor.toString())}return n}},clone:tn,colorToHex:function(e){let t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle},compare:ht,compareConditions:mt,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||nn(e,e.type.toString())):He(e)&&Ye(e.toBlob)?e.toBlob(r=>{const o=new ClipboardItem({[r.type.toString()]:r});navigator.clipboard.write([o]).then(()=>{t||nn(e,r.type.toString()),n(!0)})}):(navigator.clipboard.writeText(e),t||nn(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||nn(e),n(!0)}n(!1)})},correctCase:Qt,count:function(e,t,n=null,r="="){return rn(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^on[255&(t^r)]}return(-1^t)>>>0},createObject:sn,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)"+xt(e)+"(\\{|\\s)","g").test(n[t].selectorText))return!0}return!1},data2Html:function e(t,n=""){const r=!Be(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]&&(Be(t[i])||He(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:an,dateSQL:function(e,t){let n=Jt(e);if(n)return n.format("YYYY-MM-DD"+(t?"":" HH:mm:ss"))},daysInMonth:function(e){return Jt(e).daysInMonth},deepPath:function e(t,n,r,o=[]){let i;return(i=pt(t,n,0))>-1?(o.push(i),o):(Pe(t,(t,i)=>{if(Be(t[r])){let s=o.slice();s.push(i);let a=e(t[r],n,r,s);if(!1!==a)return a}}),!1)},defaultAjaxAbortFunction:un,defaultAjaxErrorFunction:ln,defaultAlertFunction:function(e,t=null){alert(e)},defaultConfirmFunction:function(e,t,n=null){let r=0;confirm(e)&&Ye(t)&&(t(),r=1),!r&&Ye(n)&&n()},defaultEndLoadingFunction:cn,defaultErrorFunction:function(e){Fe(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 Fe("defaultPreLinkFunction",e,t,n),!0},defaultResizeFunction:function(){return!0},defaultStartLoadingFunction:function(e,t,n,r){return!0},deleteProp:function(e,t){en(e,"object",bbn._("The obj must be an object in setProp")),en(t,"string",bbn._("The prop must be a string in setProp")),delete e[t]},diffObj:function e(t,n,r=!1,o=!1){o||(dn=[]);let i="unchanged";void 0===o&&(o=!1);let s=sn();if(!Ye(t)&&!Ye(n)){if(fn(t)||fn(n)){let e=(a=t)===(u=n)||Ge(a)&&Ge(u)&&a.getTime()===u.getTime()?i:void 0===a?"created":void 0===u?"deleted":"updated";if(r||e!==i){let r=sn();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(it(t)||it(n))return!1;if(dn.includes(t)||dn.includes(n))return!1;dn.push(t,n);for(let o in t){if(Ye(t[o]))continue;let i;void 0!==n[o]&&(i=n[o]);let a=e(t[o],i,r,!0);a&&(s[o]=a)}for(let o in n){if(Ye(n[o])||void 0!==t[o])continue;let i=e(void 0,n[o],r,!0);i&&(s[o]=i)}}var a,u;return!(o&&!r&&!Qe(s))&&s},dirName:hn,download:function(e,t="",n=null){return t&&"object"==typeof t&&(n=t,t=""),kt(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)?Ne(r[n],o.length+1,r[n].length-o.length-2):Tt(e)}if(mn(n)){let e=bn(t),r=["php","html"];if("string"==typeof t&&("type"in n&&"text/html"!==n.type||r.includes(e)))return void gn(t,n)}},e=>{bbn.fn.defaultAjaxErrorFunction(e)})},downloadContent:gn,each:Pe,eraseCookie:function(e){document.cookie=e+"=; Max-Age=-99999999;"},error:Xt,escapeDquotes:function(e){return Ce(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:xt,escapeSquotes:function(e){return Ce(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Ce(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)),Pe(hn(e).split("/"),e=>{n+=encodeURIComponent(e)+"/"});let r=Tt(e),o="?",i="";if(r.indexOf(o)){let e=r.split("?");o="&",i="?"+e[1],r=e[0]}return t&&Ce(t)?(t.match("^(\\&|\\?)")&&(t=t.substring(1)),t=o+t):t="",n+encodeURIComponent(r)+i+t},executeSlowly:function(e,t){return vn(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){yield wn();let r=t(e[n],n);if(r instanceof Promise&&(r=yield r),!1===r)return!1}return!0})},extend:Ue,extendOut:function e(...t){let n=null;for(let r of t){if(!He(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)He(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=Jt(e),r=!1;return!0===t&&(r=!0),n.isValid?n.fdate(!0,r):t&&Ce(t)?t:""},fdatetime:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate(!1,!0):t&&Ce(t)?t:""},fieldValue:_n,fileExt:bn,filter:rn,filterToConditions:bt,findAll:function e(t,n,r,o=[]){let i,s=0;for(;(i=pt(t,n,s))>-1;)o.push(t[i]),s=i+1;return Pe(t,t=>{Be(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(Be(e)){let o=e.length-1;Ae(n)&&0<n&&n<=o||(n=o),(!Ae(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(Be(e)){let o=e.length-1;Ae(n)&&0<n&&n<=o||(n=o),(!Ae(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 en(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=Jt(e);return n.isValid?n.format(t):""},formatSize:function(e,t){return Ae(e)?e+"px":Ce(e)?e:!t&&"auto"},formdata:Sn,fphone:function(e){var t;if(Ae(e)&&(e=e.toString()),Ce(e)){const n=(null===(t=bbn.var)||void 0===t?void 0:t.phoneCodes)||[];let r="",o="",i="";if(n.length&&Pe(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=Jt(e);return n.isValid?n.ftime():t&&Ce(t)?t:""},getAllTags:function(){return Mn(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:xn,getAttributes:function(e){e.getAttributeNames||Xt("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:Dn,getDay:function(e){let t=an(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:On,getEventData:function(e){let t=e.dataTransfer||e.clipboardData,n=t.getData("Text"),r={raw:n,files:[],str:[]};return new Promise((o,i)=>{let s=!(t instanceof DataTransfer);if(!n&&"copy"===e.type){let e=window.getSelection();r.raw=e.toString();let t=kn();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>"}),s=!0,o(r)}if(!s){let e=[],n=t.items.length;Pe(t.items,(i,a)=>{let u=i.kind,l=i.type;if("file"===u){let u=t.files[a];if(!l&&u.name){let e=u.name.split(".");l=e[e.length-1]}let c=u?u.name:bbn._("untitled"),f=u?u.size:null,d=u?u.lastModified:null,h=i.getAsFile();h?(s=!0,n--,r.files.push({type:l,data:h,name:c,size:f,mdate:d}),e.push(c),n||(r.raw||(r.raw=e.join(", ")),o(r))):bbn.fn.defaultErrorFunction(bbn._("Impossible to read the file")+" "+c)}else s=!0,i.getAsString(t=>{n--,r.str.push({type:l,data:t}),"text/plain"===l&&e.push(name),n||(r.raw||(r.raw=e.join(", ")),o(r))})})}s||setTimeout(()=>{o(r)})})},getField:function(e,t,n="",r=null,o="=",i=0,s=!1,a=void 0){let u;return n&&["object","function"].includes(typeof n)&&6 in arguments&&(a=s),t?(u=gt(e,n,r,o,i,s,void 0),void 0===u?a:u[t]):a},getFieldValues:function(e,t,n,r,o){en(t,"string"),n&&(e=vt(e,n,r,o));let i=[];return Pe(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=$n(n)),n.trim()},getHTMLOfSelection:kn,getLoader:wt,getPath:st,getProp:function(e,t){return en(e,"object",bbn._("The obj must be an object in setProp")),en(t,"string",bbn._("The prop must be a string in setProp")),e[t]},getProperty:Je,getRequestId:Ot,getRow:gt,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=>{const t=e.length,n=[],r=Array(t).fill(-1);for(let o=0;o<t;o++){let t=e[o],i=0,s=n.length;for(;i<s;){const r=i+s>>1;e[n[r]]<t?i=r+1:s=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()})(e.map(e=>o.get(e))),s=new Set(i.map(t=>e[t])),a=Array(t.length).fill(-1);for(let e=t.length-2;e>=0;e--)a[e]=a[e+1],s.has(t[e+1])&&(a[e]=e+1);const u=e.slice(),l=new Map(u.map((e,t)=>[e,t])),c=[];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=a[e],i=-1!==o?l.get(t[o]):u.length;if(void 0===i)throw new Error("Inconsistent state");const f=r<i?i-1:i;if(r!==f){const[e]=u.splice(r,1);u.splice(f,0,e),c.push({from:r,to:f,value:n}),l.clear();for(let e=0;e<u.length;e++)l.set(u[e],e)}}return c},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;"}),Fe.apply(this,e),this},hash:lt,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:En,imageToCanvas:Tn,imgToBase64:function(e,t="image/png"){return Tn(e).toDataURL(t)},info:function(...e){return e.unshift({_bbn_console_level:4,_bbn_console_style:"color: #EEE; background: blue; font-size: 12px;"}),Fe.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&&"/"!==Ne(bbn.env.root,-1)&&(bbn.env.root+="/"),bbn.env.isInit||"undefined"==typeof dayjs||Pe(["advancedFormat","arraySupport","badMutable","buddhistEra","calendar","customParseFormat","dayOfYear","devHelper","duration","isBetween","isLeapYear","isSameOrAfter","isSameOrBefore","isToday","isTomorrow","isYesterday","isoWeek","isoWeeksInYear","localeData","localizedFormat","minMax","objectSupport","pluralGetSet","quarterOfYear","relativeTime","timezone","toArray","toObject","updateLocale","utc","weekOfYear","weekYear","weekday"],e=>{window["dayjs_plugin_"+e]&&dayjs.extend(window["dayjs_plugin_"+e])}),"object"==typeof e&&Ue(!0,bbn,e),bbn.env.path=Ne(bbn.env.url,bbn.env.root.length),n=bbn.env.path.split("/"),Pe(n,(e,t)=>{""!==(e=decodeURI(e.trim()))&&bbn.env.params.push(e)}),bbn.var.colors&&_t(bbn.var.colors),bbn.env.lang&&void 0!==dayjs&&import("dayjs/locale/"+bbn.env.lang+".js").then(()=>{dayjs.locale(bbn.env.lang)}),document.addEventListener("visibilitychange",()=>{document.hidden&&bbn.env.isFocused?bbn.env.isFocused=!1:document.hidden||bbn.env.isFocused||(bbn.env.isFocused=!0)}),document.addEventListener("focusin",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.last_focus=Pn()}),document.addEventListener("click",e=>{if(bbn.env.last_focus=Pn(),"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(),Cn(t.getAttribute("href")),!1):void 0}),Pe(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"),e=>{e.addEventListener("submit",t=>{Yn(e,t)})}),window.addEventListener("hashchange",()=>{bbn.env.hashChanged=(new Date).getTime()},!1),window.addEventListener("resize",()=>{Fn()}),window.addEventListener("orientationchange",()=>{Fn()}),Fn(),In()&&(document.body.classList.add("bbn-mobile"),Rn()&&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?Cn(e.url,Ue({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&Ye(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&&Fe("Logging in bbn is enabled"))},isActiveInterface:function(e=600){return!!bbn.env.last_focus&&(new Date).getTime()-bbn.env.last_focus<1e3*e},isArray:Be,isBlob:mn,isBoolean:function(...e){if(!e.length)return!1;for(let t of e)if(![!0,!1].includes(t))return!1;return!0},isCanvas:pn,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(!Ce(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:at,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:Ge,isDesktopDevice:function(){return"desktop"===On()},isDimension:function(...e){if(!e.length)return!1;for(let t of e){if("number"!=typeof t||t<0)return!1;if(!Hn(t))return!1}return!0},isDom:it,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(!Ce(n))return!1;if(!t.test(n))return!1}return!0},isEmpty:et,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:Ye,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(!Ce(t))return!1;if(!Bn(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=xn(e);if(n.length){if(Ce(t)){let e=!1;return Pe(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:Le,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:Bn,isIterable:je,isMobile:In,isMobileDevice:Nn,isNotObject:fn,isNull:tt,isNumber:Ae,isObject:He,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:At,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 Pe(["width","height","gap","margin","padding","top","left","right","bottom"],n=>{if(-1!==e.indexOf(n))return t=!0,!1}),t},isSame:dt,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:Ce,isSymbol:Un,isTabletDevice:Rn,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:Hn,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Ce(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:Ie,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,s=(255&r)+t;return o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0),s>255?s=255:s<0&&(s=0),(n?"#":"")+(s|i<<8|o<<16).toString(16)}},link:Cn,log:Fe,makeReactive:function e(t,n,r,o){const i=(null==r?void 0:r.$cid)||"",s="__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&&Fe(["MAKING bbn-loadbar",t]),t.__bbnWatchers||Reflect.defineProperty(t,"__bbnWatchers",{value:sn(),writable:!0,configurable:!0,enumerable:!1});return new Proxy(t,{get(a,u){const l=Reflect.get(a,u),c=a.__bbnRoot||a;if(Un(u))return Reflect.get(c,u);const f=o?o+"."+u:u,d=s+(Ae(u)?u.toString():u);if(["fill","pop","push","reverse","shift","sort","splice","unshift"].includes(u)&&Be(a))return function(...e){let t=c[u](...e);return Wn("DOING ARRAY STUFF"),Fe(a.__bbnParent),n(a,"length",r),t};if(Ye(l))return l;if("__bbnRoot"===u){let e=t;for(;e&&(null==e?void 0:e.__bbnTarget);)e=e.__bbnTarget;return e}return"__bbnIsProxy"===u||("__bbnTarget"===u?a:"__bbnParent"===u?r:"__bbnWatchers"===u?a.__bbnWatchers:0===u.indexOf("__bbn_")?Reflect.get(a,u):"length"===u&&Be(a.__bbnRoot||a)?c.length:u in a&&l&&"object"==typeof l&&[void 0,Object,Array].includes(l.constructor)?(l.__bbnIsProxy&&l.__bbnParent===r||(d in c||Reflect.defineProperty(c,d,{value:e(l,n,r,f),writable:!0,configurable:!0,enumerable:!1}),c[d].__bbnIsProxy&&!c.__bbnWatchers[i]&&(c.__bbnWatchers[i]=f)),c[d]):l)},set(t,a,u){if(Un(a))return Reflect.get(t,a,u);const l=t.__bbnRoot||t,c=o?o+"."+a:a;if(Un(a))return Reflect.get(t,a);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&Fe(["Setting proxy prop in "+r.$options.name,t,a,u]),!dt(l[a],u)){if(0===a.indexOf("__bbn_"))Reflect.defineProperty(l,a,{value:e(u,n,r,c),writable:!0,configurable:!0,enumerable:!1});else if(u&&"object"==typeof u&&[void 0,Object,Array].includes(u.constructor)){const t=s+(Ae(a)?a.toString():a);Reflect.defineProperty(l,t,{value:e(u,n,r,c),writable:!0,configurable:!0,enumerable:!1}),l[t].__bbnIsProxy&&!l.__bbnWatchers[i]&&(l.__bbnWatchers[i]=c)}r&&r.$options&&"bbn-loadbar"===r.$options.name&&Fe(["Setting proxy prop in "+r.$options.name+" "+(Ae(a)?a.toString():a),u,t]),Reflect.set(l,a,u),n(t,a,r)}return!0},defineProperty(t,i,a){const u=t,l=o?o+"."+i:i;if("__bbnWatchers"===i||Un(i)||0===i.indexOf("__bbn_"))Reflect.defineProperty(u,i,a);else{const t=s+(Ae(i)?i.toString():i);Reflect.defineProperty(u,t,{value:e(a.value,n,r,l),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=s+(Ae(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]&&Be(t[r])&&(t[r]=e(t[r],n,r,o+1)),t))},md5:ct,microtimestamp:function(){return window.performance.now()+performance.timeOrigin},money:function(e,t,n,r,o,i,s){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:" "),s||(s=void 0===s&&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),Ae(s)||(s=t?3:0),0===e&&"number"==typeof s&&s>0){let r=e.toFixed(s).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 a=e.toFixed(s),u=0,l=1e4;return a&&(l=a.indexOf("."),l<=0?l=1e4:u=a.length-l),a.replace(/./g,function(e,t,n){return"."===e?o:t&&(n.length-t-u)%3==0&&t<l?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=Ke(e,t,o.field,o.dir),0!==r)return r;return 0})},mutateArray:function(e,t,n=null){if(!Be(e,t))throw new TypeError("mutateArray can only be called with arrays");n?en(n,"function","The hash function must be a function"):n=lt;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||!dt(e[t],o[t])){const n=pt(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(!He(e,t))throw new TypeError("mutateObject can only be called with arrays");n?en(n,"function","The hash function must be a function"):n=lt;const r=Object.keys(t);for(let t in e)r.includes(t)||delete e[t];return r.forEach(n=>{dt(e[n],t[n])||(e[n]=t[n])}),e},nl2br:function(e,t){return Dt("\n","<br>"+(t?"\n":""),e)},numProperties:Qe,objectToFormData:zn,order:function(e,t,n="asc"){return e?e.sort(function(e,r){return Ke(e,r,t,n)}):e},outerHeight:function(e){if((e=qn(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=qn(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:Ln,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"),Vn(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=sn(t)).bbn||(t.bbn="public"),St(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=Dt("'","'",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=Dt('"',""",e)),e},randomInt:Zn,randomString:function(e,t,n){let r,o,i={n:"0123456789",l:"abcdefghijklmnopqrstuvwxyz",u:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};n||(n="nlu"),e||(r=Zn(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=Zn(e,t):e&&(r=e);let s="";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)],s+=i[o][Math.floor(Math.random()*i[o].length)];return s},removeAccents:Xe,removeEmpty:function(e){var t=[];if(Be(e))for(let n=0;n<e.length;n++){let r=!1;e[n]&&(Be(e[n])?e[n].length&&(r=!0):He(e[n])?Qe(e[n])&&(r=!0):r=!0),r&&t.push(e[n])}return t},removeExtraSpaces:function(e){return e.replace(/\s+/g," ").trim()},removeHtmlComments:$n,removePrivateProp:Re,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;Ne(e,-t.length)===t;)e=Ne(e,0,e.length-t.length);for(;Ne(e,0,t.length)===t;)e=Ne(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:Dt,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,s=o.lastChild;r.insertNode(o),n.removeAllRanges(),t?(i&&(r.setStartBefore(i),r.setEndAfter(s)),n.addRange(r)):(r.setStartAfter(s),n.addRange(r))}},resize:Fn,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 Ie(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 Jn(Xe(e).replace(/[^a-z0-9]/gi,t).replace(o,t),t)},search:pt,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:qn,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:jn,setProp:function(e,t,n,r=!0,o=!0){Object.defineProperty(e,t,{value:n,writable:r,configurable:o})},setProperty:Vn,shorten:Xn,shortenObj:function e(t,n=100){let r=tn(t);return Pe(r,(t,o)=>{Ce(t)&&t.length>n?r[o]=Xn(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:ot,simpleHash1:nt,simpleHash2:rt,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 s=Ot(e,n,"json"),a=wt(s);if(null==a?void 0:a.loader)return a.loader;n||(n={}),bbn.env.token&&(n._bbn_token=bbn.env.token);const u=new AbortController;let l="";const c=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=Ye(t);r.read().then(function e({done:a,value:u}){if(a)return yt(s,n),l&&c(l),void(i&&i());if(o)if(l+=Et(u).trim(),bbn.fn.log(["STREAM RESULT",l.length,l]),l)try{c(l),l=""}catch(e){}else t();else bbn.fn.log(["STREAM SUCCESS IS FN? "+o]);return r.read().then(e)})}}).catch(t=>{let i=!(!(a=t)||!0!==a.__BBN_CANCEL__);var a;if(yt(s,n,i),i){let n=1;Ye(o)&&(n=o(t.message,e)),n&&un(t.message,e)}else{let e=1;Ye(r)&&(e=r(t.request,t)),e&&ln(t.request,t.response?t.response.data:"",t.response?t.response.status:t)}});return Ze(s,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:Yn,substr:Ne,sum:function(e,t,n,r,o){let i=0;return Pe(rn(e,n,r,o),e=>{let n="function"==typeof t?t(e):e[t];n&&(i+=parseFloat(n)||0)}),i},timestamp:Pn,toCSV:function(e,t=",",n="",r='"'){t||(t=","),r||(r='"');let o="",i=e.length;return Pe(e,(e,s)=>{let a=Be(e)?e.length:Object.values(e).length,u=0;Pe(e,e=>{o+="string"==typeof e?r+Dt(r,"\\"+r,e)+r:0===e?"0":e&&e.toString?e.toString():r+r,u++,u<a&&(o+=t)}),s<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(){Fn()},0)},translate:function(e,t){let n=t?bbn.lng[0===t.indexOf("_")?t:"_"+t]:bbn.lng;Ie(e,(e,t)=>{n[t]=e})},treatAjaxArguments:An,treatForHash:ut,trim:Jn,uniqString:function(...e){for(var t="",n=0;n<e.length;n++)if(e[n])if("object"==typeof e[n])if(Be(e[n]))t+=JSON.stringify(e[n]);else{let r={};Pe(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 ct(t)},unique:Mn,upload:function(e,t,n=null,r=null,o=null){const i=()=>Te.run("post",e||bbn.env.path,{data:zn({file:t}),headers:{"Content-Type":"multipart/form-data"},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&&(Fe("SUCCESS",e),n(e))}).catch(e=>{r&&(Fe("ERROR",e),r(e))}):i()},warning:Wn,yieldToBrowser:wn};s.extend(c),s.extend(m),s.extend(y),s.extend(S),s.extend(O),s.extend(T),s.extend(Y),s.extend(I),s.extend(U),s.extend(V),s.extend(Q),s.extend(re),s.extend(ae),s.extend(fe),s.extend(be),s.extend(we),s.extend(Se);const Kn={version:"1.0.1",opt:{_cat:{}},app:{},_:Me,$: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:xe,date:Jt,com:Te,env:De,db:Ve,fn:Gn,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"}]};return"undefined"!=typeof window&&(window.dayjs=s,window.bbn=Kn),e.bbn=Kn,e.dayjs=s,e.default=Kn,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
1
|
+
var bbn=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r={exports:{}};var o,i=(n||(n=1,r.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",i="minute",s="hour",a="day",u="week",l="month",c="quarter",f="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,l),i=n-o<0,s=t.clone().add(r+(i?-1:1),l);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:f,w:u,d:a,D:d,h:s,m:i,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",v={};v[w]=p;var _="$isDayjsObject",S=function(e){return e instanceof O||!(!e||!e[_])},M=function e(t,n,r){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();v[i]&&(o=i),n&&(v[i]=n,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;v[a]=t,o=a}return!r&&o&&(w=o),o||!r&&w},x=function(e,t){if(S(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},D=y;D.l=M,D.i=S,D.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function p(e){this.$L=M(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var g=p.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(D.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return D},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,n){return D.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!D.u(t)||t,c=D.p(e),h=function(e,t){var o=D.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(a)},m=function(e,t){return D.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},b=this.$W,p=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case f:return r?h(1,0):h(31,11);case l:return r?h(1,p):h(0,p+1);case u:var w=this.$locale().weekStart||0,v=(b<w?b+7:b)-w;return h(r?g-v:g+(6-v),p);case a:case d:return m(y+"Hours",0);case s:return m(y+"Minutes",1);case i:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=D.p(e),c="set"+(this.$u?"UTC":""),h=(n={},n[a]=c+"Date",n[d]=c+"Date",n[l]=c+"Month",n[f]=c+"FullYear",n[s]=c+"Hours",n[i]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[u],m=u===a?this.$D+(t-this.$W):t;if(u===l||u===f){var b=this.clone().set(d,1);b.$d[h](m),b.init(),this.$d=b.set(d,Math.min(this.$D,b.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[D.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var m=D.p(c),b=function(e){var t=x(h);return D.w(t.date(t.date()+Math.round(e*r)),h)};if(m===l)return this.set(l,this.$M+r);if(m===f)return this.set(f,this.$y+r);if(m===a)return b(1);if(m===u)return b(7);var p=(d={},d[i]=t,d[s]=n,d[o]=e,d)[m]||1,g=this.$d.getTime()+r*p;return D.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=D.z(this),i=this.$H,s=this.$m,a=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,f=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},d=function(e){return D.s(i%12||12,e,"0")},m=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(b,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return D.s(t.$y,4,"0");case"M":return a+1;case"MM":return D.s(a+1,2,"0");case"MMM":return f(n.monthsShort,a,l,3);case"MMMM":return f(l,a);case"D":return t.$D;case"DD":return D.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,u,2);case"ddd":return f(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(i);case"HH":return D.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,s,!0);case"A":return m(i,s,!1);case"m":return String(s);case"mm":return D.s(s,2,"0");case"s":return String(t.$s);case"ss":return D.s(t.$s,2,"0");case"SSS":return D.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,h){var m,b=this,p=D.p(d),g=x(r),y=(g.utcOffset()-this.utcOffset())*t,w=this-g,v=function(){return D.m(b,g)};switch(p){case f:m=v()/12;break;case l:m=v();break;case c:m=v()/3;break;case u:m=(w-y)/6048e5;break;case a:m=(w-y)/864e5;break;case s:m=w/n;break;case i:m=w/t;break;case o:m=w/e;break;default:m=w}return h?m:D.a(m)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return v[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=M(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return D.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},p}(),$=O.prototype;return x.prototype=$,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",l],["$y",f],["$D",d]].forEach(function(e){$[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=M,x.isDayjs=S,x.unix=function(e){return x(1e3*e)},x.en=v[w],x.Ls=v,x.p={},x}()),r.exports),s=t(i),a={exports:{}};var u,l=(o||(o=1,a.exports=function(e,t,n){var r="h:mm A",o={lastDay:"[Yesterday at] "+r,sameDay:"[Today at] "+r,nextDay:"[Tomorrow at] "+r,nextWeek:"dddd [at] "+r,lastWeek:"[Last] dddd [at] "+r,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var r=t||this.$locale().calendar||o,i=n(e||void 0).startOf("d"),s=this.diff(i,"d",!0),a="sameElse",u=s<-6?a:s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":a,l=r[u]||o[u];return"function"==typeof l?l.call(this,n()):this.format(l)}}),a.exports),c=t(l),f={exports:{}};var d,h=(u||(u=1,f.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)},u=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},f=function(e,t){var n,r=s.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=f(e,!1)}],a:[i,function(e){this.afternoon=f(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[r,u("day")],Do:[i,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,u("week")],ww:[r,u("week")],M:[o,u("month")],MM:[r,u("month")],MMM:[i,function(e){var t=c("months"),n=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,u("year")],Z:l,ZZ:l};function h(n){var r,o;r=n,o=s&&s.formats;for(var i=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})).match(t),a=i.length,u=0;u<a;u+=1){var l=i[u],c=d[l],f=c&&c[0],h=c&&c[1];i[u]=h?{regex:f,parser:h}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var o=i[n];if("string"==typeof o)r+=o.length;else{var s=o.regex,u=o.parser,l=e.slice(r),c=s.exec(l)[0];u.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,i=e.args;this.$u=r;var a=i[1];if("string"==typeof a){var u=!0===i[2],l=!0===i[3],c=u||l,f=i[2];l&&(f=i[2]),s=this.$locale(),!u&&f&&(s=n.Ls[f]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=h(t)(e),i=o.year,s=o.month,a=o.day,u=o.hours,l=o.minutes,c=o.seconds,f=o.milliseconds,d=o.zone,m=o.week,b=new Date,p=a||(i||s?1:b.getDate()),g=i||b.getFullYear(),y=0;i&&!s||(y=s>0?s-1:b.getMonth());var w,v=u||0,_=l||0,S=c||0,M=f||0;return d?new Date(Date.UTC(g,y,p,v,_,S,M+60*d.offset*1e3)):n?new Date(Date.UTC(g,y,p,v,_,S,M)):(w=new Date(g,y,p,v,_,S,M),m&&(w=r(w).week(m).toDate()),w)}catch(e){return new Date("")}}(t,a,r,n),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var d=a.length,m=1;m<=d;m+=1){i[1]=a[m-1];var b=n.apply(this,i);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}m===d&&(this.$d=new Date(""))}else o.call(this,e)}}}()),f.exports),m=t(h),b={exports:{}};var p,g=(d||(d=1,b.exports=function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf("day")-n(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"day")}}),b.exports),y=t(g),w={exports:{}};var v,_=(p||(p=1,w.exports=function(){var e,t,n=1e3,r=6e4,o=36e5,i=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,a=31536e6,u=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:a,months:u,days:i,hours:o,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},f=function(e){return e instanceof y},d=function(e,t,n){return new y(e,n,t.$l)},h=function(e){return t.p(e)+"s"},m=function(e){return e<0},b=function(e){return m(e)?Math.ceil(e):Math.floor(e)},p=function(e){return Math.abs(e)},g=function(e,t){return e?m(e)?{negative:!0,format:""+p(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*c[h(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach(function(t){r.$d[h(t)]=e[t]}),this.calMilliseconds(),this;if("string"==typeof e){var o=e.match(l);if(o){var i=o.slice(2).map(function(e){return null!=e?Number(e):0});return this.$d.years=i[0],this.$d.months=i[1],this.$d.weeks=i[2],this.$d.days=i[3],this.$d.hours=i[4],this.$d.minutes=i[5],this.$d.seconds=i[6],this.calMilliseconds(),this}}return this}var p=m.prototype;return p.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*c[n]},0)},p.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=b(e/a),e%=a,this.$d.months=b(e/u),e%=u,this.$d.days=b(e/i),e%=i,this.$d.hours=b(e/o),e%=o,this.$d.minutes=b(e/r),e%=r,this.$d.seconds=b(e/n),e%=n,this.$d.milliseconds=e},p.toISOString=function(){var e=g(this.$d.years,"Y"),t=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=g(n,"D"),o=g(this.$d.hours,"H"),i=g(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var a=g(s,"S"),u=e.negative||t.negative||r.negative||o.negative||i.negative||a.negative,l=o.format||i.format||a.format?"T":"",c=(u?"-":"")+"P"+e.format+t.format+r.format+l+o.format+i.format+a.format;return"P"===c||"-P"===c?"P0D":c},p.toJSON=function(){return this.toISOString()},p.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(s,function(e,t){return t||String(r[e])})},p.as=function(e){return this.$ms/c[h(e)]},p.get=function(e){var t=this.$ms,n=h(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?b(t/c[n]):this.$d[n],t||0},p.add=function(e,t,n){var r;return r=t?e*c[h(t)]:f(e)?e.$ms:d(e,this).$ms,d(this.$ms+r*(n?-1:1),this)},p.subtract=function(e,t){return this.add(e,t,!0)},p.locale=function(e){var t=this.clone();return t.$l=e,t},p.clone=function(){return d(this.$ms,this)},p.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},m}(),w=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,o){e=o,t=o().$utils(),o.duration=function(e,t){var n=o.locale();return d(e,{$l:n},t)},o.isDuration=f;var i=r.prototype.add,s=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?w(this,e,1):i.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?w(this,e,-1):s.bind(this)(e,t)}}}()),w.exports),S=t(_),M={exports:{}};var x,D=(v||(v=1,M.exports=function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var i=n(e),s=n(t),a="("===(o=o||"()")[0],u=")"===o[1];return(a?this.isAfter(i,r):!this.isBefore(i,r))&&(u?this.isBefore(s,r):!this.isAfter(s,r))||(a?this.isBefore(i,r):!this.isAfter(i,r))&&(u?this.isAfter(s,r):!this.isBefore(s,r))}}),M.exports),O=t(D),$={exports:{}};var k,E=(x||(x=1,$.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}),$.exports),T=t(E),A={exports:{}};var j,C,L=(k||(k=1,A.exports=(j="day",function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),j)},o=t.prototype;o.isoWeekYear=function(){return r(this).year()},o.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),j);var t,o,i,s=r(this),a=(t=this.isoWeekYear(),i=4-(o=(this.$u?n.utc:n)().year(t).startOf("year")).isoWeekday(),o.isoWeekday()>4&&(i+=7),o.add(i,j));return s.diff(a,"week")+1},o.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var i=o.startOf;o.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return"isoweek"===n.p(e)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):i.bind(this)(e,t)}})),A.exports),Y=t(L),F={exports:{}};var N,R=(C||(C=1,F.exports=function(e,t,n){var r=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},i=function(e,t,n,r,i){var s=e.name?e:e.$locale(),a=o(s[t]),u=o(s[n]),l=a||u.map(function(e){return e.slice(0,r)});if(!i)return l;var c=s.weekStart;return l.map(function(e,t){return l[(t+(c||0))%7]})},s=function(){return n.Ls[n.locale()]},a=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},u=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):i(e,"months")},monthsShort:function(t){return t?t.format("MMM"):i(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):i(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):i(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):i(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return a(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return u.bind(this)()},n.localeData=function(){var e=s();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return a(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return i(s(),"months")},n.monthsShort=function(){return i(s(),"monthsShort","months",3)},n.weekdays=function(e){return i(s(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return i(s(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return i(s(),"weekdaysMin","weekdays",2,e)}}),F.exports),I=t(R),P={exports:{}};var H,B=(N||(N=1,P.exports=function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,i=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,o){var i=o&&o.toUpperCase();return r||n[o]||e[o]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(t,void 0===n?{}:n);return i.call(this,r)}}}()),P.exports),U=t(B),W={exports:{}};var z,q=(H||(H=1,W.exports=function(e,t,n){var r=function(e,t){if(!t||!t.length||1===t.length&&!t[0]||1===t.length&&Array.isArray(t[0])&&!t[0].length)return null;var n;1===t.length&&t[0].length>0&&(t=t[0]),n=(t=t.filter(function(e){return e}))[0];for(var r=1;r<t.length;r+=1)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n};n.max=function(){var e=[].slice.call(arguments,0);return r("isAfter",e)},n.min=function(){var e=[].slice.call(arguments,0);return r("isBefore",e)}}),W.exports),V=t(q),Z={exports:{}};var J,X,G,K=(z||(z=1,Z.exports=(J="month",X="quarter",function(e,t){var n=t.prototype;n.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var r=n.add;n.add=function(e,t){return e=Number(e),this.$utils().p(t)===X?this.add(3*e,J):r.bind(this)(e,t)};var o=n.startOf;n.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;if(n.p(e)===X){var i=this.quarter()-1;return r?this.month(3*i).startOf(J).startOf("day"):this.month(3*i+2).endOf(J).endOf("day")}return o.bind(this)(e,t)}})),Z.exports),Q=t(K),ee={exports:{}};var te,ne=(G||(G=1,ee.exports=function(e,t,n){e=e||{};var r=t.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(e,t,n,o){return r.fromToBase(e,t,n,o)}n.en.relativeTime=o,r.fromToBase=function(t,r,i,s,a){for(var u,l,c,f=i.$locale().relativeTime||o,d=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=d.length,m=0;m<h;m+=1){var b=d[m];b.d&&(u=s?n(t).diff(i,b.d,!0):i.diff(t,b.d,!0));var p=(e.rounding||Math.round)(Math.abs(u));if(c=u>0,p<=b.r||!b.r){p<=1&&m>0&&(b=d[m-1]);var g=f[b.l];a&&(p=a(""+p)),l="string"==typeof g?g.replace("%d",p):g(p,r,b.l,c);break}}if(r)return l;var y=c?f.future:f.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(e,t){return i(e,t,this,!0)},r.from=function(e,t){return i(e,t,this)};var s=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(s(this),e)},r.fromNow=function(e){return this.from(s(this),e)}}),ee.exports),re=t(ne),oe={exports:{}};var ie,se=(te||(te=1,oe.exports=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,s=function(e,n,r){void 0===r&&(r={});var o=new Date(e),i=function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r);return i.formatToParts(o)},a=function(t,n){for(var r=s(t,n),i=[],a=0;a<r.length;a+=1){var u=r[a],l=u.type,c=u.value,f=e[l];f>=0&&(i[f]=parseInt(c,10))}var d=i[3],h=24===d?0:d,m=i[0]+"-"+i[1]+"-"+i[2]+" "+h+":"+i[4]+":"+i[5]+":000",b=+t;return(o.utc(m).valueOf()-(b-=b%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),s=this.toDate(),a=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(a))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-u;if(Number(l)){if(n=o(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=n.utcOffset();n=n.add(r-c,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,s=n||t||i,u=a(+o(),s);if("string"!=typeof e)return o(e).tz(s);var l=function(e,t,n){var r=e-60*t*1e3,o=a(r,n);if(t===o)return[r,t];var i=a(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),u,s),c=l[0],f=l[1],d=o(c).utcOffset(f);return d.$x.$timezone=s,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}()),oe.exports),ae=t(se),ue={exports:{}};var le,ce=(ie||(ie=1,ue.exports=function(e,t,n){n.updateLocale=function(e,t){var r=n.Ls[e];if(r)return(t?Object.keys(t):[]).forEach(function(e){r[e]=t[e]}),r}}),ue.exports),fe=t(ce),de={exports:{}};var he,me=(le||(le=1,de.exports=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var s=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},s.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),a.call(this,e)};var u=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=s.utcOffset;s.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===i?s:-s}(r),null===r))return this;var s=Math.abs(r)<=16?60*r:r;if(0===s)return this.utc(o);var a=this.clone();if(o)return a.$offset=s,a.$u=!1,a;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(s+u,e)).$offset=s,a.$x.$localOffset=u,a};var c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var d=s.diff;s.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var r=this.local(),o=i(e).local();return d.call(r,o,t,n)}}}()),de.exports),be=t(me),pe={exports:{}};var ge,ye=(he||(he=1,pe.exports=function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n<t?n+7:n)-t;return this.$utils().u(e)?r:this.subtract(r,"day").add(e,"day")}}),pe.exports),we=t(ye),ve={exports:{}};var _e=(ge||(ge=1,ve.exports=function(){var e="week",t="year";return function(n,r,o){var i=r.prototype;i.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var i=o(this).startOf(t).add(1,t).date(r),s=o(this).endOf(e);if(i.isBefore(s))return 1}var a=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),u=this.diff(a,e,!0);return u<0?o(this).startOf("week").week():Math.ceil(u)},i.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()),ve.exports),Se=t(_e);function Me(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}var xe={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}},De={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,timeoff:Math.round((new Date).getTime()/1e3),loggingLevel:5,ignoreUnload:!1,historyDisabled:!1,nav:"ajax",online:window.navigator.onLine},Oe=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};class $e extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const ke=["POST","PUT","PATCH","DELETE"],Ee=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=ke.includes(e.toUpperCase()),s=new Promise((r,s)=>{o.open(e,t,!0);const{body:a,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 a=o.responseText;if((e["content-type"]||"").includes("application/json"))try{a=JSON.parse(o.responseText)}catch(e){}const u={data:a,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,s(e)}},o.onerror=()=>{const e=new Error("Network Error");e.config=n,e.request=o,s(e)},o.onabort=()=>{s(new $e("Request canceled"))},i?o.send(a):o.send()});return s.cancel=()=>o.abort(),s};var Te={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&&ke.includes(e.toUpperCase())?Ee(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=ke.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 s=fetch(t,o).then(e=>Oe(void 0,void 0,void 0,function*(){let t;t=(e.headers.get("content-type")||"").includes("application/json")?yield e.json():yield e.text();const r={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=r,t.config=n,t.request=e,t}return r})).catch(e=>{if("AbortError"===e.name)throw new $e("Request canceled");throw e});return s.cancel=()=>r.abort(),s})(e,t,n,r)}};function Ae(...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 je(...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 Ce(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function Le(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function Ye(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function Fe(...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&&Ye(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 s=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),s.apply(window.console,o),n++}}}return this}function Ne(e,t,n){if(!Ce(e)||!Le(t))throw Fe(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),Le(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function Re(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)Ne(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=Re(e[r],!0):n[r]=e[r]);return n||!1}function Ie(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?Re(e):e);r&&o.reverse();for(let n of o)if(!1===t(e[n],n))break}return e}function Pe(e,t){if(!(Ae(e)&&e>0)){if(je(e)){for(let n=0;n<e.length;n++)if(!1===t(e[n],n))return;return e}return Ie(e,t)}for(let n=0;n<e;n++)if(!1===t(n,n))return}function He(...e){if(!e.length)return!1;for(let t of e)if("[object Object]"!=={}.toString.apply(t))return!1;return!0}function Be(...e){if(!e.length)return!1;for(let t of e)if(!Array.isArray(t))return!1;return!0}function Ue(...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++)Ie(n[e],(e,n)=>{t?Be(e)?(o[n]=Be(o[n])?o[n]:[],Pe(e,(e,t)=>{if(e&&"object"==typeof e){let r=o[n][t];Be(e)?Be(r)||(r=[]):He(r)||(r={}),o[n][t]=Ue(!0,r,e)}else o[n][t]=e})):He(e)?o[n]=Ue(!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 We=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,ze=(e,t)=>{if(null==t?void 0:t.length){let n={};return Ie(e,(e,r)=>{t.indexOf(r)>-1&&(n[r]=e)}),n}return e},qe=function(e){const t=Ve._connections[e],n=Ve._structures[e];let r=null;const o=(e,t)=>{e.onerror=()=>{r=e.error,Fe(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 s=t.length;Pe(t,e=>{const t=o.put(e);t.onerror=()=>{Fe(t.error),s--}}),r.oncomplete=()=>{n(s)}})),this.update=(e,t,r,s)=>new Promise(a=>{this.selectAll(e,[],r).then(r=>{if(!r.length)return void a(0);const[u,l]=i(e,"w"),c=n[e],f=c.keys.PRIMARY.columns.length>1?c.keys.PRIMARY.columns:c.keys.PRIMARY.columns[0];let d=0;for(let e=0;e<r.length;e++){const n=Ue({},s?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Me("No primary key in the data"));const i=l.put(n);o(i,a),i.onsuccess=()=>{d++}}u.oncomplete=()=>{a(d)}})}),this.delete=(e,t)=>new Promise(r=>{const[s,a]=i(e,"w"),u=n[e],l=u.keys.PRIMARY.columns.length>1?u.keys.PRIMARY.columns:u.keys.PRIMARY.columns[0];if(!t[l])throw new Error(Me("No "));const c=a.delete(t[l]);o(c,r),s.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,s=null,a=0,u=null)=>new Promise(s=>{const[l,c]=i(e,"r"),f=n[e],d=f.keys.PRIMARY.columns.length>1?f.keys.PRIMARY.columns:f.keys.PRIMARY.columns[0],h=He(r)?Object.keys(r)[0]:!r||Be(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=a||0;n<e;n++){let i=c.get(r[d][n]);i.onsuccess=()=>{let n=i.result;m.push(ze(n,t)),m.length===e&&s(m)},o(i,s)}}else{let e=c.get((null==r?void 0:r[d])||r);e.onsuccess=()=>{let n=e.result;m.push(ze(n,t)),s(m)},o(e,s)}else{const e=c.openCursor();let n=0;e.onsuccess=e=>{const o=e.target.result;o?(r&&bbn.fn.search([o.value],r)||(n>=a&&(m.push(ze(o.value,t)),m.length===u&&s(m)),n++),o.continue()):s(m)},o(e,s)}}),this.getColumnValues=(e,n,r,o,i,s)=>new Promise(n=>{t.transaction([e],"read").objectStore(e)}),this.copyTable=(r,o,i=[],s=null,a=null,u=0,l=null)=>new Promise(c=>{if(t.objectStoreNames.contains(r)||Ve.add(e,r,n[o]),!t.objectStoreNames.contains(r))throw c(0),new Error(Me("The target table %s does not exist",r));this.selectAll(o,i,s,a,u,l).then(e=>{e.length?this.insert(r,e).then(e=>{c(e)}):c(0)})}),this.deleteTable=e=>new Promise(n=>{t.deleteObjectStore(e),n(!0)})},Ve={_structures:{},_connections:{},_stores:{},ok:void 0!==We,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});Ie(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(Ve._connections[e])t(new qe(e));else{if(!Ve._structures[e])throw new Error(Me("Impossible to find a structure for the database %s",e));let n=Math.max.apply(this,[1].concat(Object.keys(Ve._structures[e]).map(t=>Ve._structures[e][t].num||1)));const r=We.open(e,n);r.onupgradeneeded=()=>{const t=r.result;Ie(Ve._structures[e],(e,n)=>{this.updateStructure(n,e,t)})},r.onsuccess=()=>{Ve._connections[e]=r.result;let n=new qe(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(Me("The database structure for %s is not valid (are there keys and field? Is there a primary?",t));Ve._structures[e]||(Ve._structures[e]={}),Ve._structures[e][t]=n,Ve._connections[e]&&this.updateStructure(t,n,Ve._connections[e])}};function Ze(e,t,n){let r=(new Date).getTime(),o={key:e,url:Ne(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 Je(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 Xe(e){if(!Ce(e)){if(!e.toString)throw Fe(e),new Error(bbn._("removeAccent expects a string"));e=e.toString()}return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Ge(...e){if(!e.length)return!1;for(let t of e)if("[object Date]"!=={}.toString.apply(t))return!1;return!0}function Ke(e,t,n,r="asc"){let o=Je(e,n),i=Je(t,n),s=(typeof o).toLowerCase(),a=(typeof i).toLowerCase();if("asc"!==r&&Ce(r)&&"desc"===r.toLowerCase()&&(r="desc"),s!==a)o=s,i=a;else switch(s){case"string":o=Xe(o).toLowerCase(),i=Xe(i).toLowerCase();break;case"boolean":o=o?1:0,i=i?1:0;break;case"object":Ge(o)&&(o=o.getTime(),i=Ge(i)?i.getTime():0)}return o<i?"desc"===r?1:-1:o>i?"desc"===r?-1:1:0}function Qe(e){return e&&"object"==typeof e?Object.keys(e).length:0}function et(e){return!e||(Be(e)?!e.length:"object"==typeof e&&!Qe(e))}function tt(...e){if(!e.length)return!1;for(let t of e)if("[object Null]"!=={}.toString.apply(t))return!1;return!0}function nt(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 rt(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 ot(e){return nt(e).padStart(8,"0")+rt(e).padStart(8,"0")}function it(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLElement))return!1;return!0}function st(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,s=Array.from(i.children).filter(t=>t.tagName===e.tagName);if(!o&&s.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 at(...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)||it(n)||!(null===(t=n.$el)||void 0===t?void 0:t.bbnCid))return!1}return!0}function ut(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 s=0;s<e.length;s++)i+="__BBN_ITEM"+s.toString()+"__"+o(e[s],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 s in e){let a=s;"string"!=typeof a&&(a=o(a,o,1,1)),i+="__BBN_PROP_"+a+"__"+o(e[s],t,n+1,r,o)}e="__BBN_OBJECT__"+i}}else e=it(e)?at(e)?"__BBN_CP__"+e.$cid:e.bbnId?"__BBN_DOM__"+e.tagName+"/"+e.bbnId+e.bbnHash:"__BBN_DOM__"+st(e):"__BBN_UNKNOWN_OBJECT__"+e.constructor.toString();return e}function lt(...e){let t="",n=null;2===e.length&&"number"==typeof e[1]&&(n=e[1],e=[e[0]]);for(let r in e)t+=ut(e[r],n,0,null,ut);return ot(t)}function ct(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,s){return r(function(e,t){return e<<t|e>>>32-t}(r(r(t,e),r(o,s)),i),n)}function i(e,t,n,r,i,s,a){return o(t&n|~t&r,e,t,i,s,a)}function s(e,t,n,r,i,s,a){return o(t&r|n&~r,e,t,i,s,a)}function a(e,t,n,r,i,s,a){return o(t^n^r,e,t,i,s,a)}function u(e,t,n,r,i,s,a){return o(n^(t|~r),e,t,i,s,a)}var l,c,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),b=1732584193,p=-271733879,g=-1732584194,y=271733878;for(l=0;l<m.length;l+=16)c=b,f=p,d=g,h=y,b=i(b,p,g,y,m[l+0],7,-680876936),y=i(y,b,p,g,m[l+1],12,-389564586),g=i(g,y,b,p,m[l+2],17,606105819),p=i(p,g,y,b,m[l+3],22,-1044525330),b=i(b,p,g,y,m[l+4],7,-176418897),y=i(y,b,p,g,m[l+5],12,1200080426),g=i(g,y,b,p,m[l+6],17,-1473231341),p=i(p,g,y,b,m[l+7],22,-45705983),b=i(b,p,g,y,m[l+8],7,1770035416),y=i(y,b,p,g,m[l+9],12,-1958414417),g=i(g,y,b,p,m[l+10],17,-42063),p=i(p,g,y,b,m[l+11],22,-1990404162),b=i(b,p,g,y,m[l+12],7,1804603682),y=i(y,b,p,g,m[l+13],12,-40341101),g=i(g,y,b,p,m[l+14],17,-1502002290),b=s(b,p=i(p,g,y,b,m[l+15],22,1236535329),g,y,m[l+1],5,-165796510),y=s(y,b,p,g,m[l+6],9,-1069501632),g=s(g,y,b,p,m[l+11],14,643717713),p=s(p,g,y,b,m[l+0],20,-373897302),b=s(b,p,g,y,m[l+5],5,-701558691),y=s(y,b,p,g,m[l+10],9,38016083),g=s(g,y,b,p,m[l+15],14,-660478335),p=s(p,g,y,b,m[l+4],20,-405537848),b=s(b,p,g,y,m[l+9],5,568446438),y=s(y,b,p,g,m[l+14],9,-1019803690),g=s(g,y,b,p,m[l+3],14,-187363961),p=s(p,g,y,b,m[l+8],20,1163531501),b=s(b,p,g,y,m[l+13],5,-1444681467),y=s(y,b,p,g,m[l+2],9,-51403784),g=s(g,y,b,p,m[l+7],14,1735328473),b=a(b,p=s(p,g,y,b,m[l+12],20,-1926607734),g,y,m[l+5],4,-378558),y=a(y,b,p,g,m[l+8],11,-2022574463),g=a(g,y,b,p,m[l+11],16,1839030562),p=a(p,g,y,b,m[l+14],23,-35309556),b=a(b,p,g,y,m[l+1],4,-1530992060),y=a(y,b,p,g,m[l+4],11,1272893353),g=a(g,y,b,p,m[l+7],16,-155497632),p=a(p,g,y,b,m[l+10],23,-1094730640),b=a(b,p,g,y,m[l+13],4,681279174),y=a(y,b,p,g,m[l+0],11,-358537222),g=a(g,y,b,p,m[l+3],16,-722521979),p=a(p,g,y,b,m[l+6],23,76029189),b=a(b,p,g,y,m[l+9],4,-640364487),y=a(y,b,p,g,m[l+12],11,-421815835),g=a(g,y,b,p,m[l+15],16,530742520),b=u(b,p=a(p,g,y,b,m[l+2],23,-995338651),g,y,m[l+0],6,-198630844),y=u(y,b,p,g,m[l+7],10,1126891415),g=u(g,y,b,p,m[l+14],15,-1416354905),p=u(p,g,y,b,m[l+5],21,-57434055),b=u(b,p,g,y,m[l+12],6,1700485571),y=u(y,b,p,g,m[l+3],10,-1894986606),g=u(g,y,b,p,m[l+10],15,-1051523),p=u(p,g,y,b,m[l+1],21,-2054922799),b=u(b,p,g,y,m[l+8],6,1873313359),y=u(y,b,p,g,m[l+15],10,-30611744),g=u(g,y,b,p,m[l+6],15,-1560198380),p=u(p,g,y,b,m[l+13],21,1309151649),b=u(b,p,g,y,m[l+4],6,-145523070),y=u(y,b,p,g,m[l+11],10,-1120210379),g=u(g,y,b,p,m[l+2],15,718787259),p=u(p,g,y,b,m[l+9],21,-343485551),b=r(b,c),p=r(p,f),g=r(g,d),y=r(y,h);return n(b)+n(p)+n(g)+n(y)}function ft(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,s=!1,a="",u=0,l=0,c=[],f={},d="",h=['"',"'","`"],m=!1,b=!1,p=!1,g=!1,y=!1,w=!1,v="";for(let e=0;e<t.length;e++)if(p||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])p=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(p||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())s=!0;else if("async"!==r.trim()){a=r.trim();let e=a.match(/^([a-zA-Z0-9_]+)<[a-zA-Z0-9_]+>$/);e&&(a=e[1])}r=""}}else if(")"===t[e])u===l+1&&(b?(f.default=r.trim(),b=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(c.push(f),f={}),r=""),l++;else if(y&&"}"!==t[e])r+=t[e];else{if(u&&u===l&&":"===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!==l||l||o)){f.name=t.slice(0,e).trim(),c.push(f),f={},o=!0,n=bbn.fn.substr(t,e+2).trim();break}if(u===l&&"="===t[e]&&">"===t[e+1]){""!==r.trim()&&(f.name=r.trim(),c.push(f),f={},r=""),o=!0,e++;continue}if("="===t[e]&&u>l&&!b)f.name=r.trim(),r="",b=!0;else if(","===t[e])if(y)r+=t[e];else{if(!(u>l))throw Error("Unexpected ',' while parsing function");b?(f.default=r.trim(),b=!1):r&&(f.name=r.trim()),(f.name||f.default)&&(c.push(f),f={}),r=""}else if("{"===t[e]||"}"===t[e]){if(u===l){n=t.substring(e).trim();break}u>l?"{"!==t[e]||y?"}"===t[e]&&y&&(y=!1,r+=t[e]):(y=!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>l?r+=t[e]:r=""):r+=t[e]}}}else g=!0,r="";else p=!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&&(w=!0);const _=c.map(e=>e.name+(e.default?" = "+e.default:"")).join(", ");return{body:n,args:c,argString:_,isArrow:o,hasFunction:s,name:a,isAsync:i,isBinary:w,hash:ct(n+(a?"-"+a:"")+(_?"-"+_:"")),returnType:v}}function dt(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(lt(r)!==lt(o))return!1;let i=!0;if(e&&"object"==typeof e){if(n.includes(e))return i;n.push(e)}return Pe(r,n=>{if(!dt(e[n],t[n]))return i=!1,!1}),i}if(e&&t&&"function"==typeof e&&"function"==typeof t){let n=ft(e),r=ft(t),o=n.hash===r.hash;return o&&n.isBinary&&(o=!1),o}return!1}function ht(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!et(e)&&!et(t)&&-1!==Xe(e).toLowerCase().indexOf(Xe(t).toLowerCase());case"doesnotcontain":case"donotcontain":return!(!tt(e)&&!tt(t))||-1===Xe(e.toLowerCase()).indexOf(Xe(t.toLowerCase()));case"starts":case"start":return!tt(e)&&!tt(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!tt(e)&&!tt(t)&&0===Xe(e).toLowerCase().indexOf(Xe(t).toLowerCase());case"endswith":case"endsi":case"endi":case"iends":case"iend":return!tt(e)&&!tt(t)&&e.lastIndexOf(t)===e.length-t.length;case"like":return!tt(e)&&!tt(t)&&Xe(e).toLowerCase()===Xe(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(He(e,t))return dt(e,t);default:return e==t}}function mt(e,t){if(!t.conditions||!t.logic||!Be(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 Pe(t.conditions,r=>{let o;if(r.conditions&&Be(r.conditions))o=mt(e,r);else if(o=ht(Je(e,r.field),r.value,r.operator),o){let t=r.field.split("."),n=t.pop();t.length&&Pe(t,t=>e=e[t]),void 0===Je(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 bt(e,t="="){if(!He(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!Be(e.conditions)){let n=[];Ie(e,(e,r)=>{He(e)&&"object"==typeof e.conditions?n.push(bt(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function pt(e,t,n=null,r="=",o=0,i=!1){if(!je(e))throw new Error(bbn._("The first argument for a search should be iterable")+" "+typeof e+" "+bbn._("given"));if(!e.length)return-1;let s,a,u=!1;if(t)if("string"==typeof t)s={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,a=t;else if(He(t))if("field"in t&&"value"in t)s={conditions:[t],logic:"AND"};else if("conditions"in t)s=t;else{const e=[];for(let n in t)e.push({field:n,value:t[n],operator:"="});s={conditions:e,logic:"AND"}}else Be(t)&&(s={conditions:t,logic:"AND"});else u=!0,a=e=>mt({value:e},bt({logic:"AND",conditions:[{field:"value",operator:r||"=",value:n}]}));if(u||s){if("number"!=typeof o&&(o=i?e.length-1:0),!a){const e=bt(s);a=t=>mt(t,e)}if(i)for(let t=o;t>=0;t--){if(bbn.env._enumerated.push(!0),a(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),a(e[t]))return bbn.env._enumerated.pop(),e[t],t;bbn.env._enumerated.pop()}}return-1}function gt(e,t,n=null,r="=",o=0,i=!1,s=!1){let a=pt(e,t,n,r,o,i);return a>-1?e[a]:t&&["object","function"].includes(typeof t)&&5 in arguments?i:s}function yt(e,t=null,n=!1){let r=pt(bbn.env.loaders,{key:e});if(r>-1){let o=bbn.env.loaders.splice(r,1)[0],i=gt(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):He(t)&&(i.success=!0)),!0}return!1}function wt(e){let t=pt(bbn.env.loaders,{key:e});return t>-1?bbn.env.loaders[t]:null}function vt(e,t,n=null,r="=",o=0){if(!Be(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 s=[],a="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(!a)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)=>mt(e,i);for(let t=0;t<e.length&&(bbn.env._enumerated.push(!0),!(u(e[t],t)&&(bbn.env._enumerated.pop(),s.push(e[t]),bbn.env._enumerated.push(!0),o&&s.length>=o)));t++)bbn.env._enumerated.pop();return s}function _t(e){if(Qe(e)){bbn.var.colors||(bbn.var.colors={});let t=document.createElement("style");document.head.appendChild(t);let n=t.sheet,r=0;Ie(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 St(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&&Ie(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?St(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):St(e,t,i)})}}function Mt(e,t){let n=0;Pe(t,t=>{t.style[e]="auto"}),Pe(t,(t,r)=>{let o=t.getBoundingClientRect(),i=o[e]%1?o[e]-o[e]%1+1:o[e];i>n&&(n=i)}),Pe(t,(t,r)=>{n&&(t.style[e]=n+"px")})}function xt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Dt(e,t,n,r=""){return n.toString().replace(He(e)?e:new RegExp(xt(e),"g"+r),t)}function Ot(e,t,n){let r={};return t&&Ie(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+ct((n||"json")+JSON.stringify(r))}function $t(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=Dt("//","/",e)),t||(t="json");let s=Ot(e,n,t),a=wt(s);if(null==a?void 0:a.loader)return a.loader;bbn.env.token&&Ue(n||{},{_bbn_token:bbn.env.token});const u=new AbortController;let l={responseType:t,signal:u.signal};"text"===t?l.headers={accept:"text/javascript","Content-Type":"text/javascript"}:"json"===t?l.headers={accept:"application/json","Content-Type":"application/json"}:"html"===t&&(l.headers={accept:"text/html","Content-Type":"text/html"});let c="get";He(n)&&Qe(n)>0&&(l.data=n,c="post");let f=Te.run(c,e,l).then(t=>{if(yt(s,t),bbn.fn.defaultEndLoadingFunction(e,d,n,t),200===t.status)Ye(r)&&r(t.data,t.headers);else{let e=1;Ye(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t)}return t}).catch(t=>{let r=Te.isCancel(t);if(yt(s,t.message||t.response.data,r),bbn.fn.defaultEndLoadingFunction(e,d,n,t),r){let n=1;Ye(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;Ye(o)&&(e=o(f,t.message,t)),e&&bbn.fn.defaultAjaxErrorFunction(f,t.message,t.response)}return t.response}),d=Ze(s,f,u);return bbn.fn.defaultStartLoadingFunction(e,d,n,s),f}}const kt=new TextDecoder;function Et(e){return kt.decode(e)}function Tt(e,t){if(e&&Ce(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&Ne(n,-r)===t)return Ne(n,0,n.length-r)}return""}function At(...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 jt,Ct,Lt,Yt,Ft,Nt,Rt,It=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},Pt=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 Ht=[{name:"mariadb-datetime",re:/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:+e[6]})},{name:"mariadb-datetime-no-sec",re:/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:0})},{name:"mariadb-date",re:/^(\d{4})-(\d{2})-(\d{2})$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:0,minutes:0,seconds:0})},{name:"iso-datetime",re:/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?(?:Z|[+\-]\d{2}:?\d{2})?$/,map:e=>({year:+e[1],month:+e[2],day:+e[3],hours:+e[4],minutes:+e[5],seconds:void 0!==e[6]?+e[6]:0})},{name:"slash-date",re:/^(\d{2})\/(\d{2})\/(\d{4})$/,map:e=>({year:+e[3],month:+e[2],day:+e[1],hours:0,minutes:0,seconds:0})},{name:"slash-datetime",re:/^(\d{2})\/(\d{2})\/(\d{4})[ T](\d{2}):(\d{2}):(\d{2})$/,map:e=>({year:+e[3],month:+e[2],day:+e[1],hours:+e[4],minutes:+e[5],seconds:+e[6]})}],Bt=[["y","year",31536e6],["m","month",2592e6],["w","week",6048e5],["d","day",864e5],["h","hour",36e5],["i","minute",6e4],["s","second",1e3]],Ut={y:"Year",m:"Month",d:"Date",w:"Week",h:"Hours",i:"Minutes",s:"Seconds"},Wt={y:"YYYY",m:"MM",d:"DD",e:"EE",w:"WW",h:"HH",i:"II",s:"SS"},zt={years:"y",year:"y",YEARS:"y",YEAR:"y",Years:"y",Year:"y",YYYY:"y",YY:"y",yyyy:"y",yy:"y",Y:"y",y:"y",months:"m",month:"m",Months:"m",Month:"m",MONTHS:"m",MONTH:"m",MMMM:"m",MMM:"m",MM:"m",M:"m",m:"m",weekday:"e",WEEKDAY:"e",ee:"e",EE:"e",e:"e",E:"e",ddd:"e",days:"d",day:"d",Days:"d",Day:"d",DAYS:"d",DAY:"d",DD:"d",D:"d",dd:"d",d:"d",hours:"h",hour:"h",Hours:"h",Hour:"h",HOURS:"h",HOUR:"h",HH:"h",hr:"h",H:"h",hh:"h",h:"h",minutes:"i",minute:"i",Minutes:"i",Minute:"i",MINUTES:"i",MINUTE:"i",II:"i",ii:"i",mn:"i",mm:"i",min:"i",n:"i",i:"i",SS:"s",ss:"s",seconds:"s",second:"s",Seconds:"s",Second:"s",SECONDS:"s",SECOND:"s",sec:"s",s:"s",S:"s",WW:"w",W:"w",w:"w"};class qt{constructor(e,t,n=!1){jt.add(this),Ct.set(this,0),Lt.set(this,"");const r=zt[t]||t;if(!r)throw new Error("Invalid unit for duration: "+t);It(this,Lt,r,"f");const o=bbn.fn.getRow(Bt,e=>e[0]===r);if(!o)throw new Error("Invalid unit for duration: "+r);const i=o[2];It(this,Ct,n?e:e*i,"f")}years(e=!1){return Pt(this,jt,"m",Ft).call(this,"year",e)}months(e=!1){return Pt(this,jt,"m",Ft).call(this,"month",e)}weeks(e=!1){return Pt(this,jt,"m",Ft).call(this,"week",e)}days(e=!1){return Pt(this,jt,"m",Ft).call(this,"day",e)}hours(e=!1){return Pt(this,jt,"m",Ft).call(this,"hour",e)}minutes(e=!1){return Pt(this,jt,"m",Ft).call(this,"minute",e)}seconds(e=!1){return Pt(this,jt,"m",Ft).call(this,"second",e)}asYears(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"year");return Pt(this,Ct,"f")/e}asMonths(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"month");return Pt(this,Ct,"f")/e}asWeeks(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"week");return Pt(this,Ct,"f")/e}asDays(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"day");return Pt(this,Ct,"f")/e}asHours(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"hour");return Pt(this,Ct,"f")/e}asMinutes(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"minute");return Pt(this,Ct,"f")/e}asSeconds(){const[,,e]=Pt(this,jt,"m",Yt).call(this,"second");return Pt(this,Ct,"f")/e}add(e,t){const n=t?zt[t]||t:Pt(this,Lt,"f"),r=bbn.fn.getRow(Bt,e=>e[0]===n);if(!r)throw new Error("Invalid unit for duration: "+(null!=t?t:n));return new qt(Pt(this,Ct,"f")+e*r[2],Pt(this,Lt,"f"),!0)}subtract(e,t){return this.add(-e,t)}toMilliseconds(){return Pt(this,Ct,"f")}}Ct=new WeakMap,Lt=new WeakMap,jt=new WeakSet,Yt=function(e){const t=bbn.fn.getRow(Bt,t=>t[1]===e);if(!t)throw new Error("Unit name not found: "+e);return t},Ft=function(e,t){const n=Bt.findIndex(([,t])=>t===e);if(-1===n)throw new Error("Unit not found: "+e);const r=Bt[n][2];if(!t)return Math.floor(Pt(this,Ct,"f")/r);let o=Pt(this,Ct,"f");for(let e=0;e<n;e++){const[,,t]=Bt[e];o-=Math.floor(o/t)*t}return Math.floor(o/r)};class Vt{constructor(e,t=null){Nt.set(this,void 0),Rt.set(this,!1);let n=typeof e;if(e)if(t)It(this,Nt,new Date,"f");else if(("number"===n||Ae(e)&&""!==e)&&(e<5e3&&Ae(t)?e=Array.from(arguments):e<1e10&&(e*=1e3),Array.isArray(e)||It(this,Nt,new Date(e),"f")),"string"===n){for(const t of Ht){const n=e.match(t.re);if(n){const{year:e,month:r,day:o,hours:i,minutes:s,seconds:a}=t.map(n);It(this,Nt,new Date(e,r-1,o,i,s,a,0),"f")}}if(!Pt(this,Nt,"f"))throw new Error("Invalid date string format: "+e)}else Ge(e)?It(this,Nt,e,"f"):Array.isArray(e)&&It(this,Nt,new Date(...e),"f");else It(this,Nt,new Date,"f");if(void 0===Pt(this,Nt,"f"))return new Proxy(this,{get:(e,t)=>{}})}toString(){return Pt(this,Nt,"f")?this.format():""}year(e){if(0 in arguments){const t=this.copy();return t.setFullYear(e),new Vt(t)}return Pt(this,Nt,"f").getFullYear()}month(e){if(0 in arguments){const t=this.copy();return t.setMonth(e-1),new Vt(t)}return Pt(this,Nt,"f").getMonth()+1}day(e){if(0 in arguments){const t=this.copy();return t.setDate(e),new Vt(t)}return Pt(this,Nt,"f").getDate()}hours(e){if(0 in arguments){const t=this.copy();return t.setHours(e),new Vt(t)}return Pt(this,Nt,"f").getHours()}minutes(e){if(0 in arguments){const t=this.copy();return t.setMinutes(e),new Vt(t)}return Pt(this,Nt,"f").getMinutes()}seconds(e){if(0 in arguments){const t=this.copy();return t.setSeconds(e),new Vt(t)}return Pt(this,Nt,"f").getSeconds()}weekday(e,t=!1){return 0 in arguments?this.setWeekday(e,t):Pt(this,Nt,"f").getDay()}week(){const e=new Date(Date.UTC(this.year(),this.month()-1,this.day())),t=e.getUTCDay()||7;e.setUTCDate(e.getUTCDate()+(4-t));const n=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-n.getTime())/864e5+1)/7)}get tst(){return Math.ceil(Pt(this,Nt,"f").getTime()/1e3)}get mtst(){return Pt(this,Nt,"f").getTime()}get YYYY(){return this.year().toString()}get YY(){return Ne(this.year().toString(),2,2)}get MMMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"long"}).format(Pt(this,Nt,"f"))}get MMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"short"}).format(Pt(this,Nt,"f"))}get MM(){const e=parseInt(this.month().toString());return e<10?"0"+e.toString():e.toString()}get M(){return this.month().toString()}get EE(){return this.weekday().toString()}get DD(){const e=parseInt(this.day().toString());return e<10?"0"+e.toString():e.toString()}get d(){return this.day().toString()}get dddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"long"}).format(Pt(this,Nt,"f"))}get ddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"short"}).format(Pt(this,Nt,"f"))}get D(){return this.day().toString()}get HH(){const e=parseInt(this.hours().toString());return e<10?"0"+e.toString():e.toString()}get H(){return this.hours().toString()}get II(){const e=parseInt(this.minutes().toString());return e<10?"0"+e.toString():e.toString()}get I(){return this.minutes().toString()}get SS(){const e=parseInt(this.seconds().toString());return e<10?"0"+e.toString():e.toString()}get S(){return this.seconds().toString()}get WW(){const e=parseInt(this.year().toString()),t=new Date(e,0,1),n=(Pt(this,Nt,"f").getTime()-t.getTime())/864e5;return String(Math.ceil((n+t.getDay()+1)/7)).padStart(2,"0")}get isValid(){return void 0!==Pt(this,Nt,"f")}inLeapYear(){if(this.isValid){const e=Pt(this,Nt,"f").getFullYear();return e%4==0&&e%100!=0||e%400==0}return!1}daysInMonth(){if(this.isValid)switch(Pt(this,Nt,"f").getMonth()){case 1:return Pt(this,Nt,"f").getFullYear()%4==0?29:28;case 0:case 3:case 5:case 8:case 10:return 30;default:return 31}}valueOf(){return this.mtst}add(e,t="d"){const n=Pt(this,Nt,"f")?new Date(Pt(this,Nt,"f").getTime()):new Date;if(zt[t]){const r=zt[t],o="y"===r?"FullYear":Ut[r],i="get"+o;return n["set"+o](n[i]()+e),new Vt(n)}return null}subtract(e,t){return this.add(-e,t)}dateFromFormat(e,t){return new Date}date(){return this.format("Y-m-d")}datetime(){return this.format("Y-m-d H:i:s")}time(){return this.format("H:i:s")}fdate(e=!1,t=!1,n=!1){if(!Pt(this,Nt,"f"))return"";const r=Object.assign(Object.assign({year:"numeric",month:e?"long":"short",day:"numeric"},n?{weekday:"long"}:{}),t?{hour:"2-digit",minute:"2-digit"}:{});return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],r).format(Pt(this,Nt,"f"))}ftime(e=!1){if(!Pt(this,Nt,"f"))return"";const t={hour:"2-digit",minute:"2-digit"};e&&(t.second="2-digit");return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],t).format(Pt(this,Nt,"f"))}format(e="YYYY-MM-DD HH:II:SS"){let t="";if(e){const n=new RegExp("([|]|"+Object.keys(zt).join("|")+")","g");let r=0;Pe(e.split(n),e=>{if("["!==e)if("]"!==e)if(r>0)t+=e;else if(e in zt)if(e in this&&At(this[e]))t+=this[e];else{t+=this[Wt[zt[e]]]}else t+=e;else r--;else r++})}return t}unix(e=!1){if("number"==typeof e){const t=this.copy();return t.setTime(1e3*e),new Vt(t)}return Pt(this,Nt,"f")?e?Pt(this,Nt,"f").getTime():Math.floor(Pt(this,Nt,"f").getTime()/1e3):0}sql(e=!1){return Pt(this,Nt,"f")?e?this.format("YYYY-MM-DD"):this.format("YYYY-MM-DD HH:II:SS"):""}compare(e,t=""){var n;const r=e instanceof Vt?e:new Vt(e),o=zt[t]||null;if(!o)return this.mtst<r.mtst?-1:this.mtst>r.mtst?1:0;const i=["y","m","d","h","i","s"];for(const e of i){const t=null===(n=bbn.fn.getRow(Bt,t=>t[0]===e))||void 0===n?void 0:n[1],i=this[t](),s=r[t]();if(i<s)return-1;if(i>s)return 1;if(e===o)break}return 0}isBefore(e,t=""){return-1===this.compare(e,t)}isAfter(e,t="day"){return 1===this.compare(e,t)}isSame(e,t="day"){return 0===this.compare(e,t)}isAfterOrSame(e,t=""){return[0,1].includes(this.compare(e,t))}isBeforeOrSame(e,t=""){return[-1,0].includes(this.compare(e,t))}fromNow(e=""){const t=new Date,n=zt[e]||this.guessUnit(this.diff(t)),r=this.diff(t,n),o=new Intl.RelativeTimeFormat([bbn.env.lang,...navigator.languages],{numeric:"auto"}),i=bbn.fn.getRow(Bt,e=>e[0]===n);if(!i)throw new Error("Invalid unit for fromDate: "+e);return o.format(r,i[1])}fromDate(e,t=""){const n=zt[t]||this.guessUnit(this.diff(e)),r=this.diff(e,n);return r>0?Me("%d %s before",r,t):r<0?Me("%d %s after",-r,t):Me("The same %s",t)}guessUnit(e){const t=Math.abs(e);for(const[e,n,r]of Bt)if(t>=r||"second"===n)return e}diff(e,t="",n=!1){const r=e instanceof Vt?e.mtst:new Date(e).getTime();let o=this.mtst-r;if(n&&(o=Math.abs(o)),!t)return o;const i=zt[t],s=bbn.fn.getRow(Bt,e=>e[0]===i);if(!s)throw new Error("Invalid unit for diff: "+t);const[a,u,l]=s;return Math.round(o/l)}calendar(e){return""}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})}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}'`)}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;t?(i=(o-r+7)%7,0===i&&(i=7),i=-i):(i=(r-o+7)%7,0===i&&(i=7));const s=this.copy();return s.setDate(s.getDate()+i),new Vt(s)}copy(){return new Date(Pt(this,Nt,"f").getTime())}clone(){return new Vt(Pt(this,Nt,"f")?new Date(Pt(this,Nt,"f").getTime()):void 0)}startOf(e="d"){const t=zt[e];if(!t)throw new Error("Invalid unit for startOf: "+e);let n;switch(t){case"y":n=new Date(this.year(),0,1,0,0,0,0);break;case"m":n=new Date(this.year(),this.month()-1,1,0,0,0,0);break;case"w":{const e=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),0),t=(e.getDay()+6)%7;n=new Date(e.getFullYear(),e.getMonth(),e.getDate()-t,0,0,0,0);break}case"d":n=new Date(this.year(),this.month()-1,this.day(),0,0,0,0);break;case"h":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),0,0,0);break;case"i":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),0,0);break;case"s":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),0);break;default:throw new Error("Invalid unit for startOf: "+e)}return new Vt(n)}endOf(e="d"){const t=zt[e];if(!t)throw new Error("Invalid unit for endOf: "+e);let n;switch(t){case"y":n=new Date(this.year(),11,31,23,59,59,999);break;case"m":n=new Date(this.year(),this.month(),0,23,59,59,999);break;case"w":{const e=this.startOf("w"),t=new Date(e.year(),e.month()-1,e.day(),23,59,59,999);t.setDate(t.getDate()+6),n=t;break}case"day":n=new Date(this.year(),this.month()-1,this.day(),23,59,59,999);break;case"hour":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),59,59,999);break;case"minute":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),59,999);break;case"second":n=new Date(this.year(),this.month()-1,this.day(),this.hours(),this.minutes(),this.seconds(),999);break;default:n=new Date(this.mtst)}return new Vt(n)}duration(e,t="s"){return new qt(e,t)}}function Zt(e,t=null){return e instanceof Vt?e:new Vt(e,t)}function Jt(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"}),Fe.apply(this,e)}throw new Error(e)}function Xt(e,t=null,n=null,r=null,o=null){let i=!1;if(t){i=!0;let s,a="object"===(typeof t).toLowerCase();if(a&&t.prescript)try{new Function(t.prescript)()}catch(e){Jt(e.message||"")}if(a&&void 0===t.url&&(t.url=e),i=n&&Ye(n)?n(t,o):bbn.fn.defaultLinkFunction(t,o),o&&a&&void 0!==t.content&&("value"in o?o.value=t.content:o.innerHTML=t.content),i&&a&&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)(),Ye(r)&&(r=r(e,n))}catch(e){Fe(e,t),Jt(Ye(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&Ye(r)?r(t):a&&bbn.fn.defaultPostLinkFunction&&bbn.fn.defaultPostLinkFunction(t,o),i&&a&&t.postscript){new Function(t.postscript)(t.postscript)}a&&t.error&&(s=t.errorTitle||bbn.lng.server_response,bbn.fn.defaultErrorFunction(t.error,s))}else bbn.fn.defaultErrorFunction(bbn.lng.errorText,bbn.lng.error);return i}function Gt(e,t,n=!1){let r={error:!1,result:!0};if("string"==typeof t&&(t=[t]),Be(t)||(r.error=bbn._("checkProps must receive a string or an array as props argument")),He(e)||(r.error=bbn._("checkProps must receive an object as obj argument")),!r.error){let o;Pe(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"+Ne(i,0,1).toUpperCase()+Ne(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 Kt(e){return e.replace(/[A-z]{1}/,e=>e.toUpperCase())}function Qt(e,t,n,...r){let o=!1;Be(t)||(t=[t]);const i=[];if(Pe(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"),Ye(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(Ce(t)&&Ye(bbn.fn["is"+Kt(t)])){if(bbn.fn["is"+Kt(t)](e))return o=!0,!1;i.push(t)}else Jt(`The type ${t} is not recognized`)}),!o)throw Fe(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&Fe(r),new Error((n?n+" - ":"")+bbn._("The value should be a %s",i.join(" "+bbn._("or a")+" ")))}function en(e){if(Be(e))return e.slice().map(e=>"object"==typeof e?en(e):e);if(He(e)){return Ue(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}Nt=new WeakMap,Rt=new WeakMap,s.extend(c),s.extend(T);const tn=(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 nn(e,t,n=null,r="="){if(!Be(e))throw bbn.fn.log("NOT ARRAY",e),new Error("Error in filter: The first argument must be an array");let o={};const i=[],s="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(!s)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=bt(o,r),o.conditions&&o.logic)for(let t=0;t<e.length;t++)mt(e[t],o)&&i.push(e[t]);return i}const rn=[];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;rn.push(t)}function on(...e){const t=Object.create(null);return e.length&&Ue(t,...e),t}function sn(e){let t=typeof e;if(void 0===e)return new Date;if("number"===t||Ae(e)&&""!==e)return e<1e10&&(e*=1e3),new Date(e);if("string"===t){if(10===e.length)return new Date(parseInt(Ne(e,0,4)),parseInt(Ne(e,5,2))-1,parseInt(Ne(e,8,2)),12);if(19===e.length)return new Date(parseInt(Ne(e,0,4)),parseInt(Ne(e,5,2))-1,parseInt(Ne(e,8,2)),parseInt(Ne(e,11,2)),parseInt(Ne(e,14,2)),parseInt(Ne(e,17,2)))}else if(Ge(e))return e;return!1}function an(e,t=""){Fe(e)}function un(e,t=null,n=null){Fe(t,n)}function ln(e,t,n=null,r=null){return!0}function cn(...e){if(!e.length)return!1;for(let t of e)if("object"==typeof t&&!tt(t))return!1;return!0}let fn=[];function dn(e){if(Ce(e)&&e){for(;"/"===Ne(e,e.length-1);)e=Ne(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return Ne(e,0,t);if(0===t)return"/"}return""}function hn(...e){if(!e.length)return!1;for(let t of e)if("[object Blob]"!=={}.toString.apply(t))return!1;return!0}function mn(e){if(e&&Ce(e)){let t=e.split(".");if(t[0]&&t.length>1)return t[t.length-1].toLowerCase()}return""}function bn(...e){if(!e.length)return!1;for(let t of e)if(!(t instanceof HTMLCanvasElement))return!1;return!0}function pn(e,t,n=null){if(bn(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=He(t)&&t.type?t.type:"octet/stream";let r=window.document.createElement("a");r.className="bbn-no";let o=null;if(Ce(t))o=new Blob([t],{type:n});else try{o=t}catch(e){Fe(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 gn=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};function yn(){return gn(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 wn=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(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(s,a)}u((r=r.apply(e,t||[])).next())})};function vn(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 _n(e){let t,n,r=e.querySelectorAll("input[name],select[name],textarea[name],button[name]"),o={};return Pe(r,(e,r)=>{if(n=vn(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=Dt("][",".",r),r=Dt("[",".",r),r=Dt("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=Ne(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 Sn(e){return e.filter((e,t,n)=>t===n.indexOf(e))}function Mn(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 xn(e){0!==e.indexOf("--")&&(e="--"+e);let t=getComputedStyle(document.documentElement).getPropertyValue(e);return"string"==typeof t&&(t=t.trim()),t}function Dn(){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 On(){let e,t=window.getSelection();if(t.rangeCount>0){e=t.getRangeAt(0),Fe("RANGE",e);let n=e.cloneContents();Fe("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function $n(e){return Ce(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function kn(e){let t=document.createElement("div");return t.innerHTML=e,e=t.innerText}function En(e){let t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}function Tn(e){let t,n,r={};if(He(e[0])&&1===e.length)return e[0];for(n=0;n<e.length;n++)t=typeof e[n],t=t.toLowerCase(),Ye(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=Ne(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=Ne(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&&Qe(r)&&(r.url=bbn.env.path),void 0===r.obj&&(r.obj={_bbn:"public"}),r.datatype||(r.datatype="json"),r}function An(e,t,n=null,r=!1){bbn.env.old_path=bbn.env.path,bbn.env.url=["https:/","http://"].includes(Ne(e,0,7))?e:bbn.env.root+e,bbn.env.path=Ne(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&&Ue(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?kn(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function jn(...e){let t=Tn(e),n=1;if(!0===t)return!0;if(!t)return jn(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(wt(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?(Ue(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 $t(t.url,t.datatype,t.obj,n=>{n||Fe(e+bbn._("returned no answer")),He(n)&&(0===Object.keys(n).length&&Fe(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)),Xt(t.url,n,t.successFn,null,t.ele)&&void 0===n.noNav&&0!==bbn.env.path.indexOf(t.url)&&An(t.url,(n.title?n.title+" - ":"")+bbn.env.siteTitle)},t.errorFn||null)}}return!0}function Cn(...e){let t=Tn(e);if(t.url)return $t(t.url,t.datatype,t.obj,e=>{Xt(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Ln(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=_n(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),Cn(...t)}}function Yn(){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(xn("mobile-limit"))||650,r="bbn-screen-"+(bbn.env.width<n?"small":"regular"),o=(document.body.className||"").split(" "),i=!1;Pe(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 Fn(){return"mobile"===Dn()}function Nn(){return"tablet"===Dn()}function Rn(){return Fn()||Nn()}function In(e=!1){let t=(new Date).getTime();return e?Math.round(t/1e3):t}function Pn(e){if("string"==typeof e&&e.length>0&&(0===e.indexOf("calc")||Ae(Ne(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 Hn(...e){if(!e.length)return!1;for(let t of e)if(!Ce(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function Bn(...e){if(!e.length)return!1;for(let t of e)if("[object Symbol]"!=={}.toString.apply(t))return!1;return!0}function Un(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"}),Fe.apply(this,t)}function Wn(e,t="",n=null){let r=new FormData,o=(e,t="")=>{(!n||Be(n)&&!n.includes(t))&&(e instanceof File?r.append(t,e):Be(e)?Pe(e,(e,n)=>{o(e,t+"["+n+"]")}):He(e)&&Object.keys(e).length?Ie(e,(n,r)=>{r in e&&o(n,t?t+"["+r+"]":r)}):tt(e)||void 0===e||r.append(t,e))};return o(e,t),r}function zn(e){return"string"==typeof e?document.querySelector(e):e}function qn(e,t,n,r){if("object"==typeof e&&"string"==typeof t){let o=e;const i=t.split(".");Pe(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 Vn(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Zn(e,t=" "){if(" "===t)return e.trim();if(!t)return e;if(t===e)return"";for(;0===e.indexOf(t);)e=Ne(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=Ne(e,0,e.length-t.length);return e}function Jn(e,t,n){return"string"==typeof e.toLowerCase()&&(t||(t=bbn.var.shortenLen),void 0!==n&&Ce(n)||(n="..."),e.length>t&&(e=Ne(e,0,t)+n)),e}var Xn={_addLoader:Ze,_compareValues:Ke,_deleteLoader:yt,abort:function(e){let t=wt(e);(null==t?void 0:t.aborter)&&t.aborter.abort("Operation canceled by the user.")},abortURL:function(e){Pe(vt(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:_t,addInputs:St,addStyle:function(e,t){He(t)&&Ie(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),Mt("height",e)},adjustSize:Mt,adjustWidth:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),Mt("width",e)},ajax:$t,analyzeFunction:ft,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:Et,arrayFromProp:function(e,t){let n=[];return Pe(e,(e,r)=>{n.push(Je(e,t))}),n},autoExtend:function(e,t){bbn[e]||(bbn[e]={}),Ue(bbn[e],t)},baseName:Tt,br2nl:function(e){return Dt("<br />","\n",Dt("<br/>","\n",Dt("<br>","\n",e)))},calendar:function(e,t=!1){let n=Zt(e);return n.isValid?n.fdate():t&&Ce(t)?t:""},callback:Xt,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 Gt(e,t,n).result},checkPropsDetails:Gt,checkPropsOrDie:function(e,t,n=!1){let r=Gt(e,t,n);if(r.error)throw new Error(r.error);return!0},checkType:Qt,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=it(n)?n.bbnId?"__BBN_DOM__"+n.tagName+"/"+n.bbnId+n.bbnHash:"__BBN_DOM__"+n.tagName+"/"+n.className:at(n)?"__BBN_CP__"+n.$options.name+"/"+n.$cid:n.constructor.toString())}return n}},clone:en,colorToHex:function(e){let t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle},compare:ht,compareConditions:mt,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||tn(e,e.type.toString())):He(e)&&Ye(e.toBlob)?e.toBlob(r=>{const o=new ClipboardItem({[r.type.toString()]:r});navigator.clipboard.write([o]).then(()=>{t||tn(e,r.type.toString()),n(!0)})}):(navigator.clipboard.writeText(e),t||tn(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||tn(e),n(!0)}n(!1)})},correctCase:Kt,count:function(e,t,n=null,r="="){return nn(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^rn[255&(t^r)]}return(-1^t)>>>0},createObject:on,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)"+xt(e)+"(\\{|\\s)","g").test(n[t].selectorText))return!0}return!1},data2Html:function e(t,n=""){const r=!Be(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]&&(Be(t[i])||He(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:sn,dateSQL:function(e,t){let n=Zt(e);if(n)return n.format("YYYY-MM-DD"+(t?"":" HH:mm:ss"))},deepPath:function e(t,n,r,o=[]){let i;return(i=pt(t,n,0))>-1?(o.push(i),o):(Pe(t,(t,i)=>{if(Be(t[r])){let s=o.slice();s.push(i);let a=e(t[r],n,r,s);if(!1!==a)return a}}),!1)},defaultAjaxAbortFunction:an,defaultAjaxErrorFunction:un,defaultAlertFunction:function(e,t=null){alert(e)},defaultConfirmFunction:function(e,t,n=null){let r=0;confirm(e)&&Ye(t)&&(t(),r=1),!r&&Ye(n)&&n()},defaultEndLoadingFunction:ln,defaultErrorFunction:function(e){Fe(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 Fe("defaultPreLinkFunction",e,t,n),!0},defaultResizeFunction:function(){return!0},defaultStartLoadingFunction:function(e,t,n,r){return!0},deleteProp:function(e,t){Qt(e,"object",bbn._("The obj must be an object in setProp")),Qt(t,"string",bbn._("The prop must be a string in setProp")),delete e[t]},diffObj:function e(t,n,r=!1,o=!1){o||(fn=[]);let i="unchanged";void 0===o&&(o=!1);let s=on();if(!Ye(t)&&!Ye(n)){if(cn(t)||cn(n)){let e=(a=t)===(u=n)||Ge(a)&&Ge(u)&&a.getTime()===u.getTime()?i:void 0===a?"created":void 0===u?"deleted":"updated";if(r||e!==i){let r=on();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(it(t)||it(n))return!1;if(fn.includes(t)||fn.includes(n))return!1;fn.push(t,n);for(let o in t){if(Ye(t[o]))continue;let i;void 0!==n[o]&&(i=n[o]);let a=e(t[o],i,r,!0);a&&(s[o]=a)}for(let o in n){if(Ye(n[o])||void 0!==t[o])continue;let i=e(void 0,n[o],r,!0);i&&(s[o]=i)}}var a,u;return!(o&&!r&&!Qe(s))&&s},dirName:dn,download:function(e,t="",n=null){return t&&"object"==typeof t&&(n=t,t=""),$t(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)?Ne(r[n],o.length+1,r[n].length-o.length-2):Tt(e)}if(hn(n)){let e=mn(t),r=["php","html"];if("string"==typeof t&&("type"in n&&"text/html"!==n.type||r.includes(e)))return void pn(t,n)}},e=>{bbn.fn.defaultAjaxErrorFunction(e)})},downloadContent:pn,each:Pe,eraseCookie:function(e){document.cookie=e+"=; Max-Age=-99999999;"},error:Jt,escapeDquotes:function(e){return Ce(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:xt,escapeSquotes:function(e){return Ce(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Ce(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)),Pe(dn(e).split("/"),e=>{n+=encodeURIComponent(e)+"/"});let r=Tt(e),o="?",i="";if(r.indexOf(o)){let e=r.split("?");o="&",i="?"+e[1],r=e[0]}return t&&Ce(t)?(t.match("^(\\&|\\?)")&&(t=t.substring(1)),t=o+t):t="",n+encodeURIComponent(r)+i+t},executeSlowly:function(e,t){return wn(this,void 0,void 0,function*(){for(let n=0;n<e.length;n++){yield yn();let r=t(e[n],n);if(r instanceof Promise&&(r=yield r),!1===r)return!1}return!0})},extend:Ue,extendOut:function e(...t){let n=null;for(let r of t){if(!He(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)He(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=Zt(e),r=!1;return!0===t&&(r=!0),n.isValid?n.fdate(!0,r):t&&Ce(t)?t:""},fdatetime:function(e,t=!1){let n=Zt(e);return n.isValid?n.fdate(!1,!0):t&&Ce(t)?t:""},fieldValue:vn,fileExt:mn,filter:nn,filterToConditions:bt,findAll:function e(t,n,r,o=[]){let i,s=0;for(;(i=pt(t,n,s))>-1;)o.push(t[i]),s=i+1;return Pe(t,t=>{Be(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(Be(e)){let o=e.length-1;Ae(n)&&0<n&&n<=o||(n=o),(!Ae(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(Be(e)){let o=e.length-1;Ae(n)&&0<n&&n<=o||(n=o),(!Ae(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 Qt(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=Zt(e);return n.isValid?n.format(t):""},formatSize:function(e,t){return Ae(e)?e+"px":Ce(e)?e:!t&&"auto"},formdata:_n,fphone:function(e){var t;if(Ae(e)&&(e=e.toString()),Ce(e)){const n=(null===(t=bbn.var)||void 0===t?void 0:t.phoneCodes)||[];let r="",o="",i="";if(n.length&&Pe(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=Zt(e);return n.isValid?n.ftime():t&&Ce(t)?t:""},getAllTags:function(){return Sn(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:Mn,getAttributes:function(e){e.getAttributeNames||Jt("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:xn,getDay:function(e){let t=sn(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:Dn,getEventData:function(e){let t=e.dataTransfer||e.clipboardData,n=t.getData("Text"),r={raw:n,files:[],str:[]};return new Promise((o,i)=>{let s=!(t instanceof DataTransfer);if(!n&&"copy"===e.type){let e=window.getSelection();r.raw=e.toString();let t=On();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>"}),s=!0,o(r)}if(!s){let e=[],n=t.items.length;Pe(t.items,(i,a)=>{let u=i.kind,l=i.type;if("file"===u){let u=t.files[a];if(!l&&u.name){let e=u.name.split(".");l=e[e.length-1]}let c=u?u.name:bbn._("untitled"),f=u?u.size:null,d=u?u.lastModified:null,h=i.getAsFile();h?(s=!0,n--,r.files.push({type:l,data:h,name:c,size:f,mdate:d}),e.push(c),n||(r.raw||(r.raw=e.join(", ")),o(r))):bbn.fn.defaultErrorFunction(bbn._("Impossible to read the file")+" "+c)}else s=!0,i.getAsString(t=>{n--,r.str.push({type:l,data:t}),"text/plain"===l&&e.push(name),n||(r.raw||(r.raw=e.join(", ")),o(r))})})}s||setTimeout(()=>{o(r)})})},getField:function(e,t,n="",r=null,o="=",i=0,s=!1,a=void 0){let u;return n&&["object","function"].includes(typeof n)&&6 in arguments&&(a=s),t?(u=gt(e,n,r,o,i,s,void 0),void 0===u?a:u[t]):a},getFieldValues:function(e,t,n,r,o){Qt(t,"string"),n&&(e=vt(e,n,r,o));let i=[];return Pe(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=$n(n)),n.trim()},getHTMLOfSelection:On,getLoader:wt,getPath:st,getProp:function(e,t){return Qt(e,"object",bbn._("The obj must be an object in setProp")),Qt(t,"string",bbn._("The prop must be a string in setProp")),e[t]},getProperty:Je,getRequestId:Ot,getRow:gt,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=>{const t=e.length,n=[],r=Array(t).fill(-1);for(let o=0;o<t;o++){let t=e[o],i=0,s=n.length;for(;i<s;){const r=i+s>>1;e[n[r]]<t?i=r+1:s=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()})(e.map(e=>o.get(e))),s=new Set(i.map(t=>e[t])),a=Array(t.length).fill(-1);for(let e=t.length-2;e>=0;e--)a[e]=a[e+1],s.has(t[e+1])&&(a[e]=e+1);const u=e.slice(),l=new Map(u.map((e,t)=>[e,t])),c=[];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=a[e],i=-1!==o?l.get(t[o]):u.length;if(void 0===i)throw new Error("Inconsistent state");const f=r<i?i-1:i;if(r!==f){const[e]=u.splice(r,1);u.splice(f,0,e),c.push({from:r,to:f,value:n}),l.clear();for(let e=0;e<u.length;e++)l.set(u[e],e)}}return c},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;"}),Fe.apply(this,e),this},hash:lt,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:kn,imageToCanvas:En,imgToBase64:function(e,t="image/png"){return En(e).toDataURL(t)},info:function(...e){return e.unshift({_bbn_console_level:4,_bbn_console_style:"color: #EEE; background: blue; font-size: 12px;"}),Fe.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&&"/"!==Ne(bbn.env.root,-1)&&(bbn.env.root+="/"),bbn.env.isInit||"undefined"==typeof dayjs||Pe(["advancedFormat","arraySupport","badMutable","buddhistEra","calendar","customParseFormat","dayOfYear","devHelper","duration","isBetween","isLeapYear","isSameOrAfter","isSameOrBefore","isToday","isTomorrow","isYesterday","isoWeek","isoWeeksInYear","localeData","localizedFormat","minMax","objectSupport","pluralGetSet","quarterOfYear","relativeTime","timezone","toArray","toObject","updateLocale","utc","weekOfYear","weekYear","weekday"],e=>{window["dayjs_plugin_"+e]&&dayjs.extend(window["dayjs_plugin_"+e])}),"object"==typeof e&&Ue(!0,bbn,e),bbn.env.path=Ne(bbn.env.url,bbn.env.root.length),n=bbn.env.path.split("/"),Pe(n,(e,t)=>{""!==(e=decodeURI(e.trim()))&&bbn.env.params.push(e)}),bbn.var.colors&&_t(bbn.var.colors),bbn.env.lang&&void 0!==dayjs&&import("dayjs/locale/"+bbn.env.lang+".js").then(()=>{dayjs.locale(bbn.env.lang)}),document.addEventListener("visibilitychange",()=>{document.hidden&&bbn.env.isFocused?bbn.env.isFocused=!1:document.hidden||bbn.env.isFocused||(bbn.env.isFocused=!0)}),document.addEventListener("focusin",e=>{e.target instanceof HTMLElement&&!e.target.classList.contains("bbn-no")&&(bbn.env.focused=e.target),bbn.env.last_focus=In()}),document.addEventListener("click",e=>{if(bbn.env.last_focus=In(),"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(),jn(t.getAttribute("href")),!1):void 0}),Pe(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"),e=>{e.addEventListener("submit",t=>{Ln(e,t)})}),window.addEventListener("hashchange",()=>{bbn.env.hashChanged=(new Date).getTime()},!1),window.addEventListener("resize",()=>{Yn()}),window.addEventListener("orientationchange",()=>{Yn()}),Yn(),Rn()&&(document.body.classList.add("bbn-mobile"),Nn()&&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?jn(e.url,Ue({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&Ye(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&&Fe("Logging in bbn is enabled"))},isActiveInterface:function(e=600){return!!bbn.env.last_focus&&(new Date).getTime()-bbn.env.last_focus<1e3*e},isArray:Be,isBlob:hn,isBoolean:function(...e){if(!e.length)return!1;for(let t of e)if(![!0,!1].includes(t))return!1;return!0},isCanvas:bn,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(!Ce(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:at,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:Ge,isDesktopDevice:function(){return"desktop"===Dn()},isDimension:function(...e){if(!e.length)return!1;for(let t of e){if("number"!=typeof t||t<0)return!1;if(!Pn(t))return!1}return!0},isDom:it,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(!Ce(n))return!1;if(!t.test(n))return!1}return!0},isEmpty:et,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:Ye,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(!Ce(t))return!1;if(!Hn(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=Mn(e);if(n.length){if(Ce(t)){let e=!1;return Pe(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:Le,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:Hn,isIterable:je,isMobile:Rn,isMobileDevice:Fn,isNotObject:cn,isNull:tt,isNumber:Ae,isObject:He,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:At,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 Pe(["width","height","gap","margin","padding","top","left","right","bottom"],n=>{if(-1!==e.indexOf(n))return t=!0,!1}),t},isSame:dt,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:Ce,isSymbol:Bn,isTabletDevice:Nn,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:Pn,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Ce(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:Ie,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,s=(255&r)+t;return o>255?o=255:o<0&&(o=0),i>255?i=255:i<0&&(i=0),s>255?s=255:s<0&&(s=0),(n?"#":"")+(s|i<<8|o<<16).toString(16)}},link:jn,log:Fe,makeReactive:function e(t,n,r,o){const i=(null==r?void 0:r.$cid)||"",s="__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&&Fe(["MAKING bbn-loadbar",t]),t.__bbnWatchers||Reflect.defineProperty(t,"__bbnWatchers",{value:on(),writable:!0,configurable:!0,enumerable:!1});return new Proxy(t,{get(a,u){const l=Reflect.get(a,u),c=a.__bbnRoot||a;if(Bn(u))return Reflect.get(c,u);const f=o?o+"."+u:u,d=s+(Ae(u)?u.toString():u);if(["fill","pop","push","reverse","shift","sort","splice","unshift"].includes(u)&&Be(a))return function(...e){let t=c[u](...e);return Un("DOING ARRAY STUFF"),Fe(a.__bbnParent),n(a,"length",r),t};if(Ye(l))return l;if("__bbnRoot"===u){let e=t;for(;e&&(null==e?void 0:e.__bbnTarget);)e=e.__bbnTarget;return e}return"__bbnIsProxy"===u||("__bbnTarget"===u?a:"__bbnParent"===u?r:"__bbnWatchers"===u?a.__bbnWatchers:0===u.indexOf("__bbn_")?Reflect.get(a,u):"length"===u&&Be(a.__bbnRoot||a)?c.length:u in a&&l&&"object"==typeof l&&[void 0,Object,Array].includes(l.constructor)?(l.__bbnIsProxy&&l.__bbnParent===r||(d in c||Reflect.defineProperty(c,d,{value:e(l,n,r,f),writable:!0,configurable:!0,enumerable:!1}),c[d].__bbnIsProxy&&!c.__bbnWatchers[i]&&(c.__bbnWatchers[i]=f)),c[d]):l)},set(t,a,u){if(Bn(a))return Reflect.get(t,a,u);const l=t.__bbnRoot||t,c=o?o+"."+a:a;if(Bn(a))return Reflect.get(t,a);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&Fe(["Setting proxy prop in "+r.$options.name,t,a,u]),!dt(l[a],u)){if(0===a.indexOf("__bbn_"))Reflect.defineProperty(l,a,{value:e(u,n,r,c),writable:!0,configurable:!0,enumerable:!1});else if(u&&"object"==typeof u&&[void 0,Object,Array].includes(u.constructor)){const t=s+(Ae(a)?a.toString():a);Reflect.defineProperty(l,t,{value:e(u,n,r,c),writable:!0,configurable:!0,enumerable:!1}),l[t].__bbnIsProxy&&!l.__bbnWatchers[i]&&(l.__bbnWatchers[i]=c)}r&&r.$options&&"bbn-loadbar"===r.$options.name&&Fe(["Setting proxy prop in "+r.$options.name+" "+(Ae(a)?a.toString():a),u,t]),Reflect.set(l,a,u),n(t,a,r)}return!0},defineProperty(t,i,a){const u=t,l=o?o+"."+i:i;if("__bbnWatchers"===i||Bn(i)||0===i.indexOf("__bbn_"))Reflect.defineProperty(u,i,a);else{const t=s+(Ae(i)?i.toString():i);Reflect.defineProperty(u,t,{value:e(a.value,n,r,l),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=s+(Ae(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]&&Be(t[r])&&(t[r]=e(t[r],n,r,o+1)),t))},md5:ct,microtimestamp:function(){return window.performance.now()+performance.timeOrigin},money:function(e,t,n,r,o,i,s){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:" "),s||(s=void 0===s&&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),Ae(s)||(s=t?3:0),0===e&&"number"==typeof s&&s>0){let r=e.toFixed(s).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 a=e.toFixed(s),u=0,l=1e4;return a&&(l=a.indexOf("."),l<=0?l=1e4:u=a.length-l),a.replace(/./g,function(e,t,n){return"."===e?o:t&&(n.length-t-u)%3==0&&t<l?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=Ke(e,t,o.field,o.dir),0!==r)return r;return 0})},mutateArray:function(e,t,n=null){if(!Be(e,t))throw new TypeError("mutateArray can only be called with arrays");n?Qt(n,"function","The hash function must be a function"):n=lt;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||!dt(e[t],o[t])){const n=pt(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(!He(e,t))throw new TypeError("mutateObject can only be called with arrays");n?Qt(n,"function","The hash function must be a function"):n=lt;const r=Object.keys(t);for(let t in e)r.includes(t)||delete e[t];return r.forEach(n=>{dt(e[n],t[n])||(e[n]=t[n])}),e},nl2br:function(e,t){return Dt("\n","<br>"+(t?"\n":""),e)},numProperties:Qe,objectToFormData:Wn,order:function(e,t,n="asc"){return e?e.sort(function(e,r){return Ke(e,r,t,n)}):e},outerHeight:function(e){if((e=zn(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=zn(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:Cn,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"),qn(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=on(t)).bbn||(t.bbn="public"),St(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=Dt("'","'",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=Dt('"',""",e)),e},randomInt:Vn,randomString:function(e,t,n){let r,o,i={n:"0123456789",l:"abcdefghijklmnopqrstuvwxyz",u:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};n||(n="nlu"),e||(r=Vn(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=Vn(e,t):e&&(r=e);let s="";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)],s+=i[o][Math.floor(Math.random()*i[o].length)];return s},removeAccents:Xe,removeEmpty:function(e){var t=[];if(Be(e))for(let n=0;n<e.length;n++){let r=!1;e[n]&&(Be(e[n])?e[n].length&&(r=!0):He(e[n])?Qe(e[n])&&(r=!0):r=!0),r&&t.push(e[n])}return t},removeExtraSpaces:function(e){return e.replace(/\s+/g," ").trim()},removeHtmlComments:$n,removePrivateProp:Re,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;Ne(e,-t.length)===t;)e=Ne(e,0,e.length-t.length);for(;Ne(e,0,t.length)===t;)e=Ne(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:Dt,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,s=o.lastChild;r.insertNode(o),n.removeAllRanges(),t?(i&&(r.setStartBefore(i),r.setEndAfter(s)),n.addRange(r)):(r.setStartAfter(s),n.addRange(r))}},resize:Yn,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 Ie(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 Zn(Xe(e).replace(/[^a-z0-9]/gi,t).replace(o,t),t)},search:pt,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:zn,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:An,setProp:function(e,t,n,r=!0,o=!0){Object.defineProperty(e,t,{value:n,writable:r,configurable:o})},setProperty:qn,shorten:Jn,shortenObj:function e(t,n=100){let r=en(t);return Pe(r,(t,o)=>{Ce(t)&&t.length>n?r[o]=Jn(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:ot,simpleHash1:nt,simpleHash2:rt,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 s=Ot(e,n,"json"),a=wt(s);if(null==a?void 0:a.loader)return a.loader;n||(n={}),bbn.env.token&&(n._bbn_token=bbn.env.token);const u=new AbortController;let l="";const c=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=Ye(t);r.read().then(function e({done:a,value:u}){if(a)return yt(s,n),l&&c(l),void(i&&i());if(o)if(l+=Et(u).trim(),bbn.fn.log(["STREAM RESULT",l.length,l]),l)try{c(l),l=""}catch(e){}else t();else bbn.fn.log(["STREAM SUCCESS IS FN? "+o]);return r.read().then(e)})}}).catch(t=>{let i=!(!(a=t)||!0!==a.__BBN_CANCEL__);var a;if(yt(s,n,i),i){let n=1;Ye(o)&&(n=o(t.message,e)),n&&an(t.message,e)}else{let e=1;Ye(r)&&(e=r(t.request,t)),e&&un(t.request,t.response?t.response.data:"",t.response?t.response.status:t)}});return Ze(s,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:Ln,substr:Ne,sum:function(e,t,n,r,o){let i=0;return Pe(nn(e,n,r,o),e=>{let n="function"==typeof t?t(e):e[t];n&&(i+=parseFloat(n)||0)}),i},timestamp:In,toCSV:function(e,t=",",n="",r='"'){t||(t=","),r||(r='"');let o="",i=e.length;return Pe(e,(e,s)=>{let a=Be(e)?e.length:Object.values(e).length,u=0;Pe(e,e=>{o+="string"==typeof e?r+Dt(r,"\\"+r,e)+r:0===e?"0":e&&e.toString?e.toString():r+r,u++,u<a&&(o+=t)}),s<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(){Yn()},0)},translate:function(e,t){let n=t?bbn.lng[0===t.indexOf("_")?t:"_"+t]:bbn.lng;Ie(e,(e,t)=>{n[t]=e})},treatAjaxArguments:Tn,treatForHash:ut,trim:Zn,uniqString:function(...e){for(var t="",n=0;n<e.length;n++)if(e[n])if("object"==typeof e[n])if(Be(e[n]))t+=JSON.stringify(e[n]);else{let r={};Pe(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 ct(t)},unique:Sn,upload:function(e,t,n=null,r=null,o=null){const i=()=>Te.run("post",e||bbn.env.path,{data:Wn({file:t}),headers:{"Content-Type":"multipart/form-data"},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&&(Fe("SUCCESS",e),n(e))}).catch(e=>{r&&(Fe("ERROR",e),r(e))}):i()},warning:Un,yieldToBrowser:yn};s.extend(c),s.extend(m),s.extend(y),s.extend(S),s.extend(O),s.extend(T),s.extend(Y),s.extend(I),s.extend(U),s.extend(V),s.extend(Q),s.extend(re),s.extend(ae),s.extend(fe),s.extend(be),s.extend(we),s.extend(Se);const Gn={version:"1.0.1",opt:{_cat:{}},app:{},_:Me,$: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:xe,date:Zt,com:Te,env:De,db:Ve,fn:Xn,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"}]};return"undefined"!=typeof window&&(window.dayjs=s,window.bbn=Gn),e.bbn=Gn,e.dayjs=s,e.default=Gn,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
2
2
|
//# sourceMappingURL=bbn.js.map
|