@bbn/bbn 2.0.5 → 2.0.7
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.js +5 -1
- package/package.json +1 -1
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+)?$/,p=/\[([^\]]+)]|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,b={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]=b;var _="$isDayjsObject",x=function(e){return e instanceof D||!(!e||!e[_])},S=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},M=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new D(n)},k=y;k.l=S,k.i=x,k.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function b(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var g=b.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(k.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 k},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=M(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return M(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<M(e)},g.$g=function(e,t,n){return k.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=!!k.u(t)||t,c=k.p(e),h=function(e,t){var o=k.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 k.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,b=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,b):h(0,b+1);case u:var w=this.$locale().weekStart||0,v=(p<w?p+7:p)-w;return h(r?g-v:g+(6-v),b);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=k.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 p=this.clone().set(d,1);p.$d[h](m),p.init(),this.$d=p.set(d,Math.min(this.$D,p.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[k.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var m=k.p(c),p=function(e){var t=M(h);return k.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 p(1);if(m===u)return p(7);var b=(d={},d[i]=t,d[s]=n,d[o]=e,d)[m]||1,g=this.$d.getTime()+r*b;return k.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=k.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 k.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(p,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return a+1;case"MM":return k.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 k.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 k.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 k.s(s,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.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,p=this,b=k.p(d),g=M(r),y=(g.utcOffset()-this.utcOffset())*t,w=this-g,v=function(){return k.m(p,g)};switch(b){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:k.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=S(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return k.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()},b}(),O=D.prototype;return M.prototype=O,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",l],["$y",f],["$D",d]].forEach(function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,D,M),e.$i=!0),M},M.locale=S,M.isDayjs=x,M.unix=function(e){return M(1e3*e)},M.en=v[w],M.Ls=v,M.p={},M}()),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,p=new Date,b=a||(i||s?1:p.getDate()),g=i||p.getFullYear(),y=0;i&&!s||(y=s>0?s-1:p.getMonth());var w,v=u||0,_=l||0,x=c||0,S=f||0;return d?new Date(Date.UTC(g,y,b,v,_,x,S+60*d.offset*1e3)):n?new Date(Date.UTC(g,y,b,v,_,x,S)):(w=new Date(g,y,b,v,_,x,S),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 p=n.apply(this,i);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}m===d&&(this.$d=new Date(""))}else o.call(this,e)}}}()),f.exports),m=t(h),p={exports:{}};var b,g=(d||(d=1,p.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")}}),p.exports),y=t(g),w={exports:{}};var v,_=(b||(b=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},p=function(e){return m(e)?Math.ceil(e):Math.floor(e)},b=function(e){return Math.abs(e)},g=function(e,t){return e?m(e)?{negative:!0,format:""+b(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 b=m.prototype;return b.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*c[n]},0)},b.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=p(e/a),e%=a,this.$d.months=p(e/u),e%=u,this.$d.days=p(e/i),e%=i,this.$d.hours=p(e/o),e%=o,this.$d.minutes=p(e/r),e%=r,this.$d.seconds=p(e/n),e%=n,this.$d.milliseconds=e},b.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},b.toJSON=function(){return this.toISOString()},b.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])})},b.as=function(e){return this.$ms/c[h(e)]},b.get=function(e){var t=this.$ms,n=h(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?p(t/c[n]):this.$d[n],t||0},b.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)},b.subtract=function(e,t){return this.add(e,t,!0)},b.locale=function(e){var t=this.clone();return t.$l=e,t},b.clone=function(){return d(this.$ms,this)},b.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},b.valueOf=function(){return this.asMilliseconds()},b.milliseconds=function(){return this.get("milliseconds")},b.asMilliseconds=function(){return this.as("milliseconds")},b.seconds=function(){return this.get("seconds")},b.asSeconds=function(){return this.as("seconds")},b.minutes=function(){return this.get("minutes")},b.asMinutes=function(){return this.as("minutes")},b.hours=function(){return this.get("hours")},b.asHours=function(){return this.as("hours")},b.days=function(){return this.get("days")},b.asDays=function(){return this.as("days")},b.weeks=function(){return this.get("weeks")},b.asWeeks=function(){return this.as("weeks")},b.months=function(){return this.get("months")},b.asMonths=function(){return this.as("months")},b.years=function(){return this.get("years")},b.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),x=t(_),S={exports:{}};var M,k=(v||(v=1,S.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))}}),S.exports),D=t(k),O={exports:{}};var E,$=(M||(M=1,O.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}),O.exports),T=t($),A={exports:{}};var j,L,I=(E||(E=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),C=t(I),Y={exports:{}};var F,N=(L||(L=1,Y.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)}}),Y.exports),R=t(N),P={exports:{}};var H,B=(F||(F=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),W=t(B),U={exports:{}};var z,q=(H||(H=1,U.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)}}),U.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 p=d[m];p.d&&(u=s?n(t).diff(i,p.d,!0):i.diff(t,p.d,!0));var b=(e.rounding||Math.round)(Math.abs(u));if(c=u>0,b<=p.r||!p.r){b<=1&&m>0&&(p=d[m-1]);var g=f[p.l];a&&(b=a(""+b)),l="string"==typeof g?g.replace("%d",b):g(b,r,p.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",p=+t;return(o.utc(m).valueOf()-(p-=p%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),pe=t(me),be={exports:{}};var ge,ye=(he||(he=1,be.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")}}),be.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),xe=t(_e);function Se(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 Me={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}},ke={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},De=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 Oe extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const Ee=["POST","PUT","PATCH","DELETE"],$e=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=Ee.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 Oe("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&&Ee.includes(e.toUpperCase())?$e(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=Ee.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=>De(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 Oe("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 Le(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function Ie(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function Ce(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function Ye(...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&&Ce(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 Fe(e,t,n){if(!Le(e)||!Ie(t))throw Ye(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),Ie(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function Ne(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)Fe(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=Ne(e[r],!0):n[r]=e[r]);return n||!1}function Re(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?Ne(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 Re(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 We(...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++)Re(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]=We(!0,r,e)}else o[n][t]=e})):He(e)?o[n]=We(!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 Ue=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,ze=(e,t)=>{if(null==t?void 0:t.length){let n={};return Re(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,Ye(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=()=>{Ye(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=We({},s?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Se("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(Se("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(Se("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!==Ue,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});Re(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(Se("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=Ue.open(e,n);r.onupgradeneeded=()=>{const t=r.result;Re(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(Se("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:Fe(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(!Le(e)){if(!e.toString)throw Ye(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&&Le(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),p=1732584193,b=-271733879,g=-1732584194,y=271733878;for(l=0;l<m.length;l+=16)c=p,f=b,d=g,h=y,p=i(p,b,g,y,m[l+0],7,-680876936),y=i(y,p,b,g,m[l+1],12,-389564586),g=i(g,y,p,b,m[l+2],17,606105819),b=i(b,g,y,p,m[l+3],22,-1044525330),p=i(p,b,g,y,m[l+4],7,-176418897),y=i(y,p,b,g,m[l+5],12,1200080426),g=i(g,y,p,b,m[l+6],17,-1473231341),b=i(b,g,y,p,m[l+7],22,-45705983),p=i(p,b,g,y,m[l+8],7,1770035416),y=i(y,p,b,g,m[l+9],12,-1958414417),g=i(g,y,p,b,m[l+10],17,-42063),b=i(b,g,y,p,m[l+11],22,-1990404162),p=i(p,b,g,y,m[l+12],7,1804603682),y=i(y,p,b,g,m[l+13],12,-40341101),g=i(g,y,p,b,m[l+14],17,-1502002290),p=s(p,b=i(b,g,y,p,m[l+15],22,1236535329),g,y,m[l+1],5,-165796510),y=s(y,p,b,g,m[l+6],9,-1069501632),g=s(g,y,p,b,m[l+11],14,643717713),b=s(b,g,y,p,m[l+0],20,-373897302),p=s(p,b,g,y,m[l+5],5,-701558691),y=s(y,p,b,g,m[l+10],9,38016083),g=s(g,y,p,b,m[l+15],14,-660478335),b=s(b,g,y,p,m[l+4],20,-405537848),p=s(p,b,g,y,m[l+9],5,568446438),y=s(y,p,b,g,m[l+14],9,-1019803690),g=s(g,y,p,b,m[l+3],14,-187363961),b=s(b,g,y,p,m[l+8],20,1163531501),p=s(p,b,g,y,m[l+13],5,-1444681467),y=s(y,p,b,g,m[l+2],9,-51403784),g=s(g,y,p,b,m[l+7],14,1735328473),p=a(p,b=s(b,g,y,p,m[l+12],20,-1926607734),g,y,m[l+5],4,-378558),y=a(y,p,b,g,m[l+8],11,-2022574463),g=a(g,y,p,b,m[l+11],16,1839030562),b=a(b,g,y,p,m[l+14],23,-35309556),p=a(p,b,g,y,m[l+1],4,-1530992060),y=a(y,p,b,g,m[l+4],11,1272893353),g=a(g,y,p,b,m[l+7],16,-155497632),b=a(b,g,y,p,m[l+10],23,-1094730640),p=a(p,b,g,y,m[l+13],4,681279174),y=a(y,p,b,g,m[l+0],11,-358537222),g=a(g,y,p,b,m[l+3],16,-722521979),b=a(b,g,y,p,m[l+6],23,76029189),p=a(p,b,g,y,m[l+9],4,-640364487),y=a(y,p,b,g,m[l+12],11,-421815835),g=a(g,y,p,b,m[l+15],16,530742520),p=u(p,b=a(b,g,y,p,m[l+2],23,-995338651),g,y,m[l+0],6,-198630844),y=u(y,p,b,g,m[l+7],10,1126891415),g=u(g,y,p,b,m[l+14],15,-1416354905),b=u(b,g,y,p,m[l+5],21,-57434055),p=u(p,b,g,y,m[l+12],6,1700485571),y=u(y,p,b,g,m[l+3],10,-1894986606),g=u(g,y,p,b,m[l+10],15,-1051523),b=u(b,g,y,p,m[l+1],21,-2054922799),p=u(p,b,g,y,m[l+8],6,1873313359),y=u(y,p,b,g,m[l+15],10,-30611744),g=u(g,y,p,b,m[l+6],15,-1560198380),b=u(b,g,y,p,m[l+13],21,1309151649),p=u(p,b,g,y,m[l+4],6,-145523070),y=u(y,p,b,g,m[l+11],10,-1120210379),g=u(g,y,p,b,m[l+2],15,718787259),b=u(b,g,y,p,m[l+9],21,-343485551),p=r(p,c),b=r(b,f),g=r(g,d),y=r(y,h);return n(p)+n(b)+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,p=!1,b=!1,g=!1,y=!1,w=!1,v="";for(let e=0;e<t.length;e++)if(b||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])b=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(b||g)continue;if(t[e]===d&&!m&&d)d="",r+=t[e];else if(d)m="\\"===t[e]&&!m,r+=t[e];else if(h.includes(t[e])&&!m)d=t[e],r+=t[e];else if("("===t[e]){if(u++,""!==r.trim()){if("function"===r.trim())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&&(p?(f.default=r.trim(),p=!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&&!p)f.name=r.trim(),r="",p=!0;else if(","===t[e])if(y)r+=t[e];else{if(!(u>l))throw Error("Unexpected ',' while parsing function");p?(f.default=r.trim(),p=!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 b=!0,r="";if(!n){if(!o)throw Error("Unexpected end of function while parsing function");n=r}n.substr(0,25).indexOf("[native code]")>-1&&(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 pt(e,t="="){if(!He(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!Be(e.conditions)){let n=[];Re(e,(e,r)=>{He(e)&&"object"==typeof e.conditions?n.push(pt(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function bt(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},pt({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=pt(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=bt(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=bt(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=bt(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;Re(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 xt(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&&Re(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?xt(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):xt(e,t,i)})}}function St(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 Mt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function kt(e,t,n,r=""){return n.toString().replace(He(e)?e:new RegExp(Mt(e),"g"+r),t)}function Dt(e,t,n){let r={};return t&&Re(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+ct((n||"json")+JSON.stringify(r))}function Ot(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=kt("//","/",e)),t||(t="json");let s=Dt(e,n,t),a=wt(s);if(null==a?void 0:a.loader)return a.loader;bbn.env.token&&We(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)Ce(r)&&r(t.data,t.headers);else{let e=1;Ce(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;Ce(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;Ce(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 Et=new TextDecoder;function $t(e){return Et.decode(e)}function Tt(e,t){if(e&&Le(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&Fe(n,-r)===t)return Fe(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,Lt,It,Ct,Yt,Ft,Nt,Rt=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]],Wt={y:"Year",m:"Month",d:"Date",w:"Week",h:"Hours",i:"Minutes",s:"Seconds"},Ut={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"},qt=(()=>{const e=[bbn.env.lang,...navigator.languages],t=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),r=new Intl.DateTimeFormat(e,{weekday:"long"}),o=new Intl.DateTimeFormat(e,{weekday:"short"}),i=[],s=[];for(let e=0;e<12;e++){const r=new Date(2020,e,1);i.push(t.format(r)),s.push(n.format(r))}const a=new Date(2020,1,2),u=[],l=[];for(let e=0;e<7;e++){const t=new Date(a.getTime()+864e5*e);u.push(r.format(t)),l.push(o.format(t))}return{monthsLong:i,monthsShort:s,weekdaysLong:u,weekdaysShort:l}})();class Vt{constructor(e,t,n=!1){jt.add(this),Lt.set(this,0),It.set(this,"");const r=zt[t]||t;if(!r)throw new Error("Invalid unit for duration: "+t);Rt(this,It,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];Rt(this,Lt,n?e:e*i,"f")}years(e=!1){return Pt(this,jt,"m",Yt).call(this,"year",e)}months(e=!1){return Pt(this,jt,"m",Yt).call(this,"month",e)}weeks(e=!1){return Pt(this,jt,"m",Yt).call(this,"week",e)}days(e=!1){return Pt(this,jt,"m",Yt).call(this,"day",e)}hours(e=!1){return Pt(this,jt,"m",Yt).call(this,"hour",e)}minutes(e=!1){return Pt(this,jt,"m",Yt).call(this,"minute",e)}seconds(e=!1){return Pt(this,jt,"m",Yt).call(this,"second",e)}toJSON(){return{years:this.years(!0),months:this.months(!0),days:this.days(!0),hours:this.hours(!0),minutes:this.minutes(!0),seconds:this.seconds(!0),milliseconds:this.toMilliseconds()}}asYears(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"year");return Pt(this,Lt,"f")/e}asMonths(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"month");return Pt(this,Lt,"f")/e}asWeeks(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"week");return Pt(this,Lt,"f")/e}asDays(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"day");return Pt(this,Lt,"f")/e}asHours(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"hour");return Pt(this,Lt,"f")/e}asMinutes(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"minute");return Pt(this,Lt,"f")/e}asSeconds(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"second");return Pt(this,Lt,"f")/e}add(e,t){const n=t?zt[t]||t:Pt(this,It,"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 Vt(Pt(this,Lt,"f")+e*r[2],Pt(this,It,"f"),!0)}subtract(e,t){return this.add(-e,t)}toMilliseconds(){return Pt(this,Lt,"f")}}Lt=new WeakMap,It=new WeakMap,jt=new WeakSet,Ct=function(e){const t=bbn.fn.getRow(Bt,t=>t[1]===e);if(!t)throw new Error("Unit name not found: "+e);return t},Yt=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,Lt,"f")/r);let o=Pt(this,Lt,"f");for(let e=0;e<n;e++){const[,,t]=Bt[e];o-=Math.floor(o/t)*t}return Math.floor(o/r)};class Zt{static parse(e,t,n){var r,o,i,s;const a={monthsLong:null!==(r=null==n?void 0:n.monthsLong)&&void 0!==r?r:qt.monthsLong,monthsShort:null!==(o=null==n?void 0:n.monthsShort)&&void 0!==o?o:qt.monthsShort,weekdaysLong:null!==(i=null==n?void 0:n.weekdaysLong)&&void 0!==i?i:qt.weekdaysLong,weekdaysShort:null!==(s=null==n?void 0:n.weekdaysShort)&&void 0!==s?s:qt.weekdaysShort},u={year:1970,month:1,day:1,hour:0,minute:0,second:0,ms:0},l=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=[{token:"YYYY",regex:"\\d{4}",apply:e=>{u.year=parseInt(e,10)}},{token:"YY",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);u.year=t>=70?1900+t:2e3+t}},{token:"Y",regex:"[+-]?\\d{1,6}",apply:e=>{u.year=parseInt(e,10)}},{token:"MMMM",regex:"[^\\d\\s]+",apply:e=>{const t=a.monthsLong.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid month name: "+e);u.month=t+1}},{token:"MMM",regex:"[^\\d\\s]+",apply:e=>{const t=a.monthsShort.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid short month name: "+e);u.month=t+1}},{token:"MM",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"M",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"m",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"DD",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"D",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"d",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"dddd",regex:"[^\\d\\s]+",apply:e=>{const t=a.weekdaysLong.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid weekday name: "+e);u.weekday=t}},{token:"ddd",regex:"[^\\d\\s]+",apply:e=>{const t=a.weekdaysShort.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid short weekday name: "+e);u.weekday=t}},{token:"EE",regex:"\\d{1}",apply:e=>{const t=parseInt(e,10);if(t<0||t>7)throw new Error("Invalid weekday number: "+t);u.weekday=t}},{token:"HH",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"H",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"h",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"II",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"I",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"i",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"SS",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"S",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"s",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"ms",regex:"\\d{1,3}",apply:e=>{const t=parseInt(e,10);if(t<0||t>999)throw new Error("Invalid millisecond: "+t);u.ms=t}},{token:"WWWW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"WWW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"WW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"W",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}}],f=[...c].sort((e,t)=>t.token.length-e.token.length);let d="";const h=[];let m=0;for(;m<t.length;){let e=null;for(const n of f)if(t.startsWith(n.token,m)){e=n;break}e?(d+=`(${e.regex})`,e.apply?h.push(e.apply):h.push(()=>{}),m+=e.token.length):(d+=l(t[m]),m+=1)}const p=new RegExp("^"+d+"$").exec(e);if(!p)throw new Error(`Date string "${e}" does not match format "${t}"`);for(let e=1;e<p.length;e++){const t=p[e],n=h[e-1];null!=t&&n&&n(t)}const b=new Date(u.year,u.month-1,u.day,u.hour,u.minute,u.second,u.ms);if(b.getFullYear()!==u.year||b.getMonth()!==u.month-1||b.getDate()!==u.day||b.getHours()!==u.hour||b.getMinutes()!==u.minute||b.getSeconds()!==u.second||b.getMilliseconds()!==u.ms)throw new Error("Invalid date produced from components");return void 0!==u.weekday&&b.getDay(),b}constructor(e,t=null){Ft.set(this,void 0),Nt.set(this,!1);let n=typeof e;if(e)if(t)try{Rt(this,Ft,Zt.parse(e,t),"f")}catch(e){throw new Error('Error parsing date with format "'+t+'": '+e.message)}else if(("number"===n||Ae(e)&&""!==e)&&(e<5e3&&Ae(t)?e=Array.from(arguments):e<1e10&&(e*=1e3),Array.isArray(e)||Rt(this,Ft,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);Rt(this,Ft,new Date(e,r-1,o,i,s,a,0),"f")}}if(!Pt(this,Ft,"f"))throw new Error("Invalid date string format: "+e)}else Ge(e)?Rt(this,Ft,e,"f"):Array.isArray(e)&&Rt(this,Ft,new Date(...e),"f");else Rt(this,Ft,new Date,"f");if(void 0===Pt(this,Ft,"f"))return new Proxy(this,{get:(e,t)=>{}})}toString(){return Pt(this,Ft,"f")?this.format():""}year(e){if(0 in arguments){const t=this.copy();return t.setFullYear(e),new Zt(t)}return Pt(this,Ft,"f").getFullYear()}month(e){if(0 in arguments){const t=this.copy();return t.setMonth(e-1),new Zt(t)}return Pt(this,Ft,"f").getMonth()+1}day(e){if(0 in arguments){const t=this.copy();return t.setDate(e),new Zt(t)}return Pt(this,Ft,"f").getDate()}hours(e){if(0 in arguments){const t=this.copy();return t.setHours(e),new Zt(t)}return Pt(this,Ft,"f").getHours()}minutes(e){if(0 in arguments){const t=this.copy();return t.setMinutes(e),new Zt(t)}return Pt(this,Ft,"f").getMinutes()}seconds(e){if(0 in arguments){const t=this.copy();return t.setSeconds(e),new Zt(t)}return Pt(this,Ft,"f").getSeconds()}weekday(e,t=!1){return 0 in arguments?this.setWeekday(e,t):Pt(this,Ft,"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,Ft,"f").getTime()/1e3)}get mtst(){return Pt(this,Ft,"f").getTime()}get YYYY(){return this.year().toString()}get YY(){return Fe(this.year().toString(),2,2)}get MMMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"long"}).format(Pt(this,Ft,"f"))}get MMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"short"}).format(Pt(this,Ft,"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,Ft,"f"))}get ddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"short"}).format(Pt(this,Ft,"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,Ft,"f").getTime()-t.getTime())/864e5;return String(Math.ceil((n+t.getDay()+1)/7)).padStart(2,"0")}get isValid(){return void 0!==Pt(this,Ft,"f")}inLeapYear(){if(this.isValid){const e=Pt(this,Ft,"f").getFullYear();return e%4==0&&e%100!=0||e%400==0}return!1}daysInMonth(){if(this.isValid)switch(Pt(this,Ft,"f").getMonth()){case 1:return Pt(this,Ft,"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,Ft,"f")?new Date(Pt(this,Ft,"f").getTime()):new Date;if(zt[t]){const r=zt[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(!Pt(this,Ft,"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,Ft,"f"))}ftime(e=!1){if(!Pt(this,Ft,"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,Ft,"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[Ut[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 Zt(t)}return Pt(this,Ft,"f")?e?Pt(this,Ft,"f").getTime():Math.floor(Pt(this,Ft,"f").getTime()/1e3):0}sql(e=!1){return Pt(this,Ft,"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=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?Se("%d %s before",r,t):r<0?Se("%d %s after",-r,t):Se("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 Zt?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 Zt(s)}copy(){return new Date(Pt(this,Ft,"f").getTime())}clone(){return new Zt(Pt(this,Ft,"f")?new Date(Pt(this,Ft,"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 Zt(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 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"}),Ye.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&&Ce(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)(),Ce(r)&&(r=r(e,n))}catch(e){Ye(e,t),Xt(Ce(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&Ce(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"+Fe(i,0,1).toUpperCase()+Fe(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"),Ce(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(Le(t)&&Ce(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 Ye(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&Ye(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 We(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}Ft=new WeakMap,Nt=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=pt(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&&We(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(Fe(e,0,4)),parseInt(Fe(e,5,2))-1,parseInt(Fe(e,8,2)),12);if(19===e.length)return new Date(parseInt(Fe(e,0,4)),parseInt(Fe(e,5,2))-1,parseInt(Fe(e,8,2)),parseInt(Fe(e,11,2)),parseInt(Fe(e,14,2)),parseInt(Fe(e,17,2)))}else if(Ge(e))return e;return!1}function un(e,t=""){Ye(e)}function ln(e,t=null,n=null){Ye(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(Le(e)&&e){for(;"/"===Fe(e,e.length-1);)e=Fe(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return Fe(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 pn(e){if(e&&Le(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 gn(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(Le(t))o=new Blob([t],{type:n});else try{o=t}catch(e){Ye(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 xn(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=kt("][",".",r),r=kt("[",".",r),r=kt("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=Fe(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 kn(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),Ye("RANGE",e);let n=e.cloneContents();Ye("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function En(e){return Le(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function $n(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(),Ce(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=Fe(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=Fe(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(Fe(e,0,7))?e:bbn.env.root+e,bbn.env.path=Fe(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&&We(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?$n(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function Ln(...e){let t=An(e),n=1;if(!0===t)return!0;if(!t)return Ln(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?(We(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 Ot(t.url,t.datatype,t.obj,n=>{n||Ye(e+bbn._("returned no answer")),He(n)&&(0===Object.keys(n).length&&Ye(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 In(...e){let t=An(e);if(t.url)return Ot(t.url,t.datatype,t.obj,e=>{Gt(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Cn(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=xn(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),In(...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(kn("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 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(Fe(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(!Le(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function Wn(...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"}),Ye.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?Re(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=Fe(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=Fe(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&&Le(n)||(n="..."),e.length>t&&(e=Fe(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:xt,addStyle:function(e,t){He(t)&&Re(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),St("height",e)},adjustSize:St,adjustWidth:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),St("width",e)},ajax:Ot,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:$t,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]={}),We(bbn[e],t)},baseName:Tt,br2nl:function(e){return kt("<br />","\n",kt("<br/>","\n",kt("<br>","\n",e)))},calendar:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate():t&&Le(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)&&Ce(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)"+Mt(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"))},deepPath:function e(t,n,r,o=[]){let i;return(i=bt(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)&&Ce(t)&&(t(),r=1),!r&&Ce(n)&&n()},defaultEndLoadingFunction:cn,defaultErrorFunction:function(e){Ye(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 Ye("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(!Ce(t)&&!Ce(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(Ce(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(Ce(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=""),Ot(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)?Fe(r[n],o.length+1,r[n].length-o.length-2):Tt(e)}if(mn(n)){let e=pn(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 Le(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:Mt,escapeSquotes:function(e){return Le(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Le(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&&Le(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:We,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&&Le(t)?t:""},fdatetime:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate(!1,!0):t&&Le(t)?t:""},fieldValue:_n,fileExt:pn,filter:rn,filterToConditions:pt,findAll:function e(t,n,r,o=[]){let i,s=0;for(;(i=bt(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":Le(e)?e:!t&&"auto"},formdata:xn,fphone:function(e){var t;if(Ae(e)&&(e=e.toString()),Le(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&&Le(t)?t:""},getAllTags:function(){return Sn(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:Mn,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:kn,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: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){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=En(n)),n.trim()},getHTMLOfSelection:On,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:Dt,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;"}),Ye.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:$n,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;"}),Ye.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&&"/"!==Fe(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&&We(!0,bbn,e),bbn.env.path=Fe(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(),Ln(t.getAttribute("href")),!1):void 0}),Pe(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"),e=>{e.addEventListener("submit",t=>{Cn(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?Ln(e.url,We({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&Ce(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&&Ye("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: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(!Le(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(!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(!Le(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:Ce,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(!Le(t))return!1;if(!Bn(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=Mn(e);if(n.length){if(Le(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:Ie,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:Rn,isMobileDevice:Fn,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:Le,isSymbol:Wn,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:Hn,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Le(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:Re,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:Ln,log:Ye,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&&Ye(["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(Wn(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"),Ye(a.__bbnParent),n(a,"length",r),t};if(Ce(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(Wn(a))return Reflect.get(t,a,u);const l=t.__bbnRoot||t,c=o?o+"."+a:a;if(Wn(a))return Reflect.get(t,a);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&Ye(["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&&Ye(["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||Wn(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=bt(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 kt("\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:In,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"),xt(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=kt("'","'",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=kt('"',""",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:En,removePrivateProp:Ne,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;Fe(e,-t.length)===t;)e=Fe(e,0,e.length-t.length);for(;Fe(e,0,t.length)===t;)e=Fe(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:kt,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 Re(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:bt,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)=>{Le(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=Dt(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=Ce(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+=$t(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;Ce(o)&&(n=o(t.message,e)),n&&un(t.message,e)}else{let e=1;Ce(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:Cn,substr:Fe,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+kt(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;Re(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:Sn,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&&(Ye("SUCCESS",e),n(e))}).catch(e=>{r&&(Ye("ERROR",e),r(e))}):i()},warning:Un,yieldToBrowser:wn};s.extend(c),s.extend(m),s.extend(y),s.extend(x),s.extend(D),s.extend(T),s.extend(C),s.extend(R),s.extend(W),s.extend(V),s.extend(Q),s.extend(re),s.extend(ae),s.extend(fe),s.extend(pe),s.extend(we),s.extend(xe);const Kn={version:"1.0.1",opt:{_cat:{}},app:{},_:Se,$: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:Me,date:Jt,com:Te,env:ke,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+)?$/,p=/\[([^\]]+)]|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,b={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]=b;var _="$isDayjsObject",x=function(e){return e instanceof D||!(!e||!e[_])},S=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},M=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new D(n)},k=y;k.l=S,k.i=x,k.w=function(e,t){return M(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function b(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var g=b.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(k.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 k},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=M(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return M(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<M(e)},g.$g=function(e,t,n){return k.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=!!k.u(t)||t,c=k.p(e),h=function(e,t){var o=k.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 k.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,b=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,b):h(0,b+1);case u:var w=this.$locale().weekStart||0,v=(p<w?p+7:p)-w;return h(r?g-v:g+(6-v),b);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=k.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 p=this.clone().set(d,1);p.$d[h](m),p.init(),this.$d=p.set(d,Math.min(this.$D,p.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[k.p(e)]()},g.add=function(r,c){var d,h=this;r=Number(r);var m=k.p(c),p=function(e){var t=M(h);return k.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 p(1);if(m===u)return p(7);var b=(d={},d[i]=t,d[s]=n,d[o]=e,d)[m]||1,g=this.$d.getTime()+r*b;return k.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=k.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 k.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(p,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return a+1;case"MM":return k.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 k.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 k.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 k.s(s,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.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,p=this,b=k.p(d),g=M(r),y=(g.utcOffset()-this.utcOffset())*t,w=this-g,v=function(){return k.m(p,g)};switch(b){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:k.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=S(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return k.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()},b}(),O=D.prototype;return M.prototype=O,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",l],["$y",f],["$D",d]].forEach(function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),M.extend=function(e,t){return e.$i||(e(t,D,M),e.$i=!0),M},M.locale=S,M.isDayjs=x,M.unix=function(e){return M(1e3*e)},M.en=v[w],M.Ls=v,M.p={},M}()),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,p=new Date,b=a||(i||s?1:p.getDate()),g=i||p.getFullYear(),y=0;i&&!s||(y=s>0?s-1:p.getMonth());var w,v=u||0,_=l||0,x=c||0,S=f||0;return d?new Date(Date.UTC(g,y,b,v,_,x,S+60*d.offset*1e3)):n?new Date(Date.UTC(g,y,b,v,_,x,S)):(w=new Date(g,y,b,v,_,x,S),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 p=n.apply(this,i);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}m===d&&(this.$d=new Date(""))}else o.call(this,e)}}}()),f.exports),m=t(h),p={exports:{}};var b,g=(d||(d=1,p.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")}}),p.exports),y=t(g),w={exports:{}};var v,_=(b||(b=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},p=function(e){return m(e)?Math.ceil(e):Math.floor(e)},b=function(e){return Math.abs(e)},g=function(e,t){return e?m(e)?{negative:!0,format:""+b(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 b=m.prototype;return b.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce(function(t,n){return t+(e.$d[n]||0)*c[n]},0)},b.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=p(e/a),e%=a,this.$d.months=p(e/u),e%=u,this.$d.days=p(e/i),e%=i,this.$d.hours=p(e/o),e%=o,this.$d.minutes=p(e/r),e%=r,this.$d.seconds=p(e/n),e%=n,this.$d.milliseconds=e},b.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},b.toJSON=function(){return this.toISOString()},b.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])})},b.as=function(e){return this.$ms/c[h(e)]},b.get=function(e){var t=this.$ms,n=h(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?p(t/c[n]):this.$d[n],t||0},b.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)},b.subtract=function(e,t){return this.add(e,t,!0)},b.locale=function(e){var t=this.clone();return t.$l=e,t},b.clone=function(){return d(this.$ms,this)},b.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},b.valueOf=function(){return this.asMilliseconds()},b.milliseconds=function(){return this.get("milliseconds")},b.asMilliseconds=function(){return this.as("milliseconds")},b.seconds=function(){return this.get("seconds")},b.asSeconds=function(){return this.as("seconds")},b.minutes=function(){return this.get("minutes")},b.asMinutes=function(){return this.as("minutes")},b.hours=function(){return this.get("hours")},b.asHours=function(){return this.as("hours")},b.days=function(){return this.get("days")},b.asDays=function(){return this.as("days")},b.weeks=function(){return this.get("weeks")},b.asWeeks=function(){return this.as("weeks")},b.months=function(){return this.get("months")},b.asMonths=function(){return this.as("months")},b.years=function(){return this.get("years")},b.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),x=t(_),S={exports:{}};var M,k=(v||(v=1,S.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))}}),S.exports),D=t(k),O={exports:{}};var E,$=(M||(M=1,O.exports=function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}),O.exports),T=t($),A={exports:{}};var j,L,I=(E||(E=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),C=t(I),Y={exports:{}};var F,N=(L||(L=1,Y.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)}}),Y.exports),R=t(N),P={exports:{}};var H,B=(F||(F=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),W=t(B),U={exports:{}};var z,q=(H||(H=1,U.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)}}),U.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 p=d[m];p.d&&(u=s?n(t).diff(i,p.d,!0):i.diff(t,p.d,!0));var b=(e.rounding||Math.round)(Math.abs(u));if(c=u>0,b<=p.r||!p.r){b<=1&&m>0&&(p=d[m-1]);var g=f[p.l];a&&(b=a(""+b)),l="string"==typeof g?g.replace("%d",b):g(b,r,p.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",p=+t;return(o.utc(m).valueOf()-(p-=p%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),pe=t(me),be={exports:{}};var ge,ye=(he||(he=1,be.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")}}),be.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),xe=t(_e);function Se(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 Me={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}},ke={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},De=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 Oe extends Error{constructor(e){super(e||"Request canceled"),this.name="Cancel",this.__BBN_CANCEL__=!0}}const Ee=["POST","PUT","PATCH","DELETE"],$e=(e,t,n={},r)=>{const o=new XMLHttpRequest,i=Ee.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 Oe("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&&Ee.includes(e.toUpperCase())?$e(e,t,n):((e,t,n={},r)=>{const o={method:e,headers:new Headers(n.headers||{}),signal:null==r?void 0:r.signal},i=Ee.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=>De(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 Oe("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 Le(...e){if(!e.length)return!1;for(let t of e)if("[object String]"!=={}.toString.apply(t))return!1;return!0}function Ie(...e){if(!e.length)return!1;for(let t of e)if(!Number.isInteger(t))return!1;return!0}function Ce(...e){if(!e.length)return!1;for(let t of e)if(!(t&&t.constructor&&t.call&&t.apply))return!1;return!0}function Ye(...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&&Ce(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 Fe(e,t,n){if(!Le(e)||!Ie(t))throw Ye(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),Ie(n)?e.substring(t,(n<0?e.length:t)+n):e.substring(t)}function Ne(e,t=!1){let n=null;if("object"==typeof e)for(var r in n={},e)Fe(r,0,1).match(/^[A-z0-9]$/)&&r in e&&(t&&"object"==typeof e[r]?n[r]=Ne(e[r],!0):n[r]=e[r]);return n||!1}function Re(e,t,n=!1,r=!1){if(null!==e&&"object"==typeof e){let o=Object.keys(n?Ne(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 Re(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 We(...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++)Re(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]=We(!0,r,e)}else o[n][t]=e})):He(e)?o[n]=We(!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 Ue=window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB,ze=(e,t)=>{if(null==t?void 0:t.length){let n={};return Re(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,Ye(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=()=>{Ye(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=We({},s?{[f]:r[e][f]}:r[e],t);if(!n[f])throw new Error(Se("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(Se("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(Se("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!==Ue,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});Re(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(Se("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=Ue.open(e,n);r.onupgradeneeded=()=>{const t=r.result;Re(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(Se("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:Fe(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(!Le(e)){if(!e.toString)throw Ye(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&&Le(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),p=1732584193,b=-271733879,g=-1732584194,y=271733878;for(l=0;l<m.length;l+=16)c=p,f=b,d=g,h=y,p=i(p,b,g,y,m[l+0],7,-680876936),y=i(y,p,b,g,m[l+1],12,-389564586),g=i(g,y,p,b,m[l+2],17,606105819),b=i(b,g,y,p,m[l+3],22,-1044525330),p=i(p,b,g,y,m[l+4],7,-176418897),y=i(y,p,b,g,m[l+5],12,1200080426),g=i(g,y,p,b,m[l+6],17,-1473231341),b=i(b,g,y,p,m[l+7],22,-45705983),p=i(p,b,g,y,m[l+8],7,1770035416),y=i(y,p,b,g,m[l+9],12,-1958414417),g=i(g,y,p,b,m[l+10],17,-42063),b=i(b,g,y,p,m[l+11],22,-1990404162),p=i(p,b,g,y,m[l+12],7,1804603682),y=i(y,p,b,g,m[l+13],12,-40341101),g=i(g,y,p,b,m[l+14],17,-1502002290),p=s(p,b=i(b,g,y,p,m[l+15],22,1236535329),g,y,m[l+1],5,-165796510),y=s(y,p,b,g,m[l+6],9,-1069501632),g=s(g,y,p,b,m[l+11],14,643717713),b=s(b,g,y,p,m[l+0],20,-373897302),p=s(p,b,g,y,m[l+5],5,-701558691),y=s(y,p,b,g,m[l+10],9,38016083),g=s(g,y,p,b,m[l+15],14,-660478335),b=s(b,g,y,p,m[l+4],20,-405537848),p=s(p,b,g,y,m[l+9],5,568446438),y=s(y,p,b,g,m[l+14],9,-1019803690),g=s(g,y,p,b,m[l+3],14,-187363961),b=s(b,g,y,p,m[l+8],20,1163531501),p=s(p,b,g,y,m[l+13],5,-1444681467),y=s(y,p,b,g,m[l+2],9,-51403784),g=s(g,y,p,b,m[l+7],14,1735328473),p=a(p,b=s(b,g,y,p,m[l+12],20,-1926607734),g,y,m[l+5],4,-378558),y=a(y,p,b,g,m[l+8],11,-2022574463),g=a(g,y,p,b,m[l+11],16,1839030562),b=a(b,g,y,p,m[l+14],23,-35309556),p=a(p,b,g,y,m[l+1],4,-1530992060),y=a(y,p,b,g,m[l+4],11,1272893353),g=a(g,y,p,b,m[l+7],16,-155497632),b=a(b,g,y,p,m[l+10],23,-1094730640),p=a(p,b,g,y,m[l+13],4,681279174),y=a(y,p,b,g,m[l+0],11,-358537222),g=a(g,y,p,b,m[l+3],16,-722521979),b=a(b,g,y,p,m[l+6],23,76029189),p=a(p,b,g,y,m[l+9],4,-640364487),y=a(y,p,b,g,m[l+12],11,-421815835),g=a(g,y,p,b,m[l+15],16,530742520),p=u(p,b=a(b,g,y,p,m[l+2],23,-995338651),g,y,m[l+0],6,-198630844),y=u(y,p,b,g,m[l+7],10,1126891415),g=u(g,y,p,b,m[l+14],15,-1416354905),b=u(b,g,y,p,m[l+5],21,-57434055),p=u(p,b,g,y,m[l+12],6,1700485571),y=u(y,p,b,g,m[l+3],10,-1894986606),g=u(g,y,p,b,m[l+10],15,-1051523),b=u(b,g,y,p,m[l+1],21,-2054922799),p=u(p,b,g,y,m[l+8],6,1873313359),y=u(y,p,b,g,m[l+15],10,-30611744),g=u(g,y,p,b,m[l+6],15,-1560198380),b=u(b,g,y,p,m[l+13],21,1309151649),p=u(p,b,g,y,m[l+4],6,-145523070),y=u(y,p,b,g,m[l+11],10,-1120210379),g=u(g,y,p,b,m[l+2],15,718787259),b=u(b,g,y,p,m[l+9],21,-343485551),p=r(p,c),b=r(b,f),g=r(g,d),y=r(y,h);return n(p)+n(b)+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,p=!1,b=!1,g=!1,y=!1,w=!1,v="";for(let e=0;e<t.length;e++)if(b||"/"!==t[e]||"*"!==t[e+1])if("/"===t[e]&&"*"===t[e-1])b=!1;else if(g||"/"!==t[e]||"/"!==t[e+1])if("\n"===t[e])g=!1;else{if(b||g)continue;if(t[e]===d&&!m&&d)d="",r+=t[e];else if(d)m="\\"===t[e]&&!m,r+=t[e];else if(h.includes(t[e])&&!m)d=t[e],r+=t[e];else if("("===t[e]){if(u++,""!==r.trim()){if("function"===r.trim())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&&(p?(f.default=r.trim(),p=!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&&!p)f.name=r.trim(),r="",p=!0;else if(","===t[e])if(y)r+=t[e];else{if(!(u>l))throw Error("Unexpected ',' while parsing function");p?(f.default=r.trim(),p=!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 b=!0,r="";if(!n){if(!o)throw Error("Unexpected end of function while parsing function");n=r}n.substr(0,25).indexOf("[native code]")>-1&&(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 pt(e,t="="){if(!He(e))throw new Error("Error in filterToCondition: filter must be an object");if(!e.conditions||!Be(e.conditions)){let n=[];Re(e,(e,r)=>{He(e)&&"object"==typeof e.conditions?n.push(pt(e)):n.push({field:r,operator:t,value:e})}),e={conditions:n}}return e.logic||(e.logic="AND"),e}function bt(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},pt({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=pt(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=bt(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=bt(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=bt(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;Re(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 xt(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&&Re(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?xt(e,t,o):r(o,t.toString())}):"object"!=typeof t||t instanceof File?r(i,t.toString()):xt(e,t,i)})}}function St(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 Mt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function kt(e,t,n,r=""){return n.toString().replace(He(e)?e:new RegExp(Mt(e),"g"+r),t)}function Dt(e,t,n){let r={};return t&&Re(t,(e,t)=>{-1===t.indexOf("_bbn")&&(r[t]=e)}),e+":"+ct((n||"json")+JSON.stringify(r))}function Ot(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=kt("//","/",e)),t||(t="json");let s=Dt(e,n,t),a=wt(s);if(null==a?void 0:a.loader)return a.loader;bbn.env.token&&We(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)Ce(r)&&r(t.data,t.headers);else{let e=1;Ce(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;Ce(i)&&(n=i(t.message,e)),n&&bbn.fn.defaultAjaxAbortFunction(t.message,e)}else{let e=1;Ce(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 Et=new TextDecoder;function $t(e){return Et.decode(e)}function Tt(e,t){if(e&&Le(e)){let n=e.split("/").pop();if(!t)return n;let r=t.length;if(n&&Fe(n,-r)===t)return Fe(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,Lt,It,Ct,Yt,Ft,Nt,Rt=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]],Wt={y:"Year",m:"Month",d:"Date",w:"Week",h:"Hours",i:"Minutes",s:"Seconds"},Ut={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"},qt={};class Vt{constructor(e,t,n=!1){jt.add(this),Lt.set(this,0),It.set(this,"");const r=zt[t]||t;if(!r)throw new Error("Invalid unit for duration: "+t);Rt(this,It,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];Rt(this,Lt,n?e:e*i,"f")}years(e=!1){return Pt(this,jt,"m",Yt).call(this,"year",e)}months(e=!1){return Pt(this,jt,"m",Yt).call(this,"month",e)}weeks(e=!1){return Pt(this,jt,"m",Yt).call(this,"week",e)}days(e=!1){return Pt(this,jt,"m",Yt).call(this,"day",e)}hours(e=!1){return Pt(this,jt,"m",Yt).call(this,"hour",e)}minutes(e=!1){return Pt(this,jt,"m",Yt).call(this,"minute",e)}seconds(e=!1){return Pt(this,jt,"m",Yt).call(this,"second",e)}toJSON(){return{years:this.years(!0),months:this.months(!0),days:this.days(!0),hours:this.hours(!0),minutes:this.minutes(!0),seconds:this.seconds(!0),milliseconds:this.toMilliseconds()}}asYears(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"year");return Pt(this,Lt,"f")/e}asMonths(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"month");return Pt(this,Lt,"f")/e}asWeeks(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"week");return Pt(this,Lt,"f")/e}asDays(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"day");return Pt(this,Lt,"f")/e}asHours(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"hour");return Pt(this,Lt,"f")/e}asMinutes(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"minute");return Pt(this,Lt,"f")/e}asSeconds(){const[,,e]=Pt(this,jt,"m",Ct).call(this,"second");return Pt(this,Lt,"f")/e}add(e,t){const n=t?zt[t]||t:Pt(this,It,"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 Vt(Pt(this,Lt,"f")+e*r[2],Pt(this,It,"f"),!0)}subtract(e,t){return this.add(-e,t)}toMilliseconds(){return Pt(this,Lt,"f")}}Lt=new WeakMap,It=new WeakMap,jt=new WeakSet,Ct=function(e){const t=bbn.fn.getRow(Bt,t=>t[1]===e);if(!t)throw new Error("Unit name not found: "+e);return t},Yt=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,Lt,"f")/r);let o=Pt(this,Lt,"f");for(let e=0;e<n;e++){const[,,t]=Bt[e];o-=Math.floor(o/t)*t}return Math.floor(o/r)};class Zt{static parse(e,t,n){var r,o,i,s;"monthsLong"in qt||We(qt,(()=>{const e=[bbn.env.lang,...navigator.languages],t=new Intl.DateTimeFormat(e,{month:"long"}),n=new Intl.DateTimeFormat(e,{month:"short"}),r=new Intl.DateTimeFormat(e,{weekday:"long"}),o=new Intl.DateTimeFormat(e,{weekday:"short"}),i=[],s=[];for(let e=0;e<12;e++){const r=new Date(2020,e,1);i.push(t.format(r)),s.push(n.format(r))}const a=new Date(2020,1,2),u=[],l=[];for(let e=0;e<7;e++){const t=new Date(a.getTime()+864e5*e);u.push(r.format(t)),l.push(o.format(t))}return{monthsLong:i,monthsShort:s,weekdaysLong:u,weekdaysShort:l}})());const a={monthsLong:null!==(r=null==n?void 0:n.monthsLong)&&void 0!==r?r:qt.monthsLong,monthsShort:null!==(o=null==n?void 0:n.monthsShort)&&void 0!==o?o:qt.monthsShort,weekdaysLong:null!==(i=null==n?void 0:n.weekdaysLong)&&void 0!==i?i:qt.weekdaysLong,weekdaysShort:null!==(s=null==n?void 0:n.weekdaysShort)&&void 0!==s?s:qt.weekdaysShort},u={year:1970,month:1,day:1,hour:0,minute:0,second:0,ms:0},l=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=[{token:"YYYY",regex:"\\d{4}",apply:e=>{u.year=parseInt(e,10)}},{token:"YY",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);u.year=t>=70?1900+t:2e3+t}},{token:"Y",regex:"[+-]?\\d{1,6}",apply:e=>{u.year=parseInt(e,10)}},{token:"MMMM",regex:"[^\\d\\s]+",apply:e=>{const t=a.monthsLong.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid month name: "+e);u.month=t+1}},{token:"MMM",regex:"[^\\d\\s]+",apply:e=>{const t=a.monthsShort.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid short month name: "+e);u.month=t+1}},{token:"MM",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"M",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"m",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>12)throw new Error("Invalid month: "+t);u.month=t}},{token:"DD",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"D",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"d",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>31)throw new Error("Invalid day of month: "+t);u.day=t}},{token:"dddd",regex:"[^\\d\\s]+",apply:e=>{const t=a.weekdaysLong.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid weekday name: "+e);u.weekday=t}},{token:"ddd",regex:"[^\\d\\s]+",apply:e=>{const t=a.weekdaysShort.findIndex(t=>t.toLowerCase()===e.toLowerCase());if(-1===t)throw new Error("Invalid short weekday name: "+e);u.weekday=t}},{token:"EE",regex:"\\d{1}",apply:e=>{const t=parseInt(e,10);if(t<0||t>7)throw new Error("Invalid weekday number: "+t);u.weekday=t}},{token:"HH",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"H",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"h",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>23)throw new Error("Invalid hour: "+t);u.hour=t}},{token:"II",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"I",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"i",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid minute: "+t);u.minute=t}},{token:"SS",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"S",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"s",regex:"\\d{2}",apply:e=>{const t=parseInt(e,10);if(t<0||t>59)throw new Error("Invalid second: "+t);u.second=t}},{token:"ms",regex:"\\d{1,3}",apply:e=>{const t=parseInt(e,10);if(t<0||t>999)throw new Error("Invalid millisecond: "+t);u.ms=t}},{token:"WWWW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"WWW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"WW",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}},{token:"W",regex:"\\d{1,2}",apply:e=>{const t=parseInt(e,10);if(t<1||t>53)throw new Error("Invalid week number: "+t);u.week=t}}],f=[...c].sort((e,t)=>t.token.length-e.token.length);let d="";const h=[];let m=0;for(;m<t.length;){let e=null;for(const n of f)if(t.startsWith(n.token,m)){e=n;break}e?(d+=`(${e.regex})`,e.apply?h.push(e.apply):h.push(()=>{}),m+=e.token.length):(d+=l(t[m]),m+=1)}const p=new RegExp("^"+d+"$").exec(e);if(!p)throw new Error(`Date string "${e}" does not match format "${t}"`);for(let e=1;e<p.length;e++){const t=p[e],n=h[e-1];null!=t&&n&&n(t)}const b=new Date(u.year,u.month-1,u.day,u.hour,u.minute,u.second,u.ms);if(b.getFullYear()!==u.year||b.getMonth()!==u.month-1||b.getDate()!==u.day||b.getHours()!==u.hour||b.getMinutes()!==u.minute||b.getSeconds()!==u.second||b.getMilliseconds()!==u.ms)throw new Error("Invalid date produced from components");return void 0!==u.weekday&&b.getDay(),b}constructor(e,t=null){Ft.set(this,void 0),Nt.set(this,!1);let n=typeof e;if(e)if(t)try{Rt(this,Ft,Zt.parse(e,t),"f")}catch(e){throw new Error('Error parsing date with format "'+t+'": '+e.message)}else if(("number"===n||Ae(e)&&""!==e)&&(e<5e3&&Ae(t)?e=Array.from(arguments):e<1e10&&(e*=1e3),Array.isArray(e)||Rt(this,Ft,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);Rt(this,Ft,new Date(e,r-1,o,i,s,a,0),"f")}}if(!Pt(this,Ft,"f"))throw new Error("Invalid date string format: "+e)}else Ge(e)?Rt(this,Ft,e,"f"):Array.isArray(e)&&Rt(this,Ft,new Date(...e),"f");else Rt(this,Ft,new Date,"f");if(void 0===Pt(this,Ft,"f"))return new Proxy(this,{get:(e,t)=>{}})}toString(){return Pt(this,Ft,"f")?this.format():""}year(e){if(0 in arguments){const t=this.copy();return t.setFullYear(e),new Zt(t)}return Pt(this,Ft,"f").getFullYear()}month(e){if(0 in arguments){const t=this.copy();return t.setMonth(e-1),new Zt(t)}return Pt(this,Ft,"f").getMonth()+1}day(e){if(0 in arguments){const t=this.copy();return t.setDate(e),new Zt(t)}return Pt(this,Ft,"f").getDate()}hours(e){if(0 in arguments){const t=this.copy();return t.setHours(e),new Zt(t)}return Pt(this,Ft,"f").getHours()}minutes(e){if(0 in arguments){const t=this.copy();return t.setMinutes(e),new Zt(t)}return Pt(this,Ft,"f").getMinutes()}seconds(e){if(0 in arguments){const t=this.copy();return t.setSeconds(e),new Zt(t)}return Pt(this,Ft,"f").getSeconds()}weekday(e,t=!1){return 0 in arguments?this.setWeekday(e,t):Pt(this,Ft,"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,Ft,"f").getTime()/1e3)}get mtst(){return Pt(this,Ft,"f").getTime()}get YYYY(){return this.year().toString()}get YY(){return Fe(this.year().toString(),2,2)}get MMMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"long"}).format(Pt(this,Ft,"f"))}get MMM(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{month:"short"}).format(Pt(this,Ft,"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,Ft,"f"))}get ddd(){return new Intl.DateTimeFormat([bbn.env.lang,...navigator.languages],{weekday:"short"}).format(Pt(this,Ft,"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,Ft,"f").getTime()-t.getTime())/864e5;return String(Math.ceil((n+t.getDay()+1)/7)).padStart(2,"0")}get isValid(){return void 0!==Pt(this,Ft,"f")}inLeapYear(){if(this.isValid){const e=Pt(this,Ft,"f").getFullYear();return e%4==0&&e%100!=0||e%400==0}return!1}daysInMonth(){if(this.isValid)switch(Pt(this,Ft,"f").getMonth()){case 1:return Pt(this,Ft,"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,Ft,"f")?new Date(Pt(this,Ft,"f").getTime()):new Date;if(zt[t]){const r=zt[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(!Pt(this,Ft,"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,Ft,"f"))}ftime(e=!1){if(!Pt(this,Ft,"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,Ft,"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[Ut[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 Zt(t)}return Pt(this,Ft,"f")?e?Pt(this,Ft,"f").getTime():Math.floor(Pt(this,Ft,"f").getTime()/1e3):0}sql(e=!1){return Pt(this,Ft,"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=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?Se("%d %s before",r,t):r<0?Se("%d %s after",-r,t):Se("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 Zt?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 Zt(s)}copy(){return new Date(Pt(this,Ft,"f").getTime())}clone(){return new Zt(Pt(this,Ft,"f")?new Date(Pt(this,Ft,"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 Zt(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 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"}),Ye.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&&Ce(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)(),Ce(r)&&(r=r(e,n))}catch(e){Ye(e,t),Xt(Ce(e.getMessage)?e.getMessage():null)}return r})(t.data?t.data:{},o||!1)),i&&r&&Ce(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"+Fe(i,0,1).toUpperCase()+Fe(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"),Ce(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(Le(t)&&Ce(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 Ye(["Value given",e,"type",typeof e,"expected",i.join(" or ")]),r.length&&Ye(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 We(!0,Object.create(Object.getPrototypeOf(e)),e)}return e}Ft=new WeakMap,Nt=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=pt(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&&We(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(Fe(e,0,4)),parseInt(Fe(e,5,2))-1,parseInt(Fe(e,8,2)),12);if(19===e.length)return new Date(parseInt(Fe(e,0,4)),parseInt(Fe(e,5,2))-1,parseInt(Fe(e,8,2)),parseInt(Fe(e,11,2)),parseInt(Fe(e,14,2)),parseInt(Fe(e,17,2)))}else if(Ge(e))return e;return!1}function un(e,t=""){Ye(e)}function ln(e,t=null,n=null){Ye(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(Le(e)&&e){for(;"/"===Fe(e,e.length-1);)e=Fe(e,0,e.length-1);let t=e.lastIndexOf("/");if(t>0)return Fe(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 pn(e){if(e&&Le(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 gn(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(Le(t))o=new Blob([t],{type:n});else try{o=t}catch(e){Ye(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 xn(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=kt("][",".",r),r=kt("[",".",r),r=kt("]","",r)),r.length>2&&r.indexOf("[]")===r.length-2)t=Fe(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 kn(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),Ye("RANGE",e);let n=e.cloneContents();Ye("clonedSelection",n);let r=document.createElement("div");return r.appendChild(n),r.innerHTML}return""}function En(e){return Le(e)?e.replace(/<!--[\s\S]*?-->/g,""):e}function $n(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(),Ce(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=Fe(e[n],bbn.env.root.length):(r.url=e[n],0===r.url.indexOf(bbn.env.root)&&(r.url=Fe(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(Fe(e,0,7))?e:bbn.env.root+e,bbn.env.path=Fe(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&&We(i.data,e.data),e.title&&!t&&(t=e.title),r=!0),t=t?$n(t):bbn.env.siteTitle,r?(i.reload=!0,o.replaceState(i,t,bbn.env.url)):o.pushState(i,t,bbn.env.url)}}function Ln(...e){let t=An(e),n=1;if(!0===t)return!0;if(!t)return Ln(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?(We(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 Ot(t.url,t.datatype,t.obj,n=>{n||Ye(e+bbn._("returned no answer")),He(n)&&(0===Object.keys(n).length&&Ye(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 In(...e){let t=An(e);if(t.url)return Ot(t.url,t.datatype,t.obj,e=>{Gt(t.url,e,t.successFn,t.errorFn,t.ele)},t.errorFn,t.abortFn)}function Cn(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=xn(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),In(...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(kn("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 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(Fe(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(!Le(t)||!bbn.var.regexp.ip.test(t))return!1;return!0}function Wn(...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"}),Ye.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?Re(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=Fe(e,t.length);for(;e.lastIndexOf(t)===e.length-t.length;)e=Fe(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&&Le(n)||(n="..."),e.length>t&&(e=Fe(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:xt,addStyle:function(e,t){He(t)&&Re(t,(t,n)=>{e.style[n]=t})},adjustHeight:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),St("height",e)},adjustSize:St,adjustWidth:function(){let e=arguments;return 1===e.length&&je(e[0])&&(e=e[0]),St("width",e)},ajax:Ot,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:$t,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]={}),We(bbn[e],t)},baseName:Tt,br2nl:function(e){return kt("<br />","\n",kt("<br/>","\n",kt("<br>","\n",e)))},calendar:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate():t&&Le(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)&&Ce(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)"+Mt(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"))},deepPath:function e(t,n,r,o=[]){let i;return(i=bt(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)&&Ce(t)&&(t(),r=1),!r&&Ce(n)&&n()},defaultEndLoadingFunction:cn,defaultErrorFunction:function(e){Ye(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 Ye("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(!Ce(t)&&!Ce(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(Ce(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(Ce(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=""),Ot(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)?Fe(r[n],o.length+1,r[n].length-o.length-2):Tt(e)}if(mn(n)){let e=pn(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 Le(e)?e.replace(/"/g,'\\"'):e},escapeRegExp:Mt,escapeSquotes:function(e){return Le(e)?e.replace(/'/g,"\\'"):e},escapeTicks:function(e){return Le(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&&Le(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:We,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&&Le(t)?t:""},fdatetime:function(e,t=!1){let n=Jt(e);return n.isValid?n.fdate(!1,!0):t&&Le(t)?t:""},fieldValue:_n,fileExt:pn,filter:rn,filterToConditions:pt,findAll:function e(t,n,r,o=[]){let i,s=0;for(;(i=bt(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":Le(e)?e:!t&&"auto"},formdata:xn,fphone:function(e){var t;if(Ae(e)&&(e=e.toString()),Le(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&&Le(t)?t:""},getAllTags:function(){return Sn(Array.prototype.map.apply(document.all,[e=>e.tagName.toLowerCase()]))},getAncestors:Mn,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:kn,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: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){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=En(n)),n.trim()},getHTMLOfSelection:On,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:Dt,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;"}),Ye.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:$n,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;"}),Ye.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&&"/"!==Fe(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&&We(!0,bbn,e),bbn.env.path=Fe(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(),Ln(t.getAttribute("href")),!1):void 0}),Pe(document.querySelectorAll("form:not(.bbn-no), form:not(.bbn-form)"),e=>{e.addEventListener("submit",t=>{Cn(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?Ln(e.url,We({title:e.title||bbn.env.siteTitle},e.data||{})):e&&e.data&&Ce(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&&Ye("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: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(!Le(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(!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(!Le(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:Ce,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(!Le(t))return!1;if(!Bn(t)&&!bbn.var.regexp.hostname.test(t))return!1}return!0},isInside:function(e,t){let n=Mn(e);if(n.length){if(Le(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:Ie,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:Rn,isMobileDevice:Fn,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:Le,isSymbol:Wn,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:Hn,isValidName:function(...e){if(!e.length)return!1;for(let t of e)if(!Le(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:Re,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:Ln,log:Ye,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&&Ye(["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(Wn(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"),Ye(a.__bbnParent),n(a,"length",r),t};if(Ce(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(Wn(a))return Reflect.get(t,a,u);const l=t.__bbnRoot||t,c=o?o+"."+a:a;if(Wn(a))return Reflect.get(t,a);if(r&&r.$options&&"bbn-loadbar"===r.$options.name&&Ye(["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&&Ye(["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||Wn(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=bt(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 kt("\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:In,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"),xt(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=kt("'","'",e)),t&&0!==t.toLowerCase().indexOf("d")||(e=kt('"',""",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:En,removePrivateProp:Ne,removeTrailingChars:function(e,t){if(t||(t=" "),t.length){for(;Fe(e,-t.length)===t;)e=Fe(e,0,e.length-t.length);for(;Fe(e,0,t.length)===t;)e=Fe(e,t.length)}return e},repeat:function(e,t){return e.repeat(t)},replaceAll:kt,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 Re(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:bt,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)=>{Le(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=Dt(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=Ce(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+=$t(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;Ce(o)&&(n=o(t.message,e)),n&&un(t.message,e)}else{let e=1;Ce(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:Cn,substr:Fe,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+kt(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;Re(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:Sn,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&&(Ye("SUCCESS",e),n(e))}).catch(e=>{r&&(Ye("ERROR",e),r(e))}):i()},warning:Un,yieldToBrowser:wn};s.extend(c),s.extend(m),s.extend(y),s.extend(x),s.extend(D),s.extend(T),s.extend(C),s.extend(R),s.extend(W),s.extend(V),s.extend(Q),s.extend(re),s.extend(ae),s.extend(fe),s.extend(pe),s.extend(we),s.extend(xe);const Kn={version:"1.0.1",opt:{_cat:{}},app:{},_:Se,$: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:Me,date:Jt,com:Te,env:ke,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}({});
|
|
2
2
|
//# sourceMappingURL=bbn.js.map
|