@progress/telerik-angular-report-viewer 31.26.1007 → 32.26.1110

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.
@@ -63,7 +63,7 @@ Verify that registration scripts for this type are included after Kendo UI on th
63
63
  <button tabindex="-1" class="k-calendar-nav-today k-flex k-button k-button-flat k-button-primary">
64
64
  <span class="k-button-text"></span>
65
65
  </button>
66
- </div>`).appendTo(a)),r._today=o.show().find(`.k-button-flat.k-button-primary`).attr(`title`,n.toString(i,`D`,r.options.culture)),o.find(`.k-button-text`).html(t(i)),r._toggle()},_header:function(){var t=this,r=t.element,i=t.options.linksSelector;r.find(K)[0]||r.html(n.template(t.options.header.template)(e.extend(!0,{},t.options,{actionAttr:n.attr(`action`),size:n.getValidCssClass(`k-button-`,`size`,t.options.size),isRtl:t.isRtl()}))),r.find(i).on(`click.kendoCalendar touchend.kendoCalendar`,function(){return!1}),t._title=r.find(`[`+n.attr(`action`)+`="nav-up"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[B]=r.find(`[`+n.attr(`action`)+`="prev"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[V]=r.find(`[`+n.attr(`action`)+`="next"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()}),r.find(`[`+n.attr(`action`)+`="today"]`).on(`click.kendoCalendar touchend.kendoCalendar`,t._todayClick.bind(t))},_navigate:function(e,t){var n=this,r=n._index+1,i=new W(+n._current);n._isMultipleSelection()&&(i=Ce(n._table.find(`td:not(.k-other-month):not(.k-empty)`).has(`.k-link`).first().find(`span`)),n._current=new Date(+i)),e=n[e],e.hasClass(k)||(r>3?i.setFullYear(i.getFullYear()+100*t):q.views[r].setDate(i,t),n.navigate(i),n._restoreSelection())},_option:function(e,n){var r=this,i=r.options,a=r._value||r._current,o;if(n===t)return i[e];n=s(n,i.format,i.culture),n&&(i[e]=new W(+n),o=e===`min`?n>a:a>n,(o||ve(a,n))&&(o&&(r._value=null),r._changeView=!0),r._changeView||=!!(i.month.content||i.month.empty),r.navigate(r._value),r._toggle())},_toggle:function(e){var n=this,r=n.options,i=n.options.disableDates(oe()),a=n._today,o=n._todayClass();e===t&&(e=Y(oe(),r.min,r.max)),a&&(a.off(S),e&&!i?a.addClass(o).removeClass(k).on(S,n._todayClick.bind(n)):a.removeClass(o).addClass(k).on(S,fe))},_todayClass:function(){return`k-calendar-nav-today`},_todayClick:function(e){var t=this,n=G[t.options.depth],r=t.options.disableDates,i=oe();e.preventDefault(),!r(i)&&(t._view.compare(t._current,i)===0&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[i],t.selectable._lastActive=null),t._value=i,t.navigate(i,n),t.trigger(E))},_templates:function(){var e=this,t=e.options,r=t.footer,i=t.month,a=i.content,o=i.weekNumber,s=i.empty,c=e=>`${n.toString(e,`D`,t.culture)}`;e.month={content:e=>`<td class="${e.cssClass}" role="gridcell"${e.ariaDisabled?` aria-disabled="true"`:``}><span tabindex="-1" class="k-link ${e.linkClass}" data-href="${e.url}" ${n.attr(O)}="${e.dateString}" title="${e.title}">${we(a,e)||e.value}</span></td>`,empty:e=>`<td role="gridcell">${we(s,e)||`&nbsp;`}</td>`,weekNumber:e=>`<td class="k-calendar-td k-alt">${we(o,e)||e.weekNumber}</td>`},e.year={content:m(e=>`<td class="${e.cssClass}" role="gridcell"><span tabindex="-1" class="k-link" data-href="#" data-${e.ns}value="${e.dateString}" aria-label="${e.label}">${e.value}</span></td>`)},r&&r!==!0&&(c=r),e.footer=r===!1?null:m(c,{useWithBlock:!1})},_updateAria:function(e,t){var r=this,i=r._cell,a=r.view().valueType(),o=t||r.current(),s=a===`month`?n.toString(o,`MMMM`):a===`date`?n.toString(o,`D`):i.text();return i.attr(`aria-label`,e({current:o,valueType:a,text:s})),i.attr(`id`)}});i.plugin(re);var q={firstDayOfMonth:function(e){return pe(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t||=n.culture().calendar;var r=t.firstDay,i=new W(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=r;)q.setTime(i,-1*ee);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),r=new W(e.getTime()+t),i=r.getTimezoneOffset()-n;e.setTime(r.getTime()+i*6e4)},views:[{name:w,title:function(e,t,n,r){return me(r).months.names[e.getMonth()]+` `+e.getFullYear()},content:function(e){var r=this,i=0,a=e.min,o=e.max,s=e.date,d=e.dates,f=e.format,p=e.culture,m=e.url,h=e.showHeader,g=e.showOtherMonthDays,_=e.isWeekColumnVisible,v=m&&d[0],y=me(p),b=y.firstDay,x=y.days,S=ce(x.names,b),C=ce(x.namesShort,b),w=q.firstVisibleDay(s,y),T=r.first(s),E=r.last(s),D=r.toDateString,O=oe(),A=`<table tabindex="0" role="grid" class="`+e.contentClasses+`" cellspacing="0" data-start="`+D(w)+`">`;for(h&&(A+=`<caption class="k-calendar-caption k-month-header">`+this.title(s,a,o,p)+`</caption>`),A+=`<thead class="k-calendar-thead" role="rowgroup"><tr role="row" class="k-calendar-tr">`,_&&(A+=`<th scope="col" role="columnheader" class="k-calendar-th k-alt" aria-label="`+c(e.messages.weekColumnHeader||``)+`">`+c(e.messages.weekColumnHeader)+`</th>`);i<7;i++)A+=`<th scope="col" role="columnheader" class="k-calendar-th" aria-label="`+S[i]+`">`+C[i]+`</th>`;return l(O,0),O=+O,J({cells:42,perRow:7,html:A+=`</tr></thead><tbody class="k-calendar-tbody" role="rowgroup"><tr role="row" class="k-calendar-tr">`,start:pe(w.getFullYear(),w.getMonth(),w.getDate()),isWeekColumnVisible:_,weekNumber:e.weekNumber,min:pe(a.getFullYear(),a.getMonth(),a.getDate()),max:pe(o.getFullYear(),o.getMonth(),o.getDate()),showOtherMonthDays:g,content:e.content,lastDayOfMonth:E,empty:e.empty,setter:r.setDate,disableDates:e.disableDates,build:function(e,r,i){var a=[`k-calendar-td`],o=e.getDay(),s=``,c=`#`;(e<T||e>E)&&a.push(j);var l=i(e);return l&&a.push(k),+e===O&&a.push(`k-today`),(o===0||o===6)&&a.push(`k-weekend`),v&&ge(+e,d)&&(c=m.replace(`{0}`,n.toString(e,f,p)),s=` k-action-link`),{date:e,dates:d,ns:n.ns,title:n.toString(e,`D`,p),value:e.getDate(),dateString:D(e),cssClass:a.join(` `),linkClass:s,url:c,ariaDisabled:l||t}},weekNumberBuild:function(e){return{weekNumber:u(e,n.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return q.firstDayOfMonth(e)},last:function(e){var t=pe(e.getFullYear(),e.getMonth()+1,0),n=q.firstDayOfMonth(e),r=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return r&&t.setHours(n.getHours()+r/60),t},compare:function(e,t){var n,r=e.getMonth(),i=e.getFullYear(),a=t.getMonth(),o=t.getFullYear();return n=i>o?1:i<o?-1:r==a?0:r>a?1:-1,n},setDate:function(e,t){var n=e.getHours();t instanceof W?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):q.setTime(e,t*ee),l(e,n)},toDateString:function(e){return e.getFullYear()+`/`+e.getMonth()+`/`+e.getDate()},valueType:function(){return`date`}},{name:`year`,title:function(e){return e.getFullYear()},content:function(e){var t=me(e.culture).months,r=t.namesAbbr,i=t.names,a=this.toDateString,o=e.min,s=e.max,c=``;return e.showHeader&&(c+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,c+=`<caption class="k-calendar-caption k-meta-header">`,c+=this.title(e.date),c+=`</caption>`,c+=`<tbody class="k-calendar-tbody" role="rowgroup">`,c+=`<tr role="row" class="k-calendar-tr">`),J({min:pe(o.getFullYear(),o.getMonth(),1),max:pe(s.getFullYear(),s.getMonth(),1),start:pe(e.date.getFullYear(),0,1),html:c,setter:this.setDate,content:e.content,build:function(e){var t=[`k-calendar-td`],o=oe();return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&t.push(`k-today`),{value:r[e.getMonth()],label:i[e.getMonth()],ns:n.ns,dateString:a(e),cssClass:t.join(` `)}}})},first:function(e){return pe(e.getFullYear(),0,e.getDate())},last:function(e){return pe(e.getFullYear(),11,e.getDate())},compare:function(e,t){return ae(e,t)},setDate:function(e,t){var n,r=e.getHours();t instanceof W?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),l(e,r)},toDateString:function(e){return e.getFullYear()+`/`+e.getMonth()+`/1`},valueType:function(){return`month`}},{name:`decade`,title:function(e,t,n){return ie(e,t,n,10)},content:function(e){var t=e.date.getFullYear(),r=this.toDateString,i=``;return e.showHeader&&(i+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,i+=`<caption class="k-meta-header">`,i+=this.title(e.date,e.min,e.max),i+=`</caption>`,i+=`<tbody class="k-calendar-thead">`,i+=`<tr role="row" class="k-calendar-tr">`),J({start:pe(t-t%10,0,1),min:pe(e.min.getFullYear(),0,1),max:pe(e.max.getFullYear(),0,1),showOtherMonthDays:e.showOtherMonthDays,html:i,setter:this.setDate,build:function(e,t){var i=[`k-calendar-td`],a=oe().getFullYear();return t===10||t===11?i.push(M):e.getFullYear()===a&&i.push(`k-today`),{value:e.getFullYear(),ns:n.ns,dateString:r(e),cssClass:i.join(` `)}}})},first:function(e){var t=e.getFullYear();return pe(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return pe(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return ae(e,t,10)},setDate:function(e,t){le(e,t,1)},toDateString:function(e){return e.getFullYear()+`/0/1`},valueType:function(){return`year`}},{name:T,title:function(e,t,n){return ie(e,t,n,100)},content:function(e){var t=e.date.getFullYear(),r=e.min.getFullYear(),i=e.max.getFullYear(),a=this.toDateString,o=r,s=i,c=``;o-=o%10,s-=s%10,s-o<10&&(s=o+9),e.showHeader&&(c+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,c+=`<caption class="k-calendar-caption k-meta-header">`,c+=this.title(e.date,e.min,e.max),c+=`</caption>`,c+=`<tbody class="k-calendar-tbody">`,c+=`<tr role="row" class="k-calendar-tr">`);var l=oe().getFullYear()-oe().getFullYear()%10;return J({start:pe(t-t%100,0,1),min:pe(o,0,1),max:pe(s,0,1),showOtherMonthDays:e.showOtherMonthDays,html:c,setter:this.setDate,build:function(t,o){var s=[`k-calendar-td`],c=t.getFullYear(),u=c+9;return o===10||o===11?s.push(M):c<=l&&u>=l&&s.push(`k-today`),c<r&&(c=r),u>i&&(u=i),{ns:n.ns,value:e.centuryCellsFormat===`long`?`${c} - ${u}`:c,dateString:a(t),cssClass:s.join(` `)}}})},first:function(e){var t=e.getFullYear();return pe(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return pe(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return ae(e,t,100)},setDate:function(e,t){le(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+`/0/1`},valueType:function(){return`decade`}}]};function ie(e,t,n,r){var i=e.getFullYear(),a=t.getFullYear(),o=n.getFullYear(),s;return i-=i%r,s=i+(r-1),i<a&&(i=a),s>o&&(s=o),i+`-`+s}function J(e){var t=0,n,r=e.min,i=e.max,a=e.start,o=e.setter,s=e.build,c=e.weekNumberBuild,u=e.cells||12,d=e.isWeekColumnVisible,f=e.perRow||4,p=e.showOtherMonthDays,m=e.lastDayOfMonth,h=e.weekNumber||y,b=e.content||g,x=e.empty||_,S=e.otherMonthCellTemplate||v,C=e.html||`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0"><tbody class="k-calendar-tbody" role="rowgroup"><tr role="row" class="k-calendar-tr">`;for(d&&(C+=h(c(a)));t<u;t++)t>0&&t%f===0&&(C+=`</tr><tr role="row" class="k-calendar-tr">`,d&&(C+=p||+a<=+m?h(c(a)):h({weekNumber:`&nbsp;`}))),a=pe(a.getFullYear(),a.getMonth(),a.getDate()),l(a,0),n=s(a,t,e.disableDates),n.cssClass.indexOf(j)!==-1&&!p?C+=S(n):Y(a,r,i)&&n.cssClass.indexOf(M)===-1?C+=b(n):C+=x(n),o(a,1);return C+`</tr></tbody></table>`}function ae(e,t,n){var r=e.getFullYear(),i=t.getFullYear(),a=i,o=0;return n&&(i-=i%n,a=i-i%n+n-1),r>a?o=1:r<i&&(o=-1),o}function oe(){var e=new W;return new W(e.getFullYear(),e.getMonth(),e.getDate())}function se(e,t,n){var r=oe();return e&&(r=new W(+e)),t>r?r=new W(+t):n<r&&(r=new W(+n)),r}function Y(e,t,n){return+e>=+t&&+e<=+n}function ce(e,t){return e.slice(t).concat(e.slice(0,t))}function le(e,t,n){t=t instanceof W?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function ue(e,t){if(+t<+e){var r=+e;q.views[0].setDate(e,t),q.views[0].setDate(t,new Date(r))}var i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil((a-+i)/n.date.MS_PER_DAY)}function X(e,t,n,r){for(var i=0;i<=t;i++){var a=new Date(n.getTime());a=new Date(a.setDate(a.getDate()+i)),r(a)||e.push(a)}}function de(t){e(this).hasClass(`k-disabled`)||e(this).toggleClass(`k-hover`,L.indexOf(t.type)>-1||t.type==`focus`)}function fe(e){e.preventDefault()}function pe(e,t,n){var r=new W(e,t,n);return r.setFullYear(e,t,n),r}function me(e){return h(e).calendars.standard}function he(e){var n=G[e.start],r=G[e.depth],i=h(e.culture);e.format=p(e.format||i.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=w),(r===t||r>n)&&(e.depth=w),e.dates===null&&(e.dates=[])}function ge(e,t){for(var n=0,r=t.length;n<r;n++)if(e===+t[n])return!0;return!1}function _e(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function ve(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}function ye(t){return n.isFunction(t)?t:Array.isArray(t)?xe(t):e.noop}function be(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].setHours(0,0,0,0));return t}function xe(e){var t,n=[],r=[`su`,`mo`,`tu`,`we`,`th`,`fr`,`sa`];return e[0]instanceof W?(n=be(e),t=e=>!!(e&&n.indexOf(new Date(e).setHours(0,0,0,0))>-1)):(n=e.map(e=>{e=e.slice(0,2).toLowerCase();let t=r.indexOf(e);if(t>-1)return t}),t=e=>!!(e&&n.indexOf(new Date(e).getDay())>-1)),t}function Se(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function Ce(t){var r=e(t).attr(n.attr(O)).split(`/`);return r=pe(r[0],r[1],r[2]),r}function we(e,r){return e?n.isFunction(e)?e(r):m(e)(r):t}q.isEqualDatePart=_e,q.isEqualDate=Se,q.restrictValue=se,q.isInRange=Y,q.normalize=he,q.viewsEnum=G,q.disabled=ye,q.toDateObject=Ce,q.getToday=oe,q.createDate=pe,n.calendar=q})(window.kendo.jQuery),kendo;let jv=e=>e?new Date(e.getTime()):null,Mv=(e,t)=>{let n=jv(e);return t===0&&n.getHours()===23&&n.setHours(n.getHours()+2),n},Nv=(e,t)=>{let n=jv(e);return n.setDate(n.getDate()+t),Mv(n,e.getHours())},Pv=(e,t,n,r=0,i=0,a=0,o=0)=>{let s=new Date(e,t,n,r,i,a,o);return e>-1&&e<100&&s.setFullYear(s.getFullYear()-1900),Mv(s,r)},Fv=e=>{let t=Pv(e.getFullYear(),e.getMonth()+1,1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return Nv(t,-1)},Iv=(e,t)=>e.getMonth()===t?e:Fv(Lv(e,-1)),Lv=(e,t)=>{let n=jv(e),r=(12+(n.getMonth()+t)%12)%12;return n.setMonth(n.getMonth()+t),Iv(Mv(n,e.getHours()),r)};var Rv;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Rv||={});var zv;(function(e){e[e.Sunday=0]=`Sunday`,e[e.Monday=1]=`Monday`,e[e.Tuesday=2]=`Tuesday`,e[e.Wednesday=3]=`Wednesday`,e[e.Thursday=4]=`Thursday`,e[e.Friday=5]=`Friday`,e[e.Saturday=6]=`Saturday`})(zv||={});let Bv=e=>Pv(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),Vv=(e,t)=>!e&&!t||e&&t&&e.getTime()===t.getTime();new Date().getTime();var Hv=class{constructor(){this.symbols=``,this.partMap=[]}};let Uv={formatSeparator:`_`,twoDigitYearMax:68,defaultDateFormat:`d`,defaultLocaleId:`en`},Wv={DELETE:`Delete`,BACKSPACE:`Backspace`,TAB:`Tab`,ENTER:`Enter`,ESCAPE:`Escape`,ARROW_LEFT:`ArrowLeft`,ARROW_UP:`ArrowUp`,ARROW_RIGHT:`ArrowRight`,ARROW_DOWN:`ArrowDown`,SPACE:` `,END:`End`,HOME:`Home`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`},Gv=e=>Array(Math.max(e,0)).fill(`0`).join(``),Kv=e=>e.replace(/^0*/,``),qv=({oldText:e,newText:t,formatPattern:n,selectionStart:r,isInCaretMode:i,keyEvent:a})=>{let o=r+e.length-t.length,s=e[o],c=e.substring(0,o),l=t.substring(0,r),u=[];if(c===l&&r>0)return u.push([n[r-1],l[r-1]]),u;if(c.indexOf(l)===0&&i&&(a.key===Wv.DELETE||a.key===Wv.BACKSPACE)||c.indexOf(l)===0&&!i&&(l.length===0||n[l.length-1]!==n[l.length])){let e=``;!i&&l.length===1&&u.push([n[0],l[0]]);for(let t=l.length;t<c.length;t++)n[t]!==e&&n[t]!==Uv.formatSeparator&&(e=n[t],u.push([e,``]));return u}if(i&&(l.indexOf(c)===0||n[r-1]===Uv.formatSeparator)||!i&&(l.indexOf(c)===0||n[r-1]===Uv.formatSeparator)){let e=n[0];for(let t=Math.max(0,c.length-1);t<n.length;t++)if(n[t]!==Uv.formatSeparator){e=n[t];break}return[[e,l[r-1]]]}return l[l.length-1]===` `||l[l.length-1]===s&&n[o]===`_`?[[n[r-1],Uv.formatSeparator]]:[[n[r-1],l[r-1]]]},Jv=(e,t)=>(e[t.pattern[0]]=t.type,e),Yv=e=>e&&typeof e==`object`&&!Array.isArray(e),Xv=e=>e instanceof HTMLElement,Zv=e=>(t,n)=>{let r=jv(t);return r[e](n),r},Qv=e=>e!=null,$v=()=>!!document,ey=e=>Qv(e)&&typeof e==`number`&&!Number.isNaN(e),ty=e=>parseInt(e,10),ny=e=>ey(ty(e))&&/^[0-9]+$/.test(e),ry=(e,t,n)=>Math.min(n,Math.max(t,e)),iy=(...e)=>Object.assign(...e),ay=(e,...t)=>{if(!t.length)return e;let n=t.shift();if(Yv(e)&&Yv(n))for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||t===`__proto__`||t===`constructor`||t===`prototype`||(Xv(n[t])?e[t]=n[t]:Yv(n[t])&&!(n[t]instanceof Date)?((!e[t]||!Yv(e[t]))&&iy(e,{[t]:{}}),ay(e[t],n[t])):iy(e,{[t]:n[t]}));return ay(e,...t)},oy=e=>typeof e==`function`,sy=e=>!Qv(e)||isNaN(e.getTime())?0:Number(e.getFullYear().toString().slice(-2)),cy=Zv(`setFullYear`),ly=e=>{let t=e&&e.match(/S+(\1)/);return t?t[0].length:0},uy=e=>10**(3-e),dy=(e,t,n,r,i,a,o,s)=>!!(e&&e.getFullYear()===t&&e.getMonth()===n&&e.getDate()===r&&e.getHours()===i&&e.getMinutes()===a&&e.getSeconds()===o&&e.getMilliseconds()===s),fy=e=>Qv(e)&&e.getTime&&ey(e.getTime()),py=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Macintosh/i.test(navigator.userAgent),my=2e3,hy=/d|M|H|h|m|s/;var gy=class{set value(e){e&&!(e instanceof Date)||(this._value=e,this.resetInvalidDate())}get value(){return this._value}get localeId(){let e=Uv.defaultLocaleId,t=Object.keys(this.intl.cldr);for(let n=0;n<t.length;n++){let r=t[n],i=this.intl.cldr[r];if(i.name&&i.calendar&&i.numbers&&i.name!==Uv.defaultLocaleId){e=i.name;break}}return e}constructor({intlService:e,formatPlaceholder:t,format:n,cycleTime:r=!1,twoDigitYearMax:i=Uv.twoDigitYearMax,value:a=null,autoCorrectParts:o=!0,toggleDayPeriod:s=!1,autoSwitchParts:c=!0}){if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.dayperiod=!0,this.leadingZero=null,this.typedMonthPart=``,this.knownParts=`adHhmMsEyS`,this.symbols={E:`E`,H:`H`,M:`M`,a:`a`,d:`d`,h:`h`,m:`m`,s:`s`,y:`y`,S:`S`},this._value=this.getDefaultDate(),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.setOptions({intlService:e,formatPlaceholder:t,format:n,cycleTime:r,twoDigitYearMax:i,value:a,autoCorrectParts:o,toggleDayPeriod:s,autoSwitchParts:c}),a)this._value=jv(a);else{this._value=this.getDefaultDate();let e=this.dateFormatString(this.value,this.format).symbols;for(let t=0;t<e.length;t++)this.setExisting(e[t],!1)}}setOptions(e){this.intl=e.intlService,this.formatPlaceholder=e.formatPlaceholder||`wide`,this.format=e.format,this.cycleTime=e.cycleTime,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=e.twoDigitYearMax,this.autoCorrectParts=e.autoCorrectParts,this.toggleDayPeriod=e.toggleDayPeriod,this.autoSwitchParts=e.autoSwitchParts}setValue(e){e?Vv(e,this._value)?Vv(e,this._value)&&this.dayPeriods&&this.setExisting(`a`,!0):(this._value=jv(e),this.modifyExisting(!0)):(this._value=this.getDefaultDate(),this.modifyExisting(!1)),this.resetInvalidDate()}hasValue(){return this.intl.splitDateFormat(this.format,this.localeId).reduce((e,t)=>e||t.type!==`literal`&&t.type!==`dayperiod`&&this.getExisting(t.pattern[0]),!1)}getValue(){for(let e=0;e<this.knownParts.length;e++)if(!this.getExisting(this.knownParts[e]))return null;return jv(this.value)}createDefaultDate(){return Pv(my,0,31)}getDefaultDate(){return Bv(this.createDefaultDate())}getFormattedDate(e){return this.intl.formatDate(this.getValue(),e,this.localeId)}getTextAndFormat(e=``){let t=e||this.format,n=this.intl.formatDate(this.value,t,this.localeId),r=this.dateFormatString(this.value,t);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){let e=``,i=this.intl.formatDate(this.value,t,this.localeId),a=this.getFormattedInvalidDates(t);for(let t=0;t<i.length;t++){let i=r.symbols[t];if(r.partMap[t].type===`literal`)e+=n[t];else if(this.getInvalidDatePartValue(i)){let n=this.getPartsForSegment(r,t);if(i===`M`){let r=(ty(this.getInvalidDatePartValue(i))+1).toString();if(n.length>2)e+=a[i][t];else if(this.getInvalidDatePartValue(i)){let i=Gv(n.length-r.length)+r;e+=i,t+=n.length-1}else e+=a[i][t]}else if(this.getInvalidDatePartValue(i)){let r=this.getInvalidDatePartValue(i).toString(),a=Gv(n.length-r.length)+r;e+=a,t+=n.length-1}else e+=a[i][t]}else e+=n[t]}n=e}return this.merge(n,r)}getFormattedInvalidDates(e=``){let t=e||this.format,n={E:``,H:``,M:``,a:``,d:``,h:``,m:``,s:``,y:``,S:``};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{let r=this.getInvalidDatePart(e).date;if(r){let i=this.intl.formatDate(r,t,this.localeId);n[e]=i}}),n}modifyExisting(e){let t=this.dateFormatString(this.value,this.format).symbols;for(let n=0;n<t.length;n++)this.setExisting(t[n],e)}getExisting(e){switch(e){case`y`:return this.year;case`M`:case`L`:return this.month;case`d`:return this.date;case`E`:return this.date&&this.month&&this.year;case`h`:case`H`:return this.hours;case`t`:case`a`:return this.dayperiod;case`m`:return this.minutes;case`s`:return this.seconds;case`S`:return this.milliseconds;default:return!0}}setExisting(e,t){switch(e){case`y`:this.year=t,t===!1&&this._value.setFullYear(my);break;case`M`:this.month=t,t===!1&&this.autoCorrectParts&&this._value.setMonth(0);break;case`d`:this.date=t;break;case`h`:case`H`:this.hours=t;break;case`t`:case`a`:this.dayperiod=t;break;case`m`:this.minutes=t;break;case`s`:this.seconds=t;break;case`S`:this.milliseconds=t;break;default:break}this.getValue()&&this.resetInvalidDate()}modifyPart(e,t){if(!Qv(e)||!Qv(t)||t===0)return;let n=jv(this.value),r=!1,i,a=e===`M`,o=e===`d`||e===`E`,s=this.getExisting(e);if(!this.autoCorrectParts&&(o||a)){let r=this._partiallyInvalidDate.invalidDateParts||{},c=this.getInvalidDatePartValue(e),l=r.y.value||n.getFullYear(),u=r.M.value||n.getMonth(),d=r.d.value||r.E.value||n.getDate(),f=r.h.value||r.H.value||n.getHours(),p=r.m.value||n.getMinutes(),m=r.s.value||n.getSeconds(),h=r.S.value||n.getMilliseconds();switch(e){case`y`:l+=t;break;case`M`:u+=t;break;case`d`:case`E`:d+=t;break;default:break}if(e===`M`){if((u<0||u>11)&&s){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}if(!s){if(u<0)u=ry(11+(u%11+1),0,11);else{let e=Qv(c)?u:(t-1)%12;u=ry(e,0,11)}u=ry(u,0,11)}u=ry(u,0,11)}else if(e===`d`){if(s){if(d<=0||d>31){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}}else if(!s){if(Qv(c)&&(d<=0||d>31)){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}if(t<0){let e=Qv(c)?d:1+(31-Math.abs(t%31));d=ry(e,1,31)}else{let e=Qv(c)?d:t%31;d=ry(e,1,31)}d=ry(d,1,31)}}let g=Pv(l,u,d,f,p,m,h),_=a||o?this.modifyDateSymbolWithValue(n,e,a?u:d):null,v=dy(g,l,u,d,f,p,m,h);this.getValue()&&dy(g,l,u,d,f,p,m,h)?(n=jv(g),this.markDatePartsAsExisting()):a&&_?_.getMonth()===u?this.getExisting(`d`)?v?(n=jv(g),this.resetInvalidDateSymbol(e)):(i=!0,this.setInvalidDatePart(e,{value:u,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):v?(this.resetInvalidDateSymbol(e),n=jv(g),this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`))):(this.resetInvalidDateSymbol(e),n=jv(_)):(i=!0,this.setInvalidDatePart(e,{value:u,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):o&&_&&(_.getDate()===d?this.getExisting(`M`)?v?(n=jv(g),this.resetInvalidDateSymbol(e)):(i=!0,this.setInvalidDatePart(e,{value:d,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):v?(n=jv(g),this.resetInvalidDateSymbol(e),this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`))):(this.resetInvalidDateSymbol(e),n=jv(_)):(i=!0,this.setInvalidDatePart(e,{value:d,date:jv(this.value),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)))}else{let i=n.getHours();switch(e){case`y`:n.setFullYear(n.getFullYear()+t);break;case`M`:n=Lv(this.value,t);break;case`d`:case`E`:n.setDate(n.getDate()+t);break;case`h`:case`H`:n.setHours(n.getHours()+t),r=!0;break;case`m`:n.setMinutes(n.getMinutes()+t),r=!0;break;case`s`:n.setSeconds(n.getSeconds()+t),r=!0;break;case`S`:n.setMilliseconds(n.getMilliseconds()+t);break;case`a`:this.toggleDayPeriod?n.setHours(i>=12?i-12:i+12):n.setHours(n.getHours()+12*t),r=!0;break;default:break}}this.shouldNormalizeCentury()&&(n=this.normalizeCentury(n)),r&&!this.cycleTime&&(n.getDate(),this._value.getDate()),i||(this.setExisting(e,!0),this._value=n,this.getValue()&&this.resetInvalidDate())}parsePart({symbol:e,currentChar:t,resetSegmentValue:n,cycleSegmentValue:r,rawTextValue:i,isDeleting:a,originalFormat:o}){let s=!r,c=this.dateFormatString(this.value,this.format),l=c.partMap.filter(e=>e.type===`literal`).map((e,t)=>({datePartIndex:t,type:e.type,pattern:e.pattern,literal:``})),u=c.partMap.map(e=>({type:e.type,pattern:e.pattern,text:``}));for(let e=0;e<l.length;e++){let t=l[e];for(let n=0;n<t.pattern.length;n++)l[e+n]&&(l[e+n].literal=t.pattern[n]);e+=t.pattern.length-1}for(let e=0;e<u.length;e++){let t=u[e];for(let n=0;n<t.pattern.length;n++)u[e+n]&&(u[e+n].text=t.pattern[n]);e+=t.pattern.length-1}let d={value:null,switchToNext:!1,resetPart:s&&e===`M`&&c.partMap.filter(e=>e.type===`month`).some(e=>e.pattern.length>2),hasInvalidDatePart:!1};if(!t)if(s)for(let t=0;t<l.length;t++){let n=l[t].literal,r=i.startsWith(n),a=i.endsWith(n),o=i.indexOf(n+n)>=0;if(r||a||o)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),iy(d,{value:null,switchToNext:!1})}else return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),iy(d,{value:null,switchToNext:!1});let f=this.intl.formatDate(this.value,this.format,this.localeId),p=c.symbols,m=!1,h=``,g=``,_=``,v=``,y=``,b=``,x=``;for(let e=0;e<u.length;e++)x+=u[e].text;let S=this.format===p||this.format===x||this.format===o||this.format.length===o.length,C=(S?x:o).indexOf(e),w=(S?x:o).lastIndexOf(e)-C+1,T=o.length-i.length;if(s||!s&&!this.autoCorrectParts){let n=0;for(let t=0;t<f.length;t++)if(p[t]===e){let r=this.getExisting(e);if(e===`y`)if(!this.hasInvalidDatePart()&&this.getExisting(`y`))g+=f[t];else{let i=this.getInvalidDatePartValue(e);Qv(i)?(g+=(i||``).toString()[n]||``,n++):g+=r?f[t]:`0`}else g+=r?f[t]:`0`;T>0?_.length+T<w&&(_+=i[t]||``):_+=i[t]||``,m=!0}else m?(b+=f[t],y+=f[t]):(h+=f[t],v+=f[t]);if(S&&(x.length<i.length?_+=t:!a&&(o.length,i.length),this.autoCorrectParts&&_.length>w))return iy(d,{value:null,switchToNext:!1});if(!S||S&&!this.autoCorrectParts){g=``,_=``,h=``,b=``,m=!1;let n=x.indexOf(e),r=0,a=0;for(let t=0;t<o.length;t++)if(o[t]===e){let o=this.getExisting(e),s=n+r;if(e===`y`)if(!this.hasInvalidDatePart()&&this.getExisting(`y`))g+=f[s];else{let t=this.getInvalidDatePartValue(e);Qv(t)?(g+=(t||``).toString()[a]||``,a++):g+=o?f[s]:`0`}else g+=o?f[s]||``:`0`;r++,T>0?_.length+T<w&&(_+=i[t]||``):_+=i[t]||``,m=!0}else m?b+=i[t-T]||``:h+=i[t]||``;o.length<i.length&&(_+=t)}}if(!s)if(this.autoCorrectParts){g=``,_=``,h=``,b=``,m=!1;for(let t=0;t<f.length;t++)if(p[t]===e){let n=this.getExisting(e);g+=n?f[t]:`0`,m=!0}else m?b+=f[t]:h+=f[t]}else g=n?_:g;let E=null,{monthName:D,matchesCount:O}=e===`M`?this.matchMonth(t):{monthName:``,matchesCount:0},k=this.matchDayPeriod(t,e),A=t===`0`,j=this.leadingZero||{};A?(_===`0`&&(_=g),ty(n?t:(s?_:g)+t)===0&&!this.isAbbrMonth(c.partMap,e)&&e!==`a`&&this.incrementLeadingZero(e)):this.resetLeadingZero();let M=this.partPattern(c.partMap,e),N=M?M.pattern:null,P=this.patternLength(N)||(N?N.length:0);if(s&&a&&!_)return this.setExisting(e,!1),iy(d,{value:null,switchToNext:!1});let F=g.length-3,I=!0,L=s?_:g;for(let r=Math.max(0,F);r<=g.length&&I;r++){L=n?t:s?_:g.substring(r)+t,this.autoSwitchParts&&e===`h`&&g.substring(r)===`12`&&(L=L.replace(`12`,`0`)),(s||!this.autoCorrectParts)&&(I=!1,L=Kv(L),L=Gv(P-L.length)+L);let i=parseInt(L,10),o=h+L+b;E=this.intl.parseDate(o,this.format,this.localeId),E&&this.value&&c.partMap.every(e=>e.type!==`year`&&e.type!==`month`&&e.type!=`day`)&&(E.setFullYear(this.value.getFullYear()),E.setMonth(this.value.getMonth()),E.setDate(this.value.getDate()));let l=!1;if(s&&!fy(E)&&this.autoCorrectParts&&(E=this.intl.parseDate(v+L+y,this.format,this.localeId),l=!0),!E&&!isNaN(i)&&(!isNaN(parseInt(t,10))||s&&a&&t===``)&&this.autoCorrectParts){if(e===`M`&&!D){let e=i-1;e>-1&&e<12&&(E=jv(this.value),E.setMonth(e),E.getMonth()!==e&&(E=Fv(Lv(E,-1))))}e===`y`&&(E=Pv(parseInt(L,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(s&&fy(E)||!s&&E)&&this.date&&E.getDate()!==this.value.getDate()&&(E=Fv(Lv(E,-1))))}if(s&&fy(E)||!s&&E){let t=this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:l,middle:L,patternValue:N,basePrefix:v,baseSuffix:y,prefix:h,suffix:b,symbol:e,patternLength:P,leadingZero:j}),n=t.switchToNext;return this.shouldNormalizeCentury()&&(E=this.normalizeCentury(E)),e===`H`&&E.getHours()>=12&&this.setExisting(`a`,!0),this._value=E,this.setExisting(e,!0),this.resetInvalidDateSymbol(e),this.autoCorrectParts||(e===`M`?this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`)):e===`d`?this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`)):e===`y`&&this.markDatePartsAsExisting(),this.hasInvalidDatePart()||(this.markDatePartsAsExisting(),!t.peekedDate&&t.switchToNext&&!this.autoCorrectParts&&(e===`M`||e===`d`&&t.parsedPeekedValue===30&&this.value.getMonth()===1&&(n=!1)))),iy(d,{value:this.value,switchToNext:n})}}if(D){if(E=this.intl.parseDate(h+D+b,this.format,this.localeId),!E&&e===`M`){let e=this.monthNames.indexOf(D);e>=0&&(E=jv(this.value),E.setMonth(e),E.getMonth()!==e&&(E=Fv(Lv(E,-1))))}if(E)return this._value=E,this.setExisting(e,!0),iy(d,{value:this.value,switchToNext:O===1})}if(k&&(E=this.intl.parseDate(h+k+b,this.format)||this.intl.parseDate(v+k+y,this.format),E))return this._value=E,this.setExisting(e,!0),iy(d,{value:this.value,switchToNext:!0});if(A&&e!==`a`&&this.setExisting(e,!1),!this.autoCorrectParts){let r,i=s?_:L,a=ty(i);if(ey(a)&&ny(i)){if(e===`d`&&(a<=0||a>31)||e===`M`&&(a<=0||a>12)){if(s)return iy(d,{value:null,switchToNext:!1});i=t,a=ty(i)}if(!ey(a)||!ny(i))return iy(d,{value:null,switchToNext:!1});r=e===`M`?a-1:a;let o=e===`y`,c=e===`M`,l=e===`d`,u=jv(this._value),f=this._partiallyInvalidDate.invalidDateParts||{},p=o?r:f.y.value||u.getFullYear(),m=c?r:f.M.value||u.getMonth(),g=l?r:f.d.value||f.E.value||u.getDate(),_=f.h.value||f.H.value||u.getHours(),x=f.m.value||u.getMinutes(),C=f.s.value||u.getSeconds(),T=f.S.value||u.getMilliseconds(),D=Pv(p,m,g,_,x,C,T),O=dy(D,p,m,g,_,x,C,T),k=o||c||l?this.modifyDateSymbolWithValue(u,e,o?p:c?m:g):null,A=!1;if(c&&k?k.getMonth()===m?this.getExisting(`d`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:m,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(this.resetInvalidDateSymbol(e),u=jv(D),this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:m,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):l&&k?k.getDate()===g?this.getExisting(`M`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:g,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(u=jv(D),this.resetInvalidDateSymbol(e),this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:g,date:jv(this.value),startDate:jv(this.value)}),this.setExisting(e,!1)):o&&k&&(k.getFullYear()===p?this.getExisting(`d`)&&this.getExisting(`M`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:p,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(this.resetInvalidDateSymbol(e),u=jv(D),this.getExisting(`M`)&&this.getExisting(`d`)&&(this.setExisting(`y`,!0),this.resetInvalidDateSymbol(`y`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:p,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1))),!A){if(this.setExisting(e,!0),s&&!fy(E)){let e=this.intl.parseDate(v+L+y,this.format,this.localeId);fy(e)&&(this._value=e)}else this._value=u;this.getValue()&&this.resetInvalidDate()}let M=!1,F=n?Kv(i).length:i.length;return M=e===`M`?a>=2||F>=2:e===`d`?a>=4||F>=2:S?this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:!this.autoCorrectParts,middle:L,patternValue:N,basePrefix:v,baseSuffix:y,prefix:h,suffix:b,symbol:e,patternLength:P,leadingZero:j}).switchToNext:F>w,iy(d,{value:null,switchToNext:M,hasInvalidDatePart:A})}}return iy(d,{value:null,switchToNext:!1})}symbolMap(e){return this.intl.splitDateFormat(this.format,this.localeId).reduce(Jv,{})[e]}resetLeadingZero(){let e=this.leadingZero!==null;return this.setLeadingZero(null),e}setLeadingZero(e){this.leadingZero=e}getLeadingZero(){return this.leadingZero||{}}normalizeCentury(e){if(!Qv(e))return e;let t=sy(e),n=this.getNormalizedCenturyBase(t);return cy(e,n+t)}incrementLeadingZero(e){let t=this.leadingZero||{};t[e]=(t[e]||0)+1,this.leadingZero=t}isAbbrMonth(e,t){let n=this.partPattern(e,t);return n.type===`month`&&n.names}partPattern(e,t){return e.filter(e=>e.pattern.indexOf(t)!==-1)[0]}peek(e,t){if(!t)return e;let n=e.replace(/^0*/,``)+`0`;return Gv(t.length-n.length)+n}matchMonth(e){if(this.typedMonthPart+=e.toLowerCase(),this.monthNames.length===0)return{monthName:``,matchesCount:0};for(;this.typedMonthPart.length>0;){let e=[];for(let t=0;t<this.monthNames.length;t++)this.monthNames[t].toLowerCase().startsWith(this.typedMonthPart)&&e.push(this.monthNames[t]);if(e.length>0)return{monthName:e[0],matchesCount:e.length};let t=parseInt(this.typedMonthPart,10);if(t>=1&&t<=12&&t.toString().startsWith(this.typedMonthPart)){let e=[1,2,3,4,5,6,7,8,9,10,11,12].reduce((e,t)=>t.toString().startsWith(this.typedMonthPart)?e+1:e,0);return{monthName:this.monthNames[t-1],matchesCount:e}}this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return{monthName:``,matchesCount:0}}matchDayPeriod(e,t){let n=e.toLowerCase();if(t===`a`&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return``}allFormattedMonths(e=`en`){let t=this.intl.splitDateFormat(this.format,this.localeId);for(let n=0;n<t.length;n++)if(t[n].type===`month`&&t[n].names)return this.intl.dateFormatNames(e,t[n].names);return[]}allDayPeriods(e=`en`){let t=this.intl.splitDateFormat(this.format);for(let n=0;n<t.length;n++)if(t[n].type===`dayperiod`&&t[n].names)return this.intl.dateFormatNames(e,t[n].names);return null}patternLength(e){return e?e[0]===`y`?4:hy.test(e)?2:0:0}dateFormatString(e,t){let n=this.intl.splitDateFormat(t,this.localeId),r=[],i=[];for(let t=0;t<n.length;t++){let a=this.intl.formatDate(e,{pattern:n[t].pattern},this.localeId).length;for(;a>0;)r.push(this.symbols[n[t].pattern[0]]||Uv.formatSeparator),i.push(n[t]),a--}let a=new Hv;return a.symbols=r.join(``),a.partMap=i,a}merge(e,t){let n=``,r=``,i=t.symbols,a=!1,o=0,s=this.getFormattedInvalidDates(i);for(let c=i.length-1;c>=0;c--){let l=this.getPartsForSegment(t,c);if(this.knownParts.indexOf(i[c])===-1||this.getExisting(i[c]))this.autoCorrectParts||e.length===i.length||a?n=e[c]+n:o>0?(n=e[c]+n,o--,o<=0&&(a=!0)):n=(e[c+e.length-i.length]||``)+n,r=i[c]+r;else{let a=i[c],u=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!Qv(this.getInvalidDatePartValue(a))){for(;c>=0&&a===i[c];)c--;c++}if(this.leadingZero&&this.leadingZero[a])n=`0`+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(a)){let e=this.getInvalidDatePartValue(a).toString();a===`M`?(e=(ty(this.getInvalidDatePartValue(a))+1).toString(),l.length>2?n=s[a][c]+n:(e=(ty(this.getInvalidDatePartValue(a))+1).toString(),n=Gv(l.length-e.length)+e+n,u=l.length-1,o=e.length-l.length)):(n=Gv(l.length-e.length)+e+n,u=l.length-1,o=e.length-l.length)}else n=this.dateFieldName(t.partMap[c])+n;for(;r.length<n.length;)r=i[c]+r;u!==0&&(c=c-u+(e.length-i.length))}}return{text:n,format:r}}dateFieldName(e){let t=this.formatPlaceholder||`wide`;return t[e.type]?t[e.type]:t===`formatPattern`?e.pattern:this.intl.dateFieldName(Object.assign(e,{nameType:t}))}getNormalizedCenturyBase(e){return e>this.twoDigitYearMax?1900:2e3}shouldNormalizeCentury(){return this.intl.splitDateFormat(this.format).some(e=>e.pattern===`yy`)}resetInvalidDate(){this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{this.resetInvalidDatePart(e)})}resetInvalidDateSymbol(e){this.resetInvalidDatePart(e);let t=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{this._partiallyInvalidDate.invalidDateParts[e]&&Qv(this._partiallyInvalidDate.invalidDateParts[e].value)&&(t=!1)}),t&&this.resetInvalidDate()}resetInvalidDatePart(e){this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e]={value:null,date:null,startDateOffset:0})}getInvalidDatePart(e){return this._partiallyInvalidDate.invalidDateParts[e]||{}}getInvalidDatePartValue(e){return(this._partiallyInvalidDate.invalidDateParts[e]||{}).value}setInvalidDatePart(e,{value:t=null,date:n=null,startDateOffset:r=0,startDate:i=null}){this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e].value=t,this._partiallyInvalidDate.invalidDateParts[e].date=n,this._partiallyInvalidDate.invalidDateParts[e].startDateOffset=r,this._partiallyInvalidDate.startDate=i)}hasInvalidDatePart(){let e=!1;return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(t=>{this._partiallyInvalidDate.invalidDateParts[t]&&Qv(this._partiallyInvalidDate.invalidDateParts[t].value)&&(e=!0)}),e}modifyDateSymbolWithOffset(e,t,n){let r=jv(e),i=!1;switch(t){case`y`:r.setFullYear(r.getFullYear()+n);break;case`M`:r=Lv(this.value,n);break;case`d`:case`E`:r.setDate(r.getDate()+n);break;case`h`:case`H`:r.setHours(r.getHours()+n),i=!0;break;case`m`:r.setMinutes(r.getMinutes()+n),i=!0;break;case`s`:r.setSeconds(r.getSeconds()+n),i=!0;break;case`S`:r.setMilliseconds(r.getMilliseconds()+n);break;case`a`:r.setHours(r.getHours()+12*n),i=!0;break;default:break}return{date:r,timeModified:i}}modifyDateSymbolWithValue(e,t,n){let r=jv(e);switch(t){case`y`:r.setFullYear(n);break;case`M`:r=Lv(e,n-e.getMonth());break;case`d`:case`E`:r.setDate(n);break;case`h`:case`H`:r.setHours(n);break;case`m`:r.setMinutes(n);break;case`s`:r.setSeconds(n);break;case`S`:r.setMilliseconds(n);break;case`a`:r.setHours(n);break;default:break}return r}markDatePartsAsExisting(){this.modifyExisting(!0)}getPartsForSegment(e,t){let n=e.partMap[t],r=[];for(let i=t;i<e.partMap.length;i++){let t=e.partMap[i];if(n.type===t.type&&n.pattern===t.pattern)r.push(t);else break}for(let i=t-1;i>=0;i--){let t=e.partMap[i];if(n.type===t.type&&n.pattern===t.pattern)r.unshift(t);else break}return r}isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:e,middle:t,patternValue:n,basePrefix:r,baseSuffix:i,prefix:a,suffix:o,symbol:s,patternLength:c,leadingZero:l}){let u=this.peek(t,n),d=e?`${r}${u}${i}`:`${a}${u}${o}`,f=this.intl.parseDate(d,this.format,this.localeId),p=((this.leadingZero||{})[s]||0)+Kv(t).length>=c;return{peekedDate:f,peekedDateString:d,peekedValue:u,parsedPeekedValue:ty(u),switchToNext:f===null||(l[s]?n.length<=t.length:p)}}};let _y={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34},vy={events:{}};var yy=class{constructor(e){this.options=iy({},vy,e)}destroy(){this.options={}}trigger(e,t={}){let n={defaultPrevented:!1,preventDefault:()=>{n.defaultPrevented=!0}};return oy(this.options.events[e])?(this.options.events[e](iy(n,t,{sender:this})),n.defaultPrevented):!1}},by;(function(e){e.None=`none`,e.Caret=`caret`,e.Selection=`selection`})(by||={});let xy=`dragStart`,Sy=`drop`,Cy=`touchstart`,wy=`mousedown`,Ty=`mouseup`,Ey=`click`,Dy=`input`,Oy=`keydown`,ky=`focus`,Ay=`blur`,jy=`paste`,My=`DOMMouseScroll`,Ny=`mousewheel`,Py=`valueChange`,Fy=`inputEnd`,Iy=`blurEnd`,Ly=`focusEnd`,Ry=`change`,zy={format:`d`,hasPlaceholder:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:{[Py]:null,[Dy]:null,[Fy]:null,[ky]:null,[Ly]:null,[Ay]:null,[Iy]:null,[Oy]:null,[Ny]:null,[Ry]:null},selectNearestSegmentOnFocus:!1,selectPreviousSegmentOnBackspace:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:Uv.twoDigitYearMax,autoCorrectParts:!0,autoFill:!1,toggleDayPeriod:!1};var By=class extends yy{get value(){return this.dateObject&&this.dateObject.getValue()}constructor(e,t){super(t),this.dateObject=null,this.currentText=``,this.currentFormat=``,this.interactionMode=by.None,this.previousElementSelection={start:0,end:0},this.init(e,t)}init(e,t){let n=fy(this.options.value)?jv(this.options.value):new Date(t.formattedValue);fy(n)||(n=null),this.element=e,this.options=iy({},zy,t,{steps:Object.assign(Object.assign({},zy.steps),t.steps)}),this.intl=this.options.intlService,this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=by.None,this.forceUpdate()}destroy(){this.unbindEvents(),this.dateObject=null,super.destroy()}bindEvents(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener(xy,this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener(Sy,this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener(Ey,this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener(wy,this.onElementMouseDown),this.element.addEventListener(Cy,this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener(Ty,this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener(Dy,this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener(Oy,this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener(ky,this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener(Ay,this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener(Ry,this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener(jy,this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener(My,this.onElementMouseWheel),this.element.addEventListener(Ny,this.onElementMouseWheel)}unbindEvents(){this.element.removeEventListener(xy,this.onElementDragStart),this.element.removeEventListener(Sy,this.onElementDrop),this.element.removeEventListener(Cy,this.onElementMouseDown),this.element.removeEventListener(wy,this.onElementMouseDown),this.element.removeEventListener(Ty,this.onElementMouseUp),this.element.removeEventListener(Ey,this.onElementClick),this.element.removeEventListener(Dy,this.onElementInput),this.element.removeEventListener(Oy,this.onElementKeyDown),this.element.removeEventListener(ky,this.onElementFocus),this.element.removeEventListener(Ay,this.onElementBlur),this.element.removeEventListener(Ry,this.onElementChange),this.element.removeEventListener(jy,this.onElementPaste),this.element.removeEventListener(My,this.onElementMouseWheel),this.element.removeEventListener(Ny,this.onElementMouseWheel)}setOptions(e,t=!1){this.options=iy({},this.options,e,{steps:Object.assign(Object.assign({},zy.steps),e.steps)}),this.setDateObjectOptions(),t&&(this.unbindEvents(),this.init(this.element,this.options))}setDateObjectOptions(){if(this.dateObject){let e=this.getDateObjectOptions();this.dateObject.setOptions(e)}}resetLocale(){this.unbindEvents(),this.init(this.element,this.options)}isInCaretMode(){return this.interactionMode===by.Caret}focus(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)}onElementDragStart(e){e.preventDefault()}onElementDrop(e){e.preventDefault()}onElementMouseDown(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive}onElementMouseUp(e){this.mouseDownStarted=!1,e.preventDefault()}onElementClick(e){this.mouseDownStarted=!1,this.switchedPartOnPreviousKeyAction=!1;let t=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),e.detail!==3)if(this.isActive&&this.options.selectNearestSegmentOnFocus){let e=this.element.selectionStart!==this.element.selectionEnd,t=Qv(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,n=!e&&t?0:this.caret()[0];this.selectNearestSegment(n)}else this.setSelection(this.selectionByIndex(t.start))}onElementInput(e){this.triggerInput({event:e});let t=this.elementValue;if(!this.element||!this.dateObject)return;let n=this.switchedPartOnPreviousKeyAction;if(this.isPasteInProgress){this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(e),this.isPasteInProgress=!1;return}let r=this.keyDownEvent||{},i=r.keyCode===_y.BACKSPACE||r.key===Wv.BACKSPACE,a=r.keyCode===_y.DELETE||r.key===Wv.DELETE,o=this.interactionMode;this.options.allowCaretMode&&o!==by.Caret&&!a&&!i&&(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=by.Caret:this.interactionMode=by.Selection;let s=this.isInCaretMode();if(s&&this.keyDownEvent.key===Wv.SPACE){this.restorePreviousInputEventState();return}let c=this.dateObject&&this.dateObject.getValue(),l=this.dateObject?this.dateObject.value:null,{text:u,format:d}=this.dateObject.getTextAndFormat();this.currentFormat=d;let f=``;f=s&&(i||a||o===by.Caret)?this.previousElementValue:u;let p=this.elementValue,m=qv({oldText:f,newText:p,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:s,keyEvent:this.keyDownEvent});if(m&&m.length&&m[0]&&m[0][1]!==Uv.formatSeparator&&(this.switchedPartOnPreviousKeyAction=!1),s&&(!m||m.length===0)){this.restorePreviousInputEventState();return}else if(s&&m.length===1){if(!m[0]||!m[0][0]){this.restorePreviousInputEventState();return}else if(s&&m[0]&&(m[0][0]===Uv.formatSeparator||m[0][1]===Uv.formatSeparator)){this.restorePreviousInputEventState();return}}let h=m.length===1&&m[0][1]===Uv.formatSeparator,g=[],_=!1,v=null;if(!h)for(let e=0;e<m.length;e++){let t=this.dateObject.parsePart({symbol:m[e][0],currentChar:m[e][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:i||a,originalFormat:this.currentFormat});g.push(t),t.value||(v={type:`parse`}),_=t.switchToNext}this.options.autoSwitchParts||(_=!1),this.resetSegmentValue=!1;let y=this.options.format===this.currentFormat||Qv(this.options.format)&&this.options.format.length>1,b=g[g.length-1],x=b&&!Qv(b.value),S=s&&(i||a)&&x,C=b?b.resetPart:!1,w=this.dateObject.getValue(),T=!Vv(c,w),E=this.dateObject.value,D,O=this.selection;if(s){let t=m&&m.length>0?m[0][0]:null,n=this.dateObject.getLeadingZero()[t];m.length&&m[0][0]!==Uv.formatSeparator?_?(this.forceUpdateWithSelection(),this.switchDateSegment(1)):C?(D=this.currentFormat[O.start],D?(this.forceUpdate(),this.setSelection(this.selectionBySymbol(D))):this.restorePreviousInputEventState()):S?(this.forceUpdate(),m.length&&m[0][0]!==Uv.formatSeparator&&this.setSelection(this.selectionBySymbol(m[0][0]))):x?e.data===`0`&&n||(Qv(c)&&!Qv(w)?this.restorePreviousInputEventState():!Qv(c)&&Qv(w)?this.forceUpdateWithSelection():Qv(c)&&Qv(w)?T?this.forceUpdateWithSelection():this.restorePreviousInputEventState():!Qv(c)&&!Qv(w)?this.forceUpdateWithSelection():l!==E||this.restorePreviousInputEventState()):x||y||this.forceUpdateWithSelection():!this.options.autoSwitchParts&&m[0][1]===Uv.formatSeparator||this.setSelection(this.selectionBySymbol(m[0][0]))}else s||(this.forceUpdate(),m.length&&m[0][0]!==Uv.formatSeparator&&this.setSelection(this.selectionBySymbol(m[0][0])),this.options.autoSwitchParts?h?(this.resetSegmentValue=!0,n||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):_&&(this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):b&&b.switchToNext?this.resetSegmentValue=!0:h&&(this.resetSegmentValue=!0,n||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0),i&&this.options.selectPreviousSegmentOnBackspace&&this.switchDateSegment(-1));this.tryTriggerValueChange({oldValue:c,event:e}),this.triggerInputEnd({event:e,error:v,oldElementValue:t,newElementValue:this.elementValue}),s&&this.setTextAndFormat()}onElementFocus(e){this.triggerFocus({event:e})||(this.isActive=!0,this.interactionMode=by.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:e}))}onElementBlur(e){this.resetSegmentValue=!0,this.isActive=!1,!this.triggerBlur({event:e})&&(this.options.autoFill&&this.autoFill(),this.interactionMode=by.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.triggerBlurEnd({event:e}))}onElementChange(e){this.triggerChange({event:e})}onElementKeyDown(e){if(this.triggerKeyDown({event:e}))return;let{start:t,end:n}=this.selection,r=e;if(this.keyDownEvent=e,this.previousElementValue=this.element.value,this.previousElementSelection={start:t,end:n},this.keyEventMatchesAutoSwitchKeys(e)){let t=e.keyCode===_y.TAB;if(t){let{start:n,end:r}=this.selection;if(e.shiftKey&&t?this.switchDateSegment(-1):this.switchDateSegment(1),n!==this.selection.start||r!==this.selection.end){e.preventDefault();return}}else{e.preventDefault(),this.switchDateSegment(1);return}}let i=this.currentFormat[this.selection.start],a=this.getStepFromSymbol(i),o=!1,s=this.elementValue;if(!(e.altKey||e.ctrlKey||e.metaKey||e.keyCode===_y.TAB)){switch(e.keyCode){case _y.ARROW_LEFT:this.switchDateSegment(-1),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_UP:this.modifyDateSegmentValue(a,i,r),s!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:s}),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_RIGHT:this.switchDateSegment(1),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_DOWN:this.modifyDateSegmentValue(-a,i,r),s!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:s}),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ENTER:break;case _y.HOME:this.selectNearestSegment(0),o=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;case _y.END:this.selectNearestSegment(this.elementValue.length),o=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;default:return}o&&e.preventDefault()}}onElementPaste(){this.isPasteInProgress=!0}onElementMouseWheel(e){let t=this.elementValue;if(!this.options.enableMouseWheel||this.triggerMouseWheel({event:e})||!this.isActive)return;let n=e,r=this.currentFormat[this.selection.start],i=this.getStepFromSymbol(r);n.shiftKey?this.switchDateSegment((n.wheelDelta||-n.detail)>0?-1:1):this.modifyDateSegmentValue((n.wheelDelta||-n.detail)>0?i:-i),n.returnValue=!1,n.preventDefault&&n.preventDefault(),t!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:t})}updateOnPaste(e){let t=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;Qv(t)&&this.dateObject.shouldNormalizeCentury()&&(t=this.dateObject.normalizeCentury(t));let n=this.dateObject&&this.dateObject.getValue();this.writeValue(t),this.tryTriggerValueChange({oldValue:n,event:e})}get elementValue(){return(this.element||{}).value||``}get inputFormat(){return this.options.format?typeof this.options.format==`string`?this.options.format:this.options.format.inputFormat:Uv.defaultDateFormat}get displayFormat(){return this.options.format?typeof this.options.format==`string`?this.options.format:this.options.format.displayFormat:Uv.defaultDateFormat}get selection(){let e={start:0,end:0};return this.element!==null&&this.element.selectionStart!==void 0&&(e={start:this.element.selectionStart,end:this.element.selectionEnd}),e}setSelection(e){this.element&&document.activeElement===this.element&&(this.element.setSelectionRange(e.start,e.end),$v()&&py()&&this.element.scrollIntoView({block:`nearest`,inline:`nearest`}),e.start!==e.end&&(this.interactionMode=by.Selection))}selectionBySymbol(e){let t=-1,n=0;for(let r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===e&&(n=r+1,t===-1&&(t=r));return t<0&&(t=0),!this.options.autoCorrectParts&&this.currentFormat.length!==this.currentText.length&&(this.currentFormat.length<this.currentText.length?n+=this.currentText.length-this.currentFormat.length:n=Math.max(0,n-(this.currentFormat.length-this.currentText.length))),{start:t,end:n}}selectionByIndex(e){let t={start:e,end:e};for(let n=e,r=e-1;n<this.currentFormat.length||r>=0;n++,r--){if(n<this.currentFormat.length&&this.currentFormat[n]!==Uv.formatSeparator){t=this.selectionBySymbol(this.currentFormat[n]);break}if(r>=0&&this.currentFormat[r]!==Uv.formatSeparator){t=this.selectionBySymbol(this.currentFormat[r]);break}}return t}switchDateSegment(e){let t=this.selection;if(this.isInCaretMode()){let n=t.start,r=this.currentFormat[n-1],i=``,a=``;if(e<0){for(let t=n+e;t>=0;t--)if(a=this.currentFormat[t],a!==Uv.formatSeparator&&a!==r){n=t,i=a;break}}else for(let t=n+e;t<this.currentFormat.length;t++)if(a=this.currentFormat[t],a!==Uv.formatSeparator&&a!==r){n=t,i=a;break}if(i){this.forceUpdate(),this.setSelection(this.selectionBySymbol(i)),this.interactionMode=by.Selection;return}}this.interactionMode=by.None;let{start:n,end:r}=this.selection;if(n<r&&this.currentFormat[n]!==this.currentFormat[r-1]){this.setSelection(this.selectionByIndex(e>0?n:r-1)),this.resetSegmentValue=!0,this.interactionMode=by.None;return}let i=this.currentFormat[n],a=n+e;for(;a>0&&a<this.currentFormat.length&&(this.currentFormat[a]===i||this.currentFormat[a]===Uv.formatSeparator);)a+=e;if(this.currentFormat[a]===Uv.formatSeparator)return;let o=a;for(;o>=0&&o<this.currentFormat.length&&this.currentFormat[o]===this.currentFormat[a];)o+=e;a>o&&(o+1!==n||a+1!==r)?(this.setSelection({start:o+1,end:a+1}),this.resetSegmentValue=!0):a<o&&(a!==n||o!==r)&&(this.setSelection({start:a,end:o}),this.resetSegmentValue=!0),this.interactionMode=by.None}modifyDateSegmentValue(e,t=``,n={}){if(!this.dateObject||this.options.readonly)return;let r=this.value,i=1,a=this.caret();if(t||=this.currentFormat[a[0]],t===`S`&&(!this.options.steps.millisecond||this.options.steps.millisecond===1)){let e=ly(this.inputFormat);i=uy(e)}this.dateObject.modifyPart(t,i*e),this.tryTriggerValueChange({oldValue:r,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(t))}tryTriggerValueChange(e={oldValue:null,event:{}}){if(!Vv(this.value,e.oldValue))return this.triggerValueChange(e)}triggerValueChange(e={oldValue:null,event:{}}){return this.trigger(Py,iy(e,{value:this.value}))}triggerInput(e={event:{}}){return this.trigger(Dy,iy(e,{value:this.value}))}triggerInputEnd(e={event:{},error:null,oldElementValue:``,newElementValue:``}){return this.trigger(Fy,iy(e,{value:this.value}))}triggerFocus(e={event:{}}){return this.trigger(ky,iy({},e))}triggerFocusEnd(e={event:{}}){return this.trigger(Ly,iy({},e))}triggerBlur(e={event:{}}){return this.trigger(Ay,iy({},e))}triggerBlurEnd(e={event:{}}){return this.trigger(Iy,iy({},e))}triggerChange(e={event:{}}){return this.trigger(Ry,iy(e,{value:this.value}))}triggerKeyDown(e={event:{}}){return this.trigger(Oy,iy({},e))}triggerMouseWheel(e={event:{}}){return this.trigger(Ny,iy({},e))}forceUpdate(){this.setTextAndFormat(),this.refreshElementValue()}forceUpdateWithSelection(){let{start:e,end:t}=this.selection,n=this.elementValue.length;this.forceUpdate();let r=this.elementValue.length-n;this.setSelection({start:e+r,end:t+r})}setTextAndFormat(){let{text:e,format:t}=this.dateObject.getTextAndFormat();this.currentFormat=t,this.currentText=e}setElementValue(e){this.element.value=e}getStepFromSymbol(e){switch(e){case`S`:return Number(this.options.steps.millisecond);case`s`:return Number(this.options.steps.second);case`m`:return Number(this.options.steps.minute);case`h`:case`H`:return Number(this.options.steps.hour);case`M`:return Number(this.options.steps.month);case`d`:case`E`:return Number(this.options.steps.day);case`y`:return Number(this.options.steps.year);default:return 1}}restorePreviousInputEventState(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()}restorePreviousElementValue(){this.setElementValue(this.previousElementValue||``)}restorePreviousElementSelection(){let{start:e,end:t}=this.previousElementSelection;this.setSelection({start:e||0,end:t||0})}writeValue(e){this.verifyValue(e),this.dateObject=this.getDateObject(e),this.refreshElementValue()}verifyValue(e){if(e&&!fy(e))throw Error(`The 'value' should be a valid JavaScript Date instance.`)}refreshElementValue(){let e=this.element,t=this.isActive?this.inputFormat:this.displayFormat,{text:n,format:r}=this.dateObject.getTextAndFormat(t);this.currentFormat=r,this.currentText=n;let i=this.options.hasPlaceholder||Qv(this.options.placeholder),a=(!this.isActive||this.options.readonly)&&i&&!this.dateObject.hasValue();i&&Qv(this.options.placeholder)&&(e.placeholder=this.options.placeholder);let o=a?``:n;this.previousElementValue=this.elementValue,this.setElementValue(o)}caret(e,t=e){let n=e!==void 0,r=[e,e],i=this.element;if(!(n&&(this.options.disabled||this.options.readonly))){try{i.selectionStart!==void 0&&(n&&($v()&&document.activeElement!==i&&i.focus(),i.setSelectionRange(e,t)),r=[i.selectionStart,i.selectionEnd])}catch{r=[]}return r}}selectNearestSegment(e){for(let t=e,n=e-1;t<this.currentFormat.length||n>=0;t++,n--){if(t<this.currentFormat.length&&this.currentFormat[t]!==`_`){this.selectDateSegment(this.currentFormat[t]);return}if(n>=0&&this.currentFormat[n]!==`_`){this.selectDateSegment(this.currentFormat[n]);return}}}selectDateSegment(e){let t=-1,n=0;for(let r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===e&&(n=r+1,t===-1&&(t=r));t<0&&(t=0),this.caret(0,0),this.caret(t,n)}getDateObject(e){let{leadingZero:t}=this.dateObject||{};this.options.value=e;let n=this.createDateObject();return n.setLeadingZero(this.isActive?t:null),n}createDateObject(){let e=this.getDateObjectOptions();return new gy(iy({},e))}getDateObjectOptions(){return{intlService:this.options.intlService,formatPlaceholder:this.options.formatPlaceholder?this.options.formatPlaceholder:`formatPattern`,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value,toggleDayPeriod:this.options.toggleDayPeriod,autoSwitchParts:this.options.autoSwitchParts}}keyEventMatchesAutoSwitchKeys(e){let t=(this.options.autoSwitchKeys||[]).map(e=>e.toString().toLowerCase().trim());return t.indexOf(e.keyCode.toString())>=0||t.indexOf(e.keyCode)>=0||t.indexOf(e.key.toLowerCase().trim())>=0}autoFill(){let e=this.dateObject,t=new Date,n,r,i,a,o,s;(e.date||e.month||e.year||e.hours||e.minutes||e.seconds)&&(i=e.year?e.value.getFullYear():t.getFullYear(),r=e.month?e.value.getMonth():t.getMonth(),n=e.date?e.value.getDate():t.getDate(),a=e.hours?e.value.getHours():t.getHours(),o=e.minutes?e.value.getMinutes():t.getMinutes(),s=e.seconds?e.value.getSeconds():t.getSeconds(),e.setValue(new Date(i,r,n,a,o,s)),this.refreshElementValue(),this.triggerValueChange())}};(function(e,t){var n=window.kendo,r=n.ui,i=r.Widget,a=`.kendoDateInput`,o={}.toString,s=e.isPlainObject,c=`k-focus`,l=`k-disabled`,u=`k-invalid`,d=`disabled`,f=`readonly`,p=`change`,m=`kendoKeydown`,h=n.Class.extend({init:function(e){let t=e.culture?n.getCulture(e.culture):n.culture();this.messages=e.messages,this.cldr={},this.cldr[t.name]={name:t.name,calendar:t.calendar||{},numbers:t.numberFormat}},parseDate:function(e,t,r){return n.parseDate(e,t,r,!0)},formatDate:function(e,t,r){return n.toString(e,t,r)},splitDateFormat:function(e){return n.date.splitDateFormat(e)},dateFormatNames:function(e,t){return n.date.dateFormatNames(t)},dateFieldName:function(e){return this.messages[e.type]||{}}});function g(){let e=n.culture(),t=[];return t.push(e.calendars.standard[`/`]),t.push(e.calendars.standard[`:`]),t}function _(e,t){return e&&n.getCulture(e).calendars.standard.patterns[t]||t}var v=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),t=o.element,r=o.options,r.format=n._extractFormat(r.format||n.getCulture(r.culture).calendars.standard.patterns.d),r.min=n.parseDate(t.attr(`min`))||n.parseDate(r.min),r.max=n.parseDate(t.attr(`max`))||n.parseDate(r.max),r.inputMode=r.inputMode||t.attr(`inputmode`)||`text`;var s=t.parent().attr(`class`)||``,l=s.indexOf(`picker`)>=0&&s.indexOf(`rangepicker`)<0,u=o.options.value||t.val();l?o.wrapper=o.element.parent():(o.wrapper=t.wrap(`<span class='k-dateinput k-input'></span>`).parent(),o.wrapper.addClass(t[0].className).removeClass(`input-validation-error`)),o.wrapper[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),o._validationIcon=e(n.ui.icon({icon:`exclamation-circle`,iconClass:`k-input-validation-icon k-hidden`})).insertAfter(t),o._form(),o.dateInputInstance=new By(t[0],{format:_(r.culture,r.format),autoCorrectParts:r.autoCorrectParts,autoSwitchKeys:r.autoSwitchKeys.length?r.autoSwitchKeys:g(),enableMouseWheel:r.enableMouseWheel,twoDigitYearMax:r.twoDigitYearMax,steps:r.steps,formatPlaceholder:r.messages,events:{inputEnd:function(e){e.error&&o._blinkInvalidState()},keydown:function(e){if(!e.event.keyCode){e.preventDefault();return}(e.event.keyCode==n.keys.UP||e.event.keyCode==n.keys.DOWN)&&setTimeout(function(){o.element.trigger(p)})},blur:function(e){o._change(),e.preventDefault()}},intlService:new h({culture:r.culture,messages:o.options.messages}),autoSwitchParts:r.autoSwitchParts,autoFill:r.autoFill,toggleDayPeriod:r.toggleDayPeriod}),o._emptyMask=this.element.val(),r.value&&o.value(r.value),o.element.addClass(`k-input-inner`).attr(`autocomplete`,`off`).attr(`inputmode`,r.inputMode).on(`keydown`+a,o,function(e){var t=e.keyCode;(t===n.keys.LEFT||t===n.keys.RIGHT||t===n.keys.UP||t===n.keys.DOWN||t===n.keys.HOME||t===n.keys.END)&&e.stopPropagation()}).on(`focus`+a,function(){o.wrapper.addClass(c)}).on(`focusout`+a,function(){o.wrapper.removeClass(c)});try{t[0].setAttribute(`type`,`text`)}catch{t[0].type=`text`}t.is(`[disabled]`)||e(o.element).parents(`fieldset`).is(`:disabled`)?o.enable(!1):o.readonly(n.isPresent(r.readonly)?r.readonly:o.element.is(`[readonly]`)),o.value(u),l||o._applyCssClasses(),r.label&&o._label(),o.element.removeAttr(`style`),n.notify(o),i.fn.endInit.call(o)},options:{name:`DateInput`,autoAdjust:!0,autoCorrectParts:!0,autoSwitchKeys:[],autoSwitchParts:!1,enableMouseWheel:!0,culture:``,value:``,format:``,min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:`year`,month:`month`,day:`day`,weekday:`day of the week`,hour:`hours`,minute:`minutes`,second:`seconds`,milliseconds:`milliseconds`,dayperiod:`AM/PM`},size:t,steps:{year:1,month:1,day:1,hour:1,minute:1,second:1,millisecond:1},fillMode:t,rounded:t,label:null,autoFill:!1,toggleDayPeriod:!0},events:[p,m],min:function(e){if(e!==t)this.options.min=e;else return this.options.min},max:function(e){if(e!==t)this.options.max=e;else return this.options.max},setOptions:function(e){var t=this;i.fn.setOptions.call(t,e),t.dateInputInstance.destroy(),t.dateInputInstance=null,t.dateInputInstance=new By(this.element[0],{format:_(t.options.culture,t.options.format),autoSwitchKeys:t.options.autoSwitchKeys.length?t.options.autoSwitchKeys:g(),autoCorrectParts:t.options.autoCorrectParts,enableMouseWheel:t.options.enableMouseWheel,steps:t.options.steps,twoDigitYearMax:t.options.twoDigitYearMax,formatPlaceholder:t.options.messages,events:{inputEnd:function(e){e.error&&t._blinkInvalidState()},keydown:function(e){(e.event.keyCode==n.keys.UP||e.event.keyCode==n.keys.DOWN)&&setTimeout(function(){t.element.trigger(p)})},blur:function(e){t._change(),e.preventDefault()}},intlService:new h({culture:t.options.culture,messages:t.options.messages}),autoSwitchParts:t.options.autoSwitchParts,autoFill:t.options.autoFill,toggleDayPeriod:t.options.toggleDayPeriod}),t.value(e.value)},destroy:function(){var e=this;e.element.off(a),e.dateInputInstance.destroy(),this.element.val(``),this.element.attr(`value`,``),e._formElement&&e._formElement.off(`reset`,e._resetHandler),e.label&&e.label.destroy(),e._validationIcon&&e._validationIcon.remove(),i.fn.destroy.call(e)},value:function(e){if(e===t)return this.dateInputInstance.value;e===null&&(e=``),o.call(e)!==`[object Date]`&&(e=n.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this.dateInputInstance.writeValue(e),this._oldValue=e,this.label&&this.label.floatingLabel&&this.label.floatingLabel.refresh()},_hasDateInput:function(){return this._emptyMask!==this.element.val()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e)},_label:function(){var t=this,r=t.options,i=s(r.label)?r.label:{content:r.label};t.label=new n.ui.Label(null,e.extend({},i,{widget:t,floatCheck:()=>!t.value()&&(!t._hasDateInput()||t.element.val()===``)&&document.activeElement!==t.element[0]?(this.element.val(``),!0):!1})),t._inputLabel=t.label.element},_bindInput:function(){var e=this;e.element.on(`keydown`+a,e,function(e){var t=e.keyCode;(t===n.keys.LEFT||t===n.keys.RIGHT||t===n.keys.UP||t===n.keys.DOWN||t===n.keys.HOME||t===n.keys.END)&&e.stopPropagation()}).on(`focus`+a,function(){e.wrapper.addClass(c)}).on(`focusout`+a,function(){e.wrapper.removeClass(c)}),this.dateInputInstance&&this.dateInputInstance.bindEvents()},_unbindInput:function(){this.element.off(`focus`+a).off(`focusout`+a),this.dateInputInstance&&this.dateInputInstance.unbindEvents()},_editable:function(e){var t=this,n=t.element,r=e.disable,i=e.readonly,a=t.wrapper;t._unbindInput(),!i&&!r?(a.removeClass(l),n&&n.length&&(n[0].removeAttribute(d),n[0].removeAttribute(f)),t._bindInput()):(r&&(a.addClass(l),n.attr(d,r),n&&n.length&&n[0].removeAttribute(f)),i&&n.attr(f,i))},_change:function(){let e=this,t=e._oldValue,n=e.value(),r=e.options.autoAdjust;r&&n&&e.min()&&n<e.min()&&(e.value(e.min()),n=e.value()),r&&n&&e.max()&&n>e.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(p,{blur:!0}),e.element.trigger(p))},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){var e=this;e.wrapper.addClass(u),e._validationIcon.removeClass(`k-hidden`)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(u),e._validationIcon.addClass(`k-hidden`),e._invalidStateTimeout=null},_form:function(){var t=this,n=t.element,r=n.attr(`form`),i=r?e(`#`+r):n.closest(`form`),a=n[0].value;!a&&t.options.value&&(a=t.options.value),i[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(a)})},t._formElement=i.on(`reset`,t._resetHandler))},_paste:function(e){e.preventDefault()}});n.cssProperties.registerPrefix(`DateInput`,`k-input-`),n.cssProperties.registerValues(`DateInput`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),r.plugin(v)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui,i=n.html,a=n.mediaQuery,o=r.Widget,s=n.parseDate,c=n.keys,l=n.support,u=n.template,d=n._activeElement,f=`<div />`,p=`<span />`,m=`.kendoDatePicker`,h=`click`+m,g=l.mouseAndTouchPresent?n.applyEventMap(`up`,m.slice(1)):h,_=`open`,v=`close`,y=`change`,b=`kendoKeydown`,x=`disabled`,S=`readonly`,C=`k-focus`,w=`k-selected`,T=`k-disabled`,E=`k-hover`,D=`mouseenter`+m+` mouseleave`+m,O=`mousedown`+m,k=`navigate`,A=`id`,j=`min`,M=`max`,N=`month`,P=`aria-disabled`,F=`aria-readonly`,I=`aria-expanded`,L=`aria-hidden`,R=`aria-activedescendant`,z=n.calendar,ee=z.isInRange,B=z.restrictValue,V=z.isEqualDatePart,H=e.extend,te=Date;function ne(t){var n=t.parseFormats,r=t.format;z.normalize(t),n=Array.isArray(n)?n:[n],n.length||n.push(`yyyy-MM-dd`),e.inArray(r,n)===-1&&n.splice(0,0,t.format),t.parseFormats=n}function U(e){e.preventDefault()}var W=function(t){var i=this,o,s=document.body,c=e(f).attr(L,`true`).addClass(`k-calendar-container`);i.options=t||={},o=t.id;let l=t._buttons;i.bigScreenMQL=a(`large`),i.smallScreenMQL=a(`small`),t.adaptiveMode==`auto`&&i.smallScreenMQL.onChange(function(){i.popup&&n.isFunction(i.popup.fullscreen)&&i.popup.fullscreen(i.smallScreenMQL.mediaQueryList.matches)}),t.omitPopup?c=t.dateDiv:(c.appendTo(s),t.adaptiveMode==`auto`&&!i.bigScreenMQL.mediaQueryList.matches?i.popup=new r.ActionSheet(c,{adaptive:!0,title:t.adaptiveTitle||`Set dates`,subtitle:t.adaptiveSubtitle,closeButton:{icon:`check`,themeColor:`primary`},actionButtons:l,focusOnActivate:!1,fullscreen:i.smallScreenMQL.mediaQueryList.matches,open:t.open,close:t.close,popup:H(t.popup,t,{name:`Popup`,isRtl:n.support.isRtl(t.anchor)})}):i.popup=new r.Popup(c,H(t.popup,t,{name:`Popup`,isRtl:n.support.isRtl(t.anchor),smartFlip:!0}))),o&&(o+=`_dateview`,c.attr(A,o),i._dateViewID=o),i.div=c,i.value(t.value)};W.prototype={_calendar:function(){var t=this,i=t.calendar,a=t.options,o;if(!i){var s=a.adaptiveMode!=`auto`||this.bigScreenMQL.mediaQueryList.matches?this.options.size:`large`;o=e(f).attr(A,n.guid()).appendTo(a.omitPopup?a.dateDiv:t.popup._content||t.popup.element).on(O,U).on(h,`td:has(.k-link)`,t._click.bind(t)),t.calendar=i=new r.Calendar(o,{componentType:a.componentType,size:s,messages:a.messages}),t._setOptions(a),o.addClass(n.getValidCssClass(`k-calendar-`,`size`,s)),i.navigate(t._value||t._current,a.start),t.value(t._value)}},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,componentType:e.componentType,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,messages:e.messages,disableDates:e.disableDates})},setOptions:function(e){var t=this,n=t.options,r=e.disableDates;r&&(e.disableDates=z.disabled(r)),t.options=H(n,e,{change:n.change,close:n.close,open:n.open}),t.calendar&&t._setOptions(t.options)},destroy:function(){var e=this;this.popup&&this.popup.destroy(),e.bigScreenMQL&&=(e.bigScreenMQL.destroy(),null),e.smallScreenMQL&&=(e.smallScreenMQL.destroy(),null)},open:function(){var e=this,t;e._calendar(),t=e.popup._hovered,e.popup._hovered=!0,e.popup.open(),setTimeout(function(){e.popup._hovered=t},1)},close:function(){this.popup&&this.popup.close()},min:function(e){this._option(j,e)},max:function(e){this._option(M,e)},toggle:function(){var e=this;e[e.popup.visible()?v:_]()},move:function(e){var t=this,n=e.keyCode,r=t.calendar,i=e.ctrlKey&&n==c.DOWN||n==c.ENTER,a=!1;if(e.altKey)n==c.DOWN?(t.open(),e.preventDefault(),a=!0):n==c.UP&&(t.close(),e.preventDefault(),a=!0);else if(t.popup&&t.popup.visible()){if(n==c.ESC||i&&r._cell.hasClass(w))return t.close(),e.preventDefault(),!0;n!=c.SPACEBAR&&(t._current=r._move(e)),a=!0}return a},current:function(e){this._current=e,this.calendar&&this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,r=t.options,i=r.disableDates;i&&i(e)&&(e=null),t._value=e,t._current=new te(+B(e,r.min,r.max)),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(w)!==-1&&(this.calendar.trigger(`change`),this.close())},_option:function(e,t){var n=this,r=n.calendar;n.options[e]=t,r&&r[e](t)}},W.normalize=ne,n.DateView=W;var G=o.extend({init:function(t,r){var i=this,c,l,u=n.isPresent(r)&&n.isPresent(r.enable);o.fn.init.call(i,t,r),t=i.element,r=i.options,r.disableDates=n.calendar.disabled(r.disableDates),r.min=s(t.attr(`min`))||s(r.min),r.max=s(t.attr(`max`))||s(r.max),!u&&(e(t).is(`:disabled`)||e(t).parents(`fieldset`).is(`:disabled`))&&(i.options.enable=!1),!n.isPresent(r.readonly)&&t.attr(`readonly`)?r.readonly=!0:n.isPresent(r.readonly)||(r.readonly=!1),i.options.inputMode=r.inputMode||i.element.attr(`inputmode`)||`text`,i.element.attr(`inputmode`,i.options.inputMode),ne(r),i._initialOptions=H({},r),i._wrapper(),i._createDateView(),i._createDateViewProxy=i._createDateView.bind(i),i.bigScreenMQL=a(`large`),i.options.adaptiveMode==`auto`&&i.bigScreenMQL.onChange(()=>{i._createDateViewProxy(),i.dateView.value(i._value)}),i._icon();try{t[0].setAttribute(`type`,`text`)}catch{t[0].type=`text`}t.addClass(`k-input-inner`).attr({role:`combobox`,"aria-label":i.options.messages.selectDate,readonly:i.options.readonly,"aria-expanded":!1,"aria-haspopup":`grid`,"aria-controls":i.dateView._dateViewID,autocomplete:`off`}),i._reset(),i._template(),l=!i.options.enable,l?i.enable(!1):i.readonly(t.is(`[readonly]`)),c=s(r.value||i.element.val(),r.parseFormats,r.culture),i._createDateInput(r),i._old=i._update(c||i.element.val()),i._oldText=t.val(),i._applyCssClasses(),r.label&&i._label(),i.element.removeAttr(`style`),n.notify(i),o.fn.endInit.call(i)},events:[_,v,y,b],options:{name:`DatePicker`,autoAdjust:!0,value:null,footer:``,format:``,culture:``,enable:!0,parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:N,depth:N,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:({valueType:e,text:t})=>`Current focused ${e} is ${t}`,dateInput:!1,weekNumber:!1,messages:{weekColumnHeader:``,selectDate:`Select date`},componentType:`classic`,adaptiveMode:`none`,readonly:null,size:t,fillMode:t,rounded:t,label:null,autoFill:!1,autoCorrectParts:!0,adaptiveTitle:null,adaptiveSubtitle:null},_createDateView:function(){var e=this,t=e.options,n=e.element,r;e.dateView&&=(e.dateView.popup&&e.dateView.popup.wrapper&&e.dateView.popup.wrapper.remove(),e.dateView.destroy(),null),e.dateView=new W(H({},t,{id:n.attr(A),anchor:e.wrapper,change:function(){e._change(this.value()),e.close()},close:function(t){e.trigger(v)?t.preventDefault():(n.attr(I,!1),r.attr(L,!0),setTimeout(function(){n.removeAttr(`aria-activedescendant`)}))},open:function(t){var i=e.options,a;e.trigger(_)?t.preventDefault():(e.element.val()!==e._oldText&&(a=s(n.val(),i.parseFormats,i.culture),e.dateView[a?`current`:`value`](a)),n.attr(I,!0),r.attr(L,!1),e._updateARIA(a))}})),r=e.dateView.div},setOptions:function(e){let r=this,i=e.value||r.options.value||r._value;o.fn.setOptions.call(r,e),r._value=i,e=r.options,e.min=s(e.min),e.max=s(e.max),ne(e),r._dateIcon.off(m),r._dateIcon.remove(),r.dateView.setOptions(e),r._icon(),r._editable({readonly:e.readonly===t?r.options.readonly:e.readonly,disable:!r.options.enable}),r._createDateInput(e),!r._dateInput&&i&&r.element.val(n.toString(i,e.format,e.culture)),i&&(r._updateARIA(i),r.value(new Date(i)),r.dateView&&r.dateView.value(new Date(i)),r._dateInput&&r._dateInput.value(new Date(i))),e.label&&r._inputLabel?r.label.setOptions(e.label):e.label===!1?(r.label._unwrapFloating(),r._inputLabel.remove(),delete r._inputLabel):e.label&&r._label()},_editable:function(e){var t=this,n=t._dateIcon.off(m),r=t.element.off(m),i=t.wrapper.off(m),a=e.readonly,o=e.disable;!a&&!o?(i.removeClass(T).on(D,t._toggleHover),r&&r.length&&(r[0].removeAttribute(x),r[0].removeAttribute(S)),r.attr(P,!1).attr(F,!1).on(`keydown`+m,t,t._keydown.bind(t)).on(`focusout`+m,t._blur.bind(t)).on(`focus`+m,function(){t.wrapper.addClass(C)}),n.on(g,t._click.bind(t)).on(O,U)):(i.addClass(o?T:``).removeClass(o?``:T),r.attr(x,o).attr(S,a).attr(P,o).attr(F,a))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!e}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e)},_label:function(){var t=this,r=t.options,i=e.isPlainObject(r.label)?r.label:{content:r.label};t._dateInput&&(i.floatCheck=()=>!t.value()&&(!t._dateInput._hasDateInput()||t.element.val()===``)&&document.activeElement!==t.element[0]?(t.element.val(``),!0):!1),t.label=new n.ui.Label(null,e.extend({},i,{widget:t})),t._inputLabel=t.label.element},destroy:function(){var e=this;e.label&&e.label.destroy(),o.fn.destroy.call(e),e.dateView.calendar&&e._navigateCalendarHandler&&(e.dateView.calendar.unbind(k,e._navigateCalendarHandler),e._navigateCalendarHandler=null),e.dateView.destroy(),e.element.off(m),e._dateIcon.off(m),e._form&&e._form.off(`reset`,e._resetHandler),e.bigScreenMQL&&e.bigScreenMQL.destroy(),e._createDateViewProxy=null},open:function(){this.dateView.open(),this._navigateCalendar()},close:function(){this.dateView.close()},min:function(e){return this._option(j,e)},max:function(e){return this._option(M,e)},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),n._old===null&&(n._dateInput?n._dateInput.value(n._old):n.element.val(``)),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_toggleHover:function(t){e(t.currentTarget).toggleClass(E,t.type===`mouseenter`)},_isReset:function(e){var t=this;return t.options.dateInput&&t.options.autoFill&&t._dateInput._emptyMask==e},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e.options.autoFill&&!e._isReset(t)&&(e._dateInput.dateInputInstance.autoFill(),t=e.element.val()),e._change(t),t||e.dateView.current(n.calendar.getToday())),e.wrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._navigateCalendar(),t._focusElement()},_focusElement:function(){var e=this.element;e[0]!==d()&&e.trigger(`focus`)},_change:function(e){var t=this,r=t.element.val(),i;e=t._update(e),i=!n.calendar.isEqualDate(t._old,e);var a=i&&!t._typing,o=r!==t.element.val();(a||o)&&t.element.trigger(y),i&&(t._old=e,t._oldText=t.element.val(),t.trigger(y)),t._typing=!1},_keydown:function(e){var t=this,n=t.dateView,r=t.element.val(),i=!1;!n.popup.visible()&&e.keyCode==c.ENTER&&r!==t._oldText?t._change(r):(i=n.move(e),t._updateARIA(n._current),i?e.keyCode!==c.ENTER&&(e.stopPropagation(),t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation()):t._typing=!0)},_icon:function(){var t=this,n=t.element,r=t.options,a=n.next(`button.k-input-button`);a[0]||(a=e(i.renderButton(`<button aria-label="${t.options.messages.selectDate}" tabindex="-1" class="k-input-button k-button k-icon-button"></button>`,{icon:`calendar`,size:r.size,fillMode:r.fillMode,shape:`none`})).insertAfter(n)),t._dateIcon=a.attr({role:`button`})},_setCalendarAttribute:function(){var e=this;setTimeout(function(){e.element.attr(R,e.dateView.calendar._table.attr(R))})},_navigateCalendar:function(){var e=this;e._navigateCalendarHandler||=e._setCalendarAttribute.bind(e),e.dateView.calendar&&e.dateView.calendar.unbind(k,e._navigateCalendarHandler).bind(k,e._navigateCalendarHandler)},_option:function(e,n){var r=this,i=r.options;if(n===t)return i[e];n=s(n,i.parseFormats,i.culture),n&&(i[e]=new te(+n),r.dateView[e](n),r._dateInput&&r._dateInput[e](n))},_update:function(e){var t=this,r=t.options,i=r.min,a=r.max,o=t._value,c=s(e,r.parseFormats,r.culture),l=c===null&&o===null||c instanceof Date&&o instanceof Date,u;return r.disableDates(c)&&(c=null,!t._old&&!t.element.val()&&(e=null)),+c==+o&&l?(u=n.toString(c,r.format,r.culture),u!==e&&!(t._dateInput&&!c)&&t.element.val(c===null?e:u),c):(c!==null&&V(c,i)?c=B(c,i,a):ee(c,i,a)||(c=null),t._value=c,t.dateView.value(c),t._dateInput&&c?t._dateInput.value(c):t.element.val(n.toString(c||e,r.format,r.culture)),t._updateARIA(c),c)},_wrapper:function(){var e=this,t=e.element,n=t.parents(`.k-datepicker`);n[0]||(n=t.wrap(p).parent()),n[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),e.wrapper=n.addClass(`k-datepicker k-input`).addClass(t[0].className).removeClass(`input-validation-error`)},_reset:function(){var t=this,r=t.element,i=r.attr(`form`),a=t.options,o=a.disableDates,s=a.parseFormats.length?a.parseFormats:null,c=t._initialOptions.value,l=i?e(`#`+i):r.closest(`form`),u=r[0].defaultValue;c&&o&&o(c)&&(c=null),(!u||!n.parseDate(u,s,a.culture))&&c&&r.attr(`value`,n.toString(c,a.format,a.culture)),l[0]&&(t._resetHandler=function(){t.value(c||r[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=l.on(`reset`,t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&=(this._dateInput.destroy(),null),e.dateInput&&(this._dateInput=new r.DateInput(this.element,{autoAdjust:e.autoAdjust,culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,readonly:e.readonly,min:e.min,max:e.max,messages:e.messages.dateInput,autoFill:e.autoFill,autoCorrectParts:e.autoCorrectParts,toggleDayPeriod:!0,inputMode:e.inputMode}))},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(R),n&&t.element.attr(R,n._updateAria(t._ariaTemplate,e))}});n.cssProperties.registerPrefix(`DatePicker`,`k-input-`),n.cssProperties.registerValues(`DatePicker`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),r.plugin(G)})(window.kendo.jQuery),kendo,(function(e,t){let n=window.kendo,r=n.ui.Widget,i=`k-focus`,a=n.keys,o=`push`,s=`overlay`,c=`left`,l=n.ui.Widget.extend({init:function(t,i){let a=this,s;a._originalItems=i&&i.items,r.fn.init.call(this,t,i),i=a.options,a._element(t),a._wrapper(t),a._navigatable(),a.position(),a._mode(),i.mini&&a._miniMode(),a._initDrawerItems(),i.mini&&i.mode!=o&&a._setBodyOffset(),s=this.userEvents=new n.UserEvents(i.mode==o?this.drawerContainer:e(document.body),{fastTap:!0,allowSelection:!0}),a.tap=function(t){let n=!1;if(e.contains(a.drawerItemsWrapper.filter(`.k-drawer-items`)[0],t.event.target)){let r=e(t.event.target).closest(`[data-role='drawer-item']`);n=r.length>0&&r.find(`.k-drawer-toggle`).length>0,a._itemClick(t)}!n&&i.autoCollapse&&a.visible&&!a.trigger(`hide`,{sender:this})&&(a.hide(),t.preventDefault())},this.options.swipeToOpen?(s.bind(`start`,e=>a._start(e)),s.bind(`move`,e=>a._update(e)),s.bind(`end`,e=>a._end(e)),s.bind(`tap`,a.tap)):s.bind(`press`,a.tap),i.minHeight&&i.mode==o&&a.drawerContainer.css(`min-height`,i.minHeight),a._showWatermarkOverlay&&a._showWatermarkOverlay(a.drawerContainer[0]),i.expanded&&(a._removeTransition(),a.show()),n.ui.Widget.fn.endInit.call(a)},_element:function(){let t=this,n=t.element,r=t.options;t.contentElement=n.children().wrapAll(`<div class='k-drawer-content'></div>`).parent(),r.template instanceof Function?t.drawerElement=e(r.template()):r.template?t.drawerElement=e(r.template):r.items&&r.items.length?t.drawerElement=e(t._renderItems(r.items,0)):t.drawerElement=e(r.template),n.addClass(`k-drawer`)},_renderItems:function(e,t){let r=arguments[2]===!0,i=arguments[3]===!0,a=[];return r||a.push(`<ul class='k-drawer-items'>`),e.forEach(e=>{if(e||={},e.separator){a.push(`<li data-role='drawer-separator'></li>`);return}let r=i?e.miniTemplate:e.template,o=e.items&&e.items.length;if(r instanceof Function){a.push(r(e)),o&&a.push(this._renderItems(e.items,t+1,!0,i));return}let s=``;e.icon&&(s=n.ui.icon({icon:e.icon}));let c=[],l=``,u=``;e.enabled===!1&&(c.push(`k-disabled`),l=` aria-disabled='true'`),e.cssClass&&c.push(n.htmlEncode(e.cssClass)),o&&(u=`<span class='k-spacer'></span><span class='k-drawer-toggle'>${n.ui.icon({icon:this._hasSelectedDescendant(e)?`chevron-up`:`chevron-down`})}</span>`);let d=c.length?` class='${c.join(` `)}'`:``,f=e.text==null?``:e.text;a.push(`<li data-role='drawer-item' data-level='${t}'${d}${l}>${s}${i?``:`<span class='k-item-text'>${n.htmlEncode(f)}</span>`}${u}</li>`),o&&a.push(this._renderItems(e.items,t+1,!0,i))}),r||a.push(`</ul>`),a.join(``)},_generatedItems:function(e){let t=[];return(e||[]).forEach(e=>{e||={},e.separator||t.push(e),e.items&&e.items.length&&(t=t.concat(this._generatedItems(e.items)))}),t},_itemMapEntry:function(e){return(this._itemsMap||[]).find(t=>t.element===e[0])},_hasSelectedDescendant:function(e){return(e&&e.items||[]).some(e=>(e||={},!e.separator&&(e.selected||this._hasSelectedDescendant(e))))},_navigatable:function(){let e=this.element;e.find(`[data-role='drawer-item']`).first().parent().attr(`role`,`menubar`).attr(`aria-orientation`,`vertical`),this.options.navigatable&&e.attr(`tabIndex`,0).on(`focus.kendoDrawer`,this._focus.bind(this)).on(`focusout.kendoDrawer`,this._blur.bind(this)).on(`keydown.kendoDrawer`,this,this._keyDown.bind(this))},_blur:function(){this._current&&this._current.removeClass(i)},_focus:function(){this._setCurrent(this._current?this._current:this.drawerItemsWrapper.find(`[data-role='drawer-item']`).eq(0))},_setCurrent:function(t){let r=n.guid(),a=e(t);this._current&&(e(this._current).removeClass(i).removeAttr(`id`),this.drawerItemsWrapper.removeAttr(`aria-activedescendant`)),a.attr(`id`,r).addClass(i),this.drawerItemsWrapper.attr(`aria-activedescendant`,r),this._current=a},_keyDown:function(t){let n=!1,r=this._current,i;t.keyCode==a.UP&&(n=!0,i=r.prevAll(`[data-role='drawer-item']`).first(),i.length?this._setCurrent(i):this._setCurrent(r.parent().find(`[data-role='drawer-item']`).last())),t.keyCode==a.DOWN&&(n=!0,i=r.nextAll(`[data-role='drawer-item']`).first(),i.length?this._setCurrent(i):this._setCurrent(r.parent().find(`[data-role='drawer-item']`).first())),t.keyCode==a.HOME&&(n=!0,this._setCurrent(this.drawerItemsWrapper.find(`[data-role='drawer-item']`).eq(0))),t.keyCode==a.END&&(n=!0,this._setCurrent(this.drawerItemsWrapper.find(`[data-role='drawer-item']`).last())),(t.keyCode==a.SPACEBAR||t.keyCode==a.ENTER)&&(n=!0,this.tap({event:{target:r[0]},preventDefault:e.noop})),t.keyCode==a.ESC&&(n=!0,this.hide()),n&&t.preventDefault()},_wrapper:function(){let e=this.options,t=this.drawerElement,n=this.element,r=this.contentElement,i=this.drawerItemsWrapper=t,a=this.drawerWrapper=i.wrapAll(`<div class='k-drawer-wrapper'></div>`).parent(),o=this.drawerContainer=n.wrap(`<div class='k-drawer-container'></div>`).parent();t.filter(`ul`).addClass(`k-drawer-items`),e.mini?e.mini.width&&a.width(e.mini.width):a.width(0),o.append(r),n.append(a)},_addTransition:function(){this.drawerWrapper.css(`transition`,`all .3s ease-out`)},_removeTransition:function(){this.drawerWrapper.css(`transition`,`none`)},_setBodyOffset:function(){let t=this.element.outerWidth();this.leftPositioned?e(document.body).css(`padding-left`,t):e(document.body).css(`padding-right`,t)},_initDrawerItems:function(){let t=this.options,n=this.drawerItemsWrapper,r=n.find(`[data-role='drawer-item']`),i=n.find(`[data-role='drawer-separator']`),a=-1,o,s=!!this._miniTemplate&&!!t.items&&t.items.length&&!t.template&&!(t.mini&&t.mini.template);r.addClass(`k-drawer-item`).attr(`role`,`menuitem`),i.addClass(`k-drawer-item k-drawer-separator`).attr(`role`,`separator`),this._itemsMap=null,t.items&&t.items.length&&!t.template&&(o=this._generatedItems(this._originalItems||t.items),t.mini&&t.mini.template||(this._itemsMap=[]),r.each((t,n)=>{let r=o[t];if(r){if(r.attr&&!(s&&r.miniTemplate instanceof Function||!s&&r.template instanceof Function)){let t=e.extend({},r.attr);t.class&&(e(n).addClass(t.class),delete t.class),e(n).attr(t)}this._itemsMap&&this._itemsMap.push({element:n,dataItem:r}),a<0&&r.selected&&(a=t)}}),a>=0&&!(this._selectedItemIndex>=0)&&(this._selectedItemIndex=a)),this._toggleLevelClasses(!!this.visible),t.items&&t.items.length&&!t.template&&(this._collapseAllChildren(r),this._itemsMap&&r.each((t,n)=>{let i=this._itemMapEntry(e(n));i&&i.dataItem&&i.dataItem.expanded&&this._expandItem(e(n),r,t)}),this._selectedItemIndex>=0&&this._expandAncestors(r,this._selectedItemIndex)),r.each((e,t)=>{let n=s&&o[e]&&o[e].text;t.setAttribute(`aria-label`,n||t.textContent.trim())}),this._selectedItemIndex>=0&&(r.removeClass(`k-selected`),r.eq(this._selectedItemIndex).addClass(`k-selected`))},_toggleLevelClasses:function(t){this.drawerItemsWrapper.find(`[data-role='drawer-item']`).each((n,r)=>{let i=`k-level-`+(e(r).data(`level`)||0);e(r).toggleClass(i,t)})},_mode:function(){let t=this.options,n=this.drawerContainer;if(t.mode==o)n.addClass(`k-drawer-push`);else{n.addClass(`k-drawer-overlay`);let t=this.overlayContainer=e(`<div class="k-overlay"></div>`);t.hide(),n.prepend(t)}},_miniMode:function(){let t=this.options,n=this.drawerContainer,r=t.mini.width,i=this._miniTemplate=t.mini.template,a=this.drawerItemsWrapper,o=this.drawerWrapper;n.addClass(`k-drawer-mini`),!i&&t.items&&t.items.length&&!t.template&&(i=this._miniTemplate=this._renderItems(t.items,0,!0,!0)),i&&(i instanceof Function?a.html(e(i())):a.html(e(i))),r&&o.width(r),this.minWidth=t.mini.width||this.drawerWrapper.width()},setOptions:function(t){let n=this,i,a,o,s;r.fn.setOptions.call(n,t),`items`in t&&(n._originalItems=t.items,!n.options.template&&(i=n.options.items&&n.options.items.length,a=i?n._renderItems(n.options.items,0,!0):``,o=n.options.mini&&n.drawerContainer.hasClass(`k-drawer-mini`),n.options.mini?n.options.mini.template?n._miniTemplate=n.options.mini.template:n._miniTemplate=i?n._renderItems(n.options.items,0,!0,!0):``:n._miniTemplate=null,o&&n._miniTemplate?n._miniTemplate instanceof Function?n.drawerItemsWrapper.html(e(n._miniTemplate())):n.drawerItemsWrapper.html(e(n._miniTemplate)):n.drawerItemsWrapper.html(a),n._current=null,n._selectedItemIndex=-1,n._itemsMap=null,n._initDrawerItems(),s=n.drawerItemsWrapper.find(`[data-role='drawer-item']`),s.removeClass(`k-selected`),n._selectItem()))},show:function(){let e=this.drawerWrapper,t=this.drawerContainer,n=this.options,r=t.hasClass(`k-drawer-expanded`),i=this._miniTemplate,a=this.drawerItemsWrapper;if(r||(t.addClass(`k-drawer-expanded`),this.visible=!0),i){if(n.template){let e=n.template instanceof Function?n.template():n.template;a.html(e)}else a.html(this._renderItems(this._originalItems||n.items,0,!0));this._initDrawerItems(),this._selectItem()}e.width(n.width),n.mini&&t.removeClass(`k-drawer-mini`),n.mode===s&&(this.overlayContainer.show(),this.visible=!0),this._toggleLevelClasses(!0)},hide:function(){let e=this.drawerWrapper,t=this.drawerContainer,n=this.options,r=this.drawerItemsWrapper,i=this._miniTemplate,a=n.mini&&n.mini.width;this._addTransition(),this._miniTemplate&&(r.html(i),this._initDrawerItems(),this._selectItem()),n.mini?(t.addClass(`k-drawer-mini`),a?e.width(a):e.width(``)):e.width(0),this.visible&&=(t.removeClass(`k-drawer-expanded`),!1),n.mode===s&&this.overlayContainer.hide(),this._toggleLevelClasses(!1)},position:function(e){let t=this.options,n=e||t.position;n==`right`?(this.element.removeClass(`k-drawer-start`),this.element.addClass(`k-drawer-end`)):(this.element.removeClass(`k-drawer-end`),this.element.addClass(`k-drawer-start`)),this.leftPositioned=n===c},_start:function(e){let t=this.options,r=this.drawerItemsWrapper,i=e.sender;if(Math.abs(e.x.velocity)<Math.abs(e.y.velocity)||n.triggeredByInput(e.event)){i.cancel();return}this.drawerMini&&r.html(this.drawerElement),this._removeTransition(),t.mode!=o&&this.overlayContainer.show()},_update:function(e){this.options.mode==o?this._push(e):this._overlay(e)},_end:function(e){let t=e.x.velocity,n=this.options,r=this.drawerWrapper.width()>n.width/2,i=.8,a;this._addTransition(),a=this.leftPositioned?t>-.8&&(t>i||r):t<i&&(t<-.8||r),a?this.trigger(`show`,{sender:this})?(e.preventDefault(),this.hide()):this.show():this.trigger(`hide`,{sender:this})?(e.preventDefault(),this.show()):this.hide()},_overlay:function(e){let t=this.options,n=t.mini&&t.mini.width||this.minWidth||0,r=this.drawerWrapper,i=r.width()+(this.leftPositioned?e.x.delta:-e.x.delta),a=Math.min(Math.max(i,n),t.width);e.event.preventDefault(),e.event.stopPropagation(),r.width(a)},_push:function(e){let t=this.options,n=t.mini&&t.mini.width||this.minWidth||0,r=this.drawerWrapper,i=r.width()+(this.leftPositioned?e.x.delta:-e.x.delta),a=Math.min(Math.max(i,n),t.width);e.event.preventDefault(),e.event.stopPropagation(),r.width(a)},_selectItem:function(e){let t=this.drawerItemsWrapper.find(`[data-role='drawer-item']`),n,r;if(e){e.addClass(`k-selected`),n=this._itemMapEntry(e),this.trigger(`itemClick`,{item:e,dataItem:n&&n.dataItem,sender:this}),this._selectedItemIndex=t.index(e);return}r=this._selectedItemIndex,r>=0&&t.eq(r).addClass(`k-selected`)},_collapseAllChildren:function(t){t.each((t,n)=>{parseInt(e(n).data(`level`)||0,10)>0&&e(n).hide()})},_expandItem:function(e,t,r){let i=parseInt(e.data(`level`)||0,10);e.addClass(`k-expanded`);let a=e.find(`.k-drawer-toggle`);a.length&&a.html(n.ui.icon({icon:`chevron-up`}));for(let e=r+1;e<t.length;e++){let n=t.eq(e),r=parseInt(n.data(`level`)||0,10);if(r<=i)break;r===i+1&&n.show()}},_expandAncestors:function(e,t){let n=parseInt(e.eq(t).data(`level`)||0,10);if(n===0)return;let r=n;for(let n=t-1;n>=0;n--){let t=e.eq(n),i=parseInt(t.data(`level`)||0,10);if(i<r&&(this._expandItem(t,e,n),r=i,i===0))break}},_toggleChildren:function(e){let t=parseInt(e.data(`level`)||0,10),r=this.drawerItemsWrapper.find(`[data-role='drawer-item']`),i=r.index(e),a=e.hasClass(`k-expanded`),o=e.find(`.k-drawer-toggle`);if(a){e.removeClass(`k-expanded`);for(let e=i+1;e<r.length;e++){let i=r.eq(e);if(parseInt(i.data(`level`)||0,10)<=t)break;i.hide(),i.hasClass(`k-expanded`)&&(i.removeClass(`k-expanded`),i.find(`.k-drawer-toggle`).html(n.ui.icon({icon:`chevron-down`})))}o.length&&o.html(n.ui.icon({icon:`chevron-down`}))}else this._expandItem(e,r,i)},_itemClick:function(t){let n=this,r=e(t.event.target).closest(`[data-role='drawer-item']`);!r||!r.length||r.hasClass(`k-disabled`)||(n.drawerItemsWrapper.find(`[data-role='drawer-item']`).removeClass(`k-selected`),n._selectItem(r),n.options.navigatable&&n._setCurrent(r),!n.options.template&&r.find(`.k-drawer-toggle`).length&&n._toggleChildren(r))},destroy:function(){this.options.mode!=o&&(this.leftPositioned?e(document.body).css(`padding-left`,0):e(document.body).css(`padding-right`,0)),r.fn.destroy.call(this),this.userEvents.destroy(),n.destroy(this.element),this.element=this.drawerWrapper=this.drawerElement=this.drawerContainer=this.drawerItemsWrapper=this._itemsMap=this._miniTemplate=this._originalItems=null},options:{name:`Drawer`,autoCollapse:!0,expanded:!1,items:null,position:c,mode:`overlay`,swipeToOpen:!0,width:280,mini:!1,navigatable:!1,template:``},events:[`hide`,`show`,`itemClick`,`kendoKeydown`]});n.ui.plugin(l)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.htmlEncode,i=n.ui,a=n.html,o=i.List,s=i.Select,c=n.support,l=n._activeElement,u=n.data.ObservableObject,d=n.keys,f=`.kendoDropDownList`,p=f+`FocusEvent`,m=`disabled`,h=`readonly`,g=`change`,_=`k-focus`,v=`k-disabled`,y=`aria-disabled`,b=`aria-readonly`,x=`click`+f+` touchend`+f,S=`mouseenter`+f+` mouseleave`+f,C=`tabindex`,w=`filter`,T=`accept`,E="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",D=`open`,O=`close`,k=s.extend({init:function(r,i){var a=this,o=i&&i.index,c,l,u;a.ns=f,i=Array.isArray(i)?{dataSource:i}:i,s.fn.init.call(a,r,i),i=a.options,r=a.element.on(`focus`+f,a._focusHandler.bind(a)),!n.isPresent(i.readonly)&&r.attr(`readonly`)?i.readonly=!0:n.isPresent(i.readonly)||(i.readonly=!1),a._focusInputHandler=a._focusInput.bind(a),a.optionLabel=e(),a._optionLabel(),a._inputTemplate(),a._reset(),a._prev=``,a._word=``,a._wrapper(),a._tabindex(),a.wrapper.data(C,a.wrapper.attr(C)),a._span(),a._popup(),a._mobile(),a._dataSource(),a._ignoreCase(),i.label&&this._label(),a._aria(),a._enable(),a._oldIndex=a.selectedIndex=-1,o!==t&&(i.index=o),a._initialIndex=i.index,a.requireValueMapper(a.options),a._initList(),a._aria(),a.options.virtual&&a.listView.one(`listBound`,function(){a._aria()}),a.listView.one(`dataBound`,a._attachAriaActiveDescendant.bind(a)),a.listView.bind(`dataBound`,()=>{a._refreshFloatingLabel(),a._aria()}),a._initializingCascade=!0,a._cascade(),a.one(`set`,function(e){!e.sender.listView.bound()&&a.hasOptionLabel()&&a._textAccessor(a._optionLabelText())}),i.autoBind?a.dataSource.fetch():a.selectedIndex===-1&&(l=i.text||``,l||(c=i.optionLabel,c&&i.index===0?l=c:a._isSelect&&(l=r.children(`:selected`).text())),a._textAccessor(l)),i.autoBind&&!a.listView.bound()?a.one(`dataBound`,function(){a._initializingCascade=!1}):a._initializingCascade=!1,u=e(a.element).parents(`fieldset`).is(`:disabled`),u&&a.enable(!1),a.listView.bind(`click`,function(e){e.preventDefault()}),n.notify(a),a._applyCssClasses(),s.fn.endInit.call(a)},options:{name:`DropDownList`,enabled:!0,autoBind:!0,_allowFilterPaste:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:``,dataValueField:``,optionLabel:``,cascadeFrom:``,cascadeFromField:``,cascadeFromParentField:``,ignoreCase:!0,animation:{},filter:`none`,minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:e=>r(e),fixedGroupTemplate:e=>r(e),autoWidth:!1,popup:null,filterTitle:null,readonly:null,size:t,fillMode:t,rounded:t,label:null,popupFilter:!0,adaptiveTitle:null,adaptiveSubtitle:null},events:[`open`,`close`,g,`select`,`filtering`,`dataBinding`,`dataBound`,`cascade`,`set`,`kendoKeydown`],setOptions:function(e){s.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._removeFilterHeader(),this._addFilterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;s.fn.destroy.call(e),e.wrapper.off(f),e.wrapper.off(p),e.element.off(f),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(p)},open:function(){var e=this,t=e.dataSource.filter()?e.dataSource.filter().filters.length>0:!1,n=this.listView;e.popup.visible()||(!e.listView.bound()||e._state===T?(e._open=!0,e._state=`rebind`,e.filterInput&&(e.filterInput.val(``),e._prev=``),e.filterInput&&e.options.minLength!==1&&!t?(e.refresh(),e.popup.one(`activate`,e._focusInputHandler),e.wrapper.attr(`aria-activedescendant`,n._optionID),e.popup.open(),e._resizeFilterInput()):e._filterSource()):e._allowOpening()&&(e._focusFilter=!0,e.popup.one(`activate`,e._focusInputHandler),e.popup._hovered=!0,e.wrapper.attr(`aria-activedescendant`,n._optionID),e.popup.open(),e._resizeFilterInput(),e._focusItem()))},close:function(){this._attachAriaActiveDescendant(),this.popup.close()},_attachAriaActiveDescendant:function(){var e=this.wrapper,t=e.find(`.k-input-inner`).attr(`id`);e.attr(`aria-describedby`,t)},_focusInput:function(){this._hasActionSheet()||this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e=this.filterInput,t=this._prevent;if(!(!e||this._hasActionSheet())){var r=this.filterInput[0]===l(),i=n.caret(this.filterInput[0])[0];this._prevent=!0,e.addClass(`k-hidden`),e.closest(`.k-list-filter`).css(`width`,this.popup.element.width()-1),e.removeClass(`k-hidden`),r&&(e.trigger(`focus`),n.caret(e[0],i)),this._prevent=t}},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||s.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;if(e===t)return n=this.listView.focus(),!n&&this.selectedIndex===0&&this.hasOptionLabel()?this.optionLabel:n;this._focus(e)},dataItem:function(n){var r=this,i=null;if(n===null)return n;if(n===t)i=r.listView.selectedDataItems()[0];else{if(typeof n!=`number`){if(r.options.virtual)return r.dataSource.getByUid(e(n).data(`uid`));n=n.hasClass(`k-list-optionlabel`)?-1:r.listView.getElementIndex(n)}else r.hasOptionLabel()&&--n;i=r.dataSource.flatView()[n]}return i||=r._optionLabelDataItem(),i},refresh:function(){this.listView.refresh()},text:function(e){var n=this,r,i=n.options.ignoreCase;if(e=e===null?``:e,e!==t){if(typeof e!=`string`){n._textAccessor(e);return}r=i?e.toLowerCase():e,n._select(function(e){return e=n._text(e),i&&(e=(e+``).toLowerCase()),e===r}).done(function(){n._textAccessor(n.dataItem()||e),n._refreshFloatingLabel()})}else return n._textAccessor()},_clearFilter:function(){e(this.filterInput).val(``),s.fn._clearFilter.call(this)},value:function(e){var n=this,r=n.listView,i=n.dataSource,a=function(){n.value(e)};if(e===t)return e=n._accessor()||n.listView.value()[0],e===t||e===null?``:e;if(n.requireValueMapper(n.options,e),(e||!n.hasOptionLabel())&&(n._initialIndex=null),this.trigger(`set`,{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()){n._valueSetter&&i.unbind(g,n._valueSetter),n._valueSetter=a.bind(n),i.one(g,n._valueSetter);return}n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done(function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._refreshFloatingLabel()})},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var t=this,i=t.options,a=i.optionLabel,o=i.optionLabelTemplate;if(!a){t.optionLabel.off().remove(),t.optionLabel=e();return}o||=e=>r(typeof a==`string`?e:n.getter(i.dataTextField)(e)),typeof o!=`function`&&(o=n.template(o)),t.optionLabelTemplate=o,t.hasOptionLabel()||(t.optionLabel=e(`<div role="option" class="k-list-optionlabel"></div>`).prependTo(t.list)),t.optionLabel.html(o(a)).off().on(x,t._click.bind(t)).on(S,t._toggleHover)},_optionLabelText:function(){var e=this.options.optionLabel;return typeof e==`string`?e:this._text(e)},_optionLabelDataItem:function(){var n=this,r=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(r)?new u(r):n._assignInstance(n._optionLabelText(),``):t},_buildOptions:function(e){var n=this;if(n._isSelect){var r=n.listView.value()[0],i=n._optionLabelDataItem(),a=i&&n._value(i);(r===t||r===null)&&(r=``),i&&=((a===t||a===null)&&(a=``),`<option value="`+a+`">`+n._text(i)+`</option>`),n._options(e,i,r),r!==o.unifyType(n._accessor(),typeof r)&&(n._customOption=null,n._custom(r))}},_listBound:function(){var e=this,t=e._initialIndex,n=e._state===w,r=e.dataSource.flatView(),i;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r.length),e._resizePopup(!0),e.popup.position(),e._buildOptions(r),n||(e._open&&e.toggle(e._allowOpening()),e._open=!1,e._fetch||(r.length?(!e.listView.value().length&&t>-1&&t!==null&&e.select(t),e._initialIndex=null,i=e.listView.selectedDataItems()[0],i&&e.text()!==e._text(i)&&e._selectValue(i)):e._textAccessor()!==e._optionLabelText()&&(e.listView.value(``),e._selectValue(null),e._oldIndex=e.selectedIndex))),e._hideBusy(),e.trigger(`dataBound`)},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this.options._allowFilterPaste&&this._search()},_attachFocusHandlers:function(){var e=this;e.wrapper.on(`focusin`+p,e._focusinHandler.bind(e)).on(`focusout`+p,e._focusoutHandler.bind(e)),e.filterInput&&e.filterInput.on(`focusin`+p,e._focusinHandler.bind(e)).on(`focusout`+p,e._focusoutHandler.bind(e))},_focusHandler:function(){this.wrapper.trigger(`focus`)},_focusinHandler:function(){this.wrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(e){var t=this,n=window.self!==window.top;t.wrapper.find(e.relatedTarget).length>0||t._prevent||(clearTimeout(t._typingTimeout),t._typingTimeout=null,c.mobileOS.ios&&n?t._change():t._blur(),t.wrapper.removeClass(_),t._prevent=!0,t._open=!1,t.element.trigger(`blur`))},_wrapperMousedown:function(e){let t=this,n=t.filterInput&&!t._touchEnabled()?e.currentTarget!==t.filterInput[0]:!0;t.popup&&t._hasActionSheet()&&(n=!0,t.popup.unbind(`close`),t.popup.bind(`close`,function(){t._change()})),t._prevent=n},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind(`activate`,this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,r=t.element,i=e.disable,a=e.readonly,o=t.wrapper.add(t.filterInput).off(f),s=t.wrapper.off(S);!a&&!i?(r.prop(m,!1).prop(h,!1),s.removeClass(v).on(S,t._toggleHover),o.attr(C,o.data(C)).attr(y,!1).attr(b,!1).on(`keydown`+f,t,t._keydown.bind(t)).on(n.support.mousedown+f,t._wrapperMousedown.bind(t)).on(`paste`+f,t._filterPaste.bind(t)),t.wrapper.on(`click`+f,t._wrapperClick.bind(t)),t.filterInput?o.on(`input`+f,t._search.bind(t)):o.on(`keypress`+f,t._keypress.bind(t)),r.attr(`aria-label`)||t._restoreAriaValue()):i?(o.attr(C,`-1`),s.addClass(v),t._updateDisabledAriaValue()):s.removeClass(v),r.attr(m,i).attr(h,a),o.attr(y,i).attr(b,a)},_keydown:function(e){var t=this,n=e.keyCode,r=e.altKey,i,a,o=t.popup.visible();if(t.filterInput&&(i=t.filterInput[0]===l()),n===d.LEFT?(n=d.UP,a=!0):n===d.RIGHT&&(n=d.DOWN,a=!0),!(a&&i)){if(e.keyCode=n,(r&&n===d.UP||n===d.ESC)&&t._focusElement(t.wrapper),t._state===w&&n===d.ESC&&(t._clearFilter(),t._open=!1,t._state=T),n===d.ENTER&&t._typingTimeout&&t.filterInput&&o){e.preventDefault();return}if(n===d.SPACEBAR&&!i&&(t.toggle(!o),e.preventDefault()),a=t._move(e),a){n!==d.TAB&&n!==d.ENTER&&(n!==d.ESC||o)&&e.stopPropagation();return}if(!o||!t.filterInput){var s=t._focus();if(n===d.HOME?(a=!0,t._firstItem()):n===d.END&&(a=!0,t._lastItem()),a){if(t.trigger(`select`,{dataItem:t._getElementDataItem(t._focus()),item:t._focus()})){t._focus(s);return}t._select(t._focus(),!0).done(function(){o||t._blur()}),e.preventDefault()}}!r&&!a&&t.filterInput&&t._search()}},_matchText:function(e,n){var r=this.options.ignoreCase;return e===t||e===null?!1:(e+=``,r&&(e=e.toLowerCase()),e.indexOf(n)===0)},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e=this,t=e.dataSource.flatView(),n=t.length+ +!!e.hasOptionLabel(),r=M(e._word,e._last),i=e.selectedIndex,a,o;i===-1?i=0:(i+=+!!r,i=j(i,n)),t=t.toJSON?t.toJSON():t.slice(),t=e._shuffleData(t,i);for(var s=0;s<n&&(o=e._text(t[s]),!(r&&e._matchText(o,e._last)))&&!e._matchText(o,e._word);s++);s!==n&&(a=e._focus(),e._select(j(i+s,n)).done(function(){var t=function(){e.popup.visible()||e._change()};e.trigger(`select`,{dataItem:e._getElementDataItem(e._focus()),item:e._focus()})?e._select(a).done(t):t()}))},_keypress:function(e){var t=this;if(e.which!==0&&e.keyCode!==n.keys.ENTER){var r=String.fromCharCode(e.charCode||e.keyCode);t.options.ignoreCase&&(r=r.toLowerCase()),r===` `&&e.preventDefault(),t._word+=r,t._last=r,t._search()}},_popupOpen:function(e){var t=this.popup;e.isDefaultPrevented()||this._hasActionSheet()||(t.wrapper=n.wrap(t.element),t.element.closest(`.km-root`)[0]&&(t.wrapper.addClass(`km-popup km-widget`),this.wrapper.addClass(`km-widget`)))},_popup:function(){s.fn._popup.call(this),this.popup.element.addClass(`k-dropdownlist-popup`),this.popup.one(`open`,this._popupOpen.bind(this))},_postCreatePopup:function(){s.fn._postCreatePopup.call(this),this._attachFocusHandlers()},_getElementDataItem:function(e){return!e||!e[0]?null:e[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(e))},_click:function(t){var n=this,r=t.item||e(t.currentTarget);if(t.preventDefault(),n.trigger(`select`,{dataItem:n._getElementDataItem(r),item:r})){n.close();return}n._userTriggered=!0,n._select(r).done(function(){n._blur(),n._focusElement(n.wrapper)})},_touchEnabled:function(){return c.mobileOS&&(c.touch||c.MSPointers||c.pointers)},_focusElement:function(e){var t=l(),n=this.wrapper,r=this.filterInput,i=e===r?n:r,a=this._touchEnabled();r&&r[0]===e[0]&&a||r&&(i[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.trigger(`focus`))},_searchByWord:function(e){if(e){var t=this;t.options.ignoreCase&&(e=e.toLowerCase()),t._select(function(n){return t._matchText(t._text(n),e)})}},_inputValue:function(){return this.text()},_search:function(){var e=this,t=e.dataSource;if(clearTimeout(e._typingTimeout),e._isFilterEnabled())e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t),e._resizeFilterInput()),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=``},e.options.delay),!e.listView.bound()){t.fetch().done(function(){e._selectNext()});return}e._selectNext()}},_get:function(t){var n,r,i,a=typeof t==`function`,o=a?e():e(t);if(this.hasOptionLabel()&&(typeof t==`number`?t>-1&&--t:o.hasClass(`k-list-optionlabel`)&&(t=-1)),a){for(n=this.dataSource.flatView(),i=0;i<n.length;i++)if(t(n[i])){t=i,r=!0;break}r||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){var e;return this.optionLabel.hasClass(`k-focus`)?(this._resetOptionLabel(),this.listView.focusFirst(),e=1):e=this.listView.focusNext(),e},_prevItem:function(){var e;if(!this.optionLabel.hasClass(`k-focus`))return e=this.listView.focusPrev(),!this.listView.focus()&&!this.options.virtual&&this._focus(this.optionLabel),e},_focusItem:function(){var e=this.options,n=this.listView,r=n.focus(),i=n.select();i=i[i.length-1],i===t&&e.highlightFirst&&!r&&(i=0),i===t?e.optionLabel&&(!e.virtual||e.virtual.mapValueTo!==`dataItem`)?(this._focus(this.optionLabel),this._select(this.optionLabel),this.listView.content.scrollTop(0)):n.scrollToIndex(0):n.focus(i)},_resetOptionLabel:function(e){this.optionLabel.removeClass(`k-focus`+(e||``)).removeAttr(`id`)},_focus:function(e){var n=this.listView,r=this.optionLabel;if(e===t)return e=n.focus(),!e&&r.hasClass(`k-focus`)&&(e=r),e;this._resetOptionLabel(),e=this._get(e),n.focus(e),e===-1&&(r.addClass(`k-focus`).attr(`id`,n._optionID),this.filterInput&&this.filterInput.removeAttr(`aria-activedescendant`).attr(`aria-activedescendant`,n._optionID))},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done(function(){!t&&n._state===w&&(n._state=T),e===-1&&n._selectValue(null)})},_selectValue:function(e){var n=this,r=n.options.optionLabel,i=n.listView.select(),a=``,o=``;i=i[i.length-1],i===t&&(i=-1),this._resetOptionLabel(` k-selected`),e||e===0?(o=e,a=n._dataValue(e),r&&(i+=1)):r&&(n._focus(n.optionLabel.addClass(`k-selected`)),o=n._optionLabelText(),a=typeof r==`string`?``:n._value(r),i=0),n.selectedIndex=i,a===null&&(a=``),n._textAccessor(o),n._accessor(a,i),n._triggerCascade(),!n.element.attr(`aria-label`)&&n.wrapper.hasClass(v)&&n._updateDisabledAriaValue()},_updateDisabledAriaValue:function(){var e=this,t=e.element,n=e.wrapper;if(!t.attr(`aria-label`)){var r=e.text(),i=n.attr(`aria-labelledby`),a=n.attr(`aria-describedby`);i?(n.data(`_origAriaLabelledBy`)||n.data(`_origAriaLabelledBy`,i),r&&a&&i.indexOf(a)===-1&&n.attr(`aria-labelledby`,i+` `+a)):r?n.attr(`aria-label`,r):n.removeAttr(`aria-label`)}},_restoreAriaValue:function(){var e=this,n=e.element,r=e.wrapper;if(!n.attr(`aria-label`)){var i=r.data(`_origAriaLabelledBy`);i===t?r.removeAttr(`aria-label`):(r.attr(`aria-labelledby`,i),r.removeData(`_origAriaLabelledBy`))}},_mobile:function(){var e=this.popup,t=c.mobileOS;e.element.parents(`.km-root`).eq(0).length&&t&&(e.options.animation.open.effects=t.android||t.meego?`fadeIn`:t.ios||t.wp?`slideIn:up`:e.options.animation.open.effects)},_span:function(){var e=this,t=e.wrapper,r=`span.k-input-value-text`,i=n.guid(),o=e.options,s=t.find(r),c;s[0]||(c=a.renderButton(`<button role="button" tabindex="-1" class="k-input-button" aria-label="select"></button>`,{icon:`chevron-down`,size:o.size,fillMode:o.fillMode,shape:`none`}),t.append(`<span id="`+i+`" unselectable="on" class="k-input-inner"><span class="k-input-value-text"></span></span>`).append(c).append(e.element),s=t.find(r)),e.span=s,e._arrow=t.find(`.k-input-button`),e._arrowIcon=e._arrow.find(`.k-icon,.k-svg-icon`)},_wrapper:function(){var e=this,t=e.element,n=t[0],r=t.parent();r.is(`span.k-picker`)||(r=t.wrap(`<span />`).parent(),r[0].style.cssText=n.style.cssText,r[0].title=n.title),e._focused=e.wrapper=r.addClass(`k-picker k-dropdownlist`).addClass(n.className).removeClass(`input-validation-error`).css(`display`,``).attr({accesskey:t.attr(`accesskey`),unselectable:`on`,role:`combobox`,"aria-expanded":!1}),t.hide().removeAttr(`accesskey`)},_clearSelection:function(e){this.select(e.value()?0:-1)},_openHandler:function(e){this._adjustListWidth(),this.trigger(D)?e.preventDefault():(this.wrapper.attr(`aria-expanded`,!0),this.list.find(`.k-list-ul`).attr(`aria-hidden`,!1))},_closeHandler:function(e){this.trigger(O)?e.preventDefault():(this.wrapper.attr(`aria-expanded`,!1),this.list.find(`.k-list-ul`).attr(`aria-hidden`,!0))},_inputTemplate:function(){var e=this,t=e.options.valueTemplate;if(t=t?n.template(t):t=>r(e._text(t)),e.valueTemplate=t,e.hasOptionLabel()&&!e.options.optionLabelTemplate)try{e.valueTemplate(e._optionLabelDataItem())}catch(e){throw Error(E,{cause:e})}},_textAccessor:function(n){var r=null,i=this.valueTemplate,a=this._optionLabelText(),o=this.span;if(n===t)return o.text();e.isPlainObject(n)||n instanceof u?r=n:a&&a===n&&(r=this.options.optionLabel),r||=this._assignInstance(n,this._accessor()),this.hasOptionLabel()&&(r===a||this._text(r)===a)&&(i=this.optionLabelTemplate,typeof this.options.optionLabel==`string`&&!this.options.optionLabelTemplate&&(r=a));try{o.html(i(r))}catch{o.html(``)}},_preselect:function(e,t){!e&&!t&&(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var n=this.options.dataTextField,r={};return n?(A(r,n.split(`.`),e),A(r,this.options.dataValueField.split(`.`),t),r=new u(r)):r=e,r}});function A(e,t,n){for(var r=0,i=t.length-1,a;r<i;++r)a=t[r],a in e||(e[a]={}),e=e[a];e[t[i]]=n}function j(e,t){return e>=t&&(e-=t),e}function M(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}i.plugin(k),n.cssProperties.registerPrefix(`DropDownList`,`k-picker-`),n.cssProperties.registerValues(`DropDownList`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}])})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui,i=r.Widget,a=n.isFunction,o=e.extend,s=`horizontal`,c=`vertical`,l=`start`,u=`resize`,d=`resizeend`,f=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()==c?c:s,n._positionMouse=n.orientation==s?`x`:`y`,n._position=n.orientation==s?`left`:`top`,n._sizingDom=n.orientation==s?`outerWidth`:`outerHeight`,n.draggable=new r.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:n._resize.bind(n),dragcancel:n._cancel.bind(n),dragstart:n._start.bind(n),dragend:n._dragend.bind(n),clickMoveClick:t.clickMoveClick}),n.userEvents=n.draggable.userEvents,i.fn.endInit.call(n)},events:[u,d,l],options:{name:`Resizable`,orientation:s,clickMoveClick:!1},resize:function(){},_max:function(e){var n=this,r=n.hint?n.hint[n._sizingDom]():0,i=n.options.max;return a(i)?i(e):i===t?i:n._initialElementPosition+i-r},_min:function(e){var n=this,r=n.options.min;return a(r)?r(e):r===t?r:n._initialElementPosition+r},_start:function(t){var n=this,r=n.options.hint,i=e(t.currentTarget);n._initialElementPosition=i.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,r&&(n.hint=a(r)?e(r(i)):r,n.hint.css({position:`absolute`}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(l,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css(`cursor`,i.css(`cursor`))},_resize:function(e){var n=this,r=n._maxPosition,i=n._minPosition,a=n._initialElementPosition+(e[n._positionMouse].location-n._initialMousePosition),s=i===t?a:Math.max(i,a);n.position=s=r===t?s:Math.min(r,s),n.hint&&n.hint.toggleClass(n.options.invalidClass||``,s==r||s==i).css(n._position,s),n.resizing=!0,n.trigger(u,o(e,{position:s}))},_dragend:function(e){this._stop(),this.trigger(d,o(e,{position:this.position}))},_stop:function(){var t=this;t.hint&&t.hint.remove(),t.resizing=!1,e(document.body).css(`cursor`,``)},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop())},destroy:function(){var e=this;i.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,r=n._position,i=n.targetPosition,a=n.position;a===t&&(a=i[r]),i[r]=a+e,n.userEvents.move(i.left,i.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui.Widget,i=n.ui.Popup.TabKeyTrap,a=n.ui.Draggable,o=e.isPlainObject,s=n._activeElement,c=n._outerWidth,l=n._outerHeight,u=e.extend,d=e.each,f=n.template,p=`body`,m,h=`.kendoWindow`,g=`.kendoWindowModal`,_=`.k-window`,v=`.k-window-title`,y=v+`bar`,b=`.k-window-content`,x=`.k-dialog-content`,S=`.k-resize-handle`,C=`.k-overlay`,w=`k-window-minimized`,T=`k-content-frame`,E=`k-i-loading`,D=`k-hover`,O=`k-focus`,k=`k-window-maximized`,A=`k-display-inline-flex`,j=`:visible`,M=`k-hidden`,N=`hidden`,P=`cursor`,F=`open`,I=`activate`,L=`deactivate`,R=`close`,z=`refresh`,ee=`minimize`,B=`maximize`,V=`resizeStart`,H=`resize`,te=`resizeEnd`,ne=`dragstart`,U=`dragend`,W=`restore`,G=`kendoKeydown`,K=`error`,re=`overflow`,q=`original-overflow-rule`,ie=`zIndex`,J=`.k-window-titlebar-actions [ref-window-minimize],.k-window-titlebar-actions [ref-window-maximize]`,ae=`[ref-window-pin]`,oe=`[ref-window-unpin]`,se=ae+`,`+oe,Y=`.k-window-titlebar .k-window-titlebar-action`,ce=`.k-window-titlebar [ref-window-refresh]`,le={close:`_close`,maximize:`maximize`,minimize:`minimize`,restore:`restore`,refresh:`refresh`,pin:`pin`,unpin:`unpin`},ue=`WindowEventsHandled`,X=/^0[a-z]*$/i,de=n.isLocalUrl,fe={small:`k-window-sm`,medium:`k-window-md`,large:`k-window-lg`};function pe(e){return e!==void 0}function me(e,t){return parseInt(e.css(t),10)||0}function he(e,t,n){return e&&isNaN(e)&&e.toString().indexOf(`px`)<0?e:Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),t===-1/0?t:parseInt(t,10))}function ge(){return!this.type||this.type.toLowerCase().indexOf(`script`)>=0}function _e(t){for(var n={top:t.offsetTop,left:t.offsetLeft},r=t.offsetParent;r;){n.top+=r.offsetTop,n.left+=r.offsetLeft;var i=e(r).css(`overflowX`),a=e(r).css(`overflowY`);(a===`auto`||a===`scroll`)&&(n.top-=r.scrollTop),(i===`auto`||i===`scroll`)&&(n.left-=r.scrollLeft),r=r.offsetParent}return n}var ve=r.extend({init:function(a,s){var c=this,l,u={},d,f,p,m,g,S,C,w=s&&s.actions&&!s.actions.length,E;r.fn.init.call(c,a,s),s=c.options,p=s.position,a=c.element,m=s.content,C=e(window),w&&(s.actions=[]),c.appendTo=e(s.appendTo),c.containment=s.draggable.containment?e(s.draggable.containment).first():null,m&&!o(m)&&(m=s.content={url:m}),a.find(`script`).filter(ge).remove(),!a.parent().is(c.appendTo)&&!c.containment&&(p.top===t||p.left===t)&&(a.is(j)?u=a.offset():(d=a.css(`visibility`),f=a.css(`display`),a.css({visibility:N,display:``}),u=document.body.contains(a[0])?a.offset():{top:0,left:0},a.css({visibility:d,display:f})),p.top===t&&(p.top=u.top),p.left===t&&(p.left=u.left)),(!pe(s.visible)||s.visible===null)&&(s.visible=a.is(j)),l=c.wrapper=a.closest(_),(!a.is(`.k-window-content`)||!l[0])&&(a.addClass(`k-window-content`),a.attr(`tabindex`,0),c._createWindow(a,s),l=c.wrapper=a.closest(_),c.title(c.options.title),c._dimensions(),s._footerTemplate&&c.wrapper.append(n.template(s._footerTemplate)(s._footerMessages))),c.minTop=c.minLeft=-1/0,c.maxTop=c.maxLeft=1/0,c._position(),m&&c.refresh(m),s.visible&&c.toFront(null,!s.modal),g=l.children(b),s.visible&&s.modal&&c._overlay(l.is(j)).css({opacity:.5}),l.on(`mouseenter`+h,Y,c._buttonEnter.bind(c)).on(`mouseleave`+h,Y,c._buttonLeave.bind(c)).on(`click`+h,`> `+Y,c._windowActionHandler.bind(c)).on(`keydown`+h,c,c._keydown.bind(c)).on(`focus`+h,c._focus.bind(c)).on(`blur`+h,c._blur.bind(c)),g.on(`keydown`+h,c,c._keydownContent.bind(c)),S=g.find(`.`+T)[0],S&&!C.data(ue)&&(C.on(`blur`+h,function(){var t=e(document.activeElement).parent(b);t.length&&n.widgetInstance(t)._focus()}),C.on(`focus`+h,function(){e(b).not(x).each(function(t,r){n.widgetInstance(e(r))._blur()})}),C.data(ue,!0)),this._resizable(),this._draggable(),s.pinned&&this.wrapper.is(`:visible`)&&c.pin(),E=a.attr(`id`),E&&(E+=`_wnd_title`,l.attr({role:`dialog`,"aria-labelledby":E}).children(y).children(v).attr(`id`,E)),l.add(l.children(`.k-resize-handle,`+y)).on(n.support.mousedown+h,c.toFront.bind(c)),c.touchScroller=n.touchScroller(a),c._resizeHandler=c._onDocumentResize.bind(c),c._marker=n.guid().substring(0,8),e(window).on(`resize`+h+c._marker,c._resizeHandler),s.visible&&(c.trigger(F),c.trigger(I)),n.notify(c),this.options.modal&&(this._tabKeyTrap=new i(l),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return l.data(`isFront`)}),c._showWatermarkOverlay&&c._showWatermarkOverlay(c.wrapper[0]),r.fn.endInit.call(this)},_buttonEnter:function(t){e(t.currentTarget).addClass(D)},_buttonLeave:function(t){e(t.currentTarget).removeClass(D)},_focus:function(){this.wrapper.addClass(O)},_blur:function(){this.wrapper.removeClass(O)},_dimensions:function(){var e=this.wrapper,n=this.options,r=n.width,i=n.height,a=n.maxHeight,o=n.size,s=[`minWidth`,`minHeight`,`maxWidth`,`maxHeight`],c=e.css(`box-sizing`)==`content-box`,l=c?me(e,`border-left-width`)+me(e,`border-right-width`):0,u=c?me(e,`border-top-width`)+me(e,`border-bottom-width`):0,d=c?me(e,`padding-top`):0;if(this.containment&&!this._isPinned){var f=this._userMaxHeight===t?a:this._userMaxHeight,p=this._userMaxWidth===t?n.maxWidth:this._userMaxWidth;f=f===1/0?1/0:parseInt(f,10),p=p===1/0?1/0:parseInt(p,10),this._userMaxHeight=f,this._userMaxWidth=p,this._tbBorderOffset=u+d,this._lrBorderOffset=l,this._updateBoundaries(),n.maxHeight=Math.min(this.containment.height-this._tbBorderOffset,f),n.maxWidth=Math.min(this.containment.width-this._lrBorderOffset,p)}for(var m=0;m<s.length;m++){var h=n[s[m]]||``;h!=1/0&&e.css(s[m],h)}a!=1/0&&this.element.css(`maxHeight`,a),r?e.outerWidth(he(r,n.minWidth,n.maxWidth)):e.outerWidth(``),i?e.outerHeight(he(i,n.minHeight,n.maxHeight)):e.outerHeight(``),n.visible||e.removeClass(A).hide(),o&&fe[o]&&e.addClass(fe[o])},_position:function(){var e=this.wrapper,t=this.options.position,n,r;this._updateBoundaries(),this.containment&&(t.top=t.top||0,t.left=t.left||0,n=t.top.toString().indexOf(`%`)>0?parseInt(this.containment.height*(parseFloat(t.top)/100),10):t.top,r=t.left.toString().indexOf(`%`)>0?parseInt(this.containment.width*(parseFloat(t.left)/100),10):t.left,t.top=he(n,this.minTop,this.maxTop),t.left=he(r,this.minLeft,this.maxLeft)),t.top&&t.top.toString().indexOf(`px`)>0&&(t.top=Number(t.top.replace(`px`,``))),t.left&&t.left.toString().indexOf(`px`)>0&&(t.left=Number(t.left.replace(`px`,``))),t.top===0&&(t.top=t.top.toString()),t.left===0&&(t.left=t.left.toString()),e.css({top:t.top||``,left:t.left||``})},_updateBoundaries:function(){var e=this.containment;if(!e)return null;e.width=e.innerWidth(),e.height=e.innerHeight(),parseInt(e.width,10)>e[0].clientWidth&&(e.width-=n.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=n.support.scrollbar()),e.position=_e(e[0]),this._isPinned?(this.minTop=this.minLeft=-1/0,this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-c(this.wrapper,!0),this.maxTop=this.minTop+e.height-l(this.wrapper,!0),this._userMaxHeight!==t&&(this.options.maxHeight=Math.min(e.height-(this._tbBorderOffset||0),this._userMaxHeight),this.options.maxWidth=Math.min(e.width-(this._lrBorderOffset||0),this._userMaxWidth),this.wrapper.css({maxHeight:this.options.maxHeight,maxWidth:this.options.maxWidth})))},_animationOptions:function(e){var t=this.options.animation;return t&&t[e]||{open:{effects:{}},close:{hide:!0,effects:{}}}[e]},_resize:function(){n.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&=(n.off(`dblclick`+h).children(S).remove(),this.resizing.destroy(),null),t&&(n.on(`dblclick`+h,y,(function(t){e(t.target).closest(`.k-window-titlebar-action`).length||this.toggleMaximization()}).bind(this)),d(`n e s w se sw ne nw`.split(` `),function(e,t){n.append(m.resizeHandle(t))}),this.resizing=new ye(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&=(this.dragging.destroy(),null),e&&(this.dragging=new be(this,e.dragHandle||y,e.clickMoveClick))},_actions:function(){var t=this.options,r=t.actions,i=t.pinned,a=this.wrapper.children(y).find(`.k-window-titlebar-actions`),o=[`minimize`,`maximize`],s={maximize:`window`,refresh:`arrow-rotate-cw`,custom:`gear`},c;r=e.map(r,function(e){return e=i&&e.toLowerCase()===`pin`?`unpin`:e,c=s[e.toLowerCase()]||``,{name:o.indexOf(e.toLowerCase())>-1?`window-`+e:e,icon:e.toLowerCase()==`close`?`x`:c}}),a.html(n.render(m.action,r))},setOptions:function(t){var n=this,i=n.options.size,a=this.containment&&!n._isPinned?this.containment:e(document),o=JSON.parse(JSON.stringify(t));u(t.position,n.options.position),u(t.position,o.position),n._containerScrollTop=a.scrollTop(),n._containerScrollLeft=a.scrollLeft(),t.maxHeight&&(n._userMaxHeight=t.maxHeight===1/0?1/0:parseInt(t.maxHeight,10)),t.maxWidth&&(n._userMaxWidth=t.maxWidth===1/0?1/0:parseInt(t.maxWidth,10)),r.fn.setOptions.call(n,t);var s=n.options.scrollable!==!1;if(n.restore(),t.title!==void 0&&n.title(t.title),n.wrapper.removeClass(fe[i]),n._dimensions(),n._position(),n._resizable(),n._draggable(),n._actions(),t.modal!==void 0){var c=n.options.visible!==!1;n._enableDocumentScrolling(),n._overlay(t.modal&&c)}n.element.css(re,s?``:`hidden`)},events:[F,I,L,R,ee,B,z,W,V,H,te,ne,U,G,K],options:{name:`Window`,animation:{open:{effects:{zoom:{direction:`in`},fade:{direction:`in`}},duration:350},close:{effects:{zoom:{direction:`out`,properties:{scale:.7}},fade:{direction:`out`}},duration:350,hide:!0}},title:``,actions:[`Close`],autoFocus:!0,modal:!1,size:`auto`,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:`body`,isMaximized:!1,isMinimized:!1},_closable:function(){return e.inArray(`close`,e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydownContent:function(e){var t=this,r=n.keys;e.keyCode==r.ESC&&t._closable()&&(e.stopPropagation(),t._close(!1))},_keydown:function(e){var t=this,r=t.options,i=n.keys,a=e.keyCode,o=t.wrapper,s,c,l=10,u=r.isMaximized,d=r.isMinimized,f,p,m,h;a==i.ESC&&t._closable()&&(e.stopPropagation(),t._close(!1)),!(e.target!=e.currentTarget||t._closing)&&(e.altKey&&a==82&&t.refresh(),e.altKey&&a==80&&(t.options.pinned?t.unpin():t.pin()),e.altKey&&a==i.UP?d?(t.restore(),t.wrapper.trigger(`focus`)):u||(t.maximize(),t.wrapper.trigger(`focus`)):e.altKey&&a==i.DOWN&&(!d&&!u?(t.minimize(),t.wrapper.trigger(`focus`)):u&&(t.restore(),t.wrapper.trigger(`focus`))),s=n.getOffset(o),t.containment&&!t._isPinned&&(s=t.options.position),r.draggable&&!e.ctrlKey&&!e.altKey&&!u&&(t._updateBoundaries(),a==i.UP?(s.top=he(s.top-l,t.minTop,t.maxTop),c=o.css(`top`,s.top)):a==i.DOWN?(s.top=he(s.top+l,t.minTop,t.maxTop),c=o.css(`top`,s.top)):a==i.LEFT?(s.left=he(s.left-l,t.minLeft,t.maxLeft),c=o.css(`left`,s.left)):a==i.RIGHT&&(s.left=he(s.left+l,t.minLeft,t.maxLeft),c=o.css(`left`,s.left))),r.resizable&&e.ctrlKey&&!u&&!d&&(a==i.UP?(c=!0,p=o.outerHeight()-l):a==i.DOWN?(c=!0,p=t.containment&&!t._isPinned?Math.min(o.outerHeight()+l,t.containment.height-s.top-me(o,`padding-top`)-me(o,`borderBottomWidth`)-me(o,`borderTopWidth`)):o.outerHeight()+l):a==i.LEFT?(c=!0,f=o.outerWidth()-l):a==i.RIGHT&&(c=!0,f=t.containment&&!t._isPinned?Math.min(o.outerWidth()+l,t.containment.width-s.left-me(o,`borderLeftWidth`)-me(o,`borderRightWidth`)):o.outerWidth()+l),c&&(m=he(f,r.minWidth,r.maxWidth),h=he(p,r.minHeight,r.maxHeight),isNaN(m)||(o.outerWidth(m),t.options.width=m+`px`),isNaN(h)||(o.outerHeight(h),t.options.height=h+`px`),t.resize())),c&&e.preventDefault())},_overlay:function(t){var n=this.containment?this.containment.children(C):this.appendTo.children(C),r=this.wrapper,i=t?`inline-flex`:`none`,a=parseInt(r.css(ie),10)-1;return n.length||(n=e(`<div class='k-overlay' />`)),n.insertBefore(r[0]).css({zIndex:a,display:i}),this.options.modal.preventScroll&&!this.containment&&this._stopDocumentScrolling(),n},_actionForRef:function(e){return le[Object.keys(le).find(t=>e.is(`[ref-window-${t}]`))]},_windowActionHandler:function(t){if(!this._closing){var n=this._actionForRef(e(t.target).closest(`.k-window-titlebar-action`));if(n)return t.preventDefault(),this[n](),!1}},_modals:function(){for(var t=this,n=e(_+j),r,i=[],a=0;a<n.length;a+=1)r=t._object(e(n[a])),r&&r.options&&r.options.modal&&r.options.visible&&r.options.appendTo===t.options.appendTo&&(!r.containment||t.containment&&r.containment[0]===t.containment[0])&&i.push(r.wrapper[0]);return i.sort(function(e,t){return e.style.zIndex-t.style.zIndex}),t=null,e(i)},_object:function(e){return e.children(b).getKendoWindow()||t},center:function(){var t=this,n=t.options.position,r=t.wrapper,i=e(window),a=0,o=0,s,c;return t.options.isMaximized?t:(t.options.pinned&&!t._isPinned&&t.pin(),t.options.pinned||(a=i.scrollTop(),o=i.scrollLeft()),this.containment&&!t.options.pinned?(s=this.minTop+(this.maxTop-this.minTop)/2,c=this.minLeft+(this.maxLeft-this.minLeft)/2):(t._scrollIsAppended=!0,c=o+Math.max(0,(i.width()-r.outerWidth())/2),s=a+Math.max(0,(i.height()-r.outerHeight()-me(r,`paddingTop`))/2)),r.css({left:c,top:s}),n.top=s,n.left=c,t)},title:function(t){var r=this,i,a=!0,o=r.wrapper,s=o.children(y),c=s.children(v);return arguments.length?(e.isPlainObject(t)?(i=t.text===void 0?``:t.text,a=t.encoded!==!1):i=t,i===!1?(o.addClass(`k-window-titleless`),o.css(`padding-top`,0),s.remove()):s.length?c.html(a?n.htmlEncode(i):i):(o.prepend(m.titlebar({title:a?n.htmlEncode(i):i})),r._actions(),s=o.children(y)),r.options.title=i,r):c.html()},content:function(e,t){var r=this.wrapper.children(b),i=r.children(`.km-scroll-container`);return r=i[0]?i:r,pe(e)?(n.destroy(this.element.children()),r.empty().html(e),this):r.html()},open:function(){var t=this,r=t.wrapper,i=t.options,a=this._animationOptions(`open`),o=r.children(b),s,c,l=this.containment&&!t._isPinned?this.containment:e(document);if(!t.trigger(F)){if(t._closing&&r.kendoStop(!0,!0),t._closing=!1,t.toFront(),i.autoFocus&&t.wrapper.trigger(`focus`),i.visible=!0,i.modal){if(c=!!t._modals().length,s=t._overlay(c),s.kendoStop(!0,!0),a.duration&&n.effects.Fade&&!c){var u=n.fx(s).fadeIn();u.duration(a.duration||0),u.endValue(.5),u.play()}else s.css(`opacity`,.5);s.show(),e(window).on(`focus`+g,function(){r.data(`isFront`)&&!e(document.activeElement).closest(r).length&&t.wrapper.trigger(`focus`)})}r.is(j)||(o.css(re,N),r.css({display:`inline-flex`}),r.kendoStop().kendoAnimate({effects:a.effects,duration:a.duration,complete:this._activate.bind(this)}))}return i.isMaximized&&(t._containerScrollTop=l.scrollTop(),t._containerScrollLeft=l.scrollLeft(),t._stopDocumentScrolling()),this.options.pinned&&!this._isPinned&&this.pin(),t},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.wrapper.trigger(`focus`),this.element.css(re,e?``:`hidden`),n.resize(this.element.children()),this.trigger(I)},_removeOverlay:function(r){var i=this._modals(),a=this.options,o=a.modal&&!i.length,s=this._animationOptions(`close`);if(o){if(!r&&s.duration&&n.effects.Fade){var c=n.fx(a.modal?this._overlay(!0):e(t)).fadeOut();c.duration(s.duration||0),c.startValue(.5),c.play()}else this._overlay(!1).remove();a.modal.preventScroll&&this._enableDocumentScrolling()}else i.length&&(this._object(i.last())._overlay(!0),a.modal.preventScroll&&this._stopDocumentScrolling())},_close:function(t){var n=this,r=n.wrapper,i=n.options,a=this._animationOptions(`open`),o=this._animationOptions(`close`),s=this.containment&&!n._isPinned?this.containment:e(document),c;if(!n._closing){if(c=n.trigger(R,{userTriggered:!t}),n._closing=!c,r.is(j)&&!c){i.visible=!1,e(_).each(function(t,n){var i=e(n).children(b);n!=r&&i.find(`> .`+T).length>0&&i.children(C).remove()}),this._removeOverlay();let t=n.wrapper.find(Y);t.css(`transition`,`none`);let s=function(e){e.stopPropagation()};t.on(`transitionend`,s),r.kendoStop().kendoAnimate({effects:o.effects||a.effects,reverse:o.reverse===!0,duration:o.duration,complete:function(){t.off(`transitionend`,s),t.css(`transition`,``),n._deactivate()}}),e(window).off(g)}n.options.isMaximized&&(n._enableDocumentScrolling(),n._containerScrollTop&&n._containerScrollTop>0&&s.scrollTop(n._containerScrollTop),n._containerScrollLeft&&n._containerScrollLeft>0&&s.scrollLeft(n._containerScrollLeft)),n.options.iframe&&n.wrapper.trigger(`blur`)}},_deactivate:function(){var e=this;if(e.wrapper.removeClass(A).hide().css(`opacity`,``),e.trigger(L),e.options.modal){var t=e._object(e._modals().last());t&&t.toFront()}},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(`${Y}, :input, a, .k-input, .k-icon, .k-svg-icon, .k-svg-icon>svg, .k-svg-icon>svg>path, .k-icon-button, [role='gridcell'], .k-input-inner, .k-input-value-text`)},_shouldFocus:function(t){var n=s(),r=this.wrapper;return this.options.autoFocus&&!e(n).is(r)&&!this._actionable(t)&&(!r.find(n).length||!r.find(t).length)},toFront:function(t,n){let r=this,i=r.wrapper,a=i[0],o=r.containment&&!r._isPinned,s=this._animationOptions(`open`),c=+i.css(ie),l=c,u=t&&t.target||null,d=0;if(e(_).each(function(t,n){let r=e(n),o=r.css(ie),s=r.children(b);d=Math.max(d,+r.parent().css(ie)||0),isNaN(o)||(c=Math.max(+o,c),d&&(c=Math.max(d,c))),i.data(`isFront`,n==a),n!=a&&s.find(`.`+T).length&&!s.find(C).length&&s.append(m.overlay)}),(!i[0].style.zIndex||l<c)&&i.css(ie,c+2),r.element.find(`> .k-overlay`).remove(),r._shouldFocus(u)){n||setTimeout(function(){r.wrapper.trigger(`focus`)},s?s.duration:0);var f=o?r.containment.scrollTop():e(window).scrollTop(),p=parseInt(i.position().top,10);!r.options.pinned&&p>0&&p<f&&e(window).scrollTop(p)}return i=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?`restore`:`maximize`]()},restore:function(){var t=this,n=t.options,r=n.minHeight,i=t.restoreOptions,a,o=t.containment&&!t._isPinned?t.containment:e(document);return!n.isMaximized&&!n.isMinimized?t:(r&&r!=1/0&&t.wrapper.css(`min-height`,r),i&&!n.isMaximized&&(i.height=he(i.height,t.options.minHeight,t.options.maxHeight),a=n.position.top+parseInt(i.height,10)>t.maxTop,a&&(n.position.top=he(n.position.top,t.minTop,t.maxTop-parseInt(i.height,10)),u(i,{left:n.position.left,top:n.position.top}))),t.wrapper.css({position:n.pinned?`fixed`:`absolute`,left:i.left,top:i.top,width:i.width,height:i.height}).removeClass(k).removeClass(w).find(`.k-window-content,.k-resize-handle`).show().end().find(`[ref-window-restore]`).remove().end().find(J).show().end().find(se).show(),n.isMaximized?t.wrapper.find(`[ref-window-maximize]`).trigger(`focus`):n.isMinimized&&t.wrapper.find(`[ref-window-minimize]`).trigger(`focus`),t.options.width=i.width,t.options.height=i.height,t.options.modal.preventScroll||t._enableDocumentScrolling(),t._containerScrollTop&&t._containerScrollTop>0&&o.scrollTop(t._containerScrollTop),t._containerScrollLeft&&t._containerScrollLeft>0&&o.scrollLeft(t._containerScrollLeft),n.isMaximized=n.isMinimized=!1,t.wrapper.removeAttr(`aria-labelled-by`),t.resize(),t.trigger(W),t)},_sizingAction:function(e,t){var n=this,r=n.wrapper,i=r[0].style,a=n.options;return a.isMaximized||a.isMinimized?n:(n.restoreOptions={width:i.width,height:i.height},r.children(S).hide().end().children(y).find(J).hide().eq(0).before(m.action({name:`window-restore`})),t.call(n),n.wrapper.children(y).find(se).toggle(e!==`maximize`),n.trigger(e),r.find(`[ref-window-restore]`).trigger(`focus`),n)},maximize:function(){return this._sizingAction(`maximize`,function(){var t=this,n=t.wrapper,r=this.containment&&!t._isPinned,i=n.position(),a=e(document);u(t.restoreOptions,{left:i.left+(r?this.containment.scrollLeft():0),top:i.top+(r?this.containment.scrollTop():0)}),this._containerScrollTop=r?this.containment.scrollTop():a.scrollTop(),this._containerScrollLeft=r?this.containment.scrollLeft():a.scrollLeft(),t._stopDocumentScrolling(),n.css({top:r?this.containment.scrollTop():0,left:r?this.containment.scrollLeft():0,position:r?`absolute`:`fixed`}).addClass(k),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned){t._storeOverflowRule(n),n.css(re,N),t.wrapper.css({maxWidth:n.innerWidth(),maxHeight:n.innerHeight()});return}var r=e(`body`);t._storeOverflowRule(r),r.css(re,N);var i=e(`html`);t._storeOverflowRule(i),i.css(re,N)},_enableDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned){t._restoreOverflowRule(n),t.wrapper.css({maxWidth:n.width,maxHeight:n.height});return}t._restoreOverflowRule(e(document.body)),t._restoreOverflowRule(e(`html`))},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;typeof t==`string`&&e.data(q,t)}},_isOverflowStored:function(e){return typeof e.data(q)==`string`},_restoreOverflowRule:function(e){var n=e.data(q);n!==null&&n!==t?(e.css(re,n),e.removeData(q)):e.css(re,``)},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction(`minimize`,function(){var e=this;e.wrapper.css({height:``,minHeight:``}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr(`aria-labelled-by`,this.element.attr(`aria-labelled-by`)),this.wrapper.addClass(w),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,r=e(window),i=t.wrapper,a=t.options,o=a.position,s=this.containment?_e(i[0]).top+me(this.containment,`borderTopWidth`):me(i,`top`),c=this.containment?_e(i[0]).left+me(this.containment,`borderLeftWidth`):me(i,`left`);if(!t.options.isMaximized){o.top=s,o.left=c,t._scrollIsAppended&&(!this.containment||this.containment.css(`position`)!==`fixed`)&&(o.top-=r.scrollTop(),o.left-=r.scrollLeft(),t._scrollIsAppended=!1),i.css(u(o,{position:`fixed`}));var l=i.children(y).find(ae).eq(0);l.length>0&&(n.ui.icon(l.find(`.k-icon,.k-svg-icon`),{icon:`unpin`}),l.removeAttr(`ref-window-pin`).attr(`ref-window-unpin`,!0)),t._isPinned=!0,t.options.pinned=!0,this.containment&&(a.maxWidth=a.maxHeight=1/0,i.css({maxWidth:``,maxHeight:``}))}},unpin:function(){var t=this,r=e(window),i=t.wrapper,a=t.options,o=t.options.position,s=t.containment,c=parseInt(i.css(`top`),10)+r.scrollTop(),l=parseInt(i.css(`left`),10)+r.scrollLeft();if(!t.options.isMaximized){t._isPinned=!1,t._scrollIsAppended=!0,t.options.pinned=!1,s&&(t._updateBoundaries(),a.maxWidth=Math.min(s.width,a.maxWidth),a.maxHeight=Math.min(s.height-me(i,`padding-top`),a.maxHeight),i.css({maxWidth:a.maxWidth,maxHeight:a.maxHeight}),c=c<s.position.top?t.minTop:c>s.position.top+s.height?t.maxTop:c+s.scrollTop()-(s.position.top+me(s,`border-top-width`)),l=l<s.position.left?t.minLeft:l>s.position.left+s.width?t.maxLeft:l+s.scrollLeft()-(s.position.left+me(s,`border-left-width`))),o.top=he(c,t.minTop,t.maxTop),o.left=he(l,t.minLeft,t.maxLeft),i.css(u(o,{position:``}));var d=i.children(y).find(oe).eq(0);d.length>0&&(n.ui.icon(d.find(`.k-icon,.k-svg-icon`),{icon:`pin`}),d.removeAttr(`ref-window-unpin`).attr(`ref-window-pin`,!0))}},_onDocumentResize:function(){var t=this,r=t.wrapper,i=e(window),a=n.support.zoomLevel(),o=r.css(`box-sizing`)==`content-box`,s,c;if(t.options.isMaximized){var l=o?me(r,`border-left-width`)+me(r,`border-right-width`):0,u=o?me(r,`border-top-width`)+me(r,`border-bottom-width`):0,d=o?me(r,`padding-top`):0;t.containment&&!t._isPinned?(s=t.containment.innerWidth()-l,c=t.containment.innerHeight()-(u+d)):(s=i.width()/a-l,c=i.height()/a-(u+d)),r.css({width:s,height:c}),t.options.width=s,t.options.height=c,t.resize()}},refresh:function(t){var n=this,r=n.options,i=e(n.element),a,s,c;return o(t)||(t={url:t}),t=u(r.content,t),s=pe(r.iframe)?r.iframe:t.iframe,c=t.url,c?(pe(s)||(s=!de(c)),s?(a=i.find(`.`+T)[0],a?a.src=c:i.html(m.contentFrame(u({},r,{content:t}))),i.find(`.`+T).off(`load`+h).on(`load`+h,this._triggerRefresh.bind(this))):n._ajaxRequest(t)):(t.template&&n.content(f(t.template)({})),n.trigger(z)),i.toggleClass(`k-window-iframecontent`,!!s),n},_triggerRefresh:function(){this.trigger(z)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(ce).find(`.k-icon,.k-svg-icon`).removeClass(E)},_ajaxError:function(e,t){this.trigger(K,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=f(e)(t||{})),this.content(n,t),this.element.prop(`scrollTop`,0),this.trigger(z)}},_showLoading:function(){this.wrapper.find(ce).find(`.k-icon,.k-svg-icon`).addClass(E)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(this._showLoading.bind(this),100),e.ajax(u({type:`GET`,dataType:`html`,cache:!1,error:this._ajaxError.bind(this),complete:this._ajaxComplete.bind(this),success:this._ajaxSuccess(t.template).bind(this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(h).children(b).off(h).end().find(`.k-resize-handle,.k-window-titlebar`).off(h),e(window).off(`resize`+h+this._marker),e(window).off(g),e(window).off(h),clearTimeout(this._loadingIconTimeout),r.fn.destroy.call(this),this.unbind(t),n.destroy(this.wrapper)},destroy:function(){this._destroy(),this.options.modal&&this._removeOverlay(!0),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t=this.element,r=this.options,i,a,o=n.support.isRtl(t);r.scrollable===!1&&t.css(`overflow`,`hidden`),a=e(m.wrapper(r)),i=t.find(`iframe:not(.k-content-frame)`).map(function(){var e=this.getAttribute(`src`);return this.src=``,e}),a.toggleClass(`k-rtl`,o).attr(`tabindex`,0).append(t).find(`iframe:not(.k-content-frame)`).each(function(e){this.src=i[e]}),this.containment?this.containment.prepend(a):this.appendTo&&a.appendTo(this.appendTo),a.find(`.k-window-title`).css(o?`left`:`right`,c(a.find(`.k-window-titlebar-actions`))+10),t.css(`visibility`,``).show(),e(t).hasClass(M)&&e(t).removeClass(M),t.find(`[data-role=editor]`).each(function(){var t=e(this).data(`kendoEditor`);t&&t.refresh()}),a=t=null}});m={wrapper:f(()=>`<div class='k-window'></div>`),action:f(({name:e,icon:t})=>{let r=(t||``).toLowerCase()||e.toLowerCase(),i={close:`close`,"window-minimize":`minimize`,"window-maximize":`maximize`,"window-restore":`restore`,pin:`pin`,unpin:`unpin`,refresh:`refresh`}[e.toLowerCase()];return r==`restore`&&(r=`window-restore`),n.html.renderButton(`<button ${i?`ref-window-${i}`:``} class='k-window-titlebar-action' aria-label='${e}'></button>`,{icon:r,fillMode:`flat`,size:`xsmall`})}),titlebar:f(({title:e})=>`<div class='k-window-titlebar'><span class='k-window-title'>${e}</span><div class='k-window-titlebar-actions'></div></div>`),overlay:`<div class='k-overlay'></div>`,contentFrame:f(({title:e,content:t})=>`<iframe frameborder='0' title='${e}' class='${T}' src='${t.url}'>This page requires frames in order to show content</iframe>`),resizeHandle:f(e=>`<div aria-hidden='true' class='k-resize-handle k-resize-${e}'></div>`)};function ye(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new a(e.wrapper,{filter:`>`+S,group:e.wrapper.id+`-resizing`,dragstart:t.dragstart.bind(t),drag:t.drag.bind(t),dragend:t.dragend.bind(t)}),t._draggable.userEvents.bind(`press`,t.addOverlay.bind(t)),t._draggable.userEvents.bind(`release`,t.removeOverlay.bind(t))}ye.prototype={addOverlay:function(){this.owner.wrapper.append(m.overlay)},removeOverlay:function(){this.owner.wrapper.find(C).remove()},dragstart:function(t){var r=this,i=r.owner,a=i.wrapper;if(r._preventDragging=i.trigger(V),!r._preventDragging){r.elementPadding=parseInt(a.css(`padding-top`),10),r.initialPosition=n.getOffset(a,`position`),r.resizeDirection=t.currentTarget.prop(`className`).replace(`k-resize-handle k-resize-`,``),r.initialSize={width:a.outerWidth(),height:a.outerHeight()},i._updateBoundaries(),r.containerOffset=i.containment?i.containment.position:n.getOffset(i.appendTo);var o=a.offsetParent();if(o.is(`html`))r.containerOffset.top=r.containerOffset.left=0;else{var s=o.css(`margin-top`),c=o.css(`margin-left`);if(!X.test(s)||!X.test(c)){var l=_e(a[0]),u=l.left-r.containerOffset.left-r.initialPosition.left,d=l.top-r.containerOffset.top-r.initialPosition.top;r._relativeElMarginLeft=u>1?u:0,r._relativeElMarginTop=d>1?d:0,r.initialPosition.left+=r._relativeElMarginLeft,r.initialPosition.top+=r._relativeElMarginTop}}a.children(S).not(t.currentTarget).hide(),e(p).css(P,t.currentTarget.css(P))}},drag:function(t){if(!this._preventDragging){var r=this,i=r.owner,a=i.wrapper,o=i.options,s=o.position,c=r.resizeDirection,l=r.containerOffset,u=r.initialPosition,d=r.initialSize,f=i.containment&&!i._isPinned,p=n.support.isRtl(i.containment),m=f&&p&&i.containment.innerWidth()>i.containment.width?n.support.scrollbar():0,h=f?{top:i.containment.scrollTop(),left:i.containment.scrollLeft()}:{top:0,left:0},g,_,v,y,b=Math.max(t.x.location,0),x=Math.max(t.y.location,0);c.indexOf(`e`)>=0?(g=i.containment&&b-d.width>=i.maxLeft-h.left+l.left+m?i.maxLeft+m-u.left+d.width-h.left:b-u.left-l.left,a.outerWidth(he(g,o.minWidth,o.maxWidth))):c.indexOf(`w`)>=0&&(y=u.left+d.width+l.left,g=he(y-b,o.minWidth,o.maxWidth),s.left=y-g-l.left-m-(r._relativeElMarginLeft||0)+h.left,i.containment&&s.left<=i.minLeft&&(s.left=i.minLeft,g=he(y-m-s.left-l.left+h.left,o.minWidth,o.maxWidth)),a.css({left:s.left,width:g}));var S=x;i.options.pinned&&(S-=e(window).scrollTop()),c.indexOf(`s`)>=0?(_=S-u.top-r.elementPadding-l.top,S-d.height-r.elementPadding>=i.maxTop+l.top-h.top&&(_=i.maxTop-u.top+d.height-h.top),a.outerHeight(he(_,o.minHeight,o.maxHeight))):c.indexOf(`n`)>=0&&(v=u.top+d.height+l.top,_=he(v-S,o.minHeight,o.maxHeight),s.top=v-_-l.top-(r._relativeElMarginTop||0)+h.top,s.top<=i.minTop&&i.containment&&(s.top=i.minTop,_=he(v-s.top-l.top+h.top,o.minHeight,o.maxHeight)),a.css({top:s.top,height:_})),g&&(i.options.width=g+`px`),_&&(i.options.height=_+`px`),i.resize()}},dragend:function(t){if(!this._preventDragging){var n=this,r=n.owner,i=r.wrapper;return i.children(S).not(t.currentTarget).show(),e(p).css(P,``),r.touchScroller&&r.touchScroller.reset(),t.keyCode==27&&i.css(n.initialPosition).css(n.initialSize),r.trigger(te),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}};function be(e,t,n){var r=this,i=t;n&&(i+=`,.k-overlay`),r.owner=e,r._preventDragging=!1,r._draggable=new a(e.wrapper,{filter:t,group:e.wrapper.id+`-moving`,clickMoveClick:n,dragstart:r.dragstart.bind(r),drag:r.drag.bind(r),dragend:r.dragend.bind(r),dragcancel:r.dragcancel.bind(r)}),r._draggable.userEvents.stopPropagation=!1}be.prototype={dragstart:function(t){var r=this.owner,i=r.options.draggable,a=r.element,o=a.find(`.k-window-titlebar-actions`),s=n.getOffset(r.appendTo);this._preventDragging=r.trigger(ne)||!i,!(this._preventDragging||r.isMaximized())&&(r.initialWindowPosition=n.getOffset(r.wrapper,`position`),r.initialPointerPosition||(r.options.position.left=he(r.initialWindowPosition.left,r.minLeft,r.maxLeft),r.options.position.top=he(r.initialWindowPosition.top,r.minTop,r.maxTop)),r.initialPointerPosition={left:r.options.position.left,top:r.options.position.top},r.startPosition={left:t.x.client-r.initialWindowPosition.left,top:t.y.client-r.initialWindowPosition.top},r._updateBoundaries(),r.containment||(o.length>0?r.minLeft=c(o)+parseInt(o.css(`right`),10)-c(a):r.minLeft=20-c(a),r.minLeft-=s.left,r.minTop=-s.top),e(m.overlay).appendTo(r.wrapper).css({opacity:0}),r.wrapper.children(S).hide(),e(p).css(P,t.currentTarget.css(P)))},drag:function(t){var n=this.owner,r=n.options.position,i=n.options.draggable.axis,a,o;this._preventDragging||n.isMaximized()||((!i||i.toLowerCase()===`x`)&&(a=t.x.client-n.startPosition.left,n.containment&&!n._isPinned&&(a+=n.containment.scrollLeft()),r.left=he(a,n.minLeft,n.maxLeft)),(!i||i.toLowerCase()===`y`)&&(o=t.y.client-n.startPosition.top,n.containment&&!n._isPinned&&(o+=n.containment.scrollTop()),r.top=he(o,n.minTop,n.maxTop)),e(n.wrapper).css(`transform`,`translate(`+(r.left-n.initialPointerPosition.left)+`px, `+(r.top-n.initialPointerPosition.top)+`px)`))},_finishDrag:function(){var t=this.owner;t.wrapper.children(S).toggle(!t.options.isMinimized).end().find(C).remove(),e(p).css(P,``)},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(_).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!(this._preventDragging||t.isMaximized()))return e(t.wrapper).css(t.options.position).css(`transform`,``),this._finishDrag(),t.trigger(U),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},n.ui.plugin(ve)})(window.kendo.jQuery),kendo;var Vy=class{},Hy=class extends Vy{constructor(){super(),this._events={}}bind(e,t,n){let r=Wy(e),i=Uy(t),a=r.length;if(t===void 0){for(let t in e)this.bind(t,e[t]);return this}for(let e=0;e<a;e++){let a=r[e],o=i?t:t[a];if(o){if(n){let e=o;o=()=>{this.unbind(a,o),e.apply(this,arguments)},o.original=e}(this._events[a]=this._events[a]||[]).push(o)}}return this}one(e,t){return this.bind(e,t,!0)}first(e,t){let n=Wy(e),r=Uy(t);for(let e=0,i=n.length;e<i;e++){let i=n[e],a=r?t:t[i];a&&(this._events[i]=this._events[i]||[]).unshift(a)}return this}trigger(e,t={}){let n=this._events[e];if(n){let e=n.length;t.sender=this,t._defaultPrevented=!1,t.preventDefault=Gy,t.isDefaultPrevented=Ky,n=n.slice();for(let r=0;r<e;r++)n[r].call(this,t);return t._defaultPrevented===!0}return!1}unbind(e,t){let n=this._events[e];if(e===void 0)this._events={};else if(n)if(t)for(let e=n.length-1;e>=0;e--)(n[e]===t||n[e].original===t)&&n.splice(e,1);else this._events[e]=[];return this}};function Uy(e){return typeof e==`function`}function Wy(e){return typeof e==`string`?[e]:e}function Gy(){this._defaultPrevented=!0}function Ky(){return this._defaultPrevented===!0}let qy=e=>{let t=typeof window<`u`?window:{},n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};qy=e=>n.call(t,e),qy(e)};var Jy=qy;let Yy=/&/g,Xy=/</g,Zy=/"/g,Qy=/'/g,$y=/>/g;function eb(e){return String(e).replace(Yy,`&amp;`).replace(Xy,`&lt;`).replace($y,`&gt;`).replace(Zy,`&quot;`).replace(Qy,`&#39;`)}function tb(e){let t=window.console;t!==void 0&&t.log&&t.log(e)}function nb(e){let t={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},n={};for(let r in t)if(t.hasOwnProperty(r)){let i=e.match(t[r]);if(i){n[r]=!0,n[i[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}}return n}let rb=null,ib={get browser(){return typeof window>`u`||rb||(rb=nb(window.navigator.userAgent)),rb}},ab=Date.now||function(){return new Date().getTime()};function ob(e,t){let n=0,r;if(!t||t<=0)return e;let i=function(){let i=ab()-n,a=arguments,o=function(){e.apply(null,a),n=ab()};if(!n)return o();r&&clearTimeout(r),i>t?o():r=setTimeout(o,t-i)};return i.cancel=function(){clearTimeout(r)},i}let sb={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgrey:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,grey:`808080`,green:`008000`,greenyellow:`adff2f`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`778899`,lightslategrey:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`},cb=ib.browser,lb=e=>{let t=Object.keys(sb);t.push(`transparent`);let n=RegExp(`^(`+t.join(`|`)+`)(\\W|$)`,`i`);return lb=e=>n.exec(e),n.exec(e)};var ub=class extends Vy{constructor(){super()}toHSV(){return this}toRGB(){return this}toHex(e){return this.toBytes().toHex(e)}toBytes(){return this}toCss(e){return`#`+this.toHex(e)}toCssRgba(){let e=this.toBytes();return`rgba(${e.r}, ${e.g}, ${e.b}, ${parseFloat(Number(this.a).toFixed(3))})`}toCssHex(){return this.a===1?`#`+this.toHex():`#`+this.toHex({alpha:!0})}toDisplay(){return cb.msie&&cb.version<9?this.toCss():this.toCssRgba()}equals(e){return e===this||e!=null&&this.toCssRgba()===vb(e).toCssRgba()}diff(e){if(e===null)return NaN;let t=this.toBytes(),n=e.toBytes();return Math.sqrt(((t.r-n.r)*.3)**2+((t.g-n.g)*.59)**2+((t.b-n.b)*.11)**2)}clone(){let e=this.toBytes();return e===this&&(e=new fb(e.r,e.g,e.b,e.a)),e}},db=class extends ub{constructor(e,t,n,r){super(),this.r=e,this.g=t,this.b=n,this.a=r}toHSV(){let{r:e,g:t,b:n}=this,r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o=i,s,c;return a===0?new mb(0,0,o,this.a):(i===0?(c=0,s=-1):(c=a/i,s=e===i?(t-n)/a:t===i?2+(n-e)/a:4+(e-t)/a,s*=60,s<0&&(s+=360)),new mb(s,c,o,this.a))}toHSL(){let{r:e,g:t,b:n}=this,r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r===i)a=o=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break;default:break}}return new hb(a*60,o*100,s*100,this.a)}toBytes(){return new fb(this.r*255,this.g*255,this.b*255,this.a)}},fb=class extends db{constructor(e,t,n,r){super(Math.round(e),Math.round(t),Math.round(n),r)}toRGB(){return new db(this.r/255,this.g/255,this.b/255,this.a)}toHSV(){return this.toRGB().toHSV()}toHSL(){return this.toRGB().toHSL()}toHex(e){let t=pb(this.r,2)+pb(this.g,2)+pb(this.b,2);return e&&e.alpha&&(t+=pb(Math.round(this.a*255),2)),t}toBytes(){return this}};function pb(e,t,n=`0`){let r=e.toString(16);for(;t>r.length;)r=n+r;return r}var mb=class extends ub{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.v=n,this.a=r}toRGB(){let{h:e,s:t,v:n}=this,r,i,a;if(t===0)r=i=a=n;else{e/=60;let o=Math.floor(e),s=e-o,c=n*(1-t),l=n*(1-t*s),u=n*(1-t*(1-s));switch(o){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;default:r=n,i=c,a=l;break}}return new db(r,i,a,this.a)}toHSL(){return this.toRGB().toHSL()}toBytes(){return this.toRGB().toBytes()}},hb=class extends ub{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.l=n,this.a=r}toRGB(){let e=this.h/360,t=this.s/100,n=this.l/100,r,i,a;if(t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=gb(s,o,e+1/3),i=gb(s,o,e),a=gb(s,o,e-1/3)}return new db(r,i,a,this.a)}toHSV(){return this.toRGB().toHSV()}toBytes(){return this.toRGB().toBytes()}};function gb(e,t,n){let r=n;return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function _b(e){return parseFloat(parseFloat(parseInt(e,16)/255).toFixed(3))}function vb(e,t){let n,r;if(!e||e===`none`)return null;if(e instanceof ub)return e;let i=e.toLowerCase();if(n=lb(i))return i=n[1]===`transparent`?new db(1,1,1,0):vb(sb[n[1]],t),i.match=[n[1]],i;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new fb(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new fb(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new fb(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),_b(n[4]+n[4])):(n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new fb(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),_b(n[4])):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(i))?r=new fb(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new fb(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(i))?r=new db(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new db(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4])):(n=/^color\(\s*srgb\s*([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s*(\/\s+([0-9]*\.?[0-9]+))?\)/.exec(i))&&(r=new db(parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]),parseFloat(n[5]||`1`))),r)r.match=n;else if(!t)throw Error(`Cannot parse color: `+i);return r}var yb=class e extends Vy{constructor(t){if(super(),arguments.length===1){let n=e.formats,r=this.resolveColor(t);for(let e=0;e<n.length;e++){let t=n[e].re,i=n[e].process,a=t.exec(r);if(a){let e=i(a);this.r=e[0],this.g=e[1],this.b=e[2]}}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}toHex(){let e=this.padDigit,t=this.r.toString(16),n=this.g.toString(16),r=this.b.toString(16);return`#`+e(t)+e(n)+e(r)}resolveColor(t){let n=t||`black`;return n.charAt(0)===`#`&&(n=n.substr(1,6)),n=n.replace(/ /g,``),n=n.toLowerCase(),n=e.namedColors[n]||n,n}normalizeByte(e){return e<0||isNaN(e)?0:e>255?255:e}padDigit(e){return e.length===1?`0`+e:e}brightness(e){let t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this}percBrightness(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}isDark(){return this.percBrightness()<180}static fromBytes(e,t,n,r){return new fb(e,t,n,r??1)}static fromRGB(e,t,n,r){return new db(e,t,n,r??1)}static fromHSV(e,t,n,r){return new mb(e,t,n,r??1)}static fromHSL(e,t,n,r){return new hb(e,t,n,r??1)}};yb.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],yb.namedColors=sb;let bb=e=>e.ownerDocument.defaultView.getComputedStyle(e),xb=(e,t)=>{let n=document.createElement(`div`);e.parentElement?e.parentElement.appendChild(n):e.appendChild(n),n.style.color=`rgb(from ${t} clamp(0, r, 255) clamp(0, g, 255) clamp(0, b, 255))`;let r=vb(bb(n).color,!0);return n.remove(),r?r.toCssHex():`#000000`};function Sb(e,t){let n=bb(e).getPropertyValue(t),r=vb(n,!0);return r?r.toCssHex():xb(e,n)}var Cb=class extends Vy{observers(){return this._observers=this._observers||[],this._observers}addObserver(e){return this._observers?this._observers.push(e):this._observers=[e],this}removeObserver(e){let t=this.observers(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this}trigger(e,t){let n=this._observers;if(n&&!this._suspended)for(let r=0;r<n.length;r++){let i=n[r];i[e]&&i[e](t)}return this}optionsChange(e={}){e.element=this,this.trigger(`optionsChange`,e)}geometryChange(){this.trigger(`geometryChange`,{element:this})}suspend(){return this._suspended=(this._suspended||0)+1,this}resume(){return this._suspended=Math.max((this._suspended||0)-1,0),this}_observerField(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}};let wb={}.toString;var Tb=class e extends Cb{constructor(e,t=``){super(),this.prefix=t;for(let t in e){let n=e[t];n=this._wrap(n,t),this[t]=n}}get(e){let t=e.split(`.`),n=this;for(;t.length&&n;){let e=t.shift();n=n[e]}return n}set(e,t){this.get(e)!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))}_set(t,n){let r=t.indexOf(`.`)>=0,i=this,a=t;if(r){let t=a.split(`.`),n=this.prefix;for(;t.length>1;){a=t.shift(),n+=a+`.`;let r=i[a];r||(r=new e({},n),r.addObserver(this),i[a]=r),i=r}a=t[0]}i._clear(a),i[a]=n}_clear(e){let t=this[e];t&&t.removeObserver&&t.removeObserver(this)}_wrap(t,n){let r=wb.call(t),i=t;return i!=null&&r===`[object Object]`&&(!(t instanceof e)&&!(t instanceof Vy)&&(i=new e(i,this.prefix+n+`.`)),i.addObserver(this)),i}};function Eb(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function Db(e){return function(){return this[e]}}function Ob(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=r.charAt(0).toUpperCase()+r.substring(1,r.length);e[`set`+i]=Eb(r),e[`get`+i]=Db(r)}}let kb=(e,t)=>{let n=class extends e{};return Ob(n.prototype,t),n};function Ab(e,t){return e.push.apply(e,t),e}let jb={1:`i`,10:`x`,100:`c`,2:`ii`,20:`xx`,200:`cc`,3:`iii`,30:`xxx`,300:`ccc`,4:`iv`,40:`xl`,400:`cd`,5:`v`,50:`l`,500:`d`,6:`vi`,60:`lx`,600:`dc`,7:`vii`,70:`lxx`,700:`dcc`,8:`viii`,80:`lxxx`,800:`dccc`,9:`ix`,90:`xc`,900:`cm`,1e3:`m`};function Mb(e){let t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n=``;for(;e>0;)e<t[0]?t.shift():(n+=jb[t[0]],e-=t[0]);return n}function Nb(){let e,t,n=new Promise((r,i)=>{e=e=>(n._state=`resolved`,r(e),n),t=e=>(n._state=`rejected`,i(e),n)});return n._state=`pending`,n.resolve=e,n.reject=t,n.state=()=>n._state,n}let Pb=1;function Fb(){return`kdef`+Pb++}let Ib=Math.PI/180,Lb=Number.MAX_VALUE,Rb=-Number.MAX_VALUE;function zb(e){return e/Ib}let Bb=String.fromCharCode;function Vb(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296<=r&&r<=56319){let t=r,i=e.charCodeAt(++n);isNaN(i)||(r=(t-55296)*1024+(i-56320)+65536)}r<128?t+=Bb(r):r<2048?(t+=Bb(192|r>>>6),t+=Bb(128|r&63)):r<65536?(t+=Bb(224|r>>>12),t+=Bb(128|r>>>6&63),t+=Bb(128|r&63)):r<1114111&&(t+=Bb(240|r>>>18),t+=Bb(128|r>>>12&63),t+=Bb(128|r>>>6&63),t+=Bb(128|r&63))}return t}function Hb(e){return Bb(e>>8)+Bb(e&255)}function Ub(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<65535)t+=Hb(r);else{let e=(r-65536>>10)+55296,n=(r-65536&1023)+56320;t+=Hb(e),t+=Hb(n)}}return t}let Wb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function Gb(e){let t=``,n=0,r=Vb(e);for(;n<r.length;){let e=r.charCodeAt(n++),i=r.charCodeAt(n++),a=r.charCodeAt(n++),o=e>>2,s=(e&3)<<4|i>>4,c=(i&15)<<2|a>>6,l=a&63;isNaN(i)?c=l=64:isNaN(a)&&(l=64),t=t+Wb.charAt(o)+Wb.charAt(s)+Wb.charAt(c)+Wb.charAt(l)}return t}function Kb(e){return(e.x||{}).location===void 0?{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}:{x:e.x.location,y:e.y.location}}function qb(e={}){return e.touch?e.touch.initialTouch:e.target}function Jb(e){return e===``||e===null||e===`none`||e===`transparent`||e===void 0}function Yb(e){if(e)return e[e.length-1]}function Xb(e,t,n){return Math.max(Math.min(e,n),t)}function Zb(e,t){if(e.length<2)return e.slice();function n(e,n){for(var r=[],i=0,a=0,o=0;i<e.length&&a<n.length;)t(e[i],n[a])<=0?r[o++]=e[i++]:r[o++]=n[a++];return i<e.length&&r.push.apply(r,e.slice(i)),a<n.length&&r.push.apply(r,n.slice(a)),r}return(function e(t){if(t.length<=1)return t;var r=Math.floor(t.length/2),i=t.slice(0,r),a=t.slice(r);return i=e(i),a=e(a),n(i,a)})(e)}function Qb(e){return Promise.all(e)}function $b(e){return e*Ib}function ex(e){return e?10**e:1}function tx(e,t){let n=ex(t);return Math.round(e*n)/n}function nx(e,t){return e===void 0?t:e}function rx(e,t){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.addEventListener(r[i],t[n],!1)}}function ix(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function ax(e,t){let n={},r=window.getComputedStyle(e)||{},i=Array.isArray(t)?t:[t];for(let e=0;e<i.length;e++){let t=i[e];n[t]=r[t]}return n}function ox(e){return isNaN(e)?e:e+`px`}function sx(e,t){if(t){let{width:n,height:r}=t;n!==void 0&&(e.style.width=ox(n)),r!==void 0&&(e.style.height=ox(r))}else{let t=ax(e,[`width`,`height`]);return{width:parseInt(t.width,10),height:parseInt(t.height,10)}}}function cx(e,t={}){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.removeEventListener(r[i],t[n],!1)}}function lx(e){let{paddingLeft:t,paddingTop:n}=ax(e,[`paddingLeft`,`paddingTop`]);return{top:parseFloat(n),left:parseFloat(t)}}var ux=class e extends Vy{constructor(e=0,t=0,n=0,r=0,i=0,a=0){super(),this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a}multiplyCopy(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}invert(){let{a:t,b:n,c:r,d:i,e:a,f:o}=this,s=t*i-n*r;return s===0?null:new e(i/s,-n/s,-r/s,t/s,(r*o-i*a)/s,(n*a-t*o)/s)}clone(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)}equals(e){return e?this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f:!1}round(e){return this.a=tx(this.a,e),this.b=tx(this.b,e),this.c=tx(this.c,e),this.d=tx(this.d,e),this.e=tx(this.e,e),this.f=tx(this.f,e),this}toArray(e){let t=[this.a,this.b,this.c,this.d,this.e,this.f];if(e!==void 0)for(let n=0;n<t.length;n++)t[n]=tx(t[n],e);return t}toString(e,t=`,`){return this.toArray(e).join(t)}static translate(t,n){return new e(1,0,0,1,t,n)}static unit(){return new e(1,0,0,1,0,0)}static rotate(t,n,r){let i=new e;return i.a=Math.cos($b(t)),i.b=Math.sin($b(t)),i.c=-i.b,i.d=i.a,i.e=n-n*i.a+r*i.b||0,i.f=r-r*i.a-n*i.b||0,i}static scale(t,n){return new e(t,0,0,n,0,0)}};ux.IDENTITY=ux.unit();let dx=/matrix\((.*)\)/;function fx(e){let t=e.match(dx);return t===null||t.length!==2?ux.unit():new ux(...t[1].split(`,`).map(e=>parseFloat(e)))}function px(e){let t=getComputedStyle(e).transform;return t===`none`?ux.unit():fx(t)}function mx(e){if(!e)return ux.unit();let t=px(e),n=e.parentElement;for(;n;){let e=px(n);t=t.multiplyCopy(e),n=n.parentElement}return t.b=t.c=t.e=t.f=0,t}var hx=class extends Vy{constructor(e){super(),this._size=e,this._length=0,this._map={}}put(e,t){let n=this._map,r={key:e,value:t};n[e]=r,this._head?(this._tail.newer=r,r.older=this._tail,this._tail=r):this._head=this._tail=r,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++}get(e){let t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}};let gx=/\r?\n|\r|\t/g;function _x(e){return String(e).replace(gx,` `)}function vx(e){let t=[];for(let n in e)t.push(n+e[n]);return t.sort().join(``)}function yx(e){let t=2166136261;for(let n=0;n<e.length;++n)t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t^=e.charCodeAt(n);return t>>>0}function bx(){return{width:0,height:0,baseline:0}}let xx={baselineMarkerSize:1},Sx;typeof document<`u`&&(Sx=document.createElement(`div`),Sx.style.setProperty(`position`,`absolute`,`important`),Sx.style.setProperty(`top`,`-4000px`,`important`),Sx.style.setProperty(`width`,`auto`,`important`),Sx.style.setProperty(`height`,`auto`,`important`),Sx.style.setProperty(`padding`,`0`,`important`),Sx.style.setProperty(`margin`,`0`,`important`),Sx.style.setProperty(`border`,`0`,`important`),Sx.style.setProperty(`line-height`,`normal`,`important`),Sx.style.setProperty(`visibility`,`hidden`,`important`),Sx.style.setProperty(`white-space`,`pre`,`important`));var Cx=class extends Vy{constructor(e){super(),this._cache=new hx(1e3),this.options=Object.assign({},xx,e)}measure(e,t,n={}){if(e==null)return bx();let r=yx(e+vx(t)),i=this._cache.get(r);if(i)return i;let a=bx(),o=n.box||Sx,s=this._baselineMarker().cloneNode(!1);for(let e in t){let n=t[e];n!==void 0&&(o.style[e]=n)}let c=n.normalizeText===!1?String(e):_x(e);return o.textContent=c,o.appendChild(s),document.body.appendChild(o),c.length&&(a.width=o.offsetWidth-this.options.baselineMarkerSize,a.height=o.offsetHeight,a.baseline=s.offsetTop+this.options.baselineMarkerSize),a.width>0&&a.height>0&&this._cache.put(r,a),o.parentNode.removeChild(o),a}_baselineMarker(){let e=document.createElement(`div`);return e.style.display=`inline-block`,e.style.verticalAlign=`baseline`,e.style.width=this.options.baselineMarkerSize+`px`,e.style.height=this.options.baselineMarkerSize+`px`,e.style.overflow=`hidden`,e}};Cx.current=new Cx;function wx(e,t,n){return Cx.current.measure(e,t,n)}let Tx=()=>typeof window<`u`,Ex={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)(\.(\d+(\.\d+)?))?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},Dx={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},Ox={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i},kx={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i},Ax=(e,t,n)=>{for(let n in t)if(t.hasOwnProperty(n)&&t[n].test(e))return n;return n===void 0?e:n},jx=e=>{let t,n=[];for(let r in Ex)if(Ex.hasOwnProperty(r)){if(n=e.match(Ex[r]),!n)continue;if(r===`windows`&&`plugins`in window.navigator)return null;let i={};return i.device=r,i.browser=Ax(e,kx,`default`),i.name=Ax(r,Dx),i[i.name]=!0,i.majorVersion=n[2],i.minorVersion=n[3]?n[3].replace(`_`,`.`):`.0`,t=i.minorVersion.replace(`.`,``).substr(0,2),i.flatVersion=i.majorVersion+t+Array(3-(t.length<3?t.length:2)).join(`0`),i.cordova=!0,i.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||i.cordova,i}return null},Mx=e=>{let t=null,n=[];for(let r in Ox)if(Ox.hasOwnProperty(r)&&(n=e.match(Ox[r]),n)){t={},t[r]=!0,t[n[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,t.version=parseInt(document.documentMode||n[2],10);break}return t},Nx=Tx()&&window.navigator?window.navigator.userAgent:null,Px=Nx?Mx(Nx):null;Nx&&jx(Nx),Tx()&&`ontouchstart`in window,Px&&!Px.chrome&&window.MSPointerEvent,Px&&!Px.chrome&&window.PointerEvent;let Fx={};Fx.undefined=e=>e;let Ix={};Ix.undefined=e=>e;let Lx=/\/\*[\s\S]*?\*\//g,Rx=/([^\s:;]+?)\s*:\s*((?:(?:url\(\s*(?:(?:[^"')\\]|\\.)*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*\)|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^;"'])*?)\s*)(?=;|$)/gi,zx=/&quot;|&#34;|&#x22;/gi,Bx=/&apos;|&#39;|&#x27;/gi;function Vx(e){return e.replace(zx,`"`).replace(Bx,`'`)}function Hx(e){let t={},n=Vx((e||``).replace(Lx,``)),r=Rx.exec(n),i,a;for(;r!==null;)i=r[1].trim(),a=r[2].trim(),t[i]=a,r=Rx.exec(n);return t}let Ux=(e,t)=>{let n=Hx(t);Object.keys(n).forEach(t=>{e.style[t]=n[t]})},Wx=`data-style`,Gx=e=>(e||``).replace(/\sstyle=/g,` data-style=`),Kx=e=>{Array.from(e.querySelectorAll(`[data-style]`)).forEach(e=>{let t=e.getAttribute(Wx);e.removeAttribute(Wx),Ux(e,t)})},qx=(e,t)=>{e.innerHTML=Gx(t),Kx(e)},Jx=(e,t)=>{let n=document.createElement(`div`);qx(n,t),n.firstElementChild&&e.insertBefore(n.firstElementChild,e.firstChild)};function Yx(e){return e&&typeof e.matrix==`function`?e.matrix():e}var Q=class e extends kb(Cb,[`x`,`y`]){constructor(e,t){super(),this.x=e||0,this.y=t||0}equals(e){return e&&e.x===this.x&&e.y===this.y}clone(){return new e(this.x,this.y)}rotate(t,n){let r=e.create(n)||e.ZERO;return this.transform(ux.rotate(t,r.x,r.y))}translate(e,t){return this.x+=e,this.y+=t,this.geometryChange(),this}translateWith(e){return this.translate(e.x,e.y)}move(e,t){return this.x=this.y=0,this.translate(e,t)}scale(e,t=e){return this.x*=e,this.y*=t,this.geometryChange(),this}scaleCopy(e,t){return this.clone().scale(e,t)}transform(e){let t=Yx(e),{x:n,y:r}=this;return this.x=t.a*n+t.c*r+t.e,this.y=t.b*n+t.d*r+t.f,this.geometryChange(),this}transformCopy(e){let t=this.clone();return e&&t.transform(e),t}distanceTo(e){let t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}round(e){return this.x=tx(this.x,e),this.y=tx(this.y,e),this.geometryChange(),this}toArray(e){let t=e!==void 0;return[t?tx(this.x,e):this.x,t?tx(this.y,e):this.y]}toString(e,t=` `){let{x:n,y:r}=this;return e!==void 0&&(n=tx(n,e),r=tx(r,e)),n+t+r}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static min(){let t=Lb,n=Lb;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.min(r.x,t),n=Math.min(r.y,n)}return new e(t,n)}static max(){let t=Rb,n=Rb;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.max(r.x,t),n=Math.max(r.y,n)}return new e(t,n)}static minPoint(){return new e(Rb,Rb)}static maxPoint(){return new e(Lb,Lb)}static get ZERO(){return new e(0,0)}},Xx=class e extends kb(Cb,[`width`,`height`]){constructor(e,t){super(),this.width=e||0,this.height=t||0}equals(e){return e&&e.width===this.width&&e.height===this.height}clone(){return new e(this.width,this.height)}toArray(e){let t=e!==void 0;return[t?tx(this.width,e):this.width,t?tx(this.height,e):this.height]}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static get ZERO(){return new e(0,0)}},Zx=class e extends Cb{constructor(e=new Q,t=new Xx,n=0){super(),this.setOrigin(e),this.setSize(t),this.setCornerRadius(n)}clone(){return new e(this.origin.clone(),this.size.clone())}equals(e){return e&&e.origin.equals(this.origin)&&e.size.equals(this.size)}setOrigin(e){return this._observerField(`origin`,Q.create(e)),this.geometryChange(),this}getOrigin(){return this.origin}setCornerRadius(e){return this.cornerRadius=Array.isArray(e)?e:[e,e],this.geometryChange(),this}getCornerRadius(){return this.cornerRadius}setSize(e){return this._observerField(`size`,Xx.create(e)),this.geometryChange(),this}getSize(){return this.size}width(){return this.size.width}height(){return this.size.height}topLeft(){return this.origin.clone()}bottomRight(){return this.origin.clone().translate(this.width(),this.height())}topRight(){return this.origin.clone().translate(this.width(),0)}bottomLeft(){return this.origin.clone().translate(0,this.height())}center(){return this.origin.clone().translate(this.width()/2,this.height()/2)}bbox(t){let n=this.topLeft().transformCopy(t),r=this.topRight().transformCopy(t),i=this.bottomRight().transformCopy(t),a=this.bottomLeft().transformCopy(t);return e.fromPoints(n,r,i,a)}transformCopy(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))}expand(e,t=e){return this.size.width+=2*e,this.size.height+=2*t,this.origin.translate(-e,-t),this}expandCopy(e,t){return this.clone().expand(e,t)}containsPoint(e){let t=this.origin,n=this.bottomRight();return!(e.x<t.x||e.y<t.y||n.x<e.x||n.y<e.y)}_isOnPath(e,t){let n=this.expandCopy(t,t),r=this.expandCopy(-t,-t);return n.containsPoint(e)&&!r.containsPoint(e)}static fromPoints(){let t=Q.min.apply(null,arguments),n=Q.max.apply(null,arguments),r=new Xx(n.x-t.x,n.y-t.y);return new e(t,r)}static union(t,n){return e.fromPoints(Q.min(t.topLeft(),n.topLeft()),Q.max(t.bottomRight(),n.bottomRight()))}static intersect(t,n){let r={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},i={left:n.topLeft().x,top:n.topLeft().y,right:n.bottomRight().x,bottom:n.bottomRight().y};if(r.left<=i.right&&i.left<=r.right&&r.top<=i.bottom&&i.top<=r.bottom)return e.fromPoints(new Q(Math.max(r.left,i.left),Math.max(r.top,i.top)),new Q(Math.min(r.right,i.right),Math.min(r.bottom,i.bottom)))}},Qx=class e extends Cb{constructor(e=ux.unit()){super(),this._matrix=e}clone(){return new e(this._matrix.clone())}equals(e){return e&&e._matrix.equals(this._matrix)}translate(e,t){return this._matrix=this._matrix.multiplyCopy(ux.translate(e,t)),this._optionsChange(),this}scale(e,t=e,n=null){let r=n;return r&&(r=Q.create(r),this._matrix=this._matrix.multiplyCopy(ux.translate(r.x,r.y))),this._matrix=this._matrix.multiplyCopy(ux.scale(e,t)),r&&(this._matrix=this._matrix.multiplyCopy(ux.translate(-r.x,-r.y))),this._optionsChange(),this}rotate(e,t){let n=Q.create(t)||Q.ZERO;return this._matrix=this._matrix.multiplyCopy(ux.rotate(e,n.x,n.y)),this._optionsChange(),this}multiply(e){let t=Yx(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this}matrix(e){return e?(this._matrix=e,this._optionsChange(),this):this._matrix}_optionsChange(){this.optionsChange({field:`transform`,value:this})}};function $x(e){return e===null?null:e instanceof Qx?e:new Qx(e)}let eS={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},tS=`butt`;var nS=class extends Cb{get nodeType(){return`Rect`}constructor(e){super(),this._initOptions(e)}_initOptions(e={}){let{clip:t,transform:n}=e;n&&(e.transform=$x(n)),t&&!t.id&&(t.id=Fb()),this.options=new Tb(e),this.options.addObserver(this)}transform(e){if(e!==void 0)this.options.set(`transform`,$x(e));else return this.options.get(`transform`)}parentTransform(){let e=this,t;for(;e.parent;){e=e.parent;let n=e.transform();n&&(t=n.matrix().multiplyCopy(t||ux.unit()))}if(t)return $x(t)}currentTransform(e=this.parentTransform()){let t=Yx(this.transform()),n=Yx(e),r;if(r=t&&n?n.multiplyCopy(t):t||n,r)return $x(r)}visible(e){return e===void 0?this.options.get(`visible`)!==!1:(this.options.set(`visible`,e),this)}clip(e){let t=this.options;return e===void 0?t.get(`clip`):(e&&!e.id&&(e.id=Fb()),t.set(`clip`,e),this)}opacity(e){return e===void 0?nx(this.options.get(`opacity`),1):(this.options.set(`opacity`,e),this)}className(e){return e===void 0?this.options.get(`className`):(this.options.set(`className`,e),this)}clippedBBox(e){let t=this._clippedBBox(e);if(t){let n=this.clip();return n?Zx.intersect(t,n.bbox(e)):t}}containsPoint(e,t){if(this.visible()){let n=this.currentTransform(t),r=e;return n&&(r=e.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(r)||this._isOnPath&&this._hasStroke()&&this._isOnPath(r)}return!1}_hasFill(){let e=this.options.fill;return e&&(e.nodeType===`Pattern`||!Jb(e.color))}_hasStroke(){let e=this.options.stroke;return e&&e.width>0&&!Jb(e.color)}_clippedBBox(e){return this.bbox(e)}};function rS(e,t,n,r){let i=0,a=0;return r&&(i=Math.atan2(r.c*n,r.a*t),r.b!==0&&(a=Math.atan2(r.d*n,r.b*t))),{x:i,y:a}}let iS=Math.PI/2;var aS=class e extends kb(Cb,[`radius`]){constructor(e=new Q,t=0){super(),this.setCenter(e),this.setRadius(t)}setCenter(e){return this._observerField(`center`,Q.create(e)),this.geometryChange(),this}getCenter(){return this.center}equals(e){return e&&e.center.equals(this.center)&&e.radius===this.radius}clone(){return new e(this.center.clone(),this.radius)}pointAt(e){return this._pointAt($b(e))}bbox(e){let t=rS(this.center,this.radius,this.radius,e),n=Q.maxPoint(),r=Q.minPoint();for(let i=0;i<4;i++){let a=this._pointAt(t.x+i*iS).transformCopy(e),o=this._pointAt(t.y+i*iS).transformCopy(e),s=new Q(a.x,o.y);n=Q.min(n,s),r=Q.max(r,s)}return Zx.fromPoints(n,r)}_pointAt(e){let{center:t,radius:n}=this;return new Q(t.x+n*Math.cos(e),t.y+n*Math.sin(e))}containsPoint(e){let{center:t,radius:n}=this;return(e.x-t.x)**2+(e.y-t.y)**2<=n**2}_isOnPath(e,t){let{center:n,radius:r}=this,i=n.distanceTo(e);return r-t<=i&&i<=r+t}};let oS=e=>class extends e{fill(e,t){let n=this.options;if(e!==void 0){if(e&&e.nodeType!==`Gradient`){let r={color:e};t!==void 0&&(r.opacity=t),n.set(`fill`,r)}else n.set(`fill`,e);return this}return n.get(`fill`)}stroke(e,t,n){return e===void 0?this.options.get(`stroke`):(this.options.set(`stroke.color`,e),t!==void 0&&this.options.set(`stroke.width`,t),n!==void 0&&this.options.set(`stroke.opacity`,n),this)}},sS=ux.IDENTITY.toString(),cS=e=>class extends e{bbox(e){let t=Yx(this.currentTransform(e)),n=t?t.toString():sS,r;this._bboxCache&&this._matrixHash===n?r=this._bboxCache.clone():(r=this._bbox(t),this._bboxCache=r?r.clone():null,this._matrixHash=n);let i=this.options.get(`stroke.width`);return i&&r&&r.expand(i/2),r}geometryChange(){delete this._bboxCache,this.trigger(`geometryChange`,{element:this})}};function lS(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,e),this.geometryChange(),this)}}function uS(e,t){for(let n=0;n<t.length;n++)e[t[n]]=lS(t[n])}let dS=(e,t=[`geometry`])=>{let n=class extends e{};return uS(n.prototype,t),n};var fS=class extends oS(cS(dS(nS))){get nodeType(){return`Circle`}constructor(e=new aS,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}rawBBox(){return this._geometry.bbox()}_bbox(e){return this._geometry.bbox(e)}_containsPoint(e){return this.geometry().containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}};function pS(e,t,n=10){return tx(Math.abs(e-t),n)===0}function mS(e,t,n){return e<t||pS(e,t,n)}function hS(e,t,n,r){let i=t.x-e.x,a=r.x-n.x,o=t.y-e.y,s=r.y-n.y,c=e.x-n.x,l=e.y-n.y,u=i*s-a*o,d=(i*l-o*c)/u,f=(a*l-s*c)/u;if(d>=0&&d<=1&&f>=0&&f<=1)return new Q(e.x+f*i,e.y+f*o)}let gS=Math.pow,_S=[`radiusX`,`radiusY`,`startAngle`,`endAngle`,`anticlockwise`];var vS=class e extends kb(Cb,_S){constructor(e=new Q,t={}){super(),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation}clone(){return new e(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})}setCenter(e){return this._observerField(`center`,Q.create(e)),this.geometryChange(),this}getCenter(){return this.center}pointAt(e){let t=this.center,n=$b(e);return new Q(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))}curvePoints(){let e=this.startAngle,t=this.anticlockwise?-1:1,n=[this.pointAt(e)],r=this._arcInterval(),i=r.endAngle-r.startAngle,a=Math.ceil(i/45),o=i/a,s=e,c;this.xRotation&&(c=$x().rotate(this.xRotation,this.center));for(let e=1;e<=a;e++){let e=s+t*o,r=this._intervalCurvePoints(s,e,c);n.push(r.cp1,r.cp2,r.p2),s=e}return n}bbox(e){let t=this._arcInterval(),n=t.startAngle,r=t.endAngle,i=rS(this.center,this.radiusX,this.radiusY,e),a=zb(i.x),o=zb(i.y),s=this.pointAt(r).transformCopy(e),c=xS(a,n),l=xS(o,n),u=this.pointAt(n).transformCopy(e),d=Q.min(u,s),f=Q.max(u,s);for(;c<r||l<r;){let t;c<r&&(t=this.pointAt(c).transformCopy(e),c+=90);let n;l<r&&(n=this.pointAt(l).transformCopy(e),l+=90),u=new Q(t.x,n.y),d=Q.min(d,u),f=Q.max(f,u)}return Zx.fromPoints(d,f)}_arcInterval(){let{startAngle:e,endAngle:t,anticlockwise:n}=this;if(n){let n=e;e=t,t=n}return(e>t||n&&e===t)&&(t+=360),{startAngle:e,endAngle:t}}_intervalCurvePoints(e,t,n){let r=this.pointAt(e),i=this.pointAt(t),a=this._derivativeAt(e),o=this._derivativeAt(t),s=($b(t)-$b(e))/3,c=new Q(r.x+s*a.x,r.y+s*a.y),l=new Q(i.x-s*o.x,i.y-s*o.y);return n&&(r.transform(n),i.transform(n),c.transform(n),l.transform(n)),{p1:r,cp1:c,cp2:l,p2:i}}_derivativeAt(e){let t=$b(e);return new Q(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))}containsPoint(e){let t=this._arcInterval(),n=t.endAngle-t.startAngle,{center:r,radiusX:i,radiusY:a}=this,o=r.distanceTo(e),s=Math.atan2(e.y-r.y,e.x-r.x),c=i*a/Math.sqrt(gS(i,2)*gS(Math.sin(s),2)+gS(a,2)*gS(Math.cos(s),2)),l=this.pointAt(this.startAngle).round(10),u=this.pointAt(this.endAngle).round(10),d=hS(r,e.round(10),l,u),f;if(n<180)f=d&&mS(r.distanceTo(d),o)&&mS(o,c);else{let n=yS(r.x,r.y,i,a,e.x,e.y);n!==360&&(n=(360+n)%360);let s=t.startAngle<=n&&n<=t.endAngle;f=s&&mS(o,c)||!s&&(!d||d.equals(e))}return f}_isOnPath(e,t){let n=this._arcInterval(),r=this.center,i=yS(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return i!==360&&(i=(360+i)%360),n.startAngle<=i&&i<=n.endAngle&&this.pointAt(i).distanceTo(e)<=t}static fromPoints(t,n,r,i,a,o,s){let c=bS({x1:t.x,y1:t.y,x2:n.x,y2:n.y,rx:r,ry:i,largeArc:a,swipe:o,rotation:s});return new e(c.center,{startAngle:c.startAngle,endAngle:c.endAngle,radiusX:c.radiusX,radiusY:c.radiusY,xRotation:c.xRotation,anticlockwise:o===0})}};function yS(e,t,n,r,i,a){let o=tx((i-e)/n,3),s=tx((a-t)/r,3);return tx(zb(Math.atan2(s,o)))}function bS(e){let{x1:t,y1:n,x2:r,y2:i,rx:a,ry:o,largeArc:s,swipe:c,rotation:l=0}=e,u=$b(l),d=Math.cos(u),f=Math.sin(u),p=d*(t-r)/2+f*(n-i)/2,m=-f*(t-r)/2+d*(n-i)/2,h=s===c?-1:1,g=p**2,_=m**2,v=a**2,y=o**2,b=g/v+_/y;b>1&&(b=Math.sqrt(g/v+_/y),a=b*a,v=a**2,o=b*o,y=o**2);let x=h*Math.sqrt((v*y-v*_-y*g)/(v*_+y*g));isNaN(x)&&(x=0);let S=a*m*x/o,C=-x*(o*p)/a,w=d*S-f*C+(t+r)/2,T=f*S+d*C+(n+i)/2,E=(p-S)/a,D=(m-C)/o,O=-(p+S)/a,k=-(m+C)/o,A=(D>=0?1:-1)*zb(Math.acos(E/Math.sqrt(E*E+D*D))),j=tx((E*O+D*k)/(Math.sqrt(E*E+D*D)*Math.sqrt(O*O+k*k)),10),M=(E*k-D*O>=0?1:-1)*zb(Math.acos(j));!c&&M>0&&(M-=360),c&&M<0&&(M+=360);let N=A+M,P=N>=0?1:-1;return N=Math.abs(N)%360*P,{center:new Q(w,T),startAngle:A,endAngle:N,radiusX:a,radiusY:o,xRotation:l}}function xS(e,t){let n=e;for(;n<t;)n+=90;return n}let SS=[].splice,CS=[].slice;var wS=class extends Cb{constructor(e=[]){super(),this.length=0,this._splice(0,e.length,e)}elements(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)}push(...e){let t=this.length,n=e.length;for(let r=0;r<n;r++)this[t+r]=e[r],e[r].addObserver(this);return this.length=t+n,this._change(),this.length}slice(){return CS.call(this)}pop(){if(this.length>0){let e=this[this.length-1];return this.length--,e.removeObserver(this),this._change(),e}}splice(e,t,...n){let r=this._splice(e,t,n);return this._change(),r}shift(){if(this.length>0){let e=this[0];for(let e=1;e<this.length;e++)this[e-1]=this[e];return this.length--,e.removeObserver(this),this._change(),e}}unshift(...e){let t=e.length;for(let e=this.length-1;e>=0;e--)this[e+t]=this[e];for(let n=0;n<t;n++)this[n]=e[n],e[n].addObserver(this);return this.length+=t,this._change(),this.length}indexOf(e){let t=this.length;for(let n=0;n<t;n++)if(this[n]===e)return n;return-1}_splice(e,t,n){let r=SS.apply(this,[e,t].concat(n));return this._clearObserver(r),this._setObserver(n),r}_add(e){this._setObserver(e),this._change()}_remove(e){this._clearObserver(e),this._change()}_setObserver(e){for(let t=0;t<e.length;t++)e[t].addObserver(this)}_clearObserver(e){for(let t=0;t<e.length;t++)e[t].removeObserver(this)}_change(){}},TS=class extends wS{_change(){this.geometryChange()}};function ES(e,t,n){let r=zb(Math.atan2(t.y-e.y,t.x-e.x));return n.transformCopy($x().rotate(-r,e)).x<e.x}function DS(e,t,n){let r=1-e;return r**3*n[0][t]+3*r**2*e*n[1][t]+3*e**2*r*n[2][t]+e**3*n[3][t]}function OS(e,t){return[-e[0][t]+3*e[1][t]-3*e[2][t]+e[3][t],3*(e[0][t]-2*e[1][t]+e[2][t]),3*(-e[0][t]+e[1][t]),e[0][t]]}var kS=class e extends Vy{constructor(e=0,t=0){super(),this.real=e,this.img=t}add(t){return new e(tx(this.real+t.real,10),tx(this.img+t.img,10))}addConstant(t){return new e(this.real+t,this.img)}negate(){return new e(-this.real,-this.img)}multiply(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)}multiplyConstant(t){return new e(this.real*t,this.img*t)}nthRoot(t){let n=Math.atan2(this.img,this.real),r=Math.sqrt(this.img**2+this.real**2)**(1/t);return new e(r*Math.cos(n/t),r*Math.sin(n/t))}equals(e){return this.real===e.real&&this.img===e.img}isReal(){return this.img===0}};function AS(e){return e<0?-1:1}function jS(e,t,n){let r=Math.sqrt(t**2-4*e*n);return[(-t+r)/(2*e),(-t-r)/(2*e)]}function MS(e,t,n,r){if(e===0)return jS(t,n,r);let i=(3*e*n-t**2)/(3*e**2),a=(2*t**3-9*e*t*n+27*e**2*r)/(27*e**3),o=(i/3)**3+(a/2)**2,s=new kS(0,1),c=-t/(3*e),l,u,d,f,p,m,h;o<0?(l=new kS(-a/2,Math.sqrt(-o)).nthRoot(3),u=new kS(-a/2,-Math.sqrt(-o)).nthRoot(3)):(l=-a/2+Math.sqrt(o),l=new kS(AS(l)*Math.abs(l)**(1/3)),u=-a/2-Math.sqrt(o),u=new kS(AS(u)*Math.abs(u)**(1/3))),d=l.add(u),m=l.add(u).multiplyConstant(-1/2),h=l.add(u.negate()).multiplyConstant(Math.sqrt(3)/2),f=m.add(s.multiply(h)),p=m.add(s.negate().multiply(h));let g=[];return d.isReal()&&g.push(tx(d.real+c,10)),f.isReal()&&g.push(tx(f.real+c,10)),p.isReal()&&g.push(tx(p.real+c,10)),g}function NS(e,t,n,r,i){let a=OS(e,r),o=MS(a[0],a[1],a[2],a[3]-t[r]),s;for(let r=0;r<o.length;r++)if(0<=o[r]&&o[r]<=1&&(s=DS(o[r],n,e),Math.abs(s-t[n])<=i))return!0}function PS(e,t,n){let r=OS(e,`x`),i=MS(r[0],r[1],r[2],r[3]-t.x),a,o,s=0;for(let r=0;r<i.length;r++)a=DS(i[r],`y`,e),o=pS(a,t.y)||a>t.y,o&&((i[r]===0||i[r]===1)&&n.bottomRight().x>t.x||0<i[r]&&i[r]<1)&&s++;return s}function FS(e,t,n){let r;if(e.x!==t.x){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y),c=i<=n.x&&n.x<a;r=o===s?n.y<=o&&c:c&&(s-o)*((e.x-t.x)*(e.y-t.y)>0?n.x-i:a-n.x)/(a-i)+o-n.y>=0}return+!!r}function IS(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,Q.create(e)),this.geometryChange(),this)}}function LS(e,t){for(let n=0;n<t.length;n++)e[t[n]]=IS(t[n])}let RS=(e,t)=>{let n=class extends e{};return LS(n.prototype,t),n},zS=[`anchor`,`controlIn`,`controlOut`];var BS=class extends RS(Cb,zS){constructor(e,t,n){super(),this.anchor(e||new Q),this.controlIn(t),this.controlOut(n)}bboxTo(e,t){let n=this.anchor().transformCopy(t),r=e.anchor().transformCopy(t),i;return i=this.controlOut()&&e.controlIn()?this._curveBoundingBox(n,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),r):this._lineBoundingBox(n,r),i}_lineBoundingBox(e,t){return Zx.fromPoints(e,t)}_curveBoundingBox(e,t,n,r){let i=[e,t,n,r],a=this._curveExtremesFor(i,`x`),o=this._curveExtremesFor(i,`y`),s=VS([a.min,a.max,e.x,r.x]),c=VS([o.min,o.max,e.y,r.y]);return Zx.fromPoints(new Q(s.min,c.min),new Q(s.max,c.max))}_curveExtremesFor(e,t){let n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:DS(n.min,t,e),max:DS(n.max,t,e)}}_curveExtremes(e,t,n,r){let i=e-3*t+3*n-r,a=-2*(e-2*t+n),o=e-t,s=Math.sqrt(a*a-4*i*o),c=0,l=1;i===0?a!==0&&(c=l=-o/a):isNaN(s)||(c=(-a+s)/(2*i),l=(-a-s)/(2*i));let u=Math.max(Math.min(c,l),0);(u<0||u>1)&&(u=0);let d=Math.min(Math.max(c,l),1);return(d>1||d<0)&&(d=1),{min:u,max:d}}_intersectionsTo(e,t){let n;return n=this.controlOut()&&e.controlIn()?PS([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):FS(this.anchor(),e.anchor(),t),n}_isOnCurveTo(e,t,n,r){if(this.bboxTo(e).expand(n,n).containsPoint(t)){let i=this.anchor(),a=this.controlOut(),o=e.controlIn(),s=e.anchor();if(r===`start`&&i.distanceTo(t)<=n)return!ES(i,a,t);if(r===`end`&&s.distanceTo(t)<=n)return!ES(s,o,t);let c=[i,a,o,s];if(NS(c,t,`x`,`y`,n)||NS(c,t,`y`,`x`,n))return!0;let l=$x().rotate(45,t),u=[i.transformCopy(l),a.transformCopy(l),o.transformCopy(l),s.transformCopy(l)];return NS(u,t,`x`,`y`,n)||NS(u,t,`y`,`x`,n)}}_isOnLineTo(e,t,n){let r=this.anchor(),i=e.anchor(),a=zb(Math.atan2(i.y-r.y,i.x-r.x));return new Zx([r.x,r.y-n/2],[r.distanceTo(i),n]).containsPoint(t.transformCopy($x().rotate(-a,r)))}_isOnPathTo(e,t,n,r){let i;return i=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,r):this._isOnLineTo(e,t,n),i}};function VS(e){let t=e.length,n=Lb,r=Rb;for(let i=0;i<t;i++)r=Math.max(r,e[i]),n=Math.min(n,e[i]);return{min:n,max:r}}let HS=.333;function US(e,t){let n=e.slice(0),r=[],i=n.length;if(i>2&&(WS(0,n),i=n.length),i<2||i===2&&n[0].equals(n[1]))return r;let a=n[0],o=n[1],s=n[2];for(r.push(new BS(a));a.equals(n[i-1]);)t=!0,n.pop(),i--;if(i===2){let e=XS(a,o,`x`,`y`);return Yb(r).controlOut(QS(e,a,o,`x`,`y`)),r.push(new BS(o,$S(e,a,o,`x`,`y`))),r}let c,l;if(t){a=n[i-1],o=n[0],s=n[1];let e=JS(a,o,s);c=e[1],l=e[0]}else c=QS(XS(a,o,`x`,`y`),a,o,`x`,`y`);let u=c;for(let e=0;e<=i-3;e++)if(WS(e,n),i=n.length,e+3<=i){a=n[e],o=n[e+1],s=n[e+2];let t=JS(a,o,s);Yb(r).controlOut(u),u=t[1];let i=t[0];r.push(new BS(o,i))}if(t){a=n[i-2],o=n[i-1],s=n[0];let e=JS(a,o,s);Yb(r).controlOut(u),r.push(new BS(o,e[0])),Yb(r).controlOut(e[1]),r.push(new BS(s,l))}else{let e=XS(o,s,`x`,`y`);Yb(r).controlOut(u),r.push(new BS(s,$S(e,o,s,`x`,`y`)))}return r}function WS(e,t){for(;t[e+1]&&(t[e].equals(t[e+1])||t[e+1].equals(t[e+2]));)t.splice(e+1,1)}function GS(e,t,n){let r=!1;if(e.x===t.x)r=!0;else if(t.x===n.x)(t.y<n.y&&e.y<=t.y||n.y<t.y&&t.y<=e.y)&&(r=!0);else{let i=tC(qS(e,t),n.x);!(e.y<=t.y&&n.y<=i)&&!(t.y<=e.y&&n.y>=i)&&(r=!0)}return r}function KS(e,t,n){let r=tC(qS(e,t),n.x);return e.x===t.x&&t.x===n.x||tx(r,1)===tx(n.y,1)}function qS(e,t){let n=(t.y-e.y)/(t.x-e.x);return[e.y-n*e.x,n]}function JS(e,t,n){let r=`x`,i=`y`,a=!1,o=!1,s;if(KS(e,t,n))s=XS(e,t,`x`,`y`);else{let c={x:ZS(e,t,n,`x`),y:ZS(e,t,n,`y`)};if(c.x&&c.y)s=XS(e,n,`x`,`y`),a=!0;else if(GS(e,t,n)&&(r=`y`,i=`x`),c[r])s=0;else{let a;a=n[i]<e[i]&&e[i]<=t[i]||e[i]<n[i]&&t[i]<=e[i]?nC((n[i]-e[i])*(t[r]-e[r])):-nC((n[r]-e[r])*(t[i]-e[i])),s=.01*a,o=!0}}let c=$S(s,e,t,r,i);if(o){let e=r;r=i,i=e}let l=QS(s,t,n,r,i);return a&&(YS(e,t,c,s),YS(t,n,l,s)),[c,l]}function YS(e,t,n,r){e.y<t.y?t.y<n.y?(n.x=e.x+(t.y-e.y)/r,n.y=t.y):n.y<e.y&&(n.x=t.x-(t.y-e.y)/r,n.y=e.y):n.y<t.y?(n.x=e.x-(e.y-t.y)/r,n.y=t.y):e.y<n.y&&(n.x=t.x+(e.y-t.y)/r,n.y=e.y)}function XS(e,t,n,r){let i=t[n]-e[n],a=t[r]-e[r],o;return o=i===0?0:a/i,o}function ZS(e,t,n,r){return n[r]>t[r]&&t[r]>e[r]||n[r]<t[r]&&t[r]<e[r]}function QS(e,t,n,r,i){let a=t[r],o=(n[r]-a)*HS;return eC(a+o,t[i]+o*e,r,i)}function $S(e,t,n,r,i){let a=t[r],o=n[r],s=(o-a)*HS;return eC(o-s,n[i]-s*e,r,i)}function eC(e,t,n,r){let i=new Q;return i[n]=e,i[r]=t,i}function tC(e,t){let n=e.length,r=0;for(let i=0;i<n;i++)r+=t**+i*e[i];return r}function nC(e){return e<=0?-1:1}let rC={l:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=2){let a=new Q(n[i],n[i+1]);t.isRelative&&a.translateWith(r),e.lineTo(a.x,a.y),r.x=a.x,r.y=a.y}},c:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=6){let a=new Q(n[i],n[i+1]),o=new Q(n[i+2],n[i+3]),s=new Q(n[i+4],n[i+5]);t.isRelative&&(o.translateWith(r),a.translateWith(r),s.translateWith(r)),e.curveTo(a,o,s),r.x=s.x,r.y=s.y}},v:function(e,t){let n=t.isRelative?0:t.position.x;iC(t.parameters,!0,n),this.l(e,t)},h:function(e,t){let n=t.isRelative?0:t.position.y;iC(t.parameters,!1,n),this.l(e,t)},a:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=7){let a=n[i],o=n[i+1],s=n[i+2],c=n[i+3],l=n[i+4],u=new Q(n[i+5],n[i+6]);t.isRelative&&u.translateWith(r),(r.x!==u.x||r.y!==u.y)&&(e.arcTo(u,a,o,c,l,s),r.x=u.x,r.y=u.y)}},s:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`s`||i===`c`)&&(a=Yb(Yb(e.paths).segments).controlIn());for(let i=0;i<n.length;i+=4){let o=new Q(n[i],n[i+1]),s=new Q(n[i+2],n[i+3]),c;t.isRelative&&(o.translateWith(r),s.translateWith(r)),c=a?aC(a,r):r.clone(),a=o,e.curveTo(c,o,s),r.x=s.x,r.y=s.y}},q:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=4){let a=new Q(n[i],n[i+1]),o=new Q(n[i+2],n[i+3]);t.isRelative&&(a.translateWith(r),o.translateWith(r));let s=sC(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}},t:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`q`||i===`t`)&&(a=Yb(Yb(e.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(3/2));for(let i=0;i<n.length;i+=2){let o=new Q(n[i],n[i+1]);t.isRelative&&o.translateWith(r),a=a?aC(a,r):r.clone();let s=sC(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}}};function iC(e,t,n){let r=+!t;for(let t=0;t<e.length;t+=2)e.splice(t+r,0,n)}function aC(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}let oC=1/3;function sC(e,t,n){let r=t.clone().scale(2/3);return{controlOut:r.clone().translateWith(e.scaleCopy(oC)),controlIn:r.translateWith(n.scaleCopy(oC))}}let cC=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,lC=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;function uC(e){let t=[];return e.replace(lC,function(e,n){t.push(parseFloat(n))}),t}function dC(e,t){let n=new Q,r;return t.replace(cC,(t,i,a,o)=>{let s=i.toLowerCase(),c=s===i,l=uC(a.trim());if(s===`m`&&(c?(n.x+=l[0],n.y+=l[1]):(n.x=l[0],n.y=l[1]),e.moveTo(n.x,n.y),l.length>2&&(s=`l`,l.splice(0,2))),rC[s])rC[s](e,{parameters:l,position:n,isRelative:c,previousCommand:r}),o&&o.toLowerCase()===`z`&&e.close();else if(s!==`m`)throw Error(`Error while parsing SVG path. Unsupported command: `+s);r=s}),e}function fC(e,t,n){let r;for(let i=0;i<e.length;i++){let a=e[i];if(a.visible()){let e=t?a.bbox(n):a.rawBBox();e&&(r=r?Zx.union(r,e):e)}}return r}function pC(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r];if(i.visible()){let e=i.clippedBBox(t);e&&(n=n?Zx.union(n,e):e)}}return n}let mC=e=>(...t)=>t.map(t=>t.toString(e)).join(` `),hC=(e,t)=>e.controlOut()&&t.controlIn()?`C`:`L`;var gC=class e extends oS(cS(nS)){get nodeType(){return`Path`}constructor(e){super(e),this.segments=new TS,this.segments.addObserver(this),this.options.stroke===void 0&&(this.stroke(`#000`),this.options.stroke.lineJoin===void 0&&this.options.set(`stroke.lineJoin`,`miter`))}moveTo(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this}lineTo(e,t){let n=new BS(t===void 0?e:new Q(e,t));return this.segments.push(n),this}curveTo(e,t,n){if(this.segments.length>0){let r=Yb(this.segments),i=new BS(n,t);this.suspend(),r.controlOut(e),this.resume(),this.segments.push(i)}return this}arc(e,t,n,r,i){if(this.segments.length>0){let a=Yb(this.segments).anchor(),o=$b(e),s=new vS(new Q(a.x-n*Math.cos(o),a.y-r*Math.sin(o)),{startAngle:e,endAngle:t,radiusX:n,radiusY:r,anticlockwise:i});this._addArcSegments(s)}return this}arcTo(e,t,n,r,i,a){if(this.segments.length>0){let o=Yb(this.segments).anchor(),s=vS.fromPoints(o,Q.create(e),t,n,r,i,a);this._addArcSegments(s)}return this}_addArcSegments(e){this.suspend();let t=e.curvePoints();for(let e=1;e<t.length;e+=3)this.curveTo(t[e],t[e+1],t[e+2]);this.resume(),this.geometryChange()}close(){return this.options.closed=!0,this.geometryChange(),this}rawBBox(){return this._bbox()}toString(e){let t=``,n=this.segments,r=n.length;if(r>0){let i=[],a=mC(e),o;for(let e=1;e<r;e++){let t=hC(n[e-1],n[e]);t!==o&&(o=t,i.push(t)),t===`L`?i.push(a(n[e].anchor())):i.push(a(n[e-1].controlOut(),n[e].controlIn(),n[e].anchor()))}t=`M`+a(n[0].anchor())+` `+i.join(` `),this.options.closed&&(t+=`Z`)}return t}_containsPoint(e){let t=this.segments,n=t.length,r=0,i,a;for(let o=1;o<n;o++)i=t[o-1],a=t[o],r+=i._intersectionsTo(a,e);return(this.options.closed||!t[0].anchor().equals(t[n-1].anchor()))&&(r+=FS(t[0].anchor(),t[n-1].anchor(),e)),r%2!=0}_isOnPath(e,t){let n=this.segments,r=n.length,i=t||this.options.stroke.width;if(r>1){if(n[0]._isOnPathTo(n[1],e,i,`start`))return!0;for(let t=2;t<=r-2;t++)if(n[t-1]._isOnPathTo(n[t],e,i))return!0;if(n[r-2]._isOnPathTo(n[r-1],e,i,`end`))return!0}return!1}_bbox(e){let t=this.segments,n=t.length,r;if(n===1)r=new Zx(t[0].anchor().transformCopy(e),Xx.ZERO);else if(n>0)for(let i=1;i<n;i++){let n=t[i-1].bboxTo(t[i],e);r=r?Zx.union(r,n):n}return r}static parse(e,t){return _C.parse(e,t)}static fromRect(t,n){let r=new e(n),[i,a]=t.cornerRadius;if(i===0&&a===0)r.moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();else{let{x:e,y:n}=t.origin,o=t.width(),s=t.height();i=Xb(i,0,o/2),a=Xb(a,0,s/2),r.moveTo(e+i,n).lineTo(e+o-i,n).arcTo([e+o,n+a],i,a,!1).lineTo(e+o,n+s-a).arcTo([e+o-i,n+s],i,a,!1).lineTo(e+i,n+s).arcTo([e,n+s-a],i,a,!1).lineTo(e,n+a).arcTo([e+i,n],i,a,!1)}return r}static fromPoints(t,n){if(t){let r=new e(n);for(let e=0;e<t.length;e++){let n=Q.create(t[e]);n&&(e===0?r.moveTo(n):r.lineTo(n))}return r}}static curveFromPoints(t,n){if(t){let r=US(t),i=new e(n);return i.segments.push.apply(i.segments,r),i}}static fromArc(t,n){let r=new e(n),i=t.startAngle,a=t.pointAt(i);return r.moveTo(a.x,a.y),r.arc(i,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),r}},_C=class e extends oS(cS(nS)){static parse(t,n){return dC(new e(n),t)}toString(e){let t=this.paths,n=``;if(t.length>0){let r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(e));n=r.join(` `)}return n}get nodeType(){return`MultiPath`}constructor(e){super(e),this.paths=new TS,this.paths.addObserver(this),this.options.stroke===void 0&&this.stroke(`#000`)}moveTo(e,t){let n=new gC;return n.moveTo(e,t),this.paths.push(n),this}lineTo(e,t){return this.paths.length>0&&Yb(this.paths).lineTo(e,t),this}curveTo(e,t,n){return this.paths.length>0&&Yb(this.paths).curveTo(e,t,n),this}arc(e,t,n,r,i){return this.paths.length>0&&Yb(this.paths).arc(e,t,n,r,i),this}arcTo(e,t,n,r,i,a){return this.paths.length>0&&Yb(this.paths).arcTo(e,t,n,r,i,a),this}close(){return this.paths.length>0&&Yb(this.paths).close(),this}_bbox(e){return fC(this.paths,!0,e)}rawBBox(){return fC(this.paths,!1)}_containsPoint(e){let t=this.paths;for(let n=0;n<t.length;n++)if(t[n]._containsPoint(e))return!0;return!1}_isOnPath(e){let t=this.paths,n=this.options.stroke.width;for(let r=0;r<t.length;r++)if(t[r]._isOnPath(e,n))return!0;return!1}_clippedBBox(e){return pC(this.paths,this.currentTransform(e))}};dS(nS);var vC=class extends oS(RS(nS,[`position`])){get nodeType(){return`Text`}constructor(e,t=new Q,n={}){super(n),this.content(e),this.position(t),this.options.font||(this.options.font=`12px sans-serif`),this.options.fill===void 0&&this.fill(`#000`)}content(e){return e===void 0?this.options.get(`content`):(this.options.set(`content`,e),this)}measure(){return wx(this.content(),{font:this.options.get(`font`)})}rect(){let e=this.measure();return new Zx(this.position().clone(),[e.width,e.height])}bbox(e){let t=Yx(this.currentTransform(e));return this.rect().bbox(t)}rawBBox(){return this.rect().bbox()}_containsPoint(e){return this.rect().containsPoint(e)}},yC=class extends dS(nS,[`rect`]){get nodeType(){return`Image`}constructor(e,t=new Zx,n={}){super(n),this.src(e),this.rect(t)}src(e){return e===void 0?this.options.get(`src`):(this.options.set(`src`,e),this)}bbox(e){let t=Yx(this.currentTransform(e));return this._rect.bbox(t)}rawBBox(){return this._rect.bbox()}_containsPoint(e){return this._rect.containsPoint(e)}_hasFill(){return this.src()}};let bC=(e,t)=>class extends e{traverse(e){let n=this[t];for(let t=0;t<n.length;t++){let r=n[t];r.traverse?r.traverse(e):e(r)}return this}};var xC=class extends bC(nS,`children`){get nodeType(){return`Group`}constructor(e){super(e),this.children=[]}childrenChange(e,t,n){this.trigger(`childrenChange`,{action:e,items:t,index:n})}append(){return Ab(this.children,arguments),this._reparent(arguments,this),this.childrenChange(`add`,arguments),this}insert(e,t){return this.children.splice(e,0,t),t.parent=this,this.childrenChange(`add`,[t],e),this}insertAt(e,t){return this.insert(t,e)}remove(e){let t=this.children.indexOf(e);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange(`remove`,[e],t)),this}removeAt(e){if(0<=e&&e<this.children.length){let t=this.children[e];this.children.splice(e,1),t.parent=null,this.childrenChange(`remove`,[t],e)}return this}clear(){let e=this.children;return this.children=[],this._reparent(e,null),this.childrenChange(`remove`,e,0),this}bbox(e){return fC(this.children,!0,this.currentTransform(e))}rawBBox(){return fC(this.children,!1)}_clippedBBox(e){return pC(this.children,this.currentTransform(e))}currentTransform(e){return nS.prototype.currentTransform.call(this,e)||null}containsPoint(e,t){if(this.visible()){let n=this.children,r=this.currentTransform(t);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e,r))return!0}return!1}_reparent(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.parent;i&&i!==this&&i.remove&&i.remove(r),r.parent=t}}};function SC(e,t,n){let r=n.transform()||$x(),i=r.matrix();i.e+=e.x-t.origin.x,i.f+=e.y-t.origin.y,r.matrix(i),n.transform(r)}function CC(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]:n===`end`?t.origin[r]+t.size[i]-e:t.origin[r]+(t.size[i]-e)/2,a}function wC(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]+t.size[i]-e:n===`end`?t.origin[r]:t.origin[r]+(t.size[i]-e)/2,a}let TC={alignContent:`start`,justifyContent:`start`,alignItems:`start`,spacing:0,orientation:`horizontal`,lineSpacing:0,wrap:!0,revers:!1},EC=(e,t)=>{e.forEach(t)},DC=(e,t)=>{let n=e.length;for(let r=n-1;r>=0;r--)t(e[r],r)};(class extends xC{constructor(e,t){super(Object.assign({},TC,t)),this._rect=e,this._fieldMap={}}rect(e){return e?(this._rect=e,this):this._rect}appendBreak(){let e=new xC;return e._isBreakMarker=!0,this.append(e),this}_initMap(){let e=this.options,t=this._fieldMap;e.orientation===`horizontal`?(t.sizeField=`width`,t.groupsSizeField=`height`,t.groupAxis=`x`,t.groupsAxis=`y`):(t.sizeField=`height`,t.groupsSizeField=`width`,t.groupAxis=`y`,t.groupsAxis=`x`),e.reverse?(this.forEach=DC,this.justifyAlign=wC):(this.forEach=EC,this.justifyAlign=CC)}reflow(){if(!this._rect||this.children.length===0)return;this._initMap(),this.options.transform&&this.transform(null);let e=this.options,t=this._rect,{groups:n,groupsSize:r}=this._initGroups(),{sizeField:i,groupsSizeField:a,groupAxis:o,groupsAxis:s}=this._fieldMap,c=new Q,l=new Q,u=new Xx,d=CC(r,t,e.alignContent,s,a),f,p,m,h=(t,n)=>{let r=p.elements[n];l[o]=f,l[s]=CC(t.size[a],m,e.alignItems,s,a),SC(l,t,r),f+=t.size[i]+e.spacing};for(let r=0;r<n.length;r++)p=n[r],c[o]=f=this.justifyAlign(p.size,t,e.justifyContent,o,i),c[s]=d,u[i]=p.size,u[a]=p.lineSize,m=new Zx(c,u),this.forEach(p.bboxes,h),d+=p.lineSize+e.lineSpacing;if(!e.wrap&&p.size>t.size[i]){let n=t.size[i]/m.size[i],r=m.topLeft().scale(n,n),c=CC(m.size[a]*n,t,e.alignContent,s,a),l=$x();o===`x`?l.translate(t.origin.x-r.x,c-r.y):l.translate(c-r.x,t.origin.y-r.y),l.scale(n,n),this.transform(l)}}_initGroups(){let{options:e,children:t}=this,{lineSpacing:n,wrap:r,spacing:i}=e,a=this._fieldMap.sizeField,o=this._newGroup(),s=[],c=function(){s.push(o),l+=o.lineSize+n},l=-n;for(let e=0;e<t.length;e++){let n=t[e],s=t[e].clippedBBox();if(n._isBreakMarker){o.bboxes.length>0&&(c(),o=this._newGroup());continue}n.visible()&&s&&(r&&o.size+s.size[a]+i>this._rect.size[a]?o.bboxes.length===0?(this._addToGroup(o,s,n),c(),o=this._newGroup()):(c(),o=this._newGroup(),this._addToGroup(o,s,n)):this._addToGroup(o,s,n))}return o.bboxes.length&&c(),{groups:s,groupsSize:l}}_addToGroup(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)}_newGroup(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}});var OC=class extends oS(cS(dS(nS))){get nodeType(){return`Rect`}constructor(e=new Zx,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}_bbox(e){return this._geometry.bbox(e)}rawBBox(){return this._geometry.bbox()}_containsPoint(e){return this._geometry.containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}},kC=class extends wS{_change(){this.optionsChange({field:`stops`})}};function AC(e){return function(t){return t===void 0?this.options.get(e):(this.options.set(e,t),this)}}function jC(e,t){for(let n=0;n<t.length;n++)e[t[n]]=AC(t[n])}let MC=(e,t)=>{let n=class extends e{};return jC(n.prototype,t),n},NC=[`offset`,`color`,`opacity`];var PC=class e extends MC(Cb,NC){constructor(e,t,n){super(),this.options=new Tb({offset:e,color:t,opacity:n===void 0?1:n}),this.options.addObserver(this)}static create(t){if(t!==void 0){let n;return n=t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity),n}}},FC=class extends Cb{get nodeType(){return`Gradient`}constructor(e={}){super(),this.stops=new kC(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=Fb()}userSpace(e){return e===void 0?this._userSpace:(this._userSpace=e,this.optionsChange(),this)}_createStops(e=[]){let t=[];for(let n=0;n<e.length;n++)t.push(PC.create(e[n]));return t}addStop(e,t,n){this.stops.push(new PC(e,t,n))}removeStop(e){let t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}optionsChange(e){this.trigger(`optionsChange`,{field:`gradient`+(e?`.`+e.field:``),value:this})}geometryChange(){this.optionsChange()}};let IC=[`start`,`end`];var LC=class extends RS(FC,IC){constructor(e={}){super(e),this.start(e.start||new Q),this.end(e.end||new Q(1,0))}},RC=class extends RS(FC,[`center`]){constructor(e={}){super(e),this.center(e.center||new Q),this._radius=e.radius===void 0?1:e.radius,this._fallbackFill=e.fallbackFill}radius(e){return e===void 0?this._radius:(this._radius=e,this.geometryChange(),this)}fallbackFill(e){return e===void 0?this._fallbackFill:(this._fallbackFill=e,this.optionsChange(),this)}},zC=class extends xC{get nodeType(){return`Pattern`}constructor(e){super();let{width:t,height:n}=e;this._size=Xx.create([t,n]),this.id=Fb()}size(e){return e?(this._size=Xx.create(e),this):this._size}},BC=t({easeInOutBack:()=>$C,easeInOutCubic:()=>GC,easeInOutExpo:()=>ZC,easeInOutQuad:()=>qC,easeInOutQuint:()=>tw,easeInOutSine:()=>YC,easeOutBack:()=>QC,easeOutCirc:()=>JC,easeOutCubic:()=>WC,easeOutElastic:()=>UC,easeOutExpo:()=>XC,easeOutQuad:()=>KC,easeOutQuint:()=>ew,linear:()=>HC,swing:()=>VC});function VC(e){return .5-Math.cos(e*Math.PI)/2}function HC(e){return e}function UC(e){return e===0||e===1?e:2**(-10*e)*Math.sin((e-.125)*(1.1*Math.PI)/.5)+1}function WC(e){return 1-(1-e)**3}function GC(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function KC(e){return 1-(1-e)**2}function qC(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}function JC(e){return Math.sqrt(1-(e-1)**2)}function YC(e){return-(Math.cos(Math.PI*e)-1)/2}function XC(e){return e===1?1:1-2**(-10*e)}function ZC(e){return e===0||e===1?e:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}function QC(e){return 1+2.70158*(e-1)**3+1.70158*(e-1)**2}function $C(e){let t=1.70158*1.525;return e<.5?(2*e)**2*(3.5949095*2*e-t)/2:((2*e-2)**2*(3.5949095*(e*2-2)+t)+2)/2}function ew(e){return 1-(1-e)**5}function tw(e){return e<.5?16*e**5:1-(-2*e+2)**5/2}let nw;var rw=class e extends Vy{static get current(){return nw||=new e,nw}constructor(){super(),this._items=[]}register(e,t){this._items.push({name:e,type:t})}create(e,t){let n=this._items,r;if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name.toLowerCase()===e){r=n[t];break}}if(r)return new r.type(e,t)}};function iw(e){return Math.min(1,Math.max(0,e))}function aw(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;function u(e){return((o*e+a)*e+i)*e}function d(e){return((l*e+c)*e+s)*e}function f(e){return(3*o*e+2*a)*e+i}function p(e){let t=e;for(let n=0;n<8;n++){let n=u(t)-e,r=f(t);if(Math.abs(n)<1e-7)return t;if(Math.abs(r)<1e-7)break;t-=n/r}let n=0,r=1;t=e;for(let t=0;t<24;t++){let t=(n+r)/2,i=u(t);if(Math.abs(i-e)<1e-7)return t;i<e?n=t:r=t}return(n+r)/2}return e=>{let t=iw(e);return t===0||t===1?t:d(p(t))}}let ow={duration:500,easing:`swing`};(class extends Vy{static create(e,t,n){return rw.current.create(e,t,n)}get options(){return this._options||ow}set options(e){this._options=e}constructor(e,t){super(),this.options=Object.assign({},this.options,t),this.element=e}setup(){}step(){}play(){let e=this.options;typeof e.easing==`string`&&BC[e.easing]?e.easing=BC[e.easing]:Array.isArray(e.easing)&&e.easing.length===4?e.easing=aw(...e.easing):e.easing=BC[ow.easing];let{duration:t,delay:n=0,easing:r}=e,i=ab()+n,a=i+t;t===0?(this.step(1),this.abort()):setTimeout(()=>{let e=()=>{if(this._stopped)return;let n=ab(),o=Xb(n-i,0,t),s=r(o/t);this.step(s),n<a?Jy(e):this.abort()};e()},n)}abort(){this._stopped=!0}destroy(){this.abort()}});let sw;(class e extends Vy{static get current(){return sw||=new e,sw}parse(e,t){return dC(new _C(t),e)}});var cw=class extends Vy{constructor(e){super(),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}destroy(){this.srcElement&&this.srcElement.removeObserver(this);let e=this.childNodes;for(let t=0;t<e.length;t++)this.childNodes[t].destroy();this.parent=null}load(){}observe(){this.srcElement&&this.srcElement.addObserver(this)}append(e){this.childNodes.push(e),e.parent=this}insertAt(e,t){this.childNodes.splice(t,0,e),e.parent=this}remove(e,t){let n=e+t;for(let t=e;t<n;t++)this.childNodes[t].removeSelf();this.childNodes.splice(e,t)}removeSelf(){this.clear(),this.destroy()}clear(){this.remove(0,this.childNodes.length)}invalidate(){this.parent&&this.parent.invalidate()}geometryChange(){this.invalidate()}optionsChange(){this.invalidate()}childrenChange(e){e.action===`add`?this.load(e.items,e.index):e.action===`remove`&&this.remove(e.index,e.items.length),this.invalidate()}};let lw=[`click`,`mouseenter`,`mouseleave`,`mousemove`,`resize`];var uw=class extends Hy{constructor(e,t){super(),this.options=Object.assign({},t),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler(`click`),this._mouseenter=this._handler(`mouseenter`),this._mouseleave=this._handler(`mouseleave`),this._mousemove=this._handler(`mousemove`),this._visual=new xC,sx(e,this.options),this.bind(lw,this.options),this._enableTracking()}draw(e){this._visual.children.push(e)}clear(){this._visual.children=[]}destroy(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()}eventTarget(e){let t=qb(e),n;for(;!n&&t&&(n=t._kendoNode,t!==this.element);)t=t.parentElement;if(n)return n.srcElement}exportVisual(){return this._visual}getSize(){return sx(this.element)}currentSize(e){if(e)this._size=e;else return this._size}setSize(e){sx(this.element,e),this.currentSize(e),this._resize()}resize(e){let t=this.getSize(),n=this.currentSize();(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger(`resize`,t))}size(e){if(!e)return this.getSize();this.setSize(e)}suspendTracking(){this._suspendedTracking=!0}resumeTracking(){this._suspendedTracking=!1}_enableTracking(){}_resize(){}_handler(e){return t=>{let n=this.eventTarget(t);n&&!this._suspendedTracking&&this.trigger(e,{element:n,originalEvent:t,type:e})}}_elementOffset(){let e=this.element,t=lx(e),{left:n,top:r}=ix(e);return{left:n+t.left,top:r+t.top}}_surfacePoint(e){let t=this._elementOffset(),n=Kb(e),r=n.x-t.left,i=n.y-t.top,a=mx(this.element).invert();return new Q(r,i).transform(a)}};function dw(e,t){return t==null?``:` ${e}="${t}" `}function fw(e){let t=``;for(let n=0;n<e.length;n++)t+=dw(e[n][0],e[n][1]);return t}function pw(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n][1];r!==void 0&&(t+=e[n][0]+`:`+r+`;`)}if(t!==``)return t}let mw={},hw=`none`,gw=(e,t)=>{Jx(e,t)},_w=(e,t)=>{let n=new DOMParser().parseFromString(Gx(t),`text/xml`);Kx(n);let r=document.adoptNode(n.documentElement);e.insertBefore(r,e.firstChild)},vw,yw=(e,t)=>{if(vw)return vw(e,t);if(vw=gw,typeof document<`u`){let e=document.createElement(`div`),t=typeof DOMParser<`u`;e.innerHTML=`<svg xmlns='http://www.w3.org/2000/svg'></svg>`,t&&e.firstChild.namespaceURI!==`http://www.w3.org/2000/svg`&&(vw=_w)}return vw(e,t)},bw=`transform`,xw={clip:`clip-path`,fill:`fill`};function Sw(e,t){return e===`clip`||e===`fill`&&(!t||t.nodeType===`Gradient`||t.nodeType===`Pattern`)}var Cw=class extends cw{constructor(e,t){super(e),this.definitions={},this.options=t}destroy(){this.element&&=(this.element._kendoNode=null,null),this.clearDefinitions(),super.destroy()}load(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.children,a=new mw[r.nodeType](r,this.options);t===void 0?this.append(a):this.insertAt(a,t),a.createDefinitions(),i&&i.length>0&&a.load(i);let o=this.element;o&&a.attachTo(o,t)}}root(){let e=this;for(;e.parent;)e=e.parent;return e}attachTo(e,t){let n=document.createElement(`div`);yw(n,`<svg xmlns='http://www.w3.org/2000/svg' version='1.1'>`+this.render()+`</svg>`);let r=n.firstChild.firstChild;r&&(t===void 0?e.appendChild(r):e.insertBefore(r,e.childNodes[t]||null),this.setElement(r))}setElement(e){this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this;let t=this.childNodes;for(let n=0;n<t.length;n++){let r=e.childNodes[n];t[n].setElement(r)}}clear(){this.clearDefinitions(),this.element&&(this.element.innerHTML=``);let e=this.childNodes;for(let t=0;t<e.length;t++)e[t].destroy();this.childNodes=[]}removeSelf(){if(this.element){let e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}super.removeSelf()}template(){return this.renderChildren()}render(){return this.template()}renderChildren(){let e=this.childNodes,t=``;for(let n=0;n<e.length;n++)t+=e[n].render();return t}optionsChange(e){let{field:t,value:n}=e;t===`visible`?this.css(`display`,n?``:hw):xw[t]&&Sw(t,n)?this.updateDefinition(t,n):t===`opacity`?this.attr(`opacity`,n):t===`cursor`?this.css(`cursor`,n):t===`id`&&(n?this.attr(`id`,n):this.removeAttr(`id`)),super.optionsChange(e)}accessibilityOptionsChange(e){let{field:t,value:n}=e;t===`role`?n?this.attr(`role`,n):this.removeAttr(`role`):t===`ariaLabel`?n?this.attr(`aria-label`,eb(n)):this.removeAttr(`aria-label`):t===`ariaRoleDescription`?n?this.attr(`aria-roledescription`,eb(n)):this.removeAttr(`aria-roledescription`):t===`ariaChecked`?n===void 0?this.removeAttr(`aria-checked`):this.attr(`aria-checked`,n):t===`className`&&this.className(n)}attr(e,t){this.element&&this.element.setAttribute(e,t)}allAttr(e){for(let t=0;t<e.length;t++)this.attr(e[t][0],e[t][1])}toggleAttr(e,t){t?this.attr(e,t):this.removeAttr(e)}css(e,t){this.element&&(this.element.style[e]=t)}allCss(e){for(let t=0;t<e.length;t++)this.css(e[t][0],e[t][1])}className(e){this.element&&(this.element.classList.remove(...this.element.classList),e&&e.split(` `).forEach(e=>{e&&this.element.classList.add(e)}))}removeAttr(e){this.element&&this.element.removeAttribute(e)}mapTransform(e){let t=[];return e&&t.push([bw,`matrix(`+e.matrix().toString(6)+`)`]),t}renderTransform(){return fw(this.mapTransform(this.srcElement.transform()))}transformChange(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(bw)}mapStyle(){let e=this.srcElement.options,t=[[`cursor`,e.cursor]];return e.visible===!1&&t.push([`display`,hw]),t}renderStyle(){return dw(`style`,pw(this.mapStyle(!0)))}renderOpacity(){return dw(`opacity`,this.srcElement.options.opacity)}renderId(){return dw(`id`,this.srcElement.options.id)}renderClassName(){return dw(`class`,this.srcElement.options.className)}renderRole(){return dw(`role`,this.srcElement.options.role)}renderAriaLabel(){let e=this.srcElement.options.ariaLabel;return e&&=eb(e),dw(`aria-label`,e)}renderAriaRoleDescription(){let e=this.srcElement.options.ariaRoleDescription;return e&&=eb(e),dw(`aria-roledescription`,e)}renderAriaChecked(){return dw(`aria-checked`,this.srcElement.options.ariaChecked)}createDefinitions(){let e=this.srcElement,t=this.definitions;if(e){let n=e.options,r;for(let e in xw){let i=n.get(e);i&&Sw(e,i)&&(t[e]=i,r=!0)}r&&this.definitionChange({action:`add`,definitions:t})}}definitionChange(e){this.parent&&this.parent.definitionChange(e)}updateDefinition(e,t){let n=this.definitions,r=n[e],i=xw[e],a={};r&&(a[e]=r,this.definitionChange({action:`remove`,definitions:a}),delete n[e]),t?(a[e]=t,this.definitionChange({action:`add`,definitions:a}),n[e]=t,this.attr(i,this.refUrl(t.id))):r&&this.removeAttr(i)}clearDefinitions(){let e=this.definitions;this.definitionChange({action:`remove`,definitions:e}),this.definitions={}}renderDefinitions(){return fw(this.mapDefinitions())}mapDefinitions(){let e=this.definitions,t=[];for(let n in e){let r=e[n];t.push([xw[n],this.refUrl(r.id)])}return t}refUrl(e){return`url(#${e})`}},ww=class extends Cw{template(){return`<stop ${this.renderOffset()} ${this.renderStyle()} />`}renderOffset(){return dw(`offset`,this.srcElement.offset())}mapStyle(){let e=this.srcElement;return[[`stop-color`,e.color()],[`stop-opacity`,e.opacity()]]}optionsChange(e){e.field===`offset`?this.attr(e.field,e.value):(e.field===`color`||e.field===`opacity`)&&this.css(`stop-`+e.field,e.value)}},Tw=class extends Cw{constructor(e){super(e),this.id=e.id,this.loadStops()}loadStops(){let e=this.srcElement.stops,t=this.element;for(let n=0;n<e.length;n++){let r=new ww(e[n]);this.append(r),t&&r.attachTo(t)}}optionsChange(e){e.field===`gradient.stops`?(cw.prototype.clear.call(this),this.loadStops()):e.field===`gradient`&&this.allAttr(this.mapCoordinates())}renderCoordinates(){return fw(this.mapCoordinates())}mapSpace(){return[`gradientUnits`,this.srcElement.userSpace()?`userSpaceOnUse`:`objectBoundingBox`]}},Ew=class extends Tw{template(){return`<linearGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</linearGradient>`}mapCoordinates(){let e=this.srcElement,t=e.start(),n=e.end();return[[`x1`,t.x],[`y1`,t.y],[`x2`,n.x],[`y2`,n.y],this.mapSpace()]}},Dw=class extends Tw{template(){return`<radialGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</radialGradient>`}mapCoordinates(){let e=this.srcElement,t=e.center(),n=e.radius();return[[`cx`,t.x],[`cy`,t.y],[`r`,n],this.mapSpace()]}},Ow=class extends Cw{constructor(e){super(e),this.id=e.id,this.load(e.children)}template(){let e=this.srcElement.size().getWidth(),t=this.srcElement.size().getHeight();return`<pattern id='${this.srcElement.id}' width='${e}' height='${t}' patternUnits='userSpaceOnUse'>${this.renderChildren()}</pattern>`}},kw=class extends Cw{constructor(e){super(),this.srcElement=e,this.id=e.id,this.load([e])}renderClipRule(){return dw(`clip-rule`,`evenodd`)}template(){return`<clipPath ${this.renderClipRule()} id='${this.id}'>${this.renderChildren()}</clipPath>`}},Aw=class extends Cw{constructor(){super(),this.definitionMap={}}attachTo(e){this.element=e}template(){return`<defs>${this.renderChildren()}</defs>`}definitionChange(e){let{definitions:t,action:n}=e;n===`add`?this.addDefinitions(t):n===`remove`&&this.removeDefinitions(t)}createDefinition(e,t){let n;return e===`clip`?n=kw:e===`fill`&&(t instanceof LC?n=Ew:t instanceof RC?n=Dw:t.nodeType===`Pattern`&&(n=Ow)),new n(t)}addDefinitions(e){for(let t in e)this.addDefinition(t,e[t])}addDefinition(e,t){let{element:n,definitionMap:r}=this,i=t.id,a=r[i];if(a)a.count++;else{let a=this.createDefinition(e,t);r[i]={element:a,count:1},this.append(a),n&&a.attachTo(this.element)}}removeDefinitions(e){for(let t in e)this.removeDefinition(e[t])}removeDefinition(e){let t=this.definitionMap,n=e.id,r=t[n];r&&(r.count--,r.count===0&&(this.remove(this.childNodes.indexOf(r.element),1),delete t[n]))}},jw=class extends Cw{constructor(e){super(),this.options=e,this.defs=new Aw}attachTo(e){this.element=e,this.defs.attachTo(e.firstElementChild)}clear(){cw.prototype.clear.call(this)}template(){return this.defs.render()+this.renderChildren()}definitionChange(e){this.defs.definitionChange(e)}};let Mw={"fill.opacity":`fill-opacity`,"stroke.color":`stroke`,"stroke.width":`stroke-width`,"stroke.opacity":`stroke-opacity`};var Nw=class extends Cw{geometryChange(){this.attr(`d`,this.renderData()),this.invalidate()}optionsChange(e){switch(e.field){case`fill`:e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr(`fill`);break;case`fill.color`:this.allAttr(this.mapFill({color:e.value}));break;case`stroke`:e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr(`stroke`);break;case`transform`:this.transformChange(e.value);break;default:{let t=Mw[e.field];t&&this.attr(t,e.value);break}}this.accessibilityOptionsChange(e),super.optionsChange(e)}content(){this.element&&(this.element.textContent=this.srcElement.content())}renderData(){return this.srcElement.toString(3)||void 0}mapStroke(e){let t=[];return e&&!Jb(e.color)?(t.push([`stroke`,e.color]),t.push([`stroke-width`,e.width]),t.push([`stroke-linecap`,this.renderLinecap(e)]),t.push([`stroke-linejoin`,e.lineJoin]),e.opacity!==void 0&&t.push([`stroke-opacity`,e.opacity]),e.dashType!==void 0&&t.push([`stroke-dasharray`,this.renderDashType(e)])):t.push([`stroke`,hw]),t}renderStroke(){return fw(this.mapStroke(this.srcElement.options.stroke))}renderDashType(e){let{dashType:t,width:n=1}=e;if(t&&t!==`solid`){let e=eS[t.toLowerCase()],r=[];for(let t=0;t<e.length;t++)r.push(e[t]*n);return r.join(` `)}}renderLinecap(e){let{dashType:t,lineCap:n}=e;return t&&t!==`solid`?tS:n}mapFill(e){let t=[];return e&&(e.nodeType===`Gradient`||e.nodeType===`Pattern`)||(e&&!Jb(e.color)?(t.push([`fill`,e.color]),e.opacity!==void 0&&t.push([`fill-opacity`,e.opacity])):t.push([`fill`,hw])),t}renderFill(){return fw(this.mapFill(this.srcElement.options.fill))}template(){return`<path ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} ${dw(`d`,this.renderData())}${this.renderStroke()}${this.renderFill()}${this.renderDefinitions()}${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></path>`}},Pw=class extends Nw{renderData(){return this.srcElement.toPath().toString(3)}},Fw=class extends Nw{geometryChange(){let e=this.center();this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.attr(`r`,this.radius()),this.invalidate()}center(){return this.srcElement.geometry().center}radius(){return this.srcElement.geometry().radius}template(){return`<circle ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()}cx='${this.center().x}' cy='${this.center().y}' r='${this.radius()}'${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ${this.renderTransform()} ></circle>`}},Iw=class extends Cw{template(){return`<g${this.renderId()+this.renderTransform()+this.renderClassName()+this.renderStyle()+this.renderOpacity()+this.renderRole()+this.renderAriaLabel()+this.renderAriaRoleDescription()+this.renderAriaChecked()+this.renderDefinitions()}>${this.renderChildren()}</g>`}optionsChange(e){let{field:t,value:n}=e;t===`transform`&&this.transformChange(n),this.accessibilityOptionsChange(e),super.optionsChange(e)}},Lw=class extends Nw{geometryChange(){this.allAttr(this.mapPosition()),this.invalidate()}optionsChange(e){e.field===`src`&&this.allAttr(this.mapSource()),super.optionsChange(e)}mapPosition(){let e=this.srcElement.rect(),t=e.topLeft();return[[`x`,t.x],[`y`,t.y],[`width`,e.width()+`px`],[`height`,e.height()+`px`]]}renderPosition(){return fw(this.mapPosition())}mapSource(e){let t=this.srcElement.src();return e&&(t=eb(t)),[[`xlink:href`,t]]}renderSource(){return fw(this.mapSource(!0))}template(){return`<image preserveAspectRatio='none' ${this.renderId()} ${this.renderStyle()} ${this.renderTransform()} ${this.renderOpacity()}${this.renderPosition()} ${this.renderSource()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></image>`}},Rw=class extends Nw{renderData(){return this.srcElement.toString(3)||`undefined`}},zw=class extends Nw{geometryChange(){let e=this.srcElement.geometry();this.attr(`x`,e.origin.x),this.attr(`y`,e.origin.y),this.attr(`width`,e.size.width),this.attr(`height`,e.size.height),this.attr(`rx`,e.cornerRadius[0]),this.attr(`ry`,e.cornerRadius[1]),this.invalidate()}size(){return this.srcElement.geometry().size}origin(){return this.srcElement.geometry().origin}rx(){return this.srcElement.geometry().cornerRadius[0]}ry(){return this.srcElement.geometry().cornerRadius[1]}template(){return`<rect ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} x='${this.origin().x}' y='${this.origin().y}' rx='${this.rx()}' ry='${this.ry()}' width='${this.size().width}' height='${this.size().height}' ${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()} ${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} />`}};let Bw=/&(?:[a-zA-Z]+|#\d+);/g;function Vw(e){if(!e||typeof e!=`string`||!Bw.test(e))return e;let t=Vw._element;return Bw.lastIndex=0,e.replace(Bw,e=>(t.innerHTML=e,t.textContent||t.innerText))}typeof document<`u`&&(Vw._element=document.createElement(`span`));var Hw=class extends Nw{geometryChange(){let e=this.pos();this.attr(`x`,e.x),this.attr(`y`,e.y),this.invalidate()}optionsChange(e){e.field===`font`?(this.attr(`style`,pw(this.mapStyle())),this.geometryChange()):e.field===`content`&&super.content(this.srcElement.content()),super.optionsChange(e)}mapStyle(e){let t=super.mapStyle(e),n=this.srcElement.options.font;return e&&(n=eb(n)),t.push([`font`,n],[`white-space`,`pre`]),t}pos(){let e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)}renderContent(){let e=this.srcElement.content();return e=Vw(e),e=eb(e),_x(e)}renderTextAnchor(){let e;return(this.options||{}).rtl&&!(ib.browser.msie||ib.browser.edge)&&(e=`end`),dw(`text-anchor`,e)}renderPaintOrder(){let e=this.srcElement.options.paintOrder;return e?dw(`paint-order`,e):``}template(){return`<text ${this.renderId()} ${this.renderTextAnchor()} ${this.renderStyle()} ${this.renderOpacity()}x='${this.pos().x}' y='${this.pos().y}' ${this.renderStroke()} ${this.renderTransform()} ${this.renderDefinitions()}${this.renderPaintOrder()}${this.renderFill()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()}>${this.renderContent()}</text>`}};mw.Arc=Pw,mw.Circle=Fw,mw.Group=Iw,mw.Image=Lw,mw.MultiPath=Rw,mw.Path=Nw,mw.Rect=zw,mw.Text=Hw;function Uw(e){let t;try{t=e.getScreenCTM?e.getScreenCTM():null}catch{}if(t){let n=-t.e%1,r=-t.f%1,i=e.style;(n!==0||r!==0)&&(i.left=n+`px`,i.top=r+`px`)}}var Ww=class extends uw{get type(){return`svg`}constructor(e,t){super(e,t),this._root=new jw(Object.assign({rtl:ax(e,`direction`).direction===`rtl`},this.options)),yw(this.element,this._template(``)),this._rootElement=this.element.firstElementChild,this._rootElement.style.width=`100%`,this._rootElement.style.height=`100%`,this._rootElement.style.overflow=`hidden`,Uw(this._rootElement),this._root.attachTo(this._rootElement),rx(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}destroy(){this._root&&(this._root.destroy(),this._root=null,this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null,cx(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),super.destroy()}translate(e){let t=`${Math.round(e.x)} ${Math.round(e.y)} ${this._size.width} ${this._size.height}`;this._offset=e,this._rootElement.setAttribute(`viewBox`,t)}draw(e){super.draw(e),this._root.load([e])}clear(){super.clear(),this._root.clear()}svg(){return`<?xml version='1.0' ?>`+this._template()}exportVisual(){let{_visual:e,_offset:t}=this;if(t){let n=new xC;n.children.push(e),n.transform($x().translate(-t.x,-t.y)),e=n}return e}_resize(){this._offset&&this.translate(this._offset)}_template(e){return`<svg ${typeof e==`string`?e:`style='width: 100%; height: 100%; overflow: hidden;' `}xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>${this._root.render()}</svg>`}};let Gw={};var Kw=class extends cw{constructor(e){super(e),e&&this.initClip()}initClip(){let e=this.srcElement.clip();e&&(this.clip=e,e.addObserver(this))}clear(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),super.clear()}clearClip(){this.clip&&(this.clip.removeObserver(this),delete this.clip)}setClip(e){this.clip&&(e.beginPath(),new Gw[this.clip.nodeType](this.clip).renderPoints(e,this.clip),e.clip(`evenodd`))}optionsChange(e){e.field===`clip`&&(this.clearClip(),this.initClip()),super.optionsChange(e)}setTransform(e){if(this.srcElement){let t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}}loadElements(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],a=i.children,o=new Gw[i.nodeType](i,n);a&&a.length>0&&o.load(a,t,n),t===void 0?this.append(o):this.insertAt(o,t)}}load(e,t,n){this.loadElements(e,t,n),this.invalidate()}setOpacity(e){if(this.srcElement){let t=this.srcElement.opacity();t!==void 0&&this.globalAlpha(e,t)}}globalAlpha(e,t){let n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n}visible(){let e=this.srcElement;return!e||e&&e.options.visible!==!1}},qw=class extends bC(Kw,`childNodes`){renderTo(e){if(!this.visible())return;e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e);let t=this.childNodes;for(let n=0;n<t.length;n++){let r=t[n];r.visible()&&r.renderTo(e)}e.restore()}},Jw=class extends bC(qw,`childNodes`){constructor(e,t){super(),this.canvas=e,this.size=t,this.ctx=e.getContext(`2d`);let n=this._invalidate.bind(this);this.invalidate=ob(()=>{Jy(n)},16.666666666666668)}destroy(){super.destroy(),this.canvas=null,this.ctx=null}load(e,t,n){this.loadElements(e,t,n),this._invalidate()}_rescale(e){let{canvas:t,size:n}=this;t.width=n.width*e,t.height=n.height*e,this.ctx.scale(e,e)}_devicePixelRatio(){return typeof window.devicePixelRatio==`number`?window.devicePixelRatio:1}_invalidate(e){if(!this.ctx)return;let t=e&&e.fixedScale?1:this._devicePixelRatio();this._rescale(t),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},Yw=class extends Vy{constructor(){super(),this.shapes=[]}_add(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this}pointShapes(e){let t=this.shapes,n=t.length,r=[];for(let i=0;i<n;i++)t[i].bbox.containsPoint(e)&&r.push(t[i].shape);return r}insert(e,t){this._add(e,t)}remove(e){let t=this.shapes,n=t.length;for(let r=0;r<n;r++)if(t[r].shape===e){t.splice(r,1);break}}},Xw=class e extends Yw{constructor(e){super(),this.children=[],this.rect=e}inBounds(e){let t=this.rect,n=t.bottomRight(),r=e.bottomRight();return t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&r.x<=n.x&&r.y<=n.y}pointShapes(e){let t=this.children,n=t.length,r=super.pointShapes(e);for(let i=0;i<n;i++)Ab(r,t[i].pointShapes(e));return r}insert(e,t){let n=this.children,r=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{n.length||this._initChildren();for(let i=0;i<n.length;i++)if(n[i].insert(e,t)){r=!0;break}r||this._add(e,t)}r=!0}return r}_initChildren(){let{rect:t,children:n}=this,r=t.center(),i=t.width()/2,a=t.height()/2;n.push(new e(new Zx([t.origin.x,t.origin.y],[i,a])),new e(new Zx([r.x,t.origin.y],[i,a])),new e(new Zx([t.origin.x,r.y],[i,a])),new e(new Zx([r.x,r.y],[i,a])))}};let Zw=3e3,Qw=BigInt(1e4);var $w=class extends Vy{constructor(){super(),this.initRoots()}initRoots(){this.rootMap={},this.root=new Yw,this.rootElements=[]}clear(){let e=this.rootElements;for(let t=0;t<e.length;t++)this.remove(e[t]);this.initRoots()}pointShape(e){let t=(this.rootMap[Math.floor(e.x/Zw)]||{})[Math.floor(e.y/Zw)],n=this.root.pointShapes(e);t&&(n=n.concat(t.pointShapes(e)));let r=rT(n);this.assignZindex(n,r),n.sort(eT);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e))return n[t]}assignZindex(e,t){let n=nT(Qw,BigInt(t)),r=[],i=BigInt(0);for(let t=0;t<e.length;t++){let a=e[t],o=i,s=n,c=[];for(;a;)c.push(a),a=a.parent;for(;c.length;)a=c.pop(),o+=BigInt((a.parent?a.parent.children:this.rootElements).indexOf(a)+1)*s,s/=Qw;e[t]._zIndex=o,r.push(o)}r.sort(tT);for(let t=0;t<e.length;t++)e[t]._zIndex=r.indexOf(e[t]._zIndex)}optionsChange(e){(e.field===`transform`||e.field===`stroke.width`)&&this.bboxChange(e.element)}geometryChange(e){this.bboxChange(e.element)}bboxChange(e){if(e.nodeType===`Group`)for(let t=0;t<e.children.length;t++)this.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)}add(e){let t=Array.isArray(e)?e.slice(0):[e];Ab(this.rootElements,t),this._insert(t)}childrenChange(e){if(e.action===`remove`)for(let t=0;t<e.items.length;t++)this.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0))}_insert(e){let t;for(;e.length>0;)t=e.pop(),t.addObserver(this),t.nodeType===`Group`?Ab(e,t.children):this._insertShape(t)}_insertShape(e){let t=e.bbox();if(t){let n=this.getSectors(t),r=n[0][0],i=n[1][0];if(this.inRoot(n))this.root.insert(e,t);else{let n=this.rootMap;n[r]||(n[r]={}),n[r][i]||(n[r][i]=new Xw(new Zx([r*Zw,i*Zw],[Zw,Zw]))),n[r][i].insert(e,t)}}}remove(e){if(e.removeObserver(this),e.nodeType===`Group`){let t=e.children;for(let e=0;e<t.length;e++)this.remove(t[e])}else e._quadNode&&(e._quadNode.remove(e),delete e._quadNode)}inRoot(e){return e[0].length>1||e[1].length>1}getSectors(e){let t=e.bottomRight(),n=Math.floor(t.x/Zw),r=Math.floor(t.y/Zw),i=[[],[]];for(let t=Math.floor(e.origin.x/Zw);t<=n;t++)i[0].push(t);for(let t=Math.floor(e.origin.y/Zw);t<=r;t++)i[1].push(t);return i}};function eT(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function tT(e,t){return e<t?-1:+(e>t)}function nT(e,t){let n=e,r=t,i=BigInt(1),a=i;for(;r;)r&i&&(a*=n),r>>=i,r&&(n*=n);return a}function rT(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=[];for(;r;)i.push(r),r=r.parent;t=Math.max(t,i.length)}return t+1}var iT=class{constructor(e){e.bind(`mouseenter`,this._mouseenter.bind(this)),e.bind(`mouseleave`,this._mouseleave.bind(this)),this.element=e.element}clear(){this._resetCursor()}destroy(){this._resetCursor(),delete this.element}_mouseenter(e){let t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()}_mouseleave(){this._resetCursor()}_shapeCursor(e){let t=e.element;for(;t&&t.options.cursor===void 0;)t=t.parent;if(t)return t.options.cursor}_getCursor(){if(this.element)return this.element.style.cursor}_setCursor(e){this.element&&(this.element.style.cursor=e,this._current=e)}_resetCursor(){this._current&&(this._setCursor(this._defaultCursor||``),delete this._current)}};function aT(e,t){let n=t.segments;if(n.length===0)return;let r=n[0],i=r.anchor();e.moveTo(i.x,i.y);for(let t=1;t<n.length;t++){r=n[t],i=r.anchor();let a=n[t-1].controlOut(),o=r.controlIn();a&&o?e.bezierCurveTo(a.x,a.y,o.x,o.y,i.x,i.y):e.lineTo(i.x,i.y)}t.options.closed&&e.closePath()}function oT(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=vb(r.color());i.a*=r.opacity(),e.addColorStop(r.offset(),i.toCssRgba())}}var sT=class extends Kw{renderTo(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()}setFill(e){let t=this.srcElement.options.fill,n=!1;return t&&(t.nodeType===`Gradient`?(this.setGradientFill(e,t),n=!0):t.nodeType===`Pattern`?(this.setPatternFill(e,t),n=!0):Jb(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n}setGradientFill(e,t){let n=this.srcElement.rawBBox(),r;if(t instanceof LC){let n=t.start(),i=t.end();r=e.createLinearGradient(n.x,n.y,i.x,i.y)}else if(t instanceof RC){let n=t.center();r=e.createRadialGradient(n.x,n.y,0,n.x,n.y,t.radius())}oT(r,t.stops),e.save(),t.userSpace()||e.transform(n.width(),0,0,n.height(),n.origin.x,n.origin.y),e.fillStyle=r,e.fill(),e.restore()}setPatternFill(e,t){let n=t.size(),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.getWidth(),r.height=n.getHeight(),this.childNodes.length=0,this.loadElements(t.children);let a=this.childNodes;for(let e=0;e<a.length;e++)a[e].renderTo(i);e.save(),e.fillStyle=e.createPattern(r,`repeat`),e.fill(),e.restore()}setStroke(e){let t=this.srcElement.options.stroke;if(t&&!Jb(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=nx(t.width,1),e.lineJoin=nx(t.lineJoin,e.lineJoin),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0}dashType(){let e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()}setLineDash(e){let t=this.dashType();if(t&&t!==`solid`){let n=eS[t];e.setLineDash?e.setLineDash(n):(e.mozDash=n,e.webkitLineDash=n)}}setLineCap(e){let t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==`solid`?e.lineCap=tS:n&&n.lineCap&&(e.lineCap=n.lineCap)}setLineJoin(e){let t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)}renderPoints(e,t){aT(e,t)}},cT=class extends sT{renderPoints(e){aT(e,this.srcElement.toPath())}},lT=class extends sT{renderPoints(e){let{center:t,radius:n}=this.srcElement.geometry();e.arc(t.x,t.y,n,0,Math.PI*2)}},uT=class extends sT{constructor(e,t){super(e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Nb();let n=this.img=new Image,r=e.src();t&&!/^data:/i.test(r)&&(n.crossOrigin=t),r&&(n.src=r),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)}renderTo(e){this.loading.state()===`resolved`&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())}optionsChange(e){e.field===`src`?(this.loading=Nb(),this.img.src=this.srcElement.src()):super.optionsChange(e)}onLoad(){this.loading.resolve(),this.invalidate()}onError(){this.loading.reject(Error(`Unable to load image '`+this.img.src+`'. Check for connectivity and verify CORS headers.`))}drawImage(e){let t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}},dT=class extends sT{renderPoints(e){let t=this.srcElement.paths;for(let n=0;n<t.length;n++)aT(e,t[n])}},fT=class extends sT{renderPoints(e){let t=this.srcElement.geometry(),[n,r]=t.cornerRadius;if(n===0&&r===0){let{origin:n,size:r}=t;e.rect(n.x,n.y,r.width,r.height)}else super.renderPoints(e,gC.fromRect(t))}},pT=class extends sT{renderTo(e){let t=this.srcElement,n=t.position(),r=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign=`left`,t.options.paintOrder===`stroke`?(this.stroke(e,t,n,r),this.fill(e,t,n,r)):(this.fill(e,t,n,r),this.stroke(e,t,n,r)),e.restore()}stroke(e,t,n,r){this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+r.baseline))}fill(e,t,n,r){this.setFill(e)&&e.fillText(t.content(),n.x,n.y+r.baseline)}};Gw.Arc=cT,Gw.Circle=lT,Gw.Group=qw,Gw.Image=uT,Gw.MultiPath=dT,Gw.Path=sT,Gw.Rect=fT,Gw.Text=pT;var mT=class extends uw{get type(){return`canvas`}constructor(e,t){super(e,t),Jx(this.element,this._template(this));let n=this.element.firstElementChild;n.style.width=`100%`,n.style.height=`100%`;let r=sx(e);n.width=r.width,n.height=r.height,this._rootElement=n,this._root=new Jw(n,r),this._mouseTrackHandler=this._trackMouse.bind(this),rx(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}destroy(){super.destroy(),this._root&&=(this._root.destroy(),null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),cx(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler}),this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null}draw(e){super.draw(e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])}clear(){super.clear(),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()}eventTarget(e){if(this._searchTree){let t=this._surfacePoint(e);return this._searchTree.pointShape(t)}}image(){let{_root:e,_rootElement:t}=this,n=[];e.traverse(e=>{e.loading&&n.push(e.loading)});let r=Nb(),i=()=>{e._invalidate({fixedScale:!0});try{let e=t.toDataURL();r.resolve(e)}catch(e){r.reject(e)}};return Qb(n).then(i,i),r}suspendTracking(){super.suspendTracking(),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)}resumeTracking(){if(super.resumeTracking(),!this._searchTree){this._searchTree=new $w;let e=this._root.childNodes,t=[];for(let n=0;n<e.length;n++)t.push(e[n].srcElement);this._searchTree.add(t)}}_resize(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()}_template(){return`<canvas></canvas>`}_enableTracking(){this._searchTree=new $w,this._cursor=new iT(this),super._enableTracking()}_trackMouse(e){if(this._suspendedTracking)return;let t=this.eventTarget(e);if(e.type!==`click`){let n=this._currentShape;n&&n!==t&&this.trigger(`mouseleave`,{element:n,originalEvent:e,type:`mouseleave`}),t&&n!==t&&this.trigger(`mouseenter`,{element:t,originalEvent:e,type:`mouseenter`}),this.trigger(`mousemove`,{element:t,originalEvent:e,type:`mousemove`}),this._currentShape=t}else t&&this.trigger(`click`,{element:t,originalEvent:e,type:`click`})}};let hT,gT,_T=()=>typeof document<`u`,vT=()=>_T()&&document.createElement(`canvas`).getContext,yT=()=>_T()&&document.implementation.hasFeature(`http://www.w3.org/TR/SVG11/feature#BasicStructure`,`1.1`);var bT=class e extends Vy{static get support(){return gT||={canvas:vT(),svg:yT()},gT}static get current(){return hT||=new e,hT}constructor(){super(),this._items=[{name:`svg`,type:Ww},{name:`canvas`,type:mT}]}create(e,t){let n=this._items,r=n[0];if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name===e){r=n[t];break}}if(r)return new r.type(e,t);tb(`Warning: Unable to create Kendo UI Drawing Surface. Possible causes:
66
+ </div>`).appendTo(a)),r._today=o.show().find(`.k-button-flat.k-button-primary`).attr(`title`,n.toString(i,`D`,r.options.culture)),o.find(`.k-button-text`).html(t(i)),r._toggle()},_header:function(){var t=this,r=t.element,i=t.options.linksSelector;r.find(K)[0]||r.html(n.template(t.options.header.template)(e.extend(!0,{},t.options,{actionAttr:n.attr(`action`),size:n.getValidCssClass(`k-button-`,`size`,t.options.size),isRtl:t.isRtl()}))),r.find(i).on(`click.kendoCalendar touchend.kendoCalendar`,function(){return!1}),t._title=r.find(`[`+n.attr(`action`)+`="nav-up"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[B]=r.find(`[`+n.attr(`action`)+`="prev"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[V]=r.find(`[`+n.attr(`action`)+`="next"]`).on(`click.kendoCalendar touchend.kendoCalendar`,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()}),r.find(`[`+n.attr(`action`)+`="today"]`).on(`click.kendoCalendar touchend.kendoCalendar`,t._todayClick.bind(t))},_navigate:function(e,t){var n=this,r=n._index+1,i=new W(+n._current);n._isMultipleSelection()&&(i=Ce(n._table.find(`td:not(.k-other-month):not(.k-empty)`).has(`.k-link`).first().find(`span`)),n._current=new Date(+i)),e=n[e],e.hasClass(k)||(r>3?i.setFullYear(i.getFullYear()+100*t):q.views[r].setDate(i,t),n.navigate(i),n._restoreSelection())},_option:function(e,n){var r=this,i=r.options,a=r._value||r._current,o;if(n===t)return i[e];n=s(n,i.format,i.culture),n&&(i[e]=new W(+n),o=e===`min`?n>a:a>n,(o||ve(a,n))&&(o&&(r._value=null),r._changeView=!0),r._changeView||=!!(i.month.content||i.month.empty),r.navigate(r._value),r._toggle())},_toggle:function(e){var n=this,r=n.options,i=n.options.disableDates(oe()),a=n._today,o=n._todayClass();e===t&&(e=Y(oe(),r.min,r.max)),a&&(a.off(S),e&&!i?a.addClass(o).removeClass(k).on(S,n._todayClick.bind(n)):a.removeClass(o).addClass(k).on(S,fe))},_todayClass:function(){return`k-calendar-nav-today`},_todayClick:function(e){var t=this,n=G[t.options.depth],r=t.options.disableDates,i=oe();e.preventDefault(),!r(i)&&(t._view.compare(t._current,i)===0&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[i],t.selectable._lastActive=null),t._value=i,t.navigate(i,n),t.trigger(E))},_templates:function(){var e=this,t=e.options,r=t.footer,i=t.month,a=i.content,o=i.weekNumber,s=i.empty,c=e=>`${n.toString(e,`D`,t.culture)}`;e.month={content:e=>`<td class="${e.cssClass}" role="gridcell"${e.ariaDisabled?` aria-disabled="true"`:``}><span tabindex="-1" class="k-link ${e.linkClass}" data-href="${e.url}" ${n.attr(O)}="${e.dateString}" title="${e.title}">${we(a,e)||e.value}</span></td>`,empty:e=>`<td role="gridcell">${we(s,e)||`&nbsp;`}</td>`,weekNumber:e=>`<td class="k-calendar-td k-alt">${we(o,e)||e.weekNumber}</td>`},e.year={content:m(e=>`<td class="${e.cssClass}" role="gridcell"><span tabindex="-1" class="k-link" data-href="#" data-${e.ns}value="${e.dateString}" aria-label="${e.label}">${e.value}</span></td>`)},r&&r!==!0&&(c=r),e.footer=r===!1?null:m(c,{useWithBlock:!1})},_updateAria:function(e,t){var r=this,i=r._cell,a=r.view().valueType(),o=t||r.current(),s=a===`month`?n.toString(o,`MMMM`):a===`date`?n.toString(o,`D`):i.text();return i.attr(`aria-label`,e({current:o,valueType:a,text:s})),i.attr(`id`)}});i.plugin(re);var q={firstDayOfMonth:function(e){return pe(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t||=n.culture().calendar;var r=t.firstDay,i=new W(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=r;)q.setTime(i,-1*ee);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),r=new W(e.getTime()+t),i=r.getTimezoneOffset()-n;e.setTime(r.getTime()+i*6e4)},views:[{name:w,title:function(e,t,n,r){return me(r).months.names[e.getMonth()]+` `+e.getFullYear()},content:function(e){var r=this,i=0,a=e.min,o=e.max,s=e.date,d=e.dates,f=e.format,p=e.culture,m=e.url,h=e.showHeader,g=e.showOtherMonthDays,_=e.isWeekColumnVisible,v=m&&d[0],y=me(p),b=y.firstDay,x=y.days,S=ce(x.names,b),C=ce(x.namesShort,b),w=q.firstVisibleDay(s,y),T=r.first(s),E=r.last(s),D=r.toDateString,O=oe(),A=`<table tabindex="0" role="grid" class="`+e.contentClasses+`" cellspacing="0" data-start="`+D(w)+`">`;for(h&&(A+=`<caption class="k-calendar-caption k-month-header">`+this.title(s,a,o,p)+`</caption>`),A+=`<thead class="k-calendar-thead" role="rowgroup"><tr role="row" class="k-calendar-tr">`,_&&(A+=`<th scope="col" role="columnheader" class="k-calendar-th k-alt" aria-label="`+c(e.messages.weekColumnHeader||``)+`">`+c(e.messages.weekColumnHeader)+`</th>`);i<7;i++)A+=`<th scope="col" role="columnheader" class="k-calendar-th" aria-label="`+S[i]+`">`+C[i]+`</th>`;return l(O,0),O=+O,J({cells:42,perRow:7,html:A+=`</tr></thead><tbody class="k-calendar-tbody" role="rowgroup"><tr role="row" class="k-calendar-tr">`,start:pe(w.getFullYear(),w.getMonth(),w.getDate()),isWeekColumnVisible:_,weekNumber:e.weekNumber,min:pe(a.getFullYear(),a.getMonth(),a.getDate()),max:pe(o.getFullYear(),o.getMonth(),o.getDate()),showOtherMonthDays:g,content:e.content,lastDayOfMonth:E,empty:e.empty,setter:r.setDate,disableDates:e.disableDates,build:function(e,r,i){var a=[`k-calendar-td`],o=e.getDay(),s=``,c=`#`;(e<T||e>E)&&a.push(j);var l=i(e);return l&&a.push(k),+e===O&&a.push(`k-today`),(o===0||o===6)&&a.push(`k-weekend`),v&&ge(+e,d)&&(c=m.replace(`{0}`,n.toString(e,f,p)),s=` k-action-link`),{date:e,dates:d,ns:n.ns,title:n.toString(e,`D`,p),value:e.getDate(),dateString:D(e),cssClass:a.join(` `),linkClass:s,url:c,ariaDisabled:l||t}},weekNumberBuild:function(e){return{weekNumber:u(e,n.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return q.firstDayOfMonth(e)},last:function(e){var t=pe(e.getFullYear(),e.getMonth()+1,0),n=q.firstDayOfMonth(e),r=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return r&&t.setHours(n.getHours()+r/60),t},compare:function(e,t){var n,r=e.getMonth(),i=e.getFullYear(),a=t.getMonth(),o=t.getFullYear();return n=i>o?1:i<o?-1:r==a?0:r>a?1:-1,n},setDate:function(e,t){var n=e.getHours();t instanceof W?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):q.setTime(e,t*ee),l(e,n)},toDateString:function(e){return e.getFullYear()+`/`+e.getMonth()+`/`+e.getDate()},valueType:function(){return`date`}},{name:`year`,title:function(e){return e.getFullYear()},content:function(e){var t=me(e.culture).months,r=t.namesAbbr,i=t.names,a=this.toDateString,o=e.min,s=e.max,c=``;return e.showHeader&&(c+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,c+=`<caption class="k-calendar-caption k-meta-header">`,c+=this.title(e.date),c+=`</caption>`,c+=`<tbody class="k-calendar-tbody" role="rowgroup">`,c+=`<tr role="row" class="k-calendar-tr">`),J({min:pe(o.getFullYear(),o.getMonth(),1),max:pe(s.getFullYear(),s.getMonth(),1),start:pe(e.date.getFullYear(),0,1),html:c,setter:this.setDate,content:e.content,build:function(e){var t=[`k-calendar-td`],o=oe();return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&t.push(`k-today`),{value:r[e.getMonth()],label:i[e.getMonth()],ns:n.ns,dateString:a(e),cssClass:t.join(` `)}}})},first:function(e){return pe(e.getFullYear(),0,e.getDate())},last:function(e){return pe(e.getFullYear(),11,e.getDate())},compare:function(e,t){return ae(e,t)},setDate:function(e,t){var n,r=e.getHours();t instanceof W?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),l(e,r)},toDateString:function(e){return e.getFullYear()+`/`+e.getMonth()+`/1`},valueType:function(){return`month`}},{name:`decade`,title:function(e,t,n){return ie(e,t,n,10)},content:function(e){var t=e.date.getFullYear(),r=this.toDateString,i=``;return e.showHeader&&(i+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,i+=`<caption class="k-meta-header">`,i+=this.title(e.date,e.min,e.max),i+=`</caption>`,i+=`<tbody class="k-calendar-thead">`,i+=`<tr role="row" class="k-calendar-tr">`),J({start:pe(t-t%10,0,1),min:pe(e.min.getFullYear(),0,1),max:pe(e.max.getFullYear(),0,1),showOtherMonthDays:e.showOtherMonthDays,html:i,setter:this.setDate,build:function(e,t){var i=[`k-calendar-td`],a=oe().getFullYear();return t===10||t===11?i.push(M):e.getFullYear()===a&&i.push(`k-today`),{value:e.getFullYear(),ns:n.ns,dateString:r(e),cssClass:i.join(` `)}}})},first:function(e){var t=e.getFullYear();return pe(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return pe(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return ae(e,t,10)},setDate:function(e,t){le(e,t,1)},toDateString:function(e){return e.getFullYear()+`/0/1`},valueType:function(){return`year`}},{name:T,title:function(e,t,n){return ie(e,t,n,100)},content:function(e){var t=e.date.getFullYear(),r=e.min.getFullYear(),i=e.max.getFullYear(),a=this.toDateString,o=r,s=i,c=``;o-=o%10,s-=s%10,s-o<10&&(s=o+9),e.showHeader&&(c+=`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0">`,c+=`<caption class="k-calendar-caption k-meta-header">`,c+=this.title(e.date,e.min,e.max),c+=`</caption>`,c+=`<tbody class="k-calendar-tbody">`,c+=`<tr role="row" class="k-calendar-tr">`);var l=oe().getFullYear()-oe().getFullYear()%10;return J({start:pe(t-t%100,0,1),min:pe(o,0,1),max:pe(s,0,1),showOtherMonthDays:e.showOtherMonthDays,html:c,setter:this.setDate,build:function(t,o){var s=[`k-calendar-td`],c=t.getFullYear(),u=c+9;return o===10||o===11?s.push(M):c<=l&&u>=l&&s.push(`k-today`),c<r&&(c=r),u>i&&(u=i),{ns:n.ns,value:e.centuryCellsFormat===`long`?`${c} - ${u}`:c,dateString:a(t),cssClass:s.join(` `)}}})},first:function(e){var t=e.getFullYear();return pe(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return pe(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return ae(e,t,100)},setDate:function(e,t){le(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+`/0/1`},valueType:function(){return`decade`}}]};function ie(e,t,n,r){var i=e.getFullYear(),a=t.getFullYear(),o=n.getFullYear(),s;return i-=i%r,s=i+(r-1),i<a&&(i=a),s>o&&(s=o),i+`-`+s}function J(e){var t=0,n,r=e.min,i=e.max,a=e.start,o=e.setter,s=e.build,c=e.weekNumberBuild,u=e.cells||12,d=e.isWeekColumnVisible,f=e.perRow||4,p=e.showOtherMonthDays,m=e.lastDayOfMonth,h=e.weekNumber||y,b=e.content||g,x=e.empty||_,S=e.otherMonthCellTemplate||v,C=e.html||`<table tabindex="0" role="grid" class="k-calendar-table" cellspacing="0"><tbody class="k-calendar-tbody" role="rowgroup"><tr role="row" class="k-calendar-tr">`;for(d&&(C+=h(c(a)));t<u;t++)t>0&&t%f===0&&(C+=`</tr><tr role="row" class="k-calendar-tr">`,d&&(C+=p||+a<=+m?h(c(a)):h({weekNumber:`&nbsp;`}))),a=pe(a.getFullYear(),a.getMonth(),a.getDate()),l(a,0),n=s(a,t,e.disableDates),n.cssClass.indexOf(j)!==-1&&!p?C+=S(n):Y(a,r,i)&&n.cssClass.indexOf(M)===-1?C+=b(n):C+=x(n),o(a,1);return C+`</tr></tbody></table>`}function ae(e,t,n){var r=e.getFullYear(),i=t.getFullYear(),a=i,o=0;return n&&(i-=i%n,a=i-i%n+n-1),r>a?o=1:r<i&&(o=-1),o}function oe(){var e=new W;return new W(e.getFullYear(),e.getMonth(),e.getDate())}function se(e,t,n){var r=oe();return e&&(r=new W(+e)),t>r?r=new W(+t):n<r&&(r=new W(+n)),r}function Y(e,t,n){return+e>=+t&&+e<=+n}function ce(e,t){return e.slice(t).concat(e.slice(0,t))}function le(e,t,n){t=t instanceof W?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function ue(e,t){if(+t<+e){var r=+e;q.views[0].setDate(e,t),q.views[0].setDate(t,new Date(r))}var i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil((a-+i)/n.date.MS_PER_DAY)}function X(e,t,n,r){for(var i=0;i<=t;i++){var a=new Date(n.getTime());a=new Date(a.setDate(a.getDate()+i)),r(a)||e.push(a)}}function de(t){e(this).hasClass(`k-disabled`)||e(this).toggleClass(`k-hover`,L.indexOf(t.type)>-1||t.type==`focus`)}function fe(e){e.preventDefault()}function pe(e,t,n){var r=new W(e,t,n);return r.setFullYear(e,t,n),r}function me(e){return h(e).calendars.standard}function he(e){var n=G[e.start],r=G[e.depth],i=h(e.culture);e.format=p(e.format||i.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=w),(r===t||r>n)&&(e.depth=w),e.dates===null&&(e.dates=[])}function ge(e,t){for(var n=0,r=t.length;n<r;n++)if(e===+t[n])return!0;return!1}function _e(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function ve(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}function ye(t){return n.isFunction(t)?t:Array.isArray(t)?xe(t):e.noop}function be(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].setHours(0,0,0,0));return t}function xe(e){var t,n=[],r=[`su`,`mo`,`tu`,`we`,`th`,`fr`,`sa`];return e[0]instanceof W?(n=be(e),t=e=>!!(e&&n.indexOf(new Date(e).setHours(0,0,0,0))>-1)):(n=e.map(e=>{e=e.slice(0,2).toLowerCase();let t=r.indexOf(e);if(t>-1)return t}),t=e=>!!(e&&n.indexOf(new Date(e).getDay())>-1)),t}function Se(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function Ce(t){var r=e(t).attr(n.attr(O)).split(`/`);return r=pe(r[0],r[1],r[2]),r}function we(e,r){return e?n.isFunction(e)?e(r):m(e)(r):t}q.isEqualDatePart=_e,q.isEqualDate=Se,q.restrictValue=se,q.isInRange=Y,q.normalize=he,q.viewsEnum=G,q.disabled=ye,q.toDateObject=Ce,q.getToday=oe,q.createDate=pe,n.calendar=q})(window.kendo.jQuery),kendo;let jv=e=>e?new Date(e.getTime()):null,Mv=(e,t)=>{let n=jv(e);return t===0&&n.getHours()===23&&n.setHours(n.getHours()+2),n},Nv=(e,t)=>{let n=jv(e);return n.setDate(n.getDate()+t),Mv(n,e.getHours())},Pv=(e,t,n,r=0,i=0,a=0,o=0)=>{let s=new Date(e,t,n,r,i,a,o);return e>-1&&e<100&&s.setFullYear(s.getFullYear()-1900),Mv(s,r)},Fv=e=>{let t=Pv(e.getFullYear(),e.getMonth()+1,1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return Nv(t,-1)},Iv=(e,t)=>e.getMonth()===t?e:Fv(Lv(e,-1)),Lv=(e,t)=>{let n=jv(e),r=(12+(n.getMonth()+t)%12)%12;return n.setMonth(n.getMonth()+t),Iv(Mv(n,e.getHours()),r)};var Rv;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Rv||={});var zv;(function(e){e[e.Sunday=0]=`Sunday`,e[e.Monday=1]=`Monday`,e[e.Tuesday=2]=`Tuesday`,e[e.Wednesday=3]=`Wednesday`,e[e.Thursday=4]=`Thursday`,e[e.Friday=5]=`Friday`,e[e.Saturday=6]=`Saturday`})(zv||={});let Bv=e=>Pv(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),Vv=(e,t)=>!e&&!t||e&&t&&e.getTime()===t.getTime();new Date().getTime();var Hv=class{constructor(){this.symbols=``,this.partMap=[]}};let Uv={formatSeparator:`_`,twoDigitYearMax:68,defaultDateFormat:`d`,defaultLocaleId:`en`},Wv={DELETE:`Delete`,BACKSPACE:`Backspace`,TAB:`Tab`,ENTER:`Enter`,ESCAPE:`Escape`,ARROW_LEFT:`ArrowLeft`,ARROW_UP:`ArrowUp`,ARROW_RIGHT:`ArrowRight`,ARROW_DOWN:`ArrowDown`,SPACE:` `,END:`End`,HOME:`Home`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`},Gv=e=>Array(Math.max(e,0)).fill(`0`).join(``),Kv=e=>e.replace(/^0*/,``),qv=({oldText:e,newText:t,formatPattern:n,selectionStart:r,isInCaretMode:i,keyEvent:a})=>{let o=r+e.length-t.length,s=e[o],c=e.substring(0,o),l=t.substring(0,r),u=[];if(c===l&&r>0)return u.push([n[r-1],l[r-1]]),u;if(c.indexOf(l)===0&&i&&(a.key===Wv.DELETE||a.key===Wv.BACKSPACE)||c.indexOf(l)===0&&!i&&(l.length===0||n[l.length-1]!==n[l.length])){let e=``;!i&&l.length===1&&u.push([n[0],l[0]]);for(let t=l.length;t<c.length;t++)n[t]!==e&&n[t]!==Uv.formatSeparator&&(e=n[t],u.push([e,``]));return u}if(i&&(l.indexOf(c)===0||n[r-1]===Uv.formatSeparator)||!i&&(l.indexOf(c)===0||n[r-1]===Uv.formatSeparator)){let e=n[0];for(let t=Math.max(0,c.length-1);t<n.length;t++)if(n[t]!==Uv.formatSeparator){e=n[t];break}return[[e,l[r-1]]]}return l[l.length-1]===` `||l[l.length-1]===s&&n[o]===`_`?[[n[r-1],Uv.formatSeparator]]:[[n[r-1],l[r-1]]]},Jv=(e,t)=>(e[t.pattern[0]]=t.type,e),Yv=e=>e&&typeof e==`object`&&!Array.isArray(e),Xv=e=>e instanceof HTMLElement,Zv=e=>(t,n)=>{let r=jv(t);return r[e](n),r},Qv=e=>e!=null,$v=()=>!!document,ey=e=>Qv(e)&&typeof e==`number`&&!Number.isNaN(e),ty=e=>parseInt(e,10),ny=e=>ey(ty(e))&&/^[0-9]+$/.test(e),ry=(e,t,n)=>Math.min(n,Math.max(t,e)),iy=(...e)=>Object.assign(...e),ay=(e,...t)=>{if(!t.length)return e;let n=t.shift();if(Yv(e)&&Yv(n))for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||t===`__proto__`||t===`constructor`||t===`prototype`||(Xv(n[t])?e[t]=n[t]:Yv(n[t])&&!(n[t]instanceof Date)?((!e[t]||!Yv(e[t]))&&iy(e,{[t]:{}}),ay(e[t],n[t])):iy(e,{[t]:n[t]}));return ay(e,...t)},oy=e=>typeof e==`function`,sy=e=>!Qv(e)||isNaN(e.getTime())?0:Number(e.getFullYear().toString().slice(-2)),cy=Zv(`setFullYear`),ly=e=>{let t=e&&e.match(/S+(\1)/);return t?t[0].length:0},uy=e=>10**(3-e),dy=(e,t,n,r,i,a,o,s)=>!!(e&&e.getFullYear()===t&&e.getMonth()===n&&e.getDate()===r&&e.getHours()===i&&e.getMinutes()===a&&e.getSeconds()===o&&e.getMilliseconds()===s),fy=e=>Qv(e)&&e.getTime&&ey(e.getTime()),py=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Macintosh/i.test(navigator.userAgent),my=2e3,hy=/d|M|H|h|m|s/;var gy=class{set value(e){e&&!(e instanceof Date)||(this._value=e,this.resetInvalidDate())}get value(){return this._value}get localeId(){let e=Uv.defaultLocaleId,t=Object.keys(this.intl.cldr);for(let n=0;n<t.length;n++){let r=t[n],i=this.intl.cldr[r];if(i.name&&i.calendar&&i.numbers&&i.name!==Uv.defaultLocaleId){e=i.name;break}}return e}constructor({intlService:e,formatPlaceholder:t,format:n,cycleTime:r=!1,twoDigitYearMax:i=Uv.twoDigitYearMax,value:a=null,autoCorrectParts:o=!0,toggleDayPeriod:s=!1,autoSwitchParts:c=!0}){if(this.year=!0,this.month=!0,this.date=!0,this.hours=!0,this.minutes=!0,this.seconds=!0,this.milliseconds=!0,this.dayperiod=!0,this.leadingZero=null,this.typedMonthPart=``,this.knownParts=`adHhmMsEyS`,this.symbols={E:`E`,H:`H`,M:`M`,a:`a`,d:`d`,h:`h`,m:`m`,s:`s`,y:`y`,S:`S`},this._value=this.getDefaultDate(),this.cycleTime=!1,this._partiallyInvalidDate={startDate:null,invalidDateParts:{E:{value:null,date:null,startDateOffset:0},H:{value:null,date:null,startDateOffset:0},M:{value:null,date:null,startDateOffset:0},a:{value:null,date:null,startDateOffset:0},d:{value:null,date:null,startDateOffset:0},h:{value:null,date:null,startDateOffset:0},m:{value:null,date:null,startDateOffset:0},s:{value:null,date:null,startDateOffset:0},y:{value:null,date:null,startDateOffset:0},S:{value:null,date:null,startDateOffset:0}}},this.setOptions({intlService:e,formatPlaceholder:t,format:n,cycleTime:r,twoDigitYearMax:i,value:a,autoCorrectParts:o,toggleDayPeriod:s,autoSwitchParts:c}),a)this._value=jv(a);else{this._value=this.getDefaultDate();let e=this.dateFormatString(this.value,this.format).symbols;for(let t=0;t<e.length;t++)this.setExisting(e[t],!1)}}setOptions(e){this.intl=e.intlService,this.formatPlaceholder=e.formatPlaceholder||`wide`,this.format=e.format,this.cycleTime=e.cycleTime,this.monthNames=this.allFormattedMonths(this.localeId),this.dayPeriods=this.allDayPeriods(this.localeId),this.twoDigitYearMax=e.twoDigitYearMax,this.autoCorrectParts=e.autoCorrectParts,this.toggleDayPeriod=e.toggleDayPeriod,this.autoSwitchParts=e.autoSwitchParts}setValue(e){e?Vv(e,this._value)?Vv(e,this._value)&&this.dayPeriods&&this.setExisting(`a`,!0):(this._value=jv(e),this.modifyExisting(!0)):(this._value=this.getDefaultDate(),this.modifyExisting(!1)),this.resetInvalidDate()}hasValue(){return this.intl.splitDateFormat(this.format,this.localeId).reduce((e,t)=>e||t.type!==`literal`&&t.type!==`dayperiod`&&this.getExisting(t.pattern[0]),!1)}getValue(){for(let e=0;e<this.knownParts.length;e++)if(!this.getExisting(this.knownParts[e]))return null;return jv(this.value)}createDefaultDate(){return Pv(my,0,31)}getDefaultDate(){return Bv(this.createDefaultDate())}getFormattedDate(e){return this.intl.formatDate(this.getValue(),e,this.localeId)}getTextAndFormat(e=``){let t=e||this.format,n=this.intl.formatDate(this.value,t,this.localeId),r=this.dateFormatString(this.value,t);if(!this.autoCorrectParts&&this._partiallyInvalidDate.startDate){let e=``,i=this.intl.formatDate(this.value,t,this.localeId),a=this.getFormattedInvalidDates(t);for(let t=0;t<i.length;t++){let i=r.symbols[t];if(r.partMap[t].type===`literal`)e+=n[t];else if(this.getInvalidDatePartValue(i)){let n=this.getPartsForSegment(r,t);if(i===`M`){let r=(ty(this.getInvalidDatePartValue(i))+1).toString();if(n.length>2)e+=a[i][t];else if(this.getInvalidDatePartValue(i)){let i=Gv(n.length-r.length)+r;e+=i,t+=n.length-1}else e+=a[i][t]}else if(this.getInvalidDatePartValue(i)){let r=this.getInvalidDatePartValue(i).toString(),a=Gv(n.length-r.length)+r;e+=a,t+=n.length-1}else e+=a[i][t]}else e+=n[t]}n=e}return this.merge(n,r)}getFormattedInvalidDates(e=``){let t=e||this.format,n={E:``,H:``,M:``,a:``,d:``,h:``,m:``,s:``,y:``,S:``};return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{let r=this.getInvalidDatePart(e).date;if(r){let i=this.intl.formatDate(r,t,this.localeId);n[e]=i}}),n}modifyExisting(e){let t=this.dateFormatString(this.value,this.format).symbols;for(let n=0;n<t.length;n++)this.setExisting(t[n],e)}getExisting(e){switch(e){case`y`:return this.year;case`M`:case`L`:return this.month;case`d`:return this.date;case`E`:return this.date&&this.month&&this.year;case`h`:case`H`:return this.hours;case`t`:case`a`:return this.dayperiod;case`m`:return this.minutes;case`s`:return this.seconds;case`S`:return this.milliseconds;default:return!0}}setExisting(e,t){switch(e){case`y`:this.year=t,t===!1&&this._value.setFullYear(my);break;case`M`:this.month=t,t===!1&&this.autoCorrectParts&&this._value.setMonth(0);break;case`d`:this.date=t;break;case`h`:case`H`:this.hours=t;break;case`t`:case`a`:this.dayperiod=t;break;case`m`:this.minutes=t;break;case`s`:this.seconds=t;break;case`S`:this.milliseconds=t;break;default:break}this.getValue()&&this.resetInvalidDate()}modifyPart(e,t){if(!Qv(e)||!Qv(t)||t===0)return;let n=jv(this.value),r=!1,i,a=e===`M`,o=e===`d`||e===`E`,s=this.getExisting(e);if(!this.autoCorrectParts&&(o||a)){let r=this._partiallyInvalidDate.invalidDateParts||{},c=this.getInvalidDatePartValue(e),l=r.y.value||n.getFullYear(),u=r.M.value||n.getMonth(),d=r.d.value||r.E.value||n.getDate(),f=r.h.value||r.H.value||n.getHours(),p=r.m.value||n.getMinutes(),m=r.s.value||n.getSeconds(),h=r.S.value||n.getMilliseconds();switch(e){case`y`:l+=t;break;case`M`:u+=t;break;case`d`:case`E`:d+=t;break;default:break}if(e===`M`){if((u<0||u>11)&&s){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}if(!s){if(u<0)u=ry(11+(u%11+1),0,11);else{let e=Qv(c)?u:(t-1)%12;u=ry(e,0,11)}u=ry(u,0,11)}u=ry(u,0,11)}else if(e===`d`){if(s){if(d<=0||d>31){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}}else if(!s){if(Qv(c)&&(d<=0||d>31)){this.setExisting(e,!1),this.resetInvalidDateSymbol(e);return}if(t<0){let e=Qv(c)?d:1+(31-Math.abs(t%31));d=ry(e,1,31)}else{let e=Qv(c)?d:t%31;d=ry(e,1,31)}d=ry(d,1,31)}}let g=Pv(l,u,d,f,p,m,h),_=a||o?this.modifyDateSymbolWithValue(n,e,a?u:d):null,v=dy(g,l,u,d,f,p,m,h);this.getValue()&&dy(g,l,u,d,f,p,m,h)?(n=jv(g),this.markDatePartsAsExisting()):a&&_?_.getMonth()===u?this.getExisting(`d`)?v?(n=jv(g),this.resetInvalidDateSymbol(e)):(i=!0,this.setInvalidDatePart(e,{value:u,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):v?(this.resetInvalidDateSymbol(e),n=jv(g),this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`))):(this.resetInvalidDateSymbol(e),n=jv(_)):(i=!0,this.setInvalidDatePart(e,{value:u,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):o&&_&&(_.getDate()===d?this.getExisting(`M`)?v?(n=jv(g),this.resetInvalidDateSymbol(e)):(i=!0,this.setInvalidDatePart(e,{value:d,date:jv(_),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)):v?(n=jv(g),this.resetInvalidDateSymbol(e),this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`))):(this.resetInvalidDateSymbol(e),n=jv(_)):(i=!0,this.setInvalidDatePart(e,{value:d,date:jv(this.value),startDateOffset:t,startDate:jv(this.value)}),this.setExisting(e,!1)))}else{let i=n.getHours();switch(e){case`y`:n.setFullYear(n.getFullYear()+t);break;case`M`:n=Lv(this.value,t);break;case`d`:case`E`:n.setDate(n.getDate()+t);break;case`h`:case`H`:n.setHours(n.getHours()+t),r=!0;break;case`m`:n.setMinutes(n.getMinutes()+t),r=!0;break;case`s`:n.setSeconds(n.getSeconds()+t),r=!0;break;case`S`:n.setMilliseconds(n.getMilliseconds()+t);break;case`a`:this.toggleDayPeriod?n.setHours(i>=12?i-12:i+12):n.setHours(n.getHours()+12*t),r=!0;break;default:break}}this.shouldNormalizeCentury()&&(n=this.normalizeCentury(n)),r&&!this.cycleTime&&(n.getDate(),this._value.getDate()),i||(this.setExisting(e,!0),this._value=n,this.getValue()&&this.resetInvalidDate())}parsePart({symbol:e,currentChar:t,resetSegmentValue:n,cycleSegmentValue:r,rawTextValue:i,isDeleting:a,originalFormat:o}){let s=!r,c=this.dateFormatString(this.value,this.format),l=c.partMap.filter(e=>e.type===`literal`).map((e,t)=>({datePartIndex:t,type:e.type,pattern:e.pattern,literal:``})),u=c.partMap.map(e=>({type:e.type,pattern:e.pattern,text:``}));for(let e=0;e<l.length;e++){let t=l[e];for(let n=0;n<t.pattern.length;n++)l[e+n]&&(l[e+n].literal=t.pattern[n]);e+=t.pattern.length-1}for(let e=0;e<u.length;e++){let t=u[e];for(let n=0;n<t.pattern.length;n++)u[e+n]&&(u[e+n].text=t.pattern[n]);e+=t.pattern.length-1}let d={value:null,switchToNext:!1,resetPart:s&&e===`M`&&c.partMap.filter(e=>e.type===`month`).some(e=>e.pattern.length>2),hasInvalidDatePart:!1};if(!t)if(s)for(let t=0;t<l.length;t++){let n=l[t].literal,r=i.startsWith(n),a=i.endsWith(n),o=i.indexOf(n+n)>=0;if(r||a||o)return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),iy(d,{value:null,switchToNext:!1})}else return this.resetLeadingZero(),this.setExisting(e,!1),this.resetInvalidDateSymbol(e),iy(d,{value:null,switchToNext:!1});let f=this.intl.formatDate(this.value,this.format,this.localeId),p=c.symbols,m=!1,h=``,g=``,_=``,v=``,y=``,b=``,x=``;for(let e=0;e<u.length;e++)x+=u[e].text;let S=this.format===p||this.format===x||this.format===o||this.format.length===o.length,C=(S?x:o).indexOf(e),w=(S?x:o).lastIndexOf(e)-C+1,T=o.length-i.length;if(s||!s&&!this.autoCorrectParts){let n=0;for(let t=0;t<f.length;t++)if(p[t]===e){let r=this.getExisting(e);if(e===`y`)if(!this.hasInvalidDatePart()&&this.getExisting(`y`))g+=f[t];else{let i=this.getInvalidDatePartValue(e);Qv(i)?(g+=(i||``).toString()[n]||``,n++):g+=r?f[t]:`0`}else g+=r?f[t]:`0`;T>0?_.length+T<w&&(_+=i[t]||``):_+=i[t]||``,m=!0}else m?(b+=f[t],y+=f[t]):(h+=f[t],v+=f[t]);if(S&&(x.length<i.length?_+=t:!a&&(o.length,i.length),this.autoCorrectParts&&_.length>w))return iy(d,{value:null,switchToNext:!1});if(!S||S&&!this.autoCorrectParts){g=``,_=``,h=``,b=``,m=!1;let n=x.indexOf(e),r=0,a=0;for(let t=0;t<o.length;t++)if(o[t]===e){let o=this.getExisting(e),s=n+r;if(e===`y`)if(!this.hasInvalidDatePart()&&this.getExisting(`y`))g+=f[s];else{let t=this.getInvalidDatePartValue(e);Qv(t)?(g+=(t||``).toString()[a]||``,a++):g+=o?f[s]:`0`}else g+=o?f[s]||``:`0`;r++,T>0?_.length+T<w&&(_+=i[t]||``):_+=i[t]||``,m=!0}else m?b+=i[t-T]||``:h+=i[t]||``;o.length<i.length&&(_+=t)}}if(!s)if(this.autoCorrectParts){g=``,_=``,h=``,b=``,m=!1;for(let t=0;t<f.length;t++)if(p[t]===e){let n=this.getExisting(e);g+=n?f[t]:`0`,m=!0}else m?b+=f[t]:h+=f[t]}else g=n?_:g;let E=null,{monthName:D,matchesCount:O}=e===`M`?this.matchMonth(t):{monthName:``,matchesCount:0},k=this.matchDayPeriod(t,e),A=t===`0`,j=this.leadingZero||{};A?(_===`0`&&(_=g),ty(n?t:(s?_:g)+t)===0&&!this.isAbbrMonth(c.partMap,e)&&e!==`a`&&this.incrementLeadingZero(e)):this.resetLeadingZero();let M=this.partPattern(c.partMap,e),N=M?M.pattern:null,P=this.patternLength(N)||(N?N.length:0);if(s&&a&&!_)return this.setExisting(e,!1),iy(d,{value:null,switchToNext:!1});let F=g.length-3,I=!0,L=s?_:g;for(let r=Math.max(0,F);r<=g.length&&I;r++){L=n?t:s?_:g.substring(r)+t,this.autoSwitchParts&&e===`h`&&g.substring(r)===`12`&&(L=L.replace(`12`,`0`)),(s||!this.autoCorrectParts)&&(I=!1,L=Kv(L),L=Gv(P-L.length)+L);let i=parseInt(L,10),o=h+L+b;E=this.intl.parseDate(o,this.format,this.localeId),E&&this.value&&c.partMap.every(e=>e.type!==`year`&&e.type!==`month`&&e.type!=`day`)&&(E.setFullYear(this.value.getFullYear()),E.setMonth(this.value.getMonth()),E.setDate(this.value.getDate()));let l=!1;if(s&&!fy(E)&&this.autoCorrectParts&&(E=this.intl.parseDate(v+L+y,this.format,this.localeId),l=!0),!E&&!isNaN(i)&&(!isNaN(parseInt(t,10))||s&&a&&t===``)&&this.autoCorrectParts){if(e===`M`&&!D){let e=i-1;e>-1&&e<12&&(E=jv(this.value),E.setMonth(e),E.getMonth()!==e&&(E=Fv(Lv(E,-1))))}e===`y`&&(E=Pv(parseInt(L,10),this.month?this.value.getMonth():0,this.date?this.value.getDate():1,this.hours?this.value.getHours():0,this.minutes?this.value.getMinutes():0,this.seconds?this.value.getSeconds():0,this.milliseconds?this.value.getMilliseconds():0),(s&&fy(E)||!s&&E)&&this.date&&E.getDate()!==this.value.getDate()&&(E=Fv(Lv(E,-1))))}if(s&&fy(E)||!s&&E){let t=this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:l,middle:L,patternValue:N,basePrefix:v,baseSuffix:y,prefix:h,suffix:b,symbol:e,patternLength:P,leadingZero:j}),n=t.switchToNext;return this.shouldNormalizeCentury()&&(E=this.normalizeCentury(E)),e===`H`&&E.getHours()>=12&&this.setExisting(`a`,!0),this._value=E,this.setExisting(e,!0),this.resetInvalidDateSymbol(e),this.autoCorrectParts||(e===`M`?this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`)):e===`d`?this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`)):e===`y`&&this.markDatePartsAsExisting(),this.hasInvalidDatePart()||(this.markDatePartsAsExisting(),!t.peekedDate&&t.switchToNext&&!this.autoCorrectParts&&(e===`M`||e===`d`&&t.parsedPeekedValue===30&&this.value.getMonth()===1&&(n=!1)))),iy(d,{value:this.value,switchToNext:n})}}if(D){if(E=this.intl.parseDate(h+D+b,this.format,this.localeId),!E&&e===`M`){let e=this.monthNames.indexOf(D);e>=0&&(E=jv(this.value),E.setMonth(e),E.getMonth()!==e&&(E=Fv(Lv(E,-1))))}if(E)return this._value=E,this.setExisting(e,!0),iy(d,{value:this.value,switchToNext:O===1})}if(k&&(E=this.intl.parseDate(h+k+b,this.format)||this.intl.parseDate(v+k+y,this.format),E))return this._value=E,this.setExisting(e,!0),iy(d,{value:this.value,switchToNext:!0});if(A&&e!==`a`&&this.setExisting(e,!1),!this.autoCorrectParts){let r,i=s?_:L,a=ty(i);if(ey(a)&&ny(i)){if(e===`d`&&(a<=0||a>31)||e===`M`&&(a<=0||a>12)){if(s)return iy(d,{value:null,switchToNext:!1});i=t,a=ty(i)}if(!ey(a)||!ny(i))return iy(d,{value:null,switchToNext:!1});r=e===`M`?a-1:a;let o=e===`y`,c=e===`M`,l=e===`d`,u=jv(this._value),f=this._partiallyInvalidDate.invalidDateParts||{},p=o?r:f.y.value||u.getFullYear(),m=c?r:f.M.value||u.getMonth(),g=l?r:f.d.value||f.E.value||u.getDate(),_=f.h.value||f.H.value||u.getHours(),x=f.m.value||u.getMinutes(),C=f.s.value||u.getSeconds(),T=f.S.value||u.getMilliseconds(),D=Pv(p,m,g,_,x,C,T),O=dy(D,p,m,g,_,x,C,T),k=o||c||l?this.modifyDateSymbolWithValue(u,e,o?p:c?m:g):null,A=!1;if(c&&k?k.getMonth()===m?this.getExisting(`d`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:m,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(this.resetInvalidDateSymbol(e),u=jv(D),this.getExisting(`M`)&&this.getExisting(`y`)&&(this.setExisting(`d`,!0),this.resetInvalidDateSymbol(`d`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:m,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):l&&k?k.getDate()===g?this.getExisting(`M`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:g,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(u=jv(D),this.resetInvalidDateSymbol(e),this.getExisting(`d`)&&this.getExisting(`y`)&&(this.setExisting(`M`,!0),this.resetInvalidDateSymbol(`M`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:g,date:jv(this.value),startDate:jv(this.value)}),this.setExisting(e,!1)):o&&k&&(k.getFullYear()===p?this.getExisting(`d`)&&this.getExisting(`M`)?O?(u=jv(D),this.resetInvalidDateSymbol(e)):(A=!0,this.setInvalidDatePart(e,{value:p,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1)):O?(this.resetInvalidDateSymbol(e),u=jv(D),this.getExisting(`M`)&&this.getExisting(`d`)&&(this.setExisting(`y`,!0),this.resetInvalidDateSymbol(`y`))):(this.resetInvalidDateSymbol(e),u=jv(k)):(A=!0,this.setInvalidDatePart(e,{value:p,date:jv(k),startDate:jv(this.value)}),this.setExisting(e,!1))),!A){if(this.setExisting(e,!0),s&&!fy(E)){let e=this.intl.parseDate(v+L+y,this.format,this.localeId);fy(e)&&(this._value=e)}else this._value=u;this.getValue()&&this.resetInvalidDate()}let M=!1,F=n?Kv(i).length:i.length;return M=e===`M`?a>=2||F>=2:e===`d`?a>=4||F>=2:S?this.isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:!this.autoCorrectParts,middle:L,patternValue:N,basePrefix:v,baseSuffix:y,prefix:h,suffix:b,symbol:e,patternLength:P,leadingZero:j}).switchToNext:F>w,iy(d,{value:null,switchToNext:M,hasInvalidDatePart:A})}}return iy(d,{value:null,switchToNext:!1})}symbolMap(e){return this.intl.splitDateFormat(this.format,this.localeId).reduce(Jv,{})[e]}resetLeadingZero(){let e=this.leadingZero!==null;return this.setLeadingZero(null),e}setLeadingZero(e){this.leadingZero=e}getLeadingZero(){return this.leadingZero||{}}normalizeCentury(e){if(!Qv(e))return e;let t=sy(e),n=this.getNormalizedCenturyBase(t);return cy(e,n+t)}incrementLeadingZero(e){let t=this.leadingZero||{};t[e]=(t[e]||0)+1,this.leadingZero=t}isAbbrMonth(e,t){let n=this.partPattern(e,t);return n.type===`month`&&n.names}partPattern(e,t){return e.filter(e=>e.pattern.indexOf(t)!==-1)[0]}peek(e,t){if(!t)return e;let n=e.replace(/^0*/,``)+`0`;return Gv(t.length-n.length)+n}matchMonth(e){if(this.typedMonthPart+=e.toLowerCase(),this.monthNames.length===0)return{monthName:``,matchesCount:0};for(;this.typedMonthPart.length>0;){let e=[];for(let t=0;t<this.monthNames.length;t++)this.monthNames[t].toLowerCase().startsWith(this.typedMonthPart)&&e.push(this.monthNames[t]);if(e.length>0)return{monthName:e[0],matchesCount:e.length};let t=parseInt(this.typedMonthPart,10);if(t>=1&&t<=12&&t.toString().startsWith(this.typedMonthPart)){let e=[1,2,3,4,5,6,7,8,9,10,11,12].reduce((e,t)=>t.toString().startsWith(this.typedMonthPart)?e+1:e,0);return{monthName:this.monthNames[t-1],matchesCount:e}}this.typedMonthPart=this.typedMonthPart.substring(1,this.typedMonthPart.length)}return{monthName:``,matchesCount:0}}matchDayPeriod(e,t){let n=e.toLowerCase();if(t===`a`&&this.dayPeriods){if(this.dayPeriods.am.toLowerCase().startsWith(n))return this.dayPeriods.am;if(this.dayPeriods.pm.toLowerCase().startsWith(n))return this.dayPeriods.pm}return``}allFormattedMonths(e=`en`){let t=this.intl.splitDateFormat(this.format,this.localeId);for(let n=0;n<t.length;n++)if(t[n].type===`month`&&t[n].names)return this.intl.dateFormatNames(e,t[n].names);return[]}allDayPeriods(e=`en`){let t=this.intl.splitDateFormat(this.format);for(let n=0;n<t.length;n++)if(t[n].type===`dayperiod`&&t[n].names)return this.intl.dateFormatNames(e,t[n].names);return null}patternLength(e){return e?e[0]===`y`?4:hy.test(e)?2:0:0}dateFormatString(e,t){let n=this.intl.splitDateFormat(t,this.localeId),r=[],i=[];for(let t=0;t<n.length;t++){let a=this.intl.formatDate(e,{pattern:n[t].pattern},this.localeId).length;for(;a>0;)r.push(this.symbols[n[t].pattern[0]]||Uv.formatSeparator),i.push(n[t]),a--}let a=new Hv;return a.symbols=r.join(``),a.partMap=i,a}merge(e,t){let n=``,r=``,i=t.symbols,a=!1,o=0,s=this.getFormattedInvalidDates(i);for(let c=i.length-1;c>=0;c--){let l=this.getPartsForSegment(t,c);if(this.knownParts.indexOf(i[c])===-1||this.getExisting(i[c]))this.autoCorrectParts||e.length===i.length||a?n=e[c]+n:o>0?(n=e[c]+n,o--,o<=0&&(a=!0)):n=(e[c+e.length-i.length]||``)+n,r=i[c]+r;else{let a=i[c],u=0;if(this.autoCorrectParts||!this.autoCorrectParts&&!Qv(this.getInvalidDatePartValue(a))){for(;c>=0&&a===i[c];)c--;c++}if(this.leadingZero&&this.leadingZero[a])n=`0`+n;else if(!this.autoCorrectParts&&this.getInvalidDatePartValue(a)){let e=this.getInvalidDatePartValue(a).toString();a===`M`?(e=(ty(this.getInvalidDatePartValue(a))+1).toString(),l.length>2?n=s[a][c]+n:(e=(ty(this.getInvalidDatePartValue(a))+1).toString(),n=Gv(l.length-e.length)+e+n,u=l.length-1,o=e.length-l.length)):(n=Gv(l.length-e.length)+e+n,u=l.length-1,o=e.length-l.length)}else n=this.dateFieldName(t.partMap[c])+n;for(;r.length<n.length;)r=i[c]+r;u!==0&&(c=c-u+(e.length-i.length))}}return{text:n,format:r}}dateFieldName(e){let t=this.formatPlaceholder||`wide`;return t[e.type]?t[e.type]:t===`formatPattern`?e.pattern:this.intl.dateFieldName(Object.assign(e,{nameType:t}))}getNormalizedCenturyBase(e){return e>this.twoDigitYearMax?1900:2e3}shouldNormalizeCentury(){return this.intl.splitDateFormat(this.format).some(e=>e.pattern===`yy`)}resetInvalidDate(){this._partiallyInvalidDate.startDate=null,Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{this.resetInvalidDatePart(e)})}resetInvalidDateSymbol(e){this.resetInvalidDatePart(e);let t=!0;Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(e=>{this._partiallyInvalidDate.invalidDateParts[e]&&Qv(this._partiallyInvalidDate.invalidDateParts[e].value)&&(t=!1)}),t&&this.resetInvalidDate()}resetInvalidDatePart(e){this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e]={value:null,date:null,startDateOffset:0})}getInvalidDatePart(e){return this._partiallyInvalidDate.invalidDateParts[e]||{}}getInvalidDatePartValue(e){return(this._partiallyInvalidDate.invalidDateParts[e]||{}).value}setInvalidDatePart(e,{value:t=null,date:n=null,startDateOffset:r=0,startDate:i=null}){this._partiallyInvalidDate.invalidDateParts[e]&&(this._partiallyInvalidDate.invalidDateParts[e].value=t,this._partiallyInvalidDate.invalidDateParts[e].date=n,this._partiallyInvalidDate.invalidDateParts[e].startDateOffset=r,this._partiallyInvalidDate.startDate=i)}hasInvalidDatePart(){let e=!1;return Object.keys(this._partiallyInvalidDate.invalidDateParts).forEach(t=>{this._partiallyInvalidDate.invalidDateParts[t]&&Qv(this._partiallyInvalidDate.invalidDateParts[t].value)&&(e=!0)}),e}modifyDateSymbolWithOffset(e,t,n){let r=jv(e),i=!1;switch(t){case`y`:r.setFullYear(r.getFullYear()+n);break;case`M`:r=Lv(this.value,n);break;case`d`:case`E`:r.setDate(r.getDate()+n);break;case`h`:case`H`:r.setHours(r.getHours()+n),i=!0;break;case`m`:r.setMinutes(r.getMinutes()+n),i=!0;break;case`s`:r.setSeconds(r.getSeconds()+n),i=!0;break;case`S`:r.setMilliseconds(r.getMilliseconds()+n);break;case`a`:r.setHours(r.getHours()+12*n),i=!0;break;default:break}return{date:r,timeModified:i}}modifyDateSymbolWithValue(e,t,n){let r=jv(e);switch(t){case`y`:r.setFullYear(n);break;case`M`:r=Lv(e,n-e.getMonth());break;case`d`:case`E`:r.setDate(n);break;case`h`:case`H`:r.setHours(n);break;case`m`:r.setMinutes(n);break;case`s`:r.setSeconds(n);break;case`S`:r.setMilliseconds(n);break;case`a`:r.setHours(n);break;default:break}return r}markDatePartsAsExisting(){this.modifyExisting(!0)}getPartsForSegment(e,t){let n=e.partMap[t],r=[];for(let i=t;i<e.partMap.length;i++){let t=e.partMap[i];if(n.type===t.type&&n.pattern===t.pattern)r.push(t);else break}for(let i=t-1;i>=0;i--){let t=e.partMap[i];if(n.type===t.type&&n.pattern===t.pattern)r.unshift(t);else break}return r}isPeekDateOverflowingDatePart({useBasePrefixAndSuffix:e,middle:t,patternValue:n,basePrefix:r,baseSuffix:i,prefix:a,suffix:o,symbol:s,patternLength:c,leadingZero:l}){let u=this.peek(t,n),d=e?`${r}${u}${i}`:`${a}${u}${o}`,f=this.intl.parseDate(d,this.format,this.localeId),p=((this.leadingZero||{})[s]||0)+Kv(t).length>=c;return{peekedDate:f,peekedDateString:d,peekedValue:u,parsedPeekedValue:ty(u),switchToNext:f===null||(l[s]?n.length<=t.length:p)}}};let _y={BACKSPACE:8,DELETE:46,TAB:9,ENTER:13,ESCAPE:27,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,SPACE:32,END:35,HOME:36,PAGE_UP:33,PAGE_DOWN:34},vy={events:{}};var yy=class{constructor(e){this.options=iy({},vy,e)}destroy(){this.options={}}trigger(e,t={}){let n={defaultPrevented:!1,preventDefault:()=>{n.defaultPrevented=!0}};return oy(this.options.events[e])?(this.options.events[e](iy(n,t,{sender:this})),n.defaultPrevented):!1}},by;(function(e){e.None=`none`,e.Caret=`caret`,e.Selection=`selection`})(by||={});let xy=`dragStart`,Sy=`drop`,Cy=`touchstart`,wy=`mousedown`,Ty=`mouseup`,Ey=`click`,Dy=`input`,Oy=`keydown`,ky=`focus`,Ay=`blur`,jy=`paste`,My=`DOMMouseScroll`,Ny=`mousewheel`,Py=`valueChange`,Fy=`inputEnd`,Iy=`blurEnd`,Ly=`focusEnd`,Ry=`change`,zy={format:`d`,hasPlaceholder:!1,placeholder:null,cycleTime:!0,locale:null,steps:{millisecond:1,second:1,minute:1,hour:1,day:1,month:1,year:1},formatPlaceholder:null,events:{[Py]:null,[Dy]:null,[Fy]:null,[ky]:null,[Ly]:null,[Ay]:null,[Iy]:null,[Oy]:null,[Ny]:null,[Ry]:null},selectNearestSegmentOnFocus:!1,selectPreviousSegmentOnBackspace:!1,enableMouseWheel:!1,allowCaretMode:!1,autoSwitchParts:!0,autoSwitchKeys:[],twoDigitYearMax:Uv.twoDigitYearMax,autoCorrectParts:!0,autoFill:!1,toggleDayPeriod:!1};var By=class extends yy{get value(){return this.dateObject&&this.dateObject.getValue()}constructor(e,t){super(t),this.dateObject=null,this.currentText=``,this.currentFormat=``,this.interactionMode=by.None,this.previousElementSelection={start:0,end:0},this.init(e,t)}init(e,t){let n=fy(this.options.value)?jv(this.options.value):new Date(t.formattedValue);fy(n)||(n=null),this.element=e,this.options=iy({},zy,t,{steps:Object.assign(Object.assign({},zy.steps),t.steps)}),this.intl=this.options.intlService,this.dateObject=this.createDateObject(),this.dateObject.setValue(n),this.setTextAndFormat(),this.bindEvents(),this.resetSegmentValue=!0,this.interactionMode=by.None,this.forceUpdate()}destroy(){this.unbindEvents(),this.dateObject=null,super.destroy()}bindEvents(){this.onElementDragStart=this.onElementDragStart.bind(this),this.element.addEventListener(xy,this.onElementDragStart),this.onElementDrop=this.onElementDrop.bind(this),this.element.addEventListener(Sy,this.onElementDrop),this.onElementClick=this.onElementClick.bind(this),this.element.addEventListener(Ey,this.onElementClick),this.onElementMouseDown=this.onElementMouseDown.bind(this),this.element.addEventListener(wy,this.onElementMouseDown),this.element.addEventListener(Cy,this.onElementMouseDown),this.onElementMouseUp=this.onElementMouseUp.bind(this),this.element.addEventListener(Ty,this.onElementMouseUp),this.onElementInput=this.onElementInput.bind(this),this.element.addEventListener(Dy,this.onElementInput),this.onElementKeyDown=this.onElementKeyDown.bind(this),this.element.addEventListener(Oy,this.onElementKeyDown),this.onElementFocus=this.onElementFocus.bind(this),this.element.addEventListener(ky,this.onElementFocus),this.onElementBlur=this.onElementBlur.bind(this),this.element.addEventListener(Ay,this.onElementBlur),this.onElementChange=this.onElementChange.bind(this),this.element.addEventListener(Ry,this.onElementChange),this.onElementPaste=this.onElementPaste.bind(this),this.element.addEventListener(jy,this.onElementPaste),this.onElementMouseWheel=this.onElementMouseWheel.bind(this),this.element.addEventListener(My,this.onElementMouseWheel),this.element.addEventListener(Ny,this.onElementMouseWheel)}unbindEvents(){this.element.removeEventListener(xy,this.onElementDragStart),this.element.removeEventListener(Sy,this.onElementDrop),this.element.removeEventListener(Cy,this.onElementMouseDown),this.element.removeEventListener(wy,this.onElementMouseDown),this.element.removeEventListener(Ty,this.onElementMouseUp),this.element.removeEventListener(Ey,this.onElementClick),this.element.removeEventListener(Dy,this.onElementInput),this.element.removeEventListener(Oy,this.onElementKeyDown),this.element.removeEventListener(ky,this.onElementFocus),this.element.removeEventListener(Ay,this.onElementBlur),this.element.removeEventListener(Ry,this.onElementChange),this.element.removeEventListener(jy,this.onElementPaste),this.element.removeEventListener(My,this.onElementMouseWheel),this.element.removeEventListener(Ny,this.onElementMouseWheel)}setOptions(e,t=!1){this.options=iy({},this.options,e,{steps:Object.assign(Object.assign({},zy.steps),e.steps)}),this.setDateObjectOptions(),t&&(this.unbindEvents(),this.init(this.element,this.options))}setDateObjectOptions(){if(this.dateObject){let e=this.getDateObjectOptions();this.dateObject.setOptions(e)}}resetLocale(){this.unbindEvents(),this.init(this.element,this.options)}isInCaretMode(){return this.interactionMode===by.Caret}focus(){this.element.focus(),this.options.selectNearestSegmentOnFocus&&this.selectNearestSegment(0)}onElementDragStart(e){e.preventDefault()}onElementDrop(e){e.preventDefault()}onElementMouseDown(){this.mouseDownStarted=!0,this.focusedPriorToMouseDown=this.isActive}onElementMouseUp(e){this.mouseDownStarted=!1,e.preventDefault()}onElementClick(e){this.mouseDownStarted=!1,this.switchedPartOnPreviousKeyAction=!1;let t=this.selection;if(this.isInCaretMode()&&this.forceUpdate(),e.detail!==3)if(this.isActive&&this.options.selectNearestSegmentOnFocus){let e=this.element.selectionStart!==this.element.selectionEnd,t=Qv(this.options.placeholder)&&!this.dateObject.hasValue()&&!this.focusedPriorToMouseDown,n=!e&&t?0:this.caret()[0];this.selectNearestSegment(n)}else this.setSelection(this.selectionByIndex(t.start))}onElementInput(e){this.triggerInput({event:e});let t=this.elementValue;if(!this.element||!this.dateObject)return;let n=this.switchedPartOnPreviousKeyAction;if(this.isPasteInProgress){this.options.allowCaretMode&&(this.resetSegmentValue=!1),this.updateOnPaste(e),this.isPasteInProgress=!1;return}let r=this.keyDownEvent||{},i=r.keyCode===_y.BACKSPACE||r.key===Wv.BACKSPACE,a=r.keyCode===_y.DELETE||r.key===Wv.DELETE,o=this.interactionMode;this.options.allowCaretMode&&o!==by.Caret&&!a&&!i&&(this.resetSegmentValue=!0),this.options.allowCaretMode?this.interactionMode=by.Caret:this.interactionMode=by.Selection;let s=this.isInCaretMode();if(s&&this.keyDownEvent.key===Wv.SPACE){this.restorePreviousInputEventState();return}let c=this.dateObject&&this.dateObject.getValue(),l=this.dateObject?this.dateObject.value:null,{text:u,format:d}=this.dateObject.getTextAndFormat();this.currentFormat=d;let f=``;f=s&&(i||a||o===by.Caret)?this.previousElementValue:u;let p=this.elementValue,m=qv({oldText:f,newText:p,formatPattern:this.currentFormat,selectionStart:this.selection.start,isInCaretMode:s,keyEvent:this.keyDownEvent});if(m&&m.length&&m[0]&&m[0][1]!==Uv.formatSeparator&&(this.switchedPartOnPreviousKeyAction=!1),s&&(!m||m.length===0)){this.restorePreviousInputEventState();return}else if(s&&m.length===1){if(!m[0]||!m[0][0]){this.restorePreviousInputEventState();return}else if(s&&m[0]&&(m[0][0]===Uv.formatSeparator||m[0][1]===Uv.formatSeparator)){this.restorePreviousInputEventState();return}}let h=m.length===1&&m[0][1]===Uv.formatSeparator,g=[],_=!1,v=null;if(!h)for(let e=0;e<m.length;e++){let t=this.dateObject.parsePart({symbol:m[e][0],currentChar:m[e][1],resetSegmentValue:this.resetSegmentValue,cycleSegmentValue:!this.isInCaretMode(),rawTextValue:this.element.value,isDeleting:i||a,originalFormat:this.currentFormat});g.push(t),t.value||(v={type:`parse`}),_=t.switchToNext}this.options.autoSwitchParts||(_=!1),this.resetSegmentValue=!1;let y=this.options.format===this.currentFormat||Qv(this.options.format)&&this.options.format.length>1,b=g[g.length-1],x=b&&!Qv(b.value),S=s&&(i||a)&&x,C=b?b.resetPart:!1,w=this.dateObject.getValue(),T=!Vv(c,w),E=this.dateObject.value,D,O=this.selection;if(s){let t=m&&m.length>0?m[0][0]:null,n=this.dateObject.getLeadingZero()[t];m.length&&m[0][0]!==Uv.formatSeparator?_?(this.forceUpdateWithSelection(),this.switchDateSegment(1)):C?(D=this.currentFormat[O.start],D?(this.forceUpdate(),this.setSelection(this.selectionBySymbol(D))):this.restorePreviousInputEventState()):S?(this.forceUpdate(),m.length&&m[0][0]!==Uv.formatSeparator&&this.setSelection(this.selectionBySymbol(m[0][0]))):x?e.data===`0`&&n||(Qv(c)&&!Qv(w)?this.restorePreviousInputEventState():!Qv(c)&&Qv(w)?this.forceUpdateWithSelection():Qv(c)&&Qv(w)?T?this.forceUpdateWithSelection():this.restorePreviousInputEventState():!Qv(c)&&!Qv(w)?this.forceUpdateWithSelection():l!==E||this.restorePreviousInputEventState()):x||y||this.forceUpdateWithSelection():!this.options.autoSwitchParts&&m[0][1]===Uv.formatSeparator||this.setSelection(this.selectionBySymbol(m[0][0]))}else s||(this.forceUpdate(),m.length&&m[0][0]!==Uv.formatSeparator&&this.setSelection(this.selectionBySymbol(m[0][0])),this.options.autoSwitchParts?h?(this.resetSegmentValue=!0,n||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):_&&(this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0):b&&b.switchToNext?this.resetSegmentValue=!0:h&&(this.resetSegmentValue=!0,n||this.switchDateSegment(1),this.switchedPartOnPreviousKeyAction=!0),i&&this.options.selectPreviousSegmentOnBackspace&&this.switchDateSegment(-1));this.tryTriggerValueChange({oldValue:c,event:e}),this.triggerInputEnd({event:e,error:v,oldElementValue:t,newElementValue:this.elementValue}),s&&this.setTextAndFormat()}onElementFocus(e){this.triggerFocus({event:e})||(this.isActive=!0,this.interactionMode=by.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.mouseDownStarted||this.caret(0,this.elementValue.length),this.mouseDownStarted=!1,this.triggerFocusEnd({event:e}))}onElementBlur(e){this.resetSegmentValue=!0,this.isActive=!1,!this.triggerBlur({event:e})&&(this.options.autoFill&&this.autoFill(),this.interactionMode=by.None,this.switchedPartOnPreviousKeyAction=!1,this.refreshElementValue(),this.triggerBlurEnd({event:e}))}onElementChange(e){this.triggerChange({event:e})}onElementKeyDown(e){if(this.triggerKeyDown({event:e}))return;let{start:t,end:n}=this.selection,r=e;if(this.keyDownEvent=e,this.previousElementValue=this.element.value,this.previousElementSelection={start:t,end:n},this.keyEventMatchesAutoSwitchKeys(e)){let t=e.keyCode===_y.TAB;if(t){let{start:n,end:r}=this.selection;if(e.shiftKey&&t?this.switchDateSegment(-1):this.switchDateSegment(1),n!==this.selection.start||r!==this.selection.end){e.preventDefault();return}}else{e.preventDefault(),this.switchDateSegment(1);return}}let i=this.currentFormat[this.selection.start],a=this.getStepFromSymbol(i),o=!1,s=this.elementValue;if(!(e.altKey||e.ctrlKey||e.metaKey||e.keyCode===_y.TAB)){switch(e.keyCode){case _y.ARROW_LEFT:this.switchDateSegment(-1),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_UP:this.modifyDateSegmentValue(a,i,r),s!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:s}),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_RIGHT:this.switchDateSegment(1),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ARROW_DOWN:this.modifyDateSegmentValue(-a,i,r),s!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:s}),o=!0,this.switchedPartOnPreviousKeyAction=!1;break;case _y.ENTER:break;case _y.HOME:this.selectNearestSegment(0),o=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;case _y.END:this.selectNearestSegment(this.elementValue.length),o=!0,this.switchedPartOnPreviousKeyAction=!1,this.resetSegmentValue=!0;break;default:return}o&&e.preventDefault()}}onElementPaste(){this.isPasteInProgress=!0}onElementMouseWheel(e){let t=this.elementValue;if(!this.options.enableMouseWheel||this.triggerMouseWheel({event:e})||!this.isActive)return;let n=e,r=this.currentFormat[this.selection.start],i=this.getStepFromSymbol(r);n.shiftKey?this.switchDateSegment((n.wheelDelta||-n.detail)>0?-1:1):this.modifyDateSegmentValue((n.wheelDelta||-n.detail)>0?i:-i),n.returnValue=!1,n.preventDefault&&n.preventDefault(),t!==this.elementValue&&this.triggerInputEnd({event:e,error:null,newElementValue:this.elementValue,oldElementValue:t})}updateOnPaste(e){let t=this.intl.parseDate(this.elementValue,this.inputFormat)||this.value;Qv(t)&&this.dateObject.shouldNormalizeCentury()&&(t=this.dateObject.normalizeCentury(t));let n=this.dateObject&&this.dateObject.getValue();this.writeValue(t),this.tryTriggerValueChange({oldValue:n,event:e})}get elementValue(){return(this.element||{}).value||``}get inputFormat(){return this.options.format?typeof this.options.format==`string`?this.options.format:this.options.format.inputFormat:Uv.defaultDateFormat}get displayFormat(){return this.options.format?typeof this.options.format==`string`?this.options.format:this.options.format.displayFormat:Uv.defaultDateFormat}get selection(){let e={start:0,end:0};return this.element!==null&&this.element.selectionStart!==void 0&&(e={start:this.element.selectionStart,end:this.element.selectionEnd}),e}setSelection(e){this.element&&document.activeElement===this.element&&(this.element.setSelectionRange(e.start,e.end),$v()&&py()&&this.element.scrollIntoView({block:`nearest`,inline:`nearest`}),e.start!==e.end&&(this.interactionMode=by.Selection))}selectionBySymbol(e){let t=-1,n=0;for(let r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===e&&(n=r+1,t===-1&&(t=r));return t<0&&(t=0),!this.options.autoCorrectParts&&this.currentFormat.length!==this.currentText.length&&(this.currentFormat.length<this.currentText.length?n+=this.currentText.length-this.currentFormat.length:n=Math.max(0,n-(this.currentFormat.length-this.currentText.length))),{start:t,end:n}}selectionByIndex(e){let t={start:e,end:e};for(let n=e,r=e-1;n<this.currentFormat.length||r>=0;n++,r--){if(n<this.currentFormat.length&&this.currentFormat[n]!==Uv.formatSeparator){t=this.selectionBySymbol(this.currentFormat[n]);break}if(r>=0&&this.currentFormat[r]!==Uv.formatSeparator){t=this.selectionBySymbol(this.currentFormat[r]);break}}return t}switchDateSegment(e){let t=this.selection;if(this.isInCaretMode()){let n=t.start,r=this.currentFormat[n-1],i=``,a=``;if(e<0){for(let t=n+e;t>=0;t--)if(a=this.currentFormat[t],a!==Uv.formatSeparator&&a!==r){n=t,i=a;break}}else for(let t=n+e;t<this.currentFormat.length;t++)if(a=this.currentFormat[t],a!==Uv.formatSeparator&&a!==r){n=t,i=a;break}if(i){this.forceUpdate(),this.setSelection(this.selectionBySymbol(i)),this.interactionMode=by.Selection;return}}this.interactionMode=by.None;let{start:n,end:r}=this.selection;if(n<r&&this.currentFormat[n]!==this.currentFormat[r-1]){this.setSelection(this.selectionByIndex(e>0?n:r-1)),this.resetSegmentValue=!0,this.interactionMode=by.None;return}let i=this.currentFormat[n],a=n+e;for(;a>0&&a<this.currentFormat.length&&(this.currentFormat[a]===i||this.currentFormat[a]===Uv.formatSeparator);)a+=e;if(this.currentFormat[a]===Uv.formatSeparator)return;let o=a;for(;o>=0&&o<this.currentFormat.length&&this.currentFormat[o]===this.currentFormat[a];)o+=e;a>o&&(o+1!==n||a+1!==r)?(this.setSelection({start:o+1,end:a+1}),this.resetSegmentValue=!0):a<o&&(a!==n||o!==r)&&(this.setSelection({start:a,end:o}),this.resetSegmentValue=!0),this.interactionMode=by.None}modifyDateSegmentValue(e,t=``,n={}){if(!this.dateObject||this.options.readonly)return;let r=this.value,i=1,a=this.caret();if(t||=this.currentFormat[a[0]],t===`S`&&(!this.options.steps.millisecond||this.options.steps.millisecond===1)){let e=ly(this.inputFormat);i=uy(e)}this.dateObject.modifyPart(t,i*e),this.tryTriggerValueChange({oldValue:r,event:n}),this.forceUpdate(),this.setSelection(this.selectionBySymbol(t))}tryTriggerValueChange(e={oldValue:null,event:{}}){if(!Vv(this.value,e.oldValue))return this.triggerValueChange(e)}triggerValueChange(e={oldValue:null,event:{}}){return this.trigger(Py,iy(e,{value:this.value}))}triggerInput(e={event:{}}){return this.trigger(Dy,iy(e,{value:this.value}))}triggerInputEnd(e={event:{},error:null,oldElementValue:``,newElementValue:``}){return this.trigger(Fy,iy(e,{value:this.value}))}triggerFocus(e={event:{}}){return this.trigger(ky,iy({},e))}triggerFocusEnd(e={event:{}}){return this.trigger(Ly,iy({},e))}triggerBlur(e={event:{}}){return this.trigger(Ay,iy({},e))}triggerBlurEnd(e={event:{}}){return this.trigger(Iy,iy({},e))}triggerChange(e={event:{}}){return this.trigger(Ry,iy(e,{value:this.value}))}triggerKeyDown(e={event:{}}){return this.trigger(Oy,iy({},e))}triggerMouseWheel(e={event:{}}){return this.trigger(Ny,iy({},e))}forceUpdate(){this.setTextAndFormat(),this.refreshElementValue()}forceUpdateWithSelection(){let{start:e,end:t}=this.selection,n=this.elementValue.length;this.forceUpdate();let r=this.elementValue.length-n;this.setSelection({start:e+r,end:t+r})}setTextAndFormat(){let{text:e,format:t}=this.dateObject.getTextAndFormat();this.currentFormat=t,this.currentText=e}setElementValue(e){this.element.value=e}getStepFromSymbol(e){switch(e){case`S`:return Number(this.options.steps.millisecond);case`s`:return Number(this.options.steps.second);case`m`:return Number(this.options.steps.minute);case`h`:case`H`:return Number(this.options.steps.hour);case`M`:return Number(this.options.steps.month);case`d`:case`E`:return Number(this.options.steps.day);case`y`:return Number(this.options.steps.year);default:return 1}}restorePreviousInputEventState(){this.restorePreviousElementValue(),this.restorePreviousElementSelection()}restorePreviousElementValue(){this.setElementValue(this.previousElementValue||``)}restorePreviousElementSelection(){let{start:e,end:t}=this.previousElementSelection;this.setSelection({start:e||0,end:t||0})}writeValue(e){this.verifyValue(e),this.dateObject=this.getDateObject(e),this.refreshElementValue()}verifyValue(e){if(e&&!fy(e))throw Error(`The 'value' should be a valid JavaScript Date instance.`)}refreshElementValue(){let e=this.element,t=this.isActive?this.inputFormat:this.displayFormat,{text:n,format:r}=this.dateObject.getTextAndFormat(t);this.currentFormat=r,this.currentText=n;let i=this.options.hasPlaceholder||Qv(this.options.placeholder),a=(!this.isActive||this.options.readonly)&&i&&!this.dateObject.hasValue();i&&Qv(this.options.placeholder)&&(e.placeholder=this.options.placeholder);let o=a?``:n;this.previousElementValue=this.elementValue,this.setElementValue(o)}caret(e,t=e){let n=e!==void 0,r=[e,e],i=this.element;if(!(n&&(this.options.disabled||this.options.readonly))){try{i.selectionStart!==void 0&&(n&&($v()&&document.activeElement!==i&&i.focus(),i.setSelectionRange(e,t)),r=[i.selectionStart,i.selectionEnd])}catch{r=[]}return r}}selectNearestSegment(e){for(let t=e,n=e-1;t<this.currentFormat.length||n>=0;t++,n--){if(t<this.currentFormat.length&&this.currentFormat[t]!==`_`){this.selectDateSegment(this.currentFormat[t]);return}if(n>=0&&this.currentFormat[n]!==`_`){this.selectDateSegment(this.currentFormat[n]);return}}}selectDateSegment(e){let t=-1,n=0;for(let r=0;r<this.currentFormat.length;r++)this.currentFormat[r]===e&&(n=r+1,t===-1&&(t=r));t<0&&(t=0),this.caret(0,0),this.caret(t,n)}getDateObject(e){let{leadingZero:t}=this.dateObject||{};this.options.value=e;let n=this.createDateObject();return n.setLeadingZero(this.isActive?t:null),n}createDateObject(){let e=this.getDateObjectOptions();return new gy(iy({},e))}getDateObjectOptions(){return{intlService:this.options.intlService,formatPlaceholder:this.options.formatPlaceholder?this.options.formatPlaceholder:`formatPattern`,format:this.inputFormat,cycleTime:this.options.cycleTime,twoDigitYearMax:this.options.twoDigitYearMax,autoCorrectParts:this.options.autoCorrectParts,value:this.options.value,toggleDayPeriod:this.options.toggleDayPeriod,autoSwitchParts:this.options.autoSwitchParts}}keyEventMatchesAutoSwitchKeys(e){let t=(this.options.autoSwitchKeys||[]).map(e=>e.toString().toLowerCase().trim());return t.indexOf(e.keyCode.toString())>=0||t.indexOf(e.keyCode)>=0||t.indexOf(e.key.toLowerCase().trim())>=0}autoFill(){let e=this.dateObject,t=new Date,n,r,i,a,o,s;(e.date||e.month||e.year||e.hours||e.minutes||e.seconds)&&(i=e.year?e.value.getFullYear():t.getFullYear(),r=e.month?e.value.getMonth():t.getMonth(),n=e.date?e.value.getDate():t.getDate(),a=e.hours?e.value.getHours():t.getHours(),o=e.minutes?e.value.getMinutes():t.getMinutes(),s=e.seconds?e.value.getSeconds():t.getSeconds(),e.setValue(new Date(i,r,n,a,o,s)),this.refreshElementValue(),this.triggerValueChange())}};(function(e,t){var n=window.kendo,r=n.ui,i=r.Widget,a=`.kendoDateInput`,o={}.toString,s=e.isPlainObject,c=`k-focus`,l=`k-disabled`,u=`k-invalid`,d=`disabled`,f=`readonly`,p=`change`,m=`kendoKeydown`,h=n.Class.extend({init:function(e){let t=e.culture?n.getCulture(e.culture):n.culture();this.messages=e.messages,this.cldr={},this.cldr[t.name]={name:t.name,calendar:t.calendar||{},numbers:t.numberFormat}},parseDate:function(e,t,r){return n.parseDate(e,t,r,!0)},formatDate:function(e,t,r){return n.toString(e,t,r)},splitDateFormat:function(e){return n.date.splitDateFormat(e)},dateFormatNames:function(e,t){return n.date.dateFormatNames(t)},dateFieldName:function(e){return this.messages[e.type]||{}}});function g(){let e=n.culture(),t=[];return t.push(e.calendars.standard[`/`]),t.push(e.calendars.standard[`:`]),t}function _(e,t){return e&&n.getCulture(e).calendars.standard.patterns[t]||t}var v=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),t=o.element,r=o.options,r.format=n._extractFormat(r.format||n.getCulture(r.culture).calendars.standard.patterns.d),r.min=n.parseDate(t.attr(`min`))||n.parseDate(r.min),r.max=n.parseDate(t.attr(`max`))||n.parseDate(r.max),r.inputMode=r.inputMode||t.attr(`inputmode`)||`text`;var s=t.parent().attr(`class`)||``,l=s.indexOf(`picker`)>=0&&s.indexOf(`rangepicker`)<0,u=o.options.value||t.val();l?o.wrapper=o.element.parent():(o.wrapper=t.wrap(`<span class='k-dateinput k-input'></span>`).parent(),o.wrapper.addClass(t[0].className).removeClass(`input-validation-error`)),o.wrapper[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),o._validationIcon=e(n.ui.icon({icon:`exclamation-circle`,iconClass:`k-input-validation-icon k-hidden`})).insertAfter(t),o._form(),o.dateInputInstance=new By(t[0],{format:_(r.culture,r.format),autoCorrectParts:r.autoCorrectParts,autoSwitchKeys:r.autoSwitchKeys.length?r.autoSwitchKeys:g(),enableMouseWheel:r.enableMouseWheel,twoDigitYearMax:r.twoDigitYearMax,steps:r.steps,formatPlaceholder:r.messages,events:{inputEnd:function(e){e.error&&o._blinkInvalidState()},keydown:function(e){if(!e.event.keyCode){e.preventDefault();return}(e.event.keyCode==n.keys.UP||e.event.keyCode==n.keys.DOWN)&&setTimeout(function(){o.element.trigger(p)})},blur:function(e){o._change(),e.preventDefault()}},intlService:new h({culture:r.culture,messages:o.options.messages}),autoSwitchParts:r.autoSwitchParts,autoFill:r.autoFill,toggleDayPeriod:r.toggleDayPeriod}),o._emptyMask=this.element.val(),r.value&&o.value(r.value),o.element.addClass(`k-input-inner`).attr(`autocomplete`,`off`).attr(`inputmode`,r.inputMode).on(`keydown`+a,o,function(e){var t=e.keyCode;(t===n.keys.LEFT||t===n.keys.RIGHT||t===n.keys.UP||t===n.keys.DOWN||t===n.keys.HOME||t===n.keys.END)&&e.stopPropagation()}).on(`focus`+a,function(){o.wrapper.addClass(c)}).on(`focusout`+a,function(){o.wrapper.removeClass(c)});try{t[0].setAttribute(`type`,`text`)}catch{t[0].type=`text`}t.is(`[disabled]`)||e(o.element).parents(`fieldset`).is(`:disabled`)?o.enable(!1):o.readonly(n.isPresent(r.readonly)?r.readonly:o.element.is(`[readonly]`)),o.value(u),l||o._applyCssClasses(),r.label&&o._label(),o.element.removeAttr(`style`),n.notify(o),i.fn.endInit.call(o)},options:{name:`DateInput`,autoAdjust:!0,autoCorrectParts:!0,autoSwitchKeys:[],autoSwitchParts:!1,enableMouseWheel:!0,culture:``,value:``,format:``,min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:`year`,month:`month`,day:`day`,weekday:`day of the week`,hour:`hours`,minute:`minutes`,second:`seconds`,milliseconds:`milliseconds`,dayperiod:`AM/PM`},size:t,steps:{year:1,month:1,day:1,hour:1,minute:1,second:1,millisecond:1},fillMode:t,rounded:t,label:null,autoFill:!1,toggleDayPeriod:!0},events:[p,m],min:function(e){if(e!==t)this.options.min=e;else return this.options.min},max:function(e){if(e!==t)this.options.max=e;else return this.options.max},setOptions:function(e){var t=this;i.fn.setOptions.call(t,e),t.dateInputInstance.destroy(),t.dateInputInstance=null,t.dateInputInstance=new By(this.element[0],{format:_(t.options.culture,t.options.format),autoSwitchKeys:t.options.autoSwitchKeys.length?t.options.autoSwitchKeys:g(),autoCorrectParts:t.options.autoCorrectParts,enableMouseWheel:t.options.enableMouseWheel,steps:t.options.steps,twoDigitYearMax:t.options.twoDigitYearMax,formatPlaceholder:t.options.messages,events:{inputEnd:function(e){e.error&&t._blinkInvalidState()},keydown:function(e){(e.event.keyCode==n.keys.UP||e.event.keyCode==n.keys.DOWN)&&setTimeout(function(){t.element.trigger(p)})},blur:function(e){t._change(),e.preventDefault()}},intlService:new h({culture:t.options.culture,messages:t.options.messages}),autoSwitchParts:t.options.autoSwitchParts,autoFill:t.options.autoFill,toggleDayPeriod:t.options.toggleDayPeriod}),t.value(e.value)},destroy:function(){var e=this;e.element.off(a),e.dateInputInstance.destroy(),this.element.val(``),this.element.attr(`value`,``),e._formElement&&e._formElement.off(`reset`,e._resetHandler),e.label&&e.label.destroy(),e._validationIcon&&e._validationIcon.remove(),i.fn.destroy.call(e)},value:function(e){if(e===t)return this.dateInputInstance.value;e===null&&(e=``),o.call(e)!==`[object Date]`&&(e=n.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this.dateInputInstance.writeValue(e),this._oldValue=e,this.label&&this.label.floatingLabel&&this.label.floatingLabel.refresh()},_hasDateInput:function(){return this._emptyMask!==this.element.val()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e)},_label:function(){var t=this,r=t.options,i=s(r.label)?r.label:{content:r.label};t.label=new n.ui.Label(null,e.extend({},i,{widget:t,floatCheck:()=>!t.value()&&(!t._hasDateInput()||t.element.val()===``)&&document.activeElement!==t.element[0]?(this.element.val(``),!0):!1})),t._inputLabel=t.label.element},_bindInput:function(){var e=this;e.element.on(`keydown`+a,e,function(e){var t=e.keyCode;(t===n.keys.LEFT||t===n.keys.RIGHT||t===n.keys.UP||t===n.keys.DOWN||t===n.keys.HOME||t===n.keys.END)&&e.stopPropagation()}).on(`focus`+a,function(){e.wrapper.addClass(c)}).on(`focusout`+a,function(){e.wrapper.removeClass(c)}),this.dateInputInstance&&this.dateInputInstance.bindEvents()},_unbindInput:function(){this.element.off(`focus`+a).off(`focusout`+a),this.dateInputInstance&&this.dateInputInstance.unbindEvents()},_editable:function(e){var t=this,n=t.element,r=e.disable,i=e.readonly,a=t.wrapper;t._unbindInput(),!i&&!r?(a.removeClass(l),n&&n.length&&(n[0].removeAttribute(d),n[0].removeAttribute(f)),t._bindInput()):(r&&(a.addClass(l),n.attr(d,r),n&&n.length&&n[0].removeAttribute(f)),i&&n.attr(f,i))},_change:function(){let e=this,t=e._oldValue,n=e.value(),r=e.options.autoAdjust;r&&n&&e.min()&&n<e.min()&&(e.value(e.min()),n=e.value()),r&&n&&e.max()&&n>e.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(p,{blur:!0}),e.element.trigger(p))},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){var e=this;e.wrapper.addClass(u),e._validationIcon.removeClass(`k-hidden`)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(u),e._validationIcon.addClass(`k-hidden`),e._invalidStateTimeout=null},_form:function(){var t=this,n=t.element,r=n.attr(`form`),i=r?e(`#`+r):n.closest(`form`),a=n[0].value;!a&&t.options.value&&(a=t.options.value),i[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(a)})},t._formElement=i.on(`reset`,t._resetHandler))},_paste:function(e){e.preventDefault()}});n.cssProperties.registerPrefix(`DateInput`,`k-input-`),n.cssProperties.registerValues(`DateInput`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),r.plugin(v)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui,i=n.html,a=n.mediaQuery,o=r.Widget,s=n.parseDate,c=n.keys,l=n.support,u=n.template,d=n._activeElement,f=`<div />`,p=`<span />`,m=`.kendoDatePicker`,h=`click`+m,g=l.mouseAndTouchPresent?n.applyEventMap(`up`,m.slice(1)):h,_=`open`,v=`close`,y=`change`,b=`kendoKeydown`,x=`disabled`,S=`readonly`,C=`k-focus`,w=`k-selected`,T=`k-disabled`,E=`k-hover`,D=`mouseenter`+m+` mouseleave`+m,O=`mousedown`+m,k=`navigate`,A=`id`,j=`min`,M=`max`,N=`month`,P=`aria-disabled`,F=`aria-readonly`,I=`aria-expanded`,L=`aria-hidden`,R=`aria-activedescendant`,z=n.calendar,ee=z.isInRange,B=z.restrictValue,V=z.isEqualDatePart,H=e.extend,te=Date;function ne(t){var n=t.parseFormats,r=t.format;z.normalize(t),n=Array.isArray(n)?n:[n],n.length||n.push(`yyyy-MM-dd`),e.inArray(r,n)===-1&&n.splice(0,0,t.format),t.parseFormats=n}function U(e){e.preventDefault()}var W=function(t){var i=this,o,s=document.body,c=e(f).attr(L,`true`).addClass(`k-calendar-container`);i.options=t||={},o=t.id;let l=t._buttons;i.bigScreenMQL=a(`large`),i.smallScreenMQL=a(`small`),t.adaptiveMode==`auto`&&i.smallScreenMQL.onChange(function(){i.popup&&n.isFunction(i.popup.fullscreen)&&i.popup.fullscreen(i.smallScreenMQL.mediaQueryList.matches)}),t.omitPopup?c=t.dateDiv:(c.appendTo(s),t.adaptiveMode==`auto`&&!i.bigScreenMQL.mediaQueryList.matches?i.popup=new r.ActionSheet(c,{adaptive:!0,title:t.adaptiveTitle||`Set dates`,subtitle:t.adaptiveSubtitle,closeButton:{icon:`check`,themeColor:`primary`},actionButtons:l,focusOnActivate:!1,fullscreen:i.smallScreenMQL.mediaQueryList.matches,open:t.open,close:t.close,popup:H(t.popup,t,{name:`Popup`,isRtl:n.support.isRtl(t.anchor)})}):i.popup=new r.Popup(c,H(t.popup,t,{name:`Popup`,isRtl:n.support.isRtl(t.anchor),smartFlip:!0}))),o&&(o+=`_dateview`,c.attr(A,o),i._dateViewID=o),i.div=c,i.value(t.value)};W.prototype={_calendar:function(){var t=this,i=t.calendar,a=t.options,o;if(!i){var s=a.adaptiveMode!=`auto`||this.bigScreenMQL.mediaQueryList.matches?this.options.size:`large`;o=e(f).attr(A,n.guid()).appendTo(a.omitPopup?a.dateDiv:t.popup._content||t.popup.element).on(O,U).on(h,`td:has(.k-link)`,t._click.bind(t)),t.calendar=i=new r.Calendar(o,{componentType:a.componentType,size:s,messages:a.messages}),t._setOptions(a),o.addClass(n.getValidCssClass(`k-calendar-`,`size`,s)),i.navigate(t._value||t._current,a.start),t.value(t._value)}},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,componentType:e.componentType,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,messages:e.messages,disableDates:e.disableDates})},setOptions:function(e){var t=this,n=t.options,r=e.disableDates;r&&(e.disableDates=z.disabled(r)),t.options=H(n,e,{change:n.change,close:n.close,open:n.open}),t.calendar&&t._setOptions(t.options)},destroy:function(){var e=this;this.popup&&this.popup.destroy(),e.bigScreenMQL&&=(e.bigScreenMQL.destroy(),null),e.smallScreenMQL&&=(e.smallScreenMQL.destroy(),null)},open:function(){var e=this,t;e._calendar(),t=e.popup._hovered,e.popup._hovered=!0,e.popup.open(),setTimeout(function(){e.popup._hovered=t},1)},close:function(){this.popup&&this.popup.close()},min:function(e){this._option(j,e)},max:function(e){this._option(M,e)},toggle:function(){var e=this;e[e.popup.visible()?v:_]()},move:function(e){var t=this,n=e.keyCode,r=t.calendar,i=e.ctrlKey&&n==c.DOWN||n==c.ENTER,a=!1;if(e.altKey)n==c.DOWN?(t.open(),e.preventDefault(),a=!0):n==c.UP&&(t.close(),e.preventDefault(),a=!0);else if(t.popup&&t.popup.visible()){if(n==c.ESC||i&&r._cell.hasClass(w))return t.close(),e.preventDefault(),!0;n!=c.SPACEBAR&&(t._current=r._move(e)),a=!0}return a},current:function(e){this._current=e,this.calendar&&this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,r=t.options,i=r.disableDates;i&&i(e)&&(e=null),t._value=e,t._current=new te(+B(e,r.min,r.max)),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(w)!==-1&&(this.calendar.trigger(`change`),this.close())},_option:function(e,t){var n=this,r=n.calendar;n.options[e]=t,r&&r[e](t)}},W.normalize=ne,n.DateView=W;var G=o.extend({init:function(t,r){var i=this,c,l,u=n.isPresent(r)&&n.isPresent(r.enable);o.fn.init.call(i,t,r),t=i.element,r=i.options,r.disableDates=n.calendar.disabled(r.disableDates),r.min=s(t.attr(`min`))||s(r.min),r.max=s(t.attr(`max`))||s(r.max),!u&&(e(t).is(`:disabled`)||e(t).parents(`fieldset`).is(`:disabled`))&&(i.options.enable=!1),!n.isPresent(r.readonly)&&t.attr(`readonly`)?r.readonly=!0:n.isPresent(r.readonly)||(r.readonly=!1),i.options.inputMode=r.inputMode||i.element.attr(`inputmode`)||`text`,i.element.attr(`inputmode`,i.options.inputMode),ne(r),i._initialOptions=H({},r),i._wrapper(),i._createDateView(),i._createDateViewProxy=i._createDateView.bind(i),i.bigScreenMQL=a(`large`),i.options.adaptiveMode==`auto`&&i.bigScreenMQL.onChange(()=>{i._createDateViewProxy(),i.dateView.value(i._value)}),i._icon();try{t[0].setAttribute(`type`,`text`)}catch{t[0].type=`text`}t.addClass(`k-input-inner`).attr({role:`combobox`,"aria-label":i.options.messages.selectDate,readonly:i.options.readonly,"aria-expanded":!1,"aria-haspopup":`grid`,"aria-controls":i.dateView._dateViewID,autocomplete:`off`}),i._reset(),i._template(),l=!i.options.enable,l?i.enable(!1):i.readonly(t.is(`[readonly]`)),c=s(r.value||i.element.val(),r.parseFormats,r.culture),i._createDateInput(r),i._old=i._update(c||i.element.val()),i._oldText=t.val(),i._applyCssClasses(),r.label&&i._label(),i.element.removeAttr(`style`),n.notify(i),o.fn.endInit.call(i)},events:[_,v,y,b],options:{name:`DatePicker`,autoAdjust:!0,value:null,footer:``,format:``,culture:``,enable:!0,parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:N,depth:N,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:({valueType:e,text:t})=>`Current focused ${e} is ${t}`,dateInput:!1,weekNumber:!1,messages:{weekColumnHeader:``,selectDate:`Select date`},componentType:`classic`,adaptiveMode:`none`,readonly:null,size:t,fillMode:t,rounded:t,label:null,autoFill:!1,autoCorrectParts:!0,adaptiveTitle:null,adaptiveSubtitle:null},_createDateView:function(){var e=this,t=e.options,n=e.element,r;e.dateView&&=(e.dateView.popup&&e.dateView.popup.wrapper&&e.dateView.popup.wrapper.remove(),e.dateView.destroy(),null),e.dateView=new W(H({},t,{id:n.attr(A),anchor:e.wrapper,change:function(){e._change(this.value()),e.close()},close:function(t){e.trigger(v)?t.preventDefault():(n.attr(I,!1),r.attr(L,!0),setTimeout(function(){n.removeAttr(`aria-activedescendant`)}))},open:function(t){var i=e.options,a;e.trigger(_)?t.preventDefault():(e.element.val()!==e._oldText&&(a=s(n.val(),i.parseFormats,i.culture),e.dateView[a?`current`:`value`](a)),n.attr(I,!0),r.attr(L,!1),e._updateARIA(a))}})),r=e.dateView.div},setOptions:function(e){let r=this,i=e.value||r.options.value||r._value;o.fn.setOptions.call(r,e),r._value=i,e=r.options,e.min=s(e.min),e.max=s(e.max),ne(e),r._dateIcon.off(m),r._dateIcon.remove(),r.dateView.setOptions(e),r._icon(),r._editable({readonly:e.readonly===t?r.options.readonly:e.readonly,disable:!r.options.enable}),r._createDateInput(e),!r._dateInput&&i&&r.element.val(n.toString(i,e.format,e.culture)),i&&(r._updateARIA(i),r.value(new Date(i)),r.dateView&&r.dateView.value(new Date(i)),r._dateInput&&r._dateInput.value(new Date(i))),e.label&&r._inputLabel?r.label.setOptions(e.label):e.label===!1?(r.label._unwrapFloating(),r._inputLabel.remove(),delete r._inputLabel):e.label&&r._label()},_editable:function(e){var t=this,n=t._dateIcon.off(m),r=t.element.off(m),i=t.wrapper.off(m),a=e.readonly,o=e.disable;!a&&!o?(i.removeClass(T).on(D,t._toggleHover),r&&r.length&&(r[0].removeAttribute(x),r[0].removeAttribute(S)),r.attr(P,!1).attr(F,!1).on(`keydown`+m,t,t._keydown.bind(t)).on(`focusout`+m,t._blur.bind(t)).on(`focus`+m,function(){t.wrapper.addClass(C)}),n.on(g,t._click.bind(t)).on(O,U)):(i.addClass(o?T:``).removeClass(o?``:T),r.attr(x,o).attr(S,a).attr(P,o).attr(F,a))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!e}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e)},_label:function(){var t=this,r=t.options,i=e.isPlainObject(r.label)?r.label:{content:r.label};t._dateInput&&(i.floatCheck=()=>!t.value()&&(!t._dateInput._hasDateInput()||t.element.val()===``)&&document.activeElement!==t.element[0]?(t.element.val(``),!0):!1),t.label=new n.ui.Label(null,e.extend({},i,{widget:t})),t._inputLabel=t.label.element},destroy:function(){var e=this;e.label&&e.label.destroy(),o.fn.destroy.call(e),e.dateView.calendar&&e._navigateCalendarHandler&&(e.dateView.calendar.unbind(k,e._navigateCalendarHandler),e._navigateCalendarHandler=null),e.dateView.destroy(),e.element.off(m),e._dateIcon.off(m),e._form&&e._form.off(`reset`,e._resetHandler),e.bigScreenMQL&&e.bigScreenMQL.destroy(),e._createDateViewProxy=null},open:function(){this.dateView.open(),this._navigateCalendar()},close:function(){this.dateView.close()},min:function(e){return this._option(j,e)},max:function(e){return this._option(M,e)},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),n._old===null&&(n._dateInput?n._dateInput.value(n._old):n.element.val(``)),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_toggleHover:function(t){e(t.currentTarget).toggleClass(E,t.type===`mouseenter`)},_isReset:function(e){var t=this;return t.options.dateInput&&t.options.autoFill&&t._dateInput._emptyMask==e},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e.options.autoFill&&!e._isReset(t)&&(e._dateInput.dateInputInstance.autoFill(),t=e.element.val()),e._change(t),t||e.dateView.current(n.calendar.getToday())),e.wrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._navigateCalendar(),t._focusElement()},_focusElement:function(){var e=this.element;e[0]!==d()&&e.trigger(`focus`)},_change:function(e){var t=this,r=t.element.val(),i;e=t._update(e),i=!n.calendar.isEqualDate(t._old,e);var a=i&&!t._typing,o=r!==t.element.val();(a||o)&&t.element.trigger(y),i&&(t._old=e,t._oldText=t.element.val(),t.trigger(y)),t._typing=!1},_keydown:function(e){var t=this,n=t.dateView,r=t.element.val(),i=!1;!n.popup.visible()&&e.keyCode==c.ENTER&&r!==t._oldText?t._change(r):(i=n.move(e),t._updateARIA(n._current),i?e.keyCode!==c.ENTER&&(e.stopPropagation(),t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation()):t._typing=!0)},_icon:function(){var t=this,n=t.element,r=t.options,a=n.next(`button.k-input-button`);a[0]||(a=e(i.renderButton(`<button aria-label="${t.options.messages.selectDate}" tabindex="-1" class="k-input-button k-button k-icon-button"></button>`,{icon:`calendar`,size:r.size,fillMode:r.fillMode,shape:`none`})).insertAfter(n)),t._dateIcon=a.attr({role:`button`})},_setCalendarAttribute:function(){var e=this;setTimeout(function(){e.element.attr(R,e.dateView.calendar._table.attr(R))})},_navigateCalendar:function(){var e=this;e._navigateCalendarHandler||=e._setCalendarAttribute.bind(e),e.dateView.calendar&&e.dateView.calendar.unbind(k,e._navigateCalendarHandler).bind(k,e._navigateCalendarHandler)},_option:function(e,n){var r=this,i=r.options;if(n===t)return i[e];n=s(n,i.parseFormats,i.culture),n&&(i[e]=new te(+n),r.dateView[e](n),r._dateInput&&r._dateInput[e](n))},_update:function(e){var t=this,r=t.options,i=r.min,a=r.max,o=t._value,c=s(e,r.parseFormats,r.culture),l=c===null&&o===null||c instanceof Date&&o instanceof Date,u;return r.disableDates(c)&&(c=null,!t._old&&!t.element.val()&&(e=null)),+c==+o&&l?(u=n.toString(c,r.format,r.culture),u!==e&&!(t._dateInput&&!c)&&t.element.val(c===null?e:u),c):(c!==null&&V(c,i)?c=B(c,i,a):ee(c,i,a)||(c=null),t._value=c,t.dateView.value(c),t._dateInput&&c?t._dateInput.value(c):t.element.val(n.toString(c||e,r.format,r.culture)),t._updateARIA(c),c)},_wrapper:function(){var e=this,t=e.element,n=t.parents(`.k-datepicker`);n[0]||(n=t.wrap(p).parent()),n[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),e.wrapper=n.addClass(`k-datepicker k-input`).addClass(t[0].className).removeClass(`input-validation-error`)},_reset:function(){var t=this,r=t.element,i=r.attr(`form`),a=t.options,o=a.disableDates,s=a.parseFormats.length?a.parseFormats:null,c=t._initialOptions.value,l=i?e(`#`+i):r.closest(`form`),u=r[0].defaultValue;c&&o&&o(c)&&(c=null),(!u||!n.parseDate(u,s,a.culture))&&c&&r.attr(`value`,n.toString(c,a.format,a.culture)),l[0]&&(t._resetHandler=function(){t.value(c||r[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=l.on(`reset`,t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&=(this._dateInput.destroy(),null),e.dateInput&&(this._dateInput=new r.DateInput(this.element,{autoAdjust:e.autoAdjust,culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,readonly:e.readonly,min:e.min,max:e.max,messages:e.messages.dateInput,autoFill:e.autoFill,autoCorrectParts:e.autoCorrectParts,toggleDayPeriod:!0,inputMode:e.inputMode}))},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(R),n&&t.element.attr(R,n._updateAria(t._ariaTemplate,e))}});n.cssProperties.registerPrefix(`DatePicker`,`k-input-`),n.cssProperties.registerValues(`DatePicker`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),r.plugin(G)})(window.kendo.jQuery),kendo,(function(e,t){let n=window.kendo,r=n.ui.Widget,i=`k-focus`,a=n.keys,o=`push`,s=`overlay`,c=`left`,l=n.ui.Widget.extend({init:function(t,i){let a=this,s;a._originalItems=i&&i.items,r.fn.init.call(this,t,i),i=a.options,a._element(t),a._wrapper(t),a._navigatable(),a.position(),a._mode(),i.mini&&a._miniMode(),a._initDrawerItems(),i.mini&&i.mode!=o&&a._setBodyOffset(),s=this.userEvents=new n.UserEvents(i.mode==o?this.drawerContainer:e(document.body),{fastTap:!0,allowSelection:!0}),a.tap=function(t){let n=!1;if(e.contains(a.drawerItemsWrapper.filter(`.k-drawer-items`)[0],t.event.target)){let r=e(t.event.target).closest(`[data-role='drawer-item']`);n=r.length>0&&r.find(`.k-drawer-toggle`).length>0,a._itemClick(t)}!n&&i.autoCollapse&&a.visible&&!a.trigger(`hide`,{sender:this})&&(a.hide(),t.preventDefault())},this.options.swipeToOpen?(s.bind(`start`,e=>a._start(e)),s.bind(`move`,e=>a._update(e)),s.bind(`end`,e=>a._end(e)),s.bind(`tap`,a.tap)):s.bind(`press`,a.tap),i.minHeight&&i.mode==o&&a.drawerContainer.css(`min-height`,i.minHeight),a._showWatermarkOverlay&&a._showWatermarkOverlay(a.drawerContainer[0]),i.expanded&&(a._removeTransition(),a.show()),n.ui.Widget.fn.endInit.call(a)},_element:function(){let t=this,n=t.element,r=t.options;t.contentElement=n.children().wrapAll(`<div class='k-drawer-content'></div>`).parent(),r.template instanceof Function?t.drawerElement=e(r.template()):r.template?t.drawerElement=e(r.template):r.items&&r.items.length?t.drawerElement=e(t._renderItems(r.items,0)):t.drawerElement=e(r.template),n.addClass(`k-drawer`)},_renderItems:function(e,t){let r=arguments[2]===!0,i=arguments[3]===!0,a=[];return r||a.push(`<ul class='k-drawer-items'>`),e.forEach(e=>{if(e||={},e.separator){a.push(`<li data-role='drawer-separator'></li>`);return}let r=i?e.miniTemplate:e.template,o=e.items&&e.items.length;if(r instanceof Function){a.push(r(e)),o&&a.push(this._renderItems(e.items,t+1,!0,i));return}let s=``;e.icon&&(s=n.ui.icon({icon:e.icon}));let c=[],l=``,u=``;e.enabled===!1&&(c.push(`k-disabled`),l=` aria-disabled='true'`),e.cssClass&&c.push(n.htmlEncode(e.cssClass)),o&&(u=`<span class='k-spacer'></span><span class='k-drawer-toggle'>${n.ui.icon({icon:this._hasSelectedDescendant(e)?`chevron-up`:`chevron-down`})}</span>`);let d=c.length?` class='${c.join(` `)}'`:``,f=e.text==null?``:e.text;a.push(`<li data-role='drawer-item' data-level='${t}'${d}${l}>${s}${i?``:`<span class='k-item-text'>${n.htmlEncode(f)}</span>`}${u}</li>`),o&&a.push(this._renderItems(e.items,t+1,!0,i))}),r||a.push(`</ul>`),a.join(``)},_generatedItems:function(e){let t=[];return(e||[]).forEach(e=>{e||={},e.separator||t.push(e),e.items&&e.items.length&&(t=t.concat(this._generatedItems(e.items)))}),t},_itemMapEntry:function(e){return(this._itemsMap||[]).find(t=>t.element===e[0])},_hasSelectedDescendant:function(e){return(e&&e.items||[]).some(e=>(e||={},!e.separator&&(e.selected||this._hasSelectedDescendant(e))))},_navigatable:function(){let e=this.element;e.find(`[data-role='drawer-item']`).first().parent().attr(`role`,`menubar`).attr(`aria-orientation`,`vertical`),this.options.navigatable&&e.attr(`tabIndex`,0).on(`focus.kendoDrawer`,this._focus.bind(this)).on(`focusout.kendoDrawer`,this._blur.bind(this)).on(`keydown.kendoDrawer`,this,this._keyDown.bind(this))},_blur:function(){this._current&&this._current.removeClass(i)},_focus:function(){this._setCurrent(this._current?this._current:this.drawerItemsWrapper.find(`[data-role='drawer-item']`).eq(0))},_setCurrent:function(t){let r=n.guid(),a=e(t);this._current&&(e(this._current).removeClass(i).removeAttr(`id`),this.drawerItemsWrapper.removeAttr(`aria-activedescendant`)),a.attr(`id`,r).addClass(i),this.drawerItemsWrapper.attr(`aria-activedescendant`,r),this._current=a},_keyDown:function(t){let n=!1,r=this._current,i;t.keyCode==a.UP&&(n=!0,i=r.prevAll(`[data-role='drawer-item']`).first(),i.length?this._setCurrent(i):this._setCurrent(r.parent().find(`[data-role='drawer-item']`).last())),t.keyCode==a.DOWN&&(n=!0,i=r.nextAll(`[data-role='drawer-item']`).first(),i.length?this._setCurrent(i):this._setCurrent(r.parent().find(`[data-role='drawer-item']`).first())),t.keyCode==a.HOME&&(n=!0,this._setCurrent(this.drawerItemsWrapper.find(`[data-role='drawer-item']`).eq(0))),t.keyCode==a.END&&(n=!0,this._setCurrent(this.drawerItemsWrapper.find(`[data-role='drawer-item']`).last())),(t.keyCode==a.SPACEBAR||t.keyCode==a.ENTER)&&(n=!0,this.tap({event:{target:r[0]},preventDefault:e.noop})),t.keyCode==a.ESC&&(n=!0,this.hide()),n&&t.preventDefault()},_wrapper:function(){let e=this.options,t=this.drawerElement,n=this.element,r=this.contentElement,i=this.drawerItemsWrapper=t,a=this.drawerWrapper=i.wrapAll(`<div class='k-drawer-wrapper'></div>`).parent(),o=this.drawerContainer=n.wrap(`<div class='k-drawer-container'></div>`).parent();t.filter(`ul`).addClass(`k-drawer-items`),e.mini?e.mini.width&&a.width(e.mini.width):a.width(0),o.append(r),n.append(a)},_addTransition:function(){this.drawerWrapper.css(`transition`,`all .3s ease-out`)},_removeTransition:function(){this.drawerWrapper.css(`transition`,`none`)},_setBodyOffset:function(){let t=this.element.outerWidth();this.leftPositioned?e(document.body).css(`padding-left`,t):e(document.body).css(`padding-right`,t)},_initDrawerItems:function(){let t=this.options,n=this.drawerItemsWrapper,r=n.find(`[data-role='drawer-item']`),i=n.find(`[data-role='drawer-separator']`),a=-1,o,s=!!this._miniTemplate&&!!t.items&&t.items.length&&!t.template&&!(t.mini&&t.mini.template);r.addClass(`k-drawer-item`).attr(`role`,`menuitem`),i.addClass(`k-drawer-item k-drawer-separator`).attr(`role`,`separator`),this._itemsMap=null,t.items&&t.items.length&&!t.template&&(o=this._generatedItems(this._originalItems||t.items),t.mini&&t.mini.template||(this._itemsMap=[]),r.each((t,n)=>{let r=o[t];if(r){if(r.attr&&!(s&&r.miniTemplate instanceof Function||!s&&r.template instanceof Function)){let t=e.extend({},r.attr);t.class&&(e(n).addClass(t.class),delete t.class),e(n).attr(t)}this._itemsMap&&this._itemsMap.push({element:n,dataItem:r}),a<0&&r.selected&&(a=t)}}),a>=0&&!(this._selectedItemIndex>=0)&&(this._selectedItemIndex=a)),this._toggleLevelClasses(!!this.visible),t.items&&t.items.length&&!t.template&&(this._collapseAllChildren(r),this._itemsMap&&r.each((t,n)=>{let i=this._itemMapEntry(e(n));i&&i.dataItem&&i.dataItem.expanded&&this._expandItem(e(n),r,t)}),this._selectedItemIndex>=0&&this._expandAncestors(r,this._selectedItemIndex)),r.each((e,t)=>{let n=s&&o[e]&&o[e].text;t.setAttribute(`aria-label`,n||t.textContent.trim())}),this._selectedItemIndex>=0&&(r.removeClass(`k-selected`),r.eq(this._selectedItemIndex).addClass(`k-selected`))},_toggleLevelClasses:function(t){this.drawerItemsWrapper.find(`[data-role='drawer-item']`).each((n,r)=>{let i=`k-level-`+(e(r).data(`level`)||0);e(r).toggleClass(i,t)})},_mode:function(){let t=this.options,n=this.drawerContainer;if(t.mode==o)n.addClass(`k-drawer-push`);else{n.addClass(`k-drawer-overlay`);let t=this.overlayContainer=e(`<div class="k-overlay"></div>`);t.hide(),n.prepend(t)}},_miniMode:function(){let t=this.options,n=this.drawerContainer,r=t.mini.width,i=this._miniTemplate=t.mini.template,a=this.drawerItemsWrapper,o=this.drawerWrapper;n.addClass(`k-drawer-mini`),!i&&t.items&&t.items.length&&!t.template&&(i=this._miniTemplate=this._renderItems(t.items,0,!0,!0)),i&&(i instanceof Function?a.html(e(i())):a.html(e(i))),r&&o.width(r),this.minWidth=t.mini.width||this.drawerWrapper.width()},setOptions:function(t){let n=this,i,a,o,s;r.fn.setOptions.call(n,t),`items`in t&&(n._originalItems=t.items,!n.options.template&&(i=n.options.items&&n.options.items.length,a=i?n._renderItems(n.options.items,0,!0):``,o=n.options.mini&&n.drawerContainer.hasClass(`k-drawer-mini`),n.options.mini?n.options.mini.template?n._miniTemplate=n.options.mini.template:n._miniTemplate=i?n._renderItems(n.options.items,0,!0,!0):``:n._miniTemplate=null,o&&n._miniTemplate?n._miniTemplate instanceof Function?n.drawerItemsWrapper.html(e(n._miniTemplate())):n.drawerItemsWrapper.html(e(n._miniTemplate)):n.drawerItemsWrapper.html(a),n._current=null,n._selectedItemIndex=-1,n._itemsMap=null,n._initDrawerItems(),s=n.drawerItemsWrapper.find(`[data-role='drawer-item']`),s.removeClass(`k-selected`),n._selectItem()))},show:function(){let e=this.drawerWrapper,t=this.drawerContainer,n=this.options,r=t.hasClass(`k-drawer-expanded`),i=this._miniTemplate,a=this.drawerItemsWrapper;if(r||(t.addClass(`k-drawer-expanded`),this.visible=!0),i){if(n.template){let e=n.template instanceof Function?n.template():n.template;a.html(e)}else a.html(this._renderItems(this._originalItems||n.items,0,!0));this._initDrawerItems(),this._selectItem()}e.width(n.width),n.mini&&t.removeClass(`k-drawer-mini`),n.mode===s&&(this.overlayContainer.show(),this.visible=!0),this._toggleLevelClasses(!0)},hide:function(){let e=this.drawerWrapper,t=this.drawerContainer,n=this.options,r=this.drawerItemsWrapper,i=this._miniTemplate,a=n.mini&&n.mini.width;this._addTransition(),this._miniTemplate&&(r.html(i),this._initDrawerItems(),this._selectItem()),n.mini?(t.addClass(`k-drawer-mini`),a?e.width(a):e.width(``)):e.width(0),this.visible&&=(t.removeClass(`k-drawer-expanded`),!1),n.mode===s&&this.overlayContainer.hide(),this._toggleLevelClasses(!1)},position:function(e){let t=this.options,n=e||t.position;n==`right`?(this.element.removeClass(`k-drawer-start`),this.element.addClass(`k-drawer-end`)):(this.element.removeClass(`k-drawer-end`),this.element.addClass(`k-drawer-start`)),this.leftPositioned=n===c},_start:function(e){let t=this.options,r=this.drawerItemsWrapper,i=e.sender;if(Math.abs(e.x.velocity)<Math.abs(e.y.velocity)||n.triggeredByInput(e.event)){i.cancel();return}this.drawerMini&&r.html(this.drawerElement),this._removeTransition(),t.mode!=o&&this.overlayContainer.show()},_update:function(e){this.options.mode==o?this._push(e):this._overlay(e)},_end:function(e){let t=e.x.velocity,n=this.options,r=this.drawerWrapper.width()>n.width/2,i=.8,a;this._addTransition(),a=this.leftPositioned?t>-.8&&(t>i||r):t<i&&(t<-.8||r),a?this.trigger(`show`,{sender:this})?(e.preventDefault(),this.hide()):this.show():this.trigger(`hide`,{sender:this})?(e.preventDefault(),this.show()):this.hide()},_overlay:function(e){let t=this.options,n=t.mini&&t.mini.width||this.minWidth||0,r=this.drawerWrapper,i=r.width()+(this.leftPositioned?e.x.delta:-e.x.delta),a=Math.min(Math.max(i,n),t.width);e.event.preventDefault(),e.event.stopPropagation(),r.width(a)},_push:function(e){let t=this.options,n=t.mini&&t.mini.width||this.minWidth||0,r=this.drawerWrapper,i=r.width()+(this.leftPositioned?e.x.delta:-e.x.delta),a=Math.min(Math.max(i,n),t.width);e.event.preventDefault(),e.event.stopPropagation(),r.width(a)},_selectItem:function(e){let t=this.drawerItemsWrapper.find(`[data-role='drawer-item']`),n,r;if(e){e.addClass(`k-selected`),n=this._itemMapEntry(e),this.trigger(`itemClick`,{item:e,dataItem:n&&n.dataItem,sender:this}),this._selectedItemIndex=t.index(e);return}r=this._selectedItemIndex,r>=0&&t.eq(r).addClass(`k-selected`)},_collapseAllChildren:function(t){t.each((t,n)=>{parseInt(e(n).data(`level`)||0,10)>0&&e(n).hide()})},_expandItem:function(e,t,r){let i=parseInt(e.data(`level`)||0,10);e.addClass(`k-expanded`);let a=e.find(`.k-drawer-toggle`);a.length&&a.html(n.ui.icon({icon:`chevron-up`}));for(let e=r+1;e<t.length;e++){let n=t.eq(e),r=parseInt(n.data(`level`)||0,10);if(r<=i)break;r===i+1&&n.show()}},_expandAncestors:function(e,t){let n=parseInt(e.eq(t).data(`level`)||0,10);if(n===0)return;let r=n;for(let n=t-1;n>=0;n--){let t=e.eq(n),i=parseInt(t.data(`level`)||0,10);if(i<r&&(this._expandItem(t,e,n),r=i,i===0))break}},_toggleChildren:function(e){let t=parseInt(e.data(`level`)||0,10),r=this.drawerItemsWrapper.find(`[data-role='drawer-item']`),i=r.index(e),a=e.hasClass(`k-expanded`),o=e.find(`.k-drawer-toggle`);if(a){e.removeClass(`k-expanded`);for(let e=i+1;e<r.length;e++){let i=r.eq(e);if(parseInt(i.data(`level`)||0,10)<=t)break;i.hide(),i.hasClass(`k-expanded`)&&(i.removeClass(`k-expanded`),i.find(`.k-drawer-toggle`).html(n.ui.icon({icon:`chevron-down`})))}o.length&&o.html(n.ui.icon({icon:`chevron-down`}))}else this._expandItem(e,r,i)},_itemClick:function(t){let n=this,r=e(t.event.target).closest(`[data-role='drawer-item']`);!r||!r.length||r.hasClass(`k-disabled`)||(n.drawerItemsWrapper.find(`[data-role='drawer-item']`).removeClass(`k-selected`),n._selectItem(r),n.options.navigatable&&n._setCurrent(r),!n.options.template&&r.find(`.k-drawer-toggle`).length&&n._toggleChildren(r))},destroy:function(){this.options.mode!=o&&(this.leftPositioned?e(document.body).css(`padding-left`,0):e(document.body).css(`padding-right`,0)),r.fn.destroy.call(this),this.userEvents.destroy(),n.destroy(this.element),this.element=this.drawerWrapper=this.drawerElement=this.drawerContainer=this.drawerItemsWrapper=this._itemsMap=this._miniTemplate=this._originalItems=null},options:{name:`Drawer`,autoCollapse:!0,expanded:!1,items:null,position:c,mode:`overlay`,swipeToOpen:!0,width:280,mini:!1,navigatable:!1,template:``},events:[`hide`,`show`,`itemClick`,`kendoKeydown`]});n.ui.plugin(l)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui,i=`.kendoSwitch`,a=r.Widget,o=n.support,s=`change`,c=`kendoKeydown`,l={widget:`k-switch`,track:`k-switch-track`,thumbWrapper:`k-switch-thumb-wrap`,thumb:`k-switch-thumb`,checked:`k-switch-on`,checkedLabel:`k-switch-label-on`,unchecked:`k-switch-off`,uncheckedLabel:`k-switch-label-off`,disabled:`k-disabled`,readonly:`k-readonly`,active:`k-active`},u=`disabled`,d=`aria-disabled`,f=`readonly`,p=`aria-readonly`,m=`aria-checked`,h=`aria-hidden`,g=`checked`,_=o.click+i,v=o.pointers?`pointerup`:`touchend`,y=`keydown`+i,b=`_label`,x=`.`,S=n.htmlEncode,C=n.template(({styles:e})=>`<span class="${e.widget}" role="switch"></span>`),w=n.template(({styles:e,checked:t,unchecked:n})=>`<span class='${e.track}'><span class='${e.checkedLabel}'>${S(t)}</span><span class='${e.uncheckedLabel}'>${S(n)}</span></span>`),T=n.template(({styles:e})=>`<span class='${e.thumbWrapper}'><span class='${e.thumb}'></span></span>`),E=a.extend({init:function(e,t){var r=this;a.fn.init.call(r,e,t),r._wrapper(),r._initSettings(),r._aria(),r._attachEvents(),n.notify(r,n.ui),a.fn.endInit.call(r)},_wrapper:function(){var t=this,n=t.options,r=t.element[0],i=e(C({styles:l}));r.type=`checkbox`,t.wrapper=t.element.wrap(i).parent(),t.wrapper[0].style.cssText=t.element[0].style.cssText,t.element.hide(),t.wrapper.append(e(w({styles:l,checked:n.messages.checked,unchecked:n.messages.unchecked}))).append(e(T({styles:l}))).addClass(r.className).removeClass(`input-validation-error`),t.options.rounded=t.options.trackRounded,t._applyCssClasses(),t._applyRoundedClasses()},_applyRoundedClasses:function(e){var t=this,r=t.options,i=n.cssProperties.getValidClass({widget:r.name,propName:`rounded`,value:r.trackRounded}),a=n.cssProperties.getValidClass({widget:r.name,propName:`rounded`,value:r.thumbRounded});e||=`addClass`,t.wrapper.find(x+l.track)[e](i),t.wrapper.find(x+l.thumb)[e](a)},_attachEvents:function(){var e=this;e.wrapper.on(_,e._click.bind(e)).on(v,e._touchEnd.bind(e)).on(y,e,e._keydown.bind(e))},setOptions:function(n){let r=this,i=n.messages,a,o;r._clearCssClasses(n),r._applyRoundedClasses(`removeClass`),r.options=e.extend(r.options,n),i&&i.checked!==t&&(a=r.wrapper.find(x+l.checkedLabel),a.text(S(i.checked))),i&&i.unchecked!==t&&(o=r.wrapper.find(x+l.uncheckedLabel),o.text(S(i.unchecked))),n.width&&r.wrapper.css({width:n.width}),n.enabled!==t&&r.enable(n.enabled),n.readonly!==t&&r.readonly(n.readonly),r.check(n.checked),r.options.rounded=r.options.trackRounded,r._applyCssClasses(),r._applyRoundedClasses()},_initSettings:function(){var e=this,t=e.element[0],n=e.options;n.enabled&&e._tabindex(),n.width&&e.wrapper.css({width:n.width}),n.checked===null&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(u),e.enable(n.enabled),n.readonly=n.readonly||!!e.element.attr(f),e.readonly(n.readonly)},_aria:function(){var t=this,r=t.element,i=t.wrapper,a=r.attr(`id`),o=e(`label[for="`+a+`"]`),s=r.attr(`aria-label`),c=r.attr(`aria-labelledby`);if(s)i.attr(`aria-label`,s);else if(c)i.attr(`aria-labelledby`,c);else if(o.length){var l=o.attr(`id`);l||(l=(a||n.guid())+b,o.attr(`id`,l)),i.attr(`aria-labelledby`,l)}},events:[s,c],options:{name:`Switch`,messages:{checked:`On`,unchecked:`Off`},width:null,checked:null,enabled:!0,readonly:!1,size:t,rounded:t,trackRounded:t,thumbRounded:t},check:function(e){var n=this,r=n.element[0];if(e===t)return r.checked;r.checked!==e&&(n.options.checked=r.checked=e),n.wrapper.attr(m,e).toggleClass(l.checked,e).toggleClass(l.unchecked,!e).find(`[aria-hidden='true']`).removeAttr(h),e?(n.element.attr(g,g),n.wrapper.find(x+l.uncheckedLabel).attr(h,!0)):(n.element.prop(g,!1),n.wrapper.find(x+l.checkedLabel).attr(h,!0))},value:function(e){return typeof e==`string`?e=e===`true`:e===null&&(e=!1),this.check.apply(this,[e])},destroy:function(){a.fn.destroy.call(this),this.wrapper.off(i)},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var t=this.element,n=this.wrapper;e===void 0&&(e=!0),this.options.enabled=e,e?(t.prop(u,!1),n.removeAttr(d)):(t.attr(u,u),n.attr(d,!0)),n.toggleClass(l.disabled,!e)},readonly:function(e){var t=this,n=t.element,r=t.wrapper;e===void 0&&(e=!0),t.options.readonly=e,e?(n.attr(f,!0),r.attr(p,!0)):(n.prop(f,!1),r.removeAttr(p)),r.toggleClass(l.readonly,e)},_check:function(){var e=this,t=e.element[0].checked=!e.element[0].checked;if(e.wrapper.trigger(`focus`),!e.options.enabled||e.options.readonly||e.trigger(s,{checked:t})){e.element[0].checked=!t;return}e.check(t)},_keydown:function(e){e.keyCode===n.keys.SPACEBAR&&(this._check(),e.preventDefault(),e.stopPropagation())},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_click:function(e){!this._isTouch(e)&&e.which===1&&(e.target===this.element[0]&&(this.element[0].checked=!this.element[0].checked),this._check())},_touchEnd:function(e){this._isTouch(e)&&(this._check(),e.preventDefault())}});n.cssProperties.registerPrefix(`Switch`,`k-switch-`),n.cssProperties.registerValues(`Switch`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}]),r.plugin(E)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.htmlEncode,i=n.ui,a=n.html,o=i.List,s=i.Select,c=n.support,l=n._activeElement,u=n.data.ObservableObject,d=n.keys,f=`.kendoDropDownList`,p=f+`FocusEvent`,m=`disabled`,h=`readonly`,g=`change`,_=`k-focus`,v=`k-disabled`,y=`aria-disabled`,b=`aria-readonly`,x=`click`+f+` touchend`+f,S=`mouseenter`+f+` mouseleave`+f,C=`tabindex`,w=`filter`,T=`accept`,E="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",D=`open`,O=`close`,k=s.extend({init:function(r,i){var a=this,o=i&&i.index,c,l,u;a.ns=f,i=Array.isArray(i)?{dataSource:i}:i,s.fn.init.call(a,r,i),i=a.options,r=a.element.on(`focus`+f,a._focusHandler.bind(a)),!n.isPresent(i.readonly)&&r.attr(`readonly`)?i.readonly=!0:n.isPresent(i.readonly)||(i.readonly=!1),a._focusInputHandler=a._focusInput.bind(a),a.optionLabel=e(),a._optionLabel(),a._inputTemplate(),a._reset(),a._prev=``,a._word=``,a._wrapper(),a._tabindex(),a.wrapper.data(C,a.wrapper.attr(C)),a._span(),a._popup(),a._mobile(),a._dataSource(),a._ignoreCase(),i.label&&this._label(),a._aria(),a._enable(),a._oldIndex=a.selectedIndex=-1,o!==t&&(i.index=o),a._initialIndex=i.index,a.requireValueMapper(a.options),a._initList(),a._aria(),a.options.virtual&&a.listView.one(`listBound`,function(){a._aria()}),a.listView.one(`dataBound`,a._attachAriaActiveDescendant.bind(a)),a.listView.bind(`dataBound`,()=>{a._refreshFloatingLabel(),a._aria()}),a._initializingCascade=!0,a._cascade(),a.one(`set`,function(e){!e.sender.listView.bound()&&a.hasOptionLabel()&&a._textAccessor(a._optionLabelText())}),i.autoBind?a.dataSource.fetch():a.selectedIndex===-1&&(l=i.text||``,l||(c=i.optionLabel,c&&i.index===0?l=c:a._isSelect&&(l=r.children(`:selected`).text())),a._textAccessor(l)),i.autoBind&&!a.listView.bound()?a.one(`dataBound`,function(){a._initializingCascade=!1}):a._initializingCascade=!1,u=e(a.element).parents(`fieldset`).is(`:disabled`),u&&a.enable(!1),a.listView.bind(`click`,function(e){e.preventDefault()}),n.notify(a),a._applyCssClasses(),s.fn.endInit.call(a)},options:{name:`DropDownList`,enabled:!0,autoBind:!0,_allowFilterPaste:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:``,dataValueField:``,optionLabel:``,cascadeFrom:``,cascadeFromField:``,cascadeFromParentField:``,ignoreCase:!0,animation:{},filter:`none`,minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:e=>r(e),fixedGroupTemplate:e=>r(e),autoWidth:!1,popup:null,filterTitle:null,readonly:null,size:t,fillMode:t,rounded:t,label:null,popupFilter:!0,adaptiveTitle:null,adaptiveSubtitle:null},events:[`open`,`close`,g,`select`,`filtering`,`dataBinding`,`dataBound`,`cascade`,`set`,`kendoKeydown`],setOptions:function(e){s.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._removeFilterHeader(),this._addFilterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;s.fn.destroy.call(e),e.wrapper.off(f),e.wrapper.off(p),e.element.off(f),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(p)},open:function(){var e=this,t=e.dataSource.filter()?e.dataSource.filter().filters.length>0:!1,n=this.listView;e.popup.visible()||(!e.listView.bound()||e._state===T?(e._open=!0,e._state=`rebind`,e.filterInput&&(e.filterInput.val(``),e._prev=``),e.filterInput&&e.options.minLength!==1&&!t?(e.refresh(),e.popup.one(`activate`,e._focusInputHandler),e.wrapper.attr(`aria-activedescendant`,n._optionID),e.popup.open(),e._resizeFilterInput()):e._filterSource()):e._allowOpening()&&(e._focusFilter=!0,e.popup.one(`activate`,e._focusInputHandler),e.popup._hovered=!0,e.wrapper.attr(`aria-activedescendant`,n._optionID),e.popup.open(),e._resizeFilterInput(),e._focusItem()))},close:function(){this._attachAriaActiveDescendant(),this.popup.close()},_attachAriaActiveDescendant:function(){var e=this.wrapper,t=e.find(`.k-input-inner`).attr(`id`);e.attr(`aria-describedby`,t)},_focusInput:function(){this._hasActionSheet()||this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e=this.filterInput,t=this._prevent;if(!(!e||this._hasActionSheet())){var r=this.filterInput[0]===l(),i=n.caret(this.filterInput[0])[0];this._prevent=!0,e.addClass(`k-hidden`),e.closest(`.k-list-filter`).css(`width`,this.popup.element.width()-1),e.removeClass(`k-hidden`),r&&(e.trigger(`focus`),n.caret(e[0],i)),this._prevent=t}},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||s.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;if(e===t)return n=this.listView.focus(),!n&&this.selectedIndex===0&&this.hasOptionLabel()?this.optionLabel:n;this._focus(e)},dataItem:function(n){var r=this,i=null;if(n===null)return n;if(n===t)i=r.listView.selectedDataItems()[0];else{if(typeof n!=`number`){if(r.options.virtual)return r.dataSource.getByUid(e(n).data(`uid`));n=n.hasClass(`k-list-optionlabel`)?-1:r.listView.getElementIndex(n)}else r.hasOptionLabel()&&--n;i=r.dataSource.flatView()[n]}return i||=r._optionLabelDataItem(),i},refresh:function(){this.listView.refresh()},text:function(e){var n=this,r,i=n.options.ignoreCase;if(e=e===null?``:e,e!==t){if(typeof e!=`string`){n._textAccessor(e);return}r=i?e.toLowerCase():e,n._select(function(e){return e=n._text(e),i&&(e=(e+``).toLowerCase()),e===r}).done(function(){n._textAccessor(n.dataItem()||e),n._refreshFloatingLabel()})}else return n._textAccessor()},_clearFilter:function(){e(this.filterInput).val(``),s.fn._clearFilter.call(this)},value:function(e){var n=this,r=n.listView,i=n.dataSource,a=function(){n.value(e)};if(e===t)return e=n._accessor()||n.listView.value()[0],e===t||e===null?``:e;if(n.requireValueMapper(n.options,e),(e||!n.hasOptionLabel())&&(n._initialIndex=null),this.trigger(`set`,{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()){n._valueSetter&&i.unbind(g,n._valueSetter),n._valueSetter=a.bind(n),i.one(g,n._valueSetter);return}n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done(function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._refreshFloatingLabel()})},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var t=this,i=t.options,a=i.optionLabel,o=i.optionLabelTemplate;if(!a){t.optionLabel.off().remove(),t.optionLabel=e();return}o||=e=>r(typeof a==`string`?e:n.getter(i.dataTextField)(e)),typeof o!=`function`&&(o=n.template(o)),t.optionLabelTemplate=o,t.hasOptionLabel()||(t.optionLabel=e(`<div role="option" class="k-list-optionlabel"></div>`).prependTo(t.list)),t.optionLabel.html(o(a)).off().on(x,t._click.bind(t)).on(S,t._toggleHover)},_optionLabelText:function(){var e=this.options.optionLabel;return typeof e==`string`?e:this._text(e)},_optionLabelDataItem:function(){var n=this,r=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(r)?new u(r):n._assignInstance(n._optionLabelText(),``):t},_buildOptions:function(e){var n=this;if(n._isSelect){var r=n.listView.value()[0],i=n._optionLabelDataItem(),a=i&&n._value(i);(r===t||r===null)&&(r=``),i&&=((a===t||a===null)&&(a=``),`<option value="`+a+`">`+n._text(i)+`</option>`),n._options(e,i,r),r!==o.unifyType(n._accessor(),typeof r)&&(n._customOption=null,n._custom(r))}},_listBound:function(){var e=this,t=e._initialIndex,n=e._state===w,r=e.dataSource.flatView(),i;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r.length),e._resizePopup(!0),e.popup.position(),e._buildOptions(r),n||(e._open&&e.toggle(e._allowOpening()),e._open=!1,e._fetch||(r.length?(!e.listView.value().length&&t>-1&&t!==null&&e.select(t),e._initialIndex=null,i=e.listView.selectedDataItems()[0],i&&e.text()!==e._text(i)&&e._selectValue(i)):e._textAccessor()!==e._optionLabelText()&&(e.listView.value(``),e._selectValue(null),e._oldIndex=e.selectedIndex))),e._hideBusy(),e.trigger(`dataBound`)},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this.options._allowFilterPaste&&this._search()},_attachFocusHandlers:function(){var e=this;e.wrapper.on(`focusin`+p,e._focusinHandler.bind(e)).on(`focusout`+p,e._focusoutHandler.bind(e)),e.filterInput&&e.filterInput.on(`focusin`+p,e._focusinHandler.bind(e)).on(`focusout`+p,e._focusoutHandler.bind(e))},_focusHandler:function(){this.wrapper.trigger(`focus`)},_focusinHandler:function(){this.wrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(e){var t=this,n=window.self!==window.top;t.wrapper.find(e.relatedTarget).length>0||t._prevent||(clearTimeout(t._typingTimeout),t._typingTimeout=null,c.mobileOS.ios&&n?t._change():t._blur(),t.wrapper.removeClass(_),t._prevent=!0,t._open=!1,t.element.trigger(`blur`))},_wrapperMousedown:function(e){let t=this,n=t.filterInput&&!t._touchEnabled()?e.currentTarget!==t.filterInput[0]:!0;t.popup&&t._hasActionSheet()&&(n=!0,t.popup.unbind(`close`),t.popup.bind(`close`,function(){t._change()})),t._prevent=n},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind(`activate`,this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,r=t.element,i=e.disable,a=e.readonly,o=t.wrapper.add(t.filterInput).off(f),s=t.wrapper.off(S);!a&&!i?(r.prop(m,!1).prop(h,!1),s.removeClass(v).on(S,t._toggleHover),o.attr(C,o.data(C)).attr(y,!1).attr(b,!1).on(`keydown`+f,t,t._keydown.bind(t)).on(n.support.mousedown+f,t._wrapperMousedown.bind(t)).on(`paste`+f,t._filterPaste.bind(t)),t.wrapper.on(`click`+f,t._wrapperClick.bind(t)),t.filterInput?o.on(`input`+f,t._search.bind(t)):o.on(`keypress`+f,t._keypress.bind(t)),r.attr(`aria-label`)||t._restoreAriaValue()):i?(o.attr(C,`-1`),s.addClass(v),t._updateDisabledAriaValue()):s.removeClass(v),r.attr(m,i).attr(h,a),o.attr(y,i).attr(b,a)},_keydown:function(e){var t=this,n=e.keyCode,r=e.altKey,i,a,o=t.popup.visible();if(t.filterInput&&(i=t.filterInput[0]===l()),n===d.LEFT?(n=d.UP,a=!0):n===d.RIGHT&&(n=d.DOWN,a=!0),!(a&&i)){if(e.keyCode=n,(r&&n===d.UP||n===d.ESC)&&t._focusElement(t.wrapper),t._state===w&&n===d.ESC&&(t._clearFilter(),t._open=!1,t._state=T),n===d.ENTER&&t._typingTimeout&&t.filterInput&&o){e.preventDefault();return}if(n===d.SPACEBAR&&!i&&(t.toggle(!o),e.preventDefault()),a=t._move(e),a){n!==d.TAB&&n!==d.ENTER&&(n!==d.ESC||o)&&e.stopPropagation();return}if(!o||!t.filterInput){var s=t._focus();if(n===d.HOME?(a=!0,t._firstItem()):n===d.END&&(a=!0,t._lastItem()),a){if(t.trigger(`select`,{dataItem:t._getElementDataItem(t._focus()),item:t._focus()})){t._focus(s);return}t._select(t._focus(),!0).done(function(){o||t._blur()}),e.preventDefault()}}!r&&!a&&t.filterInput&&t._search()}},_matchText:function(e,n){var r=this.options.ignoreCase;return e===t||e===null?!1:(e+=``,r&&(e=e.toLowerCase()),e.indexOf(n)===0)},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e=this,t=e.dataSource.flatView(),n=t.length+ +!!e.hasOptionLabel(),r=M(e._word,e._last),i=e.selectedIndex,a,o;i===-1?i=0:(i+=+!!r,i=j(i,n)),t=t.toJSON?t.toJSON():t.slice(),t=e._shuffleData(t,i);for(var s=0;s<n&&(o=e._text(t[s]),!(r&&e._matchText(o,e._last)))&&!e._matchText(o,e._word);s++);s!==n&&(a=e._focus(),e._select(j(i+s,n)).done(function(){var t=function(){e.popup.visible()||e._change()};e.trigger(`select`,{dataItem:e._getElementDataItem(e._focus()),item:e._focus()})?e._select(a).done(t):t()}))},_keypress:function(e){var t=this;if(e.which!==0&&e.keyCode!==n.keys.ENTER){var r=String.fromCharCode(e.charCode||e.keyCode);t.options.ignoreCase&&(r=r.toLowerCase()),r===` `&&e.preventDefault(),t._word+=r,t._last=r,t._search()}},_popupOpen:function(e){var t=this.popup;e.isDefaultPrevented()||this._hasActionSheet()||(t.wrapper=n.wrap(t.element),t.element.closest(`.km-root`)[0]&&(t.wrapper.addClass(`km-popup km-widget`),this.wrapper.addClass(`km-widget`)))},_popup:function(){s.fn._popup.call(this),this.popup.element.addClass(`k-dropdownlist-popup`),this.popup.one(`open`,this._popupOpen.bind(this))},_postCreatePopup:function(){s.fn._postCreatePopup.call(this),this._attachFocusHandlers()},_getElementDataItem:function(e){return!e||!e[0]?null:e[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(e))},_click:function(t){var n=this,r=t.item||e(t.currentTarget);if(t.preventDefault(),n.trigger(`select`,{dataItem:n._getElementDataItem(r),item:r})){n.close();return}n._userTriggered=!0,n._select(r).done(function(){n._blur(),n._focusElement(n.wrapper)})},_touchEnabled:function(){return c.mobileOS&&(c.touch||c.MSPointers||c.pointers)},_focusElement:function(e){var t=l(),n=this.wrapper,r=this.filterInput,i=e===r?n:r,a=this._touchEnabled();r&&r[0]===e[0]&&a||r&&(i[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.trigger(`focus`))},_searchByWord:function(e){if(e){var t=this;t.options.ignoreCase&&(e=e.toLowerCase()),t._select(function(n){return t._matchText(t._text(n),e)})}},_inputValue:function(){return this.text()},_search:function(){var e=this,t=e.dataSource;if(clearTimeout(e._typingTimeout),e._isFilterEnabled())e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t),e._resizeFilterInput()),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=``},e.options.delay),!e.listView.bound()){t.fetch().done(function(){e._selectNext()});return}e._selectNext()}},_get:function(t){var n,r,i,a=typeof t==`function`,o=a?e():e(t);if(this.hasOptionLabel()&&(typeof t==`number`?t>-1&&--t:o.hasClass(`k-list-optionlabel`)&&(t=-1)),a){for(n=this.dataSource.flatView(),i=0;i<n.length;i++)if(t(n[i])){t=i,r=!0;break}r||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){var e;return this.optionLabel.hasClass(`k-focus`)?(this._resetOptionLabel(),this.listView.focusFirst(),e=1):e=this.listView.focusNext(),e},_prevItem:function(){var e;if(!this.optionLabel.hasClass(`k-focus`))return e=this.listView.focusPrev(),!this.listView.focus()&&!this.options.virtual&&this._focus(this.optionLabel),e},_focusItem:function(){var e=this.options,n=this.listView,r=n.focus(),i=n.select();i=i[i.length-1],i===t&&e.highlightFirst&&!r&&(i=0),i===t?e.optionLabel&&(!e.virtual||e.virtual.mapValueTo!==`dataItem`)?(this._focus(this.optionLabel),this._select(this.optionLabel),this.listView.content.scrollTop(0)):n.scrollToIndex(0):n.focus(i)},_resetOptionLabel:function(e){this.optionLabel.removeClass(`k-focus`+(e||``)).removeAttr(`id`)},_focus:function(e){var n=this.listView,r=this.optionLabel;if(e===t)return e=n.focus(),!e&&r.hasClass(`k-focus`)&&(e=r),e;this._resetOptionLabel(),e=this._get(e),n.focus(e),e===-1&&(r.addClass(`k-focus`).attr(`id`,n._optionID),this.filterInput&&this.filterInput.removeAttr(`aria-activedescendant`).attr(`aria-activedescendant`,n._optionID))},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done(function(){!t&&n._state===w&&(n._state=T),e===-1&&n._selectValue(null)})},_selectValue:function(e){var n=this,r=n.options.optionLabel,i=n.listView.select(),a=``,o=``;i=i[i.length-1],i===t&&(i=-1),this._resetOptionLabel(` k-selected`),e||e===0?(o=e,a=n._dataValue(e),r&&(i+=1)):r&&(n._focus(n.optionLabel.addClass(`k-selected`)),o=n._optionLabelText(),a=typeof r==`string`?``:n._value(r),i=0),n.selectedIndex=i,a===null&&(a=``),n._textAccessor(o),n._accessor(a,i),n._triggerCascade(),!n.element.attr(`aria-label`)&&n.wrapper.hasClass(v)&&n._updateDisabledAriaValue()},_updateDisabledAriaValue:function(){var e=this,t=e.element,n=e.wrapper;if(!t.attr(`aria-label`)){var r=e.text(),i=n.attr(`aria-labelledby`),a=n.attr(`aria-describedby`);i?(n.data(`_origAriaLabelledBy`)||n.data(`_origAriaLabelledBy`,i),r&&a&&i.indexOf(a)===-1&&n.attr(`aria-labelledby`,i+` `+a)):r?n.attr(`aria-label`,r):n.removeAttr(`aria-label`)}},_restoreAriaValue:function(){var e=this,n=e.element,r=e.wrapper;if(!n.attr(`aria-label`)){var i=r.data(`_origAriaLabelledBy`);i===t?r.removeAttr(`aria-label`):(r.attr(`aria-labelledby`,i),r.removeData(`_origAriaLabelledBy`))}},_mobile:function(){var e=this.popup,t=c.mobileOS;e.element.parents(`.km-root`).eq(0).length&&t&&(e.options.animation.open.effects=t.android||t.meego?`fadeIn`:t.ios||t.wp?`slideIn:up`:e.options.animation.open.effects)},_span:function(){var e=this,t=e.wrapper,r=`span.k-input-value-text`,i=n.guid(),o=e.options,s=t.find(r),c;s[0]||(c=a.renderButton(`<button role="button" tabindex="-1" class="k-input-button" aria-label="select"></button>`,{icon:`chevron-down`,size:o.size,fillMode:o.fillMode,shape:`none`}),t.append(`<span id="`+i+`" unselectable="on" class="k-input-inner"><span class="k-input-value-text"></span></span>`).append(c).append(e.element),s=t.find(r)),e.span=s,e._arrow=t.find(`.k-input-button`),e._arrowIcon=e._arrow.find(`.k-icon,.k-svg-icon`)},_wrapper:function(){var e=this,t=e.element,n=t[0],r=t.parent();r.is(`span.k-picker`)||(r=t.wrap(`<span />`).parent(),r[0].style.cssText=n.style.cssText,r[0].title=n.title),e._focused=e.wrapper=r.addClass(`k-picker k-dropdownlist`).addClass(n.className).removeClass(`input-validation-error`).css(`display`,``).attr({accesskey:t.attr(`accesskey`),unselectable:`on`,role:`combobox`,"aria-expanded":!1}),t.hide().removeAttr(`accesskey`)},_clearSelection:function(e){this.select(e.value()?0:-1)},_openHandler:function(e){this._adjustListWidth(),this.trigger(D)?e.preventDefault():(this.wrapper.attr(`aria-expanded`,!0),this.list.find(`.k-list-ul`).attr(`aria-hidden`,!1))},_closeHandler:function(e){this.trigger(O)?e.preventDefault():(this.wrapper.attr(`aria-expanded`,!1),this.list.find(`.k-list-ul`).attr(`aria-hidden`,!0))},_inputTemplate:function(){var e=this,t=e.options.valueTemplate;if(t=t?n.template(t):t=>r(e._text(t)),e.valueTemplate=t,e.hasOptionLabel()&&!e.options.optionLabelTemplate)try{e.valueTemplate(e._optionLabelDataItem())}catch(e){throw Error(E,{cause:e})}},_textAccessor:function(n){var r=null,i=this.valueTemplate,a=this._optionLabelText(),o=this.span;if(n===t)return o.text();e.isPlainObject(n)||n instanceof u?r=n:a&&a===n&&(r=this.options.optionLabel),r||=this._assignInstance(n,this._accessor()),this.hasOptionLabel()&&(r===a||this._text(r)===a)&&(i=this.optionLabelTemplate,typeof this.options.optionLabel==`string`&&!this.options.optionLabelTemplate&&(r=a));try{o.html(i(r))}catch{o.html(``)}},_preselect:function(e,t){!e&&!t&&(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var n=this.options.dataTextField,r={};return n?(A(r,n.split(`.`),e),A(r,this.options.dataValueField.split(`.`),t),r=new u(r)):r=e,r}});function A(e,t,n){for(var r=0,i=t.length-1,a;r<i;++r)a=t[r],a in e||(e[a]={}),e=e[a];e[t[i]]=n}function j(e,t){return e>=t&&(e-=t),e}function M(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}i.plugin(k),n.cssProperties.registerPrefix(`DropDownList`,`k-picker-`),n.cssProperties.registerValues(`DropDownList`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}])})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui,i=r.Widget,a=n.isFunction,o=e.extend,s=`horizontal`,c=`vertical`,l=`start`,u=`resize`,d=`resizeend`,f=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()==c?c:s,n._positionMouse=n.orientation==s?`x`:`y`,n._position=n.orientation==s?`left`:`top`,n._sizingDom=n.orientation==s?`outerWidth`:`outerHeight`,n.draggable=new r.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:n._resize.bind(n),dragcancel:n._cancel.bind(n),dragstart:n._start.bind(n),dragend:n._dragend.bind(n),clickMoveClick:t.clickMoveClick}),n.userEvents=n.draggable.userEvents,i.fn.endInit.call(n)},events:[u,d,l],options:{name:`Resizable`,orientation:s,clickMoveClick:!1},resize:function(){},_max:function(e){var n=this,r=n.hint?n.hint[n._sizingDom]():0,i=n.options.max;return a(i)?i(e):i===t?i:n._initialElementPosition+i-r},_min:function(e){var n=this,r=n.options.min;return a(r)?r(e):r===t?r:n._initialElementPosition+r},_start:function(t){var n=this,r=n.options.hint,i=e(t.currentTarget);n._initialElementPosition=i.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,r&&(n.hint=a(r)?e(r(i)):r,n.hint.css({position:`absolute`}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(l,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css(`cursor`,i.css(`cursor`))},_resize:function(e){var n=this,r=n._maxPosition,i=n._minPosition,a=n._initialElementPosition+(e[n._positionMouse].location-n._initialMousePosition),s=i===t?a:Math.max(i,a);n.position=s=r===t?s:Math.min(r,s),n.hint&&n.hint.toggleClass(n.options.invalidClass||``,s==r||s==i).css(n._position,s),n.resizing=!0,n.trigger(u,o(e,{position:s}))},_dragend:function(e){this._stop(),this.trigger(d,o(e,{position:this.position}))},_stop:function(){var t=this;t.hint&&t.hint.remove(),t.resizing=!1,e(document.body).css(`cursor`,``)},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop())},destroy:function(){var e=this;i.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,r=n._position,i=n.targetPosition,a=n.position;a===t&&(a=i[r]),i[r]=a+e,n.userEvents.move(i.left,i.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)})(window.kendo.jQuery),kendo,(function(e,t){var n=window.kendo,r=n.ui.Widget,i=n.ui.Popup.TabKeyTrap,a=n.ui.Draggable,o=e.isPlainObject,s=n._activeElement,c=n._outerWidth,l=n._outerHeight,u=e.extend,d=e.each,f=n.template,p=`body`,m,h=`.kendoWindow`,g=`.kendoWindowModal`,_=`.k-window`,v=`.k-window-title`,y=v+`bar`,b=`.k-window-content`,x=`.k-dialog-content`,S=`.k-resize-handle`,C=`.k-overlay`,w=`k-window-minimized`,T=`k-content-frame`,E=`k-i-loading`,D=`k-hover`,O=`k-focus`,k=`k-window-maximized`,A=`k-display-inline-flex`,j=`:visible`,M=`k-hidden`,N=`hidden`,P=`cursor`,F=`open`,I=`activate`,L=`deactivate`,R=`close`,z=`refresh`,ee=`minimize`,B=`maximize`,V=`resizeStart`,H=`resize`,te=`resizeEnd`,ne=`dragstart`,U=`dragend`,W=`restore`,G=`kendoKeydown`,K=`error`,re=`overflow`,q=`original-overflow-rule`,ie=`zIndex`,J=`.k-window-titlebar-actions [ref-window-minimize],.k-window-titlebar-actions [ref-window-maximize]`,ae=`[ref-window-pin]`,oe=`[ref-window-unpin]`,se=ae+`,`+oe,Y=`.k-window-titlebar .k-window-titlebar-action`,ce=`.k-window-titlebar [ref-window-refresh]`,le={close:`_close`,maximize:`maximize`,minimize:`minimize`,restore:`restore`,refresh:`refresh`,pin:`pin`,unpin:`unpin`},ue=`WindowEventsHandled`,X=/^0[a-z]*$/i,de=n.isLocalUrl,fe={small:`k-window-sm`,medium:`k-window-md`,large:`k-window-lg`};function pe(e){return e!==void 0}function me(e,t){return parseInt(e.css(t),10)||0}function he(e,t,n){return e&&isNaN(e)&&e.toString().indexOf(`px`)<0?e:Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),t===-1/0?t:parseInt(t,10))}function ge(){return!this.type||this.type.toLowerCase().indexOf(`script`)>=0}function _e(t){for(var n={top:t.offsetTop,left:t.offsetLeft},r=t.offsetParent;r;){n.top+=r.offsetTop,n.left+=r.offsetLeft;var i=e(r).css(`overflowX`),a=e(r).css(`overflowY`);(a===`auto`||a===`scroll`)&&(n.top-=r.scrollTop),(i===`auto`||i===`scroll`)&&(n.left-=r.scrollLeft),r=r.offsetParent}return n}var ve=r.extend({init:function(a,s){var c=this,l,u={},d,f,p,m,g,S,C,w=s&&s.actions&&!s.actions.length,E;r.fn.init.call(c,a,s),s=c.options,p=s.position,a=c.element,m=s.content,C=e(window),w&&(s.actions=[]),c.appendTo=e(s.appendTo),c.containment=s.draggable.containment?e(s.draggable.containment).first():null,m&&!o(m)&&(m=s.content={url:m}),a.find(`script`).filter(ge).remove(),!a.parent().is(c.appendTo)&&!c.containment&&(p.top===t||p.left===t)&&(a.is(j)?u=a.offset():(d=a.css(`visibility`),f=a.css(`display`),a.css({visibility:N,display:``}),u=document.body.contains(a[0])?a.offset():{top:0,left:0},a.css({visibility:d,display:f})),p.top===t&&(p.top=u.top),p.left===t&&(p.left=u.left)),(!pe(s.visible)||s.visible===null)&&(s.visible=a.is(j)),l=c.wrapper=a.closest(_),(!a.is(`.k-window-content`)||!l[0])&&(a.addClass(`k-window-content`),a.attr(`tabindex`,0),c._createWindow(a,s),l=c.wrapper=a.closest(_),c.title(c.options.title),c._dimensions(),s._footerTemplate&&c.wrapper.append(n.template(s._footerTemplate)(s._footerMessages))),c.minTop=c.minLeft=-1/0,c.maxTop=c.maxLeft=1/0,c._position(),m&&c.refresh(m),s.visible&&c.toFront(null,!s.modal),g=l.children(b),s.visible&&s.modal&&c._overlay(l.is(j)).css({opacity:.5}),l.on(`mouseenter`+h,Y,c._buttonEnter.bind(c)).on(`mouseleave`+h,Y,c._buttonLeave.bind(c)).on(`click`+h,`> `+Y,c._windowActionHandler.bind(c)).on(`keydown`+h,c,c._keydown.bind(c)).on(`focus`+h,c._focus.bind(c)).on(`blur`+h,c._blur.bind(c)),g.on(`keydown`+h,c,c._keydownContent.bind(c)),S=g.find(`.`+T)[0],S&&!C.data(ue)&&(C.on(`blur`+h,function(){var t=e(document.activeElement).parent(b);t.length&&n.widgetInstance(t)._focus()}),C.on(`focus`+h,function(){e(b).not(x).each(function(t,r){n.widgetInstance(e(r))._blur()})}),C.data(ue,!0)),this._resizable(),this._draggable(),s.pinned&&this.wrapper.is(`:visible`)&&c.pin(),E=a.attr(`id`),E&&(E+=`_wnd_title`,l.attr({role:`dialog`,"aria-labelledby":E}).children(y).children(v).attr(`id`,E)),l.add(l.children(`.k-resize-handle,`+y)).on(n.support.mousedown+h,c.toFront.bind(c)),c.touchScroller=n.touchScroller(a),c._resizeHandler=c._onDocumentResize.bind(c),c._marker=n.guid().substring(0,8),e(window).on(`resize`+h+c._marker,c._resizeHandler),s.visible&&(c.trigger(F),c.trigger(I)),n.notify(c),this.options.modal&&(this._tabKeyTrap=new i(l),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return l.data(`isFront`)}),c._showWatermarkOverlay&&c._showWatermarkOverlay(c.wrapper[0]),r.fn.endInit.call(this)},_buttonEnter:function(t){e(t.currentTarget).addClass(D)},_buttonLeave:function(t){e(t.currentTarget).removeClass(D)},_focus:function(){this.wrapper.addClass(O)},_blur:function(){this.wrapper.removeClass(O)},_dimensions:function(){var e=this.wrapper,n=this.options,r=n.width,i=n.height,a=n.maxHeight,o=n.size,s=[`minWidth`,`minHeight`,`maxWidth`,`maxHeight`],c=e.css(`box-sizing`)==`content-box`,l=c?me(e,`border-left-width`)+me(e,`border-right-width`):0,u=c?me(e,`border-top-width`)+me(e,`border-bottom-width`):0,d=c?me(e,`padding-top`):0;if(this.containment&&!this._isPinned){var f=this._userMaxHeight===t?a:this._userMaxHeight,p=this._userMaxWidth===t?n.maxWidth:this._userMaxWidth;f=f===1/0?1/0:parseInt(f,10),p=p===1/0?1/0:parseInt(p,10),this._userMaxHeight=f,this._userMaxWidth=p,this._tbBorderOffset=u+d,this._lrBorderOffset=l,this._updateBoundaries(),n.maxHeight=Math.min(this.containment.height-this._tbBorderOffset,f),n.maxWidth=Math.min(this.containment.width-this._lrBorderOffset,p)}for(var m=0;m<s.length;m++){var h=n[s[m]]||``;h!=1/0&&e.css(s[m],h)}a!=1/0&&this.element.css(`maxHeight`,a),r?e.outerWidth(he(r,n.minWidth,n.maxWidth)):e.outerWidth(``),i?e.outerHeight(he(i,n.minHeight,n.maxHeight)):e.outerHeight(``),n.visible||e.removeClass(A).hide(),o&&fe[o]&&e.addClass(fe[o])},_position:function(){var e=this.wrapper,t=this.options.position,n,r;this._updateBoundaries(),this.containment&&(t.top=t.top||0,t.left=t.left||0,n=t.top.toString().indexOf(`%`)>0?parseInt(this.containment.height*(parseFloat(t.top)/100),10):t.top,r=t.left.toString().indexOf(`%`)>0?parseInt(this.containment.width*(parseFloat(t.left)/100),10):t.left,t.top=he(n,this.minTop,this.maxTop),t.left=he(r,this.minLeft,this.maxLeft)),t.top&&t.top.toString().indexOf(`px`)>0&&(t.top=Number(t.top.replace(`px`,``))),t.left&&t.left.toString().indexOf(`px`)>0&&(t.left=Number(t.left.replace(`px`,``))),t.top===0&&(t.top=t.top.toString()),t.left===0&&(t.left=t.left.toString()),e.css({top:t.top||``,left:t.left||``})},_updateBoundaries:function(){var e=this.containment;if(!e)return null;e.width=e.innerWidth(),e.height=e.innerHeight(),parseInt(e.width,10)>e[0].clientWidth&&(e.width-=n.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=n.support.scrollbar()),e.position=_e(e[0]),this._isPinned?(this.minTop=this.minLeft=-1/0,this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-c(this.wrapper,!0),this.maxTop=this.minTop+e.height-l(this.wrapper,!0),this._userMaxHeight!==t&&(this.options.maxHeight=Math.min(e.height-(this._tbBorderOffset||0),this._userMaxHeight),this.options.maxWidth=Math.min(e.width-(this._lrBorderOffset||0),this._userMaxWidth),this.wrapper.css({maxHeight:this.options.maxHeight,maxWidth:this.options.maxWidth})))},_animationOptions:function(e){var t=this.options.animation;return t&&t[e]||{open:{effects:{}},close:{hide:!0,effects:{}}}[e]},_resize:function(){n.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&=(n.off(`dblclick`+h).children(S).remove(),this.resizing.destroy(),null),t&&(n.on(`dblclick`+h,y,(function(t){e(t.target).closest(`.k-window-titlebar-action`).length||this.toggleMaximization()}).bind(this)),d(`n e s w se sw ne nw`.split(` `),function(e,t){n.append(m.resizeHandle(t))}),this.resizing=new ye(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&=(this.dragging.destroy(),null),e&&(this.dragging=new be(this,e.dragHandle||y,e.clickMoveClick))},_actions:function(){var t=this.options,r=t.actions,i=t.pinned,a=this.wrapper.children(y).find(`.k-window-titlebar-actions`),o=[`minimize`,`maximize`],s={maximize:`window`,refresh:`arrow-rotate-cw`,custom:`gear`},c;r=e.map(r,function(e){return e=i&&e.toLowerCase()===`pin`?`unpin`:e,c=s[e.toLowerCase()]||``,{name:o.indexOf(e.toLowerCase())>-1?`window-`+e:e,icon:e.toLowerCase()==`close`?`x`:c}}),a.html(n.render(m.action,r))},setOptions:function(t){var n=this,i=n.options.size,a=this.containment&&!n._isPinned?this.containment:e(document),o=JSON.parse(JSON.stringify(t));u(t.position,n.options.position),u(t.position,o.position),n._containerScrollTop=a.scrollTop(),n._containerScrollLeft=a.scrollLeft(),t.maxHeight&&(n._userMaxHeight=t.maxHeight===1/0?1/0:parseInt(t.maxHeight,10)),t.maxWidth&&(n._userMaxWidth=t.maxWidth===1/0?1/0:parseInt(t.maxWidth,10)),r.fn.setOptions.call(n,t);var s=n.options.scrollable!==!1;if(n.restore(),t.title!==void 0&&n.title(t.title),n.wrapper.removeClass(fe[i]),n._dimensions(),n._position(),n._resizable(),n._draggable(),n._actions(),t.modal!==void 0){var c=n.options.visible!==!1;n._enableDocumentScrolling(),n._overlay(t.modal&&c)}n.element.css(re,s?``:`hidden`)},events:[F,I,L,R,ee,B,z,W,V,H,te,ne,U,G,K],options:{name:`Window`,animation:{open:{effects:{zoom:{direction:`in`},fade:{direction:`in`}},duration:350},close:{effects:{zoom:{direction:`out`,properties:{scale:.7}},fade:{direction:`out`}},duration:350,hide:!0}},title:``,actions:[`Close`],autoFocus:!0,modal:!1,size:`auto`,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:`body`,isMaximized:!1,isMinimized:!1},_closable:function(){return e.inArray(`close`,e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydownContent:function(e){var t=this,r=n.keys;e.keyCode==r.ESC&&t._closable()&&(e.stopPropagation(),t._close(!1))},_keydown:function(e){var t=this,r=t.options,i=n.keys,a=e.keyCode,o=t.wrapper,s,c,l=10,u=r.isMaximized,d=r.isMinimized,f,p,m,h;a==i.ESC&&t._closable()&&(e.stopPropagation(),t._close(!1)),!(e.target!=e.currentTarget||t._closing)&&(e.altKey&&a==82&&t.refresh(),e.altKey&&a==80&&(t.options.pinned?t.unpin():t.pin()),e.altKey&&a==i.UP?d?(t.restore(),t.wrapper.trigger(`focus`)):u||(t.maximize(),t.wrapper.trigger(`focus`)):e.altKey&&a==i.DOWN&&(!d&&!u?(t.minimize(),t.wrapper.trigger(`focus`)):u&&(t.restore(),t.wrapper.trigger(`focus`))),s=n.getOffset(o),t.containment&&!t._isPinned&&(s=t.options.position),r.draggable&&!e.ctrlKey&&!e.altKey&&!u&&(t._updateBoundaries(),a==i.UP?(s.top=he(s.top-l,t.minTop,t.maxTop),c=o.css(`top`,s.top)):a==i.DOWN?(s.top=he(s.top+l,t.minTop,t.maxTop),c=o.css(`top`,s.top)):a==i.LEFT?(s.left=he(s.left-l,t.minLeft,t.maxLeft),c=o.css(`left`,s.left)):a==i.RIGHT&&(s.left=he(s.left+l,t.minLeft,t.maxLeft),c=o.css(`left`,s.left))),r.resizable&&e.ctrlKey&&!u&&!d&&(a==i.UP?(c=!0,p=o.outerHeight()-l):a==i.DOWN?(c=!0,p=t.containment&&!t._isPinned?Math.min(o.outerHeight()+l,t.containment.height-s.top-me(o,`padding-top`)-me(o,`borderBottomWidth`)-me(o,`borderTopWidth`)):o.outerHeight()+l):a==i.LEFT?(c=!0,f=o.outerWidth()-l):a==i.RIGHT&&(c=!0,f=t.containment&&!t._isPinned?Math.min(o.outerWidth()+l,t.containment.width-s.left-me(o,`borderLeftWidth`)-me(o,`borderRightWidth`)):o.outerWidth()+l),c&&(m=he(f,r.minWidth,r.maxWidth),h=he(p,r.minHeight,r.maxHeight),isNaN(m)||(o.outerWidth(m),t.options.width=m+`px`),isNaN(h)||(o.outerHeight(h),t.options.height=h+`px`),t.resize())),c&&e.preventDefault())},_overlay:function(t){var n=this.containment?this.containment.children(C):this.appendTo.children(C),r=this.wrapper,i=t?`inline-flex`:`none`,a=parseInt(r.css(ie),10)-1;return n.length||(n=e(`<div class='k-overlay' />`)),n.insertBefore(r[0]).css({zIndex:a,display:i}),this.options.modal.preventScroll&&!this.containment&&this._stopDocumentScrolling(),n},_actionForRef:function(e){return le[Object.keys(le).find(t=>e.is(`[ref-window-${t}]`))]},_windowActionHandler:function(t){if(!this._closing){var n=this._actionForRef(e(t.target).closest(`.k-window-titlebar-action`));if(n)return t.preventDefault(),this[n](),!1}},_modals:function(){for(var t=this,n=e(_+j),r,i=[],a=0;a<n.length;a+=1)r=t._object(e(n[a])),r&&r.options&&r.options.modal&&r.options.visible&&r.options.appendTo===t.options.appendTo&&(!r.containment||t.containment&&r.containment[0]===t.containment[0])&&i.push(r.wrapper[0]);return i.sort(function(e,t){return e.style.zIndex-t.style.zIndex}),t=null,e(i)},_object:function(e){return e.children(b).getKendoWindow()||t},center:function(){var t=this,n=t.options.position,r=t.wrapper,i=e(window),a=0,o=0,s,c;return t.options.isMaximized?t:(t.options.pinned&&!t._isPinned&&t.pin(),t.options.pinned||(a=i.scrollTop(),o=i.scrollLeft()),this.containment&&!t.options.pinned?(s=this.minTop+(this.maxTop-this.minTop)/2,c=this.minLeft+(this.maxLeft-this.minLeft)/2):(t._scrollIsAppended=!0,c=o+Math.max(0,(i.width()-r.outerWidth())/2),s=a+Math.max(0,(i.height()-r.outerHeight()-me(r,`paddingTop`))/2)),r.css({left:c,top:s}),n.top=s,n.left=c,t)},title:function(t){var r=this,i,a=!0,o=r.wrapper,s=o.children(y),c=s.children(v);return arguments.length?(e.isPlainObject(t)?(i=t.text===void 0?``:t.text,a=t.encoded!==!1):i=t,i===!1?(o.addClass(`k-window-titleless`),o.css(`padding-top`,0),s.remove()):s.length?c.html(a?n.htmlEncode(i):i):(o.prepend(m.titlebar({title:a?n.htmlEncode(i):i})),r._actions(),s=o.children(y)),r.options.title=i,r):c.html()},content:function(e,t){var r=this.wrapper.children(b),i=r.children(`.km-scroll-container`);return r=i[0]?i:r,pe(e)?(n.destroy(this.element.children()),r.empty().html(e),this):r.html()},open:function(){var t=this,r=t.wrapper,i=t.options,a=this._animationOptions(`open`),o=r.children(b),s,c,l=this.containment&&!t._isPinned?this.containment:e(document);if(!t.trigger(F)){if(t._closing&&r.kendoStop(!0,!0),t._closing=!1,t.toFront(),i.autoFocus&&t.wrapper.trigger(`focus`),i.visible=!0,i.modal){if(c=!!t._modals().length,s=t._overlay(c),s.kendoStop(!0,!0),a.duration&&n.effects.Fade&&!c){var u=n.fx(s).fadeIn();u.duration(a.duration||0),u.endValue(.5),u.play()}else s.css(`opacity`,.5);s.show(),e(window).on(`focus`+g,function(){r.data(`isFront`)&&!e(document.activeElement).closest(r).length&&t.wrapper.trigger(`focus`)})}r.is(j)||(o.css(re,N),r.css({display:`inline-flex`}),r.kendoStop().kendoAnimate({effects:a.effects,duration:a.duration,complete:this._activate.bind(this)}))}return i.isMaximized&&(t._containerScrollTop=l.scrollTop(),t._containerScrollLeft=l.scrollLeft(),t._stopDocumentScrolling()),this.options.pinned&&!this._isPinned&&this.pin(),t},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.wrapper.trigger(`focus`),this.element.css(re,e?``:`hidden`),n.resize(this.element.children()),this.trigger(I)},_removeOverlay:function(r){var i=this._modals(),a=this.options,o=a.modal&&!i.length,s=this._animationOptions(`close`);if(o){if(!r&&s.duration&&n.effects.Fade){var c=n.fx(a.modal?this._overlay(!0):e(t)).fadeOut();c.duration(s.duration||0),c.startValue(.5),c.play()}else this._overlay(!1).remove();a.modal.preventScroll&&this._enableDocumentScrolling()}else i.length&&(this._object(i.last())._overlay(!0),a.modal.preventScroll&&this._stopDocumentScrolling())},_close:function(t){var n=this,r=n.wrapper,i=n.options,a=this._animationOptions(`open`),o=this._animationOptions(`close`),s=this.containment&&!n._isPinned?this.containment:e(document),c;if(!n._closing){if(c=n.trigger(R,{userTriggered:!t}),n._closing=!c,r.is(j)&&!c){i.visible=!1,e(_).each(function(t,n){var i=e(n).children(b);n!=r&&i.find(`> .`+T).length>0&&i.children(C).remove()}),this._removeOverlay();let t=n.wrapper.find(Y);t.css(`transition`,`none`);let s=function(e){e.stopPropagation()};t.on(`transitionend`,s),r.kendoStop().kendoAnimate({effects:o.effects||a.effects,reverse:o.reverse===!0,duration:o.duration,complete:function(){t.off(`transitionend`,s),t.css(`transition`,``),n._deactivate()}}),e(window).off(g)}n.options.isMaximized&&(n._enableDocumentScrolling(),n._containerScrollTop&&n._containerScrollTop>0&&s.scrollTop(n._containerScrollTop),n._containerScrollLeft&&n._containerScrollLeft>0&&s.scrollLeft(n._containerScrollLeft)),n.options.iframe&&n.wrapper.trigger(`blur`)}},_deactivate:function(){var e=this;if(e.wrapper.removeClass(A).hide().css(`opacity`,``),e.trigger(L),e.options.modal){var t=e._object(e._modals().last());t&&t.toFront()}},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(`${Y}, :input, a, .k-input, .k-icon, .k-svg-icon, .k-svg-icon>svg, .k-svg-icon>svg>path, .k-icon-button, [role='gridcell'], .k-input-inner, .k-input-value-text`)},_shouldFocus:function(t){var n=s(),r=this.wrapper;return this.options.autoFocus&&!e(n).is(r)&&!this._actionable(t)&&(!r.find(n).length||!r.find(t).length)},toFront:function(t,n){let r=this,i=r.wrapper,a=i[0],o=r.containment&&!r._isPinned,s=this._animationOptions(`open`),c=+i.css(ie),l=c,u=t&&t.target||null,d=0;if(e(_).each(function(t,n){let r=e(n),o=r.css(ie),s=r.children(b);d=Math.max(d,+r.parent().css(ie)||0),isNaN(o)||(c=Math.max(+o,c),d&&(c=Math.max(d,c))),i.data(`isFront`,n==a),n!=a&&s.find(`.`+T).length&&!s.find(C).length&&s.append(m.overlay)}),(!i[0].style.zIndex||l<c)&&i.css(ie,c+2),r.element.find(`> .k-overlay`).remove(),r._shouldFocus(u)){n||setTimeout(function(){r.wrapper.trigger(`focus`)},s?s.duration:0);var f=o?r.containment.scrollTop():e(window).scrollTop(),p=parseInt(i.position().top,10);!r.options.pinned&&p>0&&p<f&&e(window).scrollTop(p)}return i=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?`restore`:`maximize`]()},restore:function(){var t=this,n=t.options,r=n.minHeight,i=t.restoreOptions,a,o=t.containment&&!t._isPinned?t.containment:e(document);return!n.isMaximized&&!n.isMinimized?t:(r&&r!=1/0&&t.wrapper.css(`min-height`,r),i&&!n.isMaximized&&(i.height=he(i.height,t.options.minHeight,t.options.maxHeight),a=n.position.top+parseInt(i.height,10)>t.maxTop,a&&(n.position.top=he(n.position.top,t.minTop,t.maxTop-parseInt(i.height,10)),u(i,{left:n.position.left,top:n.position.top}))),t.wrapper.css({position:n.pinned?`fixed`:`absolute`,left:i.left,top:i.top,width:i.width,height:i.height}).removeClass(k).removeClass(w).find(`.k-window-content,.k-resize-handle`).show().end().find(`[ref-window-restore]`).remove().end().find(J).show().end().find(se).show(),n.isMaximized?t.wrapper.find(`[ref-window-maximize]`).trigger(`focus`):n.isMinimized&&t.wrapper.find(`[ref-window-minimize]`).trigger(`focus`),t.options.width=i.width,t.options.height=i.height,t.options.modal.preventScroll||t._enableDocumentScrolling(),t._containerScrollTop&&t._containerScrollTop>0&&o.scrollTop(t._containerScrollTop),t._containerScrollLeft&&t._containerScrollLeft>0&&o.scrollLeft(t._containerScrollLeft),n.isMaximized=n.isMinimized=!1,t.wrapper.removeAttr(`aria-labelled-by`),t.resize(),t.trigger(W),t)},_sizingAction:function(e,t){var n=this,r=n.wrapper,i=r[0].style,a=n.options;return a.isMaximized||a.isMinimized?n:(n.restoreOptions={width:i.width,height:i.height},r.children(S).hide().end().children(y).find(J).hide().eq(0).before(m.action({name:`window-restore`})),t.call(n),n.wrapper.children(y).find(se).toggle(e!==`maximize`),n.trigger(e),r.find(`[ref-window-restore]`).trigger(`focus`),n)},maximize:function(){return this._sizingAction(`maximize`,function(){var t=this,n=t.wrapper,r=this.containment&&!t._isPinned,i=n.position(),a=e(document);u(t.restoreOptions,{left:i.left+(r?this.containment.scrollLeft():0),top:i.top+(r?this.containment.scrollTop():0)}),this._containerScrollTop=r?this.containment.scrollTop():a.scrollTop(),this._containerScrollLeft=r?this.containment.scrollLeft():a.scrollLeft(),t._stopDocumentScrolling(),n.css({top:r?this.containment.scrollTop():0,left:r?this.containment.scrollLeft():0,position:r?`absolute`:`fixed`}).addClass(k),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned){t._storeOverflowRule(n),n.css(re,N),t.wrapper.css({maxWidth:n.innerWidth(),maxHeight:n.innerHeight()});return}var r=e(`body`);t._storeOverflowRule(r),r.css(re,N);var i=e(`html`);t._storeOverflowRule(i),i.css(re,N)},_enableDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned){t._restoreOverflowRule(n),t.wrapper.css({maxWidth:n.width,maxHeight:n.height});return}t._restoreOverflowRule(e(document.body)),t._restoreOverflowRule(e(`html`))},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;typeof t==`string`&&e.data(q,t)}},_isOverflowStored:function(e){return typeof e.data(q)==`string`},_restoreOverflowRule:function(e){var n=e.data(q);n!==null&&n!==t?(e.css(re,n),e.removeData(q)):e.css(re,``)},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction(`minimize`,function(){var e=this;e.wrapper.css({height:``,minHeight:``}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr(`aria-labelled-by`,this.element.attr(`aria-labelled-by`)),this.wrapper.addClass(w),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,r=e(window),i=t.wrapper,a=t.options,o=a.position,s=this.containment?_e(i[0]).top+me(this.containment,`borderTopWidth`):me(i,`top`),c=this.containment?_e(i[0]).left+me(this.containment,`borderLeftWidth`):me(i,`left`);if(!t.options.isMaximized){o.top=s,o.left=c,t._scrollIsAppended&&(!this.containment||this.containment.css(`position`)!==`fixed`)&&(o.top-=r.scrollTop(),o.left-=r.scrollLeft(),t._scrollIsAppended=!1),i.css(u(o,{position:`fixed`}));var l=i.children(y).find(ae).eq(0);l.length>0&&(n.ui.icon(l.find(`.k-icon,.k-svg-icon`),{icon:`unpin`}),l.removeAttr(`ref-window-pin`).attr(`ref-window-unpin`,!0)),t._isPinned=!0,t.options.pinned=!0,this.containment&&(a.maxWidth=a.maxHeight=1/0,i.css({maxWidth:``,maxHeight:``}))}},unpin:function(){var t=this,r=e(window),i=t.wrapper,a=t.options,o=t.options.position,s=t.containment,c=parseInt(i.css(`top`),10)+r.scrollTop(),l=parseInt(i.css(`left`),10)+r.scrollLeft();if(!t.options.isMaximized){t._isPinned=!1,t._scrollIsAppended=!0,t.options.pinned=!1,s&&(t._updateBoundaries(),a.maxWidth=Math.min(s.width,a.maxWidth),a.maxHeight=Math.min(s.height-me(i,`padding-top`),a.maxHeight),i.css({maxWidth:a.maxWidth,maxHeight:a.maxHeight}),c=c<s.position.top?t.minTop:c>s.position.top+s.height?t.maxTop:c+s.scrollTop()-(s.position.top+me(s,`border-top-width`)),l=l<s.position.left?t.minLeft:l>s.position.left+s.width?t.maxLeft:l+s.scrollLeft()-(s.position.left+me(s,`border-left-width`))),o.top=he(c,t.minTop,t.maxTop),o.left=he(l,t.minLeft,t.maxLeft),i.css(u(o,{position:``}));var d=i.children(y).find(oe).eq(0);d.length>0&&(n.ui.icon(d.find(`.k-icon,.k-svg-icon`),{icon:`pin`}),d.removeAttr(`ref-window-unpin`).attr(`ref-window-pin`,!0))}},_onDocumentResize:function(){var t=this,r=t.wrapper,i=e(window),a=n.support.zoomLevel(),o=r.css(`box-sizing`)==`content-box`,s,c;if(t.options.isMaximized){var l=o?me(r,`border-left-width`)+me(r,`border-right-width`):0,u=o?me(r,`border-top-width`)+me(r,`border-bottom-width`):0,d=o?me(r,`padding-top`):0;t.containment&&!t._isPinned?(s=t.containment.innerWidth()-l,c=t.containment.innerHeight()-(u+d)):(s=i.width()/a-l,c=i.height()/a-(u+d)),r.css({width:s,height:c}),t.options.width=s,t.options.height=c,t.resize()}},refresh:function(t){var n=this,r=n.options,i=e(n.element),a,s,c;return o(t)||(t={url:t}),t=u(r.content,t),s=pe(r.iframe)?r.iframe:t.iframe,c=t.url,c?(pe(s)||(s=!de(c)),s?(a=i.find(`.`+T)[0],a?a.src=c:i.html(m.contentFrame(u({},r,{content:t}))),i.find(`.`+T).off(`load`+h).on(`load`+h,this._triggerRefresh.bind(this))):n._ajaxRequest(t)):(t.template&&n.content(f(t.template)({})),n.trigger(z)),i.toggleClass(`k-window-iframecontent`,!!s),n},_triggerRefresh:function(){this.trigger(z)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(ce).find(`.k-icon,.k-svg-icon`).removeClass(E)},_ajaxError:function(e,t){this.trigger(K,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=f(e)(t||{})),this.content(n,t),this.element.prop(`scrollTop`,0),this.trigger(z)}},_showLoading:function(){this.wrapper.find(ce).find(`.k-icon,.k-svg-icon`).addClass(E)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(this._showLoading.bind(this),100),e.ajax(u({type:`GET`,dataType:`html`,cache:!1,error:this._ajaxError.bind(this),complete:this._ajaxComplete.bind(this),success:this._ajaxSuccess(t.template).bind(this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(h).children(b).off(h).end().find(`.k-resize-handle,.k-window-titlebar`).off(h),e(window).off(`resize`+h+this._marker),e(window).off(g),e(window).off(h),clearTimeout(this._loadingIconTimeout),r.fn.destroy.call(this),this.unbind(t),n.destroy(this.wrapper)},destroy:function(){this._destroy(),this.options.modal&&this._removeOverlay(!0),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t=this.element,r=this.options,i,a,o=n.support.isRtl(t);r.scrollable===!1&&t.css(`overflow`,`hidden`),a=e(m.wrapper(r)),i=t.find(`iframe:not(.k-content-frame)`).map(function(){var e=this.getAttribute(`src`);return this.src=``,e}),a.toggleClass(`k-rtl`,o).attr(`tabindex`,0).append(t).find(`iframe:not(.k-content-frame)`).each(function(e){this.src=i[e]}),this.containment?this.containment.prepend(a):this.appendTo&&a.appendTo(this.appendTo),a.find(`.k-window-title`).css(o?`left`:`right`,c(a.find(`.k-window-titlebar-actions`))+10),t.css(`visibility`,``).show(),e(t).hasClass(M)&&e(t).removeClass(M),t.find(`[data-role=editor]`).each(function(){var t=e(this).data(`kendoEditor`);t&&t.refresh()}),a=t=null}});m={wrapper:f(()=>`<div class='k-window'></div>`),action:f(({name:e,icon:t})=>{let r=(t||``).toLowerCase()||e.toLowerCase(),i={close:`close`,"window-minimize":`minimize`,"window-maximize":`maximize`,"window-restore":`restore`,pin:`pin`,unpin:`unpin`,refresh:`refresh`}[e.toLowerCase()];return r==`restore`&&(r=`window-restore`),n.html.renderButton(`<button ${i?`ref-window-${i}`:``} class='k-window-titlebar-action' aria-label='${e}'></button>`,{icon:r,fillMode:`flat`,size:`xsmall`})}),titlebar:f(({title:e})=>`<div class='k-window-titlebar'><span class='k-window-title'>${e}</span><div class='k-window-titlebar-actions'></div></div>`),overlay:`<div class='k-overlay'></div>`,contentFrame:f(({title:e,content:t})=>`<iframe frameborder='0' title='${e}' class='${T}' src='${t.url}'>This page requires frames in order to show content</iframe>`),resizeHandle:f(e=>`<div aria-hidden='true' class='k-resize-handle k-resize-${e}'></div>`)};function ye(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new a(e.wrapper,{filter:`>`+S,group:e.wrapper.id+`-resizing`,dragstart:t.dragstart.bind(t),drag:t.drag.bind(t),dragend:t.dragend.bind(t)}),t._draggable.userEvents.bind(`press`,t.addOverlay.bind(t)),t._draggable.userEvents.bind(`release`,t.removeOverlay.bind(t))}ye.prototype={addOverlay:function(){this.owner.wrapper.append(m.overlay)},removeOverlay:function(){this.owner.wrapper.find(C).remove()},dragstart:function(t){var r=this,i=r.owner,a=i.wrapper;if(r._preventDragging=i.trigger(V),!r._preventDragging){r.elementPadding=parseInt(a.css(`padding-top`),10),r.initialPosition=n.getOffset(a,`position`),r.resizeDirection=t.currentTarget.prop(`className`).replace(`k-resize-handle k-resize-`,``),r.initialSize={width:a.outerWidth(),height:a.outerHeight()},i._updateBoundaries(),r.containerOffset=i.containment?i.containment.position:n.getOffset(i.appendTo);var o=a.offsetParent();if(o.is(`html`))r.containerOffset.top=r.containerOffset.left=0;else{var s=o.css(`margin-top`),c=o.css(`margin-left`);if(!X.test(s)||!X.test(c)){var l=_e(a[0]),u=l.left-r.containerOffset.left-r.initialPosition.left,d=l.top-r.containerOffset.top-r.initialPosition.top;r._relativeElMarginLeft=u>1?u:0,r._relativeElMarginTop=d>1?d:0,r.initialPosition.left+=r._relativeElMarginLeft,r.initialPosition.top+=r._relativeElMarginTop}}a.children(S).not(t.currentTarget).hide(),e(p).css(P,t.currentTarget.css(P))}},drag:function(t){if(!this._preventDragging){var r=this,i=r.owner,a=i.wrapper,o=i.options,s=o.position,c=r.resizeDirection,l=r.containerOffset,u=r.initialPosition,d=r.initialSize,f=i.containment&&!i._isPinned,p=n.support.isRtl(i.containment),m=f&&p&&i.containment.innerWidth()>i.containment.width?n.support.scrollbar():0,h=f?{top:i.containment.scrollTop(),left:i.containment.scrollLeft()}:{top:0,left:0},g,_,v,y,b=Math.max(t.x.location,0),x=Math.max(t.y.location,0);c.indexOf(`e`)>=0?(g=i.containment&&b-d.width>=i.maxLeft-h.left+l.left+m?i.maxLeft+m-u.left+d.width-h.left:b-u.left-l.left,a.outerWidth(he(g,o.minWidth,o.maxWidth))):c.indexOf(`w`)>=0&&(y=u.left+d.width+l.left,g=he(y-b,o.minWidth,o.maxWidth),s.left=y-g-l.left-m-(r._relativeElMarginLeft||0)+h.left,i.containment&&s.left<=i.minLeft&&(s.left=i.minLeft,g=he(y-m-s.left-l.left+h.left,o.minWidth,o.maxWidth)),a.css({left:s.left,width:g}));var S=x;i.options.pinned&&(S-=e(window).scrollTop()),c.indexOf(`s`)>=0?(_=S-u.top-r.elementPadding-l.top,S-d.height-r.elementPadding>=i.maxTop+l.top-h.top&&(_=i.maxTop-u.top+d.height-h.top),a.outerHeight(he(_,o.minHeight,o.maxHeight))):c.indexOf(`n`)>=0&&(v=u.top+d.height+l.top,_=he(v-S,o.minHeight,o.maxHeight),s.top=v-_-l.top-(r._relativeElMarginTop||0)+h.top,s.top<=i.minTop&&i.containment&&(s.top=i.minTop,_=he(v-s.top-l.top+h.top,o.minHeight,o.maxHeight)),a.css({top:s.top,height:_})),g&&(i.options.width=g+`px`),_&&(i.options.height=_+`px`),i.resize()}},dragend:function(t){if(!this._preventDragging){var n=this,r=n.owner,i=r.wrapper;return i.children(S).not(t.currentTarget).show(),e(p).css(P,``),r.touchScroller&&r.touchScroller.reset(),t.keyCode==27&&i.css(n.initialPosition).css(n.initialSize),r.trigger(te),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}};function be(e,t,n){var r=this,i=t;n&&(i+=`,.k-overlay`),r.owner=e,r._preventDragging=!1,r._draggable=new a(e.wrapper,{filter:t,group:e.wrapper.id+`-moving`,clickMoveClick:n,dragstart:r.dragstart.bind(r),drag:r.drag.bind(r),dragend:r.dragend.bind(r),dragcancel:r.dragcancel.bind(r)}),r._draggable.userEvents.stopPropagation=!1}be.prototype={dragstart:function(t){var r=this.owner,i=r.options.draggable,a=r.element,o=a.find(`.k-window-titlebar-actions`),s=n.getOffset(r.appendTo);this._preventDragging=r.trigger(ne)||!i,!(this._preventDragging||r.isMaximized())&&(r.initialWindowPosition=n.getOffset(r.wrapper,`position`),r.initialPointerPosition||(r.options.position.left=he(r.initialWindowPosition.left,r.minLeft,r.maxLeft),r.options.position.top=he(r.initialWindowPosition.top,r.minTop,r.maxTop)),r.initialPointerPosition={left:r.options.position.left,top:r.options.position.top},r.startPosition={left:t.x.client-r.initialWindowPosition.left,top:t.y.client-r.initialWindowPosition.top},r._updateBoundaries(),r.containment||(o.length>0?r.minLeft=c(o)+parseInt(o.css(`right`),10)-c(a):r.minLeft=20-c(a),r.minLeft-=s.left,r.minTop=-s.top),e(m.overlay).appendTo(r.wrapper).css({opacity:0}),r.wrapper.children(S).hide(),e(p).css(P,t.currentTarget.css(P)))},drag:function(t){var n=this.owner,r=n.options.position,i=n.options.draggable.axis,a,o;this._preventDragging||n.isMaximized()||((!i||i.toLowerCase()===`x`)&&(a=t.x.client-n.startPosition.left,n.containment&&!n._isPinned&&(a+=n.containment.scrollLeft()),r.left=he(a,n.minLeft,n.maxLeft)),(!i||i.toLowerCase()===`y`)&&(o=t.y.client-n.startPosition.top,n.containment&&!n._isPinned&&(o+=n.containment.scrollTop()),r.top=he(o,n.minTop,n.maxTop)),e(n.wrapper).css(`transform`,`translate(`+(r.left-n.initialPointerPosition.left)+`px, `+(r.top-n.initialPointerPosition.top)+`px)`))},_finishDrag:function(){var t=this.owner;t.wrapper.children(S).toggle(!t.options.isMinimized).end().find(C).remove(),e(p).css(P,``)},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(_).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!(this._preventDragging||t.isMaximized()))return e(t.wrapper).css(t.options.position).css(`transform`,``),this._finishDrag(),t.trigger(U),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},n.ui.plugin(ve)})(window.kendo.jQuery),kendo;var Vy=class{},Hy=class extends Vy{constructor(){super(),this._events={}}bind(e,t,n){let r=Wy(e),i=Uy(t),a=r.length;if(t===void 0){for(let t in e)this.bind(t,e[t]);return this}for(let e=0;e<a;e++){let a=r[e],o=i?t:t[a];if(o){if(n){let e=o;o=()=>{this.unbind(a,o),e.apply(this,arguments)},o.original=e}(this._events[a]=this._events[a]||[]).push(o)}}return this}one(e,t){return this.bind(e,t,!0)}first(e,t){let n=Wy(e),r=Uy(t);for(let e=0,i=n.length;e<i;e++){let i=n[e],a=r?t:t[i];a&&(this._events[i]=this._events[i]||[]).unshift(a)}return this}trigger(e,t={}){let n=this._events[e];if(n){let e=n.length;t.sender=this,t._defaultPrevented=!1,t.preventDefault=Gy,t.isDefaultPrevented=Ky,n=n.slice();for(let r=0;r<e;r++)n[r].call(this,t);return t._defaultPrevented===!0}return!1}unbind(e,t){let n=this._events[e];if(e===void 0)this._events={};else if(n)if(t)for(let e=n.length-1;e>=0;e--)(n[e]===t||n[e].original===t)&&n.splice(e,1);else this._events[e]=[];return this}};function Uy(e){return typeof e==`function`}function Wy(e){return typeof e==`string`?[e]:e}function Gy(){this._defaultPrevented=!0}function Ky(){return this._defaultPrevented===!0}let qy=e=>{let t=typeof window<`u`?window:{},n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};qy=e=>n.call(t,e),qy(e)};var Jy=qy;let Yy=/&/g,Xy=/</g,Zy=/"/g,Qy=/'/g,$y=/>/g;function eb(e){return String(e).replace(Yy,`&amp;`).replace(Xy,`&lt;`).replace($y,`&gt;`).replace(Zy,`&quot;`).replace(Qy,`&#39;`)}function tb(e){let t=window.console;t!==void 0&&t.log&&t.log(e)}function nb(e){let t={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},n={};for(let r in t)if(t.hasOwnProperty(r)){let i=e.match(t[r]);if(i){n[r]=!0,n[i[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}}return n}let rb=null,ib={get browser(){return typeof window>`u`||rb||(rb=nb(window.navigator.userAgent)),rb}},ab=Date.now||function(){return new Date().getTime()};function ob(e,t){let n=0,r;if(!t||t<=0)return e;let i=function(){let i=ab()-n,a=arguments,o=function(){e.apply(null,a),n=ab()};if(!n)return o();r&&clearTimeout(r),i>t?o():r=setTimeout(o,t-i)};return i.cancel=function(){clearTimeout(r)},i}let sb={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgrey:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,grey:`808080`,green:`008000`,greenyellow:`adff2f`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`778899`,lightslategrey:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`},cb=ib.browser,lb=e=>{let t=Object.keys(sb);t.push(`transparent`);let n=RegExp(`^(`+t.join(`|`)+`)(\\W|$)`,`i`);return lb=e=>n.exec(e),n.exec(e)};var ub=class extends Vy{constructor(){super()}toHSV(){return this}toRGB(){return this}toHex(e){return this.toBytes().toHex(e)}toBytes(){return this}toCss(e){return`#`+this.toHex(e)}toCssRgba(){let e=this.toBytes();return`rgba(${e.r}, ${e.g}, ${e.b}, ${parseFloat(Number(this.a).toFixed(3))})`}toCssHex(){return this.a===1?`#`+this.toHex():`#`+this.toHex({alpha:!0})}toDisplay(){return cb.msie&&cb.version<9?this.toCss():this.toCssRgba()}equals(e){return e===this||e!=null&&this.toCssRgba()===vb(e).toCssRgba()}diff(e){if(e===null)return NaN;let t=this.toBytes(),n=e.toBytes();return Math.sqrt(((t.r-n.r)*.3)**2+((t.g-n.g)*.59)**2+((t.b-n.b)*.11)**2)}clone(){let e=this.toBytes();return e===this&&(e=new fb(e.r,e.g,e.b,e.a)),e}},db=class extends ub{constructor(e,t,n,r){super(),this.r=e,this.g=t,this.b=n,this.a=r}toHSV(){let{r:e,g:t,b:n}=this,r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o=i,s,c;return a===0?new mb(0,0,o,this.a):(i===0?(c=0,s=-1):(c=a/i,s=e===i?(t-n)/a:t===i?2+(n-e)/a:4+(e-t)/a,s*=60,s<0&&(s+=360)),new mb(s,c,o,this.a))}toHSL(){let{r:e,g:t,b:n}=this,r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r===i)a=o=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break;default:break}}return new hb(a*60,o*100,s*100,this.a)}toBytes(){return new fb(this.r*255,this.g*255,this.b*255,this.a)}},fb=class extends db{constructor(e,t,n,r){super(Math.round(e),Math.round(t),Math.round(n),r)}toRGB(){return new db(this.r/255,this.g/255,this.b/255,this.a)}toHSV(){return this.toRGB().toHSV()}toHSL(){return this.toRGB().toHSL()}toHex(e){let t=pb(this.r,2)+pb(this.g,2)+pb(this.b,2);return e&&e.alpha&&(t+=pb(Math.round(this.a*255),2)),t}toBytes(){return this}};function pb(e,t,n=`0`){let r=e.toString(16);for(;t>r.length;)r=n+r;return r}var mb=class extends ub{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.v=n,this.a=r}toRGB(){let{h:e,s:t,v:n}=this,r,i,a;if(t===0)r=i=a=n;else{e/=60;let o=Math.floor(e),s=e-o,c=n*(1-t),l=n*(1-t*s),u=n*(1-t*(1-s));switch(o){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;default:r=n,i=c,a=l;break}}return new db(r,i,a,this.a)}toHSL(){return this.toRGB().toHSL()}toBytes(){return this.toRGB().toBytes()}},hb=class extends ub{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.l=n,this.a=r}toRGB(){let e=this.h/360,t=this.s/100,n=this.l/100,r,i,a;if(t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=gb(s,o,e+1/3),i=gb(s,o,e),a=gb(s,o,e-1/3)}return new db(r,i,a,this.a)}toHSV(){return this.toRGB().toHSV()}toBytes(){return this.toRGB().toBytes()}};function gb(e,t,n){let r=n;return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function _b(e){return parseFloat(parseFloat(parseInt(e,16)/255).toFixed(3))}function vb(e,t){let n,r;if(!e||e===`none`)return null;if(e instanceof ub)return e;let i=e.toLowerCase();if(n=lb(i))return i=n[1]===`transparent`?new db(1,1,1,0):vb(sb[n[1]],t),i.match=[n[1]],i;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new fb(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new fb(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new fb(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),_b(n[4]+n[4])):(n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new fb(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),_b(n[4])):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(i))?r=new fb(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new fb(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(i))?r=new db(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new db(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4])):(n=/^color\(\s*srgb\s*([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s*(\/\s+([0-9]*\.?[0-9]+))?\)/.exec(i))&&(r=new db(parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]),parseFloat(n[5]||`1`))),r)r.match=n;else if(!t)throw Error(`Cannot parse color: `+i);return r}var yb=class e extends Vy{constructor(t){if(super(),arguments.length===1){let n=e.formats,r=this.resolveColor(t);for(let e=0;e<n.length;e++){let t=n[e].re,i=n[e].process,a=t.exec(r);if(a){let e=i(a);this.r=e[0],this.g=e[1],this.b=e[2]}}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}toHex(){let e=this.padDigit,t=this.r.toString(16),n=this.g.toString(16),r=this.b.toString(16);return`#`+e(t)+e(n)+e(r)}resolveColor(t){let n=t||`black`;return n.charAt(0)===`#`&&(n=n.substr(1,6)),n=n.replace(/ /g,``),n=n.toLowerCase(),n=e.namedColors[n]||n,n}normalizeByte(e){return e<0||isNaN(e)?0:e>255?255:e}padDigit(e){return e.length===1?`0`+e:e}brightness(e){let t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this}percBrightness(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}isDark(){return this.percBrightness()<180}static fromBytes(e,t,n,r){return new fb(e,t,n,r??1)}static fromRGB(e,t,n,r){return new db(e,t,n,r??1)}static fromHSV(e,t,n,r){return new mb(e,t,n,r??1)}static fromHSL(e,t,n,r){return new hb(e,t,n,r??1)}};yb.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],yb.namedColors=sb;let bb=e=>e.ownerDocument.defaultView.getComputedStyle(e),xb=(e,t)=>{let n=document.createElement(`div`);e.parentElement?e.parentElement.appendChild(n):e.appendChild(n),n.style.color=`rgb(from ${t} clamp(0, r, 255) clamp(0, g, 255) clamp(0, b, 255))`;let r=vb(bb(n).color,!0);return n.remove(),r?r.toCssHex():`#000000`};function Sb(e,t){let n=bb(e).getPropertyValue(t),r=vb(n,!0);return r?r.toCssHex():xb(e,n)}var Cb=class extends Vy{observers(){return this._observers=this._observers||[],this._observers}addObserver(e){return this._observers?this._observers.push(e):this._observers=[e],this}removeObserver(e){let t=this.observers(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this}trigger(e,t){let n=this._observers;if(n&&!this._suspended)for(let r=0;r<n.length;r++){let i=n[r];i[e]&&i[e](t)}return this}optionsChange(e={}){e.element=this,this.trigger(`optionsChange`,e)}geometryChange(){this.trigger(`geometryChange`,{element:this})}suspend(){return this._suspended=(this._suspended||0)+1,this}resume(){return this._suspended=Math.max((this._suspended||0)-1,0),this}_observerField(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}};let wb={}.toString;var Tb=class e extends Cb{constructor(e,t=``){super(),this.prefix=t;for(let t in e){let n=e[t];n=this._wrap(n,t),this[t]=n}}get(e){let t=e.split(`.`),n=this;for(;t.length&&n;){let e=t.shift();n=n[e]}return n}set(e,t){this.get(e)!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))}_set(t,n){let r=t.indexOf(`.`)>=0,i=this,a=t;if(r){let t=a.split(`.`),n=this.prefix;for(;t.length>1;){a=t.shift(),n+=a+`.`;let r=i[a];r||(r=new e({},n),r.addObserver(this),i[a]=r),i=r}a=t[0]}i._clear(a),i[a]=n}_clear(e){let t=this[e];t&&t.removeObserver&&t.removeObserver(this)}_wrap(t,n){let r=wb.call(t),i=t;return i!=null&&r===`[object Object]`&&(!(t instanceof e)&&!(t instanceof Vy)&&(i=new e(i,this.prefix+n+`.`)),i.addObserver(this)),i}};function Eb(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function Db(e){return function(){return this[e]}}function Ob(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=r.charAt(0).toUpperCase()+r.substring(1,r.length);e[`set`+i]=Eb(r),e[`get`+i]=Db(r)}}let kb=(e,t)=>{let n=class extends e{};return Ob(n.prototype,t),n};function Ab(e,t){return e.push.apply(e,t),e}let jb={1:`i`,10:`x`,100:`c`,2:`ii`,20:`xx`,200:`cc`,3:`iii`,30:`xxx`,300:`ccc`,4:`iv`,40:`xl`,400:`cd`,5:`v`,50:`l`,500:`d`,6:`vi`,60:`lx`,600:`dc`,7:`vii`,70:`lxx`,700:`dcc`,8:`viii`,80:`lxxx`,800:`dccc`,9:`ix`,90:`xc`,900:`cm`,1e3:`m`};function Mb(e){let t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n=``;for(;e>0;)e<t[0]?t.shift():(n+=jb[t[0]],e-=t[0]);return n}function Nb(){let e,t,n=new Promise((r,i)=>{e=e=>(n._state=`resolved`,r(e),n),t=e=>(n._state=`rejected`,i(e),n)});return n._state=`pending`,n.resolve=e,n.reject=t,n.state=()=>n._state,n}let Pb=1;function Fb(){return`kdef`+Pb++}let Ib=Math.PI/180,Lb=Number.MAX_VALUE,Rb=-Number.MAX_VALUE;function zb(e){return e/Ib}let Bb=String.fromCharCode;function Vb(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296<=r&&r<=56319){let t=r,i=e.charCodeAt(++n);isNaN(i)||(r=(t-55296)*1024+(i-56320)+65536)}r<128?t+=Bb(r):r<2048?(t+=Bb(192|r>>>6),t+=Bb(128|r&63)):r<65536?(t+=Bb(224|r>>>12),t+=Bb(128|r>>>6&63),t+=Bb(128|r&63)):r<1114111&&(t+=Bb(240|r>>>18),t+=Bb(128|r>>>12&63),t+=Bb(128|r>>>6&63),t+=Bb(128|r&63))}return t}function Hb(e){return Bb(e>>8)+Bb(e&255)}function Ub(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<65535)t+=Hb(r);else{let e=(r-65536>>10)+55296,n=(r-65536&1023)+56320;t+=Hb(e),t+=Hb(n)}}return t}let Wb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function Gb(e){let t=``,n=0,r=Vb(e);for(;n<r.length;){let e=r.charCodeAt(n++),i=r.charCodeAt(n++),a=r.charCodeAt(n++),o=e>>2,s=(e&3)<<4|i>>4,c=(i&15)<<2|a>>6,l=a&63;isNaN(i)?c=l=64:isNaN(a)&&(l=64),t=t+Wb.charAt(o)+Wb.charAt(s)+Wb.charAt(c)+Wb.charAt(l)}return t}function Kb(e){return(e.x||{}).location===void 0?{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}:{x:e.x.location,y:e.y.location}}function qb(e={}){return e.touch?e.touch.initialTouch:e.target}function Jb(e){return e===``||e===null||e===`none`||e===`transparent`||e===void 0}function Yb(e){if(e)return e[e.length-1]}function Xb(e,t,n){return Math.max(Math.min(e,n),t)}function Zb(e,t){if(e.length<2)return e.slice();function n(e,n){for(var r=[],i=0,a=0,o=0;i<e.length&&a<n.length;)t(e[i],n[a])<=0?r[o++]=e[i++]:r[o++]=n[a++];return i<e.length&&r.push.apply(r,e.slice(i)),a<n.length&&r.push.apply(r,n.slice(a)),r}return(function e(t){if(t.length<=1)return t;var r=Math.floor(t.length/2),i=t.slice(0,r),a=t.slice(r);return i=e(i),a=e(a),n(i,a)})(e)}function Qb(e){return Promise.all(e)}function $b(e){return e*Ib}function ex(e){return e?10**e:1}function tx(e,t){let n=ex(t);return Math.round(e*n)/n}function nx(e,t){return e===void 0?t:e}function rx(e,t){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.addEventListener(r[i],t[n],!1)}}function ix(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function ax(e,t){let n={},r=window.getComputedStyle(e)||{},i=Array.isArray(t)?t:[t];for(let e=0;e<i.length;e++){let t=i[e];n[t]=r[t]}return n}function ox(e){return isNaN(e)?e:e+`px`}function sx(e,t){if(t){let{width:n,height:r}=t;n!==void 0&&(e.style.width=ox(n)),r!==void 0&&(e.style.height=ox(r))}else{let t=ax(e,[`width`,`height`]);return{width:parseInt(t.width,10),height:parseInt(t.height,10)}}}function cx(e,t={}){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.removeEventListener(r[i],t[n],!1)}}function lx(e){let{paddingLeft:t,paddingTop:n}=ax(e,[`paddingLeft`,`paddingTop`]);return{top:parseFloat(n),left:parseFloat(t)}}var ux=class e extends Vy{constructor(e=0,t=0,n=0,r=0,i=0,a=0){super(),this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a}multiplyCopy(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}invert(){let{a:t,b:n,c:r,d:i,e:a,f:o}=this,s=t*i-n*r;return s===0?null:new e(i/s,-n/s,-r/s,t/s,(r*o-i*a)/s,(n*a-t*o)/s)}clone(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)}equals(e){return e?this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f:!1}round(e){return this.a=tx(this.a,e),this.b=tx(this.b,e),this.c=tx(this.c,e),this.d=tx(this.d,e),this.e=tx(this.e,e),this.f=tx(this.f,e),this}toArray(e){let t=[this.a,this.b,this.c,this.d,this.e,this.f];if(e!==void 0)for(let n=0;n<t.length;n++)t[n]=tx(t[n],e);return t}toString(e,t=`,`){return this.toArray(e).join(t)}static translate(t,n){return new e(1,0,0,1,t,n)}static unit(){return new e(1,0,0,1,0,0)}static rotate(t,n,r){let i=new e;return i.a=Math.cos($b(t)),i.b=Math.sin($b(t)),i.c=-i.b,i.d=i.a,i.e=n-n*i.a+r*i.b||0,i.f=r-r*i.a-n*i.b||0,i}static scale(t,n){return new e(t,0,0,n,0,0)}};ux.IDENTITY=ux.unit();let dx=/matrix\((.*)\)/;function fx(e){let t=e.match(dx);return t===null||t.length!==2?ux.unit():new ux(...t[1].split(`,`).map(e=>parseFloat(e)))}function px(e){let t=getComputedStyle(e).transform;return t===`none`?ux.unit():fx(t)}function mx(e){if(!e)return ux.unit();let t=px(e),n=e.parentElement;for(;n;){let e=px(n);t=t.multiplyCopy(e),n=n.parentElement}return t.b=t.c=t.e=t.f=0,t}var hx=class extends Vy{constructor(e){super(),this._size=e,this._length=0,this._map={}}put(e,t){let n=this._map,r={key:e,value:t};n[e]=r,this._head?(this._tail.newer=r,r.older=this._tail,this._tail=r):this._head=this._tail=r,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++}get(e){let t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}};let gx=/\r?\n|\r|\t/g;function _x(e){return String(e).replace(gx,` `)}function vx(e){let t=[];for(let n in e)t.push(n+e[n]);return t.sort().join(``)}function yx(e){let t=2166136261;for(let n=0;n<e.length;++n)t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t^=e.charCodeAt(n);return t>>>0}function bx(){return{width:0,height:0,baseline:0}}let xx={baselineMarkerSize:1},Sx;typeof document<`u`&&(Sx=document.createElement(`div`),Sx.style.setProperty(`position`,`absolute`,`important`),Sx.style.setProperty(`top`,`-4000px`,`important`),Sx.style.setProperty(`width`,`auto`,`important`),Sx.style.setProperty(`height`,`auto`,`important`),Sx.style.setProperty(`padding`,`0`,`important`),Sx.style.setProperty(`margin`,`0`,`important`),Sx.style.setProperty(`border`,`0`,`important`),Sx.style.setProperty(`line-height`,`normal`,`important`),Sx.style.setProperty(`visibility`,`hidden`,`important`),Sx.style.setProperty(`white-space`,`pre`,`important`));var Cx=class extends Vy{constructor(e){super(),this._cache=new hx(1e3),this.options=Object.assign({},xx,e)}measure(e,t,n={}){if(e==null)return bx();let r=yx(e+vx(t)),i=this._cache.get(r);if(i)return i;let a=bx(),o=n.box||Sx,s=this._baselineMarker().cloneNode(!1);for(let e in t){let n=t[e];n!==void 0&&(o.style[e]=n)}let c=n.normalizeText===!1?String(e):_x(e);return o.textContent=c,o.appendChild(s),document.body.appendChild(o),c.length&&(a.width=o.offsetWidth-this.options.baselineMarkerSize,a.height=o.offsetHeight,a.baseline=s.offsetTop+this.options.baselineMarkerSize),a.width>0&&a.height>0&&this._cache.put(r,a),o.parentNode.removeChild(o),a}_baselineMarker(){let e=document.createElement(`div`);return e.style.display=`inline-block`,e.style.verticalAlign=`baseline`,e.style.width=this.options.baselineMarkerSize+`px`,e.style.height=this.options.baselineMarkerSize+`px`,e.style.overflow=`hidden`,e}};Cx.current=new Cx;function wx(e,t,n){return Cx.current.measure(e,t,n)}let Tx=()=>typeof window<`u`,Ex={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)(\.(\d+(\.\d+)?))?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},Dx={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},Ox={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i},kx={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i},Ax=(e,t,n)=>{for(let n in t)if(t.hasOwnProperty(n)&&t[n].test(e))return n;return n===void 0?e:n},jx=e=>{let t,n=[];for(let r in Ex)if(Ex.hasOwnProperty(r)){if(n=e.match(Ex[r]),!n)continue;if(r===`windows`&&`plugins`in window.navigator)return null;let i={};return i.device=r,i.browser=Ax(e,kx,`default`),i.name=Ax(r,Dx),i[i.name]=!0,i.majorVersion=n[2],i.minorVersion=n[3]?n[3].replace(`_`,`.`):`.0`,t=i.minorVersion.replace(`.`,``).substr(0,2),i.flatVersion=i.majorVersion+t+Array(3-(t.length<3?t.length:2)).join(`0`),i.cordova=!0,i.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||i.cordova,i}return null},Mx=e=>{let t=null,n=[];for(let r in Ox)if(Ox.hasOwnProperty(r)&&(n=e.match(Ox[r]),n)){t={},t[r]=!0,t[n[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,t.version=parseInt(document.documentMode||n[2],10);break}return t},Nx=Tx()&&window.navigator?window.navigator.userAgent:null,Px=Nx?Mx(Nx):null;Nx&&jx(Nx),Tx()&&`ontouchstart`in window,Px&&!Px.chrome&&window.MSPointerEvent,Px&&!Px.chrome&&window.PointerEvent;let Fx={};Fx.undefined=e=>e;let Ix={};Ix.undefined=e=>e;let Lx=/\/\*[\s\S]*?\*\//g,Rx=/([^\s:;]+?)\s*:\s*((?:(?:url\(\s*(?:(?:[^"')\\]|\\.)*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*\)|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^;"'])*?)\s*)(?=;|$)/gi,zx=/&quot;|&#34;|&#x22;/gi,Bx=/&apos;|&#39;|&#x27;/gi;function Vx(e){return e.replace(zx,`"`).replace(Bx,`'`)}function Hx(e){let t={},n=Vx((e||``).replace(Lx,``)),r=Rx.exec(n),i,a;for(;r!==null;)i=r[1].trim(),a=r[2].trim(),t[i]=a,r=Rx.exec(n);return t}let Ux=(e,t)=>{let n=Hx(t);Object.keys(n).forEach(t=>{e.style[t]=n[t]})},Wx=`data-style`,Gx=e=>(e||``).replace(/\sstyle=/g,` data-style=`),Kx=e=>{Array.from(e.querySelectorAll(`[data-style]`)).forEach(e=>{let t=e.getAttribute(Wx);e.removeAttribute(Wx),Ux(e,t)})},qx=(e,t)=>{e.innerHTML=Gx(t),Kx(e)},Jx=(e,t)=>{let n=document.createElement(`div`);qx(n,t),n.firstElementChild&&e.insertBefore(n.firstElementChild,e.firstChild)};function Yx(e){return e&&typeof e.matrix==`function`?e.matrix():e}var Q=class e extends kb(Cb,[`x`,`y`]){constructor(e,t){super(),this.x=e||0,this.y=t||0}equals(e){return e&&e.x===this.x&&e.y===this.y}clone(){return new e(this.x,this.y)}rotate(t,n){let r=e.create(n)||e.ZERO;return this.transform(ux.rotate(t,r.x,r.y))}translate(e,t){return this.x+=e,this.y+=t,this.geometryChange(),this}translateWith(e){return this.translate(e.x,e.y)}move(e,t){return this.x=this.y=0,this.translate(e,t)}scale(e,t=e){return this.x*=e,this.y*=t,this.geometryChange(),this}scaleCopy(e,t){return this.clone().scale(e,t)}transform(e){let t=Yx(e),{x:n,y:r}=this;return this.x=t.a*n+t.c*r+t.e,this.y=t.b*n+t.d*r+t.f,this.geometryChange(),this}transformCopy(e){let t=this.clone();return e&&t.transform(e),t}distanceTo(e){let t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}round(e){return this.x=tx(this.x,e),this.y=tx(this.y,e),this.geometryChange(),this}toArray(e){let t=e!==void 0;return[t?tx(this.x,e):this.x,t?tx(this.y,e):this.y]}toString(e,t=` `){let{x:n,y:r}=this;return e!==void 0&&(n=tx(n,e),r=tx(r,e)),n+t+r}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static min(){let t=Lb,n=Lb;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.min(r.x,t),n=Math.min(r.y,n)}return new e(t,n)}static max(){let t=Rb,n=Rb;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.max(r.x,t),n=Math.max(r.y,n)}return new e(t,n)}static minPoint(){return new e(Rb,Rb)}static maxPoint(){return new e(Lb,Lb)}static get ZERO(){return new e(0,0)}},Xx=class e extends kb(Cb,[`width`,`height`]){constructor(e,t){super(),this.width=e||0,this.height=t||0}equals(e){return e&&e.width===this.width&&e.height===this.height}clone(){return new e(this.width,this.height)}toArray(e){let t=e!==void 0;return[t?tx(this.width,e):this.width,t?tx(this.height,e):this.height]}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static get ZERO(){return new e(0,0)}},Zx=class e extends Cb{constructor(e=new Q,t=new Xx,n=0){super(),this.setOrigin(e),this.setSize(t),this.setCornerRadius(n)}clone(){return new e(this.origin.clone(),this.size.clone())}equals(e){return e&&e.origin.equals(this.origin)&&e.size.equals(this.size)}setOrigin(e){return this._observerField(`origin`,Q.create(e)),this.geometryChange(),this}getOrigin(){return this.origin}setCornerRadius(e){return this.cornerRadius=Array.isArray(e)?e:[e,e],this.geometryChange(),this}getCornerRadius(){return this.cornerRadius}setSize(e){return this._observerField(`size`,Xx.create(e)),this.geometryChange(),this}getSize(){return this.size}width(){return this.size.width}height(){return this.size.height}topLeft(){return this.origin.clone()}bottomRight(){return this.origin.clone().translate(this.width(),this.height())}topRight(){return this.origin.clone().translate(this.width(),0)}bottomLeft(){return this.origin.clone().translate(0,this.height())}center(){return this.origin.clone().translate(this.width()/2,this.height()/2)}bbox(t){let n=this.topLeft().transformCopy(t),r=this.topRight().transformCopy(t),i=this.bottomRight().transformCopy(t),a=this.bottomLeft().transformCopy(t);return e.fromPoints(n,r,i,a)}transformCopy(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))}expand(e,t=e){return this.size.width+=2*e,this.size.height+=2*t,this.origin.translate(-e,-t),this}expandCopy(e,t){return this.clone().expand(e,t)}containsPoint(e){let t=this.origin,n=this.bottomRight();return!(e.x<t.x||e.y<t.y||n.x<e.x||n.y<e.y)}_isOnPath(e,t){let n=this.expandCopy(t,t),r=this.expandCopy(-t,-t);return n.containsPoint(e)&&!r.containsPoint(e)}static fromPoints(){let t=Q.min.apply(null,arguments),n=Q.max.apply(null,arguments),r=new Xx(n.x-t.x,n.y-t.y);return new e(t,r)}static union(t,n){return e.fromPoints(Q.min(t.topLeft(),n.topLeft()),Q.max(t.bottomRight(),n.bottomRight()))}static intersect(t,n){let r={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},i={left:n.topLeft().x,top:n.topLeft().y,right:n.bottomRight().x,bottom:n.bottomRight().y};if(r.left<=i.right&&i.left<=r.right&&r.top<=i.bottom&&i.top<=r.bottom)return e.fromPoints(new Q(Math.max(r.left,i.left),Math.max(r.top,i.top)),new Q(Math.min(r.right,i.right),Math.min(r.bottom,i.bottom)))}},Qx=class e extends Cb{constructor(e=ux.unit()){super(),this._matrix=e}clone(){return new e(this._matrix.clone())}equals(e){return e&&e._matrix.equals(this._matrix)}translate(e,t){return this._matrix=this._matrix.multiplyCopy(ux.translate(e,t)),this._optionsChange(),this}scale(e,t=e,n=null){let r=n;return r&&(r=Q.create(r),this._matrix=this._matrix.multiplyCopy(ux.translate(r.x,r.y))),this._matrix=this._matrix.multiplyCopy(ux.scale(e,t)),r&&(this._matrix=this._matrix.multiplyCopy(ux.translate(-r.x,-r.y))),this._optionsChange(),this}rotate(e,t){let n=Q.create(t)||Q.ZERO;return this._matrix=this._matrix.multiplyCopy(ux.rotate(e,n.x,n.y)),this._optionsChange(),this}multiply(e){let t=Yx(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this}matrix(e){return e?(this._matrix=e,this._optionsChange(),this):this._matrix}_optionsChange(){this.optionsChange({field:`transform`,value:this})}};function $x(e){return e===null?null:e instanceof Qx?e:new Qx(e)}let eS={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},tS=`butt`;var nS=class extends Cb{get nodeType(){return`Rect`}constructor(e){super(),this._initOptions(e)}_initOptions(e={}){let{clip:t,transform:n}=e;n&&(e.transform=$x(n)),t&&!t.id&&(t.id=Fb()),this.options=new Tb(e),this.options.addObserver(this)}transform(e){if(e!==void 0)this.options.set(`transform`,$x(e));else return this.options.get(`transform`)}parentTransform(){let e=this,t;for(;e.parent;){e=e.parent;let n=e.transform();n&&(t=n.matrix().multiplyCopy(t||ux.unit()))}if(t)return $x(t)}currentTransform(e=this.parentTransform()){let t=Yx(this.transform()),n=Yx(e),r;if(r=t&&n?n.multiplyCopy(t):t||n,r)return $x(r)}visible(e){return e===void 0?this.options.get(`visible`)!==!1:(this.options.set(`visible`,e),this)}clip(e){let t=this.options;return e===void 0?t.get(`clip`):(e&&!e.id&&(e.id=Fb()),t.set(`clip`,e),this)}opacity(e){return e===void 0?nx(this.options.get(`opacity`),1):(this.options.set(`opacity`,e),this)}className(e){return e===void 0?this.options.get(`className`):(this.options.set(`className`,e),this)}clippedBBox(e){let t=this._clippedBBox(e);if(t){let n=this.clip();return n?Zx.intersect(t,n.bbox(e)):t}}containsPoint(e,t){if(this.visible()){let n=this.currentTransform(t),r=e;return n&&(r=e.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(r)||this._isOnPath&&this._hasStroke()&&this._isOnPath(r)}return!1}_hasFill(){let e=this.options.fill;return e&&(e.nodeType===`Pattern`||!Jb(e.color))}_hasStroke(){let e=this.options.stroke;return e&&e.width>0&&!Jb(e.color)}_clippedBBox(e){return this.bbox(e)}};function rS(e,t,n,r){let i=0,a=0;return r&&(i=Math.atan2(r.c*n,r.a*t),r.b!==0&&(a=Math.atan2(r.d*n,r.b*t))),{x:i,y:a}}let iS=Math.PI/2;var aS=class e extends kb(Cb,[`radius`]){constructor(e=new Q,t=0){super(),this.setCenter(e),this.setRadius(t)}setCenter(e){return this._observerField(`center`,Q.create(e)),this.geometryChange(),this}getCenter(){return this.center}equals(e){return e&&e.center.equals(this.center)&&e.radius===this.radius}clone(){return new e(this.center.clone(),this.radius)}pointAt(e){return this._pointAt($b(e))}bbox(e){let t=rS(this.center,this.radius,this.radius,e),n=Q.maxPoint(),r=Q.minPoint();for(let i=0;i<4;i++){let a=this._pointAt(t.x+i*iS).transformCopy(e),o=this._pointAt(t.y+i*iS).transformCopy(e),s=new Q(a.x,o.y);n=Q.min(n,s),r=Q.max(r,s)}return Zx.fromPoints(n,r)}_pointAt(e){let{center:t,radius:n}=this;return new Q(t.x+n*Math.cos(e),t.y+n*Math.sin(e))}containsPoint(e){let{center:t,radius:n}=this;return(e.x-t.x)**2+(e.y-t.y)**2<=n**2}_isOnPath(e,t){let{center:n,radius:r}=this,i=n.distanceTo(e);return r-t<=i&&i<=r+t}};let oS=e=>class extends e{fill(e,t){let n=this.options;if(e!==void 0){if(e&&e.nodeType!==`Gradient`){let r={color:e};t!==void 0&&(r.opacity=t),n.set(`fill`,r)}else n.set(`fill`,e);return this}return n.get(`fill`)}stroke(e,t,n){return e===void 0?this.options.get(`stroke`):(this.options.set(`stroke.color`,e),t!==void 0&&this.options.set(`stroke.width`,t),n!==void 0&&this.options.set(`stroke.opacity`,n),this)}},sS=ux.IDENTITY.toString(),cS=e=>class extends e{bbox(e){let t=Yx(this.currentTransform(e)),n=t?t.toString():sS,r;this._bboxCache&&this._matrixHash===n?r=this._bboxCache.clone():(r=this._bbox(t),this._bboxCache=r?r.clone():null,this._matrixHash=n);let i=this.options.get(`stroke.width`);return i&&r&&r.expand(i/2),r}geometryChange(){delete this._bboxCache,this.trigger(`geometryChange`,{element:this})}};function lS(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,e),this.geometryChange(),this)}}function uS(e,t){for(let n=0;n<t.length;n++)e[t[n]]=lS(t[n])}let dS=(e,t=[`geometry`])=>{let n=class extends e{};return uS(n.prototype,t),n};var fS=class extends oS(cS(dS(nS))){get nodeType(){return`Circle`}constructor(e=new aS,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}rawBBox(){return this._geometry.bbox()}_bbox(e){return this._geometry.bbox(e)}_containsPoint(e){return this.geometry().containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}};function pS(e,t,n=10){return tx(Math.abs(e-t),n)===0}function mS(e,t,n){return e<t||pS(e,t,n)}function hS(e,t,n,r){let i=t.x-e.x,a=r.x-n.x,o=t.y-e.y,s=r.y-n.y,c=e.x-n.x,l=e.y-n.y,u=i*s-a*o,d=(i*l-o*c)/u,f=(a*l-s*c)/u;if(d>=0&&d<=1&&f>=0&&f<=1)return new Q(e.x+f*i,e.y+f*o)}let gS=Math.pow,_S=[`radiusX`,`radiusY`,`startAngle`,`endAngle`,`anticlockwise`];var vS=class e extends kb(Cb,_S){constructor(e=new Q,t={}){super(),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation}clone(){return new e(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})}setCenter(e){return this._observerField(`center`,Q.create(e)),this.geometryChange(),this}getCenter(){return this.center}pointAt(e){let t=this.center,n=$b(e);return new Q(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))}curvePoints(){let e=this.startAngle,t=this.anticlockwise?-1:1,n=[this.pointAt(e)],r=this._arcInterval(),i=r.endAngle-r.startAngle,a=Math.ceil(i/45),o=i/a,s=e,c;this.xRotation&&(c=$x().rotate(this.xRotation,this.center));for(let e=1;e<=a;e++){let e=s+t*o,r=this._intervalCurvePoints(s,e,c);n.push(r.cp1,r.cp2,r.p2),s=e}return n}bbox(e){let t=this._arcInterval(),n=t.startAngle,r=t.endAngle,i=rS(this.center,this.radiusX,this.radiusY,e),a=zb(i.x),o=zb(i.y),s=this.pointAt(r).transformCopy(e),c=xS(a,n),l=xS(o,n),u=this.pointAt(n).transformCopy(e),d=Q.min(u,s),f=Q.max(u,s);for(;c<r||l<r;){let t;c<r&&(t=this.pointAt(c).transformCopy(e),c+=90);let n;l<r&&(n=this.pointAt(l).transformCopy(e),l+=90),u=new Q(t.x,n.y),d=Q.min(d,u),f=Q.max(f,u)}return Zx.fromPoints(d,f)}_arcInterval(){let{startAngle:e,endAngle:t,anticlockwise:n}=this;if(n){let n=e;e=t,t=n}return(e>t||n&&e===t)&&(t+=360),{startAngle:e,endAngle:t}}_intervalCurvePoints(e,t,n){let r=this.pointAt(e),i=this.pointAt(t),a=this._derivativeAt(e),o=this._derivativeAt(t),s=($b(t)-$b(e))/3,c=new Q(r.x+s*a.x,r.y+s*a.y),l=new Q(i.x-s*o.x,i.y-s*o.y);return n&&(r.transform(n),i.transform(n),c.transform(n),l.transform(n)),{p1:r,cp1:c,cp2:l,p2:i}}_derivativeAt(e){let t=$b(e);return new Q(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))}containsPoint(e){let t=this._arcInterval(),n=t.endAngle-t.startAngle,{center:r,radiusX:i,radiusY:a}=this,o=r.distanceTo(e),s=Math.atan2(e.y-r.y,e.x-r.x),c=i*a/Math.sqrt(gS(i,2)*gS(Math.sin(s),2)+gS(a,2)*gS(Math.cos(s),2)),l=this.pointAt(this.startAngle).round(10),u=this.pointAt(this.endAngle).round(10),d=hS(r,e.round(10),l,u),f;if(n<180)f=d&&mS(r.distanceTo(d),o)&&mS(o,c);else{let n=yS(r.x,r.y,i,a,e.x,e.y);n!==360&&(n=(360+n)%360);let s=t.startAngle<=n&&n<=t.endAngle;f=s&&mS(o,c)||!s&&(!d||d.equals(e))}return f}_isOnPath(e,t){let n=this._arcInterval(),r=this.center,i=yS(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return i!==360&&(i=(360+i)%360),n.startAngle<=i&&i<=n.endAngle&&this.pointAt(i).distanceTo(e)<=t}static fromPoints(t,n,r,i,a,o,s){let c=bS({x1:t.x,y1:t.y,x2:n.x,y2:n.y,rx:r,ry:i,largeArc:a,swipe:o,rotation:s});return new e(c.center,{startAngle:c.startAngle,endAngle:c.endAngle,radiusX:c.radiusX,radiusY:c.radiusY,xRotation:c.xRotation,anticlockwise:o===0})}};function yS(e,t,n,r,i,a){let o=tx((i-e)/n,3),s=tx((a-t)/r,3);return tx(zb(Math.atan2(s,o)))}function bS(e){let{x1:t,y1:n,x2:r,y2:i,rx:a,ry:o,largeArc:s,swipe:c,rotation:l=0}=e,u=$b(l),d=Math.cos(u),f=Math.sin(u),p=d*(t-r)/2+f*(n-i)/2,m=-f*(t-r)/2+d*(n-i)/2,h=s===c?-1:1,g=p**2,_=m**2,v=a**2,y=o**2,b=g/v+_/y;b>1&&(b=Math.sqrt(g/v+_/y),a=b*a,v=a**2,o=b*o,y=o**2);let x=h*Math.sqrt((v*y-v*_-y*g)/(v*_+y*g));isNaN(x)&&(x=0);let S=a*m*x/o,C=-x*(o*p)/a,w=d*S-f*C+(t+r)/2,T=f*S+d*C+(n+i)/2,E=(p-S)/a,D=(m-C)/o,O=-(p+S)/a,k=-(m+C)/o,A=(D>=0?1:-1)*zb(Math.acos(E/Math.sqrt(E*E+D*D))),j=tx((E*O+D*k)/(Math.sqrt(E*E+D*D)*Math.sqrt(O*O+k*k)),10),M=(E*k-D*O>=0?1:-1)*zb(Math.acos(j));!c&&M>0&&(M-=360),c&&M<0&&(M+=360);let N=A+M,P=N>=0?1:-1;return N=Math.abs(N)%360*P,{center:new Q(w,T),startAngle:A,endAngle:N,radiusX:a,radiusY:o,xRotation:l}}function xS(e,t){let n=e;for(;n<t;)n+=90;return n}let SS=[].splice,CS=[].slice;var wS=class extends Cb{constructor(e=[]){super(),this.length=0,this._splice(0,e.length,e)}elements(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)}push(...e){let t=this.length,n=e.length;for(let r=0;r<n;r++)this[t+r]=e[r],e[r].addObserver(this);return this.length=t+n,this._change(),this.length}slice(){return CS.call(this)}pop(){if(this.length>0){let e=this[this.length-1];return this.length--,e.removeObserver(this),this._change(),e}}splice(e,t,...n){let r=this._splice(e,t,n);return this._change(),r}shift(){if(this.length>0){let e=this[0];for(let e=1;e<this.length;e++)this[e-1]=this[e];return this.length--,e.removeObserver(this),this._change(),e}}unshift(...e){let t=e.length;for(let e=this.length-1;e>=0;e--)this[e+t]=this[e];for(let n=0;n<t;n++)this[n]=e[n],e[n].addObserver(this);return this.length+=t,this._change(),this.length}indexOf(e){let t=this.length;for(let n=0;n<t;n++)if(this[n]===e)return n;return-1}_splice(e,t,n){let r=SS.apply(this,[e,t].concat(n));return this._clearObserver(r),this._setObserver(n),r}_add(e){this._setObserver(e),this._change()}_remove(e){this._clearObserver(e),this._change()}_setObserver(e){for(let t=0;t<e.length;t++)e[t].addObserver(this)}_clearObserver(e){for(let t=0;t<e.length;t++)e[t].removeObserver(this)}_change(){}},TS=class extends wS{_change(){this.geometryChange()}};function ES(e,t,n){let r=zb(Math.atan2(t.y-e.y,t.x-e.x));return n.transformCopy($x().rotate(-r,e)).x<e.x}function DS(e,t,n){let r=1-e;return r**3*n[0][t]+3*r**2*e*n[1][t]+3*e**2*r*n[2][t]+e**3*n[3][t]}function OS(e,t){return[-e[0][t]+3*e[1][t]-3*e[2][t]+e[3][t],3*(e[0][t]-2*e[1][t]+e[2][t]),3*(-e[0][t]+e[1][t]),e[0][t]]}var kS=class e extends Vy{constructor(e=0,t=0){super(),this.real=e,this.img=t}add(t){return new e(tx(this.real+t.real,10),tx(this.img+t.img,10))}addConstant(t){return new e(this.real+t,this.img)}negate(){return new e(-this.real,-this.img)}multiply(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)}multiplyConstant(t){return new e(this.real*t,this.img*t)}nthRoot(t){let n=Math.atan2(this.img,this.real),r=Math.sqrt(this.img**2+this.real**2)**(1/t);return new e(r*Math.cos(n/t),r*Math.sin(n/t))}equals(e){return this.real===e.real&&this.img===e.img}isReal(){return this.img===0}};function AS(e){return e<0?-1:1}function jS(e,t,n){let r=Math.sqrt(t**2-4*e*n);return[(-t+r)/(2*e),(-t-r)/(2*e)]}function MS(e,t,n,r){if(e===0)return jS(t,n,r);let i=(3*e*n-t**2)/(3*e**2),a=(2*t**3-9*e*t*n+27*e**2*r)/(27*e**3),o=(i/3)**3+(a/2)**2,s=new kS(0,1),c=-t/(3*e),l,u,d,f,p,m,h;o<0?(l=new kS(-a/2,Math.sqrt(-o)).nthRoot(3),u=new kS(-a/2,-Math.sqrt(-o)).nthRoot(3)):(l=-a/2+Math.sqrt(o),l=new kS(AS(l)*Math.abs(l)**(1/3)),u=-a/2-Math.sqrt(o),u=new kS(AS(u)*Math.abs(u)**(1/3))),d=l.add(u),m=l.add(u).multiplyConstant(-1/2),h=l.add(u.negate()).multiplyConstant(Math.sqrt(3)/2),f=m.add(s.multiply(h)),p=m.add(s.negate().multiply(h));let g=[];return d.isReal()&&g.push(tx(d.real+c,10)),f.isReal()&&g.push(tx(f.real+c,10)),p.isReal()&&g.push(tx(p.real+c,10)),g}function NS(e,t,n,r,i){let a=OS(e,r),o=MS(a[0],a[1],a[2],a[3]-t[r]),s;for(let r=0;r<o.length;r++)if(0<=o[r]&&o[r]<=1&&(s=DS(o[r],n,e),Math.abs(s-t[n])<=i))return!0}function PS(e,t,n){let r=OS(e,`x`),i=MS(r[0],r[1],r[2],r[3]-t.x),a,o,s=0;for(let r=0;r<i.length;r++)a=DS(i[r],`y`,e),o=pS(a,t.y)||a>t.y,o&&((i[r]===0||i[r]===1)&&n.bottomRight().x>t.x||0<i[r]&&i[r]<1)&&s++;return s}function FS(e,t,n){let r;if(e.x!==t.x){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y),c=i<=n.x&&n.x<a;r=o===s?n.y<=o&&c:c&&(s-o)*((e.x-t.x)*(e.y-t.y)>0?n.x-i:a-n.x)/(a-i)+o-n.y>=0}return+!!r}function IS(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,Q.create(e)),this.geometryChange(),this)}}function LS(e,t){for(let n=0;n<t.length;n++)e[t[n]]=IS(t[n])}let RS=(e,t)=>{let n=class extends e{};return LS(n.prototype,t),n},zS=[`anchor`,`controlIn`,`controlOut`];var BS=class extends RS(Cb,zS){constructor(e,t,n){super(),this.anchor(e||new Q),this.controlIn(t),this.controlOut(n)}bboxTo(e,t){let n=this.anchor().transformCopy(t),r=e.anchor().transformCopy(t),i;return i=this.controlOut()&&e.controlIn()?this._curveBoundingBox(n,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),r):this._lineBoundingBox(n,r),i}_lineBoundingBox(e,t){return Zx.fromPoints(e,t)}_curveBoundingBox(e,t,n,r){let i=[e,t,n,r],a=this._curveExtremesFor(i,`x`),o=this._curveExtremesFor(i,`y`),s=VS([a.min,a.max,e.x,r.x]),c=VS([o.min,o.max,e.y,r.y]);return Zx.fromPoints(new Q(s.min,c.min),new Q(s.max,c.max))}_curveExtremesFor(e,t){let n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:DS(n.min,t,e),max:DS(n.max,t,e)}}_curveExtremes(e,t,n,r){let i=e-3*t+3*n-r,a=-2*(e-2*t+n),o=e-t,s=Math.sqrt(a*a-4*i*o),c=0,l=1;i===0?a!==0&&(c=l=-o/a):isNaN(s)||(c=(-a+s)/(2*i),l=(-a-s)/(2*i));let u=Math.max(Math.min(c,l),0);(u<0||u>1)&&(u=0);let d=Math.min(Math.max(c,l),1);return(d>1||d<0)&&(d=1),{min:u,max:d}}_intersectionsTo(e,t){let n;return n=this.controlOut()&&e.controlIn()?PS([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):FS(this.anchor(),e.anchor(),t),n}_isOnCurveTo(e,t,n,r){if(this.bboxTo(e).expand(n,n).containsPoint(t)){let i=this.anchor(),a=this.controlOut(),o=e.controlIn(),s=e.anchor();if(r===`start`&&i.distanceTo(t)<=n)return!ES(i,a,t);if(r===`end`&&s.distanceTo(t)<=n)return!ES(s,o,t);let c=[i,a,o,s];if(NS(c,t,`x`,`y`,n)||NS(c,t,`y`,`x`,n))return!0;let l=$x().rotate(45,t),u=[i.transformCopy(l),a.transformCopy(l),o.transformCopy(l),s.transformCopy(l)];return NS(u,t,`x`,`y`,n)||NS(u,t,`y`,`x`,n)}}_isOnLineTo(e,t,n){let r=this.anchor(),i=e.anchor(),a=zb(Math.atan2(i.y-r.y,i.x-r.x));return new Zx([r.x,r.y-n/2],[r.distanceTo(i),n]).containsPoint(t.transformCopy($x().rotate(-a,r)))}_isOnPathTo(e,t,n,r){let i;return i=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,r):this._isOnLineTo(e,t,n),i}};function VS(e){let t=e.length,n=Lb,r=Rb;for(let i=0;i<t;i++)r=Math.max(r,e[i]),n=Math.min(n,e[i]);return{min:n,max:r}}let HS=.333;function US(e,t){let n=e.slice(0),r=[],i=n.length;if(i>2&&(WS(0,n),i=n.length),i<2||i===2&&n[0].equals(n[1]))return r;let a=n[0],o=n[1],s=n[2];for(r.push(new BS(a));a.equals(n[i-1]);)t=!0,n.pop(),i--;if(i===2){let e=XS(a,o,`x`,`y`);return Yb(r).controlOut(QS(e,a,o,`x`,`y`)),r.push(new BS(o,$S(e,a,o,`x`,`y`))),r}let c,l;if(t){a=n[i-1],o=n[0],s=n[1];let e=JS(a,o,s);c=e[1],l=e[0]}else c=QS(XS(a,o,`x`,`y`),a,o,`x`,`y`);let u=c;for(let e=0;e<=i-3;e++)if(WS(e,n),i=n.length,e+3<=i){a=n[e],o=n[e+1],s=n[e+2];let t=JS(a,o,s);Yb(r).controlOut(u),u=t[1];let i=t[0];r.push(new BS(o,i))}if(t){a=n[i-2],o=n[i-1],s=n[0];let e=JS(a,o,s);Yb(r).controlOut(u),r.push(new BS(o,e[0])),Yb(r).controlOut(e[1]),r.push(new BS(s,l))}else{let e=XS(o,s,`x`,`y`);Yb(r).controlOut(u),r.push(new BS(s,$S(e,o,s,`x`,`y`)))}return r}function WS(e,t){for(;t[e+1]&&(t[e].equals(t[e+1])||t[e+1].equals(t[e+2]));)t.splice(e+1,1)}function GS(e,t,n){let r=!1;if(e.x===t.x)r=!0;else if(t.x===n.x)(t.y<n.y&&e.y<=t.y||n.y<t.y&&t.y<=e.y)&&(r=!0);else{let i=tC(qS(e,t),n.x);!(e.y<=t.y&&n.y<=i)&&!(t.y<=e.y&&n.y>=i)&&(r=!0)}return r}function KS(e,t,n){let r=tC(qS(e,t),n.x);return e.x===t.x&&t.x===n.x||tx(r,1)===tx(n.y,1)}function qS(e,t){let n=(t.y-e.y)/(t.x-e.x);return[e.y-n*e.x,n]}function JS(e,t,n){let r=`x`,i=`y`,a=!1,o=!1,s;if(KS(e,t,n))s=XS(e,t,`x`,`y`);else{let c={x:ZS(e,t,n,`x`),y:ZS(e,t,n,`y`)};if(c.x&&c.y)s=XS(e,n,`x`,`y`),a=!0;else if(GS(e,t,n)&&(r=`y`,i=`x`),c[r])s=0;else{let a;a=n[i]<e[i]&&e[i]<=t[i]||e[i]<n[i]&&t[i]<=e[i]?nC((n[i]-e[i])*(t[r]-e[r])):-nC((n[r]-e[r])*(t[i]-e[i])),s=.01*a,o=!0}}let c=$S(s,e,t,r,i);if(o){let e=r;r=i,i=e}let l=QS(s,t,n,r,i);return a&&(YS(e,t,c,s),YS(t,n,l,s)),[c,l]}function YS(e,t,n,r){e.y<t.y?t.y<n.y?(n.x=e.x+(t.y-e.y)/r,n.y=t.y):n.y<e.y&&(n.x=t.x-(t.y-e.y)/r,n.y=e.y):n.y<t.y?(n.x=e.x-(e.y-t.y)/r,n.y=t.y):e.y<n.y&&(n.x=t.x+(e.y-t.y)/r,n.y=e.y)}function XS(e,t,n,r){let i=t[n]-e[n],a=t[r]-e[r],o;return o=i===0?0:a/i,o}function ZS(e,t,n,r){return n[r]>t[r]&&t[r]>e[r]||n[r]<t[r]&&t[r]<e[r]}function QS(e,t,n,r,i){let a=t[r],o=(n[r]-a)*HS;return eC(a+o,t[i]+o*e,r,i)}function $S(e,t,n,r,i){let a=t[r],o=n[r],s=(o-a)*HS;return eC(o-s,n[i]-s*e,r,i)}function eC(e,t,n,r){let i=new Q;return i[n]=e,i[r]=t,i}function tC(e,t){let n=e.length,r=0;for(let i=0;i<n;i++)r+=t**+i*e[i];return r}function nC(e){return e<=0?-1:1}let rC={l:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=2){let a=new Q(n[i],n[i+1]);t.isRelative&&a.translateWith(r),e.lineTo(a.x,a.y),r.x=a.x,r.y=a.y}},c:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=6){let a=new Q(n[i],n[i+1]),o=new Q(n[i+2],n[i+3]),s=new Q(n[i+4],n[i+5]);t.isRelative&&(o.translateWith(r),a.translateWith(r),s.translateWith(r)),e.curveTo(a,o,s),r.x=s.x,r.y=s.y}},v:function(e,t){let n=t.isRelative?0:t.position.x;iC(t.parameters,!0,n),this.l(e,t)},h:function(e,t){let n=t.isRelative?0:t.position.y;iC(t.parameters,!1,n),this.l(e,t)},a:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=7){let a=n[i],o=n[i+1],s=n[i+2],c=n[i+3],l=n[i+4],u=new Q(n[i+5],n[i+6]);t.isRelative&&u.translateWith(r),(r.x!==u.x||r.y!==u.y)&&(e.arcTo(u,a,o,c,l,s),r.x=u.x,r.y=u.y)}},s:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`s`||i===`c`)&&(a=Yb(Yb(e.paths).segments).controlIn());for(let i=0;i<n.length;i+=4){let o=new Q(n[i],n[i+1]),s=new Q(n[i+2],n[i+3]),c;t.isRelative&&(o.translateWith(r),s.translateWith(r)),c=a?aC(a,r):r.clone(),a=o,e.curveTo(c,o,s),r.x=s.x,r.y=s.y}},q:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=4){let a=new Q(n[i],n[i+1]),o=new Q(n[i+2],n[i+3]);t.isRelative&&(a.translateWith(r),o.translateWith(r));let s=sC(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}},t:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`q`||i===`t`)&&(a=Yb(Yb(e.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(3/2));for(let i=0;i<n.length;i+=2){let o=new Q(n[i],n[i+1]);t.isRelative&&o.translateWith(r),a=a?aC(a,r):r.clone();let s=sC(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}}};function iC(e,t,n){let r=+!t;for(let t=0;t<e.length;t+=2)e.splice(t+r,0,n)}function aC(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}let oC=1/3;function sC(e,t,n){let r=t.clone().scale(2/3);return{controlOut:r.clone().translateWith(e.scaleCopy(oC)),controlIn:r.translateWith(n.scaleCopy(oC))}}let cC=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,lC=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;function uC(e){let t=[];return e.replace(lC,function(e,n){t.push(parseFloat(n))}),t}function dC(e,t){let n=new Q,r;return t.replace(cC,(t,i,a,o)=>{let s=i.toLowerCase(),c=s===i,l=uC(a.trim());if(s===`m`&&(c?(n.x+=l[0],n.y+=l[1]):(n.x=l[0],n.y=l[1]),e.moveTo(n.x,n.y),l.length>2&&(s=`l`,l.splice(0,2))),rC[s])rC[s](e,{parameters:l,position:n,isRelative:c,previousCommand:r}),o&&o.toLowerCase()===`z`&&e.close();else if(s!==`m`)throw Error(`Error while parsing SVG path. Unsupported command: `+s);r=s}),e}function fC(e,t,n){let r;for(let i=0;i<e.length;i++){let a=e[i];if(a.visible()){let e=t?a.bbox(n):a.rawBBox();e&&(r=r?Zx.union(r,e):e)}}return r}function pC(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r];if(i.visible()){let e=i.clippedBBox(t);e&&(n=n?Zx.union(n,e):e)}}return n}let mC=e=>(...t)=>t.map(t=>t.toString(e)).join(` `),hC=(e,t)=>e.controlOut()&&t.controlIn()?`C`:`L`;var gC=class e extends oS(cS(nS)){get nodeType(){return`Path`}constructor(e){super(e),this.segments=new TS,this.segments.addObserver(this),this.options.stroke===void 0&&(this.stroke(`#000`),this.options.stroke.lineJoin===void 0&&this.options.set(`stroke.lineJoin`,`miter`))}moveTo(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this}lineTo(e,t){let n=new BS(t===void 0?e:new Q(e,t));return this.segments.push(n),this}curveTo(e,t,n){if(this.segments.length>0){let r=Yb(this.segments),i=new BS(n,t);this.suspend(),r.controlOut(e),this.resume(),this.segments.push(i)}return this}arc(e,t,n,r,i){if(this.segments.length>0){let a=Yb(this.segments).anchor(),o=$b(e),s=new vS(new Q(a.x-n*Math.cos(o),a.y-r*Math.sin(o)),{startAngle:e,endAngle:t,radiusX:n,radiusY:r,anticlockwise:i});this._addArcSegments(s)}return this}arcTo(e,t,n,r,i,a){if(this.segments.length>0){let o=Yb(this.segments).anchor(),s=vS.fromPoints(o,Q.create(e),t,n,r,i,a);this._addArcSegments(s)}return this}_addArcSegments(e){this.suspend();let t=e.curvePoints();for(let e=1;e<t.length;e+=3)this.curveTo(t[e],t[e+1],t[e+2]);this.resume(),this.geometryChange()}close(){return this.options.closed=!0,this.geometryChange(),this}rawBBox(){return this._bbox()}toString(e){let t=``,n=this.segments,r=n.length;if(r>0){let i=[],a=mC(e),o;for(let e=1;e<r;e++){let t=hC(n[e-1],n[e]);t!==o&&(o=t,i.push(t)),t===`L`?i.push(a(n[e].anchor())):i.push(a(n[e-1].controlOut(),n[e].controlIn(),n[e].anchor()))}t=`M`+a(n[0].anchor())+` `+i.join(` `),this.options.closed&&(t+=`Z`)}return t}_containsPoint(e){let t=this.segments,n=t.length,r=0,i,a;for(let o=1;o<n;o++)i=t[o-1],a=t[o],r+=i._intersectionsTo(a,e);return(this.options.closed||!t[0].anchor().equals(t[n-1].anchor()))&&(r+=FS(t[0].anchor(),t[n-1].anchor(),e)),r%2!=0}_isOnPath(e,t){let n=this.segments,r=n.length,i=t||this.options.stroke.width;if(r>1){if(n[0]._isOnPathTo(n[1],e,i,`start`))return!0;for(let t=2;t<=r-2;t++)if(n[t-1]._isOnPathTo(n[t],e,i))return!0;if(n[r-2]._isOnPathTo(n[r-1],e,i,`end`))return!0}return!1}_bbox(e){let t=this.segments,n=t.length,r;if(n===1)r=new Zx(t[0].anchor().transformCopy(e),Xx.ZERO);else if(n>0)for(let i=1;i<n;i++){let n=t[i-1].bboxTo(t[i],e);r=r?Zx.union(r,n):n}return r}static parse(e,t){return _C.parse(e,t)}static fromRect(t,n){let r=new e(n),[i,a]=t.cornerRadius;if(i===0&&a===0)r.moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();else{let{x:e,y:n}=t.origin,o=t.width(),s=t.height();i=Xb(i,0,o/2),a=Xb(a,0,s/2),r.moveTo(e+i,n).lineTo(e+o-i,n).arcTo([e+o,n+a],i,a,!1).lineTo(e+o,n+s-a).arcTo([e+o-i,n+s],i,a,!1).lineTo(e+i,n+s).arcTo([e,n+s-a],i,a,!1).lineTo(e,n+a).arcTo([e+i,n],i,a,!1)}return r}static fromPoints(t,n){if(t){let r=new e(n);for(let e=0;e<t.length;e++){let n=Q.create(t[e]);n&&(e===0?r.moveTo(n):r.lineTo(n))}return r}}static curveFromPoints(t,n){if(t){let r=US(t),i=new e(n);return i.segments.push.apply(i.segments,r),i}}static fromArc(t,n){let r=new e(n),i=t.startAngle,a=t.pointAt(i);return r.moveTo(a.x,a.y),r.arc(i,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),r}},_C=class e extends oS(cS(nS)){static parse(t,n){return dC(new e(n),t)}toString(e){let t=this.paths,n=``;if(t.length>0){let r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(e));n=r.join(` `)}return n}get nodeType(){return`MultiPath`}constructor(e){super(e),this.paths=new TS,this.paths.addObserver(this),this.options.stroke===void 0&&this.stroke(`#000`)}moveTo(e,t){let n=new gC;return n.moveTo(e,t),this.paths.push(n),this}lineTo(e,t){return this.paths.length>0&&Yb(this.paths).lineTo(e,t),this}curveTo(e,t,n){return this.paths.length>0&&Yb(this.paths).curveTo(e,t,n),this}arc(e,t,n,r,i){return this.paths.length>0&&Yb(this.paths).arc(e,t,n,r,i),this}arcTo(e,t,n,r,i,a){return this.paths.length>0&&Yb(this.paths).arcTo(e,t,n,r,i,a),this}close(){return this.paths.length>0&&Yb(this.paths).close(),this}_bbox(e){return fC(this.paths,!0,e)}rawBBox(){return fC(this.paths,!1)}_containsPoint(e){let t=this.paths;for(let n=0;n<t.length;n++)if(t[n]._containsPoint(e))return!0;return!1}_isOnPath(e){let t=this.paths,n=this.options.stroke.width;for(let r=0;r<t.length;r++)if(t[r]._isOnPath(e,n))return!0;return!1}_clippedBBox(e){return pC(this.paths,this.currentTransform(e))}};dS(nS);var vC=class extends oS(RS(nS,[`position`])){get nodeType(){return`Text`}constructor(e,t=new Q,n={}){super(n),this.content(e),this.position(t),this.options.font||(this.options.font=`12px sans-serif`),this.options.fill===void 0&&this.fill(`#000`)}content(e){return e===void 0?this.options.get(`content`):(this.options.set(`content`,e),this)}measure(){return wx(this.content(),{font:this.options.get(`font`)})}rect(){let e=this.measure();return new Zx(this.position().clone(),[e.width,e.height])}bbox(e){let t=Yx(this.currentTransform(e));return this.rect().bbox(t)}rawBBox(){return this.rect().bbox()}_containsPoint(e){return this.rect().containsPoint(e)}},yC=class extends dS(nS,[`rect`]){get nodeType(){return`Image`}constructor(e,t=new Zx,n={}){super(n),this.src(e),this.rect(t)}src(e){return e===void 0?this.options.get(`src`):(this.options.set(`src`,e),this)}bbox(e){let t=Yx(this.currentTransform(e));return this._rect.bbox(t)}rawBBox(){return this._rect.bbox()}_containsPoint(e){return this._rect.containsPoint(e)}_hasFill(){return this.src()}};let bC=(e,t)=>class extends e{traverse(e){let n=this[t];for(let t=0;t<n.length;t++){let r=n[t];r.traverse?r.traverse(e):e(r)}return this}};var xC=class extends bC(nS,`children`){get nodeType(){return`Group`}constructor(e){super(e),this.children=[]}childrenChange(e,t,n){this.trigger(`childrenChange`,{action:e,items:t,index:n})}append(){return Ab(this.children,arguments),this._reparent(arguments,this),this.childrenChange(`add`,arguments),this}insert(e,t){return this.children.splice(e,0,t),t.parent=this,this.childrenChange(`add`,[t],e),this}insertAt(e,t){return this.insert(t,e)}remove(e){let t=this.children.indexOf(e);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange(`remove`,[e],t)),this}removeAt(e){if(0<=e&&e<this.children.length){let t=this.children[e];this.children.splice(e,1),t.parent=null,this.childrenChange(`remove`,[t],e)}return this}clear(){let e=this.children;return this.children=[],this._reparent(e,null),this.childrenChange(`remove`,e,0),this}bbox(e){return fC(this.children,!0,this.currentTransform(e))}rawBBox(){return fC(this.children,!1)}_clippedBBox(e){return pC(this.children,this.currentTransform(e))}currentTransform(e){return nS.prototype.currentTransform.call(this,e)||null}containsPoint(e,t){if(this.visible()){let n=this.children,r=this.currentTransform(t);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e,r))return!0}return!1}_reparent(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.parent;i&&i!==this&&i.remove&&i.remove(r),r.parent=t}}};function SC(e,t,n){let r=n.transform()||$x(),i=r.matrix();i.e+=e.x-t.origin.x,i.f+=e.y-t.origin.y,r.matrix(i),n.transform(r)}function CC(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]:n===`end`?t.origin[r]+t.size[i]-e:t.origin[r]+(t.size[i]-e)/2,a}function wC(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]+t.size[i]-e:n===`end`?t.origin[r]:t.origin[r]+(t.size[i]-e)/2,a}let TC={alignContent:`start`,justifyContent:`start`,alignItems:`start`,spacing:0,orientation:`horizontal`,lineSpacing:0,wrap:!0,revers:!1},EC=(e,t)=>{e.forEach(t)},DC=(e,t)=>{let n=e.length;for(let r=n-1;r>=0;r--)t(e[r],r)};(class extends xC{constructor(e,t){super(Object.assign({},TC,t)),this._rect=e,this._fieldMap={}}rect(e){return e?(this._rect=e,this):this._rect}appendBreak(){let e=new xC;return e._isBreakMarker=!0,this.append(e),this}_initMap(){let e=this.options,t=this._fieldMap;e.orientation===`horizontal`?(t.sizeField=`width`,t.groupsSizeField=`height`,t.groupAxis=`x`,t.groupsAxis=`y`):(t.sizeField=`height`,t.groupsSizeField=`width`,t.groupAxis=`y`,t.groupsAxis=`x`),e.reverse?(this.forEach=DC,this.justifyAlign=wC):(this.forEach=EC,this.justifyAlign=CC)}reflow(){if(!this._rect||this.children.length===0)return;this._initMap(),this.options.transform&&this.transform(null);let e=this.options,t=this._rect,{groups:n,groupsSize:r}=this._initGroups(),{sizeField:i,groupsSizeField:a,groupAxis:o,groupsAxis:s}=this._fieldMap,c=new Q,l=new Q,u=new Xx,d=CC(r,t,e.alignContent,s,a),f,p,m,h=(t,n)=>{let r=p.elements[n];l[o]=f,l[s]=CC(t.size[a],m,e.alignItems,s,a),SC(l,t,r),f+=t.size[i]+e.spacing};for(let r=0;r<n.length;r++)p=n[r],c[o]=f=this.justifyAlign(p.size,t,e.justifyContent,o,i),c[s]=d,u[i]=p.size,u[a]=p.lineSize,m=new Zx(c,u),this.forEach(p.bboxes,h),d+=p.lineSize+e.lineSpacing;if(!e.wrap&&p.size>t.size[i]){let n=t.size[i]/m.size[i],r=m.topLeft().scale(n,n),c=CC(m.size[a]*n,t,e.alignContent,s,a),l=$x();o===`x`?l.translate(t.origin.x-r.x,c-r.y):l.translate(c-r.x,t.origin.y-r.y),l.scale(n,n),this.transform(l)}}_initGroups(){let{options:e,children:t}=this,{lineSpacing:n,wrap:r,spacing:i}=e,a=this._fieldMap.sizeField,o=this._newGroup(),s=[],c=function(){s.push(o),l+=o.lineSize+n},l=-n;for(let e=0;e<t.length;e++){let n=t[e],s=t[e].clippedBBox();if(n._isBreakMarker){o.bboxes.length>0&&(c(),o=this._newGroup());continue}n.visible()&&s&&(r&&o.size+s.size[a]+i>this._rect.size[a]?o.bboxes.length===0?(this._addToGroup(o,s,n),c(),o=this._newGroup()):(c(),o=this._newGroup(),this._addToGroup(o,s,n)):this._addToGroup(o,s,n))}return o.bboxes.length&&c(),{groups:s,groupsSize:l}}_addToGroup(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)}_newGroup(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}});var OC=class extends oS(cS(dS(nS))){get nodeType(){return`Rect`}constructor(e=new Zx,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}_bbox(e){return this._geometry.bbox(e)}rawBBox(){return this._geometry.bbox()}_containsPoint(e){return this._geometry.containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}},kC=class extends wS{_change(){this.optionsChange({field:`stops`})}};function AC(e){return function(t){return t===void 0?this.options.get(e):(this.options.set(e,t),this)}}function jC(e,t){for(let n=0;n<t.length;n++)e[t[n]]=AC(t[n])}let MC=(e,t)=>{let n=class extends e{};return jC(n.prototype,t),n},NC=[`offset`,`color`,`opacity`];var PC=class e extends MC(Cb,NC){constructor(e,t,n){super(),this.options=new Tb({offset:e,color:t,opacity:n===void 0?1:n}),this.options.addObserver(this)}static create(t){if(t!==void 0){let n;return n=t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity),n}}},FC=class extends Cb{get nodeType(){return`Gradient`}constructor(e={}){super(),this.stops=new kC(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=Fb()}userSpace(e){return e===void 0?this._userSpace:(this._userSpace=e,this.optionsChange(),this)}_createStops(e=[]){let t=[];for(let n=0;n<e.length;n++)t.push(PC.create(e[n]));return t}addStop(e,t,n){this.stops.push(new PC(e,t,n))}removeStop(e){let t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}optionsChange(e){this.trigger(`optionsChange`,{field:`gradient`+(e?`.`+e.field:``),value:this})}geometryChange(){this.optionsChange()}};let IC=[`start`,`end`];var LC=class extends RS(FC,IC){constructor(e={}){super(e),this.start(e.start||new Q),this.end(e.end||new Q(1,0))}},RC=class extends RS(FC,[`center`]){constructor(e={}){super(e),this.center(e.center||new Q),this._radius=e.radius===void 0?1:e.radius,this._fallbackFill=e.fallbackFill}radius(e){return e===void 0?this._radius:(this._radius=e,this.geometryChange(),this)}fallbackFill(e){return e===void 0?this._fallbackFill:(this._fallbackFill=e,this.optionsChange(),this)}},zC=class extends xC{get nodeType(){return`Pattern`}constructor(e){super();let{width:t,height:n}=e;this._size=Xx.create([t,n]),this.id=Fb()}size(e){return e?(this._size=Xx.create(e),this):this._size}},BC=t({easeInOutBack:()=>$C,easeInOutCubic:()=>GC,easeInOutExpo:()=>ZC,easeInOutQuad:()=>qC,easeInOutQuint:()=>tw,easeInOutSine:()=>YC,easeOutBack:()=>QC,easeOutCirc:()=>JC,easeOutCubic:()=>WC,easeOutElastic:()=>UC,easeOutExpo:()=>XC,easeOutQuad:()=>KC,easeOutQuint:()=>ew,linear:()=>HC,swing:()=>VC});function VC(e){return .5-Math.cos(e*Math.PI)/2}function HC(e){return e}function UC(e){return e===0||e===1?e:2**(-10*e)*Math.sin((e-.125)*(1.1*Math.PI)/.5)+1}function WC(e){return 1-(1-e)**3}function GC(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function KC(e){return 1-(1-e)**2}function qC(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}function JC(e){return Math.sqrt(1-(e-1)**2)}function YC(e){return-(Math.cos(Math.PI*e)-1)/2}function XC(e){return e===1?1:1-2**(-10*e)}function ZC(e){return e===0||e===1?e:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}function QC(e){return 1+2.70158*(e-1)**3+1.70158*(e-1)**2}function $C(e){let t=1.70158*1.525;return e<.5?(2*e)**2*(3.5949095*2*e-t)/2:((2*e-2)**2*(3.5949095*(e*2-2)+t)+2)/2}function ew(e){return 1-(1-e)**5}function tw(e){return e<.5?16*e**5:1-(-2*e+2)**5/2}let nw;var rw=class e extends Vy{static get current(){return nw||=new e,nw}constructor(){super(),this._items=[]}register(e,t){this._items.push({name:e,type:t})}create(e,t){let n=this._items,r;if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name.toLowerCase()===e){r=n[t];break}}if(r)return new r.type(e,t)}};function iw(e){return Math.min(1,Math.max(0,e))}function aw(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;function u(e){return((o*e+a)*e+i)*e}function d(e){return((l*e+c)*e+s)*e}function f(e){return(3*o*e+2*a)*e+i}function p(e){let t=e;for(let n=0;n<8;n++){let n=u(t)-e,r=f(t);if(Math.abs(n)<1e-7)return t;if(Math.abs(r)<1e-7)break;t-=n/r}let n=0,r=1;t=e;for(let t=0;t<24;t++){let t=(n+r)/2,i=u(t);if(Math.abs(i-e)<1e-7)return t;i<e?n=t:r=t}return(n+r)/2}return e=>{let t=iw(e);return t===0||t===1?t:d(p(t))}}let ow={duration:500,easing:`swing`};(class extends Vy{static create(e,t,n){return rw.current.create(e,t,n)}get options(){return this._options||ow}set options(e){this._options=e}constructor(e,t){super(),this.options=Object.assign({},this.options,t),this.element=e}setup(){}step(){}play(){let e=this.options;typeof e.easing==`string`&&BC[e.easing]?e.easing=BC[e.easing]:Array.isArray(e.easing)&&e.easing.length===4?e.easing=aw(...e.easing):e.easing=BC[ow.easing];let{duration:t,delay:n=0,easing:r}=e,i=ab()+n,a=i+t;t===0?(this.step(1),this.abort()):setTimeout(()=>{let e=()=>{if(this._stopped)return;let n=ab(),o=Xb(n-i,0,t),s=r(o/t);this.step(s),n<a?Jy(e):this.abort()};e()},n)}abort(){this._stopped=!0}destroy(){this.abort()}});let sw;(class e extends Vy{static get current(){return sw||=new e,sw}parse(e,t){return dC(new _C(t),e)}});var cw=class extends Vy{constructor(e){super(),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}destroy(){this.srcElement&&this.srcElement.removeObserver(this);let e=this.childNodes;for(let t=0;t<e.length;t++)this.childNodes[t].destroy();this.parent=null}load(){}observe(){this.srcElement&&this.srcElement.addObserver(this)}append(e){this.childNodes.push(e),e.parent=this}insertAt(e,t){this.childNodes.splice(t,0,e),e.parent=this}remove(e,t){let n=e+t;for(let t=e;t<n;t++)this.childNodes[t].removeSelf();this.childNodes.splice(e,t)}removeSelf(){this.clear(),this.destroy()}clear(){this.remove(0,this.childNodes.length)}invalidate(){this.parent&&this.parent.invalidate()}geometryChange(){this.invalidate()}optionsChange(){this.invalidate()}childrenChange(e){e.action===`add`?this.load(e.items,e.index):e.action===`remove`&&this.remove(e.index,e.items.length),this.invalidate()}};let lw=[`click`,`mouseenter`,`mouseleave`,`mousemove`,`resize`];var uw=class extends Hy{constructor(e,t){super(),this.options=Object.assign({},t),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler(`click`),this._mouseenter=this._handler(`mouseenter`),this._mouseleave=this._handler(`mouseleave`),this._mousemove=this._handler(`mousemove`),this._visual=new xC,sx(e,this.options),this.bind(lw,this.options),this._enableTracking()}draw(e){this._visual.children.push(e)}clear(){this._visual.children=[]}destroy(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()}eventTarget(e){let t=qb(e),n;for(;!n&&t&&(n=t._kendoNode,t!==this.element);)t=t.parentElement;if(n)return n.srcElement}exportVisual(){return this._visual}getSize(){return sx(this.element)}currentSize(e){if(e)this._size=e;else return this._size}setSize(e){sx(this.element,e),this.currentSize(e),this._resize()}resize(e){let t=this.getSize(),n=this.currentSize();(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger(`resize`,t))}size(e){if(!e)return this.getSize();this.setSize(e)}suspendTracking(){this._suspendedTracking=!0}resumeTracking(){this._suspendedTracking=!1}_enableTracking(){}_resize(){}_handler(e){return t=>{let n=this.eventTarget(t);n&&!this._suspendedTracking&&this.trigger(e,{element:n,originalEvent:t,type:e})}}_elementOffset(){let e=this.element,t=lx(e),{left:n,top:r}=ix(e);return{left:n+t.left,top:r+t.top}}_surfacePoint(e){let t=this._elementOffset(),n=Kb(e),r=n.x-t.left,i=n.y-t.top,a=mx(this.element).invert();return new Q(r,i).transform(a)}};function dw(e,t){return t==null?``:` ${e}="${t}" `}function fw(e){let t=``;for(let n=0;n<e.length;n++)t+=dw(e[n][0],e[n][1]);return t}function pw(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n][1];r!==void 0&&(t+=e[n][0]+`:`+r+`;`)}if(t!==``)return t}let mw={},hw=`none`,gw=(e,t)=>{Jx(e,t)},_w=(e,t)=>{let n=new DOMParser().parseFromString(Gx(t),`text/xml`);Kx(n);let r=document.adoptNode(n.documentElement);e.insertBefore(r,e.firstChild)},vw,yw=(e,t)=>{if(vw)return vw(e,t);if(vw=gw,typeof document<`u`){let e=document.createElement(`div`),t=typeof DOMParser<`u`;e.innerHTML=`<svg xmlns='http://www.w3.org/2000/svg'></svg>`,t&&e.firstChild.namespaceURI!==`http://www.w3.org/2000/svg`&&(vw=_w)}return vw(e,t)},bw=`transform`,xw={clip:`clip-path`,fill:`fill`};function Sw(e,t){return e===`clip`||e===`fill`&&(!t||t.nodeType===`Gradient`||t.nodeType===`Pattern`)}var Cw=class extends cw{constructor(e,t){super(e),this.definitions={},this.options=t}destroy(){this.element&&=(this.element._kendoNode=null,null),this.clearDefinitions(),super.destroy()}load(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.children,a=new mw[r.nodeType](r,this.options);t===void 0?this.append(a):this.insertAt(a,t),a.createDefinitions(),i&&i.length>0&&a.load(i);let o=this.element;o&&a.attachTo(o,t)}}root(){let e=this;for(;e.parent;)e=e.parent;return e}attachTo(e,t){let n=document.createElement(`div`);yw(n,`<svg xmlns='http://www.w3.org/2000/svg' version='1.1'>`+this.render()+`</svg>`);let r=n.firstChild.firstChild;r&&(t===void 0?e.appendChild(r):e.insertBefore(r,e.childNodes[t]||null),this.setElement(r))}setElement(e){this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this;let t=this.childNodes;for(let n=0;n<t.length;n++){let r=e.childNodes[n];t[n].setElement(r)}}clear(){this.clearDefinitions(),this.element&&(this.element.innerHTML=``);let e=this.childNodes;for(let t=0;t<e.length;t++)e[t].destroy();this.childNodes=[]}removeSelf(){if(this.element){let e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}super.removeSelf()}template(){return this.renderChildren()}render(){return this.template()}renderChildren(){let e=this.childNodes,t=``;for(let n=0;n<e.length;n++)t+=e[n].render();return t}optionsChange(e){let{field:t,value:n}=e;t===`visible`?this.css(`display`,n?``:hw):xw[t]&&Sw(t,n)?this.updateDefinition(t,n):t===`opacity`?this.attr(`opacity`,n):t===`cursor`?this.css(`cursor`,n):t===`id`&&(n?this.attr(`id`,n):this.removeAttr(`id`)),super.optionsChange(e)}accessibilityOptionsChange(e){let{field:t,value:n}=e;t===`role`?n?this.attr(`role`,n):this.removeAttr(`role`):t===`ariaLabel`?n?this.attr(`aria-label`,eb(n)):this.removeAttr(`aria-label`):t===`ariaRoleDescription`?n?this.attr(`aria-roledescription`,eb(n)):this.removeAttr(`aria-roledescription`):t===`ariaChecked`?n===void 0?this.removeAttr(`aria-checked`):this.attr(`aria-checked`,n):t===`className`&&this.className(n)}attr(e,t){this.element&&this.element.setAttribute(e,t)}allAttr(e){for(let t=0;t<e.length;t++)this.attr(e[t][0],e[t][1])}toggleAttr(e,t){t?this.attr(e,t):this.removeAttr(e)}css(e,t){this.element&&(this.element.style[e]=t)}allCss(e){for(let t=0;t<e.length;t++)this.css(e[t][0],e[t][1])}className(e){this.element&&(this.element.classList.remove(...this.element.classList),e&&e.split(` `).forEach(e=>{e&&this.element.classList.add(e)}))}removeAttr(e){this.element&&this.element.removeAttribute(e)}mapTransform(e){let t=[];return e&&t.push([bw,`matrix(`+e.matrix().toString(6)+`)`]),t}renderTransform(){return fw(this.mapTransform(this.srcElement.transform()))}transformChange(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(bw)}mapStyle(){let e=this.srcElement.options,t=[[`cursor`,e.cursor]];return e.visible===!1&&t.push([`display`,hw]),t}renderStyle(){return dw(`style`,pw(this.mapStyle(!0)))}renderOpacity(){return dw(`opacity`,this.srcElement.options.opacity)}renderId(){return dw(`id`,this.srcElement.options.id)}renderClassName(){return dw(`class`,this.srcElement.options.className)}renderRole(){return dw(`role`,this.srcElement.options.role)}renderAriaLabel(){let e=this.srcElement.options.ariaLabel;return e&&=eb(e),dw(`aria-label`,e)}renderAriaRoleDescription(){let e=this.srcElement.options.ariaRoleDescription;return e&&=eb(e),dw(`aria-roledescription`,e)}renderAriaChecked(){return dw(`aria-checked`,this.srcElement.options.ariaChecked)}createDefinitions(){let e=this.srcElement,t=this.definitions;if(e){let n=e.options,r;for(let e in xw){let i=n.get(e);i&&Sw(e,i)&&(t[e]=i,r=!0)}r&&this.definitionChange({action:`add`,definitions:t})}}definitionChange(e){this.parent&&this.parent.definitionChange(e)}updateDefinition(e,t){let n=this.definitions,r=n[e],i=xw[e],a={};r&&(a[e]=r,this.definitionChange({action:`remove`,definitions:a}),delete n[e]),t?(a[e]=t,this.definitionChange({action:`add`,definitions:a}),n[e]=t,this.attr(i,this.refUrl(t.id))):r&&this.removeAttr(i)}clearDefinitions(){let e=this.definitions;this.definitionChange({action:`remove`,definitions:e}),this.definitions={}}renderDefinitions(){return fw(this.mapDefinitions())}mapDefinitions(){let e=this.definitions,t=[];for(let n in e){let r=e[n];t.push([xw[n],this.refUrl(r.id)])}return t}refUrl(e){return`url(#${e})`}},ww=class extends Cw{template(){return`<stop ${this.renderOffset()} ${this.renderStyle()} />`}renderOffset(){return dw(`offset`,this.srcElement.offset())}mapStyle(){let e=this.srcElement;return[[`stop-color`,e.color()],[`stop-opacity`,e.opacity()]]}optionsChange(e){e.field===`offset`?this.attr(e.field,e.value):(e.field===`color`||e.field===`opacity`)&&this.css(`stop-`+e.field,e.value)}},Tw=class extends Cw{constructor(e){super(e),this.id=e.id,this.loadStops()}loadStops(){let e=this.srcElement.stops,t=this.element;for(let n=0;n<e.length;n++){let r=new ww(e[n]);this.append(r),t&&r.attachTo(t)}}optionsChange(e){e.field===`gradient.stops`?(cw.prototype.clear.call(this),this.loadStops()):e.field===`gradient`&&this.allAttr(this.mapCoordinates())}renderCoordinates(){return fw(this.mapCoordinates())}mapSpace(){return[`gradientUnits`,this.srcElement.userSpace()?`userSpaceOnUse`:`objectBoundingBox`]}},Ew=class extends Tw{template(){return`<linearGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</linearGradient>`}mapCoordinates(){let e=this.srcElement,t=e.start(),n=e.end();return[[`x1`,t.x],[`y1`,t.y],[`x2`,n.x],[`y2`,n.y],this.mapSpace()]}},Dw=class extends Tw{template(){return`<radialGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</radialGradient>`}mapCoordinates(){let e=this.srcElement,t=e.center(),n=e.radius();return[[`cx`,t.x],[`cy`,t.y],[`r`,n],this.mapSpace()]}},Ow=class extends Cw{constructor(e){super(e),this.id=e.id,this.load(e.children)}template(){let e=this.srcElement.size().getWidth(),t=this.srcElement.size().getHeight();return`<pattern id='${this.srcElement.id}' width='${e}' height='${t}' patternUnits='userSpaceOnUse'>${this.renderChildren()}</pattern>`}},kw=class extends Cw{constructor(e){super(),this.srcElement=e,this.id=e.id,this.load([e])}renderClipRule(){return dw(`clip-rule`,`evenodd`)}template(){return`<clipPath ${this.renderClipRule()} id='${this.id}'>${this.renderChildren()}</clipPath>`}},Aw=class extends Cw{constructor(){super(),this.definitionMap={}}attachTo(e){this.element=e}template(){return`<defs>${this.renderChildren()}</defs>`}definitionChange(e){let{definitions:t,action:n}=e;n===`add`?this.addDefinitions(t):n===`remove`&&this.removeDefinitions(t)}createDefinition(e,t){let n;return e===`clip`?n=kw:e===`fill`&&(t instanceof LC?n=Ew:t instanceof RC?n=Dw:t.nodeType===`Pattern`&&(n=Ow)),new n(t)}addDefinitions(e){for(let t in e)this.addDefinition(t,e[t])}addDefinition(e,t){let{element:n,definitionMap:r}=this,i=t.id,a=r[i];if(a)a.count++;else{let a=this.createDefinition(e,t);r[i]={element:a,count:1},this.append(a),n&&a.attachTo(this.element)}}removeDefinitions(e){for(let t in e)this.removeDefinition(e[t])}removeDefinition(e){let t=this.definitionMap,n=e.id,r=t[n];r&&(r.count--,r.count===0&&(this.remove(this.childNodes.indexOf(r.element),1),delete t[n]))}},jw=class extends Cw{constructor(e){super(),this.options=e,this.defs=new Aw}attachTo(e){this.element=e,this.defs.attachTo(e.firstElementChild)}clear(){cw.prototype.clear.call(this)}template(){return this.defs.render()+this.renderChildren()}definitionChange(e){this.defs.definitionChange(e)}};let Mw={"fill.opacity":`fill-opacity`,"stroke.color":`stroke`,"stroke.width":`stroke-width`,"stroke.opacity":`stroke-opacity`};var Nw=class extends Cw{geometryChange(){this.attr(`d`,this.renderData()),this.invalidate()}optionsChange(e){switch(e.field){case`fill`:e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr(`fill`);break;case`fill.color`:this.allAttr(this.mapFill({color:e.value}));break;case`stroke`:e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr(`stroke`);break;case`transform`:this.transformChange(e.value);break;default:{let t=Mw[e.field];t&&this.attr(t,e.value);break}}this.accessibilityOptionsChange(e),super.optionsChange(e)}content(){this.element&&(this.element.textContent=this.srcElement.content())}renderData(){return this.srcElement.toString(3)||void 0}mapStroke(e){let t=[];return e&&!Jb(e.color)?(t.push([`stroke`,e.color]),t.push([`stroke-width`,e.width]),t.push([`stroke-linecap`,this.renderLinecap(e)]),t.push([`stroke-linejoin`,e.lineJoin]),e.opacity!==void 0&&t.push([`stroke-opacity`,e.opacity]),e.dashType!==void 0&&t.push([`stroke-dasharray`,this.renderDashType(e)])):t.push([`stroke`,hw]),t}renderStroke(){return fw(this.mapStroke(this.srcElement.options.stroke))}renderDashType(e){let{dashType:t,width:n=1}=e;if(t&&t!==`solid`){let e=eS[t.toLowerCase()],r=[];for(let t=0;t<e.length;t++)r.push(e[t]*n);return r.join(` `)}}renderLinecap(e){let{dashType:t,lineCap:n}=e;return t&&t!==`solid`?tS:n}mapFill(e){let t=[];return e&&(e.nodeType===`Gradient`||e.nodeType===`Pattern`)||(e&&!Jb(e.color)?(t.push([`fill`,e.color]),e.opacity!==void 0&&t.push([`fill-opacity`,e.opacity])):t.push([`fill`,hw])),t}renderFill(){return fw(this.mapFill(this.srcElement.options.fill))}template(){return`<path ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} ${dw(`d`,this.renderData())}${this.renderStroke()}${this.renderFill()}${this.renderDefinitions()}${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></path>`}},Pw=class extends Nw{renderData(){return this.srcElement.toPath().toString(3)}},Fw=class extends Nw{geometryChange(){let e=this.center();this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.attr(`r`,this.radius()),this.invalidate()}center(){return this.srcElement.geometry().center}radius(){return this.srcElement.geometry().radius}template(){return`<circle ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()}cx='${this.center().x}' cy='${this.center().y}' r='${this.radius()}'${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ${this.renderTransform()} ></circle>`}},Iw=class extends Cw{template(){return`<g${this.renderId()+this.renderTransform()+this.renderClassName()+this.renderStyle()+this.renderOpacity()+this.renderRole()+this.renderAriaLabel()+this.renderAriaRoleDescription()+this.renderAriaChecked()+this.renderDefinitions()}>${this.renderChildren()}</g>`}optionsChange(e){let{field:t,value:n}=e;t===`transform`&&this.transformChange(n),this.accessibilityOptionsChange(e),super.optionsChange(e)}},Lw=class extends Nw{geometryChange(){this.allAttr(this.mapPosition()),this.invalidate()}optionsChange(e){e.field===`src`&&this.allAttr(this.mapSource()),super.optionsChange(e)}mapPosition(){let e=this.srcElement.rect(),t=e.topLeft();return[[`x`,t.x],[`y`,t.y],[`width`,e.width()+`px`],[`height`,e.height()+`px`]]}renderPosition(){return fw(this.mapPosition())}mapSource(e){let t=this.srcElement.src();return e&&(t=eb(t)),[[`xlink:href`,t]]}renderSource(){return fw(this.mapSource(!0))}template(){return`<image preserveAspectRatio='none' ${this.renderId()} ${this.renderStyle()} ${this.renderTransform()} ${this.renderOpacity()}${this.renderPosition()} ${this.renderSource()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></image>`}},Rw=class extends Nw{renderData(){return this.srcElement.toString(3)||`undefined`}},zw=class extends Nw{geometryChange(){let e=this.srcElement.geometry();this.attr(`x`,e.origin.x),this.attr(`y`,e.origin.y),this.attr(`width`,e.size.width),this.attr(`height`,e.size.height),this.attr(`rx`,e.cornerRadius[0]),this.attr(`ry`,e.cornerRadius[1]),this.invalidate()}size(){return this.srcElement.geometry().size}origin(){return this.srcElement.geometry().origin}rx(){return this.srcElement.geometry().cornerRadius[0]}ry(){return this.srcElement.geometry().cornerRadius[1]}template(){return`<rect ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} x='${this.origin().x}' y='${this.origin().y}' rx='${this.rx()}' ry='${this.ry()}' width='${this.size().width}' height='${this.size().height}' ${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()} ${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} />`}};let Bw=/&(?:[a-zA-Z]+|#\d+);/g;function Vw(e){if(!e||typeof e!=`string`||!Bw.test(e))return e;let t=Vw._element;return Bw.lastIndex=0,e.replace(Bw,e=>(t.innerHTML=e,t.textContent||t.innerText))}typeof document<`u`&&(Vw._element=document.createElement(`span`));var Hw=class extends Nw{geometryChange(){let e=this.pos();this.attr(`x`,e.x),this.attr(`y`,e.y),this.invalidate()}optionsChange(e){e.field===`font`?(this.attr(`style`,pw(this.mapStyle())),this.geometryChange()):e.field===`content`&&super.content(this.srcElement.content()),super.optionsChange(e)}mapStyle(e){let t=super.mapStyle(e),n=this.srcElement.options.font;return e&&(n=eb(n)),t.push([`font`,n],[`white-space`,`pre`]),t}pos(){let e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)}renderContent(){let e=this.srcElement.content();return e=Vw(e),e=eb(e),_x(e)}renderTextAnchor(){let e;return(this.options||{}).rtl&&!(ib.browser.msie||ib.browser.edge)&&(e=`end`),dw(`text-anchor`,e)}renderPaintOrder(){let e=this.srcElement.options.paintOrder;return e?dw(`paint-order`,e):``}template(){return`<text ${this.renderId()} ${this.renderTextAnchor()} ${this.renderStyle()} ${this.renderOpacity()}x='${this.pos().x}' y='${this.pos().y}' ${this.renderStroke()} ${this.renderTransform()} ${this.renderDefinitions()}${this.renderPaintOrder()}${this.renderFill()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()}>${this.renderContent()}</text>`}};mw.Arc=Pw,mw.Circle=Fw,mw.Group=Iw,mw.Image=Lw,mw.MultiPath=Rw,mw.Path=Nw,mw.Rect=zw,mw.Text=Hw;function Uw(e){let t;try{t=e.getScreenCTM?e.getScreenCTM():null}catch{}if(t){let n=-t.e%1,r=-t.f%1,i=e.style;(n!==0||r!==0)&&(i.left=n+`px`,i.top=r+`px`)}}var Ww=class extends uw{get type(){return`svg`}constructor(e,t){super(e,t),this._root=new jw(Object.assign({rtl:ax(e,`direction`).direction===`rtl`},this.options)),yw(this.element,this._template(``)),this._rootElement=this.element.firstElementChild,this._rootElement.style.width=`100%`,this._rootElement.style.height=`100%`,this._rootElement.style.overflow=`hidden`,Uw(this._rootElement),this._root.attachTo(this._rootElement),rx(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}destroy(){this._root&&(this._root.destroy(),this._root=null,this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null,cx(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),super.destroy()}translate(e){let t=`${Math.round(e.x)} ${Math.round(e.y)} ${this._size.width} ${this._size.height}`;this._offset=e,this._rootElement.setAttribute(`viewBox`,t)}draw(e){super.draw(e),this._root.load([e])}clear(){super.clear(),this._root.clear()}svg(){return`<?xml version='1.0' ?>`+this._template()}exportVisual(){let{_visual:e,_offset:t}=this;if(t){let n=new xC;n.children.push(e),n.transform($x().translate(-t.x,-t.y)),e=n}return e}_resize(){this._offset&&this.translate(this._offset)}_template(e){return`<svg ${typeof e==`string`?e:`style='width: 100%; height: 100%; overflow: hidden;' `}xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>${this._root.render()}</svg>`}};let Gw={};var Kw=class extends cw{constructor(e){super(e),e&&this.initClip()}initClip(){let e=this.srcElement.clip();e&&(this.clip=e,e.addObserver(this))}clear(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),super.clear()}clearClip(){this.clip&&(this.clip.removeObserver(this),delete this.clip)}setClip(e){this.clip&&(e.beginPath(),new Gw[this.clip.nodeType](this.clip).renderPoints(e,this.clip),e.clip(`evenodd`))}optionsChange(e){e.field===`clip`&&(this.clearClip(),this.initClip()),super.optionsChange(e)}setTransform(e){if(this.srcElement){let t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}}loadElements(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],a=i.children,o=new Gw[i.nodeType](i,n);a&&a.length>0&&o.load(a,t,n),t===void 0?this.append(o):this.insertAt(o,t)}}load(e,t,n){this.loadElements(e,t,n),this.invalidate()}setOpacity(e){if(this.srcElement){let t=this.srcElement.opacity();t!==void 0&&this.globalAlpha(e,t)}}globalAlpha(e,t){let n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n}visible(){let e=this.srcElement;return!e||e&&e.options.visible!==!1}},qw=class extends bC(Kw,`childNodes`){renderTo(e){if(!this.visible())return;e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e);let t=this.childNodes;for(let n=0;n<t.length;n++){let r=t[n];r.visible()&&r.renderTo(e)}e.restore()}},Jw=class extends bC(qw,`childNodes`){constructor(e,t){super(),this.canvas=e,this.size=t,this.ctx=e.getContext(`2d`);let n=this._invalidate.bind(this);this.invalidate=ob(()=>{Jy(n)},16.666666666666668)}destroy(){super.destroy(),this.canvas=null,this.ctx=null}load(e,t,n){this.loadElements(e,t,n),this._invalidate()}_rescale(e){let{canvas:t,size:n}=this;t.width=n.width*e,t.height=n.height*e,this.ctx.scale(e,e)}_devicePixelRatio(){return typeof window.devicePixelRatio==`number`?window.devicePixelRatio:1}_invalidate(e){if(!this.ctx)return;let t=e&&e.fixedScale?1:this._devicePixelRatio();this._rescale(t),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},Yw=class extends Vy{constructor(){super(),this.shapes=[]}_add(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this}pointShapes(e){let t=this.shapes,n=t.length,r=[];for(let i=0;i<n;i++)t[i].bbox.containsPoint(e)&&r.push(t[i].shape);return r}insert(e,t){this._add(e,t)}remove(e){let t=this.shapes,n=t.length;for(let r=0;r<n;r++)if(t[r].shape===e){t.splice(r,1);break}}},Xw=class e extends Yw{constructor(e){super(),this.children=[],this.rect=e}inBounds(e){let t=this.rect,n=t.bottomRight(),r=e.bottomRight();return t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&r.x<=n.x&&r.y<=n.y}pointShapes(e){let t=this.children,n=t.length,r=super.pointShapes(e);for(let i=0;i<n;i++)Ab(r,t[i].pointShapes(e));return r}insert(e,t){let n=this.children,r=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{n.length||this._initChildren();for(let i=0;i<n.length;i++)if(n[i].insert(e,t)){r=!0;break}r||this._add(e,t)}r=!0}return r}_initChildren(){let{rect:t,children:n}=this,r=t.center(),i=t.width()/2,a=t.height()/2;n.push(new e(new Zx([t.origin.x,t.origin.y],[i,a])),new e(new Zx([r.x,t.origin.y],[i,a])),new e(new Zx([t.origin.x,r.y],[i,a])),new e(new Zx([r.x,r.y],[i,a])))}};let Zw=3e3,Qw=BigInt(1e4);var $w=class extends Vy{constructor(){super(),this.initRoots()}initRoots(){this.rootMap={},this.root=new Yw,this.rootElements=[]}clear(){let e=this.rootElements;for(let t=0;t<e.length;t++)this.remove(e[t]);this.initRoots()}pointShape(e){let t=(this.rootMap[Math.floor(e.x/Zw)]||{})[Math.floor(e.y/Zw)],n=this.root.pointShapes(e);t&&(n=n.concat(t.pointShapes(e)));let r=rT(n);this.assignZindex(n,r),n.sort(eT);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e))return n[t]}assignZindex(e,t){let n=nT(Qw,BigInt(t)),r=[],i=BigInt(0);for(let t=0;t<e.length;t++){let a=e[t],o=i,s=n,c=[];for(;a;)c.push(a),a=a.parent;for(;c.length;)a=c.pop(),o+=BigInt((a.parent?a.parent.children:this.rootElements).indexOf(a)+1)*s,s/=Qw;e[t]._zIndex=o,r.push(o)}r.sort(tT);for(let t=0;t<e.length;t++)e[t]._zIndex=r.indexOf(e[t]._zIndex)}optionsChange(e){(e.field===`transform`||e.field===`stroke.width`)&&this.bboxChange(e.element)}geometryChange(e){this.bboxChange(e.element)}bboxChange(e){if(e.nodeType===`Group`)for(let t=0;t<e.children.length;t++)this.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)}add(e){let t=Array.isArray(e)?e.slice(0):[e];Ab(this.rootElements,t),this._insert(t)}childrenChange(e){if(e.action===`remove`)for(let t=0;t<e.items.length;t++)this.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0))}_insert(e){let t;for(;e.length>0;)t=e.pop(),t.addObserver(this),t.nodeType===`Group`?Ab(e,t.children):this._insertShape(t)}_insertShape(e){let t=e.bbox();if(t){let n=this.getSectors(t),r=n[0][0],i=n[1][0];if(this.inRoot(n))this.root.insert(e,t);else{let n=this.rootMap;n[r]||(n[r]={}),n[r][i]||(n[r][i]=new Xw(new Zx([r*Zw,i*Zw],[Zw,Zw]))),n[r][i].insert(e,t)}}}remove(e){if(e.removeObserver(this),e.nodeType===`Group`){let t=e.children;for(let e=0;e<t.length;e++)this.remove(t[e])}else e._quadNode&&(e._quadNode.remove(e),delete e._quadNode)}inRoot(e){return e[0].length>1||e[1].length>1}getSectors(e){let t=e.bottomRight(),n=Math.floor(t.x/Zw),r=Math.floor(t.y/Zw),i=[[],[]];for(let t=Math.floor(e.origin.x/Zw);t<=n;t++)i[0].push(t);for(let t=Math.floor(e.origin.y/Zw);t<=r;t++)i[1].push(t);return i}};function eT(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function tT(e,t){return e<t?-1:+(e>t)}function nT(e,t){let n=e,r=t,i=BigInt(1),a=i;for(;r;)r&i&&(a*=n),r>>=i,r&&(n*=n);return a}function rT(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=[];for(;r;)i.push(r),r=r.parent;t=Math.max(t,i.length)}return t+1}var iT=class{constructor(e){e.bind(`mouseenter`,this._mouseenter.bind(this)),e.bind(`mouseleave`,this._mouseleave.bind(this)),this.element=e.element}clear(){this._resetCursor()}destroy(){this._resetCursor(),delete this.element}_mouseenter(e){let t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()}_mouseleave(){this._resetCursor()}_shapeCursor(e){let t=e.element;for(;t&&t.options.cursor===void 0;)t=t.parent;if(t)return t.options.cursor}_getCursor(){if(this.element)return this.element.style.cursor}_setCursor(e){this.element&&(this.element.style.cursor=e,this._current=e)}_resetCursor(){this._current&&(this._setCursor(this._defaultCursor||``),delete this._current)}};function aT(e,t){let n=t.segments;if(n.length===0)return;let r=n[0],i=r.anchor();e.moveTo(i.x,i.y);for(let t=1;t<n.length;t++){r=n[t],i=r.anchor();let a=n[t-1].controlOut(),o=r.controlIn();a&&o?e.bezierCurveTo(a.x,a.y,o.x,o.y,i.x,i.y):e.lineTo(i.x,i.y)}t.options.closed&&e.closePath()}function oT(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=vb(r.color());i.a*=r.opacity(),e.addColorStop(r.offset(),i.toCssRgba())}}var sT=class extends Kw{renderTo(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()}setFill(e){let t=this.srcElement.options.fill,n=!1;return t&&(t.nodeType===`Gradient`?(this.setGradientFill(e,t),n=!0):t.nodeType===`Pattern`?(this.setPatternFill(e,t),n=!0):Jb(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n}setGradientFill(e,t){let n=this.srcElement.rawBBox(),r;if(t instanceof LC){let n=t.start(),i=t.end();r=e.createLinearGradient(n.x,n.y,i.x,i.y)}else if(t instanceof RC){let n=t.center();r=e.createRadialGradient(n.x,n.y,0,n.x,n.y,t.radius())}oT(r,t.stops),e.save(),t.userSpace()||e.transform(n.width(),0,0,n.height(),n.origin.x,n.origin.y),e.fillStyle=r,e.fill(),e.restore()}setPatternFill(e,t){let n=t.size(),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.getWidth(),r.height=n.getHeight(),this.childNodes.length=0,this.loadElements(t.children);let a=this.childNodes;for(let e=0;e<a.length;e++)a[e].renderTo(i);e.save(),e.fillStyle=e.createPattern(r,`repeat`),e.fill(),e.restore()}setStroke(e){let t=this.srcElement.options.stroke;if(t&&!Jb(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=nx(t.width,1),e.lineJoin=nx(t.lineJoin,e.lineJoin),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0}dashType(){let e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()}setLineDash(e){let t=this.dashType();if(t&&t!==`solid`){let n=eS[t];e.setLineDash?e.setLineDash(n):(e.mozDash=n,e.webkitLineDash=n)}}setLineCap(e){let t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==`solid`?e.lineCap=tS:n&&n.lineCap&&(e.lineCap=n.lineCap)}setLineJoin(e){let t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)}renderPoints(e,t){aT(e,t)}},cT=class extends sT{renderPoints(e){aT(e,this.srcElement.toPath())}},lT=class extends sT{renderPoints(e){let{center:t,radius:n}=this.srcElement.geometry();e.arc(t.x,t.y,n,0,Math.PI*2)}},uT=class extends sT{constructor(e,t){super(e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Nb();let n=this.img=new Image,r=e.src();t&&!/^data:/i.test(r)&&(n.crossOrigin=t),r&&(n.src=r),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)}renderTo(e){this.loading.state()===`resolved`&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())}optionsChange(e){e.field===`src`?(this.loading=Nb(),this.img.src=this.srcElement.src()):super.optionsChange(e)}onLoad(){this.loading.resolve(),this.invalidate()}onError(){this.loading.reject(Error(`Unable to load image '`+this.img.src+`'. Check for connectivity and verify CORS headers.`))}drawImage(e){let t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}},dT=class extends sT{renderPoints(e){let t=this.srcElement.paths;for(let n=0;n<t.length;n++)aT(e,t[n])}},fT=class extends sT{renderPoints(e){let t=this.srcElement.geometry(),[n,r]=t.cornerRadius;if(n===0&&r===0){let{origin:n,size:r}=t;e.rect(n.x,n.y,r.width,r.height)}else super.renderPoints(e,gC.fromRect(t))}},pT=class extends sT{renderTo(e){let t=this.srcElement,n=t.position(),r=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign=`left`,t.options.paintOrder===`stroke`?(this.stroke(e,t,n,r),this.fill(e,t,n,r)):(this.fill(e,t,n,r),this.stroke(e,t,n,r)),e.restore()}stroke(e,t,n,r){this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+r.baseline))}fill(e,t,n,r){this.setFill(e)&&e.fillText(t.content(),n.x,n.y+r.baseline)}};Gw.Arc=cT,Gw.Circle=lT,Gw.Group=qw,Gw.Image=uT,Gw.MultiPath=dT,Gw.Path=sT,Gw.Rect=fT,Gw.Text=pT;var mT=class extends uw{get type(){return`canvas`}constructor(e,t){super(e,t),Jx(this.element,this._template(this));let n=this.element.firstElementChild;n.style.width=`100%`,n.style.height=`100%`;let r=sx(e);n.width=r.width,n.height=r.height,this._rootElement=n,this._root=new Jw(n,r),this._mouseTrackHandler=this._trackMouse.bind(this),rx(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}destroy(){super.destroy(),this._root&&=(this._root.destroy(),null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),cx(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler}),this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null}draw(e){super.draw(e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])}clear(){super.clear(),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()}eventTarget(e){if(this._searchTree){let t=this._surfacePoint(e);return this._searchTree.pointShape(t)}}image(){let{_root:e,_rootElement:t}=this,n=[];e.traverse(e=>{e.loading&&n.push(e.loading)});let r=Nb(),i=()=>{e._invalidate({fixedScale:!0});try{let e=t.toDataURL();r.resolve(e)}catch(e){r.reject(e)}};return Qb(n).then(i,i),r}suspendTracking(){super.suspendTracking(),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)}resumeTracking(){if(super.resumeTracking(),!this._searchTree){this._searchTree=new $w;let e=this._root.childNodes,t=[];for(let n=0;n<e.length;n++)t.push(e[n].srcElement);this._searchTree.add(t)}}_resize(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()}_template(){return`<canvas></canvas>`}_enableTracking(){this._searchTree=new $w,this._cursor=new iT(this),super._enableTracking()}_trackMouse(e){if(this._suspendedTracking)return;let t=this.eventTarget(e);if(e.type!==`click`){let n=this._currentShape;n&&n!==t&&this.trigger(`mouseleave`,{element:n,originalEvent:e,type:`mouseleave`}),t&&n!==t&&this.trigger(`mouseenter`,{element:t,originalEvent:e,type:`mouseenter`}),this.trigger(`mousemove`,{element:t,originalEvent:e,type:`mousemove`}),this._currentShape=t}else t&&this.trigger(`click`,{element:t,originalEvent:e,type:`click`})}};let hT,gT,_T=()=>typeof document<`u`,vT=()=>_T()&&document.createElement(`canvas`).getContext,yT=()=>_T()&&document.implementation.hasFeature(`http://www.w3.org/TR/SVG11/feature#BasicStructure`,`1.1`);var bT=class e extends Vy{static get support(){return gT||={canvas:vT(),svg:yT()},gT}static get current(){return hT||=new e,hT}constructor(){super(),this._items=[{name:`svg`,type:Ww},{name:`canvas`,type:mT}]}create(e,t){let n=this._items,r=n[0];if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name===e){r=n[t];break}}if(r)return new r.type(e,t);tb(`Warning: Unable to create Kendo UI Drawing Surface. Possible causes:
67
67
  - The browser does not support SVG and Canvas. User agent: ${navigator.userAgent}`)}};(class extends uw{static get support(){return bT.support}static create(e,t){return bT.current.create(e,t)}});let xT=typeof Uint8Array<`u`&&ib.browser&&(!ib.browser.msie||ib.browser.version>9),ST=function(){var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;return{decode:function(t){for(var n=t.replace(/[^A-Za-z0-9\+\/\=]/g,``),r=0,i=n.length,a=[];r<i;){var o=e.indexOf(n.charAt(r++)),s=e.indexOf(n.charAt(r++)),c=e.indexOf(n.charAt(r++)),l=e.indexOf(n.charAt(r++)),u=o<<2|s>>>4,d=(s&15)<<4|c>>>2,f=(c&3)<<6|l;a.push(u),c!=64&&a.push(d),l!=64&&a.push(f)}return a},encode:function(t){for(var n=0,r=t.length,i=``;n<r;){var a=t[n++],o=t[n++],s=t[n++],c=a>>>2,l=(a&3)<<4|o>>>4,u=(o&15)<<2|s>>>6,d=s&63;n-r==2?u=d=64:n-r==1&&(d=64),i+=e.charAt(c)+e.charAt(l)+e.charAt(u)+e.charAt(d)}return i}}}();function CT(e){var t=0,n=0;e==null?e=xT?new Uint8Array(256):[]:n=e.length;var r=xT?function(t){if(t>=e.length){var n=new Uint8Array(Math.max(t+256,e.length*2));n.set(e,0),e=n}}:function(){},i=xT?function(){return new Uint8Array(e.buffer,0,n)}:function(){return e},a=xT?function(i){if(typeof i==`string`)return w(i);var a=i.length;r(t+a),e.set(i,t),t+=a,t>n&&(n=t)}:function(e){if(typeof e==`string`)return w(e);for(var t=0;t<e.length;++t)l(e[t])},o=xT?function(t,n){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+n));var r=new Uint8Array(n);return r.set(new Uint8Array(e.buffer,t,n)),r}:function(t,n){return e.slice(t,t+n)};function s(){return t>=n}function c(){return t<n?e[t++]:0}function l(i){r(t),e[t++]=i&255,t>n&&(n=t)}function u(){return c()<<8|c()}function d(e){l(e>>8),l(e)}function f(){var e=u();return e>=32768?e-65536:e}function p(e){d(e<0?e+65536:e)}function m(){return u()*65536+u()}function h(e){d(e>>>16&65535),d(e&65535)}function g(){var e=m();return e>=2147483648?e-4294967296:e}function _(e){h(e<0?e+4294967296:e)}function v(){return m()/65536}function y(e){h(Math.round(e*65536))}function b(){return g()/65536}function x(e){_(Math.round(e*65536))}function S(e){return T(e,c)}function C(e){return String.fromCharCode.apply(String,S(e))}function w(e){for(var t=0;t<e.length;++t)l(e.charCodeAt(t))}function T(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=t();return n}var E={eof:s,readByte:c,writeByte:l,readShort:u,writeShort:d,readLong:m,writeLong:h,readFixed:v,writeFixed:y,readShort_:f,writeShort_:p,readLong_:g,writeLong_:_,readFixed_:b,writeFixed_:x,read:S,write:a,readString:C,writeString:w,times:T,get:i,slice:o,offset:function(e){return e==null?t:(t=e,E)},skip:function(e){t+=e},toString:function(){throw Error(`FIX CALLER. BinaryStream is no longer convertible to string!`)},length:function(){return n},saveExcursion:function(e){var n=t;try{return e()}finally{t=n}},writeBase64:function(e){window.atob?w(window.atob(e)):a(ST.decode(e))},base64:function(){return ST.encode(i())}};return E}function wT(e){return e.map(function(e){var t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t}).join(``)}var TT=class{constructor(e,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=e,this.rawData=e.raw,this.parse(e.raw)}raw(){return this.rawData.slice(this.offset,this.length)}parse(){}};(class extends TT{parse(e){e.offset(this.offset),this.version=e.readLong(),this.revision=e.readLong(),this.checkSumAdjustment=e.readLong(),this.magicNumber=e.readLong(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.read(8),this.modified=e.read(8),this.xMin=e.readShort_(),this.yMin=e.readShort_(),this.xMax=e.readShort_(),this.yMax=e.readShort_(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort_(),this.indexToLocFormat=e.readShort_(),this.glyphDataFormat=e.readShort_()}render(e){var t=CT();return t.writeLong(this.version),t.writeLong(this.revision),t.writeLong(0),t.writeLong(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.write(this.created),t.write(this.modified),t.writeShort_(this.xMin),t.writeShort_(this.yMin),t.writeShort_(this.xMax),t.writeShort_(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort_(this.fontDirectionHint),t.writeShort_(e),t.writeShort_(this.glyphDataFormat),t.get()}}),class extends TT{parse(e){e.offset(this.offset),this.file.head.indexToLocFormat===0?this.offsets=e.times(this.length/2,function(){return 2*e.readShort()}):this.offsets=e.times(this.length/4,e.readLong)}offsetOf(e){return this.offsets[e]}lengthOf(e){return this.offsets[e+1]-this.offsets[e]}render(e){for(var t=CT(),n=e[e.length-1]>65535,r=0;r<e.length;++r)n?t.writeLong(e[r]):t.writeShort(e[r]/2);return{format:+!!n,table:t.get()}}},class extends TT{parse(e){e.offset(this.offset),this.version=e.readLong(),this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort_(),this.minRightSideBearing=e.readShort_(),this.xMaxExtent=e.readShort_(),this.caretSlopeRise=e.readShort_(),this.caretSlopeRun=e.readShort_(),this.caretOffset=e.readShort_(),e.skip(8),this.metricDataFormat=e.readShort_(),this.numOfLongHorMetrics=e.readShort()}render(e){var t=CT();return t.writeLong(this.version),t.writeShort_(this.ascent),t.writeShort_(this.descent),t.writeShort_(this.lineGap),t.writeShort(this.advanceWidthMax),t.writeShort_(this.minLeftSideBearing),t.writeShort_(this.minRightSideBearing),t.writeShort_(this.xMaxExtent),t.writeShort_(this.caretSlopeRise),t.writeShort_(this.caretSlopeRun),t.writeShort_(this.caretOffset),t.write([0,0,0,0,0,0,0,0]),t.writeShort_(this.metricDataFormat),t.writeShort(e.length),t.get()}},class extends TT{parse(e){e.offset(this.offset),this.version=e.readLong(),this.numGlyphs=e.readShort(),this.maxPoints=e.readShort(),this.maxContours=e.readShort(),this.maxComponentPoints=e.readShort(),this.maxComponentContours=e.readShort(),this.maxZones=e.readShort(),this.maxTwilightPoints=e.readShort(),this.maxStorage=e.readShort(),this.maxFunctionDefs=e.readShort(),this.maxInstructionDefs=e.readShort(),this.maxStackElements=e.readShort(),this.maxSizeOfInstructions=e.readShort(),this.maxComponentElements=e.readShort(),this.maxComponentDepth=e.readShort()}render(e){var t=CT();return t.writeLong(this.version),t.writeShort(e.length),t.writeShort(this.maxPoints),t.writeShort(this.maxContours),t.writeShort(this.maxComponentPoints),t.writeShort(this.maxComponentContours),t.writeShort(this.maxZones),t.writeShort(this.maxTwilightPoints),t.writeShort(this.maxStorage),t.writeShort(this.maxFunctionDefs),t.writeShort(this.maxInstructionDefs),t.writeShort(this.maxStackElements),t.writeShort(this.maxSizeOfInstructions),t.writeShort(this.maxComponentElements),t.writeShort(this.maxComponentDepth),t.get()}},class extends TT{parse(e){e.offset(this.offset);var t=this.file,n=t.hhea;this.metrics=e.times(n.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}});var r=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics;this.leftSideBearings=e.times(r,e.readShort_)}forGlyph(e){var t=this.metrics,n=t.length;return e<n?t[e]:{advance:t[n-1].advance,lsb:this.leftSideBearings[e-n]}}render(e){for(var t=CT(),n=0;n<e.length;++n){var r=this.forGlyph(e[n]);t.writeShort(r.advance),t.writeShort_(r.lsb)}return t.get()}},(function(){var e=`.notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat`.split(/\s+/g);return class extends TT{parse(e){e.offset(this.offset),this.format=e.readLong(),this.italicAngle=e.readFixed_(),this.underlinePosition=e.readShort_(),this.underlineThickness=e.readShort_(),this.isFixedPitch=e.readLong(),this.minMemType42=e.readLong(),this.maxMemType42=e.readLong(),this.minMemType1=e.readLong(),this.maxMemType1=e.readLong();var t;switch(this.format){case 65536:case 196608:break;case 131072:t=e.readShort(),this.glyphNameIndex=e.times(t,e.readShort),this.names=[];for(var n=this.offset+this.length;e.offset()<n;)this.names.push(e.readString(e.readByte()));break;case 151552:t=e.readShort(),this.offsets=e.read(t);break;case 262144:this.map=e.times(this.file.maxp.numGlyphs,e.readShort);break}}glyphFor(t){switch(this.format){case 65536:return e[t]||`.notdef`;case 131072:var n=this.glyphNameIndex[t];return n<e.length?e[n]:this.names[n-e.length]||`.notdef`;case 151552:case 196608:return`.notdef`;case 262144:return this.map[t]||65535}}render(t){if(this.format==196608)return this.raw();var n=CT(this.rawData.slice(this.offset,32));n.writeLong(131072),n.offset(32);for(var r=[],i=[],a=0;a<t.length;++a){var o=t[a],s=this.glyphFor(o),c=e.indexOf(s);c>=0?r.push(c):(r.push(e.length+i.length),i.push(s))}for(n.writeShort(t.length),a=0;a<r.length;++a)n.writeShort(r[a]);for(a=0;a<i.length;++a)n.writeByte(i[a].length),n.writeString(i[a]);return n.get()}}})(),class extends TT{parse(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))}render(){return this.raw()}};function ET(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function DT(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(var r in n)ET(n,r)&&(e[r]=n[r])}}return e}function OT(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}var kT={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+r),i);return}for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r=0,i,a,o;for(t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o},Buf8:function(e){return new Uint8Array(e)},Buf16:function(e){return new Uint16Array(e)},Buf32:function(e){return new Int32Array(e)}},AT={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)},Buf8:function(e){return Array(e)},Buf16:function(e){return Array(e)},Buf32:function(e){return Array(e)}};let jT=()=>{let e=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;return jT=()=>e,e},MT=(e,t,n,r,i)=>(MT=jT()?kT.arraySet:AT.arraySet,MT(e,t,n,r,i)),NT=e=>(NT=jT()?kT.flattenChunks:AT.flattenChunks,NT(e)),PT=e=>(PT=jT()?kT.Buf8:AT.Buf8,PT(e)),FT=e=>(FT=jT()?kT.Buf16:AT.Buf16,FT(e)),IT=e=>(IT=jT()?kT.Buf32:AT.Buf32,IT(e)),LT=function(){let e=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}return LT=()=>e,e},RT=function(){let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{e=!1}return RT=()=>e,e},zT=function(e){for(var t=PT(256),n=0;n<256;n++)t[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return t[254]=t[254]=1,zT=e=>t[e],t[e]};function BT(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t}function VT(e,t){if(t<65534&&(e.subarray&&RT()||!e.subarray&&LT()))return String.fromCharCode.apply(null,OT(e,t));for(var n=``,r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}function HT(e){return VT(e,e.length)}function UT(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}function WT(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}let GT=function(){let e=WT();return GT=()=>e,e};function KT(e,t,n,r){var i=GT(),a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var qT={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`};function JT(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}function YT(e){for(var t=e.length;--t>=0;)e[t]=0}var XT=0,ZT=1,QT=2,$T=3,eE=258,tE=29,nE=256,rE=nE+1+tE,iE=30,aE=19,oE=2*rE+1,sE=15,cE=16,lE=7,uE=256,dE=16,fE=17,pE=18,mE=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],hE=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],gE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],vE=512,yE,bE,xE,SE,CE,wE;function TE(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var EE,DE,OE;function kE(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function AE(e){return e<256?xE[e]:xE[256+(e>>>7)]}function jE(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function ME(e,t,n){e.bi_valid>cE-n?(e.bi_buf|=t<<e.bi_valid&65535,jE(e,e.bi_buf),e.bi_buf=t>>cE-e.bi_valid,e.bi_valid+=n-cE):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function NE(e,t,n){ME(e,n[t*2],n[t*2+1])}function PE(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function FE(e){e.bi_valid===16?(jE(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function IE(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=sE;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<oE;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}}function LE(e,t,n){var r=Array(sE+1),i=0,a,o;for(a=1;a<=sE;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=PE(r[s]++,s))}}function RE(){var e,t,n,r,i,a=Array(sE+1);for(yE=Array((rE+2)*2),YT(yE),bE=Array(iE*2),YT(bE),xE=Array(vE),YT(xE),SE=Array(eE-$T+1),YT(SE),CE=Array(tE),YT(CE),wE=Array(iE),YT(wE),n=0,r=0;r<tE-1;r++)for(CE[r]=n,e=0;e<1<<mE[r];e++)SE[n++]=r;for(SE[n-1]=r,i=0,r=0;r<16;r++)for(wE[r]=i,e=0;e<1<<hE[r];e++)xE[i++]=r;for(i>>=7;r<iE;r++)for(wE[r]=i<<7,e=0;e<1<<hE[r]-7;e++)xE[256+i++]=r;for(t=0;t<=sE;t++)a[t]=0;for(e=0;e<=143;)yE[e*2+1]=8,e++,a[8]++;for(;e<=255;)yE[e*2+1]=9,e++,a[9]++;for(;e<=279;)yE[e*2+1]=7,e++,a[7]++;for(;e<=287;)yE[e*2+1]=8,e++,a[8]++;for(LE(yE,rE+1,a),e=0;e<iE;e++)bE[e*2+1]=5,bE[e*2]=PE(e,5);EE=new TE(yE,mE,nE+1,rE,sE),DE=new TE(bE,hE,0,iE,sE),OE=new TE([],gE,0,aE,lE)}function zE(e){var t;for(t=0;t<rE;t++)e.dyn_ltree[t*2]=0;for(t=0;t<iE;t++)e.dyn_dtree[t*2]=0;for(t=0;t<aE;t++)e.bl_tree[t*2]=0;e.dyn_ltree[uE*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function BE(e){e.bi_valid>8?jE(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function VE(e,t,n,r){BE(e),r&&(jE(e,n),jE(e,~n)),MT(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function HE(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function UE(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&HE(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!HE(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function WE(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?NE(e,i,t):(o=SE[i],NE(e,o+nE+1,t),s=mE[o],s!==0&&(i-=CE[o],ME(e,i,s)),r--,o=AE(r),NE(e,o,n),s=hE[o],s!==0&&(r-=wE[o],ME(e,r,s)));while(a<e.last_lit);NE(e,uE,t)}function GE(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=oE,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)UE(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],UE(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,UE(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],IE(e,t),LE(n,c,e.bl_count)}function KE(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[fE*2]++:e.bl_tree[pE*2]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[dE*2]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function qE(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do NE(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(NE(e,fE,e.bl_tree),ME(e,s-3,3)):(NE(e,pE,e.bl_tree),ME(e,s-11,7)):(a!==i&&(NE(e,a,e.bl_tree),s--),NE(e,dE,e.bl_tree),ME(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function JE(e){var t;for(KE(e,e.dyn_ltree,e.l_desc.max_code),KE(e,e.dyn_dtree,e.d_desc.max_code),GE(e,e.bl_desc),t=aE-1;t>=3&&e.bl_tree[_E[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function YE(e,t,n,r){var i;for(ME(e,t-257,5),ME(e,n-1,5),ME(e,r-4,4),i=0;i<r;i++)ME(e,e.bl_tree[_E[i]*2+1],3);qE(e,e.dyn_ltree,t-1),qE(e,e.dyn_dtree,n-1)}function XE(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<nE;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0}var ZE=!1;function QE(e){ZE||=(RE(),!0),e.l_desc=new kE(e.dyn_ltree,EE),e.d_desc=new kE(e.dyn_dtree,DE),e.bl_desc=new kE(e.bl_tree,OE),e.bi_buf=0,e.bi_valid=0,zE(e)}function $E(e,t,n,r){ME(e,(XT<<1)+ +!!r,3),VE(e,t,n,!0)}function eD(e){ME(e,ZT<<1,3),NE(e,uE,yE),FE(e)}function tD(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=XE(e)),GE(e,e.l_desc),GE(e,e.d_desc),o=JE(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?$E(e,t,n,r):e.strategy===4||a===i?(ME(e,(ZT<<1)+ +!!r,3),WE(e,yE,bE)):(ME(e,(QT<<1)+ +!!r,3),YE(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),WE(e,e.dyn_ltree,e.dyn_dtree)),zE(e),r&&BE(e)}function nD(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(SE[n]+nE+1)*2]++,e.dyn_dtree[AE(t)*2]++),e.last_lit===e.lit_bufsize-1}var rD=9,iD=286,aD=30,oD=19,sD=2*iD+1,cD=15,lD=3,uD=258,dD=uD+lD+1,fD=32,pD=42,mD=69,hD=73,gD=91,_D=103,vD=113,yD=666,bD=1,xD=2,SD=3,CD=4,wD=3;function TD(e,t){return e.msg=qT[t],t}function ED(e){return(e<<1)-(e>4?9:0)}function DD(e){for(var t=e.length;--t>=0;)e[t]=0}function OD(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(MT(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function kD(e,t){tD(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,OD(e.strm)}function AD(e,t){e.pending_buf[e.pending++]=t}function jD(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function MD(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,MT(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=UT(e.adler,t,i,n):e.state.wrap===2&&(e.adler=KT(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function ND(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-dD?e.strstart-(e.w_size-dD):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+uD,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=uD-(f-r),r=f-uD,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function PD(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-dD)){MT(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=MD(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=lD)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+lD-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<lD)););}while(e.lookahead<dD&&e.strm.avail_in!==0)}function FD(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(PD(e),e.lookahead===0&&t===0)return bD;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,kD(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-dD&&(kD(e,!1),e.strm.avail_out===0))return bD}return e.insert=0,t===4?(kD(e,!0),e.strm.avail_out===0?SD:CD):(e.strstart>e.block_start&&(kD(e,!1),e.strm.avail_out),bD)}function ID(e,t){for(var n,r;;){if(e.lookahead<dD){if(PD(e),e.lookahead<dD&&t===0)return bD;if(e.lookahead===0)break}if(n=0,e.lookahead>=lD&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+lD-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-dD&&(e.match_length=ND(e,n)),e.match_length>=lD)if(r=nD(e,e.strstart-e.match_start,e.match_length-lD),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=lD){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+lD-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=nD(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(kD(e,!1),e.strm.avail_out===0))return bD}return e.insert=e.strstart<lD-1?e.strstart:lD-1,t===4?(kD(e,!0),e.strm.avail_out===0?SD:CD):e.last_lit&&(kD(e,!1),e.strm.avail_out===0)?bD:xD}function LD(e,t){for(var n,r,i;;){if(e.lookahead<dD){if(PD(e),e.lookahead<dD&&t===0)return bD;if(e.lookahead===0)break}if(n=0,e.lookahead>=lD&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+lD-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=lD-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-dD&&(e.match_length=ND(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===lD&&e.strstart-e.match_start>4096)&&(e.match_length=lD-1)),e.prev_length>=lD&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-lD,r=nD(e,e.strstart-1-e.prev_match,e.prev_length-lD),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+lD-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=lD-1,e.strstart++,r&&(kD(e,!1),e.strm.avail_out===0))return bD}else if(e.match_available){if(r=nD(e,0,e.window[e.strstart-1]),r&&kD(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return bD}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=nD(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<lD-1?e.strstart:lD-1,t===4?(kD(e,!0),e.strm.avail_out===0?SD:CD):e.last_lit&&(kD(e,!1),e.strm.avail_out===0)?bD:xD}function RD(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=uD){if(PD(e),e.lookahead<=uD&&t===0)return bD;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=lD&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+uD;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=uD-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=lD?(n=nD(e,1,e.match_length-lD),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=nD(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(kD(e,!1),e.strm.avail_out===0))return bD}return e.insert=0,t===4?(kD(e,!0),e.strm.avail_out===0?SD:CD):e.last_lit&&(kD(e,!1),e.strm.avail_out===0)?bD:xD}function zD(e,t){for(var n;;){if(e.lookahead===0&&(PD(e),e.lookahead===0)){if(t===0)return bD;break}if(e.match_length=0,n=nD(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(kD(e,!1),e.strm.avail_out===0))return bD}return e.insert=0,t===4?(kD(e,!0),e.strm.avail_out===0?SD:CD):e.last_lit&&(kD(e,!1),e.strm.avail_out===0)?bD:xD}function BD(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}let VD=function(){let e=[new BD(0,0,0,0,FD),new BD(4,4,8,4,ID),new BD(4,5,16,8,ID),new BD(4,6,32,32,ID),new BD(4,4,16,16,LD),new BD(8,16,32,32,LD),new BD(8,16,128,128,LD),new BD(8,32,128,256,LD),new BD(32,128,258,1024,LD),new BD(32,258,258,4096,LD)];return VD=()=>e,e};function HD(e){e.window_size=2*e.w_size,DD(e.head);let t=VD();e.max_lazy_match=t[e.level].max_lazy,e.good_match=t[e.level].good_length,e.nice_match=t[e.level].nice_length,e.max_chain_length=t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=lD-1,e.match_available=0,e.ins_h=0}function UD(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=FT(sD*2),this.dyn_dtree=FT((2*aD+1)*2),this.bl_tree=FT((2*oD+1)*2),DD(this.dyn_ltree),DD(this.dyn_dtree),DD(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=FT(cD+1),this.heap=FT(2*iD+1),DD(this.heap),this.heap_len=0,this.heap_max=0,this.depth=FT(2*iD+1),DD(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function WD(e){var t;return!e||!e.state?TD(e,-2):(e.total_in=e.total_out=0,e.data_type=2,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?pD:vD,e.adler=t.wrap===2?0:1,t.last_flush=0,QE(t),0)}function GD(e){var t=WD(e);return t===0&&HD(e.state),t}function KD(e,t){return!e||!e.state||e.state.wrap!==2?-2:(e.state.gzhead=t,0)}function qD(e,t,n,r,i,a){if(!e)return-2;var o=1;if(t===-1&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>rD||n!==8||r<8||r>15||t<0||t>9||a<0||a>4)return TD(e,-2);r===8&&(r=9);var s=new UD;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+lD-1)/lD),s.window=PT(s.w_size*2),s.head=FT(s.hash_size),s.prev=FT(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=PT(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,GD(e)}function JD(e,t){var n,r,i,a;if(!e||!e.state||t>5||t<0)return e?TD(e,-2):-2;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===yD&&t!==4)return TD(e,e.avail_out===0?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===pD)if(r.wrap===2)e.adler=0,AD(r,31),AD(r,139),AD(r,8),r.gzhead?(AD(r,+!!r.gzhead.text+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),AD(r,r.gzhead.time&255),AD(r,r.gzhead.time>>8&255),AD(r,r.gzhead.time>>16&255),AD(r,r.gzhead.time>>24&255),AD(r,r.level===9?2:r.strategy>=2||r.level<2?4:0),AD(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(AD(r,r.gzhead.extra.length&255),AD(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=KT(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=mD):(AD(r,0),AD(r,0),AD(r,0),AD(r,0),AD(r,0),AD(r,r.level===9?2:r.strategy>=2||r.level<2?4:0),AD(r,wD),r.status=vD);else{var o=8+(r.w_bits-8<<4)<<8,s=-1;s=r.strategy>=2||r.level<2?0:r.level<6?1:r.level===6?2:3,o|=s<<6,r.strstart!==0&&(o|=fD),o+=31-o%31,r.status=vD,jD(r,o),r.strstart!==0&&(jD(r,e.adler>>>16),jD(r,e.adler&65535)),e.adler=1}if(r.status===mD)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),OD(e),i=r.pending,r.pending===r.pending_buf_size));)AD(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=hD)}else r.status=hD;if(r.status===hD)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),OD(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?r.gzhead.name.charCodeAt(r.gzindex++)&255:0,AD(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=gD)}else r.status=gD;if(r.status===gD)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),OD(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?r.gzhead.comment.charCodeAt(r.gzindex++)&255:0,AD(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=KT(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=_D)}else r.status=_D;if(r.status===_D&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&OD(e),r.pending+2<=r.pending_buf_size&&(AD(r,e.adler&255),AD(r,e.adler>>8&255),e.adler=0,r.status=vD)):r.status=vD),r.pending!==0){if(OD(e),e.avail_out===0)return r.last_flush=-1,0}else if(e.avail_in===0&&ED(t)<=ED(n)&&t!==4)return TD(e,-5);if(r.status===yD&&e.avail_in!==0)return TD(e,-5);if(e.avail_in!==0||r.lookahead!==0||t!==0&&r.status!==yD){var c=r.strategy===2?zD(r,t):r.strategy===3?RD(r,t):VD()[r.level].func(r,t);if((c===SD||c===CD)&&(r.status=yD),c===bD||c===SD)return e.avail_out===0&&(r.last_flush=-1),0;if(c===xD&&(t===1?eD(r):t!==5&&($E(r,0,0,!1),t===3&&(DD(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),OD(e),e.avail_out===0))return r.last_flush=-1,0}return t===4?r.wrap<=0?1:(r.wrap===2?(AD(r,e.adler&255),AD(r,e.adler>>8&255),AD(r,e.adler>>16&255),AD(r,e.adler>>24&255),AD(r,e.total_in&255),AD(r,e.total_in>>8&255),AD(r,e.total_in>>16&255),AD(r,e.total_in>>24&255)):(jD(r,e.adler>>>16),jD(r,e.adler&65535)),OD(e),r.wrap>0&&(r.wrap=-r.wrap),+(r.pending===0)):0}function YD(e){var t;return!e||!e.state?-2:(t=e.state.status,t!==pD&&t!==mD&&t!==hD&&t!==gD&&t!==_D&&t!==vD&&t!==yD?TD(e,-2):(e.state=null,t===vD?TD(e,-3):0))}function XD(e,t){var n=t.length,r,i,a,o,s,c,l,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==pD||r.lookahead))return-2;for(o===1&&(e.adler=UT(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(DD(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=PT(r.w_size),MT(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,PD(r);r.lookahead>=lD;){i=r.strstart,a=r.lookahead-(lD-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+lD-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=lD-1,PD(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=lD-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,r.wrap=o,0}var ZD=Object.prototype.toString,QD=class{constructor(e){this.options=DT({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:``},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new JT,this.strm.avail_out=0;var n=qD(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==0)throw Error(qT[n]);if(t.header&&KD(this.strm,t.header),t.dictionary){var r=typeof t.dictionary==`string`?BT(t.dictionary):ZD.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary;if(n=XD(this.strm,r),n!==0)throw Error(qT[n]);this._dict_set=!0}}push(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?4:0,typeof e==`string`?n.input=BT(e):ZD.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=PT(r),n.next_out=0,n.avail_out=r),i=JD(n,a),i!==1&&i!==0)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===4||a===2))&&(this.options.to===`string`?this.onData(HT(OT(n.output,n.next_out))):this.onData(OT(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==1);return a===4?(i=YD(this.strm),this.onEnd(i),this.ended=!0,i===0):a===2?(this.onEnd(0),n.avail_out=0,!0):!0}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=NT(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}};function $D(e,t){var n=new QD(t);if(n.push(e,!0),n.err)throw n.msg||qT[n.err];return n.result}let eO=$D;function tO(){return!0}ib.browser;var nO=0;let rO=0;function iO(){var e=0,t=CT();function n(){for(var e=0;e<arguments.length;++e){var r=arguments[e];if(r===void 0)throw Error(`Cannot output undefined to PDF`);if(r instanceof fO)r.beforeRender(n),r.render(n);else if(cO(r))uO(r,n);else if(lO(r))dO(r,n);else if(typeof r==`number`){if(isNaN(r))throw Error(`Cannot output NaN to PDF`);var i=r.toFixed(7);i.indexOf(`.`)>=0&&(i=i.replace(/\.?0+$/,``)),i==`-0`&&(i=`0`),t.writeString(i)}else/string|boolean/.test(typeof r)?t.writeString(String(r)):typeof r.get==`function`?t.write(r.get()):typeof r==`object`&&(r?n(new _O(r)):t.writeString(`null`))}}return n.writeData=function(e){t.write(e)},n.withIndent=function(t){++e,t(n),--e},n.indent=function(){n(`
68
68
  `,aO(``,e*2,` `)),n.apply(null,arguments)},n.offset=function(){return t.offset()},n.toString=function(){throw Error(`FIX CALLER`)},n.get=function(){return t.get()},n.stream=function(){return t},n}function aO(e,t,n){for(;e.length<t;)e=n+e;return e}function oO(e,t){return aO(String(e),t,`0`)}function sO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var cO=Array.isArray||function(e){return e instanceof Array};function lO(e){return e instanceof Date}function uO(e,t){t(`[`),e.length>0&&t.withIndent(function(){for(var n=0;n<e.length;++n)n>0&&n%8==0?t.indent(e[n]):t(` `,e[n])}),t(` ]`)}function dO(e,t){t(`(D:`,oO(e.getUTCFullYear(),4),oO(e.getUTCMonth()+1,2),oO(e.getUTCDate(),2),oO(e.getUTCHours(),2),oO(e.getUTCMinutes(),2),oO(e.getUTCSeconds(),2),`Z)`)}var fO=class{beforeRender(){}},pO=class extends fO{constructor(e,t){super(),this.value=e,this.utf16be=!!t}render(e){let t=this.value;if(this.utf16be)t=`\u00fe\u00ff`+Ub(t),t=t.replace(/([\(\)\\])/g,`\\$1`),e(`(`,t,`)`);else{let r=[40];for(var n=0;n<t.length;++n){let e=t.charCodeAt(n)&255;(e==40||e==41||e==92)&&r.push(92),r.push(e)}r.push(41),e.writeData(r)}}toString(){return this.value}},mO=class extends pO{constructor(e){super(e),this.value=e}render(e){e(`<`);for(var t=0;t<this.value.length;++t)e(oO(this.value.charCodeAt(t).toString(16),4));e(`>`)}},hO=class extends fO{static get(e){return gO(e)}constructor(e){super(),this.name=e}render(e){e(`/`+this.escape())}escape(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return`#`+oO(e.charCodeAt(0).toString(16),2)})}toString(){return this.name}};function gO(e){return new hO(e)}var _O=class extends fO{constructor(e){super(),this.props=e}render(e){var t=this.props,n=!0;e(`<<`),e.withIndent(function(){for(var r in t)sO(t,r)&&!/^_/.test(r)&&(n=!1,e.indent(gO(r),` `,t[r]))}),n||e.indent(),e(`>>`)}},vO=class extends fO{constructor(e,t,n){if(super(),typeof e==`string`){var r=CT();r.write(e),e=r}this.data=e,this.props=t||{},this.compress=n}render(e){var t=this.data.get(),n=this.props;this.compress&&tO()&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(gO(`FlateDecode`)),t=eO(t)),n.Length=t.length,e(new _O(n),` stream`,`
69
69
  `),e.writeData(t),e(`